diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 40ffb0f489..da85abddb3 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -131,9 +131,9 @@ Cypress.Commands.add("navigateToFrontend", () => { Cypress.Commands.add("createScreen", (screenName, route) => { cy.get(".newscreen").click() - cy.get(".uk-input:first").type(screenName) + cy.get("[data-cy=new-screen-dialog] input:first").type(screenName) if (route) { - cy.get(".uk-input:last").type(route) + cy.get("[data-cy=new-screen-dialog] input:last").type(route) } cy.get(".uk-modal-footer").within(() => { cy.contains("Create Screen").click() diff --git a/packages/builder/src/components/common/ConfirmDialog.svelte b/packages/builder/src/components/common/ConfirmDialog.svelte index cd3ffb9b79..f9a4e7ec57 100644 --- a/packages/builder/src/components/common/ConfirmDialog.svelte +++ b/packages/builder/src/components/common/ConfirmDialog.svelte @@ -29,8 +29,10 @@ } const ok = () => { + const result = onOk() + // allow caller to return false, to cancel the "ok" + if (result === false) return hide() - onOk() } 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/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/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/database/ModelDataTable/modals/CreateUser.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateUser.svelte deleted file mode 100644 index eef38ecfec..0000000000 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateUser.svelte +++ /dev/null @@ -1,94 +0,0 @@ - - -
-
-
- -
Create User
-
-
- - -
-
- - -
-
- - -
-
-
-
- Cancel -
- Save -
- - - diff --git a/packages/builder/src/components/database/ModelDataTable/modals/index.js b/packages/builder/src/components/database/ModelDataTable/modals/index.js index 6bd9691228..af0b3cd70b 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/index.js +++ b/packages/builder/src/components/database/ModelDataTable/modals/index.js @@ -1,3 +1,2 @@ export { default as DeleteRecordModal } from "./DeleteRecord.svelte" export { default as CreateEditRecordModal } from "./CreateEditRecord.svelte" -export { default as CreateUserModal } from "./CreateUser.svelte" diff --git a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte index 5b0be9aa49..0a9d5c75ac 100644 --- a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte +++ b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte @@ -1,6 +1,5 @@ - -

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} -
- - diff --git a/packages/builder/src/components/userInterface/NewScreen.svelte b/packages/builder/src/components/userInterface/NewScreen.svelte index 75bb332eca..b1963bd3f5 100644 --- a/packages/builder/src/components/userInterface/NewScreen.svelte +++ b/packages/builder/src/components/userInterface/NewScreen.svelte @@ -1,6 +1,5 @@ - -
- {#if prop_definition.type !== 'event'} -
{prop_name}
- store.setComponentProp(prop_name, v)} /> - {/if} -
- - 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/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/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 type === 'bool'} -
- onChanged(!value)} /> -
- {:else if type === 'models'} - - {:else if type === 'options' || type === 'models'} - - {/if} -
- - diff --git a/packages/builder/src/components/userInterface/propertyCategories.js b/packages/builder/src/components/userInterface/propertyCategories.js index b85a9abacb..9c622a383a 100644 --- a/packages/builder/src/components/userInterface/propertyCategories.js +++ b/packages/builder/src/components/userInterface/propertyCategories.js @@ -1,4 +1,4 @@ -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" diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 76aa0de672..e3e934bb28 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" diff --git a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte index 125ef2436e..7d0dbb2c06 100644 --- a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte @@ -1,5 +1,6 @@ @@ -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'} -