@knime/jsonforms 1.9.2 → 1.9.4
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 +14 -0
- package/dist/{AnyOfTwinlist-BPOZOLti.js → AnyOfTwinlist-D1KycEHY.js} +1 -1
- package/dist/{Button-eJKYDCkd.js → Button-Dj1USqpr.js} +4 -5
- package/dist/{Checkbox-Cn75drbc.js → Checkbox-5l-7O-Rc.js} +1 -1
- package/dist/{CheckboxControl-CZI1ksFg.js → CheckboxControl-CcV_DXsi.js} +2 -2
- package/dist/{Checkboxes-DkHfcl3G.js → Checkboxes-TSVYIY6A.js} +2 -2
- package/dist/{CheckboxesControl-mDBFA4w8.js → CheckboxesControl-CEIBobjb.js} +2 -2
- package/dist/{ComboBoxControl-D21AHICP.js → ComboBoxControl-FTELjHzm.js} +20 -21
- package/dist/{DateControl-CoZARCXP.js → DateControl-CF5FYRLV.js} +1 -1
- package/dist/{DateTimeControl-Cy5gTvNj.js → DateTimeControl-D1B_TgdP.js} +2 -2
- package/dist/DateTimeFormatInput--ahcIWAg.js +381 -0
- package/dist/{DateTimeFormatPickerControl-tGAM1JkC.js → DateTimeFormatPickerControl-BliVRAB0.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-BclhGpyC.js → DateTimeFormatPickerWithTypeControl-CXseluiT.js} +3 -3
- package/dist/{DateTimeInput-DdlMeRDs.js → DateTimeInput-DqqCRfzR.js} +4 -5
- package/dist/{Dropdown-DXrbBJkL.js → Dropdown-BfqaIGuC.js} +27 -28
- package/dist/{DropdownControl-CCHrJ6le.js → DropdownControl-D8-qWkOR.js} +4 -4
- package/dist/{HorizontalLayout-DygZj0o9.js → HorizontalLayout-CWRVRpwR.js} +1 -1
- package/dist/{InputField-Bvyoaw2O.js → InputField-C2yLbANc.js} +1 -1
- package/dist/{IntegerControl-DsenUVe6.js → IntegerControl-Bz5KWKoG.js} +1 -1
- package/dist/{IntervalControl-DYdVuEIn.js → IntervalControl-B0CHqejJ.js} +16 -17
- package/dist/{LoadingDropdown-B04_zKDo.js → LoadingDropdown-fVxRhH6V.js} +3 -3
- package/dist/{MultimodeTwinlistControl-84S7d7BP.js → MultimodeTwinlistControl-DV_0SHHy.js} +5 -5
- package/dist/{MultiselectListBox-D1l5U70X.js → MultiselectListBox-Cn7ngRfj.js} +1 -1
- package/dist/{NameFilter-CxG07CNi.js → NameFilter-DTecZo_d.js} +1 -1
- package/dist/{NumberControl-Ds5fzpFG.js → NumberControl-Bv6y2n41.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-Da027LaV.js → NumberControlBase.vue_vue_type_script_setup_true_lang-6m9utn_F.js} +2 -2
- package/dist/{NumberInput-DNVDyuiW.js → NumberInput-Ys4Hdd7b.js} +1 -1
- package/dist/{OneOfDropdown-CX5YhB5y.js → OneOfDropdown-CDAPUCNY.js} +1 -1
- package/dist/{RadioControl-2vz2SEnY.js → RadioControl-B2pjYv6_.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-UGxGM4HJ.js → RadioControlBase.vue_vue_type_script_setup_true_lang-CclH-Wwk.js} +2 -2
- package/dist/{RichTextControl-C9zYte_e.js → RichTextControl-Cp-ZJ8Qo.js} +3341 -4054
- package/dist/{SectionHeading-D5VIHfZ6.js → SectionHeading-D0esbYSn.js} +1 -1
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-B3PkFXo7.js +13635 -0
- package/dist/{SectionLayout-FgUSzxvg.js → SectionLayout-lUG0FeYA.js} +3 -3
- package/dist/SettingsSubPanel-DlUlLFts.js +5 -0
- package/dist/{SettingsSubPanelLayout-CiSDF0QY.js → SettingsSubPanelLayout-BvbwLKfV.js} +20 -21
- package/dist/{SimpleButtonControl-E4YUEkFB.js → SimpleButtonControl-DWLU_5Ny.js} +8 -8
- package/dist/{SimpleTwinlistControl-BTXe7YwA.js → SimpleTwinlistControl-D6ORIuzH.js} +2 -2
- package/dist/{SingleSelectControl-Lr3z2PQP.js → SingleSelectControl-BKv71LA7.js} +2 -2
- package/dist/{SortListControl-D7yx8Zz-.js → SortListControl-B5N2Hqr2.js} +5 -6
- package/dist/{TextAreaControl-Dr7sr6e5.js → TextAreaControl-Bb1thkUU.js} +1 -1
- package/dist/{TextControl-CBgD2gmx.js → TextControl-CuiHsefr.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-Chd6nIT-.js → TextControl.vue_vue_type_script_setup_true_lang-DqaxrzeR.js} +4 -4
- package/dist/{TimeControl-Cm8yqjem.js → TimeControl-CfdGsohr.js} +2 -2
- package/dist/{TwinlistControlBase-D09CXwzh.js → TwinlistControlBase-CYNUKmVM.js} +3 -3
- package/dist/{TwinlistLoadingInfo-B_2E8y_B.js → TwinlistLoadingInfo-CPqVvWp4.js} +13 -14
- package/dist/{TypedStringFilter-BMlauzYE.js → TypedStringFilter-0MA1D7-X.js} +1 -1
- package/dist/{ValueSwitch-D1egJZr6.js → ValueSwitch-B6rM3Cb9.js} +1 -1
- package/dist/{ValueSwitchControl-CextiX-9.js → ValueSwitchControl-avfCCusm.js} +1 -1
- package/dist/{VerticalLayout-uvd7dU17.js → VerticalLayout-DXyKnMvI.js} +2 -2
- package/dist/{VerticalLayoutBase-CSnU3mLb.js → VerticalLayoutBase-D-TX7EUL.js} +1 -1
- package/dist/{ZonedDateTimeControl-CB0KZQXT.js → ZonedDateTimeControl-BNZ8YhWM.js} +4 -4
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +42 -43
- package/dist/{localTimeUtils-DnV5kh7m.js → localTimeUtils-Bvx7vLrT.js} +1 -1
- package/dist/{magic-string.es-B5A5AF4s.js → magic-string.es-CvzN4vs8.js} +1 -1
- package/dist/{svgWithTitle-WX_pgBsG.js → svgWithTitle-DMRd3aDh.js} +1 -1
- package/dist/testUtils/component.d.ts +13 -0
- package/dist/testing.js +1503 -1501
- package/dist/{useBuiltinValidations-LNyl7q7j.js → useBuiltinValidations-iU8yJR-J.js} +1 -1
- package/dist/useDropdownNavigation-7o7SRJSo.js +781 -0
- package/dist/{usePossibleValues-CM2RTisz.js → usePossibleValues-CQWkZRBa.js} +1 -1
- package/package.json +3 -3
- package/dist/BaseButton-6PV3BYUQ.js +0 -112
- package/dist/DateTimeFormatInput-Btt_BLk-.js +0 -347
- package/dist/FunctionButton-QVrKdZdI.js +0 -75
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-hOcQ43HC.js +0 -13322
- package/dist/SettingsSubPanel-BZE2IRG9.js +0 -142
- package/dist/useDropdownNavigation-D6ZenVxz.js +0 -55
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as a } from "vue";
|
|
2
|
-
import { u as c } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
2
|
+
import { u as c } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-B3PkFXo7.js";
|
|
3
3
|
const t = (s) => {
|
|
4
4
|
var e;
|
|
5
5
|
const u = a(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/jsonforms",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Internal JSON Forms integration for frontend KNIME projects",
|
|
5
5
|
"homepage": "https://knime.github.io/webapps-common/",
|
|
6
6
|
"license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"focus-trap-vue": "4.0.3",
|
|
16
16
|
"tabbable": "6.2.0",
|
|
17
17
|
"uuid": "10.0.0",
|
|
18
|
-
"@knime/components": "1.
|
|
19
|
-
"@knime/rich-text-editor": "1.4.
|
|
18
|
+
"@knime/components": "1.27.0",
|
|
19
|
+
"@knime/rich-text-editor": "1.4.9",
|
|
20
20
|
"@knime/styles": "1.4.0",
|
|
21
21
|
"@knime/utils": "1.4.0"
|
|
22
22
|
},
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, useSlots as l, h as a, getCurrentInstance as c, openBlock as f, createBlock as p, resolveDynamicComponent as m, mergeProps as d, withCtx as h, renderSlot as C } from "vue";
|
|
2
|
-
import { _ as k } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-hOcQ43HC.js";
|
|
3
|
-
const u = () => {
|
|
4
|
-
const t = c();
|
|
5
|
-
return t == null ? void 0 : t.appContext.app;
|
|
6
|
-
}, $ = () => {
|
|
7
|
-
const t = u(), e = t == null ? void 0 : t.component("ClientOnly");
|
|
8
|
-
return e || i({
|
|
9
|
-
render() {
|
|
10
|
-
var r, n;
|
|
11
|
-
return (n = (r = l()).default) == null ? void 0 : n.call(r);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}, b = () => {
|
|
15
|
-
const t = u(), e = t == null ? void 0 : t.component("NuxtLink");
|
|
16
|
-
if (e)
|
|
17
|
-
return e;
|
|
18
|
-
const o = t == null ? void 0 : t.component("RouterLink");
|
|
19
|
-
return o || i({
|
|
20
|
-
props: {
|
|
21
|
-
to: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ""
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
render() {
|
|
27
|
-
var n, s;
|
|
28
|
-
return a("a", { href: this.to }, [(s = (n = l()).default) == null ? void 0 : s.call(n)]);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}, y = i({
|
|
32
|
-
name: "BaseButton",
|
|
33
|
-
props: {
|
|
34
|
-
/**
|
|
35
|
-
* If set, the button renders an <a> element instead of a <button> element
|
|
36
|
-
* Has no effect when used together with `to`.
|
|
37
|
-
*/
|
|
38
|
-
href: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: ""
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* If set, the button renders a <nuxt-link> instead of a <button> element.
|
|
44
|
-
* Supersedes the `href` property.
|
|
45
|
-
*/
|
|
46
|
-
to: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: ""
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* toggle to prevent default click handler
|
|
52
|
-
*/
|
|
53
|
-
preventDefault: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: !1
|
|
56
|
-
},
|
|
57
|
-
disabled: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: !1
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
emits: ["click"],
|
|
63
|
-
computed: {
|
|
64
|
-
// TODO: Can be made into a composition function
|
|
65
|
-
component() {
|
|
66
|
-
return this.to ? b() : this.href ? "a" : "button";
|
|
67
|
-
},
|
|
68
|
-
dynamicProps() {
|
|
69
|
-
return this.to ? {
|
|
70
|
-
to: this.to,
|
|
71
|
-
event: this.preventDefault ? [] : "click"
|
|
72
|
-
} : this.href ? {
|
|
73
|
-
href: this.href
|
|
74
|
-
} : {};
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
methods: {
|
|
78
|
-
onClick(t) {
|
|
79
|
-
this.$emit("click", t), this.preventDefault && t.preventDefault();
|
|
80
|
-
},
|
|
81
|
-
/**
|
|
82
|
-
* This can be called from outside via focus on a $ref
|
|
83
|
-
*/
|
|
84
|
-
focus() {
|
|
85
|
-
var t;
|
|
86
|
-
(t = this.getComponent()) == null || t.focus();
|
|
87
|
-
},
|
|
88
|
-
/**
|
|
89
|
-
* This can be called from outside via getComponent on a $ref
|
|
90
|
-
*/
|
|
91
|
-
getComponent() {
|
|
92
|
-
return this.$refs.button;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
function B(t, e, o, r, n, s) {
|
|
97
|
-
return f(), p(m(t.component), d(t.dynamicProps, {
|
|
98
|
-
ref: "button",
|
|
99
|
-
disabled: t.disabled ? "disabled" : null,
|
|
100
|
-
onClick: t.onClick
|
|
101
|
-
}), {
|
|
102
|
-
default: h(() => [
|
|
103
|
-
C(t.$slots, "default")
|
|
104
|
-
]),
|
|
105
|
-
_: 3
|
|
106
|
-
}, 16, ["disabled", "onClick"]);
|
|
107
|
-
}
|
|
108
|
-
const D = /* @__PURE__ */ k(y, [["render", B]]);
|
|
109
|
-
export {
|
|
110
|
-
D as B,
|
|
111
|
-
$ as r
|
|
112
|
-
};
|
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
import { openBlock as m, createElementBlock as p, createElementVNode as v, defineComponent as $, computed as E, ref as f, watch as z, reactive as Z, onMounted as W, createBlock as j, createCommentVNode as V, createVNode as x, normalizeStyle as B, unref as _, withKeys as q, Fragment as G, renderList as J, normalizeClass as C, toDisplayString as S, nextTick as R, mergeModels as Q, useModel as X, withDirectives as Y, vModelText as ee } from "vue";
|
|
2
|
-
import { o as te } from "./index-Bf0xDq3g.js";
|
|
3
|
-
import { u as oe, o as le, s as ae, f as se, a as ne } from "./floating-ui.vue-B-MrqKCT.js";
|
|
4
|
-
import { u as ie } from "./useDropdownNavigation-D6ZenVxz.js";
|
|
5
|
-
import { L as re } from "./svgWithTitle-WX_pgBsG.js";
|
|
6
|
-
import { V as N } from "./ValueSwitch-D1egJZr6.js";
|
|
7
|
-
import { _ as O } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-hOcQ43HC.js";
|
|
8
|
-
const ce = {
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
fill: "none",
|
|
11
|
-
"stroke-linejoin": "round",
|
|
12
|
-
viewBox: "0 0 32 32"
|
|
13
|
-
}, de = /* @__PURE__ */ v("path", {
|
|
14
|
-
fill: "#000",
|
|
15
|
-
d: "M2 3.842v-.5a.5.5 0 0 0-.5.5zm22.611 0h.5a.5.5 0 0 0-.5-.5zm-.5 7.48a.5.5 0 1 0 1 0zM2 21.43h-.5a.5.5 0 0 0 .5.5zm10.298.5a.5.5 0 1 0 0-1zm5.283 8.222h-.5a.5.5 0 0 0 .765.424zm3.278-2.046.265.424a.5.5 0 0 0 .235-.424zm0-5.87-.366-.34a.5.5 0 0 0-.134.34zM27.613 15l.366.341a.5.5 0 0 0-.366-.841zm-10.032 7.235h.5a.5.5 0 0 0-.128-.334zM11.063 15v-.5a.5.5 0 0 0-.372.835zm-.69-9.483V2h-1v3.517zM16.155 2v3.517h1V2zM2 4.342h22.611v-1H2zm22.111-.5v7.48h1v-7.48zM2.5 21.43V3.842h-1V21.43zM2 8.362h22.611v-1H2zM12.298 20.93h-6.81v1h6.81zm-6.81 0H2v1h3.488zm12.358 9.646 3.278-2.046-.53-.849-3.278 2.047zm3.513-2.47v-5.87h-1v5.87zm-.135-5.528 6.755-7.236-.731-.682-6.755 7.235zm-4.143-.342v7.916h1v-7.916zm.872-.334-6.519-7.236-.743.67 6.519 7.235zm-6.89-6.401h16.55v-1h-16.55z"
|
|
16
|
-
}, null, -1), me = [
|
|
17
|
-
de
|
|
18
|
-
];
|
|
19
|
-
function ue(T, k) {
|
|
20
|
-
return m(), p("svg", ce, [...me]);
|
|
21
|
-
}
|
|
22
|
-
const pe = { render: ue }, fe = { class: "popover" }, ve = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "no-formats-available"
|
|
25
|
-
}, ye = {
|
|
26
|
-
key: 1,
|
|
27
|
-
class: "no-formats-available"
|
|
28
|
-
}, he = ["onClick", "onDblclick"], Te = { class: "format-pattern" }, ge = { class: "format-preview" }, P = 1, we = /* @__PURE__ */ $({
|
|
29
|
-
__name: "DateTimeFormatPickerPopover",
|
|
30
|
-
props: {
|
|
31
|
-
allFormats: {},
|
|
32
|
-
selectedType: {},
|
|
33
|
-
initialSelectedPattern: {},
|
|
34
|
-
showTypeSwitch: { type: Boolean }
|
|
35
|
-
},
|
|
36
|
-
emits: ["commit", "cancel"],
|
|
37
|
-
setup(T, { emit: k }) {
|
|
38
|
-
const n = k, r = T, D = E(() => [
|
|
39
|
-
{
|
|
40
|
-
id: "RECENT",
|
|
41
|
-
text: "Recent"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "STANDARD",
|
|
45
|
-
text: "ISO"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: "EUROPEAN",
|
|
49
|
-
text: "European"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: "AMERICAN",
|
|
53
|
-
text: "United States"
|
|
54
|
-
}
|
|
55
|
-
]), M = E(() => [
|
|
56
|
-
{
|
|
57
|
-
id: "DATE",
|
|
58
|
-
text: "Date"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "DATE_TIME",
|
|
62
|
-
text: "Date & time"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: "TIME",
|
|
66
|
-
text: "Time"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: "ZONED_DATE_TIME",
|
|
70
|
-
text: "Zoned date & time"
|
|
71
|
-
}
|
|
72
|
-
]), y = f(null), c = f("RECENT"), l = f(r.selectedType);
|
|
73
|
-
z(
|
|
74
|
-
() => r.selectedType,
|
|
75
|
-
(e) => {
|
|
76
|
-
l.value = e;
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
const a = E(
|
|
80
|
-
() => {
|
|
81
|
-
var e;
|
|
82
|
-
return ((e = r.allFormats) == null ? void 0 : e.filter(
|
|
83
|
-
(t) => t.category === c.value && t.temporalType === l.value
|
|
84
|
-
)) ?? null;
|
|
85
|
-
}
|
|
86
|
-
), g = f(null), i = Z({}), d = (e) => `${e.format}-${e.category}-${e.temporalType}`, h = (e) => (t) => {
|
|
87
|
-
i[d(e)] = t;
|
|
88
|
-
}, w = (e) => ({
|
|
89
|
-
format: e.format,
|
|
90
|
-
temporalType: e.temporalType
|
|
91
|
-
}), { currentIndex: F, onKeydown: I, resetNavigation: H } = ie({
|
|
92
|
-
keepOpenedOnTab: !0,
|
|
93
|
-
getFirstElement: () => ({
|
|
94
|
-
index: 0,
|
|
95
|
-
onClick: () => n(
|
|
96
|
-
"commit",
|
|
97
|
-
w(a.value[0])
|
|
98
|
-
)
|
|
99
|
-
}),
|
|
100
|
-
getLastElement: () => {
|
|
101
|
-
const e = a.value.length - 1;
|
|
102
|
-
return {
|
|
103
|
-
index: e,
|
|
104
|
-
onClick: () => n(
|
|
105
|
-
"commit",
|
|
106
|
-
w(a.value[e])
|
|
107
|
-
)
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
getNextElement: (e, t) => {
|
|
111
|
-
if (e = e === null || e === -1 ? null : e, t === 1) {
|
|
112
|
-
const s = ((e ?? -1) + 1) % a.value.length;
|
|
113
|
-
return {
|
|
114
|
-
index: s,
|
|
115
|
-
onClick: () => n(
|
|
116
|
-
"commit",
|
|
117
|
-
w(a.value[s])
|
|
118
|
-
)
|
|
119
|
-
};
|
|
120
|
-
} else {
|
|
121
|
-
const s = ((e ?? 0) - 1 + a.value.length) % a.value.length;
|
|
122
|
-
return {
|
|
123
|
-
index: s,
|
|
124
|
-
onClick: () => n(
|
|
125
|
-
"commit",
|
|
126
|
-
w(a.value[s])
|
|
127
|
-
)
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
close: () => {
|
|
132
|
-
n("cancel");
|
|
133
|
-
}
|
|
134
|
-
}), U = (e) => {
|
|
135
|
-
const t = e.parentElement;
|
|
136
|
-
if (t && t.scrollHeight > t.clientHeight) {
|
|
137
|
-
const o = t.offsetTop + P, s = t.clientHeight + t.scrollTop, u = e.offsetTop + e.offsetHeight - o;
|
|
138
|
-
u > s ? t.scrollTop = u - t.clientHeight : e.offsetTop - t.scrollTop < o && (t.scrollTop = e.offsetTop - o);
|
|
139
|
-
}
|
|
140
|
-
}, A = async (e, t, o) => {
|
|
141
|
-
l.value = t ?? l.value, c.value = o ?? c.value, await R(), y.value = e;
|
|
142
|
-
const s = i[`${e}-${c.value}-${l.value}`];
|
|
143
|
-
s && U(s);
|
|
144
|
-
const u = a.value.findIndex(
|
|
145
|
-
(b) => b.format === e
|
|
146
|
-
);
|
|
147
|
-
F.value = u;
|
|
148
|
-
}, L = async () => {
|
|
149
|
-
var e;
|
|
150
|
-
await R(), (e = g.value) == null || e.focus();
|
|
151
|
-
};
|
|
152
|
-
z(F, (e) => {
|
|
153
|
-
if (e === null)
|
|
154
|
-
return;
|
|
155
|
-
const t = a.value[e];
|
|
156
|
-
A(t.format, t.temporalType, t.category);
|
|
157
|
-
}), z([l, c], () => {
|
|
158
|
-
y.value = null, H();
|
|
159
|
-
});
|
|
160
|
-
const K = f(!1);
|
|
161
|
-
return W(() => {
|
|
162
|
-
if (!r.allFormats)
|
|
163
|
-
return;
|
|
164
|
-
const e = [
|
|
165
|
-
"RECENT",
|
|
166
|
-
"STANDARD",
|
|
167
|
-
"EUROPEAN",
|
|
168
|
-
"AMERICAN"
|
|
169
|
-
], t = r.allFormats.filter((o) => r.initialSelectedPattern === o.format).filter(
|
|
170
|
-
(o) => (
|
|
171
|
-
// if the type switch is hidden, filter to only formats with the same type
|
|
172
|
-
r.selectedType === o.temporalType || r.showTypeSwitch
|
|
173
|
-
)
|
|
174
|
-
).sort((o, s) => {
|
|
175
|
-
const u = e.indexOf(o.category), b = e.indexOf(s.category);
|
|
176
|
-
return u - b;
|
|
177
|
-
});
|
|
178
|
-
t.length > 0 && A(
|
|
179
|
-
t[0].format,
|
|
180
|
-
t[0].temporalType,
|
|
181
|
-
t[0].category
|
|
182
|
-
), L(), setTimeout(() => {
|
|
183
|
-
K.value = !0;
|
|
184
|
-
}, 0);
|
|
185
|
-
}), (e, t) => (m(), p("div", fe, [
|
|
186
|
-
e.showTypeSwitch ? (m(), j(N, {
|
|
187
|
-
key: 0,
|
|
188
|
-
id: "selectedFormatType",
|
|
189
|
-
modelValue: l.value,
|
|
190
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => l.value = o),
|
|
191
|
-
compact: "",
|
|
192
|
-
"possible-values": M.value,
|
|
193
|
-
class: "filter-switch"
|
|
194
|
-
}, null, 8, ["modelValue", "possible-values"])) : V("", !0),
|
|
195
|
-
x(N, {
|
|
196
|
-
id: "selectedFormatStandard",
|
|
197
|
-
modelValue: c.value,
|
|
198
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => c.value = o),
|
|
199
|
-
compact: "",
|
|
200
|
-
"possible-values": D.value,
|
|
201
|
-
class: "filter-switch"
|
|
202
|
-
}, null, 8, ["modelValue", "possible-values"]),
|
|
203
|
-
v("div", {
|
|
204
|
-
id: "dateFormats",
|
|
205
|
-
ref_key: "formatContainerRef",
|
|
206
|
-
ref: g,
|
|
207
|
-
class: "formats-container",
|
|
208
|
-
style: B({ "--formats-container-border-width": P + "px" }),
|
|
209
|
-
tabindex: "0",
|
|
210
|
-
role: "menu",
|
|
211
|
-
onKeydown: [
|
|
212
|
-
t[2] || (t[2] = //@ts-ignore
|
|
213
|
-
(...o) => _(I) && _(I)(...o)),
|
|
214
|
-
t[3] || (t[3] = q((o) => o.shiftKey || n("cancel"), ["tab"]))
|
|
215
|
-
]
|
|
216
|
-
}, [
|
|
217
|
-
a.value === null ? (m(), p("div", ve, [
|
|
218
|
-
x(re, { class: "loading-spinner" })
|
|
219
|
-
])) : a.value.length === 0 ? (m(), p("div", ye, " No formats available ")) : (m(!0), p(G, { key: 2 }, J(a.value, (o, s) => (m(), p("div", {
|
|
220
|
-
key: d(o),
|
|
221
|
-
ref_for: !0,
|
|
222
|
-
ref: h(o),
|
|
223
|
-
class: C([{ selected: s === _(F) }, "single-format"]),
|
|
224
|
-
role: "menuitem",
|
|
225
|
-
onClick: () => {
|
|
226
|
-
var u;
|
|
227
|
-
F.value = s, (u = g.value) == null || u.focus();
|
|
228
|
-
},
|
|
229
|
-
onDblclick: () => n("commit", w(o))
|
|
230
|
-
}, [
|
|
231
|
-
v("span", Te, S(o.format), 1),
|
|
232
|
-
v("span", ge, S(o.example), 1)
|
|
233
|
-
], 42, he))), 128))
|
|
234
|
-
], 36)
|
|
235
|
-
]));
|
|
236
|
-
}
|
|
237
|
-
}), Ee = /* @__PURE__ */ O(we, [["__scopeId", "data-v-7850be89"]]), _e = { class: "input-fields" }, ke = ["disabled"], Fe = {
|
|
238
|
-
key: 0,
|
|
239
|
-
class: "invalid-marker"
|
|
240
|
-
}, xe = ["disabled"], De = {}, Me = /* @__PURE__ */ $({
|
|
241
|
-
...De,
|
|
242
|
-
__name: "DateTimeFormatInput",
|
|
243
|
-
props: /* @__PURE__ */ Q({
|
|
244
|
-
disabled: { type: Boolean, default: !1 },
|
|
245
|
-
compact: { type: Boolean, default: !1 },
|
|
246
|
-
isValid: { type: Boolean, default: !0 },
|
|
247
|
-
allDefaultFormats: {},
|
|
248
|
-
allowedTypes: { default: () => [
|
|
249
|
-
"DATE",
|
|
250
|
-
"TIME",
|
|
251
|
-
"DATE_TIME",
|
|
252
|
-
"ZONED_DATE_TIME"
|
|
253
|
-
] },
|
|
254
|
-
showTypeSwitchInPopover: { type: Boolean, default: !0 }
|
|
255
|
-
}, {
|
|
256
|
-
modelValue: {
|
|
257
|
-
default: {
|
|
258
|
-
format: "yyyy-MM-dd",
|
|
259
|
-
temporalType: "DATE"
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
modelModifiers: {}
|
|
263
|
-
}),
|
|
264
|
-
emits: ["update:modelValue"],
|
|
265
|
-
setup(T) {
|
|
266
|
-
const k = T, n = X(T, "modelValue"), r = E({
|
|
267
|
-
get: () => n.value.format,
|
|
268
|
-
set: (i) => {
|
|
269
|
-
n.value = {
|
|
270
|
-
...n.value,
|
|
271
|
-
format: i
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
}), D = "Format like 'yyyy-MM-dd'", M = E(() => k.isValid), y = f(null), c = f(null), l = f(!1), a = (i) => {
|
|
275
|
-
n.value = i, l.value = !1;
|
|
276
|
-
};
|
|
277
|
-
te(c, () => l.value = !1, {
|
|
278
|
-
ignore: [y]
|
|
279
|
-
});
|
|
280
|
-
const { floatingStyles: g } = oe(
|
|
281
|
-
y,
|
|
282
|
-
c,
|
|
283
|
-
{
|
|
284
|
-
middleware: [
|
|
285
|
-
le({
|
|
286
|
-
mainAxis: 2,
|
|
287
|
-
crossAxis: 0
|
|
288
|
-
}),
|
|
289
|
-
ae(),
|
|
290
|
-
se({
|
|
291
|
-
mainAxis: !0,
|
|
292
|
-
crossAxis: !1
|
|
293
|
-
})
|
|
294
|
-
],
|
|
295
|
-
placement: "top-end",
|
|
296
|
-
whileElementsMounted: ne
|
|
297
|
-
}
|
|
298
|
-
);
|
|
299
|
-
return (i, d) => (m(), p("div", null, [
|
|
300
|
-
v("div", {
|
|
301
|
-
class: C(["wrapper", { disabled: i.disabled, compact: i.compact }])
|
|
302
|
-
}, [
|
|
303
|
-
v("span", _e, [
|
|
304
|
-
Y(v("input", {
|
|
305
|
-
"onUpdate:modelValue": d[0] || (d[0] = (h) => r.value = h),
|
|
306
|
-
type: "text",
|
|
307
|
-
disabled: i.disabled,
|
|
308
|
-
placeholder: D,
|
|
309
|
-
spellcheck: "false",
|
|
310
|
-
onFocus: d[1] || (d[1] = (h) => l.value = !1)
|
|
311
|
-
}, null, 40, ke), [
|
|
312
|
-
[ee, r.value]
|
|
313
|
-
]),
|
|
314
|
-
M.value ? V("", !0) : (m(), p("span", Fe)),
|
|
315
|
-
v("button", {
|
|
316
|
-
ref_key: "togglePopoverButtonRef",
|
|
317
|
-
ref: y,
|
|
318
|
-
class: C(["trigger-popover-button", { active: l.value }]),
|
|
319
|
-
disabled: i.disabled,
|
|
320
|
-
onClick: d[2] || (d[2] = (h) => l.value = !l.value)
|
|
321
|
-
}, [
|
|
322
|
-
x(_(pe))
|
|
323
|
-
], 10, xe)
|
|
324
|
-
])
|
|
325
|
-
], 2),
|
|
326
|
-
l.value ? (m(), p("div", {
|
|
327
|
-
key: 0,
|
|
328
|
-
ref_key: "floatingPopoverRef",
|
|
329
|
-
ref: c,
|
|
330
|
-
class: "popover",
|
|
331
|
-
style: B(_(g))
|
|
332
|
-
}, [
|
|
333
|
-
x(Ee, {
|
|
334
|
-
"all-formats": i.allDefaultFormats,
|
|
335
|
-
"initial-selected-pattern": n.value.format,
|
|
336
|
-
"selected-type": n.value.temporalType,
|
|
337
|
-
"show-type-switch": i.showTypeSwitchInPopover,
|
|
338
|
-
onCommit: a,
|
|
339
|
-
onCancel: d[3] || (d[3] = (h) => l.value = !1)
|
|
340
|
-
}, null, 8, ["all-formats", "initial-selected-pattern", "selected-type", "show-type-switch"])
|
|
341
|
-
], 4)) : V("", !0)
|
|
342
|
-
]));
|
|
343
|
-
}
|
|
344
|
-
}), Re = /* @__PURE__ */ O(Me, [["__scopeId", "data-v-a18d67d3"]]);
|
|
345
|
-
export {
|
|
346
|
-
Re as D
|
|
347
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { B as s } from "./BaseButton-6PV3BYUQ.js";
|
|
2
|
-
import { resolveComponent as o, openBlock as l, createBlock as r, normalizeClass as i, withCtx as d, renderSlot as c } from "vue";
|
|
3
|
-
import { _ as u } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-hOcQ43HC.js";
|
|
4
|
-
const f = {
|
|
5
|
-
name: "FunctionButton",
|
|
6
|
-
components: {
|
|
7
|
-
BaseButton: s
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
/**
|
|
11
|
-
* @see {@link BaseButton.vue}
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Switches the active style of the component
|
|
15
|
-
*/
|
|
16
|
-
active: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* switches colors
|
|
22
|
-
*/
|
|
23
|
-
primary: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: !1
|
|
26
|
-
},
|
|
27
|
-
disabled: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: !1
|
|
30
|
-
},
|
|
31
|
-
compact: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: !1
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
computed: {
|
|
37
|
-
single() {
|
|
38
|
-
return this.$slots.default().length !== 1 ? !1 : this.hasSingleChildren(this.$slots.default()[0]);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
methods: {
|
|
42
|
-
/**
|
|
43
|
-
* This can be called from outside via focus on a $ref
|
|
44
|
-
*/
|
|
45
|
-
focus() {
|
|
46
|
-
this.$refs.baseButton.focus();
|
|
47
|
-
},
|
|
48
|
-
/**
|
|
49
|
-
* This can be called from outside via getComponent on a $ref
|
|
50
|
-
*/
|
|
51
|
-
getComponent() {
|
|
52
|
-
return this.$refs.baseButton.getComponent();
|
|
53
|
-
},
|
|
54
|
-
hasSingleChildren(e) {
|
|
55
|
-
return e.children ? e.children.length === 1 ? this.hasSingleChildren(e.children[0]) : !1 : !0;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
function h(e, m, t, p, B, n) {
|
|
60
|
-
const a = o("BaseButton");
|
|
61
|
-
return l(), r(a, {
|
|
62
|
-
ref: "baseButton",
|
|
63
|
-
disabled: t.disabled,
|
|
64
|
-
class: i(["function-button", { single: n.single, active: t.active, primary: t.primary, disabled: t.disabled, compact: t.compact }])
|
|
65
|
-
}, {
|
|
66
|
-
default: d(() => [
|
|
67
|
-
c(e.$slots, "default", {}, void 0, !0)
|
|
68
|
-
]),
|
|
69
|
-
_: 3
|
|
70
|
-
}, 8, ["disabled", "class"]);
|
|
71
|
-
}
|
|
72
|
-
const C = /* @__PURE__ */ u(f, [["render", h], ["__scopeId", "data-v-6b371a7e"]]);
|
|
73
|
-
export {
|
|
74
|
-
C as F
|
|
75
|
-
};
|