@knime/scripting-editor 0.0.127 → 0.0.129
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/dist/{AnyOfTwinlist-C0gjxeQW-C5wsbDLK.js → AnyOfTwinlist-Chx0nmt3-DPMbiVZd.js} +5 -4
- package/dist/{ArrayLayout-U4hs5LA_.js → ArrayLayout-C2-4wxkT.js} +39 -39
- package/dist/{ButtonControl-B8WGWs_m.js → ButtonControl-Dga3IomB.js} +26 -26
- package/dist/CheckboxControl-B8b1Di4k-CEkOsWEu.js +40 -0
- package/dist/CheckboxesControl-DWUnPGdN-BOSX_stf.js +42 -0
- package/dist/CodeEditorControl-CN4ltMvy.js +133 -0
- package/dist/{ColorControl-DeSwgyjS-BW1FBjqa.js → ColorControl-ByE5ku7u-C12pZ0rg.js} +10 -8
- package/dist/ColorPreviewControl-XiKZ4jfn-CLIjX6M_.js +89 -0
- package/dist/ComboBoxControl-zSceYlyZ-BgpAi7q9.js +42 -0
- package/dist/{ConfigurationNodeNotSupported-Bg2W0ik5.js → ConfigurationNodeNotSupported-B27grebd.js} +3 -3
- package/dist/ControlWithSubParameters-ROJGaqDF.js +63 -0
- package/dist/CredentialsControl-B6jczlBv.js +33 -0
- package/dist/CredentialsControlBase-CdNdAngd.js +96 -0
- package/dist/DateControl-BBGpEVpr-yZP_TZnE.js +44 -0
- package/dist/DateTimeControl-CymOURq5-Ca0mT1HW.js +89 -0
- package/dist/DateTimeFormatPickerControl-Bx19jwpr-Bd0xBs4D.js +37 -0
- package/dist/DateTimeFormatPickerWithTypeControl-Byo_0cTq-C0ZfMqtp.js +598 -0
- package/dist/{DialogFileExplorer-Bi0DVFut.js → DialogFileExplorer-BmT2YlVn.js} +2 -2
- package/dist/{DirtyTrackerRenderer-CDcL-lwX.js → DirtyTrackerRenderer-BG451zZD.js} +10 -10
- package/dist/DropdownControl-C6ffVYyf-hy0i8nDV.js +32 -0
- package/dist/DynamicInputControl-W23Zexge.js +6 -0
- package/dist/ExecutorCoresControl-D9FZ-g9O-Dws9IhAs.js +51 -0
- package/dist/ExecutorMemoryControl-__P80Lkb-DxQZ2IuA.js +44 -0
- package/dist/{FileChooserControl-BR84kEXy.js → FileChooserControl-BBbay7zU.js} +4 -3
- package/dist/{FileChooserControlBase-1oayQJzv.js → FileChooserControlBase-DpYYK3eE.js} +147 -143
- package/dist/{FileChooserControlForMultiFile-ChQtkmps.js → FileChooserControlForMultiFile-6NLYZKbt.js} +5 -4
- package/dist/FileUploadControl-DWs4PhOj-BvByW-Tq.js +545 -0
- package/dist/GridSelectionControl-WcJ4y6Fs-BoxSk0VG.js +117 -0
- package/dist/{HorizontalLayout-DwdPdBTW-w5bjgNga.js → HorizontalLayout-ByB5A7X3-BURAMMFG.js} +5 -5
- package/dist/{IntegerControl-D8OzxbRA-D9mR5ahj.js → IntegerControl-aveswmbr-50_b6vGY.js} +5 -4
- package/dist/IntervalControl-B4Eqs1Jf-CiB2D52B.js +51 -0
- package/dist/{LabeledGroup-BzXUTco4.js → LabeledGroup-BONZ_GLo.js} +3 -3
- package/dist/LegacyCredentialsControl-DaIrvNBd.js +88 -0
- package/dist/{LinkControl-BvBBTFCs-DojlONSA.js → LinkControl-DD56lOiw-CDy6OBu8.js} +10 -10
- package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-BLSG6Lpo-CtYj2B6v.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-CscatDmg-BaroyBA0.js} +1 -1
- package/dist/ManualTwinlistControl-DBZ5RZgW-BV5qOGau.js +77 -0
- package/dist/MultiFileChooserControl-cyndOpF7.js +341 -0
- package/dist/{MultiRuleWrapper-TvQw5Kaj.js → MultiRuleWrapper-Db-W_o1f.js} +1 -1
- package/dist/{MultiSelectListBoxControl-nmvLP18g-feO16jJ4.js → MultiSelectListBoxControl-BMsPvxGQ-5ua-fVR8.js} +10 -9
- package/dist/{MultimodeTwinlistControl-yCdeWH2E-DG6GXu0l.js → MultimodeTwinlistControl-thO1be1r-8kc-JSH1.js} +64 -62
- package/dist/{NameFilter-D1TMJydD-Db00pnR3.js → NameFilter-DBMVmZmk-DnB-5f39.js} +7 -6
- package/dist/{NumberControl-uLMOLEbg-B_H33dGY.js → NumberControl-BPVO5l6t--nrQcx4m.js} +8 -7
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-CR61f6d6-Df5EPyns.js +54 -0
- package/dist/OneOfDropdown-DBG8ZcpV-cZs_ptrT.js +36 -0
- package/dist/{RadioButtonsWithDescriptionControl-5M_6G7Qk-BHHWv0Y0.js → RadioButtonsWithDescriptionControl-BsqMTEB5-COGPhNPs.js} +17 -17
- package/dist/RadioControl-ClJmr0EQ-BzjoXaZ3.js +21 -0
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-Bm4EUEvw-Cabfycg_.js +64 -0
- package/dist/ResourceControlBase-CeXYJeR1-DSmxhV0s.js +113 -0
- package/dist/{RichTextControl-D9QD2_uO-OY669heQ.js → RichTextControl-DvYkBpzH-CtMZq2re.js} +7876 -6699
- package/dist/{SectionLayout-DY27pAtG-BIZg0kiA.js → SectionLayout-CwRO3UXc-d5rFpCRN.js} +5 -5
- package/dist/SettingsSubPanelLayout-CV6y2bcX-OzpF07vB.js +64 -0
- package/dist/{SimpleTwinlistControl-P4KEYOq0-97VRLEr4.js → SimpleTwinlistControl-BSON5VYy-BaAaU86G.js} +7 -6
- package/dist/SingleSelectControl-BSqORMYm-CBP_mVGB.js +58 -0
- package/dist/{SingleSelectListBoxControl-oMWH0vEE-Ewf1HUGa.js → SingleSelectListBoxControl-CFdKzbOK-CruT9yt-.js} +14 -13
- package/dist/{SortListControl-4v3T2j_9-BkTlN-H5.js → SortListControl-DZIHeQmn-CKRyT1hN.js} +41 -39
- package/dist/{StringFileChooserControl-BVH5iHNM.js → StringFileChooserControl-Br8gZTku.js} +33 -30
- package/dist/{StyledListItem-D3LSfgGV-B9rTS8WT.js → StyledListItem--sgmJ3W_-Bo6f-_9B.js} +1 -1
- package/dist/{TeamAndSpacesControl-CH5ImByy-aTqgKpBn.js → TeamAndSpacesControl-DiMyDT-5-Br-Lq0ki.js} +21 -20
- package/dist/TeamResourceControl-Bag_dwA1-PdtnhxEi.js +44 -0
- package/dist/{TextAreaControl-CrsZSU_f-CNj59YPm.js → TextAreaControl-B52P0DAa-McfOgZWn.js} +10 -8
- package/dist/TextControl-52n-sttB-DssWw4KP.js +50962 -0
- package/dist/TimeControl-Cu12_qpz-CK1bxhya.js +71 -0
- package/dist/TimeframesControl-DhdC8OS1-DYseJbBV.js +352 -0
- package/dist/TwinlistControlBase.vue_vue_type_script_setup_true_lang-t1I2qxJz-DU6yd1RM.js +45 -0
- package/dist/{TypedStringFilter-ry7fTUTx-CCJRabai.js → TypedStringFilter-zJOICQei-B-5z8atp.js} +7 -6
- package/dist/{ValueSwitchControl-aVx7pUi9-7kuEbp3H.js → ValueSwitchControl-CEVWJH7z-DzuxqLvy.js} +7 -6
- package/dist/{VennDiagramLayout-D8s5yYbT.js → VennDiagramLayout-DyTZ5EJ9.js} +24 -24
- package/dist/{VerticalLayout-Bv-LJOZ0-BTrnMnQu.js → VerticalLayout-D_13xb_m-BfU1M3IE.js} +7 -7
- package/dist/ZonedDateTimeControl-C-vO6fC1-XngmuFqW.js +82 -0
- package/dist/{ai-bar-DLr5A9ZW.js → ai-bar-DDtzX23v.js} +775 -732
- package/dist/classApi-CHpAZrj3-BptMrhKH.js +3328 -0
- package/dist/collection-BBXRVj4b-DhO8c3tP.js +22 -0
- package/dist/collection-BBXRVj4b-DzRZ2FYd-COyFmQqa.js +22 -0
- package/dist/collection-BBXRVj4b-grENCIdl.js +22 -0
- package/dist/main.js +9977 -13304
- package/dist/parameters.js +1 -1
- package/dist/plainDateTimeUtils-CR0UhpkD-DU-LM4_V.js +52 -0
- package/dist/src/components/ScriptingEditor.vue.d.ts +6 -4
- package/dist/src/components/SettingsPage.vue.d.ts +5 -4
- package/dist/src/scripting-service.d.ts +1 -1
- package/dist/useDropdownNavigation-CdrbT-CQ-Dxb_y1Fq.js +2003 -0
- package/dist/{useFileChooserBackend-Bs7hx7xH.js → useFileChooserBackend-CLdJ1RU1.js} +6 -6
- package/dist/usePlainDateTimeBatch-Bd2G-GY9-DO2Zu0Mj.js +34 -0
- package/dist/{usePossibleValues-B-W6u-1T-DcglK6MY.js → usePossibleValues-DiYOmnZW-CaSLjdK-.js} +4 -4
- package/package.json +3 -3
- package/dist/CheckboxControl-CS6iXHnF-DLCN_obF.js +0 -38
- package/dist/CheckboxesControl-CPKIkyWt-BgPFZcJW.js +0 -40
- package/dist/CodeEditorControl-DM7k0B2q.js +0 -103
- package/dist/ColorPreviewControl-CntI0nTL-qVTX4e1m.js +0 -89
- package/dist/ComboBoxControl-DBYnBkC4-1oOLCCms.js +0 -40
- package/dist/ControlWithSubParameters-DgJhqCMe.js +0 -80
- package/dist/CredentialsControl-CuHgBJQY.js +0 -32
- package/dist/CredentialsControlBase-14mA9Xg5.js +0 -96
- package/dist/DateControl-Cx_CwvNB-Cnu4FwAv.js +0 -35
- package/dist/DateTimeControl-BJsDzufC-BLhNM1JR.js +0 -56
- package/dist/DateTimeFormatPickerControl-C80v1qfK-0bjg1c9X.js +0 -35
- package/dist/DateTimeFormatPickerWithTypeControl-Dt-FKtYV-x-IJKc_b.js +0 -475
- package/dist/DropdownControl-D_BnA4-1-BWnnlfiI.js +0 -30
- package/dist/DynamicInputControl-u5VOv3zx.js +0 -6
- package/dist/ExecutorCoresControl-BnglyGMR-CagN3N5j.js +0 -56
- package/dist/ExecutorMemoryControl-CRATGs9C-Dsj7vG41.js +0 -50
- package/dist/FileUploadControl-D42rjpJg-DIoT6HeI.js +0 -221
- package/dist/GridSelectionControl-BJk8-yiM-CvDVlby0.js +0 -116
- package/dist/IntervalControl-Drljrv-b-WpTsaCtp.js +0 -751
- package/dist/LegacyCredentialsControl-C5OmuHPe.js +0 -87
- package/dist/ManualTwinlistControl-By0Hur_m-zZbz98JO.js +0 -75
- package/dist/MultiFileChooserControl-BDBYwcSY.js +0 -401
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-VVQDBYw7-FEqHVnFo.js +0 -52
- package/dist/OneOfDropdown-CDwwxb3h-DAK0CMDe.js +0 -34
- package/dist/RadioControl-C73s-icb-DSF6WESw.js +0 -24
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BScekfhl-oNoT_40f.js +0 -60
- package/dist/ResourceControlBase-Bqq1PAX_-5gNwtS9Y.js +0 -183
- package/dist/SettingsSubPanelLayout-82gMWhpv-DwWBU76p.js +0 -70
- package/dist/SingleSelectControl-C_ZKkV5m-nfkmmDbp.js +0 -56
- package/dist/TeamResourceControl-BFMuyWnk-DvcyxCqW.js +0 -47
- package/dist/TextControl-B0ag-3Pv-nwKlVRtp.js +0 -54671
- package/dist/TimeControl-Bt5OcjBc-KiaYQH-m.js +0 -41
- package/dist/TimePartInput-CvwAzDuY-CuNpUUqj.js +0 -253
- package/dist/TimeframesControl-BE3LFgyl-hQJ_5QVJ.js +0 -94
- package/dist/Tooltip-UlemzxdS-Dfhzj7no.js +0 -24
- package/dist/TwinlistControlBase.vue_vue_type_script_setup_true_lang-B5lCsIOD-KqyVUaZj.js +0 -42
- package/dist/ValueSwitch-BXaDBm2C-Ba93O_aZ.js +0 -130
- package/dist/ZonedDateTimeControl-6MUvXzd3-B1B9FPa7.js +0 -72
- package/dist/_Uint8Array-C_ozLuQF-DBc0hZkr.js +0 -349
- package/dist/arrow-dropdown-DMFBPPcK-uCJYJfqE.js +0 -17
- package/dist/arrow-next-BQULX8HT-DDsCfA5A.js +0 -17
- package/dist/floating-ui.vue-Fx4CxKut-DAsMxBCU.js +0 -1057
- package/dist/isArray-WzO_os3q-ClnPWjBY.js +0 -4
- package/dist/localTimeUtils-DBMwKtLh-CTshgG3l.js +0 -12470
- package/dist/src/lsp/completion.d.ts +0 -7
- package/dist/src/lsp/connection.d.ts +0 -56
- package/dist/src/lsp/diagnostics.d.ts +0 -4
- package/dist/src/lsp/doc-sync.d.ts +0 -5
- package/dist/src/lsp/hover.d.ts +0 -5
- package/dist/src/lsp/knime-io.d.ts +0 -22
- package/dist/src/lsp/mapping-utils.d.ts +0 -8
- package/dist/src/lsp/signature-help.d.ts +0 -5
- package/dist/toString-C-CNeuJl-jseUiiTM.js +0 -949
- package/dist/useDropdownNavigation-2Yhk7zes-75raAHpT.js +0 -821
- /package/dist/{useUnknownValuesInTwinlist-BbwGcno5-D2ve7iXH.js → useUnknownValuesInTwinlist-BhhirtmX-D2ve7iXH.js} +0 -0
|
@@ -1,751 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, computed as x, createBlock as ae, openBlock as v, unref as p, mergeModels as B, useModel as O, ref as I, watch as z, createElementBlock as E, createElementVNode as m, withDirectives as D, normalizeClass as $, createCommentVNode as H, withKeys as we, vModelText as Te, createVNode as y, normalizeStyle as Ae, vShow as R, Fragment as k, renderList as L, toDisplayString as W, withCtx as Y, createTextVNode as _e, resolveComponent as be, withModifiers as N } from "vue";
|
|
2
|
-
import { d as q, Y as U, w as $e, $ as De, g as xe } from "./TextControl-B0ag-3Pv-nwKlVRtp.js";
|
|
3
|
-
import { z as Me, _ as Ne, H as Se, I as Re, $ as ke } from "./floating-ui.vue-Fx4CxKut-DAsMxBCU.js";
|
|
4
|
-
import { k as Pe } from "./Tooltip-UlemzxdS-Dfhzj7no.js";
|
|
5
|
-
import { i as Ce } from "./arrow-dropdown-DMFBPPcK-uCJYJfqE.js";
|
|
6
|
-
import { O as j } from "./ValueSwitch-BXaDBm2C-Ba93O_aZ.js";
|
|
7
|
-
const te = (e, a) => ({
|
|
8
|
-
negative: e,
|
|
9
|
-
years: parseInt(a[1] ?? "0", 10),
|
|
10
|
-
months: parseInt(a[2] ?? "0", 10),
|
|
11
|
-
weeks: parseInt(a[3] ?? "0", 10),
|
|
12
|
-
days: parseInt(a[4] ?? "0", 10)
|
|
13
|
-
}), le = (e, a) => {
|
|
14
|
-
var l;
|
|
15
|
-
const t = parseInt(((l = a[4]) == null ? void 0 : l.padEnd(3, "0")) ?? "0", 10);
|
|
16
|
-
return {
|
|
17
|
-
negative: e,
|
|
18
|
-
hours: parseInt(a[1] ?? "0", 10),
|
|
19
|
-
minutes: parseInt(a[2] ?? "0", 10),
|
|
20
|
-
seconds: parseInt(a[3] ?? "0", 10),
|
|
21
|
-
milliseconds: t
|
|
22
|
-
};
|
|
23
|
-
}, K = (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, P = (e) => {
|
|
24
|
-
let a = "P";
|
|
25
|
-
return e.type === "DATE" ? a += `${e.interval.years}Y${e.interval.months}M${e.interval.weeks}W${e.interval.days}D` : a += `T${e.interval.hours}H${e.interval.minutes}M${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")}S`, e.interval.negative && (a = `-${a}`), a;
|
|
26
|
-
}, b = (e) => {
|
|
27
|
-
const a = (l, u) => l === 0 ? "" : l === 1 ? `${l} ${u} ` : `${l} ${u}s `;
|
|
28
|
-
let t = "";
|
|
29
|
-
if (e.type === "DATE") {
|
|
30
|
-
if (K(e))
|
|
31
|
-
return "0 days";
|
|
32
|
-
t += a(e.interval.years, "year"), t += a(e.interval.months, "month"), t += a(e.interval.weeks, "week"), t += a(e.interval.days, "day");
|
|
33
|
-
} else {
|
|
34
|
-
if (K(e))
|
|
35
|
-
return "0 seconds";
|
|
36
|
-
t += a(e.interval.hours, "hour"), t += a(e.interval.minutes, "minute");
|
|
37
|
-
const l = e.interval.milliseconds === 0;
|
|
38
|
-
(e.interval.seconds !== 0 || !l) && (l ? t += a(e.interval.seconds, "second") : t += `${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")} seconds `);
|
|
39
|
-
}
|
|
40
|
-
return e.interval.negative && (t = `-(${t.trim()})`), t.trim();
|
|
41
|
-
}, se = "(\\d+)\\s*y(?:ears?)?", ne = "(\\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?)?)?", me = new RegExp(
|
|
42
|
-
`^(?:${se})?\\s*(?:${ne})?\\s*(?:${re})?\\s*(?:${ie})?\\s*$`,
|
|
43
|
-
"i"
|
|
44
|
-
), pe = new RegExp(
|
|
45
|
-
`^(?:${oe})?\\s*(?:${ue})?\\s*(?:${de})?$`,
|
|
46
|
-
"i"
|
|
47
|
-
), Fe = new RegExp(
|
|
48
|
-
`^\\s*-\\s*\\(\\s*${me.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
|
|
49
|
-
"i"
|
|
50
|
-
), Be = new RegExp(
|
|
51
|
-
`^\\s*-\\s*(?:\\s*${se}|${ne}|${re}|${ie})\\s*$`,
|
|
52
|
-
"i"
|
|
53
|
-
), Oe = new RegExp(
|
|
54
|
-
`^\\s*-\\s*\\(\\s*${pe.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
|
|
55
|
-
"i"
|
|
56
|
-
), Ge = new RegExp(
|
|
57
|
-
`^\\s*-\\s*(?:\\s*${oe}|${ue}|${de})\\s*$`,
|
|
58
|
-
"i"
|
|
59
|
-
), ce = (e) => {
|
|
60
|
-
if (e = e == null ? void 0 : e.trim(), !e)
|
|
61
|
-
throw new Error("Empty interval string");
|
|
62
|
-
const a = me.exec(e), t = Fe.exec(e) ?? Be.exec(e), l = pe.exec(e), u = Oe.exec(e) ?? Ge.exec(e), s = a ?? t, d = l ?? u, r = (t ?? u) !== null;
|
|
63
|
-
if (d && s)
|
|
64
|
-
throw new Error("Ambiguous time format");
|
|
65
|
-
if (s)
|
|
66
|
-
return {
|
|
67
|
-
type: "DATE",
|
|
68
|
-
interval: te(r, s)
|
|
69
|
-
};
|
|
70
|
-
if (d)
|
|
71
|
-
return {
|
|
72
|
-
type: "TIME",
|
|
73
|
-
interval: le(r, d)
|
|
74
|
-
};
|
|
75
|
-
throw new Error(`Invalid human readable time: ${e}`);
|
|
76
|
-
}, ve = (e, a) => {
|
|
77
|
-
try {
|
|
78
|
-
const t = ce(e), l = t.type, u = t.interval.negative;
|
|
79
|
-
if (l === a || a === "DATE_OR_TIME")
|
|
80
|
-
return {
|
|
81
|
-
valid: !0,
|
|
82
|
-
type: l,
|
|
83
|
-
negative: u
|
|
84
|
-
};
|
|
85
|
-
} catch {
|
|
86
|
-
return { valid: !1 };
|
|
87
|
-
}
|
|
88
|
-
}, w = (e) => {
|
|
89
|
-
if (e = e == null ? void 0 : e.trim(), ["", "P", "PT", "-", "-P", "-PT"].includes(e))
|
|
90
|
-
throw new Error("Empty ISO duration");
|
|
91
|
-
const a = /^-?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?$/, t = /^-?PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)(?:[,.](\d{1,3}))?S)?$/, l = a.exec(e), u = t.exec(e);
|
|
92
|
-
if (l)
|
|
93
|
-
return {
|
|
94
|
-
type: "DATE",
|
|
95
|
-
interval: te(
|
|
96
|
-
e.startsWith("-"),
|
|
97
|
-
l
|
|
98
|
-
)
|
|
99
|
-
};
|
|
100
|
-
if (u)
|
|
101
|
-
return {
|
|
102
|
-
type: "TIME",
|
|
103
|
-
interval: le(
|
|
104
|
-
e.startsWith("-"),
|
|
105
|
-
u
|
|
106
|
-
)
|
|
107
|
-
};
|
|
108
|
-
throw new Error(`Invalid ISO duration: ${e}`);
|
|
109
|
-
}, he = (e, a) => {
|
|
110
|
-
try {
|
|
111
|
-
const t = w(e), l = t.type, u = t.interval.negative;
|
|
112
|
-
if (l === a || a === "DATE_OR_TIME")
|
|
113
|
-
return {
|
|
114
|
-
valid: !0,
|
|
115
|
-
type: l,
|
|
116
|
-
negative: u
|
|
117
|
-
};
|
|
118
|
-
} catch {
|
|
119
|
-
return { valid: !1 };
|
|
120
|
-
}
|
|
121
|
-
}, He = (e) => {
|
|
122
|
-
const a = he(e, "DATE_OR_TIME"), t = ve(
|
|
123
|
-
e,
|
|
124
|
-
"DATE_OR_TIME"
|
|
125
|
-
);
|
|
126
|
-
if (a.valid)
|
|
127
|
-
return w(e);
|
|
128
|
-
if (t.valid)
|
|
129
|
-
return ce(e);
|
|
130
|
-
throw new Error(`Invalid interval string: ${e}`);
|
|
131
|
-
}, C = (e, a) => {
|
|
132
|
-
const t = he(e, a), l = ve(e, a);
|
|
133
|
-
return t.valid ? t : l.valid ? l : { 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 Xe(e, a) {
|
|
142
|
-
return v(), E("svg", Ue, [...a[0] || (a[0] = [
|
|
143
|
-
m("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 ze = { render: Xe }, Le = 200, We = 50, Ye = 0.1, qe = 1, je = {
|
|
147
|
-
name: "NumberInput",
|
|
148
|
-
components: {
|
|
149
|
-
ArrowIcon: Ce
|
|
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 : Ye;
|
|
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 a = e.target.value;
|
|
258
|
-
e && !a && (e.data === "." || e.data === "-") || (a || (this.getInputRef().value = ""), this.updateAndEmit({ newValue: a }));
|
|
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 a = !0, t;
|
|
268
|
-
return e = typeof e > "u" ? this.getParsedValue() : this.parseValue(e), typeof e != "number" || isNaN(e) ? (a = !1, t = "Current value is not a number.") : (this.min > e || this.max < e) && (a = !1, t = "Current value is outside allowed range."), { isValid: a, errorMessage: t };
|
|
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 a = this.getParsedValue();
|
|
286
|
-
this.validate(a).isValid || (a = this.findNearestValidValue(a));
|
|
287
|
-
let t = a + e, l = 1 / Math.abs(e);
|
|
288
|
-
Math.abs(e) < 1 && (l = Math.round(l)), t = Math.round(t * l) / l, this.validate(t).isValid && this.updateAndEmit({ newValue: t });
|
|
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, a) {
|
|
306
|
-
if (this.disabled)
|
|
307
|
-
return;
|
|
308
|
-
this.spinnerArrowInterval !== null && clearTimeout(this.spinnerArrowInterval), this.spinnerArrowTimeout !== null && clearInterval(this.spinnerArrowTimeout);
|
|
309
|
-
let t = this.stepSize;
|
|
310
|
-
if (a === "decrease" && (t *= -1), e.type === "mousedown") {
|
|
311
|
-
this.clicked = !0, this.spinnerArrowTimeout = setTimeout(() => {
|
|
312
|
-
this.spinnerArrowInterval = setInterval(() => {
|
|
313
|
-
this.changeValue(t);
|
|
314
|
-
}, We);
|
|
315
|
-
}, Le);
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
this.clicked && (this.clicked = !1, this.changeValue(t));
|
|
319
|
-
},
|
|
320
|
-
toggleHover() {
|
|
321
|
-
this.hovered = !this.hovered;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}, Ke = ["id", "name", "value", "min", "max", "step", "disabled"], Je = {
|
|
325
|
-
key: 0,
|
|
326
|
-
class: "invalid-marker"
|
|
327
|
-
};
|
|
328
|
-
function Qe(e, a, t, l, u, s) {
|
|
329
|
-
const d = be("ArrowIcon");
|
|
330
|
-
return v(), E("div", {
|
|
331
|
-
class: $(["wrapper", { disabled: t.disabled, compact: t.compact }])
|
|
332
|
-
}, [
|
|
333
|
-
m("input", {
|
|
334
|
-
id: t.id,
|
|
335
|
-
ref: "input",
|
|
336
|
-
name: t.name,
|
|
337
|
-
type: "number",
|
|
338
|
-
role: "spinButton",
|
|
339
|
-
value: s.inputValue,
|
|
340
|
-
min: t.min,
|
|
341
|
-
max: t.max,
|
|
342
|
-
step: s.stepSize,
|
|
343
|
-
class: $(s.inputClassList),
|
|
344
|
-
disabled: t.disabled,
|
|
345
|
-
onInput: a[0] || (a[0] = (r) => s.onInput(r)),
|
|
346
|
-
onBlur: a[1] || (a[1] = (...r) => s.onBlur && s.onBlur(...r)),
|
|
347
|
-
onMouseenter: a[2] || (a[2] = (...r) => s.toggleHover && s.toggleHover(...r)),
|
|
348
|
-
onMouseleave: a[3] || (a[3] = (...r) => s.toggleHover && s.toggleHover(...r))
|
|
349
|
-
}, null, 42, Ke),
|
|
350
|
-
t.isValid ? H("", !0) : (v(), E("span", Je)),
|
|
351
|
-
m("span", {
|
|
352
|
-
class: $(["increase", { disabled: t.disabled }]),
|
|
353
|
-
onMousedown: a[4] || (a[4] = N((r) => s.mouseEvent(r, "increase"), ["prevent"])),
|
|
354
|
-
onMouseup: a[5] || (a[5] = N((r) => s.mouseEvent(r, "increase"), ["prevent"])),
|
|
355
|
-
onMouseleave: a[6] || (a[6] = (r) => s.mouseEvent(r, "increase"))
|
|
356
|
-
}, [
|
|
357
|
-
y(d)
|
|
358
|
-
], 34),
|
|
359
|
-
m("span", {
|
|
360
|
-
class: $(["decrease", { disabled: t.disabled }]),
|
|
361
|
-
onMousedown: a[7] || (a[7] = N((r) => s.mouseEvent(r, "decrease"), ["prevent"])),
|
|
362
|
-
onMouseup: a[8] || (a[8] = N((r) => s.mouseEvent(r, "decrease"), ["prevent"])),
|
|
363
|
-
onMouseleave: a[9] || (a[9] = (r) => s.mouseEvent(r, "decrease"))
|
|
364
|
-
}, [
|
|
365
|
-
y(d)
|
|
366
|
-
], 34)
|
|
367
|
-
], 2);
|
|
368
|
-
}
|
|
369
|
-
const J = /* @__PURE__ */ U(je, [["render", Qe], ["__scopeId", "data-v-0ce77f1e"]]), Q = [
|
|
370
|
-
"years",
|
|
371
|
-
"months",
|
|
372
|
-
"weeks",
|
|
373
|
-
"days"
|
|
374
|
-
], Z = [
|
|
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, a) => a === "DATE" ? {
|
|
389
|
-
type: "DATE",
|
|
390
|
-
interval: e.periodPart
|
|
391
|
-
} : {
|
|
392
|
-
type: "TIME",
|
|
393
|
-
interval: e.durationPart
|
|
394
|
-
}, S = (e, a) => e.type === "DATE" ? {
|
|
395
|
-
...a,
|
|
396
|
-
periodPart: e.interval
|
|
397
|
-
} : {
|
|
398
|
-
...a,
|
|
399
|
-
durationPart: e.interval
|
|
400
|
-
}, F = (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), Ze = { class: "header" }, ea = { class: "ascending-descending-switch-container" }, aa = { class: "input-grid" }, ta = { class: "input-label" }, la = { class: "input-label" }, sa = { class: "accept-controls" }, na = /* @__PURE__ */ G({
|
|
401
|
-
__name: "IntervalInputPopoverContent",
|
|
402
|
-
props: /* @__PURE__ */ B({
|
|
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__ */ B(["commit"], ["update:usedFormat", "update:modelValue"]),
|
|
416
|
-
setup(e, { emit: a }) {
|
|
417
|
-
const t = a, l = e, u = O(e, "usedFormat"), s = O(e, "modelValue"), d = x(() => {
|
|
418
|
-
const h = u.value === "DATE" ? Q : Z, c = u.value === "DATE" ? h.map(
|
|
419
|
-
(i) => s.value.periodPart[i]
|
|
420
|
-
) : h.map(
|
|
421
|
-
(i) => s.value.durationPart[i]
|
|
422
|
-
);
|
|
423
|
-
for (let i = 0; i < c.length; i++) {
|
|
424
|
-
const g = h[i], A = c[i];
|
|
425
|
-
if (isNaN(A) || A < V[g].min || A > V[g].max)
|
|
426
|
-
return {
|
|
427
|
-
valid: !1,
|
|
428
|
-
reason: `${F(g)} out of bounds.`
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
return { valid: !0 };
|
|
432
|
-
}), r = x({
|
|
433
|
-
get() {
|
|
434
|
-
return l.allowDescending ? u.value === "DATE" ? s.value.periodPart.negative ? "DESCENDING" : "ASCENDING" : s.value.durationPart.negative ? "DESCENDING" : "ASCENDING" : "ASCENDING";
|
|
435
|
-
},
|
|
436
|
-
set(h) {
|
|
437
|
-
s.value.periodPart.negative = h === "DESCENDING", s.value.durationPart.negative = h === "DESCENDING";
|
|
438
|
-
}
|
|
439
|
-
}), T = () => {
|
|
440
|
-
t(
|
|
441
|
-
"commit",
|
|
442
|
-
u.value,
|
|
443
|
-
s.value,
|
|
444
|
-
r.value
|
|
445
|
-
);
|
|
446
|
-
};
|
|
447
|
-
return (h, c) => (v(), E(k, null, [
|
|
448
|
-
m("span", Ze, [
|
|
449
|
-
c[2] || (c[2] = m("span", { class: "input-title" }, "Interval", -1)),
|
|
450
|
-
l.format === "DATE_OR_TIME" ? (v(), ae(j, {
|
|
451
|
-
key: 0,
|
|
452
|
-
modelValue: u.value,
|
|
453
|
-
"onUpdate:modelValue": c[0] || (c[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"])) : H("", !0)
|
|
460
|
-
]),
|
|
461
|
-
D(m("div", ea, [
|
|
462
|
-
y(j, {
|
|
463
|
-
modelValue: r.value,
|
|
464
|
-
"onUpdate:modelValue": c[1] || (c[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
|
-
[R, e.allowDescending]
|
|
473
|
-
]),
|
|
474
|
-
m("div", aa, [
|
|
475
|
-
(v(!0), E(k, null, L(p(Q), (i) => D((v(), E("span", {
|
|
476
|
-
key: i,
|
|
477
|
-
class: "labeled-date-time-input"
|
|
478
|
-
}, [
|
|
479
|
-
m("span", ta, W(p(F)(i)), 1),
|
|
480
|
-
y(J, {
|
|
481
|
-
modelValue: s.value.periodPart[i],
|
|
482
|
-
"onUpdate:modelValue": (g) => s.value.periodPart[i] = g,
|
|
483
|
-
min: p(V)[i].min,
|
|
484
|
-
max: p(V)[i].max,
|
|
485
|
-
compact: "",
|
|
486
|
-
type: "integer"
|
|
487
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max"])
|
|
488
|
-
], 512)), [
|
|
489
|
-
[R, u.value === "DATE"]
|
|
490
|
-
])), 128)),
|
|
491
|
-
(v(!0), E(k, null, L(p(Z), (i) => D((v(), E("span", {
|
|
492
|
-
key: i,
|
|
493
|
-
class: "labeled-date-time-input"
|
|
494
|
-
}, [
|
|
495
|
-
m("span", la, W(p(F)(i)), 1),
|
|
496
|
-
y(J, {
|
|
497
|
-
"model-value": s.value.durationPart[i],
|
|
498
|
-
min: p(V)[i].min,
|
|
499
|
-
max: p(V)[i].max,
|
|
500
|
-
compact: "",
|
|
501
|
-
type: "integer",
|
|
502
|
-
"onUpdate:modelValue": (g) => {
|
|
503
|
-
s.value.durationPart[i] = g;
|
|
504
|
-
}
|
|
505
|
-
}, null, 8, ["model-value", "min", "max", "onUpdate:modelValue"])
|
|
506
|
-
], 512)), [
|
|
507
|
-
[R, u.value === "TIME"]
|
|
508
|
-
])), 128))
|
|
509
|
-
]),
|
|
510
|
-
m("div", sa, [
|
|
511
|
-
y(Pe, {
|
|
512
|
-
text: d.value.valid ? "" : d.value.reason
|
|
513
|
-
}, {
|
|
514
|
-
default: Y(() => [
|
|
515
|
-
y(xe, {
|
|
516
|
-
primary: "",
|
|
517
|
-
disabled: !d.value.valid,
|
|
518
|
-
onClick: T
|
|
519
|
-
}, {
|
|
520
|
-
default: Y(() => [...c[3] || (c[3] = [
|
|
521
|
-
_e(" Set ", -1)
|
|
522
|
-
])]),
|
|
523
|
-
_: 1
|
|
524
|
-
}, 8, ["disabled"])
|
|
525
|
-
]),
|
|
526
|
-
_: 1
|
|
527
|
-
}, 8, ["text"])
|
|
528
|
-
])
|
|
529
|
-
], 64));
|
|
530
|
-
}
|
|
531
|
-
}), ra = /* @__PURE__ */ U(na, [["__scopeId", "data-v-a372cf12"]]), ia = { class: "input-fields" }, oa = ["disabled", "placeholder"], ua = {
|
|
532
|
-
key: 0,
|
|
533
|
-
class: "invalid-marker"
|
|
534
|
-
}, da = ["disabled"], ma = {}, pa = /* @__PURE__ */ G({
|
|
535
|
-
...ma,
|
|
536
|
-
__name: "IntervalInput",
|
|
537
|
-
props: /* @__PURE__ */ B({
|
|
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 a = e, t = O(e, "modelValue"), l = I(
|
|
551
|
-
(() => {
|
|
552
|
-
if (a.format === "DATE_OR_TIME") {
|
|
553
|
-
const o = C(
|
|
554
|
-
t.value,
|
|
555
|
-
"DATE_OR_TIME"
|
|
556
|
-
);
|
|
557
|
-
return o.valid ? o.type : "DATE";
|
|
558
|
-
} else
|
|
559
|
-
return a.format;
|
|
560
|
-
})()
|
|
561
|
-
), u = x(() => l.value === "DATE" ? "ISO-8601, whole words (1 year), single letters (1y)" : "ISO-8601, whole words (1 hour), single letters (1h)"), s = I(
|
|
562
|
-
(() => {
|
|
563
|
-
const o = w(
|
|
564
|
-
t.value
|
|
565
|
-
);
|
|
566
|
-
return S(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 = I(
|
|
584
|
-
b(
|
|
585
|
-
w(t.value)
|
|
586
|
-
)
|
|
587
|
-
), r = x(() => {
|
|
588
|
-
const o = C(
|
|
589
|
-
d.value,
|
|
590
|
-
"DATE_OR_TIME"
|
|
591
|
-
);
|
|
592
|
-
return o.valid && (a.allowDescending || !o.negative) && (o.type === l.value || a.format === "DATE_OR_TIME");
|
|
593
|
-
}), T = I(null), h = I(null), c = I(null), i = (o, n) => {
|
|
594
|
-
const f = ee(
|
|
595
|
-
o,
|
|
596
|
-
n
|
|
597
|
-
);
|
|
598
|
-
d.value = b(f), t.value = P(f), l.value = n, s.value = o;
|
|
599
|
-
}, g = () => {
|
|
600
|
-
s.value = S(
|
|
601
|
-
w(t.value),
|
|
602
|
-
s.value
|
|
603
|
-
);
|
|
604
|
-
}, A = (o) => {
|
|
605
|
-
const n = C(
|
|
606
|
-
o,
|
|
607
|
-
"DATE_OR_TIME"
|
|
608
|
-
);
|
|
609
|
-
if (!n.valid || !a.allowDescending && n.negative || n.type !== l.value && a.format !== "DATE_OR_TIME")
|
|
610
|
-
return;
|
|
611
|
-
const f = He(
|
|
612
|
-
o
|
|
613
|
-
);
|
|
614
|
-
s.value = S(
|
|
615
|
-
f,
|
|
616
|
-
s.value
|
|
617
|
-
), t.value = P(f), l.value = n.type, d.value = b(f);
|
|
618
|
-
}, fe = (o) => {
|
|
619
|
-
const n = w(o);
|
|
620
|
-
d.value = b(n), s.value = S(
|
|
621
|
-
n,
|
|
622
|
-
s.value
|
|
623
|
-
), t.value = o;
|
|
624
|
-
}, Ee = (o) => {
|
|
625
|
-
const n = ee(
|
|
626
|
-
s.value,
|
|
627
|
-
o
|
|
628
|
-
);
|
|
629
|
-
d.value = b(n), t.value = P(n), l.value = o;
|
|
630
|
-
}, ge = (o) => {
|
|
631
|
-
o !== "DATE_OR_TIME" && Ee(o);
|
|
632
|
-
}, _ = I(!1);
|
|
633
|
-
z(() => a.format, ge), z(t, fe);
|
|
634
|
-
const X = (o) => {
|
|
635
|
-
A(o);
|
|
636
|
-
}, M = (o, n) => {
|
|
637
|
-
o && n ? i(
|
|
638
|
-
n.popoverValues,
|
|
639
|
-
n.usedFormat
|
|
640
|
-
) : g(), _.value = !1;
|
|
641
|
-
};
|
|
642
|
-
$e(T, () => M(!1), {
|
|
643
|
-
ignore: [h]
|
|
644
|
-
}), De("Escape", () => M(!1));
|
|
645
|
-
const { floatingStyles: ye, update: Ie } = Me(h, T, {
|
|
646
|
-
middleware: [
|
|
647
|
-
Se(),
|
|
648
|
-
// move left/right to keep it on screen
|
|
649
|
-
Re({
|
|
650
|
-
// flip it vertically to keep it on screen
|
|
651
|
-
mainAxis: !0,
|
|
652
|
-
crossAxis: !1
|
|
653
|
-
}),
|
|
654
|
-
ke({
|
|
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, n) => (v(), E("div", null, [
|
|
666
|
-
m("div", {
|
|
667
|
-
class: $(["wrapper", { disabled: e.disabled, compact: e.compact }])
|
|
668
|
-
}, [
|
|
669
|
-
m("span", ia, [
|
|
670
|
-
D(m("input", {
|
|
671
|
-
ref_key: "inputTextFieldRef",
|
|
672
|
-
ref: c,
|
|
673
|
-
"onUpdate:modelValue": n[0] || (n[0] = (f) => d.value = f),
|
|
674
|
-
type: "text",
|
|
675
|
-
disabled: e.disabled,
|
|
676
|
-
placeholder: u.value,
|
|
677
|
-
spellcheck: "false",
|
|
678
|
-
onFocus: n[1] || (n[1] = (f) => _.value = !1),
|
|
679
|
-
onFocusout: n[2] || (n[2] = () => X(d.value)),
|
|
680
|
-
onKeypress: n[3] || (n[3] = we(() => X(d.value), ["enter"]))
|
|
681
|
-
}, null, 40, oa), [
|
|
682
|
-
[Te, d.value]
|
|
683
|
-
]),
|
|
684
|
-
r.value ? H("", !0) : (v(), E("span", ua)),
|
|
685
|
-
m("button", {
|
|
686
|
-
ref_key: "togglePopoverButtonRef",
|
|
687
|
-
ref: h,
|
|
688
|
-
class: "trigger-popover-button",
|
|
689
|
-
disabled: e.disabled,
|
|
690
|
-
onClick: n[4] || (n[4] = () => {
|
|
691
|
-
_.value ? M(!1) : (_.value = !0, p(Ie)());
|
|
692
|
-
})
|
|
693
|
-
}, [
|
|
694
|
-
y(p(ze))
|
|
695
|
-
], 8, da)
|
|
696
|
-
])
|
|
697
|
-
], 2),
|
|
698
|
-
D(m("div", {
|
|
699
|
-
ref_key: "durationInputPopoverRef",
|
|
700
|
-
ref: T,
|
|
701
|
-
class: "control-popup",
|
|
702
|
-
style: Ae(p(ye))
|
|
703
|
-
}, [
|
|
704
|
-
y(ra, {
|
|
705
|
-
"model-value": s.value,
|
|
706
|
-
"used-format": l.value,
|
|
707
|
-
format: a.format,
|
|
708
|
-
"allow-descending": a.allowDescending,
|
|
709
|
-
onCommit: n[5] || (n[5] = (f, Ve, va) => M(!0, {
|
|
710
|
-
usedFormat: f,
|
|
711
|
-
popoverValues: Ve
|
|
712
|
-
}))
|
|
713
|
-
}, null, 8, ["model-value", "used-format", "format", "allow-descending"])
|
|
714
|
-
], 4), [
|
|
715
|
-
[R, _.value]
|
|
716
|
-
])
|
|
717
|
-
]));
|
|
718
|
-
}
|
|
719
|
-
}), ca = /* @__PURE__ */ U(pa, [["__scopeId", "data-v-f37d874a"]]), Va = /* @__PURE__ */ G({
|
|
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 a = e, t = x(
|
|
732
|
-
() => a.control.uischema
|
|
733
|
-
), l = q(
|
|
734
|
-
t,
|
|
735
|
-
"intervalType",
|
|
736
|
-
"DATE_OR_TIME"
|
|
737
|
-
), u = q(t, "allowDescending", !0);
|
|
738
|
-
return (s, d) => (v(), ae(p(ca), {
|
|
739
|
-
id: e.labelForId,
|
|
740
|
-
compact: "",
|
|
741
|
-
"allow-descending": p(u),
|
|
742
|
-
disabled: e.disabled,
|
|
743
|
-
"model-value": e.control.data,
|
|
744
|
-
format: p(l),
|
|
745
|
-
"onUpdate:modelValue": e.changeValue
|
|
746
|
-
}, null, 8, ["id", "allow-descending", "disabled", "model-value", "format", "onUpdate:modelValue"]));
|
|
747
|
-
}
|
|
748
|
-
});
|
|
749
|
-
export {
|
|
750
|
-
Va as default
|
|
751
|
-
};
|