@knime/jsonforms 1.9.4 → 1.10.0
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.
- package/CHANGELOG.md +6 -0
- package/dist/{AnyOfTwinlist-D1KycEHY.js → AnyOfTwinlist-DeqIlR2B.js} +1 -1
- package/dist/{Button-Dj1USqpr.js → Button-CN9kOg52.js} +1 -1
- package/dist/{Checkbox-5l-7O-Rc.js → Checkbox-BECqYUi7.js} +1 -1
- package/dist/{CheckboxControl-CcV_DXsi.js → CheckboxControl-YAifFlUs.js} +2 -2
- package/dist/{Checkboxes-TSVYIY6A.js → Checkboxes-SN0Gyz3F.js} +2 -2
- package/dist/{CheckboxesControl-CEIBobjb.js → CheckboxesControl-B9FhxSt0.js} +2 -2
- package/dist/{ComboBoxControl-FTELjHzm.js → ComboBoxControl-CLROGipS.js} +8 -8
- package/dist/{DateControl-CF5FYRLV.js → DateControl-BMIbCzdJ.js} +1 -1
- package/dist/{DateTimeControl-D1B_TgdP.js → DateTimeControl-CxFb7-M5.js} +2 -2
- package/dist/{DateTimeFormatInput--ahcIWAg.js → DateTimeFormatInput-BoT3Fq6o.js} +3 -3
- package/dist/{DateTimeFormatPickerControl-BliVRAB0.js → DateTimeFormatPickerControl-Bh6dVZmY.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-CXseluiT.js → DateTimeFormatPickerWithTypeControl-7Z0nCv1N.js} +3 -3
- package/dist/{DateTimeInput-DqqCRfzR.js → DateTimeInput-C4Nh_2EL.js} +6 -6
- package/dist/{Dropdown-BfqaIGuC.js → Dropdown-3hPIkzit.js} +5 -5
- package/dist/{DropdownControl-D8-qWkOR.js → DropdownControl-UjRCUZHh.js} +4 -4
- package/dist/{HorizontalLayout-CWRVRpwR.js → HorizontalLayout-CJ_o8Fs4.js} +1 -1
- package/dist/{InputField-C2yLbANc.js → InputField-dinsVJC1.js} +1 -1
- package/dist/{IntegerControl-Bz5KWKoG.js → IntegerControl-DYv-Y9M7.js} +1 -1
- package/dist/{IntervalControl-B0CHqejJ.js → IntervalControl-ETsNbmWj.js} +11 -11
- package/dist/{LoadingDropdown-fVxRhH6V.js → LoadingDropdown-BBu6y57e.js} +3 -3
- package/dist/{MultimodeTwinlistControl-DV_0SHHy.js → MultimodeTwinlistControl-B-Fm5b9C.js} +5 -5
- package/dist/{MultiselectListBox-Cn7ngRfj.js → MultiselectListBox-DiY_1JbY.js} +1 -1
- package/dist/{NameFilter-DTecZo_d.js → NameFilter-ByVouGxz.js} +1 -1
- package/dist/{NumberControl-Bv6y2n41.js → NumberControl-8pxttJYW.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-6m9utn_F.js → NumberControlBase.vue_vue_type_script_setup_true_lang-0MWDRFG4.js} +2 -2
- package/dist/{NumberInput-Ys4Hdd7b.js → NumberInput-BsI5jyyt.js} +1 -1
- package/dist/{OneOfDropdown-CDAPUCNY.js → OneOfDropdown-wSdpOv-h.js} +1 -1
- package/dist/{RadioControl-B2pjYv6_.js → RadioControl-DrHwFQHw.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-CclH-Wwk.js → RadioControlBase.vue_vue_type_script_setup_true_lang-E93Q0_oH.js} +2 -2
- package/dist/{RichTextControl-Cp-ZJ8Qo.js → RichTextControl-C0MHCvEi.js} +5 -5
- package/dist/{SectionHeading-D0esbYSn.js → SectionHeading-Dupn5jB4.js} +1 -1
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-u8QsGw29.js +13803 -0
- package/dist/{SectionLayout-lUG0FeYA.js → SectionLayout-B1wqBbiJ.js} +3 -3
- package/dist/SettingsSubPanel-CENkQVK4.js +5 -0
- package/dist/{SettingsSubPanelLayout-BvbwLKfV.js → SettingsSubPanelLayout-BzokvPPl.js} +4 -4
- package/dist/{SimpleButtonControl-DWLU_5Ny.js → SimpleButtonControl-C5XhU03v.js} +8 -8
- package/dist/{SimpleTwinlistControl-D6ORIuzH.js → SimpleTwinlistControl-B0LaCmtv.js} +2 -2
- package/dist/{SingleSelectControl-BKv71LA7.js → SingleSelectControl-CK4-CrfC.js} +2 -2
- package/dist/{SortListControl-B5N2Hqr2.js → SortListControl-D-JHzIyw.js} +16 -16
- package/dist/{TextAreaControl-Bb1thkUU.js → TextAreaControl-CVjex7AA.js} +1 -1
- package/dist/{TextControl-CuiHsefr.js → TextControl-E0OK9u3d.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-DqaxrzeR.js → TextControl.vue_vue_type_script_setup_true_lang-DIBicKjn.js} +4 -4
- package/dist/{TimeControl-CfdGsohr.js → TimeControl-CjoQmYQT.js} +2 -2
- package/dist/{TwinlistControlBase-CYNUKmVM.js → TwinlistControlBase-BRT_sYid.js} +3 -3
- package/dist/TwinlistLoadingInfo-BHR4sp2h.js +965 -0
- package/dist/{TypedStringFilter-0MA1D7-X.js → TypedStringFilter-C7u3z9EA.js} +1 -1
- package/dist/{ValueSwitch-B6rM3Cb9.js → ValueSwitch-CTCKgRvt.js} +1 -1
- package/dist/{ValueSwitchControl-avfCCusm.js → ValueSwitchControl-DRC37vZO.js} +1 -1
- package/dist/{VerticalLayout-DXyKnMvI.js → VerticalLayout-HTwvzYs2.js} +5 -5
- package/dist/{VerticalLayoutBase-D-TX7EUL.js → VerticalLayoutBase-CaUHhg4c.js} +1 -1
- package/dist/{ZonedDateTimeControl-BNZ8YhWM.js → ZonedDateTimeControl-Dry6mj8Q.js} +4 -4
- package/dist/{_baseEach-FP8ISlsz.js → _baseEach-qp9WwRfp.js} +2 -2
- package/dist/_baseIteratee-D1BrioPy.js +516 -0
- package/dist/{_getTag-DiktJuv_.js → _getTag-D8q3h3ou.js} +25 -26
- package/dist/knime-jsonforms.js +7 -7
- package/dist/{localTimeUtils-Bvx7vLrT.js → localTimeUtils-BAL2gOb_.js} +1 -1
- package/dist/{magic-string.es-CvzN4vs8.js → magic-string.es-BNAF4une.js} +10 -10
- package/dist/src/higherOrderComponents/control/controlToRenderer.d.ts +8 -1
- package/dist/src/higherOrderComponents/control/index.d.ts +1 -0
- package/dist/src/higherOrderComponents/control/validation/types.d.ts +1 -0
- package/dist/src/higherOrderComponents/control/validation/useValidation.d.ts +5 -2
- package/dist/src/renderers/defaultRenderers.d.ts +9 -1
- package/dist/{svgWithTitle-DMRd3aDh.js → svgWithTitle-BomcA1vs.js} +1 -1
- package/dist/testing.js +19 -20
- package/dist/toString-DkTEiU39.js +25 -0
- package/dist/{useBuiltinValidations-iU8yJR-J.js → useBuiltinValidations-DXisZ150.js} +1 -1
- package/dist/{usePossibleValues-CQWkZRBa.js → usePossibleValues-BYX8n8sq.js} +1 -1
- package/package.json +1 -1
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-B3PkFXo7.js +0 -13635
- package/dist/SettingsSubPanel-DlUlLFts.js +0 -5
- package/dist/TwinlistLoadingInfo-CPqVvWp4.js +0 -1044
- package/dist/_baseIteratee-DhaGkQLM.js +0 -518
- package/dist/isObject-B53jY8Qg.js +0 -7
- package/dist/isObjectLike-BatpeCIi.js +0 -29
- package/dist/isSymbol-C3_SC0Qp.js +0 -8
- package/dist/toString-B9O7P854.js +0 -26
|
@@ -0,0 +1,965 @@
|
|
|
1
|
+
import { openBlock as d, createElementBlock as v, createElementVNode as r, computed as c, nextTick as ee, resolveComponent as w, createBlock as V, normalizeClass as k, withCtx as x, renderSlot as te, createVNode as g, createCommentVNode as p, defineComponent as Y, useCssVars as Z, ref as T, normalizeStyle as D, Fragment as ne, renderList as le, unref as H, pushScopeId as N, popScopeId as U, toRef as P, toDisplayString as R } from "vue";
|
|
2
|
+
import { N as se } from "./arrow-next-Qa8PNb04.js";
|
|
3
|
+
import { u as K } from "./useSearch-hpyYQ_6y.js";
|
|
4
|
+
import { z as oe, A as ie, _ as A, q as ae, v as ce } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-u8QsGw29.js";
|
|
5
|
+
import { M as ue } from "./MultiselectListBox-DiY_1JbY.js";
|
|
6
|
+
import { C as de } from "./close-h7XT0ja0.js";
|
|
7
|
+
import { I as re } from "./InputField-dinsVJC1.js";
|
|
8
|
+
import { c as q } from "./createMissingItem-B00Kg95q.js";
|
|
9
|
+
import { L as he } from "./svgWithTitle-BomcA1vs.js";
|
|
10
|
+
const me = {
|
|
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
|
+
}, ve = /* @__PURE__ */ r("circle", {
|
|
17
|
+
cx: "13.2",
|
|
18
|
+
cy: "13.2",
|
|
19
|
+
r: "10"
|
|
20
|
+
}, null, -1), fe = /* @__PURE__ */ r("path", { d: "m20.2 20.2 8.6 8.6" }, null, -1), we = [
|
|
21
|
+
ve,
|
|
22
|
+
fe
|
|
23
|
+
];
|
|
24
|
+
function be(e, n) {
|
|
25
|
+
return d(), v("svg", me, [...we]);
|
|
26
|
+
}
|
|
27
|
+
const Se = { render: be };
|
|
28
|
+
var _e = "Expected a function";
|
|
29
|
+
function ge(e, n, t) {
|
|
30
|
+
var s = !0, o = !0;
|
|
31
|
+
if (typeof e != "function")
|
|
32
|
+
throw new TypeError(_e);
|
|
33
|
+
return ie(t) && (s = "leading" in t ? !!t.leading : s, o = "trailing" in t ? !!t.trailing : o), oe(e, n, {
|
|
34
|
+
leading: s,
|
|
35
|
+
maxWait: n,
|
|
36
|
+
trailing: o
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const W = (e, n, t) => {
|
|
40
|
+
const s = c(() => !e.value || e.value.length === 0 ? 0 : e.value.length), o = c(() => 0);
|
|
41
|
+
return ((m, f, i) => `${m} of ${f} entries`)(
|
|
42
|
+
s.value,
|
|
43
|
+
n,
|
|
44
|
+
o.value
|
|
45
|
+
);
|
|
46
|
+
}, Ie = {
|
|
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
|
+
}, pe = /* @__PURE__ */ 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), ye = [
|
|
53
|
+
pe
|
|
54
|
+
];
|
|
55
|
+
function Le(e, n) {
|
|
56
|
+
return d(), v("svg", Ie, [...ye]);
|
|
57
|
+
}
|
|
58
|
+
const ke = { render: Le }, Be = {
|
|
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
|
+
}, xe = /* @__PURE__ */ r("path", {
|
|
65
|
+
fill: "#000",
|
|
66
|
+
stroke: "none",
|
|
67
|
+
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",
|
|
68
|
+
class: "text"
|
|
69
|
+
}, null, -1), Ve = [
|
|
70
|
+
xe
|
|
71
|
+
];
|
|
72
|
+
function Ce(e, n) {
|
|
73
|
+
return d(), v("svg", Be, [...Ve]);
|
|
74
|
+
}
|
|
75
|
+
const Me = { render: Ce }, Re = {
|
|
76
|
+
clear: "Clear",
|
|
77
|
+
inverseSearch: "Exclude results that match query",
|
|
78
|
+
caseSensitive: "Toggle case sensitivity"
|
|
79
|
+
}, Ee = {
|
|
80
|
+
name: "SearchInput",
|
|
81
|
+
components: {
|
|
82
|
+
InputField: re,
|
|
83
|
+
FunctionButton: ae,
|
|
84
|
+
CloseIcon: de,
|
|
85
|
+
LensIcon: Se,
|
|
86
|
+
InverseSearchIcon: ke,
|
|
87
|
+
UpperLowerCaseIcon: Me
|
|
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 { ...Re, ...this.tooltips };
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
async mounted() {
|
|
178
|
+
this.focusOnMount && (await ee(), 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
|
+
}, Te = {
|
|
195
|
+
key: 0,
|
|
196
|
+
class: "icon-slot-wrapper"
|
|
197
|
+
}, Ae = {
|
|
198
|
+
key: 1,
|
|
199
|
+
class: "spacer"
|
|
200
|
+
};
|
|
201
|
+
function De(e, n, t, s, o, l) {
|
|
202
|
+
const m = w("LensIcon"), f = w("CloseIcon"), i = w("FunctionButton"), _ = w("UpperLowerCaseIcon"), b = w("InverseSearchIcon"), S = w("InputField");
|
|
203
|
+
return d(), V(S, {
|
|
204
|
+
id: t.id,
|
|
205
|
+
ref: "searchInput",
|
|
206
|
+
name: t.name,
|
|
207
|
+
"model-value": t.modelValue,
|
|
208
|
+
placeholder: t.placeholder,
|
|
209
|
+
autofocus: t.autofocus,
|
|
210
|
+
disabled: t.disabled,
|
|
211
|
+
class: k(["search-input", { disabled: t.disabled }]),
|
|
212
|
+
autocomplete: "off",
|
|
213
|
+
"aria-owns": t.ariaOwns,
|
|
214
|
+
"aria-activedescendant": t.ariaActivedescendant,
|
|
215
|
+
role: "searchbox",
|
|
216
|
+
compact: t.compact,
|
|
217
|
+
onFocus: n[0] || (n[0] = (I) => e.$emit("focus", I)),
|
|
218
|
+
"onUpdate:modelValue": n[1] || (n[1] = (I) => e.$emit("update:modelValue", I))
|
|
219
|
+
}, {
|
|
220
|
+
icon: x(() => [
|
|
221
|
+
t.disabled ? p("", !0) : (d(), v("div", Te, [
|
|
222
|
+
te(e.$slots, "icon", {}, () => [
|
|
223
|
+
g(m)
|
|
224
|
+
], !0)
|
|
225
|
+
]))
|
|
226
|
+
]),
|
|
227
|
+
iconRight: x(() => [
|
|
228
|
+
l.showClearButton ? (d(), V(i, {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: "clear-search",
|
|
231
|
+
compact: t.compact,
|
|
232
|
+
title: l.tooltipsWithDefaults.clear,
|
|
233
|
+
onClick: l.clearSearch
|
|
234
|
+
}, {
|
|
235
|
+
default: x(() => [
|
|
236
|
+
g(f)
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["compact", "title", "onClick"])) : p("", !0),
|
|
240
|
+
l.showSpacer ? (d(), v("span", Ae)) : p("", !0),
|
|
241
|
+
!t.disabled && t.showCaseSensitiveSearchButton ? (d(), V(i, {
|
|
242
|
+
key: 2,
|
|
243
|
+
class: "toggle-case-sensitive-search",
|
|
244
|
+
compact: t.compact,
|
|
245
|
+
active: o.caseSensitiveSearch,
|
|
246
|
+
title: l.tooltipsWithDefaults.caseSensitive,
|
|
247
|
+
onClick: l.toggleCaseSensitiveSearch
|
|
248
|
+
}, {
|
|
249
|
+
default: x(() => [
|
|
250
|
+
g(_)
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
}, 8, ["compact", "active", "title", "onClick"])) : p("", !0),
|
|
254
|
+
!t.disabled && t.showInverseSearchButton ? (d(), V(i, {
|
|
255
|
+
key: 3,
|
|
256
|
+
class: "toggle-inverse-search",
|
|
257
|
+
compact: t.compact,
|
|
258
|
+
title: l.tooltipsWithDefaults.inverseSearch,
|
|
259
|
+
active: o.inverseSearch,
|
|
260
|
+
onClick: l.toggleInverseSearch
|
|
261
|
+
}, {
|
|
262
|
+
default: x(() => [
|
|
263
|
+
g(b)
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["compact", "title", "active", "onClick"])) : p("", !0)
|
|
267
|
+
]),
|
|
268
|
+
_: 3
|
|
269
|
+
}, 8, ["id", "name", "model-value", "placeholder", "autofocus", "disabled", "class", "aria-owns", "aria-activedescendant", "compact"]);
|
|
270
|
+
}
|
|
271
|
+
const ze = /* @__PURE__ */ A(Ee, [["render", De], ["__scopeId", "data-v-edba0a22"]]), He = {
|
|
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
|
+
}, Ne = /* @__PURE__ */ r("path", { d: "m14.8 5 11 11-11 11M6.2 5l11 11-11 11" }, null, -1), Ue = [
|
|
278
|
+
Ne
|
|
279
|
+
];
|
|
280
|
+
function Oe(e, n) {
|
|
281
|
+
return d(), v("svg", He, [...Ue]);
|
|
282
|
+
}
|
|
283
|
+
const Pe = { render: Oe }, Ke = {
|
|
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
|
+
}, qe = /* @__PURE__ */ r("path", { d: "m17.2 27-11-11 11-11m8.6 22-11-11 11-11" }, null, -1), We = [
|
|
290
|
+
qe
|
|
291
|
+
];
|
|
292
|
+
function Fe(e, n) {
|
|
293
|
+
return d(), v("svg", Ke, [...We]);
|
|
294
|
+
}
|
|
295
|
+
const je = { render: Fe }, Ge = {
|
|
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
|
+
}, Ye = /* @__PURE__ */ r("path", { d: "m21.5 27-11-11 11-11" }, null, -1), Ze = [
|
|
302
|
+
Ye
|
|
303
|
+
];
|
|
304
|
+
function Xe(e, n) {
|
|
305
|
+
return d(), v("svg", Ge, [...Ze]);
|
|
306
|
+
}
|
|
307
|
+
const Je = { render: Xe }, Qe = (e) => (N("data-v-d36066f7"), e = e(), U(), e), $e = /* @__PURE__ */ Qe(() => /* @__PURE__ */ r("div", { class: "handle" }, null, -1)), et = [
|
|
308
|
+
$e
|
|
309
|
+
], tt = 10, F = "2px", nt = /* @__PURE__ */ Y({
|
|
310
|
+
__name: "ResizeHandle",
|
|
311
|
+
props: {
|
|
312
|
+
numberOfHandles: {},
|
|
313
|
+
handleWidth: {},
|
|
314
|
+
connectHandlesOnResize: { type: Boolean, default: !1 },
|
|
315
|
+
multipleHandlesHandleGap: { default: "0px" },
|
|
316
|
+
disabled: { type: Boolean, default: !1 }
|
|
317
|
+
},
|
|
318
|
+
emits: ["resize-move", "resize-end"],
|
|
319
|
+
setup(e, { emit: n }) {
|
|
320
|
+
Z((a) => ({
|
|
321
|
+
"36bdd4ea": F
|
|
322
|
+
}));
|
|
323
|
+
const t = n, s = e, o = T(0), l = T(null), m = c(
|
|
324
|
+
() => `calc(${s.handleWidth} + 2 * ${F})`
|
|
325
|
+
), f = c(
|
|
326
|
+
() => s.connectHandlesOnResize && s.numberOfHandles > 1 && l.value !== null
|
|
327
|
+
), i = c(
|
|
328
|
+
() => `(${s.numberOfHandles} - 1) * ${s.multipleHandlesHandleGap}`
|
|
329
|
+
), _ = c(
|
|
330
|
+
() => `(2 * ${s.numberOfHandles})`
|
|
331
|
+
), b = c(
|
|
332
|
+
() => `(100% - ${i.value}) / ${_.value}`
|
|
333
|
+
), S = c(
|
|
334
|
+
() => `calc(100% - 2 * ${b.value})`
|
|
335
|
+
), I = (a) => {
|
|
336
|
+
s.disabled || (a.target.setPointerCapture(a.pointerId), a.preventDefault(), l.value = a.pointerId, o.value = a.clientY);
|
|
337
|
+
}, B = ge((a) => {
|
|
338
|
+
if (l.value === a.pointerId) {
|
|
339
|
+
const L = a.clientY - o.value;
|
|
340
|
+
(L < 0 && a.offsetY <= 0 || L > 0 && a.offsetY >= 0) && t("resize-move", L), o.value = a.clientY;
|
|
341
|
+
}
|
|
342
|
+
}, tt), u = (a) => {
|
|
343
|
+
l.value === a.pointerId && (o.value = 0, l.value = null, t("resize-end"));
|
|
344
|
+
};
|
|
345
|
+
return (a, L) => (d(), v("div", {
|
|
346
|
+
class: "resize-handle-container",
|
|
347
|
+
style: D({ gap: a.multipleHandlesHandleGap })
|
|
348
|
+
}, [
|
|
349
|
+
f.value ? (d(), v("div", {
|
|
350
|
+
key: 0,
|
|
351
|
+
class: "handle connection",
|
|
352
|
+
style: D({ width: S.value })
|
|
353
|
+
}, null, 4)) : p("", !0),
|
|
354
|
+
(d(!0), v(ne, null, le(a.numberOfHandles, (C) => (d(), v("div", {
|
|
355
|
+
key: C,
|
|
356
|
+
class: k(["handle-container", { disabled: a.disabled }]),
|
|
357
|
+
style: D({ width: m.value }),
|
|
358
|
+
onPointerdown: I,
|
|
359
|
+
onPointerup: u,
|
|
360
|
+
onPointermove: L[0] || (L[0] = //@ts-ignore
|
|
361
|
+
(...M) => H(B) && H(B)(...M)),
|
|
362
|
+
onLostpointercapture: u
|
|
363
|
+
}, et, 38))), 128))
|
|
364
|
+
], 4));
|
|
365
|
+
}
|
|
366
|
+
}), lt = /* @__PURE__ */ A(nt, [["__scopeId", "data-v-d36066f7"]]), E = "Enter", z = 5, X = 30, J = 24, st = 4, ot = 56, it = ["left", "right"], at = st * J + 2 * ot, ct = `calc((100% - ${X}px) * 1 / 6)`, ut = (e) => {
|
|
367
|
+
const n = c(
|
|
368
|
+
() => e.value !== null && "includeUnknownValues" in e.value ? { withUnknownValues: e.value } : { standard: e.value }
|
|
369
|
+
), t = c(() => typeof n.value.standard < "u" ? n.value.standard : n.value.withUnknownValues.includedValues), s = c(
|
|
370
|
+
() => {
|
|
371
|
+
var i;
|
|
372
|
+
return ((i = n.value.withUnknownValues) == null ? void 0 : i.excludedValues) ?? null;
|
|
373
|
+
}
|
|
374
|
+
), o = c(
|
|
375
|
+
() => {
|
|
376
|
+
var i;
|
|
377
|
+
return ((i = n.value.withUnknownValues) == null ? void 0 : i.includeUnknownValues) ?? null;
|
|
378
|
+
}
|
|
379
|
+
), l = c(
|
|
380
|
+
() => o.value === !1
|
|
381
|
+
), m = c(
|
|
382
|
+
() => o.value === !0
|
|
383
|
+
);
|
|
384
|
+
return {
|
|
385
|
+
includedValues: t,
|
|
386
|
+
excludedValues: s,
|
|
387
|
+
showUnknownExcludedValues: l,
|
|
388
|
+
showUnknownIncludedValues: m,
|
|
389
|
+
getEmitValue: (i, _ = (S) => S, b = (S) => S) => n.value.withUnknownValues ? {
|
|
390
|
+
includedValues: i,
|
|
391
|
+
excludedValues: _(s.value),
|
|
392
|
+
includeUnknownValues: b(
|
|
393
|
+
n.value.withUnknownValues.includeUnknownValues
|
|
394
|
+
)
|
|
395
|
+
} : i
|
|
396
|
+
};
|
|
397
|
+
}, O = {
|
|
398
|
+
name: "Twinlist",
|
|
399
|
+
components: {
|
|
400
|
+
ArrowNextDoubleIcon: Pe,
|
|
401
|
+
ArrowNextIcon: se,
|
|
402
|
+
ArrowPrevDoubleIcon: je,
|
|
403
|
+
ArrowPrevIcon: Je,
|
|
404
|
+
MultiselectListBox: ue,
|
|
405
|
+
Label: ce,
|
|
406
|
+
SearchInput: ze,
|
|
407
|
+
ResizeHandle: lt
|
|
408
|
+
},
|
|
409
|
+
props: {
|
|
410
|
+
modelValue: {
|
|
411
|
+
type: [Object, Array, null],
|
|
412
|
+
default: null
|
|
413
|
+
},
|
|
414
|
+
initialCaseSensitiveSearch: {
|
|
415
|
+
default: !1,
|
|
416
|
+
type: Boolean
|
|
417
|
+
},
|
|
418
|
+
initialSearchTerm: {
|
|
419
|
+
type: String,
|
|
420
|
+
required: !1,
|
|
421
|
+
default: ""
|
|
422
|
+
},
|
|
423
|
+
/**
|
|
424
|
+
* Hiding and disabling
|
|
425
|
+
*/
|
|
426
|
+
showSearch: {
|
|
427
|
+
default: !1,
|
|
428
|
+
type: Boolean
|
|
429
|
+
},
|
|
430
|
+
disabled: {
|
|
431
|
+
default: !1,
|
|
432
|
+
type: Boolean
|
|
433
|
+
},
|
|
434
|
+
showEmptyState: {
|
|
435
|
+
default: !0,
|
|
436
|
+
type: Boolean
|
|
437
|
+
},
|
|
438
|
+
/**
|
|
439
|
+
* Labels
|
|
440
|
+
*/
|
|
441
|
+
leftLabel: {
|
|
442
|
+
type: String,
|
|
443
|
+
required: !0,
|
|
444
|
+
default: "Possible values"
|
|
445
|
+
},
|
|
446
|
+
rightLabel: {
|
|
447
|
+
type: String,
|
|
448
|
+
required: !0,
|
|
449
|
+
default: "Selected values"
|
|
450
|
+
},
|
|
451
|
+
withSearchLabel: {
|
|
452
|
+
default: !1,
|
|
453
|
+
type: Boolean
|
|
454
|
+
},
|
|
455
|
+
searchLabel: {
|
|
456
|
+
type: String,
|
|
457
|
+
required: !1,
|
|
458
|
+
default: "Search values"
|
|
459
|
+
},
|
|
460
|
+
searchPlaceholder: {
|
|
461
|
+
type: String,
|
|
462
|
+
required: !1,
|
|
463
|
+
default: "Search"
|
|
464
|
+
},
|
|
465
|
+
unknownValuesText: {
|
|
466
|
+
type: String,
|
|
467
|
+
required: !1,
|
|
468
|
+
default: "Unknown values"
|
|
469
|
+
},
|
|
470
|
+
/**
|
|
471
|
+
* Is only used when emptyStateComponent is null
|
|
472
|
+
*/
|
|
473
|
+
emptyStateLabel: {
|
|
474
|
+
default: "No entries in this list",
|
|
475
|
+
type: String
|
|
476
|
+
},
|
|
477
|
+
/**
|
|
478
|
+
* this component is displayed centered in the middle of the box in case it is empty
|
|
479
|
+
*/
|
|
480
|
+
emptyStateComponent: {
|
|
481
|
+
default: null,
|
|
482
|
+
type: Object
|
|
483
|
+
},
|
|
484
|
+
/**
|
|
485
|
+
* Controls the size of the list.
|
|
486
|
+
* Number of visible items (for others user need to scroll)
|
|
487
|
+
* - 0 means all
|
|
488
|
+
* - values 1 - 4 are ignored; 5 is minimum
|
|
489
|
+
*/
|
|
490
|
+
size: {
|
|
491
|
+
type: Number,
|
|
492
|
+
default: 0,
|
|
493
|
+
validator(e) {
|
|
494
|
+
return e >= 0;
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
showResizeHandle: {
|
|
498
|
+
type: Boolean,
|
|
499
|
+
default: !1
|
|
500
|
+
},
|
|
501
|
+
isValid: {
|
|
502
|
+
default: !0,
|
|
503
|
+
type: Boolean
|
|
504
|
+
},
|
|
505
|
+
/**
|
|
506
|
+
* List of possible values. Each item must have an `id` and a `text` property
|
|
507
|
+
* @example
|
|
508
|
+
* [{
|
|
509
|
+
* id: 'pdf',
|
|
510
|
+
* text: 'PDF'
|
|
511
|
+
* }, {
|
|
512
|
+
* id: 'XLS',
|
|
513
|
+
* text: 'Excel',
|
|
514
|
+
* }]
|
|
515
|
+
*/
|
|
516
|
+
possibleValues: {
|
|
517
|
+
type: Array,
|
|
518
|
+
default: () => []
|
|
519
|
+
},
|
|
520
|
+
compact: {
|
|
521
|
+
type: Boolean,
|
|
522
|
+
default: !1
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
emits: [
|
|
526
|
+
/**
|
|
527
|
+
* This event gets emitted whenever the user changes the selection.
|
|
528
|
+
* In case the modelValue of this Twinlist is with unknown values, the emitted value here will also be.
|
|
529
|
+
*/
|
|
530
|
+
"update:modelValue"
|
|
531
|
+
],
|
|
532
|
+
setup(e) {
|
|
533
|
+
const {
|
|
534
|
+
includedValues: n,
|
|
535
|
+
excludedValues: t,
|
|
536
|
+
showUnknownExcludedValues: s,
|
|
537
|
+
showUnknownIncludedValues: o,
|
|
538
|
+
getEmitValue: l
|
|
539
|
+
} = ut(P(e, "modelValue")), m = T(e.initialSearchTerm), f = T(e.initialCaseSensitiveSearch), i = c(() => e.possibleValues.map((h) => h.id)), _ = c(() => new Set(i.value)), b = c(() => n.value ? o.value ? n.value.filter(
|
|
540
|
+
(h) => _.value.has(h)
|
|
541
|
+
) : n.value : null), S = c(() => Object.assign(
|
|
542
|
+
{},
|
|
543
|
+
...e.possibleValues.map((h, y) => ({
|
|
544
|
+
[h.id]: { item: h, index: y }
|
|
545
|
+
}))
|
|
546
|
+
)), I = c(() => b.value === null ? [] : b.value.map(
|
|
547
|
+
(h) => {
|
|
548
|
+
var y;
|
|
549
|
+
return ((y = S.value[h]) == null ? void 0 : y.item) || q(h);
|
|
550
|
+
}
|
|
551
|
+
)), B = P(e, "showSearch"), u = K(
|
|
552
|
+
m,
|
|
553
|
+
f,
|
|
554
|
+
I,
|
|
555
|
+
B
|
|
556
|
+
), a = c(() => {
|
|
557
|
+
if (!t.value) {
|
|
558
|
+
const h = new Set(n.value);
|
|
559
|
+
return i.value.filter(
|
|
560
|
+
(y) => !h.has(y)
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
return s.value ? t.value.filter(
|
|
564
|
+
(h) => _.value.has(h)
|
|
565
|
+
) : t.value;
|
|
566
|
+
}), L = c(() => b.value === null ? [] : a.value.map(
|
|
567
|
+
(h) => {
|
|
568
|
+
var y;
|
|
569
|
+
return ((y = S.value[h]) == null ? void 0 : y.item) || q(h);
|
|
570
|
+
}
|
|
571
|
+
)), C = K(
|
|
572
|
+
m,
|
|
573
|
+
f,
|
|
574
|
+
L,
|
|
575
|
+
B
|
|
576
|
+
), M = c(() => e.showSearch && m.value !== ""), Q = c(() => e.showSearch && M.value ? W(C, a.value.length) : null), $ = c(() => {
|
|
577
|
+
var h;
|
|
578
|
+
return e.showSearch && M.value ? W(
|
|
579
|
+
u,
|
|
580
|
+
(h = b.value) == null ? void 0 : h.length
|
|
581
|
+
) : null;
|
|
582
|
+
});
|
|
583
|
+
return {
|
|
584
|
+
includedValues: n,
|
|
585
|
+
excludedValues: t,
|
|
586
|
+
showUnknownExcludedValues: s,
|
|
587
|
+
showUnknownIncludedValues: o,
|
|
588
|
+
getEmitValue: l,
|
|
589
|
+
searchTerm: m,
|
|
590
|
+
filteredExcludedItems: C,
|
|
591
|
+
filteredIncludedItems: u,
|
|
592
|
+
knownExcludedValues: a,
|
|
593
|
+
knownIncludedValues: b,
|
|
594
|
+
possibleValueIds: i,
|
|
595
|
+
possibleValueIdsSet: _,
|
|
596
|
+
excludedLabels: Q,
|
|
597
|
+
includedLabels: $,
|
|
598
|
+
caseSensitiveSearch: f,
|
|
599
|
+
allIncludedItems: I,
|
|
600
|
+
possibleValueMap: S
|
|
601
|
+
};
|
|
602
|
+
},
|
|
603
|
+
data() {
|
|
604
|
+
return {
|
|
605
|
+
invalidPossibleValueIds: /* @__PURE__ */ new Set(),
|
|
606
|
+
rightSelected: [],
|
|
607
|
+
leftSelected: [],
|
|
608
|
+
unknownValuesId: Symbol("Unknown values"),
|
|
609
|
+
constants: Object.freeze({
|
|
610
|
+
MIN_LIST_SIZE: z,
|
|
611
|
+
BUTTON_HEIGHT: J,
|
|
612
|
+
BUTTON_WIDTH: X,
|
|
613
|
+
RESIZE_HANDLE_WIDTH: ct,
|
|
614
|
+
MAX_HEIGHT_BUTTONS_CENTER_ALIGNMENT: at
|
|
615
|
+
})
|
|
616
|
+
};
|
|
617
|
+
},
|
|
618
|
+
computed: {
|
|
619
|
+
listSize() {
|
|
620
|
+
const e = this.size === 0 ? this.possibleValues.length : this.size;
|
|
621
|
+
return e > z ? e : z;
|
|
622
|
+
},
|
|
623
|
+
moveAllRightButtonDisabled() {
|
|
624
|
+
return this.filteredExcludedItems.length === 0 && !this.showUnknownExcludedValues;
|
|
625
|
+
},
|
|
626
|
+
moveRightButtonDisabled() {
|
|
627
|
+
return this.leftSelected.length === 0;
|
|
628
|
+
},
|
|
629
|
+
moveAllLeftButtonDisabled() {
|
|
630
|
+
return this.filteredIncludedItems.length === 0 && !this.showUnknownIncludedValues;
|
|
631
|
+
},
|
|
632
|
+
moveLeftButtonDisabled() {
|
|
633
|
+
return this.rightSelected.length === 0;
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
mounted() {
|
|
637
|
+
this.showResizeHandle && this.getListBoxes().forEach((e) => e.initResizeHeight());
|
|
638
|
+
},
|
|
639
|
+
methods: {
|
|
640
|
+
getIndex(e) {
|
|
641
|
+
var n;
|
|
642
|
+
return ((n = this.possibleValueMap[e]) == null ? void 0 : n.index) ?? -1;
|
|
643
|
+
},
|
|
644
|
+
compareByOriginalSorting(e, n) {
|
|
645
|
+
return this.getIndex(e) - this.getIndex(n);
|
|
646
|
+
},
|
|
647
|
+
clearSelections() {
|
|
648
|
+
this.getListBoxes().forEach((e) => e.clearSelection());
|
|
649
|
+
},
|
|
650
|
+
moveItems(e, {
|
|
651
|
+
toNewIncludedValues: n,
|
|
652
|
+
toNewExcludedValues: t
|
|
653
|
+
}) {
|
|
654
|
+
const s = e.filter((i) => i !== this.unknownValuesId), o = e.length > s.length, l = {
|
|
655
|
+
knownValues: s,
|
|
656
|
+
movingUnknownValues: o
|
|
657
|
+
};
|
|
658
|
+
let m = null, f = null;
|
|
659
|
+
this.includedValues !== null && (m = n({
|
|
660
|
+
previous: this.includedValues,
|
|
661
|
+
movingParts: l
|
|
662
|
+
})), this.excludedValues && (f = t({
|
|
663
|
+
previous: this.knownExcludedValues,
|
|
664
|
+
movingParts: l
|
|
665
|
+
})), this.clearSelections(), this.$emit(
|
|
666
|
+
"update:modelValue",
|
|
667
|
+
this.getEmitValue(
|
|
668
|
+
m,
|
|
669
|
+
() => f,
|
|
670
|
+
(i) => o ? !i : i
|
|
671
|
+
)
|
|
672
|
+
);
|
|
673
|
+
},
|
|
674
|
+
moveRight(e = null) {
|
|
675
|
+
this.moveItems(e ?? this.leftSelected, {
|
|
676
|
+
toNewIncludedValues: this.addMovedItems.bind(this),
|
|
677
|
+
toNewExcludedValues: this.filterMovedItems.bind(this)
|
|
678
|
+
});
|
|
679
|
+
},
|
|
680
|
+
moveLeft(e = null) {
|
|
681
|
+
this.moveItems(e ?? this.rightSelected, {
|
|
682
|
+
toNewIncludedValues: this.filterMovedItems.bind(this),
|
|
683
|
+
toNewExcludedValues: this.addMovedItems.bind(this)
|
|
684
|
+
});
|
|
685
|
+
},
|
|
686
|
+
/**
|
|
687
|
+
* Filters out the moved items and also invalid items if unknown values are being moved.
|
|
688
|
+
*/
|
|
689
|
+
filterMovedItems({
|
|
690
|
+
previous: e,
|
|
691
|
+
movingParts: { movingUnknownValues: n, knownValues: t }
|
|
692
|
+
}) {
|
|
693
|
+
const s = new Set(t);
|
|
694
|
+
return e.filter(
|
|
695
|
+
(o) => !s.has(o) && (!n || this.possibleValueIdsSet.has(o))
|
|
696
|
+
);
|
|
697
|
+
},
|
|
698
|
+
/**
|
|
699
|
+
* Adds the given items sorting by the order in the possible values afterwards and removing invalid items
|
|
700
|
+
* if unknown values are being moved
|
|
701
|
+
*/
|
|
702
|
+
addMovedItems({
|
|
703
|
+
previous: e,
|
|
704
|
+
movingParts: { movingUnknownValues: n, knownValues: t }
|
|
705
|
+
}) {
|
|
706
|
+
return [
|
|
707
|
+
...n ? e.filter((s) => this.possibleValueIdsSet.has(s)) : e,
|
|
708
|
+
...t.filter((s) => this.possibleValueIdsSet.has(s))
|
|
709
|
+
].sort(this.compareByOriginalSorting);
|
|
710
|
+
},
|
|
711
|
+
onMoveRightButtonClick() {
|
|
712
|
+
this.moveRight();
|
|
713
|
+
},
|
|
714
|
+
onMoveAllRightButtonClick() {
|
|
715
|
+
const e = this.filteredExcludedItems.map((n) => n.id);
|
|
716
|
+
this.moveRight(
|
|
717
|
+
e.concat(
|
|
718
|
+
this.showUnknownExcludedValues ? [this.unknownValuesId] : []
|
|
719
|
+
)
|
|
720
|
+
);
|
|
721
|
+
},
|
|
722
|
+
onMoveAllRightButtonKey(e) {
|
|
723
|
+
e.key === E && (this.onMoveAllRightButtonClick(), this.stopPropagation(e));
|
|
724
|
+
},
|
|
725
|
+
onMoveRightButtonKey(e) {
|
|
726
|
+
e.key === E && (this.moveRight(), this.stopPropagation(e));
|
|
727
|
+
},
|
|
728
|
+
onMoveLeftButtonClick() {
|
|
729
|
+
this.moveLeft();
|
|
730
|
+
},
|
|
731
|
+
onMoveAllLeftButtonClick() {
|
|
732
|
+
const e = this.filteredIncludedItems.map((n) => n.id);
|
|
733
|
+
this.moveLeft(
|
|
734
|
+
e.concat(
|
|
735
|
+
this.showUnknownIncludedValues ? [this.unknownValuesId] : []
|
|
736
|
+
)
|
|
737
|
+
);
|
|
738
|
+
},
|
|
739
|
+
onMoveLeftButtonKey(e) {
|
|
740
|
+
e.key === E && (this.moveLeft(), this.stopPropagation(e));
|
|
741
|
+
},
|
|
742
|
+
onMoveAllLeftButtonKey(e) {
|
|
743
|
+
e.key === E && (this.onMoveAllLeftButtonClick(), this.stopPropagation(e));
|
|
744
|
+
},
|
|
745
|
+
stopPropagation(e) {
|
|
746
|
+
e.preventDefault(), e.stopPropagation();
|
|
747
|
+
},
|
|
748
|
+
onLeftListBoxDoubleClick(e) {
|
|
749
|
+
this.moveRight([e]);
|
|
750
|
+
},
|
|
751
|
+
onLeftListBoxShiftDoubleClick(e) {
|
|
752
|
+
this.moveRight(e);
|
|
753
|
+
},
|
|
754
|
+
onRightListBoxDoubleClick(e) {
|
|
755
|
+
this.moveLeft([e]);
|
|
756
|
+
},
|
|
757
|
+
onRightListBoxShiftDoubleClick(e) {
|
|
758
|
+
this.moveLeft(e);
|
|
759
|
+
},
|
|
760
|
+
onLeftInput(e) {
|
|
761
|
+
e.length > 0 && this.$refs.right.clearSelection(), this.leftSelected = e;
|
|
762
|
+
},
|
|
763
|
+
onRightInput(e) {
|
|
764
|
+
e.length > 0 && this.$refs.left.clearSelection(), this.rightSelected = e;
|
|
765
|
+
},
|
|
766
|
+
onSearchInput(e) {
|
|
767
|
+
this.searchTerm = e;
|
|
768
|
+
},
|
|
769
|
+
hasSelection() {
|
|
770
|
+
var e;
|
|
771
|
+
return (((e = this.includedValues) == null ? void 0 : e.length) ?? 0) > 0;
|
|
772
|
+
},
|
|
773
|
+
validate() {
|
|
774
|
+
const e = !this.filteredIncludedItems.some((n) => n.invalid) && (!this.excludedValues || !this.filteredExcludedItems.some((n) => n.invalid));
|
|
775
|
+
return {
|
|
776
|
+
isValid: e,
|
|
777
|
+
errorMessage: e ? null : "One or more of the selected items is invalid."
|
|
778
|
+
};
|
|
779
|
+
},
|
|
780
|
+
getListBoxes() {
|
|
781
|
+
return it.map(
|
|
782
|
+
(e) => this.$refs[e]
|
|
783
|
+
);
|
|
784
|
+
},
|
|
785
|
+
onResizeMove(e) {
|
|
786
|
+
this.getListBoxes().forEach((n) => n.onResizeMove(e));
|
|
787
|
+
},
|
|
788
|
+
onResizeEnd() {
|
|
789
|
+
this.getListBoxes().forEach((e) => e.onResizeEnd());
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}, j = () => {
|
|
793
|
+
Z((e) => ({
|
|
794
|
+
"26ea00eb": `${e.constants.BUTTON_WIDTH}px`,
|
|
795
|
+
ab175dd0: `${e.constants.MAX_HEIGHT_BUTTONS_CENTER_ALIGNMENT}px`,
|
|
796
|
+
"6a6fa818": `${e.constants.BUTTON_HEIGHT}px`
|
|
797
|
+
}));
|
|
798
|
+
}, G = O.setup;
|
|
799
|
+
O.setup = G ? (e, n) => (j(), G(e, n)) : j;
|
|
800
|
+
const dt = (e) => (N("data-v-4808b939"), e = e(), U(), e), rt = { class: "twinlist" }, ht = { class: "header" }, mt = { class: "title" }, vt = ["title"], ft = ["title"], wt = /* @__PURE__ */ dt(() => /* @__PURE__ */ r("div", { class: "space" }, null, -1)), bt = { class: "title" }, St = ["title"], _t = ["title"], gt = { class: "buttons" };
|
|
801
|
+
function It(e, n, t, s, o, l) {
|
|
802
|
+
const m = w("SearchInput"), f = w("Label"), i = w("MultiselectListBox"), _ = w("ArrowNextIcon"), b = w("ArrowNextDoubleIcon"), S = w("ArrowPrevIcon"), I = w("ArrowPrevDoubleIcon"), B = w("ResizeHandle");
|
|
803
|
+
return d(), v("div", rt, [
|
|
804
|
+
t.showSearch ? (d(), V(f, {
|
|
805
|
+
key: 0,
|
|
806
|
+
active: t.withSearchLabel,
|
|
807
|
+
text: t.searchLabel,
|
|
808
|
+
class: "search-wrapper"
|
|
809
|
+
}, {
|
|
810
|
+
default: x(({ labelForId: u }) => [
|
|
811
|
+
g(m, {
|
|
812
|
+
id: u,
|
|
813
|
+
ref: "search",
|
|
814
|
+
placeholder: t.searchPlaceholder,
|
|
815
|
+
"model-value": s.searchTerm,
|
|
816
|
+
label: t.searchLabel,
|
|
817
|
+
"initial-case-sensitive-search": t.initialCaseSensitiveSearch,
|
|
818
|
+
"show-case-sensitive-search-button": "",
|
|
819
|
+
disabled: t.disabled,
|
|
820
|
+
tooltips: {
|
|
821
|
+
inverseSearch: "Move matching to other side"
|
|
822
|
+
},
|
|
823
|
+
compact: t.compact,
|
|
824
|
+
"onUpdate:modelValue": l.onSearchInput,
|
|
825
|
+
onToggleCaseSensitiveSearch: n[0] || (n[0] = (a) => s.caseSensitiveSearch = a)
|
|
826
|
+
}, null, 8, ["id", "placeholder", "model-value", "label", "initial-case-sensitive-search", "disabled", "compact", "onUpdate:modelValue"])
|
|
827
|
+
]),
|
|
828
|
+
_: 1
|
|
829
|
+
}, 8, ["active", "text"])) : p("", !0),
|
|
830
|
+
r("div", ht, [
|
|
831
|
+
r("div", mt, [
|
|
832
|
+
r("div", {
|
|
833
|
+
class: "label",
|
|
834
|
+
title: t.leftLabel
|
|
835
|
+
}, R(t.leftLabel), 9, vt),
|
|
836
|
+
s.excludedLabels ? (d(), v("div", {
|
|
837
|
+
key: 0,
|
|
838
|
+
title: s.excludedLabels,
|
|
839
|
+
class: "info"
|
|
840
|
+
}, R(s.excludedLabels), 9, ft)) : p("", !0)
|
|
841
|
+
]),
|
|
842
|
+
wt,
|
|
843
|
+
r("div", bt, [
|
|
844
|
+
r("div", {
|
|
845
|
+
class: "label",
|
|
846
|
+
title: t.rightLabel
|
|
847
|
+
}, R(t.rightLabel), 9, St),
|
|
848
|
+
s.includedLabels ? (d(), v("div", {
|
|
849
|
+
key: 0,
|
|
850
|
+
title: s.includedLabels,
|
|
851
|
+
class: "info"
|
|
852
|
+
}, R(s.includedLabels), 9, _t)) : p("", !0)
|
|
853
|
+
])
|
|
854
|
+
]),
|
|
855
|
+
r("div", {
|
|
856
|
+
class: k(["lists", { disabled: t.disabled }])
|
|
857
|
+
}, [
|
|
858
|
+
g(i, {
|
|
859
|
+
ref: "left",
|
|
860
|
+
"with-is-empty-state": t.showEmptyState,
|
|
861
|
+
"empty-state-label": t.emptyStateLabel,
|
|
862
|
+
"empty-state-component": t.emptyStateComponent,
|
|
863
|
+
size: l.listSize,
|
|
864
|
+
"min-size": o.constants.MIN_LIST_SIZE,
|
|
865
|
+
class: "list-box",
|
|
866
|
+
"model-value": o.leftSelected,
|
|
867
|
+
"with-bottom-value": s.showUnknownExcludedValues,
|
|
868
|
+
"bottom-value": { id: o.unknownValuesId, text: t.unknownValuesText },
|
|
869
|
+
"is-valid": t.isValid,
|
|
870
|
+
"possible-values": s.filteredExcludedItems,
|
|
871
|
+
ariaLabel: t.leftLabel,
|
|
872
|
+
disabled: t.disabled,
|
|
873
|
+
onDoubleClickOnItem: l.onLeftListBoxDoubleClick,
|
|
874
|
+
onDoubleClickShift: l.onLeftListBoxShiftDoubleClick,
|
|
875
|
+
onKeyArrowRight: l.moveRight,
|
|
876
|
+
"onUpdate:modelValue": l.onLeftInput
|
|
877
|
+
}, 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"]),
|
|
878
|
+
r("div", gt, [
|
|
879
|
+
r("div", {
|
|
880
|
+
ref: "moveRight",
|
|
881
|
+
class: k({ disabled: l.moveRightButtonDisabled || t.disabled }),
|
|
882
|
+
role: "button",
|
|
883
|
+
tabindex: "0",
|
|
884
|
+
onClick: n[1] || (n[1] = (...u) => l.onMoveRightButtonClick && l.onMoveRightButtonClick(...u)),
|
|
885
|
+
onKeydown: n[2] || (n[2] = (...u) => l.onMoveRightButtonKey && l.onMoveRightButtonKey(...u))
|
|
886
|
+
}, [
|
|
887
|
+
g(_, { class: "icon" })
|
|
888
|
+
], 34),
|
|
889
|
+
r("div", {
|
|
890
|
+
ref: "moveAllRight",
|
|
891
|
+
class: k({ disabled: l.moveAllRightButtonDisabled || t.disabled }),
|
|
892
|
+
role: "button",
|
|
893
|
+
tabindex: "0",
|
|
894
|
+
onClick: n[3] || (n[3] = (...u) => l.onMoveAllRightButtonClick && l.onMoveAllRightButtonClick(...u)),
|
|
895
|
+
onKeydown: n[4] || (n[4] = (...u) => l.onMoveAllRightButtonKey && l.onMoveAllRightButtonKey(...u))
|
|
896
|
+
}, [
|
|
897
|
+
g(b, { class: "icon" })
|
|
898
|
+
], 34),
|
|
899
|
+
r("div", {
|
|
900
|
+
ref: "moveLeft",
|
|
901
|
+
class: k({ disabled: l.moveLeftButtonDisabled || t.disabled }),
|
|
902
|
+
role: "button",
|
|
903
|
+
tabindex: "0",
|
|
904
|
+
onClick: n[5] || (n[5] = (...u) => l.onMoveLeftButtonClick && l.onMoveLeftButtonClick(...u)),
|
|
905
|
+
onKeydown: n[6] || (n[6] = (...u) => l.onMoveLeftButtonKey && l.onMoveLeftButtonKey(...u))
|
|
906
|
+
}, [
|
|
907
|
+
g(S, { class: "icon" })
|
|
908
|
+
], 34),
|
|
909
|
+
r("div", {
|
|
910
|
+
ref: "moveAllLeft",
|
|
911
|
+
class: k({ disabled: l.moveAllLeftButtonDisabled || t.disabled }),
|
|
912
|
+
role: "button",
|
|
913
|
+
tabindex: "0",
|
|
914
|
+
onClick: n[7] || (n[7] = (...u) => l.onMoveAllLeftButtonClick && l.onMoveAllLeftButtonClick(...u)),
|
|
915
|
+
onKeydown: n[8] || (n[8] = (...u) => l.onMoveAllLeftButtonKey && l.onMoveAllLeftButtonKey(...u))
|
|
916
|
+
}, [
|
|
917
|
+
g(I, { class: "icon" })
|
|
918
|
+
], 34)
|
|
919
|
+
]),
|
|
920
|
+
g(i, {
|
|
921
|
+
ref: "right",
|
|
922
|
+
class: k(["list-box", { "with-empty-state-icon": t.emptyStateComponent }]),
|
|
923
|
+
"model-value": o.rightSelected,
|
|
924
|
+
"with-bottom-value": s.showUnknownIncludedValues,
|
|
925
|
+
"bottom-value": { id: o.unknownValuesId, text: t.unknownValuesText },
|
|
926
|
+
"with-is-empty-state": t.showEmptyState,
|
|
927
|
+
"empty-state-label": t.emptyStateLabel,
|
|
928
|
+
"empty-state-component": t.emptyStateComponent,
|
|
929
|
+
"possible-values": s.filteredIncludedItems,
|
|
930
|
+
size: l.listSize,
|
|
931
|
+
"min-size": o.constants.MIN_LIST_SIZE,
|
|
932
|
+
ariaLabel: t.rightLabel,
|
|
933
|
+
disabled: t.disabled,
|
|
934
|
+
onDoubleClickOnItem: l.onRightListBoxDoubleClick,
|
|
935
|
+
onDoubleClickShift: l.onRightListBoxShiftDoubleClick,
|
|
936
|
+
onKeyArrowLeft: l.moveLeft,
|
|
937
|
+
"onUpdate:modelValue": l.onRightInput
|
|
938
|
+
}, 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"])
|
|
939
|
+
], 2),
|
|
940
|
+
t.showResizeHandle ? (d(), V(B, {
|
|
941
|
+
key: 1,
|
|
942
|
+
"number-of-handles": 2,
|
|
943
|
+
"handle-width": o.constants.RESIZE_HANDLE_WIDTH,
|
|
944
|
+
"connect-handles-on-resize": "",
|
|
945
|
+
"multiple-handles-handle-gap": `${o.constants.BUTTON_WIDTH}px`,
|
|
946
|
+
onResizeMove: l.onResizeMove,
|
|
947
|
+
onResizeEnd: l.onResizeEnd
|
|
948
|
+
}, null, 8, ["handle-width", "multiple-handles-handle-gap", "onResizeMove", "onResizeEnd"])) : p("", !0)
|
|
949
|
+
]);
|
|
950
|
+
}
|
|
951
|
+
const Dt = /* @__PURE__ */ A(O, [["render", It], ["__scopeId", "data-v-4808b939"]]), pt = (e) => (N("data-v-52b0b5dd"), e = e(), U(), e), yt = { class: "info" }, Lt = /* @__PURE__ */ pt(() => /* @__PURE__ */ r("span", null, "Loading...", -1)), kt = /* @__PURE__ */ Y({
|
|
952
|
+
__name: "TwinlistLoadingInfo",
|
|
953
|
+
setup(e) {
|
|
954
|
+
return (n, t) => (d(), v("div", yt, [
|
|
955
|
+
Lt,
|
|
956
|
+
g(H(he), { class: "icon" })
|
|
957
|
+
]));
|
|
958
|
+
}
|
|
959
|
+
}), zt = /* @__PURE__ */ A(kt, [["__scopeId", "data-v-52b0b5dd"]]);
|
|
960
|
+
export {
|
|
961
|
+
ze as S,
|
|
962
|
+
zt as T,
|
|
963
|
+
Dt as a,
|
|
964
|
+
ut as u
|
|
965
|
+
};
|