diff --git a/packages/builder/src/builderStore/storeUtils.js b/packages/builder/src/builderStore/storeUtils.js
index c8c0c7211a..68e20e56b3 100644
--- a/packages/builder/src/builderStore/storeUtils.js
+++ b/packages/builder/src/builderStore/storeUtils.js
@@ -56,4 +56,4 @@ export const walkProps = (props, action, cancelToken = null) => {
walkProps(child, action, cancelToken)
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/builder/src/components/common/Icons/More.svelte b/packages/builder/src/components/common/Icons/More.svelte
index f072c48976..1ec4139eae 100644
--- a/packages/builder/src/components/common/Icons/More.svelte
+++ b/packages/builder/src/components/common/Icons/More.svelte
@@ -1,8 +1,12 @@
-
diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditModel/FieldView.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditModel/FieldView.svelte
index ae78405ccb..46f8bd9189 100644
--- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditModel/FieldView.svelte
+++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditModel/FieldView.svelte
@@ -13,16 +13,20 @@
const FIELD_TYPES = ["string", "number", "boolean"]
- export let field = { type: "string", constraints: { type: "string", presence: false } }
+ export let field = {
+ type: "string",
+ constraints: { type: "string", presence: false },
+ }
export let schema
export let goBack
let errors = []
let draftField = cloneDeep(field)
-
+
let type = field.type
let constraints = field.constraints
- let required = field.constraints.presence && !field.constraints.presence.allowEmpty
+ let required =
+ field.constraints.presence && !field.constraints.presence.allowEmpty
const save = () => {
constraints.presence = required ? { allowEmpty: false } : false
@@ -31,15 +35,19 @@
schema[field.name] = draftField
goBack()
}
-
- $: constraints =
- type === "string" ? { type: "string", length: {}, presence: false }
- : type === "number" ? { type: "number", presence: false, numericality: {} }
- : type === "boolean" ? { type: "boolean", presence: false }
- : type === "datetime" ? { type: "date", datetime: {}, presence: false }
- : type.startsWith('array') ? { type: "array", presence: false }
+
+ $: constraints =
+ type === "string"
+ ? { type: "string", length: {}, presence: false }
+ : type === "number"
+ ? { type: "number", presence: false, numericality: {} }
+ : type === "boolean"
+ ? { type: "boolean", presence: false }
+ : type === "datetime"
+ ? { type: "date", datetime: {}, presence: false }
+ : type.startsWith("array")
+ ? { type: "array", presence: false }
: { type: "string", presence: false }
-
@@ -48,24 +56,26 @@
diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte
index d5320eca0d..62688d58e3 100644
--- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte
+++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte
@@ -23,22 +23,22 @@
function closed() {
onClosed()
}
-
+
const isSelect = meta =>
- meta.type === "string"
- && meta.constraints
- && meta.constraints.inclusion
- && meta.constraints.inclusion.length > 0
-
+ meta.type === "string" &&
+ meta.constraints &&
+ meta.constraints.inclusion &&
+ meta.constraints.inclusion.length > 0
+
function determineInputType(meta) {
if (meta.type === "datetime") return "date"
if (meta.type === "number") return "number"
if (meta.type === "boolean") return "checkbox"
if (isSelect(meta)) return "select"
-
+
return "text"
}
-
+
function determineOptions(meta) {
return isSelect(meta) ? meta.constraints.inclusion : []
}
@@ -54,8 +54,8 @@
)
if (recordResponse.errors) {
errors = Object.keys(recordResponse.errors)
- .map(k => ({dataPath: k, message: recordResponse.errors[k]}))
- .flat()
+ .map(k => ({ dataPath: k, message: recordResponse.errors[k] }))
+ .flat()
return
}
diff --git a/packages/builder/src/components/database/ModelDataTable/modals/RecordFieldControl.svelte b/packages/builder/src/components/database/ModelDataTable/modals/RecordFieldControl.svelte
index b0571a2353..5c308a7abb 100644
--- a/packages/builder/src/components/database/ModelDataTable/modals/RecordFieldControl.svelte
+++ b/packages/builder/src/components/database/ModelDataTable/modals/RecordFieldControl.svelte
@@ -4,15 +4,15 @@
export let label
export let errors = []
export let options = []
-
+
let checked = type === "checkbox" ? value : false
-
+
const determineClassName = type => {
if (type === "checkbox") return "uk-checkbox"
if (type === "select") return "uk-select"
return "uk-input"
}
-
+
const handleInput = event => {
if (event.target.type === "checkbox") {
value = event.target.checked
@@ -30,22 +30,22 @@
-{#if type === "select"}
-
+{#if type === 'select'}
+
{:else}
- 0}
- {checked}
- {type}
- {value}
- on:input={handleInput}
- on:change={handleInput} />
+ 0}
+ {checked}
+ {type}
+ {value}
+ on:input={handleInput}
+ on:change={handleInput} />
{/if}
diff --git a/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte b/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte
index 21ef4b2ab3..712031aa3d 100644
--- a/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte
+++ b/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte
@@ -1,149 +1,160 @@
- {}}>
+
{}}>
-
-
-
{
onOk={deleteComponent} />
\ No newline at end of file
+ .disabled {
+ color: var(--grey-dark);
+ cursor: default;
+ }
+
diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte
index 16aab64576..344e02d127 100644
--- a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte
+++ b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte
@@ -16,7 +16,6 @@
export let onSelect = () => {}
export let level = 0
-
const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1)
const get_name = s => (!s ? "" : last(s.split("/")))
@@ -43,7 +42,7 @@
style="padding-left: {level * 20 + 53}px">
{get_capitalised_name(component._component)}
-
+
@@ -96,5 +95,4 @@
.item:hover .actions {
display: block;
}
-
diff --git a/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte b/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte
index cee63c4cbb..86804885ff 100644
--- a/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte
+++ b/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte
@@ -45,5 +45,4 @@
.newscreen:hover {
background: var(--grey-light);
}
-