diff --git a/packages/auth/package.json b/packages/auth/package.json index 2aa5ac7783..e56e1540a6 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -18,6 +18,7 @@ "jsonwebtoken": "^8.5.1", "koa-passport": "^4.1.4", "lodash": "^4.17.21", + "lodash.isarguments": "^3.1.0", "node-fetch": "^2.6.1", "passport-google-auth": "^1.0.2", "passport-google-oauth": "^2.0.0", diff --git a/packages/auth/yarn.lock b/packages/auth/yarn.lock index 35f892669a..fc69b7f76f 100644 --- a/packages/auth/yarn.lock +++ b/packages/auth/yarn.lock @@ -3038,6 +3038,11 @@ lodash.includes@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= +lodash.isarguments@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + integrity sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo= + lodash.isboolean@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" diff --git a/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte b/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte index 2d6e012736..0b6a48ff9d 100644 --- a/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte @@ -1,9 +1,9 @@
- {#each $queries.list as query} diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditRow.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditRow.svelte index a60d9ecf31..559e8275db 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditRow.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditRow.svelte @@ -38,7 +38,7 @@ message: `${field} ${rowResponse.validationErrors[field][0]}`, })) return false - } else if (rowResponse.status === 500) { + } else if (rowResponse.status >= 400) { errors = [{ message: rowResponse.message }] return false } diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte index c89de55796..910ffc18f8 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte @@ -11,6 +11,8 @@ export let level = 0 export let dragDropStore + let closedNodes = {} + const selectComponent = component => { store.actions.components.select(component) } @@ -51,6 +53,15 @@ "component" return capitalise(type) } + + function toggleNodeOpen(componentId) { + if (closedNodes[componentId]) { + delete closedNodes[componentId] + } else { + closedNodes[componentId] = true + } + closedNodes = closedNodes + }