@abgov/jsonforms-components 1.25.5 → 1.26.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/index.esm.js +20 -10
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -4032,6 +4032,7 @@ const EnumSelect = props => {
|
|
|
4032
4032
|
} = props;
|
|
4033
4033
|
const registerCtx = useContext(JsonFormsRegisterContext);
|
|
4034
4034
|
const registerConfig = fetchRegisterConfigFromOptions((_b = (_a = props.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.register);
|
|
4035
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4035
4036
|
let registerData = [];
|
|
4036
4037
|
if (registerConfig) {
|
|
4037
4038
|
registerData = registerCtx === null || registerCtx === void 0 ? void 0 : registerCtx.selectRegisterData(registerConfig);
|
|
@@ -4039,7 +4040,7 @@ const EnumSelect = props => {
|
|
|
4039
4040
|
const autocompletion = ((_d = (_c = props.uischema) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.autocomplete) === true;
|
|
4040
4041
|
const appliedUiSchemaOptions = merge({}, config, props.uischema.options);
|
|
4041
4042
|
const mergedOptions = useMemo(() => {
|
|
4042
|
-
|
|
4043
|
+
const newOptions = [...(options || []), ...registerData.map(d => {
|
|
4043
4044
|
if (typeof d === 'string') {
|
|
4044
4045
|
return {
|
|
4045
4046
|
value: d,
|
|
@@ -4049,6 +4050,13 @@ const EnumSelect = props => {
|
|
|
4049
4050
|
return Object.assign({}, d);
|
|
4050
4051
|
}
|
|
4051
4052
|
})];
|
|
4053
|
+
if (newOptions && newOptions.length === 0) {
|
|
4054
|
+
newOptions.push({
|
|
4055
|
+
label: '',
|
|
4056
|
+
value: ''
|
|
4057
|
+
});
|
|
4058
|
+
}
|
|
4059
|
+
return newOptions;
|
|
4052
4060
|
}, [registerData, options]);
|
|
4053
4061
|
useEffect(() => {
|
|
4054
4062
|
if (registerConfig) {
|
|
@@ -5049,15 +5057,17 @@ const FormStepper = props => {
|
|
|
5049
5057
|
})]
|
|
5050
5058
|
}), jsx(GoAGrid, {
|
|
5051
5059
|
minChildWidth: "600px",
|
|
5052
|
-
children: category.elements.map(element => {
|
|
5053
|
-
return jsx(
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5060
|
+
children: category.elements.map((element, index) => {
|
|
5061
|
+
return jsx("div", {
|
|
5062
|
+
children: jsx(JsonFormsDispatch, {
|
|
5063
|
+
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
5064
|
+
schema: schema,
|
|
5065
|
+
uischema: element,
|
|
5066
|
+
enabled: enabled,
|
|
5067
|
+
renderers: GoAReviewRenderers,
|
|
5068
|
+
cells: cells
|
|
5069
|
+
})
|
|
5070
|
+
}, `form-stepper-category-${index}`);
|
|
5061
5071
|
})
|
|
5062
5072
|
})]
|
|
5063
5073
|
}, index);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|