@knime/jsonforms 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE +710 -0
  3. package/README.md +125 -0
  4. package/dist/AnyOfTwinlist-GJ6LGkM1.js +17 -0
  5. package/dist/ArrayLayout-CbpSgf0X.js +487 -0
  6. package/dist/ButtonControl-CVu36jz8.js +127 -0
  7. package/dist/CheckboxControl-DYFLb-qW.js +50 -0
  8. package/dist/Checkboxes-DlhdiWWA.js +103 -0
  9. package/dist/CheckboxesControl-DYV72Aua.js +39 -0
  10. package/dist/ColumnFilter-BbweAsmq.js +17 -0
  11. package/dist/ColumnSelect-aw7cYcWC.js +60 -0
  12. package/dist/ComboBoxControl-BqVUWz4q.js +600 -0
  13. package/dist/CredentialsControl-Ci6ZEuKM.js +20 -0
  14. package/dist/CredentialsControlBase-CxYOD3ne.js +110 -0
  15. package/dist/DateControl-ZyQ_vmOW.js +30 -0
  16. package/dist/DateTimeControl-anye7xvC.js +4 -0
  17. package/dist/DropdownControl-JX1LF5Tk.js +4 -0
  18. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-B5dPfH3x.js +171 -0
  19. package/dist/DynamicValuesControl-CFubOaRb.js +127 -0
  20. package/dist/FileChooserControl-Cf_UaWqV.js +605 -0
  21. package/dist/FileExplorerTab-Ba76jD3y.js +3951 -0
  22. package/dist/HorizontalLayout-5irQmhXp.js +39 -0
  23. package/dist/IntegerControl-CqHJWRgn.js +13 -0
  24. package/dist/IntervalControl-BUhs5_lc.js +549 -0
  25. package/dist/LayoutComponentWrapper-CDw9BDq5.js +36 -0
  26. package/dist/LegacyCredentialsControl-DxRZcRVo.js +62 -0
  27. package/dist/LocalFileChooserControl-DxSeiKxg.js +57 -0
  28. package/dist/MenuItems.vue_vue_type_style_index_0_lang-qMVpH9oC.js +464 -0
  29. package/dist/MultiselectListBox-C4ZnJvJJ.js +579 -0
  30. package/dist/NameFilter-D6EI_V08.js +17 -0
  31. package/dist/NodeDialog.vue.d.ts +8 -0
  32. package/dist/NumberControl-DLo0LCsi.js +13 -0
  33. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B69hrnY1.js +43 -0
  34. package/dist/NumberInput-BdL-jZ-i.js +219 -0
  35. package/dist/OneOfDropdown-BmbbuaZk.js +15 -0
  36. package/dist/RadioControl-GbwpOdAy.js +13 -0
  37. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BlImm9is.js +128 -0
  38. package/dist/RichTextControl-CGY3rdM7.js +16895 -0
  39. package/dist/SectionLayout-CqSFyj1K.js +54 -0
  40. package/dist/SimpleButtonControl-BgOrTGEP.js +59 -0
  41. package/dist/SimpleTwinlistControl-ByOlLGIN.js +68 -0
  42. package/dist/SortListControl-Dege54Dj.js +316 -0
  43. package/dist/TextAreaControl-CKviHabr.js +111 -0
  44. package/dist/TextControl-CPL48j4B.js +49 -0
  45. package/dist/TimeControl-CGsLRgR3.js +842 -0
  46. package/dist/TwinlistControl-C4XaH_Xc.js +587 -0
  47. package/dist/TwinlistLoadingInfo-CFlSBQXn.js +1057 -0
  48. package/dist/ValueSwitch-B9oWSkM_.js +138 -0
  49. package/dist/ValueSwitchControl-4ODpL58f.js +13 -0
  50. package/dist/VennDiagramLayout-CabCs-fX.js +104 -0
  51. package/dist/VerticalLayout-D5HeZyKY.js +39 -0
  52. package/dist/VerticalLayoutBase-C0PZ-y5d.js +20 -0
  53. package/dist/arrow-next-CvdR0-WC.js +17 -0
  54. package/dist/arrow-up-Dsq3EgtE.js +30 -0
  55. package/dist/createMissingItem-B00Kg95q.js +4 -0
  56. package/dist/floating-ui.vue.esm-CIFBDytk.js +94 -0
  57. package/dist/getFlattenedSettings-D64OwqpI.js +7 -0
  58. package/dist/index-ZDm2GXeD.js +32714 -0
  59. package/dist/index.d.ts +3 -0
  60. package/dist/knime-jsonforms.js +5 -0
  61. package/dist/layoutComponents/Form.vue.d.ts +2 -0
  62. package/dist/link-BA69Hfx6.js +17 -0
  63. package/dist/loading/LoadingDialog.vue.d.ts +2 -0
  64. package/dist/navigator-BYUFe-z3.js +8 -0
  65. package/dist/style.css +1 -0
  66. package/dist/useHideOnNull-CCfNP3O7.js +42 -0
  67. package/package.json +74 -0
@@ -0,0 +1,110 @@
1
+ import { defineComponent as z, computed as a, watch as E, openBlock as t, createBlock as d, withCtx as j, createElementVNode as q, unref as i, createCommentVNode as v, normalizeClass as h } from "vue";
2
+ import { p as w, a1 as n, L as A, I as p, _ as G } from "./index-ZDm2GXeD.js";
3
+ const J = ["id"], b = "*****************", K = /* @__PURE__ */ z({
4
+ __name: "CredentialsControlBase",
5
+ props: {
6
+ control: {},
7
+ data: {},
8
+ flowSettings: {},
9
+ disabled: { type: Boolean }
10
+ },
11
+ emits: ["change"],
12
+ setup(g, { emit: f }) {
13
+ const r = g, l = f, m = () => ({
14
+ password: "",
15
+ secondFactor: "",
16
+ username: ""
17
+ }), o = a(() => r.data ?? m()), C = (e) => {
18
+ l("change", n(o.value, { username: e }));
19
+ }, F = (e) => {
20
+ l("change", n(o.value, { password: e, isHiddenPassword: !1 }));
21
+ }, P = (e) => {
22
+ l(
23
+ "change",
24
+ n(o.value, { secondFactor: e, isHiddenSecondFactor: !1 })
25
+ );
26
+ }, S = a(() => o.value.isHiddenPassword ? b : o.value.password), U = a(() => o.value.isHiddenSecondFactor ? b : o.value.secondFactor), s = a(() => r.control.uischema.options ?? {}), _ = w(
27
+ a(() => s.value.hasUsernameProvider),
28
+ !0
29
+ ), y = a(() => s.value.hideUsername ?? !1), c = a(() => _.value && !y.value), L = w(
30
+ a(() => s.value.hasPasswordProvider),
31
+ !0
32
+ ), V = a(() => s.value.hidePassword ?? !1), u = a(() => L.value && !V.value), k = a(
33
+ () => u.value && (s.value.showSecondFactor ?? !1)
34
+ ), B = a(
35
+ () => {
36
+ var e;
37
+ return ((e = s.value) == null ? void 0 : e.usernameLabel) ?? "Username";
38
+ }
39
+ ), H = a(
40
+ () => {
41
+ var e;
42
+ return ((e = s.value) == null ? void 0 : e.passwordLabel) ?? "Password";
43
+ }
44
+ ), D = a(
45
+ () => {
46
+ var e;
47
+ return ((e = s.value) == null ? void 0 : e.secondFactorLabel) ?? "Second authentication factor";
48
+ }
49
+ ), I = a(
50
+ () => {
51
+ var e;
52
+ return (e = r.flowSettings) == null ? void 0 : e.controllingFlowVariableName;
53
+ }
54
+ );
55
+ E(
56
+ () => I.value,
57
+ (e) => {
58
+ e ? l("change", n(o.value, { flowVariableName: e })) : l("change", m());
59
+ }
60
+ );
61
+ const N = (e) => {
62
+ l("change", n(o.value, e));
63
+ };
64
+ return (e, M) => (t(), d(A, {
65
+ control: e.control,
66
+ onControllingFlowVariableSet: N
67
+ }, {
68
+ default: j(({ labelForId: x }) => [
69
+ q("div", {
70
+ id: x ?? void 0,
71
+ class: "credentials-input-wrapper"
72
+ }, [
73
+ c.value ? (t(), d(i(p), {
74
+ key: 0,
75
+ placeholder: B.value,
76
+ "model-value": o.value.username,
77
+ disabled: e.disabled,
78
+ compact: "",
79
+ type: "text",
80
+ "onUpdate:modelValue": C
81
+ }, null, 8, ["placeholder", "model-value", "disabled"])) : v("", !0),
82
+ u.value ? (t(), d(i(p), {
83
+ key: 1,
84
+ class: h({ margin: c.value }),
85
+ placeholder: H.value,
86
+ "model-value": S.value,
87
+ disabled: e.disabled,
88
+ compact: "",
89
+ type: "password",
90
+ "onUpdate:modelValue": F
91
+ }, null, 8, ["class", "placeholder", "model-value", "disabled"])) : v("", !0),
92
+ k.value ? (t(), d(i(p), {
93
+ key: 2,
94
+ class: h({ margin: c.value || u.value }),
95
+ placeholder: D.value,
96
+ "model-value": U.value,
97
+ disabled: e.disabled,
98
+ compact: "",
99
+ type: "password",
100
+ "onUpdate:modelValue": P
101
+ }, null, 8, ["class", "placeholder", "model-value", "disabled"])) : v("", !0)
102
+ ], 8, J)
103
+ ]),
104
+ _: 1
105
+ }, 8, ["control"]));
106
+ }
107
+ }), R = /* @__PURE__ */ G(K, [["__scopeId", "data-v-306031c3"]]);
108
+ export {
109
+ R as C
110
+ };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as d, openBlock as s, createBlock as i, unref as e, withCtx as c, createVNode as p } from "vue";
2
+ import { r as u, a as m, L as f, aa as C } from "./index-ZDm2GXeD.js";
3
+ const g = /* @__PURE__ */ d({
4
+ __name: "DateControl",
5
+ props: u(),
6
+ setup(t) {
7
+ const l = t, { control: o, disabled: n, onChange: a } = m({ props: l });
8
+ return (_, b) => (s(), i(f, {
9
+ control: e(o),
10
+ onControllingFlowVariableSet: e(a)
11
+ }, {
12
+ default: c(({ labelForId: r }) => [
13
+ p(e(C), {
14
+ id: r,
15
+ "two-lines": "",
16
+ "model-value": new Date(e(o).data),
17
+ required: !0,
18
+ "show-time": !1,
19
+ compact: "",
20
+ disabled: e(n),
21
+ "onUpdate:modelValue": e(a)
22
+ }, null, 8, ["id", "model-value", "disabled", "onUpdate:modelValue"])
23
+ ]),
24
+ _: 1
25
+ }, 8, ["control", "onControllingFlowVariableSet"]));
26
+ }
27
+ });
28
+ export {
29
+ g as default
30
+ };
@@ -0,0 +1,4 @@
1
+ import { Z as f } from "./index-ZDm2GXeD.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./DropdownControl.vue_vue_type_script_setup_true_lang-B5dPfH3x.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,171 @@
1
+ import { defineComponent as N, computed as u, openBlock as p, createBlock as m, unref as l, mergeProps as S, withCtx as w, createCommentVNode as y, ref as U, onMounted as H, onBeforeUnmount as W, normalizeProps as M } from "vue";
2
+ import { $ as z, T as G, _ as J, r as K, a as Q, q as f, V as X, p as Y, S as Z, L as ee, m as oe, y as ae, a0 as le } from "./index-ZDm2GXeD.js";
3
+ import { g as te } from "./getFlattenedSettings-D64OwqpI.js";
4
+ import { u as se } from "./useHideOnNull-CCfNP3O7.js";
5
+ const ne = /* @__PURE__ */ N({
6
+ __name: "LoadingDropdown",
7
+ props: {
8
+ possibleValues: {},
9
+ modelValue: {},
10
+ id: {},
11
+ ariaLabel: {},
12
+ disabled: { type: Boolean }
13
+ },
14
+ setup(s) {
15
+ const o = s, a = u(() => {
16
+ const { possibleValues: t } = o;
17
+ return t === null ? "Loading" : t.length > 0 ? "No value selected" : "No values present";
18
+ }), n = u(() => o.possibleValues === null ? "" : o.modelValue), v = u(
19
+ () => o.disabled || o.possibleValues === null || o.possibleValues.length === 0
20
+ );
21
+ return (t, C) => (p(), m(l(z), S({ ...t.$props, ...t.$attrs }, {
22
+ "model-value": n.value,
23
+ disabled: v.value,
24
+ "possible-values": t.possibleValues ?? [],
25
+ placeholder: a.value,
26
+ compact: ""
27
+ }), {
28
+ "icon-right": w(() => [
29
+ t.possibleValues === null ? (p(), m(l(G), {
30
+ key: 0,
31
+ class: "loading-icon"
32
+ })) : y("", !0)
33
+ ]),
34
+ _: 1
35
+ }, 16, ["model-value", "disabled", "possible-values", "placeholder"]));
36
+ }
37
+ }), re = /* @__PURE__ */ J(ne, [["__scopeId", "data-v-cf6ba18c"]]), pe = /* @__PURE__ */ N({
38
+ __name: "DropdownControl",
39
+ props: {
40
+ ...K(),
41
+ asyncInitialOptions: {
42
+ type: Object,
43
+ required: !1,
44
+ default: null
45
+ },
46
+ jsonFormsControl: {
47
+ type: Object,
48
+ required: !1,
49
+ default: null
50
+ },
51
+ controlDataToDropdownValue: {
52
+ type: Function,
53
+ required: !1,
54
+ default: (s) => s
55
+ },
56
+ dropdownValueToControlData: {
57
+ type: Function,
58
+ required: !1,
59
+ default: (s) => s
60
+ }
61
+ },
62
+ setup(s) {
63
+ const o = s, { control: a, onChange: n, disabled: v } = o.jsonFormsControl ?? Q({ props: o }), t = f("getPossibleValuesFromUiSchema"), C = f("registerWatcher"), T = f("getData"), j = f("sendAlert"), D = U(null), _ = u(
64
+ () => {
65
+ var e;
66
+ return (e = a.value.uischema.options) == null ? void 0 : e.choicesProvider;
67
+ }
68
+ ), r = X(
69
+ Y(_.value, null),
70
+ a.value
71
+ ), h = U(a.value.data), b = (e) => o.dropdownValueToControlData(
72
+ e.length > 0 ? e[0].id : null
73
+ ), { showCheckbox: q, showControl: x, checkboxProps: B } = se(
74
+ {
75
+ control: a,
76
+ disabled: v,
77
+ controlElement: D
78
+ },
79
+ {
80
+ setDefault: () => {
81
+ !h.value && r.value ? n(b(r.value)) : n(h.value);
82
+ },
83
+ setNull: () => {
84
+ n(null);
85
+ }
86
+ }
87
+ ), O = u(
88
+ () => o.controlDataToDropdownValue(a.value.data)
89
+ ), F = u(
90
+ () => {
91
+ var e;
92
+ return (e = a.value.uischema.options) == null ? void 0 : e.choicesUpdateHandler;
93
+ }
94
+ ), E = Z(), L = async (e, c) => {
95
+ const { result: i, state: g, message: V } = await T({
96
+ method: "settings.update",
97
+ options: [
98
+ E,
99
+ F.value,
100
+ te(e)
101
+ ]
102
+ });
103
+ return (A) => {
104
+ const P = (d) => {
105
+ r.value = d, (c || !O.value) && (le(
106
+ A,
107
+ a.value.path,
108
+ b(d)
109
+ ), n(b(d)));
110
+ };
111
+ i && P(i), g === "FAIL" && (V.forEach((d) => {
112
+ j({
113
+ message: d,
114
+ type: ae.ERROR
115
+ });
116
+ }), P([]));
117
+ };
118
+ }, R = async (e) => {
119
+ (await L(e, !1))(e);
120
+ }, $ = async () => {
121
+ o.asyncInitialOptions !== null ? r.value = await o.asyncInitialOptions : _.value || t(a.value).then((e) => {
122
+ r.value = e;
123
+ });
124
+ };
125
+ let k = () => {
126
+ };
127
+ H(async () => {
128
+ var e, c;
129
+ if (F.value) {
130
+ const i = ((e = a.value.uischema.options) == null ? void 0 : e.dependencies) || [], g = !!((c = a.value.uischema.options) != null && c.setFirstValueOnUpdate);
131
+ k = await C({
132
+ transformSettings: (V) => L(V, g),
133
+ init: R,
134
+ dependencies: i
135
+ });
136
+ } else
137
+ $();
138
+ }), W(() => {
139
+ k();
140
+ });
141
+ const I = (e) => {
142
+ h.value = o.dropdownValueToControlData(e), n(h.value);
143
+ };
144
+ return (e, c) => (p(), m(ee, {
145
+ control: l(a),
146
+ onControllingFlowVariableSet: I
147
+ }, {
148
+ "before-label": w(() => [
149
+ l(q) ? (p(), m(l(oe), M(S({ key: 0 }, l(B))), null, 16)) : y("", !0)
150
+ ]),
151
+ default: w(({ labelForId: i }) => [
152
+ l(x) ? (p(), m(re, {
153
+ key: 0,
154
+ id: i ?? "",
155
+ ref_key: "controlElement",
156
+ ref: D,
157
+ ariaLabel: l(a).label,
158
+ disabled: l(v),
159
+ "model-value": O.value,
160
+ "possible-values": l(r),
161
+ compact: "",
162
+ "onUpdate:modelValue": I
163
+ }, null, 8, ["id", "ariaLabel", "disabled", "model-value", "possible-values"])) : y("", !0)
164
+ ]),
165
+ _: 1
166
+ }, 8, ["control"]));
167
+ }
168
+ });
169
+ export {
170
+ pe as _
171
+ };
@@ -0,0 +1,127 @@
1
+ import { defineComponent as d, computed as i, watch as h, renderSlot as g, openBlock as p, createElementBlock as C, Fragment as f, renderList as v, unref as t, createBlock as k, withCtx as S, createVNode as y } from "vue";
2
+ import { r as _, H as b, s as V } from "./index-ZDm2GXeD.js";
3
+ const E = /* @__PURE__ */ d({
4
+ __name: "DynamicValueControl",
5
+ props: {
6
+ value: {}
7
+ },
8
+ emits: ["updateValue"],
9
+ setup(s, { emit: l }) {
10
+ const e = s, o = i(() => {
11
+ switch (e.value.cellClassName) {
12
+ case "org.knime.core.data.def.DoubleCell":
13
+ return {
14
+ type: "number",
15
+ format: "number"
16
+ };
17
+ case "org.knime.core.data.def.IntCell":
18
+ case "org.knime.core.data.def.LongCell":
19
+ return {
20
+ type: "integer",
21
+ format: "int32"
22
+ };
23
+ case "org.knime.core.data.def.BooleanCell":
24
+ return {
25
+ type: "boolean"
26
+ };
27
+ case "org.knime.core.data.def.StringCell":
28
+ default:
29
+ return { type: "string" };
30
+ }
31
+ }), c = {
32
+ type: "Control",
33
+ scope: "#/properties/value"
34
+ }, u = i(() => {
35
+ switch (e.value.cellClassName) {
36
+ case "org.knime.core.data.def.DoubleCell":
37
+ case "org.knime.core.data.def.IntCell":
38
+ case "org.knime.core.data.def.LongCell":
39
+ return 0;
40
+ case "org.knime.core.data.def.BooleanCell":
41
+ return !0;
42
+ case "org.knime.core.data.def.StringCell":
43
+ default:
44
+ return "";
45
+ }
46
+ }), r = i(() => e.value.useStringCaseMatchingSettings ? {
47
+ schemaProperties: {
48
+ caseMatching: {
49
+ oneOf: [
50
+ {
51
+ const: "CASESENSITIVE",
52
+ title: "Case sensitive"
53
+ },
54
+ {
55
+ const: "CASEINSENSITIVE",
56
+ title: "Case insensitive"
57
+ }
58
+ ],
59
+ title: "Case matching",
60
+ description: "Whether RowIDs and strings should be matched case-sensitive or case-insensitive."
61
+ }
62
+ },
63
+ uischemaElements: [
64
+ {
65
+ scope: "#/properties/stringCaseMatching/properties/caseMatching",
66
+ type: "Control",
67
+ options: {
68
+ format: "valueSwitch"
69
+ }
70
+ }
71
+ ]
72
+ } : null), n = l;
73
+ return h(
74
+ () => e.value,
75
+ (a) => {
76
+ a === null && n("updateValue", u);
77
+ },
78
+ { immediate: !0 }
79
+ ), (a, m) => g(a.$slots, "default", {
80
+ schema: {
81
+ type: "object",
82
+ properties: {
83
+ value: o.value,
84
+ ...r.value === null ? {} : {
85
+ stringCaseMatching: {
86
+ type: "object",
87
+ properties: r.value.schemaProperties
88
+ }
89
+ }
90
+ }
91
+ },
92
+ uischema: r.value === null ? c : {
93
+ type: "VerticalLayout",
94
+ elements: [
95
+ ...r.value.uischemaElements,
96
+ c
97
+ ]
98
+ }
99
+ });
100
+ }
101
+ }), w = /* @__PURE__ */ d({
102
+ __name: "DynamicValuesControl",
103
+ props: _(),
104
+ setup(s) {
105
+ const l = s, { control: e, handleChange: o } = b(l);
106
+ return (c, u) => (p(!0), C(f, null, v(t(e).data.values, (r, n) => (p(), k(E, {
107
+ key: n,
108
+ value: r,
109
+ onUpdateValue: (a) => t(o)(`${t(e).path}.values.${n}.value`, a)
110
+ }, {
111
+ default: S(({ uischema: a, schema: m }) => [
112
+ y(t(V), {
113
+ schema: m,
114
+ uischema: a,
115
+ path: `${t(e).path}.values.${n}`,
116
+ enabled: t(e).enabled,
117
+ renderers: t(e).renderers,
118
+ cells: t(e).cells
119
+ }, null, 8, ["schema", "uischema", "path", "enabled", "renderers", "cells"])
120
+ ]),
121
+ _: 2
122
+ }, 1032, ["value", "onUpdateValue"]))), 128));
123
+ }
124
+ });
125
+ export {
126
+ w as default
127
+ };