@abgov/jsonforms-components 2.64.5 → 2.64.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 +11 -13
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -7351,21 +7351,26 @@ const InnerGoAInputText = props => {
|
|
|
7351
7351
|
const [manualInput, setManualInput] = useState(false);
|
|
7352
7352
|
const [localValue, setLocalValue] = useState(initialValue);
|
|
7353
7353
|
const debouncedValue = useDebounce(localValue, 300);
|
|
7354
|
+
const hasDefault = Object.prototype.hasOwnProperty.call(schema, 'default');
|
|
7354
7355
|
useEffect(() => {
|
|
7356
|
+
if (data === undefined || data === null) {
|
|
7357
|
+
return;
|
|
7358
|
+
}
|
|
7355
7359
|
setLocalValue(isSinField && typeof data === 'string' ? formatSinForDisplay(data) : data);
|
|
7356
7360
|
}, [data, isSinField]);
|
|
7357
7361
|
useEffect(() => {
|
|
7358
|
-
if (!user || data) return;
|
|
7359
|
-
const autoPopulatedValue =
|
|
7360
|
-
if (autoPopulatedValue && autoPopulatedValue !== data
|
|
7362
|
+
if (!user || data || manualInput || hasDefault) return;
|
|
7363
|
+
const autoPopulatedValue = autoPopulateValue(user, props);
|
|
7364
|
+
if (autoPopulatedValue && autoPopulatedValue !== data) {
|
|
7361
7365
|
handleChange(props.path, autoPopulatedValue);
|
|
7362
7366
|
setLocalValue(autoPopulatedValue);
|
|
7363
7367
|
}
|
|
7364
7368
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7365
7369
|
}, [user]);
|
|
7366
7370
|
useEffect(() => {
|
|
7367
|
-
if (typeof handleChange === 'function' &&
|
|
7371
|
+
if (typeof handleChange === 'function' && hasDefault && !manualInput) {
|
|
7368
7372
|
handleChange(props.path, schema.default);
|
|
7373
|
+
setLocalValue(schema.default);
|
|
7369
7374
|
}
|
|
7370
7375
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7371
7376
|
}, [schema.default]);
|
|
@@ -7918,7 +7923,7 @@ const toDateTimeLocalInputValue = value => {
|
|
|
7918
7923
|
return '';
|
|
7919
7924
|
}
|
|
7920
7925
|
const pad = part => String(part).padStart(2, '0');
|
|
7921
|
-
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
7926
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
|
|
7922
7927
|
};
|
|
7923
7928
|
const GoADateTimeInput = props => {
|
|
7924
7929
|
var _uischema$options$com, _uischema$options, _uischema$options$com2, _uischema$options2, _uischema$options3;
|
|
@@ -7942,6 +7947,7 @@ const GoADateTimeInput = props => {
|
|
|
7942
7947
|
width: width,
|
|
7943
7948
|
name: (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
|
|
7944
7949
|
value: toDateTimeLocalInputValue(data),
|
|
7950
|
+
step: 1,
|
|
7945
7951
|
testId: (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`,
|
|
7946
7952
|
disabled: !enabled,
|
|
7947
7953
|
readonly: readOnly,
|
|
@@ -7955,14 +7961,6 @@ const GoADateTimeInput = props => {
|
|
|
7955
7961
|
controlProps: props
|
|
7956
7962
|
});
|
|
7957
7963
|
},
|
|
7958
|
-
onKeyPress: detail => {
|
|
7959
|
-
onKeyPressForDateControl({
|
|
7960
|
-
name: detail.name,
|
|
7961
|
-
value: detail.value,
|
|
7962
|
-
key: detail.key,
|
|
7963
|
-
controlProps: props
|
|
7964
|
-
});
|
|
7965
|
-
},
|
|
7966
7964
|
onBlur: detail => {
|
|
7967
7965
|
if (isVisited === false && setIsVisited) {
|
|
7968
7966
|
setIsVisited();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.64.
|
|
3
|
+
"version": "2.64.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-05-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-05-28T19:15:57.492Z",
|
|
4
|
+
"sourceCommit": "46f246351769be0ffb3415361c87d5bbe15521f2",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|