@knime/jsonforms 1.21.13 → 1.21.15
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.
- package/CHANGELOG.md +12 -0
- package/dist/{AnyOfTwinlist-RYrVJHV_.js → AnyOfTwinlist-CV39JeCp.js} +1 -1
- package/dist/{CheckboxControl-BZQzU-Kr.js → CheckboxControl-CS4nuJTP.js} +1 -1
- package/dist/{CheckboxesControl-BwtY2fOR.js → CheckboxesControl-DXJMkZ49.js} +2 -2
- package/dist/{ColorControl-CpETHjy6.js → ColorControl-CpBVJh38.js} +1 -1
- package/dist/{ColorPreviewControl-3_H8I1ri.js → ColorPreviewControl-0VK3OqwY.js} +1 -1
- package/dist/{ComboBoxControl-DqRfhSYY.js → ComboBoxControl-avfNedsG.js} +4 -4
- package/dist/DateControl-B8E0JEIV.js +42 -0
- package/dist/DateTimeControl-DPjGzRqg.js +78 -0
- package/dist/{DateTimeFormatPickerControl-8pdgRAZx.js → DateTimeFormatPickerControl-Cx3yfT3O.js} +1 -1
- package/dist/DateTimeFormatPickerWithTypeControl-CodEVQG_.js +586 -0
- package/dist/{DropdownControl-BRwJh-oy.js → DropdownControl-DEggcwK1.js} +2 -2
- package/dist/{ExecutorCoresControl-iOlO4K2q.js → ExecutorCoresControl-CvCVcaHM.js} +1 -1
- package/dist/{ExecutorMemoryControl-BtEuJKmI.js → ExecutorMemoryControl-CpbVJNq4.js} +1 -1
- package/dist/{FileUploadControl-Bo7spGQA.js → FileUploadControl-CNUi9QfR.js} +21 -21
- package/dist/{GridSelectionControl-N52hhlRg.js → GridSelectionControl-HV2yNE4R.js} +14 -14
- package/dist/{HorizontalLayout-CdU7c7fd.js → HorizontalLayout-Cqf3hzxv.js} +1 -1
- package/dist/{IntegerControl-CZVvT_hf.js → IntegerControl-Ba5QkLCa.js} +1 -1
- package/dist/IntervalControl-DlLV8RQr.js +48 -0
- package/dist/{LinkControl-CMeBPEW1.js → LinkControl-COH9jvPg.js} +4 -4
- package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-l_tRM6I-.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-Cir2ym2M.js} +5 -5
- package/dist/{ManualTwinlistControl-Lq5T8rQ5.js → ManualTwinlistControl-jJGxlq9j.js} +3 -3
- package/dist/{MultiSelectListBoxControl-CzeR-Wbl.js → MultiSelectListBoxControl-DcWDraNF.js} +12 -12
- package/dist/{MultimodeTwinlistControl-Co2COblq.js → MultimodeTwinlistControl-B-rEhgKQ.js} +1 -1
- package/dist/{MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-BFrN-w7G.js → MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-yhmiIg95.js} +5 -5
- package/dist/{NameFilter-BfYUOZX-.js → NameFilter-BFKNf9cO.js} +1 -1
- package/dist/{NumberControl-D5LeZR7g.js → NumberControl-BAxGZy_4.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-yBfQ2lTo.js → NumberControlBase.vue_vue_type_script_setup_true_lang-Dlxx71hk.js} +2 -2
- package/dist/{OneOfDropdown-DkXPGVGA.js → OneOfDropdown-DcetHKT5.js} +4 -4
- package/dist/{RadioButtonsWithDescriptionControl-BZEiPIT7.js → RadioButtonsWithDescriptionControl-pZ0gJ6iz.js} +4 -4
- package/dist/{RadioControl-BM8jzumR.js → RadioControl-B8-nxddP.js} +1 -1
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-DEZ-BDbe.js → RadioControlBase.vue_vue_type_script_setup_true_lang-8xWE-iQR.js} +8 -8
- package/dist/ResourceControlBase-ZMTuwwL2.js +86 -0
- package/dist/{RichTextControl-BSDuXS-r.js → RichTextControl-kptCYz2A.js} +5874 -4964
- package/dist/{SectionHeading-CQPP2Ldw.js → SectionHeading-MlqCj5BS.js} +1 -1
- package/dist/{SectionLayout-DVSBUJWh.js → SectionLayout-nV1GnghP.js} +3 -3
- package/dist/SettingsSubPanel-Z6urYwz1.js +5 -0
- package/dist/{SettingsSubPanelLayout-BGGUILX0.js → SettingsSubPanelLayout-BNMJbUsL.js} +4 -4
- package/dist/{SimpleButtonControl-CrZYDy2d.js → SimpleButtonControl-DZFYl2H3.js} +8 -8
- package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-zrzBlOHh.js +27089 -0
- package/dist/{SimpleTwinlistControl-DNXi9aTL.js → SimpleTwinlistControl-Ds2BQOoO.js} +2 -2
- package/dist/{SingleSelectControl-UgYnjUWO.js → SingleSelectControl-CLv_Mah-.js} +2 -2
- package/dist/{SingleSelectListBoxControl-CxkgaK13.js → SingleSelectListBoxControl-DM_5t3Nv.js} +3 -3
- package/dist/{SortListControl-C_ov2UWK.js → SortListControl-COd0WHwd.js} +1 -1
- package/dist/{StyledListItem-CzxxmMCV.js → StyledListItem-D3NbpWl3.js} +1 -1
- package/dist/{TeamAndSpacesControl-D7oS2zYV.js → TeamAndSpacesControl-A8mWrSE4.js} +1 -1
- package/dist/{TeamResourceControl-CYobSLvC.js → TeamResourceControl-CAgwzjRZ.js} +1 -1
- package/dist/{TextAreaControl-AG_b-Z5X.js → TextAreaControl-DRBGqA7a.js} +1 -1
- package/dist/{TextControl-BSEmxN5j.js → TextControl--Tw-AE3y.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-CadH1IKc.js → TextControl.vue_vue_type_script_setup_true_lang-PdbUWJUv.js} +2 -2
- package/dist/TimeControl-D_hEPt2Z.js +69 -0
- package/dist/TimeframesControl-EKcriaC8.js +345 -0
- package/dist/{TwinlistControlBase.vue_vue_type_script_setup_true_lang-SsKJamsg.js → TwinlistControlBase.vue_vue_type_script_setup_true_lang-BRq0ANwm.js} +2 -2
- package/dist/{TypedStringFilter-DAcGj5q1.js → TypedStringFilter-UUuSnJNk.js} +1 -1
- package/dist/{ValueSwitchControl-CXrI8Yl-.js → ValueSwitchControl-BwERUIyr.js} +1 -1
- package/dist/{VerticalLayout-eL6w0Hg9.js → VerticalLayout-BET3pZ_K.js} +2 -2
- package/dist/{VerticalLayoutBase-B9SsD2_6.js → VerticalLayoutBase-HYtDwVLA.js} +1 -1
- package/dist/ZonedDateTimeControl-CsbZwGMX.js +77 -0
- package/dist/{_Uint8Array-Du4fEgNS.js → _Uint8Array-DJimCh8a.js} +5 -7
- package/dist/classApi-CHpAZrj3.js +3328 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/plainDateTimeUtils-CR0UhpkD.js +52 -0
- package/dist/src/composables/usePlainDateTimeBatch.d.ts +31 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/uiComponents/DateControl.vue.d.ts +1 -1
- package/dist/src/uiComponents/DateTimeControl.vue.d.ts +1 -1
- package/dist/src/uiComponents/TimeControl.vue.d.ts +1 -1
- package/dist/src/utils/plainDateTimeUtils.d.ts +66 -0
- package/dist/testing.js +11136 -10284
- package/dist/{toString-Cng8dMI8.js → toString-B8vqfiDe.js} +3 -4
- package/dist/{useBuiltinValidations-CT2mv4JV.js → useBuiltinValidations-CzYsm8oq.js} +1 -1
- package/dist/useDropdownNavigation-CdrbT-CQ.js +2003 -0
- package/dist/usePlainDateTimeBatch-Bd2G-GY9.js +34 -0
- package/dist/{usePossibleValues-DlVd3QMh.js → usePossibleValues-CGt7yrJ6.js} +1 -1
- package/dist/{useUnknownValuesInTwinlist-UbVZb8Wt.js → useUnknownValuesInTwinlist-Bez1tY4_.js} +1 -1
- package/package.json +5 -8
- package/dist/DateControl-Cg1q7qVH.js +0 -35
- package/dist/DateTimeControl-C7EwnT5D.js +0 -44
- package/dist/DateTimeFormatPickerWithTypeControl-oBFnJRkM.js +0 -464
- package/dist/IntervalControl-DW-jmzYH.js +0 -751
- package/dist/ResourceControlBase-Djv2vDNo.js +0 -69
- package/dist/SettingsSubPanel-DKVUGp-Q.js +0 -5
- package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-3pf9Mad5.js +0 -28295
- package/dist/TimeControl-GY-l_p55.js +0 -35
- package/dist/TimePartInput-BGCbCcks.js +0 -254
- package/dist/TimeframesControl-BT_-Fm_A.js +0 -87
- package/dist/Tooltip-Bc8zeqxg.js +0 -24
- package/dist/ValueSwitch-DnpLqjm_.js +0 -130
- package/dist/ZonedDateTimeControl-y5IsH4g_.js +0 -66
- package/dist/_baseIteratee-echQG1Gb.js +0 -308
- package/dist/arrow-dropdown-DMFBPPcK.js +0 -17
- package/dist/floating-ui.vue-Bk6u3tWN.js +0 -1060
- package/dist/localTimeUtils-DlStha9G.js +0 -12315
- package/dist/popper-iehk3xNV.js +0 -923
- package/dist/src/utils/localTimeUtils.d.ts +0 -18
- package/dist/useDropdownNavigation-EOwf_fL0.js +0 -946
|
@@ -1,751 +0,0 @@
|
|
|
1
|
-
import { openBlock as p, createElementBlock as E, createElementVNode as c, resolveComponent as ye, normalizeClass as D, createCommentVNode as F, withModifiers as N, createVNode as I, defineComponent as H, useModel as k, computed as P, Fragment as C, createBlock as te, withDirectives as b, vShow as S, renderList as X, unref as m, toDisplayString as K, withCtx as W, createTextVNode as Ae, mergeModels as G, ref as T, watch as z, withKeys as Me, vModelText as we, normalizeStyle as xe } from "vue";
|
|
2
|
-
import { _ as U, a0 as De, Q as be, a9 as Pe, u as q } from "./SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-3pf9Mad5.js";
|
|
3
|
-
import { u as Re, a as Ne, s as _e, f as Se, o as Ce } from "./floating-ui.vue-Bk6u3tWN.js";
|
|
4
|
-
import { T as $e } from "./Tooltip-Bc8zeqxg.js";
|
|
5
|
-
import { A as Oe } from "./arrow-dropdown-DMFBPPcK.js";
|
|
6
|
-
/* empty css */
|
|
7
|
-
import { V as Z } from "./ValueSwitch-DnpLqjm_.js";
|
|
8
|
-
const ae = (e, t) => ({
|
|
9
|
-
negative: e,
|
|
10
|
-
years: parseInt(t[1] ?? "0", 10),
|
|
11
|
-
months: parseInt(t[2] ?? "0", 10),
|
|
12
|
-
weeks: parseInt(t[3] ?? "0", 10),
|
|
13
|
-
days: parseInt(t[4] ?? "0", 10)
|
|
14
|
-
}), ne = (e, t) => {
|
|
15
|
-
const a = parseInt(t[4]?.padEnd(3, "0") ?? "0", 10);
|
|
16
|
-
return {
|
|
17
|
-
negative: e,
|
|
18
|
-
hours: parseInt(t[1] ?? "0", 10),
|
|
19
|
-
minutes: parseInt(t[2] ?? "0", 10),
|
|
20
|
-
seconds: parseInt(t[3] ?? "0", 10),
|
|
21
|
-
milliseconds: a
|
|
22
|
-
};
|
|
23
|
-
}, Y = (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, $ = (e) => {
|
|
24
|
-
let t = "P";
|
|
25
|
-
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;
|
|
26
|
-
}, x = (e) => {
|
|
27
|
-
const t = (s, u) => s === 0 ? "" : s === 1 ? `${s} ${u} ` : `${s} ${u}s `;
|
|
28
|
-
let a = "";
|
|
29
|
-
if (e.type === "DATE") {
|
|
30
|
-
if (Y(e))
|
|
31
|
-
return "0 days";
|
|
32
|
-
a += t(e.interval.years, "year"), a += t(e.interval.months, "month"), a += t(e.interval.weeks, "week"), a += t(e.interval.days, "day");
|
|
33
|
-
} else {
|
|
34
|
-
if (Y(e))
|
|
35
|
-
return "0 seconds";
|
|
36
|
-
a += t(e.interval.hours, "hour"), a += t(e.interval.minutes, "minute");
|
|
37
|
-
const s = e.interval.milliseconds === 0;
|
|
38
|
-
(e.interval.seconds !== 0 || !s) && (s ? a += t(e.interval.seconds, "second") : a += `${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")} seconds `);
|
|
39
|
-
}
|
|
40
|
-
return e.interval.negative && (a = `-(${a.trim()})`), a.trim();
|
|
41
|
-
}, se = "(\\d+)\\s*y(?:ears?)?", le = "(\\d+)\\s*m(?:o(?:nths?)?)?", re = "(\\d+)\\s*w(?:eeks?)?", ie = "(\\d+)\\s*d(?:ays?)?", oe = "(\\d+)\\s*h(?:ours?)?", ue = "(\\d+)\\s*m(?:in(?:s|utes?)?)?", de = "(\\d+)(?:[,.](\\d{1,3}))?\\s*s(?:ec(?:s|onds?)?)?", ce = new RegExp(
|
|
42
|
-
`^(?:${se})?\\s*(?:${le})?\\s*(?:${re})?\\s*(?:${ie})?\\s*$`,
|
|
43
|
-
"i"
|
|
44
|
-
), me = new RegExp(
|
|
45
|
-
`^(?:${oe})?\\s*(?:${ue})?\\s*(?:${de})?$`,
|
|
46
|
-
"i"
|
|
47
|
-
), Be = new RegExp(
|
|
48
|
-
`^\\s*-\\s*\\(\\s*${ce.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
|
|
49
|
-
"i"
|
|
50
|
-
), ke = new RegExp(
|
|
51
|
-
`^\\s*-\\s*(?:\\s*${se}|${le}|${re}|${ie})\\s*$`,
|
|
52
|
-
"i"
|
|
53
|
-
), Ge = new RegExp(
|
|
54
|
-
`^\\s*-\\s*\\(\\s*${me.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
|
|
55
|
-
"i"
|
|
56
|
-
), Fe = new RegExp(
|
|
57
|
-
`^\\s*-\\s*(?:\\s*${oe}|${ue}|${de})\\s*$`,
|
|
58
|
-
"i"
|
|
59
|
-
), ve = (e) => {
|
|
60
|
-
if (e = e?.trim(), !e)
|
|
61
|
-
throw new Error("Empty interval string");
|
|
62
|
-
const t = ce.exec(e), a = Be.exec(e) ?? ke.exec(e), s = me.exec(e), u = Ge.exec(e) ?? Fe.exec(e), n = t ?? a, d = s ?? u, r = (a ?? u) !== null;
|
|
63
|
-
if (d && n)
|
|
64
|
-
throw new Error("Ambiguous time format");
|
|
65
|
-
if (n)
|
|
66
|
-
return {
|
|
67
|
-
type: "DATE",
|
|
68
|
-
interval: ae(r, n)
|
|
69
|
-
};
|
|
70
|
-
if (d)
|
|
71
|
-
return {
|
|
72
|
-
type: "TIME",
|
|
73
|
-
interval: ne(r, d)
|
|
74
|
-
};
|
|
75
|
-
throw new Error(`Invalid human readable time: ${e}`);
|
|
76
|
-
}, pe = (e, t) => {
|
|
77
|
-
try {
|
|
78
|
-
const a = ve(e), s = a.type, u = a.interval.negative;
|
|
79
|
-
if (s === t || t === "DATE_OR_TIME")
|
|
80
|
-
return {
|
|
81
|
-
valid: !0,
|
|
82
|
-
type: s,
|
|
83
|
-
negative: u
|
|
84
|
-
};
|
|
85
|
-
} catch {
|
|
86
|
-
return { valid: !1 };
|
|
87
|
-
}
|
|
88
|
-
}, y = (e) => {
|
|
89
|
-
if (e = e?.trim(), ["", "P", "PT", "-", "-P", "-PT"].includes(e))
|
|
90
|
-
throw new Error("Empty ISO duration");
|
|
91
|
-
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);
|
|
92
|
-
if (s)
|
|
93
|
-
return {
|
|
94
|
-
type: "DATE",
|
|
95
|
-
interval: ae(
|
|
96
|
-
e.startsWith("-"),
|
|
97
|
-
s
|
|
98
|
-
)
|
|
99
|
-
};
|
|
100
|
-
if (u)
|
|
101
|
-
return {
|
|
102
|
-
type: "TIME",
|
|
103
|
-
interval: ne(
|
|
104
|
-
e.startsWith("-"),
|
|
105
|
-
u
|
|
106
|
-
)
|
|
107
|
-
};
|
|
108
|
-
throw new Error(`Invalid ISO duration: ${e}`);
|
|
109
|
-
}, fe = (e, t) => {
|
|
110
|
-
try {
|
|
111
|
-
const a = y(e), s = a.type, u = a.interval.negative;
|
|
112
|
-
if (s === t || t === "DATE_OR_TIME")
|
|
113
|
-
return {
|
|
114
|
-
valid: !0,
|
|
115
|
-
type: s,
|
|
116
|
-
negative: u
|
|
117
|
-
};
|
|
118
|
-
} catch {
|
|
119
|
-
return { valid: !1 };
|
|
120
|
-
}
|
|
121
|
-
}, He = (e) => {
|
|
122
|
-
const t = fe(e, "DATE_OR_TIME"), a = pe(
|
|
123
|
-
e,
|
|
124
|
-
"DATE_OR_TIME"
|
|
125
|
-
);
|
|
126
|
-
if (t.valid)
|
|
127
|
-
return y(e);
|
|
128
|
-
if (a.valid)
|
|
129
|
-
return ve(e);
|
|
130
|
-
throw new Error(`Invalid interval string: ${e}`);
|
|
131
|
-
}, O = (e, t) => {
|
|
132
|
-
const a = fe(e, t), s = pe(e, t);
|
|
133
|
-
return a.valid ? a : s.valid ? s : { valid: !1 };
|
|
134
|
-
}, Ue = {
|
|
135
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
136
|
-
fill: "none",
|
|
137
|
-
stroke: "#000",
|
|
138
|
-
"stroke-linejoin": "round",
|
|
139
|
-
viewBox: "0 0 32 32"
|
|
140
|
-
};
|
|
141
|
-
function Le(e, t) {
|
|
142
|
-
return p(), E("svg", Ue, [...t[0] || (t[0] = [
|
|
143
|
-
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)
|
|
144
|
-
])]);
|
|
145
|
-
}
|
|
146
|
-
const Xe = { render: Le }, Ke = 200, We = 50, ze = 0.1, qe = 1, Ze = {
|
|
147
|
-
name: "NumberInput",
|
|
148
|
-
components: {
|
|
149
|
-
ArrowIcon: Oe
|
|
150
|
-
},
|
|
151
|
-
props: {
|
|
152
|
-
modelValue: {
|
|
153
|
-
default: 0,
|
|
154
|
-
type: [Number, String],
|
|
155
|
-
validator(e) {
|
|
156
|
-
return typeof e == "string" ? e.toLowerCase().includes("e") : typeof e == "number";
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
id: {
|
|
160
|
-
type: String,
|
|
161
|
-
default: null
|
|
162
|
-
},
|
|
163
|
-
name: {
|
|
164
|
-
type: String,
|
|
165
|
-
default: null
|
|
166
|
-
},
|
|
167
|
-
min: {
|
|
168
|
-
default: Number.MIN_SAFE_INTEGER,
|
|
169
|
-
type: Number
|
|
170
|
-
},
|
|
171
|
-
max: {
|
|
172
|
-
default: Number.MAX_SAFE_INTEGER,
|
|
173
|
-
type: Number
|
|
174
|
-
},
|
|
175
|
-
step: {
|
|
176
|
-
default: null,
|
|
177
|
-
type: Number
|
|
178
|
-
},
|
|
179
|
-
/**
|
|
180
|
-
* Validity controlled by the parent component to be flexible.
|
|
181
|
-
*/
|
|
182
|
-
isValid: {
|
|
183
|
-
default: !0,
|
|
184
|
-
type: Boolean
|
|
185
|
-
},
|
|
186
|
-
/**
|
|
187
|
-
* Sets the significant digit of the spinner input.
|
|
188
|
-
*
|
|
189
|
-
* Possible values: 'double' | 'integer'
|
|
190
|
-
*/
|
|
191
|
-
type: {
|
|
192
|
-
default: "double",
|
|
193
|
-
type: String
|
|
194
|
-
},
|
|
195
|
-
inputClasses: {
|
|
196
|
-
default: "",
|
|
197
|
-
type: String
|
|
198
|
-
},
|
|
199
|
-
disabled: {
|
|
200
|
-
default: !1,
|
|
201
|
-
type: Boolean
|
|
202
|
-
},
|
|
203
|
-
compact: {
|
|
204
|
-
type: Boolean,
|
|
205
|
-
default: !1
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
emits: ["update:modelValue"],
|
|
209
|
-
data() {
|
|
210
|
-
return {
|
|
211
|
-
clicked: !1,
|
|
212
|
-
// false to prevent unintended 'mouseup' or 'mouseleave' events.
|
|
213
|
-
hovered: !1,
|
|
214
|
-
initialValue: 0,
|
|
215
|
-
localValue: "",
|
|
216
|
-
spinnerArrowTimeout: null,
|
|
217
|
-
spinnerArrowInterval: null
|
|
218
|
-
};
|
|
219
|
-
},
|
|
220
|
-
computed: {
|
|
221
|
-
isInteger() {
|
|
222
|
-
return this.type === "integer";
|
|
223
|
-
},
|
|
224
|
-
stepSize() {
|
|
225
|
-
return this.step !== null ? this.step : this.isInteger ? qe : ze;
|
|
226
|
-
},
|
|
227
|
-
inputClassList() {
|
|
228
|
-
let e = this.inputClasses;
|
|
229
|
-
return this.hovered && (e += " hover"), e;
|
|
230
|
-
},
|
|
231
|
-
inputValue() {
|
|
232
|
-
return typeof this.localValue == "number" && isNaN(this.localValue) ? "" : this.isInteger ? this.localValue : this.localValue.toString();
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
watch: {
|
|
236
|
-
modelValue: {
|
|
237
|
-
handler() {
|
|
238
|
-
this.parseValue(this.localValue) !== this.parseValue(this.modelValue) && (this.localValue = this.parseValue(this.modelValue));
|
|
239
|
-
},
|
|
240
|
-
immediate: !0
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
mounted() {
|
|
244
|
-
this.localValue = this.parseValue(this.modelValue), this.initialValue = this.localValue;
|
|
245
|
-
},
|
|
246
|
-
methods: {
|
|
247
|
-
getInputRef() {
|
|
248
|
-
return this.$refs.input;
|
|
249
|
-
},
|
|
250
|
-
parseValue(e) {
|
|
251
|
-
return this.isInteger ? parseInt(e.toString(), 10) : parseFloat(e.toString());
|
|
252
|
-
},
|
|
253
|
-
getParsedValue() {
|
|
254
|
-
return this.parseValue(this.localValue);
|
|
255
|
-
},
|
|
256
|
-
onInput(e) {
|
|
257
|
-
const t = e.target.value;
|
|
258
|
-
e && !t && (e.data === "." || e.data === "-") || (t || (this.getInputRef().value = ""), this.updateAndEmit({ newValue: t }));
|
|
259
|
-
},
|
|
260
|
-
updateAndEmit({ newValue: e }) {
|
|
261
|
-
this.localValue = e, this.$emit("update:modelValue", this.getParsedValue());
|
|
262
|
-
},
|
|
263
|
-
onBlur() {
|
|
264
|
-
this.localValue = this.getParsedValue(), this.getInputRef().valueAsNumber = this.localValue;
|
|
265
|
-
},
|
|
266
|
-
validate(e) {
|
|
267
|
-
let t = !0, a;
|
|
268
|
-
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 };
|
|
269
|
-
},
|
|
270
|
-
/**
|
|
271
|
-
* Change value updates the actual value of the input field if a valid new value
|
|
272
|
-
* can be found. It prevents users from further invalidating the value in the input
|
|
273
|
-
* by moving in the wrong direction (lower than min/higher than max).
|
|
274
|
-
*
|
|
275
|
-
* It will snap to the nearest multiple of the given increment, i.e. initial
|
|
276
|
-
* value 13 incremented by 10 will yield 20.
|
|
277
|
-
*
|
|
278
|
-
* @param {Number} increment - the amount by which to change the current
|
|
279
|
-
* value. If value is 0, no update is performed.
|
|
280
|
-
* @returns {undefined}
|
|
281
|
-
*/
|
|
282
|
-
changeValue(e) {
|
|
283
|
-
if (e === 0)
|
|
284
|
-
return;
|
|
285
|
-
let t = this.getParsedValue();
|
|
286
|
-
this.validate(t).isValid || (t = this.findNearestValidValue(t));
|
|
287
|
-
let a = t + e, s = 1 / Math.abs(e);
|
|
288
|
-
Math.abs(e) < 1 && (s = Math.round(s)), a = Math.round(a * s) / s, this.validate(a).isValid && this.updateAndEmit({ newValue: a });
|
|
289
|
-
},
|
|
290
|
-
findNearestValidValue(e) {
|
|
291
|
-
return e < this.min ? this.min : e > this.max ? this.max : this.initialValue;
|
|
292
|
-
},
|
|
293
|
-
/**
|
|
294
|
-
* This method is the callback handler for mouse events on the input field controls.
|
|
295
|
-
* It is fired when either the up-arrow or down-arrow is pressed by the user. It manages
|
|
296
|
-
* both mousedown and mouseup events. It clears any existing timeouts or intervals which
|
|
297
|
-
* may have been set previously. It also recognizes when the mouse leaves the button
|
|
298
|
-
* (which could cause a mouseup event to be missed) and therefore uses the this.clicked
|
|
299
|
-
* data property to ensure it doesn't get stuck in an interval.
|
|
300
|
-
*
|
|
301
|
-
* @param {Event} e - the DOM event object which triggered the handler.
|
|
302
|
-
* @param {String} type - the type of button pressed (either 'increased' or 'decreased').
|
|
303
|
-
* @returns {undefined}
|
|
304
|
-
*/
|
|
305
|
-
mouseEvent(e, t) {
|
|
306
|
-
if (this.disabled)
|
|
307
|
-
return;
|
|
308
|
-
this.spinnerArrowInterval !== null && clearTimeout(this.spinnerArrowInterval), this.spinnerArrowTimeout !== null && clearInterval(this.spinnerArrowTimeout);
|
|
309
|
-
let a = this.stepSize;
|
|
310
|
-
if (t === "decrease" && (a *= -1), e.type === "mousedown") {
|
|
311
|
-
this.clicked = !0, this.spinnerArrowTimeout = setTimeout(() => {
|
|
312
|
-
this.spinnerArrowInterval = setInterval(() => {
|
|
313
|
-
this.changeValue(a);
|
|
314
|
-
}, We);
|
|
315
|
-
}, Ke);
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
this.clicked && (this.clicked = !1, this.changeValue(a));
|
|
319
|
-
},
|
|
320
|
-
toggleHover() {
|
|
321
|
-
this.hovered = !this.hovered;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}, Ye = ["id", "name", "value", "min", "max", "step", "disabled"], je = {
|
|
325
|
-
key: 0,
|
|
326
|
-
class: "invalid-marker"
|
|
327
|
-
};
|
|
328
|
-
function Qe(e, t, a, s, u, n) {
|
|
329
|
-
const d = ye("ArrowIcon");
|
|
330
|
-
return p(), E("div", {
|
|
331
|
-
class: D(["wrapper", { disabled: a.disabled, compact: a.compact }])
|
|
332
|
-
}, [
|
|
333
|
-
c("input", {
|
|
334
|
-
id: a.id,
|
|
335
|
-
ref: "input",
|
|
336
|
-
name: a.name,
|
|
337
|
-
type: "number",
|
|
338
|
-
role: "spinButton",
|
|
339
|
-
value: n.inputValue,
|
|
340
|
-
min: a.min,
|
|
341
|
-
max: a.max,
|
|
342
|
-
step: n.stepSize,
|
|
343
|
-
class: D(n.inputClassList),
|
|
344
|
-
disabled: a.disabled,
|
|
345
|
-
onInput: t[0] || (t[0] = (r) => n.onInput(r)),
|
|
346
|
-
onBlur: t[1] || (t[1] = (...r) => n.onBlur && n.onBlur(...r)),
|
|
347
|
-
onMouseenter: t[2] || (t[2] = (...r) => n.toggleHover && n.toggleHover(...r)),
|
|
348
|
-
onMouseleave: t[3] || (t[3] = (...r) => n.toggleHover && n.toggleHover(...r))
|
|
349
|
-
}, null, 42, Ye),
|
|
350
|
-
a.isValid ? F("", !0) : (p(), E("span", je)),
|
|
351
|
-
c("span", {
|
|
352
|
-
class: D(["increase", { disabled: a.disabled }]),
|
|
353
|
-
onMousedown: t[4] || (t[4] = N((r) => n.mouseEvent(r, "increase"), ["prevent"])),
|
|
354
|
-
onMouseup: t[5] || (t[5] = N((r) => n.mouseEvent(r, "increase"), ["prevent"])),
|
|
355
|
-
onMouseleave: t[6] || (t[6] = (r) => n.mouseEvent(r, "increase"))
|
|
356
|
-
}, [
|
|
357
|
-
I(d)
|
|
358
|
-
], 34),
|
|
359
|
-
c("span", {
|
|
360
|
-
class: D(["decrease", { disabled: a.disabled }]),
|
|
361
|
-
onMousedown: t[7] || (t[7] = N((r) => n.mouseEvent(r, "decrease"), ["prevent"])),
|
|
362
|
-
onMouseup: t[8] || (t[8] = N((r) => n.mouseEvent(r, "decrease"), ["prevent"])),
|
|
363
|
-
onMouseleave: t[9] || (t[9] = (r) => n.mouseEvent(r, "decrease"))
|
|
364
|
-
}, [
|
|
365
|
-
I(d)
|
|
366
|
-
], 34)
|
|
367
|
-
], 2);
|
|
368
|
-
}
|
|
369
|
-
const j = /* @__PURE__ */ U(Ze, [["render", Qe], ["__scopeId", "data-v-0ce77f1e"]]), Q = [
|
|
370
|
-
"years",
|
|
371
|
-
"months",
|
|
372
|
-
"weeks",
|
|
373
|
-
"days"
|
|
374
|
-
], J = [
|
|
375
|
-
"hours",
|
|
376
|
-
"minutes",
|
|
377
|
-
"seconds",
|
|
378
|
-
"milliseconds"
|
|
379
|
-
], V = {
|
|
380
|
-
years: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
381
|
-
months: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
382
|
-
weeks: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
383
|
-
days: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
384
|
-
hours: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
385
|
-
minutes: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
386
|
-
seconds: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
387
|
-
milliseconds: { min: 0, max: 999 }
|
|
388
|
-
}, ee = (e, t) => t === "DATE" ? {
|
|
389
|
-
type: "DATE",
|
|
390
|
-
interval: e.periodPart
|
|
391
|
-
} : {
|
|
392
|
-
type: "TIME",
|
|
393
|
-
interval: e.durationPart
|
|
394
|
-
}, _ = (e, t) => e.type === "DATE" ? {
|
|
395
|
-
...t,
|
|
396
|
-
periodPart: e.interval
|
|
397
|
-
} : {
|
|
398
|
-
...t,
|
|
399
|
-
durationPart: e.interval
|
|
400
|
-
}, B = (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), Je = { class: "header" }, et = { class: "ascending-descending-switch-container" }, tt = { class: "input-grid" }, at = { class: "input-label" }, nt = { class: "input-label" }, st = { class: "accept-controls" }, lt = /* @__PURE__ */ H({
|
|
401
|
-
__name: "IntervalInputPopoverContent",
|
|
402
|
-
props: /* @__PURE__ */ G({
|
|
403
|
-
format: {},
|
|
404
|
-
allowDescending: { type: Boolean }
|
|
405
|
-
}, {
|
|
406
|
-
usedFormat: {
|
|
407
|
-
required: !0
|
|
408
|
-
},
|
|
409
|
-
usedFormatModifiers: {},
|
|
410
|
-
modelValue: {
|
|
411
|
-
required: !0
|
|
412
|
-
},
|
|
413
|
-
modelModifiers: {}
|
|
414
|
-
}),
|
|
415
|
-
emits: /* @__PURE__ */ G(["commit"], ["update:usedFormat", "update:modelValue"]),
|
|
416
|
-
setup(e, { emit: t }) {
|
|
417
|
-
const a = t, s = e, u = k(e, "usedFormat"), n = k(e, "modelValue"), d = P(() => {
|
|
418
|
-
const f = u.value === "DATE" ? Q : J, v = u.value === "DATE" ? f.map(
|
|
419
|
-
(i) => n.value.periodPart[i]
|
|
420
|
-
) : f.map(
|
|
421
|
-
(i) => n.value.durationPart[i]
|
|
422
|
-
);
|
|
423
|
-
for (let i = 0; i < v.length; i++) {
|
|
424
|
-
const g = f[i], M = v[i];
|
|
425
|
-
if (isNaN(M) || M < V[g].min || M > V[g].max)
|
|
426
|
-
return {
|
|
427
|
-
valid: !1,
|
|
428
|
-
reason: `${B(g)} out of bounds.`
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
return { valid: !0 };
|
|
432
|
-
}), r = P({
|
|
433
|
-
get() {
|
|
434
|
-
return s.allowDescending ? u.value === "DATE" ? n.value.periodPart.negative ? "DESCENDING" : "ASCENDING" : n.value.durationPart.negative ? "DESCENDING" : "ASCENDING" : "ASCENDING";
|
|
435
|
-
},
|
|
436
|
-
set(f) {
|
|
437
|
-
n.value.periodPart.negative = f === "DESCENDING", n.value.durationPart.negative = f === "DESCENDING";
|
|
438
|
-
}
|
|
439
|
-
}), A = () => {
|
|
440
|
-
a(
|
|
441
|
-
"commit",
|
|
442
|
-
u.value,
|
|
443
|
-
n.value,
|
|
444
|
-
r.value
|
|
445
|
-
);
|
|
446
|
-
};
|
|
447
|
-
return (f, v) => (p(), E(C, null, [
|
|
448
|
-
c("span", Je, [
|
|
449
|
-
v[2] || (v[2] = c("span", { class: "input-title" }, "Interval", -1)),
|
|
450
|
-
s.format === "DATE_OR_TIME" ? (p(), te(Z, {
|
|
451
|
-
key: 0,
|
|
452
|
-
modelValue: u.value,
|
|
453
|
-
"onUpdate:modelValue": v[0] || (v[0] = (i) => u.value = i),
|
|
454
|
-
"possible-values": [
|
|
455
|
-
{ id: "DATE", text: "Date" },
|
|
456
|
-
{ id: "TIME", text: "Time" }
|
|
457
|
-
],
|
|
458
|
-
compact: ""
|
|
459
|
-
}, null, 8, ["modelValue"])) : F("", !0)
|
|
460
|
-
]),
|
|
461
|
-
b(c("div", et, [
|
|
462
|
-
I(Z, {
|
|
463
|
-
modelValue: r.value,
|
|
464
|
-
"onUpdate:modelValue": v[1] || (v[1] = (i) => r.value = i),
|
|
465
|
-
compact: "",
|
|
466
|
-
"possible-values": [
|
|
467
|
-
{ id: "ASCENDING", text: "Forward" },
|
|
468
|
-
{ id: "DESCENDING", text: "Backward" }
|
|
469
|
-
]
|
|
470
|
-
}, null, 8, ["modelValue"])
|
|
471
|
-
], 512), [
|
|
472
|
-
[S, e.allowDescending]
|
|
473
|
-
]),
|
|
474
|
-
c("div", tt, [
|
|
475
|
-
(p(!0), E(C, null, X(m(Q), (i) => b((p(), E("span", {
|
|
476
|
-
key: i,
|
|
477
|
-
class: "labeled-date-time-input"
|
|
478
|
-
}, [
|
|
479
|
-
c("span", at, K(m(B)(i)), 1),
|
|
480
|
-
I(j, {
|
|
481
|
-
modelValue: n.value.periodPart[i],
|
|
482
|
-
"onUpdate:modelValue": (g) => n.value.periodPart[i] = g,
|
|
483
|
-
min: m(V)[i].min,
|
|
484
|
-
max: m(V)[i].max,
|
|
485
|
-
compact: "",
|
|
486
|
-
type: "integer"
|
|
487
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max"])
|
|
488
|
-
], 512)), [
|
|
489
|
-
[S, u.value === "DATE"]
|
|
490
|
-
])), 128)),
|
|
491
|
-
(p(!0), E(C, null, X(m(J), (i) => b((p(), E("span", {
|
|
492
|
-
key: i,
|
|
493
|
-
class: "labeled-date-time-input"
|
|
494
|
-
}, [
|
|
495
|
-
c("span", nt, K(m(B)(i)), 1),
|
|
496
|
-
I(j, {
|
|
497
|
-
"model-value": n.value.durationPart[i],
|
|
498
|
-
min: m(V)[i].min,
|
|
499
|
-
max: m(V)[i].max,
|
|
500
|
-
compact: "",
|
|
501
|
-
type: "integer",
|
|
502
|
-
"onUpdate:modelValue": (g) => {
|
|
503
|
-
n.value.durationPart[i] = g;
|
|
504
|
-
}
|
|
505
|
-
}, null, 8, ["model-value", "min", "max", "onUpdate:modelValue"])
|
|
506
|
-
], 512)), [
|
|
507
|
-
[S, u.value === "TIME"]
|
|
508
|
-
])), 128))
|
|
509
|
-
]),
|
|
510
|
-
c("div", st, [
|
|
511
|
-
I($e, {
|
|
512
|
-
text: d.value.valid ? "" : d.value.reason
|
|
513
|
-
}, {
|
|
514
|
-
default: W(() => [
|
|
515
|
-
I(De, {
|
|
516
|
-
primary: "",
|
|
517
|
-
disabled: !d.value.valid,
|
|
518
|
-
onClick: A
|
|
519
|
-
}, {
|
|
520
|
-
default: W(() => [...v[3] || (v[3] = [
|
|
521
|
-
Ae(" Set ", -1)
|
|
522
|
-
])]),
|
|
523
|
-
_: 1
|
|
524
|
-
}, 8, ["disabled"])
|
|
525
|
-
]),
|
|
526
|
-
_: 1
|
|
527
|
-
}, 8, ["text"])
|
|
528
|
-
])
|
|
529
|
-
], 64));
|
|
530
|
-
}
|
|
531
|
-
}), rt = /* @__PURE__ */ U(lt, [["__scopeId", "data-v-a372cf12"]]), it = { class: "input-fields" }, ot = ["disabled", "placeholder"], ut = {
|
|
532
|
-
key: 0,
|
|
533
|
-
class: "invalid-marker"
|
|
534
|
-
}, dt = ["disabled"], ct = {}, mt = /* @__PURE__ */ H({
|
|
535
|
-
...ct,
|
|
536
|
-
__name: "IntervalInput",
|
|
537
|
-
props: /* @__PURE__ */ G({
|
|
538
|
-
format: { default: "DATE_OR_TIME" },
|
|
539
|
-
allowDescending: { type: Boolean, default: !0 },
|
|
540
|
-
disabled: { type: Boolean, default: !1 },
|
|
541
|
-
compact: { type: Boolean, default: !1 }
|
|
542
|
-
}, {
|
|
543
|
-
modelValue: {
|
|
544
|
-
required: !0
|
|
545
|
-
},
|
|
546
|
-
modelModifiers: {}
|
|
547
|
-
}),
|
|
548
|
-
emits: ["update:modelValue"],
|
|
549
|
-
setup(e) {
|
|
550
|
-
const t = e, a = k(e, "modelValue"), s = T(
|
|
551
|
-
(() => {
|
|
552
|
-
if (t.format === "DATE_OR_TIME") {
|
|
553
|
-
const o = O(
|
|
554
|
-
a.value,
|
|
555
|
-
"DATE_OR_TIME"
|
|
556
|
-
);
|
|
557
|
-
return o.valid ? o.type : "DATE";
|
|
558
|
-
} else
|
|
559
|
-
return t.format;
|
|
560
|
-
})()
|
|
561
|
-
), u = P(() => s.value === "DATE" ? "ISO-8601, whole words (1 year), single letters (1y)" : "ISO-8601, whole words (1 hour), single letters (1h)"), n = T(
|
|
562
|
-
(() => {
|
|
563
|
-
const o = y(
|
|
564
|
-
a.value
|
|
565
|
-
);
|
|
566
|
-
return _(o, {
|
|
567
|
-
periodPart: {
|
|
568
|
-
negative: !1,
|
|
569
|
-
years: 0,
|
|
570
|
-
months: 0,
|
|
571
|
-
weeks: 0,
|
|
572
|
-
days: 1
|
|
573
|
-
},
|
|
574
|
-
durationPart: {
|
|
575
|
-
negative: !1,
|
|
576
|
-
hours: 0,
|
|
577
|
-
minutes: 0,
|
|
578
|
-
seconds: 1,
|
|
579
|
-
milliseconds: 0
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
})()
|
|
583
|
-
), d = T(
|
|
584
|
-
x(
|
|
585
|
-
y(a.value)
|
|
586
|
-
)
|
|
587
|
-
), r = P(() => {
|
|
588
|
-
const o = O(
|
|
589
|
-
d.value,
|
|
590
|
-
"DATE_OR_TIME"
|
|
591
|
-
);
|
|
592
|
-
return o.valid && (t.allowDescending || !o.negative) && (o.type === s.value || t.format === "DATE_OR_TIME");
|
|
593
|
-
}), A = T(null), f = T(null), v = T(null), i = (o, l) => {
|
|
594
|
-
const h = ee(
|
|
595
|
-
o,
|
|
596
|
-
l
|
|
597
|
-
);
|
|
598
|
-
d.value = x(h), a.value = $(h), s.value = l, n.value = o;
|
|
599
|
-
}, g = () => {
|
|
600
|
-
n.value = _(
|
|
601
|
-
y(a.value),
|
|
602
|
-
n.value
|
|
603
|
-
);
|
|
604
|
-
}, M = (o) => {
|
|
605
|
-
const l = O(
|
|
606
|
-
o,
|
|
607
|
-
"DATE_OR_TIME"
|
|
608
|
-
);
|
|
609
|
-
if (!l.valid || !t.allowDescending && l.negative || l.type !== s.value && t.format !== "DATE_OR_TIME")
|
|
610
|
-
return;
|
|
611
|
-
const h = He(
|
|
612
|
-
o
|
|
613
|
-
);
|
|
614
|
-
n.value = _(
|
|
615
|
-
h,
|
|
616
|
-
n.value
|
|
617
|
-
), a.value = $(h), s.value = l.type, d.value = x(h);
|
|
618
|
-
}, he = (o) => {
|
|
619
|
-
const l = y(o);
|
|
620
|
-
d.value = x(l), n.value = _(
|
|
621
|
-
l,
|
|
622
|
-
n.value
|
|
623
|
-
), a.value = o;
|
|
624
|
-
}, Ee = (o) => {
|
|
625
|
-
const l = ee(
|
|
626
|
-
n.value,
|
|
627
|
-
o
|
|
628
|
-
);
|
|
629
|
-
d.value = x(l), a.value = $(l), s.value = o;
|
|
630
|
-
}, ge = (o) => {
|
|
631
|
-
o !== "DATE_OR_TIME" && Ee(o);
|
|
632
|
-
}, w = T(!1);
|
|
633
|
-
z(() => t.format, ge), z(a, he);
|
|
634
|
-
const L = (o) => {
|
|
635
|
-
M(o);
|
|
636
|
-
}, R = (o, l) => {
|
|
637
|
-
o && l ? i(
|
|
638
|
-
l.popoverValues,
|
|
639
|
-
l.usedFormat
|
|
640
|
-
) : g(), w.value = !1;
|
|
641
|
-
};
|
|
642
|
-
be(A, () => R(!1), {
|
|
643
|
-
ignore: [f]
|
|
644
|
-
}), Pe("Escape", () => R(!1));
|
|
645
|
-
const { floatingStyles: Ie, update: Te } = Re(f, A, {
|
|
646
|
-
middleware: [
|
|
647
|
-
_e(),
|
|
648
|
-
// move left/right to keep it on screen
|
|
649
|
-
Se({
|
|
650
|
-
// flip it vertically to keep it on screen
|
|
651
|
-
mainAxis: !0,
|
|
652
|
-
crossAxis: !1
|
|
653
|
-
}),
|
|
654
|
-
Ce({
|
|
655
|
-
// move it a bit away from the button vertically
|
|
656
|
-
mainAxis: 2,
|
|
657
|
-
// vertical
|
|
658
|
-
crossAxis: 0
|
|
659
|
-
// horizontal
|
|
660
|
-
})
|
|
661
|
-
],
|
|
662
|
-
placement: "top-end",
|
|
663
|
-
whileElementsMounted: Ne
|
|
664
|
-
});
|
|
665
|
-
return (o, l) => (p(), E("div", null, [
|
|
666
|
-
c("div", {
|
|
667
|
-
class: D(["wrapper", { disabled: e.disabled, compact: e.compact }])
|
|
668
|
-
}, [
|
|
669
|
-
c("span", it, [
|
|
670
|
-
b(c("input", {
|
|
671
|
-
ref_key: "inputTextFieldRef",
|
|
672
|
-
ref: v,
|
|
673
|
-
"onUpdate:modelValue": l[0] || (l[0] = (h) => d.value = h),
|
|
674
|
-
type: "text",
|
|
675
|
-
disabled: e.disabled,
|
|
676
|
-
placeholder: u.value,
|
|
677
|
-
spellcheck: "false",
|
|
678
|
-
onFocus: l[1] || (l[1] = (h) => w.value = !1),
|
|
679
|
-
onFocusout: l[2] || (l[2] = () => L(d.value)),
|
|
680
|
-
onKeypress: l[3] || (l[3] = Me(() => L(d.value), ["enter"]))
|
|
681
|
-
}, null, 40, ot), [
|
|
682
|
-
[we, d.value]
|
|
683
|
-
]),
|
|
684
|
-
r.value ? F("", !0) : (p(), E("span", ut)),
|
|
685
|
-
c("button", {
|
|
686
|
-
ref_key: "togglePopoverButtonRef",
|
|
687
|
-
ref: f,
|
|
688
|
-
class: "trigger-popover-button",
|
|
689
|
-
disabled: e.disabled,
|
|
690
|
-
onClick: l[4] || (l[4] = () => {
|
|
691
|
-
w.value ? R(!1) : (w.value = !0, m(Te)());
|
|
692
|
-
})
|
|
693
|
-
}, [
|
|
694
|
-
I(m(Xe))
|
|
695
|
-
], 8, dt)
|
|
696
|
-
])
|
|
697
|
-
], 2),
|
|
698
|
-
b(c("div", {
|
|
699
|
-
ref_key: "durationInputPopoverRef",
|
|
700
|
-
ref: A,
|
|
701
|
-
class: "control-popup",
|
|
702
|
-
style: xe(m(Ie))
|
|
703
|
-
}, [
|
|
704
|
-
I(rt, {
|
|
705
|
-
"model-value": n.value,
|
|
706
|
-
"used-format": s.value,
|
|
707
|
-
format: t.format,
|
|
708
|
-
"allow-descending": t.allowDescending,
|
|
709
|
-
onCommit: l[5] || (l[5] = (h, Ve, pt) => R(!0, {
|
|
710
|
-
usedFormat: h,
|
|
711
|
-
popoverValues: Ve
|
|
712
|
-
}))
|
|
713
|
-
}, null, 8, ["model-value", "used-format", "format", "allow-descending"])
|
|
714
|
-
], 4), [
|
|
715
|
-
[S, w.value]
|
|
716
|
-
])
|
|
717
|
-
]));
|
|
718
|
-
}
|
|
719
|
-
}), vt = /* @__PURE__ */ U(mt, [["__scopeId", "data-v-f37d874a"]]), yt = /* @__PURE__ */ H({
|
|
720
|
-
__name: "IntervalControl",
|
|
721
|
-
props: {
|
|
722
|
-
control: {},
|
|
723
|
-
handleChange: { type: Function },
|
|
724
|
-
changeValue: { type: Function },
|
|
725
|
-
disabled: { type: Boolean },
|
|
726
|
-
isValid: { type: Boolean },
|
|
727
|
-
onRegisterValidation: { type: Function },
|
|
728
|
-
labelForId: {}
|
|
729
|
-
},
|
|
730
|
-
setup(e) {
|
|
731
|
-
const t = e, a = P(
|
|
732
|
-
() => t.control.uischema
|
|
733
|
-
), s = q(
|
|
734
|
-
a,
|
|
735
|
-
"intervalType",
|
|
736
|
-
"DATE_OR_TIME"
|
|
737
|
-
), u = q(a, "allowDescending", !0);
|
|
738
|
-
return (n, d) => (p(), te(m(vt), {
|
|
739
|
-
id: e.labelForId,
|
|
740
|
-
compact: "",
|
|
741
|
-
"allow-descending": m(u),
|
|
742
|
-
disabled: e.disabled,
|
|
743
|
-
"model-value": e.control.data,
|
|
744
|
-
format: m(s),
|
|
745
|
-
"onUpdate:modelValue": e.changeValue
|
|
746
|
-
}, null, 8, ["id", "allow-descending", "disabled", "model-value", "format", "onUpdate:modelValue"]));
|
|
747
|
-
}
|
|
748
|
-
});
|
|
749
|
-
export {
|
|
750
|
-
yt as default
|
|
751
|
-
};
|