@knime/jsonforms 1.14.3 → 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 +24 -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
@@ -1,604 +0,0 @@
1
- import { defineComponent as Y, ref as w, h as j, watch as O, computed as P, toRefs as G, nextTick as z, resolveComponent as v, openBlock as d, createBlock as D, withCtx as S, createElementVNode as g, normalizeClass as x, normalizeStyle as U, createElementBlock as p, withModifiers as b, renderSlot as k, toDisplayString as T, createCommentVNode as E, withKeys as X, createVNode as B, withDirectives as q, Fragment as C, renderList as M, createTextVNode as Q, vShow as J } from "vue";
2
- import { o as Z, t as $, b as V, c as K, i as A, n as ee, d as te, e as se } from "./index-CoRworrE.js";
3
- import { A as ne } from "./arrow-dropdown-DdgjzLAO.js";
4
- import { C as ie } from "./close-BuY4mhXV.js";
5
- /* empty css */
6
- import { u as oe } from "./useSearch-hpyYQ_6y.js";
7
- import { r as re, A as le, _ as ae } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js";
8
- import { c as de, a as ue, b as ce, i as he, e as pe, h as fe, d as me } from "./_getTag-sLUyzSDj.js";
9
- import { i as ge } from "./isArray-WzO_os3q.js";
10
- import { i as ye } from "./hotkeys-kwHHtFKz.js";
11
- var xe = "[object Map]", Ve = "[object Set]", we = Object.prototype, ve = we.hasOwnProperty;
12
- function be(e) {
13
- if (e == null)
14
- return !0;
15
- if (de(e) && (ge(e) || typeof e == "string" || typeof e.splice == "function" || ue(e) || ce(e) || he(e)))
16
- return !e.length;
17
- var t = pe(e);
18
- if (t == xe || t == Ve)
19
- return !e.size;
20
- if (fe(e))
21
- return !me(e).length;
22
- for (var s in e)
23
- if (ve.call(e, s))
24
- return !1;
25
- return !0;
26
- }
27
- const Ee = /* @__PURE__ */ Y({
28
- name: "OnClickOutside",
29
- props: ["as", "options"],
30
- emits: ["trigger"],
31
- setup(e, { slots: t, emit: s }) {
32
- const o = w();
33
- return Z(o, (i) => {
34
- s("trigger", i);
35
- }, e.options), () => {
36
- if (t.default)
37
- return j(e.as || "div", { ref: o }, t.default());
38
- };
39
- }
40
- });
41
- function Ce(e) {
42
- var t;
43
- const s = V(e);
44
- return (t = s == null ? void 0 : s.$el) != null ? t : s;
45
- }
46
- const Oe = se ? window : void 0;
47
- function De(...e) {
48
- let t, s, o, i;
49
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, o, i] = e, t = Oe) : [t, s, o, i] = e, !t)
50
- return ee;
51
- Array.isArray(s) || (s = [s]), Array.isArray(o) || (o = [o]);
52
- const n = [], f = () => {
53
- n.forEach((h) => h()), n.length = 0;
54
- }, r = (h, a, m, l) => (h.addEventListener(a, m, l), () => h.removeEventListener(a, m, l)), c = O(
55
- () => [Ce(t), V(i)],
56
- ([h, a]) => {
57
- if (f(), !h)
58
- return;
59
- const m = te(a) ? { ...a } : a;
60
- n.push(
61
- ...s.flatMap((l) => o.map((y) => r(h, l, y, m)))
62
- );
63
- },
64
- { immediate: !0, flush: "post" }
65
- ), u = () => {
66
- c(), f();
67
- };
68
- return K(u), u;
69
- }
70
- function I(e) {
71
- return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
72
- }
73
- function N(e) {
74
- const t = window.getComputedStyle(e);
75
- if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
76
- return !0;
77
- {
78
- const s = e.parentNode;
79
- return !s || s.tagName === "BODY" ? !1 : N(s);
80
- }
81
- }
82
- function Se(e) {
83
- const t = e || window.event, s = t.target;
84
- return N(s) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
85
- }
86
- const _ = /* @__PURE__ */ new WeakMap();
87
- function ke(e, t = !1) {
88
- const s = w(t);
89
- let o = null, i = "";
90
- O($(e), (r) => {
91
- const c = I(V(r));
92
- if (c) {
93
- const u = c;
94
- if (_.get(u) || _.set(u, u.style.overflow), u.style.overflow !== "hidden" && (i = u.style.overflow), u.style.overflow === "hidden")
95
- return s.value = !0;
96
- if (s.value)
97
- return u.style.overflow = "hidden";
98
- }
99
- }, {
100
- immediate: !0
101
- });
102
- const n = () => {
103
- const r = I(V(e));
104
- !r || s.value || (A && (o = De(
105
- r,
106
- "touchmove",
107
- (c) => {
108
- Se(c);
109
- },
110
- { passive: !1 }
111
- )), r.style.overflow = "hidden", s.value = !0);
112
- }, f = () => {
113
- const r = I(V(e));
114
- !r || !s.value || (A && (o == null || o()), r.style.overflow = i, _.delete(r), s.value = !1);
115
- };
116
- return K(f), P({
117
- get() {
118
- return s.value;
119
- },
120
- set(r) {
121
- r ? n() : f();
122
- }
123
- });
124
- }
125
- function Te() {
126
- let e = !1;
127
- const t = w(!1);
128
- return (s, o) => {
129
- if (t.value = o.value, e)
130
- return;
131
- e = !0;
132
- const i = ke(s, o.value);
133
- O(t, (n) => i.value = n);
134
- };
135
- }
136
- Te();
137
- const L = "ArrowDown", R = "ArrowUp", H = "Home", F = "End", Ie = "Escape", W = "Enter", _e = [L, R, H, F, W], Be = {
138
- name: "Dropdown",
139
- components: {
140
- DropdownIcon: ne,
141
- OnClickOutside: Ee,
142
- FunctionButton: re,
143
- CloseIcon: ie
144
- },
145
- props: {
146
- id: {
147
- type: String,
148
- default() {
149
- return `Dropdown-${le()}`;
150
- }
151
- },
152
- modelValue: {
153
- type: String,
154
- default: null
155
- },
156
- name: {
157
- type: String,
158
- default: null
159
- },
160
- placeholder: {
161
- type: String,
162
- default: null
163
- },
164
- ariaLabel: {
165
- type: String,
166
- required: !0
167
- },
168
- isValid: {
169
- default: !0,
170
- type: Boolean
171
- },
172
- disabled: {
173
- default: !1,
174
- type: Boolean
175
- },
176
- /**
177
- * The direction of the dropdown menu. When set to 'up', the menu will appear above the input field.
178
- * Defaults to 'down'.
179
- */
180
- direction: {
181
- default: "down",
182
- type: String
183
- },
184
- /**
185
- * List of possible values. Each item must have an `id` and a `text` property. To use slots an additional
186
- * slotData object must be passed which contains the data to be displayed.
187
- *
188
- * IMPORTANT: All values have to have a slotData object otherwise the slot will not be displayed and the
189
- * usual text is rendered instead.
190
- * @example
191
- * [{
192
- * id: 'pdf',
193
- * text: 'PDF'
194
- * }, {
195
- * id: 'XLS',
196
- * text: 'Excel',
197
- * }, {
198
- * id: 'JPG',
199
- * text: 'Jpeg',
200
- * slotData: {
201
- * fullName: 'Joint Photographic Experts Group',
202
- * year: '1992'
203
- * description: 'Commonly used method of lossy compression for digital images'
204
- * }
205
- * }]
206
- */
207
- possibleValues: {
208
- type: Array,
209
- default: () => []
210
- },
211
- caseSensitiveSearch: {
212
- type: Boolean,
213
- default: !1
214
- },
215
- compact: {
216
- type: Boolean,
217
- default: !1
218
- }
219
- },
220
- emits: ["update:modelValue"],
221
- setup(e) {
222
- const { caseSensitiveSearch: t, possibleValues: s } = G(e), o = w(!1), i = P(() => {
223
- const r = {};
224
- for (const c of s.value)
225
- r[c.id] = c.text;
226
- return r;
227
- }), n = w(i.value[e.modelValue]);
228
- O(
229
- () => e.modelValue,
230
- (r) => {
231
- n.value = i.value[r];
232
- }
233
- );
234
- const f = oe(
235
- n,
236
- t,
237
- s,
238
- o
239
- );
240
- return {
241
- searchValue: n,
242
- useFilterValues: o,
243
- currentPossibleValues: f
244
- };
245
- },
246
- data() {
247
- return {
248
- typingTimeout: null,
249
- isExpanded: !1,
250
- searchQuery: "",
251
- candidate: this.modelValue,
252
- emptyState: "Nothing found",
253
- optionRefs: /* @__PURE__ */ new Map(),
254
- slotContainerHeight: 0
255
- };
256
- },
257
- computed: {
258
- groupedValues() {
259
- const e = {};
260
- for (const t of this.currentPossibleValues) {
261
- const s = t.group || "";
262
- e[s] || (e[s] = { label: t.group, items: [] }), e[s].items.push(t);
263
- }
264
- return Object.values(e);
265
- },
266
- orderedGroupedValues() {
267
- const e = this.groupedValues.filter(
268
- (s) => s.items[0].group
269
- ), t = this.groupedValues.filter(
270
- (s) => !s.items[0].group
271
- );
272
- return [...e, ...t];
273
- },
274
- flatOrderedValues() {
275
- return this.orderedGroupedValues.flatMap((e) => e.items);
276
- },
277
- selectedIndex() {
278
- return this.flatOrderedValues.map((e) => e.id).indexOf(this.candidate);
279
- },
280
- showPlaceholder() {
281
- return !this.modelValue;
282
- },
283
- displayTextMap() {
284
- const e = {};
285
- for (const t of this.possibleValues)
286
- e[t.id] = t.text;
287
- return e;
288
- },
289
- displayText() {
290
- return this.showPlaceholder ? this.placeholder : this.displayTextMap.hasOwnProperty(this.modelValue) ? this.displayTextMap[this.modelValue] : `(MISSING) ${this.modelValue.toString()}`;
291
- },
292
- isMissing() {
293
- return this.modelValue && !this.displayTextMap.hasOwnProperty(this.modelValue);
294
- },
295
- hasRightIcon() {
296
- var e, t;
297
- return (t = (e = this.$slots)["icon-right"]) == null ? void 0 : t.call(e).length;
298
- },
299
- hasOptionTemplate() {
300
- return this.possibleValues.length === 0 ? !1 : this.possibleValues.every(
301
- (e) => e.slotData && !be(e.slotData)
302
- );
303
- },
304
- selectedOption() {
305
- return this.possibleValues.find((e) => e.id === this.modelValue);
306
- },
307
- hasNoFilteredPossibleValues() {
308
- return this.currentPossibleValues.length === 0;
309
- },
310
- nonEmptySearchValue() {
311
- var e;
312
- return ((e = this.searchValue) == null ? void 0 : e.length) > 0;
313
- },
314
- possibleValuesIsProvided() {
315
- return !!this.possibleValues.length;
316
- },
317
- isDisabled() {
318
- return this.disabled || !this.possibleValuesIsProvided;
319
- },
320
- closeIconTooltip() {
321
- return "Clear";
322
- }
323
- },
324
- watch: {
325
- currentPossibleValues(e) {
326
- var t;
327
- this.candidate = (t = e[0]) == null ? void 0 : t.id;
328
- },
329
- isExpanded() {
330
- this.useFilterValues = !1;
331
- }
332
- },
333
- methods: {
334
- updateCandidate(e) {
335
- this.candidate = e;
336
- },
337
- isCurrentValue(e) {
338
- return this.candidate === e;
339
- },
340
- getButtonRef() {
341
- return this.$refs.button;
342
- },
343
- getOptionsRefs() {
344
- return this.$refs.options;
345
- },
346
- getSearchInput() {
347
- return this.$refs.searchInput;
348
- },
349
- getListBoxNodeRef() {
350
- return this.$refs.ul;
351
- },
352
- emitAndClose(e) {
353
- this.$emit("update:modelValue", e), this.toggleExpanded();
354
- },
355
- scrollTo(e) {
356
- const t = this.getListBoxNodeRef();
357
- if (t.scrollHeight >= t.clientHeight) {
358
- const s = this.optionRefs.get(e);
359
- if (!s) {
360
- consola.error(
361
- `trying to scroll to element with Id ${e.toString()} which does not exist`
362
- );
363
- return;
364
- }
365
- const o = t.clientHeight + t.scrollTop, i = s.offsetTop + s.offsetHeight;
366
- i > o ? t.scrollTop = i - t.clientHeight : s.offsetTop < t.scrollTop && (t.scrollTop = s.offsetTop);
367
- }
368
- },
369
- onArrowDown() {
370
- const e = this.selectedIndex + 1;
371
- if (e >= this.flatOrderedValues.length)
372
- return;
373
- const t = this.flatOrderedValues[e].id;
374
- this.updateCandidate(t), this.scrollTo(t);
375
- },
376
- onArrowUp() {
377
- const e = this.selectedIndex - 1;
378
- if (e < 0)
379
- return;
380
- const t = this.flatOrderedValues[e].id;
381
- this.updateCandidate(t), this.scrollTo(t);
382
- },
383
- onEnter() {
384
- this.hasNoFilteredPossibleValues || typeof this.candidate > "u" || this.emitAndClose(this.candidate);
385
- },
386
- onEndKey() {
387
- const e = this.flatOrderedValues.length - 1;
388
- this.updateCandidate(this.flatOrderedValues[e].id);
389
- const t = this.getListBoxNodeRef();
390
- t.scrollTop = t.scrollHeight;
391
- },
392
- onHomeKey() {
393
- this.updateCandidate(this.flatOrderedValues[0].id), this.getListBoxNodeRef().scrollTop = 0;
394
- },
395
- toggleExpanded() {
396
- this.isExpanded ? this.collapse() : this.expand();
397
- },
398
- async expand() {
399
- var e, t;
400
- this.isDisabled || (this.searchValue = this.displayTextMap[this.modelValue], this.hasOptionTemplate && (this.slotContainerHeight = ((e = this.$refs.slotContainer) == null ? void 0 : e.clientHeight) ?? 0), this.isExpanded = !0, this.candidate === this.modelValue && (this.isMissing || this.showPlaceholder) && this.updateCandidate((t = this.currentPossibleValues[0]) == null ? void 0 : t.id), await z(), this.getSearchInput().focus(), this.getSearchInput().select(), this.candidate && this.scrollTo(this.candidate));
401
- },
402
- collapse() {
403
- this.isExpanded = !1, this.getButtonRef().focus();
404
- },
405
- /* NOTE: we use a single keyDown method because @keydown.up bindings are not testable. */
406
- handleKeyDownButton(e) {
407
- this.isExpanded ? this.handleKeyDownOnExpanded(e) : ye(e, _e) && (this.expand(), e.preventDefault());
408
- },
409
- handleKeyDownOnExpanded(e) {
410
- e.key === L && (this.onArrowDown(), e.preventDefault()), e.key === R && (this.onArrowUp(), e.preventDefault()), e.key === F && (this.onEndKey(), e.preventDefault()), e.key === H && (this.onHomeKey(), e.preventDefault()), e.key === Ie && (this.collapse(), e.preventDefault(), e.stopPropagation()), e.key === W && (this.onEnter(), e.preventDefault());
411
- },
412
- hasSelection() {
413
- return !!(this.modelValue && !this.isMissing);
414
- },
415
- getCurrentSelectedId() {
416
- try {
417
- return this.flatOrderedValues[this.selectedIndex].id;
418
- } catch {
419
- return "";
420
- }
421
- },
422
- generateId(e, t = null) {
423
- if (!t)
424
- return `${e}-${this.id}`;
425
- const s = String(t).replace(/[^\w]/gi, "");
426
- return `${e}-${this.id}-${s}`;
427
- },
428
- closeDropdown() {
429
- this.searchValue = this.displayTextMap[this.modelValue], this.isExpanded = !1;
430
- },
431
- handleSearch(e) {
432
- this.useFilterValues = !0, this.searchValue = e;
433
- },
434
- handleResetInput() {
435
- this.searchValue = "", this.getSearchInput().focus();
436
- }
437
- }
438
- }, Me = ["id"], Ae = ["id", "aria-label", "aria-labelledby", "aria-expanded"], Pe = ["value"], Ke = {
439
- key: 1,
440
- ref: "slotContainer"
441
- }, Ne = { class: "right" }, Le = {
442
- key: 0,
443
- class: "loading-icon"
444
- }, Re = ["aria-activedescendant"], He = {
445
- key: 0,
446
- class: "empty-state"
447
- }, Fe = ["id", "title", "aria-selected", "onMouseenter", "onClick"], We = ["id", "name", "value"];
448
- function Ye(e, t, s, o, i, n) {
449
- const f = v("CloseIcon"), r = v("FunctionButton"), c = v("DropdownIcon"), u = v("OnClickOutside");
450
- return d(), D(u, { onTrigger: n.closeDropdown }, {
451
- default: S(() => {
452
- var h;
453
- return [
454
- g("div", {
455
- id: s.id,
456
- class: x([
457
- "dropdown",
458
- {
459
- collapsed: !i.isExpanded,
460
- invalid: !s.isValid,
461
- disabled: n.isDisabled,
462
- compact: s.compact
463
- }
464
- ])
465
- }, [
466
- g("div", {
467
- id: n.generateId("button"),
468
- ref: "button",
469
- role: "button",
470
- tabindex: "0",
471
- "aria-haspopup": "listbox",
472
- class: x({
473
- placeholder: n.showPlaceholder && !i.isExpanded,
474
- missing: n.isMissing && !i.isExpanded,
475
- "has-option-template": n.hasOptionTemplate && !i.isExpanded
476
- }),
477
- style: U({
478
- ...i.isExpanded && n.hasOptionTemplate && {
479
- height: `calc(${i.slotContainerHeight}px + 0 * var(--form-border-width))`,
480
- boxSizing: "content-box"
481
- }
482
- }),
483
- "aria-label": s.ariaLabel,
484
- "aria-labelledby": n.generateId("button"),
485
- "aria-expanded": i.isExpanded,
486
- onClick: t[3] || (t[3] = (...a) => n.toggleExpanded && n.toggleExpanded(...a)),
487
- onKeydown: t[4] || (t[4] = (...a) => n.handleKeyDownButton && n.handleKeyDownButton(...a))
488
- }, [
489
- i.isExpanded ? (d(), p("input", {
490
- key: 0,
491
- ref: "searchInput",
492
- value: o.searchValue,
493
- tabindex: "0",
494
- role: "searchbox",
495
- class: "search-input",
496
- type: "text",
497
- onClick: t[0] || (t[0] = b(() => {
498
- }, ["stop"])),
499
- onInput: t[1] || (t[1] = (a) => n.handleSearch(a.target.value))
500
- }, null, 40, Pe)) : n.hasOptionTemplate ? (d(), p("div", Ke, [
501
- k(e.$slots, "option", {
502
- slotData: (h = n.selectedOption) == null ? void 0 : h.slotData,
503
- isMissing: n.isMissing,
504
- selectedValue: s.modelValue,
505
- expanded: !1
506
- })
507
- ], 512)) : (d(), p("span", {
508
- key: 2,
509
- ref: "span"
510
- }, T(n.displayText), 513)),
511
- g("div", Ne, [
512
- n.hasRightIcon ? (d(), p("div", Le, [
513
- k(e.$slots, "icon-right")
514
- ])) : E("", !0),
515
- i.isExpanded && n.nonEmptySearchValue ? (d(), D(r, {
516
- key: 1,
517
- ref: "closeButton",
518
- title: "Close",
519
- tabindex: "0",
520
- class: "button",
521
- compact: s.compact,
522
- onKeydown: t[2] || (t[2] = X(b(() => {
523
- }, ["stop"]), ["enter"])),
524
- onClick: b(n.handleResetInput, ["stop"])
525
- }, {
526
- default: S(() => [
527
- B(f, { class: "icon" })
528
- ]),
529
- _: 1
530
- }, 8, ["compact", "onClick"])) : E("", !0),
531
- !i.isExpanded || !n.nonEmptySearchValue ? (d(), D(r, {
532
- key: 2,
533
- class: "button",
534
- compact: s.compact,
535
- disabled: n.isDisabled,
536
- title: i.isExpanded ? "Cancel" : "Expand",
537
- tabindex: i.isExpanded ? 0 : -1,
538
- onClick: b(n.toggleExpanded, ["stop"])
539
- }, {
540
- default: S(() => [
541
- B(c, {
542
- class: x(["dropdown-icon", "icon"])
543
- })
544
- ]),
545
- _: 1
546
- }, 8, ["compact", "disabled", "title", "tabindex", "onClick"])) : E("", !0)
547
- ])
548
- ], 46, Ae),
549
- q(g("ul", {
550
- ref: "ul",
551
- role: "listbox",
552
- tabindex: "-1",
553
- "aria-activedescendant": i.isExpanded ? n.generateId("option", n.getCurrentSelectedId()) : void 0,
554
- class: x({ "drops-upwards": s.direction === "up" })
555
- }, [
556
- n.hasNoFilteredPossibleValues ? (d(), p("div", He, T(i.emptyState), 1)) : E("", !0),
557
- (d(!0), p(C, null, M(n.orderedGroupedValues, (a, m) => (d(), p(C, { key: m }, [
558
- t[5] || (t[5] = g("span", { class: "group-divider" }, null, -1)),
559
- (d(!0), p(C, null, M(a.items, (l) => (d(), p("li", {
560
- id: n.generateId("option", l.id),
561
- key: `listbox-${l.id}`,
562
- ref_for: !0,
563
- ref: (y) => i.optionRefs.set(l.id, y),
564
- role: "option",
565
- title: typeof l.title > "u" ? l.text : l.title,
566
- class: x({
567
- focused: n.isCurrentValue(l.id),
568
- noselect: !0,
569
- empty: l.text.trim() === "",
570
- "has-option-template": n.hasOptionTemplate,
571
- special: l.isSpecial
572
- }),
573
- "aria-selected": n.isCurrentValue(l.id),
574
- onMouseenter: (y) => n.updateCandidate(l.id),
575
- onClick: (y) => n.emitAndClose(l.id)
576
- }, [
577
- n.hasOptionTemplate ? k(e.$slots, "option", {
578
- key: 0,
579
- slotData: l.slotData,
580
- expanded: !0
581
- }) : (d(), p(C, { key: 1 }, [
582
- Q(T(l.text), 1)
583
- ], 64))
584
- ], 42, Fe))), 128))
585
- ], 64))), 128))
586
- ], 10, Re), [
587
- [J, i.isExpanded]
588
- ]),
589
- g("input", {
590
- id: s.id,
591
- type: "hidden",
592
- name: s.name,
593
- value: s.modelValue
594
- }, null, 8, We)
595
- ], 10, Me)
596
- ];
597
- }),
598
- _: 3
599
- }, 8, ["onTrigger"]);
600
- }
601
- const et = /* @__PURE__ */ ae(Be, [["render", Ye], ["__scopeId", "data-v-a846307b"]]);
602
- export {
603
- et as D
604
- };
@@ -1,34 +0,0 @@
1
- import { defineComponent as n, toRef as t, openBlock as d, createBlock as r, unref as l } from "vue";
2
- import { u } from "./usePossibleValues-lz0Rcu_N.js";
3
- import { M as p } from "./MultiselectListBox-CHvGxAhY.js";
4
- const f = /* @__PURE__ */ n({
5
- __name: "MultiSelectListBoxControl",
6
- props: {
7
- control: {},
8
- handleChange: { type: Function },
9
- changeValue: { type: Function },
10
- disabled: { type: Boolean },
11
- isValid: { type: Boolean },
12
- onRegisterValidation: { type: Function },
13
- labelForId: {}
14
- },
15
- setup(a) {
16
- const i = a, { possibleValues: s } = u(t(i, "control"));
17
- return (e, c) => {
18
- var o;
19
- return d(), r(l(p), {
20
- id: e.labelForId,
21
- "possible-values": l(s) || [],
22
- disabled: e.disabled,
23
- "model-value": e.control.data,
24
- "is-valid": e.isValid,
25
- ariaLabel: e.control.label,
26
- size: (o = e.control.uischema.options) == null ? void 0 : o.size,
27
- "onUpdate:modelValue": e.changeValue
28
- }, null, 8, ["id", "possible-values", "disabled", "model-value", "is-valid", "ariaLabel", "size", "onUpdate:modelValue"]);
29
- };
30
- }
31
- });
32
- export {
33
- f as default
34
- };
@@ -1,53 +0,0 @@
1
- import { defineComponent as v, computed as r, openBlock as V, createBlock as E, unref as f } from "vue";
2
- import { u as y } from "./useBuiltinValidations-DP7OS71z.js";
3
- import { N as b } from "./NumberInput-DJ38AGiR.js";
4
- const g = 1, h = 0.1, _ = /* @__PURE__ */ v({
5
- __name: "NumberControlBase",
6
- props: {
7
- control: {},
8
- handleChange: { type: Function },
9
- changeValue: { type: Function },
10
- disabled: { type: Boolean },
11
- isValid: { type: Boolean },
12
- onRegisterValidation: { type: Function },
13
- labelForId: {},
14
- type: {}
15
- },
16
- setup(d) {
17
- const o = d, s = o.type === "integer" ? g : h, i = ({ min: e, isExclusive: n }) => (a) => isNaN(a) || (n ? a > e : a >= e), u = ({ max: e, isExclusive: n }) => (a) => isNaN(a) || (n ? a < e : a <= e), c = y(
18
- {
19
- min: i,
20
- max: u
21
- },
22
- o
23
- ), t = r(() => c.value.min), l = r(() => c.value.max), p = () => {
24
- const e = o.control.data;
25
- if (t.value && !i(t.value)(e)) {
26
- const { min: n, isExclusive: a } = t.value;
27
- a ? o.changeValue(n + s) : o.changeValue(n);
28
- } else if (l.value && !u(l.value)(e)) {
29
- const { max: n, isExclusive: a } = l.value;
30
- a ? o.changeValue(n - s) : o.changeValue(n);
31
- }
32
- };
33
- return (e, n) => {
34
- var a, m;
35
- return V(), E(f(b), {
36
- id: e.labelForId,
37
- class: "number-input",
38
- disabled: e.disabled,
39
- "model-value": e.control.data,
40
- type: e.type,
41
- min: (a = t.value) == null ? void 0 : a.min,
42
- max: (m = l.value) == null ? void 0 : m.max,
43
- "is-valid": e.isValid,
44
- compact: "",
45
- "onUpdate:modelValue": e.changeValue,
46
- onFocusout: p
47
- }, null, 8, ["id", "disabled", "model-value", "type", "min", "max", "is-valid", "onUpdate:modelValue"]);
48
- };
49
- }
50
- });
51
- export {
52
- _
53
- };