@abgov/jsonforms-components 2.6.1 → 2.6.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
@@ -6888,7 +6888,8 @@ let _$5 = t => t,
6888
6888
  _t19$1,
6889
6889
  _t20$1,
6890
6890
  _t21,
6891
- _t22;
6891
+ _t22,
6892
+ _t23;
6892
6893
  const ReviewItem = styled.div(_t$6 || (_t$6 = _$5`
6893
6894
  display: flex;
6894
6895
  flex-direction: column;
@@ -6966,47 +6967,50 @@ const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$5`
6966
6967
  const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$5`
6967
6968
  margin-top: var(--goa-space-2xl);
6968
6969
  `));
6969
- const PageBorder = styled.h3(_t13$1 || (_t13$1 = _$5`
6970
+ const PageRenderPaddingBottom = styled.div(_t13$1 || (_t13$1 = _$5`
6971
+ margin-bottom: var(--goa-space-2xl);
6972
+ `));
6973
+ const PageBorder = styled.h3(_t14$1 || (_t14$1 = _$5`
6970
6974
  padding: var(--goa-space-3xl);
6971
6975
  `));
6972
- const TableReviewItemSection = styled.div(_t14$1 || (_t14$1 = _$5`
6976
+ const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$5`
6973
6977
  .element-style {
6974
6978
  max-width: 1600px;
6975
6979
  }
6976
6980
  `));
6977
- const TableReviewItem = styled.div(_t15$1 || (_t15$1 = _$5`
6981
+ const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$5`
6978
6982
  border: 1px solid #dcdcdc;
6979
6983
  border-radius: 5px;
6980
6984
  padding: var(--goa-space-2xl);
6981
6985
  `));
6982
- const TableReviewPageTitleRow = styled.div(_t16$1 || (_t16$1 = _$5`
6986
+ const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$5`
6983
6987
  margin-top: var(--goa-space-xl);
6984
6988
  display: flex;
6985
6989
  justify-content: space-between;
6986
6990
  `));
6987
- const TableReviewCategoryLabel = styled.h3(_t17$1 || (_t17$1 = _$5`
6991
+ const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$5`
6988
6992
  color: var(--goa-color-text-secondary) !important;
6989
6993
  margin-bottom: var(--goa-space-l);
6990
6994
  `));
6991
- const CategoryStatus = styled.td(_t18$1 || (_t18$1 = _$5`
6995
+ const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$5`
6992
6996
  width: var(--goa-space-xl);
6993
6997
  padding-right: var(--goa-space-xl);
6994
6998
  `));
6995
- const TocPageRef = styled.td(_t19$1 || (_t19$1 = _$5`
6999
+ const TocPageRef = styled.td(_t20$1 || (_t20$1 = _$5`
6996
7000
  padding-left: var(--goa-space-xl);
6997
7001
  `));
6998
- const TocTitle = styled.h1(_t20$1 || (_t20$1 = _$5`
7002
+ const TocTitle = styled.h1(_t21 || (_t21 = _$5`
6999
7003
  padding: 0;
7000
7004
  margin: 0;
7001
7005
  padding-left: var(--goa-space-xl);
7002
7006
  padding-bottom: var(--goa-space-3xl);
7003
7007
  `));
7004
- const TocSubtitle = styled.h2(_t21 || (_t21 = _$5`
7008
+ const TocSubtitle = styled.h2(_t22 || (_t22 = _$5`
7005
7009
  padding: 0;
7006
7010
  margin: 0;
7007
7011
  padding-left: var(--goa-space-xl);
7008
7012
  `));
7009
- const CompletionStatus = styled.div(_t22 || (_t22 = _$5`
7013
+ const CompletionStatus = styled.div(_t23 || (_t23 = _$5`
7010
7014
  padding: 0;
7011
7015
  margin: 0;
7012
7016
  padding-left: var(--goa-space-xl);
@@ -8301,7 +8305,13 @@ const RenderPages = props => {
8301
8305
  }
8302
8306
  }), isOnReview && jsxs("div", {
8303
8307
  "data-testid": "stepper-pages-review-page",
8304
- children: [jsx(FormStepperPageReviewer, Object.assign({}, props.categoryProps, {
8308
+ children: [jsx(PageRenderPaddingBottom, {
8309
+ children: jsx(BackButton, {
8310
+ testId: "review-back-button",
8311
+ link: () => goToTableOfContext(),
8312
+ text: "Back"
8313
+ })
8314
+ }), jsx(FormStepperPageReviewer, Object.assign({}, props.categoryProps, {
8305
8315
  navigationFunc: goToPage
8306
8316
  })), jsx(PageRenderPadding, {
8307
8317
  children: jsx(GoAButtonGroup, {
@@ -8496,7 +8506,6 @@ const FileUploaderReview = props => {
8496
8506
  };
8497
8507
  const FileUploader = _ref => {
8498
8508
  let {
8499
- data,
8500
8509
  path,
8501
8510
  handleChange,
8502
8511
  uischema
@@ -8511,6 +8520,7 @@ const FileUploader = _ref => {
8511
8520
  const deleteTriggerFunction = (_c = enumerators === null || enumerators === void 0 ? void 0 : enumerators.functions) === null || _c === void 0 ? void 0 : _c.get('delete-file');
8512
8521
  const deleteTrigger = deleteTriggerFunction && deleteTriggerFunction();
8513
8522
  const fileListValue = enumerators === null || enumerators === void 0 ? void 0 : enumerators.data.get('file-list');
8523
+ const [loadingFileName, setLoadingFileName] = useState(undefined);
8514
8524
  const countries = ['Argentina', 'Brazil', 'Canada', 'Denmark', 'Egypt', 'France', 'Greece', 'India', 'Japan', 'Kenya'];
8515
8525
  enumerators === null || enumerators === void 0 ? void 0 : enumerators.addFormContextData('countries', countries);
8516
8526
  const user = enumerators === null || enumerators === void 0 ? void 0 : enumerators.getFormContextData('user');
@@ -8534,6 +8544,7 @@ const FileUploader = _ref => {
8534
8544
  deleteTrigger(fileInList, propertyId);
8535
8545
  }
8536
8546
  }
8547
+ setLoadingFileName(file === null || file === void 0 ? void 0 : file.name);
8537
8548
  // To support multipleFileUploader, the propertyId (path) is in propertyId.index format
8538
8549
  uploadTrigger(file, `${propertyId}.${fileListLength}`);
8539
8550
  setDeleteHide(false);
@@ -8558,6 +8569,9 @@ const FileUploader = _ref => {
8558
8569
  return (_a = fileList === null || fileList === void 0 ? void 0 : fileList[props.i18nKeyPrefix]) === null || _a === void 0 ? void 0 : _a[index];
8559
8570
  }
8560
8571
  useEffect(() => {
8572
+ if (loadingFileName !== undefined) {
8573
+ setLoadingFileName(undefined);
8574
+ }
8561
8575
  // UseEffect is required because not having it causes a react update error, but
8562
8576
  // it doesn't function correctly within jsonforms unless there is a minor delay here
8563
8577
  const delayedFunction = () => {
@@ -8652,13 +8666,13 @@ const FileUploader = _ref => {
8652
8666
  }), helpText && jsx(HelpText, {
8653
8667
  children: helpText
8654
8668
  }), jsx("div", {
8655
- children: Array.isArray(data) && data[0] === 'Loading' ? jsx(GoAModal, {
8656
- open: Array.isArray(data) && data[0] === 'Loading',
8669
+ children: loadingFileName !== undefined ? jsx(GoAModal, {
8670
+ open: loadingFileName !== undefined,
8657
8671
  children: jsx("div", {
8658
8672
  className: "align-center",
8659
8673
  children: jsx(GoACircularProgress, {
8660
8674
  visible: true,
8661
- message: `Uploading ${data[1]}`,
8675
+ message: `Uploading ${loadingFileName}`,
8662
8676
  size: "large"
8663
8677
  })
8664
8678
  })
@@ -10419,7 +10433,7 @@ const fetchAddressSuggestions = async (formUrl, searchTerm, isAlbertaAddress) =>
10419
10433
  }
10420
10434
  };
10421
10435
  const filterAlbertaAddresses = suggestions => {
10422
- return suggestions.filter(suggestion => suggestion.Description.includes('AB'));
10436
+ return suggestions.filter(suggestion => suggestion.Description.includes('AB')).slice(0, 10);
10423
10437
  };
10424
10438
  const filterSuggestionsWithoutAddressCount = suggestions => {
10425
10439
  return suggestions.filter(suggestion => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.6.1",
3
+ "version": "2.6.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",
@@ -10,6 +10,7 @@ export declare const ListWithDetailHeading: import("styled-components/dist/types
10
10
  export declare const RightAlignmentDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
11
11
  export declare const FormStepperSummaryH3: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
12
12
  export declare const PageRenderPadding: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ export declare const PageRenderPaddingBottom: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
14
  export declare const PageBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
14
15
  export declare const TableReviewItemSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
15
16
  export declare const TableReviewItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;