@abgov/jsonforms-components 2.78.3 → 2.79.0

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
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import React, { useRef, useEffect, useContext, useReducer, useMemo, createContext, useCallback, useState, useLayoutEffect } from 'react';
3
3
  import Ajv from 'ajv';
4
- import styled from 'styled-components';
4
+ import styled, { css } from 'styled-components';
5
5
  import axios from 'axios';
6
6
  import get$1 from 'lodash/get';
7
7
  import { toDataPath, INIT, UPDATE_CORE, isEnabled, isVisible, deriveLabelForUISchemaElement, rankWith, isStringControl, and, optionIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, uiTypeIs, isControl as isControl$1, isEnumControl, or, isOneOfEnumControl, isBooleanControl, createDefaultValue, Paths, Resolve, schemaTypeIs, formatIs, getAjv, schemaMatches, isObjectArrayControl, isPrimitiveArrayControl, composePaths, hasType, isCategorization, isLayout } from '@jsonforms/core';
@@ -6050,14 +6050,14 @@ const ensureGoaDatePointerCursor = host => {
6050
6050
 
6051
6051
  let _$b = t => t,
6052
6052
  _t$c,
6053
- _t2$6;
6053
+ _t2$7;
6054
6054
  styled.div(_t$c || (_t$c = _$b`
6055
6055
  height: 70vh;
6056
6056
  overflow-y: auto;
6057
6057
  padding-left: var(--goa-space-2xs);
6058
6058
  padding-right: var(--goa-space-2xs);
6059
6059
  `));
6060
- const Visible = styled.div(_t2$6 || (_t2$6 = _$b`
6060
+ const Visible = styled.div(_t2$7 || (_t2$7 = _$b`
6061
6061
  display: ${0};
6062
6062
  width: 100%;
6063
6063
  `), p => p.$visible !== false ? 'block' : 'none');
@@ -7549,7 +7549,7 @@ const useRegisterUser = () => {
7549
7549
 
7550
7550
  let _$a = t => t,
7551
7551
  _t$b,
7552
- _t2$5,
7552
+ _t2$6,
7553
7553
  _t3$4,
7554
7554
  _t4$4,
7555
7555
  _t5$3,
@@ -7565,7 +7565,7 @@ let _$a = t => t,
7565
7565
  const FormFieldWrapper$1 = styled.div(_t$b || (_t$b = _$a`
7566
7566
  margin-bottom: var(--goa-space-l);
7567
7567
  `));
7568
- const WarningIconDiv = styled.div(_t2$5 || (_t2$5 = _$a`
7568
+ const WarningIconDiv = styled.div(_t2$6 || (_t2$6 = _$a`
7569
7569
  display: flex;
7570
7570
  align-items: flex-start;
7571
7571
  gap: var(--goa-space-2xs);
@@ -8779,9 +8779,15 @@ const stepperReducer = (state, action) => {
8779
8779
  } = action.payload;
8780
8780
  const newActive = id;
8781
8781
  const isOnReview = newActive === lastId + 1;
8782
+ // A scope means the user came from a review Change button or a host's deep link, i.e. back to
8783
+ // fix an answer. The form may have just mounted — a summary on a separate page — so nothing
8784
+ // else has marked the step, and without this an emptied required field would stay quiet.
8785
+ const newCategories = targetScope ? categories.map(c => c.id === id && c.isNavigatedAway !== true ? Object.assign({}, c, {
8786
+ isNavigatedAway: true
8787
+ }) : c) : categories;
8782
8788
  return Object.assign({}, state, {
8783
8789
  activeId: newActive,
8784
- categories: categories,
8790
+ categories: newCategories,
8785
8791
  isOnReview,
8786
8792
  hasNextButton: !isOnReview,
8787
8793
  hasPrevButton: newActive !== 0,
@@ -12465,7 +12471,7 @@ $$6({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
12465
12471
 
12466
12472
  let _$8 = t => t,
12467
12473
  _t$9,
12468
- _t2$4,
12474
+ _t2$5,
12469
12475
  _t3$3,
12470
12476
  _t4$3,
12471
12477
  _t5$2,
@@ -12499,7 +12505,7 @@ let _$8 = t => t,
12499
12505
  const DeleteDialogContent = styled.div(_t$9 || (_t$9 = _$8`
12500
12506
  margin-bottom: var(--goa-space-m);
12501
12507
  `));
12502
- const MarginTop = styled.div(_t2$4 || (_t2$4 = _$8`
12508
+ const MarginTop = styled.div(_t2$5 || (_t2$5 = _$8`
12503
12509
  margin-top: var(--goa-space-l);
12504
12510
  `));
12505
12511
  const NonEmptyCellStyle = styled.div(_t3$3 || (_t3$3 = _$8`
@@ -13935,6 +13941,71 @@ const useReviewChange = () => {
13935
13941
  }, [stepperContext, reviewContext]);
13936
13942
  };
13937
13943
 
13944
+ let _$7 = t => t,
13945
+ _t$8,
13946
+ _t2$4;
13947
+ const StyledBackButton = styled.button(_t$8 || (_t$8 = _$7`
13948
+ align-items: center;
13949
+ background: none;
13950
+ border: 0;
13951
+ color: var(--goa-color-interactive-default, #0070c4);
13952
+ cursor: pointer;
13953
+ display: inline-flex;
13954
+ font: inherit;
13955
+ margin: 0;
13956
+ padding: 0;
13957
+ text-decoration: underline;
13958
+ text-decoration-color: currentColor;
13959
+ text-underline-offset: 2px;
13960
+
13961
+ &:hover,
13962
+ &:visited {
13963
+ color: #004f84;
13964
+ }
13965
+
13966
+ &:focus {
13967
+ outline: 2px solid var(--goa-color-interactive-default, #0070c4);
13968
+ outline-offset: 2px;
13969
+ }
13970
+
13971
+ ${0}
13972
+ `), ({
13973
+ $showBackIcon
13974
+ }) => $showBackIcon && css(_t2$4 || (_t2$4 = _$7`
13975
+ margin-top: var(--goa-space-m);
13976
+ margin-bottom: var(--goa-space-m);
13977
+
13978
+ &::before {
13979
+ content: '';
13980
+ display: inline-block;
13981
+ width: 42px;
13982
+ height: 24px;
13983
+ vertical-align: middle;
13984
+ background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 22 22" fill="none" stroke="%230070C4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>')
13985
+ center center no-repeat;
13986
+ }
13987
+
13988
+ &:hover::before,
13989
+ &:visited::before {
13990
+ background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 22 22" fill="none" stroke="%23004f84" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>')
13991
+ center center no-repeat;
13992
+ }
13993
+ `)));
13994
+ const BackButton = ({
13995
+ text,
13996
+ testId,
13997
+ link,
13998
+ showBackIcon: _showBackIcon = true
13999
+ }) => {
14000
+ return jsx(StyledBackButton, {
14001
+ type: "button",
14002
+ "$showBackIcon": _showBackIcon,
14003
+ "data-testid": testId || 'back-button-click',
14004
+ onClick: link,
14005
+ children: text
14006
+ });
14007
+ };
14008
+
13938
14009
  const GoAInputBaseTableReview = props => {
13939
14010
  var _uischema$options, _uischema$scope2, _jsonForms$core, _uischema$options4, _uischema$options5, _uischema$options6;
13940
14011
  const {
@@ -14135,11 +14206,10 @@ const GoAInputBaseTableReview = props => {
14135
14206
  children: [labelToUpdate, required && jsx(RequiredTextLabel, {
14136
14207
  children: " (required)"
14137
14208
  })]
14138
- }), showChangeButtons && stepId !== undefined && !((_uischema$options6 = uischema.options) != null && (_uischema$options6 = _uischema$options6.componentProps) != null && _uischema$options6.readOnly) && jsx(GoabButton, {
14139
- type: "text",
14140
- size: "compact",
14141
- onClick: handleChangeClick,
14142
- children: "Change"
14209
+ }), showChangeButtons && stepId !== undefined && !((_uischema$options6 = uischema.options) != null && (_uischema$options6 = _uischema$options6.componentProps) != null && _uischema$options6.readOnly) && jsx(BackButton, {
14210
+ text: "Change",
14211
+ link: handleChangeClick,
14212
+ showBackIcon: false
14143
14213
  })]
14144
14214
  }), jsxs(ReviewValue, {
14145
14215
  children: [showInlineValue ? jsx("div", {
@@ -14270,8 +14340,8 @@ const GoAEmailControl = props => jsx(GoAEmailInput, Object.assign({}, props));
14270
14340
  const GoAEmailControlTester = rankWith(4, and(isControl$1, schemaTypeIs('string'), formatIs('email')));
14271
14341
  const GoAInputEmailControl = withJsonFormsControlProps(GoAEmailControl);
14272
14342
 
14273
- let _$7 = t => t,
14274
- _t$8;
14343
+ let _$6 = t => t,
14344
+ _t$7;
14275
14345
  const renderLayoutElements = (elements, schema, path, enabled, renderers, cells) => {
14276
14346
  return elements.map((child, index) => jsx(JsonFormsDispatch, {
14277
14347
  uischema: child,
@@ -14350,14 +14420,14 @@ const ReviewLayoutRenderer = ({
14350
14420
  }
14351
14421
  }
14352
14422
  };
14353
- const ReviewGrid = styled.div(_t$8 || (_t$8 = _$7`
14423
+ const ReviewGrid = styled.div(_t$7 || (_t$7 = _$6`
14354
14424
  display: grid;
14355
14425
  grid-template-columns: repeat(auto-fit, minmax(250px, calc(50% - 8px)));
14356
14426
  gap: 16px;
14357
14427
  `));
14358
14428
 
14359
- let _$6 = t => t,
14360
- _t$7,
14429
+ let _$5 = t => t,
14430
+ _t$6,
14361
14431
  _t2$3,
14362
14432
  _t3$2,
14363
14433
  _t4$2,
@@ -14387,11 +14457,11 @@ let _$6 = t => t,
14387
14457
  _t26,
14388
14458
  _t27,
14389
14459
  _t28;
14390
- const ReviewItem = styled.div(_t$7 || (_t$7 = _$6`
14460
+ const ReviewItem = styled.div(_t$6 || (_t$6 = _$5`
14391
14461
  display: flex;
14392
14462
  flex-direction: column;
14393
14463
  `));
14394
- const CompletionStatus = styled.div(_t2$3 || (_t2$3 = _$6`
14464
+ const CompletionStatus = styled.div(_t2$3 || (_t2$3 = _$5`
14395
14465
  padding: 0;
14396
14466
  margin: 0;
14397
14467
  padding-top: var(--goa-space-xl);
@@ -14399,14 +14469,14 @@ const CompletionStatus = styled.div(_t2$3 || (_t2$3 = _$6`
14399
14469
  display: flex;
14400
14470
  flex-direction: column;
14401
14471
  `));
14402
- const BarTop = styled.div(_t3$2 || (_t3$2 = _$6`
14472
+ const BarTop = styled.div(_t3$2 || (_t3$2 = _$5`
14403
14473
  display: flex;
14404
14474
 
14405
14475
  .progress-text {
14406
14476
  margin-left: auto;
14407
14477
  }
14408
14478
  `));
14409
- const Bar = styled.div(_t4$2 || (_t4$2 = _$6`
14479
+ const Bar = styled.div(_t4$2 || (_t4$2 = _$5`
14410
14480
  display: flex;
14411
14481
  flex-direction: row;
14412
14482
 
@@ -14436,15 +14506,15 @@ const Bar = styled.div(_t4$2 || (_t4$2 = _$6`
14436
14506
  box-sizing: border-box;
14437
14507
  }
14438
14508
  `));
14439
- styled.div(_t5$1 || (_t5$1 = _$6``));
14440
- const BadgeWrapper = styled.div(_t6$1 || (_t6$1 = _$6`
14509
+ styled.div(_t5$1 || (_t5$1 = _$5``));
14510
+ const BadgeWrapper = styled.div(_t6$1 || (_t6$1 = _$5`
14441
14511
  margin-left: 10px;
14442
14512
  margin-top: 7px;
14443
14513
  `));
14444
- const CompletionTextHeader = styled.h3(_t7 || (_t7 = _$6`
14514
+ const CompletionTextHeader = styled.h3(_t7 || (_t7 = _$5`
14445
14515
  display: flex;
14446
14516
  `));
14447
- const ReviewItemSection = styled.div(_t8 || (_t8 = _$6`
14517
+ const ReviewItemSection = styled.div(_t8 || (_t8 = _$5`
14448
14518
  margin-bottom: var(--goa-space-m);
14449
14519
  padding: var(--goa-space-xl) var(--goa-space-2xl);
14450
14520
  border: 1px solid var(--goa-color-greyscale-300);
@@ -14454,18 +14524,18 @@ const ReviewItemSection = styled.div(_t8 || (_t8 = _$6`
14454
14524
  max-width: 1600px;
14455
14525
  }
14456
14526
  `));
14457
- const ReviewItemHeader = styled.div(_t9 || (_t9 = _$6`
14527
+ const ReviewItemHeader = styled.div(_t9 || (_t9 = _$5`
14458
14528
  display: flex;
14459
14529
  align-items: center;
14460
14530
  justify-content: space-between;
14461
14531
  margin-bottom: var(--goa-space-xl);
14462
14532
  `));
14463
- const ReviewItemTitle = styled.div(_t0 || (_t0 = _$6`
14533
+ const ReviewItemTitle = styled.div(_t0 || (_t0 = _$5`
14464
14534
  font-size: var(--goa-space-l);
14465
14535
  line-height: var(--goa-space-xl);
14466
14536
  font-weight: 300;
14467
14537
  `));
14468
- styled.div(_t1 || (_t1 = _$6`
14538
+ styled.div(_t1 || (_t1 = _$5`
14469
14539
  color: #0070c4;
14470
14540
  text-decoration: underline;
14471
14541
  outline: none;
@@ -14476,20 +14546,20 @@ styled.div(_t1 || (_t1 = _$6`
14476
14546
  background-color: #e6f7ff;
14477
14547
  }
14478
14548
  `));
14479
- styled.div(_t10 || (_t10 = _$6`
14549
+ styled.div(_t10 || (_t10 = _$5`
14480
14550
  margin-left: var(--goa-space-m);
14481
14551
  `));
14482
- styled.div(_t11 || (_t11 = _$6`
14552
+ styled.div(_t11 || (_t11 = _$5`
14483
14553
  margin-bottom: var(--goa-space-m);
14484
14554
  `));
14485
- styled.div(_t12 || (_t12 = _$6`
14555
+ styled.div(_t12 || (_t12 = _$5`
14486
14556
  margin: var(--goa-space-s);
14487
14557
  width: 100%;
14488
14558
  `));
14489
- styled.h3(_t13 || (_t13 = _$6`
14559
+ styled.h3(_t13 || (_t13 = _$5`
14490
14560
  text-transform: capitalize;
14491
14561
  `));
14492
- const RightAlignmentDiv = styled.div(_t14 || (_t14 = _$6`
14562
+ const RightAlignmentDiv = styled.div(_t14 || (_t14 = _$5`
14493
14563
  @media screen and (max-width: 767px) {
14494
14564
  margin-bottom: var(--goa-space-l);
14495
14565
  }
@@ -14499,50 +14569,50 @@ const RightAlignmentDiv = styled.div(_t14 || (_t14 = _$6`
14499
14569
  margin-bottom: var(--goa-space-l);
14500
14570
  }
14501
14571
  `));
14502
- const FormStepperSummaryH3 = styled.h3(_t15 || (_t15 = _$6`
14572
+ const FormStepperSummaryH3 = styled.h3(_t15 || (_t15 = _$5`
14503
14573
  flex: 1;
14504
14574
  margin-bottom: var(--goa-space-m);
14505
14575
  font-size: var(--goa-font-size-7);
14506
14576
  line-height: var(--goa-line-height-4);
14507
14577
  font-weight: var(--goa-font-weight-regular);
14508
14578
  `));
14509
- const PageRenderPadding = styled.div(_t16 || (_t16 = _$6`
14579
+ const PageRenderPadding = styled.div(_t16 || (_t16 = _$5`
14510
14580
  margin-top: var(--goa-space-2xl);
14511
14581
  `));
14512
- styled.div(_t17 || (_t17 = _$6`
14582
+ styled.div(_t17 || (_t17 = _$5`
14513
14583
  margin-bottom: var(--goa-space-2xl);
14514
14584
  `));
14515
- const PageBorder = styled.div(_t18 || (_t18 = _$6`
14585
+ const PageBorder = styled.div(_t18 || (_t18 = _$5`
14516
14586
  padding: var(--goa-space-m) var(--goa-space-3xl);
14517
14587
  `));
14518
- styled.div(_t19 || (_t19 = _$6`
14588
+ styled.div(_t19 || (_t19 = _$5`
14519
14589
  .element-style {
14520
14590
  max-width: 1600px;
14521
14591
  }
14522
14592
  `));
14523
- styled.div(_t20 || (_t20 = _$6`
14593
+ styled.div(_t20 || (_t20 = _$5`
14524
14594
  padding: var(--goa-space-xl) var(--goa-space-2xl);
14525
14595
  border: 1px solid var(--goa-color-greyscale-300);
14526
14596
  border-radius: var(--goa-border-radius-xl);
14527
14597
  `));
14528
- styled.div(_t21 || (_t21 = _$6`
14598
+ styled.div(_t21 || (_t21 = _$5`
14529
14599
  margin-top: var(--goa-space-xl);
14530
14600
  display: flex;
14531
14601
  justify-content: space-between;
14532
14602
  `));
14533
- styled.h3(_t22 || (_t22 = _$6`
14603
+ styled.h3(_t22 || (_t22 = _$5`
14534
14604
  color: var(--goa-color-text-secondary) !important;
14535
14605
  margin-bottom: var(--goa-space-l);
14536
14606
  `));
14537
- const CategoryStatus = styled.td(_t23 || (_t23 = _$6`
14607
+ const CategoryStatus = styled.td(_t23 || (_t23 = _$5`
14538
14608
  width: var(--goa-space-xl);
14539
14609
  padding-right: var(--goa-space-xl);
14540
14610
  align-content: center;
14541
14611
  `));
14542
- const Center = styled.div(_t24 || (_t24 = _$6`
14612
+ const Center = styled.div(_t24 || (_t24 = _$5`
14543
14613
  padding-top: 5px;
14544
14614
  `));
14545
- const PageStepperRow = styled.tr(_t25 || (_t25 = _$6`
14615
+ const PageStepperRow = styled.tr(_t25 || (_t25 = _$5`
14546
14616
  ${0}
14547
14617
  `), ({
14548
14618
  disabled
@@ -14567,7 +14637,7 @@ const PageStepperRow = styled.tr(_t25 || (_t25 = _$6`
14567
14637
  outline: 3px solid var(--goa-color-interactive-focus);
14568
14638
  }
14569
14639
  `);
14570
- const SectionHeaderRowTr = styled.tr(_t26 || (_t26 = _$6`
14640
+ const SectionHeaderRowTr = styled.tr(_t26 || (_t26 = _$5`
14571
14641
  & > td {
14572
14642
  border: 0 !important;
14573
14643
  padding-top: var(--goa-space-l);
@@ -14579,7 +14649,7 @@ const SectionHeaderRowTr = styled.tr(_t26 || (_t26 = _$6`
14579
14649
  border-top: none !important;
14580
14650
  }
14581
14651
  `));
14582
- const SummaryRowLink = styled.a(_t27 || (_t27 = _$6`
14652
+ const SummaryRowLink = styled.a(_t27 || (_t27 = _$5`
14583
14653
  position: relative;
14584
14654
  top: var(--goa-space-xs);
14585
14655
  &:focus-visible {
@@ -14588,7 +14658,7 @@ const SummaryRowLink = styled.a(_t27 || (_t27 = _$6`
14588
14658
  }
14589
14659
  padding: 0 var(--goa-space-s) var(--goa-space-xs); var(--goa-space-s);
14590
14660
  `));
14591
- const SummaryTd = styled.td(_t28 || (_t28 = _$6`
14661
+ const SummaryTd = styled.td(_t28 || (_t28 = _$5`
14592
14662
  border: 0 !important;
14593
14663
  padding: 0 !important;
14594
14664
  `));
@@ -14687,12 +14757,11 @@ const FullNameControlReview = props => {
14687
14757
  children: [fieldLabel, requiredFields.includes(fieldName) && jsx(RequiredTextLabel, {
14688
14758
  children: " (required)"
14689
14759
  })]
14690
- }), showChangeButtons && stepId !== undefined && !((_uischema$options = uischema.options) != null && (_uischema$options = _uischema$options.componentProps) != null && _uischema$options.readOnly) && jsx(GoabButton, {
14691
- type: "text",
14692
- size: "compact",
14693
- onClick: () => reportChange(stepId, uischema.scope),
14760
+ }), showChangeButtons && stepId !== undefined && !((_uischema$options = uischema.options) != null && (_uischema$options = _uischema$options.componentProps) != null && _uischema$options.readOnly) && jsx(BackButton, {
14761
+ text: "Change",
14762
+ link: () => reportChange(stepId, uischema.scope),
14694
14763
  testId: `${fieldName}-change-btn`,
14695
- children: "Change"
14764
+ showBackIcon: false
14696
14765
  })]
14697
14766
  }), jsxs(ReviewValue, {
14698
14767
  children: [jsx("div", {
@@ -14737,12 +14806,11 @@ const FullNameDobReviewControl = props => {
14737
14806
  children: [fieldLabel, requiredFields.includes(fieldName) && jsx(RequiredTextLabel, {
14738
14807
  children: " (required)"
14739
14808
  })]
14740
- }), showChangeButtons && stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(GoabButton, {
14741
- type: "text",
14742
- size: "compact",
14743
- onClick: () => reportChange(stepId, uischema.scope),
14809
+ }), showChangeButtons && stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(BackButton, {
14810
+ text: "Change",
14811
+ link: () => reportChange(stepId, uischema.scope),
14744
14812
  testId: `${fieldName}-change-btn`,
14745
- children: "Change"
14813
+ showBackIcon: false
14746
14814
  })]
14747
14815
  }), jsxs(ReviewValue, {
14748
14816
  children: [jsx("div", {
@@ -14893,14 +14961,14 @@ const GoAPhoneNumberControl = withJsonFormsControlProps(PhoneNumberControl);
14893
14961
 
14894
14962
  const PhoneNumberTester = rankWith(4, and(isControl$1, schemaTypeIs('string'), formatIs('phone')));
14895
14963
 
14896
- let _$5 = t => t,
14897
- _t$6,
14964
+ let _$4 = t => t,
14965
+ _t$5,
14898
14966
  _t2$2,
14899
14967
  _t3$1,
14900
14968
  _t4$1,
14901
14969
  _t5,
14902
14970
  _t6;
14903
- const SearchBox = styled.div(_t$6 || (_t$6 = _$5`
14971
+ const SearchBox = styled.div(_t$5 || (_t$5 = _$4`
14904
14972
  position: relative;
14905
14973
 
14906
14974
  .suggestions {
@@ -14942,7 +15010,7 @@ const SearchBox = styled.div(_t$6 || (_t$6 = _$5`
14942
15010
  pointer-events: none; /* Prevent spinner from interfering with clicks */
14943
15011
  }
14944
15012
  `));
14945
- const AddressIndent = styled.div(_t2$2 || (_t2$2 = _$5`
15013
+ const AddressIndent = styled.div(_t2$2 || (_t2$2 = _$4`
14946
15014
  margin: 0 0 var(--goa-space-m) 0;
14947
15015
  text-wrap: wrap;
14948
15016
  word-break: break-word;
@@ -14950,15 +15018,15 @@ const AddressIndent = styled.div(_t2$2 || (_t2$2 = _$5`
14950
15018
  border-radius: var(--goa-border-radius-xl);
14951
15019
  padding: var(--goa-space-l);
14952
15020
  `));
14953
- const TextWrap = styled.p(_t3$1 || (_t3$1 = _$5`
15021
+ const TextWrap = styled.p(_t3$1 || (_t3$1 = _$4`
14954
15022
  text-wrap: auto;
14955
15023
  word-break: break-word;
14956
15024
  `));
14957
- const TextWrapDiv = styled.div(_t4$1 || (_t4$1 = _$5`
15025
+ const TextWrapDiv = styled.div(_t4$1 || (_t4$1 = _$4`
14958
15026
  text-wrap: auto;
14959
15027
  word-break: break-word;
14960
15028
  `));
14961
- const LabelDiv = styled.div(_t5 || (_t5 = _$5`
15029
+ const LabelDiv = styled.div(_t5 || (_t5 = _$4`
14962
15030
  color: var(--goa-color-text-default);
14963
15031
  font: var(--goa-typography-body-m);
14964
15032
  min-height: 2.625rem;
@@ -14968,7 +15036,7 @@ const LabelDiv = styled.div(_t5 || (_t5 = _$5`
14968
15036
  word-break: break-word;
14969
15037
  `));
14970
15038
  /* istanbul ignore next */
14971
- const ListItem = styled.li(_t6 || (_t6 = _$5`
15039
+ const ListItem = styled.li(_t6 || (_t6 = _$4`
14972
15040
  background-color: ${0};
14973
15041
  color: ${0};
14974
15042
  font-weight: ${0};
@@ -15005,9 +15073,9 @@ const PhoneNumberReviewControl = props => {
15005
15073
  };
15006
15074
  const GoabInputBasePhoneNumberReviewControl = withJsonFormsAllOfProps(PhoneNumberReviewControl);
15007
15075
 
15008
- let _$4 = t => t,
15009
- _t$5;
15010
- const PhoneGrid = styled.div(_t$5 || (_t$5 = _$4`
15076
+ let _$3 = t => t,
15077
+ _t$4;
15078
+ const PhoneGrid = styled.div(_t$4 || (_t$4 = _$3`
15011
15079
  display: grid;
15012
15080
  grid-template-columns: 1fr 2fr;
15013
15081
  gap: 0.2rem;
@@ -15122,9 +15190,9 @@ const PhoneNumberWithTypeReviewControl = props => {
15122
15190
  };
15123
15191
  const GoabInputBasePhoneNumberWithTypeReviewControl = withJsonFormsAllOfProps(PhoneNumberWithTypeReviewControl);
15124
15192
 
15125
- let _$3 = t => t,
15126
- _t$4;
15127
- const FormFieldWrapper = styled.div(_t$4 || (_t$4 = _$3`
15193
+ let _$2 = t => t,
15194
+ _t$3;
15195
+ const FormFieldWrapper = styled.div(_t$3 || (_t$3 = _$2`
15128
15196
  margin-bottom: var(--goa-space-l);
15129
15197
  `));
15130
15198
 
@@ -15215,12 +15283,11 @@ const ContractInfoControlReview = props => {
15215
15283
  children: [jsxs(ReviewHeader, {
15216
15284
  children: [jsx(ReviewLabel, {
15217
15285
  children: fieldLabel
15218
- }), showChangeButtons && stepId !== undefined && !((_uischema$options = uischema.options) != null && (_uischema$options = _uischema$options.componentProps) != null && _uischema$options.readOnly) && jsx(GoabButton, {
15219
- type: "text",
15220
- size: "compact",
15221
- onClick: () => reportChange(stepId, uischema.scope),
15286
+ }), showChangeButtons && stepId !== undefined && !((_uischema$options = uischema.options) != null && (_uischema$options = _uischema$options.componentProps) != null && _uischema$options.readOnly) && jsx(BackButton, {
15287
+ text: "Change",
15288
+ link: () => reportChange(stepId, uischema.scope),
15222
15289
  testId: `${fieldName}-change-btn`,
15223
- children: "Change"
15290
+ showBackIcon: false
15224
15291
  })]
15225
15292
  }), jsxs(ReviewValue, {
15226
15293
  children: [jsx("div", {
@@ -16030,14 +16097,13 @@ const ObjectArrayControl = props => {
16030
16097
  },
16031
16098
  children: maxItemsError
16032
16099
  })]
16033
- }), showChangeButtons && ((_uischema$options7 = uischema.options) == null ? void 0 : _uischema$options7.stepId) !== undefined && !((_uischema$options8 = uischema.options) != null && (_uischema$options8 = _uischema$options8.componentProps) != null && _uischema$options8.readOnly) && jsx(GoabButton, {
16034
- type: "text",
16035
- size: "compact",
16036
- onClick: () => {
16100
+ }), showChangeButtons && ((_uischema$options7 = uischema.options) == null ? void 0 : _uischema$options7.stepId) !== undefined && !((_uischema$options8 = uischema.options) != null && (_uischema$options8 = _uischema$options8.componentProps) != null && _uischema$options8.readOnly) && jsx(BackButton, {
16101
+ text: "Change",
16102
+ link: () => {
16037
16103
  var _uischema$options9;
16038
16104
  return reportChange((_uischema$options9 = uischema.options) == null ? void 0 : _uischema$options9.stepId, uischema.scope);
16039
16105
  },
16040
- children: "Change"
16106
+ showBackIcon: false
16041
16107
  })]
16042
16108
  }) : null, jsx(ObjectArrayList, Object.assign({
16043
16109
  path: path,
@@ -16547,9 +16613,7 @@ const AddressLoopUpControlTableReview = props => {
16547
16613
  data,
16548
16614
  schema,
16549
16615
  uischema,
16550
- path,
16551
- label,
16552
- required
16616
+ path
16553
16617
  } = props;
16554
16618
  const jsonForms = useJsonForms();
16555
16619
  const stepId = (_uischema$options = uischema.options) == null ? void 0 : _uischema$options.stepId;
@@ -16647,6 +16711,9 @@ const AddressLoopUpControlTableReview = props => {
16647
16711
  };
16648
16712
  // Build the target scope for the address control
16649
16713
  const targetScope = (uischema == null ? void 0 : uischema.scope) || (path ? `#/properties/${path}` : undefined);
16714
+ const handleChangeClick = (changeStepId, scope) => {
16715
+ reportChange(changeStepId, scope);
16716
+ };
16650
16717
  const renderRow = (label, value, propName, showButton = false) => {
16651
16718
  var _uischema$options2;
16652
16719
  let error = getError(propName);
@@ -16663,12 +16730,11 @@ const AddressLoopUpControlTableReview = props => {
16663
16730
  children: [label, required && jsx(RequiredTextLabel, {
16664
16731
  children: " (required)"
16665
16732
  })]
16666
- }), showButton && showChangeButtons && stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(GoabButton, {
16667
- type: "text",
16668
- size: "compact",
16669
- onClick: () => reportChange(stepId, targetScope),
16733
+ }), showButton && showChangeButtons && stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(BackButton, {
16734
+ text: "Change",
16735
+ link: () => handleChangeClick(stepId, targetScope),
16670
16736
  testId: "address-change-btn",
16671
- children: "Change"
16737
+ showBackIcon: false
16672
16738
  })]
16673
16739
  }), jsxs(ReviewValue, {
16674
16740
  children: [!value ? jsx(NoneGivenText, {
@@ -16689,12 +16755,11 @@ const AddressLoopUpControlTableReview = props => {
16689
16755
  children: jsxs(ReviewHeader, {
16690
16756
  children: [jsx(ReviewLabel, {
16691
16757
  children: `${isAlbertaAddress ? 'Alberta' : 'Canada'} postal address`
16692
- }), showChangeButtons && stepId !== undefined && !((_uischema$options3 = uischema.options) != null && (_uischema$options3 = _uischema$options3.componentProps) != null && _uischema$options3.readOnly) && jsx(GoabButton, {
16693
- type: "text",
16694
- size: "compact",
16695
- onClick: () => reportChange(stepId, targetScope),
16758
+ }), showChangeButtons && stepId !== undefined && !((_uischema$options3 = uischema.options) != null && (_uischema$options3 = _uischema$options3.componentProps) != null && _uischema$options3.readOnly) && jsx(BackButton, {
16759
+ text: "Change",
16760
+ link: () => handleChangeClick(stepId, targetScope),
16696
16761
  testId: "address-change-btn",
16697
- children: "Change"
16762
+ showBackIcon: false
16698
16763
  })]
16699
16764
  })
16700
16765
  })
@@ -16858,10 +16923,10 @@ const GoAGroupReviewControlComponent = props => {
16858
16923
  const GoAGroupReviewLayoutTester = rankWith(1, uiTypeIs('Group'));
16859
16924
  const GoAGroupReviewControl = withJsonFormsLayoutProps(GoAGroupReviewControlComponent, true);
16860
16925
 
16861
- let _$2 = t => t,
16862
- _t$3,
16926
+ let _$1 = t => t,
16927
+ _t$2,
16863
16928
  _t2$1;
16864
- const HelpContentDiv = styled.div(_t$3 || (_t$3 = _$2`
16929
+ const HelpContentDiv = styled.div(_t$2 || (_t$2 = _$1`
16865
16930
  .parent-label {
16866
16931
  font-size: 24px;
16867
16932
  margin-bottom: var(--goa-space-m);
@@ -16949,12 +17014,12 @@ const HelpContentDiv = styled.div(_t$3 || (_t$3 = _$2`
16949
17014
  text-decoration: underline;
16950
17015
  }
16951
17016
  `));
16952
- const InvalidMarkdown = styled.div(_t2$1 || (_t2$1 = _$2`
17017
+ const InvalidMarkdown = styled.div(_t2$1 || (_t2$1 = _$1`
16953
17018
  color: var(--goa-color-interactive-error);
16954
17019
  `));
16955
17020
 
16956
- let _$1 = t => t,
16957
- _t$2;
17021
+ let _ = t => t,
17022
+ _t$1;
16958
17023
  const GoAContextMenuIcon = props => {
16959
17024
  return jsx(GoabIconButton, {
16960
17025
  icon: props.type,
@@ -16965,7 +17030,7 @@ const GoAContextMenuIcon = props => {
16965
17030
  disabled: props.disabled
16966
17031
  });
16967
17032
  };
16968
- const GoAContextMenu = styled.div(_t$2 || (_t$2 = _$1`
17033
+ const GoAContextMenu = styled.div(_t$1 || (_t$1 = _`
16969
17034
  display: flex;
16970
17035
  align-items: center;
16971
17036
  background-color: #fff;
@@ -18065,62 +18130,6 @@ const FormStepperPageReviewer = props => {
18065
18130
  };
18066
18131
  withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperPageReviewer)));
18067
18132
 
18068
- let _ = t => t,
18069
- _t$1;
18070
- const BackButtonWrapper = styled.span(_t$1 || (_t$1 = _`
18071
- .back-link::before {
18072
- content: '';
18073
- display: inline-block;
18074
- width: 42px;
18075
- height: 24px;
18076
- vertical-align: middle;
18077
- background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 22 22" fill="none" stroke="%230070C4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>')
18078
- center center no-repeat;
18079
- }
18080
-
18081
- .back-link:visited::before,
18082
- .back-link:hover::before {
18083
- background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 22 22" fill="none" stroke="%23004f84" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>')
18084
- center center no-repeat;
18085
- }
18086
-
18087
- .back-link {
18088
- margin-top: var(--goa-space-m);
18089
- color: var(--goa-color-interactive-default);
18090
- text-decoration: underline;
18091
- text-underline-offset: 2px;
18092
- text-decoration-color: currentColor;
18093
- display: inline-block;
18094
- }
18095
- display: inline-block;
18096
- color: var(--goa-color-interactive-default);
18097
- cursor: pointer;
18098
- margin-bottom: var(--goa-space-m);
18099
-
18100
- on .goa-icon {
18101
- display: inline-block !important;
18102
- position: relative;
18103
- top: 3px;
18104
- right: 2px;
18105
- color: var(--goa-color-interactive-default);
18106
- margin-left: 4px;
18107
- }
18108
- `));
18109
- const BackButton = ({
18110
- text,
18111
- testId,
18112
- link
18113
- }) => {
18114
- return jsx(BackButtonWrapper, {
18115
- "data-testid": "back-button-click",
18116
- onClick: link,
18117
- children: jsx("div", {
18118
- className: "back-link",
18119
- children: text
18120
- })
18121
- });
18122
- };
18123
-
18124
18133
  const RenderPages = props => {
18125
18134
  var _props$categoryProps$, _props$categoryProps$2, _props$categoryProps$3, _props$categoryProps$4, _props$categoryProps$5, _props$categoryProps$6, _props$categoryProps$7;
18126
18135
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.78.3",
3
+ "version": "2.79.0",
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-09-24T16:54:07.414Z",
4
- "sourceCommit": "6e29aac20db75925ddab749fa1d9ed84bba71548",
3
+ "generatedAt": "2026-09-28T19:31:18.430Z",
4
+ "sourceCommit": "0a1065be074a95a231cbb92837dab05bedd44bf2",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 23,
7
7
  "renderers": [
@@ -2,6 +2,7 @@ interface ExternalLinkProps {
2
2
  text: string;
3
3
  link: () => void;
4
4
  testId?: string;
5
+ showBackIcon?: boolean;
5
6
  }
6
- export declare const BackButton: ({ text, testId, link }: ExternalLinkProps) => JSX.Element;
7
+ export declare const BackButton: ({ text, testId, link, showBackIcon }: ExternalLinkProps) => JSX.Element;
7
8
  export {};