@knime/jsonforms 1.18.10 → 1.18.11

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 (82) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AnyOfTwinlist-_Sr9IKrq.js → AnyOfTwinlist-H8itABcU.js} +1 -1
  3. package/dist/{Button-RAaPECE7.js → Button-CsbepB41.js} +1 -1
  4. package/dist/{Checkbox-hzgHGyqr.js → Checkbox-DjZxP5CK.js} +1 -1
  5. package/dist/{CheckboxControl-LBnX_sq8.js → CheckboxControl-DVfH74ao.js} +6 -6
  6. package/dist/{CheckboxesControl-4FhNF8e_.js → CheckboxesControl-DbPSppM6.js} +2 -2
  7. package/dist/{ComboBoxControl-CTNUQs_Y.js → ComboBoxControl-CQrCQDnm.js} +3 -3
  8. package/dist/{DateControl-BvNGaVP7.js → DateControl-C37NzdMk.js} +1 -1
  9. package/dist/{DateTimeControl-BOnkzwV5.js → DateTimeControl-DcIfSFnl.js} +1 -1
  10. package/dist/{DateTimeFormatInput-DMwVeX_K.js → DateTimeFormatInput-B37nJ7WZ.js} +22 -22
  11. package/dist/{DateTimeFormatPickerControl-CfaDye3g.js → DateTimeFormatPickerControl-CobCN_mb.js} +2 -2
  12. package/dist/{DateTimeFormatPickerWithTypeControl-CicLQ0uK.js → DateTimeFormatPickerWithTypeControl-Cgrpo4jj.js} +3 -3
  13. package/dist/{Dropdown-BoH5Dixs.js → Dropdown-BObDeUax.js} +21 -21
  14. package/dist/{DropdownControl-CvLqpt0t.js → DropdownControl-DRyS3Hwj.js} +3 -3
  15. package/dist/{HorizontalLayout-yYr-7Yrz.js → HorizontalLayout-DFDAqPrb.js} +1 -1
  16. package/dist/{InputField-BfAdSnU8.js → InputField-nmAOvFZq.js} +1 -1
  17. package/dist/{IntegerControl-D78hD1BN.js → IntegerControl-B4595SGV.js} +1 -1
  18. package/dist/IntervalControl-DQCAGoNo.js +767 -0
  19. package/dist/{Label-BnvMjL3_.js → Label-BPo4EJ9a.js} +1 -1
  20. package/dist/{LoadingDropdown-EtGhXYdJ.js → LoadingDropdown-Dg_LTPYt.js} +3 -3
  21. package/dist/{LoadingIcon-DV2OQM0C.js → LoadingIcon-DR8NKUY6.js} +1 -1
  22. package/dist/{ManualTwinlistControl-BCv95-8-.js → ManualTwinlistControl-CYYXpBTF.js} +4 -4
  23. package/dist/{MultiSelectListBoxControl-DQJRQHYQ.js → MultiSelectListBoxControl-BlNxjx6z.js} +2 -2
  24. package/dist/{MultimodeTwinlistControl-B0S4Ek61.js → MultimodeTwinlistControl-jV_w7lgr.js} +14 -14
  25. package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-rM_JAo3H.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-6idDahSz.js} +2 -2
  26. package/dist/{MultiselectListBox-BAzB2KkR.js → MultiselectListBox-BQIhu3EK.js} +4 -4
  27. package/dist/{NameFilter-C8IPUCWk.js → NameFilter-Dau_bS4b.js} +1 -1
  28. package/dist/{NumberControl-DNoajc_6.js → NumberControl-0o_GgOG4.js} +1 -1
  29. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-j08h2BDc.js +49 -0
  30. package/dist/{OneOfDropdown-zxzryRzf.js → OneOfDropdown-DaJGTKfI.js} +1 -1
  31. package/dist/{RadioControl-IrrHMLoF.js → RadioControl-WBCcOARB.js} +2 -2
  32. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-DSNXnLSc.js → RadioControlBase.vue_vue_type_script_setup_true_lang-Dgt56ocW.js} +2 -2
  33. package/dist/{RichTextControl-Dqm_9Xm0.js → RichTextControl-CnyjUXWF.js} +6 -6
  34. package/dist/{SectionHeading-D0yfY8w4.js → SectionHeading-BSx9A0he.js} +1 -1
  35. package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-CMZSLOQX.js +17513 -0
  36. package/dist/{SectionLayout-BwOjzscd.js → SectionLayout-X2--otVm.js} +3 -3
  37. package/dist/SettingsSubPanel-5m02HX25.js +5 -0
  38. package/dist/{SettingsSubPanelLayout-DxGYEnG_.js → SettingsSubPanelLayout-66qY7ALu.js} +6 -6
  39. package/dist/{SimpleButtonControl-4Tnj9jbl.js → SimpleButtonControl-uIPmwR6D.js} +2 -2
  40. package/dist/{SimpleTwinlistControl-BrOu0Dto.js → SimpleTwinlistControl-3fRPJik5.js} +2 -2
  41. package/dist/{SingleSelectControl-mPu0nBjI.js → SingleSelectControl-CVKlUerW.js} +2 -2
  42. package/dist/{SingleSelectListBoxControl-BdORWlmz.js → SingleSelectListBoxControl-BFOKfOuZ.js} +3 -3
  43. package/dist/{SortListControl-C468mLf-.js → SortListControl-D0ZmuLEc.js} +28 -28
  44. package/dist/{StyledListItem-MSj_zT8t.js → StyledListItem-1yi8cwAc.js} +1 -1
  45. package/dist/TextAreaControl-CMSLwtK5.js +27 -0
  46. package/dist/{TextControl-3w_mtjoY.js → TextControl-D38OA8zM.js} +1 -1
  47. package/dist/{TextControl.vue_vue_type_script_setup_true_lang-BYm9ohHY.js → TextControl.vue_vue_type_script_setup_true_lang-tQkTpiEu.js} +14 -16
  48. package/dist/{TimeControl-BCbRBMLL.js → TimeControl-D_qFhFcO.js} +1 -1
  49. package/dist/{TwinlistControlBase-CgVpKUVq.js → TwinlistControlBase-BoWr0icR.js} +3 -3
  50. package/dist/{TwinlistLoadingInfo-DDd-1UnR.js → TwinlistLoadingInfo-DScu9gNb.js} +13 -13
  51. package/dist/{TypedStringFilter-3v1FOYIP.js → TypedStringFilter-BX1diH1I.js} +1 -1
  52. package/dist/{ValueSwitch-Dbi9Zyo3.js → ValueSwitch-BKwWC7oO.js} +4 -4
  53. package/dist/{ValueSwitchControl--qc6Ir21.js → ValueSwitchControl-B0UEbXJS.js} +1 -1
  54. package/dist/{VerticalLayout-LTEVfknI.js → VerticalLayout-xxxNQVy2.js} +2 -2
  55. package/dist/{VerticalLayoutBase-Dd0Xt_rh.js → VerticalLayoutBase-C_zizW_W.js} +1 -1
  56. package/dist/{ZonedDateTimeControl-Dc6U58m6.js → ZonedDateTimeControl-DPi-I4Be.js} +3 -3
  57. package/dist/{_baseEach-CThGMqaf.js → _baseEach-BdW4qQGA.js} +2 -2
  58. package/dist/{_baseIteratee-DI1w5DnJ.js → _baseIteratee-dsxxjyPK.js} +3 -3
  59. package/dist/{_getTag-DdBbCZn7.js → _getTag-P-acvVg7.js} +10 -10
  60. package/dist/cloud-pending-changes-BooMof3w-CPJyy-Ev.js +22 -0
  61. package/dist/{cloud-synced-Cjce2vj8-DDAB0E3R.js → cloud-synced-BLkZpZpi-DksE46gj.js} +4 -4
  62. package/dist/deploy-D2iGlU6g-DzOC-qkj.js +23 -0
  63. package/dist/knime-jsonforms.css +1 -1
  64. package/dist/knime-jsonforms.js +7 -7
  65. package/dist/{localTimeUtils-d0I3Ig8P.js → localTimeUtils-Dhde1usg.js} +6 -6
  66. package/dist/service-BT3SUkgO-Duty0VTm.js +22 -0
  67. package/dist/src/uiComponents/NumberControlBase.vue.d.ts +1 -1
  68. package/dist/src/uiComponents/TextAreaControl.vue.d.ts +1 -1
  69. package/dist/src/uiComponents/TextControl.vue.d.ts +3 -193
  70. package/dist/testing.js +2 -2
  71. package/dist/{toString-nxdVTxAC.js → toString-BauPm1xP.js} +1 -1
  72. package/dist/{useBuiltinValidations-pCxT7o8_.js → useBuiltinValidations-BkGavbHL.js} +1 -1
  73. package/dist/{usePossibleValues-Bu21MMCR.js → usePossibleValues-CRl5e6t8.js} +1 -1
  74. package/package.json +4 -4
  75. package/dist/IntervalControl-0amOuiuG.js +0 -543
  76. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-CntdmdGl.js +0 -56
  77. package/dist/NumberInput-B_5xNEia.js +0 -231
  78. package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-D6erQfqE.js +0 -16682
  79. package/dist/SettingsSubPanel-Cq8N7ec5.js +0 -5
  80. package/dist/TextAreaControl-CbHXEyos.js +0 -108
  81. package/dist/cloud-pending-changes-BrwTyYkH-Dz2wUJ-Q.js +0 -22
  82. package/dist/deploy-BHUT6hCi-CuMB4J-Y.js +0 -22
@@ -0,0 +1,767 @@
1
+ import { openBlock as m, createElementBlock as f, renderSlot as Ve, toDisplayString as F, createCommentVNode as $, createElementVNode as c, resolveComponent as ye, normalizeClass as b, withModifiers as R, createVNode as I, defineComponent as L, useModel as H, computed as w, Fragment as O, createBlock as ee, withDirectives as D, vShow as S, renderList as K, unref as p, withCtx as W, createTextVNode as xe, mergeModels as U, ref as T, watch as q, withKeys as Ae, vModelText as Me, normalizeStyle as _e } from "vue";
2
+ import { _ as C, H as be, I as De, a0 as we, u as Pe } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-CMZSLOQX.js";
3
+ import { u as Re, a as Ne, s as Se, f as $e, o as Ce } from "./floating-ui.vue-Fx4CxKut.js";
4
+ import { A as Oe } from "./arrow-dropdown-DMFBPPcK.js";
5
+ /* empty css */
6
+ import { V as z } from "./ValueSwitch-BKwWC7oO.js";
7
+ const Be = {
8
+ name: "Tooltip",
9
+ props: {
10
+ text: {
11
+ type: String,
12
+ required: !0
13
+ }
14
+ }
15
+ }, ke = { class: "tooltip" }, Ge = {
16
+ key: 0,
17
+ class: "text"
18
+ };
19
+ function Fe(e, t, a, s, u, n) {
20
+ return m(), f("div", ke, [
21
+ Ve(e.$slots, "default", {}, void 0, !0),
22
+ a.text ? (m(), f("span", Ge, F(a.text), 1)) : $("", !0)
23
+ ]);
24
+ }
25
+ const He = /* @__PURE__ */ C(Be, [["render", Fe], ["__scopeId", "data-v-64e1cb84"]]), te = (e, t) => ({
26
+ negative: e,
27
+ years: parseInt(t[1] ?? "0", 10),
28
+ months: parseInt(t[2] ?? "0", 10),
29
+ weeks: parseInt(t[3] ?? "0", 10),
30
+ days: parseInt(t[4] ?? "0", 10)
31
+ }), ae = (e, t) => {
32
+ const a = parseInt(t[4]?.padEnd(3, "0") ?? "0", 10);
33
+ return {
34
+ negative: e,
35
+ hours: parseInt(t[1] ?? "0", 10),
36
+ minutes: parseInt(t[2] ?? "0", 10),
37
+ seconds: parseInt(t[3] ?? "0", 10),
38
+ milliseconds: a
39
+ };
40
+ }, Z = (e) => e.type === "DATE" ? e.interval.years === 0 && e.interval.months === 0 && e.interval.weeks === 0 && e.interval.days === 0 : e.interval.hours === 0 && e.interval.minutes === 0 && e.interval.seconds === 0 && e.interval.milliseconds === 0, B = (e) => {
41
+ let t = "P";
42
+ return e.type === "DATE" ? t += `${e.interval.years}Y${e.interval.months}M${e.interval.weeks}W${e.interval.days}D` : t += `T${e.interval.hours}H${e.interval.minutes}M${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")}S`, e.interval.negative && (t = `-${t}`), t;
43
+ }, _ = (e) => {
44
+ const t = (s, u) => s === 0 ? "" : s === 1 ? `${s} ${u} ` : `${s} ${u}s `;
45
+ let a = "";
46
+ if (e.type === "DATE") {
47
+ if (Z(e))
48
+ return "0 days";
49
+ a += t(e.interval.years, "year"), a += t(e.interval.months, "month"), a += t(e.interval.weeks, "week"), a += t(e.interval.days, "day");
50
+ } else {
51
+ if (Z(e))
52
+ return "0 seconds";
53
+ a += t(e.interval.hours, "hour"), a += t(e.interval.minutes, "minute");
54
+ const s = e.interval.milliseconds === 0;
55
+ (e.interval.seconds !== 0 || !s) && (s ? a += t(e.interval.seconds, "second") : a += `${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")} seconds `);
56
+ }
57
+ return e.interval.negative && (a = `-(${a.trim()})`), a.trim();
58
+ }, ne = "(\\d+)\\s*y(?:ears?)?", se = "(\\d+)\\s*m(?:o(?:nths?)?)?", le = "(\\d+)\\s*w(?:eeks?)?", re = "(\\d+)\\s*d(?:ays?)?", ie = "(\\d+)\\s*h(?:ours?)?", oe = "(\\d+)\\s*m(?:in(?:s|utes?)?)?", ue = "(\\d+)(?:[,.](\\d{1,3}))?\\s*s(?:ec(?:s|onds?)?)?", de = new RegExp(
59
+ `^(?:${ne})?\\s*(?:${se})?\\s*(?:${le})?\\s*(?:${re})?\\s*$`,
60
+ "i"
61
+ ), ce = new RegExp(
62
+ `^(?:${ie})?\\s*(?:${oe})?\\s*(?:${ue})?$`,
63
+ "i"
64
+ ), Ue = new RegExp(
65
+ `^\\s*-\\s*\\(\\s*${de.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
66
+ "i"
67
+ ), Le = new RegExp(
68
+ `^\\s*-\\s*(?:\\s*${ne}|${se}|${le}|${re})\\s*$`,
69
+ "i"
70
+ ), Xe = new RegExp(
71
+ `^\\s*-\\s*\\(\\s*${ce.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
72
+ "i"
73
+ ), Ke = new RegExp(
74
+ `^\\s*-\\s*(?:\\s*${ie}|${oe}|${ue})\\s*$`,
75
+ "i"
76
+ ), me = (e) => {
77
+ if (e = e?.trim(), !e)
78
+ throw new Error("Empty interval string");
79
+ const t = de.exec(e), a = Ue.exec(e) ?? Le.exec(e), s = ce.exec(e), u = Xe.exec(e) ?? Ke.exec(e), n = t ?? a, d = s ?? u, r = (a ?? u) !== null;
80
+ if (d && n)
81
+ throw new Error("Ambiguous time format");
82
+ if (n)
83
+ return {
84
+ type: "DATE",
85
+ interval: te(r, n)
86
+ };
87
+ if (d)
88
+ return {
89
+ type: "TIME",
90
+ interval: ae(r, d)
91
+ };
92
+ throw new Error(`Invalid human readable time: ${e}`);
93
+ }, ve = (e, t) => {
94
+ try {
95
+ const a = me(e), s = a.type, u = a.interval.negative;
96
+ if (s === t || t === "DATE_OR_TIME")
97
+ return {
98
+ valid: !0,
99
+ type: s,
100
+ negative: u
101
+ };
102
+ } catch {
103
+ return { valid: !1 };
104
+ }
105
+ }, y = (e) => {
106
+ if (e = e?.trim(), ["", "P", "PT", "-", "-P", "-PT"].includes(e))
107
+ throw new Error("Empty ISO duration");
108
+ const t = /^-?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?$/, a = /^-?PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)(?:[,.](\d{1,3}))?S)?$/, s = t.exec(e), u = a.exec(e);
109
+ if (s)
110
+ return {
111
+ type: "DATE",
112
+ interval: te(
113
+ e.startsWith("-"),
114
+ s
115
+ )
116
+ };
117
+ if (u)
118
+ return {
119
+ type: "TIME",
120
+ interval: ae(
121
+ e.startsWith("-"),
122
+ u
123
+ )
124
+ };
125
+ throw new Error(`Invalid ISO duration: ${e}`);
126
+ }, pe = (e, t) => {
127
+ try {
128
+ const a = y(e), s = a.type, u = a.interval.negative;
129
+ if (s === t || t === "DATE_OR_TIME")
130
+ return {
131
+ valid: !0,
132
+ type: s,
133
+ negative: u
134
+ };
135
+ } catch {
136
+ return { valid: !1 };
137
+ }
138
+ }, We = (e) => {
139
+ const t = pe(e, "DATE_OR_TIME"), a = ve(
140
+ e,
141
+ "DATE_OR_TIME"
142
+ );
143
+ if (t.valid)
144
+ return y(e);
145
+ if (a.valid)
146
+ return me(e);
147
+ throw new Error(`Invalid interval string: ${e}`);
148
+ }, k = (e, t) => {
149
+ const a = pe(e, t), s = ve(e, t);
150
+ return a.valid ? a : s.valid ? s : { valid: !1 };
151
+ }, qe = {
152
+ xmlns: "http://www.w3.org/2000/svg",
153
+ fill: "none",
154
+ stroke: "#000",
155
+ "stroke-linejoin": "round",
156
+ viewBox: "0 0 32 32"
157
+ };
158
+ function ze(e, t) {
159
+ return m(), f("svg", qe, [...t[0] || (t[0] = [
160
+ c("path", { d: "m19.7 17-4.6-2.6V8.7m6.3 15.6h8.7m-3.2-3.2 3.2 3.2-3.2 3.2m-18-5.4c-2.2-1.8-3.6-4.6-3.6-7.7 0-5.5 4.4-9.9 9.9-9.9S25 8.9 25 14.4s-4.4 9.9-9.9 9.9H1.9" }, null, -1)
161
+ ])]);
162
+ }
163
+ const Ze = { render: ze }, Ye = 200, je = 50, Je = 0.1, Qe = 1, et = {
164
+ name: "NumberInput",
165
+ components: {
166
+ ArrowIcon: Oe
167
+ },
168
+ props: {
169
+ modelValue: {
170
+ default: 0,
171
+ type: [Number, String],
172
+ validator(e) {
173
+ return typeof e == "string" ? e.toLowerCase().includes("e") : typeof e == "number";
174
+ }
175
+ },
176
+ id: {
177
+ type: String,
178
+ default: null
179
+ },
180
+ name: {
181
+ type: String,
182
+ default: null
183
+ },
184
+ min: {
185
+ default: Number.MIN_SAFE_INTEGER,
186
+ type: Number
187
+ },
188
+ max: {
189
+ default: Number.MAX_SAFE_INTEGER,
190
+ type: Number
191
+ },
192
+ step: {
193
+ default: null,
194
+ type: Number
195
+ },
196
+ /**
197
+ * Validity controlled by the parent component to be flexible.
198
+ */
199
+ isValid: {
200
+ default: !0,
201
+ type: Boolean
202
+ },
203
+ /**
204
+ * Sets the significant digit of the spinner input.
205
+ *
206
+ * Possible values: 'double' | 'integer'
207
+ */
208
+ type: {
209
+ default: "double",
210
+ type: String
211
+ },
212
+ inputClasses: {
213
+ default: "",
214
+ type: String
215
+ },
216
+ disabled: {
217
+ default: !1,
218
+ type: Boolean
219
+ },
220
+ compact: {
221
+ type: Boolean,
222
+ default: !1
223
+ }
224
+ },
225
+ emits: ["update:modelValue"],
226
+ data() {
227
+ return {
228
+ clicked: !1,
229
+ // false to prevent unintended 'mouseup' or 'mouseleave' events.
230
+ hovered: !1,
231
+ initialValue: 0,
232
+ localValue: "",
233
+ spinnerArrowTimeout: null,
234
+ spinnerArrowInterval: null
235
+ };
236
+ },
237
+ computed: {
238
+ isInteger() {
239
+ return this.type === "integer";
240
+ },
241
+ stepSize() {
242
+ return this.step !== null ? this.step : this.isInteger ? Qe : Je;
243
+ },
244
+ inputClassList() {
245
+ let e = this.inputClasses;
246
+ return this.hovered && (e += " hover"), e;
247
+ },
248
+ inputValue() {
249
+ return typeof this.localValue == "number" && isNaN(this.localValue) ? "" : this.isInteger ? this.localValue : this.localValue.toString();
250
+ }
251
+ },
252
+ watch: {
253
+ modelValue: {
254
+ handler() {
255
+ this.parseValue(this.localValue) !== this.parseValue(this.modelValue) && (this.localValue = this.parseValue(this.modelValue));
256
+ },
257
+ immediate: !0
258
+ }
259
+ },
260
+ mounted() {
261
+ this.localValue = this.parseValue(this.modelValue), this.initialValue = this.localValue;
262
+ },
263
+ methods: {
264
+ getInputRef() {
265
+ return this.$refs.input;
266
+ },
267
+ parseValue(e) {
268
+ return this.isInteger ? parseInt(e.toString(), 10) : parseFloat(e.toString());
269
+ },
270
+ getParsedValue() {
271
+ return this.parseValue(this.localValue);
272
+ },
273
+ onInput(e) {
274
+ const t = e.target.value;
275
+ e && !t && (e.data === "." || e.data === "-") || (t || (this.getInputRef().value = ""), this.updateAndEmit({ newValue: t }));
276
+ },
277
+ updateAndEmit({ newValue: e }) {
278
+ this.localValue = e, this.$emit("update:modelValue", this.getParsedValue());
279
+ },
280
+ onBlur() {
281
+ this.localValue = this.getParsedValue(), this.getInputRef().valueAsNumber = this.localValue;
282
+ },
283
+ validate(e) {
284
+ let t = !0, a;
285
+ return e = typeof e > "u" ? this.getParsedValue() : this.parseValue(e), typeof e != "number" || isNaN(e) ? (t = !1, a = "Current value is not a number.") : (this.min > e || this.max < e) && (t = !1, a = "Current value is outside allowed range."), { isValid: t, errorMessage: a };
286
+ },
287
+ /**
288
+ * Change value updates the actual value of the input field if a valid new value
289
+ * can be found. It prevents users from further invalidating the value in the input
290
+ * by moving in the wrong direction (lower than min/higher than max).
291
+ *
292
+ * It will snap to the nearest multiple of the given increment, i.e. initial
293
+ * value 13 incremented by 10 will yield 20.
294
+ *
295
+ * @param {Number} increment - the amount by which to change the current
296
+ * value. If value is 0, no update is performed.
297
+ * @returns {undefined}
298
+ */
299
+ changeValue(e) {
300
+ if (e === 0)
301
+ return;
302
+ let t = this.getParsedValue();
303
+ this.validate(t).isValid || (t = this.findNearestValidValue(t));
304
+ let a = t + e, s = 1 / Math.abs(e);
305
+ Math.abs(e) < 1 && (s = Math.round(s)), a = Math.round(a * s) / s, this.validate(a).isValid && this.updateAndEmit({ newValue: a });
306
+ },
307
+ findNearestValidValue(e) {
308
+ return e < this.min ? this.min : e > this.max ? this.max : this.initialValue;
309
+ },
310
+ /**
311
+ * This method is the callback handler for mouse events on the input field controls.
312
+ * It is fired when either the up-arrow or down-arrow is pressed by the user. It manages
313
+ * both mousedown and mouseup events. It clears any existing timeouts or intervals which
314
+ * may have been set previously. It also recognizes when the mouse leaves the button
315
+ * (which could cause a mouseup event to be missed) and therefore uses the this.clicked
316
+ * data property to ensure it doesn't get stuck in an interval.
317
+ *
318
+ * @param {Event} e - the DOM event object which triggered the handler.
319
+ * @param {String} type - the type of button pressed (either 'increased' or 'decreased').
320
+ * @returns {undefined}
321
+ */
322
+ mouseEvent(e, t) {
323
+ if (this.disabled)
324
+ return;
325
+ this.spinnerArrowInterval !== null && clearTimeout(this.spinnerArrowInterval), this.spinnerArrowTimeout !== null && clearInterval(this.spinnerArrowTimeout);
326
+ let a = this.stepSize;
327
+ if (t === "decrease" && (a *= -1), e.type === "mousedown") {
328
+ this.clicked = !0, this.spinnerArrowTimeout = setTimeout(() => {
329
+ this.spinnerArrowInterval = setInterval(() => {
330
+ this.changeValue(a);
331
+ }, je);
332
+ }, Ye);
333
+ return;
334
+ }
335
+ this.clicked && (this.clicked = !1, this.changeValue(a));
336
+ },
337
+ toggleHover() {
338
+ this.hovered = !this.hovered;
339
+ }
340
+ }
341
+ }, tt = ["id", "name", "value", "min", "max", "step", "disabled"], at = {
342
+ key: 0,
343
+ class: "invalid-marker"
344
+ };
345
+ function nt(e, t, a, s, u, n) {
346
+ const d = ye("ArrowIcon");
347
+ return m(), f("div", {
348
+ class: b(["wrapper", { disabled: a.disabled, compact: a.compact }])
349
+ }, [
350
+ c("input", {
351
+ id: a.id,
352
+ ref: "input",
353
+ name: a.name,
354
+ type: "number",
355
+ role: "spinButton",
356
+ value: n.inputValue,
357
+ min: a.min,
358
+ max: a.max,
359
+ step: n.stepSize,
360
+ class: b(n.inputClassList),
361
+ disabled: a.disabled,
362
+ onInput: t[0] || (t[0] = (r) => n.onInput(r)),
363
+ onBlur: t[1] || (t[1] = (...r) => n.onBlur && n.onBlur(...r)),
364
+ onMouseenter: t[2] || (t[2] = (...r) => n.toggleHover && n.toggleHover(...r)),
365
+ onMouseleave: t[3] || (t[3] = (...r) => n.toggleHover && n.toggleHover(...r))
366
+ }, null, 42, tt),
367
+ a.isValid ? $("", !0) : (m(), f("span", at)),
368
+ c("span", {
369
+ class: b(["increase", { disabled: a.disabled }]),
370
+ onMousedown: t[4] || (t[4] = R((r) => n.mouseEvent(r, "increase"), ["prevent"])),
371
+ onMouseup: t[5] || (t[5] = R((r) => n.mouseEvent(r, "increase"), ["prevent"])),
372
+ onMouseleave: t[6] || (t[6] = (r) => n.mouseEvent(r, "increase"))
373
+ }, [
374
+ I(d)
375
+ ], 34),
376
+ c("span", {
377
+ class: b(["decrease", { disabled: a.disabled }]),
378
+ onMousedown: t[7] || (t[7] = R((r) => n.mouseEvent(r, "decrease"), ["prevent"])),
379
+ onMouseup: t[8] || (t[8] = R((r) => n.mouseEvent(r, "decrease"), ["prevent"])),
380
+ onMouseleave: t[9] || (t[9] = (r) => n.mouseEvent(r, "decrease"))
381
+ }, [
382
+ I(d)
383
+ ], 34)
384
+ ], 2);
385
+ }
386
+ const Y = /* @__PURE__ */ C(et, [["render", nt], ["__scopeId", "data-v-0ce77f1e"]]), j = [
387
+ "years",
388
+ "months",
389
+ "weeks",
390
+ "days"
391
+ ], J = [
392
+ "hours",
393
+ "minutes",
394
+ "seconds",
395
+ "milliseconds"
396
+ ], V = {
397
+ years: { min: 0, max: Number.MAX_SAFE_INTEGER },
398
+ months: { min: 0, max: Number.MAX_SAFE_INTEGER },
399
+ weeks: { min: 0, max: Number.MAX_SAFE_INTEGER },
400
+ days: { min: 0, max: Number.MAX_SAFE_INTEGER },
401
+ hours: { min: 0, max: Number.MAX_SAFE_INTEGER },
402
+ minutes: { min: 0, max: Number.MAX_SAFE_INTEGER },
403
+ seconds: { min: 0, max: Number.MAX_SAFE_INTEGER },
404
+ milliseconds: { min: 0, max: 999 }
405
+ }, Q = (e, t) => t === "DATE" ? {
406
+ type: "DATE",
407
+ interval: e.periodPart
408
+ } : {
409
+ type: "TIME",
410
+ interval: e.durationPart
411
+ }, N = (e, t) => e.type === "DATE" ? {
412
+ ...t,
413
+ periodPart: e.interval
414
+ } : {
415
+ ...t,
416
+ durationPart: e.interval
417
+ }, G = (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), st = { class: "header" }, lt = { class: "ascending-descending-switch-container" }, rt = { class: "input-grid" }, it = { class: "input-label" }, ot = { class: "input-label" }, ut = { class: "accept-controls" }, dt = /* @__PURE__ */ L({
418
+ __name: "IntervalInputPopoverContent",
419
+ props: /* @__PURE__ */ U({
420
+ format: {},
421
+ allowDescending: { type: Boolean }
422
+ }, {
423
+ usedFormat: {
424
+ required: !0
425
+ },
426
+ usedFormatModifiers: {},
427
+ modelValue: {
428
+ required: !0
429
+ },
430
+ modelModifiers: {}
431
+ }),
432
+ emits: /* @__PURE__ */ U(["commit"], ["update:usedFormat", "update:modelValue"]),
433
+ setup(e, { emit: t }) {
434
+ const a = t, s = e, u = H(e, "usedFormat"), n = H(e, "modelValue"), d = w(() => {
435
+ const h = u.value === "DATE" ? j : J, v = u.value === "DATE" ? h.map(
436
+ (i) => n.value.periodPart[i]
437
+ ) : h.map(
438
+ (i) => n.value.durationPart[i]
439
+ );
440
+ for (let i = 0; i < v.length; i++) {
441
+ const g = h[i], A = v[i];
442
+ if (isNaN(A) || A < V[g].min || A > V[g].max)
443
+ return {
444
+ valid: !1,
445
+ reason: `${G(g)} out of bounds.`
446
+ };
447
+ }
448
+ return { valid: !0 };
449
+ }), r = w({
450
+ get() {
451
+ return s.allowDescending ? u.value === "DATE" ? n.value.periodPart.negative ? "DESCENDING" : "ASCENDING" : n.value.durationPart.negative ? "DESCENDING" : "ASCENDING" : "ASCENDING";
452
+ },
453
+ set(h) {
454
+ n.value.periodPart.negative = h === "DESCENDING", n.value.durationPart.negative = h === "DESCENDING";
455
+ }
456
+ }), x = () => {
457
+ a(
458
+ "commit",
459
+ u.value,
460
+ n.value,
461
+ r.value
462
+ );
463
+ };
464
+ return (h, v) => (m(), f(O, null, [
465
+ c("span", st, [
466
+ v[2] || (v[2] = c("span", { class: "input-title" }, "Interval", -1)),
467
+ s.format === "DATE_OR_TIME" ? (m(), ee(z, {
468
+ key: 0,
469
+ modelValue: u.value,
470
+ "onUpdate:modelValue": v[0] || (v[0] = (i) => u.value = i),
471
+ "possible-values": [
472
+ { id: "DATE", text: "Date" },
473
+ { id: "TIME", text: "Time" }
474
+ ],
475
+ compact: ""
476
+ }, null, 8, ["modelValue"])) : $("", !0)
477
+ ]),
478
+ D(c("div", lt, [
479
+ I(z, {
480
+ modelValue: r.value,
481
+ "onUpdate:modelValue": v[1] || (v[1] = (i) => r.value = i),
482
+ compact: "",
483
+ "possible-values": [
484
+ { id: "ASCENDING", text: "Forward" },
485
+ { id: "DESCENDING", text: "Backward" }
486
+ ]
487
+ }, null, 8, ["modelValue"])
488
+ ], 512), [
489
+ [S, e.allowDescending]
490
+ ]),
491
+ c("div", rt, [
492
+ (m(!0), f(O, null, K(p(j), (i) => D((m(), f("span", {
493
+ key: i,
494
+ class: "labeled-date-time-input"
495
+ }, [
496
+ c("span", it, F(p(G)(i)), 1),
497
+ I(Y, {
498
+ modelValue: n.value.periodPart[i],
499
+ "onUpdate:modelValue": (g) => n.value.periodPart[i] = g,
500
+ min: p(V)[i].min,
501
+ max: p(V)[i].max,
502
+ compact: "",
503
+ type: "integer"
504
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max"])
505
+ ], 512)), [
506
+ [S, u.value === "DATE"]
507
+ ])), 128)),
508
+ (m(!0), f(O, null, K(p(J), (i) => D((m(), f("span", {
509
+ key: i,
510
+ class: "labeled-date-time-input"
511
+ }, [
512
+ c("span", ot, F(p(G)(i)), 1),
513
+ I(Y, {
514
+ "model-value": n.value.durationPart[i],
515
+ min: p(V)[i].min,
516
+ max: p(V)[i].max,
517
+ compact: "",
518
+ type: "integer",
519
+ "onUpdate:modelValue": (g) => {
520
+ n.value.durationPart[i] = g;
521
+ }
522
+ }, null, 8, ["model-value", "min", "max", "onUpdate:modelValue"])
523
+ ], 512)), [
524
+ [S, u.value === "TIME"]
525
+ ])), 128))
526
+ ]),
527
+ c("div", ut, [
528
+ I(He, {
529
+ text: d.value.valid ? "" : d.value.reason
530
+ }, {
531
+ default: W(() => [
532
+ I(be, {
533
+ primary: "",
534
+ disabled: !d.value.valid,
535
+ onClick: x
536
+ }, {
537
+ default: W(() => [...v[3] || (v[3] = [
538
+ xe(" Set ", -1)
539
+ ])]),
540
+ _: 1
541
+ }, 8, ["disabled"])
542
+ ]),
543
+ _: 1
544
+ }, 8, ["text"])
545
+ ])
546
+ ], 64));
547
+ }
548
+ }), ct = /* @__PURE__ */ C(dt, [["__scopeId", "data-v-a372cf12"]]), mt = { class: "input-fields" }, vt = ["disabled", "placeholder"], pt = {
549
+ key: 0,
550
+ class: "invalid-marker"
551
+ }, ft = ["disabled"], ht = {}, Et = /* @__PURE__ */ L({
552
+ ...ht,
553
+ __name: "IntervalInput",
554
+ props: /* @__PURE__ */ U({
555
+ format: { default: "DATE_OR_TIME" },
556
+ allowDescending: { type: Boolean, default: !0 },
557
+ disabled: { type: Boolean, default: !1 },
558
+ compact: { type: Boolean, default: !1 }
559
+ }, {
560
+ modelValue: {
561
+ required: !0
562
+ },
563
+ modelModifiers: {}
564
+ }),
565
+ emits: ["update:modelValue"],
566
+ setup(e) {
567
+ const t = e, a = H(e, "modelValue"), s = T(
568
+ (() => {
569
+ if (t.format === "DATE_OR_TIME") {
570
+ const o = k(
571
+ a.value,
572
+ "DATE_OR_TIME"
573
+ );
574
+ return o.valid ? o.type : "DATE";
575
+ } else
576
+ return t.format;
577
+ })()
578
+ ), u = w(() => s.value === "DATE" ? "ISO-8601, whole words (1 year), single letters (1y)" : "ISO-8601, whole words (1 hour), single letters (1h)"), n = T(
579
+ (() => {
580
+ const o = y(
581
+ a.value
582
+ );
583
+ return N(o, {
584
+ periodPart: {
585
+ negative: !1,
586
+ years: 0,
587
+ months: 0,
588
+ weeks: 0,
589
+ days: 1
590
+ },
591
+ durationPart: {
592
+ negative: !1,
593
+ hours: 0,
594
+ minutes: 0,
595
+ seconds: 1,
596
+ milliseconds: 0
597
+ }
598
+ });
599
+ })()
600
+ ), d = T(
601
+ _(
602
+ y(a.value)
603
+ )
604
+ ), r = w(() => {
605
+ const o = k(
606
+ d.value,
607
+ "DATE_OR_TIME"
608
+ );
609
+ return o.valid && (t.allowDescending || !o.negative) && (o.type === s.value || t.format === "DATE_OR_TIME");
610
+ }), x = T(null), h = T(null), v = T(null), i = (o, l) => {
611
+ const E = Q(
612
+ o,
613
+ l
614
+ );
615
+ d.value = _(E), a.value = B(E), s.value = l, n.value = o;
616
+ }, g = () => {
617
+ n.value = N(
618
+ y(a.value),
619
+ n.value
620
+ );
621
+ }, A = (o) => {
622
+ const l = k(
623
+ o,
624
+ "DATE_OR_TIME"
625
+ );
626
+ if (!l.valid || !t.allowDescending && l.negative || l.type !== s.value && t.format !== "DATE_OR_TIME")
627
+ return;
628
+ const E = We(
629
+ o
630
+ );
631
+ n.value = N(
632
+ E,
633
+ n.value
634
+ ), a.value = B(E), s.value = l.type, d.value = _(E);
635
+ }, fe = (o) => {
636
+ const l = y(o);
637
+ d.value = _(l), n.value = N(
638
+ l,
639
+ n.value
640
+ ), a.value = o;
641
+ }, he = (o) => {
642
+ const l = Q(
643
+ n.value,
644
+ o
645
+ );
646
+ d.value = _(l), a.value = B(l), s.value = o;
647
+ }, Ee = (o) => {
648
+ o !== "DATE_OR_TIME" && he(o);
649
+ }, M = T(!1);
650
+ q(() => t.format, Ee), q(a, fe);
651
+ const X = (o) => {
652
+ A(o);
653
+ }, P = (o, l) => {
654
+ o && l ? i(
655
+ l.popoverValues,
656
+ l.usedFormat
657
+ ) : g(), M.value = !1;
658
+ };
659
+ De(x, () => P(!1), {
660
+ ignore: [h]
661
+ }), we("Escape", () => P(!1));
662
+ const { floatingStyles: ge, update: Ie } = Re(h, x, {
663
+ middleware: [
664
+ Se(),
665
+ // move left/right to keep it on screen
666
+ $e({
667
+ // flip it vertically to keep it on screen
668
+ mainAxis: !0,
669
+ crossAxis: !1
670
+ }),
671
+ Ce({
672
+ // move it a bit away from the button vertically
673
+ mainAxis: 2,
674
+ // vertical
675
+ crossAxis: 0
676
+ // horizontal
677
+ })
678
+ ],
679
+ placement: "top-end",
680
+ whileElementsMounted: Ne
681
+ });
682
+ return (o, l) => (m(), f("div", null, [
683
+ c("div", {
684
+ class: b(["wrapper", { disabled: e.disabled, compact: e.compact }])
685
+ }, [
686
+ c("span", mt, [
687
+ D(c("input", {
688
+ ref_key: "inputTextFieldRef",
689
+ ref: v,
690
+ "onUpdate:modelValue": l[0] || (l[0] = (E) => d.value = E),
691
+ type: "text",
692
+ disabled: e.disabled,
693
+ placeholder: u.value,
694
+ spellcheck: "false",
695
+ onFocus: l[1] || (l[1] = (E) => M.value = !1),
696
+ onFocusout: l[2] || (l[2] = () => X(d.value)),
697
+ onKeypress: l[3] || (l[3] = Ae(() => X(d.value), ["enter"]))
698
+ }, null, 40, vt), [
699
+ [Me, d.value]
700
+ ]),
701
+ r.value ? $("", !0) : (m(), f("span", pt)),
702
+ c("button", {
703
+ ref_key: "togglePopoverButtonRef",
704
+ ref: h,
705
+ class: "trigger-popover-button",
706
+ disabled: e.disabled,
707
+ onClick: l[4] || (l[4] = () => {
708
+ M.value ? P(!1) : (M.value = !0, p(Ie)());
709
+ })
710
+ }, [
711
+ I(p(Ze))
712
+ ], 8, ft)
713
+ ])
714
+ ], 2),
715
+ D(c("div", {
716
+ ref_key: "durationInputPopoverRef",
717
+ ref: x,
718
+ class: "control-popup",
719
+ style: _e(p(ge))
720
+ }, [
721
+ I(ct, {
722
+ "model-value": n.value,
723
+ "used-format": s.value,
724
+ format: t.format,
725
+ "allow-descending": t.allowDescending,
726
+ onCommit: l[5] || (l[5] = (E, Te, It) => P(!0, {
727
+ usedFormat: E,
728
+ popoverValues: Te
729
+ }))
730
+ }, null, 8, ["model-value", "used-format", "format", "allow-descending"])
731
+ ], 4), [
732
+ [S, M.value]
733
+ ])
734
+ ]));
735
+ }
736
+ }), gt = /* @__PURE__ */ C(Et, [["__scopeId", "data-v-f37d874a"]]), _t = /* @__PURE__ */ L({
737
+ __name: "IntervalControl",
738
+ props: {
739
+ control: {},
740
+ handleChange: { type: Function },
741
+ changeValue: { type: Function },
742
+ disabled: { type: Boolean },
743
+ isValid: { type: Boolean },
744
+ onRegisterValidation: { type: Function },
745
+ labelForId: {}
746
+ },
747
+ setup(e) {
748
+ const t = e, a = w(
749
+ () => t.control.uischema
750
+ ), s = Pe(
751
+ a,
752
+ "intervalType",
753
+ "DATE_OR_TIME"
754
+ );
755
+ return (u, n) => (m(), ee(p(gt), {
756
+ id: e.labelForId,
757
+ compact: "",
758
+ disabled: e.disabled,
759
+ "model-value": e.control.data,
760
+ format: p(s),
761
+ "onUpdate:modelValue": e.changeValue
762
+ }, null, 8, ["id", "disabled", "model-value", "format", "onUpdate:modelValue"]));
763
+ }
764
+ });
765
+ export {
766
+ _t as default
767
+ };