@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,600 @@
1
+ import { resolveComponent as O, openBlock as c, createElementBlock as v, normalizeClass as g, withKeys as p, withModifiers as r, renderSlot as k, createElementVNode as h, toDisplayString as B, createVNode as V, withDirectives as F, normalizeStyle as P, Fragment as x, renderList as M, createBlock as S, withCtx as w, createTextVNode as R, vShow as T, defineComponent as $, vModelText as U, computed as I, ref as D, onMounted as L, unref as b, createCommentVNode as H } from "vue";
2
+ import { _ as N, m as K, X as j, Y as W, F as X, C as G, r as Y, a as q, V as J, p as Q, L as Z } from "./index-ZDm2GXeD.js";
3
+ import { c as _ } from "./createMissingItem-B00Kg95q.js";
4
+ const C = 1, ee = 28.5, te = 8, se = {
5
+ name: "Multiselect",
6
+ components: {
7
+ Checkbox: K,
8
+ DropdownIcon: j
9
+ },
10
+ props: {
11
+ /**
12
+ * List of possible values. Each item must have an `id` and a `text` property. Optionally it can have:
13
+ * - `selectedText` property that is used for displaying the list of selected items.
14
+ * If it is omitted, `text` is used instead.
15
+ * - `disabled` property for disabling the corresponding checkbox so that the user can not change the value.
16
+ * @example
17
+ * [{
18
+ * id: 'pdf',
19
+ * text: 'PDF'
20
+ * }, {
21
+ * id: 'XLS',
22
+ * text: 'Excel',
23
+ * selectedText: '.xls'
24
+ * }]
25
+ */
26
+ possibleValues: {
27
+ type: Array,
28
+ default: () => [],
29
+ validator(e) {
30
+ return Array.isArray(e) ? e.every(
31
+ (t) => t.hasOwnProperty("id") && t.hasOwnProperty("text")
32
+ ) : !1;
33
+ }
34
+ },
35
+ /**
36
+ * selected value (which is a list of ids of entries)
37
+ */
38
+ modelValue: {
39
+ type: Array,
40
+ default: () => []
41
+ },
42
+ /**
43
+ * placeholder to be displayed when nothing is selected
44
+ */
45
+ placeholder: {
46
+ type: String,
47
+ default: null
48
+ },
49
+ isValid: {
50
+ type: Boolean,
51
+ default: !0
52
+ },
53
+ /**
54
+ * Seperator which seperates selected items in the summary.
55
+ */
56
+ separator: {
57
+ type: String,
58
+ default: ", "
59
+ },
60
+ /**
61
+ * Max number of items that will be displayed in the summary.
62
+ */
63
+ summaryMaxItemCount: {
64
+ type: Number,
65
+ default: 1 / 0
66
+ },
67
+ /**
68
+ * Name that will be used if summaryMaxItemCount is exceeded.
69
+ */
70
+ summaryName: {
71
+ type: String,
72
+ default: null
73
+ },
74
+ /**
75
+ * Use a custom list box (slot: 'listBox') that replaces the standard Multiselect element containing the button
76
+ * to toggle the dropdown and the summary
77
+ */
78
+ useCustomListBox: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ /**
83
+ * Limit the number of visible options (more options are reachable by scrolling)
84
+ */
85
+ sizeVisibleOptions: {
86
+ type: Number,
87
+ default: 0,
88
+ validator(e) {
89
+ return e >= 0;
90
+ }
91
+ },
92
+ /**
93
+ * Focus element of the parent for which the options don't get closed when it is focussed.
94
+ */
95
+ parentFocusElement: {
96
+ type: Object,
97
+ default: () => ({})
98
+ },
99
+ /**
100
+ * The element of the parent to refocus when the options get closed and using a custom listbox.
101
+ */
102
+ parentRefocusElementOnClose: {
103
+ type: Object,
104
+ default: () => ({})
105
+ },
106
+ /**
107
+ * Close the dropdown when a value was selected.
108
+ */
109
+ closeDropdownOnSelection: {
110
+ type: Boolean,
111
+ default: !1
112
+ },
113
+ compact: {
114
+ type: Boolean,
115
+ default: !1
116
+ }
117
+ },
118
+ emits: ["update:modelValue", "focusOutside"],
119
+ setup() {
120
+ return { activeElement: W() };
121
+ },
122
+ data() {
123
+ return {
124
+ collapsed: !0,
125
+ focusOptions: []
126
+ };
127
+ },
128
+ computed: {
129
+ focusElements() {
130
+ return [...this.focusOptions, this.parentFocusElement];
131
+ },
132
+ summary() {
133
+ return this.modelValue.length === 0 ? this.placeholder : this.modelValue.length > this.summaryMaxItemCount ? `${this.modelValue.length} ${this.summaryName}` : this.possibleValues.filter(({ id: e }) => this.modelValue.indexOf(e) > -1).map(({ text: e, selectedText: t = e }) => t).join(this.separator);
134
+ },
135
+ showOptions() {
136
+ return !this.collapsed && this.possibleValues.length > 0;
137
+ },
138
+ useSpecificOptionsHeight() {
139
+ return this.sizeVisibleOptions > 0 && this.sizeVisibleOptions < this.possibleValues.length;
140
+ },
141
+ optionsHeight() {
142
+ return this.useSpecificOptionsHeight ? {
143
+ "max-height": `${this.sizeVisibleOptions * ee + te}px`
144
+ } : {};
145
+ },
146
+ refocusElementOnClose() {
147
+ return this.useCustomListBox ? this.parentRefocusElementOnClose : this.$refs.toggle;
148
+ }
149
+ },
150
+ mounted() {
151
+ this.updateFocusOptions();
152
+ },
153
+ methods: {
154
+ emitNewSelection(e) {
155
+ this.$emit("update:modelValue", e);
156
+ },
157
+ /**
158
+ * Returns the next HTML Element from the list of items. If the current focused Element is at the top or bottom
159
+ * of the list, this method will return the opposite end.
160
+ *
161
+ * @param {Number} changeInd - the positive or negative index shift for the next Element (usually 1 || -1).
162
+ * @returns {Element} - the next option Element in the list of options.
163
+ */
164
+ getNextElement(e) {
165
+ return this.focusOptions[this.focusOptions.indexOf(this.activeElement) + e] || (e < 0 ? this.focusOptions[this.focusOptions.length - 1] : this.focusOptions[0]);
166
+ },
167
+ onUpdateModelValue(e, t) {
168
+ t ? this.modelValue.indexOf(e) === -1 && this.emitNewSelection([...this.modelValue, e]) : this.emitNewSelection(this.modelValue.filter((i) => i !== e)), this.closeDropdownOnSelection && this.closeOptions();
169
+ },
170
+ toggle() {
171
+ this.collapsed = !this.collapsed, setTimeout(() => {
172
+ var e;
173
+ (e = this.$refs.toggle) == null || e.focus();
174
+ }, C);
175
+ },
176
+ isChecked(e) {
177
+ return this.modelValue.includes(e);
178
+ },
179
+ /**
180
+ * Handle closing the options.
181
+ *
182
+ * @param {Boolean} [refocusToggle = true] - if the toggle button / parentRefocusElement should be re-focused
183
+ * after closing.
184
+ * @return {undefined}
185
+ */
186
+ closeOptions(e = !0) {
187
+ this.collapsed = !0, e && setTimeout(() => {
188
+ this.refocusElementOnClose.focus();
189
+ }, C);
190
+ },
191
+ /**
192
+ * Handle closing the options if necessary and stopping the event if so.
193
+ *
194
+ * @param {KeyboardEvent} event - the keyboard "Escape" event triggering the close.
195
+ * @return {undefined}
196
+ */
197
+ closeOptionsAndStop(e) {
198
+ this.collapsed || (this.closeOptions(), e.stopPropagation(), e.preventDefault());
199
+ },
200
+ /* Handle arrow key "up" events. */
201
+ onUp() {
202
+ document.activeElement !== this.$refs.toggle && this.getNextElement(-1).focus();
203
+ },
204
+ /* Handle arrow key "down" events. */
205
+ onDown() {
206
+ this.getNextElement(1).focus();
207
+ },
208
+ /* Handle focus leaving events.
209
+ *
210
+ * NOTE: focusout bubbles, so we can use this event to close options.
211
+ */
212
+ onFocusOut() {
213
+ setTimeout(() => {
214
+ this.focusElements.includes(document.activeElement) || (this.closeOptions(!1), this.useCustomListBox && this.$emit("focusOutside"));
215
+ }, C);
216
+ },
217
+ /*
218
+ * Manually prevents default event bubbling and propagation for mousedown which can fire blur events that
219
+ * interfere with the refocusing behavior. This allows the timeout to be set extremely low.
220
+ */
221
+ onMousedown(e) {
222
+ e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
223
+ },
224
+ /*
225
+ * Update focus options when possibleValues change to adapt keyboard navigation (e.g using ComboBox.vue)
226
+ * $refs are unordered, suggested solution is to use a data-index
227
+ * https://github.com/vuejs/vue/issues/4952#issuecomment-407550765
228
+ */
229
+ updateFocusOptions() {
230
+ this.$refs.option && (this.focusOptions = this.$refs.option.sort(
231
+ (e, t) => parseInt(e.$el.dataset.index, 10) - parseInt(t.$el.dataset.index, 10)
232
+ ).map((e) => e.$el && e.$el.firstChild));
233
+ }
234
+ }
235
+ }, oe = { key: 1 };
236
+ function le(e, t, i, n, y, l) {
237
+ const d = O("DropdownIcon"), m = O("Checkbox");
238
+ return c(), v("div", {
239
+ ref: "multiselect",
240
+ class: g(["multiselect", { collapsed: y.collapsed, invalid: !i.isValid, compact: i.compact }]),
241
+ onKeydown: [
242
+ t[2] || (t[2] = p((...o) => l.closeOptionsAndStop && l.closeOptionsAndStop(...o), ["esc"])),
243
+ t[3] || (t[3] = p(r((...o) => l.onUp && l.onUp(...o), ["stop", "prevent"]), ["up"])),
244
+ t[4] || (t[4] = p(r((...o) => l.onDown && l.onDown(...o), ["stop", "prevent"]), ["down"]))
245
+ ],
246
+ onFocusout: t[5] || (t[5] = r((...o) => l.onFocusOut && l.onFocusOut(...o), ["stop"])),
247
+ onMousedown: t[6] || (t[6] = (...o) => l.onMousedown && l.onMousedown(...o))
248
+ }, [
249
+ i.useCustomListBox ? k(e.$slots, "listBox", { key: 0 }, void 0, !0) : (c(), v("div", oe, [
250
+ h("div", {
251
+ ref: "toggle",
252
+ role: "button",
253
+ tabindex: "0",
254
+ class: g({ placeholder: !i.modelValue.length }),
255
+ onClick: t[0] || (t[0] = (...o) => l.toggle && l.toggle(...o)),
256
+ onKeydown: t[1] || (t[1] = p(r((...o) => l.toggle && l.toggle(...o), ["prevent"]), ["space"]))
257
+ }, B(l.summary), 35),
258
+ V(d, { class: "icon" })
259
+ ])),
260
+ F(h("div", {
261
+ class: "options",
262
+ style: P(l.optionsHeight)
263
+ }, [
264
+ (c(!0), v(x, null, M(i.possibleValues, (o, s) => (c(), S(m, {
265
+ ref_for: !0,
266
+ ref: "option",
267
+ key: `multiselect-${o.id}`,
268
+ "data-index": s,
269
+ "model-value": l.isChecked(o.id),
270
+ disabled: o.disabled,
271
+ class: "boxes",
272
+ "onUpdate:modelValue": (f) => l.onUpdateModelValue(o.id, f)
273
+ }, {
274
+ default: w(() => [
275
+ R(B(o.text), 1)
276
+ ]),
277
+ _: 2
278
+ }, 1032, ["data-index", "model-value", "disabled", "onUpdate:modelValue"]))), 128)),
279
+ k(e.$slots, "selectAction", {}, void 0, !0)
280
+ ], 4), [
281
+ [T, l.showOptions]
282
+ ])
283
+ ], 34);
284
+ }
285
+ const ie = /* @__PURE__ */ N(se, [["render", le], ["__scopeId", "data-v-e722538a"]]), E = "draft-id-combobox-preview-item", ne = $({
286
+ name: "ComboBox",
287
+ components: {
288
+ Multiselect: ie,
289
+ FunctionButton: X,
290
+ CloseIcon: G
291
+ },
292
+ props: {
293
+ /**
294
+ * List of possible values. Each item must have an `id` and a `text` property. Some optional properties
295
+ * can be used that are specified in Multiselect.vue.
296
+ */
297
+ possibleValues: {
298
+ type: Array,
299
+ default: () => [],
300
+ validator(e) {
301
+ return Array.isArray(e) ? e.every(
302
+ (t) => t.hasOwnProperty("id") && t.hasOwnProperty("text")
303
+ ) : !1;
304
+ }
305
+ },
306
+ /**
307
+ * List of initial selected ids.
308
+ */
309
+ modelValue: {
310
+ type: Array,
311
+ default: () => []
312
+ },
313
+ /**
314
+ * Limit the number of visible options in the dropdown.
315
+ */
316
+ sizeVisibleOptions: {
317
+ type: Number,
318
+ default: 5,
319
+ validator(e) {
320
+ return e >= 0;
321
+ }
322
+ },
323
+ /**
324
+ * Close the dropdown when an entry was selected.
325
+ */
326
+ closeDropdownOnSelection: {
327
+ type: Boolean,
328
+ default: !1
329
+ },
330
+ isValid: {
331
+ type: Boolean,
332
+ default: !0
333
+ },
334
+ /**
335
+ * Allow adding and selecting new tags, not just possible values
336
+ */
337
+ allowNewValues: {
338
+ type: Boolean,
339
+ default: !1
340
+ },
341
+ compact: {
342
+ type: Boolean,
343
+ default: !1
344
+ }
345
+ },
346
+ emits: {
347
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
348
+ "update:modelValue": (e) => !0
349
+ },
350
+ data() {
351
+ return {
352
+ searchValue: "",
353
+ inputOrOptionsFocussed: !1,
354
+ /*
355
+ * Multiselect behavior: options close on clickaway except when focussing specific multiselect elements
356
+ * When the searchInput of this component is focussed then they shouldn't be closed either, which is why
357
+ * it needs to be passed to the Multiselect component.
358
+ */
359
+ focusElement: null,
360
+ refocusElement: null,
361
+ allPossibleItems: [...this.possibleValues]
362
+ };
363
+ },
364
+ computed: {
365
+ trimmedSearchValue() {
366
+ return this.searchValue.trim();
367
+ },
368
+ trimmedLowerCasedSearchValue() {
369
+ return this.trimmedSearchValue.toLowerCase();
370
+ },
371
+ isSearchEmpty() {
372
+ return !this.trimmedSearchValue;
373
+ },
374
+ searchResults() {
375
+ const e = this.allPossibleItems.some(
376
+ ({ id: i, text: n }) => i === this.trimmedSearchValue || n === this.trimmedSearchValue
377
+ ), t = this.allPossibleItems.filter(
378
+ ({ id: i, text: n }) => n.toLowerCase().includes(this.trimmedLowerCasedSearchValue) || i === this.trimmedSearchValue
379
+ );
380
+ return this.allowNewValues && !e && !this.isSearchEmpty ? [
381
+ { id: E, text: `${this.trimmedSearchValue} (new item)` },
382
+ ...t
383
+ ] : t;
384
+ },
385
+ hasSelection() {
386
+ return this.selectedValues.length > 0;
387
+ },
388
+ inputWidth() {
389
+ return this.inputOrOptionsFocussed && this.searchResults.length > 0 ? {} : { width: "0%" };
390
+ },
391
+ selectedValues() {
392
+ return this.modelValue.map(
393
+ (e) => this.allPossibleItems.find((t) => e === t.id) || _(e)
394
+ );
395
+ },
396
+ maxSizeVisibleOptions() {
397
+ return this.searchResults.length < this.sizeVisibleOptions ? this.searchResults.length : this.sizeVisibleOptions;
398
+ }
399
+ },
400
+ created() {
401
+ this.allowNewValues || this.$watch("possibleValues", (e) => {
402
+ this.allPossibleItems = [...e];
403
+ });
404
+ },
405
+ mounted() {
406
+ this.focusElement = this.$refs.searchInput, this.refocusElement = this.$refs.listBox;
407
+ },
408
+ methods: {
409
+ emitNewSelection(e) {
410
+ this.$emit("update:modelValue", e);
411
+ },
412
+ focusInput() {
413
+ this.$refs.searchInput.focus();
414
+ },
415
+ onDown() {
416
+ this.$refs.combobox.onDown();
417
+ },
418
+ onEnter() {
419
+ var e;
420
+ this.isSearchEmpty || typeof ((e = this.searchResults[0]) == null ? void 0 : e.id) > "u" || this.modelValue.includes(this.searchResults[0].id) || (this.updateSelectedIds([...this.modelValue, this.searchResults[0].id]), this.searchValue = "");
421
+ },
422
+ onBackspace() {
423
+ this.searchValue || this.emitNewSelection(this.modelValue.slice(0, -1));
424
+ },
425
+ onFocusOutside() {
426
+ this.inputOrOptionsFocussed = !1, this.searchValue = "";
427
+ },
428
+ onInput() {
429
+ this.$refs.combobox.updateFocusOptions();
430
+ },
431
+ onInputFocus() {
432
+ this.inputOrOptionsFocussed || this.$refs.combobox.toggle(), this.inputOrOptionsFocussed = !0, this.$refs.combobox.updateFocusOptions();
433
+ },
434
+ updateSelectedIds(e) {
435
+ if (!e.includes(E)) {
436
+ this.emitNewSelection(e);
437
+ return;
438
+ }
439
+ const i = {
440
+ id: this.trimmedSearchValue,
441
+ text: this.trimmedSearchValue
442
+ };
443
+ this.allPossibleItems.push(i), this.emitNewSelection(
444
+ e.map((n) => n === E ? i.id : n)
445
+ );
446
+ },
447
+ removeTag(e) {
448
+ this.emitNewSelection(this.modelValue.filter((t) => t !== e)), this.closeOptions();
449
+ },
450
+ removeAllTags() {
451
+ this.emitNewSelection([]), this.closeOptions();
452
+ },
453
+ closeOptionsAndStop(e) {
454
+ this.$refs.combobox.closeOptionsAndStop(e);
455
+ },
456
+ closeOptions() {
457
+ this.$refs.combobox.closeOptions();
458
+ }
459
+ }
460
+ }), ae = ["title"], ue = { class: "icon-right" };
461
+ function re(e, t, i, n, y, l) {
462
+ const d = O("CloseIcon"), m = O("FunctionButton"), o = O("Multiselect");
463
+ return c(), S(o, {
464
+ ref: "combobox",
465
+ "model-value": e.modelValue,
466
+ "possible-values": e.searchResults,
467
+ "use-custom-list-box": "",
468
+ "size-visible-options": e.maxSizeVisibleOptions,
469
+ "parent-focus-element": e.focusElement,
470
+ "parent-refocus-element-on-close": e.refocusElement,
471
+ "close-dropdown-on-selection": e.closeDropdownOnSelection,
472
+ "is-valid": e.isValid,
473
+ compact: e.compact,
474
+ onFocusOutside: e.onFocusOutside,
475
+ "onUpdate:modelValue": e.updateSelectedIds
476
+ }, {
477
+ listBox: w(() => [
478
+ h("div", {
479
+ ref: "listBox",
480
+ class: "summary-input-icon-wrapper",
481
+ tabindex: "0",
482
+ onKeydown: t[8] || (t[8] = p(r((...s) => e.focusInput && e.focusInput(...s), ["prevent", "self"]), ["enter"]))
483
+ }, [
484
+ h("div", {
485
+ class: g([
486
+ "summary-input-wrapper",
487
+ { "with-icon-right": e.hasSelection, compact: e.compact }
488
+ ]),
489
+ onClick: t[7] || (t[7] = r((...s) => e.focusInput && e.focusInput(...s), ["stop"]))
490
+ }, [
491
+ (c(!0), v(x, null, M(e.selectedValues, ({ id: s, text: f, invalid: a }, u) => (c(), v("div", {
492
+ key: `item.id${u}`,
493
+ class: "tag",
494
+ title: f
495
+ }, [
496
+ h("span", {
497
+ class: g(["text", { invalid: a }])
498
+ }, B(f), 3),
499
+ V(m, {
500
+ class: "remove-tag-button",
501
+ compact: e.compact,
502
+ onClick: r((A) => e.removeTag(s), ["stop"])
503
+ }, {
504
+ default: w(() => [
505
+ V(d, { class: "remove-tag-button-icon" })
506
+ ]),
507
+ _: 2
508
+ }, 1032, ["compact", "onClick"])
509
+ ], 8, ae))), 128)),
510
+ F(h("input", {
511
+ ref: "searchInput",
512
+ "onUpdate:modelValue": t[0] || (t[0] = (s) => e.searchValue = s),
513
+ class: "search-input",
514
+ type: "text",
515
+ style: P(e.inputWidth),
516
+ onFocus: t[1] || (t[1] = (...s) => e.onInputFocus && e.onInputFocus(...s)),
517
+ onInput: t[2] || (t[2] = (...s) => e.onInput && e.onInput(...s)),
518
+ onKeydown: [
519
+ t[3] || (t[3] = p(r((...s) => e.onEnter && e.onEnter(...s), ["prevent"]), ["enter"])),
520
+ t[4] || (t[4] = p((...s) => e.onBackspace && e.onBackspace(...s), ["backspace"])),
521
+ t[5] || (t[5] = p(r((...s) => e.onDown && e.onDown(...s), ["stop", "prevent"]), ["down"])),
522
+ t[6] || (t[6] = p((...s) => e.closeOptionsAndStop && e.closeOptionsAndStop(...s), ["esc"]))
523
+ ]
524
+ }, null, 36), [
525
+ [U, e.searchValue]
526
+ ])
527
+ ], 2),
528
+ F(h("div", ue, [
529
+ V(m, {
530
+ ref: "removeAllTags",
531
+ class: "remove-all-tags-button",
532
+ compact: e.compact,
533
+ onClick: r(e.removeAllTags, ["stop"])
534
+ }, {
535
+ default: w(() => [
536
+ V(d)
537
+ ]),
538
+ _: 1
539
+ }, 8, ["compact", "onClick"])
540
+ ], 512), [
541
+ [T, e.hasSelection]
542
+ ])
543
+ ], 544)
544
+ ]),
545
+ _: 1
546
+ }, 8, ["model-value", "possible-values", "size-visible-options", "parent-focus-element", "parent-refocus-element-on-close", "close-dropdown-on-selection", "is-valid", "compact", "onFocusOutside", "onUpdate:modelValue"]);
547
+ }
548
+ const de = /* @__PURE__ */ N(ne, [["render", re], ["__scopeId", "data-v-84cbb077"]]), pe = /* @__PURE__ */ $({
549
+ __name: "ComboBoxControl",
550
+ props: Y(),
551
+ setup(e) {
552
+ const t = e, {
553
+ control: i,
554
+ onChange: n,
555
+ disabled: y
556
+ } = q({ props: t }), l = I(
557
+ () => {
558
+ var a, u;
559
+ return (u = (a = i.value.uischema) == null ? void 0 : a.options) == null ? void 0 : u.choicesProvider;
560
+ }
561
+ ), d = J(
562
+ Q(l, []),
563
+ i.value
564
+ ), m = D([]), o = D(!1);
565
+ L(() => {
566
+ var a, u;
567
+ m.value = i.value.data, l.value || (d.value = (u = (a = i.value.uischema) == null ? void 0 : a.options) == null ? void 0 : u.possibleValues), o.value = !0;
568
+ });
569
+ const s = I(
570
+ () => typeof d.value > "u"
571
+ ), f = I(
572
+ () => {
573
+ var a;
574
+ return y.value || s.value || ((a = d.value) == null ? void 0 : a.length) === 0;
575
+ }
576
+ );
577
+ return (a, u) => (c(), S(Z, {
578
+ control: b(i),
579
+ onControllingFlowVariableSet: b(n)
580
+ }, {
581
+ default: w(({ labelForId: A }) => [
582
+ o.value ? (c(), S(b(de), {
583
+ key: 0,
584
+ id: A,
585
+ "allow-new-values": s.value ? "" : !1,
586
+ "aria-label": b(i).label,
587
+ disabled: f.value,
588
+ "possible-values": s.value ? [] : b(d),
589
+ "model-value": m.value,
590
+ compact: "",
591
+ "onUpdate:modelValue": u[0] || (u[0] = (z) => b(n)(z))
592
+ }, null, 8, ["id", "allow-new-values", "aria-label", "disabled", "possible-values", "model-value"])) : H("", !0)
593
+ ]),
594
+ _: 1
595
+ }, 8, ["control", "onControllingFlowVariableSet"]));
596
+ }
597
+ }), fe = /* @__PURE__ */ N(pe, [["__scopeId", "data-v-83cb973c"]]);
598
+ export {
599
+ fe as default
600
+ };
@@ -0,0 +1,20 @@
1
+ import { defineComponent as l, openBlock as d, createBlock as i, unref as o } from "vue";
2
+ import { r as c, a as p } from "./index-ZDm2GXeD.js";
3
+ import { C as f } from "./CredentialsControlBase-CxYOD3ne.js";
4
+ const h = /* @__PURE__ */ l({
5
+ __name: "CredentialsControl",
6
+ props: c(),
7
+ setup(n) {
8
+ const t = n, { control: e, onChange: r, disabled: a, flowSettings: s } = p({ props: t });
9
+ return (C, m) => (d(), i(f, {
10
+ control: o(e),
11
+ data: o(e).data,
12
+ "flow-settings": o(s),
13
+ disabled: o(a),
14
+ onChange: o(r)
15
+ }, null, 8, ["control", "data", "flow-settings", "disabled", "onChange"]));
16
+ }
17
+ });
18
+ export {
19
+ h as default
20
+ };