From aa2e6c97da8eb34409b38edebc80cacd2377c490 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Feb 2022 11:50:55 +0000 Subject: [PATCH 1/3] Fix role being stale when creating screens --- .../src/components/design/NavigationPanel/ScreenWizard.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/NavigationPanel/ScreenWizard.svelte b/packages/builder/src/components/design/NavigationPanel/ScreenWizard.svelte index 394975e9da..144592035c 100644 --- a/packages/builder/src/components/design/NavigationPanel/ScreenWizard.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ScreenWizard.svelte @@ -12,11 +12,12 @@ let screenName = "" let url = "" let selectedScreens = [] - let roleId = $selectedAccessRole || "BASIC" let showProgressCircle = false let routeError let createdScreens = [] + $: roleId = $selectedAccessRole || "BASIC" + const createScreens = async () => { for (let screen of selectedScreens) { let test = screen.create() From 3925fb3e31ecd2174bb5bbcef89fd8dc377c2339 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 17 Feb 2022 13:22:36 +0000 Subject: [PATCH 2/3] Fixing issue with escaping on multiple bindings that are the same in queries. --- packages/string-templates/src/index.js | 9 +++++++-- packages/string-templates/test/basic.spec.js | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/string-templates/src/index.js b/packages/string-templates/src/index.js index c0b5563f3d..41dd7381ad 100644 --- a/packages/string-templates/src/index.js +++ b/packages/string-templates/src/index.js @@ -139,8 +139,13 @@ module.exports.disableEscaping = string => { if (matches == null) { return string } - for (let match of matches) { - string = string.replace(match, `{${match}}`) + + // find the unique set + const unique = [...new Set(matches)] + for (let match of unique) { + // add a negative lookahead to exclude any already + const regex = new RegExp(`${match}(?!})`, "g") + string = string.replace(regex, `{${match}}`) } return string } diff --git a/packages/string-templates/test/basic.spec.js b/packages/string-templates/test/basic.spec.js index c5aac2a628..fbd1c5f440 100644 --- a/packages/string-templates/test/basic.spec.js +++ b/packages/string-templates/test/basic.spec.js @@ -194,5 +194,9 @@ describe("check that disabling escaping function works", () => { it("should work with a combination", () => { expect(disableEscaping("{{ name }} welcome to {{{ platform }}}")).toEqual("{{{ name }}} welcome to {{{ platform }}}") }) + + it("should work with multiple escaped", () => { + expect(disableEscaping("{{ name }} welcome to {{ name }}")).toEqual("{{{ name }}} welcome to {{{ name }}}") + }) }) From ad0591e775e4973c53d2ab02c643cc1ac5d108df Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Feb 2022 16:06:17 +0000 Subject: [PATCH 3/3] Fix usage of className instead of class --- .../PropertyControls/FilterEditor/FilterDrawer.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte index bca78f6cbb..1441d3834b 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte @@ -90,7 +90,7 @@ -
+
{#if !filters?.length}