From b7006e097ca77fb6c47434cdbb2a00140da19c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 26 Jan 2021 11:51:42 +0100 Subject: [PATCH 1/4] conditionally adds content-type json header if json is sent with request --- packages/client/src/api/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/api/api.js b/packages/client/src/api/api.js index a88398ed3a..aea4944aae 100644 --- a/packages/client/src/api/api.js +++ b/packages/client/src/api/api.js @@ -20,9 +20,10 @@ const makeApiCall = async ({ method, url, body, json = true }) => { const requestBody = json ? JSON.stringify(body) : body let headers = { Accept: "application/json", - "Content-Type": "application/json", + ...(json && { "Content-Type": "application/json" }), "x-budibase-app-id": window["##BUDIBASE_APP_ID##"], } + if (!window["##BUDIBASE_IN_BUILDER##"]) { headers["x-budibase-type"] = "client" } From a7de7457d21a741312d2e08fc8a23d973579b968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 26 Jan 2021 12:03:29 +0100 Subject: [PATCH 2/4] fixes row updating problem in grid component --- packages/standard-components/src/grid/Component.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/standard-components/src/grid/Component.svelte b/packages/standard-components/src/grid/Component.svelte index 0d1380d8a7..d4e2c62db4 100644 --- a/packages/standard-components/src/grid/Component.svelte +++ b/packages/standard-components/src/grid/Component.svelte @@ -137,8 +137,7 @@ } const updateRow = async row => { - const schema = (await API.fetchTableDefinition(row.tableId)).schema - await API.updateRow(schema, { data: row }) + await API.updateRow(row) } const deleteRows = async () => { From 3ab1d4223076d54151b067dbc1c4be783f80acf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 26 Jan 2021 13:22:01 +0100 Subject: [PATCH 3/4] bump bbui --- packages/builder/package.json | 2 +- packages/builder/yarn.lock | 8 ++++---- packages/standard-components/package.json | 2 +- packages/standard-components/yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 41b98750e9..117a0b5d66 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.54.1", + "@budibase/bbui": "^1.55.1", "@budibase/client": "^0.5.3", "@budibase/colorpicker": "^1.0.1", "@budibase/string-templates": "^0.5.3", diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index 85bbdab526..1559106403 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -842,10 +842,10 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@budibase/bbui@^1.54.1": - version "1.54.1" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.54.1.tgz#ad0439c0be6a4dc818cd9dacda00f053b0daa9d5" - integrity sha512-ZY2OP/tF+ReMSyzZIGZV6wpQ4eIEzYGxZV3n+C+oNjzK5u3rwWPCDEVDlZgJSqJ61z+sEf2zuIyAh88lq9RTaA== +"@budibase/bbui@^1.55.1": + version "1.55.1" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.55.1.tgz#291fb6fa10479b49f078d3a911ad0ed42c2e6b12" + integrity sha512-bxsHBwkOqCtuFz89e0hAXwvwycfS4xPPrEge5PxK1Lh3uqetO4bXoIxYaIDjfi2Ku7CYIzEmOwSloNaQWeTF4g== dependencies: markdown-it "^12.0.2" quill "^1.3.7" diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index b5b3a64888..74a9d2cf12 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -33,7 +33,7 @@ "license": "MIT", "gitHead": "62ebf3cedcd7e9b2494b4f8cbcfb90927609b491", "dependencies": { - "@budibase/bbui": "^1.52.4", + "@budibase/bbui": "^1.55.1", "@budibase/svelte-ag-grid": "^0.0.16", "apexcharts": "^3.22.1", "flatpickr": "^4.6.6", diff --git a/packages/standard-components/yarn.lock b/packages/standard-components/yarn.lock index 682c048276..8b4ffdcf3e 100644 --- a/packages/standard-components/yarn.lock +++ b/packages/standard-components/yarn.lock @@ -39,10 +39,10 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@budibase/bbui@^1.52.4": - version "1.52.4" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.52.4.tgz#ae3c17e1f49f14e65831703958bcddc6e64afd24" - integrity sha512-/wiv5dSyvXLgy2/zGEslnCsjwE8qqng1D8k5ScSOPEyMab8tzzd1XxfZAN9rp84zIMgAXeH6s5a4j4riR+jVkg== +"@budibase/bbui@^1.55.1": + version "1.55.1" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.55.1.tgz#291fb6fa10479b49f078d3a911ad0ed42c2e6b12" + integrity sha512-bxsHBwkOqCtuFz89e0hAXwvwycfS4xPPrEge5PxK1Lh3uqetO4bXoIxYaIDjfi2Ku7CYIzEmOwSloNaQWeTF4g== dependencies: markdown-it "^12.0.2" quill "^1.3.7" From dcdc3eb4a208e71299dbad6337d9a76d628ad08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 29 Jan 2021 14:31:04 +0100 Subject: [PATCH 4/4] fix typo in settings modal --- packages/builder/src/components/settings/tabs/General.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/settings/tabs/General.svelte b/packages/builder/src/components/settings/tabs/General.svelte index 9e9daf5f57..f670fcdbb4 100644 --- a/packages/builder/src/components/settings/tabs/General.svelte +++ b/packages/builder/src/components/settings/tabs/General.svelte @@ -73,7 +73,7 @@ .notOneOf(existingAppUrls), } } else { - nameValidation = { name: string.required(nameError) } + nameValidation = { name: string().required(nameError) } } })