@abgov/jsonforms-components 2.21.2 → 2.21.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 +127 -74
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import axios from 'axios';
|
|
|
7
7
|
import get$1 from 'lodash/get';
|
|
8
8
|
import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, getAjv, isVisible, toDataPath, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, or, isObjectArrayControl, isPrimitiveArrayControl, Paths, schemaMatches, hasType, isControl, isCategorization, isLayout } from '@jsonforms/core';
|
|
9
9
|
import { withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, JsonFormsDispatch, useJsonForms, withJsonFormsLayoutProps, withJsonFormsArrayLayoutProps, withJsonFormsAllOfProps, withJsonFormsCellProps } from '@jsonforms/react';
|
|
10
|
-
import * as _$
|
|
10
|
+
import * as _$b from 'lodash';
|
|
11
11
|
import { isEqual, isEmpty as isEmpty$1, isObject as isObject$f } from 'lodash';
|
|
12
12
|
import merge from 'lodash/merge';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -3547,16 +3547,16 @@ const onChangeForNumericControl = props => {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
};
|
|
3549
3549
|
|
|
3550
|
-
let _$
|
|
3551
|
-
_t$
|
|
3550
|
+
let _$a = t => t,
|
|
3551
|
+
_t$a,
|
|
3552
3552
|
_t2$7;
|
|
3553
|
-
styled.div(_t$
|
|
3553
|
+
styled.div(_t$a || (_t$a = _$a`
|
|
3554
3554
|
height: 70vh;
|
|
3555
3555
|
overflow-y: auto;
|
|
3556
3556
|
padding-left: var(--goa-space-2xs);
|
|
3557
3557
|
padding-right: var(--goa-space-2xs);
|
|
3558
3558
|
`));
|
|
3559
|
-
const Visible = styled.div(_t2$7 || (_t2$7 = _$
|
|
3559
|
+
const Visible = styled.div(_t2$7 || (_t2$7 = _$a`
|
|
3560
3560
|
display: ${0};
|
|
3561
3561
|
`), p => p.visible ? 'initial' : 'none');
|
|
3562
3562
|
|
|
@@ -5188,8 +5188,8 @@ const JsonFormRegisterProvider = ({
|
|
|
5188
5188
|
});
|
|
5189
5189
|
};
|
|
5190
5190
|
|
|
5191
|
-
let _$
|
|
5192
|
-
_t$
|
|
5191
|
+
let _$9 = t => t,
|
|
5192
|
+
_t$9,
|
|
5193
5193
|
_t2$6,
|
|
5194
5194
|
_t3$5,
|
|
5195
5195
|
_t4$5,
|
|
@@ -5197,42 +5197,42 @@ let _$8 = t => t,
|
|
|
5197
5197
|
_t6$3,
|
|
5198
5198
|
_t7$2,
|
|
5199
5199
|
_t8$2;
|
|
5200
|
-
const FormFieldWrapper = styled.div(_t$
|
|
5200
|
+
const FormFieldWrapper = styled.div(_t$9 || (_t$9 = _$9`
|
|
5201
5201
|
margin-bottom: var(--goa-space-l);
|
|
5202
5202
|
`));
|
|
5203
|
-
const WarningIconDiv = styled.div(_t2$6 || (_t2$6 = _$
|
|
5203
|
+
const WarningIconDiv = styled.div(_t2$6 || (_t2$6 = _$9`
|
|
5204
5204
|
display: inline-flex;
|
|
5205
5205
|
align-items: flex-start;
|
|
5206
5206
|
gap: 0.25rem;
|
|
5207
5207
|
font-size: var(--goa-font-size-2);
|
|
5208
5208
|
color: var(--goa-color-interactive-error);
|
|
5209
5209
|
`));
|
|
5210
|
-
const RequiredTextLabel = styled.label(_t3$5 || (_t3$5 = _$
|
|
5210
|
+
const RequiredTextLabel = styled.label(_t3$5 || (_t3$5 = _$9`
|
|
5211
5211
|
color: var(--goa-color-greyscale-700);
|
|
5212
5212
|
font-weight: var(--goa-font-weight-regular);
|
|
5213
5213
|
font-size: var(--goa-font-size-2);
|
|
5214
5214
|
line-height: var(--goa-line-height-1);
|
|
5215
5215
|
font-style: normal;
|
|
5216
5216
|
`));
|
|
5217
|
-
const PageReviewNameCol = styled.td(_t4$5 || (_t4$5 = _$
|
|
5217
|
+
const PageReviewNameCol = styled.td(_t4$5 || (_t4$5 = _$9`
|
|
5218
5218
|
width: 5%;
|
|
5219
5219
|
padding-top: var(--goa-space-s);
|
|
5220
5220
|
padding-bottom: var(--goa-space-s);
|
|
5221
5221
|
padding-right: var(--goa-space-m);
|
|
5222
5222
|
`));
|
|
5223
|
-
const PageReviewValueCol = styled.td(_t5$4 || (_t5$4 = _$
|
|
5223
|
+
const PageReviewValueCol = styled.td(_t5$4 || (_t5$4 = _$9`
|
|
5224
5224
|
width: 20%;
|
|
5225
5225
|
text-align: left;
|
|
5226
5226
|
`));
|
|
5227
5227
|
//Check and unchecked are different heights otherwise
|
|
5228
|
-
const CheckboxWrapper = styled.div(_t6$3 || (_t6$3 = _$
|
|
5228
|
+
const CheckboxWrapper = styled.div(_t6$3 || (_t6$3 = _$9`
|
|
5229
5229
|
height: 28px;
|
|
5230
5230
|
`));
|
|
5231
|
-
styled.h4(_t7$2 || (_t7$2 = _$
|
|
5231
|
+
styled.h4(_t7$2 || (_t7$2 = _$9`
|
|
5232
5232
|
margin: 0 0 0.25rem 0;
|
|
5233
5233
|
fontsize: larger;
|
|
5234
5234
|
`));
|
|
5235
|
-
styled.h4(_t8$2 || (_t8$2 = _$
|
|
5235
|
+
styled.h4(_t8$2 || (_t8$2 = _$9`
|
|
5236
5236
|
border-bottom: 1px solid #ddd;
|
|
5237
5237
|
`));
|
|
5238
5238
|
|
|
@@ -5457,12 +5457,12 @@ const SPACE_KEY = ' ';
|
|
|
5457
5457
|
const ALT_KEY = 'Alt';
|
|
5458
5458
|
const SHIFT_KEY = 'Shift';
|
|
5459
5459
|
|
|
5460
|
-
let _$
|
|
5461
|
-
_t$
|
|
5460
|
+
let _$8 = t => t,
|
|
5461
|
+
_t$8,
|
|
5462
5462
|
_t2$5,
|
|
5463
5463
|
_t3$4,
|
|
5464
5464
|
_t4$4;
|
|
5465
|
-
const GoADropdownTextbox = styled.div(_t$
|
|
5465
|
+
const GoADropdownTextbox = styled.div(_t$8 || (_t$8 = _$8`
|
|
5466
5466
|
border-radius: var(--goa-space-2xs);
|
|
5467
5467
|
box-shadow: ${0};
|
|
5468
5468
|
&:hover {
|
|
@@ -5473,11 +5473,11 @@ const GoADropdownTextbox = styled.div(_t$7 || (_t$7 = _$7`
|
|
|
5473
5473
|
box-shadow: ${0};
|
|
5474
5474
|
}
|
|
5475
5475
|
`), p => p.isOpen ? `0 0 0 3px var(--goa-color-interactive-focus)` : '', p => p.isOpen ? `0 0 0 3px var(--goa-color-interactive-focus) !important` : '');
|
|
5476
|
-
const GoADropdownListContainerWrapper = styled.div(_t2$5 || (_t2$5 = _$
|
|
5476
|
+
const GoADropdownListContainerWrapper = styled.div(_t2$5 || (_t2$5 = _$8`
|
|
5477
5477
|
position: relative;
|
|
5478
5478
|
display: ${0};
|
|
5479
5479
|
`), p => !(p === null || p === void 0 ? void 0 : p.isOpen) && 'none');
|
|
5480
|
-
const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$
|
|
5480
|
+
const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$8`
|
|
5481
5481
|
border: solid 1px var(--goa-color-greyscale-200);
|
|
5482
5482
|
border-radius: var(--goa-space-2xs);
|
|
5483
5483
|
background: var(--goa-color-greyscale-white);
|
|
@@ -5501,7 +5501,7 @@ const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$7`
|
|
|
5501
5501
|
scrollbar-color: #a8a8a8 var(--goa-color-greyscale-100) !important;
|
|
5502
5502
|
}
|
|
5503
5503
|
`), p => p.optionListMaxHeight || '272px');
|
|
5504
|
-
const GoADropdownListOption = styled.div(_t4$4 || (_t4$4 = _$
|
|
5504
|
+
const GoADropdownListOption = styled.div(_t4$4 || (_t4$4 = _$8`
|
|
5505
5505
|
padding: var(--goa-space-2xs) var(--goa-space-s);
|
|
5506
5506
|
text-overflow: ellipsis;
|
|
5507
5507
|
color: ${0} !important;
|
|
@@ -6578,8 +6578,8 @@ const BooleanRadioControl = props => jsx(GoAInputBaseControl, Object.assign({},
|
|
|
6578
6578
|
const GoABooleanRadioControlTester = rankWith(3, and(isBooleanControl, optionIs('radio', true)));
|
|
6579
6579
|
const GoABooleanRadioControl = withJsonFormsControlProps(BooleanRadioControl);
|
|
6580
6580
|
|
|
6581
|
-
let _$
|
|
6582
|
-
_t$
|
|
6581
|
+
let _$7 = t => t,
|
|
6582
|
+
_t$7;
|
|
6583
6583
|
const Checkboxes = ({
|
|
6584
6584
|
children,
|
|
6585
6585
|
orientation,
|
|
@@ -6591,7 +6591,7 @@ const Checkboxes = ({
|
|
|
6591
6591
|
children: children
|
|
6592
6592
|
});
|
|
6593
6593
|
};
|
|
6594
|
-
const CheckBoxGroupDiv = styled.div(_t$
|
|
6594
|
+
const CheckBoxGroupDiv = styled.div(_t$7 || (_t$7 = _$7`
|
|
6595
6595
|
.horizontal {
|
|
6596
6596
|
display: flex;
|
|
6597
6597
|
flex-direction: row;
|
|
@@ -6799,8 +6799,8 @@ const GoAInputBaseTableReview = props => {
|
|
|
6799
6799
|
};
|
|
6800
6800
|
const GoAInputBaseTableReviewControl = withJsonFormsControlProps(GoAInputBaseTableReview);
|
|
6801
6801
|
|
|
6802
|
-
let _$
|
|
6803
|
-
_t$
|
|
6802
|
+
let _$6 = t => t,
|
|
6803
|
+
_t$6;
|
|
6804
6804
|
const renderLayoutElements = (elements, schema, path, enabled, renderers, cells) => {
|
|
6805
6805
|
return elements.map((child, index) => jsx(JsonFormsDispatch, {
|
|
6806
6806
|
uischema: child,
|
|
@@ -6879,14 +6879,14 @@ const ReviewLayoutRenderer = ({
|
|
|
6879
6879
|
}
|
|
6880
6880
|
}
|
|
6881
6881
|
};
|
|
6882
|
-
const ReviewGrid = styled.div(_t$
|
|
6882
|
+
const ReviewGrid = styled.div(_t$6 || (_t$6 = _$6`
|
|
6883
6883
|
display: grid;
|
|
6884
6884
|
grid-template-columns: repeat(auto-fit, minmax(250px, calc(50% - 8px)));
|
|
6885
6885
|
gap: 16px;
|
|
6886
6886
|
`));
|
|
6887
6887
|
|
|
6888
|
-
let _$
|
|
6889
|
-
_t$
|
|
6888
|
+
let _$5 = t => t,
|
|
6889
|
+
_t$5,
|
|
6890
6890
|
_t2$4,
|
|
6891
6891
|
_t3$3,
|
|
6892
6892
|
_t4$3,
|
|
@@ -6908,7 +6908,7 @@ let _$4 = t => t,
|
|
|
6908
6908
|
_t20$1,
|
|
6909
6909
|
_t21,
|
|
6910
6910
|
_t22;
|
|
6911
|
-
const ReviewItem = styled.div(_t$
|
|
6911
|
+
const ReviewItem = styled.div(_t$5 || (_t$5 = _$5`
|
|
6912
6912
|
display: flex;
|
|
6913
6913
|
flex-direction: column;
|
|
6914
6914
|
border: var(--goa-border-width-s) solid grey;
|
|
@@ -6919,7 +6919,7 @@ const ReviewItem = styled.div(_t$4 || (_t$4 = _$4`
|
|
|
6919
6919
|
display: none;
|
|
6920
6920
|
}
|
|
6921
6921
|
`));
|
|
6922
|
-
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$
|
|
6922
|
+
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$5`
|
|
6923
6923
|
background-color: #f1f1f1;
|
|
6924
6924
|
margin-bottom: var(--goa-space-m);
|
|
6925
6925
|
padding: var(--goa-space-m);
|
|
@@ -6930,18 +6930,18 @@ const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$4`
|
|
|
6930
6930
|
max-width: 1600px;
|
|
6931
6931
|
}
|
|
6932
6932
|
`));
|
|
6933
|
-
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$
|
|
6933
|
+
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$5`
|
|
6934
6934
|
display: flex;
|
|
6935
6935
|
align-items: center;
|
|
6936
6936
|
justify-content: space-between;
|
|
6937
6937
|
margin-bottom: var(--goa-space-xl);
|
|
6938
6938
|
`));
|
|
6939
|
-
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$
|
|
6939
|
+
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$5`
|
|
6940
6940
|
font-size: var(--goa-space-l);
|
|
6941
6941
|
line-height: var(--goa-space-xl);
|
|
6942
6942
|
font-weight: 300;
|
|
6943
6943
|
`));
|
|
6944
|
-
const Anchor = styled.div(_t5$3 || (_t5$3 = _$
|
|
6944
|
+
const Anchor = styled.div(_t5$3 || (_t5$3 = _$5`
|
|
6945
6945
|
color: #0070c4;
|
|
6946
6946
|
text-decoration: underline;
|
|
6947
6947
|
outline: none;
|
|
@@ -6952,20 +6952,20 @@ const Anchor = styled.div(_t5$3 || (_t5$3 = _$4`
|
|
|
6952
6952
|
background-color: #e6f7ff;
|
|
6953
6953
|
}
|
|
6954
6954
|
`));
|
|
6955
|
-
styled.div(_t6$2 || (_t6$2 = _$
|
|
6955
|
+
styled.div(_t6$2 || (_t6$2 = _$5`
|
|
6956
6956
|
margin-left: var(--goa-space-m);
|
|
6957
6957
|
`));
|
|
6958
|
-
styled.div(_t7$1 || (_t7$1 = _$
|
|
6958
|
+
styled.div(_t7$1 || (_t7$1 = _$5`
|
|
6959
6959
|
margin-bottom: var(--goa-space-m);
|
|
6960
6960
|
`));
|
|
6961
|
-
styled.div(_t8$1 || (_t8$1 = _$
|
|
6961
|
+
styled.div(_t8$1 || (_t8$1 = _$5`
|
|
6962
6962
|
margin: var(--goa-space-s);
|
|
6963
6963
|
width: 100%;
|
|
6964
6964
|
`));
|
|
6965
|
-
styled.h3(_t9$1 || (_t9$1 = _$
|
|
6965
|
+
styled.h3(_t9$1 || (_t9$1 = _$5`
|
|
6966
6966
|
text-transform: capitalize;
|
|
6967
6967
|
`));
|
|
6968
|
-
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$
|
|
6968
|
+
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$5`
|
|
6969
6969
|
@media screen and (max-width: 767px) {
|
|
6970
6970
|
margin-bottom: var(--goa-space-l);
|
|
6971
6971
|
}
|
|
@@ -6975,55 +6975,55 @@ const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$4`
|
|
|
6975
6975
|
margin-bottom: var(--goa-space-l);
|
|
6976
6976
|
}
|
|
6977
6977
|
`));
|
|
6978
|
-
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$
|
|
6978
|
+
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$5`
|
|
6979
6979
|
flex: 1;
|
|
6980
6980
|
margin-bottom: var(--goa-space-m);
|
|
6981
6981
|
font-size: var(--goa-font-size-7);
|
|
6982
6982
|
line-height: var(--goa-line-height-4);
|
|
6983
6983
|
font-weight: var(--goa-font-weight-regular);
|
|
6984
6984
|
`));
|
|
6985
|
-
const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$
|
|
6985
|
+
const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$5`
|
|
6986
6986
|
margin-top: var(--goa-space-2xl);
|
|
6987
6987
|
`));
|
|
6988
|
-
styled.div(_t13$1 || (_t13$1 = _$
|
|
6988
|
+
styled.div(_t13$1 || (_t13$1 = _$5`
|
|
6989
6989
|
margin-bottom: var(--goa-space-2xl);
|
|
6990
6990
|
`));
|
|
6991
|
-
const PageBorder = styled.h3(_t14$1 || (_t14$1 = _$
|
|
6991
|
+
const PageBorder = styled.h3(_t14$1 || (_t14$1 = _$5`
|
|
6992
6992
|
padding: var(--goa-space-3xl);
|
|
6993
6993
|
`));
|
|
6994
|
-
const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$
|
|
6994
|
+
const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$5`
|
|
6995
6995
|
.element-style {
|
|
6996
6996
|
max-width: 1600px;
|
|
6997
6997
|
}
|
|
6998
6998
|
`));
|
|
6999
|
-
const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$
|
|
6999
|
+
const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$5`
|
|
7000
7000
|
border: 1px solid #dcdcdc;
|
|
7001
7001
|
border-radius: 5px;
|
|
7002
7002
|
padding: var(--goa-space-2xl);
|
|
7003
7003
|
`));
|
|
7004
|
-
const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$
|
|
7004
|
+
const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$5`
|
|
7005
7005
|
margin-top: var(--goa-space-xl);
|
|
7006
7006
|
display: flex;
|
|
7007
7007
|
justify-content: space-between;
|
|
7008
7008
|
`));
|
|
7009
|
-
const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$
|
|
7009
|
+
const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$5`
|
|
7010
7010
|
color: var(--goa-color-text-secondary) !important;
|
|
7011
7011
|
margin-bottom: var(--goa-space-l);
|
|
7012
7012
|
`));
|
|
7013
|
-
const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$
|
|
7013
|
+
const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$5`
|
|
7014
7014
|
width: var(--goa-space-xl);
|
|
7015
7015
|
padding-right: var(--goa-space-xl);
|
|
7016
7016
|
`));
|
|
7017
|
-
const TocPageRef = styled.td(_t20$1 || (_t20$1 = _$
|
|
7017
|
+
const TocPageRef = styled.td(_t20$1 || (_t20$1 = _$5`
|
|
7018
7018
|
padding-left: var(--goa-space-xl);
|
|
7019
7019
|
`));
|
|
7020
|
-
const CompletionStatus = styled.div(_t21 || (_t21 = _$
|
|
7020
|
+
const CompletionStatus = styled.div(_t21 || (_t21 = _$5`
|
|
7021
7021
|
padding: 0;
|
|
7022
7022
|
margin: 0;
|
|
7023
7023
|
padding-left: var(--goa-space-xl);
|
|
7024
7024
|
padding-bottom: var(--goa-space-xl);
|
|
7025
7025
|
`));
|
|
7026
|
-
const PageStepperRow = styled.tr(_t22 || (_t22 = _$
|
|
7026
|
+
const PageStepperRow = styled.tr(_t22 || (_t22 = _$5`
|
|
7027
7027
|
${0}
|
|
7028
7028
|
`), ({
|
|
7029
7029
|
disabled
|
|
@@ -7403,7 +7403,7 @@ const pickPropertyValues = (obj, property, endWithType) => {
|
|
|
7403
7403
|
Object.entries(obj).forEach(function ([key, value]) {
|
|
7404
7404
|
if (key === property) {
|
|
7405
7405
|
values.push(value);
|
|
7406
|
-
} else if (_$
|
|
7406
|
+
} else if (_$b.isObject(value)) {
|
|
7407
7407
|
// if the object type is equal to end type, we are not going to continue the recursive approach
|
|
7408
7408
|
if ((value === null || value === void 0 ? void 0 : value.type) === endWithType) {
|
|
7409
7409
|
if (property in value) {
|
|
@@ -7412,7 +7412,7 @@ const pickPropertyValues = (obj, property, endWithType) => {
|
|
|
7412
7412
|
} else {
|
|
7413
7413
|
values = [...values, ...pickPropertyValues(value, property, endWithType)];
|
|
7414
7414
|
}
|
|
7415
|
-
} else if (_$
|
|
7415
|
+
} else if (_$b.isArray(value)) {
|
|
7416
7416
|
const nextValues = value.map(function (arrayObj) {
|
|
7417
7417
|
return pickPropertyValues(arrayObj, property, endWithType);
|
|
7418
7418
|
});
|
|
@@ -8349,6 +8349,56 @@ const FormStepperPageReviewer = props => {
|
|
|
8349
8349
|
};
|
|
8350
8350
|
withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperPageReviewer)));
|
|
8351
8351
|
|
|
8352
|
+
let _$4 = t => t,
|
|
8353
|
+
_t$4;
|
|
8354
|
+
const BackButtonWrapper = styled.span(_t$4 || (_t$4 = _$4`
|
|
8355
|
+
.back-link::before {
|
|
8356
|
+
content: '';
|
|
8357
|
+
display: inline-block;
|
|
8358
|
+
width: 42px;
|
|
8359
|
+
height: 24px;
|
|
8360
|
+
vertical-align: middle;
|
|
8361
|
+
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>')
|
|
8362
|
+
center center no-repeat;
|
|
8363
|
+
}
|
|
8364
|
+
|
|
8365
|
+
.back-link:visited::before,
|
|
8366
|
+
.back-link:hover::before {
|
|
8367
|
+
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>')
|
|
8368
|
+
center center no-repeat;
|
|
8369
|
+
}
|
|
8370
|
+
|
|
8371
|
+
.back-link {
|
|
8372
|
+
margin-top: var(--goa-space-m);
|
|
8373
|
+
}
|
|
8374
|
+
display: inline-block;
|
|
8375
|
+
color: #0070c4;
|
|
8376
|
+
cursor: pointer;
|
|
8377
|
+
|
|
8378
|
+
on .goa-icon {
|
|
8379
|
+
display: inline-block !important;
|
|
8380
|
+
position: relative;
|
|
8381
|
+
top: 3px;
|
|
8382
|
+
right: 2px;
|
|
8383
|
+
color: #0070c4;
|
|
8384
|
+
margin-left: 4px;
|
|
8385
|
+
}
|
|
8386
|
+
`));
|
|
8387
|
+
const BackButton = ({
|
|
8388
|
+
text,
|
|
8389
|
+
testId,
|
|
8390
|
+
link
|
|
8391
|
+
}) => {
|
|
8392
|
+
return jsx(BackButtonWrapper, {
|
|
8393
|
+
"data-testid": "back-button-click",
|
|
8394
|
+
onClick: link,
|
|
8395
|
+
children: jsx("div", {
|
|
8396
|
+
className: "back-link",
|
|
8397
|
+
children: text
|
|
8398
|
+
})
|
|
8399
|
+
});
|
|
8400
|
+
};
|
|
8401
|
+
|
|
8352
8402
|
const RenderPages = props => {
|
|
8353
8403
|
var _a, _b;
|
|
8354
8404
|
const {
|
|
@@ -8402,7 +8452,14 @@ const RenderPages = props => {
|
|
|
8402
8452
|
children: jsx("div", {
|
|
8403
8453
|
id: `${path || `goa`}-form-pages`,
|
|
8404
8454
|
children: jsxs(PageBorder, {
|
|
8405
|
-
children: [
|
|
8455
|
+
children: [jsx(BackButton, {
|
|
8456
|
+
text: "Back to tasks",
|
|
8457
|
+
link: () => {
|
|
8458
|
+
handleSave();
|
|
8459
|
+
goToTableOfContext();
|
|
8460
|
+
},
|
|
8461
|
+
testId: "back-to-tasks"
|
|
8462
|
+
}), categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
|
|
8406
8463
|
const categoryProps = {
|
|
8407
8464
|
category: category.uischema,
|
|
8408
8465
|
categoryIndex: category.id,
|
|
@@ -8428,17 +8485,23 @@ const RenderPages = props => {
|
|
|
8428
8485
|
children: jsxs(GoAGrid, {
|
|
8429
8486
|
minChildWidth: "100px",
|
|
8430
8487
|
gap: "2xs",
|
|
8431
|
-
children: [
|
|
8488
|
+
children: [jsxs(GoAButtonGroup, {
|
|
8432
8489
|
alignment: "start",
|
|
8433
|
-
children: jsx(GoAButton, {
|
|
8490
|
+
children: [activeId > 0 && jsx(GoAButton, {
|
|
8434
8491
|
type: "secondary",
|
|
8435
8492
|
onClick: () => {
|
|
8436
|
-
|
|
8437
|
-
|
|
8493
|
+
handleSave();
|
|
8494
|
+
let prevId = activeId - 1;
|
|
8495
|
+
while (prevId >= 0 && categories[prevId].visible === false) {
|
|
8496
|
+
prevId = prevId - 1;
|
|
8497
|
+
}
|
|
8498
|
+
if (prevId >= 0) {
|
|
8499
|
+
goToPage(prevId);
|
|
8500
|
+
}
|
|
8438
8501
|
},
|
|
8439
|
-
testId: "
|
|
8502
|
+
testId: "pages-prev-btn",
|
|
8440
8503
|
children: "Previous"
|
|
8441
|
-
})
|
|
8504
|
+
}), ' ']
|
|
8442
8505
|
}), jsx(GoAButtonGroup, {
|
|
8443
8506
|
alignment: "end",
|
|
8444
8507
|
children: jsx(GoAButton, {
|
|
@@ -8451,7 +8514,7 @@ const RenderPages = props => {
|
|
|
8451
8514
|
}
|
|
8452
8515
|
goToPage(nextId);
|
|
8453
8516
|
},
|
|
8454
|
-
disabled: !
|
|
8517
|
+
disabled: !enabled,
|
|
8455
8518
|
testId: "pages-save-continue-btn",
|
|
8456
8519
|
children: "Next"
|
|
8457
8520
|
})
|
|
@@ -8465,20 +8528,10 @@ const RenderPages = props => {
|
|
|
8465
8528
|
children: [jsx(FormStepperPageReviewer, Object.assign({}, props.categoryProps, {
|
|
8466
8529
|
navigationFunc: goToPage
|
|
8467
8530
|
})), jsx(PageRenderPadding, {
|
|
8468
|
-
children:
|
|
8531
|
+
children: jsx(GoAGrid, {
|
|
8469
8532
|
minChildWidth: "100px",
|
|
8470
8533
|
gap: "2xs",
|
|
8471
|
-
children:
|
|
8472
|
-
alignment: "start",
|
|
8473
|
-
children: jsx(GoAButton, {
|
|
8474
|
-
type: "secondary",
|
|
8475
|
-
onClick: () => {
|
|
8476
|
-
goToTableOfContext();
|
|
8477
|
-
},
|
|
8478
|
-
testId: "back-button",
|
|
8479
|
-
children: "Previous"
|
|
8480
|
-
})
|
|
8481
|
-
}), jsx(GoAButtonGroup, {
|
|
8534
|
+
children: jsx(GoAButtonGroup, {
|
|
8482
8535
|
alignment: "end",
|
|
8483
8536
|
children: !hideSubmit ? jsx(GoAButton, {
|
|
8484
8537
|
type: 'primary',
|
|
@@ -8487,7 +8540,7 @@ const RenderPages = props => {
|
|
|
8487
8540
|
testId: "pages-submit-btn",
|
|
8488
8541
|
children: "Submit"
|
|
8489
8542
|
}) : null
|
|
8490
|
-
})
|
|
8543
|
+
})
|
|
8491
8544
|
})
|
|
8492
8545
|
})]
|
|
8493
8546
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.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",
|