From 3771ab2ffc9cad2fb55cad62b1317fd5bef120f6 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 26 Jun 2023 13:31:16 +0100 Subject: [PATCH 1/5] Update datasource config editing --- .../IntegrationConfigForm.svelte | 219 ------------------ .../rest/RestExtraConfigForm.svelte | 14 ++ .../modals/DatasourceConfigModal.svelte | 141 ----------- .../ConfigEditor}/ConfigInput.svelte | 0 .../ConfigEditor}/fields/Boolean.svelte | 0 .../ConfigEditor}/fields/FieldGroup.svelte | 0 .../ConfigEditor}/fields/LongForm.svelte | 0 .../ConfigEditor}/fields/Object.svelte | 0 .../ConfigEditor}/fields/String.svelte | 0 .../Datasources/ConfigEditor/index.svelte | 107 +++++++++ .../ConfigEditor/stores/validatedConfig.js | 125 ++++++++++ .../ConfigEditor/stores/validatedName.js | 53 +++++ .../ConfigEditor/stores/validation.js | 27 +++ .../components/common/FontAwesomeIcon.svelte | 7 +- .../DatasourceConfigEditor/index.svelte | 114 --------- .../DatasourceConfigEditor/stores/config.js | 26 --- .../stores/validatedConfig.js | 40 ---- .../stores/validation.js | 95 -------- .../TableImportSelection/index.svelte | 2 +- .../index.svelte | 23 +- .../_components/EditDatasourceConfig.svelte | 47 ++++ .../EditDatasourceConfigButton.svelte | 117 ++++++++++ .../datasource/[datasourceId]/index.svelte | 77 ++---- .../builder/src/stores/backend/datasources.js | 81 ++++--- 24 files changed, 583 insertions(+), 732 deletions(-) delete mode 100644 packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte delete mode 100644 packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte rename packages/builder/src/{pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor => components/backend/Datasources/ConfigEditor}/ConfigInput.svelte (100%) rename packages/builder/src/{pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor => components/backend/Datasources/ConfigEditor}/fields/Boolean.svelte (100%) rename packages/builder/src/{pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor => components/backend/Datasources/ConfigEditor}/fields/FieldGroup.svelte (100%) rename packages/builder/src/{pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor => components/backend/Datasources/ConfigEditor}/fields/LongForm.svelte (100%) rename packages/builder/src/{pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor => components/backend/Datasources/ConfigEditor}/fields/Object.svelte (100%) rename packages/builder/src/{pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor => components/backend/Datasources/ConfigEditor}/fields/String.svelte (100%) create mode 100644 packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte create mode 100644 packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js create mode 100644 packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedName.js create mode 100644 packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validation.js delete mode 100644 packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor/index.svelte delete mode 100644 packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor/stores/config.js delete mode 100644 packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor/stores/validatedConfig.js delete mode 100644 packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/DatasourceConfigEditor/stores/validation.js create mode 100644 packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/EditDatasourceConfig.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/EditDatasourceConfigButton.svelte diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte deleted file mode 100644 index 3bc1a1cdd9..0000000000 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte +++ /dev/null @@ -1,219 +0,0 @@ - - -
- - {#if !creating} -
- - -
- {/if} - {#each configKeys as configKey} - {#if schema[configKey].type === "object"} -
- - -
- - {:else if schema[configKey].type === "boolean"} -
- - -
- {:else if schema[configKey].type === "longForm"} -
- -