@knime/jsonforms 1.16.1 → 1.16.3
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 +18 -0
- package/dist/{AnyOfTwinlist-DtaF_u6U.js → AnyOfTwinlist-CPFz7T33.js} +1 -1
- package/dist/{Button-Cu51l4bN.js → Button--cIGOQIg.js} +1 -1
- package/dist/{Checkbox-j2BHg9c2.js → Checkbox-63Q9ya_g.js} +1 -1
- package/dist/{CheckboxControl-DlrBk_t-.js → CheckboxControl-DHg3HL2V.js} +1 -1
- package/dist/{Checkboxes-C4BHYTeg.js → Checkboxes-xHgv_V47.js} +2 -2
- package/dist/{CheckboxesControl-Ctf4hFx-.js → CheckboxesControl-zze6ql_B.js} +3 -3
- package/dist/{ComboBoxControl-C0TKjQ9H.js → ComboBoxControl-C1hK8T2Y.js} +3 -3
- package/dist/{DateControl-CLtzEb3q.js → DateControl-DPoB9O69.js} +1 -1
- package/dist/{DateTimeControl-CAyZLa9P.js → DateTimeControl-Q3yw8r9u.js} +1 -1
- package/dist/{DateTimeFormatInput-nxyilTQe.js → DateTimeFormatInput-I9qa8dyB.js} +3 -3
- package/dist/{DateTimeFormatPickerControl-CaHCQY_z.js → DateTimeFormatPickerControl-BNVCipPC.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-BzujiRnu.js → DateTimeFormatPickerWithTypeControl-BClBoDHH.js} +3 -3
- package/dist/{Dropdown-DKsatUXQ.js → Dropdown-D3y4Pa-6.js} +170 -154
- package/dist/{DropdownControl-fWiY6zSU.js → DropdownControl-DHRDgAa6.js} +10 -9
- package/dist/{HorizontalLayout-Uv7eOyiw.js → HorizontalLayout-DpashzzZ.js} +1 -1
- package/dist/{InputField-7vUzz3gU.js → InputField-DmqmbZXP.js} +1 -1
- package/dist/{IntegerControl-PouaLhEd.js → IntegerControl-DkvK354O.js} +1 -1
- package/dist/{IntervalControl-CrNhcyDz.js → IntervalControl-4g3A_50g.js} +3 -3
- package/dist/{LoadingDropdown-hIKRVdsJ.js → LoadingDropdown-BRWsdF35.js} +3 -3
- package/dist/{LoadingIcon-BiopmPdv.js → LoadingIcon-Bd7hSRvx.js} +1 -1
- package/dist/{ManualTwinlistControl-JeDVI9XZ.js → ManualTwinlistControl-C5zkXIpW.js} +4 -4
- package/dist/{MultiSelectListBoxControl-keatC0mr.js → MultiSelectListBoxControl-DhpU1hRK.js} +2 -2
- package/dist/{MultimodeTwinlistControl-BmUnzPL0.js → MultimodeTwinlistControl-COVqQXX9.js} +6 -6
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_c2a3d1cb_lang-i1sKqGpD.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_c2a3d1cb_lang-bhYOkdaF.js} +2 -2
- package/dist/{MultiselectListBox-DnmueQa9.js → MultiselectListBox-DXnAuoW5.js} +2 -2
- package/dist/{NameFilter-3G1LBpWl.js → NameFilter-Dq29KhUk.js} +1 -1
- package/dist/{NumberControl-VgVBGYzy.js → NumberControl-D5GFMxT0.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-CHK6QigD.js → NumberControlBase.vue_vue_type_script_setup_true_lang-CXUu-kYy.js} +2 -2
- package/dist/{NumberInput-1TaN0t95.js → NumberInput-BAyOGp4M.js} +1 -1
- package/dist/{OneOfDropdown-DUo3pgq3.js → OneOfDropdown-BKXmRfKK.js} +1 -1
- package/dist/{RadioControl-B3VW0lxq.js → RadioControl-BHvTK4Jm.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-XRpR6Evz.js → RadioControlBase.vue_vue_type_script_setup_true_lang-BNj9y1Wg.js} +3 -3
- package/dist/{RichTextControl-niwmOZHL.js → RichTextControl-LU76hMfA.js} +5 -5
- package/dist/{SectionHeading-CLDmaOwa.js → SectionHeading-BjbXUWFm.js} +1 -1
- package/dist/{SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-B-_bJCAr.js → SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-Bb4-Hp2m.js} +34 -34
- package/dist/{SectionLayout-D0m9O0lb.js → SectionLayout-DaYvnbgf.js} +3 -3
- package/dist/{SettingsSubPanel-DniQRWth.js → SettingsSubPanel-DVShATyT.js} +1 -1
- package/dist/{SettingsSubPanelLayout-D5gYeso_.js → SettingsSubPanelLayout-BVrpS7Bp.js} +4 -4
- package/dist/{SimpleButtonControl-DKXzMPLR.js → SimpleButtonControl-CKwhZIqR.js} +2 -2
- package/dist/{SimpleTwinlistControl-CYTqz_TS.js → SimpleTwinlistControl-C6Cu2Vx5.js} +2 -2
- package/dist/{SingleSelectControl-D4F-nh0T.js → SingleSelectControl-CEBlqvVd.js} +2 -2
- package/dist/{SingleSelectListBoxControl-Bs9E-c4t.js → SingleSelectListBoxControl-Dd6ozsXl.js} +3 -3
- package/dist/{SortListControl-BsQ3P3Hb.js → SortListControl-D-ix2Uie.js} +6 -6
- package/dist/{StyledListItem-CHwfN-6N.js → StyledListItem-n6zYb3mH.js} +1 -1
- package/dist/{TextAreaControl-BY6heyhR.js → TextAreaControl-BAHp6sVQ.js} +1 -1
- package/dist/{TextControl-B_n608sx.js → TextControl-DpiV4QJQ.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-ObH92j9d.js → TextControl.vue_vue_type_script_setup_true_lang-BihDaZxL.js} +3 -3
- package/dist/{TimeControl-DbhgeF4K.js → TimeControl-BfjWKHLl.js} +1 -1
- package/dist/{TwinlistControlBase-HdpOOswC.js → TwinlistControlBase-OLrrOb1n.js} +3 -3
- package/dist/{TwinlistLoadingInfo-CUQGhSyk.js → TwinlistLoadingInfo-CaCplbXG.js} +4 -4
- package/dist/{TypedStringFilter-BHTpKo7n.js → TypedStringFilter-GwyVnm0u.js} +1 -1
- package/dist/{ValueSwitch-o7yLk5E_.js → ValueSwitch-BV7yltvJ.js} +1 -1
- package/dist/{ValueSwitchControl-DWk-5-7Y.js → ValueSwitchControl-fuzor5Q_.js} +1 -1
- package/dist/{VerticalLayout-YEimQESt.js → VerticalLayout-DmiPHFJ6.js} +2 -2
- package/dist/{VerticalLayoutBase-CubtF96B.js → VerticalLayoutBase-Dek7bupo.js} +1 -1
- package/dist/{ZonedDateTimeControl-c22QgTVi.js → ZonedDateTimeControl-DHb4iDaE.js} +3 -3
- package/dist/{_baseEach-B3-dJ8Qr.js → _baseEach-DWpIqhD8.js} +2 -2
- package/dist/{_baseIteratee-DN5hDUH3.js → _baseIteratee-BHnI6yg0.js} +3 -3
- package/dist/{_getTag-RjhNpvAW.js → _getTag-u6PFr3XZ.js} +1 -1
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/{localTimeUtils-BApYySBH.js → localTimeUtils-D8tqh9Bd.js} +6 -6
- package/dist/testing.js +2 -2
- package/dist/{toString-y41jS6UW.js → toString-Db2erPLj.js} +1 -1
- package/dist/{useBuiltinValidations-BFzxi-t9.js → useBuiltinValidations-DJBHM1I5.js} +1 -1
- package/dist/{usePossibleValues-BW08TF4d.js → usePossibleValues-GbBZ4g2M.js} +1 -1
- package/package.json +4 -4
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as j, shallowRef as
|
|
2
|
-
import { o as te, t as se, a as R, i as
|
|
3
|
-
import { A as
|
|
4
|
-
import { C as
|
|
1
|
+
import { defineComponent as j, shallowRef as _, h as z, watch as B, toValue as p, computed as M, unref as U, nextTick as X, toRefs as q, ref as E, resolveComponent as V, createBlock as S, openBlock as c, withCtx as C, createElementVNode as m, normalizeClass as y, withDirectives as J, normalizeStyle as Q, createElementBlock as h, withModifiers as x, renderSlot as O, toDisplayString as D, createCommentVNode as v, withKeys as Z, createVNode as N, Fragment as w, renderList as P, createTextVNode as $, vShow as ee } from "vue";
|
|
2
|
+
import { o as te, t as se, a as R, i as K, b as k, w as ie, c as ne, d as le } from "./index-CZ-Na6c0.js";
|
|
3
|
+
import { A as ae } from "./arrow-dropdown-BHK4j8GT.js";
|
|
4
|
+
import { C as oe } from "./close-W1x27NhZ.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { u as re } from "./useSearch-hpyYQ_6y.js";
|
|
7
|
-
import { D as de, G as ue, _ as ce } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-
|
|
7
|
+
import { D as de, G as ue, _ as ce } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-Bb4-Hp2m.js";
|
|
8
8
|
import { i as he } from "./hotkeys-rxnt4egK.js";
|
|
9
|
-
import { d as
|
|
10
|
-
import { i as
|
|
11
|
-
var we = "[object Map]", be = "[object Set]", Ee = Object.prototype,
|
|
12
|
-
function
|
|
9
|
+
import { d as fe, a as pe, b as me, i as ge, e as ye, h as Ve, c as xe } from "./_getTag-u6PFr3XZ.js";
|
|
10
|
+
import { i as ve } from "./isArray-WzO_os3q.js";
|
|
11
|
+
var we = "[object Map]", be = "[object Set]", Ee = Object.prototype, Se = Ee.hasOwnProperty;
|
|
12
|
+
function Ce(e) {
|
|
13
13
|
if (e == null)
|
|
14
14
|
return !0;
|
|
15
|
-
if (
|
|
15
|
+
if (fe(e) && (ve(e) || typeof e == "string" || typeof e.splice == "function" || pe(e) || me(e) || ge(e)))
|
|
16
16
|
return !e.length;
|
|
17
17
|
var t = ye(e);
|
|
18
18
|
if (t == we || t == be)
|
|
19
19
|
return !e.size;
|
|
20
|
-
if (
|
|
21
|
-
return !
|
|
20
|
+
if (Ve(e))
|
|
21
|
+
return !xe(e).length;
|
|
22
22
|
for (var s in e)
|
|
23
|
-
if (
|
|
23
|
+
if (Se.call(e, s))
|
|
24
24
|
return !1;
|
|
25
25
|
return !0;
|
|
26
26
|
}
|
|
@@ -29,56 +29,56 @@ const Oe = /* @__PURE__ */ j({
|
|
|
29
29
|
props: ["as", "options"],
|
|
30
30
|
emits: ["trigger"],
|
|
31
31
|
setup(e, { slots: t, emit: s }) {
|
|
32
|
-
const
|
|
33
|
-
return te(
|
|
34
|
-
s("trigger",
|
|
32
|
+
const n = _();
|
|
33
|
+
return te(n, (r) => {
|
|
34
|
+
s("trigger", r);
|
|
35
35
|
}, e.options), () => {
|
|
36
36
|
if (t.default)
|
|
37
|
-
return z(e.as || "div", { ref:
|
|
37
|
+
return z(e.as || "div", { ref: n }, t.default());
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
40
|
+
}), De = le ? window : void 0;
|
|
41
41
|
function ke(e) {
|
|
42
42
|
var t;
|
|
43
|
-
const s =
|
|
43
|
+
const s = p(e);
|
|
44
44
|
return (t = s?.$el) != null ? t : s;
|
|
45
45
|
}
|
|
46
46
|
function Te(...e) {
|
|
47
47
|
const t = [], s = () => {
|
|
48
|
-
t.forEach((
|
|
49
|
-
},
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
}),
|
|
48
|
+
t.forEach((l) => l()), t.length = 0;
|
|
49
|
+
}, n = (l, a, o, u) => (l.addEventListener(a, o, u), () => l.removeEventListener(a, o, u)), r = M(() => {
|
|
50
|
+
const l = k(p(e[0])).filter((a) => a != null);
|
|
51
|
+
return l.every((a) => typeof a != "string") ? l : void 0;
|
|
52
|
+
}), i = ie(
|
|
53
53
|
() => {
|
|
54
|
-
var
|
|
54
|
+
var l, a;
|
|
55
55
|
return [
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
(a = (l = r.value) == null ? void 0 : l.map((o) => ke(o))) != null ? a : [De].filter((o) => o != null),
|
|
57
|
+
k(p(r.value ? e[1] : e[0])),
|
|
58
|
+
k(U(r.value ? e[2] : e[1])),
|
|
59
59
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
60
|
-
|
|
60
|
+
p(r.value ? e[3] : e[2])
|
|
61
61
|
];
|
|
62
62
|
},
|
|
63
|
-
([
|
|
64
|
-
if (s(), !
|
|
63
|
+
([l, a, o, u]) => {
|
|
64
|
+
if (s(), !l?.length || !a?.length || !o?.length)
|
|
65
65
|
return;
|
|
66
|
-
const b =
|
|
66
|
+
const b = ne(u) ? { ...u } : u;
|
|
67
67
|
t.push(
|
|
68
|
-
...
|
|
69
|
-
(d) =>
|
|
70
|
-
(g) =>
|
|
68
|
+
...l.flatMap(
|
|
69
|
+
(d) => a.flatMap(
|
|
70
|
+
(g) => o.map((G) => n(d, g, G, b))
|
|
71
71
|
)
|
|
72
72
|
)
|
|
73
73
|
);
|
|
74
74
|
},
|
|
75
75
|
{ flush: "post" }
|
|
76
|
-
),
|
|
77
|
-
|
|
76
|
+
), f = () => {
|
|
77
|
+
i(), s();
|
|
78
78
|
};
|
|
79
|
-
return R(s),
|
|
79
|
+
return R(s), f;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function T(e) {
|
|
82
82
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
83
83
|
}
|
|
84
84
|
function A(e) {
|
|
@@ -94,64 +94,64 @@ function Ie(e) {
|
|
|
94
94
|
const t = e || window.event, s = t.target;
|
|
95
95
|
return A(s) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const I = /* @__PURE__ */ new WeakMap();
|
|
98
98
|
function _e(e, t = !1) {
|
|
99
|
-
const s =
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
99
|
+
const s = _(t);
|
|
100
|
+
let n = null, r = "";
|
|
101
|
+
B(se(e), (l) => {
|
|
102
|
+
const a = T(p(l));
|
|
103
|
+
if (a) {
|
|
104
|
+
const o = a;
|
|
105
|
+
if (I.get(o) || I.set(o, o.style.overflow), o.style.overflow !== "hidden" && (r = o.style.overflow), o.style.overflow === "hidden")
|
|
106
106
|
return s.value = !0;
|
|
107
107
|
if (s.value)
|
|
108
|
-
return
|
|
108
|
+
return o.style.overflow = "hidden";
|
|
109
109
|
}
|
|
110
110
|
}, {
|
|
111
111
|
immediate: !0
|
|
112
112
|
});
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
!
|
|
116
|
-
|
|
113
|
+
const i = () => {
|
|
114
|
+
const l = T(p(e));
|
|
115
|
+
!l || s.value || (K && (n = Te(
|
|
116
|
+
l,
|
|
117
117
|
"touchmove",
|
|
118
|
-
(
|
|
119
|
-
Ie(
|
|
118
|
+
(a) => {
|
|
119
|
+
Ie(a);
|
|
120
120
|
},
|
|
121
121
|
{ passive: !1 }
|
|
122
|
-
)),
|
|
123
|
-
},
|
|
124
|
-
const
|
|
125
|
-
!
|
|
122
|
+
)), l.style.overflow = "hidden", s.value = !0);
|
|
123
|
+
}, f = () => {
|
|
124
|
+
const l = T(p(e));
|
|
125
|
+
!l || !s.value || (K && n?.(), l.style.overflow = r, I.delete(l), s.value = !1);
|
|
126
126
|
};
|
|
127
|
-
return R(
|
|
127
|
+
return R(f), M({
|
|
128
128
|
get() {
|
|
129
129
|
return s.value;
|
|
130
130
|
},
|
|
131
|
-
set(
|
|
132
|
-
|
|
131
|
+
set(l) {
|
|
132
|
+
l ? i() : f();
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
function Be() {
|
|
137
137
|
let e = !1;
|
|
138
|
-
const t =
|
|
139
|
-
return (s,
|
|
140
|
-
if (t.value =
|
|
138
|
+
const t = _(!1);
|
|
139
|
+
return (s, n) => {
|
|
140
|
+
if (t.value = n.value, e)
|
|
141
141
|
return;
|
|
142
142
|
e = !0;
|
|
143
|
-
const
|
|
144
|
-
|
|
143
|
+
const r = _e(s, n.value);
|
|
144
|
+
B(t, (i) => r.value = i);
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
Be();
|
|
148
|
-
const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y = "Enter",
|
|
148
|
+
const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y = "Enter", Ne = [L, H, F, W, Y], Pe = {
|
|
149
149
|
name: "Dropdown",
|
|
150
150
|
components: {
|
|
151
|
-
DropdownIcon:
|
|
151
|
+
DropdownIcon: ae,
|
|
152
152
|
OnClickOutside: Oe,
|
|
153
153
|
FunctionButton: de,
|
|
154
|
-
CloseIcon:
|
|
154
|
+
CloseIcon: oe
|
|
155
155
|
},
|
|
156
156
|
props: {
|
|
157
157
|
id: {
|
|
@@ -219,6 +219,10 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
219
219
|
type: Array,
|
|
220
220
|
default: () => []
|
|
221
221
|
},
|
|
222
|
+
allowNewValue: {
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: !1
|
|
225
|
+
},
|
|
222
226
|
caseSensitiveSearch: {
|
|
223
227
|
type: Boolean,
|
|
224
228
|
default: !1
|
|
@@ -230,35 +234,34 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
230
234
|
},
|
|
231
235
|
emits: ["update:modelValue"],
|
|
232
236
|
setup(e) {
|
|
233
|
-
const { caseSensitiveSearch: t, possibleValues: s } = q(e),
|
|
234
|
-
const
|
|
235
|
-
for (const
|
|
236
|
-
o
|
|
237
|
-
return
|
|
238
|
-
}),
|
|
239
|
-
|
|
237
|
+
const { caseSensitiveSearch: t, possibleValues: s } = q(e), n = E(!1), r = M(() => {
|
|
238
|
+
const a = {};
|
|
239
|
+
for (const o of s.value)
|
|
240
|
+
a[o.id] = o.text;
|
|
241
|
+
return a;
|
|
242
|
+
}), i = E(r.value[e.modelValue]), f = E(!1);
|
|
243
|
+
B(
|
|
240
244
|
() => e.modelValue,
|
|
241
|
-
(
|
|
242
|
-
|
|
245
|
+
(a) => {
|
|
246
|
+
f.value || (i.value = r.value[a]);
|
|
243
247
|
}
|
|
244
248
|
);
|
|
245
|
-
const
|
|
246
|
-
|
|
249
|
+
const l = re(
|
|
250
|
+
i,
|
|
247
251
|
t,
|
|
248
252
|
s,
|
|
249
|
-
|
|
253
|
+
n
|
|
250
254
|
);
|
|
251
255
|
return {
|
|
252
|
-
searchValue:
|
|
253
|
-
useFilterValues:
|
|
254
|
-
|
|
256
|
+
searchValue: i,
|
|
257
|
+
useFilterValues: n,
|
|
258
|
+
searchFilteredPossibleValues: l,
|
|
259
|
+
isExpanded: f
|
|
255
260
|
};
|
|
256
261
|
},
|
|
257
262
|
data() {
|
|
258
263
|
return {
|
|
259
264
|
typingTimeout: null,
|
|
260
|
-
isExpanded: !1,
|
|
261
|
-
searchQuery: "",
|
|
262
265
|
candidate: this.modelValue,
|
|
263
266
|
emptyState: "Nothing found",
|
|
264
267
|
optionRefs: /* @__PURE__ */ new Map(),
|
|
@@ -266,6 +269,16 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
266
269
|
};
|
|
267
270
|
},
|
|
268
271
|
computed: {
|
|
272
|
+
currentPossibleValues() {
|
|
273
|
+
return this.allowNewValue && this.possibleValues.every((e) => e.id !== this.searchValue) ? [
|
|
274
|
+
{
|
|
275
|
+
id: this.searchValue || "",
|
|
276
|
+
text: `New value: ${this.searchValue || "<empty>"}`,
|
|
277
|
+
isSpecial: !0
|
|
278
|
+
},
|
|
279
|
+
...this.searchFilteredPossibleValues
|
|
280
|
+
] : this.searchFilteredPossibleValues;
|
|
281
|
+
},
|
|
269
282
|
groupedValues() {
|
|
270
283
|
const e = {};
|
|
271
284
|
for (const t of this.currentPossibleValues) {
|
|
@@ -298,17 +311,17 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
298
311
|
return e;
|
|
299
312
|
},
|
|
300
313
|
displayText() {
|
|
301
|
-
return this.showPlaceholder ? this.placeholder : this.displayTextMap.hasOwnProperty(this.modelValue) ? this.displayTextMap[this.modelValue] : `(MISSING) ${this.modelValue.toString()}`;
|
|
314
|
+
return this.showPlaceholder ? this.placeholder : this.displayTextMap.hasOwnProperty(this.modelValue) ? this.displayTextMap[this.modelValue] : this.allowNewValue ? this.modelValue.toString() : `(MISSING) ${this.modelValue.toString()}`;
|
|
302
315
|
},
|
|
303
316
|
isMissing() {
|
|
304
|
-
return this.modelValue && !this.displayTextMap.hasOwnProperty(this.modelValue);
|
|
317
|
+
return this.allowNewValue ? !1 : this.modelValue && !this.displayTextMap.hasOwnProperty(this.modelValue);
|
|
305
318
|
},
|
|
306
319
|
hasRightIcon() {
|
|
307
320
|
return this.$slots["icon-right"]?.().length;
|
|
308
321
|
},
|
|
309
322
|
hasOptionTemplate() {
|
|
310
323
|
return this.possibleValues.length === 0 ? !1 : this.possibleValues.every(
|
|
311
|
-
(e) => e.slotData && !
|
|
324
|
+
(e) => e.slotData && !Ce(e.slotData)
|
|
312
325
|
);
|
|
313
326
|
},
|
|
314
327
|
selectedOption() {
|
|
@@ -370,8 +383,8 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
370
383
|
);
|
|
371
384
|
return;
|
|
372
385
|
}
|
|
373
|
-
const
|
|
374
|
-
|
|
386
|
+
const n = t.clientHeight + t.scrollTop, r = s.offsetTop + s.offsetHeight;
|
|
387
|
+
r > n ? t.scrollTop = r - t.clientHeight : s.offsetTop < t.scrollTop && (t.scrollTop = s.offsetTop);
|
|
375
388
|
}
|
|
376
389
|
},
|
|
377
390
|
onArrowDown() {
|
|
@@ -403,15 +416,18 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
403
416
|
toggleExpanded() {
|
|
404
417
|
this.isExpanded ? this.collapse() : this.expand();
|
|
405
418
|
},
|
|
419
|
+
resetSearchValue() {
|
|
420
|
+
this.displayTextMap.hasOwnProperty(this.modelValue) ? this.searchValue = this.displayTextMap[this.modelValue] : this.allowNewValue ? this.searchValue = this.modelValue?.toString() ?? "" : this.searchValue = "";
|
|
421
|
+
},
|
|
406
422
|
async expand() {
|
|
407
|
-
this.isDisabled || (this.
|
|
423
|
+
this.isDisabled || (this.resetSearchValue(), this.hasOptionTemplate && (this.slotContainerHeight = this.$refs.button?.clientHeight ?? 0), this.isExpanded = !0, this.candidate === this.modelValue && (this.isMissing || this.showPlaceholder) && this.updateCandidate(this.currentPossibleValues[0]?.id), await X(), this.getSearchInput().focus(), this.getSearchInput().select(), this.candidate && this.scrollTo(this.candidate));
|
|
408
424
|
},
|
|
409
425
|
collapse() {
|
|
410
426
|
this.isExpanded = !1, this.getButtonRef().focus();
|
|
411
427
|
},
|
|
412
428
|
/* NOTE: we use a single keyDown method because @keydown.up bindings are not testable. */
|
|
413
429
|
handleKeyDownButton(e) {
|
|
414
|
-
this.isExpanded ? this.handleKeyDownOnExpanded(e) : he(e,
|
|
430
|
+
this.isExpanded ? this.handleKeyDownOnExpanded(e) : he(e, Ne) && (this.expand(), e.preventDefault());
|
|
415
431
|
},
|
|
416
432
|
handleKeyDownOnExpanded(e) {
|
|
417
433
|
e.key === L && (this.onArrowDown(), e.preventDefault()), e.key === H && (this.onArrowUp(), e.preventDefault()), e.key === W && (this.onEndKey(), e.preventDefault()), e.key === F && (this.onHomeKey(), e.preventDefault()), e.key === Me && (this.collapse(), e.preventDefault(), e.stopPropagation()), e.key === Y && (this.onEnter(), e.preventDefault());
|
|
@@ -433,160 +449,160 @@ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y =
|
|
|
433
449
|
return `${e}-${this.id}-${s}`;
|
|
434
450
|
},
|
|
435
451
|
closeDropdown() {
|
|
436
|
-
this.
|
|
452
|
+
this.resetSearchValue(), this.isExpanded = !1;
|
|
437
453
|
},
|
|
438
454
|
handleSearch(e) {
|
|
439
|
-
this.useFilterValues = !0, this.searchValue = e;
|
|
455
|
+
this.useFilterValues = !0, this.searchValue = e, this.allowNewValue && this.$emit("update:modelValue", e);
|
|
440
456
|
},
|
|
441
457
|
handleResetInput() {
|
|
442
458
|
this.searchValue = "", this.getSearchInput().focus();
|
|
443
459
|
}
|
|
444
460
|
}
|
|
445
|
-
},
|
|
461
|
+
}, Ke = ["id"], Re = ["id", "aria-label", "aria-labelledby", "aria-expanded"], Ae = ["value"], Le = { key: 1 }, He = { class: "right" }, Fe = {
|
|
446
462
|
key: 0,
|
|
447
463
|
class: "loading-icon"
|
|
448
464
|
}, We = ["aria-activedescendant"], Ye = {
|
|
449
465
|
key: 0,
|
|
450
466
|
class: "empty-state"
|
|
451
467
|
}, Ge = ["id", "title", "aria-selected", "onMouseenter", "onClick"], je = ["id", "name", "value"];
|
|
452
|
-
function ze(e, t, s, r, i
|
|
453
|
-
const
|
|
454
|
-
return c(),
|
|
468
|
+
function ze(e, t, s, n, r, i) {
|
|
469
|
+
const f = V("CloseIcon"), l = V("FunctionButton"), a = V("DropdownIcon"), o = V("OnClickOutside");
|
|
470
|
+
return c(), S(o, { onTrigger: i.closeDropdown }, {
|
|
455
471
|
default: C(() => [
|
|
456
472
|
m("div", {
|
|
457
473
|
id: s.id,
|
|
458
474
|
class: y([
|
|
459
475
|
"dropdown",
|
|
460
476
|
{
|
|
461
|
-
collapsed: !
|
|
477
|
+
collapsed: !n.isExpanded,
|
|
462
478
|
invalid: !s.isValid,
|
|
463
|
-
disabled:
|
|
479
|
+
disabled: i.isDisabled,
|
|
464
480
|
compact: s.compact
|
|
465
481
|
}
|
|
466
482
|
])
|
|
467
483
|
}, [
|
|
468
484
|
m("div", {
|
|
469
|
-
id:
|
|
485
|
+
id: i.generateId("button"),
|
|
470
486
|
ref: "button",
|
|
471
487
|
role: "button",
|
|
472
488
|
tabindex: "0",
|
|
473
489
|
"aria-haspopup": "listbox",
|
|
474
490
|
class: y({
|
|
475
|
-
placeholder:
|
|
476
|
-
missing:
|
|
477
|
-
"has-option-template":
|
|
491
|
+
placeholder: i.showPlaceholder && !n.isExpanded,
|
|
492
|
+
missing: i.isMissing && !n.isExpanded,
|
|
493
|
+
"has-option-template": i.hasOptionTemplate && !n.isExpanded
|
|
478
494
|
}),
|
|
479
|
-
style:
|
|
480
|
-
...
|
|
481
|
-
height: `calc(${
|
|
495
|
+
style: Q({
|
|
496
|
+
...n.isExpanded && i.hasOptionTemplate && {
|
|
497
|
+
height: `calc(${r.slotContainerHeight}px + 0 * var(--form-border-width))`,
|
|
482
498
|
boxSizing: "content-box"
|
|
483
499
|
}
|
|
484
500
|
}),
|
|
485
501
|
"aria-label": s.ariaLabel,
|
|
486
|
-
"aria-labelledby":
|
|
487
|
-
"aria-expanded":
|
|
488
|
-
onClick: t[3] || (t[3] = (...u) =>
|
|
489
|
-
onKeydown: t[4] || (t[4] = (...u) =>
|
|
502
|
+
"aria-labelledby": i.generateId("button"),
|
|
503
|
+
"aria-expanded": n.isExpanded,
|
|
504
|
+
onClick: t[3] || (t[3] = (...u) => i.toggleExpanded && i.toggleExpanded(...u)),
|
|
505
|
+
onKeydown: t[4] || (t[4] = (...u) => i.handleKeyDownButton && i.handleKeyDownButton(...u))
|
|
490
506
|
}, [
|
|
491
|
-
|
|
507
|
+
n.isExpanded ? (c(), h("input", {
|
|
492
508
|
key: 0,
|
|
493
509
|
ref: "searchInput",
|
|
494
|
-
value:
|
|
510
|
+
value: n.searchValue,
|
|
495
511
|
tabindex: "0",
|
|
496
512
|
role: "searchbox",
|
|
497
513
|
class: "search-input",
|
|
498
514
|
type: "text",
|
|
499
|
-
onClick: t[0] || (t[0] =
|
|
515
|
+
onClick: t[0] || (t[0] = x(() => {
|
|
500
516
|
}, ["stop"])),
|
|
501
|
-
onInput: t[1] || (t[1] = (u) =>
|
|
502
|
-
}, null, 40, Ae)) :
|
|
503
|
-
|
|
504
|
-
slotData:
|
|
505
|
-
isMissing:
|
|
517
|
+
onInput: t[1] || (t[1] = (u) => i.handleSearch(u.target.value))
|
|
518
|
+
}, null, 40, Ae)) : i.hasOptionTemplate ? (c(), h("div", Le, [
|
|
519
|
+
O(e.$slots, "option", {
|
|
520
|
+
slotData: i.selectedOption?.slotData,
|
|
521
|
+
isMissing: i.isMissing,
|
|
506
522
|
selectedValue: s.modelValue,
|
|
507
523
|
expanded: !1
|
|
508
524
|
})
|
|
509
525
|
])) : (c(), h("span", {
|
|
510
526
|
key: 2,
|
|
511
527
|
ref: "span"
|
|
512
|
-
},
|
|
528
|
+
}, D(i.displayText), 513)),
|
|
513
529
|
m("div", He, [
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
])) :
|
|
517
|
-
|
|
530
|
+
i.hasRightIcon ? (c(), h("div", Fe, [
|
|
531
|
+
O(e.$slots, "icon-right")
|
|
532
|
+
])) : v("", !0),
|
|
533
|
+
n.isExpanded && i.nonEmptySearchValue ? (c(), S(l, {
|
|
518
534
|
key: 1,
|
|
519
535
|
ref: "closeButton",
|
|
520
536
|
title: "Close",
|
|
521
537
|
tabindex: "0",
|
|
522
538
|
class: "button",
|
|
523
539
|
compact: s.compact,
|
|
524
|
-
onKeydown: t[2] || (t[2] = Z(
|
|
540
|
+
onKeydown: t[2] || (t[2] = Z(x(() => {
|
|
525
541
|
}, ["stop"]), ["enter"])),
|
|
526
|
-
onClick:
|
|
542
|
+
onClick: x(i.handleResetInput, ["stop"])
|
|
527
543
|
}, {
|
|
528
544
|
default: C(() => [
|
|
529
|
-
|
|
545
|
+
N(f, { class: "icon" })
|
|
530
546
|
]),
|
|
531
547
|
_: 1
|
|
532
|
-
}, 8, ["compact", "onClick"])) :
|
|
533
|
-
!
|
|
548
|
+
}, 8, ["compact", "onClick"])) : v("", !0),
|
|
549
|
+
!n.isExpanded || !i.nonEmptySearchValue ? (c(), S(l, {
|
|
534
550
|
key: 2,
|
|
535
551
|
class: "button",
|
|
536
552
|
compact: s.compact,
|
|
537
|
-
disabled:
|
|
538
|
-
title:
|
|
539
|
-
tabindex:
|
|
540
|
-
onClick:
|
|
553
|
+
disabled: i.isDisabled,
|
|
554
|
+
title: n.isExpanded ? "Cancel" : "Expand",
|
|
555
|
+
tabindex: n.isExpanded ? 0 : -1,
|
|
556
|
+
onClick: x(i.toggleExpanded, ["stop"])
|
|
541
557
|
}, {
|
|
542
558
|
default: C(() => [
|
|
543
|
-
|
|
559
|
+
N(a, {
|
|
544
560
|
class: y(["dropdown-icon", "icon"])
|
|
545
561
|
})
|
|
546
562
|
]),
|
|
547
563
|
_: 1
|
|
548
|
-
}, 8, ["compact", "disabled", "title", "tabindex", "onClick"])) :
|
|
564
|
+
}, 8, ["compact", "disabled", "title", "tabindex", "onClick"])) : v("", !0)
|
|
549
565
|
])
|
|
550
566
|
], 46, Re),
|
|
551
|
-
|
|
567
|
+
J(m("ul", {
|
|
552
568
|
ref: "ul",
|
|
553
569
|
role: "listbox",
|
|
554
570
|
tabindex: "-1",
|
|
555
|
-
"aria-activedescendant":
|
|
571
|
+
"aria-activedescendant": n.isExpanded ? i.generateId("option", i.getCurrentSelectedId()) : void 0,
|
|
556
572
|
class: y({ "drops-upwards": s.direction === "up" })
|
|
557
573
|
}, [
|
|
558
|
-
|
|
559
|
-
(c(!0), h(w, null,
|
|
574
|
+
i.hasNoFilteredPossibleValues ? (c(), h("div", Ye, D(r.emptyState), 1)) : v("", !0),
|
|
575
|
+
(c(!0), h(w, null, P(i.orderedGroupedValues, (u, b) => (c(), h(w, { key: b }, [
|
|
560
576
|
t[5] || (t[5] = m("span", { class: "group-divider" }, null, -1)),
|
|
561
|
-
(c(!0), h(w, null,
|
|
562
|
-
id:
|
|
577
|
+
(c(!0), h(w, null, P(u.items, (d) => (c(), h("li", {
|
|
578
|
+
id: i.generateId("option", d.id),
|
|
563
579
|
key: `listbox-${d.id}`,
|
|
564
580
|
ref_for: !0,
|
|
565
|
-
ref: (g) =>
|
|
581
|
+
ref: (g) => r.optionRefs.set(d.id, g),
|
|
566
582
|
role: "option",
|
|
567
583
|
title: typeof d.title > "u" ? d.text : d.title,
|
|
568
584
|
class: y({
|
|
569
|
-
focused:
|
|
585
|
+
focused: i.isCurrentValue(d.id),
|
|
570
586
|
noselect: !0,
|
|
571
587
|
empty: d.text.trim() === "",
|
|
572
|
-
"has-option-template":
|
|
588
|
+
"has-option-template": i.hasOptionTemplate,
|
|
573
589
|
special: d.isSpecial
|
|
574
590
|
}),
|
|
575
|
-
"aria-selected":
|
|
576
|
-
onMouseenter: (g) =>
|
|
577
|
-
onClick: (g) =>
|
|
591
|
+
"aria-selected": i.isCurrentValue(d.id),
|
|
592
|
+
onMouseenter: (g) => i.updateCandidate(d.id),
|
|
593
|
+
onClick: (g) => i.emitAndClose(d.id)
|
|
578
594
|
}, [
|
|
579
|
-
|
|
595
|
+
i.hasOptionTemplate ? O(e.$slots, "option", {
|
|
580
596
|
key: 0,
|
|
581
597
|
slotData: d.slotData,
|
|
582
598
|
expanded: !0
|
|
583
599
|
}) : (c(), h(w, { key: 1 }, [
|
|
584
|
-
$(
|
|
600
|
+
$(D(d.text), 1)
|
|
585
601
|
], 64))
|
|
586
602
|
], 42, Ge))), 128))
|
|
587
603
|
], 64))), 128))
|
|
588
604
|
], 10, We), [
|
|
589
|
-
[ee,
|
|
605
|
+
[ee, n.isExpanded]
|
|
590
606
|
]),
|
|
591
607
|
m("input", {
|
|
592
608
|
id: s.id,
|
|
@@ -594,12 +610,12 @@ function ze(e, t, s, r, i, n) {
|
|
|
594
610
|
name: s.name,
|
|
595
611
|
value: s.modelValue
|
|
596
612
|
}, null, 8, je)
|
|
597
|
-
], 10,
|
|
613
|
+
], 10, Ke)
|
|
598
614
|
]),
|
|
599
615
|
_: 3
|
|
600
616
|
}, 8, ["onTrigger"]);
|
|
601
617
|
}
|
|
602
|
-
const
|
|
618
|
+
const it = /* @__PURE__ */ ce(Pe, [["render", ze], ["__scopeId", "data-v-0a20a161"]]);
|
|
603
619
|
export {
|
|
604
|
-
|
|
620
|
+
it as D
|
|
605
621
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { L as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as n, toRef as t, computed as i, createBlock as d, openBlock as s, unref as u } from "vue";
|
|
2
|
+
import { u as c } from "./usePossibleValues-GbBZ4g2M.js";
|
|
3
|
+
import { L as r } from "./LoadingDropdown-BRWsdF35.js";
|
|
4
|
+
const v = /* @__PURE__ */ n({
|
|
5
5
|
__name: "DropdownControl",
|
|
6
6
|
props: {
|
|
7
7
|
control: {},
|
|
@@ -13,19 +13,20 @@ const V = /* @__PURE__ */ l({
|
|
|
13
13
|
labelForId: {}
|
|
14
14
|
},
|
|
15
15
|
setup(e) {
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
16
|
+
const l = e, { possibleValues: a } = c(t(l, "control")), o = i(() => l.control.uischema?.options?.allowNewValue);
|
|
17
|
+
return (m, p) => (s(), d(r, {
|
|
18
18
|
id: e.labelForId ?? "",
|
|
19
19
|
ariaLabel: e.control.label,
|
|
20
20
|
disabled: e.disabled,
|
|
21
21
|
"model-value": e.control.data ?? "",
|
|
22
|
-
"possible-values":
|
|
22
|
+
"possible-values": u(a),
|
|
23
23
|
"is-valid": e.isValid,
|
|
24
|
+
"allow-new-value": o.value,
|
|
24
25
|
compact: "",
|
|
25
26
|
"onUpdate:modelValue": e.changeValue
|
|
26
|
-
}, null, 8, ["id", "ariaLabel", "disabled", "model-value", "possible-values", "is-valid", "onUpdate:modelValue"]));
|
|
27
|
+
}, null, 8, ["id", "ariaLabel", "disabled", "model-value", "possible-values", "is-valid", "allow-new-value", "onUpdate:modelValue"]));
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
v as default
|
|
31
32
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as o, createElementBlock as t, openBlock as a, Fragment as r, renderList as c, createBlock as s, unref as u } from "vue";
|
|
2
|
-
import { N as m, _ as i } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-
|
|
2
|
+
import { N as m, _ as i } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-Bb4-Hp2m.js";
|
|
3
3
|
const d = { class: "horizontal" }, h = /* @__PURE__ */ o({
|
|
4
4
|
__name: "HorizontalLayout",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { createElementBlock as i, openBlock as s, normalizeClass as r, createCommentVNode as u, createElementVNode as o, renderSlot as d, mergeProps as f } from "vue";
|
|
3
|
-
import { _ as p } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-
|
|
3
|
+
import { _ as p } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-Bb4-Hp2m.js";
|
|
4
4
|
const c = {
|
|
5
5
|
name: "InputField",
|
|
6
6
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as o, createBlock as n, openBlock as t, mergeProps as r } from "vue";
|
|
2
|
-
import { _ as a } from "./NumberControlBase.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as a } from "./NumberControlBase.vue_vue_type_script_setup_true_lang-CXUu-kYy.js";
|
|
3
3
|
const s = /* @__PURE__ */ o({
|
|
4
4
|
__name: "IntegerControl",
|
|
5
5
|
props: {
|