@knime/jsonforms 1.19.2 → 1.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/{AnyOfTwinlist-DbIxFGCg.js → AnyOfTwinlist-gIm_R7yi.js} +1 -1
- package/dist/{Checkbox-DHrRt49x.js → Checkbox-D1QZ8D8U.js} +1 -1
- package/dist/{CheckboxControl-D0b--DXW.js → CheckboxControl-DitntAd8.js} +1 -1
- package/dist/{CheckboxesControl-D2UmK0cM.js → CheckboxesControl-C_Wwb06j.js} +2 -2
- package/dist/{ColorControl-BWQGbfC0.js → ColorControl-86_aeUMf.js} +1 -1
- package/dist/ColorPreviewControl-HgbFwMCE.js +89 -0
- package/dist/{ComboBoxControl-CL4v2Sgq.js → ComboBoxControl-CGwWGyDl.js} +8 -8
- package/dist/{DateControl-BwCKXxzH.js → DateControl-BofbO5lM.js} +8 -7
- package/dist/{DateTimeControl-DIHNi8gS.js → DateTimeControl-BzWk51J8.js} +1 -1
- package/dist/DateTimeFormatPickerControl-7KTdYrMN.js +31 -0
- package/dist/DateTimeFormatPickerWithTypeControl-DmevlqK8.js +442 -0
- package/dist/{DropdownControl-DIr6VLc6.js → DropdownControl-XAeknlV2.js} +3 -3
- package/dist/{HorizontalLayout-y52FdHPr.js → HorizontalLayout-BQFvLK2X.js} +1 -1
- package/dist/{IntegerControl-Bk-MII8Z.js → IntegerControl-XNoJU3s2.js} +1 -1
- package/dist/{IntervalControl-C7rHNjU3.js → IntervalControl-DaQTfsx8.js} +2 -2
- package/dist/{Label-4eQvTocI.js → Label-BckcZVsr.js} +1 -1
- package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-BohYhBbA.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-M581gyEa.js} +1 -1
- package/dist/LoadingIcon-D3kls_iA.js +29 -0
- package/dist/{ManualTwinlistControl-Cymjfy5p.js → ManualTwinlistControl-BCgJbfp5.js} +4 -4
- package/dist/{MultiSelectListBoxControl-xAD6kXMK.js → MultiSelectListBoxControl-B6tvY3Al.js} +2 -2
- package/dist/{MultimodeTwinlistControl-BumsqGUV.js → MultimodeTwinlistControl-CUWzYCUm.js} +14 -14
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-KKPjcj4X.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-C8itN9TE.js} +2 -2
- package/dist/{MultiselectListBox-ZX6212Yu.js → MultiselectListBox-C1rI0rOG.js} +4 -4
- package/dist/{NameFilter-FSgsA62B.js → NameFilter-CaPBJKzh.js} +1 -1
- package/dist/{NumberControl-BqoqHwEO.js → NumberControl-DOnwoK8Z.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-BncdSveV.js → NumberControlBase.vue_vue_type_script_setup_true_lang-IP3X2jko.js} +4 -4
- package/dist/{OneOfDropdown-B_2tiTwi.js → OneOfDropdown-CHt7_dgU.js} +9 -9
- package/dist/{RadioControl-BFhCpO9D.js → RadioControl-CP7QiYX1.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-CaIHPPJ6.js → RadioControlBase.vue_vue_type_script_setup_true_lang-qv1xOkqz.js} +2 -2
- package/dist/{RichTextControl-CdhHDOWn.js → RichTextControl-DKlFtbdd.js} +1535 -1461
- package/dist/{SectionHeading-DZCr2UJ-.js → SectionHeading-DbcAkyOk.js} +1 -1
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-B1Ey6pj2.js +25430 -0
- package/dist/{SectionLayout-C-8MnV5C.js → SectionLayout-BRfbEX0H.js} +3 -3
- package/dist/SettingsSubPanel-Bw-wC4JV.js +5 -0
- package/dist/{SettingsSubPanelLayout-BYZgAnN7.js → SettingsSubPanelLayout-nMEM9Js5.js} +6 -6
- package/dist/SimpleButtonControl-Cs9fDA9V.js +49 -0
- package/dist/{SimpleTwinlistControl-BCZ8bawe.js → SimpleTwinlistControl-CMJCJOPx.js} +2 -2
- package/dist/{SingleSelectControl-Dej4aS7t.js → SingleSelectControl-DrqxOX0c.js} +2 -2
- package/dist/{SingleSelectListBoxControl-BfJjjRQn.js → SingleSelectListBoxControl-2ORQoAtg.js} +5 -5
- package/dist/{SortListControl-BzZCSfie.js → SortListControl-BLWFLyUn.js} +35 -36
- package/dist/{StyledListItem-BSq6JKC8.js → StyledListItem-DhsQSwUn.js} +1 -1
- package/dist/{TextAreaControl-jzV7HC6S.js → TextAreaControl-v3fhzCGm.js} +1 -1
- package/dist/{TextControl-1b_uj1FP.js → TextControl-CNlNwI8q.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-BoZDe5bd.js → TextControl.vue_vue_type_script_setup_true_lang-BQReBqLi.js} +5 -5
- package/dist/{TimeControl-BYogu7kA.js → TimeControl-uBNUovJi.js} +1 -1
- package/dist/{TwinlistControlBase-Bd5_Uuq-.js → TwinlistControlBase-BfsU0lp4.js} +3 -3
- package/dist/{TwinlistLoadingInfo-3TeV4Gdp.js → TwinlistLoadingInfo-CZpH6CqT.js} +4 -4
- package/dist/{TypedStringFilter-CU8Og0OV.js → TypedStringFilter-ElEPYctF.js} +1 -1
- package/dist/{ValueSwitch-DjDuJdNN.js → ValueSwitch-BfYlPI2B.js} +4 -4
- package/dist/{ValueSwitchControl-D1saOV7r.js → ValueSwitchControl-DyV85jLv.js} +1 -1
- package/dist/{VerticalLayout-g5Won-Pb.js → VerticalLayout-CFGNNSaB.js} +2 -2
- package/dist/{VerticalLayoutBase-CGb9hUYx.js → VerticalLayoutBase-CCtK1J1U.js} +1 -1
- package/dist/{ZonedDateTimeControl-CtgGTCQc.js → ZonedDateTimeControl-BtPeUK4M.js} +17 -19
- package/dist/{_baseEach-GM1_9gpl.js → _baseEach-DR1qyPMo.js} +7 -8
- package/dist/_baseIteratee-DrBvc1GG.js +640 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/{localTimeUtils-5E_obOH5.js → localTimeUtils-C1z-tWPY.js} +3934 -3328
- package/dist/{popper-LGjf7Wza.js → popper-D54JdmBM.js} +212 -208
- package/dist/src/constants/inputFormats.d.ts +1 -0
- package/dist/src/renderers/colorPreviewRenderer.d.ts +69 -0
- package/dist/src/renderers/defaultRenderers.d.ts +150 -22
- package/dist/src/renderers/simpleButtonRenderer.d.ts +81 -22
- package/dist/src/uiComponents/ColorPreviewControl.vue.d.ts +11 -0
- package/dist/src/uiComponents/DateTimeFormatPickerControl.vue.d.ts +1 -1
- package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +14 -11
- package/dist/src/uiComponents/colorPreview/ColorPreviewEmptyState.vue.d.ts +2 -0
- package/dist/src/uiComponents/colorPreview/GradientPreview.vue.d.ts +6 -0
- package/dist/src/uiComponents/colorPreview/PalettePreview.vue.d.ts +6 -0
- package/dist/testing.js +2 -2
- package/dist/toString-lufkO4XX.js +25 -0
- package/dist/{useBuiltinValidations-V_W_S2ya.js → useBuiltinValidations-CXYzLTj1.js} +1 -1
- package/dist/{usePossibleValues-CcLAFNOh.js → usePossibleValues-BGGWIVzM.js} +1 -1
- package/package.json +4 -4
- package/dist/Button-DPBuV8Ju.js +0 -82
- package/dist/DateTimeFormatInput-BjdyxUQY.js +0 -374
- package/dist/DateTimeFormatPickerControl-CV6pc2KZ.js +0 -40
- package/dist/DateTimeFormatPickerWithTypeControl-DyGt-WGp.js +0 -76
- package/dist/Dropdown-DlCk3K9Y.js +0 -620
- package/dist/LoadingIcon-Br99Lv_8.js +0 -18
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-BYoCo820.js +0 -18542
- package/dist/SettingsSubPanel-DLmH_M05.js +0 -5
- package/dist/SimpleButtonControl-CdMqbvzO.js +0 -68
- package/dist/_baseIteratee-CHnCehKu.js +0 -516
- package/dist/_getTag-D-KT4MkB.js +0 -131
- package/dist/hotkeys-rxnt4egK.js +0 -6
- package/dist/isArray-WzO_os3q.js +0 -4
- package/dist/reload-DjY4GPvr.js +0 -17
- package/dist/src/uiComponents/DynamicIcon.vue.d.ts +0 -7
- package/dist/toString-D64mIKfx.js +0 -25
|
@@ -1,620 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, 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, openBlock as c, createBlock as S, withCtx as C, createElementVNode as m, normalizeClass as y, normalizeStyle as J, createElementBlock as h, withModifiers as x, renderSlot as O, toDisplayString as D, createCommentVNode as v, withKeys as Q, createVNode as P, withDirectives as Z, Fragment as w, renderList as N, createTextVNode as $, vShow as ee } from "vue";
|
|
2
|
-
import { J as te, P as se, Q as R, R as K, T as k, V as ie, W as ne, X as le, I as ae, M as oe, _ as re } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-BYoCo820.js";
|
|
3
|
-
import { A as de } from "./arrow-dropdown-DMFBPPcK.js";
|
|
4
|
-
import { C as ue } from "./close-CwP2mh9x.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import { u as ce } from "./useSearch-hpyYQ_6y.js";
|
|
7
|
-
import { i as he } from "./hotkeys-rxnt4egK.js";
|
|
8
|
-
import { c as fe, a as pe, b as me, i as ge, e as ye, h as Ve, d as xe } from "./_getTag-D-KT4MkB.js";
|
|
9
|
-
import { i as ve } from "./isArray-WzO_os3q.js";
|
|
10
|
-
var we = "[object Map]", be = "[object Set]", Ee = Object.prototype, Se = Ee.hasOwnProperty;
|
|
11
|
-
function Ce(e) {
|
|
12
|
-
if (e == null)
|
|
13
|
-
return !0;
|
|
14
|
-
if (fe(e) && (ve(e) || typeof e == "string" || typeof e.splice == "function" || pe(e) || me(e) || ge(e)))
|
|
15
|
-
return !e.length;
|
|
16
|
-
var t = ye(e);
|
|
17
|
-
if (t == we || t == be)
|
|
18
|
-
return !e.size;
|
|
19
|
-
if (Ve(e))
|
|
20
|
-
return !xe(e).length;
|
|
21
|
-
for (var s in e)
|
|
22
|
-
if (Se.call(e, s))
|
|
23
|
-
return !1;
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
const Oe = /* @__PURE__ */ G({
|
|
27
|
-
name: "OnClickOutside",
|
|
28
|
-
props: ["as", "options"],
|
|
29
|
-
emits: ["trigger"],
|
|
30
|
-
setup(e, { slots: t, emit: s }) {
|
|
31
|
-
const n = _();
|
|
32
|
-
return te(n, (r) => {
|
|
33
|
-
s("trigger", r);
|
|
34
|
-
}, e.options), () => {
|
|
35
|
-
if (t.default)
|
|
36
|
-
return z(e.as || "div", { ref: n }, t.default());
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}), De = le ? window : void 0;
|
|
40
|
-
function ke(e) {
|
|
41
|
-
var t;
|
|
42
|
-
const s = p(e);
|
|
43
|
-
return (t = s?.$el) != null ? t : s;
|
|
44
|
-
}
|
|
45
|
-
function Te(...e) {
|
|
46
|
-
const t = [], s = () => {
|
|
47
|
-
t.forEach((l) => l()), t.length = 0;
|
|
48
|
-
}, n = (l, a, o, u) => (l.addEventListener(a, o, u), () => l.removeEventListener(a, o, u)), r = M(() => {
|
|
49
|
-
const l = k(p(e[0])).filter((a) => a != null);
|
|
50
|
-
return l.every((a) => typeof a != "string") ? l : void 0;
|
|
51
|
-
}), i = ie(
|
|
52
|
-
() => {
|
|
53
|
-
var l, a;
|
|
54
|
-
return [
|
|
55
|
-
(a = (l = r.value) == null ? void 0 : l.map((o) => ke(o))) != null ? a : [De].filter((o) => o != null),
|
|
56
|
-
k(p(r.value ? e[1] : e[0])),
|
|
57
|
-
k(U(r.value ? e[2] : e[1])),
|
|
58
|
-
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
59
|
-
p(r.value ? e[3] : e[2])
|
|
60
|
-
];
|
|
61
|
-
},
|
|
62
|
-
([l, a, o, u]) => {
|
|
63
|
-
if (s(), !l?.length || !a?.length || !o?.length)
|
|
64
|
-
return;
|
|
65
|
-
const b = ne(u) ? { ...u } : u;
|
|
66
|
-
t.push(
|
|
67
|
-
...l.flatMap(
|
|
68
|
-
(d) => a.flatMap(
|
|
69
|
-
(g) => o.map((j) => n(d, g, j, b))
|
|
70
|
-
)
|
|
71
|
-
)
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
{ flush: "post" }
|
|
75
|
-
), f = () => {
|
|
76
|
-
i(), s();
|
|
77
|
-
};
|
|
78
|
-
return R(s), f;
|
|
79
|
-
}
|
|
80
|
-
function T(e) {
|
|
81
|
-
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
82
|
-
}
|
|
83
|
-
function A(e) {
|
|
84
|
-
const t = window.getComputedStyle(e);
|
|
85
|
-
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
86
|
-
return !0;
|
|
87
|
-
{
|
|
88
|
-
const s = e.parentNode;
|
|
89
|
-
return !s || s.tagName === "BODY" ? !1 : A(s);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function Ie(e) {
|
|
93
|
-
const t = e || window.event, s = t.target;
|
|
94
|
-
return A(s) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
95
|
-
}
|
|
96
|
-
const I = /* @__PURE__ */ new WeakMap();
|
|
97
|
-
function _e(e, t = !1) {
|
|
98
|
-
const s = _(t);
|
|
99
|
-
let n = null, r = "";
|
|
100
|
-
B(se(e), (l) => {
|
|
101
|
-
const a = T(p(l));
|
|
102
|
-
if (a) {
|
|
103
|
-
const o = a;
|
|
104
|
-
if (I.get(o) || I.set(o, o.style.overflow), o.style.overflow !== "hidden" && (r = o.style.overflow), o.style.overflow === "hidden")
|
|
105
|
-
return s.value = !0;
|
|
106
|
-
if (s.value)
|
|
107
|
-
return o.style.overflow = "hidden";
|
|
108
|
-
}
|
|
109
|
-
}, {
|
|
110
|
-
immediate: !0
|
|
111
|
-
});
|
|
112
|
-
const i = () => {
|
|
113
|
-
const l = T(p(e));
|
|
114
|
-
!l || s.value || (K && (n = Te(
|
|
115
|
-
l,
|
|
116
|
-
"touchmove",
|
|
117
|
-
(a) => {
|
|
118
|
-
Ie(a);
|
|
119
|
-
},
|
|
120
|
-
{ passive: !1 }
|
|
121
|
-
)), l.style.overflow = "hidden", s.value = !0);
|
|
122
|
-
}, f = () => {
|
|
123
|
-
const l = T(p(e));
|
|
124
|
-
!l || !s.value || (K && n?.(), l.style.overflow = r, I.delete(l), s.value = !1);
|
|
125
|
-
};
|
|
126
|
-
return R(f), M({
|
|
127
|
-
get() {
|
|
128
|
-
return s.value;
|
|
129
|
-
},
|
|
130
|
-
set(l) {
|
|
131
|
-
l ? i() : f();
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function Be() {
|
|
136
|
-
let e = !1;
|
|
137
|
-
const t = _(!1);
|
|
138
|
-
return (s, n) => {
|
|
139
|
-
if (t.value = n.value, e)
|
|
140
|
-
return;
|
|
141
|
-
e = !0;
|
|
142
|
-
const r = _e(s, n.value);
|
|
143
|
-
B(t, (i) => r.value = i);
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
Be();
|
|
147
|
-
const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y = "Enter", Pe = [L, H, F, W, Y], Ne = {
|
|
148
|
-
name: "Dropdown",
|
|
149
|
-
components: {
|
|
150
|
-
DropdownIcon: de,
|
|
151
|
-
OnClickOutside: Oe,
|
|
152
|
-
FunctionButton: ae,
|
|
153
|
-
CloseIcon: ue
|
|
154
|
-
},
|
|
155
|
-
props: {
|
|
156
|
-
id: {
|
|
157
|
-
type: String,
|
|
158
|
-
default() {
|
|
159
|
-
return `Dropdown-${oe()}`;
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
modelValue: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: null
|
|
165
|
-
},
|
|
166
|
-
name: {
|
|
167
|
-
type: String,
|
|
168
|
-
default: null
|
|
169
|
-
},
|
|
170
|
-
placeholder: {
|
|
171
|
-
type: String,
|
|
172
|
-
default: null
|
|
173
|
-
},
|
|
174
|
-
ariaLabel: {
|
|
175
|
-
type: String,
|
|
176
|
-
required: !0
|
|
177
|
-
},
|
|
178
|
-
isValid: {
|
|
179
|
-
default: !0,
|
|
180
|
-
type: Boolean
|
|
181
|
-
},
|
|
182
|
-
disabled: {
|
|
183
|
-
default: !1,
|
|
184
|
-
type: Boolean
|
|
185
|
-
},
|
|
186
|
-
/**
|
|
187
|
-
* The direction of the dropdown menu. When set to 'up', the menu will appear above the input field.
|
|
188
|
-
* Defaults to 'down'.
|
|
189
|
-
*/
|
|
190
|
-
direction: {
|
|
191
|
-
default: "down",
|
|
192
|
-
type: String
|
|
193
|
-
},
|
|
194
|
-
/**
|
|
195
|
-
* List of possible values. Each item must have an `id` and a `text` property. To use slots an additional
|
|
196
|
-
* slotData object must be passed which contains the data to be displayed.
|
|
197
|
-
*
|
|
198
|
-
* IMPORTANT: All values have to have a slotData object otherwise the slot will not be displayed and the
|
|
199
|
-
* usual text is rendered instead.
|
|
200
|
-
* @example
|
|
201
|
-
* [{
|
|
202
|
-
* id: 'pdf',
|
|
203
|
-
* text: 'PDF'
|
|
204
|
-
* }, {
|
|
205
|
-
* id: 'XLS',
|
|
206
|
-
* text: 'Excel',
|
|
207
|
-
* }, {
|
|
208
|
-
* id: 'JPG',
|
|
209
|
-
* text: 'Jpeg',
|
|
210
|
-
* slotData: {
|
|
211
|
-
* fullName: 'Joint Photographic Experts Group',
|
|
212
|
-
* year: '1992'
|
|
213
|
-
* description: 'Commonly used method of lossy compression for digital images'
|
|
214
|
-
* }
|
|
215
|
-
* }]
|
|
216
|
-
*/
|
|
217
|
-
possibleValues: {
|
|
218
|
-
type: Array,
|
|
219
|
-
default: () => []
|
|
220
|
-
},
|
|
221
|
-
allowNewValue: {
|
|
222
|
-
type: Boolean,
|
|
223
|
-
default: !1
|
|
224
|
-
},
|
|
225
|
-
caseSensitiveSearch: {
|
|
226
|
-
type: Boolean,
|
|
227
|
-
default: !1
|
|
228
|
-
},
|
|
229
|
-
compact: {
|
|
230
|
-
type: Boolean,
|
|
231
|
-
default: !1
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
emits: ["update:modelValue"],
|
|
235
|
-
setup(e) {
|
|
236
|
-
const { caseSensitiveSearch: t, possibleValues: s } = q(e), n = E(!1), r = M(() => {
|
|
237
|
-
const a = {};
|
|
238
|
-
for (const o of s.value)
|
|
239
|
-
a[o.id] = o.text;
|
|
240
|
-
return a;
|
|
241
|
-
}), i = E(r.value[e.modelValue]), f = E(!1);
|
|
242
|
-
B(
|
|
243
|
-
() => e.modelValue,
|
|
244
|
-
(a) => {
|
|
245
|
-
f.value || (i.value = r.value[a]);
|
|
246
|
-
}
|
|
247
|
-
);
|
|
248
|
-
const l = ce(
|
|
249
|
-
i,
|
|
250
|
-
t,
|
|
251
|
-
s,
|
|
252
|
-
n
|
|
253
|
-
);
|
|
254
|
-
return {
|
|
255
|
-
searchValue: i,
|
|
256
|
-
useFilterValues: n,
|
|
257
|
-
searchFilteredPossibleValues: l,
|
|
258
|
-
isExpanded: f
|
|
259
|
-
};
|
|
260
|
-
},
|
|
261
|
-
data() {
|
|
262
|
-
return {
|
|
263
|
-
typingTimeout: null,
|
|
264
|
-
candidate: this.modelValue,
|
|
265
|
-
emptyState: "Nothing found",
|
|
266
|
-
optionRefs: /* @__PURE__ */ new Map(),
|
|
267
|
-
slotContainerHeight: 0
|
|
268
|
-
};
|
|
269
|
-
},
|
|
270
|
-
computed: {
|
|
271
|
-
currentPossibleValues() {
|
|
272
|
-
return this.allowNewValue && this.possibleValues.every((e) => e.id !== this.searchValue) ? [
|
|
273
|
-
{
|
|
274
|
-
id: this.searchValue || "",
|
|
275
|
-
text: `New value: ${this.searchValue || "<empty>"}`,
|
|
276
|
-
isSpecial: !0
|
|
277
|
-
},
|
|
278
|
-
...this.searchFilteredPossibleValues
|
|
279
|
-
] : this.searchFilteredPossibleValues;
|
|
280
|
-
},
|
|
281
|
-
groupedValues() {
|
|
282
|
-
const e = {};
|
|
283
|
-
for (const t of this.currentPossibleValues) {
|
|
284
|
-
const s = t.group || "";
|
|
285
|
-
e[s] || (e[s] = { label: t.group, items: [] }), e[s].items.push(t);
|
|
286
|
-
}
|
|
287
|
-
return Object.values(e);
|
|
288
|
-
},
|
|
289
|
-
orderedGroupedValues() {
|
|
290
|
-
const e = this.groupedValues.filter(
|
|
291
|
-
(s) => s.items[0].group
|
|
292
|
-
), t = this.groupedValues.filter(
|
|
293
|
-
(s) => !s.items[0].group
|
|
294
|
-
);
|
|
295
|
-
return [...e, ...t];
|
|
296
|
-
},
|
|
297
|
-
flatOrderedValues() {
|
|
298
|
-
return this.orderedGroupedValues.flatMap((e) => e.items);
|
|
299
|
-
},
|
|
300
|
-
selectedIndex() {
|
|
301
|
-
return this.flatOrderedValues.map((e) => e.id).indexOf(this.candidate);
|
|
302
|
-
},
|
|
303
|
-
showPlaceholder() {
|
|
304
|
-
return !this.modelValue;
|
|
305
|
-
},
|
|
306
|
-
displayTextMap() {
|
|
307
|
-
const e = {};
|
|
308
|
-
for (const t of this.possibleValues)
|
|
309
|
-
e[t.id] = t.text;
|
|
310
|
-
return e;
|
|
311
|
-
},
|
|
312
|
-
displayText() {
|
|
313
|
-
return this.showPlaceholder ? this.placeholder : this.displayTextMap.hasOwnProperty(this.modelValue) ? this.displayTextMap[this.modelValue] : this.allowNewValue ? this.modelValue.toString() : `(MISSING) ${this.modelValue.toString()}`;
|
|
314
|
-
},
|
|
315
|
-
isMissing() {
|
|
316
|
-
return this.allowNewValue ? !1 : this.modelValue && !this.displayTextMap.hasOwnProperty(this.modelValue);
|
|
317
|
-
},
|
|
318
|
-
hasRightIcon() {
|
|
319
|
-
return this.$slots["icon-right"]?.().length;
|
|
320
|
-
},
|
|
321
|
-
hasOptionTemplate() {
|
|
322
|
-
return this.possibleValues.length === 0 ? !1 : this.possibleValues.every(
|
|
323
|
-
(e) => e.slotData && !Ce(e.slotData)
|
|
324
|
-
);
|
|
325
|
-
},
|
|
326
|
-
selectedOption() {
|
|
327
|
-
return this.possibleValues.find((e) => e.id === this.modelValue);
|
|
328
|
-
},
|
|
329
|
-
hasNoFilteredPossibleValues() {
|
|
330
|
-
return this.currentPossibleValues.length === 0;
|
|
331
|
-
},
|
|
332
|
-
nonEmptySearchValue() {
|
|
333
|
-
return this.searchValue?.length > 0;
|
|
334
|
-
},
|
|
335
|
-
possibleValuesIsProvided() {
|
|
336
|
-
return !!this.possibleValues.length;
|
|
337
|
-
},
|
|
338
|
-
isDisabled() {
|
|
339
|
-
return this.disabled || !this.possibleValuesIsProvided;
|
|
340
|
-
},
|
|
341
|
-
closeIconTooltip() {
|
|
342
|
-
return "Clear";
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
watch: {
|
|
346
|
-
currentPossibleValues(e) {
|
|
347
|
-
this.candidate = e[0]?.id;
|
|
348
|
-
},
|
|
349
|
-
isExpanded() {
|
|
350
|
-
this.useFilterValues = !1;
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
methods: {
|
|
354
|
-
updateCandidate(e) {
|
|
355
|
-
this.candidate = e;
|
|
356
|
-
},
|
|
357
|
-
isCurrentValue(e) {
|
|
358
|
-
return this.candidate === e;
|
|
359
|
-
},
|
|
360
|
-
getButtonRef() {
|
|
361
|
-
return this.$refs.button;
|
|
362
|
-
},
|
|
363
|
-
getOptionsRefs() {
|
|
364
|
-
return this.$refs.options;
|
|
365
|
-
},
|
|
366
|
-
getSearchInput() {
|
|
367
|
-
return this.$refs.searchInput;
|
|
368
|
-
},
|
|
369
|
-
getListBoxNodeRef() {
|
|
370
|
-
return this.$refs.ul;
|
|
371
|
-
},
|
|
372
|
-
emitAndClose(e) {
|
|
373
|
-
this.$emit("update:modelValue", e), this.toggleExpanded();
|
|
374
|
-
},
|
|
375
|
-
scrollTo(e) {
|
|
376
|
-
const t = this.getListBoxNodeRef();
|
|
377
|
-
if (t.scrollHeight >= t.clientHeight) {
|
|
378
|
-
const s = this.optionRefs.get(e);
|
|
379
|
-
if (!s) {
|
|
380
|
-
consola.error(
|
|
381
|
-
`trying to scroll to element with Id ${e.toString()} which does not exist`
|
|
382
|
-
);
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
const n = t.clientHeight + t.scrollTop, r = s.offsetTop + s.offsetHeight;
|
|
386
|
-
r > n ? t.scrollTop = r - t.clientHeight : s.offsetTop < t.scrollTop && (t.scrollTop = s.offsetTop);
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
onArrowDown() {
|
|
390
|
-
const e = this.selectedIndex + 1;
|
|
391
|
-
if (e >= this.flatOrderedValues.length)
|
|
392
|
-
return;
|
|
393
|
-
const t = this.flatOrderedValues[e].id;
|
|
394
|
-
this.updateCandidate(t), this.scrollTo(t);
|
|
395
|
-
},
|
|
396
|
-
onArrowUp() {
|
|
397
|
-
const e = this.selectedIndex - 1;
|
|
398
|
-
if (e < 0)
|
|
399
|
-
return;
|
|
400
|
-
const t = this.flatOrderedValues[e].id;
|
|
401
|
-
this.updateCandidate(t), this.scrollTo(t);
|
|
402
|
-
},
|
|
403
|
-
onEnter() {
|
|
404
|
-
this.hasNoFilteredPossibleValues || typeof this.candidate > "u" || this.emitAndClose(this.candidate);
|
|
405
|
-
},
|
|
406
|
-
onEndKey() {
|
|
407
|
-
const e = this.flatOrderedValues.length - 1;
|
|
408
|
-
this.updateCandidate(this.flatOrderedValues[e].id);
|
|
409
|
-
const t = this.getListBoxNodeRef();
|
|
410
|
-
t.scrollTop = t.scrollHeight;
|
|
411
|
-
},
|
|
412
|
-
onHomeKey() {
|
|
413
|
-
this.updateCandidate(this.flatOrderedValues[0].id), this.getListBoxNodeRef().scrollTop = 0;
|
|
414
|
-
},
|
|
415
|
-
toggleExpanded() {
|
|
416
|
-
this.isExpanded ? this.collapse() : this.expand();
|
|
417
|
-
},
|
|
418
|
-
resetSearchValue() {
|
|
419
|
-
this.displayTextMap.hasOwnProperty(this.modelValue) ? this.searchValue = this.displayTextMap[this.modelValue] : this.allowNewValue ? this.searchValue = this.modelValue?.toString() ?? "" : this.searchValue = "";
|
|
420
|
-
},
|
|
421
|
-
async expand() {
|
|
422
|
-
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));
|
|
423
|
-
},
|
|
424
|
-
collapse() {
|
|
425
|
-
this.isExpanded = !1, this.getButtonRef().focus();
|
|
426
|
-
},
|
|
427
|
-
/* NOTE: we use a single keyDown method because @keydown.up bindings are not testable. */
|
|
428
|
-
handleKeyDownButton(e) {
|
|
429
|
-
this.isExpanded ? this.handleKeyDownOnExpanded(e) : he(e, Pe) && (this.expand(), e.preventDefault());
|
|
430
|
-
},
|
|
431
|
-
handleKeyDownOnExpanded(e) {
|
|
432
|
-
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
|
-
},
|
|
434
|
-
hasSelection() {
|
|
435
|
-
return !!(this.modelValue && !this.isMissing);
|
|
436
|
-
},
|
|
437
|
-
getCurrentSelectedId() {
|
|
438
|
-
try {
|
|
439
|
-
return this.flatOrderedValues[this.selectedIndex].id;
|
|
440
|
-
} catch {
|
|
441
|
-
return "";
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
generateId(e, t = null) {
|
|
445
|
-
if (!t)
|
|
446
|
-
return `${e}-${this.id}`;
|
|
447
|
-
const s = String(t).replace(/[^\w]/gi, "");
|
|
448
|
-
return `${e}-${this.id}-${s}`;
|
|
449
|
-
},
|
|
450
|
-
closeDropdown() {
|
|
451
|
-
this.resetSearchValue(), this.isExpanded = !1;
|
|
452
|
-
},
|
|
453
|
-
handleSearch(e) {
|
|
454
|
-
this.useFilterValues = !0, this.searchValue = e, this.allowNewValue && this.$emit("update:modelValue", e);
|
|
455
|
-
},
|
|
456
|
-
handleResetInput() {
|
|
457
|
-
this.searchValue = "", this.getSearchInput().focus();
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}, Ke = ["id"], Re = ["id", "aria-label", "aria-labelledby", "aria-expanded"], Ae = ["value"], Le = { key: 1 }, He = { class: "right" }, Fe = {
|
|
461
|
-
key: 0,
|
|
462
|
-
class: "loading-icon"
|
|
463
|
-
}, We = ["aria-activedescendant"], Ye = {
|
|
464
|
-
key: 0,
|
|
465
|
-
class: "empty-state"
|
|
466
|
-
}, je = ["id", "title", "aria-selected", "onMouseenter", "onClick"], Ge = ["id", "name", "value"];
|
|
467
|
-
function ze(e, t, s, n, r, i) {
|
|
468
|
-
const f = V("CloseIcon"), l = V("FunctionButton"), a = V("DropdownIcon"), o = V("OnClickOutside");
|
|
469
|
-
return c(), S(o, { onTrigger: i.closeDropdown }, {
|
|
470
|
-
default: C(() => [
|
|
471
|
-
m("div", {
|
|
472
|
-
id: s.id,
|
|
473
|
-
class: y([
|
|
474
|
-
"dropdown",
|
|
475
|
-
{
|
|
476
|
-
collapsed: !n.isExpanded,
|
|
477
|
-
invalid: !s.isValid,
|
|
478
|
-
disabled: i.isDisabled,
|
|
479
|
-
compact: s.compact
|
|
480
|
-
}
|
|
481
|
-
])
|
|
482
|
-
}, [
|
|
483
|
-
m("div", {
|
|
484
|
-
id: i.generateId("button"),
|
|
485
|
-
ref: "button",
|
|
486
|
-
role: "button",
|
|
487
|
-
tabindex: "0",
|
|
488
|
-
"aria-haspopup": "listbox",
|
|
489
|
-
class: y({
|
|
490
|
-
placeholder: i.showPlaceholder && !n.isExpanded,
|
|
491
|
-
missing: i.isMissing && !n.isExpanded,
|
|
492
|
-
"has-option-template": i.hasOptionTemplate && !n.isExpanded
|
|
493
|
-
}),
|
|
494
|
-
style: J({
|
|
495
|
-
...n.isExpanded && i.hasOptionTemplate && {
|
|
496
|
-
height: `calc(${r.slotContainerHeight}px + 0 * var(--form-border-width))`,
|
|
497
|
-
boxSizing: "content-box"
|
|
498
|
-
}
|
|
499
|
-
}),
|
|
500
|
-
"aria-label": s.ariaLabel,
|
|
501
|
-
"aria-labelledby": i.generateId("button"),
|
|
502
|
-
"aria-expanded": n.isExpanded,
|
|
503
|
-
onClick: t[3] || (t[3] = (...u) => i.toggleExpanded && i.toggleExpanded(...u)),
|
|
504
|
-
onKeydown: t[4] || (t[4] = (...u) => i.handleKeyDownButton && i.handleKeyDownButton(...u))
|
|
505
|
-
}, [
|
|
506
|
-
n.isExpanded ? (c(), h("input", {
|
|
507
|
-
key: 0,
|
|
508
|
-
ref: "searchInput",
|
|
509
|
-
value: n.searchValue,
|
|
510
|
-
tabindex: "0",
|
|
511
|
-
role: "searchbox",
|
|
512
|
-
class: "search-input",
|
|
513
|
-
type: "text",
|
|
514
|
-
onClick: t[0] || (t[0] = x(() => {
|
|
515
|
-
}, ["stop"])),
|
|
516
|
-
onInput: t[1] || (t[1] = (u) => i.handleSearch(u.target.value))
|
|
517
|
-
}, null, 40, Ae)) : i.hasOptionTemplate ? (c(), h("div", Le, [
|
|
518
|
-
O(e.$slots, "option", {
|
|
519
|
-
slotData: i.selectedOption?.slotData,
|
|
520
|
-
isMissing: i.isMissing,
|
|
521
|
-
selectedValue: s.modelValue,
|
|
522
|
-
expanded: !1
|
|
523
|
-
})
|
|
524
|
-
])) : (c(), h("span", {
|
|
525
|
-
key: 2,
|
|
526
|
-
ref: "span"
|
|
527
|
-
}, D(i.displayText), 513)),
|
|
528
|
-
m("div", He, [
|
|
529
|
-
i.hasRightIcon ? (c(), h("div", Fe, [
|
|
530
|
-
O(e.$slots, "icon-right")
|
|
531
|
-
])) : v("", !0),
|
|
532
|
-
n.isExpanded && i.nonEmptySearchValue ? (c(), S(l, {
|
|
533
|
-
key: 1,
|
|
534
|
-
ref: "closeButton",
|
|
535
|
-
title: "Close",
|
|
536
|
-
tabindex: "0",
|
|
537
|
-
class: "button",
|
|
538
|
-
compact: s.compact,
|
|
539
|
-
onKeydown: t[2] || (t[2] = Q(x(() => {
|
|
540
|
-
}, ["stop"]), ["enter"])),
|
|
541
|
-
onClick: x(i.handleResetInput, ["stop"])
|
|
542
|
-
}, {
|
|
543
|
-
default: C(() => [
|
|
544
|
-
P(f, { class: "icon" })
|
|
545
|
-
]),
|
|
546
|
-
_: 1
|
|
547
|
-
}, 8, ["compact", "onClick"])) : v("", !0),
|
|
548
|
-
!n.isExpanded || !i.nonEmptySearchValue ? (c(), S(l, {
|
|
549
|
-
key: 2,
|
|
550
|
-
class: "button",
|
|
551
|
-
compact: s.compact,
|
|
552
|
-
disabled: i.isDisabled,
|
|
553
|
-
title: n.isExpanded ? "Cancel" : "Expand",
|
|
554
|
-
tabindex: n.isExpanded ? 0 : -1,
|
|
555
|
-
onClick: x(i.toggleExpanded, ["stop"])
|
|
556
|
-
}, {
|
|
557
|
-
default: C(() => [
|
|
558
|
-
P(a, {
|
|
559
|
-
class: y(["dropdown-icon", "icon"])
|
|
560
|
-
})
|
|
561
|
-
]),
|
|
562
|
-
_: 1
|
|
563
|
-
}, 8, ["compact", "disabled", "title", "tabindex", "onClick"])) : v("", !0)
|
|
564
|
-
])
|
|
565
|
-
], 46, Re),
|
|
566
|
-
Z(m("ul", {
|
|
567
|
-
ref: "ul",
|
|
568
|
-
role: "listbox",
|
|
569
|
-
tabindex: "-1",
|
|
570
|
-
"aria-activedescendant": n.isExpanded ? i.generateId("option", i.getCurrentSelectedId()) : void 0,
|
|
571
|
-
class: y({ "drops-upwards": s.direction === "up" })
|
|
572
|
-
}, [
|
|
573
|
-
i.hasNoFilteredPossibleValues ? (c(), h("div", Ye, D(r.emptyState), 1)) : v("", !0),
|
|
574
|
-
(c(!0), h(w, null, N(i.orderedGroupedValues, (u, b) => (c(), h(w, { key: b }, [
|
|
575
|
-
t[5] || (t[5] = m("span", { class: "group-divider" }, null, -1)),
|
|
576
|
-
(c(!0), h(w, null, N(u.items, (d) => (c(), h("li", {
|
|
577
|
-
id: i.generateId("option", d.id),
|
|
578
|
-
key: `listbox-${d.id}`,
|
|
579
|
-
ref_for: !0,
|
|
580
|
-
ref: (g) => r.optionRefs.set(d.id, g),
|
|
581
|
-
role: "option",
|
|
582
|
-
title: typeof d.title > "u" ? d.text : d.title,
|
|
583
|
-
class: y({
|
|
584
|
-
focused: i.isCurrentValue(d.id),
|
|
585
|
-
noselect: !0,
|
|
586
|
-
empty: d.text.trim() === "",
|
|
587
|
-
"has-option-template": i.hasOptionTemplate,
|
|
588
|
-
special: d.isSpecial
|
|
589
|
-
}),
|
|
590
|
-
"aria-selected": i.isCurrentValue(d.id),
|
|
591
|
-
onMouseenter: (g) => i.updateCandidate(d.id),
|
|
592
|
-
onClick: (g) => i.emitAndClose(d.id)
|
|
593
|
-
}, [
|
|
594
|
-
i.hasOptionTemplate ? O(e.$slots, "option", {
|
|
595
|
-
key: 0,
|
|
596
|
-
slotData: d.slotData,
|
|
597
|
-
expanded: !0
|
|
598
|
-
}) : (c(), h(w, { key: 1 }, [
|
|
599
|
-
$(D(d.text), 1)
|
|
600
|
-
], 64))
|
|
601
|
-
], 42, je))), 128))
|
|
602
|
-
], 64))), 128))
|
|
603
|
-
], 10, We), [
|
|
604
|
-
[ee, n.isExpanded]
|
|
605
|
-
]),
|
|
606
|
-
m("input", {
|
|
607
|
-
id: s.id,
|
|
608
|
-
type: "hidden",
|
|
609
|
-
name: s.name,
|
|
610
|
-
value: s.modelValue
|
|
611
|
-
}, null, 8, Ge)
|
|
612
|
-
], 10, Ke)
|
|
613
|
-
]),
|
|
614
|
-
_: 3
|
|
615
|
-
}, 8, ["onTrigger"]);
|
|
616
|
-
}
|
|
617
|
-
const st = /* @__PURE__ */ re(Ne, [["render", ze], ["__scopeId", "data-v-0a20a161"]]);
|
|
618
|
-
export {
|
|
619
|
-
st as D
|
|
620
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { h as r, defineComponent as c, openBlock as s, createBlock as i, unref as a } from "vue";
|
|
2
|
-
import { R as d } from "./reload-DjY4GPvr.js";
|
|
3
|
-
import { _ } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-BYoCo820.js";
|
|
4
|
-
const p = (t, o) => ({
|
|
5
|
-
render() {
|
|
6
|
-
const e = t.render({}, []), n = r("title", o);
|
|
7
|
-
return n.ns = "svg", e.children.unshift(n), e;
|
|
8
|
-
}
|
|
9
|
-
}), l = /* @__PURE__ */ c({
|
|
10
|
-
__name: "LoadingIcon",
|
|
11
|
-
setup(t) {
|
|
12
|
-
const o = p(d, "Loading…");
|
|
13
|
-
return (e, n) => (s(), i(a(o)));
|
|
14
|
-
}
|
|
15
|
-
}), u = /* @__PURE__ */ _(l, [["__scopeId", "data-v-6b552b81"]]);
|
|
16
|
-
export {
|
|
17
|
-
u as L
|
|
18
|
-
};
|