@digiform/wizard 0.3.6 → 0.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.
- package/{ui/src/component-registry → core/src/registry}/renderComponent.js +1 -1
- package/{ui/src/lib → core/src/utils}/logger.js +2 -1
- package/features/form-runtime/ComponentAdapterComplete/ComponentAdapterComplete.d.ts +2 -3
- package/features/form-runtime/components/renderers/InteractiveFieldRenderer/InteractiveFieldRenderer.d.ts +2 -4
- package/package.json +1 -1
- package/renderer/RHCRenderer.d.ts +2 -0
- package/renderer/rhc-field-type-map.d.ts +5 -0
- package/renderer/rhc-selection.config.d.ts +0 -0
- package/styles.css +1 -1
- package/wizard/src/features/api-integration/components/EnhancedActionExecutor/EnhancedActionExecutor.js +1 -2
- package/wizard/src/features/form-runtime/ComponentAdapterComplete/ComponentAdapterComplete.js +33 -47
- package/wizard/src/features/form-runtime/FormWizard/FormWizard.js +35 -35
- package/wizard/src/features/form-runtime/components/FormField.js +24 -30
- package/wizard/src/features/form-runtime/components/FormFooter.js +18 -19
- package/wizard/src/features/form-runtime/components/FormHeader.js +3 -3
- package/wizard/src/features/form-runtime/components/FormStep/FormStep.js +1 -2
- package/wizard/src/features/form-runtime/components/renderers/DisplayModeRenderer/DisplayModeRenderer.js +7 -16
- package/wizard/src/features/form-runtime/components/renderers/InteractiveFieldRenderer/InteractiveFieldRenderer.js +21 -34
- package/wizard/src/features/form-runtime/utils/formDataBuilder.js +4 -5
- package/wizard/src/features/validation-system/validation/ActionValidation.js +7 -8
- package/wizard/src/renderer/RHCRenderer.js +160 -0
- package/wizard/src/renderer/rhc-field-type-map.js +25 -0
- package/renderer/wizardRenderer.d.ts +0 -2
- package/ui/src/components/checkbox/checkbox.js +0 -20
- package/ui/src/components/checkbox/checkbox.module.css.js +0 -10
- package/ui/src/components/input/input.js +0 -20
- package/ui/src/components/input/input.module.css.js +0 -8
- package/ui/src/components/radio-group/radio-group.js +0 -30
- package/ui/src/components/radio-group/radio-group.module.css.js +0 -14
- package/ui/src/components/select/select.js +0 -115
- package/ui/src/components/select/select.module.css.js +0 -32
- package/ui/src/components/textarea/textarea.js +0 -19
- package/ui/src/components/textarea/textarea.module.css.js +0 -8
- package/ui/src/design-system/components/FormFieldWrapper.js +0 -16
- package/wizard/src/renderer/wizardRenderer.js +0 -123
- /package/{ui/src/lib → core/src}/providers/FormEditingContext.js +0 -0
- /package/{ui/src/theme/ThemeProvider.js → core/src/providers/ThemeContext.js} +0 -0
- /package/{ui/src/lib → core/src}/types/guards.js +0 -0
- /package/{ui/src/lib → core/src}/utils/componentUtils.js +0 -0
- /package/{ui/src/lib → core/src}/utils/templateDialogResolver.js +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as i, jsx as l } from "react/jsx-runtime";
|
|
3
|
-
import * as e from "@radix-ui/react-select";
|
|
4
|
-
import { ChevronDown as m, Check as f, ChevronUp as S } from "lucide-react";
|
|
5
|
-
import * as s from "react";
|
|
6
|
-
import { clsx as c } from "clsx";
|
|
7
|
-
import a from "./select.module.css.js";
|
|
8
|
-
const D = e.Root, T = e.Value, h = s.forwardRef(({ className: o, children: r, ...t }, n) => /* @__PURE__ */ i(
|
|
9
|
-
e.Trigger,
|
|
10
|
-
{
|
|
11
|
-
ref: n,
|
|
12
|
-
className: c(a.selectTrigger, o),
|
|
13
|
-
...t,
|
|
14
|
-
children: [
|
|
15
|
-
r,
|
|
16
|
-
/* @__PURE__ */ l(e.Icon, { asChild: !0, children: /* @__PURE__ */ l(m, { className: a.selectTriggerIcon }) })
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
));
|
|
20
|
-
h.displayName = e.Trigger.displayName;
|
|
21
|
-
const p = s.forwardRef(({ className: o, ...r }, t) => /* @__PURE__ */ l(
|
|
22
|
-
e.ScrollUpButton,
|
|
23
|
-
{
|
|
24
|
-
ref: t,
|
|
25
|
-
className: c(a.selectScrollUpButton, o),
|
|
26
|
-
...r,
|
|
27
|
-
children: /* @__PURE__ */ l(S, { className: a.selectScrollIcon })
|
|
28
|
-
}
|
|
29
|
-
));
|
|
30
|
-
p.displayName = e.ScrollUpButton.displayName;
|
|
31
|
-
const d = s.forwardRef(({ className: o, ...r }, t) => /* @__PURE__ */ l(
|
|
32
|
-
e.ScrollDownButton,
|
|
33
|
-
{
|
|
34
|
-
ref: t,
|
|
35
|
-
className: c(a.selectScrollDownButton, o),
|
|
36
|
-
...r,
|
|
37
|
-
children: /* @__PURE__ */ l(m, { className: a.selectScrollIcon })
|
|
38
|
-
}
|
|
39
|
-
));
|
|
40
|
-
d.displayName = e.ScrollDownButton.displayName;
|
|
41
|
-
const I = s.forwardRef(({ className: o, children: r, position: t = "popper", ...n }, N) => /* @__PURE__ */ l(e.Portal, { children: /* @__PURE__ */ i(
|
|
42
|
-
e.Content,
|
|
43
|
-
{
|
|
44
|
-
ref: N,
|
|
45
|
-
className: c(
|
|
46
|
-
a.selectContent,
|
|
47
|
-
t === "popper" && a.popper,
|
|
48
|
-
o
|
|
49
|
-
),
|
|
50
|
-
position: t,
|
|
51
|
-
avoidCollisions: !0,
|
|
52
|
-
collisionPadding: 10,
|
|
53
|
-
sideOffset: 5,
|
|
54
|
-
alignOffset: 0,
|
|
55
|
-
hideWhenDetached: !1,
|
|
56
|
-
...n,
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ l(p, {}),
|
|
59
|
-
/* @__PURE__ */ l(
|
|
60
|
-
e.Viewport,
|
|
61
|
-
{
|
|
62
|
-
className: c(
|
|
63
|
-
a.selectViewport,
|
|
64
|
-
t === "popper" && a.popper
|
|
65
|
-
),
|
|
66
|
-
children: r
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ l(d, {})
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
) }));
|
|
73
|
-
I.displayName = e.Content.displayName;
|
|
74
|
-
const y = s.forwardRef(({ className: o, ...r }, t) => /* @__PURE__ */ l(
|
|
75
|
-
e.Label,
|
|
76
|
-
{
|
|
77
|
-
ref: t,
|
|
78
|
-
className: c(a.selectLabel, o),
|
|
79
|
-
...r
|
|
80
|
-
}
|
|
81
|
-
));
|
|
82
|
-
y.displayName = e.Label.displayName;
|
|
83
|
-
const w = s.forwardRef(({ className: o, children: r, ...t }, n) => /* @__PURE__ */ i(
|
|
84
|
-
e.Item,
|
|
85
|
-
{
|
|
86
|
-
ref: n,
|
|
87
|
-
className: c(a.selectItem, o),
|
|
88
|
-
...t,
|
|
89
|
-
children: [
|
|
90
|
-
/* @__PURE__ */ l("span", { className: a.selectItemIndicator, children: /* @__PURE__ */ l(e.ItemIndicator, { children: /* @__PURE__ */ l(f, { className: a.selectItemIndicatorIcon }) }) }),
|
|
91
|
-
/* @__PURE__ */ l(e.ItemText, { children: r })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
));
|
|
95
|
-
w.displayName = e.Item.displayName;
|
|
96
|
-
const u = s.forwardRef(({ className: o, ...r }, t) => /* @__PURE__ */ l(
|
|
97
|
-
e.Separator,
|
|
98
|
-
{
|
|
99
|
-
ref: t,
|
|
100
|
-
className: c(a.selectSeparator, o),
|
|
101
|
-
...r
|
|
102
|
-
}
|
|
103
|
-
));
|
|
104
|
-
u.displayName = e.Separator.displayName;
|
|
105
|
-
export {
|
|
106
|
-
D as Select,
|
|
107
|
-
I as SelectContent,
|
|
108
|
-
w as SelectItem,
|
|
109
|
-
y as SelectLabel,
|
|
110
|
-
d as SelectScrollDownButton,
|
|
111
|
-
p as SelectScrollUpButton,
|
|
112
|
-
u as SelectSeparator,
|
|
113
|
-
h as SelectTrigger,
|
|
114
|
-
T as SelectValue
|
|
115
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
const e = "fb-selectTrigger_dj84x", t = "fb-selectTriggerIcon_V8dav", c = "fb-selectScrollUpButton_c6WZR", o = "fb-selectScrollDownButton_kmWY4", l = "fb-selectScrollIcon_IZbZG", s = "fb-selectContent_uJ-ZX", n = "fb-popper_uKkq9", r = "fb-selectViewport_wcTaR", I = "fb-selectLabel_hb7ig", a = "fb-selectItem_f23oZ", p = "fb-selectItemIndicator_PD-WQ", b = "fb-selectItemIndicatorIcon_kgB1I", i = "fb-selectSeparator_DS7X2", f = {
|
|
3
|
-
selectTrigger: e,
|
|
4
|
-
selectTriggerIcon: t,
|
|
5
|
-
selectScrollUpButton: c,
|
|
6
|
-
selectScrollDownButton: o,
|
|
7
|
-
selectScrollIcon: l,
|
|
8
|
-
selectContent: s,
|
|
9
|
-
popper: n,
|
|
10
|
-
selectViewport: r,
|
|
11
|
-
selectLabel: I,
|
|
12
|
-
selectItem: a,
|
|
13
|
-
selectItemIndicator: p,
|
|
14
|
-
selectItemIndicatorIcon: b,
|
|
15
|
-
selectSeparator: i
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
f as default,
|
|
19
|
-
n as popper,
|
|
20
|
-
s as selectContent,
|
|
21
|
-
a as selectItem,
|
|
22
|
-
p as selectItemIndicator,
|
|
23
|
-
b as selectItemIndicatorIcon,
|
|
24
|
-
I as selectLabel,
|
|
25
|
-
o as selectScrollDownButton,
|
|
26
|
-
l as selectScrollIcon,
|
|
27
|
-
c as selectScrollUpButton,
|
|
28
|
-
i as selectSeparator,
|
|
29
|
-
e as selectTrigger,
|
|
30
|
-
t as selectTriggerIcon,
|
|
31
|
-
r as selectViewport
|
|
32
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import * as o from "react";
|
|
4
|
-
import { clsx as m } from "clsx";
|
|
5
|
-
import s from "./textarea.module.css.js";
|
|
6
|
-
const x = o.forwardRef(
|
|
7
|
-
({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
|
8
|
-
"textarea",
|
|
9
|
-
{
|
|
10
|
-
className: m(s.textarea, e),
|
|
11
|
-
ref: t,
|
|
12
|
-
...r
|
|
13
|
-
}
|
|
14
|
-
)
|
|
15
|
-
);
|
|
16
|
-
x.displayName = "Textarea";
|
|
17
|
-
export {
|
|
18
|
-
x as Textarea
|
|
19
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as m, jsx as d } from "react/jsx-runtime";
|
|
3
|
-
function o({
|
|
4
|
-
invalid: e,
|
|
5
|
-
errorMessage: r,
|
|
6
|
-
className: i = "",
|
|
7
|
-
input: t
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ m("div", { className: `form-field-wrapper ${i}`, children: [
|
|
10
|
-
t,
|
|
11
|
-
e && r && /* @__PURE__ */ d("div", { className: "form-field-error mt-2 text-sm text-red-600", children: r })
|
|
12
|
-
] });
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
o as FormFieldWrapper
|
|
16
|
-
};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { Alert as c, AlertDescription as u } from "../../../ui/src/components/alert/alert.js";
|
|
5
|
-
import { Button as h } from "../../../ui/src/components/button/button.js";
|
|
6
|
-
import { Checkbox as y } from "../../../ui/src/components/checkbox/checkbox.js";
|
|
7
|
-
import { Input as b } from "../../../ui/src/components/input/input.js";
|
|
8
|
-
import { RadioGroup as f, RadioGroupItem as m } from "../../../ui/src/components/radio-group/radio-group.js";
|
|
9
|
-
import { Select as g, SelectTrigger as v, SelectValue as x, SelectContent as B, SelectItem as A } from "../../../ui/src/components/select/select.js";
|
|
10
|
-
import { Textarea as S } from "../../../ui/src/components/textarea/textarea.js";
|
|
11
|
-
import { ProgressLoaderBar as k } from "../../../ui/src/components/ProgressLoaderBar/ProgressLoaderBar.js";
|
|
12
|
-
const M = ({
|
|
13
|
-
component: n,
|
|
14
|
-
value: o,
|
|
15
|
-
onChange: d,
|
|
16
|
-
isFormView: l
|
|
17
|
-
}) => {
|
|
18
|
-
const e = n.properties ?? {};
|
|
19
|
-
switch (n.type) {
|
|
20
|
-
case "text":
|
|
21
|
-
case "email":
|
|
22
|
-
case "tel":
|
|
23
|
-
case "number":
|
|
24
|
-
case "date":
|
|
25
|
-
return /* @__PURE__ */ r(
|
|
26
|
-
b,
|
|
27
|
-
{
|
|
28
|
-
type: n.type,
|
|
29
|
-
value: typeof o == "string" ? o : "",
|
|
30
|
-
disabled: !!e.disabled,
|
|
31
|
-
readOnly: !!e.readOnly || !l,
|
|
32
|
-
placeholder: typeof e.placeholder == "string" ? e.placeholder : void 0,
|
|
33
|
-
onChange: l ? (a) => d(a.target.value) : void 0
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
case "textarea":
|
|
37
|
-
return /* @__PURE__ */ r(
|
|
38
|
-
S,
|
|
39
|
-
{
|
|
40
|
-
value: typeof o == "string" ? o : "",
|
|
41
|
-
disabled: !!e.disabled,
|
|
42
|
-
readOnly: !!e.readOnly || !l,
|
|
43
|
-
placeholder: typeof e.placeholder == "string" ? e.placeholder : void 0,
|
|
44
|
-
onChange: l ? (a) => d(a.target.value) : void 0
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
case "checkbox":
|
|
48
|
-
return /* @__PURE__ */ r(
|
|
49
|
-
y,
|
|
50
|
-
{
|
|
51
|
-
checked: !!o,
|
|
52
|
-
disabled: !!e.disabled,
|
|
53
|
-
onCheckedChange: l ? (a) => d(a === !0) : void 0
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
case "radioGroup": {
|
|
57
|
-
const a = Array.isArray(e.options) ? e.options : [];
|
|
58
|
-
return /* @__PURE__ */ r(
|
|
59
|
-
f,
|
|
60
|
-
{
|
|
61
|
-
value: typeof o == "string" ? o : "",
|
|
62
|
-
onValueChange: l ? (t) => d(t) : void 0,
|
|
63
|
-
disabled: !!e.disabled,
|
|
64
|
-
children: a.map((t) => /* @__PURE__ */ r(m, { value: t.value, children: t.label }, t.value))
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
case "dropdown": {
|
|
69
|
-
const a = Array.isArray(e.options) ? e.options : [];
|
|
70
|
-
return /* @__PURE__ */ p(
|
|
71
|
-
g,
|
|
72
|
-
{
|
|
73
|
-
value: typeof o == "string" ? o : "",
|
|
74
|
-
onValueChange: l ? (t) => d(t) : void 0,
|
|
75
|
-
disabled: !!e.disabled,
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(
|
|
78
|
-
x,
|
|
79
|
-
{
|
|
80
|
-
placeholder: typeof e.placeholder == "string" ? e.placeholder : ""
|
|
81
|
-
}
|
|
82
|
-
) }),
|
|
83
|
-
/* @__PURE__ */ r(B, { children: a.map((t) => /* @__PURE__ */ r(A, { value: t.value, children: t.label }, t.value)) })
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
case "button":
|
|
89
|
-
return /* @__PURE__ */ r(
|
|
90
|
-
h,
|
|
91
|
-
{
|
|
92
|
-
type: "button",
|
|
93
|
-
disabled: !!e.disabled,
|
|
94
|
-
onClick: l ? () => d(null) : void 0,
|
|
95
|
-
children: typeof e.label == "string" ? e.label : "Submit"
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
case "heading": {
|
|
99
|
-
const a = typeof e.level == "number" ? e.level : void 0, t = a !== void 0 ? Math.min(6, Math.max(1, a)) : 2, i = typeof e.text == "string" ? e.text : "", s = `h${t}`;
|
|
100
|
-
return /* @__PURE__ */ r(s, { children: i });
|
|
101
|
-
}
|
|
102
|
-
case "paragraph":
|
|
103
|
-
return /* @__PURE__ */ r("p", { children: typeof e.text == "string" ? e.text : "" });
|
|
104
|
-
case "alert":
|
|
105
|
-
return /* @__PURE__ */ r(c, { variant: "default", children: /* @__PURE__ */ r(u, { children: typeof e.message == "string" ? e.message : "" }) });
|
|
106
|
-
case "progress-loader":
|
|
107
|
-
return /* @__PURE__ */ r(
|
|
108
|
-
k,
|
|
109
|
-
{
|
|
110
|
-
mode: typeof e.mode == "string" ? e.mode : "indeterminate",
|
|
111
|
-
status: "loading",
|
|
112
|
-
label: typeof e.label == "string" ? e.label : void 0
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
default:
|
|
116
|
-
return console.warn(
|
|
117
|
-
`[wizardRenderer] Unsupported component type: ${n.type}`
|
|
118
|
-
), null;
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
export {
|
|
122
|
-
M as wizardDefaultRenderer
|
|
123
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|