@abgov/jsonforms-components 1.24.10 → 1.24.12

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.
Files changed (2) hide show
  1. package/index.esm.js +11 -7
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -3517,20 +3517,20 @@ const MultiLineText = props => {
3517
3517
  // maxCount={schema.maxLength || 256}
3518
3518
  onKeyPress: (name, value, key) => {
3519
3519
  const newValue = autoCapitalize ? value.toUpperCase() : value;
3520
- if (value.length === 0) {
3520
+ if (value.length === 0 || required && errorsFormInput.length === 0 && value.length > 0) {
3521
3521
  onKeyPressForTextControl({
3522
3522
  name,
3523
3523
  value: newValue,
3524
3524
  key,
3525
3525
  controlProps: props
3526
3526
  });
3527
- } else if (required && errorsFormInput.length === 0 && value.length > 0) {
3528
- handleChange(path, newValue);
3529
3527
  }
3530
3528
  },
3531
3529
  onChange: (name, value) => {
3532
- const newValue = autoCapitalize ? value.toUpperCase() : value;
3533
- handleChange(path, newValue);
3530
+ if (data !== value) {
3531
+ const newValue = autoCapitalize ? value.toUpperCase() : value;
3532
+ handleChange(path, newValue);
3533
+ }
3534
3534
  }
3535
3535
  }, (_h = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _h === void 0 ? void 0 : _h.componentProps));
3536
3536
  return txtAreaComponent;
@@ -5574,7 +5574,7 @@ let _$2 = t => t,
5574
5574
  const DELAY_UPLOAD_TIMEOUT_MS = 5;
5575
5575
  const DELAY_DELETE_TIMEOUT_MS = 5;
5576
5576
  const FileUploader = _a => {
5577
- var _b, _c, _d, _e;
5577
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5578
5578
  var {
5579
5579
  data,
5580
5580
  path,
@@ -5641,6 +5641,8 @@ const FileUploader = _a => {
5641
5641
  return () => clearTimeout(timeoutId);
5642
5642
  }, [handleChange, fileList, propertyId]);
5643
5643
  const readOnly = (_e = (_d = (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.componentProps) === null || _d === void 0 ? void 0 : _d.readOnly) !== null && _e !== void 0 ? _e : false;
5644
+ const maxFileSize = (_h = (_g = (_f = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _f === void 0 ? void 0 : _f.componentProps) === null || _g === void 0 ? void 0 : _g.maxFileSize) !== null && _h !== void 0 ? _h : '';
5645
+ const accept = (_l = (_k = (_j = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _j === void 0 ? void 0 : _j.componentProps) === null || _k === void 0 ? void 0 : _k.accept) !== null && _l !== void 0 ? _l : '';
5644
5646
  return jsxs(FileUploaderStyle, {
5645
5647
  id: "file-upload",
5646
5648
  className: "FileUploader",
@@ -5654,7 +5656,9 @@ const FileUploader = _a => {
5654
5656
  className: "file-upload",
5655
5657
  children: jsx(GoAFileUploadInput, {
5656
5658
  variant: variant,
5657
- onSelectFile: uploadFile
5659
+ onSelectFile: uploadFile,
5660
+ maxFileSize: maxFileSize,
5661
+ accept: accept
5658
5662
  })
5659
5663
  }), jsx("div", {
5660
5664
  children: Array.isArray(data) && data[0] === 'Loading' ? jsx(GoAModal, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.24.10",
3
+ "version": "1.24.12",
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",