Treat component store the same as other stores, and move component utils into helpers
This commit is contained in:
parent
090460a8f5
commit
1650f37329
|
@ -1,9 +1,6 @@
|
|||
<script>
|
||||
import { Label, Select, Body, Multiselect } from "@budibase/bbui"
|
||||
import {
|
||||
findAllMatchingComponents,
|
||||
findComponent,
|
||||
} from "stores/builder/components/utils"
|
||||
import { findAllMatchingComponents, findComponent } from "helpers/components"
|
||||
import { currentAsset } from "stores/builder"
|
||||
import { onMount } from "svelte"
|
||||
import {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { Select, Label } from "@budibase/bbui"
|
||||
import { selectedScreen } from "stores/builder"
|
||||
import { findAllMatchingComponents } from "stores/builder/components/utils"
|
||||
import { findAllMatchingComponents } from "helpers/components"
|
||||
|
||||
export let parameters
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { Select, Label } from "@budibase/bbui"
|
||||
import { currentAsset } from "stores/builder"
|
||||
import { findAllMatchingComponents } from "stores/builder/components/utils"
|
||||
import { findAllMatchingComponents } from "helpers/components"
|
||||
|
||||
export let parameters
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
getActionProviders,
|
||||
buildFormSchema,
|
||||
} from "../../../../../../dataBinding"
|
||||
import { findComponent } from "stores/builder/components/utils"
|
||||
import { findComponent } from "helpers/components"
|
||||
|
||||
export let parameters
|
||||
export let nested
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
getActionProviders,
|
||||
buildFormSchema,
|
||||
} from "../../../../../../dataBinding"
|
||||
import { findComponent } from "stores/builder/components/utils"
|
||||
import { findComponent } from "helpers/components"
|
||||
|
||||
export let parameters
|
||||
export let bindings = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { Select } from "@budibase/bbui"
|
||||
import { makePropSafe } from "@budibase/string-templates"
|
||||
import { currentAsset } from "stores/builder"
|
||||
import { findAllMatchingComponents } from "stores/builder/components/utils"
|
||||
import { findAllMatchingComponents } from "helpers/components"
|
||||
|
||||
export let value
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
|
||||
import IntegrationQueryEditor from "components/integration/index.svelte"
|
||||
import { makePropSafe as safe } from "@budibase/string-templates"
|
||||
import { findAllComponents } from "stores/builder/components/utils"
|
||||
import { findAllComponents } from "helpers/components"
|
||||
import ClientBindingPanel from "components/common/bindings/ClientBindingPanel.svelte"
|
||||
import DataSourceCategory from "components/design/settings/controls/DataSourceSelect/DataSourceCategory.svelte"
|
||||
import { API } from "api"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import {
|
||||
findClosestMatchingComponent,
|
||||
findComponent,
|
||||
} from "stores/builder/components/utils"
|
||||
} from "helpers/components"
|
||||
import {
|
||||
getDatasourceForProvider,
|
||||
getSchemaForDatasource,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { ActionButton, notifications } from "@budibase/bbui"
|
||||
import { currentAsset, componentStore } from "stores/builder"
|
||||
import { findClosestMatchingComponent } from "stores/builder/components/utils"
|
||||
import { findClosestMatchingComponent } from "helpers/components"
|
||||
import { makeDatasourceFormComponents } from "../../../../templates/commonComponents"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
DatePicker,
|
||||
} from "@budibase/bbui"
|
||||
import { currentAsset, selectedComponent } from "stores/builder"
|
||||
import { findClosestMatchingComponent } from "stores/builder/components/utils"
|
||||
import { findClosestMatchingComponent } from "helpers/components"
|
||||
import {
|
||||
getSchemaForDatasource,
|
||||
getDatasourceForProvider,
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
findAllMatchingComponents,
|
||||
findComponent,
|
||||
findComponentPath,
|
||||
} from "stores/builder/components/utils"
|
||||
} from "helpers/components"
|
||||
import {
|
||||
currentAsset,
|
||||
componentStore,
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
encodeJSBinding,
|
||||
findHBSBlocks,
|
||||
} from "@budibase/string-templates"
|
||||
import { capitalise } from "helpers"
|
||||
import { capitalise } from "./index"
|
||||
|
||||
/**
|
||||
* Recursively searches for a specific component ID
|
|
@ -1,4 +1,4 @@
|
|||
import { findClosestMatchingComponent } from "stores/builder/components/utils"
|
||||
import { findClosestMatchingComponent } from "helpers/components"
|
||||
import {
|
||||
getDatasourceForProvider,
|
||||
getSchemaForDatasource,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import DesignSection from "./DesignSection.svelte"
|
||||
import CustomStylesSection from "./CustomStylesSection.svelte"
|
||||
import ConditionalUISection from "./ConditionalUISection.svelte"
|
||||
import { getComponentName } from "stores/builder/components/utils"
|
||||
import { getComponentName } from "helpers/components"
|
||||
import {
|
||||
getBindableProperties,
|
||||
getComponentBindableProperties,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
} from "stores/builder"
|
||||
import * as routify from "@roxi/routify"
|
||||
import { onDestroy } from "svelte"
|
||||
import { findComponent } from "stores/builder/components/utils"
|
||||
import { findComponent } from "helpers/components"
|
||||
import ComponentSettingsPanel from "./_components/Component/ComponentSettingsPanel.svelte"
|
||||
import NavigationPanel from "./_components/Navigation/index.svelte"
|
||||
import ScreenSettingsPanel from "./_components/Screen/index.svelte"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
} from "stores/builder"
|
||||
import { onMount } from "svelte"
|
||||
import { fly } from "svelte/transition"
|
||||
import { findComponentPath } from "stores/builder/components/utils"
|
||||
import { findComponentPath } from "helpers/components"
|
||||
|
||||
let searchString
|
||||
let searchRef
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
notifications,
|
||||
} from "@budibase/bbui"
|
||||
import ErrorSVG from "@budibase/frontend-core/assets/error.svg?raw"
|
||||
import {
|
||||
findComponent,
|
||||
findComponentPath,
|
||||
} from "stores/builder/components/utils"
|
||||
import { findComponent, findComponentPath } from "helpers/components"
|
||||
import { isActive, goto } from "@roxi/routify"
|
||||
|
||||
let iframe
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
componentStore,
|
||||
selectedComponent,
|
||||
} from "stores/builder"
|
||||
import { findComponent } from "stores/builder/components/utils"
|
||||
import { findComponent } from "helpers/components"
|
||||
import { goto, isActive } from "@roxi/routify"
|
||||
import { notifications } from "@budibase/bbui"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
findComponentPath,
|
||||
getComponentText,
|
||||
getComponentName,
|
||||
} from "stores/builder/components/utils"
|
||||
} from "helpers/components"
|
||||
import { get } from "svelte/store"
|
||||
import { dndStore } from "./dndStore"
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import { writable, get } from "svelte/store"
|
||||
import {
|
||||
findComponentParent,
|
||||
findComponentPath,
|
||||
} from "stores/builder/components/utils"
|
||||
import { findComponentParent, findComponentPath } from "helpers/components"
|
||||
import { selectedScreen, componentStore } from "stores/builder"
|
||||
|
||||
export const DropPosition = {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
} from "@budibase/bbui"
|
||||
import ScreenDetailsModal from "components/design/ScreenDetailsModal.svelte"
|
||||
import sanitizeUrl from "helpers/sanitizeUrl"
|
||||
import { makeComponentUnique } from "stores/builder/components/utils"
|
||||
import { makeComponentUnique } from "helpers/components"
|
||||
|
||||
export let screenId
|
||||
|
||||
|
|
|
@ -11,18 +11,23 @@ import {
|
|||
findComponentParent,
|
||||
findAllMatchingComponents,
|
||||
makeComponentUnique,
|
||||
} from "stores/builder/components/utils"
|
||||
} from "helpers/components"
|
||||
import { getComponentFieldOptions } from "helpers/formFields"
|
||||
import { selectedScreen } from "../screens"
|
||||
import { screenStore, appStore, previewStore, tables } from "stores/builder"
|
||||
import { buildFormSchema, getSchemaForDatasource } from "../../../dataBinding"
|
||||
import { selectedScreen } from "./screens"
|
||||
import {
|
||||
screenStore,
|
||||
appStore,
|
||||
previewStore,
|
||||
tables,
|
||||
} from "stores/builder/index"
|
||||
import { buildFormSchema, getSchemaForDatasource } from "../../dataBinding"
|
||||
import {
|
||||
BUDIBASE_INTERNAL_DB_ID,
|
||||
DEFAULT_BB_DATASOURCE_ID,
|
||||
DB_TYPE_INTERNAL,
|
||||
DB_TYPE_EXTERNAL,
|
||||
} from "constants/backend"
|
||||
import BudiStore from "../BudiStore"
|
||||
import BudiStore from "./BudiStore"
|
||||
import { Utils } from "@budibase/frontend-core"
|
||||
|
||||
export const INITIAL_COMPONENTS_STATE = {
|
|
@ -2,7 +2,7 @@ import { derived, get } from "svelte/store"
|
|||
import { cloneDeep } from "lodash/fp"
|
||||
import { Helpers } from "@budibase/bbui"
|
||||
import { RoleUtils, Utils } from "@budibase/frontend-core"
|
||||
import { findAllMatchingComponents } from "stores/builder/components/utils"
|
||||
import { findAllMatchingComponents } from "helpers/components"
|
||||
import {
|
||||
layoutStore,
|
||||
appStore,
|
||||
|
|
Loading…
Reference in New Issue