diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
index 03e22acd4d..0f85d2e3e3 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/componentStructure.json
@@ -71,6 +71,7 @@
"multifieldselect",
"s3upload",
"codescanner",
+ "bbreferencesinglefield",
"bbreferencefield"
]
},
diff --git a/packages/builder/src/stores/builder/automations.js b/packages/builder/src/stores/builder/automations.js
index a31b05a8d8..cbe48cef33 100644
--- a/packages/builder/src/stores/builder/automations.js
+++ b/packages/builder/src/stores/builder/automations.js
@@ -166,10 +166,16 @@ const automationActions = store => ({
await store.actions.save(newAutomation)
},
test: async (automation, testData) => {
- const result = await API.testAutomation({
- automationId: automation?._id,
- testData,
- })
+ let result
+ try {
+ result = await API.testAutomation({
+ automationId: automation?._id,
+ testData,
+ })
+ } catch (err) {
+ const message = err.message || err.status || JSON.stringify(err)
+ throw `Automation test failed - ${message}`
+ }
if (!result?.trigger && !result?.steps?.length) {
if (result?.err?.code === "usage_limit_exceeded") {
throw "You have exceeded your automation quota"
diff --git a/packages/builder/src/stores/builder/builder.js b/packages/builder/src/stores/builder/builder.js
index d002062da9..055498bc91 100644
--- a/packages/builder/src/stores/builder/builder.js
+++ b/packages/builder/src/stores/builder/builder.js
@@ -14,6 +14,7 @@ export const INITIAL_BUILDER_STATE = {
tourKey: null,
tourStepKey: null,
hoveredComponentId: null,
+ fonts: null,
}
export class BuilderStore extends BudiStore {
@@ -36,6 +37,16 @@ export class BuilderStore extends BudiStore {
this.websocket
}
+ loadFonts(fontFaces) {
+ const ff = fontFaces.map(
+ fontFace => `${fontFace.family}-${fontFace.weight}`
+ )
+ this.update(state => ({
+ ...state,
+ fonts: [...(state.fonts || []), ...ff],
+ }))
+ }
+
init(app) {
if (!app?.appId) {
console.error("BuilderStore: No appId supplied for websocket")
diff --git a/packages/builder/src/stores/builder/components.js b/packages/builder/src/stores/builder/components.js
index fe5f4e8a05..19a4f41532 100644
--- a/packages/builder/src/stores/builder/components.js
+++ b/packages/builder/src/stores/builder/components.js
@@ -440,6 +440,8 @@ export class ComponentStore extends BudiStore {
return state
})
+ componentTreeNodesStore.makeNodeVisible(componentInstance._id)
+
// Log event
analytics.captureEvent(Events.COMPONENT_CREATED, {
name: componentInstance._component,
diff --git a/packages/client/manifest.json b/packages/client/manifest.json
index 63fb2e3cf0..2fae9c0213 100644
--- a/packages/client/manifest.json
+++ b/packages/client/manifest.json
@@ -7017,16 +7017,28 @@
]
}
],
- "context": {
- "type": "schema",
- "scope": "local"
- },
+ "context": [
+ {
+ "type": "schema",
+ "scope": "local"
+ },
+ {
+ "type": "static",
+ "values": [
+ {
+ "label": "Selected rows",
+ "key": "selectedRows",
+ "type": "array"
+ }
+ ]
+ }
+ ],
"actions": ["RefreshDatasource"]
},
"bbreferencefield": {
"devComment": "As bb reference is only used for user subtype for now, we are using user for icon and labels",
- "name": "User Field",
- "icon": "User",
+ "name": "User List Field",
+ "icon": "UserGroup",
"styles": ["size"],
"requiredAncestors": ["form"],
"editable": true,
@@ -7130,5 +7142,113 @@
]
}
]
+ },
+ "bbreferencesinglefield": {
+ "devComment": "As bb reference is only used for user subtype for now, we are using user for icon and labels",
+ "name": "User Field",
+ "icon": "User",
+ "styles": ["size"],
+ "requiredAncestors": ["form"],
+ "editable": true,
+ "size": {
+ "width": 400,
+ "height": 50
+ },
+ "settings": [
+ {
+ "type": "field/bb_reference_single",
+ "label": "Field",
+ "key": "field",
+ "required": true
+ },
+ {
+ "type": "text",
+ "label": "Label",
+ "key": "label"
+ },
+ {
+ "type": "text",
+ "label": "Placeholder",
+ "key": "placeholder"
+ },
+ {
+ "type": "text",
+ "label": "Default value",
+ "key": "defaultValue"
+ },
+ {
+ "type": "text",
+ "label": "Help text",
+ "key": "helpText"
+ },
+ {
+ "type": "event",
+ "label": "On change",
+ "key": "onChange",
+ "context": [
+ {
+ "label": "Field Value",
+ "key": "value"
+ }
+ ]
+ },
+ {
+ "type": "validation/link",
+ "label": "Validation",
+ "key": "validation"
+ },
+ {
+ "type": "boolean",
+ "label": "Search",
+ "key": "autocomplete",
+ "defaultValue": true
+ },
+ {
+ "type": "boolean",
+ "label": "Disabled",
+ "key": "disabled",
+ "defaultValue": false
+ },
+ {
+ "type": "boolean",
+ "label": "Read only",
+ "key": "readonly",
+ "defaultValue": false,
+ "dependsOn": {
+ "setting": "disabled",
+ "value": true,
+ "invert": true
+ }
+ },
+ {
+ "type": "select",
+ "label": "Layout",
+ "key": "span",
+ "defaultValue": 6,
+ "hidden": true,
+ "showInBar": true,
+ "barStyle": "buttons",
+ "options": [
+ {
+ "label": "1 column",
+ "value": 6,
+ "barIcon": "Stop",
+ "barTitle": "1 column"
+ },
+ {
+ "label": "2 columns",
+ "value": 3,
+ "barIcon": "ColumnTwoA",
+ "barTitle": "2 columns"
+ },
+ {
+ "label": "3 columns",
+ "value": 2,
+ "barIcon": "ViewColumn",
+ "barTitle": "3 columns"
+ }
+ ]
+ }
+ ]
}
}
diff --git a/packages/client/src/components/app/GridBlock.svelte b/packages/client/src/components/app/GridBlock.svelte
index e365429cb6..4ed8f91f2a 100644
--- a/packages/client/src/components/app/GridBlock.svelte
+++ b/packages/client/src/components/app/GridBlock.svelte
@@ -1,8 +1,8 @@
-
- onRowClick?.({ row: e.detail })}
- />
-
+ onRowClick?.({ row: e.detail })}
+ />
+
+