@abgov/jsonforms-components 2.57.1 → 2.57.3

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
@@ -3337,24 +3337,6 @@ const isRequiredAndHasNoData = props => {
3337
3337
  const isNotKeyPressTabOrShift = key => {
3338
3338
  return !(key === 'Tab' || key === 'Shift') && key !== undefined;
3339
3339
  };
3340
- /**
3341
- * Helper function to process onKeyPress events for text controls.
3342
- * @param props - EventKeyPressControlProps
3343
- */
3344
- const onKeyPressForTextControl = props => {
3345
- const {
3346
- key,
3347
- value,
3348
- controlProps
3349
- } = props;
3350
- const {
3351
- handleChange,
3352
- path
3353
- } = controlProps;
3354
- if (isNotKeyPressTabOrShift(key)) {
3355
- handleChange(path, value);
3356
- }
3357
- };
3358
3340
  /**
3359
3341
  * Helper function to process onKeyPress events for Time controls
3360
3342
  * @param props - EventKeyPressControlProps
@@ -7400,6 +7382,7 @@ const GoATextControl = props => jsx(GoAInputBaseControl, Object.assign({}, props
7400
7382
  const GoATextControlTester = rankWith(1, isStringControl);
7401
7383
  const GoAInputTextControl = withJsonFormsControlProps(GoATextControl);
7402
7384
 
7385
+ const DEBOUNCE_DELAY = 550;
7403
7386
  const MultiLineText = props => {
7404
7387
  var _uischema$options$com, _uischema$options, _uischema$options2, _uischema$options3, _uischema$options$com2, _uischema$options4, _uischema$options5;
7405
7388
  const {
@@ -7415,13 +7398,20 @@ const MultiLineText = props => {
7415
7398
  errors,
7416
7399
  setIsVisited
7417
7400
  } = props;
7418
- const {
7419
- required
7420
- } = props;
7421
7401
  const [textAreaValue, setTextAreaValue] = React.useState(data || '');
7402
+ const debouncedValue = useDebounce(textAreaValue, DEBOUNCE_DELAY);
7422
7403
  useEffect(() => {
7423
7404
  setTextAreaValue(data || '');
7424
7405
  }, [data]);
7406
+ /* istanbul ignore next */
7407
+ useEffect(() => {
7408
+ if (debouncedValue !== data && (debouncedValue !== '' || data !== undefined)) {
7409
+ onChangeForInputControl({
7410
+ value: debouncedValue,
7411
+ controlProps: props
7412
+ });
7413
+ }
7414
+ }, [debouncedValue]);
7425
7415
  const appliedUiSchemaOptions = Object.assign({}, config, uischema == null ? void 0 : uischema.options);
7426
7416
  const placeholder = (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.placeholder) || (schema == null ? void 0 : schema.description) || '';
7427
7417
  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%';
@@ -7430,7 +7420,7 @@ const MultiLineText = props => {
7430
7420
  const textAreaName = `${label || path}-text-area` || '';
7431
7421
  const txtAreaComponent = jsx(GoabTextArea, Object.assign({
7432
7422
  error: isVisited && errors.length > 0,
7433
- value: textAreaValue,
7423
+ value: debouncedValue,
7434
7424
  disabled: !enabled,
7435
7425
  readOnly: readOnly,
7436
7426
  placeholder: placeholder,
@@ -7441,28 +7431,12 @@ const MultiLineText = props => {
7441
7431
  // maxCount={schema.maxLength || 256}
7442
7432
  onKeyPress: detail => {
7443
7433
  const newValue = autoCapitalize ? detail.value.toUpperCase() : detail.value;
7434
+ setTextAreaValue(newValue);
7444
7435
  if (isVisited === false && setIsVisited) {
7445
7436
  setIsVisited();
7446
7437
  }
7447
- if (detail.value.length === 0 || required && errors.length === 0 && detail.value.length > 0) {
7448
- onKeyPressForTextControl({
7449
- name: detail.name,
7450
- value: newValue,
7451
- key: detail.key,
7452
- controlProps: props
7453
- });
7454
- }
7455
- onChangeForInputControl({
7456
- name: detail.name,
7457
- value: newValue,
7458
- controlProps: props
7459
- });
7460
7438
  },
7461
- onChange: () => {
7462
- if (isVisited === false && setIsVisited) {
7463
- setIsVisited();
7464
- }
7465
- }
7439
+ onChange: detail => {}
7466
7440
  }, uischema == null || (_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.componentProps));
7467
7441
  return txtAreaComponent;
7468
7442
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.57.1",
3
+ "version": "2.57.3",
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-20T20:48:23.927Z",
4
- "sourceCommit": "9d4706f8e093666845671f3e06863206bceba3d5",
3
+ "generatedAt": "2026-03-23T15:28:50.694Z",
4
+ "sourceCommit": "014f784d8d45888ff2eee1a7f05b1cb0e715e9b7",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 32,
7
7
  "renderers": [