windmill-components 1.511.0 → 1.511.1

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.
@@ -510,7 +510,7 @@ onDestroy(() => {
510
510
  onchange={(x) => fileChanged(x, (val) => (value[i] = val))}
511
511
  multiple={false}
512
512
  />
513
- {:else if itemsType?.type == 'object' && itemsType?.resourceType === undefined && itemsType?.properties === undefined}
513
+ {:else if itemsType?.type == 'object' && itemsType?.resourceType === undefined && itemsType?.properties === undefined && !(format?.startsWith('resource-') && resourceTypes?.includes(format.split('-')[1]))}
514
514
  {#await import('./JsonEditor.svelte')}
515
515
  <Loader2 class="animate-spin" />
516
516
  {:then Module}
@@ -536,10 +536,16 @@ onDestroy(() => {
536
536
  enum_={itemsType?.enum ?? []}
537
537
  enumLabels={extra['enumLabels']}
538
538
  />
539
- {:else if itemsType?.type == 'resource' && itemsType?.resourceType && resourceTypes?.includes(itemsType.resourceType)}
539
+ {:else if (itemsType?.type == 'resource' && itemsType?.resourceType && resourceTypes?.includes(itemsType.resourceType)) || (format?.startsWith('resource-') && resourceTypes?.includes(format.split('-')[1]))}
540
+ {@const resourceFormat =
541
+ itemsType?.type == 'resource' &&
542
+ itemsType.resourceType &&
543
+ resourceTypes.includes(itemsType.resourceType)
544
+ ? `resource-${itemsType.resourceType}`
545
+ : format!}
540
546
  <ObjectResourceInput
541
547
  bind:value={value[i]}
542
- format={'resource-' + itemsType?.resourceType}
548
+ format={resourceFormat}
543
549
  defaultValue={undefined}
544
550
  />
545
551
  {:else if itemsType?.type == 'resource'}
@@ -607,7 +613,11 @@ onDestroy(() => {
607
613
  if (itemsType?.type == 'number') {
608
614
  value = value.concat(0)
609
615
  } else if (
610
- itemsType?.type == 'object' ||
616
+ (itemsType?.type == 'object' &&
617
+ !(
618
+ format?.startsWith('resource-') &&
619
+ resourceTypes?.includes(format.split('-')[1])
620
+ )) ||
611
621
  (itemsType?.type == 'resource' &&
612
622
  !(
613
623
  itemsType?.resourceType && resourceTypes?.includes(itemsType?.resourceType)
@@ -494,6 +494,7 @@ export function flowHasChanged() {
494
494
  bind:rightColumnSelect
495
495
  bind:isOwner
496
496
  {render}
497
+ customUi={customUi}
497
498
  />
498
499
  {:else}
499
500
  <div class="italic text-tertiary h-full grow"> Flow status will be displayed here </div>
@@ -20,6 +20,9 @@ interface Props {
20
20
  render?: boolean;
21
21
  onJobDone?: () => void;
22
22
  upToId?: string | undefined;
23
+ customUi?: {
24
+ tagLabel?: string | undefined;
25
+ };
23
26
  }
24
27
  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> {
25
28
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
@@ -3,7 +3,7 @@ import FlowStatusViewerInner from './FlowStatusViewerInner.svelte';
3
3
  import { createEventDispatcher, setContext, untrack } from 'svelte';
4
4
  import { isOwner as loadIsOwner } from '../utils';
5
5
  import { userStore, workspaceStore } from '../stores';
6
- let { jobId, initialJob = undefined, workspaceId = undefined, flowStateStore = writable({}), selectedJobStep = $bindable(undefined), hideFlowResult = false, hideTimeline = false, hideDownloadInGraph = false, hideNodeDefinition = false, hideJobId = false, hideDownloadLogs = false, rightColumnSelect = $bindable('timeline'), isOwner = $bindable(false), wideResults = false, localModuleStates = $bindable(writable({})), localDurationStatuses = $bindable(writable({})), job = $bindable(undefined), render = true, suspendStatus = $bindable(writable({})) } = $props();
6
+ let { jobId, initialJob = undefined, workspaceId = undefined, flowStateStore = writable({}), selectedJobStep = $bindable(undefined), hideFlowResult = false, hideTimeline = false, hideDownloadInGraph = false, hideNodeDefinition = false, hideJobId = false, hideDownloadLogs = false, rightColumnSelect = $bindable('timeline'), isOwner = $bindable(false), wideResults = false, localModuleStates = $bindable(writable({})), localDurationStatuses = $bindable(writable({})), job = $bindable(undefined), render = true, suspendStatus = $bindable(writable({})), customUi } = $props();
7
7
  let lastJobId = jobId;
8
8
  let retryStatus = writable({});
9
9
  setContext('FlowStatusViewer', {
@@ -61,4 +61,5 @@ $effect.pre(() => {
61
61
  {wideResults}
62
62
  bind:rightColumnSelect
63
63
  {render}
64
+ {customUi}
64
65
  />
@@ -22,6 +22,9 @@ interface Props {
22
22
  job?: Job | undefined;
23
23
  render?: boolean;
24
24
  suspendStatus?: any;
25
+ customUi?: {
26
+ tagLabel?: string | undefined;
27
+ };
25
28
  }
26
29
  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> {
27
30
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
@@ -27,7 +27,7 @@ import { createState } from '../svelte5Utils.svelte';
27
27
  import JobLoader from './JobLoader.svelte';
28
28
  const dispatch = createEventDispatcher();
29
29
  let { flowStateStore, retryStatus, suspendStatus, hideDownloadInGraph, hideTimeline, hideNodeDefinition, hideDownloadLogs, hideJobId } = getContext('FlowStatusViewer');
30
- let { jobId, initialJob = undefined, workspaceId = undefined, flowJobIds = undefined, innerModule = undefined, globalRefreshes = $bindable({}), render = true, isOwner = false, selectedNode = $bindable(undefined), globalModuleStates, globalDurationStatuses, childFlow = false, isSubflow = false, reducedPolling = false, wideResults = false, hideFlowResult = false, workspace = $workspaceStore, prefix = undefined, subflowParentsGlobalModuleStates = [], subflowParentsDurationStatuses = [], isForloopSelected = false, parentRecursiveRefresh = $bindable({}), job = $bindable(undefined), rightColumnSelect = $bindable('timeline'), localModuleStates = writable({}), localDurationStatuses = writable({}) } = $props();
30
+ let { jobId, initialJob = undefined, workspaceId = undefined, flowJobIds = undefined, innerModule = undefined, globalRefreshes = $bindable({}), render = true, isOwner = false, selectedNode = $bindable(undefined), globalModuleStates, globalDurationStatuses, childFlow = false, isSubflow = false, reducedPolling = false, wideResults = false, hideFlowResult = false, workspace = $workspaceStore, prefix = undefined, subflowParentsGlobalModuleStates = [], subflowParentsDurationStatuses = [], isForloopSelected = false, parentRecursiveRefresh = $bindable({}), job = $bindable(undefined), rightColumnSelect = $bindable('timeline'), localModuleStates = writable({}), localDurationStatuses = writable({}), customUi } = $props();
31
31
  let recursiveRefresh = $state({});
32
32
  // Add support for the input args assets shown as an asset node
33
33
  const _flowGraphAssetsCtx = getContext('FlowGraphAssetContext');
@@ -1113,6 +1113,7 @@ let selected = $derived(isListJob ? 'sequence' : 'graph');
1113
1113
 
1114
1114
  {#if selectedNode == 'end'}
1115
1115
  <FlowJobResult
1116
+ tagLabel={customUi?.tagLabel}
1116
1117
  workspaceId={job?.workspace_id}
1117
1118
  jobId={job?.id}
1118
1119
  filename={job.id}
@@ -1188,6 +1189,7 @@ let selected = $derived(isListJob ? 'sequence' : 'graph');
1188
1189
  </div>
1189
1190
  {/if}
1190
1191
  <FlowJobResult
1192
+ tagLabel={customUi?.tagLabel}
1191
1193
  workspaceId={job?.workspace_id}
1192
1194
  jobId={node.job_id}
1193
1195
  noBorder
@@ -35,6 +35,9 @@ interface Props {
35
35
  rightColumnSelect?: 'timeline' | 'node_status' | 'node_definition' | 'user_states';
36
36
  localModuleStates?: Writable<Record<string, GraphModuleState>>;
37
37
  localDurationStatuses?: Writable<Record<string, DurationStatus>>;
38
+ customUi?: {
39
+ tagLabel?: string | undefined;
40
+ };
38
41
  }
39
42
  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> {
40
43
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
@@ -41,6 +41,7 @@ export type FlowBuilderWhitelabelCustomUi = {
41
41
  downloadLogs?: boolean;
42
42
  tagSelectPlaceholder?: string;
43
43
  tagSelectNoLabel?: boolean;
44
+ tagLabel?: string;
44
45
  };
45
46
  export type DisplayResultUi = {
46
47
  disableAiFix?: boolean;
@@ -796,6 +796,7 @@ let rawScriptLang = $derived(flowModule.value.type == 'rawscript' ? flowModule.v
796
796
  disableMock={preprocessorModule || failureModule}
797
797
  disableHistory={failureModule}
798
798
  loadingJob={stepHistoryLoader?.stepStates[flowModule.id]?.loadingJobs}
799
+ tagLabel={customUi?.tagLabel}
799
800
  />
800
801
  </Pane>
801
802
  {/if}
@@ -21,7 +21,7 @@ export const OpenAPI = {
21
21
  PASSWORD: undefined,
22
22
  TOKEN: undefined,
23
23
  USERNAME: undefined,
24
- VERSION: '1.509.2',
24
+ VERSION: '1.511.0',
25
25
  WITH_CREDENTIALS: false,
26
26
  interceptors: {
27
27
  request: new Interceptors(),
@@ -1743,27 +1743,35 @@ export declare const $MainArgSignature: {
1743
1743
  readonly type: "object";
1744
1744
  readonly properties: {
1745
1745
  readonly object: {
1746
- readonly type: "array";
1747
- readonly items: {
1748
- readonly type: "object";
1749
- readonly properties: {
1750
- readonly key: {
1751
- readonly type: "string";
1752
- };
1753
- readonly typ: {
1754
- readonly oneOf: readonly [{
1755
- readonly type: "string";
1756
- readonly enum: readonly ["float", "int", "bool", "email", "unknown", "bytes", "dict", "datetime", "sql"];
1757
- }, {
1758
- readonly type: "object";
1759
- readonly properties: {
1760
- readonly str: {};
1746
+ readonly type: "object";
1747
+ readonly properties: {
1748
+ readonly name: {
1749
+ readonly type: "string";
1750
+ };
1751
+ readonly props: {
1752
+ readonly type: "array";
1753
+ readonly items: {
1754
+ readonly type: "object";
1755
+ readonly properties: {
1756
+ readonly key: {
1757
+ readonly type: "string";
1758
+ };
1759
+ readonly typ: {
1760
+ readonly oneOf: readonly [{
1761
+ readonly type: "string";
1762
+ readonly enum: readonly ["float", "int", "bool", "email", "unknown", "bytes", "dict", "datetime", "sql"];
1763
+ }, {
1764
+ readonly type: "object";
1765
+ readonly properties: {
1766
+ readonly str: {};
1767
+ };
1768
+ readonly required: readonly ["str"];
1769
+ }];
1761
1770
  };
1762
- readonly required: readonly ["str"];
1763
- }];
1771
+ };
1772
+ readonly required: readonly ["key", "typ"];
1764
1773
  };
1765
1774
  };
1766
- readonly required: readonly ["key", "typ"];
1767
1775
  };
1768
1776
  };
1769
1777
  };
@@ -1782,30 +1782,38 @@ export const $MainArgSignature = {
1782
1782
  type: 'object',
1783
1783
  properties: {
1784
1784
  object: {
1785
- type: 'array',
1786
- items: {
1787
- type: 'object',
1788
- properties: {
1789
- key: {
1790
- type: 'string'
1791
- },
1792
- typ: {
1793
- oneOf: [
1794
- {
1795
- type: 'string',
1796
- enum: ['float', 'int', 'bool', 'email', 'unknown', 'bytes', 'dict', 'datetime', 'sql']
1785
+ type: 'object',
1786
+ properties: {
1787
+ name: {
1788
+ type: 'string'
1789
+ },
1790
+ props: {
1791
+ type: 'array',
1792
+ items: {
1793
+ type: 'object',
1794
+ properties: {
1795
+ key: {
1796
+ type: 'string'
1797
1797
  },
1798
- {
1799
- type: 'object',
1800
- properties: {
1801
- str: {}
1802
- },
1803
- required: ['str']
1798
+ typ: {
1799
+ oneOf: [
1800
+ {
1801
+ type: 'string',
1802
+ enum: ['float', 'int', 'bool', 'email', 'unknown', 'bytes', 'dict', 'datetime', 'sql']
1803
+ },
1804
+ {
1805
+ type: 'object',
1806
+ properties: {
1807
+ str: {}
1808
+ },
1809
+ required: ['str']
1810
+ }
1811
+ ]
1804
1812
  }
1805
- ]
1813
+ },
1814
+ required: ['key', 'typ']
1806
1815
  }
1807
- },
1808
- required: ['key', 'typ']
1816
+ }
1809
1817
  }
1810
1818
  }
1811
1819
  },
@@ -546,12 +546,15 @@ export type MainArgSignature = {
546
546
  } | {
547
547
  str: Array<(string)> | null;
548
548
  } | {
549
- object: Array<{
550
- key: string;
551
- typ: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
552
- str: unknown;
553
- };
554
- }>;
549
+ object: {
550
+ name?: string;
551
+ props?: Array<{
552
+ key: string;
553
+ typ: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
554
+ str: unknown;
555
+ };
556
+ }>;
557
+ };
555
558
  } | {
556
559
  list: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
557
560
  str: unknown;
@@ -3006,6 +3009,10 @@ export type CreateAccountData = {
3006
3009
  * OAuth client secret for resource-level credentials (client_credentials flow only)
3007
3010
  */
3008
3011
  cc_client_secret?: string;
3012
+ /**
3013
+ * OAuth token URL override for resource-level authentication (client_credentials flow only)
3014
+ */
3015
+ cc_token_url?: string;
3009
3016
  };
3010
3017
  workspace: string;
3011
3018
  };
@@ -3028,6 +3035,10 @@ export type ConnectClientCredentialsData = {
3028
3035
  * OAuth client secret for resource-level authentication
3029
3036
  */
3030
3037
  cc_client_secret: string;
3038
+ /**
3039
+ * OAuth token URL override for resource-level authentication
3040
+ */
3041
+ cc_token_url?: string;
3031
3042
  };
3032
3043
  };
3033
3044
  export type ConnectClientCredentialsResponse = TokenResponse;
@@ -9572,6 +9583,10 @@ export type $OpenApiTs = {
9572
9583
  * OAuth client secret for resource-level credentials (client_credentials flow only)
9573
9584
  */
9574
9585
  cc_client_secret?: string;
9586
+ /**
9587
+ * OAuth token URL override for resource-level authentication (client_credentials flow only)
9588
+ */
9589
+ cc_token_url?: string;
9575
9590
  };
9576
9591
  workspace: string;
9577
9592
  };
@@ -9603,6 +9618,10 @@ export type $OpenApiTs = {
9603
9618
  * OAuth client secret for resource-level authentication
9604
9619
  */
9605
9620
  cc_client_secret: string;
9621
+ /**
9622
+ * OAuth token URL override for resource-level authentication
9623
+ */
9624
+ cc_token_url?: string;
9606
9625
  };
9607
9626
  };
9608
9627
  res: {
@@ -3,7 +3,8 @@ export declare function argSigToJsonSchemaType(t: string | {
3
3
  resource: string | null;
4
4
  } | {
5
5
  list: (string | {
6
- object: {
6
+ name?: string;
7
+ props?: {
7
8
  key: string;
8
9
  typ: any;
9
10
  }[];
@@ -11,9 +12,12 @@ export declare function argSigToJsonSchemaType(t: string | {
11
12
  str: any;
12
13
  } | {
13
14
  object: {
14
- key: string;
15
- typ: any;
16
- }[];
15
+ name?: string;
16
+ props?: {
17
+ key: string;
18
+ typ: any;
19
+ }[];
20
+ };
17
21
  } | null;
18
22
  } | {
19
23
  dynselect: string;
@@ -21,9 +25,12 @@ export declare function argSigToJsonSchemaType(t: string | {
21
25
  str: string[] | null;
22
26
  } | {
23
27
  object: {
24
- key: string;
25
- typ: any;
26
- }[];
28
+ name?: string;
29
+ props?: {
30
+ key: string;
31
+ typ: any;
32
+ }[];
33
+ };
27
34
  } | {
28
35
  oneof: {
29
36
  label: string;
@@ -56,9 +56,12 @@ export function argSigToJsonSchemaType(t, oldS) {
56
56
  }
57
57
  else if (typeof t !== 'string' && `object` in t) {
58
58
  newS.type = 'object';
59
- if (t.object) {
59
+ if (t.object.name) {
60
+ newS.format = `resource-${t.object.name}`;
61
+ }
62
+ if (t.object.props) {
60
63
  const properties = {};
61
- for (const prop of t.object) {
64
+ for (const prop of t.object.props) {
62
65
  if (oldS.properties && prop.key in oldS.properties) {
63
66
  properties[prop.key] = oldS.properties[prop.key];
64
67
  }
@@ -118,17 +121,21 @@ export function argSigToJsonSchemaType(t, oldS) {
118
121
  };
119
122
  newS.originalType = 'resource[]';
120
123
  }
121
- else if (t.list &&
122
- typeof t.list == 'object' &&
123
- 'object' in t.list &&
124
- t.list.object &&
125
- t.list.object.length > 0) {
126
- const properties = {};
127
- for (const prop of t.list.object) {
128
- properties[prop.key] = { description: '', type: '' };
129
- argSigToJsonSchemaType(prop.typ, properties[prop.key]);
124
+ else if (t.list && typeof t.list == 'object' && 'object' in t.list && t.list.object) {
125
+ if (t.list.object.name) {
126
+ newS.format = `resource-${t.list.object.name}`;
127
+ }
128
+ if (t.list.object.props && t.list.object.props.length > 0) {
129
+ const properties = {};
130
+ for (const prop of t.list.object.props) {
131
+ properties[prop.key] = { description: '', type: '' };
132
+ argSigToJsonSchemaType(prop.typ, properties[prop.key]);
133
+ }
134
+ newS.items = { type: 'object', properties: properties };
135
+ }
136
+ else {
137
+ newS.items = { type: 'object' };
130
138
  }
131
- newS.items = { type: 'object', properties: properties };
132
139
  newS.originalType = 'record[]';
133
140
  }
134
141
  else {
@@ -180,12 +187,12 @@ export function argSigToJsonSchemaType(t, oldS) {
180
187
  else if (oldS.items?.type != newS.items?.type) {
181
188
  delete oldS.items;
182
189
  }
190
+ if (oldS.format && !newS.format) {
191
+ oldS.format = undefined;
192
+ }
183
193
  Object.assign(oldS, newS);
184
194
  // if (sameItems && savedItems != undefined && savedItems.enum != undefined) {
185
195
  // sendUserToast(JSON.stringify(savedItems))
186
196
  // oldS.items = savedItems
187
197
  // }
188
- if (oldS.format?.startsWith('resource-') && newS.type != 'object') {
189
- oldS.format = undefined;
190
- }
191
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-components",
3
- "version": "1.511.0",
3
+ "version": "1.511.1",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",
@@ -141,17 +141,17 @@
141
141
  "vscode-languageclient": "~9.0.1",
142
142
  "vscode-uri": "~3.1.0",
143
143
  "vscode-ws-jsonrpc": "~3.4.0",
144
- "windmill-parser-wasm-csharp": "^1.437.1",
145
- "windmill-parser-wasm-go": "^1.429.0",
146
- "windmill-parser-wasm-java": "^1.478.1",
147
- "windmill-parser-wasm-nu": "^1.474.1",
148
- "windmill-parser-wasm-php": "^1.429.0",
149
- "windmill-parser-wasm-py": "^1.510.0",
150
- "windmill-parser-wasm-regex": "^1.510.0",
151
- "windmill-parser-wasm-rust": "^1.429.0",
152
- "windmill-parser-wasm-ts": "^1.510.0",
153
- "windmill-parser-wasm-yaml": "^1.429.0",
154
- "windmill-sql-datatype-parser-wasm": "^1.318.0",
144
+ "windmill-parser-wasm-csharp": "1.510.1",
145
+ "windmill-parser-wasm-go": "1.510.1",
146
+ "windmill-parser-wasm-java": "1.510.1",
147
+ "windmill-parser-wasm-nu": "1.510.1",
148
+ "windmill-parser-wasm-php": "1.510.1",
149
+ "windmill-parser-wasm-py": "1.510.1",
150
+ "windmill-parser-wasm-regex": "1.510.1",
151
+ "windmill-parser-wasm-rust": "1.510.1",
152
+ "windmill-parser-wasm-ts": "1.510.1",
153
+ "windmill-parser-wasm-yaml": "1.510.1",
154
+ "windmill-sql-datatype-parser-wasm": "1.318.0",
155
155
  "xterm": "^5.3.0",
156
156
  "xterm-readline": "^1.1.2",
157
157
  "y-monaco": "^0.1.4",