windmill-components 1.352.9 → 1.362.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/assets/app.css +8 -45
- package/package/components/ApiConnectForm.svelte +1 -0
- package/package/components/ArgInput.svelte +5 -1
- package/package/components/ChangeInstanceUsername.svelte +20 -12
- package/package/components/ContentSearchInner.svelte +359 -0
- package/package/components/{ContentSearch.svelte.d.ts → ContentSearchInner.svelte.d.ts} +9 -5
- package/package/components/CustomPopover.svelte +73 -0
- package/package/components/CustomPopover.svelte.d.ts +29 -0
- package/package/components/DateTimeInput.svelte +29 -3
- package/package/components/DateTimeInput.svelte.d.ts +4 -0
- package/package/components/Dev.svelte +8 -3
- package/package/components/DurationMs.svelte +2 -2
- package/package/components/FlowBuilder.svelte +122 -24
- package/package/components/FlowBuilder.svelte.d.ts +1 -0
- package/package/components/FlowGraphViewerStep.svelte +2 -2
- package/package/components/FlowJobResult.svelte +5 -3
- package/package/components/FlowStatusViewer.svelte +4 -3
- package/package/components/FlowStatusViewerInner.svelte +265 -160
- package/package/components/FlowStatusViewerInner.svelte.d.ts +15 -2
- package/package/components/HighlightTheme.svelte +75 -77
- package/package/components/InputTransformForm.svelte +2 -0
- package/package/components/JobArgs.svelte +59 -44
- package/package/components/JobArgs.svelte.d.ts +2 -0
- package/package/components/LightweightArgInput.svelte +27 -2
- package/package/components/Path.svelte +3 -8
- package/package/components/Popover.svelte +1 -1
- package/package/components/ResourceEditor.svelte +3 -2
- package/package/components/ResourceEditorDrawer.svelte +4 -1
- package/package/components/ResourcePicker.svelte +1 -0
- package/package/components/RunChart.svelte +6 -3
- package/package/components/RunChart.svelte.d.ts +1 -0
- package/package/components/RunForm.svelte +24 -23
- package/package/components/RunForm.svelte.d.ts +0 -2
- package/package/components/SavedInputs.svelte +50 -39
- package/package/components/ScheduleEditorInner.svelte +26 -4
- package/package/components/ScriptBuilder.svelte +47 -22
- package/package/components/ScriptBuilder.svelte.d.ts +1 -0
- package/package/components/SearchItems.svelte +5 -4
- package/package/components/Summary.svelte +74 -0
- package/package/components/Summary.svelte.d.ts +16 -0
- package/package/components/apps/components/display/AppMarkdown.svelte +3 -2
- package/package/components/apps/components/display/AppMenu.svelte +2 -2
- package/package/components/apps/components/display/AppNavbar.svelte +94 -0
- package/package/components/apps/components/display/AppNavbar.svelte.d.ts +24 -0
- package/package/components/apps/components/display/AppNavbarItem.svelte +146 -0
- package/package/components/apps/components/display/AppNavbarItem.svelte.d.ts +27 -0
- package/package/components/apps/components/display/ResolveNavbarItemPath.svelte +21 -0
- package/package/components/apps/components/display/ResolveNavbarItemPath.svelte.d.ts +20 -0
- package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +16 -0
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte +12 -16
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte +5 -0
- package/package/components/apps/components/display/table/AppAggridTable.svelte +28 -6
- package/package/components/apps/components/display/table/AppAggridTableActions.svelte +68 -43
- package/package/components/apps/components/inputs/AppDateSelect.svelte +284 -0
- package/package/components/apps/components/inputs/AppDateSelect.svelte.d.ts +21 -0
- package/package/components/apps/components/inputs/AppDateTimeInput.svelte +2 -0
- package/package/components/apps/components/inputs/AppFileInput.svelte +22 -27
- package/package/components/apps/components/inputs/AppFileInput.svelte.d.ts +1 -0
- package/package/components/apps/components/inputs/AppTextInput.svelte +1 -1
- package/package/components/apps/components/layout/AppDecisionTree.svelte +32 -30
- package/package/components/apps/components/layout/AppModal.svelte +17 -6
- package/package/components/apps/editor/AppDeploymentHistory.svelte +2 -3
- package/package/components/apps/editor/AppDeploymentHistory.svelte.d.ts +3 -2
- package/package/components/apps/editor/AppEditor.svelte +9 -2
- package/package/components/apps/editor/AppEditorHeader.svelte +7 -10
- package/package/components/apps/editor/AppPreview.svelte +12 -3
- package/package/components/apps/editor/AppPreview.svelte.d.ts +2 -0
- package/package/components/apps/editor/DecisionTreeDebug.svelte +92 -68
- package/package/components/apps/editor/DeploymentHistory.svelte +0 -2
- package/package/components/apps/editor/appUtils.d.ts +1 -0
- package/package/components/apps/editor/appUtils.js +17 -0
- package/package/components/apps/editor/component/Component.svelte +23 -0
- package/package/components/apps/editor/component/components.d.ts +205 -3
- package/package/components/apps/editor/component/components.js +160 -1
- package/package/components/apps/editor/component/default-codes.js +13 -13
- package/package/components/apps/editor/component/sets.js +4 -2
- package/package/components/apps/editor/componentsPanel/ComponentList.svelte +12 -12
- package/package/components/apps/editor/componentsPanel/cssUtils.js +39 -3
- package/package/components/apps/editor/componentsPanel/quickStyleProperties.js +6 -0
- package/package/components/apps/editor/contextPanel/ComponentOutput.svelte +2 -2
- package/package/components/apps/editor/contextPanel/ContextPanel.svelte +6 -0
- package/package/components/apps/editor/contextPanel/components/OutputHeader.svelte +11 -0
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +4 -0
- package/package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +21 -8
- package/package/components/apps/editor/settingsPanel/ComponentPanel.svelte +64 -20
- package/package/components/apps/editor/settingsPanel/ContextVariables.svelte +48 -15
- package/package/components/apps/editor/settingsPanel/ContextVariables.svelte.d.ts +1 -0
- package/package/components/apps/editor/settingsPanel/DecisionTreeGraphEditor.svelte +25 -5
- package/package/components/apps/editor/settingsPanel/DecisionTreeGraphNode.svelte +2 -1
- package/package/components/apps/editor/settingsPanel/DecisionTreeGraphNode.svelte.d.ts +1 -0
- package/package/components/apps/editor/settingsPanel/DocLink.svelte +33 -0
- package/package/components/apps/editor/settingsPanel/DocLink.svelte.d.ts +19 -0
- package/package/components/apps/editor/settingsPanel/GridNavbar.svelte +192 -0
- package/package/components/apps/editor/settingsPanel/GridNavbar.svelte.d.ts +18 -0
- package/package/components/apps/editor/settingsPanel/GridTab.svelte +2 -2
- package/package/components/apps/editor/settingsPanel/RefreshDatabaseStudioTable.svelte +17 -0
- package/package/components/apps/editor/settingsPanel/RefreshDatabaseStudioTable.svelte.d.ts +16 -0
- package/package/components/apps/editor/settingsPanel/TableActions.svelte +81 -38
- package/package/components/apps/editor/settingsPanel/decisionTree/DecisionTreePreview.svelte +12 -5
- package/package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte +11 -12
- package/package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte.d.ts +4 -2
- package/package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +4 -1
- package/package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +7 -1
- package/package/components/apps/inputType.d.ts +2 -2
- package/package/components/apps/svelte-select/lib/Select.svelte +2 -3
- package/package/components/apps/types.d.ts +3 -0
- package/package/components/auditLogs/AuditLogsTable.svelte +2 -2
- package/package/components/common/CloseButton.svelte +10 -10
- package/package/components/common/CloseButton.svelte.d.ts +6 -14
- package/package/components/common/calendarPicker/CalendarPicker.svelte +5 -0
- package/package/components/common/calendarPicker/CalendarPicker.svelte.d.ts +2 -0
- package/package/components/common/confirmationModal/UnsavedConfirmationModal.svelte +7 -1
- package/package/components/common/fileInput/FileInput.svelte +2 -0
- package/package/components/common/fileInput/FileInput.svelte.d.ts +1 -0
- package/package/components/common/popup/Popup.svelte +4 -3
- package/package/components/common/popup/Popup.svelte.d.ts +1 -0
- package/package/components/common/table/AppRow.svelte +3 -10
- package/package/components/common/table/FlowRow.svelte +12 -1
- package/package/components/copilot/IteratorGen.svelte +1 -1
- package/package/components/copilot/PredicateGen.svelte +1 -1
- package/package/components/copilot/StepInputGen.svelte +8 -3
- package/package/components/copilot/StepInputsGen.svelte +5 -2
- package/package/components/details/WebhooksPanel.svelte +32 -1
- package/package/components/details/WebhooksPanel.svelte.d.ts +2 -11
- package/package/components/flows/FlowHistory.svelte +208 -0
- package/package/components/flows/FlowHistory.svelte.d.ts +21 -0
- package/package/components/flows/content/FlowBranchesAllWrapper.svelte +1 -1
- package/package/components/flows/content/FlowBranchesOneWrapper.svelte +1 -1
- package/package/components/flows/content/FlowEditorPanel.svelte +1 -1
- package/package/components/flows/content/FlowLoop.svelte +23 -26
- package/package/components/flows/content/FlowModuleComponent.svelte +2 -18
- package/package/components/flows/content/FlowModuleEarlyStop.svelte +10 -4
- package/package/components/flows/content/FlowModuleHeader.svelte +3 -4
- package/package/components/flows/content/FlowModuleScript.svelte +1 -1
- package/package/components/flows/content/FlowModuleSleep.svelte +1 -0
- package/package/components/flows/content/FlowModuleSuspend.svelte +1 -1
- package/package/components/flows/content/SuspendDrawer.svelte +7 -7
- package/package/components/flows/flowStateUtils.js +2 -1
- package/package/components/flows/flowStore.js +1 -1
- package/package/components/flows/header/FlowImportExportMenu.svelte +3 -16
- package/package/components/flows/header/FlowImportExportMenu.svelte.d.ts +4 -1
- package/package/components/flows/map/FlowJobsMenu.svelte +69 -0
- package/package/components/flows/map/FlowJobsMenu.svelte.d.ts +22 -0
- package/package/components/flows/map/FlowModuleSchemaItem.svelte +7 -4
- package/package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +1 -0
- package/package/components/flows/map/MapItem.svelte +20 -0
- package/package/components/flows/map/MapItem.svelte.d.ts +9 -0
- package/package/components/flows/map/VirtualItem.svelte +4 -2
- package/package/components/flows/map/VirtualItem.svelte.d.ts +1 -0
- package/package/components/flows/previousResults.d.ts +9 -0
- package/package/components/flows/previousResults.js +42 -8
- package/package/components/flows/propPicker/PropPickerWrapper.svelte +2 -0
- package/package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +1 -0
- package/package/components/flows/types.d.ts +1 -1
- package/package/components/graph/FlowGraph.svelte +80 -42
- package/package/components/graph/FlowGraph.svelte.d.ts +1 -0
- package/package/components/graph/model.d.ts +6 -1
- package/package/components/graph/svelvet/container/controllers/middleware.js +4 -4
- package/package/components/graph/svelvet/container/views/GraphView.svelte +2 -0
- package/package/components/graph/svelvet/edges/views/Edges/EdgeText.svelte +24 -25
- package/package/components/graph/util.d.ts +1 -1
- package/package/components/graph/util.js +1 -2
- package/package/components/home/ItemsList.svelte +22 -19
- package/package/components/jobs/JobPreview.svelte +11 -2
- package/package/components/propertyPicker/PropPicker.svelte +30 -0
- package/package/components/propertyPicker/PropPickerResult.svelte +14 -1
- package/package/components/propertyPicker/PropPickerResult.svelte.d.ts +1 -0
- package/package/components/runs/JobLoader.svelte +21 -8
- package/package/components/runs/JobLoader.svelte.d.ts +2 -0
- package/package/components/runs/JobPreview.svelte +5 -1
- package/package/components/runs/RunRow.svelte +12 -8
- package/package/components/runs/RunsFilter.svelte +2 -4
- package/package/components/runs/RunsFilter.svelte.d.ts +0 -1
- package/package/components/runs/RunsTable.svelte +63 -29
- package/package/components/runs/RunsTable.svelte.d.ts +1 -0
- package/package/components/schema/EditableSchemaWrapper.svelte +9 -1
- package/package/components/schema/PropertyEditor.svelte +1 -1
- package/package/components/search/GlobalSearchModal.svelte +559 -0
- package/package/components/search/GlobalSearchModal.svelte.d.ts +17 -0
- package/package/components/search/QuickMenuItem.svelte +76 -0
- package/package/components/search/QuickMenuItem.svelte.d.ts +27 -0
- package/package/components/sidebar/MenuButton.svelte +11 -0
- package/package/components/sidebar/MenuButton.svelte.d.ts +4 -0
- package/package/components/sidebar/changelogs.js +35 -0
- package/package/components/wizards/AppPicker.svelte +68 -0
- package/package/components/wizards/AppPicker.svelte.d.ts +17 -0
- package/package/components/wizards/NavbarWizard.svelte +131 -0
- package/package/components/wizards/NavbarWizard.svelte.d.ts +19 -0
- package/package/defaults.d.ts +1 -1
- package/package/defaults.js +1 -1
- package/package/es6.d.ts.txt +370 -1
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +42 -3
- package/package/gen/schemas.gen.js +42 -3
- package/package/gen/services.gen.d.ts +80 -5
- package/package/gen/services.gen.js +149 -8
- package/package/gen/types.gen.d.ts +265 -11
- package/package/inferArgSig.js +4 -0
- package/package/script_helpers.d.ts +3 -3
- package/package/script_helpers.js +46 -22
- package/package/stores.d.ts +1 -1
- package/package/stores.js +1 -1
- package/package/utils.d.ts +7 -23
- package/package/utils.js +54 -33
- package/package/windmill_fetch.d.ts.txt +6 -6
- package/package.json +3 -11
- package/package/components/ContentSearch.svelte +0 -355
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReadFileAs } from '../common/fileInput/model';
|
|
2
2
|
import type { DecisionTreeNode, TypedComponent } from './editor/component';
|
|
3
3
|
import type { InlineScript } from './types';
|
|
4
|
-
export type InputType = 'integer' | 'text' | 'textarea' | 'template' | 'number' | 'boolean' | 'select' | 'icon-select' | 'color' | 'date' | 'time' | 'datetime' | 'object' | 'array' | 'any' | 'labeledresource' | 'labeledselect' | 'tab-select' | 'schema' | 'ag-grid' | 'table-column' | 'plotly' | 'chartjs' | 'DecisionTreeNode' | 'ag-chart' | 'resource' | 'db-explorer' | 'db-table' | 's3' | 'number-tuple' | 'postgres' | 'mysql' | 'ms_sql_server' | 'snowflake' | 'bigquery';
|
|
4
|
+
export type InputType = 'integer' | 'text' | 'textarea' | 'template' | 'number' | 'boolean' | 'select' | 'icon-select' | 'color' | 'date' | 'time' | 'datetime' | 'object' | 'array' | 'any' | 'labeledresource' | 'labeledselect' | 'tab-select' | 'schema' | 'ag-grid' | 'table-column' | 'plotly' | 'chartjs' | 'DecisionTreeNode' | 'ag-chart' | 'resource' | 'db-explorer' | 'db-table' | 's3' | 'number-tuple' | 'postgres' | 'mysql' | 'ms_sql_server' | 'snowflake' | 'bigquery' | 'app-path';
|
|
5
5
|
export type InputConnection = {
|
|
6
6
|
componentType?: TypedComponent['type'];
|
|
7
7
|
componentId: string;
|
|
@@ -109,7 +109,7 @@ export type StaticOptions = {
|
|
|
109
109
|
label: string;
|
|
110
110
|
}[];
|
|
111
111
|
};
|
|
112
|
-
export type AppInput = AppInputSpec<'text', string> | AppInputSpec<'textarea', string> | AppInputSpec<'template', string> | AppInputSpec<'number', number> | AppInputSpec<'boolean', boolean> | AppInputSpec<'date', string> | AppInputSpec<'time', string> | AppInputSpec<'datetime', string> | AppInputSpec<'any', any> | AppInputSpec<'object', Record<string | number, any>> | AppInputSpec<'object', string> | (AppInputSpec<'select', string, 'db-table'> & StaticOptions) | AppInputSpec<'icon-select', string> | AppInputSpec<'color', string> | AppInputSpec<'array', string[], 'text'> | AppInputSpec<'array', string[], 'textarea'> | AppInputSpec<'array', number[], 'number'> | AppInputSpec<'array', boolean[], 'boolean'> | AppInputSpec<'array', string[], 'date'> | AppInputSpec<'array', string[], 'time'> | AppInputSpec<'array', string[], 'datetime'> | AppInputSpec<'array', object[], 'object'> | (AppInputSpec<'array', string[], 'select'> & StaticOptions) | AppInputSpec<'array', object[], 'labeledresource'> | AppInputSpec<'array', object[], 'labeledselect'> | AppInputSpec<'labeledselect', object> | AppInputSpec<'labeledresource', object> | AppInputSpec<'array', object[], 'tab-select'> | AppInputSpec<'schema', object> | AppInputSpec<'array', object[], 'ag-grid'> | AppInputSpec<'array', object[], 'db-explorer'> | AppInputSpec<'array', object[], 'table-column'> | AppInputSpec<'array', object[], 'plotly'> | AppInputSpec<'array', object[], 'chartjs'> | AppInputSpec<'array', DecisionTreeNode, 'DecisionTreeNode'> | AppInputSpec<'array', object[], 'ag-chart'> | AppInputSpec<'resource', string> | AppInputSpec<'resource', string, 's3'> | AppInputSpec<'resource', string, 'postgres'> | AppInputSpec<'resource', string, 'mysql'> | AppInputSpec<'resource', string, 'ms_sql_server'> | AppInputSpec<'resource', string, 'snowflake'> | AppInputSpec<'resource', string, 'bigquery'> | AppInputSpec<'array', object[], 'number-tuple'>;
|
|
112
|
+
export type AppInput = AppInputSpec<'text', string> | AppInputSpec<'textarea', string> | AppInputSpec<'template', string> | AppInputSpec<'number', number> | AppInputSpec<'boolean', boolean> | AppInputSpec<'date', string> | AppInputSpec<'time', string> | AppInputSpec<'datetime', string> | AppInputSpec<'any', any> | AppInputSpec<'object', Record<string | number, any>> | AppInputSpec<'object', string> | (AppInputSpec<'select', string, 'db-table'> & StaticOptions) | AppInputSpec<'icon-select', string> | AppInputSpec<'color', string> | AppInputSpec<'array', string[], 'text'> | AppInputSpec<'array', string[], 'textarea'> | AppInputSpec<'array', number[], 'number'> | AppInputSpec<'array', boolean[], 'boolean'> | AppInputSpec<'array', string[], 'date'> | AppInputSpec<'array', string[], 'time'> | AppInputSpec<'array', string[], 'datetime'> | AppInputSpec<'array', object[], 'object'> | (AppInputSpec<'array', string[], 'select'> & StaticOptions) | AppInputSpec<'array', object[], 'labeledresource'> | AppInputSpec<'array', object[], 'labeledselect'> | AppInputSpec<'labeledselect', object> | AppInputSpec<'labeledresource', object> | AppInputSpec<'array', object[], 'tab-select'> | AppInputSpec<'schema', object> | AppInputSpec<'array', object[], 'ag-grid'> | AppInputSpec<'array', object[], 'db-explorer'> | AppInputSpec<'array', object[], 'table-column'> | AppInputSpec<'array', object[], 'plotly'> | AppInputSpec<'array', object[], 'chartjs'> | AppInputSpec<'array', DecisionTreeNode, 'DecisionTreeNode'> | AppInputSpec<'array', object[], 'ag-chart'> | AppInputSpec<'resource', string> | AppInputSpec<'resource', string, 's3'> | AppInputSpec<'resource', string, 'postgres'> | AppInputSpec<'resource', string, 'mysql'> | AppInputSpec<'resource', string, 'ms_sql_server'> | AppInputSpec<'resource', string, 'snowflake'> | AppInputSpec<'resource', string, 'bigquery'> | AppInputSpec<'array', object[], 'number-tuple'> | AppInputSpec<'app-path', string>;
|
|
113
113
|
export type RowAppInput = Extract<AppInput, {
|
|
114
114
|
type: 'row';
|
|
115
115
|
}>;
|
|
@@ -668,7 +668,6 @@
|
|
|
668
668
|
bind:value={filterText}
|
|
669
669
|
placeholder={placeholderText}
|
|
670
670
|
style={inputStyles}
|
|
671
|
-
{disabled}
|
|
672
671
|
/>
|
|
673
672
|
</div>
|
|
674
673
|
|
|
@@ -872,12 +871,12 @@
|
|
|
872
871
|
|
|
873
872
|
.disabled input::-moz-placeholder {
|
|
874
873
|
color: var(--disabled-placeholder-color, #c1c6cc);
|
|
875
|
-
opacity: var(--disabled-placeholder-opacity,
|
|
874
|
+
opacity: var(--disabled-placeholder-opacity, 0.8);
|
|
876
875
|
}
|
|
877
876
|
|
|
878
877
|
.disabled input::placeholder {
|
|
879
878
|
color: var(--disabled-placeholder-color, #c1c6cc);
|
|
880
|
-
opacity: var(--disabled-placeholder-opacity,
|
|
879
|
+
opacity: var(--disabled-placeholder-opacity, 0.8);
|
|
881
880
|
}
|
|
882
881
|
|
|
883
882
|
.selected-item {
|
|
@@ -195,6 +195,7 @@ export type AppViewerContext = {
|
|
|
195
195
|
validateAll?: () => void;
|
|
196
196
|
clearFiles?: () => void;
|
|
197
197
|
showToast?: (message: string, error?: boolean) => void;
|
|
198
|
+
recompute?: () => void;
|
|
198
199
|
}>>;
|
|
199
200
|
hoverStore: Writable<string | undefined>;
|
|
200
201
|
allIdsInPath: Writable<string[]>;
|
|
@@ -202,6 +203,8 @@ export type AppViewerContext = {
|
|
|
202
203
|
cssEditorOpen: Writable<boolean>;
|
|
203
204
|
previewTheme: Writable<string | undefined>;
|
|
204
205
|
debuggingComponents: Writable<Record<string, number>>;
|
|
206
|
+
replaceStateFn?: ((url: string) => void) | undefined;
|
|
207
|
+
gotoFn?: ((url: string, opt?: Record<string, any> | undefined) => void) | undefined;
|
|
205
208
|
};
|
|
206
209
|
export type AppEditorContext = {
|
|
207
210
|
yTop: Writable<number>;
|
|
@@ -102,10 +102,10 @@ function kindToBadgeColor(kind) {
|
|
|
102
102
|
</Cell>
|
|
103
103
|
<Cell>
|
|
104
104
|
<div class="flex flex-row gap-2 items-center">
|
|
105
|
-
<div class="whitespace-nowrap overflow-x-auto no-scrollbar w-
|
|
105
|
+
<div class="whitespace-nowrap overflow-x-auto no-scrollbar max-w-52">
|
|
106
106
|
{username}
|
|
107
107
|
{#if parameters && 'end_user' in parameters}
|
|
108
|
-
<span> (
|
|
108
|
+
<span> ({parameters.end_user})</span>
|
|
109
109
|
{/if}
|
|
110
110
|
</div>
|
|
111
111
|
<Button
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const dispatch = createEventDispatcher()
|
|
1
|
+
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
+
import Button from './button/Button.svelte';
|
|
3
|
+
import { X } from 'lucide-svelte';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
export let noBg = false;
|
|
6
|
+
export let small = false;
|
|
7
|
+
const dispatch = createEventDispatcher();
|
|
9
8
|
</script>
|
|
10
9
|
|
|
11
10
|
<Button
|
|
@@ -15,7 +14,8 @@
|
|
|
15
14
|
size="sm"
|
|
16
15
|
color="light"
|
|
17
16
|
btnClasses={twMerge(
|
|
18
|
-
'hover:bg-surface-hover
|
|
19
|
-
noBg ? '' : 'bg-surface-secondary'
|
|
17
|
+
'hover:bg-surface-hover rounded-full p-0',
|
|
18
|
+
noBg ? '' : 'bg-surface-secondary',
|
|
19
|
+
small ? 'w-6 h-6' : 'w-8 h-8'
|
|
20
20
|
)}
|
|
21
21
|
/>
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CloseButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CloseButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CloseButtonSlots */
|
|
4
|
-
export default class CloseButton extends SvelteComponent<{
|
|
5
|
-
noBg?: boolean | undefined;
|
|
6
|
-
}, {
|
|
7
|
-
close: CustomEvent<any>;
|
|
8
|
-
} & {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {}> {
|
|
11
|
-
}
|
|
12
|
-
export type CloseButtonProps = typeof __propDef.props;
|
|
13
|
-
export type CloseButtonEvents = typeof __propDef.events;
|
|
14
|
-
export type CloseButtonSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponent } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
18
4
|
noBg?: boolean | undefined;
|
|
5
|
+
small?: boolean | undefined;
|
|
19
6
|
};
|
|
20
7
|
events: {
|
|
21
8
|
close: CustomEvent<any>;
|
|
@@ -24,4 +11,9 @@ declare const __propDef: {
|
|
|
24
11
|
};
|
|
25
12
|
slots: {};
|
|
26
13
|
};
|
|
14
|
+
export type CloseButtonProps = typeof __propDef.props;
|
|
15
|
+
export type CloseButtonEvents = typeof __propDef.events;
|
|
16
|
+
export type CloseButtonSlots = typeof __propDef.slots;
|
|
17
|
+
export default class CloseButton extends SvelteComponent<CloseButtonProps, CloseButtonEvents, CloseButtonSlots> {
|
|
18
|
+
}
|
|
27
19
|
export {};
|
|
@@ -5,6 +5,7 @@ import DateTimeInput from '../../DateTimeInput.svelte';
|
|
|
5
5
|
export let date;
|
|
6
6
|
export let label;
|
|
7
7
|
export let useDropdown = false;
|
|
8
|
+
export let clearable = false;
|
|
8
9
|
const dispatch = createEventDispatcher();
|
|
9
10
|
let input;
|
|
10
11
|
export let placement = 'top-end';
|
|
@@ -29,12 +30,16 @@ export let placement = 'top-end';
|
|
|
29
30
|
<div class="pb-1 text-sm text-secondary">{label}</div>
|
|
30
31
|
<div class="flex w-full">
|
|
31
32
|
<DateTimeInput
|
|
33
|
+
{clearable}
|
|
32
34
|
{useDropdown}
|
|
33
35
|
value={date}
|
|
34
36
|
on:change={(e) => {
|
|
35
37
|
date = e.detail
|
|
36
38
|
dispatch('change', date)
|
|
37
39
|
}}
|
|
40
|
+
on:clear={() => {
|
|
41
|
+
dispatch('clear')
|
|
42
|
+
}}
|
|
38
43
|
/>
|
|
39
44
|
</div>
|
|
40
45
|
</label>
|
|
@@ -5,10 +5,12 @@ declare const __propDef: {
|
|
|
5
5
|
date: string | undefined;
|
|
6
6
|
label: string;
|
|
7
7
|
useDropdown?: boolean | undefined;
|
|
8
|
+
clearable?: boolean | undefined;
|
|
8
9
|
placement?: Placement | undefined;
|
|
9
10
|
};
|
|
10
11
|
events: {
|
|
11
12
|
change: CustomEvent<any>;
|
|
13
|
+
clear: CustomEvent<any>;
|
|
12
14
|
} & {
|
|
13
15
|
[evt: string]: CustomEvent<any>;
|
|
14
16
|
};
|
|
@@ -3,6 +3,7 @@ import { beforeNavigate, goto } from '$app/navigation';
|
|
|
3
3
|
import Button from '../button/Button.svelte';
|
|
4
4
|
import { cleanValueProperties, orderedJsonStringify } from '../../../utils';
|
|
5
5
|
import { tick } from 'svelte';
|
|
6
|
+
import { page } from '$app/stores';
|
|
6
7
|
export let savedValue = undefined;
|
|
7
8
|
export let modifiedValue = undefined;
|
|
8
9
|
export let diffDrawer = undefined;
|
|
@@ -10,12 +11,17 @@ let bypassBeforeNavigate = false;
|
|
|
10
11
|
let open = false;
|
|
11
12
|
let goingTo = undefined;
|
|
12
13
|
beforeNavigate(async (newNavigationState) => {
|
|
14
|
+
// console.log('beforeNavigate', newNavigationState, bypassBeforeNavigate)
|
|
13
15
|
if (!bypassBeforeNavigate &&
|
|
14
16
|
newNavigationState.to &&
|
|
17
|
+
newNavigationState.to.url != $page.url &&
|
|
15
18
|
newNavigationState.to.url.pathname !== newNavigationState.from?.url.pathname) {
|
|
19
|
+
// console.log('going to', newNavigationState.to.url)
|
|
16
20
|
goingTo = newNavigationState.to.url;
|
|
17
21
|
newNavigationState.cancel();
|
|
18
|
-
|
|
22
|
+
if (newNavigationState.type != 'popstate') {
|
|
23
|
+
await tick(); // make sure saved value is updated when clicking on save draft or deploy
|
|
24
|
+
}
|
|
19
25
|
if (savedValue && modifiedValue) {
|
|
20
26
|
const draftOrDeployed = cleanValueProperties({
|
|
21
27
|
...((savedValue.draft || savedValue) ?? {}),
|
|
@@ -13,6 +13,7 @@ export let iconSize = 36;
|
|
|
13
13
|
export let returnFileNames = false;
|
|
14
14
|
export let submittedText = undefined;
|
|
15
15
|
export let defaultFile = undefined;
|
|
16
|
+
export let disabled = undefined;
|
|
16
17
|
const dispatch = createEventDispatcher();
|
|
17
18
|
let input;
|
|
18
19
|
export let files = undefined;
|
|
@@ -116,6 +117,7 @@ export function clearFiles() {
|
|
|
116
117
|
on:dragover={handleDragOver}
|
|
117
118
|
on:drop={handleDrop}
|
|
118
119
|
{style}
|
|
120
|
+
{disabled}
|
|
119
121
|
>
|
|
120
122
|
{#if !hideIcon && !files}
|
|
121
123
|
<FileUp size={iconSize} class="mb-2" />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { Popover, PopoverButton, PopoverPanel, Transition } from '@rgossiaux/svelte-headlessui';
|
|
2
|
-
import
|
|
2
|
+
import ConditionalPortal from '../drawer/ConditionalPortal.svelte';
|
|
3
3
|
import { createFloatingActions } from 'svelte-floating-ui';
|
|
4
4
|
export let floatingConfig = {
|
|
5
5
|
strategy: 'absolute',
|
|
@@ -8,6 +8,7 @@ export let floatingConfig = {
|
|
|
8
8
|
export let containerClasses = 'rounded-lg shadow-md border p-4 bg-surface';
|
|
9
9
|
const [floatingRef, floatingContent] = createFloatingActions(floatingConfig);
|
|
10
10
|
export let blockOpen = false;
|
|
11
|
+
export let shouldUsePortal = true;
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<Popover on:close class="leading-none">
|
|
@@ -16,7 +17,7 @@ export let blockOpen = false;
|
|
|
16
17
|
<slot name="button" />
|
|
17
18
|
</div>
|
|
18
19
|
</PopoverButton>
|
|
19
|
-
<
|
|
20
|
+
<ConditionalPortal condition={shouldUsePortal}>
|
|
20
21
|
<div use:floatingContent class="z5000">
|
|
21
22
|
<Transition
|
|
22
23
|
show={blockOpen || undefined}
|
|
@@ -34,5 +35,5 @@ export let blockOpen = false;
|
|
|
34
35
|
</PopoverPanel>
|
|
35
36
|
</Transition>
|
|
36
37
|
</div>
|
|
37
|
-
</
|
|
38
|
+
</ConditionalPortal>
|
|
38
39
|
</Popover>
|
|
@@ -24,22 +24,15 @@ export let depth = 0;
|
|
|
24
24
|
export let menuOpen = false;
|
|
25
25
|
const dispatch = createEventDispatcher();
|
|
26
26
|
let appExport;
|
|
27
|
-
let appDeploymentHistory;
|
|
27
|
+
let appDeploymentHistory = undefined;
|
|
28
28
|
async function loadAppJson() {
|
|
29
29
|
appExport.open(app.path);
|
|
30
30
|
}
|
|
31
|
-
async function loadDeployements() {
|
|
32
|
-
const napp = (await AppService.getAppByPath({
|
|
33
|
-
workspace: $workspaceStore,
|
|
34
|
-
path: app.path
|
|
35
|
-
}));
|
|
36
|
-
appDeploymentHistory.open(napp.path);
|
|
37
|
-
}
|
|
38
31
|
</script>
|
|
39
32
|
|
|
40
33
|
{#if menuOpen}
|
|
41
34
|
<AppJsonEditor on:change bind:this={appExport} />
|
|
42
|
-
<AppDeploymentHistory bind:this={appDeploymentHistory} />
|
|
35
|
+
<AppDeploymentHistory bind:this={appDeploymentHistory} appPath={app.path} />
|
|
43
36
|
{/if}
|
|
44
37
|
|
|
45
38
|
<Row
|
|
@@ -166,7 +159,7 @@ async function loadDeployements() {
|
|
|
166
159
|
{
|
|
167
160
|
displayName: 'Deployments',
|
|
168
161
|
icon: History,
|
|
169
|
-
action: () =>
|
|
162
|
+
action: () => appDeploymentHistory?.open(),
|
|
170
163
|
hide: $userStore?.operator
|
|
171
164
|
},
|
|
172
165
|
{
|
|
@@ -11,7 +11,8 @@ import Row from './Row.svelte';
|
|
|
11
11
|
import DraftBadge from '../../DraftBadge.svelte';
|
|
12
12
|
import { sendUserToast } from '../../../toast';
|
|
13
13
|
import { DELETE, copyToClipboard, isOwner } from '../../../utils';
|
|
14
|
-
import { Pen, GitFork, Trash, List, FileUp, Globe, Calendar, Share, Archive, Clipboard, Eye } from 'lucide-svelte';
|
|
14
|
+
import { Pen, GitFork, Trash, List, FileUp, Globe, Calendar, Share, Archive, Clipboard, Eye, HistoryIcon } from 'lucide-svelte';
|
|
15
|
+
import FlowHistory from '../../flows/FlowHistory.svelte';
|
|
15
16
|
export let flow;
|
|
16
17
|
export let marked;
|
|
17
18
|
export let starred;
|
|
@@ -48,10 +49,12 @@ async function deleteFlow(path) {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
let scheduleEditor;
|
|
52
|
+
let flowHistory;
|
|
51
53
|
</script>
|
|
52
54
|
|
|
53
55
|
{#if menuOpen}
|
|
54
56
|
<ScheduleEditor on:update={() => goto('/schedules')} bind:this={scheduleEditor} />
|
|
57
|
+
<FlowHistory bind:this={flowHistory} path={flow.path} />
|
|
55
58
|
{/if}
|
|
56
59
|
|
|
57
60
|
<Row
|
|
@@ -176,6 +179,14 @@ let scheduleEditor;
|
|
|
176
179
|
disabled: archived,
|
|
177
180
|
hide: $userStore?.operator
|
|
178
181
|
},
|
|
182
|
+
{
|
|
183
|
+
displayName: 'Deployments',
|
|
184
|
+
icon: HistoryIcon,
|
|
185
|
+
action: () => {
|
|
186
|
+
flowHistory.open()
|
|
187
|
+
},
|
|
188
|
+
hide: $userStore?.operator
|
|
189
|
+
},
|
|
179
190
|
{
|
|
180
191
|
displayName: 'Schedule',
|
|
181
192
|
icon: Calendar,
|
|
@@ -44,7 +44,7 @@ async function generateIteratorExpr() {
|
|
|
44
44
|
flow_input: pickableProperties?.flow_input
|
|
45
45
|
};
|
|
46
46
|
const user = `I'm building a workflow which is a DAG of script steps.
|
|
47
|
-
The current step is ${selectedId} and represents a for-loop. You can find the details of all the steps below:
|
|
47
|
+
The current step is ${$selectedId} and represents a for-loop. You can find the details of all the steps below:
|
|
48
48
|
${flowDetails}
|
|
49
49
|
Determine the iterator expression to pass either from the previous results or the flow inputs. Here's a summary of the available data:
|
|
50
50
|
<available>
|
|
@@ -35,7 +35,7 @@ async function generatePredicate() {
|
|
|
35
35
|
flow_input: pickableProperties?.flow_input
|
|
36
36
|
};
|
|
37
37
|
const user = `I'm building a workflow which is a DAG of script steps.
|
|
38
|
-
The current step is ${selectedId} and is a branching step (if-else).
|
|
38
|
+
The current step is ${$selectedId} and is a branching step (if-else).
|
|
39
39
|
The user wants to generate a predicate for the branching condition.
|
|
40
40
|
Here's the user's request: ${instructions}
|
|
41
41
|
You can find the details of all the steps below:
|
|
@@ -68,16 +68,21 @@ async function generateStepInput() {
|
|
|
68
68
|
results: pickableProperties?.priorIds,
|
|
69
69
|
flow_input: pickableProperties?.flow_input
|
|
70
70
|
};
|
|
71
|
+
const isInsideLoop = availableData.flow_input && 'iter' in availableData.flow_input;
|
|
71
72
|
const user = `I'm building a workflow which is a DAG of script steps.
|
|
72
|
-
The current step is ${selectedId}, you can find the details for the step and previous ones below:
|
|
73
|
+
The current step is ${$selectedId}, you can find the details for the step and previous ones below:
|
|
73
74
|
${flowDetails}
|
|
74
75
|
Determine for the input "${argName}", what to pass either from the previous results or the flow inputs.
|
|
75
76
|
All possibles inputs either start with results. or flow_input. and are followed by the key of the input.
|
|
76
|
-
|
|
77
|
+
${isInsideLoop
|
|
78
|
+
? 'As the step is in a loop, the iterator value is accessible as flow_input.iter.value.'
|
|
79
|
+
: 'As the step is not in a loop, flow_input.iter.value is not available.'}
|
|
77
80
|
Here's a summary of the available data:
|
|
78
81
|
<available>
|
|
79
82
|
${YAML.stringify(availableData)}</available>
|
|
80
|
-
|
|
83
|
+
${isInsideLoop
|
|
84
|
+
? 'Favor results and flow_input.iter.value over flow inputs.'
|
|
85
|
+
: 'Favor results over flow inputs'}
|
|
81
86
|
If none of the available results are appropriate, are already used or are more appropriate for other inputs, you can also imagine new flow_input properties which we will create programmatically based on what you provide.
|
|
82
87
|
Reply with the most probable answer, do not explain or discuss.
|
|
83
88
|
Use javascript object dot notation to access the properties.
|
|
@@ -42,13 +42,16 @@ async function generateStepInputs() {
|
|
|
42
42
|
results: pickableProperties?.priorIds,
|
|
43
43
|
flow_input: pickableProperties?.flow_input
|
|
44
44
|
};
|
|
45
|
+
const isInsideLoop = availableData.flow_input && 'iter' in availableData.flow_input;
|
|
45
46
|
const user = `I'm building a workflow which is a DAG of script steps.
|
|
46
|
-
The current step is ${selectedId}, you can find the details for the step and previous ones below:
|
|
47
|
+
The current step is ${$selectedId}, you can find the details for the step and previous ones below:
|
|
47
48
|
${flowDetails}
|
|
48
49
|
|
|
49
50
|
Determine for all the inputs "${argNames.join('", "')}", what to pass either from the previous results of the flow inputs.
|
|
50
51
|
All possibles inputs either start with results. or flow_input. and are followed by the key of the input.
|
|
51
|
-
|
|
52
|
+
${isInsideLoop
|
|
53
|
+
? 'As the step is in a loop, the iterator value is accessible as flow_input.iter.value.'
|
|
54
|
+
: 'As the step is not in a loop, flow_input.iter.value is not available.'}
|
|
52
55
|
Here's a summary of the available data:
|
|
53
56
|
<available>
|
|
54
57
|
${YAML.stringify(availableData)}</available>
|
|
@@ -14,11 +14,42 @@ import ClipboardPanel from './ClipboardPanel.svelte';
|
|
|
14
14
|
import { copyToClipboard, generateRandomString } from '../../utils';
|
|
15
15
|
import HighlightTheme from '../HighlightTheme.svelte';
|
|
16
16
|
let userSettings;
|
|
17
|
-
export let webhooks;
|
|
18
17
|
export let token;
|
|
19
18
|
export let args;
|
|
20
19
|
export let scopes = [];
|
|
21
20
|
export let isFlow = false;
|
|
21
|
+
export let hash = undefined;
|
|
22
|
+
export let path;
|
|
23
|
+
let webhooks;
|
|
24
|
+
$: webhooks = isFlow ? computeFlowWebhooks(path) : computeScriptWebhooks(hash, path);
|
|
25
|
+
function computeScriptWebhooks(hash, path) {
|
|
26
|
+
let base = `${$page.url.origin}/api/w/${$workspaceStore}/jobs/`;
|
|
27
|
+
return {
|
|
28
|
+
async: {
|
|
29
|
+
hash: `${base}run/h/${hash}`,
|
|
30
|
+
path: `${base}run/p/${path}`
|
|
31
|
+
},
|
|
32
|
+
sync: {
|
|
33
|
+
hash: `${base}run_wait_result/h/${hash}`,
|
|
34
|
+
path: `${base}run_wait_result/p/${path}`,
|
|
35
|
+
get_path: `${base}run_wait_result/p/${path}`
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function computeFlowWebhooks(path) {
|
|
40
|
+
let base = `${$page.url.origin}/api/w/${$workspaceStore}/jobs/`;
|
|
41
|
+
let urlAsync = `${base}run/f/${path}`;
|
|
42
|
+
let urlSync = `${base}run_wait_result/f/${path}`;
|
|
43
|
+
return {
|
|
44
|
+
async: {
|
|
45
|
+
path: urlAsync
|
|
46
|
+
},
|
|
47
|
+
sync: {
|
|
48
|
+
path: urlSync,
|
|
49
|
+
get_path: urlSync
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
22
53
|
let webhookType = DEFAULT_WEBHOOK_TYPE;
|
|
23
54
|
let requestType = isFlow ? 'path' : 'path';
|
|
24
55
|
let tokenType = 'headers';
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
webhooks: {
|
|
5
|
-
async: {
|
|
6
|
-
hash?: string;
|
|
7
|
-
path: string;
|
|
8
|
-
};
|
|
9
|
-
sync: {
|
|
10
|
-
hash?: string;
|
|
11
|
-
path: string;
|
|
12
|
-
get_path?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
4
|
token: string;
|
|
16
5
|
args: any;
|
|
17
6
|
scopes?: string[] | undefined;
|
|
18
7
|
isFlow?: boolean | undefined;
|
|
8
|
+
hash?: string | undefined;
|
|
9
|
+
path: string;
|
|
19
10
|
};
|
|
20
11
|
events: {
|
|
21
12
|
[evt: string]: CustomEvent<any>;
|