From 7151f6df668d960b5cb84ea8926d5b24d98a043c Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 11 May 2022 14:03:08 +0100 Subject: [PATCH 01/46] Containers support onClick --- packages/client/manifest.json | 5 +++++ packages/client/src/components/app/Container.svelte | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 4190d7f076..bca61af09f 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -219,6 +219,11 @@ "showInBar": true, "barIcon": "ModernGridView", "barTitle": "Wrap" + }, + { + "type": "event", + "label": "On Click", + "key": "onClick" } ] }, diff --git a/packages/client/src/components/app/Container.svelte b/packages/client/src/components/app/Container.svelte index 148179c98f..9b2e170106 100644 --- a/packages/client/src/components/app/Container.svelte +++ b/packages/client/src/components/app/Container.svelte @@ -10,22 +10,30 @@ export let size export let gap export let wrap + export let onClick $: directionClass = direction ? `valid-container direction-${direction}` : "" $: hAlignClass = hAlign ? `hAlign-${hAlign}` : "" $: vAlignClass = vAlign ? `vAlign-${vAlign}` : "" $: sizeClass = size ? `size-${size}` : "" $: gapClass = gap ? `gap-${gap}` : "" + $: clickableClass = onClick ? "clickable" : "" $: classNames = [ directionClass, hAlignClass, vAlignClass, sizeClass, gapClass, + clickableClass, ].join(" ") -
+
@@ -104,4 +112,7 @@ .wrap { flex-wrap: wrap; } + .clickable { + cursor: pointer; + } From d9fb7297fa8c9119fd68448ada06dd4f40ed83e4 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 16 May 2022 11:26:52 +0100 Subject: [PATCH 02/46] Simplify clickable class --- packages/client/src/components/app/Container.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/client/src/components/app/Container.svelte b/packages/client/src/components/app/Container.svelte index 9b2e170106..a5c8ce6d4d 100644 --- a/packages/client/src/components/app/Container.svelte +++ b/packages/client/src/components/app/Container.svelte @@ -17,19 +17,18 @@ $: vAlignClass = vAlign ? `vAlign-${vAlign}` : "" $: sizeClass = size ? `size-${size}` : "" $: gapClass = gap ? `gap-${gap}` : "" - $: clickableClass = onClick ? "clickable" : "" $: classNames = [ directionClass, hAlignClass, vAlignClass, sizeClass, gapClass, - clickableClass, ].join(" ")
Date: Fri, 12 Aug 2022 11:29:57 +0100 Subject: [PATCH 03/46] Delete attachments on field clear --- packages/bbui/src/Form/Core/Dropzone.svelte | 2 ++ .../components/app/forms/AttachmentField.svelte | 12 ++++++++++++ packages/frontend-core/src/api/attachments.js | 14 ++++++++++++++ .../server/src/api/controllers/static/index.ts | 6 +++++- packages/server/src/api/routes/static.ts | 6 ++++++ packages/server/src/utilities/fileSystem/index.js | 2 ++ 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index 36515acbc5..80f51f5dae 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -17,6 +17,7 @@ export let disabled = false export let fileSizeLimit = BYTES_IN_MB * 20 export let processFiles = null + export let deleteAttachments = null export let handleFileTooLarge = null export let handleTooManyFiles = null export let gallery = true @@ -95,6 +96,7 @@ value.filter((x, idx) => idx !== selectedImageIdx) ) selectedImageIdx = 0 + await deleteAttachments(value.map(item => item.key)) } function navigateLeft() { diff --git a/packages/client/src/components/app/forms/AttachmentField.svelte b/packages/client/src/components/app/forms/AttachmentField.svelte index 5023e77ae5..8a98f92d83 100644 --- a/packages/client/src/components/app/forms/AttachmentField.svelte +++ b/packages/client/src/components/app/forms/AttachmentField.svelte @@ -47,6 +47,17 @@ } } + const deleteAttachments = async fileList => { + try { + return await API.deleteAttachments({ + keys: fileList, + tableId: formContext?.dataSource?.tableId, + }) + } catch (error) { + return [] + } + } + const handleChange = e => { fieldApi.setValue(e.detail) if (onChange) { @@ -72,6 +83,7 @@ error={fieldState.error} on:change={handleChange} {processFiles} + {deleteAttachments} {handleFileTooLarge} {handleTooManyFiles} {maximum} diff --git a/packages/frontend-core/src/api/attachments.js b/packages/frontend-core/src/api/attachments.js index e3b1b74e5b..1a24785a89 100644 --- a/packages/frontend-core/src/api/attachments.js +++ b/packages/frontend-core/src/api/attachments.js @@ -61,5 +61,19 @@ export const buildAttachmentEndpoints = API => { }) return { publicUrl } }, + + /** + * Deletes attachments from the bucket. + * @param keys the attachments to delete + * @param tableId the associated table ID + */ + deleteAttachments: async ({ keys, tableId }) => { + return await API.post({ + url: `/api/attachments/${tableId}/delete`, + body: { + keys, + }, + }) + }, } } diff --git a/packages/server/src/api/controllers/static/index.ts b/packages/server/src/api/controllers/static/index.ts index 7aeea98adc..c4d51293b5 100644 --- a/packages/server/src/api/controllers/static/index.ts +++ b/packages/server/src/api/controllers/static/index.ts @@ -12,7 +12,7 @@ const { } = require("../../../utilities/fileSystem") const env = require("../../../environment") const { clientLibraryPath } = require("../../../utilities") -const { upload } = require("../../../utilities/fileSystem") +const { upload, deleteFiles } = require("../../../utilities/fileSystem") const { attachmentsRelativeURL } = require("../../../utilities") const { DocumentType } = require("../../../db/utils") const { getAppDB, getAppId } = require("@budibase/backend-core/context") @@ -97,6 +97,10 @@ export const uploadFile = async function (ctx: any) { ctx.body = await Promise.all(uploads) } +export const deleteObjects = async function (ctx: any) { + ctx.body = await deleteFiles(ObjectStoreBuckets.APPS, ctx.request.body.keys) +} + export const serveApp = async function (ctx: any) { const db = getAppDB({ skip_setup: true }) const appInfo = await db.get(DocumentType.APP_METADATA) diff --git a/packages/server/src/api/routes/static.ts b/packages/server/src/api/routes/static.ts index 61cf2b1245..7cf3f5e145 100644 --- a/packages/server/src/api/routes/static.ts +++ b/packages/server/src/api/routes/static.ts @@ -45,6 +45,12 @@ router authorized(PermissionTypes.TABLE, PermissionLevels.WRITE), controller.uploadFile ) + .post( + "/api/attachments/:tableId/delete", + paramResource("tableId"), + authorized(PermissionTypes.TABLE, PermissionLevels.WRITE), + controller.deleteObjects + ) .get("/:appId/:path*", controller.serveApp) .get("/app/:appUrl/:path*", controller.serveApp) .post( diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index f4aebd11a8..1223ea55f0 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -15,6 +15,7 @@ const { streamUpload, deleteFolder, downloadTarball, + deleteFiles, } = require("./utilities") const { updateClientLibrary } = require("./clientLibrary") const env = require("../../environment") @@ -327,5 +328,6 @@ exports.cleanup = appIds => { exports.upload = upload exports.retrieve = retrieve exports.retrieveToTmp = retrieveToTmp +exports.deleteFiles = deleteFiles exports.TOP_LEVEL_PATH = TOP_LEVEL_PATH exports.NODE_MODULES_PATH = NODE_MODULES_PATH From df620fb9f729bf79512242cd6a30267e34d7bbb4 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 12 Aug 2022 11:43:39 +0100 Subject: [PATCH 04/46] Delete the selected file only --- packages/bbui/src/Form/Core/Dropzone.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index 80f51f5dae..68882fe810 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -95,8 +95,10 @@ "change", value.filter((x, idx) => idx !== selectedImageIdx) ) + await deleteAttachments( + value.filter((x, idx) => idx === selectedImageIdx).map(item => item.key) + ) selectedImageIdx = 0 - await deleteAttachments(value.map(item => item.key)) } function navigateLeft() { From a6108d1c8b0f6326a91081476e43049b337dbd72 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Sun, 14 Aug 2022 14:42:25 +0100 Subject: [PATCH 05/46] Block child button onClick if container hasOnClick --- packages/client/src/components/app/Button.svelte | 5 +++++ packages/client/src/components/app/Container.svelte | 7 ++++++- packages/client/src/utils/buttonActions.js | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/Button.svelte b/packages/client/src/components/app/Button.svelte index 018f21c583..a10b992561 100644 --- a/packages/client/src/components/app/Button.svelte +++ b/packages/client/src/components/app/Button.svelte @@ -4,6 +4,7 @@ const { styleable, builderStore } = getContext("sdk") const component = getContext("component") + const containerClickableStore = getContext("containerClickable") export let disabled = false export let text = "" @@ -18,6 +19,10 @@ let node + containerClickableStore.subscribe(hasOnClick => { + disabled = hasOnClick + }) + $: $component.editing && node?.focus() $: componentText = getComponentText(text, $builderStore, $component) diff --git a/packages/client/src/components/app/Container.svelte b/packages/client/src/components/app/Container.svelte index a5c8ce6d4d..e8e757bc3e 100644 --- a/packages/client/src/components/app/Container.svelte +++ b/packages/client/src/components/app/Container.svelte @@ -1,9 +1,13 @@
{ + if (actions && actions.length === 0) { + return null + } + // Prevent button actions in the builder preview if (!actions || get(builderStore).inBuilder) { return () => {} From 1f66cf9a83453643ac38bab9e2c9bd82b7e42613 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 15 Aug 2022 15:46:55 +0100 Subject: [PATCH 06/46] Allow delete attachments from builder data section --- packages/bbui/src/Form/Core/Dropzone.svelte | 8 +++++--- packages/bbui/src/Form/Dropzone.svelte | 2 ++ .../builder/src/components/common/Dropzone.svelte | 9 +++++++++ packages/frontend-core/src/api/attachments.js | 13 +++++++++++++ packages/server/src/api/routes/static.ts | 5 +++++ 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index 68882fe810..ffdac08402 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -95,9 +95,11 @@ "change", value.filter((x, idx) => idx !== selectedImageIdx) ) - await deleteAttachments( - value.filter((x, idx) => idx === selectedImageIdx).map(item => item.key) - ) + if (deleteAttachments) { + await deleteAttachments( + value.filter((x, idx) => idx === selectedImageIdx).map(item => item.key) + ) + } selectedImageIdx = 0 } diff --git a/packages/bbui/src/Form/Dropzone.svelte b/packages/bbui/src/Form/Dropzone.svelte index f1b548f7f1..5b82c0ebea 100644 --- a/packages/bbui/src/Form/Dropzone.svelte +++ b/packages/bbui/src/Form/Dropzone.svelte @@ -10,6 +10,7 @@ export let error = null export let fileSizeLimit = undefined export let processFiles = undefined + export let deleteAttachments = undefined export let handleFileTooLarge = undefined export let handleTooManyFiles = undefined export let gallery = true @@ -30,6 +31,7 @@ {value} {fileSizeLimit} {processFiles} + {deleteAttachments} {handleFileTooLarge} {handleTooManyFiles} {gallery} diff --git a/packages/builder/src/components/common/Dropzone.svelte b/packages/builder/src/components/common/Dropzone.svelte index 9a86554b49..fd2359fd91 100644 --- a/packages/builder/src/components/common/Dropzone.svelte +++ b/packages/builder/src/components/common/Dropzone.svelte @@ -27,6 +27,14 @@ return [] } } + + async function deleteAttachments(fileList) { + try { + return await API.deleteBuilderAttachments(fileList) + } catch (error) { + return [] + } + } diff --git a/packages/frontend-core/src/api/attachments.js b/packages/frontend-core/src/api/attachments.js index 1a24785a89..f79b461574 100644 --- a/packages/frontend-core/src/api/attachments.js +++ b/packages/frontend-core/src/api/attachments.js @@ -75,5 +75,18 @@ export const buildAttachmentEndpoints = API => { }, }) }, + + /** + * Deletes attachments from the builder bucket. + * @param keys the attachments to delete + */ + deleteBuilderAttachments: async keys => { + return await API.post({ + url: `/api/attachments/delete`, + body: { + keys, + }, + }) + }, } } diff --git a/packages/server/src/api/routes/static.ts b/packages/server/src/api/routes/static.ts index 7cf3f5e145..c94ff54708 100644 --- a/packages/server/src/api/routes/static.ts +++ b/packages/server/src/api/routes/static.ts @@ -38,6 +38,11 @@ router // TODO: for now this builder endpoint is not authorized/secured, will need to be .get("/builder/:file*", controller.serveBuilder) .post("/api/attachments/process", authorized(BUILDER), controller.uploadFile) + .post( + "/api/attachments/delete", + authorized(BUILDER), + controller.deleteObjects + ) .post("/api/beta/:feature", controller.toggleBetaUiFeature) .post( "/api/attachments/:tableId/upload", From e4a1f356b3fdd45fb53dd6590513189f4b202a4e Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 16 Aug 2022 13:36:48 +0100 Subject: [PATCH 07/46] Only allow bindings type for Is In Conditional UI --- .../_components/settings/ConditionalUIDrawer.svelte | 11 +++++++++-- packages/frontend-core/src/utils/lucene.js | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte index b40b33744f..524b712755 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte @@ -112,7 +112,7 @@ Constants.OperatorOptions.NotEmpty.value, ] condition.noValue = noValueOptions.includes(newOperator) - if (condition.noValue) { + if (condition.noValue || condition.operator === "oneOf") { condition.referenceValue = null condition.valueType = "string" } @@ -207,7 +207,14 @@ /> Date: Wed, 17 Aug 2022 15:17:29 +0100 Subject: [PATCH 09/46] Revert click context --- packages/client/src/components/app/Button.svelte | 5 ----- packages/client/src/components/app/Container.svelte | 7 +------ packages/client/src/utils/buttonActions.js | 4 ---- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/client/src/components/app/Button.svelte b/packages/client/src/components/app/Button.svelte index a10b992561..018f21c583 100644 --- a/packages/client/src/components/app/Button.svelte +++ b/packages/client/src/components/app/Button.svelte @@ -4,7 +4,6 @@ const { styleable, builderStore } = getContext("sdk") const component = getContext("component") - const containerClickableStore = getContext("containerClickable") export let disabled = false export let text = "" @@ -19,10 +18,6 @@ let node - containerClickableStore.subscribe(hasOnClick => { - disabled = hasOnClick - }) - $: $component.editing && node?.focus() $: componentText = getComponentText(text, $builderStore, $component) diff --git a/packages/client/src/components/app/Container.svelte b/packages/client/src/components/app/Container.svelte index e8e757bc3e..a5c8ce6d4d 100644 --- a/packages/client/src/components/app/Container.svelte +++ b/packages/client/src/components/app/Container.svelte @@ -1,13 +1,9 @@
{ - if (actions && actions.length === 0) { - return null - } - // Prevent button actions in the builder preview if (!actions || get(builderStore).inBuilder) { return () => {} From bb9146b93ff6356669f80c7f954b53b8ecfaedc7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 17 Aug 2022 15:43:25 +0100 Subject: [PATCH 10/46] Return nullish button action function for empty arrays --- packages/client/src/utils/buttonActions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js index c6f46d1c67..558cab8f21 100644 --- a/packages/client/src/utils/buttonActions.js +++ b/packages/client/src/utils/buttonActions.js @@ -334,8 +334,8 @@ const confirmTextMap = { */ export const enrichButtonActions = (actions, context) => { // Prevent button actions in the builder preview - if (!actions || get(builderStore).inBuilder) { - return () => {} + if (!actions?.length || get(builderStore).inBuilder) { + return null } // If this is a function then it has already been enriched From 750eef9231df6316ffb1a10c87c72c50f5e34f17 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 17 Aug 2022 15:43:42 +0100 Subject: [PATCH 11/46] Disable pointer events for all components nested inside a clickable container --- packages/client/src/components/app/Container.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/Container.svelte b/packages/client/src/components/app/Container.svelte index a5c8ce6d4d..ee0dd4778a 100644 --- a/packages/client/src/components/app/Container.svelte +++ b/packages/client/src/components/app/Container.svelte @@ -28,7 +28,7 @@
From 569cea90af60fa53ebb86ffbdd901218961c6ccb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 17 Aug 2022 15:47:50 +0100 Subject: [PATCH 12/46] Hide on click setting for root screen component --- .../_components/settings/ComponentSettingsSection.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte index d8dc9bf066..b4c8e7abad 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte @@ -36,7 +36,12 @@ } } - const canRenderControl = setting => { + const canRenderControl = (setting, isScreen) => { + // Prevent rendering on click setting for screens + if (setting?.type === "event" && isScreen) { + return false + } + const control = getComponentForSetting(setting) if (!control) { return false @@ -87,7 +92,7 @@ /> {/if} {#each section.settings as setting (setting.key)} - {#if canRenderControl(setting)} + {#if canRenderControl(setting, isScreen)} Date: Wed, 17 Aug 2022 15:21:29 +0000 Subject: [PATCH 13/46] v1.2.41-alpha.1 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 4 ++-- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lerna.json b/lerna.json index 9fedf86f90..eb74904928 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 27246f1828..557d1b9721 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "1.2.41-alpha.0", + "@budibase/types": "1.2.41-alpha.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 79234a65f8..a05cbf8ea0 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "1.2.41-alpha.0", + "@budibase/string-templates": "1.2.41-alpha.1", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 959f302fea..2f981fa267 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.2.41-alpha.0", - "@budibase/client": "1.2.41-alpha.0", - "@budibase/frontend-core": "1.2.41-alpha.0", - "@budibase/string-templates": "1.2.41-alpha.0", + "@budibase/bbui": "1.2.41-alpha.1", + "@budibase/client": "1.2.41-alpha.1", + "@budibase/frontend-core": "1.2.41-alpha.1", + "@budibase/string-templates": "1.2.41-alpha.1", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 230d28b8d5..d9563c7d31 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,7 +26,7 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.2.41-alpha.0", + "@budibase/backend-core": "1.2.41-alpha.1", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 876bd0782e..03ee9e736a 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "1.2.41-alpha.0", - "@budibase/frontend-core": "1.2.41-alpha.0", - "@budibase/string-templates": "1.2.41-alpha.0", + "@budibase/bbui": "1.2.41-alpha.1", + "@budibase/frontend-core": "1.2.41-alpha.1", + "@budibase/string-templates": "1.2.41-alpha.1", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index f0173e9fb8..bf946be5c3 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.2.41-alpha.0", + "@budibase/bbui": "1.2.41-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 53b68f1a03..584028070f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.2.41-alpha.0", - "@budibase/client": "1.2.41-alpha.0", + "@budibase/backend-core": "1.2.41-alpha.1", + "@budibase/client": "1.2.41-alpha.1", "@budibase/pro": "1.2.41-alpha.0", - "@budibase/string-templates": "1.2.41-alpha.0", - "@budibase/types": "1.2.41-alpha.0", + "@budibase/string-templates": "1.2.41-alpha.1", + "@budibase/types": "1.2.41-alpha.1", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 586e4d5d39..ab9b726775 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index ed22b489c1..55bb3a74a0 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index ddff762a98..d3295c63b8 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.2.41-alpha.0", + "version": "1.2.41-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.2.41-alpha.0", + "@budibase/backend-core": "1.2.41-alpha.1", "@budibase/pro": "1.2.41-alpha.0", - "@budibase/string-templates": "1.2.41-alpha.0", - "@budibase/types": "1.2.41-alpha.0", + "@budibase/string-templates": "1.2.41-alpha.1", + "@budibase/types": "1.2.41-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 4658ba3387f7ca579e1f6f8454cc77cb0197c035 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 17 Aug 2022 15:24:26 +0000 Subject: [PATCH 14/46] Update pro version to 1.2.41-alpha.1 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 584028070f..80c06c96bd 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.2.41-alpha.1", "@budibase/client": "1.2.41-alpha.1", - "@budibase/pro": "1.2.41-alpha.0", + "@budibase/pro": "1.2.41-alpha.1", "@budibase/string-templates": "1.2.41-alpha.1", "@budibase/types": "1.2.41-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 6217a94e9f..5d7a0e66a2 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.41-alpha.0": - version "1.2.41-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.41-alpha.0.tgz#ee3bc032ae89e347b9fb220303a9d040df6f5823" - integrity sha512-x6wJpBBFj6a1pGu2OR1vBPHiA4LvdQpVxr6f1lZa2+nAhuXVtEhrdnvBVzK2hJ52dOTTTGaw2A5tTkbf7861CA== +"@budibase/backend-core@1.2.41-alpha.1": + version "1.2.41-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.41-alpha.1.tgz#8ca8f4e4c2d6d861bb139c9aa1a34fa965d1e8a1" + integrity sha512-qeElGlRK5mIIeLQ4QjHk1XCEkIKnwXfZoM/f4m1WEuiv3pfe8YCAMG0SiD0PFOSsR/TZKJT8zRTkYuKhDDMlqg== dependencies: - "@budibase/types" "1.2.41-alpha.0" + "@budibase/types" "1.2.41-alpha.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1178,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.41-alpha.0": - version "1.2.41-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.41-alpha.0.tgz#4f27dbeee24ddc58e2a4e75cd90b53543f742722" - integrity sha512-LiKuO7/9GGzf3xfMmNTZQl2r4jmGgqnUf7fA5ub/MRyWYM7ZjPWEKW1V9OAk3vXwv9a+4V6FUxJQ1sDUZ3DT/Q== +"@budibase/pro@1.2.41-alpha.1": + version "1.2.41-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.41-alpha.1.tgz#c114b866f34e9cc4d73f1c8a6ec65fb57e8916a9" + integrity sha512-EGj4CL+35FeOLR+TkLgpQVzLjcqwoRByM5dp7+kZSkqaWRfyV3bX726SqpW0jIEk9JBsq8YUtjqBXmEiV7tdYg== dependencies: - "@budibase/backend-core" "1.2.41-alpha.0" - "@budibase/types" "1.2.41-alpha.0" + "@budibase/backend-core" "1.2.41-alpha.1" + "@budibase/types" "1.2.41-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1207,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.41-alpha.0": - version "1.2.41-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.41-alpha.0.tgz#01071ce6ecef6799b04b1defce2b38e81b615f9f" - integrity sha512-2jkeToXsujYUXb6P2DFTFUOFv56GgImJ4webP8xr5cPGL0/xmhWGMd/lLxLt96RtMQp43UmVWZm1BA7TZw4fJg== +"@budibase/types@1.2.41-alpha.1": + version "1.2.41-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.41-alpha.1.tgz#d8ef38b04c0bbf057b948daa997fb5cc3544b3c6" + integrity sha512-38plLPSrIi2YPyfVPcD2jr+MgohuGHELMlEspqqoc6CMfVBw+YnBOyoctFTPjLW0ka8uB4mnLGzenbU/xY2hrw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index d3295c63b8..3b4088ad67 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.2.41-alpha.1", - "@budibase/pro": "1.2.41-alpha.0", + "@budibase/pro": "1.2.41-alpha.1", "@budibase/string-templates": "1.2.41-alpha.1", "@budibase/types": "1.2.41-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index b475340214..a3cb905e99 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.41-alpha.0": - version "1.2.41-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.41-alpha.0.tgz#ee3bc032ae89e347b9fb220303a9d040df6f5823" - integrity sha512-x6wJpBBFj6a1pGu2OR1vBPHiA4LvdQpVxr6f1lZa2+nAhuXVtEhrdnvBVzK2hJ52dOTTTGaw2A5tTkbf7861CA== +"@budibase/backend-core@1.2.41-alpha.1": + version "1.2.41-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.41-alpha.1.tgz#8ca8f4e4c2d6d861bb139c9aa1a34fa965d1e8a1" + integrity sha512-qeElGlRK5mIIeLQ4QjHk1XCEkIKnwXfZoM/f4m1WEuiv3pfe8YCAMG0SiD0PFOSsR/TZKJT8zRTkYuKhDDMlqg== dependencies: - "@budibase/types" "1.2.41-alpha.0" + "@budibase/types" "1.2.41-alpha.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -325,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.41-alpha.0": - version "1.2.41-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.41-alpha.0.tgz#4f27dbeee24ddc58e2a4e75cd90b53543f742722" - integrity sha512-LiKuO7/9GGzf3xfMmNTZQl2r4jmGgqnUf7fA5ub/MRyWYM7ZjPWEKW1V9OAk3vXwv9a+4V6FUxJQ1sDUZ3DT/Q== +"@budibase/pro@1.2.41-alpha.1": + version "1.2.41-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.41-alpha.1.tgz#c114b866f34e9cc4d73f1c8a6ec65fb57e8916a9" + integrity sha512-EGj4CL+35FeOLR+TkLgpQVzLjcqwoRByM5dp7+kZSkqaWRfyV3bX726SqpW0jIEk9JBsq8YUtjqBXmEiV7tdYg== dependencies: - "@budibase/backend-core" "1.2.41-alpha.0" - "@budibase/types" "1.2.41-alpha.0" + "@budibase/backend-core" "1.2.41-alpha.1" + "@budibase/types" "1.2.41-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.41-alpha.0": - version "1.2.41-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.41-alpha.0.tgz#01071ce6ecef6799b04b1defce2b38e81b615f9f" - integrity sha512-2jkeToXsujYUXb6P2DFTFUOFv56GgImJ4webP8xr5cPGL0/xmhWGMd/lLxLt96RtMQp43UmVWZm1BA7TZw4fJg== +"@budibase/types@1.2.41-alpha.1": + version "1.2.41-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.41-alpha.1.tgz#d8ef38b04c0bbf057b948daa997fb5cc3544b3c6" + integrity sha512-38plLPSrIi2YPyfVPcD2jr+MgohuGHELMlEspqqoc6CMfVBw+YnBOyoctFTPjLW0ka8uB4mnLGzenbU/xY2hrw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 95b3518a0d472b22840c8a0598e2980f04af5aa2 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 17 Aug 2022 16:44:48 +0100 Subject: [PATCH 15/46] Refactors --- .../_components/settings/ConditionalUIDrawer.svelte | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte index 7589507b21..c386a52cb7 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte @@ -112,7 +112,7 @@ Constants.OperatorOptions.NotEmpty.value, ] condition.noValue = noValueOptions.includes(newOperator) - if (condition.noValue || condition.operator === "oneOf") { + if (condition.noValue || newOperator === "oneOf") { condition.referenceValue = null condition.valueType = "string" } @@ -207,14 +207,7 @@ />