@knime/jsonforms 1.18.10 → 1.18.12

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 +14 -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 +6 -6
  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
@@ -1,543 +0,0 @@
1
- import { openBlock as m, createElementBlock as E, renderSlot as Te, toDisplayString as O, createCommentVNode as B, createElementVNode as v, defineComponent as F, useModel as G, computed as R, Fragment as N, createBlock as J, withDirectives as $, createVNode as h, vShow as b, renderList as K, unref as c, withCtx as X, createTextVNode as he, mergeModels as k, ref as T, watch as W, normalizeClass as xe, withKeys as ye, vModelText as De, normalizeStyle as _e } from "vue";
2
- import { _ as H, G as Me, H as Pe, Z as $e, u as Re } from "./SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-D6erQfqE.js";
3
- import { u as Ae, a as we, s as be, f as Ne, o as Ve } from "./floating-ui.vue-Fx4CxKut.js";
4
- import { N as q } from "./NumberInput-B_5xNEia.js";
5
- import { V as Z } from "./ValueSwitch-Dbi9Zyo3.js";
6
- const Se = {
7
- name: "Tooltip",
8
- props: {
9
- text: {
10
- type: String,
11
- required: !0
12
- }
13
- }
14
- }, Ce = { class: "tooltip" }, Oe = {
15
- key: 0,
16
- class: "text"
17
- };
18
- function Ge(e, t, a, n, i, r) {
19
- return m(), E("div", Ce, [
20
- Te(e.$slots, "default", {}, void 0, !0),
21
- a.text ? (m(), E("span", Oe, O(a.text), 1)) : B("", !0)
22
- ]);
23
- }
24
- const ke = /* @__PURE__ */ H(Se, [["render", Ge], ["__scopeId", "data-v-64e1cb84"]]), Q = (e, t) => ({
25
- negative: e,
26
- years: parseInt(t[1] ?? "0", 10),
27
- months: parseInt(t[2] ?? "0", 10),
28
- weeks: parseInt(t[3] ?? "0", 10),
29
- days: parseInt(t[4] ?? "0", 10)
30
- }), ee = (e, t) => {
31
- const a = parseInt(t[4]?.padEnd(3, "0") ?? "0", 10);
32
- return {
33
- negative: e,
34
- hours: parseInt(t[1] ?? "0", 10),
35
- minutes: parseInt(t[2] ?? "0", 10),
36
- seconds: parseInt(t[3] ?? "0", 10),
37
- milliseconds: a
38
- };
39
- }, 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, V = (e) => {
40
- let t = "P";
41
- 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;
42
- }, P = (e) => {
43
- const t = (n, i) => n === 0 ? "" : n === 1 ? `${n} ${i} ` : `${n} ${i}s `;
44
- let a = "";
45
- if (e.type === "DATE") {
46
- if (z(e))
47
- return "0 days";
48
- a += t(e.interval.years, "year"), a += t(e.interval.months, "month"), a += t(e.interval.weeks, "week"), a += t(e.interval.days, "day");
49
- } else {
50
- if (z(e))
51
- return "0 seconds";
52
- a += t(e.interval.hours, "hour"), a += t(e.interval.minutes, "minute");
53
- const n = e.interval.milliseconds === 0;
54
- (e.interval.seconds !== 0 || !n) && (n ? a += t(e.interval.seconds, "second") : a += `${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")} seconds `);
55
- }
56
- return e.interval.negative && (a = `-(${a.trim()})`), a.trim();
57
- }, te = "(\\d+)\\s*y(?:ears?)?", ae = "(\\d+)\\s*m(?:o(?:nths?)?)?", ne = "(\\d+)\\s*w(?:eeks?)?", se = "(\\d+)\\s*d(?:ays?)?", le = "(\\d+)\\s*h(?:ours?)?", oe = "(\\d+)\\s*m(?:in(?:s|utes?)?)?", re = "(\\d+)(?:[,.](\\d{1,3}))?\\s*s(?:ec(?:s|onds?)?)?", ie = new RegExp(
58
- `^(?:${te})?\\s*(?:${ae})?\\s*(?:${ne})?\\s*(?:${se})?\\s*$`,
59
- "i"
60
- ), de = new RegExp(
61
- `^(?:${le})?\\s*(?:${oe})?\\s*(?:${re})?$`,
62
- "i"
63
- ), Be = new RegExp(
64
- `^\\s*-\\s*\\(\\s*${ie.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
65
- "i"
66
- ), Fe = new RegExp(
67
- `^\\s*-\\s*(?:\\s*${te}|${ae}|${ne}|${se})\\s*$`,
68
- "i"
69
- ), He = new RegExp(
70
- `^\\s*-\\s*\\(\\s*${de.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
71
- "i"
72
- ), Ue = new RegExp(
73
- `^\\s*-\\s*(?:\\s*${le}|${oe}|${re})\\s*$`,
74
- "i"
75
- ), ue = (e) => {
76
- if (e = e?.trim(), !e)
77
- throw new Error("Empty interval string");
78
- const t = ie.exec(e), a = Be.exec(e) ?? Fe.exec(e), n = de.exec(e), i = He.exec(e) ?? Ue.exec(e), r = t ?? a, d = n ?? i, I = (a ?? i) !== null;
79
- if (d && r)
80
- throw new Error("Ambiguous time format");
81
- if (r)
82
- return {
83
- type: "DATE",
84
- interval: Q(I, r)
85
- };
86
- if (d)
87
- return {
88
- type: "TIME",
89
- interval: ee(I, d)
90
- };
91
- throw new Error(`Invalid human readable time: ${e}`);
92
- }, ce = (e, t) => {
93
- try {
94
- const a = ue(e), n = a.type, i = a.interval.negative;
95
- if (n === t || t === "DATE_OR_TIME")
96
- return {
97
- valid: !0,
98
- type: n,
99
- negative: i
100
- };
101
- } catch {
102
- return { valid: !1 };
103
- }
104
- }, y = (e) => {
105
- if (e = e?.trim(), ["", "P", "PT", "-", "-P", "-PT"].includes(e))
106
- throw new Error("Empty ISO duration");
107
- const t = /^-?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?$/, a = /^-?PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)(?:[,.](\d{1,3}))?S)?$/, n = t.exec(e), i = a.exec(e);
108
- if (n)
109
- return {
110
- type: "DATE",
111
- interval: Q(
112
- e.startsWith("-"),
113
- n
114
- )
115
- };
116
- if (i)
117
- return {
118
- type: "TIME",
119
- interval: ee(
120
- e.startsWith("-"),
121
- i
122
- )
123
- };
124
- throw new Error(`Invalid ISO duration: ${e}`);
125
- }, ve = (e, t) => {
126
- try {
127
- const a = y(e), n = a.type, i = a.interval.negative;
128
- if (n === t || t === "DATE_OR_TIME")
129
- return {
130
- valid: !0,
131
- type: n,
132
- negative: i
133
- };
134
- } catch {
135
- return { valid: !1 };
136
- }
137
- }, Ke = (e) => {
138
- const t = ve(e, "DATE_OR_TIME"), a = ce(
139
- e,
140
- "DATE_OR_TIME"
141
- );
142
- if (t.valid)
143
- return y(e);
144
- if (a.valid)
145
- return ue(e);
146
- throw new Error(`Invalid interval string: ${e}`);
147
- }, S = (e, t) => {
148
- const a = ve(e, t), n = ce(e, t);
149
- return a.valid ? a : n.valid ? n : { valid: !1 };
150
- }, Xe = {
151
- xmlns: "http://www.w3.org/2000/svg",
152
- fill: "none",
153
- stroke: "#000",
154
- "stroke-linejoin": "round",
155
- viewBox: "0 0 32 32"
156
- };
157
- function We(e, t) {
158
- return m(), E("svg", Xe, [...t[0] || (t[0] = [
159
- v("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)
160
- ])]);
161
- }
162
- const qe = { render: We }, L = [
163
- "years",
164
- "months",
165
- "weeks",
166
- "days"
167
- ], Y = [
168
- "hours",
169
- "minutes",
170
- "seconds",
171
- "milliseconds"
172
- ], x = {
173
- years: { min: 0, max: Number.MAX_SAFE_INTEGER },
174
- months: { min: 0, max: Number.MAX_SAFE_INTEGER },
175
- weeks: { min: 0, max: Number.MAX_SAFE_INTEGER },
176
- days: { min: 0, max: Number.MAX_SAFE_INTEGER },
177
- hours: { min: 0, max: Number.MAX_SAFE_INTEGER },
178
- minutes: { min: 0, max: Number.MAX_SAFE_INTEGER },
179
- seconds: { min: 0, max: Number.MAX_SAFE_INTEGER },
180
- milliseconds: { min: 0, max: 999 }
181
- }, j = (e, t) => t === "DATE" ? {
182
- type: "DATE",
183
- interval: e.periodPart
184
- } : {
185
- type: "TIME",
186
- interval: e.durationPart
187
- }, w = (e, t) => e.type === "DATE" ? {
188
- ...t,
189
- periodPart: e.interval
190
- } : {
191
- ...t,
192
- durationPart: e.interval
193
- }, C = (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), Ze = { class: "header" }, ze = { class: "ascending-descending-switch-container" }, Le = { class: "input-grid" }, Ye = { class: "input-label" }, je = { class: "input-label" }, Je = { class: "accept-controls" }, Qe = /* @__PURE__ */ F({
194
- __name: "IntervalInputPopoverContent",
195
- props: /* @__PURE__ */ k({
196
- format: {},
197
- allowDescending: { type: Boolean }
198
- }, {
199
- usedFormat: {
200
- required: !0
201
- },
202
- usedFormatModifiers: {},
203
- modelValue: {
204
- required: !0
205
- },
206
- modelModifiers: {}
207
- }),
208
- emits: /* @__PURE__ */ k(["commit"], ["update:usedFormat", "update:modelValue"]),
209
- setup(e, { emit: t }) {
210
- const a = t, n = e, i = G(e, "usedFormat"), r = G(e, "modelValue"), d = R(() => {
211
- const p = i.value === "DATE" ? L : Y, u = i.value === "DATE" ? p.map(
212
- (l) => r.value.periodPart[l]
213
- ) : p.map(
214
- (l) => r.value.durationPart[l]
215
- );
216
- for (let l = 0; l < u.length; l++) {
217
- const g = p[l], _ = u[l];
218
- if (isNaN(_) || _ < x[g].min || _ > x[g].max)
219
- return {
220
- valid: !1,
221
- reason: `${C(g)} out of bounds.`
222
- };
223
- }
224
- return { valid: !0 };
225
- }), I = R({
226
- get() {
227
- return n.allowDescending ? i.value === "DATE" ? r.value.periodPart.negative ? "DESCENDING" : "ASCENDING" : r.value.durationPart.negative ? "DESCENDING" : "ASCENDING" : "ASCENDING";
228
- },
229
- set(p) {
230
- r.value.periodPart.negative = p === "DESCENDING", r.value.durationPart.negative = p === "DESCENDING";
231
- }
232
- }), D = () => {
233
- a(
234
- "commit",
235
- i.value,
236
- r.value,
237
- I.value
238
- );
239
- };
240
- return (p, u) => (m(), E(N, null, [
241
- v("span", Ze, [
242
- u[2] || (u[2] = v("span", { class: "input-title" }, "Interval", -1)),
243
- n.format === "DATE_OR_TIME" ? (m(), J(Z, {
244
- key: 0,
245
- modelValue: i.value,
246
- "onUpdate:modelValue": u[0] || (u[0] = (l) => i.value = l),
247
- "possible-values": [
248
- { id: "DATE", text: "Date" },
249
- { id: "TIME", text: "Time" }
250
- ],
251
- compact: ""
252
- }, null, 8, ["modelValue"])) : B("", !0)
253
- ]),
254
- $(v("div", ze, [
255
- h(Z, {
256
- modelValue: I.value,
257
- "onUpdate:modelValue": u[1] || (u[1] = (l) => I.value = l),
258
- compact: "",
259
- "possible-values": [
260
- { id: "ASCENDING", text: "Forward" },
261
- { id: "DESCENDING", text: "Backward" }
262
- ]
263
- }, null, 8, ["modelValue"])
264
- ], 512), [
265
- [b, e.allowDescending]
266
- ]),
267
- v("div", Le, [
268
- (m(!0), E(N, null, K(c(L), (l) => $((m(), E("span", {
269
- key: l,
270
- class: "labeled-date-time-input"
271
- }, [
272
- v("span", Ye, O(c(C)(l)), 1),
273
- h(q, {
274
- modelValue: r.value.periodPart[l],
275
- "onUpdate:modelValue": (g) => r.value.periodPart[l] = g,
276
- min: c(x)[l].min,
277
- max: c(x)[l].max,
278
- compact: "",
279
- type: "integer"
280
- }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max"])
281
- ], 512)), [
282
- [b, i.value === "DATE"]
283
- ])), 128)),
284
- (m(!0), E(N, null, K(c(Y), (l) => $((m(), E("span", {
285
- key: l,
286
- class: "labeled-date-time-input"
287
- }, [
288
- v("span", je, O(c(C)(l)), 1),
289
- h(q, {
290
- "model-value": r.value.durationPart[l],
291
- min: c(x)[l].min,
292
- max: c(x)[l].max,
293
- compact: "",
294
- type: "integer",
295
- "onUpdate:modelValue": (g) => {
296
- r.value.durationPart[l] = g;
297
- }
298
- }, null, 8, ["model-value", "min", "max", "onUpdate:modelValue"])
299
- ], 512)), [
300
- [b, i.value === "TIME"]
301
- ])), 128))
302
- ]),
303
- v("div", Je, [
304
- h(ke, {
305
- text: d.value.valid ? "" : d.value.reason
306
- }, {
307
- default: X(() => [
308
- h(Me, {
309
- primary: "",
310
- disabled: !d.value.valid,
311
- onClick: D
312
- }, {
313
- default: X(() => [...u[3] || (u[3] = [
314
- he(" Set ", -1)
315
- ])]),
316
- _: 1
317
- }, 8, ["disabled"])
318
- ]),
319
- _: 1
320
- }, 8, ["text"])
321
- ])
322
- ], 64));
323
- }
324
- }), et = /* @__PURE__ */ H(Qe, [["__scopeId", "data-v-a372cf12"]]), tt = { class: "input-fields" }, at = ["disabled", "placeholder"], nt = {
325
- key: 0,
326
- class: "invalid-marker"
327
- }, st = ["disabled"], lt = {}, ot = /* @__PURE__ */ F({
328
- ...lt,
329
- __name: "IntervalInput",
330
- props: /* @__PURE__ */ k({
331
- format: { default: "DATE_OR_TIME" },
332
- allowDescending: { type: Boolean, default: !0 },
333
- disabled: { type: Boolean, default: !1 },
334
- compact: { type: Boolean, default: !1 }
335
- }, {
336
- modelValue: {
337
- required: !0
338
- },
339
- modelModifiers: {}
340
- }),
341
- emits: ["update:modelValue"],
342
- setup(e) {
343
- const t = e, a = G(e, "modelValue"), n = T(
344
- (() => {
345
- if (t.format === "DATE_OR_TIME") {
346
- const o = S(
347
- a.value,
348
- "DATE_OR_TIME"
349
- );
350
- return o.valid ? o.type : "DATE";
351
- } else
352
- return t.format;
353
- })()
354
- ), i = R(() => n.value === "DATE" ? "ISO-8601, whole words (1 year), single letters (1y)" : "ISO-8601, whole words (1 hour), single letters (1h)"), r = T(
355
- (() => {
356
- const o = y(
357
- a.value
358
- );
359
- return w(o, {
360
- periodPart: {
361
- negative: !1,
362
- years: 0,
363
- months: 0,
364
- weeks: 0,
365
- days: 1
366
- },
367
- durationPart: {
368
- negative: !1,
369
- hours: 0,
370
- minutes: 0,
371
- seconds: 1,
372
- milliseconds: 0
373
- }
374
- });
375
- })()
376
- ), d = T(
377
- P(
378
- y(a.value)
379
- )
380
- ), I = R(() => {
381
- const o = S(
382
- d.value,
383
- "DATE_OR_TIME"
384
- );
385
- return o.valid && (t.allowDescending || !o.negative) && (o.type === n.value || t.format === "DATE_OR_TIME");
386
- }), D = T(null), p = T(null), u = T(null), l = (o, s) => {
387
- const f = j(
388
- o,
389
- s
390
- );
391
- d.value = P(f), a.value = V(f), n.value = s, r.value = o;
392
- }, g = () => {
393
- r.value = w(
394
- y(a.value),
395
- r.value
396
- );
397
- }, _ = (o) => {
398
- const s = S(
399
- o,
400
- "DATE_OR_TIME"
401
- );
402
- if (!s.valid || !t.allowDescending && s.negative || s.type !== n.value && t.format !== "DATE_OR_TIME")
403
- return;
404
- const f = Ke(
405
- o
406
- );
407
- r.value = w(
408
- f,
409
- r.value
410
- ), a.value = V(f), n.value = s.type, d.value = P(f);
411
- }, me = (o) => {
412
- const s = y(o);
413
- d.value = P(s), r.value = w(
414
- s,
415
- r.value
416
- ), a.value = o;
417
- }, pe = (o) => {
418
- const s = j(
419
- r.value,
420
- o
421
- );
422
- d.value = P(s), a.value = V(s), n.value = o;
423
- }, fe = (o) => {
424
- o !== "DATE_OR_TIME" && pe(o);
425
- }, M = T(!1);
426
- W(() => t.format, fe), W(a, me);
427
- const U = (o) => {
428
- _(o);
429
- }, A = (o, s) => {
430
- o && s ? l(
431
- s.popoverValues,
432
- s.usedFormat
433
- ) : g(), M.value = !1;
434
- };
435
- Pe(D, () => A(!1), {
436
- ignore: [p]
437
- }), $e("Escape", () => A(!1));
438
- const { floatingStyles: Ee, update: ge } = Ae(p, D, {
439
- middleware: [
440
- be(),
441
- // move left/right to keep it on screen
442
- Ne({
443
- // flip it vertically to keep it on screen
444
- mainAxis: !0,
445
- crossAxis: !1
446
- }),
447
- Ve({
448
- // move it a bit away from the button vertically
449
- mainAxis: 2,
450
- // vertical
451
- crossAxis: 0
452
- // horizontal
453
- })
454
- ],
455
- placement: "top-end",
456
- whileElementsMounted: we
457
- });
458
- return (o, s) => (m(), E("div", null, [
459
- v("div", {
460
- class: xe(["wrapper", { disabled: e.disabled, compact: e.compact }])
461
- }, [
462
- v("span", tt, [
463
- $(v("input", {
464
- ref_key: "inputTextFieldRef",
465
- ref: u,
466
- "onUpdate:modelValue": s[0] || (s[0] = (f) => d.value = f),
467
- type: "text",
468
- disabled: e.disabled,
469
- placeholder: i.value,
470
- spellcheck: "false",
471
- onFocus: s[1] || (s[1] = (f) => M.value = !1),
472
- onFocusout: s[2] || (s[2] = () => U(d.value)),
473
- onKeypress: s[3] || (s[3] = ye(() => U(d.value), ["enter"]))
474
- }, null, 40, at), [
475
- [De, d.value]
476
- ]),
477
- I.value ? B("", !0) : (m(), E("span", nt)),
478
- v("button", {
479
- ref_key: "togglePopoverButtonRef",
480
- ref: p,
481
- class: "trigger-popover-button",
482
- disabled: e.disabled,
483
- onClick: s[4] || (s[4] = () => {
484
- M.value ? A(!1) : (M.value = !0, c(ge)());
485
- })
486
- }, [
487
- h(c(qe))
488
- ], 8, st)
489
- ])
490
- ], 2),
491
- $(v("div", {
492
- ref_key: "durationInputPopoverRef",
493
- ref: D,
494
- class: "control-popup",
495
- style: _e(c(Ee))
496
- }, [
497
- h(et, {
498
- "model-value": r.value,
499
- "used-format": n.value,
500
- format: t.format,
501
- "allow-descending": t.allowDescending,
502
- onCommit: s[5] || (s[5] = (f, Ie, it) => A(!0, {
503
- usedFormat: f,
504
- popoverValues: Ie
505
- }))
506
- }, null, 8, ["model-value", "used-format", "format", "allow-descending"])
507
- ], 4), [
508
- [b, M.value]
509
- ])
510
- ]));
511
- }
512
- }), rt = /* @__PURE__ */ H(ot, [["__scopeId", "data-v-f37d874a"]]), pt = /* @__PURE__ */ F({
513
- __name: "IntervalControl",
514
- props: {
515
- control: {},
516
- handleChange: { type: Function },
517
- changeValue: { type: Function },
518
- disabled: { type: Boolean },
519
- isValid: { type: Boolean },
520
- onRegisterValidation: { type: Function },
521
- labelForId: {}
522
- },
523
- setup(e) {
524
- const t = e, a = R(
525
- () => t.control.uischema
526
- ), n = Re(
527
- a,
528
- "intervalType",
529
- "DATE_OR_TIME"
530
- );
531
- return (i, r) => (m(), J(c(rt), {
532
- id: e.labelForId,
533
- compact: "",
534
- disabled: e.disabled,
535
- "model-value": e.control.data,
536
- format: c(n),
537
- "onUpdate:modelValue": e.changeValue
538
- }, null, 8, ["id", "disabled", "model-value", "format", "onUpdate:modelValue"]));
539
- }
540
- });
541
- export {
542
- pt as default
543
- };
@@ -1,56 +0,0 @@
1
- import { defineComponent as N, computed as m, openBlock as V, createBlock as b, unref as x } from "vue";
2
- import { u as y } from "./useBuiltinValidations-pCxT7o8_.js";
3
- import { N as E } from "./NumberInput-B_5xNEia.js";
4
- const F = 1, h = 0.1, S = /* @__PURE__ */ N({
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(t) {
17
- const o = t, u = m(
18
- () => o.control.uischema.options?.stepSize ?? (o.type === "integer" ? F : h)
19
- ), d = ({ min: a, isExclusive: n }) => (e) => isNaN(e) || (n ? e > a : e >= a), r = ({ max: a, isExclusive: n }) => (e) => isNaN(e) || (n ? e < a : e <= a), p = y(
20
- {
21
- min: d,
22
- max: r
23
- },
24
- o
25
- ), i = m(() => p.value.min), s = m(() => p.value.max), f = () => {
26
- const a = o.control.data, n = typeof a != "number" || isNaN(a);
27
- let e = n ? 0 : null;
28
- const v = n ? 0 : a;
29
- if (i.value && !d(i.value)(v)) {
30
- const { min: l, isExclusive: c } = i.value;
31
- c ? e = l + u.value : e = l;
32
- } else if (s.value && !r(s.value)(v)) {
33
- const { max: l, isExclusive: c } = s.value;
34
- c ? e = l - u.value : e = l;
35
- }
36
- e !== null && o.changeValue(e);
37
- };
38
- return (a, n) => (V(), b(x(E), {
39
- id: t.labelForId,
40
- class: "number-input",
41
- disabled: t.disabled,
42
- "model-value": t.control.data,
43
- type: t.type,
44
- min: i.value?.min,
45
- max: s.value?.max,
46
- step: u.value,
47
- "is-valid": t.isValid,
48
- compact: "",
49
- "onUpdate:modelValue": t.changeValue,
50
- onFocusout: f
51
- }, null, 8, ["id", "disabled", "model-value", "type", "min", "max", "step", "is-valid", "onUpdate:modelValue"]));
52
- }
53
- });
54
- export {
55
- S as _
56
- };