@knime/jsonforms 1.14.3 → 1.15.1
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 +32 -0
- package/dist/AnyOfTwinlist-BmHETHvW.js +28 -0
- package/dist/{Button-BxuGKyL5.js → Button-B9RSLVI2.js} +9 -8
- package/dist/CheckboxControl-q88fZSZD.js +58 -0
- package/dist/Checkboxes-Bofcg7tl.js +120 -0
- package/dist/CheckboxesControl-DY0R1PDD.js +47 -0
- package/dist/{ComboBoxControl-Dk02x7sN.js → ComboBoxControl-2r1FWcy-.js} +238 -172
- package/dist/DateControl-vnkppn62.js +38 -0
- package/dist/DateTimeControl-MkF9G3Xz.js +53 -0
- package/dist/DateTimeFormatInput-Ds2VLXw1.js +426 -0
- package/dist/DateTimeFormatPickerControl-D3OjZCj7.js +47 -0
- package/dist/DateTimeFormatPickerWithTypeControl-DDto-oJk.js +85 -0
- package/dist/DateTimeInput-DcwhvMD2.js +11321 -0
- package/dist/Dropdown-D49sEHBa.js +663 -0
- package/dist/DropdownControl-aeEqC-Yg.js +46 -0
- package/dist/HorizontalLayout-D0toQmVl.js +39 -0
- package/dist/{InputField-BYxW_-G3.js → InputField-C_aZPs-f.js} +48 -36
- package/dist/IntegerControl-DAwniqjW.js +33 -0
- package/dist/IntervalControl-Bkuhg0Ga.js +647 -0
- package/dist/LoadingDropdown-B9jHjdWV.js +50 -0
- package/dist/LoadingIcon-RPBUjTO3.js +23 -0
- package/dist/ManualTwinlistControl-DGW-7a2Q.js +90 -0
- package/dist/MultiSelectListBoxControl-BYHuC9jL.js +48 -0
- package/dist/MultimodeTwinlistControl-oIvgI_FP.js +486 -0
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-DGKMWtLi.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_bd2eaa56_lang-pnMOUiIt.js} +1 -1
- package/dist/{MultiselectListBox-CHvGxAhY.js → MultiselectListBox-CfdPbcn1.js} +105 -86
- package/dist/NameFilter-BV68t_P5.js +37 -0
- package/dist/NumberControl-Dm01CJW9.js +33 -0
- package/dist/NumberControlBase-CN5eTKEm.js +58 -0
- package/dist/{NumberInput-DJ38AGiR.js → NumberInput-DWTImcA_.js} +72 -54
- package/dist/OneOfDropdown-DuXXP0Qn.js +50 -0
- package/dist/RadioControl-X6HLs9F1.js +36 -0
- package/dist/RadioControlBase-BGUHTIUl.js +111 -0
- package/dist/{RichTextControl-CXY1ULxR.js → RichTextControl-B1mJMs1e.js} +5462 -4668
- package/dist/SectionHeading-B6JkPyMh.js +31 -0
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_f06e9b7d_lang-B5ALSUVO.js +15603 -0
- package/dist/SectionLayout-7pXn4OHo.js +61 -0
- package/dist/SettingsSubPanel-DToMRoLu.js +48 -0
- package/dist/SettingsSubPanelLayout-DnZnghFr.js +83 -0
- package/dist/SimpleButtonControl-DOSd92Kq.js +84 -0
- package/dist/SimpleTwinlistControl-RBfQTk47.js +31 -0
- package/dist/SingleSelectControl-C-GLQD-a.js +73 -0
- package/dist/SingleSelectListBoxControl-CDg_1QUT.js +260 -0
- package/dist/SortListControl-CWuxKIEb.js +445 -0
- package/dist/StyledListItem-NqAG7jSw.js +81 -0
- package/dist/TextAreaControl-Dt5ZGrae.js +122 -0
- package/dist/TextControl-w9vrCC1T.js +54 -0
- package/dist/TimeControl-DiNQSV4K.js +46 -0
- package/dist/TwinlistControlBase-CMFEecdr.js +47 -0
- package/dist/TwinlistLoadingInfo-Cy6HY-97.js +1080 -0
- package/dist/TypedStringFilter-FUF8sqOm.js +32 -0
- package/dist/ValueSwitch-Ozmr1YfK.js +162 -0
- package/dist/ValueSwitchControl-CdFlHo-2.js +33 -0
- package/dist/VerticalLayout-DY8gbasK.js +39 -0
- package/dist/VerticalLayoutBase-CpN-KONq.js +32 -0
- package/dist/ZonedDateTimeControl-Cg3dAfq5.js +79 -0
- package/dist/{_baseEach-cjHvi5iT.js → _baseEach-CWap1NWh.js} +4 -4
- package/dist/{_baseIteratee-CIxt0KWU.js → _baseIteratee-D0MXvnuf.js} +27 -27
- package/dist/{_getTag-sLUyzSDj.js → _getTag-BvpAzjaz.js} +10 -10
- package/dist/{arrow-dropdown-DdgjzLAO.js → arrow-dropdown-eS-nVNCv.js} +9 -3
- package/dist/{arrow-next-CIOU5o42.js → arrow-next-BmOStWql.js} +9 -3
- package/dist/{close-BuY4mhXV.js → close-0dYG2oDA.js} +9 -3
- package/dist/floating-ui.vue-CDo9Kas1.js +1055 -0
- package/dist/{hotkeys-kwHHtFKz.js → hotkeys-rxnt4egK.js} +1 -1
- package/dist/index-CpKfM262.js +376 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +133 -110
- package/dist/{localTimeUtils-Dv-1R88J.js → localTimeUtils-CfchSrLG.js} +179 -181
- package/dist/magic-string.es-BQ9KnLz-.js +659 -0
- package/dist/navigator-e30QQMkl.js +4 -0
- package/dist/popper-LGjf7Wza.js +905 -0
- package/dist/reload-57Xc2t-6.js +23 -0
- package/dist/src/higherOrderComponents/control/LabeledControl.vue.d.ts +26 -22
- package/dist/src/higherOrderComponents/control/errorMessage/ErrorLine.vue.d.ts +3 -4
- package/dist/src/higherOrderComponents/control/errorMessage/ErrorMessages.vue.d.ts +16 -10
- package/dist/src/higherOrderComponents/control/errorMessage/withErrorMessage.d.ts +1 -1
- package/dist/src/higherOrderComponents/control/util.d.ts +7 -33
- package/dist/src/higherOrderComponents/layout/util.d.ts +1 -17
- package/dist/src/layoutComponents/Form.vue.d.ts +12 -4
- package/dist/src/layoutComponents/HorizontalLayout.vue.d.ts +1 -1
- package/dist/src/layoutComponents/SectionLayout.vue.d.ts +13 -5
- package/dist/src/layoutComponents/VerticalLayout.vue.d.ts +1 -1
- package/dist/src/layoutComponents/VerticalLayoutBase.vue.d.ts +16 -9
- package/dist/src/layoutComponents/section/SectionHeading.vue.d.ts +13 -6
- package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanel.vue.d.ts +2 -2
- package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanelBackArrow.vue.d.ts +1 -1
- package/dist/src/renderers/dateTimeFormatPickerRenderer.d.ts +2 -2
- package/dist/src/renderers/defaultRenderers.d.ts +966 -151
- package/dist/src/renderers/dropdownRenderer.d.ts +1 -1
- package/dist/src/renderers/fallbackRenderers.d.ts +8 -8
- package/dist/src/renderers/horizontalLayoutRenderer.d.ts +1 -1
- package/dist/src/renderers/sectionLayoutRenderer.d.ts +4 -4
- package/dist/src/renderers/simpleButtonRenderer.d.ts +7 -89
- package/dist/src/renderers/sortListRenderer.d.ts +853 -20
- package/dist/src/renderers/textMessageRenderer.d.ts +65 -1
- package/dist/src/renderers/textRenderer.d.ts +1 -1
- package/dist/src/renderers/verticalLayoutRenderer.d.ts +2 -2
- package/dist/src/renderers/zonedDateTimeRenderer.d.ts +1 -1
- package/dist/src/uiComponents/CheckboxControl.vue.d.ts +15 -6
- package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeFormatPickerControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeFormatPickerWithTypeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DropdownControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/IntegerControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/IntervalControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/MultiSelectListBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/NumberControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/NumberControlBase.vue.d.ts +5 -9
- package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +2 -1
- package/dist/src/uiComponents/RadioControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/RadioControlBase.vue.d.ts +4 -8
- package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +5 -129
- package/dist/src/uiComponents/SingleSelectControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/SingleSelectListBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/SortListControl.vue.d.ts +845 -12
- package/dist/src/uiComponents/TextAreaControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/TextControl.vue.d.ts +203 -3
- package/dist/src/uiComponents/TextMessageControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/TimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ZonedDateTimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/composables/useProvidedState.d.ts +1 -1
- package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +1 -1
- package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +3 -1
- package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +230 -1
- package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/ManualTwinlistControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/MultimodeTwinlistControl.vue.d.ts +8 -15
- package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/TwinlistControlBase.vue.d.ts +5 -10
- package/dist/src/uiComponents/twinlist/TypedStringFilter.vue.d.ts +2 -1
- package/dist/testUtils/component.d.ts +18 -18
- package/dist/testing.js +8688 -8655
- package/dist/{toString-C_MqBj3_.js → toString-C-X8cE7K.js} +1 -1
- package/dist/{useBuiltinValidations-DP7OS71z.js → useBuiltinValidations-D0WuEacN.js} +1 -1
- package/dist/useDropdownNavigation-BfCXUheD.js +817 -0
- package/dist/usePossibleValues-DTVXBGRC.js +16 -0
- package/package.json +14 -14
- package/dist/AnyOfTwinlist-Cwxtyt0Q.js +0 -22
- package/dist/CheckboxControl-Oe97HhY3.js +0 -40
- package/dist/Checkboxes-DIPjJhPO.js +0 -103
- package/dist/CheckboxesControl-5QlPmjwv.js +0 -41
- package/dist/DateControl-CddCObVg.js +0 -29
- package/dist/DateTimeControl-DyXUJBHE.js +0 -54
- package/dist/DateTimeFormatInput-bO1zHUyp.js +0 -381
- package/dist/DateTimeFormatPickerControl-Dq25_JV2.js +0 -43
- package/dist/DateTimeFormatPickerWithTypeControl-DZib_x-B.js +0 -79
- package/dist/DateTimeInput-CEYEV8dt.js +0 -11204
- package/dist/Dropdown-CJj0CUA8.js +0 -604
- package/dist/DropdownControl-BNQKWzTT.js +0 -31
- package/dist/HorizontalLayout-6GwurgkR.js +0 -25
- package/dist/IntegerControl-DZIY-wb_.js +0 -20
- package/dist/IntervalControl-Yts36_MI.js +0 -546
- package/dist/LoadingDropdown-Dw-0WQ8x.js +0 -40
- package/dist/ManualTwinlistControl-C3NnAug1.js +0 -85
- package/dist/MultiSelectListBoxControl-3Q41S4aA.js +0 -34
- package/dist/MultimodeTwinlistControl-B2Jven29.js +0 -470
- package/dist/NameFilter-D0hKO5Fr.js +0 -24
- package/dist/NumberControl-DkeQT1iR.js +0 -20
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B9K5qEs3.js +0 -53
- package/dist/OneOfDropdown-NAgE-mPP.js +0 -34
- package/dist/RadioControl-DjrysNQ_.js +0 -24
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-WaVJMdQq.js +0 -114
- package/dist/SectionHeading-BU1W5lDr.js +0 -19
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js +0 -14015
- package/dist/SectionLayout-CJP4sYyB.js +0 -46
- package/dist/SettingsSubPanel-KxEyzlB6.js +0 -5
- package/dist/SettingsSubPanelLayout-YBNVPQOD.js +0 -61
- package/dist/SimpleButtonControl-ejyUwJdL.js +0 -61
- package/dist/SimpleTwinlistControl-qXQxRI7h.js +0 -28
- package/dist/SingleSelectControl-B0JgDv7j.js +0 -58
- package/dist/SingleSelectListBoxControl-ClQOxnxW.js +0 -235
- package/dist/SortListControl-mvJofiWn.js +0 -375
- package/dist/StyledListItem-BXz08pEQ.js +0 -72
- package/dist/TextAreaControl-S4aoqAv1.js +0 -111
- package/dist/TextControl-rJrjrBw8.js +0 -4
- package/dist/TextControl.vue_vue_type_script_setup_true_lang-Bf6GB1zX.js +0 -50
- package/dist/TimeControl-DfhE8yu9.js +0 -42
- package/dist/TwinlistControlBase-D1l9t7Up.js +0 -40
- package/dist/TwinlistLoadingInfo-CQRx9cEu.js +0 -963
- package/dist/TypedStringFilter-C6JhWCCC.js +0 -29
- package/dist/ValueSwitch-CUYV7v67.js +0 -131
- package/dist/ValueSwitchControl-IP9SxrUs.js +0 -20
- package/dist/VerticalLayout-D2eQSYgv.js +0 -30
- package/dist/VerticalLayoutBase-DRfHwc4t.js +0 -20
- package/dist/ZonedDateTimeControl-Bi8cV34A.js +0 -75
- package/dist/floating-ui.vue-B-MrqKCT.js +0 -1019
- package/dist/index-CoRworrE.js +0 -322
- package/dist/magic-string.es-D-aKzDFf.js +0 -858
- package/dist/navigator-D_R-txCf.js +0 -7
- package/dist/popper-CRR--9mA.js +0 -907
- package/dist/reload-BVbCGubF.js +0 -17
- package/dist/src/JsonFormsDialog.vue.d.ts +0 -46
- package/dist/svgWithTitle-Cr3Pu3wr.js +0 -18
- package/dist/useDropdownNavigation-7o7SRJSo.js +0 -781
- package/dist/usePossibleValues-lz0Rcu_N.js +0 -20
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import { createElementBlock as m, openBlock as c, renderSlot as ge, createCommentVNode as k, toDisplayString as F, createElementVNode as u, defineComponent as G, mergeModels as q, useModel as U, computed as P, Fragment as S, withDirectives as M, createBlock as Q, createVNode as _, vShow as R, renderList as j, withCtx as X, createTextVNode as Ie, ref as f, watch as W, normalizeClass as Ee, withKeys as he, vModelText as Te, normalizeStyle as xe } from "vue";
|
|
2
|
+
import { _ as A, v as ye, u as De } from "./SectionHeading.vue_vue_type_style_index_0_scoped_f06e9b7d_lang-B5ALSUVO.js";
|
|
3
|
+
import { o as Me, a as Pe } from "./index-CpKfM262.js";
|
|
4
|
+
import { u as be, a as we, s as Re, f as Ae, o as Ne } from "./floating-ui.vue-CDo9Kas1.js";
|
|
5
|
+
import { N as Se } from "./NumberInput-DWTImcA_.js";
|
|
6
|
+
import { V as Ve } from "./ValueSwitch-Ozmr1YfK.js";
|
|
7
|
+
const Ce = {
|
|
8
|
+
name: "Tooltip",
|
|
9
|
+
props: {
|
|
10
|
+
text: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}, Oe = { class: "tooltip" }, Fe = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "text"
|
|
18
|
+
};
|
|
19
|
+
function qe(e, n, o, t, r, l) {
|
|
20
|
+
return c(), m("div", Oe, [
|
|
21
|
+
ge(e.$slots, "default", {}, void 0, !0),
|
|
22
|
+
o.text ? (c(), m(
|
|
23
|
+
"span",
|
|
24
|
+
Fe,
|
|
25
|
+
F(o.text),
|
|
26
|
+
1
|
|
27
|
+
/* TEXT */
|
|
28
|
+
)) : k("v-if", !0)
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
const Ue = /* @__PURE__ */ A(Ce, [["render", qe], ["__scopeId", "data-v-aa04c956"], ["__file", "/Users/albrecht/Documents/KNIME/git/webapps-common/packages/components/src/components/Tooltip/Tooltip.vue"]]), ee = (e, n) => ({
|
|
32
|
+
negative: e,
|
|
33
|
+
years: parseInt(n[1] ?? "0", 10),
|
|
34
|
+
months: parseInt(n[2] ?? "0", 10),
|
|
35
|
+
weeks: parseInt(n[3] ?? "0", 10),
|
|
36
|
+
days: parseInt(n[4] ?? "0", 10)
|
|
37
|
+
}), te = (e, n) => {
|
|
38
|
+
const o = parseInt(n[4]?.padEnd(3, "0") ?? "0", 10);
|
|
39
|
+
return {
|
|
40
|
+
negative: e,
|
|
41
|
+
hours: parseInt(n[1] ?? "0", 10),
|
|
42
|
+
minutes: parseInt(n[2] ?? "0", 10),
|
|
43
|
+
seconds: parseInt(n[3] ?? "0", 10),
|
|
44
|
+
milliseconds: o
|
|
45
|
+
};
|
|
46
|
+
}, 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) => {
|
|
47
|
+
let n = "P";
|
|
48
|
+
return e.type === "DATE" ? n += `${e.interval.years}Y${e.interval.months}M${e.interval.weeks}W${e.interval.days}D` : n += `T${e.interval.hours}H${e.interval.minutes}M${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")}S`, e.interval.negative && (n = `-${n}`), n;
|
|
49
|
+
}, D = (e) => {
|
|
50
|
+
const n = (t, r) => t === 0 ? "" : t === 1 ? `${t} ${r} ` : `${t} ${r}s `;
|
|
51
|
+
let o = "";
|
|
52
|
+
if (e.type === "DATE") {
|
|
53
|
+
if (z(e))
|
|
54
|
+
return "0 days";
|
|
55
|
+
o += n(e.interval.years, "year"), o += n(e.interval.months, "month"), o += n(e.interval.weeks, "week"), o += n(e.interval.days, "day");
|
|
56
|
+
} else {
|
|
57
|
+
if (z(e))
|
|
58
|
+
return "0 seconds";
|
|
59
|
+
o += n(e.interval.hours, "hour"), o += n(e.interval.minutes, "minute");
|
|
60
|
+
const t = e.interval.milliseconds === 0;
|
|
61
|
+
(e.interval.seconds !== 0 || !t) && (t ? o += n(e.interval.seconds, "second") : o += `${e.interval.seconds}.${e.interval.milliseconds.toString().padStart(3, "0")} seconds `);
|
|
62
|
+
}
|
|
63
|
+
return e.interval.negative && (o = `-(${o.trim()})`), o.trim();
|
|
64
|
+
}, ne = "(\\d+)\\s*y(?:ears?)?", oe = "(\\d+)\\s*m(?:o(?:nths?)?)?", ae = "(\\d+)\\s*w(?:eeks?)?", re = "(\\d+)\\s*d(?:ays?)?", se = "(\\d+)\\s*h(?:ours?)?", le = "(\\d+)\\s*m(?:in(?:s|utes?)?)?", ie = "(\\d+)(?:[,.](\\d{1,3}))?\\s*s(?:ec(?:s|onds?)?)?", de = new RegExp(
|
|
65
|
+
`^(?:${ne})?\\s*(?:${oe})?\\s*(?:${ae})?\\s*(?:${re})?\\s*$`,
|
|
66
|
+
"i"
|
|
67
|
+
), ue = new RegExp(
|
|
68
|
+
`^(?:${se})?\\s*(?:${le})?\\s*(?:${ie})?$`,
|
|
69
|
+
"i"
|
|
70
|
+
), ke = new RegExp(
|
|
71
|
+
`^\\s*-\\s*\\(\\s*${de.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
|
|
72
|
+
"i"
|
|
73
|
+
), Ge = new RegExp(
|
|
74
|
+
`^\\s*-\\s*(?:\\s*${ne}|${oe}|${ae}|${re})\\s*$`,
|
|
75
|
+
"i"
|
|
76
|
+
), Be = new RegExp(
|
|
77
|
+
`^\\s*-\\s*\\(\\s*${ue.source.replace(/[$^]/g, "")}\\s*\\)\\s*$`,
|
|
78
|
+
"i"
|
|
79
|
+
), Ke = new RegExp(
|
|
80
|
+
`^\\s*-\\s*(?:\\s*${se}|${le}|${ie})\\s*$`,
|
|
81
|
+
"i"
|
|
82
|
+
), ce = (e) => {
|
|
83
|
+
if (e = e?.trim(), !e)
|
|
84
|
+
throw new Error("Empty interval string");
|
|
85
|
+
const n = de.exec(e), o = ke.exec(e) ?? Ge.exec(e), t = ue.exec(e), r = Be.exec(e) ?? Ke.exec(e), l = n ?? o, a = t ?? r, i = (o ?? r) !== null;
|
|
86
|
+
if (a && l)
|
|
87
|
+
throw new Error("Ambiguous time format");
|
|
88
|
+
if (l)
|
|
89
|
+
return {
|
|
90
|
+
type: "DATE",
|
|
91
|
+
interval: ee(i, l)
|
|
92
|
+
};
|
|
93
|
+
if (a)
|
|
94
|
+
return {
|
|
95
|
+
type: "TIME",
|
|
96
|
+
interval: te(i, a)
|
|
97
|
+
};
|
|
98
|
+
throw new Error(`Invalid human readable time: ${e}`);
|
|
99
|
+
}, pe = (e, n) => {
|
|
100
|
+
try {
|
|
101
|
+
const o = ce(e), t = o.type, r = o.interval.negative;
|
|
102
|
+
if (t === n || n === "DATE_OR_TIME")
|
|
103
|
+
return {
|
|
104
|
+
valid: !0,
|
|
105
|
+
type: t,
|
|
106
|
+
negative: r
|
|
107
|
+
};
|
|
108
|
+
} catch {
|
|
109
|
+
return { valid: !1 };
|
|
110
|
+
}
|
|
111
|
+
}, x = (e) => {
|
|
112
|
+
if (e = e?.trim(), ["", "P", "PT", "-", "-P", "-PT"].includes(e))
|
|
113
|
+
throw new Error("Empty ISO duration");
|
|
114
|
+
const n = /^-?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?$/, o = /^-?PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)(?:[,.](\d{1,3}))?S)?$/, t = n.exec(e), r = o.exec(e);
|
|
115
|
+
if (t)
|
|
116
|
+
return {
|
|
117
|
+
type: "DATE",
|
|
118
|
+
interval: ee(
|
|
119
|
+
e.startsWith("-"),
|
|
120
|
+
t
|
|
121
|
+
)
|
|
122
|
+
};
|
|
123
|
+
if (r)
|
|
124
|
+
return {
|
|
125
|
+
type: "TIME",
|
|
126
|
+
interval: te(
|
|
127
|
+
e.startsWith("-"),
|
|
128
|
+
r
|
|
129
|
+
)
|
|
130
|
+
};
|
|
131
|
+
throw new Error(`Invalid ISO duration: ${e}`);
|
|
132
|
+
}, me = (e, n) => {
|
|
133
|
+
try {
|
|
134
|
+
const o = x(e), t = o.type, r = o.interval.negative;
|
|
135
|
+
if (t === n || n === "DATE_OR_TIME")
|
|
136
|
+
return {
|
|
137
|
+
valid: !0,
|
|
138
|
+
type: t,
|
|
139
|
+
negative: r
|
|
140
|
+
};
|
|
141
|
+
} catch {
|
|
142
|
+
return { valid: !1 };
|
|
143
|
+
}
|
|
144
|
+
}, $e = (e) => {
|
|
145
|
+
const n = me(e, "DATE_OR_TIME"), o = pe(
|
|
146
|
+
e,
|
|
147
|
+
"DATE_OR_TIME"
|
|
148
|
+
);
|
|
149
|
+
if (n.valid)
|
|
150
|
+
return x(e);
|
|
151
|
+
if (o.valid)
|
|
152
|
+
return ce(e);
|
|
153
|
+
throw new Error(`Invalid interval string: ${e}`);
|
|
154
|
+
}, C = (e, n) => {
|
|
155
|
+
const o = me(e, n), t = pe(e, n);
|
|
156
|
+
return o.valid ? o : t.valid ? t : { valid: !1 };
|
|
157
|
+
}, He = {
|
|
158
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
159
|
+
fill: "none",
|
|
160
|
+
stroke: "#000",
|
|
161
|
+
"stroke-linejoin": "round",
|
|
162
|
+
viewBox: "0 0 32 32"
|
|
163
|
+
};
|
|
164
|
+
function je(e, n) {
|
|
165
|
+
return c(), m("svg", He, n[0] || (n[0] = [
|
|
166
|
+
u(
|
|
167
|
+
"path",
|
|
168
|
+
{ 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" },
|
|
169
|
+
null,
|
|
170
|
+
-1
|
|
171
|
+
/* CACHED */
|
|
172
|
+
)
|
|
173
|
+
]));
|
|
174
|
+
}
|
|
175
|
+
const Xe = { render: je }, L = [
|
|
176
|
+
"years",
|
|
177
|
+
"months",
|
|
178
|
+
"weeks",
|
|
179
|
+
"days"
|
|
180
|
+
], Y = [
|
|
181
|
+
"hours",
|
|
182
|
+
"minutes",
|
|
183
|
+
"seconds",
|
|
184
|
+
"milliseconds"
|
|
185
|
+
], O = {
|
|
186
|
+
years: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
187
|
+
months: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
188
|
+
weeks: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
189
|
+
days: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
190
|
+
hours: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
191
|
+
minutes: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
192
|
+
seconds: { min: 0, max: Number.MAX_SAFE_INTEGER },
|
|
193
|
+
milliseconds: { min: 0, max: 999 }
|
|
194
|
+
}, Z = (e, n) => n === "DATE" ? {
|
|
195
|
+
type: "DATE",
|
|
196
|
+
interval: e.periodPart
|
|
197
|
+
} : {
|
|
198
|
+
type: "TIME",
|
|
199
|
+
interval: e.durationPart
|
|
200
|
+
}, w = (e, n) => e.type === "DATE" ? {
|
|
201
|
+
...n,
|
|
202
|
+
periodPart: e.interval
|
|
203
|
+
} : {
|
|
204
|
+
...n,
|
|
205
|
+
durationPart: e.interval
|
|
206
|
+
}, J = (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), We = /* @__PURE__ */ G({
|
|
207
|
+
__name: "IntervalInputPopoverContent",
|
|
208
|
+
props: /* @__PURE__ */ q({
|
|
209
|
+
format: { type: String, required: !0 },
|
|
210
|
+
allowDescending: { type: Boolean, required: !0 }
|
|
211
|
+
}, {
|
|
212
|
+
usedFormat: { type: String, required: !0 },
|
|
213
|
+
usedFormatModifiers: {},
|
|
214
|
+
modelValue: { type: Object, required: !0 },
|
|
215
|
+
modelModifiers: {}
|
|
216
|
+
}),
|
|
217
|
+
emits: /* @__PURE__ */ q(["commit"], ["update:usedFormat", "update:modelValue"]),
|
|
218
|
+
setup(e, { expose: n, emit: o }) {
|
|
219
|
+
n();
|
|
220
|
+
const t = o, r = e, l = U(e, "usedFormat"), a = U(e, "modelValue"), i = P(() => {
|
|
221
|
+
const v = l.value === "DATE" ? L : Y, y = l.value === "DATE" ? v.map(
|
|
222
|
+
(p) => a.value.periodPart[p]
|
|
223
|
+
) : v.map(
|
|
224
|
+
(p) => a.value.durationPart[p]
|
|
225
|
+
);
|
|
226
|
+
for (let p = 0; p < y.length; p++) {
|
|
227
|
+
const E = v[p], h = y[p];
|
|
228
|
+
if (isNaN(h) || h < O[E].min || h > O[E].max)
|
|
229
|
+
return {
|
|
230
|
+
valid: !1,
|
|
231
|
+
reason: `${J(E)} out of bounds.`
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return { valid: !0 };
|
|
235
|
+
}), g = P({
|
|
236
|
+
get() {
|
|
237
|
+
return r.allowDescending ? l.value === "DATE" ? a.value.periodPart.negative ? "DESCENDING" : "ASCENDING" : a.value.durationPart.negative ? "DESCENDING" : "ASCENDING" : "ASCENDING";
|
|
238
|
+
},
|
|
239
|
+
set(v) {
|
|
240
|
+
a.value.periodPart.negative = v === "DESCENDING", a.value.durationPart.negative = v === "DESCENDING";
|
|
241
|
+
}
|
|
242
|
+
}), I = { emit: t, props: r, popoverUsedFormat: l, popoverModel: a, isPopoverModelValid: i, ascendingOrDescending: g, requestSavePopup: () => {
|
|
243
|
+
t(
|
|
244
|
+
"commit",
|
|
245
|
+
l.value,
|
|
246
|
+
a.value,
|
|
247
|
+
g.value
|
|
248
|
+
);
|
|
249
|
+
}, FunctionButton: ye, Tooltip: Ue, NumberInput: Se, ValueSwitch: Ve, get bounds() {
|
|
250
|
+
return O;
|
|
251
|
+
}, get durationNumericKeys() {
|
|
252
|
+
return Y;
|
|
253
|
+
}, get periodNumericKeys() {
|
|
254
|
+
return L;
|
|
255
|
+
}, get toTitleCase() {
|
|
256
|
+
return J;
|
|
257
|
+
} };
|
|
258
|
+
return Object.defineProperty(I, "__isScriptSetup", { enumerable: !1, value: !0 }), I;
|
|
259
|
+
}
|
|
260
|
+
}), ze = { class: "header" }, Le = { class: "ascending-descending-switch-container" }, Ye = { class: "input-grid" }, Ze = { class: "input-label" }, Je = { class: "input-label" }, Qe = { class: "accept-controls" };
|
|
261
|
+
function et(e, n, o, t, r, l) {
|
|
262
|
+
return c(), m(
|
|
263
|
+
S,
|
|
264
|
+
null,
|
|
265
|
+
[
|
|
266
|
+
u("span", ze, [
|
|
267
|
+
n[2] || (n[2] = u(
|
|
268
|
+
"span",
|
|
269
|
+
{ class: "input-title" },
|
|
270
|
+
"Interval",
|
|
271
|
+
-1
|
|
272
|
+
/* CACHED */
|
|
273
|
+
)),
|
|
274
|
+
t.props.format === "DATE_OR_TIME" ? (c(), Q(t.ValueSwitch, {
|
|
275
|
+
key: 0,
|
|
276
|
+
modelValue: t.popoverUsedFormat,
|
|
277
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => t.popoverUsedFormat = a),
|
|
278
|
+
"possible-values": [
|
|
279
|
+
{ id: "DATE", text: "Date" },
|
|
280
|
+
{ id: "TIME", text: "Time" }
|
|
281
|
+
],
|
|
282
|
+
compact: ""
|
|
283
|
+
}, null, 8, ["modelValue"])) : k("v-if", !0)
|
|
284
|
+
]),
|
|
285
|
+
M(u(
|
|
286
|
+
"div",
|
|
287
|
+
Le,
|
|
288
|
+
[
|
|
289
|
+
_(t.ValueSwitch, {
|
|
290
|
+
modelValue: t.ascendingOrDescending,
|
|
291
|
+
"onUpdate:modelValue": n[1] || (n[1] = (a) => t.ascendingOrDescending = a),
|
|
292
|
+
compact: "",
|
|
293
|
+
"possible-values": [
|
|
294
|
+
{ id: "ASCENDING", text: "Forward" },
|
|
295
|
+
{ id: "DESCENDING", text: "Backward" }
|
|
296
|
+
]
|
|
297
|
+
}, null, 8, ["modelValue"])
|
|
298
|
+
],
|
|
299
|
+
512
|
|
300
|
+
/* NEED_PATCH */
|
|
301
|
+
), [
|
|
302
|
+
[R, o.allowDescending]
|
|
303
|
+
]),
|
|
304
|
+
u("div", Ye, [
|
|
305
|
+
(c(!0), m(
|
|
306
|
+
S,
|
|
307
|
+
null,
|
|
308
|
+
j(t.periodNumericKeys, (a) => M((c(), m(
|
|
309
|
+
"span",
|
|
310
|
+
{
|
|
311
|
+
key: a,
|
|
312
|
+
class: "labeled-date-time-input"
|
|
313
|
+
},
|
|
314
|
+
[
|
|
315
|
+
u(
|
|
316
|
+
"span",
|
|
317
|
+
Ze,
|
|
318
|
+
F(t.toTitleCase(a)),
|
|
319
|
+
1
|
|
320
|
+
/* TEXT */
|
|
321
|
+
),
|
|
322
|
+
_(t.NumberInput, {
|
|
323
|
+
modelValue: t.popoverModel.periodPart[a],
|
|
324
|
+
"onUpdate:modelValue": (i) => t.popoverModel.periodPart[a] = i,
|
|
325
|
+
min: t.bounds[a].min,
|
|
326
|
+
max: t.bounds[a].max,
|
|
327
|
+
compact: "",
|
|
328
|
+
type: "integer"
|
|
329
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max"])
|
|
330
|
+
],
|
|
331
|
+
512
|
|
332
|
+
/* NEED_PATCH */
|
|
333
|
+
)), [
|
|
334
|
+
[R, t.popoverUsedFormat === "DATE"]
|
|
335
|
+
])),
|
|
336
|
+
128
|
|
337
|
+
/* KEYED_FRAGMENT */
|
|
338
|
+
)),
|
|
339
|
+
(c(!0), m(
|
|
340
|
+
S,
|
|
341
|
+
null,
|
|
342
|
+
j(t.durationNumericKeys, (a) => M((c(), m(
|
|
343
|
+
"span",
|
|
344
|
+
{
|
|
345
|
+
key: a,
|
|
346
|
+
class: "labeled-date-time-input"
|
|
347
|
+
},
|
|
348
|
+
[
|
|
349
|
+
u(
|
|
350
|
+
"span",
|
|
351
|
+
Je,
|
|
352
|
+
F(t.toTitleCase(a)),
|
|
353
|
+
1
|
|
354
|
+
/* TEXT */
|
|
355
|
+
),
|
|
356
|
+
_(t.NumberInput, {
|
|
357
|
+
"model-value": t.popoverModel.durationPart[a],
|
|
358
|
+
min: t.bounds[a].min,
|
|
359
|
+
max: t.bounds[a].max,
|
|
360
|
+
compact: "",
|
|
361
|
+
type: "integer",
|
|
362
|
+
"onUpdate:modelValue": (i) => {
|
|
363
|
+
t.popoverModel.durationPart[a] = i;
|
|
364
|
+
}
|
|
365
|
+
}, null, 8, ["model-value", "min", "max", "onUpdate:modelValue"])
|
|
366
|
+
],
|
|
367
|
+
512
|
|
368
|
+
/* NEED_PATCH */
|
|
369
|
+
)), [
|
|
370
|
+
[R, t.popoverUsedFormat === "TIME"]
|
|
371
|
+
])),
|
|
372
|
+
128
|
|
373
|
+
/* KEYED_FRAGMENT */
|
|
374
|
+
))
|
|
375
|
+
]),
|
|
376
|
+
u("div", Qe, [
|
|
377
|
+
_(t.Tooltip, {
|
|
378
|
+
text: t.isPopoverModelValid.valid ? "" : t.isPopoverModelValid.reason
|
|
379
|
+
}, {
|
|
380
|
+
default: X(() => [
|
|
381
|
+
_(t.FunctionButton, {
|
|
382
|
+
primary: "",
|
|
383
|
+
disabled: !t.isPopoverModelValid.valid,
|
|
384
|
+
onClick: t.requestSavePopup
|
|
385
|
+
}, {
|
|
386
|
+
default: X(() => n[3] || (n[3] = [
|
|
387
|
+
Ie(
|
|
388
|
+
" Set ",
|
|
389
|
+
-1
|
|
390
|
+
/* CACHED */
|
|
391
|
+
)
|
|
392
|
+
])),
|
|
393
|
+
_: 1,
|
|
394
|
+
__: [3]
|
|
395
|
+
}, 8, ["disabled"])
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
/* STABLE */
|
|
399
|
+
}, 8, ["text"])
|
|
400
|
+
])
|
|
401
|
+
],
|
|
402
|
+
64
|
|
403
|
+
/* STABLE_FRAGMENT */
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
const tt = /* @__PURE__ */ A(We, [["render", et], ["__scopeId", "data-v-4f5b672e"], ["__file", "/Users/albrecht/Documents/KNIME/git/webapps-common/packages/components/src/components/forms/IntervalInput/components/IntervalInputPopoverContent.vue"]]), nt = {}, ot = /* @__PURE__ */ G({
|
|
407
|
+
...nt,
|
|
408
|
+
__name: "IntervalInput",
|
|
409
|
+
props: /* @__PURE__ */ q({
|
|
410
|
+
format: { type: String, required: !1, default: "DATE_OR_TIME" },
|
|
411
|
+
allowDescending: { type: Boolean, required: !1, default: !0 },
|
|
412
|
+
disabled: { type: Boolean, required: !1, default: !1 },
|
|
413
|
+
compact: { type: Boolean, required: !1, default: !1 }
|
|
414
|
+
}, {
|
|
415
|
+
modelValue: { type: String, required: !0 },
|
|
416
|
+
modelModifiers: {}
|
|
417
|
+
}),
|
|
418
|
+
emits: ["update:modelValue"],
|
|
419
|
+
setup(e, { expose: n }) {
|
|
420
|
+
n();
|
|
421
|
+
const o = e, t = U(e, "modelValue"), r = f(
|
|
422
|
+
(() => {
|
|
423
|
+
if (o.format === "DATE_OR_TIME") {
|
|
424
|
+
const s = C(
|
|
425
|
+
t.value,
|
|
426
|
+
"DATE_OR_TIME"
|
|
427
|
+
);
|
|
428
|
+
return s.valid ? s.type : "DATE";
|
|
429
|
+
} else
|
|
430
|
+
return o.format;
|
|
431
|
+
})()
|
|
432
|
+
), l = P(() => r.value === "DATE" ? "ISO-8601, whole words (1 year), single letters (1y)" : "ISO-8601, whole words (1 hour), single letters (1h)"), a = f(
|
|
433
|
+
(() => {
|
|
434
|
+
const s = x(
|
|
435
|
+
t.value
|
|
436
|
+
);
|
|
437
|
+
return w(s, {
|
|
438
|
+
periodPart: {
|
|
439
|
+
negative: !1,
|
|
440
|
+
years: 0,
|
|
441
|
+
months: 0,
|
|
442
|
+
weeks: 0,
|
|
443
|
+
days: 1
|
|
444
|
+
},
|
|
445
|
+
durationPart: {
|
|
446
|
+
negative: !1,
|
|
447
|
+
hours: 0,
|
|
448
|
+
minutes: 0,
|
|
449
|
+
seconds: 1,
|
|
450
|
+
milliseconds: 0
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
})()
|
|
454
|
+
), i = f(
|
|
455
|
+
D(
|
|
456
|
+
x(t.value)
|
|
457
|
+
)
|
|
458
|
+
), g = P(() => {
|
|
459
|
+
const s = C(
|
|
460
|
+
i.value,
|
|
461
|
+
"DATE_OR_TIME"
|
|
462
|
+
);
|
|
463
|
+
return s.valid && (o.allowDescending || !s.negative) && (s.type === r.value || o.format === "DATE_OR_TIME");
|
|
464
|
+
}), b = f(null), I = f(null), v = f(null), y = (s, d) => {
|
|
465
|
+
const T = Z(
|
|
466
|
+
s,
|
|
467
|
+
d
|
|
468
|
+
);
|
|
469
|
+
i.value = D(T), t.value = V(T), r.value = d, a.value = s;
|
|
470
|
+
}, p = () => {
|
|
471
|
+
a.value = w(
|
|
472
|
+
x(t.value),
|
|
473
|
+
a.value
|
|
474
|
+
);
|
|
475
|
+
}, E = (s) => {
|
|
476
|
+
const d = C(
|
|
477
|
+
s,
|
|
478
|
+
"DATE_OR_TIME"
|
|
479
|
+
);
|
|
480
|
+
if (!d.valid || !o.allowDescending && d.negative || d.type !== r.value && o.format !== "DATE_OR_TIME")
|
|
481
|
+
return;
|
|
482
|
+
const T = $e(
|
|
483
|
+
s
|
|
484
|
+
);
|
|
485
|
+
a.value = w(
|
|
486
|
+
T,
|
|
487
|
+
a.value
|
|
488
|
+
), t.value = V(T), r.value = d.type, i.value = D(T);
|
|
489
|
+
}, h = (s) => {
|
|
490
|
+
const d = x(s);
|
|
491
|
+
i.value = D(d), a.value = w(
|
|
492
|
+
d,
|
|
493
|
+
a.value
|
|
494
|
+
), t.value = s;
|
|
495
|
+
}, B = (s) => {
|
|
496
|
+
const d = Z(
|
|
497
|
+
a.value,
|
|
498
|
+
s
|
|
499
|
+
);
|
|
500
|
+
i.value = D(d), t.value = V(d), r.value = s;
|
|
501
|
+
}, K = (s) => {
|
|
502
|
+
s !== "DATE_OR_TIME" && B(s);
|
|
503
|
+
}, $ = f(!1);
|
|
504
|
+
W(() => o.format, K), W(t, h);
|
|
505
|
+
const ve = (s) => {
|
|
506
|
+
E(s);
|
|
507
|
+
}, N = (s, d) => {
|
|
508
|
+
s && d ? y(
|
|
509
|
+
d.popoverValues,
|
|
510
|
+
d.usedFormat
|
|
511
|
+
) : p(), $.value = !1;
|
|
512
|
+
};
|
|
513
|
+
Me(b, () => N(!1), {
|
|
514
|
+
ignore: [I]
|
|
515
|
+
}), Pe("Escape", () => N(!1));
|
|
516
|
+
const { floatingStyles: fe, update: _e } = be(I, b, {
|
|
517
|
+
middleware: [
|
|
518
|
+
Re(),
|
|
519
|
+
// move left/right to keep it on screen
|
|
520
|
+
Ae({
|
|
521
|
+
// flip it vertically to keep it on screen
|
|
522
|
+
mainAxis: !0,
|
|
523
|
+
crossAxis: !1
|
|
524
|
+
}),
|
|
525
|
+
Ne({
|
|
526
|
+
// move it a bit away from the button vertically
|
|
527
|
+
mainAxis: 2,
|
|
528
|
+
// vertical
|
|
529
|
+
crossAxis: 0
|
|
530
|
+
// horizontal
|
|
531
|
+
})
|
|
532
|
+
],
|
|
533
|
+
placement: "top-end",
|
|
534
|
+
whileElementsMounted: we
|
|
535
|
+
}), H = { props: o, exposedVModel: t, usedFormat: r, textFieldPlaceholder: l, popoverModel: a, textFieldModel: i, textFieldValueValid: g, durationInputPopoverRef: b, togglePopoverButtonRef: I, inputTextFieldRef: v, updateAllModelsToMatchPopoverModel: y, resetPopoverModelToMatchOtherModels: p, updateAllModelsToMatchPossiblyValidTextFieldModel: E, updateAllModelsToMatchExposedModel: h, updateAllModelsToMatchUsedFormat: B, updateAllModelsToMatchFormatProp: K, showPopOver: $, onCommitTextInputChanges: ve, onCommitPopupChanges: N, popoverFloatingStyles: fe, updateFloating: _e, get DurationIcon() {
|
|
536
|
+
return Xe;
|
|
537
|
+
}, IntervalInputPopoverContent: tt };
|
|
538
|
+
return Object.defineProperty(H, "__isScriptSetup", { enumerable: !1, value: !0 }), H;
|
|
539
|
+
}
|
|
540
|
+
}), at = { class: "input-fields" }, rt = ["disabled", "placeholder"], st = {
|
|
541
|
+
key: 0,
|
|
542
|
+
class: "invalid-marker"
|
|
543
|
+
}, lt = ["disabled"];
|
|
544
|
+
function it(e, n, o, t, r, l) {
|
|
545
|
+
return c(), m("div", null, [
|
|
546
|
+
u(
|
|
547
|
+
"div",
|
|
548
|
+
{
|
|
549
|
+
class: Ee(["wrapper", { disabled: o.disabled, compact: o.compact }])
|
|
550
|
+
},
|
|
551
|
+
[
|
|
552
|
+
u("span", at, [
|
|
553
|
+
M(u("input", {
|
|
554
|
+
ref: "inputTextFieldRef",
|
|
555
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => t.textFieldModel = a),
|
|
556
|
+
type: "text",
|
|
557
|
+
disabled: o.disabled,
|
|
558
|
+
placeholder: t.textFieldPlaceholder,
|
|
559
|
+
spellcheck: "false",
|
|
560
|
+
onFocus: n[1] || (n[1] = (a) => t.showPopOver = !1),
|
|
561
|
+
onFocusout: n[2] || (n[2] = () => t.onCommitTextInputChanges(t.textFieldModel)),
|
|
562
|
+
onKeypress: n[3] || (n[3] = he(() => t.onCommitTextInputChanges(t.textFieldModel), ["enter"]))
|
|
563
|
+
}, null, 40, rt), [
|
|
564
|
+
[Te, t.textFieldModel]
|
|
565
|
+
]),
|
|
566
|
+
t.textFieldValueValid ? k("v-if", !0) : (c(), m("span", st)),
|
|
567
|
+
u("button", {
|
|
568
|
+
ref: "togglePopoverButtonRef",
|
|
569
|
+
class: "trigger-popover-button",
|
|
570
|
+
disabled: o.disabled,
|
|
571
|
+
onClick: n[4] || (n[4] = () => {
|
|
572
|
+
t.showPopOver ? t.onCommitPopupChanges(!1) : (t.showPopOver = !0, t.updateFloating());
|
|
573
|
+
})
|
|
574
|
+
}, [
|
|
575
|
+
_(t.DurationIcon)
|
|
576
|
+
], 8, lt)
|
|
577
|
+
])
|
|
578
|
+
],
|
|
579
|
+
2
|
|
580
|
+
/* CLASS */
|
|
581
|
+
),
|
|
582
|
+
M(u(
|
|
583
|
+
"div",
|
|
584
|
+
{
|
|
585
|
+
ref: "durationInputPopoverRef",
|
|
586
|
+
class: "control-popup",
|
|
587
|
+
style: xe(t.popoverFloatingStyles)
|
|
588
|
+
},
|
|
589
|
+
[
|
|
590
|
+
_(t.IntervalInputPopoverContent, {
|
|
591
|
+
"model-value": t.popoverModel,
|
|
592
|
+
"used-format": t.usedFormat,
|
|
593
|
+
format: t.props.format,
|
|
594
|
+
"allow-descending": t.props.allowDescending,
|
|
595
|
+
onCommit: n[5] || (n[5] = (a, i, g) => t.onCommitPopupChanges(!0, {
|
|
596
|
+
usedFormat: a,
|
|
597
|
+
popoverValues: i,
|
|
598
|
+
directionality: g
|
|
599
|
+
}))
|
|
600
|
+
}, null, 8, ["model-value", "used-format", "format", "allow-descending"])
|
|
601
|
+
],
|
|
602
|
+
4
|
|
603
|
+
/* STYLE */
|
|
604
|
+
), [
|
|
605
|
+
[R, t.showPopOver]
|
|
606
|
+
])
|
|
607
|
+
]);
|
|
608
|
+
}
|
|
609
|
+
const dt = /* @__PURE__ */ A(ot, [["render", it], ["__scopeId", "data-v-a2518806"], ["__file", "/Users/albrecht/Documents/KNIME/git/webapps-common/packages/components/src/components/forms/IntervalInput/IntervalInput.vue"]]), ut = /* @__PURE__ */ G({
|
|
610
|
+
__name: "IntervalControl",
|
|
611
|
+
props: {
|
|
612
|
+
control: { type: Object, required: !0 },
|
|
613
|
+
handleChange: { type: Function, required: !0 },
|
|
614
|
+
changeValue: { type: Function, required: !0 },
|
|
615
|
+
disabled: { type: Boolean, required: !0 },
|
|
616
|
+
isValid: { type: Boolean, required: !0 },
|
|
617
|
+
onRegisterValidation: { type: Function, required: !0 },
|
|
618
|
+
labelForId: { type: String, required: !0 }
|
|
619
|
+
},
|
|
620
|
+
setup(e, { expose: n }) {
|
|
621
|
+
n();
|
|
622
|
+
const o = e, t = P(
|
|
623
|
+
() => o.control.uischema
|
|
624
|
+
), r = De(
|
|
625
|
+
t,
|
|
626
|
+
"intervalType",
|
|
627
|
+
"DATE_OR_TIME"
|
|
628
|
+
), l = { props: o, uischema: t, intervalType: r, get IntervalInput() {
|
|
629
|
+
return dt;
|
|
630
|
+
} };
|
|
631
|
+
return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
function ct(e, n, o, t, r, l) {
|
|
635
|
+
return c(), Q(t.IntervalInput, {
|
|
636
|
+
id: o.labelForId,
|
|
637
|
+
compact: "",
|
|
638
|
+
disabled: o.disabled,
|
|
639
|
+
"model-value": o.control.data,
|
|
640
|
+
format: t.intervalType,
|
|
641
|
+
"onUpdate:modelValue": o.changeValue
|
|
642
|
+
}, null, 8, ["id", "disabled", "model-value", "format", "onUpdate:modelValue"]);
|
|
643
|
+
}
|
|
644
|
+
const It = /* @__PURE__ */ A(ut, [["render", ct], ["__file", "/Users/albrecht/Documents/KNIME/git/webapps-common/packages/jsonforms/src/uiComponents/IntervalControl.vue"]]);
|
|
645
|
+
export {
|
|
646
|
+
It as default
|
|
647
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as u, computed as s, createBlock as d, openBlock as p, mergeProps as c, withCtx as m, createCommentVNode as b } from "vue";
|
|
2
|
+
import { L as g } from "./LoadingIcon-RPBUjTO3.js";
|
|
3
|
+
import { D as _ } from "./Dropdown-D49sEHBa.js";
|
|
4
|
+
import { _ as f } from "./SectionHeading.vue_vue_type_style_index_0_scoped_f06e9b7d_lang-B5ALSUVO.js";
|
|
5
|
+
const V = /* @__PURE__ */ u({
|
|
6
|
+
__name: "LoadingDropdown",
|
|
7
|
+
props: {
|
|
8
|
+
possibleValues: { type: [Array, null], required: !0 },
|
|
9
|
+
modelValue: { type: String, required: !0 },
|
|
10
|
+
id: { type: String, required: !0 },
|
|
11
|
+
ariaLabel: { type: String, required: !0 },
|
|
12
|
+
disabled: { type: Boolean, required: !0 }
|
|
13
|
+
},
|
|
14
|
+
setup(r, { expose: n }) {
|
|
15
|
+
n();
|
|
16
|
+
const e = r, o = s(() => {
|
|
17
|
+
const { possibleValues: i } = e;
|
|
18
|
+
return i === null ? "Loading" : i.length > 0 ? "No value selected" : "No values present";
|
|
19
|
+
}), l = s(() => e.possibleValues === null ? "" : e.modelValue), a = s(
|
|
20
|
+
() => e.disabled || e.possibleValues === null || e.possibleValues.length === 0
|
|
21
|
+
), t = { props: e, placeholderText: o, asyncValue: l, disabledOrNoOptions: a, get Dropdown() {
|
|
22
|
+
return _;
|
|
23
|
+
}, get LoadingIcon() {
|
|
24
|
+
return g;
|
|
25
|
+
} };
|
|
26
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
function h(r, n, e, o, l, a) {
|
|
30
|
+
return p(), d(o.Dropdown, c({ ...r.$props, ...r.$attrs }, {
|
|
31
|
+
"model-value": o.asyncValue,
|
|
32
|
+
disabled: o.disabledOrNoOptions,
|
|
33
|
+
"possible-values": e.possibleValues ?? [],
|
|
34
|
+
placeholder: o.placeholderText,
|
|
35
|
+
compact: ""
|
|
36
|
+
}), {
|
|
37
|
+
"icon-right": m(() => [
|
|
38
|
+
e.possibleValues === null ? (p(), d(o.LoadingIcon, {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "loading-icon"
|
|
41
|
+
})) : b("v-if", !0)
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
/* STABLE */
|
|
45
|
+
}, 16, ["model-value", "disabled", "possible-values", "placeholder"]);
|
|
46
|
+
}
|
|
47
|
+
const D = /* @__PURE__ */ f(V, [["render", h], ["__scopeId", "data-v-cb6c2a90"], ["__file", "/Users/albrecht/Documents/KNIME/git/webapps-common/packages/jsonforms/src/uiComponents/loading/LoadingDropdown.vue"]]);
|
|
48
|
+
export {
|
|
49
|
+
D as L
|
|
50
|
+
};
|