@knime/jsonforms 1.6.10 → 1.7.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.
Files changed (117) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/AnyOfTwinlist-D7gkxtYi.js +22 -0
  3. package/dist/{BaseButton-DRXubmlD.js → BaseButton-nH3iSIOK.js} +1 -1
  4. package/dist/{Button-nRJkSaBC.js → Button-DnQZFkaO.js} +2 -2
  5. package/dist/{Checkbox-bWqzeYko.js → Checkbox-DB9YeQa-.js} +1 -1
  6. package/dist/{CheckboxControl-B4kwAvLf.js → CheckboxControl-hkHWMBsv.js} +2 -2
  7. package/dist/{Checkboxes-C0WemzK0.js → Checkboxes-C_qM6Iao.js} +2 -2
  8. package/dist/{CheckboxesControl-BcBsTMGJ.js → CheckboxesControl-DRNda60A.js} +3 -3
  9. package/dist/{ComboBoxControl-Dz4VWUbr.js → ComboBoxControl-Dd0UZdMx.js} +77 -89
  10. package/dist/{DateControl-DvPEzSbD.js → DateControl-BmqofCSf.js} +1 -1
  11. package/dist/{DateTimeControl-Buq_H47Q.js → DateTimeControl-B7uvqC1s.js} +2 -2
  12. package/dist/{DateTimeFormatInput-BLX9j412.js → DateTimeFormatInput-CsEAVqAA.js} +3 -3
  13. package/dist/{DateTimeFormatPickerControl-CQi49UrA.js → DateTimeFormatPickerControl-BK80kZf0.js} +2 -2
  14. package/dist/{DateTimeFormatPickerWithTypeControl-BcK2N4NI.js → DateTimeFormatPickerWithTypeControl-CS8APLBp.js} +3 -3
  15. package/dist/{DateTimeInput-C5Oyw-Bz.js → DateTimeInput-DP2yHD9r.js} +14 -13
  16. package/dist/{Dropdown-CIDjugP6.js → Dropdown-D8qp_4wZ.js} +30 -29
  17. package/dist/DropdownControl-B2fs1yBj.js +84 -0
  18. package/dist/{FunctionButton-6rf73qNS.js → FunctionButton-Bo0NcfGh.js} +2 -2
  19. package/dist/{HorizontalLayout-Bq5hSQkC.js → HorizontalLayout-Bg5vYcO1.js} +1 -1
  20. package/dist/{InputField-BZzeUMVs.js → InputField-DRLCzzDf.js} +1 -1
  21. package/dist/{IntegerControl-DtEJ9jaq.js → IntegerControl-HLRox7w7.js} +1 -1
  22. package/dist/{IntervalControl-uNaB8SlU.js → IntervalControl-D-xUIRW3.js} +4 -4
  23. package/dist/LoadingDropdown-DkxltiwQ.js +40 -0
  24. package/dist/MultimodeTwinlistControl-CV2v4Y5n.js +526 -0
  25. package/dist/{MultiselectListBox-B0o19vqK.js → MultiselectListBox-BFQxtoyR.js} +1 -1
  26. package/dist/{NameFilter-C24OdpHy.js → NameFilter-BxfjNVu-.js} +1 -1
  27. package/dist/{NumberControl-BGSO6wof.js → NumberControl-Df91UAXl.js} +1 -1
  28. package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-B7TqcQCe.js → NumberControlBase.vue_vue_type_script_setup_true_lang-DLqtcp04.js} +2 -2
  29. package/dist/{NumberInput-DCbMtXhN.js → NumberInput-BLlTeOig.js} +1 -1
  30. package/dist/OneOfDropdown-CLPbmMt7.js +34 -0
  31. package/dist/{RadioControl-1ymKFtE9.js → RadioControl-CDi8WbsE.js} +2 -2
  32. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-CplSbUri.js → RadioControlBase.vue_vue_type_script_setup_true_lang-B6clHvd5.js} +3 -3
  33. package/dist/{RichTextControl-IMoFZ4yN.js → RichTextControl-YMNSyY3O.js} +6 -6
  34. package/dist/{SectionHeading-C9ojqc26.js → SectionHeading-D8h1zy67.js} +1 -1
  35. package/dist/{SectionLayout-CG6GUoC4.js → SectionLayout-DBiG5Ubc.js} +3 -3
  36. package/dist/{SettingsSubPanel-D2qmyQRj.js → SettingsSubPanel--LD_hsgG.js} +2 -2
  37. package/dist/{SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js → SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BM4d25sK.js} +439 -442
  38. package/dist/{SettingsSubPanelLayout-C4jPUZqS.js → SettingsSubPanelLayout-By5U2J68.js} +5 -5
  39. package/dist/{SimpleButtonControl-CZXA-sOd.js → SimpleButtonControl-B47jBtrM.js} +6 -6
  40. package/dist/SimpleTwinlistControl-DoRJkKPs.js +22 -0
  41. package/dist/SingleSelectControl-zE9ck9JX.js +58 -0
  42. package/dist/SortListControl-C5DXqqPG.js +372 -0
  43. package/dist/{TextAreaControl-CAj56e3W.js → TextAreaControl-D2-nyO1m.js} +1 -1
  44. package/dist/{TextControl-_Wx3rzZd.js → TextControl-Ss9_5V2f.js} +1 -1
  45. package/dist/{TextControl.vue_vue_type_script_setup_true_lang-BlZ-3BwP.js → TextControl.vue_vue_type_script_setup_true_lang-DaEoFVBw.js} +4 -4
  46. package/dist/{TimeControl-B-xivFCg.js → TimeControl-CblSq-0a.js} +2 -2
  47. package/dist/TwinlistControlBase-Xe8xQAyG.js +40 -0
  48. package/dist/{TwinlistLoadingInfo-BGRl50bt.js → TwinlistLoadingInfo-BHhpo_7N.js} +12 -11
  49. package/dist/TypedNameFilter-N2eeG2VM.js +25 -0
  50. package/dist/{ValueSwitch-ChvWwn2P.js → ValueSwitch-BI5z5U3F.js} +1 -1
  51. package/dist/{ValueSwitchControl-BIi3Dylq.js → ValueSwitchControl-CixwDXQs.js} +1 -1
  52. package/dist/{VerticalLayout-fN3TpOhN.js → VerticalLayout-B8RzC8Vj.js} +2 -2
  53. package/dist/{VerticalLayoutBase-Ci94-Lwd.js → VerticalLayoutBase-Bj_upYbt.js} +1 -1
  54. package/dist/{ZonedDateTimeControl-Cqki5Y3R.js → ZonedDateTimeControl-CZdpjJEK.js} +4 -4
  55. package/dist/_baseEach-FP8ISlsz.js +31 -0
  56. package/dist/_baseIteratee-DhaGkQLM.js +518 -0
  57. package/dist/_getTag-DiktJuv_.js +132 -0
  58. package/dist/index-Blg1O3Fz.js +15 -0
  59. package/dist/isArray-WzO_os3q.js +4 -0
  60. package/dist/isObjectLike-BatpeCIi.js +29 -0
  61. package/dist/isSymbol-C3_SC0Qp.js +8 -0
  62. package/dist/knime-jsonforms.css +1 -1
  63. package/dist/knime-jsonforms.js +8 -8
  64. package/dist/{localTimeUtils-xLrZjUnt.js → localTimeUtils-Dp9bEJDh.js} +1 -1
  65. package/dist/{magic-string.es-lf2rq-mj.js → magic-string.es-CeNBRh1A.js} +1 -1
  66. package/dist/src/constants/inputFormats.d.ts +2 -2
  67. package/dist/src/renderers/defaultRenderers.d.ts +24 -589
  68. package/dist/src/renderers/dropdownRenderer.d.ts +55 -115
  69. package/dist/src/renderers/fallbackRenderers.d.ts +1 -241
  70. package/dist/src/renderers/nameFilterRenderer.d.ts +1 -1
  71. package/dist/src/renderers/singleSelectRenderer.d.ts +8 -0
  72. package/dist/src/renderers/sortListRenderer.d.ts +0 -8
  73. package/dist/src/renderers/twinlistRenderer.d.ts +1 -1
  74. package/dist/src/renderers/typedNameFilterRenderer.d.ts +1 -0
  75. package/dist/src/types/ChoicesUiSchema.d.ts +7 -12
  76. package/dist/src/types/provided.d.ts +0 -2
  77. package/dist/src/uiComponents/DropdownControl.vue.d.ts +2 -86
  78. package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +2 -13
  79. package/dist/src/uiComponents/SingleSelectControl.vue.d.ts +20 -0
  80. package/dist/src/uiComponents/SortListControl.vue.d.ts +4 -4
  81. package/dist/src/uiComponents/composables/usePossibleValues.d.ts +24 -0
  82. package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +1 -1
  83. package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +2 -99
  84. package/dist/src/uiComponents/twinlist/TwinlistControlBase.vue.d.ts +36 -0
  85. package/dist/src/uiComponents/twinlist/{ColumnFilter.vue.d.ts → TypedNameFilter.vue.d.ts} +1 -1
  86. package/dist/src/uiComponents/twinlist/useUnknownValuesInTwinlist.d.ts +1 -1
  87. package/dist/src/utils/index.d.ts +0 -2
  88. package/dist/{svgWithTitle-CS5C7Mz8.js → svgWithTitle-B5FsAPop.js} +1 -1
  89. package/dist/testUtils/component.d.ts +4 -0
  90. package/dist/testing.js +80 -63
  91. package/dist/toString-B9O7P854.js +26 -0
  92. package/dist/{useBuiltinValidations-yPAysvI4.js → useBuiltinValidations-8VwUv3RT.js} +1 -1
  93. package/dist/usePossibleValues-CrNcBbpN.js +26 -0
  94. package/package.json +5 -5
  95. package/dist/AnyOfTwinlist-D6jRLlC9.js +0 -22
  96. package/dist/ColumnFilter-BSW3HQiz.js +0 -24
  97. package/dist/ColumnSelect-BT6NX4nN.js +0 -68
  98. package/dist/DropdownControl-CRr853C_.js +0 -4
  99. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-C56gUC45.js +0 -237
  100. package/dist/OneOfDropdown-oecnOh5j.js +0 -35
  101. package/dist/SimpleTwinlistControl-DQeky-AX.js +0 -50
  102. package/dist/SortListControl-D4yMhrbk.js +0 -366
  103. package/dist/TwinlistControl-BZaEVT9H.js +0 -554
  104. package/dist/_baseAssignValue-BPMLYzDH.js +0 -19
  105. package/dist/_baseEach-B8N_Gx8P.js +0 -31
  106. package/dist/_baseIsEqual-DmkT9Nkc.js +0 -248
  107. package/dist/_baseIteratee-DvBmrhnf.js +0 -104
  108. package/dist/_getTag-DS8v0_uf.js +0 -312
  109. package/dist/getPossibleValuesFromUiSchema-hQj1TCOR.js +0 -39
  110. package/dist/index-hm05O8UX.js +0 -16
  111. package/dist/isSymbol-OFe5xy2f.js +0 -34
  112. package/dist/src/renderers/columnFilterRenderer.d.ts +0 -1
  113. package/dist/src/renderers/columnSelectRenderer.d.ts +0 -265
  114. package/dist/src/uiComponents/ColumnSelect.vue.d.ts +0 -26
  115. package/dist/src/utils/getPossibleValuesFromUiSchema.d.ts +0 -10
  116. package/dist/toString-DkbNkGT4.js +0 -25
  117. /package/dist/src/uiComponents/twinlist/{TwinlistControl.vue.d.ts → MultimodeTwinlistControl.vue.d.ts} +0 -0
@@ -1,237 +0,0 @@
1
- import { defineComponent as x, computed as c, openBlock as y, createBlock as w, unref as h, mergeProps as H, withCtx as b, createCommentVNode as O, ref as N, onMounted as K, onBeforeUnmount as G, normalizeProps as J, createVNode as Q, renderSlot as T } from "vue";
2
- import { _ as X, k as D, u as Y, L as Z, E as j } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
- import { w as ee } from "./getPossibleValuesFromUiSchema-hQj1TCOR.js";
4
- import { u as oe } from "./useHideOnNull-CCfNP3O7.js";
5
- import { D as ne } from "./Dropdown-CIDjugP6.js";
6
- import { L as ae } from "./svgWithTitle-CS5C7Mz8.js";
7
- import { b as te } from "./_baseAssignValue-BPMLYzDH.js";
8
- import { e as le, c as se, t as re, i as ie } from "./_getTag-DS8v0_uf.js";
9
- import { i as B } from "./isObject-B53jY8Qg.js";
10
- import { C as ue } from "./Checkbox-bWqzeYko.js";
11
- var de = Object.prototype, ce = de.hasOwnProperty;
12
- function pe(o, e, l) {
13
- var s = o[e];
14
- (!(ce.call(o, e) && le(s, l)) || l === void 0 && !(e in o)) && te(o, e, l);
15
- }
16
- function me(o, e, l, s) {
17
- if (!B(o))
18
- return o;
19
- e = se(e, o);
20
- for (var u = -1, r = e.length, g = r - 1, d = o; d != null && ++u < r; ) {
21
- var t = re(e[u]), i = l;
22
- if (t === "__proto__" || t === "constructor" || t === "prototype")
23
- return o;
24
- if (u != g) {
25
- var v = d[t];
26
- i = void 0, i === void 0 && (i = B(v) ? v : ie(e[u + 1]) ? [] : {});
27
- }
28
- pe(d, t, i), d = d[t];
29
- }
30
- return o;
31
- }
32
- function he(o, e, l) {
33
- return o == null ? o : me(o, e, l);
34
- }
35
- var a = [];
36
- for (var I = 0; I < 256; ++I)
37
- a.push((I + 256).toString(16).slice(1));
38
- function ge(o, e = 0) {
39
- return (a[o[e + 0]] + a[o[e + 1]] + a[o[e + 2]] + a[o[e + 3]] + "-" + a[o[e + 4]] + a[o[e + 5]] + "-" + a[o[e + 6]] + a[o[e + 7]] + "-" + a[o[e + 8]] + a[o[e + 9]] + "-" + a[o[e + 10]] + a[o[e + 11]] + a[o[e + 12]] + a[o[e + 13]] + a[o[e + 14]] + a[o[e + 15]]).toLowerCase();
40
- }
41
- var U, ve = new Uint8Array(16);
42
- function be() {
43
- if (!U && (U = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !U))
44
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
45
- return U(ve);
46
- }
47
- var fe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
48
- const E = {
49
- randomUUID: fe
50
- };
51
- function Ve(o, e, l) {
52
- if (E.randomUUID && !o)
53
- return E.randomUUID();
54
- o = o || {};
55
- var s = o.random || (o.rng || be)();
56
- return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, ge(s);
57
- }
58
- const ye = ({ view: o, model: e }) => ({
59
- ...o,
60
- ...e
61
- }), we = /* @__PURE__ */ x({
62
- __name: "LoadingDropdown",
63
- props: {
64
- possibleValues: {},
65
- modelValue: {},
66
- id: {},
67
- ariaLabel: {},
68
- disabled: { type: Boolean }
69
- },
70
- setup(o) {
71
- const e = o, l = c(() => {
72
- const { possibleValues: r } = e;
73
- return r === null ? "Loading" : r.length > 0 ? "No value selected" : "No values present";
74
- }), s = c(() => e.possibleValues === null ? "" : e.modelValue), u = c(
75
- () => e.disabled || e.possibleValues === null || e.possibleValues.length === 0
76
- );
77
- return (r, g) => (y(), w(h(ne), H({ ...r.$props, ...r.$attrs }, {
78
- "model-value": s.value,
79
- disabled: u.value,
80
- "possible-values": r.possibleValues ?? [],
81
- placeholder: l.value,
82
- compact: ""
83
- }), {
84
- "icon-right": b(() => [
85
- r.possibleValues === null ? (y(), w(h(ae), {
86
- key: 0,
87
- class: "loading-icon"
88
- })) : O("", !0)
89
- ]),
90
- _: 1
91
- }, 16, ["model-value", "disabled", "possible-values", "placeholder"]));
92
- }
93
- }), De = /* @__PURE__ */ X(we, [["__scopeId", "data-v-cf6ba18c"]]), Te = /* @__PURE__ */ x({
94
- __name: "DropdownControl",
95
- props: {
96
- control: {},
97
- handleChange: {},
98
- changeValue: {},
99
- disabled: { type: Boolean },
100
- labelForId: {},
101
- isValid: { type: Boolean },
102
- messages: {},
103
- onRegisterValidation: {},
104
- asyncInitialOptions: { default: null },
105
- controlDataToDropdownValue: { type: Function, default: (o) => o },
106
- dropdownValueToControlData: { type: Function, default: (o) => o }
107
- },
108
- setup(o) {
109
- const e = o, l = D("getPossibleValuesFromUiSchema"), s = D("registerWatcher"), u = D("getData"), r = D("sendAlert"), g = N(null), d = c(
110
- () => {
111
- var n;
112
- return (n = e.control.uischema.options) == null ? void 0 : n.choicesProvider;
113
- }
114
- ), t = ee(
115
- Y(d.value, null),
116
- e.control
117
- ), i = N(e.control.data), v = (n) => e.dropdownValueToControlData(
118
- n.length > 0 ? n[0].id : null
119
- ), { showCheckbox: R, showControl: A, checkboxProps: $ } = oe(
120
- {
121
- control: c(() => e.control),
122
- disabled: c(() => e.disabled),
123
- controlElement: g
124
- },
125
- {
126
- setDefault: () => {
127
- !i.value && t.value ? e.changeValue(v(t.value)) : e.changeValue(i.value);
128
- },
129
- setNull: () => {
130
- e.changeValue(null);
131
- }
132
- }
133
- ), _ = c(
134
- () => e.controlDataToDropdownValue(e.control.data)
135
- ), L = c(
136
- () => {
137
- var n;
138
- return (n = e.control.uischema.options) == null ? void 0 : n.choicesUpdateHandler;
139
- }
140
- ), M = Ve(), P = async (n, f) => {
141
- const { result: p, state: m, message: C } = await u({
142
- method: "settings.update",
143
- options: [
144
- M,
145
- L.value,
146
- ye(n)
147
- ]
148
- });
149
- return (q) => {
150
- const S = (V) => {
151
- t.value = V, (f || !_.value) && (he(
152
- q,
153
- e.control.path,
154
- v(V)
155
- ), e.changeValue(v(V)));
156
- };
157
- p && S(p), m === "FAIL" && (C.forEach((V) => {
158
- r({
159
- message: V,
160
- type: "error"
161
- });
162
- }), S([]));
163
- };
164
- }, W = async (n) => {
165
- (await P(n, !1))(n);
166
- }, k = async () => {
167
- e.asyncInitialOptions !== null ? t.value = await e.asyncInitialOptions : d.value || l(e.control).then((n) => {
168
- t.value = n;
169
- });
170
- };
171
- let F = () => {
172
- };
173
- K(async () => {
174
- var n, f;
175
- if (L.value) {
176
- const p = ((n = e.control.uischema.options) == null ? void 0 : n.dependencies) || [], m = !!((f = e.control.uischema.options) != null && f.setFirstValueOnUpdate);
177
- F = await s({
178
- transformSettings: (C) => P(C, m),
179
- init: W,
180
- dependencies: p
181
- });
182
- } else
183
- k();
184
- }), G(() => {
185
- F();
186
- });
187
- const z = (n) => {
188
- i.value = e.dropdownValueToControlData(n), e.changeValue(i.value);
189
- };
190
- return (n, f) => {
191
- var p;
192
- return y(), w(Z, {
193
- label: n.control.label,
194
- "hide-control-header": (p = n.control.uischema.options) == null ? void 0 : p.hideControlHeader
195
- }, {
196
- "before-label": b(() => [
197
- h(R) ? (y(), w(h(ue), J(H({ key: 0 }, h($))), null, 16)) : O("", !0)
198
- ]),
199
- default: b(({ labelForId: m }) => [
200
- h(A) ? (y(), w(j, {
201
- key: 0,
202
- errors: n.messages.errors
203
- }, {
204
- default: b(() => [
205
- Q(De, {
206
- id: m ?? "",
207
- ref_key: "controlElement",
208
- ref: g,
209
- ariaLabel: n.control.label,
210
- disabled: n.disabled,
211
- "model-value": _.value,
212
- "possible-values": h(t),
213
- "is-valid": n.isValid,
214
- compact: "",
215
- "onUpdate:modelValue": z
216
- }, null, 8, ["id", "ariaLabel", "disabled", "model-value", "possible-values", "is-valid"])
217
- ]),
218
- _: 2
219
- }, 1032, ["errors"])) : O("", !0)
220
- ]),
221
- icon: b(() => [
222
- T(n.$slots, "icon")
223
- ]),
224
- buttons: b(({ hover: m }) => [
225
- T(n.$slots, "buttons", {
226
- hover: m,
227
- controlHTMLElement: g.value
228
- })
229
- ]),
230
- _: 3
231
- }, 8, ["label", "hide-control-header"]);
232
- };
233
- }
234
- });
235
- export {
236
- Te as _
237
- };
@@ -1,35 +0,0 @@
1
- import { defineComponent as c, openBlock as m, createBlock as u, mergeProps as d, unref as f, withCtx as t, renderSlot as s } from "vue";
2
- import { o as y } from "./index-hm05O8UX.js";
3
- import { _ as h } from "./DropdownControl.vue_vue_type_script_setup_true_lang-C56gUC45.js";
4
- const F = /* @__PURE__ */ c({
5
- __name: "OneOfDropdown",
6
- props: {
7
- control: {},
8
- handleChange: { type: Function },
9
- changeValue: { type: Function },
10
- disabled: { type: Boolean },
11
- labelForId: {},
12
- isValid: { type: Boolean },
13
- messages: {},
14
- onRegisterValidation: { type: Function }
15
- },
16
- setup(i) {
17
- var n, e;
18
- const a = ((e = (n = i.control.schema) == null ? void 0 : n.oneOf) == null ? void 0 : e.map(y)) ?? [], p = Promise.resolve(a);
19
- return (o, g) => (m(), u(h, d({ ...o.$attrs, ...o.$props }, { "async-initial-options": f(p) }), {
20
- icon: t(() => [
21
- s(o.$slots, "icon")
22
- ]),
23
- buttons: t(({ hover: r, controlHTMLElement: l }) => [
24
- s(o.$slots, "buttons", {
25
- hover: r,
26
- controlHTMLElement: l
27
- })
28
- ]),
29
- _: 3
30
- }, 16, ["async-initial-options"]));
31
- }
32
- });
33
- export {
34
- F as default
35
- };
@@ -1,50 +0,0 @@
1
- import { defineComponent as d, computed as r, markRaw as u, openBlock as p, createBlock as c, unref as i } from "vue";
2
- import { k as m, u as b, _ as f } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
- import { a as h, T as w } from "./TwinlistLoadingInfo-BGRl50bt.js";
4
- const v = /* @__PURE__ */ d({
5
- __name: "SimpleTwinlistControl",
6
- props: {
7
- control: {},
8
- handleChange: {},
9
- changeValue: {},
10
- disabled: { type: Boolean },
11
- isValid: { type: Boolean },
12
- onRegisterValidation: {},
13
- labelForId: {},
14
- twinlistSize: { default: 10 },
15
- twinlistLeftLabel: { default: "Excludes" },
16
- twinlistRightLabel: { default: "Includes" },
17
- optionsGenerator: { type: [null, Function], default: null }
18
- },
19
- setup(a) {
20
- const l = a, n = m("getPossibleValuesFromUiSchema"), t = r(
21
- () => {
22
- var e;
23
- return (e = l.control.uischema.options) == null ? void 0 : e.choicesProvider;
24
- }
25
- ), o = b(
26
- t,
27
- null
28
- ), s = u(h);
29
- return t.value || (l.optionsGenerator === null ? n(l.control).then((e) => {
30
- o.value = e;
31
- }) : o.value = l.optionsGenerator(l.control)), (e, g) => (p(), c(i(w), {
32
- id: e.labelForId,
33
- disabled: e.disabled,
34
- "model-value": e.control.data,
35
- "possible-values": i(o) ?? [],
36
- "empty-state-component": i(o) === null ? i(s) : null,
37
- "hide-options": i(o) === null,
38
- size: e.twinlistSize,
39
- "left-label": e.twinlistLeftLabel,
40
- "right-label": e.twinlistRightLabel,
41
- "is-valid": e.isValid,
42
- compact: "",
43
- "show-resize-handle": "",
44
- "onUpdate:modelValue": e.changeValue
45
- }, null, 8, ["id", "disabled", "model-value", "possible-values", "empty-state-component", "hide-options", "size", "left-label", "right-label", "is-valid", "onUpdate:modelValue"]));
46
- }
47
- }), I = /* @__PURE__ */ f(v, [["__scopeId", "data-v-b2852591"]]);
48
- export {
49
- I as default
50
- };
@@ -1,366 +0,0 @@
1
- import { openBlock as S, createElementBlock as A, createElementVNode as k, defineComponent as Z, computed as _, ref as N, watch as W, Fragment as z, createVNode as u, withKeys as L, withModifiers as B, unref as p, withCtx as f, nextTick as ae, onMounted as re, createTextVNode as F, renderSlot as O, normalizeClass as ie } from "vue";
2
- import { _ as Y, u as ce, k as ue, L as de, E as me } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
- import { w as pe } from "./getPossibleValuesFromUiSchema-hQj1TCOR.js";
4
- import { i as fe } from "./navigator-DWmzYl-A.js";
5
- import { F as M } from "./FunctionButton-6rf73qNS.js";
6
- import { M as he } from "./MultiselectListBox-B0o19vqK.js";
7
- import { b as ve } from "./_baseAssignValue-BPMLYzDH.js";
8
- import { b as we } from "./_baseEach-B8N_Gx8P.js";
9
- import { b as be } from "./_baseIteratee-DvBmrhnf.js";
10
- import { i as ge } from "./toString-DkbNkGT4.js";
11
- import { c as Ve } from "./createMissingItem-B00Kg95q.js";
12
- import { B as T } from "./Button-nRJkSaBC.js";
13
- const R = {
14
- ArrowUp: "↑",
15
- ArrowDown: "↓",
16
- ArrowLeft: "←",
17
- ArrowRight: "→",
18
- Enter: "↵",
19
- " ": "Space",
20
- // we use event.key and there space is an actual space not the code "Space"
21
- CtrlOrCmd: "Ctrl"
22
- }, _e = {
23
- Shift: "⇧",
24
- Delete: "⌫",
25
- CtrlOrCmd: "⌘",
26
- Ctrl: "⌃",
27
- Alt: "⌥",
28
- Enter: "↩"
29
- }, q = (t) => {
30
- const e = (r) => (i) => r[i] ?? i, a = ((...r) => r.reduce((i, v) => (x) => v(i(x))))(
31
- e(_e),
32
- e(R)
33
- ), l = e(R);
34
- return fe() ? a(t) : l(t);
35
- }, G = () => " ", ke = (t, e = G) => t.map(q).join(e()), xe = { formatHotkeys: ke, formatHotkey: q, getDefaultSeparator: G };
36
- function Se(t, e, o, a) {
37
- for (var l = t.length, r = o + -1; ++r < l; )
38
- if (e(t[r], r, t))
39
- return r;
40
- return -1;
41
- }
42
- function Ae(t) {
43
- return t !== t;
44
- }
45
- function Ce(t, e, o) {
46
- for (var a = o - 1, l = t.length; ++a < l; )
47
- if (t[a] === e)
48
- return a;
49
- return -1;
50
- }
51
- function Ie(t, e, o) {
52
- return e === e ? Ce(t, e, o) : Se(t, Ae, o);
53
- }
54
- function ye(t, e, o, a) {
55
- for (var l = -1, r = t == null ? 0 : t.length; ++l < r; ) {
56
- var i = t[l];
57
- e(a, i, o(i), t);
58
- }
59
- return a;
60
- }
61
- function Ue(t, e, o, a) {
62
- return we(t, function(l, r, i) {
63
- e(a, l, o(l), i);
64
- }), a;
65
- }
66
- function J(t, e) {
67
- return function(o, a) {
68
- var l = ge(o) ? ye : Ue, r = e ? e() : {};
69
- return l(o, t, be(a), r);
70
- };
71
- }
72
- function Q(t, e, o) {
73
- var a = t == null ? 0 : t.length;
74
- if (!a)
75
- return -1;
76
- var l = 0;
77
- return Ie(t, e, l);
78
- }
79
- var Le = J(function(t, e, o) {
80
- ve(t, o, e);
81
- }), Be = J(function(t, e, o) {
82
- t[o ? 0 : 1].push(e);
83
- }, function() {
84
- return [[], []];
85
- });
86
- const Me = {
87
- xmlns: "http://www.w3.org/2000/svg",
88
- fill: "none",
89
- stroke: "#000",
90
- "stroke-linejoin": "round",
91
- viewBox: "0 0 32 32"
92
- }, $e = /* @__PURE__ */ k("path", { d: "m27 17.1-11 11-11-11m11 11V3.9" }, null, -1), Ee = [
93
- $e
94
- ];
95
- function Fe(t, e) {
96
- return S(), A("svg", Me, [...Ee]);
97
- }
98
- const Te = { render: Fe }, Ne = {
99
- xmlns: "http://www.w3.org/2000/svg",
100
- fill: "none",
101
- stroke: "#000",
102
- viewBox: "0 0 32 32"
103
- }, Ke = /* @__PURE__ */ k("path", { d: "M23.4 13.4 16 20.8l-7.4-7.4m7.4 7.4V4.5m12.5 23h-25" }, null, -1), Pe = [
104
- Ke
105
- ];
106
- function De(t, e) {
107
- return S(), A("svg", Ne, [...Pe]);
108
- }
109
- const j = { render: De }, He = {
110
- xmlns: "http://www.w3.org/2000/svg",
111
- fill: "none",
112
- stroke: "#000",
113
- "stroke-linejoin": "round",
114
- viewBox: "0 0 32 32"
115
- }, Oe = /* @__PURE__ */ k("path", { d: "m5 14.9 11-11 11 11m-11-11v24.2" }, null, -1), Re = [
116
- Oe
117
- ];
118
- function je(t, e) {
119
- return S(), A("svg", He, [...Re]);
120
- }
121
- const Ze = { render: je }, We = { class: "buttons" }, ze = /* @__PURE__ */ Z({
122
- __name: "SortList",
123
- props: {
124
- modelValue: {},
125
- id: {},
126
- ariaLabel: {},
127
- disabled: { type: Boolean },
128
- possibleValues: {}
129
- },
130
- emits: ["update:modelValue"],
131
- setup(t, { emit: e }) {
132
- const o = t, a = e, l = _(() => Le(o.possibleValues, "id")), r = _(
133
- () => o.modelValue.map(
134
- (n) => l.value[n] ?? Ve(n)
135
- )
136
- ), i = N([]);
137
- W(
138
- () => o.modelValue,
139
- (n) => {
140
- const c = new Set(n);
141
- i.value = i.value.filter((d) => c.has(d));
142
- }
143
- );
144
- const v = _(() => i.value.length === 0), x = (n, c, d) => [
145
- n.slice(0, c),
146
- n.slice(c, d),
147
- n.slice(d)
148
- ], $ = (n) => {
149
- let c = 0;
150
- return (d) => n(d, c++);
151
- }, C = (n, c) => Be(
152
- n,
153
- $((d, V) => c(V))
154
- ), w = N(null), s = (n) => ({ to: c } = {}) => {
155
- const d = i.value.map((b) => Q(o.modelValue, b)).sort((b, U) => b - U), V = (n === "up" ? c : null) ?? Math.max(d[0] - 1, 0), E = (n === "down" ? c : null) ?? d[d.length - 1] + 1, [X, ee, te] = x(
156
- o.modelValue,
157
- V,
158
- E + 1
159
- ), oe = new Set(d), [K, P] = C(
160
- ee,
161
- (b) => oe.has(b + V)
162
- ), [ne, le] = n === "up" ? [K, P] : [P, K], se = X.concat(ne, le, te);
163
- a("update:modelValue", se), ae(() => {
164
- var b, U, D, H;
165
- n === "up" ? ((b = w.value) == null || b.scrollUpIntoView(V - 1), (U = w.value) == null || U.setCurrentKeyNavIndex(V)) : ((D = w.value) == null || D.scrollDownIntoView(E + 1), (H = w.value) == null || H.setCurrentKeyNavIndex(E));
166
- });
167
- }, m = s("up"), h = s("down"), I = () => m({ to: 0 }), y = () => h({ to: o.modelValue.length }), g = (n, c) => `${n} (${xe.formatHotkeys(c)})`;
168
- return (n, c) => (S(), A(z, null, [
169
- u(he, {
170
- id: n.id,
171
- ref_key: "listBox",
172
- ref: w,
173
- modelValue: i.value,
174
- "onUpdate:modelValue": c[0] || (c[0] = (d) => i.value = d),
175
- "possible-values": r.value,
176
- ariaLabel: `sortListBox_${n.ariaLabel}`,
177
- "with-is-empty-state": !0,
178
- "empty-state-label": "Empty",
179
- size: 10,
180
- onKeydown: [
181
- L(B(p(h), ["alt"]), ["down"]),
182
- L(B(p(m), ["alt"]), ["up"]),
183
- L(B(I, ["alt"]), ["home"]),
184
- L(B(y, ["alt"]), ["end"])
185
- ]
186
- }, null, 8, ["id", "modelValue", "possible-values", "ariaLabel", "onKeydown"]),
187
- k("div", We, [
188
- u(M, {
189
- disabled: v.value,
190
- title: g("Move to top", ["Alt", "Home"]),
191
- compact: "",
192
- onClick: I
193
- }, {
194
- default: f(() => [
195
- u(p(j), { class: "rotated" })
196
- ]),
197
- _: 1
198
- }, 8, ["disabled", "title"]),
199
- u(M, {
200
- disabled: v.value,
201
- title: g("Move to bottom", ["Alt", "End"]),
202
- compact: "",
203
- onClick: y
204
- }, {
205
- default: f(() => [
206
- u(p(j))
207
- ]),
208
- _: 1
209
- }, 8, ["disabled", "title"]),
210
- u(M, {
211
- disabled: v.value,
212
- title: g("Move up", ["Alt", "ArrowUp"]),
213
- compact: "",
214
- onClick: p(m)
215
- }, {
216
- default: f(() => [
217
- u(p(Ze))
218
- ]),
219
- _: 1
220
- }, 8, ["disabled", "title", "onClick"]),
221
- u(M, {
222
- disabled: v.value,
223
- title: g("Move down", ["Alt", "ArrowDown"]),
224
- compact: "",
225
- onClick: p(h)
226
- }, {
227
- default: f(() => [
228
- u(p(Te))
229
- ]),
230
- _: 1
231
- }, 8, ["disabled", "title", "onClick"])
232
- ])
233
- ], 64));
234
- }
235
- }), Ye = /* @__PURE__ */ Y(ze, [["__scopeId", "data-v-116782be"]]), qe = {
236
- class: /* @__PURE__ */ ie(["flex", "space-between"])
237
- }, Ge = { class: "flex" }, Je = "<any unknown new column>", Qe = /* @__PURE__ */ Z({
238
- __name: "SortListControl",
239
- props: {
240
- control: {},
241
- handleChange: {},
242
- changeValue: {},
243
- disabled: { type: Boolean },
244
- labelForId: {},
245
- isValid: { type: Boolean },
246
- messages: {},
247
- onRegisterValidation: {},
248
- anyUnknownValuesId: { default: Je },
249
- anyUnknownValuesText: { default: "Any unknown column" }
250
- },
251
- setup(t) {
252
- const e = t, o = _(() => e.control.data), a = _(
253
- () => e.control.uischema.options.choicesProvider
254
- ), l = pe(
255
- ce(
256
- a,
257
- []
258
- ),
259
- e.control
260
- ), r = _(
261
- () => l.value.concat({
262
- id: e.anyUnknownValuesId,
263
- text: e.anyUnknownValuesText,
264
- special: !0
265
- })
266
- ), i = (s) => {
267
- if (o.value.length === 0) {
268
- C();
269
- return;
270
- }
271
- const m = Q(o.value, e.anyUnknownValuesId);
272
- if (m === -1)
273
- throw new Error(
274
- `SortList data have to contain the value "${e.anyUnknownValuesId}"`
275
- );
276
- const h = o.value.slice(0, m + 1), I = o.value.slice(m + 1), y = new Set(o.value), g = s.map(({ id: n }) => n).filter((n) => !y.has(n));
277
- g.length > 0 && e.changeValue(h.concat(g, I));
278
- }, v = ue("getPossibleValuesFromUiSchema");
279
- re(async () => {
280
- const s = e.control.uischema.options.possibleValues;
281
- s ? l.value = s : a.value || (l.value = await v(e.control));
282
- }), W(() => l.value, i);
283
- const x = () => {
284
- e.changeValue(o.value.toSorted((s, m) => s.localeCompare(m)));
285
- }, $ = () => {
286
- e.changeValue(o.value.toSorted((s, m) => m.localeCompare(s)));
287
- }, C = () => {
288
- e.changeValue(r.value.map(({ id: s }) => s));
289
- }, w = N(null);
290
- return (s, m) => (S(), A(z, null, [
291
- k("div", qe, [
292
- k("div", Ge, [
293
- u(p(T), {
294
- "with-border": "",
295
- compact: "",
296
- onClick: x
297
- }, {
298
- default: f(() => [
299
- F("A - Z")
300
- ]),
301
- _: 1
302
- }),
303
- u(p(T), {
304
- "with-border": "",
305
- compact: "",
306
- onClick: $
307
- }, {
308
- default: f(() => [
309
- F("Z - A")
310
- ]),
311
- _: 1
312
- })
313
- ]),
314
- u(p(T), {
315
- "with-border": "",
316
- compact: "",
317
- onClick: C
318
- }, {
319
- default: f(() => [
320
- F("Reset all")
321
- ]),
322
- _: 1
323
- })
324
- ]),
325
- u(de, {
326
- label: s.control.label,
327
- onControllingFlowVariableSet: s.changeValue
328
- }, {
329
- default: f(({ labelForId: h }) => [
330
- u(me, {
331
- errors: s.messages.errors
332
- }, {
333
- default: f(() => [
334
- u(p(Ye), {
335
- id: h ?? void 0,
336
- ref_key: "controlElement",
337
- ref: w,
338
- "possible-values": r.value,
339
- "model-value": o.value,
340
- ariaLabel: s.control.label,
341
- disabled: s.disabled,
342
- compact: "",
343
- "onUpdate:modelValue": s.changeValue
344
- }, null, 8, ["id", "possible-values", "model-value", "ariaLabel", "disabled", "onUpdate:modelValue"])
345
- ]),
346
- _: 2
347
- }, 1032, ["errors"])
348
- ]),
349
- icon: f(() => [
350
- O(s.$slots, "icon", {}, void 0, !0)
351
- ]),
352
- buttons: f(({ hover: h }) => [
353
- O(s.$slots, "buttons", {
354
- hover: h,
355
- controlHTMLElement: w.value
356
- }, void 0, !0)
357
- ]),
358
- _: 3
359
- }, 8, ["label", "onControllingFlowVariableSet"])
360
- ], 64));
361
- }
362
- }), dt = /* @__PURE__ */ Y(Qe, [["__scopeId", "data-v-a10fd7f0"]]);
363
- export {
364
- Je as DEFAULT_ANY_UNKNOWN_VALUES_ID,
365
- dt as default
366
- };