@blackbelt-technology/pi-dashboard-forms-bpmn 0.7.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/.pi/skills/bpmn-package-explorer/SKILL.md +120 -0
- package/.pi/skills/bpmn-package-explorer/assets/LICENSE.bpmn-io.txt +23 -0
- package/.pi/skills/bpmn-package-explorer/assets/VENDORED.md +90 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/css/bpmn-codes.css +108 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/css/bpmn-embedded.css +166 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/css/bpmn.css +164 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.eot +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.svg +224 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.ttf +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.woff +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.woff2 +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-navigated-viewer.production.min.js +22 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn.css +145 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/diagram-js.css +1249 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/diagram-js.css +1133 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/css/dmn-codes.css +41 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/css/dmn-embedded.css +98 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/css/dmn.css +97 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.eot +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.svg +90 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.ttf +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.woff +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.woff2 +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-decision-table.css +580 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-drd.css +108 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-literal-expression.css +165 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-shared.css +221 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-viewer.production.min.js +16 -0
- package/.pi/skills/bpmn-package-explorer/assets/lib/bpmn-pipeline.mjs +6981 -0
- package/.pi/skills/bpmn-package-explorer/assets/lib/yaml.mjs +7372 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g1-identical-bounds.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g2-zero-size.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g3-child-outside.bpmn +16 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g4-negative-coord.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g5-overlap.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/1-linear.bpmn +12 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/2-gateway.bpmn +19 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/3-boundary.bpmn +13 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/4-subprocess.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/5-pools.bpmn +21 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/6-lanes-only.bpmn +16 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/7-loop.bpmn +13 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/8-long-chain.bpmn +32 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/nesting/expanded-subprocess-ok.bpmn +25 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/call-activity.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/intermediate-catch.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/intermediate-throw.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/manual-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/multi-boundary.bpmn +16 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/parallel-gateway.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/receive-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/rule-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/script-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/send-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/references/authoring-envelope.md +52 -0
- package/.pi/skills/bpmn-package-explorer/references/identifiers.md +102 -0
- package/.pi/skills/bpmn-package-explorer/references/layout-envelope.md +105 -0
- package/.pi/skills/bpmn-package-explorer/references/licensing.md +48 -0
- package/.pi/skills/bpmn-package-explorer/references/package-manifest.md +104 -0
- package/.pi/skills/bpmn-package-explorer/scripts/build-fixtures.mjs +299 -0
- package/.pi/skills/bpmn-package-explorer/scripts/demo.mjs +128 -0
- package/.pi/skills/bpmn-package-explorer/scripts/diagnostics.mjs +37 -0
- package/.pi/skills/bpmn-package-explorer/scripts/envelope.mjs +160 -0
- package/.pi/skills/bpmn-package-explorer/scripts/fixtures.mjs +140 -0
- package/.pi/skills/bpmn-package-explorer/scripts/generate-cli.mjs +31 -0
- package/.pi/skills/bpmn-package-explorer/scripts/generate.mjs +103 -0
- package/.pi/skills/bpmn-package-explorer/scripts/guard.mjs +335 -0
- package/.pi/skills/bpmn-package-explorer/scripts/harness.mjs +12 -0
- package/.pi/skills/bpmn-package-explorer/scripts/identifiers.mjs +117 -0
- package/.pi/skills/bpmn-package-explorer/scripts/ingest.mjs +95 -0
- package/.pi/skills/bpmn-package-explorer/scripts/manifest.mjs +374 -0
- package/.pi/skills/bpmn-package-explorer/scripts/pipeline.mjs +49 -0
- package/.pi/skills/bpmn-package-explorer/scripts/render.mjs +130 -0
- package/.pi/skills/bpmn-package-explorer/scripts/runguard.mjs +38 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-e2e.mjs +87 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-guard.mjs +99 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-manifest.mjs +170 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-more.mjs +87 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-workflow.mjs +73 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest.mjs +57 -0
- package/.pi/skills/bpmn-package-explorer/scripts/vendor.mjs +141 -0
- package/.pi/skills/bpmn-package-explorer/scripts/view-cli.mjs +19 -0
- package/.pi/skills/bpmn-package-explorer/templates/shell.html +141 -0
- package/.pi/skills/bpmn-package-explorer/templates/viewer.js +301 -0
- package/.pi/skills/canvas-webapp/SKILL.md +104 -0
- package/.pi/skills/openforms-mui/SKILL.md +187 -0
- package/.pi/skills/openforms-mui/references/a11y.md +68 -0
- package/.pi/skills/openforms-mui/references/field-widget-map.md +64 -0
- package/.pi/skills/openforms-mui/references/hu-locale.md +45 -0
- package/.pi/skills/openforms-mui/references/logic.md +94 -0
- package/.pi/skills/openforms-mui/references/schema.md +94 -0
- package/.pi/skills/openforms-mui/references/theme-bridge.md +65 -0
- package/.pi/skills/openforms-mui/tools/canvas-serve.mjs +51 -0
- package/.pi/skills/openforms-mui/tools/demo-schema.json +80 -0
- package/.pi/skills/openforms-mui/tools/mockups/tokens.css +27 -0
- package/.pi/skills/openforms-mui/tools/mockups/ui-contract.tokens.json +16 -0
- package/.pi/skills/openforms-mui/tools/package-lock.json +5919 -0
- package/.pi/skills/openforms-mui/tools/package.json +61 -0
- package/.pi/skills/openforms-mui/tools/preview/RenderPanel.tsx +105 -0
- package/.pi/skills/openforms-mui/tools/preview/canvas-app.tsx +66 -0
- package/.pi/skills/openforms-mui/tools/preview/canvas-index.html +16 -0
- package/.pi/skills/openforms-mui/tools/preview/cli.ts +99 -0
- package/.pi/skills/openforms-mui/tools/preview/index.html +17 -0
- package/.pi/skills/openforms-mui/tools/preview/main.tsx +228 -0
- package/.pi/skills/openforms-mui/tools/preview/vite-plugin.ts +41 -0
- package/.pi/skills/openforms-mui/tools/scripts/assert-peer-deps.mjs +39 -0
- package/.pi/skills/openforms-mui/tools/src/OpenFormsMui.tsx +391 -0
- package/.pi/skills/openforms-mui/tools/src/css.d.ts +2 -0
- package/.pi/skills/openforms-mui/tools/src/fields/ErrorSummary.tsx +72 -0
- package/.pi/skills/openforms-mui/tools/src/fields/FieldRenderer.tsx +328 -0
- package/.pi/skills/openforms-mui/tools/src/fields/FieldShell.tsx +50 -0
- package/.pi/skills/openforms-mui/tools/src/fields/FileField.tsx +91 -0
- package/.pi/skills/openforms-mui/tools/src/fields/MatrixField.tsx +146 -0
- package/.pi/skills/openforms-mui/tools/src/fields/RepeaterField.tsx +82 -0
- package/.pi/skills/openforms-mui/tools/src/fields/SignatureCanvas.tsx +121 -0
- package/.pi/skills/openforms-mui/tools/src/fields/context.tsx +34 -0
- package/.pi/skills/openforms-mui/tools/src/fields/index.ts +7 -0
- package/.pi/skills/openforms-mui/tools/src/fields/label.ts +42 -0
- package/.pi/skills/openforms-mui/tools/src/fonts.ts +8 -0
- package/.pi/skills/openforms-mui/tools/src/i18n/dictionary.ts +58 -0
- package/.pi/skills/openforms-mui/tools/src/i18n/hu.ts +56 -0
- package/.pi/skills/openforms-mui/tools/src/i18n/index.ts +43 -0
- package/.pi/skills/openforms-mui/tools/src/index.ts +27 -0
- package/.pi/skills/openforms-mui/tools/src/logic/cnf.ts +206 -0
- package/.pi/skills/openforms-mui/tools/src/logic/formula.ts +285 -0
- package/.pi/skills/openforms-mui/tools/src/logic/index.ts +4 -0
- package/.pi/skills/openforms-mui/tools/src/logic/operators.ts +43 -0
- package/.pi/skills/openforms-mui/tools/src/logic/state.ts +183 -0
- package/.pi/skills/openforms-mui/tools/src/payload.ts +83 -0
- package/.pi/skills/openforms-mui/tools/src/provenance.ts +21 -0
- package/.pi/skills/openforms-mui/tools/src/schema/diagnose.ts +256 -0
- package/.pi/skills/openforms-mui/tools/src/schema/index.ts +4 -0
- package/.pi/skills/openforms-mui/tools/src/schema/normalize.ts +163 -0
- package/.pi/skills/openforms-mui/tools/src/schema/types.ts +299 -0
- package/.pi/skills/openforms-mui/tools/src/schema/walk.ts +68 -0
- package/.pi/skills/openforms-mui/tools/src/theme/from-tokens.ts +102 -0
- package/.pi/skills/openforms-mui/tools/src/theme/index.ts +1 -0
- package/.pi/skills/openforms-mui/tools/src/validation/constrain.ts +83 -0
- package/.pi/skills/openforms-mui/tools/src/validation/diagnostics.ts +62 -0
- package/.pi/skills/openforms-mui/tools/src/validation/empty.ts +53 -0
- package/.pi/skills/openforms-mui/tools/src/validation/index.ts +5 -0
- package/.pi/skills/openforms-mui/tools/src/validation/resolver.ts +14 -0
- package/.pi/skills/openforms-mui/tools/src/validation/zod-from-schema.ts +169 -0
- package/.pi/skills/openforms-mui/tools/tests/a11y.test.tsx +82 -0
- package/.pi/skills/openforms-mui/tools/tests/cli.test.ts +74 -0
- package/.pi/skills/openforms-mui/tools/tests/component.test.tsx +295 -0
- package/.pi/skills/openforms-mui/tools/tests/diagnose.test.ts +163 -0
- package/.pi/skills/openforms-mui/tools/tests/fixtures/all-field-types.json +45 -0
- package/.pi/skills/openforms-mui/tools/tests/logic.test.ts +175 -0
- package/.pi/skills/openforms-mui/tools/tests/normalize.test.ts +105 -0
- package/.pi/skills/openforms-mui/tools/tests/reference-semantics.test.ts +131 -0
- package/.pi/skills/openforms-mui/tools/tests/responsive.test.tsx +158 -0
- package/.pi/skills/openforms-mui/tools/tests/setup.ts +16 -0
- package/.pi/skills/openforms-mui/tools/tests/singleton.test.tsx +31 -0
- package/.pi/skills/openforms-mui/tools/tests/theme.test.ts +65 -0
- package/.pi/skills/openforms-mui/tools/tests/toolchain.test.ts +33 -0
- package/.pi/skills/openforms-mui/tools/tests/validation.test.ts +222 -0
- package/.pi/skills/openforms-mui/tools/tsconfig.json +21 -0
- package/.pi/skills/openforms-mui/tools/vite.canvas.config.ts +21 -0
- package/.pi/skills/openforms-mui/tools/vitest.config.ts +17 -0
- package/NOTICE +46 -0
- package/README.md +62 -0
- package/package.json +46 -0
- package/scripts/ensure-openforms-deps.mjs +38 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import Checkbox from "@mui/material/Checkbox";
|
|
3
|
+
import Divider from "@mui/material/Divider";
|
|
4
|
+
import FormControl from "@mui/material/FormControl";
|
|
5
|
+
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
6
|
+
import FormGroup from "@mui/material/FormGroup";
|
|
7
|
+
import FormHelperText from "@mui/material/FormHelperText";
|
|
8
|
+
import FormLabel from "@mui/material/FormLabel";
|
|
9
|
+
import MenuItem from "@mui/material/MenuItem";
|
|
10
|
+
import Radio from "@mui/material/Radio";
|
|
11
|
+
import RadioGroup from "@mui/material/RadioGroup";
|
|
12
|
+
import Switch from "@mui/material/Switch";
|
|
13
|
+
import TextField from "@mui/material/TextField";
|
|
14
|
+
import Typography from "@mui/material/Typography";
|
|
15
|
+
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
16
|
+
import dayjs from "dayjs";
|
|
17
|
+
import { useController, useFormContext } from "react-hook-form";
|
|
18
|
+
import type { Field } from "../schema/types.js";
|
|
19
|
+
import { useOpenForms } from "./context.js";
|
|
20
|
+
import { FieldShell } from "./FieldShell.js";
|
|
21
|
+
import { labelWithMarker } from "./label.js";
|
|
22
|
+
import { MatrixFieldWidget } from "./MatrixField.js";
|
|
23
|
+
import { RepeaterFieldWidget } from "./RepeaterField.js";
|
|
24
|
+
import { FileFieldWidget } from "./FileField.js";
|
|
25
|
+
import { SignatureCanvas } from "./SignatureCanvas.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Module-level render-prop wrapper over `useController`. Defined outside
|
|
29
|
+
* `FieldRenderer` so it is a stable component identity — a nested definition
|
|
30
|
+
* would remount every render and drop input focus.
|
|
31
|
+
*/
|
|
32
|
+
function Controlled({
|
|
33
|
+
name,
|
|
34
|
+
children,
|
|
35
|
+
}: {
|
|
36
|
+
name: string;
|
|
37
|
+
children: (args: {
|
|
38
|
+
value: unknown;
|
|
39
|
+
onChange: (v: unknown) => void;
|
|
40
|
+
onBlur: () => void;
|
|
41
|
+
error?: string;
|
|
42
|
+
}) => JSX.Element;
|
|
43
|
+
}): JSX.Element {
|
|
44
|
+
const { control } = useFormContext();
|
|
45
|
+
const { field, fieldState } = useController({ name, control });
|
|
46
|
+
return children({ value: field.value, onChange: field.onChange, onBlur: field.onBlur, error: fieldState.error?.message });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface FieldRendererProps {
|
|
50
|
+
field: Field;
|
|
51
|
+
/** Name prefix for repeater children (e.g. "people.0."). */
|
|
52
|
+
namePrefix?: string;
|
|
53
|
+
inRepeater?: boolean;
|
|
54
|
+
/** True when the field is only visible because a rule just became satisfied. */
|
|
55
|
+
revealed?: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const DATE_FMT = "YYYY-MM-DD";
|
|
59
|
+
|
|
60
|
+
export function FieldRenderer({ field, namePrefix = "", inRepeater, revealed }: FieldRendererProps): JSX.Element | null {
|
|
61
|
+
const { t, readOnly, state, markerMode, SignatureComponent } = useOpenForms();
|
|
62
|
+
const fs = inRepeater ? undefined : state.fields.get(field.key);
|
|
63
|
+
const name = `${namePrefix}${field.key}`;
|
|
64
|
+
const disabled = readOnly || fs?.disabled;
|
|
65
|
+
const label = labelWithMarker(field, fs, t, markerMode);
|
|
66
|
+
const help = t.text(field.helpText);
|
|
67
|
+
const apiUnsupported =
|
|
68
|
+
(field.type === "dropdown" || field.type === "radio" || field.type === "checkbox") &&
|
|
69
|
+
field.optionsType === "api";
|
|
70
|
+
|
|
71
|
+
// Static content contributes no control and no answer entry.
|
|
72
|
+
if (field.type === "header") {
|
|
73
|
+
return (
|
|
74
|
+
<FieldShell field={field}>
|
|
75
|
+
<Typography variant="h6" component="h3">
|
|
76
|
+
{t.text(field.label, field.key)}
|
|
77
|
+
</Typography>
|
|
78
|
+
<Divider sx={{ mt: 1 }} />
|
|
79
|
+
</FieldShell>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
if (field.type === "paragraph") {
|
|
83
|
+
return (
|
|
84
|
+
<FieldShell field={field}>
|
|
85
|
+
<Typography variant="body1">{t.text(field.label, field.key)}</Typography>
|
|
86
|
+
</FieldShell>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// A non-rendered calculated field computes but never renders.
|
|
91
|
+
if (field.type === "number" && field.isCalculated && field.isVisibleOnForm === false) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Composite widgets own their own controllers.
|
|
96
|
+
if (field.type === "matrix") return <MatrixFieldWidget field={field} name={name} />;
|
|
97
|
+
if (field.type === "repeater") return <RepeaterFieldWidget field={field} name={name} />;
|
|
98
|
+
if (field.type === "file") return <FileFieldWidget field={field} name={name} />;
|
|
99
|
+
|
|
100
|
+
const options = (field.type === "dropdown" || field.type === "radio" || field.type === "checkbox"
|
|
101
|
+
? apiUnsupported
|
|
102
|
+
? []
|
|
103
|
+
: field.options ?? []
|
|
104
|
+
: []
|
|
105
|
+
).map((o) => ({ value: o.value, label: t.text(o.label, o.value) }));
|
|
106
|
+
|
|
107
|
+
// -- text / textarea -------------------------------------------------------
|
|
108
|
+
if (field.type === "text" || field.type === "textarea") {
|
|
109
|
+
return (
|
|
110
|
+
<FieldShell field={field} revealed={revealed}>
|
|
111
|
+
<Controlled name={name}>
|
|
112
|
+
{({ value, onChange, onBlur, error }) => (
|
|
113
|
+
<TextField
|
|
114
|
+
fullWidth
|
|
115
|
+
id={name}
|
|
116
|
+
label={label}
|
|
117
|
+
placeholder={t.text(field.placeholder)}
|
|
118
|
+
value={value ?? ""}
|
|
119
|
+
onChange={(e) => onChange(e.target.value)}
|
|
120
|
+
onBlur={onBlur}
|
|
121
|
+
disabled={disabled}
|
|
122
|
+
multiline={field.type === "textarea"}
|
|
123
|
+
minRows={field.type === "textarea" ? field.rows ?? 3 : undefined}
|
|
124
|
+
error={!!error}
|
|
125
|
+
helperText={error ?? help}
|
|
126
|
+
slotProps={{ htmlInput: { "aria-required": fs?.required ?? false } }}
|
|
127
|
+
/>
|
|
128
|
+
)}
|
|
129
|
+
</Controlled>
|
|
130
|
+
</FieldShell>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// -- number ----------------------------------------------------------------
|
|
135
|
+
if (field.type === "number") {
|
|
136
|
+
return (
|
|
137
|
+
<FieldShell field={field} revealed={revealed}>
|
|
138
|
+
<Controlled name={name}>
|
|
139
|
+
{({ value, onChange, onBlur, error }) => (
|
|
140
|
+
<TextField
|
|
141
|
+
fullWidth
|
|
142
|
+
id={name}
|
|
143
|
+
type="number"
|
|
144
|
+
label={label}
|
|
145
|
+
value={value === null || value === undefined ? "" : value}
|
|
146
|
+
onChange={(e) => onChange(e.target.value === "" ? null : Number(e.target.value))}
|
|
147
|
+
onBlur={onBlur}
|
|
148
|
+
disabled={disabled || field.isCalculated}
|
|
149
|
+
error={!!error}
|
|
150
|
+
helperText={error ?? help}
|
|
151
|
+
slotProps={{ htmlInput: { "aria-required": fs?.required ?? false, readOnly: field.isCalculated } }}
|
|
152
|
+
/>
|
|
153
|
+
)}
|
|
154
|
+
</Controlled>
|
|
155
|
+
</FieldShell>
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// -- date ------------------------------------------------------------------
|
|
160
|
+
if (field.type === "date") {
|
|
161
|
+
return (
|
|
162
|
+
<FieldShell field={field} revealed={revealed}>
|
|
163
|
+
<Controlled name={name}>
|
|
164
|
+
{({ value, onChange, error }) => (
|
|
165
|
+
<DatePicker
|
|
166
|
+
label={label}
|
|
167
|
+
value={value ? dayjs(value as string) : null}
|
|
168
|
+
onChange={(d) => onChange(d ? d.format(DATE_FMT) : "")}
|
|
169
|
+
disabled={disabled}
|
|
170
|
+
slotProps={{
|
|
171
|
+
textField: {
|
|
172
|
+
fullWidth: true,
|
|
173
|
+
id: name,
|
|
174
|
+
error: !!error,
|
|
175
|
+
helperText: error ?? help,
|
|
176
|
+
},
|
|
177
|
+
}}
|
|
178
|
+
/>
|
|
179
|
+
)}
|
|
180
|
+
</Controlled>
|
|
181
|
+
</FieldShell>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// -- boolean ---------------------------------------------------------------
|
|
186
|
+
if (field.type === "boolean") {
|
|
187
|
+
return (
|
|
188
|
+
<FieldShell field={field} revealed={revealed}>
|
|
189
|
+
<Controlled name={name}>
|
|
190
|
+
{({ value, onChange, error }) => (
|
|
191
|
+
<FormControl error={!!error} disabled={disabled} component="fieldset" variant="standard">
|
|
192
|
+
<FormControlLabel
|
|
193
|
+
control={<Switch checked={!!value} onChange={(e) => onChange(e.target.checked)} />}
|
|
194
|
+
label={label}
|
|
195
|
+
/>
|
|
196
|
+
{(error ?? help) && <FormHelperText>{error ?? help}</FormHelperText>}
|
|
197
|
+
</FormControl>
|
|
198
|
+
)}
|
|
199
|
+
</Controlled>
|
|
200
|
+
</FieldShell>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// -- dropdown --------------------------------------------------------------
|
|
205
|
+
if (field.type === "dropdown") {
|
|
206
|
+
return (
|
|
207
|
+
<FieldShell field={field} revealed={revealed}>
|
|
208
|
+
<Controlled name={name}>
|
|
209
|
+
{({ value, onChange, onBlur, error }) => (
|
|
210
|
+
<TextField
|
|
211
|
+
select
|
|
212
|
+
fullWidth
|
|
213
|
+
id={name}
|
|
214
|
+
label={label}
|
|
215
|
+
value={value ?? ""}
|
|
216
|
+
onChange={(e) => onChange(e.target.value)}
|
|
217
|
+
onBlur={onBlur}
|
|
218
|
+
disabled={disabled || apiUnsupported}
|
|
219
|
+
error={!!error}
|
|
220
|
+
helperText={apiUnsupported ? t.ui.apiUnsupported : error ?? help}
|
|
221
|
+
slotProps={{ htmlInput: { "aria-required": fs?.required ?? false } }}
|
|
222
|
+
>
|
|
223
|
+
{options.length === 0 && (
|
|
224
|
+
<MenuItem value="" disabled>
|
|
225
|
+
{apiUnsupported ? t.ui.apiUnsupported : t.ui.noOptions}
|
|
226
|
+
</MenuItem>
|
|
227
|
+
)}
|
|
228
|
+
{options.map((o) => (
|
|
229
|
+
<MenuItem key={o.value} value={o.value}>
|
|
230
|
+
{o.label}
|
|
231
|
+
</MenuItem>
|
|
232
|
+
))}
|
|
233
|
+
</TextField>
|
|
234
|
+
)}
|
|
235
|
+
</Controlled>
|
|
236
|
+
</FieldShell>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// -- radio -----------------------------------------------------------------
|
|
241
|
+
if (field.type === "radio") {
|
|
242
|
+
return (
|
|
243
|
+
<FieldShell field={field} revealed={revealed}>
|
|
244
|
+
<Controlled name={name}>
|
|
245
|
+
{({ value, onChange, error }) => (
|
|
246
|
+
<FormControl error={!!error} disabled={disabled || apiUnsupported} component="fieldset">
|
|
247
|
+
<FormLabel component="legend">{label}</FormLabel>
|
|
248
|
+
<RadioGroup value={value ?? ""} onChange={(_e, v) => onChange(v)}>
|
|
249
|
+
{options.map((o) => (
|
|
250
|
+
<FormControlLabel key={o.value} value={o.value} control={<Radio />} label={o.label} />
|
|
251
|
+
))}
|
|
252
|
+
</RadioGroup>
|
|
253
|
+
{(apiUnsupported || error || help) && (
|
|
254
|
+
<FormHelperText>{apiUnsupported ? t.ui.apiUnsupported : error ?? help}</FormHelperText>
|
|
255
|
+
)}
|
|
256
|
+
</FormControl>
|
|
257
|
+
)}
|
|
258
|
+
</Controlled>
|
|
259
|
+
</FieldShell>
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// -- checkbox (multi) ------------------------------------------------------
|
|
264
|
+
if (field.type === "checkbox") {
|
|
265
|
+
return (
|
|
266
|
+
<FieldShell field={field} revealed={revealed}>
|
|
267
|
+
<Controlled name={name}>
|
|
268
|
+
{({ value, onChange, error }) => {
|
|
269
|
+
const arr: string[] = Array.isArray(value) ? value : [];
|
|
270
|
+
const toggle = (v: string, checked: boolean) =>
|
|
271
|
+
onChange(checked ? [...arr, v] : arr.filter((x) => x !== v));
|
|
272
|
+
return (
|
|
273
|
+
<FormControl error={!!error} disabled={disabled || apiUnsupported} component="fieldset">
|
|
274
|
+
<FormLabel component="legend">{label}</FormLabel>
|
|
275
|
+
<FormGroup>
|
|
276
|
+
{options.map((o) => (
|
|
277
|
+
<FormControlLabel
|
|
278
|
+
key={o.value}
|
|
279
|
+
control={
|
|
280
|
+
<Checkbox
|
|
281
|
+
checked={arr.includes(o.value)}
|
|
282
|
+
onChange={(e) => toggle(o.value, e.target.checked)}
|
|
283
|
+
/>
|
|
284
|
+
}
|
|
285
|
+
label={o.label}
|
|
286
|
+
/>
|
|
287
|
+
))}
|
|
288
|
+
</FormGroup>
|
|
289
|
+
{(apiUnsupported || error || help) && (
|
|
290
|
+
<FormHelperText>{apiUnsupported ? t.ui.apiUnsupported : error ?? help}</FormHelperText>
|
|
291
|
+
)}
|
|
292
|
+
</FormControl>
|
|
293
|
+
);
|
|
294
|
+
}}
|
|
295
|
+
</Controlled>
|
|
296
|
+
</FieldShell>
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// -- signature -------------------------------------------------------------
|
|
301
|
+
if (field.type === "signature") {
|
|
302
|
+
const Sig = SignatureComponent ?? SignatureCanvas;
|
|
303
|
+
return (
|
|
304
|
+
<FieldShell field={field} revealed={revealed}>
|
|
305
|
+
<FormLabel component="legend" sx={{ mb: 1, display: "block" }}>
|
|
306
|
+
{label}
|
|
307
|
+
</FormLabel>
|
|
308
|
+
<Controlled name={name}>
|
|
309
|
+
{({ value, onChange, error }) => (
|
|
310
|
+
<>
|
|
311
|
+
<Sig
|
|
312
|
+
value={(value as string) ?? ""}
|
|
313
|
+
onChange={onChange}
|
|
314
|
+
disabled={disabled}
|
|
315
|
+
readOnly={readOnly}
|
|
316
|
+
ariaLabel={label}
|
|
317
|
+
clearLabel={t.ui.clear}
|
|
318
|
+
/>
|
|
319
|
+
{(error ?? help) && <FormHelperText error={!!error}>{error ?? help}</FormHelperText>}
|
|
320
|
+
</>
|
|
321
|
+
)}
|
|
322
|
+
</Controlled>
|
|
323
|
+
</FieldShell>
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import Box from "@mui/material/Box";
|
|
3
|
+
import Typography from "@mui/material/Typography";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
import type { Field } from "../schema/types.js";
|
|
6
|
+
import { useOpenForms } from "./context.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Wraps a widget with the shared affordances the renderer spec requires:
|
|
10
|
+
* a computed/derived hint for calculated fields, a "shown because…" reason for
|
|
11
|
+
* conditionally-revealed fields, and a non-colour disabled cue. The label and
|
|
12
|
+
* error live on the widget itself so screen readers get one association.
|
|
13
|
+
*/
|
|
14
|
+
export function FieldShell({
|
|
15
|
+
field,
|
|
16
|
+
children,
|
|
17
|
+
revealed,
|
|
18
|
+
}: {
|
|
19
|
+
field: Field;
|
|
20
|
+
htmlFor?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
/** True when this field is only visible because a rule became satisfied. */
|
|
24
|
+
revealed?: boolean;
|
|
25
|
+
}): JSX.Element {
|
|
26
|
+
const { t, state } = useOpenForms();
|
|
27
|
+
const fs = state.fields.get(field.key);
|
|
28
|
+
const calculated = fs?.calculated;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Box sx={{ mb: 2 }} data-field-key={field.key}>
|
|
32
|
+
{children}
|
|
33
|
+
{calculated && (
|
|
34
|
+
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mt: 0.5 }}>
|
|
35
|
+
{t.ui.computedHint}
|
|
36
|
+
</Typography>
|
|
37
|
+
)}
|
|
38
|
+
{!calculated && fs?.disabled && (
|
|
39
|
+
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mt: 0.5 }}>
|
|
40
|
+
{t.ui.disabledHint}
|
|
41
|
+
</Typography>
|
|
42
|
+
)}
|
|
43
|
+
{revealed && (
|
|
44
|
+
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mt: 0.5 }}>
|
|
45
|
+
{t.ui.revealedReason}
|
|
46
|
+
</Typography>
|
|
47
|
+
)}
|
|
48
|
+
</Box>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import Button from "@mui/material/Button";
|
|
4
|
+
import Stack from "@mui/material/Stack";
|
|
5
|
+
import Typography from "@mui/material/Typography";
|
|
6
|
+
import FormHelperText from "@mui/material/FormHelperText";
|
|
7
|
+
import { useController, useFormContext } from "react-hook-form";
|
|
8
|
+
import type { FileAnswer, FileField as FileFieldType } from "../schema/types.js";
|
|
9
|
+
import { useOpenForms } from "./context.js";
|
|
10
|
+
import { FieldShell } from "./FieldShell.js";
|
|
11
|
+
|
|
12
|
+
const DEFAULT_MAX_MB = 5;
|
|
13
|
+
|
|
14
|
+
function typeMatches(accepted: string[] | undefined, file: File): boolean {
|
|
15
|
+
if (!accepted || accepted.length === 0) return true;
|
|
16
|
+
return accepted.some((a) => {
|
|
17
|
+
const t = a.trim().toLowerCase();
|
|
18
|
+
if (t.endsWith("/*")) return file.type.toLowerCase().startsWith(t.slice(0, -1));
|
|
19
|
+
if (t.startsWith(".")) return file.name.toLowerCase().endsWith(t);
|
|
20
|
+
return file.type.toLowerCase() === t;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function readAsDataUrl(file: File): Promise<string> {
|
|
25
|
+
return new Promise((resolve, reject) => {
|
|
26
|
+
const reader = new FileReader();
|
|
27
|
+
reader.onload = () => resolve(String(reader.result));
|
|
28
|
+
reader.onerror = () => reject(reader.error);
|
|
29
|
+
reader.readAsDataURL(file);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function FileFieldWidget({ field, name }: { field: FileFieldType; name: string }): JSX.Element {
|
|
34
|
+
const { control } = useFormContext();
|
|
35
|
+
const { t, readOnly, state } = useOpenForms();
|
|
36
|
+
const fs = state.fields.get(field.key);
|
|
37
|
+
const {
|
|
38
|
+
field: { value, onChange },
|
|
39
|
+
fieldState,
|
|
40
|
+
} = useController({ name, control, defaultValue: null });
|
|
41
|
+
const [localError, setLocalError] = useState<string | null>(null);
|
|
42
|
+
|
|
43
|
+
const maxMb = field.maxFileSizeMB ?? DEFAULT_MAX_MB;
|
|
44
|
+
const current = value as FileAnswer | null;
|
|
45
|
+
|
|
46
|
+
const onSelect = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
47
|
+
const file = e.target.files?.[0];
|
|
48
|
+
e.target.value = ""; // allow re-selecting the same file
|
|
49
|
+
if (!file) return;
|
|
50
|
+
setLocalError(null);
|
|
51
|
+
|
|
52
|
+
if (file.size > maxMb * 1024 * 1024) {
|
|
53
|
+
setLocalError(t.ui.fileTooLarge(maxMb));
|
|
54
|
+
return; // NOT encoded into state
|
|
55
|
+
}
|
|
56
|
+
if (!typeMatches(field.acceptedTypes, file)) {
|
|
57
|
+
setLocalError(t.ui.fileTypeRejected((field.acceptedTypes ?? []).join(", ")));
|
|
58
|
+
return; // NOT encoded into state
|
|
59
|
+
}
|
|
60
|
+
const content = await readAsDataUrl(file);
|
|
61
|
+
const answer: FileAnswer = { name: file.name, size: file.size, type: file.type, content };
|
|
62
|
+
onChange(answer);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const error = localError ?? fieldState.error?.message ?? null;
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<FieldShell field={field} htmlFor={name} error={fieldState.error?.message}>
|
|
69
|
+
<Stack spacing={1}>
|
|
70
|
+
{!readOnly && (
|
|
71
|
+
<Button variant="outlined" component="label" disabled={fs?.disabled}>
|
|
72
|
+
{current ? current.name : t.ui.selectPlaceholder}
|
|
73
|
+
<input
|
|
74
|
+
id={name}
|
|
75
|
+
type="file"
|
|
76
|
+
hidden
|
|
77
|
+
accept={(field.acceptedTypes ?? []).join(",")}
|
|
78
|
+
onChange={onSelect}
|
|
79
|
+
/>
|
|
80
|
+
</Button>
|
|
81
|
+
)}
|
|
82
|
+
{current && (
|
|
83
|
+
<Typography variant="body2" color="text.secondary">
|
|
84
|
+
{current.name} ({Math.round(current.size / 1024)} KB)
|
|
85
|
+
</Typography>
|
|
86
|
+
)}
|
|
87
|
+
{error && <FormHelperText error>{error}</FormHelperText>}
|
|
88
|
+
</Stack>
|
|
89
|
+
</FieldShell>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import Box from "@mui/material/Box";
|
|
3
|
+
import Card from "@mui/material/Card";
|
|
4
|
+
import CardContent from "@mui/material/CardContent";
|
|
5
|
+
import FormControl from "@mui/material/FormControl";
|
|
6
|
+
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
7
|
+
import FormLabel from "@mui/material/FormLabel";
|
|
8
|
+
import Radio from "@mui/material/Radio";
|
|
9
|
+
import RadioGroup from "@mui/material/RadioGroup";
|
|
10
|
+
import Stack from "@mui/material/Stack";
|
|
11
|
+
import Table from "@mui/material/Table";
|
|
12
|
+
import TableBody from "@mui/material/TableBody";
|
|
13
|
+
import TableCell from "@mui/material/TableCell";
|
|
14
|
+
import TableHead from "@mui/material/TableHead";
|
|
15
|
+
import TableRow from "@mui/material/TableRow";
|
|
16
|
+
import Typography from "@mui/material/Typography";
|
|
17
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
18
|
+
import { useTheme } from "@mui/material/styles";
|
|
19
|
+
import { useController, useFormContext } from "react-hook-form";
|
|
20
|
+
import type { MatrixAnswer, MatrixField as MatrixFieldType } from "../schema/types.js";
|
|
21
|
+
import { useOpenForms } from "./context.js";
|
|
22
|
+
import { FieldShell } from "./FieldShell.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Matrix: a table with one single-choice row group per matrix row. Collapses to
|
|
26
|
+
* one card per row below the `md` breakpoint (renderer spec). The row label
|
|
27
|
+
* stays programmatically associated with its options in both presentations, and
|
|
28
|
+
* only one presentation exists as a control at a time.
|
|
29
|
+
*/
|
|
30
|
+
export function MatrixFieldWidget({ field, name }: { field: MatrixFieldType; name: string }): JSX.Element {
|
|
31
|
+
const { control } = useFormContext();
|
|
32
|
+
const { t, readOnly, state } = useOpenForms();
|
|
33
|
+
const fs = state.fields.get(field.key);
|
|
34
|
+
const disabled = readOnly || fs?.disabled;
|
|
35
|
+
const theme = useTheme();
|
|
36
|
+
const narrow = useMediaQuery(theme.breakpoints.down("md"));
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
field: { value, onChange },
|
|
40
|
+
} = useController({ name, control, defaultValue: {} as MatrixAnswer });
|
|
41
|
+
const answer = (value ?? {}) as MatrixAnswer;
|
|
42
|
+
const rows = field.matrixRows ?? [];
|
|
43
|
+
const cols = field.matrixColumns ?? [];
|
|
44
|
+
|
|
45
|
+
const setRow = (rowKey: string, colValue: string) => {
|
|
46
|
+
onChange({ ...answer, [rowKey]: colValue });
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const groupLabel = t.text(field.label, field.key) || field.key;
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<FieldShell field={field}>
|
|
53
|
+
<FormLabel component="legend" sx={{ mb: 1, display: "block" }}>
|
|
54
|
+
{groupLabel}
|
|
55
|
+
</FormLabel>
|
|
56
|
+
|
|
57
|
+
{narrow ? (
|
|
58
|
+
<Stack spacing={2} role="group" aria-label={groupLabel}>
|
|
59
|
+
{rows.map((row) => {
|
|
60
|
+
const rowId = `${name}-${row.value}`;
|
|
61
|
+
return (
|
|
62
|
+
<Card key={row.value} variant="outlined">
|
|
63
|
+
<CardContent>
|
|
64
|
+
<FormControl disabled={disabled}>
|
|
65
|
+
<FormLabel id={rowId}>{t.text(row.label, row.value)}</FormLabel>
|
|
66
|
+
<RadioGroup
|
|
67
|
+
aria-labelledby={rowId}
|
|
68
|
+
value={answer[row.value] ?? ""}
|
|
69
|
+
onChange={(_e, v) => setRow(row.value, v)}
|
|
70
|
+
>
|
|
71
|
+
{cols.map((col) => (
|
|
72
|
+
<FormControlLabel
|
|
73
|
+
key={col.value}
|
|
74
|
+
value={col.value}
|
|
75
|
+
control={<Radio />}
|
|
76
|
+
label={t.text(col.label, col.value)}
|
|
77
|
+
/>
|
|
78
|
+
))}
|
|
79
|
+
</RadioGroup>
|
|
80
|
+
</FormControl>
|
|
81
|
+
</CardContent>
|
|
82
|
+
</Card>
|
|
83
|
+
);
|
|
84
|
+
})}
|
|
85
|
+
</Stack>
|
|
86
|
+
) : (
|
|
87
|
+
<Table size="small" aria-label={groupLabel}>
|
|
88
|
+
<TableHead>
|
|
89
|
+
<TableRow>
|
|
90
|
+
<TableCell />
|
|
91
|
+
{cols.map((col) => (
|
|
92
|
+
<TableCell key={col.value} align="center">
|
|
93
|
+
{t.text(col.label, col.value)}
|
|
94
|
+
</TableCell>
|
|
95
|
+
))}
|
|
96
|
+
</TableRow>
|
|
97
|
+
</TableHead>
|
|
98
|
+
<TableBody>
|
|
99
|
+
{rows.map((row) => {
|
|
100
|
+
const rowId = `${name}-${row.value}`;
|
|
101
|
+
return (
|
|
102
|
+
<TableRow key={row.value}>
|
|
103
|
+
<TableCell component="th" scope="row" id={rowId}>
|
|
104
|
+
{t.text(row.label, row.value)}
|
|
105
|
+
</TableCell>
|
|
106
|
+
{cols.map((col) => {
|
|
107
|
+
const selected = answer[row.value] === col.value;
|
|
108
|
+
return (
|
|
109
|
+
<TableCell key={col.value} align="center" sx={{ p: 0 }}>
|
|
110
|
+
{/* Whole cell is the activation target (task 10.8). */}
|
|
111
|
+
<Box
|
|
112
|
+
component="label"
|
|
113
|
+
sx={{
|
|
114
|
+
display: "flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "center",
|
|
117
|
+
minHeight: 48,
|
|
118
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
<Radio
|
|
122
|
+
checked={selected}
|
|
123
|
+
disabled={disabled}
|
|
124
|
+
value={col.value}
|
|
125
|
+
name={`${name}.${row.value}`}
|
|
126
|
+
onChange={() => setRow(row.value, col.value)}
|
|
127
|
+
slotProps={{
|
|
128
|
+
input: {
|
|
129
|
+
"aria-label": `${t.text(row.label, row.value)}: ${t.text(col.label, col.value)}`,
|
|
130
|
+
},
|
|
131
|
+
}}
|
|
132
|
+
/>
|
|
133
|
+
</Box>
|
|
134
|
+
</TableCell>
|
|
135
|
+
);
|
|
136
|
+
})}
|
|
137
|
+
</TableRow>
|
|
138
|
+
);
|
|
139
|
+
})}
|
|
140
|
+
</TableBody>
|
|
141
|
+
</Table>
|
|
142
|
+
)}
|
|
143
|
+
{rows.length === 0 && <Typography variant="body2">{t.ui.noOptions}</Typography>}
|
|
144
|
+
</FieldShell>
|
|
145
|
+
);
|
|
146
|
+
}
|