windmill-components 1.555.1 → 1.558.2
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/AIAgentLogViewer.svelte.d.ts +3 -3
- package/package/components/AIProviderPicker.svelte.d.ts +3 -3
- package/package/components/ArgInput.svelte +2 -0
- package/package/components/DBManager.svelte.d.ts +3 -3
- package/package/components/DBManagerDrawer.svelte.d.ts +3 -3
- package/package/components/DBSchemaExplorer.svelte.d.ts +3 -3
- package/package/components/DBTable.svelte.d.ts +3 -3
- package/package/components/DBTableEditor.svelte +9 -12
- package/package/components/DBTableEditor.svelte.d.ts +3 -3
- package/package/components/DateTimeInput.svelte +19 -13
- package/package/components/DateTimeInput.svelte.d.ts +5 -0
- package/package/components/DucklakePicker.svelte +32 -0
- package/package/components/DucklakePicker.svelte.d.ts +13 -0
- package/package/components/Editor.svelte +1 -1
- package/package/components/EditorBar.svelte +14 -1
- package/package/components/FakeMonacoPlaceHolder.svelte +1 -1
- package/package/components/FlowGraphViewerStep.svelte +1 -1
- package/package/components/FlowPreviewContent.svelte +1 -1
- package/package/components/HighlightCode.svelte +21 -10
- package/package/components/HighlightCode.svelte.d.ts +12 -22
- package/package/components/InputTransformForm.svelte +9 -41
- package/package/components/InstanceSetting.svelte +1 -6
- package/package/components/ResourceEditor.svelte +1 -1
- package/package/components/ResourcePicker.svelte +0 -5
- package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +50 -34
- package/package/components/apps/components/display/dbtable/DbExplorerCount.svelte +7 -5
- package/package/components/apps/components/display/dbtable/DbExplorerCount.svelte.d.ts +2 -2
- package/package/components/apps/components/display/dbtable/DeleteRow.svelte +2 -2
- package/package/components/apps/components/display/dbtable/DeleteRow.svelte.d.ts +3 -2
- package/package/components/apps/components/display/dbtable/InsertRow.svelte +13 -7
- package/package/components/apps/components/display/dbtable/InsertRowRunnable.svelte +6 -3
- package/package/components/apps/components/display/dbtable/InsertRowRunnable.svelte.d.ts +2 -1
- package/package/components/apps/components/display/dbtable/UpdateCell.svelte +2 -2
- package/package/components/apps/components/display/dbtable/UpdateCell.svelte.d.ts +3 -2
- package/package/components/apps/components/display/dbtable/queries/count.d.ts +2 -1
- package/package/components/apps/components/display/dbtable/queries/count.js +28 -18
- package/package/components/apps/components/display/dbtable/queries/createTable.d.ts +1 -1
- package/package/components/apps/components/display/dbtable/queries/createTable.js +1 -1
- package/package/components/apps/components/display/dbtable/queries/delete.d.ts +2 -1
- package/package/components/apps/components/display/dbtable/queries/delete.js +19 -10
- package/package/components/apps/components/display/dbtable/queries/insert.d.ts +2 -1
- package/package/components/apps/components/display/dbtable/queries/insert.js +16 -10
- package/package/components/apps/components/display/dbtable/queries/select.d.ts +2 -1
- package/package/components/apps/components/display/dbtable/queries/select.js +20 -16
- package/package/components/apps/components/display/dbtable/queries/update.d.ts +2 -1
- package/package/components/apps/components/display/dbtable/queries/update.js +19 -10
- package/package/components/apps/components/display/dbtable/utils.d.ts +1 -1
- package/package/components/apps/components/display/dbtable/utils.js +12 -3
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte +9 -1
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte +2 -1
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppAggridInfiniteTableEe.svelte +2 -1
- package/package/components/apps/components/display/table/AppAggridInfiniteTableEe.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppAggridTable.svelte +9 -1
- package/package/components/apps/components/display/table/AppAggridTable.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppAggridTableEe.svelte +2 -1
- package/package/components/apps/components/display/table/AppAggridTableEe.svelte.d.ts +1 -0
- package/package/components/apps/components/helpers/RunnableComponent.svelte +3 -1
- package/package/components/apps/components/inputs/AppDateInput.svelte +1 -0
- package/package/components/apps/editor/AppEditor.svelte +6 -1
- package/package/components/apps/editor/AppEditorHeader.svelte +12 -8
- package/package/components/apps/editor/AppJobsDrawer.svelte +5 -5
- package/package/components/apps/editor/component/ComponentInner.svelte +4 -0
- package/package/components/apps/editor/component/components.d.ts +16 -0
- package/package/components/apps/editor/component/components.js +17 -1
- package/package/components/apps/editor/settingsPanel/AGChartRichEditor.svelte.d.ts +3 -3
- package/package/components/apps/editor/settingsPanel/CSSMigrationModal.svelte.d.ts +3 -3
- package/package/components/apps/editor/settingsPanel/ChartJSRichEditor.svelte.d.ts +3 -3
- package/package/components/apps/editor/settingsPanel/ComponentInputTypeEditor.svelte +23 -23
- package/package/components/apps/editor/settingsPanel/EventHandlers.svelte +7 -2
- package/package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +1 -0
- package/package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +2 -1
- package/package/components/apps/editor/settingsPanel/inputEditor/DBTableSelect.svelte.d.ts +3 -3
- package/package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +10 -0
- package/package/components/apps/inputType.d.ts +2 -2
- package/package/components/auditLogs/AuditLogsFilters.svelte.d.ts +1 -1
- package/package/components/common/button/ConnectionButton.svelte +12 -14
- package/package/components/common/button/ConnectionButton.svelte.d.ts +5 -18
- package/package/components/copilot/AIFormAssistant.svelte.d.ts +3 -3
- package/package/components/copilot/AIFormSettings.svelte.d.ts +3 -3
- package/package/components/copilot/FlowInlineScriptAIButton.svelte.d.ts +3 -3
- package/package/components/copilot/StepInputsGen.svelte +1 -1
- package/package/components/copilot/TestAIKey.svelte.d.ts +3 -3
- package/package/components/copilot/chat/AIChat.svelte.d.ts +3 -3
- package/package/components/copilot/chat/AIChatDisplay.svelte.d.ts +3 -3
- package/package/components/copilot/chat/AIChatInlineWidget.svelte.d.ts +3 -3
- package/package/components/copilot/chat/AIChatInput.svelte.d.ts +3 -3
- package/package/components/copilot/chat/AIChatMessage.svelte.d.ts +3 -3
- package/package/components/copilot/chat/ContextElementBadge.svelte +2 -2
- package/package/components/copilot/chat/flow/AIChangesWarningModal.svelte.d.ts +3 -3
- package/package/components/copilot/chat/flow/FlowAIButton.svelte.d.ts +3 -3
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +4 -1
- package/package/components/copilot/chat/flow/FlowAIChat.svelte.d.ts +3 -3
- package/package/components/copilot/chat/script/CodeDisplay.svelte +30 -9
- package/package/components/copilot/chat/script/core.d.ts +2 -1
- package/package/components/copilot/chat/script/core.js +6 -1
- package/package/components/details/DetailPageLayout.svelte +11 -3
- package/package/components/details/DetailPageLayout.svelte.d.ts +1 -0
- package/package/components/flows/content/DynamicInputHelpBox.svelte +4 -4
- package/package/components/flows/content/FlowInput.svelte +1 -1
- package/package/components/flows/content/FlowInputsQuick.svelte +1 -1
- package/package/components/flows/content/FlowLoop.svelte +143 -10
- package/package/components/flows/conversations/FlowChatInterface.svelte +110 -0
- package/package/components/flows/{FlowChatInterface.svelte.d.ts → conversations/FlowChatInterface.svelte.d.ts} +1 -1
- package/package/components/flows/conversations/FlowChatManager.svelte.d.ts +52 -0
- package/package/components/flows/conversations/FlowChatManager.svelte.js +422 -0
- package/package/components/flows/conversations/FlowChatMessage.svelte +68 -0
- package/package/components/flows/{FlowChatMessage.svelte.d.ts → conversations/FlowChatMessage.svelte.d.ts} +2 -4
- package/package/components/flows/{FlowConversationsSidebar.svelte → conversations/FlowConversationsSidebar.svelte} +6 -6
- package/package/components/flows/flowInfers.js +1 -1
- package/package/components/flows/scheduleUtils.js +2 -1
- package/package/components/graph/renderers/nodes/AIToolNode.svelte.d.ts +3 -3
- package/package/components/graph/renderers/nodes/NewAIToolNode.svelte.d.ts +3 -3
- package/package/components/icons/CACertificate.svelte.d.ts +3 -3
- package/package/components/icons/MSSqlServerIcon.svelte.d.ts +3 -3
- package/package/components/icons/MSTeamsIcon.svelte.d.ts +3 -3
- package/package/components/icons/OracleDBIcon.svelte.d.ts +3 -3
- package/package/components/icons/PHPIcon.svelte.d.ts +3 -3
- package/package/components/icons/QRCodeIcon.svelte.d.ts +3 -3
- package/package/components/instanceSettings.js +11 -2
- package/package/components/runs/JobsLoader.svelte +3 -3
- package/package/components/runs/RunRow.svelte +1 -1
- package/package/components/schema/SchemaFormDND.svelte.d.ts +3 -3
- package/package/components/settings/AIUserSettings.svelte.d.ts +3 -3
- package/package/components/sidebar/SidebarContent.svelte +2 -2
- package/package/components/text_input/TextInput.svelte.d.ts +1 -1
- package/package/components/triggers/http/OpenAPISpecGenerator.svelte.d.ts +3 -3
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +42 -1
- package/package/components/vscode.js +16 -12
- package/package/components/wizards/ChartJSWizard.svelte.d.ts +3 -3
- package/package/components/wizards/DBExplorerWizard.svelte.d.ts +3 -3
- package/package/components/wizards/LoggedWizardResult.svelte +95 -0
- package/package/components/wizards/LoggedWizardResult.svelte.d.ts +17 -0
- package/package/components/workspaceSettings/AISettings.svelte.d.ts +3 -3
- package/package/components/workspaceSettings/DucklakeSettings.svelte +223 -89
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +73 -5
- package/package/gen/schemas.gen.js +73 -5
- package/package/gen/services.gen.d.ts +8 -8
- package/package/gen/services.gen.js +14 -12
- package/package/gen/types.gen.d.ts +69 -18
- package/package/svelte5Utils.svelte.d.ts +1 -0
- package/package/svelte5Utils.svelte.js +6 -0
- package/package/utils.js +2 -5
- package/package.json +10 -12
- package/package/components/flows/FlowChatInterface.svelte +0 -404
- package/package/components/flows/FlowChatMessage.svelte +0 -41
- package/package/components/meltComponents/Menubar.svelte.d.ts +0 -503
- /package/package/components/flows/{FlowConversationsSidebar.svelte.d.ts → conversations/FlowConversationsSidebar.svelte.d.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { wrapDucklakeQuery } from '../../../../../dbOps';
|
|
1
2
|
import { buildParameters } from '../utils';
|
|
2
3
|
import { getLanguageByResourceType, buildVisibleFieldList } from '../utils';
|
|
3
4
|
function makeSnowflakeSelectQuery(table, columnDefs, whereClause, options) {
|
|
@@ -183,31 +184,34 @@ function coerceToNumber(value) {
|
|
|
183
184
|
}
|
|
184
185
|
return 0;
|
|
185
186
|
}
|
|
186
|
-
export function getSelectInput(
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
export function getSelectInput(dbInput, table, columnDefs, whereClause, options) {
|
|
188
|
+
if ((dbInput.type == 'ducklake' && !dbInput.ducklake) ||
|
|
189
|
+
(dbInput.type == 'database' && !dbInput.resourcePath) ||
|
|
190
|
+
!table ||
|
|
191
|
+
!columnDefs?.length) {
|
|
191
192
|
return undefined;
|
|
192
193
|
}
|
|
194
|
+
const dbType = dbInput.type === 'ducklake' ? 'duckdb' : dbInput.resourceType;
|
|
195
|
+
let content = makeSelectQuery(table, columnDefs, whereClause, dbType, options);
|
|
196
|
+
if (dbInput.type === 'ducklake')
|
|
197
|
+
content = wrapDucklakeQuery(content, dbInput.ducklake);
|
|
193
198
|
const getRunnable = {
|
|
194
199
|
name: 'AppDbExplorer',
|
|
195
200
|
type: 'runnableByName',
|
|
196
|
-
inlineScript: {
|
|
197
|
-
content: makeSelectQuery(table, columnDefs, whereClause, dbType, options),
|
|
198
|
-
language: getLanguageByResourceType(dbType)
|
|
199
|
-
}
|
|
201
|
+
inlineScript: { content, language: getLanguageByResourceType(dbType) }
|
|
200
202
|
};
|
|
201
203
|
const getQuery = {
|
|
202
204
|
runnable: getRunnable,
|
|
203
|
-
fields:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
fields: dbInput.type === 'database'
|
|
206
|
+
? {
|
|
207
|
+
database: {
|
|
208
|
+
type: 'static',
|
|
209
|
+
value: `$res:${dbInput.resourcePath}`,
|
|
210
|
+
fieldType: 'object',
|
|
211
|
+
format: `resource-${dbType}`
|
|
212
|
+
}
|
|
209
213
|
}
|
|
210
|
-
|
|
214
|
+
: {},
|
|
211
215
|
type: 'runnable',
|
|
212
216
|
fieldType: 'object',
|
|
213
217
|
hideRefreshButton: true
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInput } from '../../../../inputType';
|
|
2
|
+
import { type DbInput } from '../../../../../dbOps';
|
|
2
3
|
import { type ColumnDef, type DbType } from '../utils';
|
|
3
4
|
export declare function makeUpdateQuery(table: string, column: {
|
|
4
5
|
datatype: string;
|
|
@@ -7,4 +8,4 @@ export declare function makeUpdateQuery(table: string, column: {
|
|
|
7
8
|
datatype: string;
|
|
8
9
|
field: string;
|
|
9
10
|
}[], dbType: DbType): string;
|
|
10
|
-
export declare function getUpdateInput(
|
|
11
|
+
export declare function getUpdateInput(dbInput: DbInput, table: string, column: ColumnDef, columns: ColumnDef[]): AppInput | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { wrapDucklakeQuery } from '../../../../../dbOps';
|
|
1
2
|
import { getLanguageByResourceType, buildParameters } from '../utils';
|
|
2
3
|
export function makeUpdateQuery(table, column, columns, dbType) {
|
|
3
4
|
let query = buildParameters([
|
|
@@ -52,15 +53,21 @@ export function makeUpdateQuery(table, column, columns, dbType) {
|
|
|
52
53
|
throw new Error('Unsupported database type');
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
export function getUpdateInput(
|
|
56
|
-
if (
|
|
56
|
+
export function getUpdateInput(dbInput, table, column, columns) {
|
|
57
|
+
if ((dbInput.type == 'ducklake' && !dbInput.ducklake) ||
|
|
58
|
+
(dbInput.type == 'database' && !dbInput.resourcePath) ||
|
|
59
|
+
!table) {
|
|
57
60
|
return undefined;
|
|
58
61
|
}
|
|
62
|
+
const dbType = dbInput.type === 'ducklake' ? 'duckdb' : dbInput.resourceType;
|
|
63
|
+
let query = makeUpdateQuery(table, column, columns, dbType);
|
|
64
|
+
if (dbInput.type === 'ducklake')
|
|
65
|
+
query = wrapDucklakeQuery(query, dbInput.ducklake);
|
|
59
66
|
const updateRunnable = {
|
|
60
67
|
name: 'AppDbExplorer',
|
|
61
68
|
type: 'runnableByName',
|
|
62
69
|
inlineScript: {
|
|
63
|
-
content:
|
|
70
|
+
content: query,
|
|
64
71
|
language: getLanguageByResourceType(dbType),
|
|
65
72
|
schema: {
|
|
66
73
|
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
@@ -72,14 +79,16 @@ export function getUpdateInput(resource, table, column, columns, dbType) {
|
|
|
72
79
|
};
|
|
73
80
|
const updateQuery = {
|
|
74
81
|
runnable: updateRunnable,
|
|
75
|
-
fields:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
fields: dbInput.type === 'database'
|
|
83
|
+
? {
|
|
84
|
+
database: {
|
|
85
|
+
type: 'static',
|
|
86
|
+
value: `$res:${dbInput.resourcePath}`,
|
|
87
|
+
fieldType: 'object',
|
|
88
|
+
format: `resource-${dbType}`
|
|
89
|
+
}
|
|
81
90
|
}
|
|
82
|
-
|
|
91
|
+
: {},
|
|
83
92
|
type: 'runnable',
|
|
84
93
|
fieldType: 'object'
|
|
85
94
|
};
|
|
@@ -86,6 +86,6 @@ export declare function buildParameters(columns: Array<{
|
|
|
86
86
|
datatype: string;
|
|
87
87
|
}>, databaseType: string): string;
|
|
88
88
|
export declare function getPrimaryKeys(tableMetadata?: TableMetadata): string[];
|
|
89
|
-
export declare function getTablesByResource(schema: Partial<Record<string, DBSchema>>, dbType: DbType | undefined,
|
|
89
|
+
export declare function getTablesByResource(schema: Partial<Record<string, DBSchema>>, dbType: DbType | undefined, dbPath: string, workspace: string): Promise<string[]>;
|
|
90
90
|
export declare function dbSupportsSchemas(dbType: DbType): boolean;
|
|
91
91
|
export declare function datatypeHasLength(datatype: string): boolean;
|
|
@@ -578,7 +578,7 @@ export function buildVisibleFieldList(columnDefs, dbType) {
|
|
|
578
578
|
case 'duckdb':
|
|
579
579
|
return `"${column?.field}"`; // DuckDB uses double quotes for identifiers
|
|
580
580
|
default:
|
|
581
|
-
throw new Error('Unsupported database type');
|
|
581
|
+
throw new Error('Unsupported database type: ' + dbType);
|
|
582
582
|
}
|
|
583
583
|
});
|
|
584
584
|
}
|
|
@@ -621,7 +621,7 @@ export function getPrimaryKeys(tableMetadata) {
|
|
|
621
621
|
}
|
|
622
622
|
return r ?? [];
|
|
623
623
|
}
|
|
624
|
-
export async function getTablesByResource(schema, dbType,
|
|
624
|
+
export async function getTablesByResource(schema, dbType, dbPath, workspace) {
|
|
625
625
|
const s = Object.values(schema)?.[0];
|
|
626
626
|
switch (dbType) {
|
|
627
627
|
case 'ms_sql_server': {
|
|
@@ -638,7 +638,7 @@ export async function getTablesByResource(schema, dbType, resourcePath, workspac
|
|
|
638
638
|
case 'mysql': {
|
|
639
639
|
const resourceObj = (await ResourceService.getResourceValue({
|
|
640
640
|
workspace,
|
|
641
|
-
path:
|
|
641
|
+
path: dbPath.split('$res:')[1]
|
|
642
642
|
}));
|
|
643
643
|
const paths = [];
|
|
644
644
|
for (const key in s?.schema) {
|
|
@@ -690,6 +690,15 @@ export async function getTablesByResource(schema, dbType, resourcePath, workspac
|
|
|
690
690
|
}
|
|
691
691
|
return paths;
|
|
692
692
|
}
|
|
693
|
+
case 'duckdb': {
|
|
694
|
+
const paths = [];
|
|
695
|
+
for (const key in s?.schema) {
|
|
696
|
+
for (const subKey in s.schema[key]) {
|
|
697
|
+
paths.push(`${subKey}`);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return paths;
|
|
701
|
+
}
|
|
693
702
|
default:
|
|
694
703
|
return [];
|
|
695
704
|
}
|
|
@@ -16,7 +16,8 @@ import { ColumnIdentity } from '../dbtable/utils';
|
|
|
16
16
|
import AppAggridTableActions from './AppAggridTableActions.svelte';
|
|
17
17
|
import Popover from '../../../../Popover.svelte';
|
|
18
18
|
import { stateSnapshot, withProps } from '../../../../../svelte5Utils.svelte';
|
|
19
|
-
|
|
19
|
+
import { get } from 'svelte/store';
|
|
20
|
+
let { id, customCss = undefined, containerHeight = undefined, resolvedConfig, datasource, componentState = $bindable(undefined), outputs, allowDelete, actions = [], result = undefined, allowColumnDefsActions = true, onChange = undefined } = $props();
|
|
20
21
|
let inputs = {};
|
|
21
22
|
const context = getContext('AppViewerContext');
|
|
22
23
|
const contextPanel = getContext('ContextPanel');
|
|
@@ -51,6 +52,12 @@ function toggleRows(rows) {
|
|
|
51
52
|
let clientHeight = $state();
|
|
52
53
|
let clientWidth = $state();
|
|
53
54
|
const dispatch = createEventDispatcher();
|
|
55
|
+
function fireOnChange() {
|
|
56
|
+
let runnableComponents = get(context.runnableComponents);
|
|
57
|
+
if (onChange) {
|
|
58
|
+
onChange.forEach((id) => runnableComponents?.[id]?.cb?.forEach((cb) => cb()));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
54
61
|
function onCellValueChanged(event) {
|
|
55
62
|
let dataCell = event.newValue;
|
|
56
63
|
outputs?.newChange?.set({
|
|
@@ -70,6 +77,7 @@ function onCellValueChanged(event) {
|
|
|
70
77
|
columnDef: event.colDef
|
|
71
78
|
});
|
|
72
79
|
resolvedConfig?.extraConfig?.['defaultColDef']?.['onCellValueChanged']?.(event);
|
|
80
|
+
fireOnChange();
|
|
73
81
|
}
|
|
74
82
|
let api = $state(undefined);
|
|
75
83
|
let eGui = $state();
|
|
@@ -17,6 +17,7 @@ interface Props {
|
|
|
17
17
|
actions?: TableAction[];
|
|
18
18
|
result?: any[] | undefined;
|
|
19
19
|
allowColumnDefsActions?: boolean;
|
|
20
|
+
onChange?: string[] | undefined;
|
|
20
21
|
}
|
|
21
22
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
22
23
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
@@ -14,7 +14,7 @@ import InitializeComponent from '../../helpers/InitializeComponent.svelte';
|
|
|
14
14
|
import DebouncedInput from '../../helpers/DebouncedInput.svelte';
|
|
15
15
|
import RunnableComponent from '../../helpers/RunnableComponent.svelte';
|
|
16
16
|
import { CancelablePromise } from '../../../../../gen';
|
|
17
|
-
let { id, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = undefined } = $props();
|
|
17
|
+
let { id, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = undefined, onChange = undefined } = $props();
|
|
18
18
|
let runnableComponent = $state(undefined);
|
|
19
19
|
function clear() {
|
|
20
20
|
setTimeout(() => {
|
|
@@ -181,6 +181,7 @@ let ignoreFirst = true;
|
|
|
181
181
|
{result}
|
|
182
182
|
{actions}
|
|
183
183
|
allowDelete={false}
|
|
184
|
+
{onChange}
|
|
184
185
|
bind:this={aggrid}
|
|
185
186
|
/>
|
|
186
187
|
</div>
|
|
@@ -12,6 +12,7 @@ interface Props {
|
|
|
12
12
|
render: boolean;
|
|
13
13
|
customCss?: ComponentCustomCSS<'aggridinfinitecomponent'> | undefined;
|
|
14
14
|
actions?: TableAction[] | undefined;
|
|
15
|
+
onChange?: string[] | undefined;
|
|
15
16
|
}
|
|
16
17
|
declare const AppAggridInfiniteTable: import("svelte").Component<Props, {}, "initializing">;
|
|
17
18
|
type AppAggridInfiniteTable = ReturnType<typeof AppAggridInfiniteTable>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
|
6
6
|
import { Loader2 } from 'lucide-svelte';
|
|
7
7
|
import AppAggridInfiniteTable from './AppAggridInfiniteTable.svelte';
|
|
8
|
-
let { id, license, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = [] } = $props();
|
|
8
|
+
let { id, license, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = [], onChange = undefined } = $props();
|
|
9
9
|
let loaded = $state(false);
|
|
10
10
|
async function load() {
|
|
11
11
|
await import('ag-grid-enterprise');
|
|
@@ -25,6 +25,7 @@ load();
|
|
|
25
25
|
{render}
|
|
26
26
|
{customCss}
|
|
27
27
|
{actions}
|
|
28
|
+
{onChange}
|
|
28
29
|
/>
|
|
29
30
|
{:else}
|
|
30
31
|
<Loader2 class="animate-spin" />
|
package/package/components/apps/components/display/table/AppAggridInfiniteTableEe.svelte.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ interface Props {
|
|
|
12
12
|
render: boolean;
|
|
13
13
|
customCss?: ComponentCustomCSS<'aggridinfinitecomponentee'> | undefined;
|
|
14
14
|
actions?: TableAction[];
|
|
15
|
+
onChange?: string[] | undefined;
|
|
15
16
|
}
|
|
16
17
|
declare const AppAggridInfiniteTableEe: import("svelte").Component<Props, {}, "initializing">;
|
|
17
18
|
type AppAggridInfiniteTableEe = ReturnType<typeof AppAggridInfiniteTableEe>;
|
|
@@ -22,7 +22,8 @@ import Popover from '../../../../Popover.svelte';
|
|
|
22
22
|
import { Button } from '../../../../common';
|
|
23
23
|
import InputValue from '../../helpers/InputValue.svelte';
|
|
24
24
|
import { stateSnapshot, withProps } from '../../../../../svelte5Utils.svelte';
|
|
25
|
-
|
|
25
|
+
import { get } from 'svelte/store';
|
|
26
|
+
let { id, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = undefined, actionsOrder = undefined, onChange = undefined } = $props();
|
|
26
27
|
const context = getContext('AppViewerContext');
|
|
27
28
|
const contextPanel = getContext('ContextPanel');
|
|
28
29
|
const iterContext = getContext('ListWrapperContext');
|
|
@@ -115,6 +116,12 @@ function toggleRows(rows) {
|
|
|
115
116
|
}
|
|
116
117
|
let clientHeight = $state(0);
|
|
117
118
|
let clientWidth = $state(0);
|
|
119
|
+
function fireOnChange() {
|
|
120
|
+
let runnableComponents = get(context.runnableComponents);
|
|
121
|
+
if (onChange) {
|
|
122
|
+
onChange.forEach((id) => runnableComponents?.[id]?.cb?.forEach((cb) => cb()));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
118
125
|
function onCellValueChanged(event) {
|
|
119
126
|
if (result) {
|
|
120
127
|
let dataCell = event.newValue;
|
|
@@ -134,6 +141,7 @@ function onCellValueChanged(event) {
|
|
|
134
141
|
let data = { ...result[idx] };
|
|
135
142
|
outputs?.selectedRow?.set(data);
|
|
136
143
|
resolvedConfig?.extraConfig?.['defaultColDef']?.['onCellValueChanged']?.(event);
|
|
144
|
+
fireOnChange();
|
|
137
145
|
}
|
|
138
146
|
}
|
|
139
147
|
let extraConfig = $state(deepCloneWithFunctions(resolvedConfig.extraConfig));
|
|
@@ -13,6 +13,7 @@ interface Props {
|
|
|
13
13
|
customCss?: ComponentCustomCSS<'aggridcomponent'> | undefined;
|
|
14
14
|
actions?: TableAction[] | undefined;
|
|
15
15
|
actionsOrder?: RichConfiguration | undefined;
|
|
16
|
+
onChange?: string[] | undefined;
|
|
16
17
|
}
|
|
17
18
|
declare const AppAggridTable: import("svelte").Component<Props, {}, "initializing">;
|
|
18
19
|
type AppAggridTable = ReturnType<typeof AppAggridTable>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import 'ag-grid-community/styles/ag-grid.css';
|
|
6
6
|
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
|
7
7
|
import { Loader2 } from 'lucide-svelte';
|
|
8
|
-
let { id, license, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = [], actionsOrder = undefined } = $props();
|
|
8
|
+
let { id, license, componentInput, configuration, initializing = $bindable(undefined), render, customCss = undefined, actions = [], actionsOrder = undefined, onChange = undefined } = $props();
|
|
9
9
|
let loaded = $state(false);
|
|
10
10
|
async function load() {
|
|
11
11
|
await import('ag-grid-enterprise');
|
|
@@ -26,6 +26,7 @@ load();
|
|
|
26
26
|
{customCss}
|
|
27
27
|
{actions}
|
|
28
28
|
{actionsOrder}
|
|
29
|
+
{onChange}
|
|
29
30
|
/>
|
|
30
31
|
{:else}
|
|
31
32
|
<Loader2 class="animate-spin" />
|
|
@@ -13,6 +13,7 @@ interface Props {
|
|
|
13
13
|
customCss?: ComponentCustomCSS<'aggridcomponent'> | undefined;
|
|
14
14
|
actions?: TableAction[];
|
|
15
15
|
actionsOrder?: RichConfiguration | undefined;
|
|
16
|
+
onChange?: string[] | undefined;
|
|
16
17
|
}
|
|
17
18
|
declare const AppAggridTableEe: import("svelte").Component<Props, {}, "initializing">;
|
|
18
19
|
type AppAggridTableEe = ReturnType<typeof AppAggridTableEe>;
|
|
@@ -314,6 +314,7 @@ export async function buildRequestBody(dynamicArgsOverride) {
|
|
|
314
314
|
nonStaticRunnableInputs[k] = '$ctx:' + ctxMatch[1];
|
|
315
315
|
}
|
|
316
316
|
else {
|
|
317
|
+
// console.log('k', k)
|
|
317
318
|
nonStaticRunnableInputs[k] = await inputValues[k]?.computeExpr();
|
|
318
319
|
}
|
|
319
320
|
if (isEditor && field?.type == 'evalv2' && field.allowUserResources) {
|
|
@@ -328,6 +329,7 @@ export async function buildRequestBody(dynamicArgsOverride) {
|
|
|
328
329
|
}
|
|
329
330
|
}
|
|
330
331
|
const oneOfRunnableInputs = isEditor ? collectOneOfFields(fields, $app) : {};
|
|
332
|
+
// console.log(JSON.stringify({ id, nonStaticRunnableInputs, inputValues }))
|
|
331
333
|
const requestBody = {
|
|
332
334
|
args: nonStaticRunnableInputs,
|
|
333
335
|
component: id,
|
|
@@ -519,7 +521,7 @@ onDestroy(() => {
|
|
|
519
521
|
}
|
|
520
522
|
});
|
|
521
523
|
let lastJobId = $state(undefined);
|
|
522
|
-
let inputValues =
|
|
524
|
+
let inputValues = {};
|
|
523
525
|
function updateBgRuns(loading) {
|
|
524
526
|
if (loading) {
|
|
525
527
|
bgRuns.update((runs) => [...runs, id]);
|
|
@@ -1000,7 +1000,12 @@ const unsavedConfirmationModal_render = $derived(unsavedConfirmationModal);
|
|
|
1000
1000
|
<div class="relative flex flex-col h-full"></div>
|
|
1001
1001
|
{:else}
|
|
1002
1002
|
<Pane bind:size={rightPanelSize} minSize={15} maxSize={33}>
|
|
1003
|
-
|
|
1003
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
1004
|
+
<div
|
|
1005
|
+
bind:clientWidth={$runnableJob.width}
|
|
1006
|
+
class="relative flex flex-col h-full"
|
|
1007
|
+
onkeydown={(e) => e.stopPropagation()}
|
|
1008
|
+
>
|
|
1004
1009
|
<Tabs bind:selected={selectedTab} wrapperClass="!min-h-[42px]" class="!h-full">
|
|
1005
1010
|
<Popover disappearTimeout={0} notClickable placement="bottom">
|
|
1006
1011
|
{#snippet text()}
|
|
@@ -114,35 +114,39 @@ async function computeTriggerables() {
|
|
|
114
114
|
const dbType = config?.type?.selected;
|
|
115
115
|
let pg = config?.type?.configuration?.[dbType];
|
|
116
116
|
if (pg && dbType) {
|
|
117
|
-
const { table, resource } = pg;
|
|
117
|
+
const { table, resource, ducklake } = pg;
|
|
118
118
|
const tableValue = table.value;
|
|
119
|
-
const
|
|
119
|
+
const dbPath = resource?.value.split('$res:')[1] ??
|
|
120
|
+
ducklake?.value?.split('ducklake://')[1];
|
|
120
121
|
const columnDefs = c.configuration.columnDefs.value;
|
|
121
122
|
const whereClause = c.configuration.whereClause.value;
|
|
122
|
-
if (tableValue &&
|
|
123
|
+
if (tableValue && dbPath && columnDefs) {
|
|
124
|
+
let dbInput = ducklake
|
|
125
|
+
? { type: 'ducklake', ducklake: dbPath }
|
|
126
|
+
: { type: 'database', resourcePath: dbPath, resourceType: dbType };
|
|
123
127
|
r.push({
|
|
124
|
-
input: getSelectInput(
|
|
128
|
+
input: getSelectInput(dbInput, tableValue, columnDefs, whereClause),
|
|
125
129
|
id: x.id
|
|
126
130
|
});
|
|
127
131
|
r.push({
|
|
128
|
-
input: getCountInput(
|
|
132
|
+
input: getCountInput(dbInput, tableValue, columnDefs, whereClause),
|
|
129
133
|
id: x.id + '_count'
|
|
130
134
|
});
|
|
131
135
|
r.push({
|
|
132
|
-
input: getInsertInput(tableValue, columnDefs
|
|
136
|
+
input: getInsertInput(dbInput, tableValue, columnDefs),
|
|
133
137
|
id: x.id + '_insert'
|
|
134
138
|
});
|
|
135
139
|
let primaryColumns = getPrimaryKeys(columnDefs);
|
|
136
140
|
let columns = columnDefs?.filter((x) => primaryColumns.includes(x.field));
|
|
137
141
|
r.push({
|
|
138
|
-
input: getDeleteInput(
|
|
142
|
+
input: getDeleteInput(dbInput, tableValue, columns),
|
|
139
143
|
id: x.id + '_delete'
|
|
140
144
|
});
|
|
141
145
|
columnDefs
|
|
142
146
|
.filter((col) => col.editable || config.allEditable.value)
|
|
143
147
|
.forEach((column) => {
|
|
144
148
|
r.push({
|
|
145
|
-
input: getUpdateInput(
|
|
149
|
+
input: getUpdateInput(dbInput, tableValue, column, columns),
|
|
146
150
|
id: x.id + '_update'
|
|
147
151
|
});
|
|
148
152
|
});
|
|
@@ -160,8 +160,8 @@ $effect(() => {
|
|
|
160
160
|
{#if job?.args}
|
|
161
161
|
<div class="p-2">
|
|
162
162
|
<JobArgs
|
|
163
|
-
id={job
|
|
164
|
-
workspace={job
|
|
163
|
+
id={job?.id}
|
|
164
|
+
workspace={job?.workspace_id ?? $workspaceStore ?? 'no_w'}
|
|
165
165
|
args={job?.args}
|
|
166
166
|
/>
|
|
167
167
|
</div>
|
|
@@ -185,12 +185,12 @@ $effect(() => {
|
|
|
185
185
|
/>
|
|
186
186
|
</Pane>
|
|
187
187
|
<Pane size={50} minSize={10} class="text-sm text-secondary">
|
|
188
|
-
{#if job != undefined && 'result' in job && job
|
|
188
|
+
{#if job != undefined && 'result' in job && job?.result != undefined}<div
|
|
189
189
|
class="relative h-full px-2"
|
|
190
190
|
><DisplayResult
|
|
191
191
|
workspaceId={$workspaceStore}
|
|
192
192
|
jobId={selectedJobId}
|
|
193
|
-
result={job
|
|
193
|
+
result={job?.result}
|
|
194
194
|
/></div
|
|
195
195
|
>
|
|
196
196
|
{:else if testIsLoading}
|
|
@@ -206,7 +206,7 @@ $effect(() => {
|
|
|
206
206
|
{#if jobResult?.transformer}
|
|
207
207
|
<Pane size={50} minSize={10} class="text-sm text-secondary p-2">
|
|
208
208
|
<div class="font-bold">Transformer results</div>
|
|
209
|
-
{#if job != undefined && 'result' in job && job
|
|
209
|
+
{#if job != undefined && 'result' in job && job?.result != undefined}
|
|
210
210
|
<div class="relative h-full px-2">
|
|
211
211
|
<DisplayResult
|
|
212
212
|
workspaceId={$workspaceStore}
|
|
@@ -217,6 +217,7 @@ const chunk9Components = new Set(['verticalsplitpanescomponent']);
|
|
|
217
217
|
customCss={component.customCss}
|
|
218
218
|
actions={component.actions ?? []}
|
|
219
219
|
actionsOrder={component.actionsOrder ?? undefined}
|
|
220
|
+
onChange={component.onChange}
|
|
220
221
|
{render}
|
|
221
222
|
/>
|
|
222
223
|
{:else if component.type === 'aggridcomponentee'}
|
|
@@ -229,6 +230,7 @@ const chunk9Components = new Set(['verticalsplitpanescomponent']);
|
|
|
229
230
|
customCss={component.customCss}
|
|
230
231
|
actions={component.actions ?? []}
|
|
231
232
|
actionsOrder={component.actionsOrder ?? undefined}
|
|
233
|
+
onChange={component.onChange}
|
|
232
234
|
{render}
|
|
233
235
|
/>
|
|
234
236
|
{:else if component.type === 'aggridinfinitecomponent'}
|
|
@@ -239,6 +241,7 @@ const chunk9Components = new Set(['verticalsplitpanescomponent']);
|
|
|
239
241
|
componentInput={component.componentInput}
|
|
240
242
|
customCss={component.customCss}
|
|
241
243
|
actions={component.actions ?? []}
|
|
244
|
+
onChange={component.onChange}
|
|
242
245
|
{render}
|
|
243
246
|
/>
|
|
244
247
|
{:else if component.type === 'aggridinfinitecomponentee'}
|
|
@@ -251,6 +254,7 @@ const chunk9Components = new Set(['verticalsplitpanescomponent']);
|
|
|
251
254
|
customCss={component.customCss}
|
|
252
255
|
actions={component.actions ?? []}
|
|
253
256
|
{render}
|
|
257
|
+
onChange={component.onChange}
|
|
254
258
|
/>
|
|
255
259
|
{:else if component.type === 'alertcomponent'}
|
|
256
260
|
<AppAlert
|
|
@@ -103,20 +103,24 @@ export type TableComponent = BaseComponent<'tablecomponent'> & {
|
|
|
103
103
|
export type AggridComponent = BaseComponent<'aggridcomponent'> & {
|
|
104
104
|
actions: TableAction[];
|
|
105
105
|
actionsOrder: RichConfiguration | undefined;
|
|
106
|
+
onChange?: string[] | undefined;
|
|
106
107
|
};
|
|
107
108
|
export type AggridComponentEe = BaseComponent<'aggridcomponentee'> & {
|
|
108
109
|
license: string;
|
|
109
110
|
actions: TableAction[];
|
|
110
111
|
actionsOrder: RichConfiguration | undefined;
|
|
112
|
+
onChange?: string[] | undefined;
|
|
111
113
|
};
|
|
112
114
|
export type AggridInfiniteComponent = BaseComponent<'aggridinfinitecomponent'> & {
|
|
113
115
|
actions: TableAction[];
|
|
114
116
|
actionsOrder: RichConfiguration | undefined;
|
|
117
|
+
onChange?: string[] | undefined;
|
|
115
118
|
};
|
|
116
119
|
export type AggridInfiniteComponentEe = BaseComponent<'aggridinfinitecomponentee'> & {
|
|
117
120
|
actions: TableAction[];
|
|
118
121
|
license: string;
|
|
119
122
|
actionsOrder: RichConfiguration | undefined;
|
|
123
|
+
onChange?: string[] | undefined;
|
|
120
124
|
};
|
|
121
125
|
export type DisplayComponent = BaseComponent<'displaycomponent'>;
|
|
122
126
|
export type JobIdDisplayComponent = BaseComponent<'jobiddisplaycomponent'>;
|
|
@@ -195,6 +199,7 @@ export type DBExplorerComponent = BaseComponent<'dbexplorercomponent'> & {
|
|
|
195
199
|
columns: RichConfiguration;
|
|
196
200
|
actions: TableAction[];
|
|
197
201
|
actionsOrder: RichConfiguration | undefined;
|
|
202
|
+
onChange?: string[] | undefined;
|
|
198
203
|
};
|
|
199
204
|
export type S3FileInputComponent = BaseComponent<'s3fileinputcomponent'> & {
|
|
200
205
|
onFileChange?: string[];
|
|
@@ -4197,6 +4202,7 @@ export declare const components: {
|
|
|
4197
4202
|
readonly snowflake: "Snowflake";
|
|
4198
4203
|
readonly bigquery: "BigQuery";
|
|
4199
4204
|
readonly snowflake_oauth: "Snowflake OAuth";
|
|
4205
|
+
readonly ducklake: "Ducklake";
|
|
4200
4206
|
};
|
|
4201
4207
|
readonly configuration: {
|
|
4202
4208
|
readonly postgresql: {
|
|
@@ -4250,6 +4256,16 @@ export declare const components: {
|
|
|
4250
4256
|
readonly value: undefined;
|
|
4251
4257
|
};
|
|
4252
4258
|
};
|
|
4259
|
+
readonly ducklake: {
|
|
4260
|
+
readonly ducklake: StaticAppInput;
|
|
4261
|
+
readonly table: {
|
|
4262
|
+
readonly fieldType: "select";
|
|
4263
|
+
readonly subFieldType: "db-table";
|
|
4264
|
+
readonly type: "static";
|
|
4265
|
+
readonly selectOptions: readonly [];
|
|
4266
|
+
readonly value: undefined;
|
|
4267
|
+
};
|
|
4268
|
+
};
|
|
4253
4269
|
};
|
|
4254
4270
|
};
|
|
4255
4271
|
readonly columnDefs: StaticAppInput;
|
|
@@ -3369,7 +3369,8 @@ See date-fns format for more information. By default, it is 'dd.MM.yyyy HH:mm'
|
|
|
3369
3369
|
ms_sql_server: 'MS SQL Server',
|
|
3370
3370
|
snowflake: 'Snowflake',
|
|
3371
3371
|
bigquery: 'BigQuery',
|
|
3372
|
-
snowflake_oauth: 'Snowflake OAuth'
|
|
3372
|
+
snowflake_oauth: 'Snowflake OAuth',
|
|
3373
|
+
ducklake: 'Ducklake'
|
|
3373
3374
|
},
|
|
3374
3375
|
configuration: {
|
|
3375
3376
|
postgresql: {
|
|
@@ -3448,6 +3449,21 @@ See date-fns format for more information. By default, it is 'dd.MM.yyyy HH:mm'
|
|
|
3448
3449
|
selectOptions: [],
|
|
3449
3450
|
value: undefined
|
|
3450
3451
|
}
|
|
3452
|
+
},
|
|
3453
|
+
ducklake: {
|
|
3454
|
+
ducklake: {
|
|
3455
|
+
type: 'static',
|
|
3456
|
+
fieldType: 'ducklake',
|
|
3457
|
+
subFieldType: 'ducklake',
|
|
3458
|
+
value: ''
|
|
3459
|
+
},
|
|
3460
|
+
table: {
|
|
3461
|
+
fieldType: 'select',
|
|
3462
|
+
subFieldType: 'db-table',
|
|
3463
|
+
type: 'static',
|
|
3464
|
+
selectOptions: [],
|
|
3465
|
+
value: undefined
|
|
3466
|
+
}
|
|
3451
3467
|
}
|
|
3452
3468
|
}
|
|
3453
3469
|
},
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
xData?: RichConfiguration | undefined;
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
8
|
-
type
|
|
9
|
-
export default
|
|
7
|
+
declare const AGChartRichEditor: import("svelte").Component<Props, {}, "datasets" | "xData">;
|
|
8
|
+
type AGChartRichEditor = ReturnType<typeof AGChartRichEditor>;
|
|
9
|
+
export default AGChartRichEditor;
|
|
@@ -2,8 +2,8 @@ import { type AppComponent } from '../component';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
component: AppComponent | undefined;
|
|
4
4
|
}
|
|
5
|
-
declare const
|
|
5
|
+
declare const CSSMigrationModal: import("svelte").Component<Props, {
|
|
6
6
|
open: () => void;
|
|
7
7
|
}, "component">;
|
|
8
|
-
type
|
|
9
|
-
export default
|
|
8
|
+
type CSSMigrationModal = ReturnType<typeof CSSMigrationModal>;
|
|
9
|
+
export default CSSMigrationModal;
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
xData?: RichConfiguration | undefined;
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
8
|
-
type
|
|
9
|
-
export default
|
|
7
|
+
declare const ChartJSRichEditor: import("svelte").Component<Props, {}, "datasets" | "xData">;
|
|
8
|
+
type ChartJSRichEditor = ReturnType<typeof ChartJSRichEditor>;
|
|
9
|
+
export default ChartJSRichEditor;
|