@knime/jsonforms 1.15.2 → 1.15.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{AnyOfTwinlist--MdzLj12.js → AnyOfTwinlist-6zK9fZTP.js} +1 -1
  3. package/dist/{Button-V53sPts7.js → Button-BbVMc9wp.js} +1 -1
  4. package/dist/{CheckboxControl-DxmF67Fl.js → CheckboxControl-B5XfJGgR.js} +1 -1
  5. package/dist/{Checkboxes-Dc2mE1E7.js → Checkboxes-UYgHsXqG.js} +1 -1
  6. package/dist/{CheckboxesControl-MTDoYv6o.js → CheckboxesControl-BOXtRP6l.js} +3 -3
  7. package/dist/{ComboBoxControl-eTVu0ilp.js → ComboBoxControl-CiWFlJaW.js} +2 -2
  8. package/dist/DateControl-AwVSUTGi.js +34 -0
  9. package/dist/{DateTimeControl-BscBtjDl.js → DateTimeControl-Cn0Mr_M-.js} +8 -9
  10. package/dist/{DateTimeFormatInput-CnxjE9CW.js → DateTimeFormatInput-CVuxdr8R.js} +3 -3
  11. package/dist/{DateTimeFormatPickerControl-CYOPU0JI.js → DateTimeFormatPickerControl-DfOzUhmm.js} +2 -2
  12. package/dist/{DateTimeFormatPickerWithTypeControl-Cw0R0IXT.js → DateTimeFormatPickerWithTypeControl-BjUJXxp9.js} +3 -3
  13. package/dist/{Dropdown-DYa_CZWd.js → Dropdown-M8dd5F3K.js} +2 -2
  14. package/dist/{DropdownControl-ChX3Fkhd.js → DropdownControl-C7cMjvBf.js} +2 -2
  15. package/dist/{HorizontalLayout-DZvUpTvS.js → HorizontalLayout-DVXrW5Ft.js} +1 -1
  16. package/dist/{InputField-BFt5Zzv5.js → InputField-SPaDhf8S.js} +1 -1
  17. package/dist/{IntegerControl-BD7DJKmE.js → IntegerControl-kPwCljA4.js} +1 -1
  18. package/dist/{IntervalControl-BvpmygdW.js → IntervalControl-BCht36Fn.js} +3 -3
  19. package/dist/{LoadingDropdown-CyKWt1IO.js → LoadingDropdown-UdCcglK8.js} +3 -3
  20. package/dist/{LoadingIcon-BqKwArbh.js → LoadingIcon-lBxrKibx.js} +1 -1
  21. package/dist/{ManualTwinlistControl-QbonJ1LT.js → ManualTwinlistControl-DNF0MMxm.js} +4 -4
  22. package/dist/{MultiSelectListBoxControl-D6JvhoAd.js → MultiSelectListBoxControl-BgSB7gJa.js} +2 -2
  23. package/dist/{MultimodeTwinlistControl-2Rotlohs.js → MultimodeTwinlistControl-C8gSrZ_R.js} +6 -6
  24. package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_2c8e8d82_lang-Cal28Ekk.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_2c8e8d82_lang-W4oTCLra.js} +1 -1
  25. package/dist/{MultiselectListBox-DPzM2Ttt.js → MultiselectListBox-BpEhz7eo.js} +2 -2
  26. package/dist/{NameFilter-CU8FByJ_.js → NameFilter-BOtDoNms.js} +1 -1
  27. package/dist/{NumberControl-BdT6fi25.js → NumberControl-D8NbE40Q.js} +1 -1
  28. package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-Bld73u64.js → NumberControlBase.vue_vue_type_script_setup_true_lang-DyiRRo12.js} +2 -2
  29. package/dist/{NumberInput-7lO4sZya.js → NumberInput-B9tTtrib.js} +1 -1
  30. package/dist/{OneOfDropdown-DB1aVf_c.js → OneOfDropdown-BsmuBQy8.js} +1 -1
  31. package/dist/{RadioControl-CuVOGSxA.js → RadioControl-BLtwBQcH.js} +2 -2
  32. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-CiHB1cWM.js → RadioControlBase.vue_vue_type_script_setup_true_lang-BWCyiB2d.js} +3 -3
  33. package/dist/{RichTextControl-GezlZvsV.js → RichTextControl-DFYxgoEe.js} +4 -4
  34. package/dist/{SectionHeading-D5y3im2k.js → SectionHeading-CkLlXQSB.js} +1 -1
  35. package/dist/{SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js → SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1tIJbzpq.js} +34 -34
  36. package/dist/{SectionLayout-Cg1g2Yo3.js → SectionLayout-CQcfFF8g.js} +3 -3
  37. package/dist/{SettingsSubPanel-B6gyM99J.js → SettingsSubPanel-DGExJukD.js} +1 -1
  38. package/dist/{SettingsSubPanelLayout-DVclglW2.js → SettingsSubPanelLayout-D9ZpHZQj.js} +4 -4
  39. package/dist/{SimpleButtonControl-DFTQjOZI.js → SimpleButtonControl--00n7Ynn.js} +2 -2
  40. package/dist/{SimpleTwinlistControl-DMPdJAZ9.js → SimpleTwinlistControl-CCDs7tAh.js} +2 -2
  41. package/dist/{SingleSelectControl-BGFi0465.js → SingleSelectControl-C-XkI5YA.js} +2 -2
  42. package/dist/{SingleSelectListBoxControl-BE7-OUkf.js → SingleSelectListBoxControl-Cd0cDHMx.js} +3 -3
  43. package/dist/SortListControl-KSqyhKAz.js +417 -0
  44. package/dist/{StyledListItem-xeXwpQpT.js → StyledListItem-BPqJ4rUi.js} +1 -1
  45. package/dist/{TextAreaControl-CWVnSSxA.js → TextAreaControl-B52DiQQQ.js} +1 -1
  46. package/dist/{TextControl-ByEqNjPa.js → TextControl-DRX2qSZI.js} +1 -1
  47. package/dist/{TextControl.vue_vue_type_script_setup_true_lang-CTLy3TVR.js → TextControl.vue_vue_type_script_setup_true_lang-C7wSG3ql.js} +3 -3
  48. package/dist/{TimeControl-C4nZHiqg.js → TimeControl-Bsy22N7z.js} +11 -12
  49. package/dist/{TwinlistControlBase-D0xdGWtx.js → TwinlistControlBase-CEKD1kRu.js} +3 -3
  50. package/dist/{TwinlistLoadingInfo-DbxgK_4I.js → TwinlistLoadingInfo-D2V6kqnl.js} +4 -4
  51. package/dist/{TypedStringFilter-BC23XyG4.js → TypedStringFilter-C-lEcW_H.js} +1 -1
  52. package/dist/{ValueSwitch-DZ5vEThg.js → ValueSwitch-v07bmQdY.js} +1 -1
  53. package/dist/{ValueSwitchControl-CE1tgpks.js → ValueSwitchControl-Cn2k3mrc.js} +1 -1
  54. package/dist/{VerticalLayout-1r4v5PV2.js → VerticalLayout-DNIKjU1d.js} +2 -2
  55. package/dist/{VerticalLayoutBase-C42y1fUX.js → VerticalLayoutBase-C8aQhkFj.js} +1 -1
  56. package/dist/{ZonedDateTimeControl-2naMUn7s.js → ZonedDateTimeControl-DWOD_b_2.js} +8 -9
  57. package/dist/{_baseEach-BSevR6MA.js → _baseEach-q1l79Klx.js} +2 -2
  58. package/dist/{_baseIteratee-1E2Ks-cN.js → _baseIteratee-CjLkzWI9.js} +3 -3
  59. package/dist/{_getTag-Ccp_NogL.js → _getTag-DzwJWu2z.js} +1 -1
  60. package/dist/knime-jsonforms.css +1 -1
  61. package/dist/knime-jsonforms.js +7 -7
  62. package/dist/{DateTimeInput-DZ-22w4C.js → localTimeUtils-y-GlzeYK.js} +4403 -3543
  63. package/dist/src/renderers/defaultRenderers.d.ts +586 -520
  64. package/dist/src/renderers/sortListRenderer.d.ts +586 -520
  65. package/dist/src/uiComponents/SortListControl.vue.d.ts +499 -433
  66. package/dist/testing.js +2 -2
  67. package/dist/{toString-CSnbWb-n.js → toString-B4_JidM_.js} +1 -1
  68. package/dist/{useBuiltinValidations-rwOsR_Sq.js → useBuiltinValidations-CebEtZph.js} +1 -1
  69. package/dist/{usePossibleValues-DXZusnxu.js → usePossibleValues-6q6wH1Vp.js} +1 -1
  70. package/package.json +3 -3
  71. package/dist/DateControl-DsBPH7xg.js +0 -29
  72. package/dist/SortListControl-qqG_jOzq.js +0 -377
  73. package/dist/localTimeUtils-ofPz-s5l.js +0 -884
package/dist/testing.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as yh from "vue";
2
2
  import { ssrUtils as zi, initDirectivesForSSR as Z_, nextTick as wo, defineComponent as wi, computed as Lr, h as An, shallowReactive as em, reactive as tm, ref as vh, createApp as nm, transformVNodeArgs as rm, setDevtoolsHook as im, isRef as sm, TransitionGroup as om, Transition as am, BaseTransition as lm } from "vue";
3
- import { o as cm, q as um, r as fm, e as hm } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js";
4
- import { b as pm } from "./_baseIteratee-1E2Ks-cN.js";
3
+ import { o as cm, q as um, r as fm, e as hm } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1tIJbzpq.js";
4
+ import { b as pm } from "./_baseIteratee-CjLkzWI9.js";
5
5
  function dm(e, t) {
6
6
  return e > t;
7
7
  }
@@ -1,4 +1,4 @@
1
- import { o as g, S as s } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js";
1
+ import { o as g, S as s } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1tIJbzpq.js";
2
2
  import { i as l } from "./isArray-WzO_os3q.js";
3
3
  function p(r, t) {
4
4
  for (var n = -1, i = r == null ? 0 : r.length, o = Array(i); ++n < i; )
@@ -1,5 +1,5 @@
1
1
  import { onUnmounted as u, toRef as p, computed as d } from "vue";
2
- import { u as f } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js";
2
+ import { u as f } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1tIJbzpq.js";
3
3
  const h = (t = {}) => t.validation || null, m = (t) => t.replace(/^validation\./, ""), v = (t) => {
4
4
  const a = (t.providedOptions ?? []).filter(
5
5
  (e) => e.startsWith("validation.")
@@ -1,5 +1,5 @@
1
1
  import { computed as u } from "vue";
2
- import { u as o } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js";
2
+ import { u as o } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1tIJbzpq.js";
3
3
  const t = (s) => {
4
4
  const e = u(() => s.value.uischema), l = o(e, "possibleValues");
5
5
  return { possibleValues: u(() => e.value.providedOptions?.includes("possibleValues") ? l.value : e.value.options?.possibleValues ?? []) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/jsonforms",
3
- "version": "1.15.2",
3
+ "version": "1.15.4",
4
4
  "description": "Internal JSON Forms integration for frontend KNIME projects",
5
5
  "homepage": "https://knime.github.io/webapps-common/",
6
6
  "license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
@@ -16,8 +16,8 @@
16
16
  "focus-trap-vue": "4.0.3",
17
17
  "tabbable": "6.2.0",
18
18
  "uuid": "10.0.0",
19
- "@knime/components": "1.34.2",
20
- "@knime/rich-text-editor": "1.7.2",
19
+ "@knime/components": "1.34.3",
20
+ "@knime/rich-text-editor": "1.7.3",
21
21
  "@knime/styles": "1.11.0",
22
22
  "@knime/utils": "1.5.4"
23
23
  },
@@ -1,29 +0,0 @@
1
- import { defineComponent as o, createBlock as a, openBlock as l, unref as n } from "vue";
2
- import { D as t } from "./DateTimeInput-DZ-22w4C.js";
3
- const u = /* @__PURE__ */ o({
4
- __name: "DateControl",
5
- props: {
6
- control: {},
7
- handleChange: { type: Function },
8
- changeValue: { type: Function },
9
- disabled: { type: Boolean },
10
- isValid: { type: Boolean },
11
- onRegisterValidation: { type: Function },
12
- labelForId: {}
13
- },
14
- setup(d) {
15
- return (e, i) => (l(), a(n(t), {
16
- id: e.labelForId,
17
- "two-lines": "",
18
- "model-value": new Date(e.control.data),
19
- required: !0,
20
- "show-time": !1,
21
- compact: "",
22
- disabled: e.disabled,
23
- "onUpdate:modelValue": e.changeValue
24
- }, null, 8, ["id", "model-value", "disabled", "onUpdate:modelValue"]));
25
- }
26
- });
27
- export {
28
- u as default
29
- };
@@ -1,377 +0,0 @@
1
- import { createElementBlock as C, openBlock as S, createElementVNode as V, defineComponent as R, computed as g, ref as N, watch as Z, Fragment as j, createVNode as c, withKeys as U, withModifiers as B, unref as p, withCtx as f, nextTick as ae, onMounted as se, normalizeClass as re, createTextVNode as T, renderSlot as D } from "vue";
2
- import { v as M, _ as W, u as ie, L as ue, E as de } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js";
3
- import { i as ce } from "./navigator-e30QQMkl.js";
4
- import { M as me } from "./MultiselectListBox-DPzM2Ttt.js";
5
- import { g as pe } from "./_getTag-Ccp_NogL.js";
6
- import { b as fe } from "./_baseEach-BSevR6MA.js";
7
- import { b as ve } from "./_baseIteratee-1E2Ks-cN.js";
8
- import { i as we } from "./isArray-WzO_os3q.js";
9
- import { c as be } from "./createMissingItem-B00Kg95q.js";
10
- import { B as $ } from "./Button-V53sPts7.js";
11
- const O = {
12
- ArrowUp: "↑",
13
- ArrowDown: "↓",
14
- ArrowLeft: "←",
15
- ArrowRight: "→",
16
- Enter: "↵",
17
- " ": "Space",
18
- // we use event.key and there space is an actual space not the code "Space"
19
- CtrlOrCmd: "Ctrl"
20
- }, he = {
21
- Shift: "⇧",
22
- Delete: "⌫",
23
- CtrlOrCmd: "⌘",
24
- Ctrl: "⌃",
25
- Alt: "⌥",
26
- Enter: "↩"
27
- }, z = (t) => {
28
- const e = (i) => (r) => i[r] ?? r, s = ((...i) => i.reduce((r, w) => (_) => w(r(_))))(
29
- e(he),
30
- e(O)
31
- ), a = e(O);
32
- return ce() ? s(t) : a(t);
33
- }, Y = () => " ", ge = (t, e = Y) => t.map(z).join(e()), Ve = { formatHotkeys: ge, formatHotkey: z, getDefaultSeparator: Y };
34
- var P = function() {
35
- try {
36
- var t = pe(Object, "defineProperty");
37
- return t({}, "", {}), t;
38
- } catch {
39
- }
40
- }();
41
- function _e(t, e, o, s) {
42
- for (var a = t.length, i = o + -1; ++i < a; )
43
- if (e(t[i], i, t))
44
- return i;
45
- return -1;
46
- }
47
- function ke(t) {
48
- return t !== t;
49
- }
50
- function xe(t, e, o) {
51
- for (var s = o - 1, a = t.length; ++s < a; )
52
- if (t[s] === e)
53
- return s;
54
- return -1;
55
- }
56
- function Ae(t, e, o) {
57
- return e === e ? xe(t, e, o) : _e(t, ke, o);
58
- }
59
- function Ce(t, e, o) {
60
- e == "__proto__" && P ? P(t, e, {
61
- configurable: !0,
62
- enumerable: !0,
63
- value: o,
64
- writable: !0
65
- }) : t[e] = o;
66
- }
67
- function Se(t, e, o, s) {
68
- for (var a = -1, i = t == null ? 0 : t.length; ++a < i; ) {
69
- var r = t[a];
70
- e(s, r, o(r), t);
71
- }
72
- return s;
73
- }
74
- function Ie(t, e, o, s) {
75
- return fe(t, function(a, i, r) {
76
- e(s, a, o(a), r);
77
- }), s;
78
- }
79
- function q(t, e) {
80
- return function(o, s) {
81
- var a = we(o) ? Se : Ie, i = e ? e() : {};
82
- return a(o, t, ve(s), i);
83
- };
84
- }
85
- function G(t, e, o) {
86
- var s = t == null ? 0 : t.length;
87
- if (!s)
88
- return -1;
89
- var a = 0;
90
- return Ae(t, e, a);
91
- }
92
- var ye = q(function(t, e, o) {
93
- Ce(t, o, e);
94
- }), Le = q(function(t, e, o) {
95
- t[o ? 0 : 1].push(e);
96
- }, function() {
97
- return [[], []];
98
- });
99
- const Ue = {
100
- xmlns: "http://www.w3.org/2000/svg",
101
- fill: "none",
102
- stroke: "#000",
103
- "stroke-linejoin": "round",
104
- viewBox: "0 0 32 32"
105
- };
106
- function Be(t, e) {
107
- return S(), C("svg", Ue, e[0] || (e[0] = [
108
- V("path", { d: "m27 17.1-11 11-11-11m11 11V3.9" }, null, -1)
109
- ]));
110
- }
111
- const Me = { render: Be }, Ee = {
112
- xmlns: "http://www.w3.org/2000/svg",
113
- fill: "none",
114
- stroke: "#000",
115
- viewBox: "0 0 32 32"
116
- };
117
- function Te(t, e) {
118
- return S(), C("svg", Ee, e[0] || (e[0] = [
119
- V("path", { d: "M23.4 13.4 16 20.8l-7.4-7.4m7.4 7.4V4.5m12.5 23h-25" }, null, -1)
120
- ]));
121
- }
122
- const H = { render: Te }, $e = {
123
- xmlns: "http://www.w3.org/2000/svg",
124
- fill: "none",
125
- stroke: "#000",
126
- "stroke-linejoin": "round",
127
- viewBox: "0 0 32 32"
128
- };
129
- function Ne(t, e) {
130
- return S(), C("svg", $e, e[0] || (e[0] = [
131
- V("path", { d: "m5 14.9 11-11 11 11m-11-11v24.2" }, null, -1)
132
- ]));
133
- }
134
- const Fe = { render: Ne }, Ke = { class: "buttons" }, De = /* @__PURE__ */ R({
135
- __name: "SortList",
136
- props: {
137
- modelValue: {},
138
- id: {},
139
- ariaLabel: {},
140
- disabled: { type: Boolean },
141
- possibleValues: {}
142
- },
143
- emits: ["update:modelValue"],
144
- setup(t, { emit: e }) {
145
- const o = t, s = e, a = g(() => ye(o.possibleValues, "id")), i = g(
146
- () => o.modelValue.map(
147
- (l) => a.value[l] ?? be(l)
148
- )
149
- ), r = N([]);
150
- Z(
151
- () => o.modelValue,
152
- (l) => {
153
- const d = new Set(l);
154
- r.value = r.value.filter((m) => d.has(m));
155
- }
156
- );
157
- const w = g(() => r.value.length === 0), _ = (l, d, m) => [
158
- l.slice(0, d),
159
- l.slice(d, m),
160
- l.slice(m)
161
- ], I = (l) => {
162
- let d = 0;
163
- return (m) => l(m, d++);
164
- }, y = (l, d) => Le(
165
- l,
166
- I((m, h) => d(h))
167
- ), n = N(null), u = (l) => ({ to: d } = {}) => {
168
- const m = r.value.map((A) => G(o.modelValue, A)).sort((A, le) => A - le), h = (l === "up" ? d : null) ?? Math.max(m[0] - 1, 0), E = (l === "down" ? d : null) ?? m[m.length - 1] + 1, [J, Q, X] = _(
169
- o.modelValue,
170
- h,
171
- E + 1
172
- ), ee = new Set(m), [F, K] = y(
173
- Q,
174
- (A) => ee.has(A + h)
175
- ), [te, oe] = l === "up" ? [F, K] : [K, F], ne = J.concat(te, oe, X);
176
- s("update:modelValue", ne), ae(() => {
177
- l === "up" ? (n.value?.scrollUpIntoView(h - 1), n.value?.setCurrentKeyNavIndex(h)) : (n.value?.scrollDownIntoView(E + 1), n.value?.setCurrentKeyNavIndex(E));
178
- });
179
- }, v = u("up"), k = u("down"), L = () => v({ to: 0 }), x = () => k({ to: o.modelValue.length }), b = (l, d) => `${l} (${Ve.formatHotkeys(d)})`;
180
- return (l, d) => (S(), C(j, null, [
181
- c(me, {
182
- id: l.id,
183
- ref_key: "listBox",
184
- ref: n,
185
- modelValue: r.value,
186
- "onUpdate:modelValue": d[0] || (d[0] = (m) => r.value = m),
187
- "possible-values": i.value,
188
- ariaLabel: `sortListBox_${l.ariaLabel}`,
189
- "with-is-empty-state": !0,
190
- "empty-state-label": "Empty",
191
- size: 10,
192
- onKeydown: [
193
- U(B(p(k), ["alt"]), ["down"]),
194
- U(B(p(v), ["alt"]), ["up"]),
195
- U(B(L, ["alt"]), ["home"]),
196
- U(B(x, ["alt"]), ["end"])
197
- ]
198
- }, null, 8, ["id", "modelValue", "possible-values", "ariaLabel", "onKeydown"]),
199
- V("div", Ke, [
200
- c(M, {
201
- disabled: w.value,
202
- title: b("Move to top", ["Alt", "Home"]),
203
- compact: "",
204
- onClick: L
205
- }, {
206
- default: f(() => [
207
- c(p(H), { class: "rotated" })
208
- ]),
209
- _: 1
210
- }, 8, ["disabled", "title"]),
211
- c(M, {
212
- disabled: w.value,
213
- title: b("Move to bottom", ["Alt", "End"]),
214
- compact: "",
215
- onClick: x
216
- }, {
217
- default: f(() => [
218
- c(p(H))
219
- ]),
220
- _: 1
221
- }, 8, ["disabled", "title"]),
222
- c(M, {
223
- disabled: w.value,
224
- title: b("Move up", ["Alt", "ArrowUp"]),
225
- compact: "",
226
- onClick: p(v)
227
- }, {
228
- default: f(() => [
229
- c(p(Fe))
230
- ]),
231
- _: 1
232
- }, 8, ["disabled", "title", "onClick"]),
233
- c(M, {
234
- disabled: w.value,
235
- title: b("Move down", ["Alt", "ArrowDown"]),
236
- compact: "",
237
- onClick: p(k)
238
- }, {
239
- default: f(() => [
240
- c(p(Me))
241
- ]),
242
- _: 1
243
- }, 8, ["disabled", "title", "onClick"])
244
- ])
245
- ], 64));
246
- }
247
- }), Oe = /* @__PURE__ */ W(De, [["__scopeId", "data-v-d6a73624"]]), Pe = {
248
- class: /* @__PURE__ */ re(["flex", "space-between"])
249
- }, He = { class: "flex" }, Re = "<any unknown new column>", Ze = /* @__PURE__ */ R({
250
- __name: "SortListControl",
251
- props: {
252
- control: {},
253
- handleChange: {},
254
- changeValue: {},
255
- disabled: { type: Boolean },
256
- labelForId: {},
257
- isValid: { type: Boolean },
258
- messages: {},
259
- onRegisterValidation: {},
260
- anyUnknownValuesId: { default: Re },
261
- anyUnknownValuesText: { default: "Any unknown column" }
262
- },
263
- setup(t) {
264
- const e = t, o = g(() => e.control.data), s = g(
265
- () => e.control.uischema
266
- ), a = ie(
267
- s,
268
- "possibleValues",
269
- []
270
- ), i = g(
271
- () => a.value.concat({
272
- id: e.anyUnknownValuesId,
273
- text: e.anyUnknownValuesText,
274
- special: !0
275
- })
276
- ), r = (n) => {
277
- if (o.value.length === 0) {
278
- I();
279
- return;
280
- }
281
- const u = G(o.value, e.anyUnknownValuesId);
282
- if (u === -1)
283
- throw new Error(
284
- `SortList data have to contain the value "${e.anyUnknownValuesId}"`
285
- );
286
- const v = o.value.slice(0, u + 1), k = o.value.slice(u + 1), L = new Set(o.value), x = n.map(({ id: b }) => b).filter((b) => !L.has(b));
287
- x.length > 0 && e.changeValue(v.concat(x, k));
288
- };
289
- se(() => {
290
- r(a.value);
291
- }), Z(() => a.value, r);
292
- const w = () => {
293
- e.changeValue(o.value.toSorted((n, u) => n.localeCompare(u)));
294
- }, _ = () => {
295
- e.changeValue(o.value.toSorted((n, u) => u.localeCompare(n)));
296
- }, I = () => {
297
- e.changeValue(i.value.map(({ id: n }) => n));
298
- }, y = N(null);
299
- return (n, u) => (S(), C(j, null, [
300
- V("div", Pe, [
301
- V("div", He, [
302
- c(p($), {
303
- "with-border": "",
304
- compact: "",
305
- onClick: w
306
- }, {
307
- default: f(() => u[0] || (u[0] = [
308
- T("A - Z", -1)
309
- ])),
310
- _: 1,
311
- __: [0]
312
- }),
313
- c(p($), {
314
- "with-border": "",
315
- compact: "",
316
- onClick: _
317
- }, {
318
- default: f(() => u[1] || (u[1] = [
319
- T("Z - A", -1)
320
- ])),
321
- _: 1,
322
- __: [1]
323
- })
324
- ]),
325
- c(p($), {
326
- "with-border": "",
327
- compact: "",
328
- onClick: I
329
- }, {
330
- default: f(() => u[2] || (u[2] = [
331
- T("Reset all", -1)
332
- ])),
333
- _: 1,
334
- __: [2]
335
- })
336
- ]),
337
- c(ue, {
338
- label: n.control.label,
339
- onControllingFlowVariableSet: n.changeValue
340
- }, {
341
- default: f(({ labelForId: v }) => [
342
- c(de, {
343
- errors: n.messages.errors
344
- }, {
345
- default: f(() => [
346
- c(p(Oe), {
347
- id: v ?? void 0,
348
- ref_key: "controlElement",
349
- ref: y,
350
- "possible-values": i.value,
351
- "model-value": o.value,
352
- ariaLabel: n.control.label,
353
- disabled: n.disabled,
354
- "onUpdate:modelValue": n.changeValue
355
- }, null, 8, ["id", "possible-values", "model-value", "ariaLabel", "disabled", "onUpdate:modelValue"])
356
- ]),
357
- _: 2
358
- }, 1032, ["errors"])
359
- ]),
360
- icon: f(() => [
361
- D(n.$slots, "icon", {}, void 0, !0)
362
- ]),
363
- buttons: f(({ hover: v }) => [
364
- D(n.$slots, "buttons", {
365
- hover: v,
366
- controlHTMLElement: y.value
367
- }, void 0, !0)
368
- ]),
369
- _: 3
370
- }, 8, ["label", "onControllingFlowVariableSet"])
371
- ], 64));
372
- }
373
- }), tt = /* @__PURE__ */ W(Ze, [["__scopeId", "data-v-27f80d69"]]);
374
- export {
375
- Re as DEFAULT_ANY_UNKNOWN_VALUES_ID,
376
- tt as default
377
- };