@abgov/jsonforms-components 2.60.5 → 2.60.6
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 +27 -21
- 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, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.6",
|
|
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-17T15:42:29.517Z",
|
|
4
|
+
"sourceCommit": "5149af8455ea3e52212089ed42d0e955fe2569e5",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|