@knime/jsonforms 1.4.1 → 1.5.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 (143) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{AnyOfTwinlist-0hW9G7sf.js → AnyOfTwinlist-C3M6wWi-.js} +8 -6
  3. package/dist/{BaseButton-DYMQRyQo.js → BaseButton-8vDrj52e.js} +1 -1
  4. package/dist/{Button-BR-eqILd.js → Button-Bngb_I70.js} +2 -2
  5. package/dist/{Checkbox-9hNjHDpy.js → Checkbox-DSfVQlDb.js} +1 -1
  6. package/dist/CheckboxControl-D85aBRJ6.js +41 -0
  7. package/dist/{Checkboxes-MxUKgTL4.js → Checkboxes-DUJ3v5jU.js} +2 -2
  8. package/dist/CheckboxesControl-8Aa7XOuf.js +41 -0
  9. package/dist/{ColumnFilter-B05Q5-4y.js → ColumnFilter-BzCVLydy.js} +7 -5
  10. package/dist/{ColumnSelect-DZDQRiA5.js → ColumnSelect-DK7NqI5Q.js} +21 -18
  11. package/dist/{ComboBoxControl-CaHVCAiu.js → ComboBoxControl-CEXpJltI.js} +17 -14
  12. package/dist/{DateControl-fKUFzQr8.js → DateControl-CjRiy7d1.js} +6 -4
  13. package/dist/{DateTimeControl-BrwQ4jAx.js → DateTimeControl-CaDuNC_u.js} +18 -15
  14. package/dist/{DateTimeFormatPickerControl-CZY7EboY.js → DateTimeFormatPickerControl-DDTmhBMD.js} +29 -27
  15. package/dist/{DateTimeInput-hVg3JWxI.js → DateTimeInput-96g3nCth.js} +7 -7
  16. package/dist/{Dropdown-C_6yKbqc.js → Dropdown-CQKvBlYB.js} +4 -4
  17. package/dist/{DropdownControl-DNcQIzCP.js → DropdownControl-B0x5hFXM.js} +1 -1
  18. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-DAT1V1G_.js +237 -0
  19. package/dist/{FunctionButton-ByT1Atrb.js → FunctionButton-CapvFBi0.js} +2 -2
  20. package/dist/HorizontalLayout-k7vmjzLP.js +25 -0
  21. package/dist/{InputField-zQvLeNOh.js → InputField-DhyBnTBT.js} +1 -1
  22. package/dist/IntegerControl-ByZYNQ-Z.js +20 -0
  23. package/dist/{IntervalControl-CWBmbjUk.js → IntervalControl-DhujNXBe.js} +37 -35
  24. package/dist/{MultiselectListBox-D18KQA8Z.js → MultiselectListBox-6f4JE0Ny.js} +1 -1
  25. package/dist/{NameFilter-D6GRh9kP.js → NameFilter-DJhwpboP.js} +7 -5
  26. package/dist/NumberControl-CU94dpBh.js +20 -0
  27. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-6vn1oT7O.js +60 -0
  28. package/dist/{NumberInput-DzpQc_Qg.js → NumberInput-Io3ZSWBF.js} +1 -1
  29. package/dist/OneOfDropdown-C04RF5gK.js +35 -0
  30. package/dist/RadioControl-Ni6f_qCw.js +24 -0
  31. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-D7yWH5sv.js → RadioControlBase.vue_vue_type_script_setup_true_lang-RgveiB05.js} +11 -9
  32. package/dist/{RichTextControl-TMco-1sx.js → RichTextControl-hHIvuaDd.js} +9 -7
  33. package/dist/{SectionLayout-M0zSsGYd.js → SectionLayout-DEKmJPJl.js} +2 -2
  34. package/dist/SimpleButtonControl-R0DY_FSx.js +61 -0
  35. package/dist/{SimpleTwinlistControl-BWH9IcaM.js → SimpleTwinlistControl-Bvhr9f3x.js} +16 -13
  36. package/dist/SortListControl-CsrP-QT8.js +366 -0
  37. package/dist/{TextAreaControl-C2gBXg91.js → TextAreaControl-CNH7s35f.js} +25 -22
  38. package/dist/{TextControl-DJ1eQ6Yr.js → TextControl-C1ZKoreI.js} +1 -1
  39. package/dist/TextControl.vue_vue_type_script_setup_true_lang-BhX-hMgT.js +87 -0
  40. package/dist/TimeControl-Bwt1kRki.js +33 -0
  41. package/dist/{TwinlistControl-DMjXrTBS.js → TwinlistControl-DJ88Q4I-.js} +21 -18
  42. package/dist/{TwinlistLoadingInfo-C_JMBMqE.js → TwinlistLoadingInfo-gheFM17g.js} +9 -9
  43. package/dist/{ValueSwitch--IDkMn2T.js → ValueSwitch-B08Mz10g.js} +1 -1
  44. package/dist/ValueSwitchControl-BbJHzaom.js +20 -0
  45. package/dist/{VerticalLayout-CWTnAzTT.js → VerticalLayout-ptrtpOrD.js} +2 -2
  46. package/dist/{VerticalLayoutBase-DHFsRdUV.js → VerticalLayoutBase-B8FGVlzl.js} +1 -1
  47. package/dist/{VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-79uRC9rW.js → VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-Do6BV4CX.js} +5705 -5674
  48. package/dist/ZonedDateTimeControl-70XjGsqQ.js +70 -0
  49. package/dist/{_baseAssignValue-CV6Gjcdp.js → _baseAssignValue-BPMLYzDH.js} +1 -1
  50. package/dist/{_baseEach-BC_75zAM.js → _baseEach-B8N_Gx8P.js} +2 -2
  51. package/dist/{_baseIsEqual-Dy0dFQAX.js → _baseIsEqual-DmkT9Nkc.js} +3 -3
  52. package/dist/{_baseIteratee-BHjwOYqh.js → _baseIteratee-DvBmrhnf.js} +3 -3
  53. package/dist/{_getTag-Ce_JffFU.js → _getTag-DS8v0_uf.js} +33 -34
  54. package/dist/isSymbol-OFe5xy2f.js +34 -0
  55. package/dist/knime-jsonforms.css +1 -1
  56. package/dist/knime-jsonforms.js +26 -26
  57. package/dist/{localTimeUtils-B-ENHrsI.js → localTimeUtils-CzJjTpP3.js} +1 -1
  58. package/dist/src/JsonFormsDialog.vue.d.ts +2 -2
  59. package/dist/src/higherOrderComponents/control/ErrorMessage.vue.d.ts +15 -0
  60. package/dist/src/higherOrderComponents/control/ErrorMessageWrapper.vue.d.ts +22 -0
  61. package/dist/src/higherOrderComponents/control/index.d.ts +1 -1
  62. package/dist/src/higherOrderComponents/control/types.d.ts +2 -1
  63. package/dist/src/higherOrderComponents/control/util.d.ts +18 -2
  64. package/dist/src/higherOrderComponents/control/validation/types.d.ts +10 -0
  65. package/dist/src/higherOrderComponents/control/validation/useValidation.d.ts +9 -0
  66. package/dist/src/higherOrderComponents/control/withErrorMessage.d.ts +4 -0
  67. package/dist/src/higherOrderComponents/control/withLabel.d.ts +9 -0
  68. package/dist/src/renderers/checkboxRenderer.d.ts +1 -192
  69. package/dist/src/renderers/checkboxesRenderer.d.ts +1 -3
  70. package/dist/src/renderers/columnFilterRenderer.d.ts +1 -3
  71. package/dist/src/renderers/columnSelectRenderer.d.ts +56 -0
  72. package/dist/src/renderers/comboBoxRenderer.d.ts +1 -3
  73. package/dist/src/renderers/dateTimeFormatPickerRenderer.d.ts +1 -3
  74. package/dist/src/renderers/dateTimeRenderer.d.ts +1 -3
  75. package/dist/src/renderers/defaultRenderers.d.ts +299 -247
  76. package/dist/src/renderers/dropdownRenderer.d.ts +48 -0
  77. package/dist/src/renderers/fallbackRenderers.d.ts +91 -189
  78. package/dist/src/renderers/integerRenderer.d.ts +1 -3
  79. package/dist/src/renderers/intervalRenderer.d.ts +1 -3
  80. package/dist/src/renderers/localDateRenderer.d.ts +1 -3
  81. package/dist/src/renderers/localTimeRenderer.d.ts +1 -3
  82. package/dist/src/renderers/nameFilterRenderer.d.ts +1 -3
  83. package/dist/src/renderers/numberRenderer.d.ts +1 -3
  84. package/dist/src/renderers/radioRenderer.d.ts +1 -3
  85. package/dist/src/renderers/richTextRenderer.d.ts +1 -3
  86. package/dist/src/renderers/simpleButtonRenderer.d.ts +9 -0
  87. package/dist/src/renderers/sortListRenderer.d.ts +48 -0
  88. package/dist/src/renderers/textAreaRenderer.d.ts +1 -3
  89. package/dist/src/renderers/textMessageRenderer.d.ts +24 -0
  90. package/dist/src/renderers/textRenderer.d.ts +48 -0
  91. package/dist/src/renderers/twinlistRenderer.d.ts +2 -6
  92. package/dist/src/renderers/valueSwitchRenderer.d.ts +1 -3
  93. package/dist/src/renderers/zonedDateTimeRenderer.d.ts +4 -6
  94. package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +1 -1
  95. package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +1 -1
  96. package/dist/src/uiComponents/DateControl.vue.d.ts +1 -1
  97. package/dist/src/uiComponents/DateTimeControl.vue.d.ts +1 -1
  98. package/dist/src/uiComponents/DateTimeFormatPickerControl.vue.d.ts +1 -1
  99. package/dist/src/uiComponents/DropdownControl.vue.d.ts +58 -3
  100. package/dist/src/uiComponents/IntegerControl.vue.d.ts +1 -1
  101. package/dist/src/uiComponents/IntervalControl.vue.d.ts +1 -1
  102. package/dist/src/uiComponents/NumberControl.vue.d.ts +1 -1
  103. package/dist/src/uiComponents/NumberControlBase.vue.d.ts +2 -2
  104. package/dist/src/uiComponents/RadioControl.vue.d.ts +1 -1
  105. package/dist/src/uiComponents/RadioControlBase.vue.d.ts +2 -2
  106. package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +9 -0
  107. package/dist/src/uiComponents/SortListControl.vue.d.ts +58 -3
  108. package/dist/src/uiComponents/TextAreaControl.vue.d.ts +1 -1
  109. package/dist/src/uiComponents/TimeControl.vue.d.ts +1 -1
  110. package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +1 -1
  111. package/dist/src/uiComponents/index.d.ts +1 -1
  112. package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +1 -1
  113. package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +1 -1
  114. package/dist/src/uiComponents/twinlist/ColumnFilter.vue.d.ts +1 -1
  115. package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +1 -1
  116. package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +2 -2
  117. package/dist/src/uiComponents/twinlist/TwinlistControl.vue.d.ts +2 -2
  118. package/dist/{svgWithTitle-VPyre7by.js → svgWithTitle-YSv0CfBl.js} +1 -1
  119. package/dist/testUtils/component.d.ts +70 -7
  120. package/dist/testUtils/renderer.d.ts +1 -1
  121. package/dist/testing.js +203 -199
  122. package/dist/toString-DkbNkGT4.js +25 -0
  123. package/package.json +1 -1
  124. package/dist/CheckboxControl-DtkgVAey.js +0 -42
  125. package/dist/CheckboxesControl-liJGUpRw.js +0 -38
  126. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-m-g4D1dr.js +0 -226
  127. package/dist/ErrorMessage-DQT5FZlf.js +0 -23
  128. package/dist/HorizontalLayout-D1PnPnoE.js +0 -30
  129. package/dist/IntegerControl-D6kUQaXd.js +0 -18
  130. package/dist/NumberControl-CqwAwLo_.js +0 -18
  131. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-Jn4BDGH-.js +0 -42
  132. package/dist/OneOfDropdown-CIeXHQcC.js +0 -32
  133. package/dist/RadioControl-D64PZUts.js +0 -22
  134. package/dist/SimpleButtonControl-DevNyR5x.js +0 -58
  135. package/dist/SortListControl-BLeXo6HS.js +0 -356
  136. package/dist/TextControl.vue_vue_type_script_setup_true_lang-BHuggcaD.js +0 -69
  137. package/dist/TimeControl-DOpylHS3.js +0 -30
  138. package/dist/ValueSwitchControl-BVgE9bjw.js +0 -18
  139. package/dist/ZonedDateTimeControl-B8ORteJg.js +0 -66
  140. package/dist/isSymbol-DwnNqH7F.js +0 -8
  141. package/dist/src/higherOrderComponents/control/addLabel.d.ts +0 -12
  142. package/dist/src/uiComponents/ErrorMessage.vue.d.ts +0 -23
  143. package/dist/toString-B2Sp1LQh.js +0 -26
@@ -1,10 +1,9 @@
1
- import { openBlock as n, createElementBlock as l, createElementVNode as u, renderSlot as d, defineComponent as p, ref as D, onMounted as E, createCommentVNode as S, pushScopeId as $, popScopeId as k, provide as x, watchEffect as C, createBlock as T, Suspense as A, withCtx as c, createVNode as i, unref as I, nextTick as P } from "vue";
2
- import { _ as f, s as w, U as B, i as M } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-79uRC9rW.js";
3
- import { L as re, a as ne, b as de, c as ce, f as ie, e as le, d as ue, g as pe, j as fe, l as me, h as _e, m as he, p as ge, t as ve } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-79uRC9rW.js";
4
- import { E as be } from "./ErrorMessage-DQT5FZlf.js";
5
- import { default as Le } from "./SimpleButtonControl-DevNyR5x.js";
6
- import { _ as Se } from "./TextControl.vue_vue_type_script_setup_true_lang-BHuggcaD.js";
7
- import { V as ke } from "./VerticalLayoutBase-DHFsRdUV.js";
1
+ import { openBlock as n, createElementBlock as l, createElementVNode as u, renderSlot as d, defineComponent as p, ref as D, onMounted as E, createCommentVNode as C, pushScopeId as S, popScopeId as $, provide as k, watchEffect as w, createBlock as x, Suspense as A, withCtx as c, createVNode as i, unref as T, nextTick as I } from "vue";
2
+ import { _ as f, s as P, U as B, i as M } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-Do6BV4CX.js";
3
+ import { E as re, L as ne, a as de, c as ce, e as ie, b as le, d as ue, g as pe, h as fe, j as me, l as _e, f as he, m as ge, p as ve, t as De, w as be } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-Do6BV4CX.js";
4
+ import { default as Le } from "./SimpleButtonControl-R0DY_FSx.js";
5
+ import { _ as Ce } from "./TextControl.vue_vue_type_script_setup_true_lang-BhX-hMgT.js";
6
+ import { V as $e } from "./VerticalLayoutBase-B8FGVlzl.js";
8
7
  const O = {}, j = { class: "flex-wrapper" }, R = { class: "form" };
9
8
  function V(o, a) {
10
9
  return n(), l("div", j, [
@@ -14,7 +13,7 @@ function V(o, a) {
14
13
  d(o.$slots, "bottom-content", {}, void 0, !0)
15
14
  ]);
16
15
  }
17
- const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]), N = (o) => ($("data-v-7dabb11d"), o = o(), k(), o), U = {
16
+ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]), N = (o) => (S("data-v-7dabb11d"), o = o(), $(), o), U = {
18
17
  key: 0,
19
18
  class: "loading-dialog skeleton-wrapper"
20
19
  }, J = /* @__PURE__ */ N(() => /* @__PURE__ */ u("div", { class: "loading-dialog-content skeleton" }, null, -1)), G = [
@@ -27,7 +26,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
27
26
  setTimeout(() => {
28
27
  a.value = !0;
29
28
  }, q);
30
- }), (m, s) => a.value ? (n(), l("div", U, G)) : S("", !0);
29
+ }), (m, s) => a.value ? (n(), l("div", U, G)) : C("", !0);
31
30
  }
32
31
  }), X = /* @__PURE__ */ f(H, [["__scopeId", "data-v-7dabb11d"]]), Y = { class: "dialog" }, z = { ref: "subPanels" }, v = "EXPOSED_METHOD", K = /* @__PURE__ */ p({
33
32
  __name: "JsonFormsDialog",
@@ -41,7 +40,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
41
40
  setup(o, { expose: a, emit: m }) {
42
41
  const s = m, b = (e, t, L) => {
43
42
  var g;
44
- return t.type === B && ((g = t.context) == null ? void 0 : g.source) !== v && setTimeout(() => P(() => s("updateData", t.path))), L(e, t);
43
+ return t.type === B && ((g = t.context) == null ? void 0 : g.source) !== v && setTimeout(() => I(() => s("updateData", t.path))), L(e, t);
45
44
  }, y = (e) => {
46
45
  s("change", e);
47
46
  };
@@ -49,7 +48,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
49
48
  trigger: (e) => s("trigger", e),
50
49
  addStateProviderListener: (e, t) => s("stateProviderListener", e, t),
51
50
  sendAlert: (e) => s("alert", e)
52
- }).forEach(([e, t]) => x(e, t));
51
+ }).forEach(([e, t]) => k(e, t));
53
52
  const r = D(null), _ = [], h = (e, t) => {
54
53
  r.value.dispatch(
55
54
  M.update(e, () => t, {
@@ -57,7 +56,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
57
56
  })
58
57
  );
59
58
  };
60
- return C(() => {
59
+ return w(() => {
61
60
  r.value && _.forEach(
62
61
  ({ path: e, value: t }) => h(e, t)
63
62
  );
@@ -67,7 +66,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
67
66
  }
68
67
  }), (e, t) => (n(), l("div", Y, [
69
68
  u("div", z, null, 512),
70
- (n(), T(A, null, {
69
+ (n(), x(A, null, {
71
70
  fallback: c(() => [
72
71
  i(X)
73
72
  ]),
@@ -75,7 +74,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
75
74
  i(F, null, {
76
75
  default: c(() => [
77
76
  d(e.$slots, "top", {}, void 0, !0),
78
- i(I(w), {
77
+ i(T(P), {
79
78
  ref_key: "jsonforms",
80
79
  ref: r,
81
80
  data: e.data,
@@ -94,7 +93,7 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
94
93
  }))
95
94
  ]));
96
95
  }
97
- }), te = /* @__PURE__ */ f(K, [["__scopeId", "data-v-2ecde53a"]]), Q = {
96
+ }), te = /* @__PURE__ */ f(K, [["__scopeId", "data-v-e16311a7"]]), Q = {
98
97
  layout: {
99
98
  type: Object,
100
99
  required: !0
@@ -103,14 +102,13 @@ const F = /* @__PURE__ */ f(O, [["render", V], ["__scopeId", "data-v-49f6cab7"]]
103
102
  props: Q
104
103
  });
105
104
  export {
106
- be as ErrorMessage,
105
+ re as ErrorMessage,
107
106
  F as Form,
108
107
  te as JsonFormsDialog,
109
- re as LabeledControl,
108
+ ne as LabeledControl,
110
109
  Le as SimpleButtonControl,
111
- Se as TextControl,
112
- ke as VerticalLayoutBase,
113
- ne as addLabel,
110
+ Ce as TextControl,
111
+ $e as VerticalLayoutBase,
114
112
  de as controlProps,
115
113
  ce as controlToRenderer,
116
114
  ie as controls,
@@ -118,11 +116,13 @@ export {
118
116
  ue as defineControl,
119
117
  oe as defineLayout,
120
118
  pe as getAsyncSetupMethod,
121
- fe as inputFormats,
119
+ fe as handleAsyncComponents,
120
+ me as inputFormats,
122
121
  Q as layoutProps,
123
- me as layoutToRenderer,
124
- _e as layouts,
125
- he as mapControls,
126
- ge as priorityRanks,
127
- ve as toRenderers
122
+ _e as layoutToRenderer,
123
+ he as layouts,
124
+ ge as mapControls,
125
+ ve as priorityRanks,
126
+ De as toRenderers,
127
+ be as withLabel
128
128
  };
@@ -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-hVg3JWxI.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-96g3nCth.js";
2
2
  var ie = 864e5;
3
3
  function oe(a) {
4
4
  q(1, arguments);
@@ -5,7 +5,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
5
5
  schema: JsonSchema;
6
6
  uischema: UISchemaElement;
7
7
  data: any;
8
- renderers: NamedRenderer[];
8
+ renderers: readonly NamedRenderer[];
9
9
  }>, {
10
10
  updateData: (path: string, value: any) => void;
11
11
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -20,7 +20,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
20
20
  schema: JsonSchema;
21
21
  uischema: UISchemaElement;
22
22
  data: any;
23
- renderers: NamedRenderer[];
23
+ renderers: readonly NamedRenderer[];
24
24
  }>>> & {
25
25
  onChange?: ((args_0: {
26
26
  data: any;
@@ -0,0 +1,15 @@
1
+ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
2
+ errors: string[];
3
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
4
+ errors: string[];
5
+ }>>>, {}, {}>;
6
+ export default _default;
7
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
+ type __VLS_TypePropsToOption<T> = {
9
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
10
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
+ } : {
12
+ type: import('vue').PropType<T[K]>;
13
+ required: true;
14
+ };
15
+ };
@@ -0,0 +1,22 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToOption<{
2
+ errors: string[];
3
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
4
+ errors: string[];
5
+ }>>>, {}, {}>, {
6
+ default?(_: {}): any;
7
+ }>;
8
+ export default _default;
9
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ type __VLS_TypePropsToOption<T> = {
11
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
12
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
+ } : {
14
+ type: import('vue').PropType<T[K]>;
15
+ required: true;
16
+ };
17
+ };
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -1,6 +1,6 @@
1
1
  import { default as LabeledControl } from './LabeledControl.vue';
2
2
  export type * from './types';
3
- export * from './addLabel';
3
+ export * from './withLabel';
4
4
  export * from './controlToRenderer';
5
5
  export * from './util';
6
6
  export { LabeledControl };
@@ -1,5 +1,6 @@
1
1
  import { useJsonFormsControl } from '@jsonforms/vue';
2
2
  import { NamedTester, ParameterizedComponent } from '../types';
3
+ import { ValidationSettings } from './validation/types';
3
4
  /**
4
5
  * The props that a control can have.
5
6
  * I.e., the props of the script setup vue components which are wrapped by modifiers.
@@ -12,7 +13,7 @@ export type VueControlProps<D> = {
12
13
  changeValue: (newValue: D) => void;
13
14
  disabled: boolean;
14
15
  labelForId?: null;
15
- };
16
+ } & ValidationSettings<D>;
16
17
  /**
17
18
  * Optional slots that a control can have to render additional elements.
18
19
  */
@@ -1,4 +1,4 @@
1
- import { PropType, SetupContext, SlotsType, VNode } from 'vue';
1
+ import { Component, PropType, SetupContext, SlotsType, VNode } from 'vue';
2
2
  import { ControlSlots, VueControl, VueControlProps, VueControlRenderer } from './types';
3
3
  export declare const controlProps: {
4
4
  control: {
@@ -39,6 +39,22 @@ export declare const controlProps: {
39
39
  type: PropType<boolean>;
40
40
  required: boolean;
41
41
  };
42
+ isValid: {
43
+ type: PropType<boolean>;
44
+ required: boolean;
45
+ };
46
+ messages: {
47
+ type: PropType<import('./validation/types').Messages>;
48
+ required: boolean;
49
+ };
50
+ onRegisterValidation: {
51
+ type: PropType<(validation: import('./validation/types').ValidationMethod<any>) => void>;
52
+ required: boolean;
53
+ };
42
54
  };
43
- export declare const defineControl: <D>(setup: (props: VueControlProps<D>, ctx: SetupContext<any, SlotsType<ControlSlots>>) => () => VNode | null) => VueControl<D>;
55
+ export declare const defineControl: <D>(setup: (props: VueControlProps<D>, ctx: SetupContext<any, SlotsType<ControlSlots>>) => () => VNode | null | VNode[]) => VueControl<D>;
44
56
  export declare const mapControls: (mapper: (control: VueControl<any>, key: string) => VueControl<any>) => <T extends Record<string, VueControlRenderer>>(cs: T) => T;
57
+ export type SpecialControlRenderer<SpecialControl> = Omit<VueControlRenderer, "control"> & {
58
+ control: SpecialControl;
59
+ };
60
+ export declare const handleAsyncComponents: <S extends Component, T>(mapper: (s: S) => T) => ({ control, tester, name, __asyncSetup, }: SpecialControlRenderer<S>) => SpecialControlRenderer<T>;
@@ -0,0 +1,10 @@
1
+ import { MaybeRef } from 'vue';
2
+ export type Messages = {
3
+ errors: string[];
4
+ };
5
+ export type ValidationMethod<D> = MaybeRef<(value: D) => Messages>;
6
+ export type ValidationSettings<D> = {
7
+ isValid: boolean;
8
+ messages: Messages;
9
+ onRegisterValidation: (validation: ValidationMethod<D>) => void;
10
+ };
@@ -0,0 +1,9 @@
1
+ import { Ref } from 'vue';
2
+ import { Messages, ValidationMethod } from './types';
3
+ export declare const useValidation: <T = any>({ data }: {
4
+ data: Ref<T>;
5
+ }) => {
6
+ messages: import('vue').ComputedRef<Messages>;
7
+ isValid: import('vue').ComputedRef<boolean>;
8
+ onRegisterValidation: (validationMethod: ValidationMethod<T>) => number;
9
+ };
@@ -0,0 +1,4 @@
1
+ import { VNode } from 'vue';
2
+ import { VueControl, VueControlProps } from './types';
3
+ export declare const addErrorMessageToVNode: (vNode: VNode, props: Pick<VueControlProps<any>, "messages">) => VNode | VNode[];
4
+ export declare const withErrorMessage: <D>({ control, tester, name, __asyncSetup, }: import('./util').SpecialControlRenderer<VueControl<D>>) => import('./util').SpecialControlRenderer<VueControl<D>>;
@@ -0,0 +1,9 @@
1
+ import { PropsToComponent, VueControl, VueControlProps } from './types';
2
+ import { SpecialControlRenderer } from './util';
3
+ export type VueControlPropsForLabelContent<D> = Omit<VueControlProps<D>, "labelForId" | "messages"> & {
4
+ labelForId: string;
5
+ };
6
+ export type VueControlThatRequiresLabelWrapper<D> = PropsToComponent<VueControlPropsForLabelContent<D>>;
7
+ export declare const withLabel: <D>(renderer: SpecialControlRenderer<VueControlThatRequiresLabelWrapper<D>>, config?: {
8
+ fill: boolean;
9
+ }) => SpecialControlRenderer<VueControl<D>>;
@@ -1,192 +1 @@
1
- export declare const checkboxRenderer: {
2
- name: string;
3
- control: {
4
- new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import('vue').ExtractPropTypes<{
5
- control: {
6
- type: import('vue').PropType<{
7
- data: boolean;
8
- } & Omit<{
9
- uischema: import('@jsonforms/core').ControlElement;
10
- schema: NonNullable<import('@jsonforms/core').JsonSchema>;
11
- path: string;
12
- enabled: boolean;
13
- renderers: import('@jsonforms/core').JsonFormsRendererRegistryEntry[];
14
- cells: import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[] & {
15
- tester: import('@jsonforms/core').RankedTester;
16
- cell: any;
17
- }[];
18
- config: any;
19
- label: string;
20
- description: string;
21
- required: NonNullable<boolean | undefined>;
22
- i18nKeyPrefix: string;
23
- errors: string;
24
- data: any;
25
- rootSchema: NonNullable<import('@jsonforms/core').JsonSchema>;
26
- id: string;
27
- visible: boolean;
28
- }, "data">>;
29
- required: true;
30
- };
31
- handleChange: {
32
- type: import('vue').PropType<(path: string, value: any) => void>;
33
- required: true;
34
- };
35
- changeValue: {
36
- type: import('vue').PropType<(newValue: boolean) => void>;
37
- required: true;
38
- };
39
- disabled: {
40
- type: import('vue').PropType<boolean>;
41
- required: true;
42
- };
43
- labelForId: {
44
- type: import('vue').PropType<null>;
45
- };
46
- }>>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
47
- control: {
48
- type: import('vue').PropType<{
49
- data: boolean;
50
- } & Omit<{
51
- uischema: import('@jsonforms/core').ControlElement;
52
- schema: NonNullable<import('@jsonforms/core').JsonSchema>;
53
- path: string;
54
- enabled: boolean;
55
- renderers: import('@jsonforms/core').JsonFormsRendererRegistryEntry[];
56
- cells: import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[] & {
57
- tester: import('@jsonforms/core').RankedTester;
58
- cell: any;
59
- }[];
60
- config: any;
61
- label: string;
62
- description: string;
63
- required: NonNullable<boolean | undefined>;
64
- i18nKeyPrefix: string;
65
- errors: string;
66
- data: any;
67
- rootSchema: NonNullable<import('@jsonforms/core').JsonSchema>;
68
- id: string;
69
- visible: boolean;
70
- }, "data">>;
71
- required: true;
72
- };
73
- handleChange: {
74
- type: import('vue').PropType<(path: string, value: any) => void>;
75
- required: true;
76
- };
77
- changeValue: {
78
- type: import('vue').PropType<(newValue: boolean) => void>;
79
- required: true;
80
- };
81
- disabled: {
82
- type: import('vue').PropType<boolean>;
83
- required: true;
84
- };
85
- labelForId: {
86
- type: import('vue').PropType<null>;
87
- };
88
- }>>, {}, true, {}, {}, {
89
- P: {};
90
- B: {};
91
- D: {};
92
- C: {};
93
- M: {};
94
- Defaults: {};
95
- }, Readonly<import('vue').ExtractPropTypes<{
96
- control: {
97
- type: import('vue').PropType<{
98
- data: boolean;
99
- } & Omit<{
100
- uischema: import('@jsonforms/core').ControlElement;
101
- schema: NonNullable<import('@jsonforms/core').JsonSchema>;
102
- path: string;
103
- enabled: boolean;
104
- renderers: import('@jsonforms/core').JsonFormsRendererRegistryEntry[];
105
- cells: import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[] & {
106
- tester: import('@jsonforms/core').RankedTester;
107
- cell: any;
108
- }[];
109
- config: any;
110
- label: string;
111
- description: string;
112
- required: NonNullable<boolean | undefined>;
113
- i18nKeyPrefix: string;
114
- errors: string;
115
- data: any;
116
- rootSchema: NonNullable<import('@jsonforms/core').JsonSchema>;
117
- id: string;
118
- visible: boolean;
119
- }, "data">>;
120
- required: true;
121
- };
122
- handleChange: {
123
- type: import('vue').PropType<(path: string, value: any) => void>;
124
- required: true;
125
- };
126
- changeValue: {
127
- type: import('vue').PropType<(newValue: boolean) => void>;
128
- required: true;
129
- };
130
- disabled: {
131
- type: import('vue').PropType<boolean>;
132
- required: true;
133
- };
134
- labelForId: {
135
- type: import('vue').PropType<null>;
136
- };
137
- }>>, {}, {}, {}, {}, {}>;
138
- __isFragment?: undefined;
139
- __isTeleport?: undefined;
140
- __isSuspense?: undefined;
141
- } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
142
- control: {
143
- type: import('vue').PropType<{
144
- data: boolean;
145
- } & Omit<{
146
- uischema: import('@jsonforms/core').ControlElement;
147
- schema: NonNullable<import('@jsonforms/core').JsonSchema>;
148
- path: string;
149
- enabled: boolean;
150
- renderers: import('@jsonforms/core').JsonFormsRendererRegistryEntry[];
151
- cells: import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[] & {
152
- tester: import('@jsonforms/core').RankedTester;
153
- cell: any;
154
- }[];
155
- config: any;
156
- label: string;
157
- description: string;
158
- required: NonNullable<boolean | undefined>;
159
- i18nKeyPrefix: string;
160
- errors: string;
161
- data: any;
162
- rootSchema: NonNullable<import('@jsonforms/core').JsonSchema>;
163
- id: string;
164
- visible: boolean;
165
- }, "data">>;
166
- required: true;
167
- };
168
- handleChange: {
169
- type: import('vue').PropType<(path: string, value: any) => void>;
170
- required: true;
171
- };
172
- changeValue: {
173
- type: import('vue').PropType<(newValue: boolean) => void>;
174
- required: true;
175
- };
176
- disabled: {
177
- type: import('vue').PropType<boolean>;
178
- required: true;
179
- };
180
- labelForId: {
181
- type: import('vue').PropType<null>;
182
- };
183
- }>>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
184
- $slots: {
185
- icon?(_: {}): any;
186
- buttons?(_: {
187
- hover: boolean;
188
- }): any;
189
- };
190
- });
191
- tester: (uischema: import('@jsonforms/core').UISchemaElement, schema: import('@jsonforms/core').JsonSchema, context: import('@jsonforms/core').TesterContext) => number;
192
- };
1
+ export declare const checkboxRenderer: import('..').SpecialControlRenderer<import('..').VueControl<boolean>>;
@@ -1,5 +1,3 @@
1
1
  import { Tester } from '@jsonforms/core';
2
2
  export declare const checkboxesTester: Tester;
3
- export declare const checkboxesRenderer: Omit<import('..').VueControlRenderer, "control"> & {
4
- control: import('..').VueControl<string[]>;
5
- };
3
+ export declare const checkboxesRenderer: import('..').SpecialControlRenderer<import('..').VueControl<string[]>>;
@@ -1,3 +1 @@
1
- export declare const columnFilterRenderer: Omit<import('..').VueControlRenderer, "control"> & {
2
- control: import('..').VueControl<import('../uiComponents/twinlist/TwinlistControl.vue').TwinlistData>;
3
- };
1
+ export declare const columnFilterRenderer: import('..').SpecialControlRenderer<import('..').VueControl<import('../uiComponents/twinlist/TwinlistControl.vue').TwinlistData>>;
@@ -47,6 +47,20 @@ export declare const columnSelectRenderer: {
47
47
  labelForId: {
48
48
  type: import('vue').PropType<null>;
49
49
  };
50
+ isValid: {
51
+ type: import('vue').PropType<boolean>;
52
+ required: true;
53
+ };
54
+ messages: {
55
+ type: import('vue').PropType<import('../higherOrderComponents/control/validation/types').Messages>;
56
+ required: true;
57
+ };
58
+ onRegisterValidation: {
59
+ type: import('vue').PropType<(validation: import('../higherOrderComponents/control/validation/types').ValidationMethod<{
60
+ selected: string | null;
61
+ } | undefined>) => void>;
62
+ required: true;
63
+ };
50
64
  }>>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
51
65
  control: {
52
66
  type: import('vue').PropType<{
@@ -93,6 +107,20 @@ export declare const columnSelectRenderer: {
93
107
  labelForId: {
94
108
  type: import('vue').PropType<null>;
95
109
  };
110
+ isValid: {
111
+ type: import('vue').PropType<boolean>;
112
+ required: true;
113
+ };
114
+ messages: {
115
+ type: import('vue').PropType<import('../higherOrderComponents/control/validation/types').Messages>;
116
+ required: true;
117
+ };
118
+ onRegisterValidation: {
119
+ type: import('vue').PropType<(validation: import('../higherOrderComponents/control/validation/types').ValidationMethod<{
120
+ selected: string | null;
121
+ } | undefined>) => void>;
122
+ required: true;
123
+ };
96
124
  }>>, {}, true, {}, {}, {
97
125
  P: {};
98
126
  B: {};
@@ -146,6 +174,20 @@ export declare const columnSelectRenderer: {
146
174
  labelForId: {
147
175
  type: import('vue').PropType<null>;
148
176
  };
177
+ isValid: {
178
+ type: import('vue').PropType<boolean>;
179
+ required: true;
180
+ };
181
+ messages: {
182
+ type: import('vue').PropType<import('../higherOrderComponents/control/validation/types').Messages>;
183
+ required: true;
184
+ };
185
+ onRegisterValidation: {
186
+ type: import('vue').PropType<(validation: import('../higherOrderComponents/control/validation/types').ValidationMethod<{
187
+ selected: string | null;
188
+ } | undefined>) => void>;
189
+ required: true;
190
+ };
149
191
  }>>, {}, {}, {}, {}, {}>;
150
192
  __isFragment?: undefined;
151
193
  __isTeleport?: undefined;
@@ -196,6 +238,20 @@ export declare const columnSelectRenderer: {
196
238
  labelForId: {
197
239
  type: import('vue').PropType<null>;
198
240
  };
241
+ isValid: {
242
+ type: import('vue').PropType<boolean>;
243
+ required: true;
244
+ };
245
+ messages: {
246
+ type: import('vue').PropType<import('../higherOrderComponents/control/validation/types').Messages>;
247
+ required: true;
248
+ };
249
+ onRegisterValidation: {
250
+ type: import('vue').PropType<(validation: import('../higherOrderComponents/control/validation/types').ValidationMethod<{
251
+ selected: string | null;
252
+ } | undefined>) => void>;
253
+ required: true;
254
+ };
199
255
  }>>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
200
256
  $slots: {
201
257
  icon?(_: {}): any;
@@ -1,4 +1,2 @@
1
1
  export declare const comboBoxTester: import('@jsonforms/core').Tester;
2
- export declare const comboBoxRenderer: Omit<import('..').VueControlRenderer, "control"> & {
3
- control: import('..').VueControl<string[]>;
4
- };
2
+ export declare const comboBoxRenderer: import('..').SpecialControlRenderer<import('..').VueControl<string[]>>;
@@ -1,5 +1,3 @@
1
1
  import { UISchemaElement } from '@jsonforms/core';
2
2
  export declare const dateTimeFormatPickerTester: (uischema: UISchemaElement) => boolean;
3
- export declare const dateTimeFormatPickerRenderer: Omit<import('../higherOrderComponents').VueControlRenderer, "control"> & {
4
- control: import('../higherOrderComponents').VueControl<string>;
5
- };
3
+ export declare const dateTimeFormatPickerRenderer: import('../higherOrderComponents').SpecialControlRenderer<import('../higherOrderComponents').VueControl<string>>;
@@ -1,3 +1 @@
1
- export declare const dateTimeRenderer: Omit<import('..').VueControlRenderer, "control"> & {
2
- control: import('..').VueControl<string>;
3
- };
1
+ export declare const dateTimeRenderer: import('..').SpecialControlRenderer<import('..').VueControl<string>>;