From 85939ad5dca6e61d34166004462ba18d54b1fb1a Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 17 Aug 2020 16:43:54 +0100 Subject: [PATCH 01/11] removed LayoutEditor (not used) --- .../ComponentPropertiesPanel.svelte | 1 - .../userInterface/LayoutEditor.svelte | 170 ------------------ 2 files changed, 171 deletions(-) delete mode 100644 packages/builder/src/components/userInterface/LayoutEditor.svelte diff --git a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte index 5b0be9aa49..23ca5d8981 100644 --- a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte +++ b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte @@ -11,7 +11,6 @@ CircleIndicator, EventsIcon, } from "components/common/Icons/" - import LayoutEditor from "./LayoutEditor.svelte" import EventsEditor from "./EventsEditor" import panelStructure from "./temporaryPanelStructure.js" import CategoryTab from "./CategoryTab.svelte" diff --git a/packages/builder/src/components/userInterface/LayoutEditor.svelte b/packages/builder/src/components/userInterface/LayoutEditor.svelte deleted file mode 100644 index b36e6aa4a7..0000000000 --- a/packages/builder/src/components/userInterface/LayoutEditor.svelte +++ /dev/null @@ -1,170 +0,0 @@ - - -

Layout

-
- {#each Object.entries(display) as [key, [name, meta, size]] (component._id + key)} -
-
{name}:
- onStyleChanged('layout', key, _value)} - values={layout[key] || newValue(meta.length)} - propertyName={name} - {meta} - {size} - type="text" /> -
- {/each} -
- - - -

Spacing

-
- {#each Object.entries(spacing) as [key, [name, meta, size]] (component._id + key)} -
-
{name}:
- onStyleChanged('position', key, _value)} - values={layout[key] || newValue(meta.length)} - {meta} - {size} - type="text" /> -
- {/each} -
- -

Size

-
- {#each Object.entries(size) as [key, [name, meta, size]] (component._id + key)} -
-
{name}:
- onStyleChanged('position', key, _value)} - values={layout[key] || newValue(meta.length)} - type="text" - {meta} - {size} /> -
- {/each} -
- -

Order

-
- {#each Object.entries(zindex) as [key, [name, meta, size]] (component._id + key)} -
-
{name}:
- onStyleChanged('position', key, _value)} - values={layout[key] || newValue(meta.length)} - {meta} - {size} /> -
- {/each} -
- - From 6cf99bbbc79e0086a95565677dd4204259bdfc30 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 17 Aug 2020 16:45:13 +0100 Subject: [PATCH 02/11] removed InputGroup (not used) --- .../common/Inputs/InputGroup.svelte | 50 ------------------- .../userInterface/SettingsView.svelte | 3 +- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 packages/builder/src/components/common/Inputs/InputGroup.svelte diff --git a/packages/builder/src/components/common/Inputs/InputGroup.svelte b/packages/builder/src/components/common/Inputs/InputGroup.svelte deleted file mode 100644 index 385623ca19..0000000000 --- a/packages/builder/src/components/common/Inputs/InputGroup.svelte +++ /dev/null @@ -1,50 +0,0 @@ - - -
-
{label}
-
- {#each meta as m, i} - handleChange(value || 0, i)} /> - {/each} -
-
- - diff --git a/packages/builder/src/components/userInterface/SettingsView.svelte b/packages/builder/src/components/userInterface/SettingsView.svelte index 551f81bd2f..46ca1b1a05 100644 --- a/packages/builder/src/components/userInterface/SettingsView.svelte +++ b/packages/builder/src/components/userInterface/SettingsView.svelte @@ -1,7 +1,6 @@ - -
- {#if prop_definition.type !== 'event'} -
{prop_name}
- store.setComponentProp(prop_name, v)} /> - {/if} -
- - diff --git a/packages/builder/src/components/userInterface/PropsView.svelte b/packages/builder/src/components/userInterface/PropsView.svelte deleted file mode 100644 index caf79eb4ce..0000000000 --- a/packages/builder/src/components/userInterface/PropsView.svelte +++ /dev/null @@ -1,52 +0,0 @@ - - -
- -
- {#if componentDef} - {#each Object.entries(componentDef.props) as [prop_name, prop_def], index} - {#if prop_def !== 'event'} -
- - -
- {/if} - {/each} - {/if} -
- -
- - diff --git a/packages/builder/src/components/userInterface/StateBindingControl.svelte b/packages/builder/src/components/userInterface/StateBindingControl.svelte deleted file mode 100644 index c37b0b52e9..0000000000 --- a/packages/builder/src/components/userInterface/StateBindingControl.svelte +++ /dev/null @@ -1,63 +0,0 @@ - - -
- {#if type === 'bool'} -
- onChanged(!value)} /> -
- {:else if type === 'models'} - - {:else if type === 'options' || type === 'models'} - - {/if} -
- - From 682498b7193e0b01f3dcb13fa2d262232f9f4417 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Tue, 18 Aug 2020 14:51:02 +0100 Subject: [PATCH 04/11] all inputs using BBUI --- .../src/components/common/Input.svelte | 62 ------------------- .../EventsEditor/EventEditorModal.svelte | 1 - .../PropertyPanelControls/Input.svelte | 11 ++++ .../userInterface/propertyCategories.js | 4 +- .../userInterface/temporaryPanelStructure.js | 2 +- 5 files changed, 14 insertions(+), 66 deletions(-) delete mode 100644 packages/builder/src/components/common/Input.svelte create mode 100644 packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte diff --git a/packages/builder/src/components/common/Input.svelte b/packages/builder/src/components/common/Input.svelte deleted file mode 100644 index 730a9ed043..0000000000 --- a/packages/builder/src/components/common/Input.svelte +++ /dev/null @@ -1,62 +0,0 @@ - - - handleChange(e.target.value)} /> - - diff --git a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte index 62fc4071c6..34a3c78519 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte @@ -6,7 +6,6 @@ import IconButton from "../../common/IconButton.svelte" import ActionButton from "../../common/ActionButton.svelte" import Select from "../../common/Select.svelte" - import Input from "../../common/Input.svelte" import getIcon from "../../common/icon" import { CloseIcon } from "components/common/Icons/" diff --git a/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte b/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte new file mode 100644 index 0000000000..1721c1bbb2 --- /dev/null +++ b/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte @@ -0,0 +1,11 @@ + + + diff --git a/packages/builder/src/components/userInterface/propertyCategories.js b/packages/builder/src/components/userInterface/propertyCategories.js index b85a9abacb..a843a07ee9 100644 --- a/packages/builder/src/components/userInterface/propertyCategories.js +++ b/packages/builder/src/components/userInterface/propertyCategories.js @@ -1,9 +1,9 @@ -import Input from "../common/Input.svelte" +import Input from "./PropertyPanelControls/Input.svelte" import OptionSelect from "./OptionSelect.svelte" import FlatButtonGroup from "./FlatButtonGroup.svelte" import Colorpicker from "@budibase/colorpicker" /* - TODO: Allow for default values for all properties + TODO: Allow for default values for all proproperties */ export const layout = [ diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 5b016dcc84..b474aea038 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -1,4 +1,4 @@ -import Input from "../common/Input.svelte" +import Input from "./PropertyPanelControls/Input.svelte" import OptionSelect from "./OptionSelect.svelte" import Checkbox from "../common/Checkbox.svelte" import ModelSelect from "components/userInterface/ModelSelect.svelte" From 0ab5a01f9ec0df2b68e21338ffd8fe5f1f74adbb Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Tue, 18 Aug 2020 15:33:28 +0100 Subject: [PATCH 05/11] removed Select.svelte - replaced with bbui select --- .../src/components/common/Select.svelte | 65 ------------------- .../ModelDataTable/ModelDataTable.svelte | 1 - .../modals/CreateEditRecord.svelte | 1 - .../EventsEditor/EventEditorModal.svelte | 3 +- .../EventsEditor/HandlerSelector.svelte | 3 +- .../EventsEditor/StateBindingCascader.svelte | 3 +- 6 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 packages/builder/src/components/common/Select.svelte diff --git a/packages/builder/src/components/common/Select.svelte b/packages/builder/src/components/common/Select.svelte deleted file mode 100644 index 0eb368dac9..0000000000 --- a/packages/builder/src/components/common/Select.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - -
- {#if icon} - - {/if} - - - {@html getIcon('chevron-down', '24')} - -
- - diff --git a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte index 180ce154a3..80abd5e94a 100644 --- a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte @@ -3,7 +3,6 @@ import fsort from "fast-sort" import { store, backendUiStore } from "builderStore" import { Button, Icon } from "@budibase/bbui" - import Select from "components/common/Select.svelte" import ActionButton from "components/common/ActionButton.svelte" import LinkedRecord from "./LinkedRecord.svelte" import TablePagination from "./TablePagination.svelte" diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte index 424b18dc12..3eb7a4a149 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte @@ -5,7 +5,6 @@ import { compose, map, get, flatten } from "lodash/fp" import { Input, TextArea, Button } from "@budibase/bbui" import LinkedRecordSelector from "components/common/LinkedRecordSelector.svelte" - import Select from "components/common/Select.svelte" import RecordFieldControl from "./RecordFieldControl.svelte" import * as api from "../api" import ErrorsBox from "components/common/ErrorsBox.svelte" diff --git a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte index 34a3c78519..d2e6cc5693 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte @@ -1,11 +1,10 @@ @@ -19,8 +20,7 @@ {#each Object.keys(value.model.schema) as field}
- - +
{/each} diff --git a/packages/builder/src/components/workflow/SetupPanel/SetupPanel.svelte b/packages/builder/src/components/workflow/SetupPanel/SetupPanel.svelte index 16720f549f..1ddc72c4c3 100644 --- a/packages/builder/src/components/workflow/SetupPanel/SetupPanel.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/SetupPanel.svelte @@ -5,7 +5,7 @@ import { notifier } from "builderStore/store/notifications" import WorkflowBlockSetup from "./WorkflowBlockSetup.svelte" import DeleteWorkflowModal from "./DeleteWorkflowModal.svelte" - import { Button } from "@budibase/bbui" + import { Button, Input } from "@budibase/bbui" const { open, close } = getContext("simple-modal") @@ -112,13 +112,7 @@
Workflow: {workflow.name}
- -
- -
+
@@ -194,28 +188,12 @@ margin-bottom: 20px; } - .budibase_input { - height: 36px; - width: 244px; - border-radius: 3px; - background-color: var(--grey-2); - border: 1px solid var(--grey-2); - text-align: left; - color: var(--ink); - font-size: 14px; - padding-left: 12px; - } - header > span { color: var(--grey-5); margin-right: 20px; cursor: pointer; } - .form { - margin-top: 12px; - } - label { font-weight: 500; font-size: 14px; diff --git a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte index 0c527d8b4b..17f0b00ec2 100644 --- a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte @@ -3,6 +3,7 @@ import ComponentSelector from "./ParamInputs/ComponentSelector.svelte" import ModelSelector from "./ParamInputs/ModelSelector.svelte" import RecordSelector from "./ParamInputs/RecordSelector.svelte" + import { Input, TextArea, Select } from "@budibase/bbui" export let workflowBlock @@ -18,42 +19,34 @@
{#if Array.isArray(type)} - {#each type as option} {/each} - + {:else if type === 'component'} {:else if type === 'accessLevel'} - - + {:else if type === 'password'} - + {:else if type === 'number'} - + {:else if type === 'longText'} -