diff --git a/lerna.json b/lerna.json index 0aadebb725..5600db4cf3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 01dc0fdef4..2e358f07b5 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "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": "2.0.30-alpha.10", + "@budibase/types": "2.0.30-alpha.12", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 91d5825bbf..65da2c2cea 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": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "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": "2.0.30-alpha.10", + "@budibase/string-templates": "2.0.30-alpha.12", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/bbui/src/ColorPicker/ColorPicker.svelte b/packages/bbui/src/ColorPicker/ColorPicker.svelte index 52a877415b..331de38371 100644 --- a/packages/bbui/src/ColorPicker/ColorPicker.svelte +++ b/packages/bbui/src/ColorPicker/ColorPicker.svelte @@ -119,6 +119,13 @@ return "var(--spectrum-global-color-static-gray-900)" } + + const handleOutsideClick = event => { + if (open) { + event.stopPropagation() + open = false + } + }
@@ -131,7 +138,7 @@
{#if open}
(open = false)} + use:clickOutside={handleOutsideClick} transition:fly={{ y: -20, duration: 200 }} class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open" class:spectrum-Popover--align-right={alignRight} diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte index d80ca98153..16d13ef2cc 100644 --- a/packages/bbui/src/Form/Core/Picker.svelte +++ b/packages/bbui/src/Form/Core/Picker.svelte @@ -85,7 +85,7 @@ class:is-invalid={!!error} class:is-open={open} aria-haspopup="listbox" - on:mousedown={onClick} + on:click={onClick} > {#if fieldIcon} diff --git a/packages/bbui/src/Form/Core/PickerDropdown.svelte b/packages/bbui/src/Form/Core/PickerDropdown.svelte index 1607876b46..604e446099 100644 --- a/packages/bbui/src/Form/Core/PickerDropdown.svelte +++ b/packages/bbui/src/Form/Core/PickerDropdown.svelte @@ -87,6 +87,20 @@ updateValue(event.target.value) } } + + const handlePrimaryOutsideClick = event => { + if (primaryOpen) { + event.stopPropagation() + primaryOpen = false + } + } + + const handleSecondaryOutsideClick = event => { + if (secondaryOpen) { + event.stopPropagation() + secondaryOpen = false + } + }
{#if primaryOpen}
(primaryOpen = false)} + use:clickOutside={handlePrimaryOutsideClick} transition:fly|local={{ y: -20, duration: 200 }} class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open" class:auto-width={autoWidth} @@ -256,7 +270,7 @@ {disabled} class:is-open={secondaryOpen} aria-haspopup="listbox" - on:mousedown={onClickSecondary} + on:click={onClickSecondary} > {#if secondaryFieldIcon} @@ -281,7 +295,7 @@ {#if secondaryOpen}
(secondaryOpen = false)} + use:clickOutside={handleSecondaryOutsideClick} transition:fly|local={{ y: -20, duration: 200 }} class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open" style="width: 30%" diff --git a/packages/bbui/src/IconPicker/IconPicker.svelte b/packages/bbui/src/IconPicker/IconPicker.svelte index 0e71be2c33..2b42da61b1 100644 --- a/packages/bbui/src/IconPicker/IconPicker.svelte +++ b/packages/bbui/src/IconPicker/IconPicker.svelte @@ -50,6 +50,13 @@ dispatch("change", value) open = false } + + const handleOutsideClick = event => { + if (open) { + event.stopPropagation() + open = false + } + }
@@ -64,7 +71,7 @@
{#if open}
(open = false)} + use:clickOutside={handleOutsideClick} transition:fly={{ y: -20, duration: 200 }} class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open" class:spectrum-Popover--align-right={alignRight} diff --git a/packages/builder/package.json b/packages/builder/package.json index 246a97e843..e99c7ac995 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.10", - "@budibase/client": "2.0.30-alpha.10", - "@budibase/frontend-core": "2.0.30-alpha.10", - "@budibase/string-templates": "2.0.30-alpha.10", + "@budibase/bbui": "2.0.30-alpha.12", + "@budibase/client": "2.0.30-alpha.12", + "@budibase/frontend-core": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.12", "@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 91d0952b62..7f607508bc 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.10", - "@budibase/string-templates": "2.0.30-alpha.10", - "@budibase/types": "2.0.30-alpha.10", + "@budibase/backend-core": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.12", + "@budibase/types": "2.0.30-alpha.12", "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 6dc56bf484..d0a049feee 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "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": "2.0.30-alpha.10", - "@budibase/frontend-core": "2.0.30-alpha.10", - "@budibase/string-templates": "2.0.30-alpha.10", + "@budibase/bbui": "2.0.30-alpha.12", + "@budibase/frontend-core": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.12", "@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 c80090ec31..880c804beb 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.30-alpha.10", + "@budibase/bbui": "2.0.30-alpha.12", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a62c74c7af..302a1f5207 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 9caed3dfa8..1392d4c0a4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "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": "2.0.30-alpha.10", - "@budibase/client": "2.0.30-alpha.10", - "@budibase/pro": "2.0.30-alpha.10", - "@budibase/string-templates": "2.0.30-alpha.10", - "@budibase/types": "2.0.30-alpha.10", + "@budibase/backend-core": "2.0.30-alpha.12", + "@budibase/client": "2.0.30-alpha.12", + "@budibase/pro": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.12", + "@budibase/types": "2.0.30-alpha.12", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 3e89dab309..1d9d619f96 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@2.0.30-alpha.10": - version "2.0.30-alpha.10" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.10.tgz#ff11327ad0456d1af40839f3a89002487d0e3173" - integrity sha512-KGX0k5h1IBE5hNmPBRC58hk0XfXzeBmFcXzveA8YAXboeYo0Rzo2xQr5oSbT9766JaNaHTwF9J1luyxq0Zr7KA== +"@budibase/backend-core@2.0.30-alpha.12": + version "2.0.30-alpha.12" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.12.tgz#adeb3e3f043c7b85a1a4aab3d3e33832d1ab8dfd" + integrity sha512-e/+tvvn1rcLTw/D/OlL9HYV1hw87x2mgofCV5Y1th6r1Tvum7Nr7revcU8CQIpVOc+iz6Eg1vAbMjqDsGr5YUw== dependencies: - "@budibase/types" "2.0.30-alpha.10" + "@budibase/types" "2.0.30-alpha.12" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.30-alpha.10": - version "2.0.30-alpha.10" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.10.tgz#2bd878840f705a1d344da5fac1d588a06e5eefed" - integrity sha512-cXnbYsrx9Y9t4XAnzoFnNXJaJfd+vnIFaX5ULnJYTPsmouDij/A/qU8lNDtpxciss4dgxO9AnZH31ZXFVlJj0Q== +"@budibase/pro@2.0.30-alpha.12": + version "2.0.30-alpha.12" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.12.tgz#52a26671aad4248fa2a6482a262f07c3f8154b7b" + integrity sha512-qp/plMQCpCabfDGeKZlOL74epNFzH1leZX7K/cqGwos0kYSElg6zPv/BayMRgID0oxllvuDq5M/fllXtF1QMig== dependencies: - "@budibase/backend-core" "2.0.30-alpha.10" - "@budibase/types" "2.0.30-alpha.10" + "@budibase/backend-core" "2.0.30-alpha.12" + "@budibase/types" "2.0.30-alpha.12" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.30-alpha.10": - version "2.0.30-alpha.10" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.10.tgz#9b0ecc9d68ad5694a10f4390dd0ca64b93127e5b" - integrity sha512-qaXoUdHWhvym085dHt0WB+U7Lap1mqwh2zRo+2e+kfvEqzOyvj2H7ILK3wjVGYlrFrr7qceQaMnDCAEzad6aMg== +"@budibase/types@2.0.30-alpha.12": + version "2.0.30-alpha.12" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.12.tgz#90912b6f6731d67f135787bc5cdeec562b30e336" + integrity sha512-PFO8BgScyaesA060ickUhiJTlKvOVIn6mUtc2rr3jrWZ5OTGGi31+eq+QhVcUS45BWuoEoPc0AhQPn7WtrvRQw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 78e5803316..4438565dc3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "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 09c31556e0..167a82bde4 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "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 50fa1db46a..14f2fc9100 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.30-alpha.10", + "version": "2.0.30-alpha.12", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.10", - "@budibase/pro": "2.0.30-alpha.10", - "@budibase/string-templates": "2.0.30-alpha.10", - "@budibase/types": "2.0.30-alpha.10", + "@budibase/backend-core": "2.0.30-alpha.12", + "@budibase/pro": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.12", + "@budibase/types": "2.0.30-alpha.12", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 8f7503d6ac..a6b041c08e 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@2.0.30-alpha.10": - version "2.0.30-alpha.10" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.10.tgz#ff11327ad0456d1af40839f3a89002487d0e3173" - integrity sha512-KGX0k5h1IBE5hNmPBRC58hk0XfXzeBmFcXzveA8YAXboeYo0Rzo2xQr5oSbT9766JaNaHTwF9J1luyxq0Zr7KA== +"@budibase/backend-core@2.0.30-alpha.12": + version "2.0.30-alpha.12" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.12.tgz#adeb3e3f043c7b85a1a4aab3d3e33832d1ab8dfd" + integrity sha512-e/+tvvn1rcLTw/D/OlL9HYV1hw87x2mgofCV5Y1th6r1Tvum7Nr7revcU8CQIpVOc+iz6Eg1vAbMjqDsGr5YUw== dependencies: - "@budibase/types" "2.0.30-alpha.10" + "@budibase/types" "2.0.30-alpha.12" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.30-alpha.10": - version "2.0.30-alpha.10" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.10.tgz#2bd878840f705a1d344da5fac1d588a06e5eefed" - integrity sha512-cXnbYsrx9Y9t4XAnzoFnNXJaJfd+vnIFaX5ULnJYTPsmouDij/A/qU8lNDtpxciss4dgxO9AnZH31ZXFVlJj0Q== +"@budibase/pro@2.0.30-alpha.12": + version "2.0.30-alpha.12" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.12.tgz#52a26671aad4248fa2a6482a262f07c3f8154b7b" + integrity sha512-qp/plMQCpCabfDGeKZlOL74epNFzH1leZX7K/cqGwos0kYSElg6zPv/BayMRgID0oxllvuDq5M/fllXtF1QMig== dependencies: - "@budibase/backend-core" "2.0.30-alpha.10" - "@budibase/types" "2.0.30-alpha.10" + "@budibase/backend-core" "2.0.30-alpha.12" + "@budibase/types" "2.0.30-alpha.12" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.30-alpha.10": - version "2.0.30-alpha.10" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.10.tgz#9b0ecc9d68ad5694a10f4390dd0ca64b93127e5b" - integrity sha512-qaXoUdHWhvym085dHt0WB+U7Lap1mqwh2zRo+2e+kfvEqzOyvj2H7ILK3wjVGYlrFrr7qceQaMnDCAEzad6aMg== +"@budibase/types@2.0.30-alpha.12": + version "2.0.30-alpha.12" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.12.tgz#90912b6f6731d67f135787bc5cdeec562b30e336" + integrity sha512-PFO8BgScyaesA060ickUhiJTlKvOVIn6mUtc2rr3jrWZ5OTGGi31+eq+QhVcUS45BWuoEoPc0AhQPn7WtrvRQw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index 94a3d7e2be..aa4286c7e7 100644 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -1,16 +1,5 @@ #!/bin/bash -dir=$(pwd) -declare -a keep=("dist" "package.json" "yarn.lock" "client" "builder" "build" "pm2.config.js" "docker_run.sh") -for moveDir in "${keep[@]}" -do - mv $moveDir / 2>/dev/null -done -cd / -rm -r $dir -mkdir $dir -for keepDir in "${keep[@]}" -do - mv /$keepDir $dir/ 2>/dev/null -done -cd $dir +KEEP="dist|package.json|yarn.lock|client|builder|build|pm2.config.js|docker_run.sh" +echo "Removing unneeded build files:" +ls | egrep -v $KEEP | xargs rm -rfv NODE_ENV=production yarn