diff --git a/lerna.json b/lerna.json index ae03c0334b..9d0fb72b23 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.19.0", + "version": "2.19.1", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/package.json b/package.json index 4f81d216ad..499952a441 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,6 @@ "axios": "1.6.3", "xml2js": "0.6.2", "unset-value": "2.0.1", - "got": "13.0.0", "passport": "0.6.0" }, "engines": { diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index edea3b9ec7..bd04cadc4b 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -617,6 +617,7 @@ const getDeviceBindings = () => { /** * Gets all selected rows bindings for tables in the current asset. * TODO: remove in future because we don't need a separate store for this + * DEPRECATED */ const getSelectedRowsBindings = asset => { let bindings = [] @@ -632,8 +633,8 @@ const getSelectedRowsBindings = asset => { runtimeBinding: `${safeState}.${makePropSafe(table._id)}.${makePropSafe( "selectedRows" )}`, - readableBinding: `${table._instanceName}.Selected rows`, - category: "Selected rows", + readableBinding: `${table._instanceName}.Selected Row IDs (deprecated)`, + category: "Selected Row IDs (deprecated)", icon: "ViewRow", display: { name: table._instanceName }, })) @@ -649,8 +650,8 @@ const getSelectedRowsBindings = asset => { runtimeBinding: `${safeState}.${makePropSafe( block._id + "-table" )}.${makePropSafe("selectedRows")}`, - readableBinding: `${block._instanceName}.Selected rows`, - category: "Selected rows", + readableBinding: `${block._instanceName}.Selected Row IDs (deprecated)`, + category: "Selected Row IDs (deprecated)", icon: "ViewRow", display: { name: block._instanceName }, })) diff --git a/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte b/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte index ee9eed51e9..c731b0afb0 100644 --- a/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte +++ b/packages/builder/src/components/automation/SetupPanel/CronBuilder.svelte @@ -2,15 +2,34 @@ import { Button, Select, Input, Label } from "@budibase/bbui" import { onMount, createEventDispatcher } from "svelte" import { flags } from "stores/backend" + import { helpers, REBOOT_CRON } from "@budibase/shared-core" const dispatch = createEventDispatcher() export let value + let error + + $: { + const exists = CRON_EXPRESSIONS.some(cron => cron.value === value) + const customIndex = CRON_EXPRESSIONS.findIndex( + cron => cron.label === "Custom" + ) + + if (!exists && customIndex === -1) { + CRON_EXPRESSIONS[0] = { label: "Custom", value: value } + } else if (exists && customIndex !== -1) { + CRON_EXPRESSIONS.splice(customIndex, 1) + } + } const onChange = e => { - if (e.detail === value) { + if (value !== REBOOT_CRON) { + error = helpers.cron.validate(e.detail).err + } + if (e.detail === value || error) { return } + value = e.detail dispatch("change", e.detail) } @@ -41,7 +60,7 @@ if (!$flags.cloud) { CRON_EXPRESSIONS.push({ label: "Every Budibase Reboot", - value: "@reboot", + value: REBOOT_CRON, }) } }) @@ -49,6 +68,7 @@
(touched = true)} @@ -64,7 +84,7 @@ {#if presets}