@abgov/jsonforms-components 2.57.0 → 2.57.2

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 CHANGED
@@ -7419,9 +7419,19 @@ const MultiLineText = props => {
7419
7419
  required
7420
7420
  } = props;
7421
7421
  const [textAreaValue, setTextAreaValue] = React.useState(data || '');
7422
+ const debouncedValue = useDebounce(textAreaValue, 500);
7422
7423
  useEffect(() => {
7423
7424
  setTextAreaValue(data || '');
7424
7425
  }, [data]);
7426
+ /* istanbul ignore next */
7427
+ useEffect(() => {
7428
+ if (debouncedValue !== data && (debouncedValue !== '' || data !== undefined)) {
7429
+ onChangeForInputControl({
7430
+ value: debouncedValue,
7431
+ controlProps: props
7432
+ });
7433
+ }
7434
+ }, [debouncedValue]);
7425
7435
  const appliedUiSchemaOptions = Object.assign({}, config, uischema == null ? void 0 : uischema.options);
7426
7436
  const placeholder = (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.placeholder) || (schema == null ? void 0 : schema.description) || '';
7427
7437
  const width = (_uischema$options$com = uischema == null || (_uischema$options = uischema.options) == null || (_uischema$options = _uischema$options.componentProps) == null ? void 0 : _uischema$options.width) != null ? _uischema$options$com : '100%';
@@ -7441,6 +7451,7 @@ const MultiLineText = props => {
7441
7451
  // maxCount={schema.maxLength || 256}
7442
7452
  onKeyPress: detail => {
7443
7453
  const newValue = autoCapitalize ? detail.value.toUpperCase() : detail.value;
7454
+ setTextAreaValue(newValue);
7444
7455
  if (isVisited === false && setIsVisited) {
7445
7456
  setIsVisited();
7446
7457
  }
@@ -7452,11 +7463,6 @@ const MultiLineText = props => {
7452
7463
  controlProps: props
7453
7464
  });
7454
7465
  }
7455
- onChangeForInputControl({
7456
- name: detail.name,
7457
- value: newValue,
7458
- controlProps: props
7459
- });
7460
7466
  },
7461
7467
  onChange: () => {
7462
7468
  if (isVisited === false && setIsVisited) {
@@ -16632,12 +16638,6 @@ const AddressLookUpControl = props => {
16632
16638
  const handleDropdownChange = value => {
16633
16639
  setDropdownSelected(false);
16634
16640
  setSearchTerm(value);
16635
- // keep form data updated immediately (so user sees their input reflected)
16636
- const newAddress = Object.assign({}, address, {
16637
- addressLine1: value
16638
- });
16639
- setAddress(newAddress);
16640
- updateFormData(newAddress);
16641
16641
  };
16642
16642
  /* istanbul ignore next */
16643
16643
  const handleSuggestionClick = suggestion => {
@@ -16648,7 +16648,7 @@ const AddressLookUpControl = props => {
16648
16648
  setErrors({});
16649
16649
  setDropdownSelected(true);
16650
16650
  };
16651
- const handleRequiredFieldBlur = name => {
16651
+ const handleRequiredFieldBlur = (name, value) => {
16652
16652
  const err = Object.assign({}, errors);
16653
16653
  if (!(data != null && data[name]) || data[name] === '' || (data == null ? void 0 : data[name]) === undefined) {
16654
16654
  err[name] = `${getAddressLookupFieldLabel(name)} is required`;
@@ -16658,6 +16658,13 @@ const AddressLookUpControl = props => {
16658
16658
  }
16659
16659
  setSuggestions([]);
16660
16660
  setOpen(false);
16661
+ if (value) {
16662
+ const newAddress = Object.assign({}, address, {
16663
+ addressLine1: value
16664
+ });
16665
+ setAddress(newAddress);
16666
+ updateFormData(newAddress);
16667
+ }
16661
16668
  };
16662
16669
  useEffect(() => {
16663
16670
  if (dropdownRef.current && activeIndex !== -1) {
@@ -16787,7 +16794,7 @@ const AddressLookUpControl = props => {
16787
16794
  placeholder: "Start typing the first line of your address, required.",
16788
16795
  value: (address == null ? void 0 : address.addressLine1) || '',
16789
16796
  onChange: detail => handleDropdownChange(detail.value),
16790
- onBlur: detail => handleRequiredFieldBlur(detail.name),
16797
+ onBlur: detail => handleRequiredFieldBlur(detail.name, detail.value),
16791
16798
  width: "100%",
16792
16799
  onKeyPress: detail => {
16793
16800
  if (open) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.57.0",
3
+ "version": "2.57.2",
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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-03-20T15:52:41.902Z",
4
- "sourceCommit": "aa3a0d1881ea0990b3ed15d966fe93ef1d5ebaf1",
3
+ "generatedAt": "2026-03-20T21:40:32.830Z",
4
+ "sourceCommit": "2fbb186d99adf0dd9c6a190cbe1e5232eef39943",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 32,
7
7
  "renderers": [