@knime/jsonforms 1.15.0 → 1.15.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 +8 -0
  2. package/dist/AnyOfTwinlist-BmHETHvW.js +28 -0
  3. package/dist/{Button-Cqwayw73.js → Button-B9RSLVI2.js} +8 -7
  4. package/dist/CheckboxControl-q88fZSZD.js +58 -0
  5. package/dist/Checkboxes-Bofcg7tl.js +120 -0
  6. package/dist/CheckboxesControl-DY0R1PDD.js +47 -0
  7. package/dist/{ComboBoxControl-R0DlbAdT.js → ComboBoxControl-2r1FWcy-.js} +234 -165
  8. package/dist/DateControl-vnkppn62.js +38 -0
  9. package/dist/DateTimeControl-MkF9G3Xz.js +53 -0
  10. package/dist/DateTimeFormatInput-Ds2VLXw1.js +426 -0
  11. package/dist/DateTimeFormatPickerControl-D3OjZCj7.js +47 -0
  12. package/dist/DateTimeFormatPickerWithTypeControl-DDto-oJk.js +85 -0
  13. package/dist/{DateTimeInput-Cs0KqlOS.js → DateTimeInput-DcwhvMD2.js} +421 -377
  14. package/dist/{Dropdown-BEx-cvXH.js → Dropdown-D49sEHBa.js} +140 -85
  15. package/dist/DropdownControl-aeEqC-Yg.js +46 -0
  16. package/dist/HorizontalLayout-D0toQmVl.js +39 -0
  17. package/dist/{InputField-OkFB9VHZ.js → InputField-C_aZPs-f.js} +48 -36
  18. package/dist/IntegerControl-DAwniqjW.js +33 -0
  19. package/dist/IntervalControl-Bkuhg0Ga.js +647 -0
  20. package/dist/LoadingDropdown-B9jHjdWV.js +50 -0
  21. package/dist/LoadingIcon-RPBUjTO3.js +23 -0
  22. package/dist/ManualTwinlistControl-DGW-7a2Q.js +90 -0
  23. package/dist/MultiSelectListBoxControl-BYHuC9jL.js +48 -0
  24. package/dist/MultimodeTwinlistControl-oIvgI_FP.js +486 -0
  25. package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-2fVBipAl.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_bd2eaa56_lang-pnMOUiIt.js} +1 -1
  26. package/dist/{MultiselectListBox-CMTJnAWr.js → MultiselectListBox-CfdPbcn1.js} +96 -72
  27. package/dist/NameFilter-BV68t_P5.js +37 -0
  28. package/dist/NumberControl-Dm01CJW9.js +33 -0
  29. package/dist/NumberControlBase-CN5eTKEm.js +58 -0
  30. package/dist/{NumberInput-BepS3tAK.js → NumberInput-DWTImcA_.js} +72 -54
  31. package/dist/OneOfDropdown-DuXXP0Qn.js +50 -0
  32. package/dist/RadioControl-X6HLs9F1.js +36 -0
  33. package/dist/RadioControlBase-BGUHTIUl.js +111 -0
  34. package/dist/{RichTextControl-CE6whfV5.js → RichTextControl-B1mJMs1e.js} +4126 -3777
  35. package/dist/SectionHeading-B6JkPyMh.js +31 -0
  36. package/dist/{SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js → SectionHeading.vue_vue_type_style_index_0_scoped_f06e9b7d_lang-B5ALSUVO.js} +5456 -5284
  37. package/dist/SectionLayout-7pXn4OHo.js +61 -0
  38. package/dist/SettingsSubPanel-DToMRoLu.js +48 -0
  39. package/dist/SettingsSubPanelLayout-DnZnghFr.js +83 -0
  40. package/dist/SimpleButtonControl-DOSd92Kq.js +84 -0
  41. package/dist/SimpleTwinlistControl-RBfQTk47.js +31 -0
  42. package/dist/SingleSelectControl-C-GLQD-a.js +73 -0
  43. package/dist/SingleSelectListBoxControl-CDg_1QUT.js +260 -0
  44. package/dist/SortListControl-CWuxKIEb.js +445 -0
  45. package/dist/StyledListItem-NqAG7jSw.js +81 -0
  46. package/dist/TextAreaControl-Dt5ZGrae.js +122 -0
  47. package/dist/TextControl-w9vrCC1T.js +54 -0
  48. package/dist/TimeControl-DiNQSV4K.js +46 -0
  49. package/dist/TwinlistControlBase-CMFEecdr.js +47 -0
  50. package/dist/TwinlistLoadingInfo-Cy6HY-97.js +1080 -0
  51. package/dist/TypedStringFilter-FUF8sqOm.js +32 -0
  52. package/dist/ValueSwitch-Ozmr1YfK.js +162 -0
  53. package/dist/ValueSwitchControl-CdFlHo-2.js +33 -0
  54. package/dist/VerticalLayout-DY8gbasK.js +39 -0
  55. package/dist/VerticalLayoutBase-CpN-KONq.js +32 -0
  56. package/dist/ZonedDateTimeControl-Cg3dAfq5.js +79 -0
  57. package/dist/{_baseEach-DdH9cM67.js → _baseEach-CWap1NWh.js} +2 -2
  58. package/dist/{_baseIteratee-BGt-t7Os.js → _baseIteratee-D0MXvnuf.js} +3 -3
  59. package/dist/{_getTag-DAFySze4.js → _getTag-BvpAzjaz.js} +1 -1
  60. package/dist/{arrow-dropdown-BAFsD8Su.js → arrow-dropdown-eS-nVNCv.js} +7 -1
  61. package/dist/{arrow-next-BQVCxGb8.js → arrow-next-BmOStWql.js} +7 -1
  62. package/dist/{close-DGt8x-x_.js → close-0dYG2oDA.js} +7 -1
  63. package/dist/knime-jsonforms.css +1 -1
  64. package/dist/knime-jsonforms.js +134 -108
  65. package/dist/{localTimeUtils-NIKgHnIr.js → localTimeUtils-CfchSrLG.js} +1 -1
  66. package/dist/{reload-DCdbNLa2.js → reload-57Xc2t-6.js} +7 -1
  67. package/dist/testing.js +2 -2
  68. package/dist/{toString-BhubvA3m.js → toString-C-X8cE7K.js} +1 -1
  69. package/dist/{useBuiltinValidations-Boxrm71q.js → useBuiltinValidations-D0WuEacN.js} +1 -1
  70. package/dist/{usePossibleValues-DXuWWBh_.js → usePossibleValues-DTVXBGRC.js} +1 -1
  71. package/package.json +4 -4
  72. package/dist/AnyOfTwinlist-Co_sJAsc.js +0 -22
  73. package/dist/CheckboxControl-C10_DX1N.js +0 -40
  74. package/dist/Checkboxes-DWOxHiUX.js +0 -103
  75. package/dist/CheckboxesControl-BMRFgmO_.js +0 -38
  76. package/dist/DateControl-DAGAM92B.js +0 -29
  77. package/dist/DateTimeControl-DJhIb_U4.js +0 -45
  78. package/dist/DateTimeFormatInput-BhLQzC-P.js +0 -373
  79. package/dist/DateTimeFormatPickerControl-V7pxRYaW.js +0 -40
  80. package/dist/DateTimeFormatPickerWithTypeControl-3fa75rGw.js +0 -76
  81. package/dist/DropdownControl-DEIA5VD4.js +0 -31
  82. package/dist/HorizontalLayout-DCfhMNq4.js +0 -25
  83. package/dist/IntegerControl-Om8J7hch.js +0 -20
  84. package/dist/IntervalControl-B7UbyyD-.js +0 -545
  85. package/dist/LoadingDropdown-CINkq_Sw.js +0 -40
  86. package/dist/ManualTwinlistControl-BLTfr2gT.js +0 -79
  87. package/dist/MultiSelectListBoxControl-j1TaFtQj.js +0 -31
  88. package/dist/MultimodeTwinlistControl-BsFqHRFM.js +0 -459
  89. package/dist/NameFilter-d5k6rDVY.js +0 -24
  90. package/dist/NumberControl-Kc3hvVef.js +0 -20
  91. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-BOCR1qXG.js +0 -50
  92. package/dist/OneOfDropdown-CLwVXrbC.js +0 -33
  93. package/dist/RadioControl-DpziR8nA.js +0 -24
  94. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-DVIeg5W1.js +0 -104
  95. package/dist/SectionHeading-D7znCZXu.js +0 -19
  96. package/dist/SectionLayout-BhXDOzqB.js +0 -46
  97. package/dist/SettingsSubPanel-x9uWGoiu.js +0 -5
  98. package/dist/SettingsSubPanelLayout-BPHBM5n5.js +0 -62
  99. package/dist/SimpleButtonControl-DfCSlgZS.js +0 -61
  100. package/dist/SimpleTwinlistControl-CBalniCf.js +0 -25
  101. package/dist/SingleSelectControl-DC4w0ata.js +0 -58
  102. package/dist/SingleSelectListBoxControl-CKj-p8jZ.js +0 -232
  103. package/dist/SortListControl-BIUyPjCi.js +0 -377
  104. package/dist/StyledListItem-D-HJWfo5.js +0 -72
  105. package/dist/TextAreaControl-D28TQZEY.js +0 -108
  106. package/dist/TextControl-DUDBWcHy.js +0 -4
  107. package/dist/TextControl.vue_vue_type_script_setup_true_lang-DpAd3yOu.js +0 -47
  108. package/dist/TimeControl-HRooO_z3.js +0 -36
  109. package/dist/TwinlistControlBase-Brfh5pqZ.js +0 -40
  110. package/dist/TwinlistLoadingInfo-C4Tta00d.js +0 -946
  111. package/dist/TypedStringFilter-CdvgPKhD.js +0 -26
  112. package/dist/ValueSwitch-W4y1YvNM.js +0 -131
  113. package/dist/ValueSwitchControl-BaXH8Cjx.js +0 -20
  114. package/dist/VerticalLayout-ChAmRKNj.js +0 -30
  115. package/dist/VerticalLayoutBase-DAk4vfH5.js +0 -20
  116. package/dist/ZonedDateTimeControl-Qb57KmMT.js +0 -69
  117. package/dist/svgWithTitle-CnTmPYAB.js +0 -18
@@ -1,946 +0,0 @@
1
- import { createElementBlock as v, openBlock as c, createElementVNode as r, computed as a, nextTick as Q, resolveComponent as w, createBlock as x, normalizeClass as L, withCtx as B, createCommentVNode as y, createVNode as I, renderSlot as $, defineComponent as j, useCssVars as q, ref as E, normalizeStyle as D, Fragment as ee, renderList as te, unref as z, toRef as U, toDisplayString as M } from "vue";
2
- import { N as ne } from "./arrow-next-BQVCxGb8.js";
3
- import { u as O } from "./useSearch-hpyYQ_6y.js";
4
- import { G as le, H as se, _ as T, v as oe, y as ie } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js";
5
- import { M as ae } from "./MultiselectListBox-CMTJnAWr.js";
6
- import { C as ue } from "./close-DGt8x-x_.js";
7
- import { I as ce } from "./InputField-OkFB9VHZ.js";
8
- import { c as P } from "./createMissingItem-B00Kg95q.js";
9
- import { L as de } from "./svgWithTitle-CnTmPYAB.js";
10
- const re = {
11
- xmlns: "http://www.w3.org/2000/svg",
12
- fill: "none",
13
- stroke: "#000",
14
- "stroke-linejoin": "round",
15
- viewBox: "0 0 32 32"
16
- };
17
- function he(e, t) {
18
- return c(), v("svg", re, t[0] || (t[0] = [
19
- r("circle", {
20
- cx: "13.2",
21
- cy: "13.2",
22
- r: "10"
23
- }, null, -1),
24
- r("path", { d: "m20.2 20.2 8.6 8.6" }, null, -1)
25
- ]));
26
- }
27
- const me = { render: he };
28
- var ve = "Expected a function";
29
- function fe(e, t, n) {
30
- var s = !0, o = !0;
31
- if (typeof e != "function")
32
- throw new TypeError(ve);
33
- return le(n) && (s = "leading" in n ? !!n.leading : s, o = "trailing" in n ? !!n.trailing : o), se(e, t, {
34
- leading: s,
35
- maxWait: t,
36
- trailing: o
37
- });
38
- }
39
- const K = (e, t, n) => {
40
- const s = a(() => !e.value || e.value.length === 0 ? 0 : e.value.length), o = a(() => 0);
41
- return ((h, f, d) => `${h} of ${f} entries`)(
42
- s.value,
43
- t,
44
- o.value
45
- );
46
- }, we = {
47
- xmlns: "http://www.w3.org/2000/svg",
48
- fill: "none",
49
- stroke: "#000",
50
- "stroke-linejoin": "round",
51
- viewBox: "0 0 32 32"
52
- };
53
- function be(e, t) {
54
- return c(), v("svg", we, t[0] || (t[0] = [
55
- r("path", { d: "M6 22.7h21.3m-6.8 6.8 6.8-6.8-6.8-6.7M26 9.3H4.7m6.8-6.8L4.7 9.3l6.8 6.7" }, null, -1)
56
- ]));
57
- }
58
- const ge = { render: be }, Se = {
59
- xmlns: "http://www.w3.org/2000/svg",
60
- fill: "none",
61
- stroke: "#000",
62
- "stroke-linejoin": "round",
63
- viewBox: "0 0 32 32"
64
- };
65
- function Ie(e, t) {
66
- return c(), v("svg", Se, t[0] || (t[0] = [
67
- r("path", {
68
- fill: "#000",
69
- stroke: "none",
70
- d: "M13.297 19.097H5.444l-1.763 4.891H1.132L8.29 5.246h2.163l7.17 18.742h-2.536ZM6.19 17.063h6.372L9.371 8.297ZM28.37 23.988q-.205-.412-.334-1.467-1.66 1.725-3.965 1.725-2.06 0-3.385-1.159-1.313-1.171-1.313-2.96 0-2.176 1.647-3.373 1.66-1.21 4.66-1.21h2.317V14.45q0-1.249-.746-1.983-.747-.746-2.202-.746-1.274 0-2.136.643-.863.644-.863 1.558h-2.394q0-1.043.734-2.008.746-.979 2.008-1.545 1.274-.566 2.793-.566 2.407 0 3.772 1.21 1.364 1.197 1.416 3.308v6.41q0 1.919.489 3.051v.206zm-3.951-1.815q1.12 0 2.124-.579 1.004-.58 1.454-1.506V17.23h-1.866q-4.377 0-4.377 2.562 0 1.12.747 1.75.746.631 1.918.631",
71
- class: "text"
72
- }, null, -1)
73
- ]));
74
- }
75
- const pe = { render: Ie }, _e = {
76
- clear: "Clear",
77
- inverseSearch: "Exclude results that match query",
78
- caseSensitive: "Toggle case sensitivity"
79
- }, ye = {
80
- name: "SearchInput",
81
- components: {
82
- InputField: ce,
83
- FunctionButton: oe,
84
- CloseIcon: ue,
85
- LensIcon: me,
86
- InverseSearchIcon: ge,
87
- UpperLowerCaseIcon: pe
88
- },
89
- props: {
90
- id: {
91
- type: String,
92
- default: null
93
- },
94
- name: {
95
- type: String,
96
- default: null
97
- },
98
- modelValue: {
99
- type: String,
100
- default: ""
101
- },
102
- placeholder: {
103
- type: String,
104
- // A pseudo-placeholder to allow hiding the clear-button without any input
105
- default: " "
106
- },
107
- initialCaseSensitiveSearch: {
108
- default: !1,
109
- type: Boolean
110
- },
111
- initialInverseSearch: {
112
- default: !1,
113
- type: Boolean
114
- },
115
- showCaseSensitiveSearchButton: {
116
- default: !1,
117
- type: Boolean
118
- },
119
- showInverseSearchButton: {
120
- default: !1,
121
- type: Boolean
122
- },
123
- autofocus: {
124
- default: !1,
125
- type: Boolean
126
- },
127
- disabled: {
128
- default: !1,
129
- type: Boolean
130
- },
131
- tooltips: {
132
- type: Object,
133
- default: () => ({})
134
- },
135
- focusOnMount: {
136
- type: Boolean,
137
- default: !1
138
- },
139
- ariaActivedescendant: {
140
- type: String,
141
- default: null
142
- },
143
- ariaOwns: {
144
- type: String,
145
- default: null
146
- },
147
- compact: {
148
- type: Boolean,
149
- default: !1
150
- }
151
- },
152
- emits: [
153
- "clear",
154
- "update:modelValue",
155
- "toggle-case-sensitive-search",
156
- "toggle-inverse-search",
157
- "focus"
158
- ],
159
- expose: ["focus"],
160
- data() {
161
- return {
162
- caseSensitiveSearch: this.initialCaseSensitiveSearch,
163
- inverseSearch: this.initialInverseSearch
164
- };
165
- },
166
- computed: {
167
- showClearButton() {
168
- return !this.disabled && this.modelValue !== "";
169
- },
170
- showSpacer() {
171
- return this.showClearButton && (this.showCaseSensitiveSearchButton || this.showInverseSearchButton);
172
- },
173
- tooltipsWithDefaults() {
174
- return { ..._e, ...this.tooltips };
175
- }
176
- },
177
- async mounted() {
178
- this.focusOnMount && (await Q(), this.focus());
179
- },
180
- methods: {
181
- clearSearch() {
182
- this.$emit("clear"), this.$emit("update:modelValue", ""), this.focus();
183
- },
184
- toggleCaseSensitiveSearch() {
185
- this.caseSensitiveSearch = !this.caseSensitiveSearch, this.$emit("toggle-case-sensitive-search", this.caseSensitiveSearch), this.focus();
186
- },
187
- toggleInverseSearch() {
188
- this.inverseSearch = !this.inverseSearch, this.$emit("toggle-inverse-search", this.inverseSearch), this.focus();
189
- },
190
- focus() {
191
- this.$refs.searchInput.focus();
192
- }
193
- }
194
- }, Le = {
195
- key: 0,
196
- class: "icon-slot-wrapper"
197
- }, ke = {
198
- key: 1,
199
- class: "spacer"
200
- };
201
- function Be(e, t, n, s, o, l) {
202
- const h = w("LensIcon"), f = w("CloseIcon"), d = w("FunctionButton"), S = w("UpperLowerCaseIcon"), b = w("InverseSearchIcon"), g = w("InputField");
203
- return c(), x(g, {
204
- id: n.id,
205
- ref: "searchInput",
206
- name: n.name,
207
- "model-value": n.modelValue,
208
- placeholder: n.placeholder,
209
- autofocus: n.autofocus,
210
- disabled: n.disabled,
211
- class: L(["search-input", { disabled: n.disabled }]),
212
- autocomplete: "off",
213
- "aria-owns": n.ariaOwns,
214
- "aria-activedescendant": n.ariaActivedescendant,
215
- role: "searchbox",
216
- compact: n.compact,
217
- onFocus: t[0] || (t[0] = (p) => e.$emit("focus", p)),
218
- "onUpdate:modelValue": t[1] || (t[1] = (p) => e.$emit("update:modelValue", p))
219
- }, {
220
- icon: B(() => [
221
- n.disabled ? y("", !0) : (c(), v("div", Le, [
222
- $(e.$slots, "icon", {}, () => [
223
- I(h)
224
- ], !0)
225
- ]))
226
- ]),
227
- iconRight: B(() => [
228
- l.showClearButton ? (c(), x(d, {
229
- key: 0,
230
- class: "clear-search",
231
- compact: n.compact,
232
- title: l.tooltipsWithDefaults.clear,
233
- onClick: l.clearSearch
234
- }, {
235
- default: B(() => [
236
- I(f)
237
- ]),
238
- _: 1
239
- }, 8, ["compact", "title", "onClick"])) : y("", !0),
240
- l.showSpacer ? (c(), v("span", ke)) : y("", !0),
241
- !n.disabled && n.showCaseSensitiveSearchButton ? (c(), x(d, {
242
- key: 2,
243
- class: "toggle-case-sensitive-search",
244
- compact: n.compact,
245
- active: o.caseSensitiveSearch,
246
- title: l.tooltipsWithDefaults.caseSensitive,
247
- onClick: l.toggleCaseSensitiveSearch
248
- }, {
249
- default: B(() => [
250
- I(S)
251
- ]),
252
- _: 1
253
- }, 8, ["compact", "active", "title", "onClick"])) : y("", !0),
254
- !n.disabled && n.showInverseSearchButton ? (c(), x(d, {
255
- key: 3,
256
- class: "toggle-inverse-search",
257
- compact: n.compact,
258
- title: l.tooltipsWithDefaults.inverseSearch,
259
- active: o.inverseSearch,
260
- onClick: l.toggleInverseSearch
261
- }, {
262
- default: B(() => [
263
- I(b)
264
- ]),
265
- _: 1
266
- }, 8, ["compact", "title", "active", "onClick"])) : y("", !0)
267
- ]),
268
- _: 3
269
- }, 8, ["id", "name", "model-value", "placeholder", "autofocus", "disabled", "class", "aria-owns", "aria-activedescendant", "compact"]);
270
- }
271
- const xe = /* @__PURE__ */ T(ye, [["render", Be], ["__scopeId", "data-v-edba0a22"]]), Ve = {
272
- xmlns: "http://www.w3.org/2000/svg",
273
- fill: "none",
274
- stroke: "#000",
275
- "stroke-linejoin": "round",
276
- viewBox: "0 0 32 32"
277
- };
278
- function Ce(e, t) {
279
- return c(), v("svg", Ve, t[0] || (t[0] = [
280
- r("path", { d: "m14.8 5 11 11-11 11M6.2 5l11 11-11 11" }, null, -1)
281
- ]));
282
- }
283
- const Me = { render: Ce }, Re = {
284
- xmlns: "http://www.w3.org/2000/svg",
285
- fill: "none",
286
- stroke: "#000",
287
- "stroke-linejoin": "round",
288
- viewBox: "0 0 32 32"
289
- };
290
- function Ee(e, t) {
291
- return c(), v("svg", Re, t[0] || (t[0] = [
292
- r("path", { d: "m17.2 27-11-11 11-11m8.6 22-11-11 11-11" }, null, -1)
293
- ]));
294
- }
295
- const Te = { render: Ee }, Ae = {
296
- xmlns: "http://www.w3.org/2000/svg",
297
- fill: "none",
298
- stroke: "#000",
299
- "stroke-linejoin": "round",
300
- viewBox: "0 0 32 32"
301
- };
302
- function De(e, t) {
303
- return c(), v("svg", Ae, t[0] || (t[0] = [
304
- r("path", { d: "m21.5 27-11-11 11-11" }, null, -1)
305
- ]));
306
- }
307
- const He = { render: De }, ze = 10, W = "2px", Ne = /* @__PURE__ */ j({
308
- __name: "ResizeHandle",
309
- props: {
310
- numberOfHandles: {},
311
- handleWidth: {},
312
- connectHandlesOnResize: { type: Boolean, default: !1 },
313
- multipleHandlesHandleGap: { default: "0px" },
314
- disabled: { type: Boolean, default: !1 }
315
- },
316
- emits: ["resize-move", "resize-end"],
317
- setup(e, { emit: t }) {
318
- q((i) => ({
319
- aa149252: W
320
- }));
321
- const n = t, s = e, o = E(0), l = E(null), h = a(
322
- () => `calc(${s.handleWidth} + 2 * ${W})`
323
- ), f = a(
324
- () => s.connectHandlesOnResize && s.numberOfHandles > 1 && l.value !== null
325
- ), d = a(
326
- () => `(${s.numberOfHandles} - 1) * ${s.multipleHandlesHandleGap}`
327
- ), S = a(
328
- () => `(2 * ${s.numberOfHandles})`
329
- ), b = a(
330
- () => `(100% - ${d.value}) / ${S.value}`
331
- ), g = a(
332
- () => `calc(100% - 2 * ${b.value})`
333
- ), p = (i) => {
334
- s.disabled || (i.target.setPointerCapture(i.pointerId), i.preventDefault(), l.value = i.pointerId, o.value = i.clientY);
335
- }, k = fe((i) => {
336
- if (l.value === i.pointerId) {
337
- const _ = i.clientY - o.value;
338
- (_ < 0 && i.offsetY <= 0 || _ > 0 && i.offsetY >= 0) && n("resize-move", _), o.value = i.clientY;
339
- }
340
- }, ze), u = (i) => {
341
- l.value === i.pointerId && (o.value = 0, l.value = null, n("resize-end"));
342
- };
343
- return (i, _) => (c(), v("div", {
344
- class: "resize-handle-container",
345
- style: D({ gap: i.multipleHandlesHandleGap })
346
- }, [
347
- f.value ? (c(), v("div", {
348
- key: 0,
349
- class: "handle connection",
350
- style: D({ width: g.value })
351
- }, null, 4)) : y("", !0),
352
- (c(!0), v(ee, null, te(i.numberOfHandles, (V) => (c(), v("div", {
353
- key: V,
354
- class: L(["handle-container", { disabled: i.disabled }]),
355
- style: D({ width: h.value }),
356
- onPointerdown: p,
357
- onPointerup: u,
358
- onPointermove: _[0] || (_[0] = //@ts-ignore
359
- (...C) => z(k) && z(k)(...C)),
360
- onLostpointercapture: u
361
- }, _[1] || (_[1] = [
362
- r("div", { class: "handle" }, null, -1)
363
- ]), 38))), 128))
364
- ], 4));
365
- }
366
- }), Ue = /* @__PURE__ */ T(Ne, [["__scopeId", "data-v-2123c51f"]]), R = "Enter", H = 5, Y = 30, Z = 24, Oe = 4, Pe = 56, Ke = ["left", "right"], We = Oe * Z + 2 * Pe, Fe = `calc((100% - ${Y}px) * 1 / 6)`, Ge = (e) => {
367
- const t = a(
368
- () => e.value !== null && "includeUnknownValues" in e.value ? { withUnknownValues: e.value } : { standard: e.value }
369
- ), n = a(() => typeof t.value.standard < "u" ? t.value.standard : t.value.withUnknownValues.includedValues), s = a(
370
- () => t.value.withUnknownValues?.excludedValues ?? null
371
- ), o = a(
372
- () => t.value.withUnknownValues?.includeUnknownValues ?? null
373
- ), l = a(
374
- () => o.value === !1
375
- ), h = a(
376
- () => o.value === !0
377
- );
378
- return {
379
- includedValues: n,
380
- excludedValues: s,
381
- showUnknownExcludedValues: l,
382
- showUnknownIncludedValues: h,
383
- getEmitValue: (d, S = (g) => g, b = (g) => g) => t.value.withUnknownValues ? {
384
- includedValues: d,
385
- excludedValues: S(s.value),
386
- includeUnknownValues: b(
387
- t.value.withUnknownValues.includeUnknownValues
388
- )
389
- } : d
390
- };
391
- }, N = {
392
- name: "Twinlist",
393
- components: {
394
- ArrowNextDoubleIcon: Me,
395
- ArrowNextIcon: ne,
396
- ArrowPrevDoubleIcon: Te,
397
- ArrowPrevIcon: He,
398
- MultiselectListBox: ae,
399
- Label: ie,
400
- SearchInput: xe,
401
- ResizeHandle: Ue
402
- },
403
- props: {
404
- modelValue: {
405
- type: [Object, Array, null],
406
- default: null
407
- },
408
- initialCaseSensitiveSearch: {
409
- default: !1,
410
- type: Boolean
411
- },
412
- initialSearchTerm: {
413
- type: String,
414
- required: !1,
415
- default: ""
416
- },
417
- /**
418
- * Hiding and disabling
419
- */
420
- showSearch: {
421
- default: !1,
422
- type: Boolean
423
- },
424
- disabled: {
425
- default: !1,
426
- type: Boolean
427
- },
428
- showEmptyState: {
429
- default: !0,
430
- type: Boolean
431
- },
432
- /**
433
- * Labels
434
- */
435
- leftLabel: {
436
- type: String,
437
- default: "Possible values"
438
- },
439
- rightLabel: {
440
- type: String,
441
- default: "Selected values"
442
- },
443
- withSearchLabel: {
444
- default: !1,
445
- type: Boolean
446
- },
447
- searchLabel: {
448
- type: String,
449
- required: !1,
450
- default: "Search values"
451
- },
452
- searchPlaceholder: {
453
- type: String,
454
- required: !1,
455
- default: "Search"
456
- },
457
- unknownValuesText: {
458
- type: String,
459
- required: !1,
460
- default: "Unknown values"
461
- },
462
- /**
463
- * Is only used when emptyStateComponent is null
464
- */
465
- emptyStateLabel: {
466
- default: "No entries in this list",
467
- type: String
468
- },
469
- /**
470
- * this component is displayed centered in the middle of the box in case it is empty
471
- */
472
- emptyStateComponent: {
473
- default: null,
474
- type: Object
475
- },
476
- /**
477
- * Controls the size of the list.
478
- * Number of visible items (for others user need to scroll)
479
- * - 0 means all
480
- * - values 1 - 4 are ignored; 5 is minimum
481
- */
482
- size: {
483
- type: Number,
484
- default: 0,
485
- validator(e) {
486
- return e >= 0;
487
- }
488
- },
489
- showResizeHandle: {
490
- type: Boolean,
491
- default: !1
492
- },
493
- isValid: {
494
- default: !0,
495
- type: Boolean
496
- },
497
- /**
498
- * List of possible values. Each item must have an `id` and a `text` property
499
- * @example
500
- * [{
501
- * id: 'pdf',
502
- * text: 'PDF'
503
- * }, {
504
- * id: 'XLS',
505
- * text: 'Excel',
506
- * }]
507
- */
508
- possibleValues: {
509
- type: Array,
510
- default: () => []
511
- },
512
- compact: {
513
- type: Boolean,
514
- default: !1
515
- }
516
- },
517
- emits: [
518
- /**
519
- * This event gets emitted whenever the user changes the selection.
520
- * In case the modelValue of this Twinlist is with unknown values, the emitted value here will also be.
521
- */
522
- "update:modelValue"
523
- ],
524
- setup(e) {
525
- const {
526
- includedValues: t,
527
- excludedValues: n,
528
- showUnknownExcludedValues: s,
529
- showUnknownIncludedValues: o,
530
- getEmitValue: l
531
- } = Ge(U(e, "modelValue")), h = E(e.initialSearchTerm), f = E(e.initialCaseSensitiveSearch), d = a(() => e.possibleValues.map((m) => m.id)), S = a(() => new Set(d.value)), b = a(() => t.value ? o.value ? t.value.filter(
532
- (m) => S.value.has(m)
533
- ) : t.value : null), g = a(() => Object.assign(
534
- {},
535
- ...e.possibleValues.map((m, A) => ({
536
- [m.id]: { item: m, index: A }
537
- }))
538
- )), p = a(() => b.value === null ? [] : b.value.map(
539
- (m) => g.value[m]?.item || P(m)
540
- )), k = U(e, "showSearch"), u = O(
541
- h,
542
- f,
543
- p,
544
- k
545
- ), i = a(() => {
546
- if (!n.value) {
547
- const m = new Set(t.value);
548
- return d.value.filter(
549
- (A) => !m.has(A)
550
- );
551
- }
552
- return s.value ? n.value.filter(
553
- (m) => S.value.has(m)
554
- ) : n.value;
555
- }), _ = a(() => b.value === null ? [] : i.value.map(
556
- (m) => g.value[m]?.item || P(m)
557
- )), V = O(
558
- h,
559
- f,
560
- _,
561
- k
562
- ), C = a(() => e.showSearch && h.value !== ""), X = a(() => e.showSearch && C.value ? K(V, i.value.length) : null), J = a(() => e.showSearch && C.value ? K(
563
- u,
564
- b.value?.length
565
- ) : null);
566
- return {
567
- includedValues: t,
568
- excludedValues: n,
569
- showUnknownExcludedValues: s,
570
- showUnknownIncludedValues: o,
571
- getEmitValue: l,
572
- searchTerm: h,
573
- filteredExcludedItems: V,
574
- filteredIncludedItems: u,
575
- knownExcludedValues: i,
576
- knownIncludedValues: b,
577
- possibleValueIds: d,
578
- possibleValueIdsSet: S,
579
- excludedLabels: X,
580
- includedLabels: J,
581
- caseSensitiveSearch: f,
582
- allIncludedItems: p,
583
- possibleValueMap: g
584
- };
585
- },
586
- data() {
587
- return {
588
- invalidPossibleValueIds: /* @__PURE__ */ new Set(),
589
- rightSelected: [],
590
- leftSelected: [],
591
- unknownValuesId: Symbol("Unknown values"),
592
- constants: Object.freeze({
593
- MIN_LIST_SIZE: H,
594
- BUTTON_HEIGHT: Z,
595
- BUTTON_WIDTH: Y,
596
- RESIZE_HANDLE_WIDTH: Fe,
597
- MAX_HEIGHT_BUTTONS_CENTER_ALIGNMENT: We
598
- })
599
- };
600
- },
601
- computed: {
602
- listSize() {
603
- const e = this.size === 0 ? this.possibleValues.length : this.size;
604
- return e > H ? e : H;
605
- },
606
- moveAllRightButtonDisabled() {
607
- return this.filteredExcludedItems.length === 0 && !this.showUnknownExcludedValues;
608
- },
609
- moveRightButtonDisabled() {
610
- return this.leftSelected.length === 0;
611
- },
612
- moveAllLeftButtonDisabled() {
613
- return this.filteredIncludedItems.length === 0 && !this.showUnknownIncludedValues;
614
- },
615
- moveLeftButtonDisabled() {
616
- return this.rightSelected.length === 0;
617
- }
618
- },
619
- mounted() {
620
- this.showResizeHandle && this.getListBoxes().forEach((e) => e.initResizeHeight());
621
- },
622
- methods: {
623
- getIndex(e) {
624
- return this.possibleValueMap[e]?.index ?? -1;
625
- },
626
- compareByOriginalSorting(e, t) {
627
- return this.getIndex(e) - this.getIndex(t);
628
- },
629
- clearSelections() {
630
- this.getListBoxes().forEach((e) => e.clearSelection());
631
- },
632
- moveItems(e, {
633
- toNewIncludedValues: t,
634
- toNewExcludedValues: n
635
- }) {
636
- const s = e.filter((d) => d !== this.unknownValuesId), o = e.length > s.length, l = {
637
- knownValues: s,
638
- movingUnknownValues: o
639
- };
640
- let h = null, f = null;
641
- this.includedValues !== null && (h = t({
642
- previous: this.includedValues,
643
- movingParts: l
644
- })), this.excludedValues && (f = n({
645
- previous: this.knownExcludedValues,
646
- movingParts: l
647
- })), this.clearSelections(), this.$emit(
648
- "update:modelValue",
649
- this.getEmitValue(
650
- h,
651
- () => f,
652
- (d) => o ? !d : d
653
- )
654
- );
655
- },
656
- moveRight(e = null) {
657
- this.moveItems(e ?? this.leftSelected, {
658
- toNewIncludedValues: this.addMovedItems.bind(this),
659
- toNewExcludedValues: this.filterMovedItems.bind(this)
660
- });
661
- },
662
- moveLeft(e = null) {
663
- this.moveItems(e ?? this.rightSelected, {
664
- toNewIncludedValues: this.filterMovedItems.bind(this),
665
- toNewExcludedValues: this.addMovedItems.bind(this)
666
- });
667
- },
668
- /**
669
- * Filters out the moved items and also invalid items if unknown values are being moved.
670
- */
671
- filterMovedItems({
672
- previous: e,
673
- movingParts: { movingUnknownValues: t, knownValues: n }
674
- }) {
675
- const s = new Set(n);
676
- return e.filter(
677
- (o) => !s.has(o) && (!t || this.possibleValueIdsSet.has(o))
678
- );
679
- },
680
- /**
681
- * Adds the given items sorting by the order in the possible values afterwards and removing invalid items
682
- * if unknown values are being moved
683
- */
684
- addMovedItems({
685
- previous: e,
686
- movingParts: { movingUnknownValues: t, knownValues: n }
687
- }) {
688
- return [
689
- ...t ? e.filter((s) => this.possibleValueIdsSet.has(s)) : e,
690
- ...n.filter((s) => this.possibleValueIdsSet.has(s))
691
- ].sort(this.compareByOriginalSorting);
692
- },
693
- onMoveRightButtonClick() {
694
- this.moveRight();
695
- },
696
- onMoveAllRightButtonClick() {
697
- const e = this.filteredExcludedItems.map((t) => t.id);
698
- this.moveRight(
699
- e.concat(
700
- this.showUnknownExcludedValues ? [this.unknownValuesId] : []
701
- )
702
- );
703
- },
704
- onMoveAllRightButtonKey(e) {
705
- e.key === R && (this.onMoveAllRightButtonClick(), this.stopPropagation(e));
706
- },
707
- onMoveRightButtonKey(e) {
708
- e.key === R && (this.moveRight(), this.stopPropagation(e));
709
- },
710
- onMoveLeftButtonClick() {
711
- this.moveLeft();
712
- },
713
- onMoveAllLeftButtonClick() {
714
- const e = this.filteredIncludedItems.map((t) => t.id);
715
- this.moveLeft(
716
- e.concat(
717
- this.showUnknownIncludedValues ? [this.unknownValuesId] : []
718
- )
719
- );
720
- },
721
- onMoveLeftButtonKey(e) {
722
- e.key === R && (this.moveLeft(), this.stopPropagation(e));
723
- },
724
- onMoveAllLeftButtonKey(e) {
725
- e.key === R && (this.onMoveAllLeftButtonClick(), this.stopPropagation(e));
726
- },
727
- stopPropagation(e) {
728
- e.preventDefault(), e.stopPropagation();
729
- },
730
- onLeftListBoxDoubleClick(e) {
731
- this.moveRight([e]);
732
- },
733
- onLeftListBoxShiftDoubleClick(e) {
734
- this.moveRight(e);
735
- },
736
- onRightListBoxDoubleClick(e) {
737
- this.moveLeft([e]);
738
- },
739
- onRightListBoxShiftDoubleClick(e) {
740
- this.moveLeft(e);
741
- },
742
- onLeftInput(e) {
743
- e.length > 0 && this.$refs.right.clearSelection(), this.leftSelected = e;
744
- },
745
- onRightInput(e) {
746
- e.length > 0 && this.$refs.left.clearSelection(), this.rightSelected = e;
747
- },
748
- onSearchInput(e) {
749
- this.searchTerm = e;
750
- },
751
- hasSelection() {
752
- return (this.includedValues?.length ?? 0) > 0;
753
- },
754
- validate() {
755
- const e = !this.filteredIncludedItems.some((t) => t.invalid) && (!this.excludedValues || !this.filteredExcludedItems.some((t) => t.invalid));
756
- return {
757
- isValid: e,
758
- errorMessage: e ? null : "One or more of the selected items is invalid."
759
- };
760
- },
761
- getListBoxes() {
762
- return Ke.map(
763
- (e) => this.$refs[e]
764
- );
765
- },
766
- onResizeMove(e) {
767
- this.getListBoxes().forEach((t) => t.onResizeMove(e));
768
- },
769
- onResizeEnd() {
770
- this.getListBoxes().forEach((e) => e.onResizeEnd());
771
- }
772
- }
773
- }, F = () => {
774
- q((e) => ({
775
- 83739938: `${e.constants.BUTTON_WIDTH}px`,
776
- 13873302: `${e.constants.MAX_HEIGHT_BUTTONS_CENTER_ALIGNMENT}px`,
777
- "82cc7682": `${e.constants.BUTTON_HEIGHT}px`
778
- }));
779
- }, G = N.setup;
780
- N.setup = G ? (e, t) => (F(), G(e, t)) : F;
781
- const je = { class: "twinlist" }, qe = { class: "header" }, Ye = { class: "title" }, Ze = ["title"], Xe = ["title"], Je = { class: "title" }, Qe = ["title"], $e = ["title"], et = { class: "buttons" };
782
- function tt(e, t, n, s, o, l) {
783
- const h = w("SearchInput"), f = w("Label"), d = w("MultiselectListBox"), S = w("ArrowNextIcon"), b = w("ArrowNextDoubleIcon"), g = w("ArrowPrevIcon"), p = w("ArrowPrevDoubleIcon"), k = w("ResizeHandle");
784
- return c(), v("div", je, [
785
- n.showSearch ? (c(), x(f, {
786
- key: 0,
787
- active: n.withSearchLabel,
788
- text: n.searchLabel,
789
- class: "search-wrapper"
790
- }, {
791
- default: B(({ labelForId: u }) => [
792
- I(h, {
793
- id: u,
794
- ref: "search",
795
- placeholder: n.searchPlaceholder,
796
- "model-value": s.searchTerm,
797
- label: n.searchLabel,
798
- "initial-case-sensitive-search": n.initialCaseSensitiveSearch,
799
- "show-case-sensitive-search-button": "",
800
- disabled: n.disabled,
801
- tooltips: {
802
- inverseSearch: "Move matching to other side"
803
- },
804
- compact: n.compact,
805
- "onUpdate:modelValue": l.onSearchInput,
806
- onToggleCaseSensitiveSearch: t[0] || (t[0] = (i) => s.caseSensitiveSearch = i)
807
- }, null, 8, ["id", "placeholder", "model-value", "label", "initial-case-sensitive-search", "disabled", "compact", "onUpdate:modelValue"])
808
- ]),
809
- _: 1
810
- }, 8, ["active", "text"])) : y("", !0),
811
- r("div", qe, [
812
- r("div", Ye, [
813
- r("div", {
814
- class: "label",
815
- title: n.leftLabel
816
- }, M(n.leftLabel), 9, Ze),
817
- s.excludedLabels ? (c(), v("div", {
818
- key: 0,
819
- title: s.excludedLabels,
820
- class: "info"
821
- }, M(s.excludedLabels), 9, Xe)) : y("", !0)
822
- ]),
823
- t[9] || (t[9] = r("div", { class: "space" }, null, -1)),
824
- r("div", Je, [
825
- r("div", {
826
- class: "label",
827
- title: n.rightLabel
828
- }, M(n.rightLabel), 9, Qe),
829
- s.includedLabels ? (c(), v("div", {
830
- key: 0,
831
- title: s.includedLabels,
832
- class: "info"
833
- }, M(s.includedLabels), 9, $e)) : y("", !0)
834
- ])
835
- ]),
836
- r("div", {
837
- class: L(["lists", { disabled: n.disabled }])
838
- }, [
839
- I(d, {
840
- ref: "left",
841
- "with-is-empty-state": n.showEmptyState,
842
- "empty-state-label": n.emptyStateLabel,
843
- "empty-state-component": n.emptyStateComponent,
844
- size: l.listSize,
845
- "min-size": o.constants.MIN_LIST_SIZE,
846
- class: "list-box",
847
- "model-value": o.leftSelected,
848
- "with-bottom-value": s.showUnknownExcludedValues,
849
- "bottom-value": { id: o.unknownValuesId, text: n.unknownValuesText },
850
- "is-valid": n.isValid,
851
- "possible-values": s.filteredExcludedItems,
852
- ariaLabel: n.leftLabel,
853
- disabled: n.disabled,
854
- onDoubleClickOnItem: l.onLeftListBoxDoubleClick,
855
- onDoubleClickShift: l.onLeftListBoxShiftDoubleClick,
856
- onKeyArrowRight: l.moveRight,
857
- "onUpdate:modelValue": l.onLeftInput
858
- }, null, 8, ["with-is-empty-state", "empty-state-label", "empty-state-component", "size", "min-size", "model-value", "with-bottom-value", "bottom-value", "is-valid", "possible-values", "ariaLabel", "disabled", "onDoubleClickOnItem", "onDoubleClickShift", "onKeyArrowRight", "onUpdate:modelValue"]),
859
- r("div", et, [
860
- r("div", {
861
- ref: "moveRight",
862
- class: L({ disabled: l.moveRightButtonDisabled || n.disabled }),
863
- role: "button",
864
- tabindex: "0",
865
- onClick: t[1] || (t[1] = (...u) => l.onMoveRightButtonClick && l.onMoveRightButtonClick(...u)),
866
- onKeydown: t[2] || (t[2] = (...u) => l.onMoveRightButtonKey && l.onMoveRightButtonKey(...u))
867
- }, [
868
- I(S, { class: "icon" })
869
- ], 34),
870
- r("div", {
871
- ref: "moveAllRight",
872
- class: L({ disabled: l.moveAllRightButtonDisabled || n.disabled }),
873
- role: "button",
874
- tabindex: "0",
875
- onClick: t[3] || (t[3] = (...u) => l.onMoveAllRightButtonClick && l.onMoveAllRightButtonClick(...u)),
876
- onKeydown: t[4] || (t[4] = (...u) => l.onMoveAllRightButtonKey && l.onMoveAllRightButtonKey(...u))
877
- }, [
878
- I(b, { class: "icon" })
879
- ], 34),
880
- r("div", {
881
- ref: "moveLeft",
882
- class: L({ disabled: l.moveLeftButtonDisabled || n.disabled }),
883
- role: "button",
884
- tabindex: "0",
885
- onClick: t[5] || (t[5] = (...u) => l.onMoveLeftButtonClick && l.onMoveLeftButtonClick(...u)),
886
- onKeydown: t[6] || (t[6] = (...u) => l.onMoveLeftButtonKey && l.onMoveLeftButtonKey(...u))
887
- }, [
888
- I(g, { class: "icon" })
889
- ], 34),
890
- r("div", {
891
- ref: "moveAllLeft",
892
- class: L({ disabled: l.moveAllLeftButtonDisabled || n.disabled }),
893
- role: "button",
894
- tabindex: "0",
895
- onClick: t[7] || (t[7] = (...u) => l.onMoveAllLeftButtonClick && l.onMoveAllLeftButtonClick(...u)),
896
- onKeydown: t[8] || (t[8] = (...u) => l.onMoveAllLeftButtonKey && l.onMoveAllLeftButtonKey(...u))
897
- }, [
898
- I(p, { class: "icon" })
899
- ], 34)
900
- ]),
901
- I(d, {
902
- ref: "right",
903
- class: L(["list-box", { "with-empty-state-icon": n.emptyStateComponent }]),
904
- "model-value": o.rightSelected,
905
- "with-bottom-value": s.showUnknownIncludedValues,
906
- "bottom-value": { id: o.unknownValuesId, text: n.unknownValuesText },
907
- "with-is-empty-state": n.showEmptyState,
908
- "empty-state-label": n.emptyStateLabel,
909
- "empty-state-component": n.emptyStateComponent,
910
- "possible-values": s.filteredIncludedItems,
911
- size: l.listSize,
912
- "min-size": o.constants.MIN_LIST_SIZE,
913
- ariaLabel: n.rightLabel,
914
- disabled: n.disabled,
915
- onDoubleClickOnItem: l.onRightListBoxDoubleClick,
916
- onDoubleClickShift: l.onRightListBoxShiftDoubleClick,
917
- onKeyArrowLeft: l.moveLeft,
918
- "onUpdate:modelValue": l.onRightInput
919
- }, null, 8, ["class", "model-value", "with-bottom-value", "bottom-value", "with-is-empty-state", "empty-state-label", "empty-state-component", "possible-values", "size", "min-size", "ariaLabel", "disabled", "onDoubleClickOnItem", "onDoubleClickShift", "onKeyArrowLeft", "onUpdate:modelValue"])
920
- ], 2),
921
- n.showResizeHandle ? (c(), x(k, {
922
- key: 1,
923
- "number-of-handles": 2,
924
- "handle-width": o.constants.RESIZE_HANDLE_WIDTH,
925
- "connect-handles-on-resize": "",
926
- "multiple-handles-handle-gap": `${o.constants.BUTTON_WIDTH}px`,
927
- onResizeMove: l.onResizeMove,
928
- onResizeEnd: l.onResizeEnd
929
- }, null, 8, ["handle-width", "multiple-handles-handle-gap", "onResizeMove", "onResizeEnd"])) : y("", !0)
930
- ]);
931
- }
932
- const mt = /* @__PURE__ */ T(N, [["render", tt], ["__scopeId", "data-v-96efc6ba"]]), nt = { class: "info" }, lt = /* @__PURE__ */ j({
933
- __name: "TwinlistLoadingInfo",
934
- setup(e) {
935
- return (t, n) => (c(), v("div", nt, [
936
- n[0] || (n[0] = r("span", null, "Loading...", -1)),
937
- I(z(de), { class: "icon" })
938
- ]));
939
- }
940
- }), vt = /* @__PURE__ */ T(lt, [["__scopeId", "data-v-52b0b5dd"]]);
941
- export {
942
- xe as S,
943
- vt as T,
944
- mt as a,
945
- Ge as u
946
- };