@abgov/jsonforms-components 2.60.0 → 2.60.1
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 +24 -11
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -7286,7 +7286,7 @@ const GoAInputText = props => {
|
|
|
7286
7286
|
});
|
|
7287
7287
|
};
|
|
7288
7288
|
const InnerGoAInputText = props => {
|
|
7289
|
-
var
|
|
7289
|
+
var _uischema$options$com, _uischema$options, _props$uischema, _props$uischema2, _uischema$options2, _uischema$options3, _uischema$options$com2, _uischema$options4, _uischema$options5, _uischema$options6;
|
|
7290
7290
|
const {
|
|
7291
7291
|
data,
|
|
7292
7292
|
config,
|
|
@@ -7302,7 +7302,8 @@ const InnerGoAInputText = props => {
|
|
|
7302
7302
|
setIsVisited
|
|
7303
7303
|
} = props;
|
|
7304
7304
|
const user = useRegisterUser();
|
|
7305
|
-
const initialValue =
|
|
7305
|
+
const initialValue = data;
|
|
7306
|
+
const [manualInput, setManualInput] = useState(false);
|
|
7306
7307
|
const [localValue, setLocalValue] = useState(initialValue);
|
|
7307
7308
|
const debouncedValue = useDebounce(localValue, 300);
|
|
7308
7309
|
useEffect(() => {
|
|
@@ -7311,13 +7312,13 @@ const InnerGoAInputText = props => {
|
|
|
7311
7312
|
useEffect(() => {
|
|
7312
7313
|
if (!user || data) return;
|
|
7313
7314
|
const autoPopulatedValue = schema.default || user && autoPopulateValue(user, props);
|
|
7314
|
-
if (autoPopulatedValue && autoPopulatedValue !== data) {
|
|
7315
|
+
if (autoPopulatedValue && autoPopulatedValue !== data && !manualInput) {
|
|
7315
7316
|
handleChange(props.path, autoPopulatedValue);
|
|
7316
7317
|
}
|
|
7317
7318
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7318
|
-
}, [
|
|
7319
|
+
}, [user]);
|
|
7319
7320
|
useEffect(() => {
|
|
7320
|
-
if (typeof handleChange === 'function' && (schema == null ? void 0 : schema.default) !== undefined) {
|
|
7321
|
+
if (typeof handleChange === 'function' && (schema == null ? void 0 : schema.default) !== undefined && !manualInput) {
|
|
7321
7322
|
handleChange(props.path, schema.default);
|
|
7322
7323
|
}
|
|
7323
7324
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -7410,6 +7411,7 @@ const InnerGoAInputText = props => {
|
|
|
7410
7411
|
formattedValue = formatSin(detail.value);
|
|
7411
7412
|
}
|
|
7412
7413
|
setLocalValue(formattedValue);
|
|
7414
|
+
setManualInput(true);
|
|
7413
7415
|
if (isVisited === false && setIsVisited) {
|
|
7414
7416
|
setIsVisited();
|
|
7415
7417
|
}
|
|
@@ -10234,6 +10236,20 @@ const GoAEmailInput = props => {
|
|
|
10234
10236
|
const stepperState = formStepperCtx == null || formStepperCtx.selectStepperState == null ? void 0 : formStepperCtx.selectStepperState();
|
|
10235
10237
|
const currentCategory = stepperState == null || (_stepperState$categor = stepperState.categories) == null ? void 0 : _stepperState$categor[stepperState == null ? void 0 : stepperState.activeId];
|
|
10236
10238
|
const showReviewLink = currentCategory == null ? void 0 : currentCategory.showReviewPageLink;
|
|
10239
|
+
const [localValue, setLocalValue] = useState(data);
|
|
10240
|
+
const debouncedValue = useDebounce(localValue, 300);
|
|
10241
|
+
/* istanbul ignore next */
|
|
10242
|
+
useEffect(() => {
|
|
10243
|
+
if (debouncedValue === data) return;
|
|
10244
|
+
// Only sync if debouncedValue differs from data and is not initial empty state
|
|
10245
|
+
if (debouncedValue !== data && (debouncedValue !== '' || data !== undefined)) {
|
|
10246
|
+
onChangeForInputControl({
|
|
10247
|
+
value: debouncedValue,
|
|
10248
|
+
controlProps: props
|
|
10249
|
+
});
|
|
10250
|
+
}
|
|
10251
|
+
}, [debouncedValue]);
|
|
10252
|
+
const [manualInput, setManualInput] = useState(false);
|
|
10237
10253
|
const [isVisited, setIsVisited] = useState(false);
|
|
10238
10254
|
useEffect(() => {
|
|
10239
10255
|
if (showReviewLink === true) {
|
|
@@ -10248,7 +10264,7 @@ const GoAEmailInput = props => {
|
|
|
10248
10264
|
useEffect(() => {
|
|
10249
10265
|
if (!user || data) return;
|
|
10250
10266
|
const autoPopulatedValue = schema.default || user && autoPopulateValue(user, props);
|
|
10251
|
-
if (autoPopulatedValue && autoPopulatedValue !== data) {
|
|
10267
|
+
if (autoPopulatedValue && autoPopulatedValue !== data && !manualInput) {
|
|
10252
10268
|
handleChange(props.path, autoPopulatedValue);
|
|
10253
10269
|
}
|
|
10254
10270
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -10279,14 +10295,11 @@ const GoAEmailInput = props => {
|
|
|
10279
10295
|
disabled: !enabled,
|
|
10280
10296
|
readonly: readOnly,
|
|
10281
10297
|
onChange: detail => {
|
|
10298
|
+
setManualInput(true);
|
|
10282
10299
|
if (!isVisited) {
|
|
10283
10300
|
setIsVisited(true);
|
|
10284
10301
|
}
|
|
10285
|
-
|
|
10286
|
-
name: detail.name,
|
|
10287
|
-
value: detail.value,
|
|
10288
|
-
controlProps: props
|
|
10289
|
-
});
|
|
10302
|
+
setLocalValue(detail.value);
|
|
10290
10303
|
},
|
|
10291
10304
|
onBlur: detail => {
|
|
10292
10305
|
if (!isVisited) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.1",
|
|
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-10T21:10:16.242Z",
|
|
4
|
+
"sourceCommit": "a4154355fd3fd785c475219fee548e6bb9678d58",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|