@knime/jsonforms 1.6.9 → 1.6.10

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 (65) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AnyOfTwinlist-C3gbWpq1.js → AnyOfTwinlist-D6jRLlC9.js} +1 -1
  3. package/dist/{BaseButton-B6Z2uYGV.js → BaseButton-DRXubmlD.js} +1 -1
  4. package/dist/{Button-B27OsWa6.js → Button-nRJkSaBC.js} +2 -2
  5. package/dist/{Checkbox-Bl3rvtXe.js → Checkbox-bWqzeYko.js} +1 -1
  6. package/dist/{CheckboxControl-BAIwtCZF.js → CheckboxControl-B4kwAvLf.js} +2 -2
  7. package/dist/{Checkboxes-Cb1lJdBP.js → Checkboxes-C0WemzK0.js} +2 -2
  8. package/dist/{CheckboxesControl-CQSzjloD.js → CheckboxesControl-BcBsTMGJ.js} +2 -2
  9. package/dist/{ColumnFilter-DOIYetcH.js → ColumnFilter-BSW3HQiz.js} +1 -1
  10. package/dist/{ColumnSelect-B8IH25EN.js → ColumnSelect-BT6NX4nN.js} +2 -2
  11. package/dist/{ComboBoxControl-CmY_qMv_.js → ComboBoxControl-Dz4VWUbr.js} +3 -3
  12. package/dist/{DateControl-BL2H5BjS.js → DateControl-DvPEzSbD.js} +1 -1
  13. package/dist/{DateTimeControl-BYuJUqBc.js → DateTimeControl-Buq_H47Q.js} +2 -2
  14. package/dist/{DateTimeFormatInput-BagQnUJb.js → DateTimeFormatInput-BLX9j412.js} +3 -3
  15. package/dist/{DateTimeFormatPickerControl-DmbGr3EH.js → DateTimeFormatPickerControl-CQi49UrA.js} +2 -2
  16. package/dist/{DateTimeFormatPickerWithTypeControl-CGCdH2_0.js → DateTimeFormatPickerWithTypeControl-BcK2N4NI.js} +3 -3
  17. package/dist/{DateTimeInput-Cbw4cu1f.js → DateTimeInput-C5Oyw-Bz.js} +3 -3
  18. package/dist/{Dropdown-xSUsqbQu.js → Dropdown-CIDjugP6.js} +2 -2
  19. package/dist/{DropdownControl-DGfi9k8S.js → DropdownControl-CRr853C_.js} +1 -1
  20. package/dist/{DropdownControl.vue_vue_type_script_setup_true_lang-BvodaKZi.js → DropdownControl.vue_vue_type_script_setup_true_lang-C56gUC45.js} +4 -4
  21. package/dist/{FunctionButton-BjutjqfY.js → FunctionButton-6rf73qNS.js} +2 -2
  22. package/dist/{HorizontalLayout-HzwqDGLQ.js → HorizontalLayout-Bq5hSQkC.js} +1 -1
  23. package/dist/{InputField-CWbS01h9.js → InputField-BZzeUMVs.js} +1 -1
  24. package/dist/{IntegerControl-BNz67bUk.js → IntegerControl-DtEJ9jaq.js} +1 -1
  25. package/dist/{IntervalControl-jM22Q0CQ.js → IntervalControl-uNaB8SlU.js} +4 -4
  26. package/dist/{MultiselectListBox-D5smzcVZ.js → MultiselectListBox-B0o19vqK.js} +1 -1
  27. package/dist/{NameFilter-B9TOgIBA.js → NameFilter-C24OdpHy.js} +1 -1
  28. package/dist/{NumberControl-YCMcJfZB.js → NumberControl-BGSO6wof.js} +1 -1
  29. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B7TqcQCe.js +53 -0
  30. package/dist/{NumberInput-DO8rNjya.js → NumberInput-DCbMtXhN.js} +1 -1
  31. package/dist/{OneOfDropdown-BoOe32dm.js → OneOfDropdown-oecnOh5j.js} +1 -1
  32. package/dist/{RadioControl-DK_i_SC9.js → RadioControl-1ymKFtE9.js} +2 -2
  33. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-B_Dxf3fU.js → RadioControlBase.vue_vue_type_script_setup_true_lang-CplSbUri.js} +2 -2
  34. package/dist/{RichTextControl-Bp6N-XYM.js → RichTextControl-IMoFZ4yN.js} +5 -5
  35. package/dist/{SectionHeading-wDPgvJNi.js → SectionHeading-C9ojqc26.js} +1 -1
  36. package/dist/{SectionLayout-DYLzJvJs.js → SectionLayout-CG6GUoC4.js} +3 -3
  37. package/dist/{SettingsSubPanel-DTubXv1M.js → SettingsSubPanel-D2qmyQRj.js} +2 -2
  38. package/dist/{SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js → SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js} +637 -632
  39. package/dist/{SettingsSubPanelLayout-CAtNgx_A.js → SettingsSubPanelLayout-C4jPUZqS.js} +5 -5
  40. package/dist/{SimpleButtonControl-D2slFPzs.js → SimpleButtonControl-CZXA-sOd.js} +2 -2
  41. package/dist/{SimpleTwinlistControl-CrLWO2B2.js → SimpleTwinlistControl-DQeky-AX.js} +2 -2
  42. package/dist/{SortListControl-v_nVoQsh.js → SortListControl-D4yMhrbk.js} +4 -4
  43. package/dist/{TextAreaControl-CxNkzjdq.js → TextAreaControl-CAj56e3W.js} +1 -1
  44. package/dist/{TextControl-j8Bk4RzX.js → TextControl-_Wx3rzZd.js} +1 -1
  45. package/dist/TextControl.vue_vue_type_script_setup_true_lang-BlZ-3BwP.js +93 -0
  46. package/dist/{TimeControl-vGEtfCEt.js → TimeControl-B-xivFCg.js} +2 -2
  47. package/dist/{TwinlistControl-Dw5uSnOi.js → TwinlistControl-BZaEVT9H.js} +4 -4
  48. package/dist/{TwinlistLoadingInfo-DnhM2U43.js → TwinlistLoadingInfo-BGRl50bt.js} +5 -5
  49. package/dist/{ValueSwitch-CGXtJV-B.js → ValueSwitch-ChvWwn2P.js} +1 -1
  50. package/dist/{ValueSwitchControl-dHPRa3vB.js → ValueSwitchControl-BIi3Dylq.js} +1 -1
  51. package/dist/{VerticalLayout-BUWGeKPt.js → VerticalLayout-fN3TpOhN.js} +2 -2
  52. package/dist/{VerticalLayoutBase-Tp2IGikj.js → VerticalLayoutBase-Ci94-Lwd.js} +1 -1
  53. package/dist/{ZonedDateTimeControl-Ddjugjzp.js → ZonedDateTimeControl-Cqki5Y3R.js} +4 -4
  54. package/dist/knime-jsonforms.js +7 -7
  55. package/dist/{localTimeUtils-DIFjv2_A.js → localTimeUtils-xLrZjUnt.js} +1 -1
  56. package/dist/{magic-string.es-BbItKD7x.js → magic-string.es-lf2rq-mj.js} +1 -1
  57. package/dist/src/higherOrderComponents/control/validation/types.d.ts +7 -1
  58. package/dist/src/uiComponents/composables/useBuiltinValidations.d.ts +43 -0
  59. package/dist/src/uiComponents/composables/useProvidedState.d.ts +2 -2
  60. package/dist/{svgWithTitle-Cgc-TGWi.js → svgWithTitle-CS5C7Mz8.js} +1 -1
  61. package/dist/testing.js +2 -2
  62. package/dist/useBuiltinValidations-yPAysvI4.js +52 -0
  63. package/package.json +1 -1
  64. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-CPj9t6fL.js +0 -60
  65. package/dist/TextControl.vue_vue_type_script_setup_true_lang-qt4UxKcl.js +0 -87
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as c, openBlock as n, createBlock as r, withCtx as t, createVNode as o, unref as l, pushScopeId as p, popScopeId as i, createElementVNode as m } from "vue";
2
- import { n as d, _ as h } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
2
+ import { n as d, _ as h } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
3
  import { N as f } from "./arrow-next-Qa8PNb04.js";
4
- import { V as b } from "./VerticalLayoutBase-Tp2IGikj.js";
5
- import { S as y } from "./SectionHeading-wDPgvJNi.js";
6
- import { S } from "./SettingsSubPanel-DTubXv1M.js";
7
- import { F as _ } from "./FunctionButton-BjutjqfY.js";
4
+ import { V as b } from "./VerticalLayoutBase-Ci94-Lwd.js";
5
+ import { S as y } from "./SectionHeading-C9ojqc26.js";
6
+ import { S } from "./SettingsSubPanel-D2qmyQRj.js";
7
+ import { F as _ } from "./FunctionButton-6rf73qNS.js";
8
8
  const k = (a) => (p("data-v-6ea6b26c"), a = a(), i(), a), g = /* @__PURE__ */ k(() => /* @__PURE__ */ m("span", null, "Set", -1)), I = /* @__PURE__ */ c({
9
9
  __name: "SettingsSubPanelLayout",
10
10
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as u, openBlock as s, createBlock as p, resolveDynamicComponent as f, computed as r, ref as g, createElementBlock as _, createVNode as b, unref as y, withCtx as B, createCommentVNode as C, createTextVNode as h, toDisplayString as k, renderSlot as I } from "vue";
2
- import { k as V, _ as F } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
2
+ import { k as V, _ as F } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
3
  import { R as S } from "./reload-BhzcZRFp.js";
4
- import { B as $ } from "./Button-B27OsWa6.js";
4
+ import { B as $ } from "./Button-nRJkSaBC.js";
5
5
  const x = /* @__PURE__ */ u({
6
6
  __name: "DynamicIcon",
7
7
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as d, computed as r, markRaw as u, openBlock as p, createBlock as c, unref as i } from "vue";
2
- import { k as m, u as b, _ as f } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
3
- import { a as h, T as w } from "./TwinlistLoadingInfo-DnhM2U43.js";
2
+ import { k as m, u as b, _ as f } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
+ import { a as h, T as w } from "./TwinlistLoadingInfo-BGRl50bt.js";
4
4
  const v = /* @__PURE__ */ d({
5
5
  __name: "SimpleTwinlistControl",
6
6
  props: {
@@ -1,15 +1,15 @@
1
1
  import { openBlock as S, createElementBlock as A, createElementVNode as k, defineComponent as Z, computed as _, ref as N, watch as W, Fragment as z, createVNode as u, withKeys as L, withModifiers as B, unref as p, withCtx as f, nextTick as ae, onMounted as re, createTextVNode as F, renderSlot as O, normalizeClass as ie } from "vue";
2
- import { _ as Y, u as ce, k as ue, L as de, E as me } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
2
+ import { _ as Y, u as ce, k as ue, L as de, E as me } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
3
  import { w as pe } from "./getPossibleValuesFromUiSchema-hQj1TCOR.js";
4
4
  import { i as fe } from "./navigator-DWmzYl-A.js";
5
- import { F as M } from "./FunctionButton-BjutjqfY.js";
6
- import { M as he } from "./MultiselectListBox-D5smzcVZ.js";
5
+ import { F as M } from "./FunctionButton-6rf73qNS.js";
6
+ import { M as he } from "./MultiselectListBox-B0o19vqK.js";
7
7
  import { b as ve } from "./_baseAssignValue-BPMLYzDH.js";
8
8
  import { b as we } from "./_baseEach-B8N_Gx8P.js";
9
9
  import { b as be } from "./_baseIteratee-DvBmrhnf.js";
10
10
  import { i as ge } from "./toString-DkbNkGT4.js";
11
11
  import { c as Ve } from "./createMissingItem-B00Kg95q.js";
12
- import { B as T } from "./Button-B27OsWa6.js";
12
+ import { B as T } from "./Button-nRJkSaBC.js";
13
13
  const R = {
14
14
  ArrowUp: "↑",
15
15
  ArrowDown: "↓",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as a, createElementBlock as o, normalizeClass as r, createElementVNode as u, mergeProps as c, createCommentVNode as m, defineComponent as p, createBlock as f, unref as V } from "vue";
2
- import { _ as i } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
2
+ import { _ as i } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
3
  const y = {
4
4
  name: "TextArea",
5
5
  props: {
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./TextControl.vue_vue_type_script_setup_true_lang-qt4UxKcl.js";
1
+ import { _ as f } from "./TextControl.vue_vue_type_script_setup_true_lang-BlZ-3BwP.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,93 @@
1
+ import { defineComponent as k, ref as y, computed as m, openBlock as d, createBlock as i, withCtx as t, unref as r, normalizeProps as E, mergeProps as B, createCommentVNode as u, createVNode as F, renderSlot as h } from "vue";
2
+ import { u as L, L as P, E as w } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
+ import { u as N } from "./useBuiltinValidations-yPAysvI4.js";
4
+ import { u as $ } from "./useHideOnNull-CCfNP3O7.js";
5
+ import { C as H } from "./Checkbox-bWqzeYko.js";
6
+ import { I } from "./InputField-BZzeUMVs.js";
7
+ const z = /* @__PURE__ */ k({
8
+ __name: "TextControl",
9
+ props: {
10
+ control: {},
11
+ handleChange: { type: Function },
12
+ changeValue: { type: Function },
13
+ disabled: { type: Boolean },
14
+ labelForId: {},
15
+ isValid: { type: Boolean },
16
+ messages: {},
17
+ onRegisterValidation: { type: Function }
18
+ },
19
+ setup(b) {
20
+ var c, p;
21
+ const l = b;
22
+ N(
23
+ {
24
+ pattern: ({ pattern: e }) => {
25
+ const o = new RegExp(`^(${e})$`);
26
+ return (n) => o.test(n ?? "");
27
+ },
28
+ minLength: ({ minLength: e }) => (o) => ((o == null ? void 0 : o.length) ?? 0) >= e,
29
+ maxLength: ({ maxLength: e }) => (o) => ((o == null ? void 0 : o.length) ?? 0) <= e
30
+ },
31
+ l
32
+ );
33
+ const f = L(
34
+ (c = l.control.uischema.options) == null ? void 0 : c.placeholderProvider,
35
+ ((p = l.control.uischema.options) == null ? void 0 : p.placeholder) ?? ""
36
+ ), a = y(null), { showCheckbox: g, showControl: V, checkboxProps: C } = $(
37
+ {
38
+ control: m(() => l.control),
39
+ disabled: m(() => l.disabled),
40
+ controlElement: a
41
+ },
42
+ {
43
+ setDefault: () => l.changeValue(""),
44
+ setNull: () => l.changeValue(null)
45
+ }
46
+ );
47
+ return (e, o) => {
48
+ var n;
49
+ return d(), i(P, {
50
+ label: e.control.label,
51
+ "hide-control-header": (n = e.control.uischema.options) == null ? void 0 : n.hideControlHeader
52
+ }, {
53
+ "before-label": t(() => [
54
+ r(g) ? (d(), i(r(H), E(B({ key: 0 }, r(C))), null, 16)) : u("", !0)
55
+ ]),
56
+ default: t(({ labelForId: s }) => [
57
+ r(V) ? (d(), i(w, {
58
+ key: 0,
59
+ errors: e.messages.errors
60
+ }, {
61
+ default: t(() => [
62
+ F(r(I), {
63
+ id: s,
64
+ ref_key: "controlElement",
65
+ ref: a,
66
+ placeholder: r(f),
67
+ "model-value": e.control.data,
68
+ disabled: e.disabled,
69
+ "is-valid": e.isValid,
70
+ compact: "",
71
+ "onUpdate:modelValue": e.changeValue
72
+ }, null, 8, ["id", "placeholder", "model-value", "disabled", "is-valid", "onUpdate:modelValue"])
73
+ ]),
74
+ _: 2
75
+ }, 1032, ["errors"])) : u("", !0)
76
+ ]),
77
+ icon: t(() => [
78
+ h(e.$slots, "icon")
79
+ ]),
80
+ buttons: t(({ hover: s }) => [
81
+ h(e.$slots, "buttons", {
82
+ hover: s,
83
+ controlHTMLElement: a.value
84
+ })
85
+ ]),
86
+ _: 3
87
+ }, 8, ["label", "hide-control-header"]);
88
+ };
89
+ }
90
+ });
91
+ export {
92
+ z as _
93
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, computed as s, openBlock as m, createBlock as u, unref as l } from "vue";
2
- import { D as p } from "./DateTimeInput-Cbw4cu1f.js";
3
- import { l as a } from "./localTimeUtils-DIFjv2_A.js";
2
+ import { D as p } from "./DateTimeInput-C5Oyw-Bz.js";
3
+ import { l as a } from "./localTimeUtils-xLrZjUnt.js";
4
4
  const g = /* @__PURE__ */ r({
5
5
  __name: "TimeControl",
6
6
  props: {
@@ -1,11 +1,11 @@
1
1
  import { openBlock as f, createElementBlock as k, createElementVNode as H, toRef as W, resolveComponent as y, normalizeClass as G, createBlock as I, withCtx as C, createVNode as g, createCommentVNode as P, mergeProps as x, ref as M, watch as _, defineComponent as J, computed as u, markRaw as K, unref as L } from "vue";
2
2
  import { g as U, a as Q, m as X } from "./index-hm05O8UX.js";
3
3
  import { w as Y } from "./getPossibleValuesFromUiSchema-hQj1TCOR.js";
4
- import { o as Z, _ as B, u as $, k as ee } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
5
- import { S as te, T as le, u as ae, a as ne } from "./TwinlistLoadingInfo-DnhM2U43.js";
4
+ import { o as Z, _ as B, u as $, k as ee } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
5
+ import { S as te, T as le, u as ae, a as ne } from "./TwinlistLoadingInfo-BGRl50bt.js";
6
6
  import { f as F } from "./useSearch-hpyYQ_6y.js";
7
- import { C as se } from "./Checkboxes-Cb1lJdBP.js";
8
- import { V as oe } from "./ValueSwitch-CGXtJV-B.js";
7
+ import { C as se } from "./Checkboxes-C0WemzK0.js";
8
+ import { V as oe } from "./ValueSwitch-ChvWwn2P.js";
9
9
  const ie = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  fill: "none",
@@ -3,13 +3,13 @@ import { N as de } from "./arrow-next-Qa8PNb04.js";
3
3
  import { u as Z } from "./useSearch-hpyYQ_6y.js";
4
4
  import { i as N } from "./isObject-B53jY8Qg.js";
5
5
  import { i as he, r as fe } from "./isSymbol-OFe5xy2f.js";
6
- import { _ as H, o as me } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
7
- import { M as ve } from "./MultiselectListBox-D5smzcVZ.js";
6
+ import { _ as H, o as me } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
7
+ import { M as ve } from "./MultiselectListBox-B0o19vqK.js";
8
8
  import { C as ge } from "./close-h7XT0ja0.js";
9
- import { F as be } from "./FunctionButton-BjutjqfY.js";
10
- import { I as Se } from "./InputField-CWbS01h9.js";
9
+ import { F as be } from "./FunctionButton-6rf73qNS.js";
10
+ import { I as Se } from "./InputField-BZzeUMVs.js";
11
11
  import { c as X } from "./createMissingItem-B00Kg95q.js";
12
- import { L as we } from "./svgWithTitle-Cgc-TGWi.js";
12
+ import { L as we } from "./svgWithTitle-CS5C7Mz8.js";
13
13
  const _e = {
14
14
  xmlns: "http://www.w3.org/2000/svg",
15
15
  fill: "none",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as i, openBlock as o, createElementBlock as d, Fragment as n, renderList as V, normalizeClass as p, createElementVNode as s, toDisplayString as u, renderSlot as m, createCommentVNode as v, pushScopeId as B, popScopeId as $, resolveComponent as S, createBlock as g, withCtx as _, normalizeProps as w, guardReactiveProps as I } from "vue";
2
- import { _ as f } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
2
+ import { _ as f } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
3
  let r = 0;
4
4
  const k = i({
5
5
  name: "BaseRadioButtons",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, openBlock as n, createBlock as t, mergeProps as a } from "vue";
2
- import { _ as p } from "./RadioControlBase.vue_vue_type_script_setup_true_lang-B_Dxf3fU.js";
2
+ import { _ as p } from "./RadioControlBase.vue_vue_type_script_setup_true_lang-CplSbUri.js";
3
3
  const s = /* @__PURE__ */ o({
4
4
  __name: "ValueSwitchControl",
5
5
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as o, openBlock as a, createBlock as l, withCtx as s, unref as n } from "vue";
2
- import { n as u } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
3
- import { V as m } from "./VerticalLayoutBase-Tp2IGikj.js";
2
+ import { n as u } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
+ import { V as m } from "./VerticalLayoutBase-Ci94-Lwd.js";
4
4
  const d = /* @__PURE__ */ o({
5
5
  __name: "VerticalLayout",
6
6
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as s, openBlock as r, createElementBlock as o, Fragment as n, renderList as c, renderSlot as l } from "vue";
2
- import { _ } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
2
+ import { _ } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
3
  const p = { class: "vertical-layout" }, u = /* @__PURE__ */ s({
4
4
  __name: "VerticalLayoutBase",
5
5
  props: {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as v, computed as a, openBlock as V, createElementBlock as b, createVNode as m, unref as r } from "vue";
2
- import { D as f } from "./DateTimeInput-Cbw4cu1f.js";
3
- import { _ as T } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
4
- import { t as h, f as g } from "./localTimeUtils-DIFjv2_A.js";
5
- import { D as C } from "./Dropdown-xSUsqbQu.js";
2
+ import { D as f } from "./DateTimeInput-C5Oyw-Bz.js";
3
+ import { _ as T } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
4
+ import { t as h, f as g } from "./localTimeUtils-xLrZjUnt.js";
5
+ import { D as C } from "./Dropdown-CIDjugP6.js";
6
6
  const y = ["id"], D = /* @__PURE__ */ v({
7
7
  __name: "ZonedDateTimeControl",
8
8
  props: {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as i, ref as g, onMounted as C, openBlock as c, createElementBlock as v, createCommentVNode as E, pushScopeId as k, popScopeId as x, createElementVNode as D, provide as P, computed as A, watch as T, createBlock as w, Suspense as I, withCtx as d, createVNode as l, renderSlot as _, unref as B, nextTick as j } from "vue";
2
- import { _ as y, s as F, U as M, i as O } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
3
- import { E as ae, L as re, a as ne, c as de, e as le, b as ce, d as ie, g as pe, h as ue, j as me, l as fe, f as _e, m as he, p as ge, t as ve, w as De } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
4
- import { F as $ } from "./SettingsSubPanel-DTubXv1M.js";
5
- import { S as Se } from "./SettingsSubPanel-DTubXv1M.js";
6
- import { default as Le } from "./SimpleButtonControl-D2slFPzs.js";
7
- import { _ as Ee } from "./TextControl.vue_vue_type_script_setup_true_lang-qt4UxKcl.js";
8
- import { V as xe } from "./VerticalLayoutBase-Tp2IGikj.js";
2
+ import { _ as y, s as F, U as M, i as O } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
+ import { E as ae, L as re, a as ne, c as de, e as le, b as ce, d as ie, g as pe, h as ue, j as me, l as fe, f as _e, m as he, p as ge, t as ve, w as De } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
4
+ import { F as $ } from "./SettingsSubPanel-D2qmyQRj.js";
5
+ import { S as Se } from "./SettingsSubPanel-D2qmyQRj.js";
6
+ import { default as Le } from "./SimpleButtonControl-CZXA-sOd.js";
7
+ import { _ as Ee } from "./TextControl.vue_vue_type_script_setup_true_lang-BlZ-3BwP.js";
8
+ import { V as xe } from "./VerticalLayoutBase-Ci94-Lwd.js";
9
9
  const R = (o) => (k("data-v-7dabb11d"), o = o(), x(), o), V = {
10
10
  key: 0,
11
11
  class: "loading-dialog skeleton-wrapper"
@@ -1,4 +1,4 @@
1
- import { r as q, t as k, g as F, a as Z, b as j, c as z, d as _, i as V, e as K, s as A, l as J, f as ee, h as L, j as te, k as re, m as ne, n as I, o as P, p as ae } from "./DateTimeInput-Cbw4cu1f.js";
1
+ import { r as q, t as k, g as F, a as Z, b as j, c as z, d as _, i as V, e as K, s as A, l as J, f as ee, h as L, j as te, k as re, m as ne, n as I, o as P, p as ae } from "./DateTimeInput-C5Oyw-Bz.js";
2
2
  var ie = 864e5;
3
3
  function oe(a) {
4
4
  q(1, arguments);
@@ -1,4 +1,4 @@
1
- import { r as ht } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
1
+ import { r as ht } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
2
2
  var q = { exports: {} };
3
3
  (function(E, t) {
4
4
  (function(e, n) {
@@ -2,7 +2,13 @@ import { MaybeRef } from 'vue';
2
2
  export type Messages = {
3
3
  errors: string[];
4
4
  };
5
- export type ValidationMethod<D> = MaybeRef<(value: D) => Messages>;
5
+ /**
6
+ * A registered validation method.
7
+ * Since some validation methods are dynamic, this can be a ref.
8
+ * Since some validation methods are not known initially (e.g. async validation),
9
+ * this can be null.
10
+ */
11
+ export type ValidationMethod<D> = MaybeRef<((value: D) => Messages) | null>;
6
12
  export type ValidationSettings<D> = {
7
13
  isValid: boolean;
8
14
  messages: Messages;
@@ -0,0 +1,43 @@
1
+ import { Ref } from 'vue';
2
+ import { VueControlProps, VueControlPropsForLabelContent } from '../../higherOrderComponents';
3
+ /**
4
+ * @type {P} - parameters for the validation
5
+ * @type {S} - type of the value to validate
6
+ */
7
+ export type Validator<P, S> = (params: P) => (value: S) => boolean;
8
+ /**
9
+ * @type {T} - type defining the available built-in validations by id-param pairs
10
+ * @type {S} - type of the value to validate
11
+ */
12
+ export type Validators<T, S> = {
13
+ [K in keyof T]: Validator<T[K], S>;
14
+ };
15
+ /**
16
+ * The data provided for a built-in validation.
17
+ * @type {T} - type defining the available built-in validations by id-param pairs
18
+ */
19
+ export type BuiltinValidation<T, K extends keyof T> = {
20
+ id: K;
21
+ parameters: T[K];
22
+ errorMessage: string;
23
+ };
24
+ /**
25
+ * A list of built-in validations typed to T.
26
+ * @type {T} - type defining the available built-in validations by id-param pairs
27
+ */
28
+ export type BuiltinValidations<T> = Array<{
29
+ [K in keyof T]: BuiltinValidation<T, K>;
30
+ }[keyof T]>;
31
+ /**
32
+ * Composable used within a control to define/handle its built-in validations.
33
+ *
34
+ * @param validators - the handlers for the supported validations
35
+ * @param props - the props of the control
36
+ * @returns a ref containing the validation parameters.
37
+ * This is provided if these are required for custom behavior in the control
38
+ * (e.g. setting the minimum in a number control)
39
+ *
40
+ * @type {T} - type defining the available built-in validations by id-param pairs
41
+ * @type {S} - type of the value to validate, i.e. the type of the data of the control
42
+ */
43
+ export declare const useBuiltinValidation: <T, S>(validators: Validators<T, S>, props: VueControlProps<S> | VueControlPropsForLabelContent<S>) => Ref<Partial<T>>;
@@ -1,3 +1,3 @@
1
- import { MaybeRef, UnwrapRef } from 'vue';
2
- declare const _default: <T>(stateProviderId: MaybeRef<string | undefined>, defaultValue: T) => import('vue').Ref<UnwrapRef<T>>;
1
+ import { MaybeRef, Ref } from 'vue';
2
+ declare const _default: <T>(stateProviderId: MaybeRef<string | undefined>, defaultValue: T) => Ref<T>;
3
3
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, openBlock as c, createBlock as s, unref as a, h as i } from "vue";
2
2
  import { R as d } from "./reload-BhzcZRFp.js";
3
- import { _ } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
3
+ import { _ } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
4
4
  const p = /* @__PURE__ */ r({
5
5
  __name: "LoadingIcon",
6
6
  setup(t) {
package/dist/testing.js CHANGED
@@ -3,7 +3,7 @@ var N_ = (e, t, n) => t in e ? O_(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var G = (e, t, n) => N_(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Jf from "vue";
5
5
  import { initDirectivesForSSR as I_, nextTick as lo, defineComponent as ai, computed as Ar, h as En, shallowReactive as A_, reactive as k_, ref as C_, createApp as $_, transformVNodeArgs as P_, setDevtoolsHook as M_, Transition as R_, BaseTransition as D_, TransitionGroup as j_, isRef as L_ } from "vue";
6
- import { b as F_ } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
6
+ import { b as F_ } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
7
7
  import { i as B_ } from "./isSymbol-OFe5xy2f.js";
8
8
  import { b as V_ } from "./_baseIteratee-DvBmrhnf.js";
9
9
  function q_(e, t) {
@@ -9513,7 +9513,7 @@ function Aw(e, t) {
9513
9513
  return s + 1;
9514
9514
  }
9515
9515
  async function kw(e, t) {
9516
- const n = (await import("./magic-string.es-BbItKD7x.js")).default, r = new Set(t.map((i) => i.file));
9516
+ const n = (await import("./magic-string.es-lf2rq-mj.js")).default, r = new Set(t.map((i) => i.file));
9517
9517
  await Promise.all(
9518
9518
  Array.from(r).map(async (i) => {
9519
9519
  const s = t.filter((c) => c.file === i), o = await e.readSnapshotFile(i), a = new n(o);
@@ -0,0 +1,52 @@
1
+ import { computed as r } from "vue";
2
+ import { u as d } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-BKc2bf4r.js";
3
+ const l = (e = {}) => e.validations ?? [], c = (e = {}) => (e.validationProviders ?? []).map(
4
+ (i) => d(i, null)
5
+ ), s = (e, i) => {
6
+ const n = e.map(
7
+ ({ id: t, parameters: o, errorMessage: a }) => ({
8
+ validate: i[t](o),
9
+ errorMessage: a
10
+ })
11
+ );
12
+ return (t) => ({
13
+ errors: n.filter(({ validate: o }) => !o(t)).map(({ errorMessage: o }) => o)
14
+ });
15
+ }, u = (e, i) => e === null ? null : s([e], i), m = (e, i, n, t) => {
16
+ if (e.length) {
17
+ const o = s(e, n);
18
+ t(o);
19
+ }
20
+ i.length && i.map(
21
+ (a) => r(() => u(a.value, n))
22
+ ).forEach(t);
23
+ }, h = ({
24
+ validations: e,
25
+ providedValidations: i
26
+ }) => {
27
+ const n = e.reduce(
28
+ (t, o) => ({ ...t, [o.id]: o.parameters }),
29
+ {}
30
+ );
31
+ return r(
32
+ () => i.map((t) => t.value).filter((t) => t !== null).reduce(
33
+ (t, o) => ({
34
+ ...t,
35
+ // @ts-expect-error - we know that validation is not null here
36
+ [o.id]: o.parameters
37
+ }),
38
+ n
39
+ )
40
+ );
41
+ }, f = (e, i) => {
42
+ const n = i.control.uischema.options, t = l(n), o = c(n);
43
+ return m(
44
+ t,
45
+ o,
46
+ e,
47
+ i.onRegisterValidation
48
+ ), h({ validations: t, providedValidations: o });
49
+ };
50
+ export {
51
+ f as u
52
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/jsonforms",
3
- "version": "1.6.9",
3
+ "version": "1.6.10",
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)",
@@ -1,60 +0,0 @@
1
- import { defineComponent as b, computed as y, openBlock as h, createBlock as V, unref as i } from "vue";
2
- import { u as m } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
3
- import { N as g } from "./NumberInput-DO8rNjya.js";
4
- const C = /* @__PURE__ */ b({
5
- __name: "NumberControlBase",
6
- props: {
7
- control: {},
8
- handleChange: { type: Function },
9
- changeValue: { type: Function },
10
- disabled: { type: Boolean },
11
- isValid: { type: Boolean },
12
- onRegisterValidation: { type: Function },
13
- labelForId: {},
14
- type: {}
15
- },
16
- setup(f) {
17
- const o = f, {
18
- min: u,
19
- minProvider: s,
20
- max: d,
21
- maxProvider: p
22
- } = o.control.uischema.options || {}, a = m(s, u), n = m(p, d);
23
- if (typeof [s, p, u, d].find(
24
- (e) => typeof e < "u"
25
- ) < "u") {
26
- const e = ({
27
- value: t,
28
- minimum: r,
29
- maximum: l
30
- }) => typeof r == "number" && t < r ? { errors: [`The value has to be at least ${r}`] } : typeof l == "number" && t > l ? { errors: [`The value has to be ${l} at max`] } : { errors: [] }, c = y(
31
- () => (t) => e({
32
- value: t,
33
- minimum: a.value,
34
- maximum: n.value
35
- })
36
- );
37
- o.onRegisterValidation(c);
38
- }
39
- const v = () => {
40
- const e = o.control.data;
41
- typeof a.value == "number" && e < a.value ? o.changeValue(a.value) : typeof n.value == "number" && e > n.value && o.changeValue(n.value);
42
- };
43
- return (e, c) => (h(), V(i(g), {
44
- id: e.labelForId,
45
- class: "number-input",
46
- disabled: e.disabled,
47
- "model-value": e.control.data,
48
- type: e.type,
49
- min: i(a),
50
- max: i(n),
51
- "is-valid": e.isValid,
52
- compact: "",
53
- "onUpdate:modelValue": e.changeValue,
54
- onFocusout: v
55
- }, null, 8, ["id", "disabled", "model-value", "type", "min", "max", "is-valid", "onUpdate:modelValue"]));
56
- }
57
- });
58
- export {
59
- C as _
60
- };
@@ -1,87 +0,0 @@
1
- import { defineComponent as k, ref as v, computed as m, openBlock as d, createBlock as i, withCtx as r, unref as l, normalizeProps as P, mergeProps as E, createCommentVNode as h, createVNode as F, renderSlot as f } from "vue";
2
- import { u as $, L as w, E as B } from "./SettingsSubPanel.vue_vue_type_style_index_0_scoped_67b92e23_lang-dAvPWPee.js";
3
- import { u as N } from "./useHideOnNull-CCfNP3O7.js";
4
- import { C as H } from "./Checkbox-Bl3rvtXe.js";
5
- import { I } from "./InputField-CWbS01h9.js";
6
- const U = /* @__PURE__ */ k({
7
- __name: "TextControl",
8
- props: {
9
- control: {},
10
- handleChange: { type: Function },
11
- changeValue: { type: Function },
12
- disabled: { type: Boolean },
13
- labelForId: {},
14
- isValid: { type: Boolean },
15
- messages: {},
16
- onRegisterValidation: { type: Function }
17
- },
18
- setup(b) {
19
- var c, p;
20
- const o = b, a = o.control.schema.pattern;
21
- if (typeof a == "string") {
22
- const e = new RegExp(`^(${a})$`), u = (t) => ({
23
- errors: t === null || typeof t > "u" || !e.test(t) ? [`The value has to match the pattern "${a}"`] : []
24
- });
25
- o.onRegisterValidation(u);
26
- }
27
- const g = $(
28
- (c = o.control.uischema.options) == null ? void 0 : c.placeholderProvider,
29
- ((p = o.control.uischema.options) == null ? void 0 : p.placeholder) ?? ""
30
- ), n = v(null), { showCheckbox: V, showControl: C, checkboxProps: y } = N(
31
- {
32
- control: m(() => o.control),
33
- disabled: m(() => o.disabled),
34
- controlElement: n
35
- },
36
- {
37
- setDefault: () => o.changeValue(""),
38
- setNull: () => o.changeValue(null)
39
- }
40
- );
41
- return (e, u) => {
42
- var t;
43
- return d(), i(w, {
44
- label: e.control.label,
45
- "hide-control-header": (t = e.control.uischema.options) == null ? void 0 : t.hideControlHeader
46
- }, {
47
- "before-label": r(() => [
48
- l(V) ? (d(), i(l(H), P(E({ key: 0 }, l(y))), null, 16)) : h("", !0)
49
- ]),
50
- default: r(({ labelForId: s }) => [
51
- l(C) ? (d(), i(B, {
52
- key: 0,
53
- errors: e.messages.errors
54
- }, {
55
- default: r(() => [
56
- F(l(I), {
57
- id: s,
58
- ref_key: "controlElement",
59
- ref: n,
60
- placeholder: l(g),
61
- "model-value": e.control.data,
62
- disabled: e.disabled,
63
- "is-valid": e.isValid,
64
- compact: "",
65
- "onUpdate:modelValue": e.changeValue
66
- }, null, 8, ["id", "placeholder", "model-value", "disabled", "is-valid", "onUpdate:modelValue"])
67
- ]),
68
- _: 2
69
- }, 1032, ["errors"])) : h("", !0)
70
- ]),
71
- icon: r(() => [
72
- f(e.$slots, "icon")
73
- ]),
74
- buttons: r(({ hover: s }) => [
75
- f(e.$slots, "buttons", {
76
- hover: s,
77
- controlHTMLElement: n.value
78
- })
79
- ]),
80
- _: 3
81
- }, 8, ["label", "hide-control-header"]);
82
- };
83
- }
84
- });
85
- export {
86
- U as _
87
- };