@abgov/jsonforms-components 2.60.2 → 2.60.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
@@ -9903,7 +9903,7 @@ class ListWithDetailControl extends React.Component {
9903
9903
  }
9904
9904
 
9905
9905
  const GoAInputBaseTableReview = props => {
9906
- var _uischema$options, _uischema$scope2, _jsonForms$core, _uischema$options4;
9906
+ var _uischema$options, _uischema$scope2, _jsonForms$core, _uischema$options4, _uischema$options5;
9907
9907
  const {
9908
9908
  data,
9909
9909
  uischema,
@@ -10085,7 +10085,7 @@ const GoAInputBaseTableReview = props => {
10085
10085
  children: [labelToUpdate, required && jsx(RequiredTextLabel, {
10086
10086
  children: " (required)"
10087
10087
  })]
10088
- }), stepId !== undefined && jsx(GoabButton, {
10088
+ }), stepId !== undefined && !((_uischema$options5 = uischema.options) != null && (_uischema$options5 = _uischema$options5.componentProps) != null && _uischema$options5.readOnly) && jsx(GoabButton, {
10089
10089
  type: "tertiary",
10090
10090
  size: "compact",
10091
10091
  onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
@@ -10871,30 +10871,33 @@ const FullNameControlReview = props => {
10871
10871
  } = props;
10872
10872
  const requiredFields = (_props$schema$require = (_props$schema = props.schema) == null ? void 0 : _props$schema.required) != null ? _props$schema$require : [];
10873
10873
  const isMissing = value => isNilOrEmptyString(value);
10874
- const renderRow = (fieldLabel, value, fieldName, testId) => jsx("tr", {
10875
- children: jsxs(PageReviewContainer, {
10876
- colSpan: 3,
10877
- children: [jsxs(ReviewHeader, {
10878
- children: [jsx(ReviewLabel, {
10879
- children: fieldLabel
10880
- }), stepId !== undefined && jsx(GoabButton, {
10881
- type: "tertiary",
10882
- size: "compact",
10883
- onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
10884
- testId: `${fieldName}-change-btn`,
10885
- children: "Change"
10886
- })]
10887
- }), jsxs(ReviewValue, {
10888
- children: [jsx("div", {
10889
- "data-testid": testId,
10890
- children: value != null ? value : ''
10891
- }), requiredFields.includes(fieldName) && isMissing(value) && jsx(GoabFormItem, {
10892
- error: `${fieldLabel} is required`,
10893
- label: ""
10874
+ const renderRow = (fieldLabel, value, fieldName, testId) => {
10875
+ var _uischema$options;
10876
+ return jsx("tr", {
10877
+ children: jsxs(PageReviewContainer, {
10878
+ colSpan: 3,
10879
+ children: [jsxs(ReviewHeader, {
10880
+ children: [jsx(ReviewLabel, {
10881
+ children: fieldLabel
10882
+ }), stepId !== undefined && !((_uischema$options = uischema.options) != null && (_uischema$options = _uischema$options.componentProps) != null && _uischema$options.readOnly) && jsx(GoabButton, {
10883
+ type: "tertiary",
10884
+ size: "compact",
10885
+ onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
10886
+ testId: `${fieldName}-change-btn`,
10887
+ children: "Change"
10888
+ })]
10889
+ }), jsxs(ReviewValue, {
10890
+ children: [jsx("div", {
10891
+ "data-testid": testId,
10892
+ children: value != null ? value : ''
10893
+ }), requiredFields.includes(fieldName) && isMissing(value) && jsx(GoabFormItem, {
10894
+ error: `${fieldLabel} is required`,
10895
+ label: ""
10896
+ })]
10894
10897
  })]
10895
- })]
10896
- })
10897
- }, testId);
10898
+ })
10899
+ }, testId);
10900
+ };
10898
10901
  return jsxs(Fragment, {
10899
10902
  children: [renderRow('First name', data == null ? void 0 : data.firstName, 'firstName', `firstName-control-${id}`), (data == null ? void 0 : data.middleName) && renderRow('Middle name', data == null ? void 0 : data.middleName, 'middleName', `middleName-control-${id}`), renderRow('Last name', data == null ? void 0 : data.lastName, 'lastName', `lastName-control-${id}`)]
10900
10903
  });
@@ -10915,30 +10918,33 @@ const FullNameDobReviewControl = props => {
10915
10918
  const stepId = uischema == null || (_uischema$options = uischema.options) == null ? void 0 : _uischema$options.stepId;
10916
10919
  const requiredFields = (_props$schema$require = (_props$schema = props.schema) == null ? void 0 : _props$schema.required) != null ? _props$schema$require : [];
10917
10920
  const isMissing = value => isNilOrEmptyString(value);
10918
- const renderRow = (fieldLabel, value, fieldName, testId) => jsx("tr", {
10919
- children: jsxs(PageReviewContainer, {
10920
- colSpan: 3,
10921
- children: [jsxs(ReviewHeader, {
10922
- children: [jsx(ReviewLabel, {
10923
- children: fieldLabel
10924
- }), stepId !== undefined && jsx(GoabButton, {
10925
- type: "tertiary",
10926
- size: "compact",
10927
- onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
10928
- testId: `${fieldName}-change-btn`,
10929
- children: "Change"
10930
- })]
10931
- }), jsxs(ReviewValue, {
10932
- children: [jsx("div", {
10933
- "data-testid": testId,
10934
- children: value != null ? value : ''
10935
- }), requiredFields.includes(fieldName) && isMissing(value) && jsx(GoabFormItem, {
10936
- error: `${fieldLabel} is required`,
10937
- label: ""
10921
+ const renderRow = (fieldLabel, value, fieldName, testId) => {
10922
+ var _uischema$options2;
10923
+ return jsx("tr", {
10924
+ children: jsxs(PageReviewContainer, {
10925
+ colSpan: 3,
10926
+ children: [jsxs(ReviewHeader, {
10927
+ children: [jsx(ReviewLabel, {
10928
+ children: fieldLabel
10929
+ }), stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(GoabButton, {
10930
+ type: "tertiary",
10931
+ size: "compact",
10932
+ onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
10933
+ testId: `${fieldName}-change-btn`,
10934
+ children: "Change"
10935
+ })]
10936
+ }), jsxs(ReviewValue, {
10937
+ children: [jsx("div", {
10938
+ "data-testid": testId,
10939
+ children: value != null ? value : ''
10940
+ }), requiredFields.includes(fieldName) && isMissing(value) && jsx(GoabFormItem, {
10941
+ error: `${fieldLabel} is required`,
10942
+ label: ""
10943
+ })]
10938
10944
  })]
10939
- })]
10940
- })
10941
- }, testId);
10945
+ })
10946
+ }, testId);
10947
+ };
10942
10948
  return jsxs(Fragment, {
10943
10949
  children: [renderRow('First name', data == null ? void 0 : data.firstName, 'firstName', `firstName-control-${id}`), (data == null ? void 0 : data.middleName) && renderRow('Middle name', data == null ? void 0 : data.middleName, 'middleName', `middleName-control-${id}`), renderRow('Last name', data == null ? void 0 : data.lastName, 'lastName', `lastName-control-${id}`), renderRow('Date of birth', data == null ? void 0 : data.dateOfBirth, 'dateOfBirth', `dob-control-${id}`)]
10944
10950
  });
@@ -11297,30 +11303,33 @@ const ContractInfoControlReview = props => {
11297
11303
  } = props;
11298
11304
  const requiredFields = (_schema$required = schema == null ? void 0 : schema.required) != null ? _schema$required : [];
11299
11305
  const isMissing = value => value === undefined || value === null || value === '';
11300
- const renderRow = (fieldLabel, value, fieldName, testId) => jsx("tr", {
11301
- children: jsxs(PageReviewContainer, {
11302
- colSpan: 3,
11303
- children: [jsxs(ReviewHeader, {
11304
- children: [jsx(ReviewLabel, {
11305
- children: fieldLabel
11306
- }), stepId !== undefined && jsx(GoabButton, {
11307
- type: "tertiary",
11308
- size: "compact",
11309
- onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
11310
- testId: `${fieldName}-change-btn`,
11311
- children: "Change"
11312
- })]
11313
- }), jsxs(ReviewValue, {
11314
- children: [jsx("div", {
11315
- "data-testid": testId,
11316
- children: value != null ? value : ''
11317
- }), requiredFields.includes(fieldName) && isMissing(value) && jsx(GoabFormItem, {
11318
- error: `${fieldLabel} is required`,
11319
- label: ""
11306
+ const renderRow = (fieldLabel, value, fieldName, testId) => {
11307
+ var _uischema$options;
11308
+ return jsx("tr", {
11309
+ children: jsxs(PageReviewContainer, {
11310
+ colSpan: 3,
11311
+ children: [jsxs(ReviewHeader, {
11312
+ children: [jsx(ReviewLabel, {
11313
+ children: fieldLabel
11314
+ }), stepId !== undefined && !((_uischema$options = uischema.options) != null && (_uischema$options = _uischema$options.componentProps) != null && _uischema$options.readOnly) && jsx(GoabButton, {
11315
+ type: "tertiary",
11316
+ size: "compact",
11317
+ onClick: () => context == null ? void 0 : context.goToPage(stepId, uischema.scope),
11318
+ testId: `${fieldName}-change-btn`,
11319
+ children: "Change"
11320
+ })]
11321
+ }), jsxs(ReviewValue, {
11322
+ children: [jsx("div", {
11323
+ "data-testid": testId,
11324
+ children: value != null ? value : ''
11325
+ }), requiredFields.includes(fieldName) && isMissing(value) && jsx(GoabFormItem, {
11326
+ error: `${fieldLabel} is required`,
11327
+ label: ""
11328
+ })]
11320
11329
  })]
11321
- })]
11322
- })
11323
- }, testId);
11330
+ })
11331
+ }, testId);
11332
+ };
11324
11333
  const {
11325
11334
  options
11326
11335
  } = uischema;
@@ -12636,7 +12645,7 @@ const AddressLookUpControlReview = props => {
12636
12645
  });
12637
12646
  };
12638
12647
  const AddressLoopUpControlTableReview = props => {
12639
- var _uischema$options, _schema$properties2, _provinces$find;
12648
+ var _uischema$options, _schema$properties2, _provinces$find, _uischema$options3;
12640
12649
  const {
12641
12650
  data,
12642
12651
  schema,
@@ -12741,6 +12750,7 @@ const AddressLoopUpControlTableReview = props => {
12741
12750
  // Build the target scope for the address control
12742
12751
  const targetScope = (uischema == null ? void 0 : uischema.scope) || (path ? `#/properties/${path}` : undefined);
12743
12752
  const renderRow = (label, value, propName, showButton = false) => {
12753
+ var _uischema$options2;
12744
12754
  let error = getError(propName);
12745
12755
  const required = isRequired(propName);
12746
12756
  if (required && !value && !error) {
@@ -12755,7 +12765,7 @@ const AddressLoopUpControlTableReview = props => {
12755
12765
  children: [label, required && jsx(RequiredTextLabel, {
12756
12766
  children: " (required)"
12757
12767
  })]
12758
- }), showButton && stepId !== undefined && jsx(GoabButton, {
12768
+ }), showButton && stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(GoabButton, {
12759
12769
  type: "tertiary",
12760
12770
  size: "compact",
12761
12771
  onClick: () => formStepperCtx == null ? void 0 : formStepperCtx.goToPage(stepId, targetScope),
@@ -12779,7 +12789,7 @@ const AddressLoopUpControlTableReview = props => {
12779
12789
  children: jsxs(ReviewHeader, {
12780
12790
  children: [jsx(ReviewLabel, {
12781
12791
  children: `${isAlbertaAddress ? 'Alberta' : 'Canada'} postal address`
12782
- }), stepId !== undefined && jsx(GoabButton, {
12792
+ }), stepId !== undefined && !((_uischema$options3 = uischema.options) != null && (_uischema$options3 = _uischema$options3.componentProps) != null && _uischema$options3.readOnly) && jsx(GoabButton, {
12783
12793
  type: "tertiary",
12784
12794
  size: "compact",
12785
12795
  onClick: () => formStepperCtx == null ? void 0 : formStepperCtx.goToPage(stepId, targetScope),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.60.2",
3
+ "version": "2.60.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-04-15T21:58:29.714Z",
4
- "sourceCommit": "437fc5583187822f070dbda79b67b20daa47557d",
3
+ "generatedAt": "2026-04-15T22:47:55.536Z",
4
+ "sourceCommit": "c6ed1617cb77a6af93af89e0c715feb74b3dbf12",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 33,
7
7
  "renderers": [