@abgov/jsonforms-components 2.60.5 → 2.60.7
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 +46 -29
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -7291,7 +7291,7 @@ const GoAInputText = props => {
|
|
|
7291
7291
|
});
|
|
7292
7292
|
};
|
|
7293
7293
|
const InnerGoAInputText = props => {
|
|
7294
|
-
var _uischema$options$com, _uischema$options, _props$uischema, _props$uischema2, _uischema$
|
|
7294
|
+
var _uischema$options$com, _uischema$options, _props$uischema, _uischema$options2, _uischema$options3, _uischema$options$pla, _uischema$options4, _props$uischema2, _uischema$options5, _uischema$options6, _uischema$options$com2, _uischema$options7, _uischema$options8, _uischema$options9;
|
|
7295
7295
|
const {
|
|
7296
7296
|
data,
|
|
7297
7297
|
config,
|
|
@@ -7347,31 +7347,38 @@ const InnerGoAInputText = props => {
|
|
|
7347
7347
|
if (registerConfig) {
|
|
7348
7348
|
registerData = registerCtx == null ? void 0 : registerCtx.selectRegisterData(registerConfig);
|
|
7349
7349
|
}
|
|
7350
|
+
const labelPath = (uischema == null || (_uischema$options2 = uischema.options) == null ? void 0 : _uischema$options2.label) || 'label';
|
|
7351
|
+
const valuePath = (uischema == null || (_uischema$options3 = uischema.options) == null ? void 0 : _uischema$options3.value) || 'value';
|
|
7352
|
+
const dropDownPlaceholder = (_uischema$options$pla = uischema == null || (_uischema$options4 = uischema.options) == null ? void 0 : _uischema$options4.placeholder) != null ? _uischema$options$pla : 'Select an option';
|
|
7350
7353
|
const autoCompletion = ((_props$uischema2 = props.uischema) == null || (_props$uischema2 = _props$uischema2.options) == null ? void 0 : _props$uischema2.autoComplete) === true;
|
|
7351
7354
|
const mergedOptions = useMemo(() => {
|
|
7352
7355
|
var _registerData;
|
|
7353
|
-
const
|
|
7356
|
+
const dynamicOptions = ((_registerData = registerData) == null ? void 0 : _registerData.map(d => {
|
|
7354
7357
|
if (typeof d === 'string') {
|
|
7355
7358
|
return {
|
|
7356
7359
|
value: d,
|
|
7357
7360
|
label: d
|
|
7358
7361
|
};
|
|
7359
|
-
} else {
|
|
7360
|
-
return Object.assign({}, d);
|
|
7361
7362
|
}
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7363
|
+
if (typeof d === 'object' && d !== null) {
|
|
7364
|
+
return {
|
|
7365
|
+
value: ___default.get(d, valuePath) || '',
|
|
7366
|
+
label: ___default.get(d, labelPath) || ''
|
|
7367
|
+
};
|
|
7368
|
+
}
|
|
7369
|
+
return {
|
|
7369
7370
|
label: '',
|
|
7370
7371
|
value: ''
|
|
7371
|
-
}
|
|
7372
|
-
}
|
|
7373
|
-
|
|
7374
|
-
|
|
7372
|
+
};
|
|
7373
|
+
})) || [];
|
|
7374
|
+
const filteredDynamicOptions = dynamicOptions.filter(item => !(item.value === '' && item.label.trim() === ''));
|
|
7375
|
+
const newOptions = [{
|
|
7376
|
+
label: dropDownPlaceholder,
|
|
7377
|
+
value: ''
|
|
7378
|
+
}, ...filteredDynamicOptions];
|
|
7379
|
+
return newOptions;
|
|
7380
|
+
// eslint-disable-next-line
|
|
7381
|
+
}, [registerData, valuePath, labelPath]);
|
|
7375
7382
|
useEffect(() => {
|
|
7376
7383
|
if (registerConfig) {
|
|
7377
7384
|
registerCtx == null || registerCtx.fetchRegisterByUrl(registerConfig);
|
|
@@ -7380,10 +7387,10 @@ const InnerGoAInputText = props => {
|
|
|
7380
7387
|
const appliedUiSchemaOptions = Object.assign({}, config, uischema == null ? void 0 : uischema.options);
|
|
7381
7388
|
const placeholder = (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.placeholder) || (schema == null ? void 0 : schema.description) || '';
|
|
7382
7389
|
const isSinField = schema.title === sinTitle;
|
|
7383
|
-
const autoCapitalize = (uischema == null || (_uischema$
|
|
7384
|
-
const readOnly = (_uischema$options$com2 = uischema == null || (_uischema$
|
|
7390
|
+
const autoCapitalize = (uischema == null || (_uischema$options5 = uischema.options) == null || (_uischema$options5 = _uischema$options5.componentProps) == null ? void 0 : _uischema$options5.autoCapitalize) === true || (uischema == null || (_uischema$options6 = uischema.options) == null ? void 0 : _uischema$options6.autoCapitalize) === true;
|
|
7391
|
+
const readOnly = (_uischema$options$com2 = uischema == null || (_uischema$options7 = uischema.options) == null || (_uischema$options7 = _uischema$options7.componentProps) == null ? void 0 : _uischema$options7.readOnly) != null ? _uischema$options$com2 : false;
|
|
7385
7392
|
return jsx("div", {
|
|
7386
|
-
children: mergedOptions.length >
|
|
7393
|
+
children: mergedOptions.length > 1 ? jsx(GoabDropdown, {
|
|
7387
7394
|
name: `jsonforms-${path}-dropdown`,
|
|
7388
7395
|
value: data,
|
|
7389
7396
|
disabled: !enabled,
|
|
@@ -7408,8 +7415,7 @@ const InnerGoAInputText = props => {
|
|
|
7408
7415
|
name: (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
|
|
7409
7416
|
ariaLabel: (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
|
|
7410
7417
|
testId: (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`
|
|
7411
|
-
}, (_uischema$
|
|
7412
|
-
// maxLength={appliedUiSchemaOptions?.maxLength}
|
|
7418
|
+
}, (_uischema$options8 = uischema.options) == null ? void 0 : _uischema$options8.componentProps, {
|
|
7413
7419
|
onChange: detail => {
|
|
7414
7420
|
let formattedValue = detail.value;
|
|
7415
7421
|
if (schema && schema.title === sinTitle && detail.value !== '') {
|
|
@@ -7431,7 +7437,7 @@ const InnerGoAInputText = props => {
|
|
|
7431
7437
|
value: autoCapitalize ? detail.value.toUpperCase() : detail.value
|
|
7432
7438
|
});
|
|
7433
7439
|
}
|
|
7434
|
-
}, uischema == null || (_uischema$
|
|
7440
|
+
}, uischema == null || (_uischema$options9 = uischema.options) == null ? void 0 : _uischema$options9.componentProps))
|
|
7435
7441
|
});
|
|
7436
7442
|
};
|
|
7437
7443
|
const GoATextControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
@@ -9057,6 +9063,8 @@ const EmptyList$1 = ({
|
|
|
9057
9063
|
noDataMessage
|
|
9058
9064
|
}) => jsx(GoabGrid, {
|
|
9059
9065
|
minChildWidth: "60ch",
|
|
9066
|
+
mt: "l",
|
|
9067
|
+
mb: "l",
|
|
9060
9068
|
children: jsx(TextCenter, {
|
|
9061
9069
|
children: jsx("b", {
|
|
9062
9070
|
children: noDataMessage
|
|
@@ -12810,25 +12818,34 @@ const GoAHorizontalLayoutComponent = ({
|
|
|
12810
12818
|
enabled,
|
|
12811
12819
|
visible
|
|
12812
12820
|
}) => {
|
|
12813
|
-
var
|
|
12821
|
+
var _uischema$options;
|
|
12814
12822
|
const layout = uischema;
|
|
12815
|
-
const
|
|
12823
|
+
const elements = layout.elements || [];
|
|
12824
|
+
const helpElements = elements.filter(element => element.type === 'HelpContent');
|
|
12825
|
+
const contentElements = elements.filter(element => element.type !== 'HelpContent');
|
|
12816
12826
|
const childProps = {
|
|
12817
|
-
elements: layout.elements,
|
|
12818
12827
|
schema,
|
|
12819
12828
|
path,
|
|
12820
12829
|
enabled,
|
|
12821
|
-
direction: hasHelpContent ? 'column' : 'row',
|
|
12822
12830
|
visible,
|
|
12823
12831
|
width: (uischema == null || (_uischema$options = uischema.options) == null ? void 0 : _uischema$options.width) || '300px',
|
|
12824
12832
|
option: {
|
|
12825
12833
|
space: 'xl'
|
|
12826
12834
|
}
|
|
12827
12835
|
};
|
|
12828
|
-
return
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12836
|
+
return jsxs(Fragment, {
|
|
12837
|
+
children: [helpElements.length > 0 && jsx(LayoutRenderer, Object.assign({}, childProps, {
|
|
12838
|
+
direction: "column",
|
|
12839
|
+
elements: helpElements,
|
|
12840
|
+
renderers: renderers,
|
|
12841
|
+
cells: cells
|
|
12842
|
+
})), contentElements.length > 0 && jsx(LayoutRenderer, Object.assign({}, childProps, {
|
|
12843
|
+
direction: "row",
|
|
12844
|
+
elements: contentElements,
|
|
12845
|
+
renderers: renderers,
|
|
12846
|
+
cells: cells
|
|
12847
|
+
}))]
|
|
12848
|
+
});
|
|
12832
12849
|
};
|
|
12833
12850
|
const GoAHorizontalReviewLayoutComponent = ({
|
|
12834
12851
|
uischema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.7",
|
|
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",
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-04-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-04-17T18:52:26.336Z",
|
|
4
|
+
"sourceCommit": "717e95fb1c7f01c427aad1200eaeefe5bbd842c3",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|