@knime/jsonforms 0.1.4

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE +710 -0
  3. package/README.md +125 -0
  4. package/dist/AnyOfTwinlist-GJ6LGkM1.js +17 -0
  5. package/dist/ArrayLayout-CbpSgf0X.js +487 -0
  6. package/dist/ButtonControl-CVu36jz8.js +127 -0
  7. package/dist/CheckboxControl-DYFLb-qW.js +50 -0
  8. package/dist/Checkboxes-DlhdiWWA.js +103 -0
  9. package/dist/CheckboxesControl-DYV72Aua.js +39 -0
  10. package/dist/ColumnFilter-BbweAsmq.js +17 -0
  11. package/dist/ColumnSelect-aw7cYcWC.js +60 -0
  12. package/dist/ComboBoxControl-BqVUWz4q.js +600 -0
  13. package/dist/CredentialsControl-Ci6ZEuKM.js +20 -0
  14. package/dist/CredentialsControlBase-CxYOD3ne.js +110 -0
  15. package/dist/DateControl-ZyQ_vmOW.js +30 -0
  16. package/dist/DateTimeControl-anye7xvC.js +4 -0
  17. package/dist/DropdownControl-JX1LF5Tk.js +4 -0
  18. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-B5dPfH3x.js +171 -0
  19. package/dist/DynamicValuesControl-CFubOaRb.js +127 -0
  20. package/dist/FileChooserControl-Cf_UaWqV.js +605 -0
  21. package/dist/FileExplorerTab-Ba76jD3y.js +3951 -0
  22. package/dist/HorizontalLayout-5irQmhXp.js +39 -0
  23. package/dist/IntegerControl-CqHJWRgn.js +13 -0
  24. package/dist/IntervalControl-BUhs5_lc.js +549 -0
  25. package/dist/LayoutComponentWrapper-CDw9BDq5.js +36 -0
  26. package/dist/LegacyCredentialsControl-DxRZcRVo.js +62 -0
  27. package/dist/LocalFileChooserControl-DxSeiKxg.js +57 -0
  28. package/dist/MenuItems.vue_vue_type_style_index_0_lang-qMVpH9oC.js +464 -0
  29. package/dist/MultiselectListBox-C4ZnJvJJ.js +579 -0
  30. package/dist/NameFilter-D6EI_V08.js +17 -0
  31. package/dist/NodeDialog.vue.d.ts +8 -0
  32. package/dist/NumberControl-DLo0LCsi.js +13 -0
  33. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B69hrnY1.js +43 -0
  34. package/dist/NumberInput-BdL-jZ-i.js +219 -0
  35. package/dist/OneOfDropdown-BmbbuaZk.js +15 -0
  36. package/dist/RadioControl-GbwpOdAy.js +13 -0
  37. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BlImm9is.js +128 -0
  38. package/dist/RichTextControl-CGY3rdM7.js +16895 -0
  39. package/dist/SectionLayout-CqSFyj1K.js +54 -0
  40. package/dist/SimpleButtonControl-BgOrTGEP.js +59 -0
  41. package/dist/SimpleTwinlistControl-ByOlLGIN.js +68 -0
  42. package/dist/SortListControl-Dege54Dj.js +316 -0
  43. package/dist/TextAreaControl-CKviHabr.js +111 -0
  44. package/dist/TextControl-CPL48j4B.js +49 -0
  45. package/dist/TimeControl-CGsLRgR3.js +842 -0
  46. package/dist/TwinlistControl-C4XaH_Xc.js +587 -0
  47. package/dist/TwinlistLoadingInfo-CFlSBQXn.js +1057 -0
  48. package/dist/ValueSwitch-B9oWSkM_.js +138 -0
  49. package/dist/ValueSwitchControl-4ODpL58f.js +13 -0
  50. package/dist/VennDiagramLayout-CabCs-fX.js +104 -0
  51. package/dist/VerticalLayout-D5HeZyKY.js +39 -0
  52. package/dist/VerticalLayoutBase-C0PZ-y5d.js +20 -0
  53. package/dist/arrow-next-CvdR0-WC.js +17 -0
  54. package/dist/arrow-up-Dsq3EgtE.js +30 -0
  55. package/dist/createMissingItem-B00Kg95q.js +4 -0
  56. package/dist/floating-ui.vue.esm-CIFBDytk.js +94 -0
  57. package/dist/getFlattenedSettings-D64OwqpI.js +7 -0
  58. package/dist/index-ZDm2GXeD.js +32714 -0
  59. package/dist/index.d.ts +3 -0
  60. package/dist/knime-jsonforms.js +5 -0
  61. package/dist/layoutComponents/Form.vue.d.ts +2 -0
  62. package/dist/link-BA69Hfx6.js +17 -0
  63. package/dist/loading/LoadingDialog.vue.d.ts +2 -0
  64. package/dist/navigator-BYUFe-z3.js +8 -0
  65. package/dist/style.css +1 -0
  66. package/dist/useHideOnNull-CCfNP3O7.js +42 -0
  67. package/package.json +74 -0
@@ -0,0 +1,605 @@
1
+ import { defineComponent as S, openBlock as r, createElementBlock as _, createElementVNode as c, normalizeClass as Q, renderSlot as Y, resolveComponent as ee, createBlock as w, withCtx as U, Fragment as P, renderList as te, resolveDynamicComponent as oe, createCommentVNode as x, createTextVNode as ae, toDisplayString as R, computed as C, ref as k, onMounted as L, watch as I, unref as d, createStaticVNode as se, createVNode as V, toRef as N, isRef as le } from "vue";
2
+ import { _ as $, a1 as F, a2 as ne, I as z, E as re, g as ie, r as de, a as ue, L as pe } from "./index-ZDm2GXeD.js";
3
+ import { u as ce, g as j, a as me, b as ve, F as fe, c as he, d as be, e as ge, _ as Ce } from "./FileExplorerTab-Ba76jD3y.js";
4
+ import { L as _e } from "./link-BA69Hfx6.js";
5
+ import { N as ye } from "./NumberInput-BdL-jZ-i.js";
6
+ const we = 5;
7
+ let A, O, E;
8
+ const Ve = S({
9
+ name: "Carousel",
10
+ props: {
11
+ tabindex: {
12
+ type: Number,
13
+ default: null
14
+ }
15
+ },
16
+ data() {
17
+ return {
18
+ isMouseDown: !1,
19
+ wasDragged: !1
20
+ };
21
+ },
22
+ /**
23
+ * following methods allow dragging via mouse
24
+ */
25
+ methods: {
26
+ onMouseDown(e) {
27
+ E = this.$refs.carousel, this.isMouseDown = !0, this.wasDragged = !1, A = e.pageX, O = E.scrollLeft;
28
+ },
29
+ onMouseEnd(e) {
30
+ this.wasDragged && e.preventDefault(), this.isMouseDown = !1;
31
+ },
32
+ onMouseMove(e) {
33
+ if (!this.isMouseDown)
34
+ return;
35
+ e.preventDefault();
36
+ const o = e.pageX - A;
37
+ (this.wasDragged || Math.abs(o) > we) && (this.wasDragged = !0, E.scrollLeft = O - o);
38
+ },
39
+ onDragStart(e) {
40
+ e.preventDefault();
41
+ }
42
+ }
43
+ }), Me = { class: "shadow-wrapper" }, Se = ["tabindex"];
44
+ function $e(e, t, o, u, i, f) {
45
+ return r(), _("div", Me, [
46
+ c("div", {
47
+ ref: "carousel",
48
+ class: Q(["carousel", { "is-mouse-down": e.isMouseDown }]),
49
+ tabindex: e.tabindex,
50
+ onMousedown: t[0] || (t[0] = (...s) => e.onMouseDown && e.onMouseDown(...s)),
51
+ onMousemove: t[1] || (t[1] = (...s) => e.onMouseMove && e.onMouseMove(...s)),
52
+ onMouseup: t[2] || (t[2] = (...s) => e.onMouseEnd && e.onMouseEnd(...s)),
53
+ onClickCapture: t[3] || (t[3] = (...s) => e.onMouseEnd && e.onMouseEnd(...s)),
54
+ onMouseleave: t[4] || (t[4] = (...s) => e.onMouseEnd && e.onMouseEnd(...s)),
55
+ onDragstart: t[5] || (t[5] = (...s) => e.onDragStart && e.onDragStart(...s))
56
+ }, [
57
+ Y(e.$slots, "default", {}, void 0, !0)
58
+ ], 42, Se)
59
+ ]);
60
+ }
61
+ const ke = /* @__PURE__ */ $(Ve, [["render", $e], ["__scopeId", "data-v-3b9d085c"]]), Te = {
62
+ name: "TabBar",
63
+ components: {
64
+ Carousel: ke
65
+ },
66
+ props: {
67
+ /**
68
+ * Make the whole tab bar read-only
69
+ */
70
+ disabled: {
71
+ type: Boolean,
72
+ default: !1
73
+ },
74
+ /**
75
+ * Selected value. Should be one of the value attributes in the `possibleValues` prop.
76
+ */
77
+ modelValue: {
78
+ type: String,
79
+ default: ""
80
+ },
81
+ /**
82
+ * Name of the form elements. This is useful when using the tab bar inside a <form>.
83
+ * Defaults to `value`.
84
+ * If you have multiple tab bars on one page, make sure to include them in separate forms or use unique `name`
85
+ * properties. Otherwise the browser will not allow to select more than one tab in total.
86
+ */
87
+ name: {
88
+ type: String,
89
+ default: "value"
90
+ },
91
+ /**
92
+ * @example
93
+ [{
94
+ value: 'all',
95
+ label: 'All',
96
+ icon: null,
97
+ title: 'everything',
98
+ disabled: false
99
+ }, {
100
+ value: 'nodes',
101
+ label: 'Nodes',
102
+ icon: NodeIcon,
103
+ title: 'Nodes!',
104
+ disabled: true
105
+ }, {
106
+ value: 'workflows',
107
+ label: 'Workflows',
108
+ icon: WorkflowIcon,
109
+ disabled: true
110
+ }]
111
+ */
112
+ possibleValues: {
113
+ type: Array,
114
+ default: () => [],
115
+ validator(e = []) {
116
+ return Array.isArray(e) ? e.every((t) => t.value) : !1;
117
+ }
118
+ }
119
+ },
120
+ emits: ["update:modelValue"],
121
+ created() {
122
+ const e = this.possibleValues.filter((o) => !o.disabled);
123
+ let t = e.find((o) => o.value === this.modelValue);
124
+ if (t) {
125
+ consola.trace("TabBar: Initial tab set to", t);
126
+ return;
127
+ }
128
+ t = e[0] ?? { value: null }, consola.trace("TabBar: Setting initial tab to", t), this.$emit("update:modelValue", t.value);
129
+ },
130
+ methods: {
131
+ onChange(e) {
132
+ consola.trace("TabBar value changed to", e), this.$emit("update:modelValue", e);
133
+ }
134
+ }
135
+ }, De = { class: "tab-bar" }, Ue = { class: "overflow" }, Fe = ["title"], Ee = ["name", "value", "disabled", "checked", "onChange"];
136
+ function xe(e, t, o, u, i, f) {
137
+ const s = ee("Carousel");
138
+ return r(), w(s, { tabindex: -1 }, {
139
+ default: U(() => [
140
+ c("div", De, [
141
+ c("div", Ue, [
142
+ (r(!0), _(P, null, te(o.possibleValues, (l) => (r(), _("label", {
143
+ key: l.value,
144
+ title: l.title
145
+ }, [
146
+ c("input", {
147
+ name: o.name,
148
+ value: l.value,
149
+ disabled: o.disabled || l.disabled,
150
+ type: "radio",
151
+ checked: l.value === o.modelValue,
152
+ onChange: (v) => f.onChange(l.value)
153
+ }, null, 40, Ee),
154
+ c("span", null, [
155
+ l.icon ? (r(), w(oe(l.icon), { key: 0 })) : x("", !0),
156
+ ae(" " + R(l.label), 1)
157
+ ])
158
+ ], 8, Fe))), 128))
159
+ ])
160
+ ])
161
+ ]),
162
+ _: 1
163
+ });
164
+ }
165
+ const Le = /* @__PURE__ */ $(Te, [["render", xe], ["__scopeId", "data-v-796a1ee0"]]), Ie = {
166
+ xmlns: "http://www.w3.org/2000/svg",
167
+ fill: "none",
168
+ stroke: "#000",
169
+ "stroke-linejoin": "round",
170
+ viewBox: "0 0 32 32"
171
+ }, Be = /* @__PURE__ */ c("path", { d: "M13.2 6.2c-3.8 2.1-5.1 7-3 10.8s7 5.1 10.8 3l4.4-2.6-7.8-13.7zm6.9 1.9 5.7-3.2m-2.9 8.2 5.7-3.2M10.2 17c-1.9 1.1-7.3 1.8-5.1 5.9s-1.7 5.4-1.7 5.4" }, null, -1), Ne = [
172
+ Be
173
+ ];
174
+ function Ae(e, t) {
175
+ return r(), _("svg", Ie, [...Ne]);
176
+ }
177
+ const Oe = { render: Ae }, W = (e, t, o) => ({ onPathUpdate: (s) => {
178
+ const l = o.value.fileSystemSpecifier;
179
+ t(
180
+ F(e.value, {
181
+ path: s,
182
+ ...l ? { context: { fsSpecifier: l } } : {}
183
+ })
184
+ );
185
+ }, onTimeoutUpdate: (s) => {
186
+ t(F(e.value, { timeout: s }));
187
+ }, onFsCategoryUpdate: (s) => {
188
+ t(F(e.value, { fsCategory: s }));
189
+ } }), H = /^[A-Za-z0-9]+:\/\//, X = "knime://knime.space/", Z = "knime://knime.workflow.data/", Pe = [
190
+ ["relative-to-current-hubspace", X],
191
+ ["relative-to-embedded-data", Z]
192
+ ], Re = /* @__PURE__ */ S({
193
+ __name: "FSLocationTextControl",
194
+ props: {
195
+ modelValue: {},
196
+ disabled: { type: Boolean },
197
+ isLocal: { type: Boolean },
198
+ portIndex: {},
199
+ fileSystemSpecifier: {}
200
+ },
201
+ emits: ["update:modelValue"],
202
+ setup(e, { emit: t }) {
203
+ const o = e, u = t, i = C(() => typeof o.portIndex < "u"), { getFilePath: f } = ce({
204
+ filteredExtensions: k([]),
205
+ // only relevant for browsing
206
+ appendedExtension: k(null),
207
+ // We do not wish to append anything here, since the user should be able to manually access any file
208
+ isWriter: k(!1),
209
+ // only relevant for browsing
210
+ backendType: C(
211
+ () => j(o.modelValue.fsCategory, o.portIndex)
212
+ )
213
+ }), s = async (a) => {
214
+ var y;
215
+ if (!i.value && a.fsCategory === "relative-to-current-hubspace")
216
+ return X + a.path;
217
+ if (!i.value && a.fsCategory === "relative-to-embedded-data")
218
+ return Z + a.path;
219
+ if (!i.value && a.fsCategory === "CUSTOM_URL")
220
+ return a.path;
221
+ if (!i.value && a.fsCategory === "LOCAL") {
222
+ const { path: M, errorMessage: b } = await f(null, a.path);
223
+ return b ? a.path : M || "";
224
+ }
225
+ return i.value && a.fsCategory === "CONNECTED" ? a.path : ((y = a.context) == null ? void 0 : y.fsToString) ?? "";
226
+ }, l = k(null), v = k("");
227
+ L(() => {
228
+ m();
229
+ });
230
+ const m = async () => {
231
+ v.value = await s(o.modelValue);
232
+ };
233
+ I(
234
+ () => o.modelValue,
235
+ () => {
236
+ var a;
237
+ ne() !== ((a = l.value) == null ? void 0 : a.$refs.input) && m();
238
+ }
239
+ );
240
+ const h = (a) => {
241
+ if (i.value)
242
+ return {
243
+ fsCategory: "CONNECTED",
244
+ path: a,
245
+ timeout: o.modelValue.timeout,
246
+ context: {
247
+ fsToString: "",
248
+ // won't be used in case of isConnected = true
249
+ fsSpecifier: o.fileSystemSpecifier
250
+ }
251
+ };
252
+ for (const [M, b] of Pe)
253
+ if (a.startsWith(b))
254
+ return {
255
+ fsCategory: M,
256
+ path: a.replace(b, ""),
257
+ timeout: o.modelValue.timeout
258
+ };
259
+ const y = o.isLocal ? "LOCAL" : "relative-to-current-hubspace";
260
+ return {
261
+ fsCategory: H.test(a) ? "CUSTOM_URL" : y,
262
+ path: a,
263
+ timeout: o.modelValue.timeout
264
+ };
265
+ }, p = (a) => {
266
+ v.value = a, u("update:modelValue", h(a));
267
+ };
268
+ return (a, y) => (r(), w(d(z), {
269
+ ref_key: "inputField",
270
+ ref: l,
271
+ "model-value": v.value,
272
+ disabled: a.disabled,
273
+ compact: "",
274
+ "onUpdate:modelValue": p,
275
+ onFocusout: m
276
+ }, null, 8, ["model-value", "disabled"]));
277
+ }
278
+ }), ze = {
279
+ xmlns: "http://www.w3.org/2000/svg",
280
+ fill: "none",
281
+ stroke: "#000",
282
+ viewBox: "0 0 32 32"
283
+ }, je = /* @__PURE__ */ c("path", {
284
+ "stroke-linejoin": "round",
285
+ "stroke-miterlimit": "10",
286
+ d: "M29.804 19.5h-27m21.5 8h-16.1m4.8 0v-4.3m7.2 0v4.3m-15.9-4.3h24c.8 0 1.5-.7 1.5-1.5V5.1c0-.8-.7-1.5-1.5-1.5h-24c-.8 0-1.5.7-1.5 1.5v16.6c0 .8.6 1.5 1.5 1.5Z"
287
+ }, null, -1), We = [
288
+ je
289
+ ];
290
+ function He(e, t) {
291
+ return r(), _("svg", ze, [...We]);
292
+ }
293
+ const Xe = { render: He }, Ze = {
294
+ xmlns: "http://www.w3.org/2000/svg",
295
+ fill: "none",
296
+ stroke: "#000",
297
+ viewBox: "0 0 32 32"
298
+ }, Ke = /* @__PURE__ */ se('<path stroke-linejoin="round" stroke-miterlimit="10" d="M2.963 21.916V5.075h9.051l4.613 6.001h13.298v15.608h-5.418"></path><path stroke-linejoin="round" stroke-miterlimit="10" d="M29.925 11.076V7.075H13.548"></path><path stroke-width=".8" d="M12.016 13.54 22.27 30.73H1.763z"></path><path stroke-width=".8" d="m10.785 16.852 9.504 11.092-14.778 2.181z"></path><path stroke-width=".8" d="m10.364 20.335 6.864 4.85-8.26 4.045z"></path>', 5), qe = [
299
+ Ke
300
+ ];
301
+ function Ge(e, t) {
302
+ return r(), _("svg", Ze, [...qe]);
303
+ }
304
+ const Je = { render: Ge }, Qe = {
305
+ xmlns: "http://www.w3.org/2000/svg",
306
+ fill: "none",
307
+ stroke: "#000",
308
+ "stroke-linejoin": "round",
309
+ viewBox: "0 0 32 32"
310
+ }, Ye = /* @__PURE__ */ c("path", { d: "M16.224 6.514c-5.239-.02-9.503 4.21-9.523 9.449s4.21 9.503 9.449 9.523l6.113-.053.073-18.896zm6.089 6.055 7.873.031m-7.9 6.878 7.873.031M6.701 15.963l-4.887.035m13.041-3.249L18.106 16l-3.251 3.251M18.106 16h-7.175" }, null, -1), et = [
311
+ Ye
312
+ ];
313
+ function tt(e, t) {
314
+ return r(), _("svg", Qe, [...et]);
315
+ }
316
+ const ot = { render: tt }, at = { class: "vertical" }, st = /* @__PURE__ */ S({
317
+ __name: "ConnectionPreventsTab",
318
+ props: {
319
+ browseAction: {}
320
+ },
321
+ setup(e) {
322
+ return (t, o) => (r(), _("div", at, [
323
+ V(d(Oe), { class: "icon" }),
324
+ c("span", null, "Remove the file system input port in order to " + R(t.browseAction) + ".", 1)
325
+ ]));
326
+ }
327
+ }), lt = /* @__PURE__ */ $(st, [["__scopeId", "data-v-b16f8d24"]]), nt = {
328
+ xmlns: "http://www.w3.org/2000/svg",
329
+ fill: "none",
330
+ stroke: "#000",
331
+ viewBox: "0 0 32 32"
332
+ }, rt = /* @__PURE__ */ c("path", { d: "m16.654 2.75 15.03 24H1.625z" }, null, -1), it = /* @__PURE__ */ c("path", { d: "m14.427 6.533 14.767 16.72L6.34 26.463z" }, null, -1), dt = /* @__PURE__ */ c("path", { d: "m13.433 10.958 11.87 8.287-14.077 6.564z" }, null, -1), ut = [
333
+ rt,
334
+ it,
335
+ dt
336
+ ];
337
+ function pt(e, t) {
338
+ return r(), _("svg", nt, [...ut]);
339
+ }
340
+ const ct = { render: pt }, mt = /* @__PURE__ */ S({
341
+ __name: "CustomUrlFileChooser",
342
+ props: {
343
+ disabled: { type: Boolean, default: !1 },
344
+ modelValue: {},
345
+ id: {},
346
+ urlErrorMessage: { default: null }
347
+ },
348
+ emits: ["update:path", "update:timeout"],
349
+ setup(e) {
350
+ return (t, o) => (r(), _(P, null, [
351
+ V(d(z), {
352
+ id: t.id,
353
+ disabled: t.disabled,
354
+ "model-value": t.modelValue.path,
355
+ placeholder: "URL",
356
+ "onUpdate:modelValue": o[0] || (o[0] = (u) => t.$emit("update:path", u))
357
+ }, null, 8, ["id", "disabled", "model-value"]),
358
+ t.urlErrorMessage ? (r(), w(re, {
359
+ key: 0,
360
+ style: { display: "unset" },
361
+ errors: [{ message: t.urlErrorMessage }]
362
+ }, null, 8, ["errors"])) : x("", !0),
363
+ V(d(ie), {
364
+ class: "timeout",
365
+ text: "Timeout"
366
+ }, {
367
+ default: U(({ labelForId: u }) => [
368
+ V(d(ye), {
369
+ id: u,
370
+ type: "integer",
371
+ min: 0,
372
+ disabled: t.disabled,
373
+ "model-value": t.modelValue.timeout,
374
+ "onUpdate:modelValue": o[1] || (o[1] = (i) => t.$emit("update:timeout", i))
375
+ }, null, 8, ["id", "disabled", "model-value"])
376
+ ]),
377
+ _: 1
378
+ })
379
+ ], 64));
380
+ }
381
+ }), vt = /* @__PURE__ */ $(mt, [["__scopeId", "data-v-2b43a5f4"]]), ft = /* @__PURE__ */ S({
382
+ __name: "UrlTab",
383
+ props: {
384
+ modelValue: {},
385
+ id: {}
386
+ },
387
+ emits: ["update:path", "update:timeout"],
388
+ setup(e, { emit: t }) {
389
+ const o = e, u = t, { text: i, disabled: f, onApply: s } = me();
390
+ L(() => {
391
+ i.value = "Set Url", s.value = () => Promise.resolve();
392
+ });
393
+ const l = C(
394
+ () => H.test(o.modelValue.path)
395
+ );
396
+ I(
397
+ () => l.value,
398
+ (m) => {
399
+ f.value = !m;
400
+ },
401
+ { immediate: !0 }
402
+ );
403
+ const v = C(
404
+ () => l.value ? null : 'The url needs to start with a scheme (e.g. "https://")'
405
+ );
406
+ return (m, h) => (r(), w(vt, {
407
+ id: m.id,
408
+ "model-value": m.modelValue,
409
+ "url-error-message": v.value,
410
+ "onUpdate:path": h[0] || (h[0] = (p) => u("update:path", p)),
411
+ "onUpdate:timeout": h[1] || (h[1] = (p) => u("update:timeout", p))
412
+ }, null, 8, ["id", "model-value", "url-error-message"]));
413
+ }
414
+ }), ht = { class: "flex" }, bt = { class: "flex-grow" }, gt = /* @__PURE__ */ S({
415
+ __name: "SideDrawerContent",
416
+ props: {
417
+ modelValue: {},
418
+ disabled: { type: Boolean },
419
+ id: {},
420
+ options: { default: () => ({}) }
421
+ },
422
+ emits: ["update:modelValue"],
423
+ setup(e, { emit: t }) {
424
+ const o = e, u = t, i = N(o, "options"), { onFsCategoryUpdate: f, onPathUpdate: s, onTimeoutUpdate: l } = W(
425
+ N(o, "modelValue"),
426
+ (g) => {
427
+ u("update:modelValue", g);
428
+ },
429
+ i
430
+ ), {
431
+ filteredExtensions: v,
432
+ appendedExtension: m,
433
+ isWriter: h,
434
+ isLocal: p,
435
+ isLoaded: a,
436
+ spacePath: y,
437
+ mountId: M,
438
+ isConnected: b,
439
+ portFileSystemName: n,
440
+ portIndex: T
441
+ } = ve(i), D = p.value ? [
442
+ {
443
+ value: "LOCAL",
444
+ label: "Local File System",
445
+ icon: Xe
446
+ }
447
+ ] : [], K = [
448
+ ...b.value ? [
449
+ {
450
+ value: "CONNECTED",
451
+ label: n.value,
452
+ icon: ot
453
+ }
454
+ ] : [],
455
+ ...D,
456
+ {
457
+ value: "relative-to-current-hubspace",
458
+ label: M.value,
459
+ icon: p.value ? Je : ct
460
+ },
461
+ {
462
+ value: "relative-to-embedded-data",
463
+ label: "Embedded Data",
464
+ icon: fe
465
+ },
466
+ {
467
+ value: "CUSTOM_URL",
468
+ label: "URL",
469
+ icon: _e
470
+ }
471
+ ], q = C(
472
+ () => j(o.modelValue.fsCategory, T.value)
473
+ ), G = C(() => o.modelValue.fsCategory === "relative-to-current-hubspace" ? y.value : o.modelValue.fsCategory === "relative-to-embedded-data" ? "Data" : null), J = {
474
+ "relative-to-current-hubspace": "browse the current space",
475
+ "relative-to-embedded-data": "browse the embedded data",
476
+ CUSTOM_URL: "use a URL to read files",
477
+ LOCAL: "browse the local file system"
478
+ };
479
+ return (g, wt) => (r(), _("div", ht, [
480
+ V(d(Le), {
481
+ "possible-values": K,
482
+ "model-value": g.modelValue.fsCategory,
483
+ "onUpdate:modelValue": d(f)
484
+ }, null, 8, ["model-value", "onUpdate:modelValue"]),
485
+ c("div", bt, [
486
+ d(b) && g.modelValue.fsCategory !== "CONNECTED" ? (r(), w(lt, {
487
+ key: 0,
488
+ "browse-action": J[g.modelValue.fsCategory]
489
+ }, null, 8, ["browse-action"])) : g.modelValue.fsCategory === "CUSTOM_URL" ? (r(), w(ft, {
490
+ key: 1,
491
+ id: g.id,
492
+ "model-value": g.modelValue,
493
+ disabled: g.disabled,
494
+ "onUpdate:path": d(s),
495
+ "onUpdate:timeout": d(l)
496
+ }, null, 8, ["id", "model-value", "disabled", "onUpdate:path", "onUpdate:timeout"])) : d(a) ? (r(), w(he, {
497
+ key: 2,
498
+ id: g.id,
499
+ "filtered-extensions": d(v),
500
+ "appended-extension": d(m),
501
+ "is-writer": d(h),
502
+ "backend-type": q.value,
503
+ "initial-file-path": g.modelValue.path,
504
+ "breadcrumb-root": G.value,
505
+ onChooseFile: d(s)
506
+ }, null, 8, ["id", "filtered-extensions", "appended-extension", "is-writer", "backend-type", "initial-file-path", "breadcrumb-root", "onChooseFile"])) : x("", !0)
507
+ ])
508
+ ]));
509
+ }
510
+ }), Ct = /* @__PURE__ */ $(gt, [["__scopeId", "data-v-c645ae14"]]), _t = { class: "flex-row" }, yt = /* @__PURE__ */ S({
511
+ __name: "FileChooserControl",
512
+ props: de(),
513
+ setup(e) {
514
+ const t = e, {
515
+ control: o,
516
+ onChange: u,
517
+ disabled: i,
518
+ flowSettings: f
519
+ } = ue({
520
+ props: t
521
+ }), s = C(
522
+ () => {
523
+ var n;
524
+ return i.value || ((n = o.value.uischema.options) == null ? void 0 : n.fileSystemConnectionMissing);
525
+ }
526
+ ), l = C(() => o.value.uischema.options), { validCategories: v } = be(l), m = () => ({
527
+ path: "",
528
+ timeout: 1e4,
529
+ fsCategory: v.value[0],
530
+ context: {
531
+ fsSpecifier: l.value.fileSystemSpecifier
532
+ }
533
+ }), h = C(() => {
534
+ var n;
535
+ return ((n = o.value.data) == null ? void 0 : n.path) ?? m();
536
+ }), p = (n) => {
537
+ u({ path: n });
538
+ }, a = C(
539
+ () => {
540
+ var n;
541
+ return !!((n = f.value) != null && n.controllingFlowVariableName);
542
+ }
543
+ );
544
+ I(
545
+ () => a.value,
546
+ (n) => {
547
+ n || p(m());
548
+ }
549
+ );
550
+ const { onFsCategoryUpdate: y } = W(
551
+ C(() => {
552
+ var n;
553
+ return (n = o.value.data) == null ? void 0 : n.path;
554
+ }),
555
+ p,
556
+ l
557
+ );
558
+ L(() => {
559
+ var n;
560
+ !a.value && !v.value.includes((n = o.value.data) == null ? void 0 : n.path.fsCategory) && y(v.value[0]);
561
+ });
562
+ const { onApply: M, sideDrawerValue: b } = ge({
563
+ onChange: p,
564
+ initialValue: h
565
+ });
566
+ return (n, T) => (r(), w(pe, {
567
+ control: d(o),
568
+ onControllingFlowVariableSet: p
569
+ }, {
570
+ default: U(({ labelForId: D }) => [
571
+ c("div", _t, [
572
+ V(Re, {
573
+ id: D,
574
+ class: "flex-grow",
575
+ "model-value": h.value,
576
+ disabled: s.value,
577
+ "is-local": l.value.isLocal,
578
+ "port-index": l.value.portIndex,
579
+ "file-system-specifier": l.value.fileSystemSpecifier,
580
+ "onUpdate:modelValue": p
581
+ }, null, 8, ["id", "model-value", "disabled", "is-local", "port-index", "file-system-specifier"]),
582
+ V(Ce, {
583
+ disabled: s.value,
584
+ onApply: d(M)
585
+ }, {
586
+ default: U(() => [
587
+ V(Ct, {
588
+ id: D,
589
+ modelValue: d(b),
590
+ "onUpdate:modelValue": T[0] || (T[0] = (B) => le(b) ? b.value = B : null),
591
+ disabled: s.value,
592
+ options: l.value
593
+ }, null, 8, ["id", "modelValue", "disabled", "options"])
594
+ ]),
595
+ _: 2
596
+ }, 1032, ["disabled", "onApply"])
597
+ ])
598
+ ]),
599
+ _: 1
600
+ }, 8, ["control"]));
601
+ }
602
+ }), Tt = /* @__PURE__ */ $(yt, [["__scopeId", "data-v-b6ff852c"]]);
603
+ export {
604
+ Tt as default
605
+ };