windmill-components 1.511.1 → 1.522.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/components/AppConnectInner.svelte.d.ts +1 -1
- package/package/components/ArgInput.svelte +42 -14
- package/package/components/ArgInput.svelte.d.ts +2 -10
- package/package/components/AssignableTagsInner.svelte +5 -0
- package/package/components/AuthSettings.svelte +4 -2
- package/package/components/AuthSettings.svelte.d.ts +1 -0
- package/package/components/DBManagerDrawer.svelte +154 -151
- package/package/components/DBManagerDrawer.svelte.d.ts +2 -2
- package/package/components/DBTable.svelte +3 -3
- package/package/components/DBTable.svelte.d.ts +1 -0
- package/package/components/DBTableEditor.svelte +7 -7
- package/package/components/DBTableEditor.svelte.d.ts +1 -1
- package/package/components/DeployWorkspace.svelte +1 -1
- package/package/components/DisplayResult.svelte +34 -8
- package/package/components/DisplayResult.svelte.d.ts +4 -1
- package/package/components/DynSelect.svelte +58 -34
- package/package/components/DynSelect.svelte.d.ts +3 -11
- package/package/components/EditableSchemaForm.svelte +126 -6
- package/package/components/EditableSchemaForm.svelte.d.ts +5 -1
- package/package/components/Editor.svelte +1 -1
- package/package/components/EditorBar.svelte +82 -4
- package/package/components/ErrorOrRecoveryHandler.svelte +76 -8
- package/package/components/ErrorOrRecoveryHandler.svelte.d.ts +2 -1
- package/package/components/ExploreAssetButton.svelte +14 -4
- package/package/components/ExploreAssetButton.svelte.d.ts +1 -0
- package/package/components/FlowJobResult.svelte +3 -3
- package/package/components/FlowJobResult.svelte.d.ts +1 -0
- package/package/components/FlowPreviewContent.svelte +9 -1
- package/package/components/FlowPreviewResult.svelte +4 -1
- package/package/components/FlowPreviewResult.svelte.d.ts +1 -0
- package/package/components/FlowStatusViewerInner.svelte +21 -3
- package/package/components/FlowStatusViewerInner.svelte.d.ts +7 -1
- package/package/components/FolderEditor.svelte +1 -1
- package/package/components/GitDiffPreview.svelte +14 -18
- package/package/components/GitDiffPreview.svelte.d.ts +2 -8
- package/package/components/GitHubAppIntegration.svelte +3 -1
- package/package/components/IdEditorInput.svelte +25 -22
- package/package/components/IdEditorInput.svelte.d.ts +11 -23
- package/package/components/InstanceSetting.svelte +7 -2
- package/package/components/InstanceSettings.svelte +1 -0
- package/package/components/JobLoader.svelte +48 -5
- package/package/components/JobLoader.svelte.d.ts +7 -2
- package/package/components/Login.svelte +8 -2
- package/package/components/MemoryFootprintViewer.svelte +1 -1
- package/package/components/ModulePreviewResultViewer.svelte +2 -2
- package/package/components/MoveDrawer.svelte.d.ts +2 -2
- package/package/components/NextcloudSetting.svelte +84 -0
- package/package/components/NextcloudSetting.svelte.d.ts +7 -0
- package/package/components/ObjectResourceInput.svelte +3 -2
- package/package/components/ObjectResourceInput.svelte.d.ts +1 -0
- package/package/components/ParqetCsvTableRenderer.svelte +1 -1
- package/package/components/ResourceEditor.svelte +1 -1
- package/package/components/ResourcePicker.svelte +8 -1
- package/package/components/ResourcePicker.svelte.d.ts +1 -0
- package/package/components/ResultStreamDisplay.svelte +5 -0
- package/package/components/ResultStreamDisplay.svelte.d.ts +5 -0
- package/package/components/RunForm.svelte +9 -1
- package/package/components/SchemaForm.svelte +2 -2
- package/package/components/SchemaForm.svelte.d.ts +2 -10
- package/package/components/ScriptBuilder.svelte +13 -8
- package/package/components/ScriptBuilder.svelte.d.ts +1 -1
- package/package/components/ScriptEditor.svelte.d.ts +1 -1
- package/package/components/ScriptWrapper.svelte +1 -1
- package/package/components/ShareModal.svelte.d.ts +1 -1
- package/package/components/SimpleAgTable.svelte +2 -0
- package/package/components/SimpleAgTable.svelte.d.ts +2 -0
- package/package/components/SqlRepl.svelte +21 -7
- package/package/components/SqlRepl.svelte.d.ts +2 -2
- package/package/components/StringTypeNarrowing.svelte.d.ts +1 -1
- package/package/components/WorkerTagSelect.svelte +70 -1
- package/package/components/apps/components/display/AppDisplayComponent.svelte +13 -1
- package/package/components/apps/components/display/AppText.svelte +2 -2
- package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +8 -1
- package/package/components/apps/components/display/dbtable/InsertRow.svelte +5 -4
- package/package/components/apps/components/display/dbtable/queries/count.js +11 -1
- package/package/components/apps/components/display/dbtable/queries/createTable.d.ts +1 -1
- package/package/components/apps/components/display/dbtable/queries/createTable.js +3 -3
- package/package/components/apps/components/display/dbtable/queries/delete.js +7 -0
- package/package/components/apps/components/display/dbtable/queries/insert.js +2 -0
- package/package/components/apps/components/display/dbtable/queries/select.js +14 -0
- package/package/components/apps/components/display/dbtable/queries/update.js +7 -0
- package/package/components/apps/components/display/dbtable/utils.d.ts +6 -5
- package/package/components/apps/components/display/dbtable/utils.js +52 -28
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte +1 -1
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte +1 -0
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppAggridTable.svelte +5 -4
- package/package/components/apps/components/display/table/AppAggridTable.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/utils.js +7 -4
- package/package/components/apps/components/helpers/HiddenComponent.svelte +2 -2
- package/package/components/apps/components/helpers/RunnableComponent.svelte +4 -1
- package/package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +2 -1
- package/package/components/apps/components/inputs/AppS3FileInput.svelte +2 -2
- package/package/components/apps/components/layout/AppDecisionTree.svelte +1 -1
- package/package/components/apps/components/layout/AppStepper.svelte +1 -1
- package/package/components/apps/components/layout/AppTabs.svelte +1 -1
- package/package/components/apps/editor/AppEditorHeader.svelte +13 -2
- package/package/components/apps/editor/GridViewer.svelte +1 -0
- package/package/components/apps/editor/RunnableJobPanelInner.svelte +2 -1
- package/package/components/apps/editor/contextPanel/components/IdEditor.svelte +7 -7
- package/package/components/apps/editor/contextPanel/components/IdEditor.svelte.d.ts +7 -19
- package/package/components/apps/editor/contextPanel/components/OutputHeader.svelte +8 -12
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte.d.ts +1 -1
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorDrawer.svelte.d.ts +1 -1
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts +1 -1
- package/package/components/apps/editor/settingsPanel/DecisionTreeGraphEditor.svelte +3 -3
- package/package/components/apps/editor/settingsPanel/decisionTree/DecisionTreePreview.svelte +1 -3
- package/package/components/assets/AssetsDropdownButton.svelte +1 -1
- package/package/components/assets/JobAssetsViewer.svelte +2 -2
- package/package/components/assets/lib.js +4 -0
- package/package/components/auditLogs/AuditLogsFilters.svelte +7 -9
- package/package/components/common/button/Button.svelte +4 -3
- package/package/components/common/button/Button.svelte.d.ts +1 -0
- package/package/components/common/confirmationModal/ConfirmationModal.svelte +6 -5
- package/package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +6 -11
- package/package/components/common/confirmationModal/asyncConfirmationModal.svelte.d.ts +26 -0
- package/package/components/common/confirmationModal/asyncConfirmationModal.svelte.js +50 -0
- package/package/components/common/modal/Modal.svelte +2 -5
- package/package/components/common/tabs/TabsV2.svelte +2 -1
- package/package/components/common/tabs/TabsV2.svelte.d.ts +1 -0
- package/package/components/copilot/chat/AIChatManager.svelte.js +61 -7
- package/package/components/copilot/chat/ContextTextarea.svelte +1 -1
- package/package/components/copilot/chat/script/core.js +28 -29
- package/package/components/copilot/chat/shared.d.ts +1 -1
- package/package/components/copilot/chat/shared.js +8 -2
- package/package/components/custom_ui.d.ts +2 -0
- package/package/components/dbOps.d.ts +20 -8
- package/package/components/dbOps.js +85 -40
- package/package/components/details/DetailPageHeader.svelte +0 -2
- package/package/components/flows/content/FlowInput.svelte +5 -0
- package/package/components/flows/content/FlowModuleScript.svelte +0 -1
- package/package/components/flows/idUtils.js +2 -1
- package/package/components/flows/map/FlowModuleSchemaItem.svelte +3 -3
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +5 -0
- package/package/components/flows/map/InsertModuleButton.svelte +4 -1
- package/package/components/flows/propPicker/OutputBadge.svelte +5 -1
- package/package/components/flows/propPicker/OutputPickerInner.svelte +9 -5
- package/package/components/flows/propPicker/OutputPickerInner.svelte.d.ts +6 -2
- package/package/components/flows/propPicker/StepHistory.svelte +4 -1
- package/package/components/git_sync/DetectionFlow.svelte +202 -0
- package/package/components/git_sync/DetectionFlow.svelte.d.ts +6 -0
- package/package/components/git_sync/GitSyncContext.svelte.d.ts +82 -0
- package/package/components/git_sync/GitSyncContext.svelte.js +461 -0
- package/package/components/git_sync/GitSyncModalManager.svelte +99 -0
- package/package/components/git_sync/GitSyncModalManager.svelte.d.ts +18 -0
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +339 -0
- package/package/components/git_sync/GitSyncRepositoryCard.svelte.d.ts +6 -0
- package/package/components/git_sync/GitSyncRepositoryList.svelte +17 -0
- package/package/components/git_sync/GitSyncRepositoryList.svelte.d.ts +18 -0
- package/package/components/git_sync/GitSyncSection.svelte +89 -0
- package/package/components/git_sync/GitSyncSection.svelte.d.ts +3 -0
- package/package/components/git_sync/GitSyncSuccessModal.svelte +58 -0
- package/package/components/git_sync/GitSyncSuccessModal.svelte.d.ts +7 -0
- package/package/components/git_sync/PullWorkspaceModal.svelte +575 -0
- package/package/components/git_sync/PullWorkspaceModal.svelte.d.ts +15 -0
- package/package/components/git_sync/PushWorkspaceModal.svelte +320 -0
- package/package/components/git_sync/PushWorkspaceModal.svelte.d.ts +12 -0
- package/package/components/graph/FlowGraphV2.svelte +5 -1
- package/package/components/graph/graphBuilder.svelte.js +1 -1
- package/package/components/graph/renderers/nodes/AssetNode.svelte +4 -4
- package/package/components/icons/AssetDucklakeIcon.svelte +28 -0
- package/package/components/icons/AssetDucklakeIcon.svelte.d.ts +9 -0
- package/package/components/icons/AssetGenericIcon.svelte +3 -0
- package/package/components/icons/DucklakeIcon.svelte +18 -0
- package/package/components/icons/DucklakeIcon.svelte.d.ts +6 -0
- package/package/components/instanceSettings.js +11 -3
- package/package/components/runs/JobPreview.svelte +2 -2
- package/package/components/runs/NoWorkerWithTagWarning.svelte +3 -3
- package/package/components/runs/RunsFilter.svelte.d.ts +1 -1
- package/package/components/schema/FlowPropertyEditor.svelte +3 -2
- package/package/components/schema/FlowPropertyEditor.svelte.d.ts +1 -1
- package/package/components/schema/PropertyEditor.svelte +0 -2
- package/package/components/schema/PropertyEditor.svelte.d.ts +1 -1
- package/package/components/schema/SchemaFormDND.svelte +2 -1
- package/package/components/schema/SchemaFormDND.svelte.d.ts +2 -0
- package/package/components/scriptEditor/LogPanel.svelte +5 -3
- package/package/components/scriptEditor/LogPanel.svelte.d.ts +5 -1
- package/package/components/select/Select.svelte +7 -4
- package/package/components/select/Select.svelte.d.ts +5 -0
- package/package/components/select/SelectDropdown.svelte +2 -1
- package/package/components/select/SelectDropdown.svelte.d.ts +3 -0
- package/package/components/sidebar/changelogs.js +5 -0
- package/package/components/table/AutoDataTable.svelte +6 -4
- package/package/components/table/AutoDataTable.svelte.d.ts +1 -0
- package/package/components/table/DataTable.svelte +12 -10
- package/package/components/table/DataTable.svelte.d.ts +1 -0
- package/package/components/triggers/TriggerRetriesAndErrorHandler.svelte.d.ts +2 -2
- package/package/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte +1 -1
- package/package/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte.d.ts +2 -1
- package/package/components/triggers/gcp/GcpTriggerEditorInner.svelte +50 -11
- package/package/components/triggers/gcp/utils.js +1 -0
- package/package/components/triggers/http/utils.js +1 -1
- package/package/components/triggers/kafka/utils.js +1 -1
- package/package/components/triggers/mqtt/utils.js +1 -1
- package/package/components/triggers/nats/utils.js +1 -1
- package/package/components/triggers/postgres/utils.js +1 -1
- package/package/components/triggers/sqs/utils.js +1 -1
- package/package/components/triggers/utils.js +2 -1
- package/package/components/triggers/webhook/WebhooksConfigSection.svelte +24 -26
- package/package/components/triggers/webhook/WebhooksPanel.svelte +1 -15
- package/package/components/triggers/websocket/utils.js +1 -1
- package/package/components/workspaceSettings/AISettings.svelte +52 -36
- package/package/components/workspaceSettings/DucklakeSettings.svelte +321 -0
- package/package/components/workspaceSettings/DucklakeSettings.svelte.d.ts +23 -0
- package/package/components/workspaceSettings/GitSyncFilterSettings.svelte +122 -499
- package/package/components/workspaceSettings/GitSyncFilterSettings.svelte.d.ts +8 -10
- package/package/consts.js +2 -1
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +7 -6
- package/package/gen/schemas.gen.js +7 -6
- package/package/gen/services.gen.d.ts +19 -1
- package/package/gen/services.gen.js +38 -0
- package/package/gen/types.gen.d.ts +78 -3
- package/package/git-sync.d.ts +36 -0
- package/package/git-sync.js +1 -0
- package/package/hub.d.ts +1 -0
- package/package/hubPaths.json +5 -2
- package/package/infer.js +3 -2
- package/package/script_helpers.d.ts +2 -2
- package/package/script_helpers.js +29 -11
- package/package/services/JobManager.d.ts +28 -0
- package/package/services/JobManager.js +114 -0
- package/package/stores.d.ts +1 -1
- package/package/utils.d.ts +18 -1
- package/package/utils.js +55 -2
- package/package.json +5 -4
- package/package/components/InitGitRepoPopover.svelte +0 -410
- package/package/components/InitGitRepoPopover.svelte.d.ts +0 -13
- package/package/components/PullGitRepoPopover.svelte +0 -355
- package/package/components/PullGitRepoPopover.svelte.d.ts +0 -18
- package/package/inferArgSig.d.ts +0 -42
- package/package/inferArgSig.js +0 -198
|
@@ -9,18 +9,17 @@ export var ColumnIdentity;
|
|
|
9
9
|
ColumnIdentity["Always"] = "Always";
|
|
10
10
|
ColumnIdentity["No"] = "No";
|
|
11
11
|
})(ColumnIdentity || (ColumnIdentity = {}));
|
|
12
|
-
export async function loadTableMetaData(
|
|
13
|
-
if (!
|
|
12
|
+
export async function loadTableMetaData(input, workspace, table) {
|
|
13
|
+
if (!input || !table || !workspace)
|
|
14
14
|
return undefined;
|
|
15
|
-
|
|
15
|
+
let language = input.type == 'ducklake' ? 'duckdb' : getLanguageByResourceType(input.resourceType);
|
|
16
|
+
let content = await makeLoadTableMetaDataQuery(input, workspace, table);
|
|
16
17
|
const job = await JobService.runScriptPreview({
|
|
17
18
|
workspace: workspace,
|
|
18
19
|
requestBody: {
|
|
19
|
-
language
|
|
20
|
-
content
|
|
21
|
-
args: {
|
|
22
|
-
database: resource
|
|
23
|
-
}
|
|
20
|
+
language,
|
|
21
|
+
content,
|
|
22
|
+
args: input.type === 'database' ? { database: '$res:' + input.resourcePath } : {}
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
25
|
const maxRetries = 8;
|
|
@@ -34,7 +33,7 @@ export async function loadTableMetaData(resource, workspace, table, resourceType
|
|
|
34
33
|
}));
|
|
35
34
|
if (testResult.success) {
|
|
36
35
|
attempts = maxRetries;
|
|
37
|
-
if (resourceType === 'ms_sql_server') {
|
|
36
|
+
if (input.type === 'database' && input.resourceType === 'ms_sql_server') {
|
|
38
37
|
return testResult.result[0].map(lowercaseKeys);
|
|
39
38
|
}
|
|
40
39
|
else {
|
|
@@ -52,22 +51,20 @@ export async function loadTableMetaData(resource, workspace, table, resourceType
|
|
|
52
51
|
console.error('Failed to load table metadata after maximum retries.');
|
|
53
52
|
return undefined;
|
|
54
53
|
}
|
|
55
|
-
export async function loadAllTablesMetaData(
|
|
56
|
-
if (!
|
|
54
|
+
export async function loadAllTablesMetaData(workspace, input) {
|
|
55
|
+
if (!input || !workspace)
|
|
57
56
|
return undefined;
|
|
58
|
-
|
|
57
|
+
let language = input.type == 'ducklake' ? 'duckdb' : getLanguageByResourceType(input.resourceType);
|
|
59
58
|
try {
|
|
60
59
|
let result = (await runScriptAndPollResult({
|
|
61
60
|
workspace: workspace,
|
|
62
61
|
requestBody: {
|
|
63
|
-
language
|
|
64
|
-
content: await makeLoadTableMetaDataQuery(
|
|
65
|
-
args: {
|
|
66
|
-
database: resource
|
|
67
|
-
}
|
|
62
|
+
language,
|
|
63
|
+
content: await makeLoadTableMetaDataQuery(input, workspace, undefined),
|
|
64
|
+
args: input.type === 'database' ? { database: '$res:' + input.resourcePath } : {}
|
|
68
65
|
}
|
|
69
66
|
}));
|
|
70
|
-
if (resourceType === 'ms_sql_server') {
|
|
67
|
+
if (input.type === 'database' && input.resourceType === 'ms_sql_server') {
|
|
71
68
|
result = result[0];
|
|
72
69
|
}
|
|
73
70
|
const map = {};
|
|
@@ -85,11 +82,25 @@ export async function loadAllTablesMetaData(resource, workspace, resourceType) {
|
|
|
85
82
|
throw new Error('Error loading all tables metadata: ' + e);
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
|
-
async function makeLoadTableMetaDataQuery(
|
|
89
|
-
if (
|
|
85
|
+
async function makeLoadTableMetaDataQuery(input, workspace, table) {
|
|
86
|
+
if (input.type === 'ducklake') {
|
|
87
|
+
return `ATTACH 'ducklake://${input.ducklake}' AS __ducklake__;
|
|
88
|
+
SELECT
|
|
89
|
+
COLUMN_NAME as field,
|
|
90
|
+
DATA_TYPE as DataType,
|
|
91
|
+
COLUMN_DEFAULT as DefaultValue,
|
|
92
|
+
false as IsPrimaryKey,
|
|
93
|
+
false as IsIdentity,
|
|
94
|
+
IS_NULLABLE as IsNullable,
|
|
95
|
+
false as IsEnum,
|
|
96
|
+
TABLE_NAME as table_name
|
|
97
|
+
FROM information_schema.columns c
|
|
98
|
+
WHERE table_catalog = '__ducklake__' AND table_schema = current_schema()`;
|
|
99
|
+
}
|
|
100
|
+
else if (input.resourceType === 'mysql') {
|
|
90
101
|
const resourceObj = (await ResourceService.getResourceValue({
|
|
91
102
|
workspace,
|
|
92
|
-
path:
|
|
103
|
+
path: input.resourcePath
|
|
93
104
|
}));
|
|
94
105
|
return `
|
|
95
106
|
SELECT
|
|
@@ -116,7 +127,7 @@ async function makeLoadTableMetaDataQuery(resource, workspace, table, resourceTy
|
|
|
116
127
|
ORDINAL_POSITION;
|
|
117
128
|
`;
|
|
118
129
|
}
|
|
119
|
-
else if (resourceType === 'postgresql') {
|
|
130
|
+
else if (input.resourceType === 'postgresql') {
|
|
120
131
|
return `
|
|
121
132
|
SELECT
|
|
122
133
|
a.attname as field,
|
|
@@ -158,7 +169,7 @@ async function makeLoadTableMetaDataQuery(resource, workspace, table, resourceTy
|
|
|
158
169
|
|
|
159
170
|
`;
|
|
160
171
|
}
|
|
161
|
-
else if (resourceType === 'ms_sql_server') {
|
|
172
|
+
else if (input.resourceType === 'ms_sql_server') {
|
|
162
173
|
return `
|
|
163
174
|
SELECT
|
|
164
175
|
COLUMN_NAME as field,
|
|
@@ -181,7 +192,8 @@ ORDER BY
|
|
|
181
192
|
ORDINAL_POSITION;
|
|
182
193
|
`;
|
|
183
194
|
}
|
|
184
|
-
else if (resourceType === 'snowflake' ||
|
|
195
|
+
else if (input.resourceType === 'snowflake' ||
|
|
196
|
+
input.resourceType === 'snowflake_oauth') {
|
|
185
197
|
return `
|
|
186
198
|
select COLUMN_NAME as field,
|
|
187
199
|
DATA_TYPE as DataType,
|
|
@@ -201,7 +213,7 @@ ORDER BY
|
|
|
201
213
|
order by ORDINAL_POSITION;
|
|
202
214
|
`;
|
|
203
215
|
}
|
|
204
|
-
else if (resourceType === 'bigquery') {
|
|
216
|
+
else if (input.resourceType === 'bigquery') {
|
|
205
217
|
// TODO: find a solution for this (query uses hardcoded dataset name)
|
|
206
218
|
if (!table)
|
|
207
219
|
throw new Error('Table name is required for BigQuery');
|
|
@@ -223,7 +235,7 @@ WHERE
|
|
|
223
235
|
order by c.ORDINAL_POSITION;`;
|
|
224
236
|
}
|
|
225
237
|
else {
|
|
226
|
-
throw new Error('Unsupported database type:' + resourceType);
|
|
238
|
+
throw new Error('Unsupported database type:' + input.resourceType);
|
|
227
239
|
}
|
|
228
240
|
}
|
|
229
241
|
export function resourceTypeToLang(rt) {
|
|
@@ -538,7 +550,14 @@ export function formatSchema(dbSchema) {
|
|
|
538
550
|
export function formatGraphqlSchema(schema) {
|
|
539
551
|
return printSchema(buildClientSchema(schema));
|
|
540
552
|
}
|
|
541
|
-
export const dbTypes = [
|
|
553
|
+
export const dbTypes = [
|
|
554
|
+
'mysql',
|
|
555
|
+
'ms_sql_server',
|
|
556
|
+
'postgresql',
|
|
557
|
+
'snowflake',
|
|
558
|
+
'bigquery',
|
|
559
|
+
'duckdb'
|
|
560
|
+
];
|
|
542
561
|
export const isDbType = (str) => !!str && dbTypes.includes(str);
|
|
543
562
|
export function buildVisibleFieldList(columnDefs, dbType) {
|
|
544
563
|
// Filter out hidden columns to avoid counting the wrong number of rows
|
|
@@ -556,6 +575,8 @@ export function buildVisibleFieldList(columnDefs, dbType) {
|
|
|
556
575
|
return `"${column?.field}"`; // Snowflake uses double quotes for identifiers
|
|
557
576
|
case 'bigquery':
|
|
558
577
|
return `\`${column?.field}\``; // BigQuery uses backticks
|
|
578
|
+
case 'duckdb':
|
|
579
|
+
return `"${column?.field}"`; // DuckDB uses double quotes for identifiers
|
|
559
580
|
default:
|
|
560
581
|
throw new Error('Unsupported database type');
|
|
561
582
|
}
|
|
@@ -568,7 +589,8 @@ export function getLanguageByResourceType(name) {
|
|
|
568
589
|
ms_sql_server: 'mssql',
|
|
569
590
|
snowflake: 'snowflake',
|
|
570
591
|
snowflake_oauth: 'snowflake',
|
|
571
|
-
bigquery: 'bigquery'
|
|
592
|
+
bigquery: 'bigquery',
|
|
593
|
+
duckdb: 'duckdb'
|
|
572
594
|
};
|
|
573
595
|
return language[name];
|
|
574
596
|
}
|
|
@@ -586,6 +608,8 @@ export function buildParameters(columns, databaseType) {
|
|
|
586
608
|
return `-- ? ${column.field} (${column.datatype.split('(')[0]})`;
|
|
587
609
|
case 'bigquery':
|
|
588
610
|
return `-- @${column.field} (${column.datatype.split('(')[0]})`;
|
|
611
|
+
case 'duckdb':
|
|
612
|
+
return `-- $${column.field} (${column.datatype.split('(')[0]})`;
|
|
589
613
|
}
|
|
590
614
|
})
|
|
591
615
|
.join('\n');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">import { stopPropagation } from 'svelte/legacy';
|
|
2
|
-
import {
|
|
2
|
+
import { createGrid } from 'ag-grid-community';
|
|
3
3
|
import { sendUserToast } from '../../../../../utils';
|
|
4
4
|
import { createEventDispatcher, getContext, mount, unmount, untrack } from 'svelte';
|
|
5
5
|
import { deepEqual } from 'fast-equals';
|
|
@@ -4,6 +4,7 @@ import { initConfig, initOutput } from '../../../editor/appUtils';
|
|
|
4
4
|
import { components } from '../../../editor/component';
|
|
5
5
|
import ResolveConfig from '../../helpers/ResolveConfig.svelte';
|
|
6
6
|
import 'ag-grid-community/styles/ag-grid.css';
|
|
7
|
+
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
|
7
8
|
import './theme/windmill-theme.css';
|
|
8
9
|
import { initCss } from '../../../utils';
|
|
9
10
|
import ResolveStyle from '../../helpers/ResolveStyle.svelte';
|
|
@@ -2,6 +2,7 @@ import type { AppInput } from '../../../inputType';
|
|
|
2
2
|
import type { ComponentCustomCSS, RichConfigurations } from '../../../types';
|
|
3
3
|
import { type TableAction } from '../../../editor/component';
|
|
4
4
|
import 'ag-grid-community/styles/ag-grid.css';
|
|
5
|
+
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
|
5
6
|
import './theme/windmill-theme.css';
|
|
6
7
|
interface Props {
|
|
7
8
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">import { stopPropagation } from 'svelte/legacy';
|
|
2
|
-
import {
|
|
2
|
+
import { createGrid } from 'ag-grid-community';
|
|
3
3
|
import { isObject, sendUserToast } from '../../../../../utils';
|
|
4
4
|
import { getContext, mount, onDestroy, unmount, untrack } from 'svelte';
|
|
5
5
|
import RunnableWrapper from '../../helpers/RunnableWrapper.svelte';
|
|
@@ -10,6 +10,7 @@ import { deepEqual } from 'fast-equals';
|
|
|
10
10
|
import RefreshButton from '../../helpers/RefreshButton.svelte';
|
|
11
11
|
import SyncColumnDefs from './SyncColumnDefs.svelte';
|
|
12
12
|
import 'ag-grid-community/styles/ag-grid.css';
|
|
13
|
+
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
|
13
14
|
import './theme/windmill-theme.css';
|
|
14
15
|
import { ChevronLeft, ChevronRight, Download, Loader2, SkipBack, SkipForward } from 'lucide-svelte';
|
|
15
16
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -40,9 +41,9 @@ function resetValues() {
|
|
|
40
41
|
}
|
|
41
42
|
let uid = Math.random().toString(36).substring(7);
|
|
42
43
|
let prevUid = undefined;
|
|
43
|
-
let value = $state(Array.isArray(result)
|
|
44
|
+
let value = $state(untrack(() => Array.isArray(result)
|
|
44
45
|
? result.map((x, i) => ({ ...x, __index: i.toString() + '-' + uid }))
|
|
45
|
-
: [{ error: 'input was not an array' }]);
|
|
46
|
+
: [{ error: 'input was not an array' }]));
|
|
46
47
|
let loaded = $state(false);
|
|
47
48
|
async function setValues() {
|
|
48
49
|
value = Array.isArray(result)
|
|
@@ -456,7 +457,7 @@ $effect(() => {
|
|
|
456
457
|
untrack(() => clearActionOrder());
|
|
457
458
|
});
|
|
458
459
|
$effect(() => {
|
|
459
|
-
api && resolvedConfig &&
|
|
460
|
+
api && resolvedConfig && updateOptions();
|
|
460
461
|
});
|
|
461
462
|
$effect(() => {
|
|
462
463
|
value && untrack(() => updateValue());
|
|
@@ -2,6 +2,7 @@ import type { AppInput } from '../../../inputType';
|
|
|
2
2
|
import type { ComponentCustomCSS, RichConfiguration, RichConfigurations } from '../../../types';
|
|
3
3
|
import { type TableAction } from '../../../editor/component';
|
|
4
4
|
import 'ag-grid-community/styles/ag-grid.css';
|
|
5
|
+
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
|
5
6
|
import './theme/windmill-theme.css';
|
|
6
7
|
interface Props {
|
|
7
8
|
id: string;
|
|
@@ -79,13 +79,13 @@ export function transformColumnDefs({ columnDefs, actions, customActionsHeader,
|
|
|
79
79
|
if (onDelete) {
|
|
80
80
|
r.push({
|
|
81
81
|
field: 'delete',
|
|
82
|
-
headerName: '
|
|
82
|
+
headerName: '',
|
|
83
83
|
cellRenderer: cellRendererFactory((c, p) => {
|
|
84
84
|
const btnComponent = mount(Button, {
|
|
85
85
|
target: c.eGui,
|
|
86
86
|
props: {
|
|
87
|
-
btnClasses: 'w-12',
|
|
88
|
-
wrapperClasses: 'flex justify-
|
|
87
|
+
btnClasses: 'w-12 bg-transparent rounded-none h-full hover:bg-red-500',
|
|
88
|
+
wrapperClasses: 'flex justify-center items-center absolute inset-0 h-full',
|
|
89
89
|
color: 'light',
|
|
90
90
|
size: 'sm',
|
|
91
91
|
variant: 'contained',
|
|
@@ -111,7 +111,10 @@ export function transformColumnDefs({ columnDefs, actions, customActionsHeader,
|
|
|
111
111
|
lockPosition: 'right',
|
|
112
112
|
editable: false,
|
|
113
113
|
flex: 0,
|
|
114
|
-
width:
|
|
114
|
+
width: 50,
|
|
115
|
+
minWidth: 50,
|
|
116
|
+
resizable: false,
|
|
117
|
+
pinned: 'right'
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
if (actions?.length) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script lang="ts">import { getContext, onMount } from 'svelte';
|
|
1
|
+
<script lang="ts">import { getContext, onMount, untrack } from 'svelte';
|
|
2
2
|
import { initOutput } from '../../editor/appUtils';
|
|
3
3
|
import RunnableComponent from './RunnableComponent.svelte';
|
|
4
4
|
import InitializeComponent from './InitializeComponent.svelte';
|
|
@@ -16,7 +16,7 @@ onMount(() => {
|
|
|
16
16
|
};
|
|
17
17
|
});
|
|
18
18
|
let outputs = initOutput($worldStore, id, {
|
|
19
|
-
result: result,
|
|
19
|
+
result: untrack(() => result),
|
|
20
20
|
loading: false,
|
|
21
21
|
jobId: undefined
|
|
22
22
|
});
|
|
@@ -16,7 +16,7 @@ import { computeWorkspaceS3FileInputPolicy } from '../../editor/appUtilsS3';
|
|
|
16
16
|
import { executeRunnable } from './executeRunnable';
|
|
17
17
|
import SchemaForm from '../../../SchemaForm.svelte';
|
|
18
18
|
import JobLoader, {} from '../../../JobLoader.svelte';
|
|
19
|
-
let { id, fields, runnable, transformer, extraQueryParams = {}, autoRefresh = true, result = $bindable(undefined), forceSchemaDisplay = false, wrapperClass = '', wrapperStyle = '', render, outputs, extraKey = '', initializing = false, recomputeOnInputChanged = true, loading = $bindable(false), refreshOnStart = false, recomputableByRefreshButton, errorHandledByComponent = false, hideRefreshButton = false, hasChildrens, allowConcurentRequests = false, noInitialize = false, overrideCallback = undefined, overrideAutoRefresh = false, replaceCallback = false, children } = $props();
|
|
19
|
+
let { id, fields, runnable, transformer, extraQueryParams = {}, autoRefresh = true, result = $bindable(undefined), result_stream = $bindable(undefined), forceSchemaDisplay = false, wrapperClass = '', wrapperStyle = '', render, outputs, extraKey = '', initializing = false, recomputeOnInputChanged = true, loading = $bindable(false), refreshOnStart = false, recomputableByRefreshButton, errorHandledByComponent = false, hideRefreshButton = false, hasChildrens, allowConcurentRequests = false, noInitialize = false, overrideCallback = undefined, overrideAutoRefresh = false, replaceCallback = false, children } = $props();
|
|
20
20
|
const { worldStore, runnableComponents, workspace, appPath, isEditor, jobs, jobsById, noBackend, errorByComponent, mode, stateId, state: stateStore, componentControl, initialized, selectedComponent, app, connectingInput, bgRuns, recomputeAllContext } = getContext('AppViewerContext');
|
|
21
21
|
const editorContext = getContext('AppEditorContext');
|
|
22
22
|
const iterContext = getContext('ListWrapperContext');
|
|
@@ -74,6 +74,9 @@ function genCallbacks({ onDone, onCancel, onError }) {
|
|
|
74
74
|
loading = false;
|
|
75
75
|
dispatch('done', { id, result });
|
|
76
76
|
},
|
|
77
|
+
resultStreamUpdate({ id, result_stream: nresult_stream }) {
|
|
78
|
+
setResult(nresult_stream, id);
|
|
79
|
+
},
|
|
77
80
|
cancel({ id }) {
|
|
78
81
|
onCancel?.();
|
|
79
82
|
let jobId = id;
|
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
extraQueryParams?: Record<string, any>;
|
|
12
12
|
autoRefresh?: boolean;
|
|
13
13
|
result?: any;
|
|
14
|
+
result_stream?: string;
|
|
14
15
|
forceSchemaDisplay?: boolean;
|
|
15
16
|
wrapperClass?: string;
|
|
16
17
|
wrapperStyle?: string;
|
|
@@ -93,6 +94,6 @@ declare const RunnableComponent: $$__sveltets_2_IsomorphicComponent<Props, {
|
|
|
93
94
|
force_viewer_allow_user_resources?: Array<(string)>;
|
|
94
95
|
}>;
|
|
95
96
|
runComponent: (noToast?: boolean, inlineScriptOverride?: InlineScript, setRunnableJobEditorPanel?: boolean, dynamicArgsOverride?: Record<string, any>, callbacks?: RunnableCallback) => Promise<string | undefined>;
|
|
96
|
-
}, "result" | "loading">;
|
|
97
|
+
}, "result" | "loading" | "result_stream">;
|
|
97
98
|
type RunnableComponent = InstanceType<typeof RunnableComponent>;
|
|
98
99
|
export default RunnableComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script lang="ts">import { getContext } from 'svelte';
|
|
1
|
+
<script lang="ts">import { getContext, untrack } from 'svelte';
|
|
2
2
|
import { initConfig, initOutput } from '../../editor/appUtils';
|
|
3
3
|
import { initCss } from '../../utils';
|
|
4
4
|
import ResolveStyle from '../helpers/ResolveStyle.svelte';
|
|
@@ -22,7 +22,7 @@ $componentControl[id] = {
|
|
|
22
22
|
};
|
|
23
23
|
let value = $state(undefined);
|
|
24
24
|
const outputs = initOutput($worldStore, id, {
|
|
25
|
-
result: value ?? [],
|
|
25
|
+
result: untrack(() => value) ?? [],
|
|
26
26
|
loading: false,
|
|
27
27
|
jobId: undefined
|
|
28
28
|
});
|
|
@@ -39,7 +39,7 @@ let css = $state(initCss($app.css?.conditionalwrapper, customCss));
|
|
|
39
39
|
let selectedConditionIndex = 0;
|
|
40
40
|
let currentNodeId = $state(getFirstNode(nodes)?.id ?? '');
|
|
41
41
|
let outputs = initOutput($worldStore, id, {
|
|
42
|
-
currentNodeId,
|
|
42
|
+
currentNodeId: untrack(() => currentNodeId),
|
|
43
43
|
currentNodeIndex: selectedConditionIndex
|
|
44
44
|
});
|
|
45
45
|
$effect.pre(() => {
|
|
@@ -20,7 +20,7 @@ let selected = $state(tabs[0]);
|
|
|
20
20
|
let tabHeight = $state(0);
|
|
21
21
|
let footerHeight = $state(0);
|
|
22
22
|
let runnableComponent = $state();
|
|
23
|
-
let selectedIndex = $state(tabs?.indexOf(selected) ?? -1);
|
|
23
|
+
let selectedIndex = $state(tabs?.indexOf(untrack(() => selected)) ?? -1);
|
|
24
24
|
let maxReachedIndex = $state(-1);
|
|
25
25
|
let statusByStep = $state([]);
|
|
26
26
|
let debugMode = false;
|
|
@@ -19,7 +19,7 @@ $effect.pre(() => {
|
|
|
19
19
|
});
|
|
20
20
|
const { app, worldStore, focusedGrid, selectedComponent, mode, componentControl, connectingInput, runnableComponents } = getContext('AppViewerContext');
|
|
21
21
|
let selected = $state(tabs[0]);
|
|
22
|
-
let selectedIndex = $state(tabs?.indexOf(selected) ?? -1);
|
|
22
|
+
let selectedIndex = $state(tabs?.indexOf(untrack(() => selected)) ?? -1);
|
|
23
23
|
let css = $state(initCss($app.css?.tabscomponent, customCss));
|
|
24
24
|
let tabHeight = $state(0);
|
|
25
25
|
let outputs = initOutput($worldStore, id, {
|
|
@@ -4,7 +4,7 @@ import { Alert, Drawer, DrawerContent, UndoRedo } from '../../common';
|
|
|
4
4
|
import Button from '../../common/button/Button.svelte';
|
|
5
5
|
import Path from '../../Path.svelte';
|
|
6
6
|
import Toggle from '../../Toggle.svelte';
|
|
7
|
-
import { AppService, DraftService } from '../../../gen';
|
|
7
|
+
import { AppService, DraftService, SettingService } from '../../../gen';
|
|
8
8
|
import { redo, undo } from '../../../history.svelte';
|
|
9
9
|
import { enterpriseLicense, userStore, workspaceStore } from '../../../stores';
|
|
10
10
|
import { AlignHorizontalSpaceAround, BellOff, Bug, DiffIcon, Expand, FileJson, FileUp, FormInput, History, Laptop2, Loader2, Save, Smartphone, FileClock, Sun, Moon, SunMoon, Zap, Globe, AlertTriangle } from 'lucide-svelte';
|
|
@@ -739,6 +739,16 @@ setTheme($app?.darkMode);
|
|
|
739
739
|
let customPath = $state(savedApp?.custom_path);
|
|
740
740
|
let dirtyCustomPath = $state(false);
|
|
741
741
|
let customPathError = $state('');
|
|
742
|
+
let globalWorkspacedRoute = $state(false);
|
|
743
|
+
async function loadGlobalWorkspacedRouteSetting() {
|
|
744
|
+
try {
|
|
745
|
+
const setting = await SettingService.getGlobal({ key: 'app_workspaced_route' });
|
|
746
|
+
globalWorkspacedRoute = setting ?? false;
|
|
747
|
+
}
|
|
748
|
+
catch (error) {
|
|
749
|
+
globalWorkspacedRoute = false;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
742
752
|
async function appExists(customPath) {
|
|
743
753
|
return await AppService.customPathExists({
|
|
744
754
|
workspace: $workspaceStore,
|
|
@@ -779,12 +789,13 @@ $effect(() => {
|
|
|
779
789
|
saveDrawerOpen && untrack(() => compareVersions());
|
|
780
790
|
});
|
|
781
791
|
let hasErrors = $derived(Object.keys($errorByComponent).length > 0);
|
|
782
|
-
let fullCustomUrl = $derived(`${window.location.origin}${base}/a/${isCloudHosted() ? $workspaceStore + '/' : ''}${customPath}`);
|
|
792
|
+
let fullCustomUrl = $derived(`${window.location.origin}${base}/a/${isCloudHosted() || globalWorkspacedRoute ? $workspaceStore + '/' : ''}${customPath}`);
|
|
783
793
|
$effect(() => {
|
|
784
794
|
;
|
|
785
795
|
[customPath];
|
|
786
796
|
untrack(() => customPath !== undefined && validateCustomPath(customPath));
|
|
787
797
|
});
|
|
798
|
+
loadGlobalWorkspacedRouteSetting();
|
|
788
799
|
</script>
|
|
789
800
|
|
|
790
801
|
<svelte:window onkeydown={onKeyDown} />
|
|
@@ -32,11 +32,12 @@ let resultDrawerOpen = $state(false);
|
|
|
32
32
|
<div class="break-words relative h-full px-1">
|
|
33
33
|
<DisplayResult bind:drawerOpen={resultDrawerOpen} result={frontendJob} />
|
|
34
34
|
</div>
|
|
35
|
-
{:else if testJob != undefined && '
|
|
35
|
+
{:else if testJob != undefined && (testJob.type == 'CompletedJob' || testJob.result_stream)}
|
|
36
36
|
<div class="break-words relative h-full px-1">
|
|
37
37
|
<DisplayResult
|
|
38
38
|
bind:drawerOpen={resultDrawerOpen}
|
|
39
39
|
workspaceId={testJob?.workspace_id}
|
|
40
|
+
result_stream={testJob?.result_stream}
|
|
40
41
|
jobId={testJob?.id}
|
|
41
42
|
result={testJob.result}
|
|
42
43
|
language={testJob?.language}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script lang="ts">import { allItems } from '../../../utils';
|
|
2
2
|
import { Pencil } from 'lucide-svelte';
|
|
3
|
-
import {
|
|
3
|
+
import { getContext } from 'svelte';
|
|
4
4
|
import IdEditorInput from '../../../../IdEditorInput.svelte';
|
|
5
5
|
import Popover from '../../../../meltComponents/Popover.svelte';
|
|
6
6
|
const { app, selectedComponent } = getContext('AppViewerContext');
|
|
7
|
-
let { id } = $props();
|
|
8
|
-
const dispatch = createEventDispatcher();
|
|
7
|
+
let { id, onChange, onClose } = $props();
|
|
9
8
|
let reservedIds = $derived(allItems($app.grid, $app.subgrids).map((item) => item.id));
|
|
10
9
|
</script>
|
|
11
10
|
|
|
@@ -29,11 +28,12 @@ let reservedIds = $derived(allItems($app.grid, $app.subgrids).map((item) => item
|
|
|
29
28
|
{#snippet content({ close })}
|
|
30
29
|
<IdEditorInput
|
|
31
30
|
initialId={id}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
{onClose}
|
|
32
|
+
onSave={(e) => {
|
|
33
|
+
onChange(e)
|
|
34
|
+
onClose?.()
|
|
36
35
|
}}
|
|
36
|
+
reservedPrefixes={['bg_', 'unused-']}
|
|
37
37
|
{reservedIds}
|
|
38
38
|
/>
|
|
39
39
|
{/snippet}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
id: string;
|
|
3
|
+
onChange: ({ oldId, newId }: {
|
|
4
|
+
oldId: string;
|
|
5
|
+
newId: string;
|
|
6
|
+
}) => void;
|
|
7
|
+
onClose?: () => void;
|
|
3
8
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
$$bindings?: Bindings;
|
|
7
|
-
} & Exports;
|
|
8
|
-
(internal: unknown, props: Props & {
|
|
9
|
-
$$events?: Events;
|
|
10
|
-
$$slots?: Slots;
|
|
11
|
-
}): Exports & {
|
|
12
|
-
$set?: any;
|
|
13
|
-
$on?: any;
|
|
14
|
-
};
|
|
15
|
-
z_$$bindings?: Bindings;
|
|
16
|
-
}
|
|
17
|
-
declare const IdEditor: $$__sveltets_2_IsomorphicComponent<Props, {
|
|
18
|
-
save: CustomEvent<any>;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
}, {}, {}, "">;
|
|
22
|
-
type IdEditor = InstanceType<typeof IdEditor>;
|
|
9
|
+
declare const IdEditor: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type IdEditor = ReturnType<typeof IdEditor>;
|
|
23
11
|
export default IdEditor;
|
|
@@ -30,17 +30,17 @@ const idClass = {
|
|
|
30
30
|
blue: 'bg-blue-500 text-white',
|
|
31
31
|
indigo: 'bg-indigo-500 text-white'
|
|
32
32
|
};
|
|
33
|
-
function renameId(newId) {
|
|
33
|
+
function renameId(oldId, newId) {
|
|
34
34
|
const item = findGridItem($app, id);
|
|
35
35
|
if (!item) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
item.data.id = newId;
|
|
39
39
|
item.id = newId;
|
|
40
|
-
const oldSubgrids = Object.keys($app.subgrids ?? {}).filter((subgrid) => subgrid.startsWith(
|
|
40
|
+
const oldSubgrids = Object.keys($app.subgrids ?? {}).filter((subgrid) => subgrid.startsWith(oldId + '-'));
|
|
41
41
|
oldSubgrids.forEach((subgrid) => {
|
|
42
42
|
if ($app.subgrids) {
|
|
43
|
-
$app.subgrids[subgrid.replace(
|
|
43
|
+
$app.subgrids[subgrid.replace(oldId, newId)] = $app.subgrids[subgrid];
|
|
44
44
|
delete $app.subgrids[subgrid];
|
|
45
45
|
}
|
|
46
46
|
});
|
|
@@ -52,11 +52,11 @@ function renameId(newId) {
|
|
|
52
52
|
processRunnable(from, to, x);
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
propagateRename(
|
|
55
|
+
propagateRename(oldId, newId);
|
|
56
56
|
if (item?.data.type == 'tablecomponent') {
|
|
57
57
|
for (let c of item.data.actionButtons) {
|
|
58
58
|
let old = c.id;
|
|
59
|
-
c.id = c.id.replace(
|
|
59
|
+
c.id = c.id.replace(oldId + '_', newId + '_');
|
|
60
60
|
propagateRename(old, c.id);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -67,14 +67,14 @@ function renameId(newId) {
|
|
|
67
67
|
item?.data.type == 'aggridinfinitecomponentee') {
|
|
68
68
|
for (let c of item.data.actions ?? []) {
|
|
69
69
|
let old = c.id;
|
|
70
|
-
c.id = c.id.replace(
|
|
70
|
+
c.id = c.id.replace(oldId + '_', newId + '_');
|
|
71
71
|
propagateRename(old, c.id);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
if (item?.data.type === 'menucomponent') {
|
|
75
75
|
for (let c of item.data.menuItems) {
|
|
76
76
|
let old = c.id;
|
|
77
|
-
c.id = c.id.replace(
|
|
77
|
+
c.id = c.id.replace(oldId + '_', newId + '_');
|
|
78
78
|
propagateRename(old, c.id);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -212,11 +212,7 @@ function processRunnable(from, to, runnable) {
|
|
|
212
212
|
</button>
|
|
213
213
|
{#if selectable && renamable && $selectedComponent?.includes(id)}
|
|
214
214
|
<div class="h-3">
|
|
215
|
-
<IdEditor
|
|
216
|
-
{id}
|
|
217
|
-
on:selected={() => ($selectedComponent = [id])}
|
|
218
|
-
on:save={({ detail }) => renameId(detail)}
|
|
219
|
-
/></div
|
|
215
|
+
<IdEditor {id} onChange={({ oldId, newId }) => renameId(oldId, newId)} /></div
|
|
220
216
|
>
|
|
221
217
|
{/if}
|
|
222
218
|
</div>
|
|
@@ -30,6 +30,6 @@ declare const InlineScriptEditor: $$__sveltets_2_IsomorphicComponent<Props, {
|
|
|
30
30
|
delete: CustomEvent<any>;
|
|
31
31
|
} & {
|
|
32
32
|
[evt: string]: CustomEvent<any>;
|
|
33
|
-
}, {}, {}, "name" | "fields" | "
|
|
33
|
+
}, {}, {}, "name" | "fields" | "inlineScript" | "editor">;
|
|
34
34
|
type InlineScriptEditor = InstanceType<typeof InlineScriptEditor>;
|
|
35
35
|
export default InlineScriptEditor;
|
package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorDrawer.svelte.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ declare const InlineScriptEditorDrawer: $$__sveltets_2_IsomorphicComponent<Props
|
|
|
26
26
|
[evt: string]: CustomEvent<any>;
|
|
27
27
|
}, {}, {
|
|
28
28
|
openDrawer: () => void;
|
|
29
|
-
}, "
|
|
29
|
+
}, "inlineScript" | "isOpen">;
|
|
30
30
|
type InlineScriptEditorDrawer = InstanceType<typeof InlineScriptEditorDrawer>;
|
|
31
31
|
export default InlineScriptEditorDrawer;
|
package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ declare const InlineScriptRunnableByPath: $$__sveltets_2_IsomorphicComponent<Pro
|
|
|
26
26
|
fork: CustomEvent<any>;
|
|
27
27
|
} & {
|
|
28
28
|
[evt: string]: CustomEvent<any>;
|
|
29
|
-
}, {}, {}, "
|
|
29
|
+
}, {}, {}, "runnable" | "fields">;
|
|
30
30
|
type InlineScriptRunnableByPath = InstanceType<typeof InlineScriptRunnableByPath>;
|
|
31
31
|
export default InlineScriptRunnableByPath;
|
|
@@ -23,7 +23,7 @@ const { debounced: debouncedNodes } = debounce(() => {
|
|
|
23
23
|
}, 300);
|
|
24
24
|
let selectedNode = $derived(nodes?.find((node) => node.id == $selectedNodeId));
|
|
25
25
|
setContext('DecisionTreeEditor', { selectedNodeId });
|
|
26
|
-
let sortedSelectedNextNodes = $derived(selectedNode?.next.sort((n1, n2) => n1.id.localeCompare(n2.id)));
|
|
26
|
+
let sortedSelectedNextNodes = $derived([...(selectedNode?.next ?? [])].sort((n1, n2) => n1.id.localeCompare(n2.id)));
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<Drawer bind:this={drawer} on:close={() => {}} on:open={() => {}} size="1200px">
|
|
@@ -104,8 +104,8 @@ let sortedSelectedNextNodes = $derived(selectedNode?.next.sort((n1, n2) => n1.id
|
|
|
104
104
|
<InputsSpecEditor
|
|
105
105
|
key={`condition-${selectedNode.id}-${index}`}
|
|
106
106
|
customTitle={index === 0
|
|
107
|
-
? 'Goes to
|
|
108
|
-
: `${index > 0 ? 'Otherwise ' : ''}
|
|
107
|
+
? 'Goes to branch 1'
|
|
108
|
+
: `${index > 0 ? 'Otherwise g' : 'G'}oes to branch ${index + 1}`}
|
|
109
109
|
bind:componentInput={subNode.condition}
|
|
110
110
|
id={selectedNode.id}
|
|
111
111
|
userInputEnabled={false}
|
package/package/components/apps/editor/settingsPanel/decisionTree/DecisionTreePreview.svelte
CHANGED
|
@@ -140,9 +140,7 @@ function graphBuilder(decisionTreeNodes) {
|
|
|
140
140
|
position: { x: -1, y: -1 },
|
|
141
141
|
data: {
|
|
142
142
|
node: {
|
|
143
|
-
label: positionRelativeToParent
|
|
144
|
-
? 'Default branch'
|
|
145
|
-
: `Branch ${positionRelativeToParent}`,
|
|
143
|
+
label: `Branch ${(positionRelativeToParent ?? 0) + 1}`,
|
|
146
144
|
id: branchHeaderId,
|
|
147
145
|
allowed: undefined,
|
|
148
146
|
next: [],
|
|
@@ -131,7 +131,7 @@ $effect(() => {
|
|
|
131
131
|
</svelte:fragment>
|
|
132
132
|
</Popover>
|
|
133
133
|
<div class="flex flex-col flex-1">
|
|
134
|
-
<Tooltip class="select-none
|
|
134
|
+
<Tooltip class="select-none w-48 truncate" disablePopup={disableLiTooltip}>
|
|
135
135
|
{asset.path}
|
|
136
136
|
<svelte:fragment slot="text">
|
|
137
137
|
{asset.path}
|