@abgov/jsonforms-components 2.6.4 → 2.6.6

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 +47 -40
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -8529,7 +8529,8 @@ const FileUploader = _ref => {
8529
8529
  const {
8530
8530
  required,
8531
8531
  label,
8532
- i18nKeyPrefix
8532
+ i18nKeyPrefix,
8533
+ visible
8533
8534
  } = props;
8534
8535
  const propertyId = i18nKeyPrefix;
8535
8536
  const variant = ((_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.variant) || 'button';
@@ -8647,45 +8648,48 @@ const FileUploader = _ref => {
8647
8648
  })
8648
8649
  });
8649
8650
  };
8650
- return jsxs(FileUploaderStyle, {
8651
- className: "FileUploader",
8652
- children: [required ? jsx(GoAFormItem, {
8653
- label: sentenceCaseLabel,
8654
- requirement: "required"
8655
- }) : jsx("div", {
8656
- className: "label",
8657
- children: sentenceCaseLabel
8658
- }), !readOnly && jsx("div", {
8659
- className: "file-upload",
8660
- children: jsx(GoAFileUploadInput, {
8661
- variant: variant,
8662
- onSelectFile: uploadFile,
8663
- maxFileSize: maxFileSize,
8664
- accept: accept
8665
- })
8666
- }), helpText && jsx(HelpText, {
8667
- children: helpText
8668
- }), jsx("div", {
8669
- children: loadingFileName !== undefined ? jsx(GoAModal, {
8670
- open: loadingFileName !== undefined,
8671
- children: jsx("div", {
8672
- className: "align-center",
8673
- children: jsx(GoACircularProgress, {
8674
- visible: true,
8675
- message: `Uploading ${loadingFileName}`,
8676
- size: "large"
8677
- })
8678
- })
8651
+ return jsx(Visible, {
8652
+ visible: visible,
8653
+ children: jsxs(FileUploaderStyle, {
8654
+ className: "FileUploader",
8655
+ children: [required ? jsx(GoAFormItem, {
8656
+ label: sentenceCaseLabel,
8657
+ requirement: "required"
8679
8658
  }) : jsx("div", {
8680
- children: multiFileUploader ? fileList && (fileList[props.i18nKeyPrefix] || []).map((_, index) => {
8681
- return jsx(DownloadFileWidget, {
8682
- index: index
8683
- });
8684
- }) : fileList && !deleteHide && getFile(fileListLength - 1) && fileListLength >= 0 && jsx(DownloadFileWidget, {
8685
- index: fileListLength - 1
8659
+ className: "label",
8660
+ children: sentenceCaseLabel
8661
+ }), !readOnly && jsx("div", {
8662
+ className: "file-upload",
8663
+ children: jsx(GoAFileUploadInput, {
8664
+ variant: variant,
8665
+ onSelectFile: uploadFile,
8666
+ maxFileSize: maxFileSize,
8667
+ accept: accept
8686
8668
  })
8687
- })
8688
- })]
8669
+ }), helpText && jsx(HelpText, {
8670
+ children: helpText
8671
+ }), jsx("div", {
8672
+ children: loadingFileName !== undefined ? jsx(GoAModal, {
8673
+ open: loadingFileName !== undefined,
8674
+ children: jsx("div", {
8675
+ className: "align-center",
8676
+ children: jsx(GoACircularProgress, {
8677
+ visible: true,
8678
+ message: `Uploading ${loadingFileName}`,
8679
+ size: "large"
8680
+ })
8681
+ })
8682
+ }) : jsx("div", {
8683
+ children: multiFileUploader ? fileList && (fileList[props.i18nKeyPrefix] || []).map((_, index) => {
8684
+ return jsx(DownloadFileWidget, {
8685
+ index: index
8686
+ });
8687
+ }) : fileList && !deleteHide && getFile(fileListLength - 1) && fileListLength >= 0 && jsx(DownloadFileWidget, {
8688
+ index: fileListLength - 1
8689
+ })
8690
+ })
8691
+ })]
8692
+ })
8689
8693
  });
8690
8694
  };
8691
8695
  const HelpText = styled.div(_t$3 || (_t$3 = _2`
@@ -10711,8 +10715,11 @@ const HelpContentComponent = _ref => {
10711
10715
  };
10712
10716
  const textVariant = !((_e = uischema.options) === null || _e === void 0 ? void 0 : _e.variant) || ((_f = uischema.options) === null || _f === void 0 ? void 0 : _f.variant) !== 'details' && ((_g = uischema.options) === null || _g === void 0 ? void 0 : _g.variant) !== 'hyperlink';
10713
10717
  if (markdown) {
10714
- return MarkdownComponent({
10715
- markdown: getMarkDownData((_h = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _h === void 0 ? void 0 : _h.help)
10718
+ return jsx(Visible, {
10719
+ visible: visible,
10720
+ children: MarkdownComponent({
10721
+ markdown: getMarkDownData((_h = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _h === void 0 ? void 0 : _h.help)
10722
+ })
10716
10723
  });
10717
10724
  }
10718
10725
  return jsx(Visible, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
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",