@knime/jsonforms 1.14.2 → 1.15.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.
Files changed (165) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/{AnyOfTwinlist-Cwxtyt0Q.js → AnyOfTwinlist-Co_sJAsc.js} +3 -3
  3. package/dist/{Button-BxuGKyL5.js → Button-Cqwayw73.js} +4 -4
  4. package/dist/CheckboxControl-C10_DX1N.js +40 -0
  5. package/dist/{Checkboxes-DIPjJhPO.js → Checkboxes-DWOxHiUX.js} +2 -2
  6. package/dist/{CheckboxesControl-5QlPmjwv.js → CheckboxesControl-BMRFgmO_.js} +7 -10
  7. package/dist/{ComboBoxControl-Dk02x7sN.js → ComboBoxControl-R0DlbAdT.js} +26 -29
  8. package/dist/{DateControl-CddCObVg.js → DateControl-DAGAM92B.js} +3 -3
  9. package/dist/DateTimeControl-DJhIb_U4.js +45 -0
  10. package/dist/{DateTimeFormatInput-bO1zHUyp.js → DateTimeFormatInput-BhLQzC-P.js} +74 -82
  11. package/dist/{DateTimeFormatPickerControl-Dq25_JV2.js → DateTimeFormatPickerControl-V7pxRYaW.js} +5 -8
  12. package/dist/{DateTimeFormatPickerWithTypeControl-DZib_x-B.js → DateTimeFormatPickerWithTypeControl-3fa75rGw.js} +6 -9
  13. package/dist/{DateTimeInput-CEYEV8dt.js → DateTimeInput-Cs0KqlOS.js} +4629 -4556
  14. package/dist/Dropdown-BEx-cvXH.js +608 -0
  15. package/dist/{DropdownControl-BNQKWzTT.js → DropdownControl-DEIA5VD4.js} +4 -4
  16. package/dist/{HorizontalLayout-6GwurgkR.js → HorizontalLayout-DCfhMNq4.js} +2 -2
  17. package/dist/{InputField-BYxW_-G3.js → InputField-OkFB9VHZ.js} +11 -11
  18. package/dist/{IntegerControl-DZIY-wb_.js → IntegerControl-Om8J7hch.js} +3 -3
  19. package/dist/{IntervalControl-Yts36_MI.js → IntervalControl-B7UbyyD-.js} +99 -100
  20. package/dist/{LoadingDropdown-Dw-0WQ8x.js → LoadingDropdown-CINkq_Sw.js} +6 -6
  21. package/dist/{ManualTwinlistControl-C3NnAug1.js → ManualTwinlistControl-BLTfr2gT.js} +24 -30
  22. package/dist/MultiSelectListBoxControl-j1TaFtQj.js +31 -0
  23. package/dist/{MultimodeTwinlistControl-B2Jven29.js → MultimodeTwinlistControl-BsFqHRFM.js} +97 -108
  24. package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-DGKMWtLi.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-2fVBipAl.js} +1 -1
  25. package/dist/{MultiselectListBox-CHvGxAhY.js → MultiselectListBox-CMTJnAWr.js} +18 -23
  26. package/dist/{NameFilter-D0hKO5Fr.js → NameFilter-d5k6rDVY.js} +3 -3
  27. package/dist/{NumberControl-DkeQT1iR.js → NumberControl-Kc3hvVef.js} +3 -3
  28. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-BOCR1qXG.js +50 -0
  29. package/dist/{NumberInput-DJ38AGiR.js → NumberInput-BepS3tAK.js} +5 -5
  30. package/dist/{OneOfDropdown-NAgE-mPP.js → OneOfDropdown-CLwVXrbC.js} +10 -11
  31. package/dist/{RadioControl-DjrysNQ_.js → RadioControl-DpziR8nA.js} +4 -4
  32. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-DVIeg5W1.js +104 -0
  33. package/dist/{RichTextControl-CXY1ULxR.js → RichTextControl-CE6whfV5.js} +4524 -4079
  34. package/dist/SectionHeading-D7znCZXu.js +19 -0
  35. package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js +15431 -0
  36. package/dist/{SectionLayout-CJP4sYyB.js → SectionLayout-BhXDOzqB.js} +4 -4
  37. package/dist/SettingsSubPanel-x9uWGoiu.js +5 -0
  38. package/dist/{SettingsSubPanelLayout-YBNVPQOD.js → SettingsSubPanelLayout-BPHBM5n5.js} +12 -11
  39. package/dist/{SimpleButtonControl-ejyUwJdL.js → SimpleButtonControl-DfCSlgZS.js} +9 -9
  40. package/dist/SimpleTwinlistControl-CBalniCf.js +25 -0
  41. package/dist/{SingleSelectControl-B0JgDv7j.js → SingleSelectControl-DC4w0ata.js} +4 -4
  42. package/dist/{SingleSelectListBoxControl-ClQOxnxW.js → SingleSelectListBoxControl-CKj-p8jZ.js} +33 -36
  43. package/dist/{SortListControl-mvJofiWn.js → SortListControl-BIUyPjCi.js} +122 -120
  44. package/dist/{StyledListItem-BXz08pEQ.js → StyledListItem-D-HJWfo5.js} +3 -3
  45. package/dist/{TextAreaControl-S4aoqAv1.js → TextAreaControl-D28TQZEY.js} +23 -26
  46. package/dist/{TextControl-rJrjrBw8.js → TextControl-DUDBWcHy.js} +1 -1
  47. package/dist/{TextControl.vue_vue_type_script_setup_true_lang-Bf6GB1zX.js → TextControl.vue_vue_type_script_setup_true_lang-DpAd3yOu.js} +16 -19
  48. package/dist/TimeControl-HRooO_z3.js +36 -0
  49. package/dist/{TwinlistControlBase-D1l9t7Up.js → TwinlistControlBase-Brfh5pqZ.js} +5 -5
  50. package/dist/{TwinlistLoadingInfo-CQRx9cEu.js → TwinlistLoadingInfo-C4Tta00d.js} +150 -167
  51. package/dist/TypedStringFilter-CdvgPKhD.js +26 -0
  52. package/dist/{ValueSwitch-CUYV7v67.js → ValueSwitch-W4y1YvNM.js} +8 -8
  53. package/dist/{ValueSwitchControl-IP9SxrUs.js → ValueSwitchControl-BaXH8Cjx.js} +3 -3
  54. package/dist/{VerticalLayout-D2eQSYgv.js → VerticalLayout-ChAmRKNj.js} +5 -5
  55. package/dist/VerticalLayoutBase-DAk4vfH5.js +20 -0
  56. package/dist/ZonedDateTimeControl-Qb57KmMT.js +69 -0
  57. package/dist/{_baseEach-cjHvi5iT.js → _baseEach-DdH9cM67.js} +4 -4
  58. package/dist/{_baseIteratee-CIxt0KWU.js → _baseIteratee-BGt-t7Os.js} +27 -27
  59. package/dist/{_getTag-sLUyzSDj.js → _getTag-DAFySze4.js} +10 -10
  60. package/dist/{arrow-dropdown-DdgjzLAO.js → arrow-dropdown-BAFsD8Su.js} +2 -2
  61. package/dist/{arrow-next-CIOU5o42.js → arrow-next-BQVCxGb8.js} +2 -2
  62. package/dist/{close-BuY4mhXV.js → close-DGt8x-x_.js} +2 -2
  63. package/dist/floating-ui.vue-CDo9Kas1.js +1055 -0
  64. package/dist/{hotkeys-kwHHtFKz.js → hotkeys-rxnt4egK.js} +1 -1
  65. package/dist/index-CpKfM262.js +376 -0
  66. package/dist/knime-jsonforms.css +1 -1
  67. package/dist/knime-jsonforms.js +64 -67
  68. package/dist/{localTimeUtils-Dv-1R88J.js → localTimeUtils-NIKgHnIr.js} +179 -181
  69. package/dist/magic-string.es-BQ9KnLz-.js +659 -0
  70. package/dist/navigator-e30QQMkl.js +4 -0
  71. package/dist/popper-LGjf7Wza.js +905 -0
  72. package/dist/{reload-BVbCGubF.js → reload-DCdbNLa2.js} +2 -2
  73. package/dist/src/higherOrderComponents/control/LabeledControl.vue.d.ts +26 -22
  74. package/dist/src/higherOrderComponents/control/errorMessage/ErrorLine.vue.d.ts +3 -4
  75. package/dist/src/higherOrderComponents/control/errorMessage/ErrorMessages.vue.d.ts +16 -10
  76. package/dist/src/higherOrderComponents/control/errorMessage/withErrorMessage.d.ts +1 -1
  77. package/dist/src/higherOrderComponents/control/util.d.ts +7 -33
  78. package/dist/src/higherOrderComponents/layout/util.d.ts +1 -17
  79. package/dist/src/layoutComponents/Form.vue.d.ts +12 -4
  80. package/dist/src/layoutComponents/HorizontalLayout.vue.d.ts +1 -1
  81. package/dist/src/layoutComponents/SectionLayout.vue.d.ts +13 -5
  82. package/dist/src/layoutComponents/VerticalLayout.vue.d.ts +1 -1
  83. package/dist/src/layoutComponents/VerticalLayoutBase.vue.d.ts +16 -9
  84. package/dist/src/layoutComponents/section/SectionHeading.vue.d.ts +13 -6
  85. package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanel.vue.d.ts +2 -2
  86. package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanelBackArrow.vue.d.ts +1 -1
  87. package/dist/src/renderers/dateTimeFormatPickerRenderer.d.ts +2 -2
  88. package/dist/src/renderers/defaultRenderers.d.ts +966 -151
  89. package/dist/src/renderers/dropdownRenderer.d.ts +1 -1
  90. package/dist/src/renderers/fallbackRenderers.d.ts +8 -8
  91. package/dist/src/renderers/horizontalLayoutRenderer.d.ts +1 -1
  92. package/dist/src/renderers/sectionLayoutRenderer.d.ts +4 -4
  93. package/dist/src/renderers/simpleButtonRenderer.d.ts +7 -89
  94. package/dist/src/renderers/sortListRenderer.d.ts +853 -20
  95. package/dist/src/renderers/textMessageRenderer.d.ts +65 -1
  96. package/dist/src/renderers/textRenderer.d.ts +1 -1
  97. package/dist/src/renderers/verticalLayoutRenderer.d.ts +2 -2
  98. package/dist/src/renderers/zonedDateTimeRenderer.d.ts +1 -1
  99. package/dist/src/uiComponents/CheckboxControl.vue.d.ts +15 -6
  100. package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +2 -1
  101. package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +2 -1
  102. package/dist/src/uiComponents/DateControl.vue.d.ts +2 -1
  103. package/dist/src/uiComponents/DateTimeControl.vue.d.ts +2 -1
  104. package/dist/src/uiComponents/DateTimeFormatPickerControl.vue.d.ts +2 -1
  105. package/dist/src/uiComponents/DateTimeFormatPickerWithTypeControl.vue.d.ts +2 -1
  106. package/dist/src/uiComponents/DropdownControl.vue.d.ts +2 -1
  107. package/dist/src/uiComponents/IntegerControl.vue.d.ts +2 -1
  108. package/dist/src/uiComponents/IntervalControl.vue.d.ts +2 -1
  109. package/dist/src/uiComponents/MultiSelectListBoxControl.vue.d.ts +2 -1
  110. package/dist/src/uiComponents/NumberControl.vue.d.ts +2 -1
  111. package/dist/src/uiComponents/NumberControlBase.vue.d.ts +5 -9
  112. package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +2 -1
  113. package/dist/src/uiComponents/RadioControl.vue.d.ts +2 -1
  114. package/dist/src/uiComponents/RadioControlBase.vue.d.ts +4 -8
  115. package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +5 -129
  116. package/dist/src/uiComponents/SingleSelectControl.vue.d.ts +2 -1
  117. package/dist/src/uiComponents/SingleSelectListBoxControl.vue.d.ts +2 -1
  118. package/dist/src/uiComponents/SortListControl.vue.d.ts +845 -12
  119. package/dist/src/uiComponents/TextAreaControl.vue.d.ts +2 -1
  120. package/dist/src/uiComponents/TextControl.vue.d.ts +203 -3
  121. package/dist/src/uiComponents/TextMessageControl.vue.d.ts +2 -1
  122. package/dist/src/uiComponents/TimeControl.vue.d.ts +2 -1
  123. package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +2 -1
  124. package/dist/src/uiComponents/ZonedDateTimeControl.vue.d.ts +2 -1
  125. package/dist/src/uiComponents/composables/useProvidedState.d.ts +1 -1
  126. package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +1 -1
  127. package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +3 -1
  128. package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +230 -1
  129. package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +2 -1
  130. package/dist/src/uiComponents/twinlist/ManualTwinlistControl.vue.d.ts +2 -1
  131. package/dist/src/uiComponents/twinlist/MultimodeTwinlistControl.vue.d.ts +8 -15
  132. package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +2 -1
  133. package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +2 -1
  134. package/dist/src/uiComponents/twinlist/TwinlistControlBase.vue.d.ts +5 -10
  135. package/dist/src/uiComponents/twinlist/TypedStringFilter.vue.d.ts +2 -1
  136. package/dist/{svgWithTitle-Cr3Pu3wr.js → svgWithTitle-CnTmPYAB.js} +4 -4
  137. package/dist/testUtils/component.d.ts +18 -18
  138. package/dist/testing.js +8688 -8655
  139. package/dist/{toString-C_MqBj3_.js → toString-BhubvA3m.js} +1 -1
  140. package/dist/{useBuiltinValidations-DP7OS71z.js → useBuiltinValidations-Boxrm71q.js} +1 -1
  141. package/dist/useDropdownNavigation-BfCXUheD.js +817 -0
  142. package/dist/usePossibleValues-DXuWWBh_.js +16 -0
  143. package/package.json +14 -14
  144. package/dist/CheckboxControl-Oe97HhY3.js +0 -40
  145. package/dist/DateTimeControl-DyXUJBHE.js +0 -54
  146. package/dist/Dropdown-CJj0CUA8.js +0 -604
  147. package/dist/MultiSelectListBoxControl-3Q41S4aA.js +0 -34
  148. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B9K5qEs3.js +0 -53
  149. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-WaVJMdQq.js +0 -114
  150. package/dist/SectionHeading-BU1W5lDr.js +0 -19
  151. package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js +0 -14015
  152. package/dist/SettingsSubPanel-KxEyzlB6.js +0 -5
  153. package/dist/SimpleTwinlistControl-qXQxRI7h.js +0 -28
  154. package/dist/TimeControl-DfhE8yu9.js +0 -42
  155. package/dist/TypedStringFilter-C6JhWCCC.js +0 -29
  156. package/dist/VerticalLayoutBase-DRfHwc4t.js +0 -20
  157. package/dist/ZonedDateTimeControl-Bi8cV34A.js +0 -75
  158. package/dist/floating-ui.vue-B-MrqKCT.js +0 -1019
  159. package/dist/index-CoRworrE.js +0 -322
  160. package/dist/magic-string.es-D-aKzDFf.js +0 -858
  161. package/dist/navigator-D_R-txCf.js +0 -7
  162. package/dist/popper-CRR--9mA.js +0 -907
  163. package/dist/src/JsonFormsDialog.vue.d.ts +0 -46
  164. package/dist/useDropdownNavigation-7o7SRJSo.js +0 -781
  165. package/dist/usePossibleValues-lz0Rcu_N.js +0 -20
@@ -0,0 +1,608 @@
1
+ import { defineComponent as G, shallowRef as I, h as z, watch as _, toValue as f, computed as B, unref as U, nextTick as X, toRefs as q, ref as M, resolveComponent as x, createBlock as E, openBlock as c, withCtx as C, createElementVNode as m, normalizeClass as y, withDirectives as Q, normalizeStyle as J, createElementBlock as h, withModifiers as v, renderSlot as O, toDisplayString as D, createCommentVNode as V, withKeys as Z, createVNode as P, Fragment as w, renderList as K, createTextVNode as $, vShow as ee } from "vue";
2
+ import { o as te, t as se, b as R, i as N, c as S, w as ne, d as ie, e as oe } from "./index-CpKfM262.js";
3
+ import { A as le } from "./arrow-dropdown-BAFsD8Su.js";
4
+ import { C as re } from "./close-DGt8x-x_.js";
5
+ /* empty css */
6
+ import { u as ae } from "./useSearch-hpyYQ_6y.js";
7
+ import { v as de, B as ue, _ as ce } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js";
8
+ import { i as he } from "./hotkeys-rxnt4egK.js";
9
+ import { d as pe, a as fe, b as me, i as ge, e as ye, h as xe, c as ve } from "./_getTag-DAFySze4.js";
10
+ import { i as Ve } from "./isArray-WzO_os3q.js";
11
+ var we = "[object Map]", be = "[object Set]", Ee = Object.prototype, Ce = Ee.hasOwnProperty;
12
+ function Oe(e) {
13
+ if (e == null)
14
+ return !0;
15
+ if (pe(e) && (Ve(e) || typeof e == "string" || typeof e.splice == "function" || fe(e) || me(e) || ge(e)))
16
+ return !e.length;
17
+ var t = ye(e);
18
+ if (t == we || t == be)
19
+ return !e.size;
20
+ if (xe(e))
21
+ return !ve(e).length;
22
+ for (var s in e)
23
+ if (Ce.call(e, s))
24
+ return !1;
25
+ return !0;
26
+ }
27
+ const De = /* @__PURE__ */ G({
28
+ name: "OnClickOutside",
29
+ props: ["as", "options"],
30
+ emits: ["trigger"],
31
+ setup(e, { slots: t, emit: s }) {
32
+ const a = I();
33
+ return te(a, (i) => {
34
+ s("trigger", i);
35
+ }, e.options), () => {
36
+ if (t.default)
37
+ return z(e.as || "div", { ref: a }, t.default());
38
+ };
39
+ }
40
+ }), Se = oe ? window : void 0;
41
+ function ke(e) {
42
+ var t;
43
+ const s = f(e);
44
+ return (t = s?.$el) != null ? t : s;
45
+ }
46
+ function Te(...e) {
47
+ const t = [], s = () => {
48
+ t.forEach((o) => o()), t.length = 0;
49
+ }, a = (o, l, r, u) => (o.addEventListener(l, r, u), () => o.removeEventListener(l, r, u)), i = B(() => {
50
+ const o = S(f(e[0])).filter((l) => l != null);
51
+ return o.every((l) => typeof l != "string") ? o : void 0;
52
+ }), n = ne(
53
+ () => {
54
+ var o, l;
55
+ return [
56
+ (l = (o = i.value) == null ? void 0 : o.map((r) => ke(r))) != null ? l : [Se].filter((r) => r != null),
57
+ S(f(i.value ? e[1] : e[0])),
58
+ S(U(i.value ? e[2] : e[1])),
59
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
60
+ f(i.value ? e[3] : e[2])
61
+ ];
62
+ },
63
+ ([o, l, r, u]) => {
64
+ if (s(), !o?.length || !l?.length || !r?.length)
65
+ return;
66
+ const b = ie(u) ? { ...u } : u;
67
+ t.push(
68
+ ...o.flatMap(
69
+ (d) => l.flatMap(
70
+ (g) => r.map((j) => a(d, g, j, b))
71
+ )
72
+ )
73
+ );
74
+ },
75
+ { flush: "post" }
76
+ ), p = () => {
77
+ n(), s();
78
+ };
79
+ return R(s), p;
80
+ }
81
+ function k(e) {
82
+ return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
83
+ }
84
+ function A(e) {
85
+ const t = window.getComputedStyle(e);
86
+ if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
87
+ return !0;
88
+ {
89
+ const s = e.parentNode;
90
+ return !s || s.tagName === "BODY" ? !1 : A(s);
91
+ }
92
+ }
93
+ function Ie(e) {
94
+ const t = e || window.event, s = t.target;
95
+ return A(s) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
96
+ }
97
+ const T = /* @__PURE__ */ new WeakMap();
98
+ function _e(e, t = !1) {
99
+ const s = I(t);
100
+ let a = null, i = "";
101
+ _(se(e), (o) => {
102
+ const l = k(f(o));
103
+ if (l) {
104
+ const r = l;
105
+ if (T.get(r) || T.set(r, r.style.overflow), r.style.overflow !== "hidden" && (i = r.style.overflow), r.style.overflow === "hidden")
106
+ return s.value = !0;
107
+ if (s.value)
108
+ return r.style.overflow = "hidden";
109
+ }
110
+ }, {
111
+ immediate: !0
112
+ });
113
+ const n = () => {
114
+ const o = k(f(e));
115
+ !o || s.value || (N && (a = Te(
116
+ o,
117
+ "touchmove",
118
+ (l) => {
119
+ Ie(l);
120
+ },
121
+ { passive: !1 }
122
+ )), o.style.overflow = "hidden", s.value = !0);
123
+ }, p = () => {
124
+ const o = k(f(e));
125
+ !o || !s.value || (N && a?.(), o.style.overflow = i, T.delete(o), s.value = !1);
126
+ };
127
+ return R(p), B({
128
+ get() {
129
+ return s.value;
130
+ },
131
+ set(o) {
132
+ o ? n() : p();
133
+ }
134
+ });
135
+ }
136
+ function Be() {
137
+ let e = !1;
138
+ const t = I(!1);
139
+ return (s, a) => {
140
+ if (t.value = a.value, e)
141
+ return;
142
+ e = !0;
143
+ const i = _e(s, a.value);
144
+ _(t, (n) => i.value = n);
145
+ };
146
+ }
147
+ Be();
148
+ const L = "ArrowDown", H = "ArrowUp", F = "Home", W = "End", Me = "Escape", Y = "Enter", Pe = [L, H, F, W, Y], Ke = {
149
+ name: "Dropdown",
150
+ components: {
151
+ DropdownIcon: le,
152
+ OnClickOutside: De,
153
+ FunctionButton: de,
154
+ CloseIcon: re
155
+ },
156
+ props: {
157
+ id: {
158
+ type: String,
159
+ default() {
160
+ return `Dropdown-${ue()}`;
161
+ }
162
+ },
163
+ modelValue: {
164
+ type: String,
165
+ default: null
166
+ },
167
+ name: {
168
+ type: String,
169
+ default: null
170
+ },
171
+ placeholder: {
172
+ type: String,
173
+ default: null
174
+ },
175
+ ariaLabel: {
176
+ type: String,
177
+ required: !0
178
+ },
179
+ isValid: {
180
+ default: !0,
181
+ type: Boolean
182
+ },
183
+ disabled: {
184
+ default: !1,
185
+ type: Boolean
186
+ },
187
+ /**
188
+ * The direction of the dropdown menu. When set to 'up', the menu will appear above the input field.
189
+ * Defaults to 'down'.
190
+ */
191
+ direction: {
192
+ default: "down",
193
+ type: String
194
+ },
195
+ /**
196
+ * List of possible values. Each item must have an `id` and a `text` property. To use slots an additional
197
+ * slotData object must be passed which contains the data to be displayed.
198
+ *
199
+ * IMPORTANT: All values have to have a slotData object otherwise the slot will not be displayed and the
200
+ * usual text is rendered instead.
201
+ * @example
202
+ * [{
203
+ * id: 'pdf',
204
+ * text: 'PDF'
205
+ * }, {
206
+ * id: 'XLS',
207
+ * text: 'Excel',
208
+ * }, {
209
+ * id: 'JPG',
210
+ * text: 'Jpeg',
211
+ * slotData: {
212
+ * fullName: 'Joint Photographic Experts Group',
213
+ * year: '1992'
214
+ * description: 'Commonly used method of lossy compression for digital images'
215
+ * }
216
+ * }]
217
+ */
218
+ possibleValues: {
219
+ type: Array,
220
+ default: () => []
221
+ },
222
+ caseSensitiveSearch: {
223
+ type: Boolean,
224
+ default: !1
225
+ },
226
+ compact: {
227
+ type: Boolean,
228
+ default: !1
229
+ }
230
+ },
231
+ emits: ["update:modelValue"],
232
+ setup(e) {
233
+ const { caseSensitiveSearch: t, possibleValues: s } = q(e), a = M(!1), i = B(() => {
234
+ const o = {};
235
+ for (const l of s.value)
236
+ o[l.id] = l.text;
237
+ return o;
238
+ }), n = M(i.value[e.modelValue]);
239
+ _(
240
+ () => e.modelValue,
241
+ (o) => {
242
+ n.value = i.value[o];
243
+ }
244
+ );
245
+ const p = ae(
246
+ n,
247
+ t,
248
+ s,
249
+ a
250
+ );
251
+ return {
252
+ searchValue: n,
253
+ useFilterValues: a,
254
+ currentPossibleValues: p
255
+ };
256
+ },
257
+ data() {
258
+ return {
259
+ typingTimeout: null,
260
+ isExpanded: !1,
261
+ searchQuery: "",
262
+ candidate: this.modelValue,
263
+ emptyState: "Nothing found",
264
+ optionRefs: /* @__PURE__ */ new Map(),
265
+ slotContainerHeight: 0
266
+ };
267
+ },
268
+ computed: {
269
+ groupedValues() {
270
+ const e = {};
271
+ for (const t of this.currentPossibleValues) {
272
+ const s = t.group || "";
273
+ e[s] || (e[s] = { label: t.group, items: [] }), e[s].items.push(t);
274
+ }
275
+ return Object.values(e);
276
+ },
277
+ orderedGroupedValues() {
278
+ const e = this.groupedValues.filter(
279
+ (s) => s.items[0].group
280
+ ), t = this.groupedValues.filter(
281
+ (s) => !s.items[0].group
282
+ );
283
+ return [...e, ...t];
284
+ },
285
+ flatOrderedValues() {
286
+ return this.orderedGroupedValues.flatMap((e) => e.items);
287
+ },
288
+ selectedIndex() {
289
+ return this.flatOrderedValues.map((e) => e.id).indexOf(this.candidate);
290
+ },
291
+ showPlaceholder() {
292
+ return !this.modelValue;
293
+ },
294
+ displayTextMap() {
295
+ const e = {};
296
+ for (const t of this.possibleValues)
297
+ e[t.id] = t.text;
298
+ return e;
299
+ },
300
+ displayText() {
301
+ return this.showPlaceholder ? this.placeholder : this.displayTextMap.hasOwnProperty(this.modelValue) ? this.displayTextMap[this.modelValue] : `(MISSING) ${this.modelValue.toString()}`;
302
+ },
303
+ isMissing() {
304
+ return this.modelValue && !this.displayTextMap.hasOwnProperty(this.modelValue);
305
+ },
306
+ hasRightIcon() {
307
+ return this.$slots["icon-right"]?.().length;
308
+ },
309
+ hasOptionTemplate() {
310
+ return this.possibleValues.length === 0 ? !1 : this.possibleValues.every(
311
+ (e) => e.slotData && !Oe(e.slotData)
312
+ );
313
+ },
314
+ selectedOption() {
315
+ return this.possibleValues.find((e) => e.id === this.modelValue);
316
+ },
317
+ hasNoFilteredPossibleValues() {
318
+ return this.currentPossibleValues.length === 0;
319
+ },
320
+ nonEmptySearchValue() {
321
+ return this.searchValue?.length > 0;
322
+ },
323
+ possibleValuesIsProvided() {
324
+ return !!this.possibleValues.length;
325
+ },
326
+ isDisabled() {
327
+ return this.disabled || !this.possibleValuesIsProvided;
328
+ },
329
+ closeIconTooltip() {
330
+ return "Clear";
331
+ }
332
+ },
333
+ watch: {
334
+ currentPossibleValues(e) {
335
+ this.candidate = e[0]?.id;
336
+ },
337
+ isExpanded() {
338
+ this.useFilterValues = !1;
339
+ }
340
+ },
341
+ methods: {
342
+ updateCandidate(e) {
343
+ this.candidate = e;
344
+ },
345
+ isCurrentValue(e) {
346
+ return this.candidate === e;
347
+ },
348
+ getButtonRef() {
349
+ return this.$refs.button;
350
+ },
351
+ getOptionsRefs() {
352
+ return this.$refs.options;
353
+ },
354
+ getSearchInput() {
355
+ return this.$refs.searchInput;
356
+ },
357
+ getListBoxNodeRef() {
358
+ return this.$refs.ul;
359
+ },
360
+ emitAndClose(e) {
361
+ this.$emit("update:modelValue", e), this.toggleExpanded();
362
+ },
363
+ scrollTo(e) {
364
+ const t = this.getListBoxNodeRef();
365
+ if (t.scrollHeight >= t.clientHeight) {
366
+ const s = this.optionRefs.get(e);
367
+ if (!s) {
368
+ consola.error(
369
+ `trying to scroll to element with Id ${e.toString()} which does not exist`
370
+ );
371
+ return;
372
+ }
373
+ const a = t.clientHeight + t.scrollTop, i = s.offsetTop + s.offsetHeight;
374
+ i > a ? t.scrollTop = i - t.clientHeight : s.offsetTop < t.scrollTop && (t.scrollTop = s.offsetTop);
375
+ }
376
+ },
377
+ onArrowDown() {
378
+ const e = this.selectedIndex + 1;
379
+ if (e >= this.flatOrderedValues.length)
380
+ return;
381
+ const t = this.flatOrderedValues[e].id;
382
+ this.updateCandidate(t), this.scrollTo(t);
383
+ },
384
+ onArrowUp() {
385
+ const e = this.selectedIndex - 1;
386
+ if (e < 0)
387
+ return;
388
+ const t = this.flatOrderedValues[e].id;
389
+ this.updateCandidate(t), this.scrollTo(t);
390
+ },
391
+ onEnter() {
392
+ this.hasNoFilteredPossibleValues || typeof this.candidate > "u" || this.emitAndClose(this.candidate);
393
+ },
394
+ onEndKey() {
395
+ const e = this.flatOrderedValues.length - 1;
396
+ this.updateCandidate(this.flatOrderedValues[e].id);
397
+ const t = this.getListBoxNodeRef();
398
+ t.scrollTop = t.scrollHeight;
399
+ },
400
+ onHomeKey() {
401
+ this.updateCandidate(this.flatOrderedValues[0].id), this.getListBoxNodeRef().scrollTop = 0;
402
+ },
403
+ toggleExpanded() {
404
+ this.isExpanded ? this.collapse() : this.expand();
405
+ },
406
+ async expand() {
407
+ this.isDisabled || (this.searchValue = this.displayTextMap[this.modelValue], this.hasOptionTemplate && (this.slotContainerHeight = this.$refs.slotContainer?.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
+ },
409
+ collapse() {
410
+ this.isExpanded = !1, this.getButtonRef().focus();
411
+ },
412
+ /* NOTE: we use a single keyDown method because @keydown.up bindings are not testable. */
413
+ handleKeyDownButton(e) {
414
+ this.isExpanded ? this.handleKeyDownOnExpanded(e) : he(e, Pe) && (this.expand(), e.preventDefault());
415
+ },
416
+ handleKeyDownOnExpanded(e) {
417
+ 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());
418
+ },
419
+ hasSelection() {
420
+ return !!(this.modelValue && !this.isMissing);
421
+ },
422
+ getCurrentSelectedId() {
423
+ try {
424
+ return this.flatOrderedValues[this.selectedIndex].id;
425
+ } catch {
426
+ return "";
427
+ }
428
+ },
429
+ generateId(e, t = null) {
430
+ if (!t)
431
+ return `${e}-${this.id}`;
432
+ const s = String(t).replace(/[^\w]/gi, "");
433
+ return `${e}-${this.id}-${s}`;
434
+ },
435
+ closeDropdown() {
436
+ this.searchValue = this.displayTextMap[this.modelValue], this.isExpanded = !1;
437
+ },
438
+ handleSearch(e) {
439
+ this.useFilterValues = !0, this.searchValue = e;
440
+ },
441
+ handleResetInput() {
442
+ this.searchValue = "", this.getSearchInput().focus();
443
+ }
444
+ }
445
+ }, Ne = ["id"], Re = ["id", "aria-label", "aria-labelledby", "aria-expanded"], Ae = ["value"], Le = {
446
+ key: 1,
447
+ ref: "slotContainer"
448
+ }, He = { class: "right" }, Fe = {
449
+ key: 0,
450
+ class: "loading-icon"
451
+ }, We = ["aria-activedescendant"], Ye = {
452
+ key: 0,
453
+ class: "empty-state"
454
+ }, je = ["id", "title", "aria-selected", "onMouseenter", "onClick"], Ge = ["id", "name", "value"];
455
+ function ze(e, t, s, a, i, n) {
456
+ const p = x("CloseIcon"), o = x("FunctionButton"), l = x("DropdownIcon"), r = x("OnClickOutside");
457
+ return c(), E(r, { onTrigger: n.closeDropdown }, {
458
+ default: C(() => [
459
+ m("div", {
460
+ id: s.id,
461
+ class: y([
462
+ "dropdown",
463
+ {
464
+ collapsed: !i.isExpanded,
465
+ invalid: !s.isValid,
466
+ disabled: n.isDisabled,
467
+ compact: s.compact
468
+ }
469
+ ])
470
+ }, [
471
+ m("div", {
472
+ id: n.generateId("button"),
473
+ ref: "button",
474
+ role: "button",
475
+ tabindex: "0",
476
+ "aria-haspopup": "listbox",
477
+ class: y({
478
+ placeholder: n.showPlaceholder && !i.isExpanded,
479
+ missing: n.isMissing && !i.isExpanded,
480
+ "has-option-template": n.hasOptionTemplate && !i.isExpanded
481
+ }),
482
+ style: J({
483
+ ...i.isExpanded && n.hasOptionTemplate && {
484
+ height: `calc(${i.slotContainerHeight}px + 0 * var(--form-border-width))`,
485
+ boxSizing: "content-box"
486
+ }
487
+ }),
488
+ "aria-label": s.ariaLabel,
489
+ "aria-labelledby": n.generateId("button"),
490
+ "aria-expanded": i.isExpanded,
491
+ onClick: t[3] || (t[3] = (...u) => n.toggleExpanded && n.toggleExpanded(...u)),
492
+ onKeydown: t[4] || (t[4] = (...u) => n.handleKeyDownButton && n.handleKeyDownButton(...u))
493
+ }, [
494
+ i.isExpanded ? (c(), h("input", {
495
+ key: 0,
496
+ ref: "searchInput",
497
+ value: a.searchValue,
498
+ tabindex: "0",
499
+ role: "searchbox",
500
+ class: "search-input",
501
+ type: "text",
502
+ onClick: t[0] || (t[0] = v(() => {
503
+ }, ["stop"])),
504
+ onInput: t[1] || (t[1] = (u) => n.handleSearch(u.target.value))
505
+ }, null, 40, Ae)) : n.hasOptionTemplate ? (c(), h("div", Le, [
506
+ O(e.$slots, "option", {
507
+ slotData: n.selectedOption?.slotData,
508
+ isMissing: n.isMissing,
509
+ selectedValue: s.modelValue,
510
+ expanded: !1
511
+ })
512
+ ], 512)) : (c(), h("span", {
513
+ key: 2,
514
+ ref: "span"
515
+ }, D(n.displayText), 513)),
516
+ m("div", He, [
517
+ n.hasRightIcon ? (c(), h("div", Fe, [
518
+ O(e.$slots, "icon-right")
519
+ ])) : V("", !0),
520
+ i.isExpanded && n.nonEmptySearchValue ? (c(), E(o, {
521
+ key: 1,
522
+ ref: "closeButton",
523
+ title: "Close",
524
+ tabindex: "0",
525
+ class: "button",
526
+ compact: s.compact,
527
+ onKeydown: t[2] || (t[2] = Z(v(() => {
528
+ }, ["stop"]), ["enter"])),
529
+ onClick: v(n.handleResetInput, ["stop"])
530
+ }, {
531
+ default: C(() => [
532
+ P(p, { class: "icon" })
533
+ ]),
534
+ _: 1
535
+ }, 8, ["compact", "onClick"])) : V("", !0),
536
+ !i.isExpanded || !n.nonEmptySearchValue ? (c(), E(o, {
537
+ key: 2,
538
+ class: "button",
539
+ compact: s.compact,
540
+ disabled: n.isDisabled,
541
+ title: i.isExpanded ? "Cancel" : "Expand",
542
+ tabindex: i.isExpanded ? 0 : -1,
543
+ onClick: v(n.toggleExpanded, ["stop"])
544
+ }, {
545
+ default: C(() => [
546
+ P(l, {
547
+ class: y(["dropdown-icon", "icon"])
548
+ })
549
+ ]),
550
+ _: 1
551
+ }, 8, ["compact", "disabled", "title", "tabindex", "onClick"])) : V("", !0)
552
+ ])
553
+ ], 46, Re),
554
+ Q(m("ul", {
555
+ ref: "ul",
556
+ role: "listbox",
557
+ tabindex: "-1",
558
+ "aria-activedescendant": i.isExpanded ? n.generateId("option", n.getCurrentSelectedId()) : void 0,
559
+ class: y({ "drops-upwards": s.direction === "up" })
560
+ }, [
561
+ n.hasNoFilteredPossibleValues ? (c(), h("div", Ye, D(i.emptyState), 1)) : V("", !0),
562
+ (c(!0), h(w, null, K(n.orderedGroupedValues, (u, b) => (c(), h(w, { key: b }, [
563
+ t[5] || (t[5] = m("span", { class: "group-divider" }, null, -1)),
564
+ (c(!0), h(w, null, K(u.items, (d) => (c(), h("li", {
565
+ id: n.generateId("option", d.id),
566
+ key: `listbox-${d.id}`,
567
+ ref_for: !0,
568
+ ref: (g) => i.optionRefs.set(d.id, g),
569
+ role: "option",
570
+ title: typeof d.title > "u" ? d.text : d.title,
571
+ class: y({
572
+ focused: n.isCurrentValue(d.id),
573
+ noselect: !0,
574
+ empty: d.text.trim() === "",
575
+ "has-option-template": n.hasOptionTemplate,
576
+ special: d.isSpecial
577
+ }),
578
+ "aria-selected": n.isCurrentValue(d.id),
579
+ onMouseenter: (g) => n.updateCandidate(d.id),
580
+ onClick: (g) => n.emitAndClose(d.id)
581
+ }, [
582
+ n.hasOptionTemplate ? O(e.$slots, "option", {
583
+ key: 0,
584
+ slotData: d.slotData,
585
+ expanded: !0
586
+ }) : (c(), h(w, { key: 1 }, [
587
+ $(D(d.text), 1)
588
+ ], 64))
589
+ ], 42, je))), 128))
590
+ ], 64))), 128))
591
+ ], 10, We), [
592
+ [ee, i.isExpanded]
593
+ ]),
594
+ m("input", {
595
+ id: s.id,
596
+ type: "hidden",
597
+ name: s.name,
598
+ value: s.modelValue
599
+ }, null, 8, Ge)
600
+ ], 10, Ne)
601
+ ]),
602
+ _: 3
603
+ }, 8, ["onTrigger"]);
604
+ }
605
+ const nt = /* @__PURE__ */ ce(Ke, [["render", ze], ["__scopeId", "data-v-023d335b"]]);
606
+ export {
607
+ nt as D
608
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as n, toRef as i, openBlock as s, createBlock as d, unref as t } from "vue";
2
- import { u as r } from "./usePossibleValues-lz0Rcu_N.js";
3
- import { L as p } from "./LoadingDropdown-Dw-0WQ8x.js";
1
+ import { defineComponent as n, toRef as i, createBlock as s, openBlock as d, unref as t } from "vue";
2
+ import { u as r } from "./usePossibleValues-DXuWWBh_.js";
3
+ import { L as p } from "./LoadingDropdown-CINkq_Sw.js";
4
4
  const V = /* @__PURE__ */ n({
5
5
  __name: "DropdownControl",
6
6
  props: {
@@ -14,7 +14,7 @@ const V = /* @__PURE__ */ n({
14
14
  },
15
15
  setup(o) {
16
16
  const a = o, { possibleValues: l } = r(i(a, "control"));
17
- return (e, u) => (s(), d(p, {
17
+ return (e, u) => (d(), s(p, {
18
18
  id: e.labelForId ?? "",
19
19
  ariaLabel: e.control.label,
20
20
  disabled: e.disabled,
@@ -1,5 +1,5 @@
1
- import { defineComponent as l, openBlock as a, createElementBlock as o, Fragment as s, renderList as n, createBlock as u, unref as c } from "vue";
2
- import { v as m, _ as p } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js";
1
+ import { defineComponent as l, createElementBlock as o, openBlock as a, Fragment as s, renderList as n, createBlock as u, unref as c } from "vue";
2
+ import { x as m, _ as p } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js";
3
3
  const i = { class: "horizontal" }, d = /* @__PURE__ */ l({
4
4
  __name: "HorizontalLayout",
5
5
  props: {
@@ -1,6 +1,6 @@
1
1
  /* empty css */
2
- import { openBlock as i, createElementBlock as s, normalizeClass as r, renderSlot as u, createCommentVNode as o, createElementVNode as d, mergeProps as f } from "vue";
3
- import { _ as p } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js";
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_625edfbe_lang-DR31vaIu.js";
4
4
  const c = {
5
5
  name: "InputField",
6
6
  props: {
@@ -110,13 +110,13 @@ const c = {
110
110
  class: "icon icon-right"
111
111
  };
112
112
  function g(e, t, n, v, I, l) {
113
- return i(), s("div", {
113
+ return s(), i("div", {
114
114
  class: r(["input-wrapper", { compact: n.compact }])
115
115
  }, [
116
- l.hasLeftIcon ? (i(), s("div", m, [
117
- u(e.$slots, "icon")
118
- ])) : o("", !0),
119
- d("input", f(e.$attrs, {
116
+ l.hasLeftIcon ? (s(), i("div", m, [
117
+ d(e.$slots, "icon")
118
+ ])) : u("", !0),
119
+ o("input", f(e.$attrs, {
120
120
  id: n.id,
121
121
  ref: "input",
122
122
  name: n.name,
@@ -136,10 +136,10 @@ function g(e, t, n, v, I, l) {
136
136
  onKeypress: t[3] || (t[3] = (a) => e.$emit("keypress", a)),
137
137
  onKeydown: t[4] || (t[4] = (a) => e.$emit("keydown", a))
138
138
  }), null, 16, h),
139
- l.hasRightIcon ? (i(), s("div", y, [
140
- u(e.$slots, "iconRight")
141
- ])) : o("", !0),
142
- t[5] || (t[5] = d("span", { class: "invalid-marker" }, null, -1))
139
+ l.hasRightIcon ? (s(), i("div", y, [
140
+ d(e.$slots, "iconRight")
141
+ ])) : u("", !0),
142
+ t[5] || (t[5] = o("span", { class: "invalid-marker" }, null, -1))
143
143
  ], 2);
144
144
  }
145
145
  const w = /* @__PURE__ */ p(c, [["render", g], ["__scopeId", "data-v-c9535e8e"]]);
@@ -1,5 +1,5 @@
1
- import { defineComponent as o, openBlock as n, createBlock as t, mergeProps as r } from "vue";
2
- import { _ as a } from "./NumberControlBase.vue_vue_type_script_setup_true_lang-B9K5qEs3.js";
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-BOCR1qXG.js";
3
3
  const s = /* @__PURE__ */ o({
4
4
  __name: "IntegerControl",
5
5
  props: {
@@ -12,7 +12,7 @@ const s = /* @__PURE__ */ o({
12
12
  labelForId: {}
13
13
  },
14
14
  setup(p) {
15
- return (e, l) => (n(), t(a, r(e.$props, { type: "integer" }), null, 16));
15
+ return (e, l) => (t(), n(a, r(e.$props, { type: "integer" }), null, 16));
16
16
  }
17
17
  });
18
18
  export {