@knime/jsonforms 1.23.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{AnyOfTwinlist-B_UW1LI0.js → AnyOfTwinlist-DQ5NAJAC.js} +1 -1
  3. package/dist/{CheckboxControl-BMyOusAA.js → CheckboxControl-B697Nh6H.js} +1 -1
  4. package/dist/{CheckboxesControl-CkeTdrFS.js → CheckboxesControl-BPY2hV34.js} +2 -2
  5. package/dist/{ColorControl-CAL0L6L4.js → ColorControl-BT8Y9v_R.js} +1 -1
  6. package/dist/{ColorPreviewControl-DvKX8YeB.js → ColorPreviewControl-Cc7g0byT.js} +1 -1
  7. package/dist/{ComboBoxControl-CbMBzHre.js → ComboBoxControl-Db5c4vYz.js} +2 -2
  8. package/dist/{DateControl-RJtZbKPy.js → DateControl-qd8SQlgh.js} +3 -3
  9. package/dist/DateTimeControl-DZzgpurI.js +103 -0
  10. package/dist/{DateTimeFormatPickerControl-JVgCROnR.js → DateTimeFormatPickerControl-Dl8Moc8r.js} +1 -1
  11. package/dist/{DropdownControl-CPfIoin1.js → DropdownControl-Dh6rUinV.js} +2 -2
  12. package/dist/{ExecutorCoresControl-gLv8RzqL.js → ExecutorCoresControl-B82QVs-J.js} +1 -1
  13. package/dist/{ExecutorMemoryControl-swyZuGDr.js → ExecutorMemoryControl-D-Vep0F6.js} +1 -1
  14. package/dist/{FileUploadControl-Db66TCRo.js → FileUploadControl-lsK182v6.js} +41 -42
  15. package/dist/{GridSelectionControl-Djn2T13y.js → GridSelectionControl-CeDwjq64.js} +11 -11
  16. package/dist/{HorizontalLayout-IQQdI26A.js → HorizontalLayout-BhFSfTps.js} +1 -1
  17. package/dist/{IntegerControl-j0BdGN1e.js → IntegerControl-BId5Z5ve.js} +1 -1
  18. package/dist/{IntervalControl-CwrYRFKJ.js → IntervalControl-Byk71q_G.js} +1 -1
  19. package/dist/{LinkControl-fG24M9KW.js → LinkControl-DR1fgxx2.js} +1 -1
  20. package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-DoE3qoLb.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-CPTYBzJt.js} +1 -1
  21. package/dist/{ManualTwinlistControl-BuTbAWnH.js → ManualTwinlistControl-CUsibWlr.js} +3 -3
  22. package/dist/{MultiSelectListBoxControl-BXGwgWs_.js → MultiSelectListBoxControl-B1X8p_-e.js} +7 -7
  23. package/dist/{MultimodeTwinlistControl-D-gl_pVW.js → MultimodeTwinlistControl-Bgy1E-cm.js} +1 -1
  24. package/dist/{MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-D_r7uwKB.js → MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-DP1f6Yo9.js} +6 -6
  25. package/dist/{NameFilter-BVT5yrA-.js → NameFilter-CW6JocdO.js} +1 -1
  26. package/dist/{NumberControl-vAh5HuIS.js → NumberControl-edz2z4gt.js} +1 -1
  27. package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-DvCAjhNZ.js → NumberControlBase.vue_vue_type_script_setup_true_lang-LVtEPU6U.js} +4 -4
  28. package/dist/{OneOfDropdown-Bm5FQ6NA.js → OneOfDropdown-BrQ1NJTF.js} +1 -1
  29. package/dist/{ProgressButtonControl-brC36qlg.js → ProgressButtonControl-Y4zUKcqB.js} +1 -1
  30. package/dist/{RadioButtonsWithDescriptionControl-S1OeqZ0i.js → RadioButtonsWithDescriptionControl-CTWjbCOC.js} +1 -1
  31. package/dist/{RadioControl-Cfe_kYfb.js → RadioControl-B3XZEbUd.js} +1 -1
  32. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-COszpwIP.js → RadioControlBase.vue_vue_type_script_setup_true_lang-Cf9glDyf.js} +2 -2
  33. package/dist/{ResourceControlBase-DaMNlDhC.js → ResourceControlBase-2j_3xXUs.js} +3 -3
  34. package/dist/{RichTextControl-Dekvygdy.js → RichTextControl-b2SZcRMO.js} +11597 -11237
  35. package/dist/{SectionHeading-DkmQqn9k.js → SectionHeading-MRWfv3_y.js} +1 -1
  36. package/dist/{SectionLayout-CLqyOBZE.js → SectionLayout-kmJ9_YSC.js} +3 -3
  37. package/dist/SettingsSubPanel-BIG6WbbH.js +5 -0
  38. package/dist/{SettingsSubPanelLayout-DLplwwNG.js → SettingsSubPanelLayout-BN-oFfiP.js} +4 -4
  39. package/dist/{SimpleButtonControl-BIJ6K6qX.js → SimpleButtonControl-BSws5971.js} +1 -1
  40. package/dist/{SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Ducup0yA.js → SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-C_cPLZAX.js} +12530 -12071
  41. package/dist/{SimpleTwinlistControl-BZWkpiSo.js → SimpleTwinlistControl-74gVwmxY.js} +2 -2
  42. package/dist/{SingleSelectControl-DAh9C1IS.js → SingleSelectControl-BVDWd50n.js} +2 -2
  43. package/dist/{SingleSelectListBoxControl-C102okGc.js → SingleSelectListBoxControl-Buv7eL4z.js} +3 -3
  44. package/dist/{SortListControl-CVdl-xw-.js → SortListControl-CFvZn4Z8.js} +8 -8
  45. package/dist/{StyledListItem-C-a_11mo.js → StyledListItem-B7ZkCGy7.js} +1 -1
  46. package/dist/{TeamAndSpacesControl-B9JZJBXv.js → TeamAndSpacesControl-YSk8oOLS.js} +9 -9
  47. package/dist/{TeamResourceControl-JJIgYaMY.js → TeamResourceControl-CNkQwBGP.js} +1 -1
  48. package/dist/{TextAreaControl-DsJyw0Yv.js → TextAreaControl-DpWSvjxM.js} +1 -1
  49. package/dist/{TextControl-DnVGNtbx.js → TextControl-CTXjc4_c.js} +1 -1
  50. package/dist/{TextControl.vue_vue_type_script_setup_true_lang-Bp4FZd2C.js → TextControl.vue_vue_type_script_setup_true_lang-BZer_GIG.js} +2 -2
  51. package/dist/{TimeControl-DGrWNVz_.js → TimeControl-D2s46aHK.js} +3 -3
  52. package/dist/{TimeframesControl-DKaZAZeW.js → TimeframesControl-DmmbHvkm.js} +3 -4
  53. package/dist/{TwinlistControlBase.vue_vue_type_script_setup_true_lang-CAk_iS6w.js → TwinlistControlBase.vue_vue_type_script_setup_true_lang-sbb6a5M1.js} +2 -2
  54. package/dist/{TypedStringFilter-Cw5aL-PG.js → TypedStringFilter-yhhobolz.js} +1 -1
  55. package/dist/{ValueSwitchControl-CE9z5s11.js → ValueSwitchControl-DAwIxuHE.js} +1 -1
  56. package/dist/{VerticalLayout-DDGwEUts.js → VerticalLayout-Cg1kpAsr.js} +2 -2
  57. package/dist/{VerticalLayoutBase-Bv4ct09F.js → VerticalLayoutBase-DXiq-ttd.js} +1 -1
  58. package/dist/ZonedDateTimeControl-DCVlCG4r.js +97 -0
  59. package/dist/{_Uint8Array-DGFCQcAO.js → _Uint8Array-B9VMTk2r.js} +36 -36
  60. package/dist/feedback-CSzO39Ck-_5Kb5BA8.js +22 -0
  61. package/dist/knime-jsonforms.css +1 -1
  62. package/dist/knime-jsonforms.js +7 -7
  63. package/dist/src/constants/inputFormats.d.ts +0 -1
  64. package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanel.vue.d.ts +0 -1
  65. package/dist/src/renderers/dateTimeFormatPickerRenderer.d.ts +0 -1
  66. package/dist/src/renderers/defaultRenderers.d.ts +0 -1
  67. package/dist/src/uiComponents/DateTimeControl.vue.d.ts +1 -1
  68. package/dist/src/uiComponents/ZonedDateTimeControl.vue.d.ts +1 -1
  69. package/dist/testing.js +2873 -2856
  70. package/dist/{useBuiltinValidations-C92yDv0y.js → useBuiltinValidations-00cKvChy.js} +1 -1
  71. package/dist/{usePossibleValues-Vlw1CCFD.js → usePossibleValues-B4dYuNUk.js} +1 -1
  72. package/dist/{useUnknownValuesInTwinlist-EXO9oOxf.js → useUnknownValuesInTwinlist-DSvYHoTD.js} +1 -1
  73. package/package.json +4 -4
  74. package/dist/DateTimeControl-CjqPP5Mu.js +0 -80
  75. package/dist/DateTimeFormatPickerWithTypeControl-DSrj0KvO.js +0 -587
  76. package/dist/SettingsSubPanel-BIKfyhCw.js +0 -5
  77. package/dist/ZonedDateTimeControl-yDCAQQ5B.js +0 -79
  78. package/dist/isArray-WzO_os3q.js +0 -4
  79. package/dist/src/composables/usePlainDateTimeBatch.d.ts +0 -31
  80. package/dist/src/uiComponents/DateTimeFormatPickerWithTypeControl.vue.d.ts +0 -5
  81. package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +0 -22
  82. package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +0 -230
  83. package/dist/toString-DqZWnsFs.js +0 -24
  84. package/dist/useDropdownNavigation-CdrbT-CQ.js +0 -2003
  85. package/dist/usePlainDateTimeBatch-Bd2G-GY9.js +0 -34
@@ -1,587 +0,0 @@
1
- import { openBlock as m, createElementBlock as f, createElementVNode as v, h as X, defineComponent as I, createBlock as M, unref as T, Fragment as A, renderList as W, normalizeClass as k, toDisplayString as C, renderSlot as Z, createCommentVNode as S, resolveComponent as Y, withCtx as K, normalizeProps as ee, guardReactiveProps as te, useCssVars as le, computed as g, ref as w, watch as R, reactive as oe, onMounted as ae, nextTick as H, onUnmounted as se, createVNode as x, useModel as ne, withDirectives as ie, vModelText as de, normalizeStyle as re, mergeModels as ue } from "vue";
2
- import { _ as $, R as ce, T as me, u as pe } from "./SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Ducup0yA.js";
3
- import { u as ve, F as fe, a as ye, b as he, o as ge, s as Te, f as be } from "./useDropdownNavigation-CdrbT-CQ.js";
4
- const we = {
5
- xmlns: "http://www.w3.org/2000/svg",
6
- fill: "none",
7
- stroke: "#000",
8
- "stroke-linejoin": "round",
9
- viewBox: "0 0 32 32"
10
- };
11
- function Ve(e, a) {
12
- return m(), f("svg", we, [...a[0] || (a[0] = [
13
- v("path", { d: "m11.9 22.3 2.7 4.4-4.5 2.8m4.5-2.8C9 26 4.7 21.7 4.7 16c0-5.1 3.4-9.4 8.1-10.8M20 9.7l-2.6-4.4 4.5-2.8m-4.5 2.8c5.6.7 9.9 5 9.9 10.7 0 5.1-3.4 9.4-8.1 10.8" }, null, -1)
14
- ])]);
15
- }
16
- const Ee = { render: Ve }, Fe = (e, a) => ({
17
- render() {
18
- const n = e.render({}, []), r = X("title", a);
19
- return r.ns = "svg", n.children.unshift(r), n;
20
- }
21
- }), _e = /* @__PURE__ */ I({
22
- __name: "LoadingIcon",
23
- setup(e) {
24
- const a = Fe(Ee, "Loading…");
25
- return (n, r) => (m(), M(T(a)));
26
- }
27
- }), xe = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-6b552b81"]]), Ie = {
28
- xmlns: "http://www.w3.org/2000/svg",
29
- fill: "none",
30
- "stroke-linejoin": "round",
31
- viewBox: "0 0 32 32"
32
- };
33
- function $e(e, a) {
34
- return m(), f("svg", Ie, [...a[0] || (a[0] = [
35
- v("path", {
36
- fill: "#000",
37
- 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"
38
- }, null, -1)
39
- ])]);
40
- }
41
- const ke = { render: $e }, De = I({
42
- name: "BaseRadioButtons",
43
- props: {
44
- id: {
45
- type: String,
46
- default: null
47
- },
48
- modelValue: {
49
- type: String,
50
- default: null
51
- },
52
- name: {
53
- type: String,
54
- default() {
55
- return `RadioButtons-${ce()}`;
56
- }
57
- },
58
- disabled: {
59
- default: !1,
60
- type: Boolean
61
- },
62
- possibleValues: {
63
- type: Array,
64
- default: () => [],
65
- validator(e) {
66
- return Array.isArray(e) ? e.every(
67
- (a) => a.hasOwnProperty("id") && a.hasOwnProperty("text")
68
- ) : !1;
69
- }
70
- }
71
- },
72
- emits: ["update:modelValue"],
73
- methods: {
74
- onInput(e) {
75
- const a = e.target.value;
76
- this.$emit("update:modelValue", a);
77
- }
78
- }
79
- }), Me = ["id"], Ce = ["checked", "value", "name", "disabled"], Se = ["title"];
80
- function Be(e, a, n, r, V, E) {
81
- return m(), f("div", {
82
- id: e.id,
83
- role: "radiogroup"
84
- }, [
85
- (m(!0), f(A, null, W(e.possibleValues, (s) => (m(), f("label", {
86
- key: `radio-${s.id}`,
87
- class: k({ disabled: e.disabled || s.disabled })
88
- }, [
89
- v("input", {
90
- ref_for: !0,
91
- ref: "input",
92
- checked: e.modelValue === s.id,
93
- value: s.id,
94
- name: e.name,
95
- disabled: e.disabled || s.disabled,
96
- type: "radio",
97
- onChange: a[0] || (a[0] = (...u) => e.onInput && e.onInput(...u))
98
- }, null, 40, Ce),
99
- v("span", {
100
- title: s.text
101
- }, C(s.text), 9, Se),
102
- Z(e.$slots, "default", { item: s }, void 0, !0),
103
- s.subtext ? (m(), f(A, { key: 0 }, [
104
- a[1] || (a[1] = v("br", null, null, -1)),
105
- v("span", null, C(s.subtext), 1)
106
- ], 64)) : S("", !0)
107
- ], 2))), 128))
108
- ], 8, Me);
109
- }
110
- const Re = /* @__PURE__ */ $(De, [["render", Be], ["__scopeId", "data-v-2bbebb4b"]]), Ae = I({
111
- name: "ValueSwitch",
112
- components: {
113
- BaseRadioButtons: Re
114
- },
115
- props: {
116
- id: {
117
- type: String,
118
- default: null
119
- },
120
- modelValue: {
121
- type: String,
122
- default: null
123
- },
124
- name: {
125
- type: String,
126
- default: null
127
- },
128
- disabled: {
129
- default: !1,
130
- type: Boolean
131
- },
132
- possibleValues: {
133
- type: Array,
134
- default: () => []
135
- },
136
- compact: {
137
- type: Boolean,
138
- default: !1
139
- }
140
- },
141
- emits: ["update:modelValue"]
142
- });
143
- function ze(e, a, n, r, V, E) {
144
- const s = Y("BaseRadioButtons");
145
- return m(), M(s, {
146
- id: e.id,
147
- ref: "radioButton",
148
- "possible-values": e.possibleValues,
149
- "model-value": e.modelValue,
150
- name: e.name,
151
- disabled: e.disabled,
152
- class: k(["value-switch", {
153
- disabled: e.disabled,
154
- compact: e.compact,
155
- normal: !e.compact
156
- }]),
157
- "onUpdate:modelValue": a[0] || (a[0] = (u) => e.$emit("update:modelValue", u))
158
- }, {
159
- default: K((u) => [
160
- Z(e.$slots, "default", ee(te(u)), void 0, !0)
161
- ]),
162
- _: 3
163
- }, 8, ["id", "possible-values", "model-value", "name", "disabled", "class"]);
164
- }
165
- const z = /* @__PURE__ */ $(Ae, [["render", ze], ["__scopeId", "data-v-83231815"]]), Pe = { class: "popover" }, Ne = { class: "formats-container-border-host" }, Oe = {
166
- key: 0,
167
- class: "no-formats-available"
168
- }, Ue = {
169
- key: 1,
170
- class: "no-formats-available"
171
- }, He = ["onClick"], Le = { class: "format-pattern" }, We = { class: "format-preview" }, L = 1, Ze = /* @__PURE__ */ I({
172
- __name: "DateTimeFormatPickerPopover",
173
- props: {
174
- allFormats: {},
175
- selectedType: {},
176
- initialSelectedPattern: {},
177
- showTypeSwitch: { type: Boolean }
178
- },
179
- emits: ["commit", "cancel"],
180
- setup(e, { emit: a }) {
181
- le((t) => ({
182
- v3b9e5e3a: L
183
- }));
184
- const n = a, r = e, V = g(() => [
185
- {
186
- id: "RECENT",
187
- text: "Recent"
188
- },
189
- {
190
- id: "STANDARD",
191
- text: "ISO"
192
- },
193
- {
194
- id: "EUROPEAN",
195
- text: "European"
196
- },
197
- {
198
- id: "AMERICAN",
199
- text: "United States"
200
- }
201
- ]), E = g(() => [
202
- {
203
- id: "DATE",
204
- text: "Date"
205
- },
206
- {
207
- id: "DATE_TIME",
208
- text: "Date & time"
209
- },
210
- {
211
- id: "TIME",
212
- text: "Time"
213
- },
214
- {
215
- id: "ZONED_DATE_TIME",
216
- text: "Zoned date & time"
217
- }
218
- ]), s = w(null), u = w(null), d = w("RECENT"), p = w(r.selectedType);
219
- R(
220
- () => r.selectedType,
221
- (t) => {
222
- u.value = t;
223
- }
224
- );
225
- const i = g(
226
- () => r.allFormats?.filter(
227
- (t) => t.category === d.value && t.temporalType === p.value
228
- ) ?? null
229
- ), y = w(null), h = oe({}), F = (t) => `${t.format}-${t.category}-${t.temporalType}`, j = (t) => (l) => {
230
- h[F(t)] = l;
231
- }, _ = (t) => ({
232
- format: t.format,
233
- temporalType: t.temporalType
234
- }), {
235
- currentIndex: P,
236
- onKeydown: N,
237
- resetNavigation: q,
238
- setElement: G
239
- } = ve({
240
- keepOpenedOnTab: !0,
241
- getFirstElement: () => ({
242
- index: 0,
243
- onClick: () => n(
244
- "commit",
245
- _(i.value[0])
246
- )
247
- }),
248
- getLastElement: () => {
249
- const t = i.value.length - 1;
250
- return {
251
- index: t,
252
- onClick: () => n(
253
- "commit",
254
- _(i.value[t])
255
- )
256
- };
257
- },
258
- getNextElement: (t, l) => {
259
- if (t = t === null || t === -1 ? null : t, l === 1) {
260
- const c = ((t ?? -1) + 1) % i.value.length;
261
- return {
262
- index: c,
263
- onClick: () => n(
264
- "commit",
265
- _(i.value[c])
266
- )
267
- };
268
- } else {
269
- const c = ((t ?? 0) - 1 + i.value.length) % i.value.length;
270
- return {
271
- index: c,
272
- onClick: () => n(
273
- "commit",
274
- _(i.value[c])
275
- )
276
- };
277
- }
278
- },
279
- close: () => {
280
- n("cancel");
281
- }
282
- }), J = (t) => {
283
- const l = t.parentElement;
284
- if (l && l.scrollHeight > l.clientHeight) {
285
- const o = l.offsetTop + L, c = l.clientHeight + l.scrollTop, b = t.offsetTop + t.offsetHeight - o;
286
- b > c ? l.scrollTop = b - l.clientHeight : t.offsetTop - l.scrollTop < o && (l.scrollTop = t.offsetTop - o);
287
- }
288
- }, O = (t) => {
289
- const l = h[`${t}-${d.value}-${p.value}`];
290
- l && J(l);
291
- }, U = async (t, l, o) => {
292
- p.value = l ?? p.value, d.value = o ?? d.value, await H(), u.value = t, O(t);
293
- const c = i.value.findIndex(
294
- (b) => b.format === t
295
- );
296
- G({
297
- index: c,
298
- onClick: () => n(
299
- "commit",
300
- _(i.value[c])
301
- )
302
- });
303
- };
304
- R(P, (t) => {
305
- if (t === null)
306
- return;
307
- const l = i.value?.[t]?.format;
308
- l && O(l);
309
- }), R([p, d], () => {
310
- p.value === s.value?.temporalType && d.value === s.value?.category ? U(
311
- s.value.format,
312
- s.value.temporalType,
313
- s.value.category
314
- ) : (u.value = null, q());
315
- });
316
- const D = w(!1);
317
- return ae(async () => {
318
- if (!r.allFormats)
319
- return;
320
- const t = [
321
- "RECENT",
322
- "STANDARD",
323
- "EUROPEAN",
324
- "AMERICAN"
325
- ], l = r.allFormats.filter((o) => r.initialSelectedPattern === o.format).filter(
326
- (o) => (
327
- // if the type switch is hidden, filter to only formats with the same type
328
- r.selectedType === o.temporalType || r.showTypeSwitch
329
- )
330
- ).sort((o, c) => {
331
- const b = t.indexOf(o.category), B = t.indexOf(c.category);
332
- return b - B;
333
- });
334
- if (l.length > 0) {
335
- const o = l[0].format, c = l[0].temporalType, b = l[0].category;
336
- await U(o, c, b);
337
- const B = i.value.findIndex(
338
- (Q) => Q.format === o
339
- );
340
- s.value = {
341
- format: o,
342
- index: B,
343
- category: b,
344
- temporalType: c
345
- };
346
- }
347
- H(() => D.value = !0);
348
- }), se(() => D.value = !1), (t, l) => (m(), M(T(fe), {
349
- active: D.value,
350
- "onUpdate:active": l[3] || (l[3] = (o) => D.value = o),
351
- "initial-focus": () => y.value ?? !1
352
- }, {
353
- default: K(() => [
354
- v("div", Pe, [
355
- e.showTypeSwitch ? (m(), M(z, {
356
- key: 0,
357
- id: "selectedFormatType",
358
- ref: "typeSwitchRef",
359
- modelValue: p.value,
360
- "onUpdate:modelValue": l[0] || (l[0] = (o) => p.value = o),
361
- compact: "",
362
- "possible-values": E.value,
363
- class: "filter-switch"
364
- }, null, 8, ["modelValue", "possible-values"])) : S("", !0),
365
- x(z, {
366
- id: "selectedFormatStandard",
367
- ref: "standardSwitchRef",
368
- modelValue: d.value,
369
- "onUpdate:modelValue": l[1] || (l[1] = (o) => d.value = o),
370
- compact: "",
371
- "possible-values": V.value,
372
- class: "filter-switch"
373
- }, null, 8, ["modelValue", "possible-values"]),
374
- v("div", Ne, [
375
- v("div", {
376
- id: "dateFormats",
377
- ref_key: "formatContainerRef",
378
- ref: y,
379
- class: "formats-container",
380
- tabindex: "0",
381
- role: "menu",
382
- onKeydown: l[2] || (l[2] = //@ts-ignore
383
- (...o) => T(N) && T(N)(...o))
384
- }, [
385
- i.value === null ? (m(), f("div", Oe, [
386
- x(xe, { class: "loading-spinner" })
387
- ])) : i.value.length === 0 ? (m(), f("div", Ue, " No formats available ")) : (m(!0), f(A, { key: 2 }, W(i.value, (o, c) => (m(), f("div", {
388
- key: F(o),
389
- ref_for: !0,
390
- ref: j(o),
391
- class: k([{
392
- highlighted: c === T(P),
393
- applied: c === s.value?.index && o.category === s.value.category && o.temporalType === s.value.temporalType
394
- }, "single-format"]),
395
- role: "menuitem",
396
- onClick: () => n("commit", _(o))
397
- }, [
398
- v("span", Le, C(o.format), 1),
399
- v("span", We, C(o.example), 1)
400
- ], 10, He))), 128))
401
- ], 544)
402
- ])
403
- ])
404
- ]),
405
- _: 1
406
- }, 8, ["active", "initial-focus"]));
407
- }
408
- }), Ke = /* @__PURE__ */ $(Ze, [["__scopeId", "data-v-8bb40d8b"]]), je = { class: "input-fields" }, qe = ["disabled"], Ge = {
409
- key: 0,
410
- class: "invalid-marker"
411
- }, Je = ["disabled"], Qe = {}, Xe = /* @__PURE__ */ I({
412
- ...Qe,
413
- __name: "DateTimeFormatInput",
414
- props: /* @__PURE__ */ ue({
415
- disabled: { type: Boolean, default: !1 },
416
- compact: { type: Boolean, default: !1 },
417
- isValid: { type: Boolean, default: !0 },
418
- allDefaultFormats: {},
419
- allowedTypes: { default: () => [
420
- "DATE",
421
- "TIME",
422
- "DATE_TIME",
423
- "ZONED_DATE_TIME"
424
- ] },
425
- showTypeSwitchInPopover: { type: Boolean, default: !0 }
426
- }, {
427
- modelValue: {
428
- default: {
429
- format: "yyyy-MM-dd",
430
- temporalType: "DATE"
431
- }
432
- },
433
- modelModifiers: {}
434
- }),
435
- emits: ["update:modelValue"],
436
- setup(e) {
437
- const a = e, n = ne(e, "modelValue"), r = g({
438
- get: () => n.value.format,
439
- set: (y) => {
440
- n.value = {
441
- ...n.value,
442
- format: y
443
- };
444
- }
445
- }), V = "Format like 'yyyy-MM-dd'", E = g(() => a.isValid), s = w(null), u = w(null), d = w(!1), p = (y) => {
446
- n.value = y, d.value = !1;
447
- };
448
- me(u, () => d.value = !1, {
449
- ignore: [s]
450
- });
451
- const { floatingStyles: i } = ye(
452
- s,
453
- u,
454
- {
455
- middleware: [
456
- ge({
457
- mainAxis: 2,
458
- crossAxis: 0
459
- }),
460
- Te(),
461
- be({
462
- mainAxis: !0,
463
- crossAxis: !1
464
- })
465
- ],
466
- placement: "top-end",
467
- whileElementsMounted: he
468
- }
469
- );
470
- return (y, h) => (m(), f("div", null, [
471
- v("div", {
472
- class: k(["wrapper", { disabled: e.disabled, compact: e.compact }])
473
- }, [
474
- v("span", je, [
475
- ie(v("input", {
476
- "onUpdate:modelValue": h[0] || (h[0] = (F) => r.value = F),
477
- type: "text",
478
- disabled: e.disabled,
479
- placeholder: V,
480
- spellcheck: "false",
481
- onFocus: h[1] || (h[1] = (F) => d.value = !1)
482
- }, null, 40, qe), [
483
- [de, r.value]
484
- ]),
485
- E.value ? S("", !0) : (m(), f("span", Ge)),
486
- v("button", {
487
- ref_key: "togglePopoverButtonRef",
488
- ref: s,
489
- class: k(["trigger-popover-button", { active: d.value }]),
490
- disabled: e.disabled,
491
- onClick: h[2] || (h[2] = (F) => d.value = !d.value)
492
- }, [
493
- x(T(ke))
494
- ], 10, Je)
495
- ])
496
- ], 2),
497
- d.value ? (m(), f("div", {
498
- key: 0,
499
- ref_key: "floatingPopoverRef",
500
- ref: u,
501
- class: "popover",
502
- style: re(T(i))
503
- }, [
504
- x(Ke, {
505
- "all-formats": e.allDefaultFormats,
506
- "initial-selected-pattern": n.value.format,
507
- "selected-type": n.value.temporalType,
508
- "show-type-switch": e.showTypeSwitchInPopover,
509
- onCommit: p,
510
- onCancel: h[3] || (h[3] = (F) => d.value = !1)
511
- }, null, 8, ["all-formats", "initial-selected-pattern", "selected-type", "show-type-switch"])
512
- ], 4)) : S("", !0)
513
- ]));
514
- }
515
- }), Ye = /* @__PURE__ */ $(Xe, [["__scopeId", "data-v-1577d5ce"]]), et = ["id"], tt = /* @__PURE__ */ I({
516
- __name: "DateTimeFormatPickerWithTypeControl",
517
- props: {
518
- control: {},
519
- handleChange: { type: Function },
520
- changeValue: { type: Function },
521
- disabled: { type: Boolean },
522
- error: { type: Boolean },
523
- subText: {},
524
- onRegisterValidation: { type: Function },
525
- labelForId: {}
526
- },
527
- setup(e) {
528
- const a = e, n = g(
529
- () => a.control.uischema
530
- ), r = g(() => n.value.options), V = g(() => r.value?.allowedFormats), E = pe(n, "dateTimeFormats"), s = [
531
- {
532
- id: "DATE",
533
- text: "Date"
534
- },
535
- {
536
- id: "DATE_TIME",
537
- text: "Date & time"
538
- },
539
- {
540
- id: "TIME",
541
- text: "Time"
542
- },
543
- {
544
- id: "ZONED_DATE_TIME",
545
- text: "Zoned date & time"
546
- }
547
- ], u = g({
548
- get: () => a.control.data,
549
- set: (p) => {
550
- a.changeValue(p);
551
- }
552
- }), d = g({
553
- get: () => u.value.temporalType,
554
- set: (p) => {
555
- u.value = {
556
- ...u.value,
557
- temporalType: p
558
- };
559
- }
560
- });
561
- return (p, i) => (m(), f("div", {
562
- id: e.labelForId,
563
- class: "control-container"
564
- }, [
565
- x(T(z), {
566
- modelValue: d.value,
567
- "onUpdate:modelValue": i[0] || (i[0] = (y) => d.value = y),
568
- compact: "",
569
- "possible-values": s,
570
- disabled: e.disabled
571
- }, null, 8, ["modelValue", "disabled"]),
572
- x(T(Ye), {
573
- modelValue: u.value,
574
- "onUpdate:modelValue": i[1] || (i[1] = (y) => u.value = y),
575
- compact: "",
576
- disabled: e.disabled,
577
- "show-type-switch-in-popover": !1,
578
- "allowed-formats": V.value,
579
- "all-default-formats": T(E),
580
- "is-valid": !0
581
- }, null, 8, ["modelValue", "disabled", "allowed-formats", "all-default-formats"])
582
- ], 8, et));
583
- }
584
- }), st = /* @__PURE__ */ $(tt, [["__scopeId", "data-v-f6f7c887"]]);
585
- export {
586
- st as default
587
- };
@@ -1,5 +0,0 @@
1
- import { _ as a, G as s } from "./SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Ducup0yA.js";
2
- const _ = /* @__PURE__ */ a(s, [["__scopeId", "data-v-5924aa1f"]]);
3
- export {
4
- _ as S
5
- };
@@ -1,79 +0,0 @@
1
- import { defineComponent as f, computed as n, openBlock as h, createElementBlock as x, createElementVNode as T, createVNode as i, unref as t } from "vue";
2
- import { V as U, W as C, X as D, _ as L } from "./SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Ducup0yA.js";
3
- import { u as B } from "./usePlainDateTimeBatch-Bd2G-GY9.js";
4
- import { p as u } from "./plainDateTimeUtils-CR0UhpkD.js";
5
- const F = { class: "layout-container" }, $ = { class: "date-time-row" }, P = /* @__PURE__ */ f({
6
- __name: "ZonedDateTimeControl",
7
- props: {
8
- control: {},
9
- handleChange: { type: Function },
10
- changeValue: { type: Function },
11
- disabled: { type: Boolean },
12
- error: { type: Boolean },
13
- subText: {},
14
- onRegisterValidation: { type: Function },
15
- labelForId: {}
16
- },
17
- setup(e) {
18
- const a = e, d = n(() => a.control.uischema.options), m = n(
19
- () => u.getMaxGranularity(d.value)
20
- ), {
21
- datePart: c,
22
- timePart: b,
23
- granularity: g,
24
- onDateChange: p,
25
- onTimeChange: y,
26
- onGranularityChange: v
27
- } = B({
28
- getDateTime: () => a.control.data.dateTime,
29
- commit: (o, l, r) => {
30
- a.changeValue({
31
- ...a.control.data,
32
- dateTime: u.toString(o, l, r)
33
- });
34
- }
35
- }), s = n({
36
- get: () => a.control.data.timeZone,
37
- set: (o) => {
38
- a.changeValue({
39
- ...a.control.data,
40
- timeZone: o
41
- });
42
- }
43
- }), V = n(() => d.value?.possibleValues ?? []);
44
- return (o, l) => (h(), x("div", F, [
45
- T("div", $, [
46
- i(t(U), {
47
- id: e.labelForId,
48
- ariaLabel: `${a.control.label} date`,
49
- "model-value": t(c),
50
- disabled: e.disabled,
51
- error: e.error,
52
- "onUpdate:modelValue": t(p)
53
- }, null, 8, ["id", "ariaLabel", "model-value", "disabled", "error", "onUpdate:modelValue"]),
54
- i(t(C), {
55
- ariaLabel: `${a.control.label} time`,
56
- "model-value": t(b),
57
- granularity: t(g),
58
- "max-granularity": m.value,
59
- disabled: e.disabled,
60
- error: e.error,
61
- "onUpdate:modelValue": t(y),
62
- "onUpdate:granularity": t(v)
63
- }, null, 8, ["ariaLabel", "model-value", "granularity", "max-granularity", "disabled", "error", "onUpdate:modelValue", "onUpdate:granularity"])
64
- ]),
65
- i(t(D), {
66
- modelValue: s.value,
67
- "onUpdate:modelValue": l[0] || (l[0] = (r) => s.value = r),
68
- error: e.error,
69
- "possible-values": V.value,
70
- disabled: e.disabled,
71
- "sub-text": e.subText,
72
- ariaLabel: "Timezone"
73
- }, null, 8, ["modelValue", "error", "possible-values", "disabled", "sub-text"])
74
- ]));
75
- }
76
- }), Z = /* @__PURE__ */ L(P, [["__scopeId", "data-v-402887a4"]]);
77
- export {
78
- Z as default
79
- };
@@ -1,4 +0,0 @@
1
- var r = Array.isArray;
2
- export {
3
- r as i
4
- };
@@ -1,31 +0,0 @@
1
- import { ComputedRef, Ref } from 'vue';
2
- import { Temporal } from 'temporal-polyfill';
3
- import { KdsTimeInputGranularity } from '@knime/kds-components';
4
- /**
5
- * Shared batching logic for date / time / granularity edits used by
6
- * `DateTimeControl` and `ZonedDateTimeControl`.
7
- *
8
- * Parses the wire string into `datePart` / `timePart` computeds, tracks
9
- * `granularity` as internal state (initialized via `detectGranularity`), and
10
- * exposes `onDateChange` / `onTimeChange` / `onGranularityChange` handlers
11
- * which batch all emits in the same microtask into a single `commit` call.
12
- *
13
- * Without batching, handling each emit separately would serialize with stale
14
- * sibling values.
15
- */
16
- export declare const usePlainDateTimeBatch: (options: {
17
- /** Reactive accessor for the current wire string. */
18
- getDateTime: () => string;
19
- /**
20
- * Called once per microtask with the resolved date / time / granularity.
21
- * Implementations should serialize and propagate the change.
22
- */
23
- commit: (date: Temporal.PlainDate | null, time: Temporal.PlainTime | null, granularity: KdsTimeInputGranularity) => void;
24
- }) => {
25
- datePart: ComputedRef<Temporal.PlainDate | null>;
26
- timePart: ComputedRef<Temporal.PlainTime | null>;
27
- granularity: Ref<KdsTimeInputGranularity>;
28
- onDateChange: (value: Temporal.PlainDate | null) => void;
29
- onTimeChange: (value: Temporal.PlainTime | null) => void;
30
- onGranularityChange: (g: KdsTimeInputGranularity) => void;
31
- };