@abgov/jsonforms-components 2.27.0 → 2.28.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 +289 -112
- package/package.json +1 -1
- package/src/lib/Controls/FormStepper/styled-components.d.ts +0 -1
- package/src/lib/Controls/PhoneNumber/PhoneNumberControl.d.ts +5 -0
- package/src/lib/Controls/PhoneNumber/PhoneNumberReviewControl.d.ts +5 -0
- package/src/lib/Controls/PhoneNumber/PhoneNumberTester.d.ts +3 -0
- package/src/lib/Controls/PhoneNumber/PhoneNumberTypeTester.d.ts +2 -0
- package/src/lib/Controls/PhoneNumber/PhoneNumberWithTypeControl.d.ts +5 -0
- package/src/lib/Controls/PhoneNumber/PhoneNumberWithTypeReviewControl.d.ts +5 -0
- package/src/lib/Controls/PhoneNumber/index.d.ts +6 -0
- package/src/lib/Controls/index.d.ts +1 -0
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, isControl, schemaMatches, getAjv, isVisible, toDataPath, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, or, isObjectArrayControl, isPrimitiveArrayControl, Paths, hasType, 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 _$c 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';
|
|
@@ -3548,16 +3548,16 @@ const onChangeForNumericControl = props => {
|
|
|
3548
3548
|
}
|
|
3549
3549
|
};
|
|
3550
3550
|
|
|
3551
|
-
let _$
|
|
3552
|
-
_t$
|
|
3551
|
+
let _$b = t => t,
|
|
3552
|
+
_t$b,
|
|
3553
3553
|
_t2$7;
|
|
3554
|
-
styled.div(_t$
|
|
3554
|
+
styled.div(_t$b || (_t$b = _$b`
|
|
3555
3555
|
height: 70vh;
|
|
3556
3556
|
overflow-y: auto;
|
|
3557
3557
|
padding-left: var(--goa-space-2xs);
|
|
3558
3558
|
padding-right: var(--goa-space-2xs);
|
|
3559
3559
|
`));
|
|
3560
|
-
const Visible = styled.div(_t2$7 || (_t2$7 = _$
|
|
3560
|
+
const Visible = styled.div(_t2$7 || (_t2$7 = _$b`
|
|
3561
3561
|
display: ${0};
|
|
3562
3562
|
`), p => p.visible ? 'initial' : 'none');
|
|
3563
3563
|
|
|
@@ -5189,8 +5189,8 @@ const JsonFormRegisterProvider = ({
|
|
|
5189
5189
|
});
|
|
5190
5190
|
};
|
|
5191
5191
|
|
|
5192
|
-
let _$
|
|
5193
|
-
_t$
|
|
5192
|
+
let _$a = t => t,
|
|
5193
|
+
_t$a,
|
|
5194
5194
|
_t2$6,
|
|
5195
5195
|
_t3$5,
|
|
5196
5196
|
_t4$5,
|
|
@@ -5198,42 +5198,42 @@ let _$9 = t => t,
|
|
|
5198
5198
|
_t6$3,
|
|
5199
5199
|
_t7$2,
|
|
5200
5200
|
_t8$2;
|
|
5201
|
-
const FormFieldWrapper = styled.div(_t$
|
|
5201
|
+
const FormFieldWrapper = styled.div(_t$a || (_t$a = _$a`
|
|
5202
5202
|
margin-bottom: var(--goa-space-l);
|
|
5203
5203
|
`));
|
|
5204
|
-
const WarningIconDiv = styled.div(_t2$6 || (_t2$6 = _$
|
|
5204
|
+
const WarningIconDiv = styled.div(_t2$6 || (_t2$6 = _$a`
|
|
5205
5205
|
display: inline-flex;
|
|
5206
5206
|
align-items: flex-start;
|
|
5207
5207
|
gap: 0.25rem;
|
|
5208
5208
|
font-size: var(--goa-font-size-2);
|
|
5209
5209
|
color: var(--goa-color-interactive-error);
|
|
5210
5210
|
`));
|
|
5211
|
-
const RequiredTextLabel = styled.label(_t3$5 || (_t3$5 = _$
|
|
5211
|
+
const RequiredTextLabel = styled.label(_t3$5 || (_t3$5 = _$a`
|
|
5212
5212
|
color: var(--goa-color-greyscale-700);
|
|
5213
5213
|
font-weight: var(--goa-font-weight-regular);
|
|
5214
5214
|
font-size: var(--goa-font-size-2);
|
|
5215
5215
|
line-height: var(--goa-line-height-1);
|
|
5216
5216
|
font-style: normal;
|
|
5217
5217
|
`));
|
|
5218
|
-
const PageReviewNameCol = styled.td(_t4$5 || (_t4$5 = _$
|
|
5218
|
+
const PageReviewNameCol = styled.td(_t4$5 || (_t4$5 = _$a`
|
|
5219
5219
|
width: 5%;
|
|
5220
5220
|
padding-top: var(--goa-space-s);
|
|
5221
5221
|
padding-bottom: var(--goa-space-s);
|
|
5222
5222
|
padding-right: var(--goa-space-m);
|
|
5223
5223
|
`));
|
|
5224
|
-
const PageReviewValueCol = styled.td(_t5$5 || (_t5$5 = _$
|
|
5224
|
+
const PageReviewValueCol = styled.td(_t5$5 || (_t5$5 = _$a`
|
|
5225
5225
|
width: 20%;
|
|
5226
5226
|
text-align: left;
|
|
5227
5227
|
`));
|
|
5228
5228
|
//Check and unchecked are different heights otherwise
|
|
5229
|
-
const CheckboxWrapper = styled.div(_t6$3 || (_t6$3 = _$
|
|
5229
|
+
const CheckboxWrapper = styled.div(_t6$3 || (_t6$3 = _$a`
|
|
5230
5230
|
height: 28px;
|
|
5231
5231
|
`));
|
|
5232
|
-
styled.h4(_t7$2 || (_t7$2 = _$
|
|
5232
|
+
styled.h4(_t7$2 || (_t7$2 = _$a`
|
|
5233
5233
|
margin: 0 0 0.25rem 0;
|
|
5234
5234
|
fontsize: larger;
|
|
5235
5235
|
`));
|
|
5236
|
-
styled.h4(_t8$2 || (_t8$2 = _$
|
|
5236
|
+
styled.h4(_t8$2 || (_t8$2 = _$a`
|
|
5237
5237
|
border-bottom: 1px solid #ddd;
|
|
5238
5238
|
`));
|
|
5239
5239
|
|
|
@@ -5458,13 +5458,13 @@ const SPACE_KEY = ' ';
|
|
|
5458
5458
|
const ALT_KEY = 'Alt';
|
|
5459
5459
|
const SHIFT_KEY = 'Shift';
|
|
5460
5460
|
|
|
5461
|
-
let _$
|
|
5462
|
-
_t$
|
|
5461
|
+
let _$9 = t => t,
|
|
5462
|
+
_t$9,
|
|
5463
5463
|
_t2$5,
|
|
5464
5464
|
_t3$4,
|
|
5465
5465
|
_t4$4,
|
|
5466
5466
|
_t5$4;
|
|
5467
|
-
const GoADropdownTextbox = styled.div(_t$
|
|
5467
|
+
const GoADropdownTextbox = styled.div(_t$9 || (_t$9 = _$9`
|
|
5468
5468
|
border-radius: var(--goa-space-2xs);
|
|
5469
5469
|
box-shadow: ${0};
|
|
5470
5470
|
&:hover {
|
|
@@ -5475,11 +5475,11 @@ const GoADropdownTextbox = styled.div(_t$8 || (_t$8 = _$8`
|
|
|
5475
5475
|
box-shadow: ${0};
|
|
5476
5476
|
}
|
|
5477
5477
|
`), 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` : '');
|
|
5478
|
-
const GoADropdownListContainerWrapper = styled.div(_t2$5 || (_t2$5 = _$
|
|
5478
|
+
const GoADropdownListContainerWrapper = styled.div(_t2$5 || (_t2$5 = _$9`
|
|
5479
5479
|
position: relative;
|
|
5480
5480
|
display: ${0};
|
|
5481
5481
|
`), p => !(p === null || p === void 0 ? void 0 : p.isOpen) && 'none');
|
|
5482
|
-
const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$
|
|
5482
|
+
const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$9`
|
|
5483
5483
|
border: solid 1px var(--goa-color-greyscale-200);
|
|
5484
5484
|
border-radius: var(--goa-space-2xs);
|
|
5485
5485
|
background: var(--goa-color-greyscale-white);
|
|
@@ -5503,7 +5503,7 @@ const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$8`
|
|
|
5503
5503
|
scrollbar-color: #a8a8a8 var(--goa-color-greyscale-100) !important;
|
|
5504
5504
|
}
|
|
5505
5505
|
`), p => p.optionListMaxHeight || '272px');
|
|
5506
|
-
const GoADropdownListOption = styled.div(_t4$4 || (_t4$4 = _$
|
|
5506
|
+
const GoADropdownListOption = styled.div(_t4$4 || (_t4$4 = _$9`
|
|
5507
5507
|
padding: var(--goa-space-2xs) var(--goa-space-s);
|
|
5508
5508
|
text-overflow: ellipsis;
|
|
5509
5509
|
color: ${0} !important;
|
|
@@ -5536,7 +5536,7 @@ const GoADropdownListOption = styled.div(_t4$4 || (_t4$4 = _$8`
|
|
|
5536
5536
|
color: ${0};
|
|
5537
5537
|
}
|
|
5538
5538
|
`), p => p.isSelected ? '#fff' : 'var(--goa-color-greyscale-black)', p => p.isSelected ? 'var(--goa-color-interactive-default)' : '#fff', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-default)' : 'var(--goa-color-interactive-hover) !important', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-default)' : 'var(--goa-color-interactive-hover) !important', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? '#fff' : 'var(--goa-color-interactive-hover) !important');
|
|
5539
|
-
const LabelItem = styled.span(_t5$4 || (_t5$4 = _$
|
|
5539
|
+
const LabelItem = styled.span(_t5$4 || (_t5$4 = _$9`
|
|
5540
5540
|
font: var(--goa-dropdown-typography);
|
|
5541
5541
|
`));
|
|
5542
5542
|
|
|
@@ -6592,8 +6592,8 @@ const BooleanRadioControl = props => jsx(GoAInputBaseControl, Object.assign({},
|
|
|
6592
6592
|
const GoABooleanRadioControlTester = rankWith(3, and(isBooleanControl, optionIs('radio', true)));
|
|
6593
6593
|
const GoABooleanRadioControl = withJsonFormsControlProps(BooleanRadioControl);
|
|
6594
6594
|
|
|
6595
|
-
let _$
|
|
6596
|
-
_t$
|
|
6595
|
+
let _$8 = t => t,
|
|
6596
|
+
_t$8;
|
|
6597
6597
|
const Checkboxes = ({
|
|
6598
6598
|
children,
|
|
6599
6599
|
orientation,
|
|
@@ -6605,7 +6605,7 @@ const Checkboxes = ({
|
|
|
6605
6605
|
children: children
|
|
6606
6606
|
});
|
|
6607
6607
|
};
|
|
6608
|
-
const CheckBoxGroupDiv = styled.div(_t$
|
|
6608
|
+
const CheckBoxGroupDiv = styled.div(_t$8 || (_t$8 = _$8`
|
|
6609
6609
|
.horizontal {
|
|
6610
6610
|
display: flex;
|
|
6611
6611
|
flex-direction: row;
|
|
@@ -6991,8 +6991,8 @@ const GoAEmailControl = props => jsx(GoAEmailInput, Object.assign({}, props));
|
|
|
6991
6991
|
const GoAEmailControlTester = rankWith(4, and(isControl, schemaMatches(schema => schema.format === 'email')));
|
|
6992
6992
|
const GoAInputEmailControl = withJsonFormsControlProps(GoAEmailControl);
|
|
6993
6993
|
|
|
6994
|
-
let _$
|
|
6995
|
-
_t$
|
|
6994
|
+
let _$7 = t => t,
|
|
6995
|
+
_t$7;
|
|
6996
6996
|
const renderLayoutElements = (elements, schema, path, enabled, renderers, cells) => {
|
|
6997
6997
|
return elements.map((child, index) => jsx(JsonFormsDispatch, {
|
|
6998
6998
|
uischema: child,
|
|
@@ -7071,14 +7071,14 @@ const ReviewLayoutRenderer = ({
|
|
|
7071
7071
|
}
|
|
7072
7072
|
}
|
|
7073
7073
|
};
|
|
7074
|
-
const ReviewGrid = styled.div(_t$
|
|
7074
|
+
const ReviewGrid = styled.div(_t$7 || (_t$7 = _$7`
|
|
7075
7075
|
display: grid;
|
|
7076
7076
|
grid-template-columns: repeat(auto-fit, minmax(250px, calc(50% - 8px)));
|
|
7077
7077
|
gap: 16px;
|
|
7078
7078
|
`));
|
|
7079
7079
|
|
|
7080
|
-
let _$
|
|
7081
|
-
_t$
|
|
7080
|
+
let _$6 = t => t,
|
|
7081
|
+
_t$6,
|
|
7082
7082
|
_t2$4,
|
|
7083
7083
|
_t3$3,
|
|
7084
7084
|
_t4$3,
|
|
@@ -7100,16 +7100,15 @@ let _$5 = t => t,
|
|
|
7100
7100
|
_t20$1,
|
|
7101
7101
|
_t21,
|
|
7102
7102
|
_t22,
|
|
7103
|
-
_t23
|
|
7104
|
-
|
|
7105
|
-
const ReviewItem = styled.div(_t$5 || (_t$5 = _$5`
|
|
7103
|
+
_t23;
|
|
7104
|
+
const ReviewItem = styled.div(_t$6 || (_t$6 = _$6`
|
|
7106
7105
|
display: flex;
|
|
7107
7106
|
flex-direction: column;
|
|
7108
7107
|
div:empty {
|
|
7109
7108
|
display: none;
|
|
7110
7109
|
}
|
|
7111
7110
|
`));
|
|
7112
|
-
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$
|
|
7111
|
+
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$6`
|
|
7113
7112
|
margin-bottom: var(--goa-space-m);
|
|
7114
7113
|
padding: var(--goa-space-xl) var(--goa-space-2xl);
|
|
7115
7114
|
border: 1px solid var(--goa-color-greyscale-300);
|
|
@@ -7119,18 +7118,18 @@ const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$5`
|
|
|
7119
7118
|
max-width: 1600px;
|
|
7120
7119
|
}
|
|
7121
7120
|
`));
|
|
7122
|
-
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$
|
|
7121
|
+
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$6`
|
|
7123
7122
|
display: flex;
|
|
7124
7123
|
align-items: center;
|
|
7125
7124
|
justify-content: space-between;
|
|
7126
7125
|
margin-bottom: var(--goa-space-xl);
|
|
7127
7126
|
`));
|
|
7128
|
-
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$
|
|
7127
|
+
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$6`
|
|
7129
7128
|
font-size: var(--goa-space-l);
|
|
7130
7129
|
line-height: var(--goa-space-xl);
|
|
7131
7130
|
font-weight: 300;
|
|
7132
7131
|
`));
|
|
7133
|
-
const Anchor = styled.div(_t5$3 || (_t5$3 = _$
|
|
7132
|
+
const Anchor = styled.div(_t5$3 || (_t5$3 = _$6`
|
|
7134
7133
|
color: #0070c4;
|
|
7135
7134
|
text-decoration: underline;
|
|
7136
7135
|
outline: none;
|
|
@@ -7141,20 +7140,20 @@ const Anchor = styled.div(_t5$3 || (_t5$3 = _$5`
|
|
|
7141
7140
|
background-color: #e6f7ff;
|
|
7142
7141
|
}
|
|
7143
7142
|
`));
|
|
7144
|
-
styled.div(_t6$2 || (_t6$2 = _$
|
|
7143
|
+
styled.div(_t6$2 || (_t6$2 = _$6`
|
|
7145
7144
|
margin-left: var(--goa-space-m);
|
|
7146
7145
|
`));
|
|
7147
|
-
styled.div(_t7$1 || (_t7$1 = _$
|
|
7146
|
+
styled.div(_t7$1 || (_t7$1 = _$6`
|
|
7148
7147
|
margin-bottom: var(--goa-space-m);
|
|
7149
7148
|
`));
|
|
7150
|
-
styled.div(_t8$1 || (_t8$1 = _$
|
|
7149
|
+
styled.div(_t8$1 || (_t8$1 = _$6`
|
|
7151
7150
|
margin: var(--goa-space-s);
|
|
7152
7151
|
width: 100%;
|
|
7153
7152
|
`));
|
|
7154
|
-
styled.h3(_t9$1 || (_t9$1 = _$
|
|
7153
|
+
styled.h3(_t9$1 || (_t9$1 = _$6`
|
|
7155
7154
|
text-transform: capitalize;
|
|
7156
7155
|
`));
|
|
7157
|
-
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$
|
|
7156
|
+
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
|
|
7158
7157
|
@media screen and (max-width: 767px) {
|
|
7159
7158
|
margin-bottom: var(--goa-space-l);
|
|
7160
7159
|
}
|
|
@@ -7164,55 +7163,52 @@ const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$5`
|
|
|
7164
7163
|
margin-bottom: var(--goa-space-l);
|
|
7165
7164
|
}
|
|
7166
7165
|
`));
|
|
7167
|
-
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$
|
|
7166
|
+
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$6`
|
|
7168
7167
|
flex: 1;
|
|
7169
7168
|
margin-bottom: var(--goa-space-m);
|
|
7170
7169
|
font-size: var(--goa-font-size-7);
|
|
7171
7170
|
line-height: var(--goa-line-height-4);
|
|
7172
7171
|
font-weight: var(--goa-font-weight-regular);
|
|
7173
7172
|
`));
|
|
7174
|
-
const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$
|
|
7173
|
+
const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$6`
|
|
7175
7174
|
margin-top: var(--goa-space-2xl);
|
|
7176
7175
|
`));
|
|
7177
|
-
styled.div(_t13$1 || (_t13$1 = _$
|
|
7176
|
+
styled.div(_t13$1 || (_t13$1 = _$6`
|
|
7178
7177
|
margin-bottom: var(--goa-space-2xl);
|
|
7179
7178
|
`));
|
|
7180
|
-
const PageBorder = styled.div(_t14$1 || (_t14$1 = _$
|
|
7179
|
+
const PageBorder = styled.div(_t14$1 || (_t14$1 = _$6`
|
|
7181
7180
|
padding: var(--goa-space-m) var(--goa-space-3xl);
|
|
7182
7181
|
`));
|
|
7183
|
-
const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$
|
|
7182
|
+
const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$6`
|
|
7184
7183
|
.element-style {
|
|
7185
7184
|
max-width: 1600px;
|
|
7186
7185
|
}
|
|
7187
7186
|
`));
|
|
7188
|
-
const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$
|
|
7187
|
+
const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$6`
|
|
7189
7188
|
padding: var(--goa-space-xl) var(--goa-space-2xl);
|
|
7190
7189
|
border: 1px solid var(--goa-color-greyscale-300);
|
|
7191
7190
|
border-radius: var(--goa-border-radius-xl);
|
|
7192
7191
|
`));
|
|
7193
|
-
const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$
|
|
7192
|
+
const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$6`
|
|
7194
7193
|
margin-top: var(--goa-space-xl);
|
|
7195
7194
|
display: flex;
|
|
7196
7195
|
justify-content: space-between;
|
|
7197
7196
|
`));
|
|
7198
|
-
const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$
|
|
7197
|
+
const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$6`
|
|
7199
7198
|
color: var(--goa-color-text-secondary) !important;
|
|
7200
7199
|
margin-bottom: var(--goa-space-l);
|
|
7201
7200
|
`));
|
|
7202
|
-
const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$
|
|
7201
|
+
const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$6`
|
|
7203
7202
|
width: var(--goa-space-xl);
|
|
7204
7203
|
padding-right: var(--goa-space-xl);
|
|
7204
|
+
align-content: center;
|
|
7205
7205
|
`));
|
|
7206
|
-
const
|
|
7207
|
-
padding-left: var(--goa-space-xl);
|
|
7208
|
-
`));
|
|
7209
|
-
const CompletionStatus = styled.div(_t21 || (_t21 = _$5`
|
|
7206
|
+
const CompletionStatus = styled.div(_t20$1 || (_t20$1 = _$6`
|
|
7210
7207
|
padding: 0;
|
|
7211
7208
|
margin: 0;
|
|
7212
|
-
|
|
7213
|
-
padding-bottom: var(--goa-space-xl);
|
|
7209
|
+
margin-bottom: 0 !important;
|
|
7214
7210
|
`));
|
|
7215
|
-
const PageStepperRow = styled.tr(
|
|
7211
|
+
const PageStepperRow = styled.tr(_t21 || (_t21 = _$6`
|
|
7216
7212
|
${0}
|
|
7217
7213
|
`), ({
|
|
7218
7214
|
disabled
|
|
@@ -7222,18 +7218,19 @@ const PageStepperRow = styled.tr(_t22 || (_t22 = _$5`
|
|
|
7222
7218
|
` : `
|
|
7223
7219
|
cursor: pointer;
|
|
7224
7220
|
`);
|
|
7225
|
-
const SectionHeaderRowTr = styled.tr(
|
|
7221
|
+
const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
|
|
7226
7222
|
& > td {
|
|
7227
7223
|
border: 0 !important;
|
|
7228
7224
|
padding-top: var(--goa-space-l);
|
|
7229
7225
|
padding-bottom: var(--goa-space-s);
|
|
7226
|
+
padding-left: 0 !important;
|
|
7230
7227
|
}
|
|
7231
7228
|
|
|
7232
7229
|
& + tr > td {
|
|
7233
7230
|
border-top: none !important;
|
|
7234
7231
|
}
|
|
7235
7232
|
`));
|
|
7236
|
-
const SummaryRowLink = styled.a(
|
|
7233
|
+
const SummaryRowLink = styled.a(_t23 || (_t23 = _$6`
|
|
7237
7234
|
position: relative;
|
|
7238
7235
|
top: var(--goa-space-xs);
|
|
7239
7236
|
`));
|
|
@@ -7607,7 +7604,7 @@ const pickPropertyValues = (obj, property, endWithType) => {
|
|
|
7607
7604
|
Object.entries(obj).forEach(function ([key, value]) {
|
|
7608
7605
|
if (key === property) {
|
|
7609
7606
|
values.push(value);
|
|
7610
|
-
} else if (_$
|
|
7607
|
+
} else if (_$c.isObject(value)) {
|
|
7611
7608
|
// if the object type is equal to end type, we are not going to continue the recursive approach
|
|
7612
7609
|
if ((value === null || value === void 0 ? void 0 : value.type) === endWithType) {
|
|
7613
7610
|
if (property in value) {
|
|
@@ -7616,7 +7613,7 @@ const pickPropertyValues = (obj, property, endWithType) => {
|
|
|
7616
7613
|
} else {
|
|
7617
7614
|
values = [...values, ...pickPropertyValues(value, property, endWithType)];
|
|
7618
7615
|
}
|
|
7619
|
-
} else if (_$
|
|
7616
|
+
} else if (_$c.isArray(value)) {
|
|
7620
7617
|
const nextValues = value.map(function (arrayObj) {
|
|
7621
7618
|
return pickPropertyValues(arrayObj, property, endWithType);
|
|
7622
7619
|
});
|
|
@@ -8338,9 +8335,8 @@ const SectionHeaderRow = ({
|
|
|
8338
8335
|
colSpan: 2,
|
|
8339
8336
|
children: jsx(GoAText, {
|
|
8340
8337
|
size: "heading-m",
|
|
8341
|
-
mt: "
|
|
8338
|
+
mt: "xl",
|
|
8342
8339
|
mb: "m",
|
|
8343
|
-
ml: "m",
|
|
8344
8340
|
children: section
|
|
8345
8341
|
})
|
|
8346
8342
|
})
|
|
@@ -8374,7 +8370,7 @@ const CategoryRow = ({
|
|
|
8374
8370
|
}) => {
|
|
8375
8371
|
return category.visible ? jsxs(PageStepperRow, {
|
|
8376
8372
|
disabled: !(category === null || category === void 0 ? void 0 : category.isEnabled),
|
|
8377
|
-
children: [jsx(
|
|
8373
|
+
children: [jsx("td", {
|
|
8378
8374
|
children: jsx("a", {
|
|
8379
8375
|
"data-testid": `page-ref-${index}`,
|
|
8380
8376
|
href: "#",
|
|
@@ -8382,10 +8378,7 @@ const CategoryRow = ({
|
|
|
8382
8378
|
e.preventDefault();
|
|
8383
8379
|
onClick(index);
|
|
8384
8380
|
},
|
|
8385
|
-
children:
|
|
8386
|
-
ml: "l",
|
|
8387
|
-
children: category.label
|
|
8388
|
-
})
|
|
8381
|
+
children: category.label
|
|
8389
8382
|
})
|
|
8390
8383
|
}), jsx(CategoryStatus, {
|
|
8391
8384
|
children: getCategoryStatusBadge(category)
|
|
@@ -8402,9 +8395,8 @@ const SummaryRow = ({
|
|
|
8402
8395
|
return jsx("tr", {
|
|
8403
8396
|
children: jsx(GoAText, {
|
|
8404
8397
|
size: "heading-m",
|
|
8405
|
-
mt: "
|
|
8398
|
+
mt: "xl",
|
|
8406
8399
|
mb: "xl",
|
|
8407
|
-
ml: "xl",
|
|
8408
8400
|
children: jsx(SummaryRowLink, {
|
|
8409
8401
|
"data-testid": `page-ref-${index}`,
|
|
8410
8402
|
href: "#",
|
|
@@ -8579,9 +8571,9 @@ const FormStepperPageReviewer = props => {
|
|
|
8579
8571
|
};
|
|
8580
8572
|
withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperPageReviewer)));
|
|
8581
8573
|
|
|
8582
|
-
let _$
|
|
8583
|
-
_t$
|
|
8584
|
-
const BackButtonWrapper = styled.span(_t$
|
|
8574
|
+
let _$5 = t => t,
|
|
8575
|
+
_t$5;
|
|
8576
|
+
const BackButtonWrapper = styled.span(_t$5 || (_t$5 = _$5`
|
|
8585
8577
|
.back-link::before {
|
|
8586
8578
|
content: '';
|
|
8587
8579
|
display: inline-block;
|
|
@@ -8883,8 +8875,8 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
8883
8875
|
return t;
|
|
8884
8876
|
}
|
|
8885
8877
|
|
|
8886
|
-
let _$
|
|
8887
|
-
_t$
|
|
8878
|
+
let _$4 = t => t,
|
|
8879
|
+
_t$4;
|
|
8888
8880
|
const GoAContextMenuIcon = props => {
|
|
8889
8881
|
return jsx(GoAIconButton, {
|
|
8890
8882
|
icon: props.type,
|
|
@@ -8895,7 +8887,7 @@ const GoAContextMenuIcon = props => {
|
|
|
8895
8887
|
disabled: props.disabled
|
|
8896
8888
|
});
|
|
8897
8889
|
};
|
|
8898
|
-
const GoAContextMenu = styled.div(_t$
|
|
8890
|
+
const GoAContextMenu = styled.div(_t$4 || (_t$4 = _$4`
|
|
8899
8891
|
display: flex;
|
|
8900
8892
|
align-items: center;
|
|
8901
8893
|
background-color: #fff;
|
|
@@ -9322,8 +9314,8 @@ function objectListReducer(state, action) {
|
|
|
9322
9314
|
}
|
|
9323
9315
|
}
|
|
9324
9316
|
|
|
9325
|
-
let _$
|
|
9326
|
-
_t$
|
|
9317
|
+
let _$3 = t => t,
|
|
9318
|
+
_t$3,
|
|
9327
9319
|
_t2$2,
|
|
9328
9320
|
_t3$1,
|
|
9329
9321
|
_t4$1,
|
|
@@ -9343,18 +9335,18 @@ let _$2 = t => t,
|
|
|
9343
9335
|
_t18,
|
|
9344
9336
|
_t19,
|
|
9345
9337
|
_t20;
|
|
9346
|
-
const DeleteDialogContent = styled.div(_t$
|
|
9338
|
+
const DeleteDialogContent = styled.div(_t$3 || (_t$3 = _$3`
|
|
9347
9339
|
margin-bottom: var(--goa-space-m);
|
|
9348
9340
|
`));
|
|
9349
|
-
const NonEmptyCellStyle = styled.div(_t2$2 || (_t2$2 = _$
|
|
9341
|
+
const NonEmptyCellStyle = styled.div(_t2$2 || (_t2$2 = _$3`
|
|
9350
9342
|
goa-table thead th {
|
|
9351
9343
|
background-color: #000:
|
|
9352
9344
|
}
|
|
9353
9345
|
`));
|
|
9354
|
-
const ToolBarHeader = styled.div(_t3$1 || (_t3$1 = _$
|
|
9346
|
+
const ToolBarHeader = styled.div(_t3$1 || (_t3$1 = _$3`
|
|
9355
9347
|
margin-bottom: var(--goa-space-l);
|
|
9356
9348
|
`));
|
|
9357
|
-
const ObjectArrayTitle = styled.h3(_t4$1 || (_t4$1 = _$
|
|
9349
|
+
const ObjectArrayTitle = styled.h3(_t4$1 || (_t4$1 = _$3`
|
|
9358
9350
|
margin-bottom: var(--goa-space-l);
|
|
9359
9351
|
|
|
9360
9352
|
span {
|
|
@@ -9362,77 +9354,77 @@ const ObjectArrayTitle = styled.h3(_t4$1 || (_t4$1 = _$2`
|
|
|
9362
9354
|
font-size: var(--goa-font-size-2);
|
|
9363
9355
|
}
|
|
9364
9356
|
`));
|
|
9365
|
-
const RequiredSpan = styled.span(_t5$1 || (_t5$1 = _$
|
|
9357
|
+
const RequiredSpan = styled.span(_t5$1 || (_t5$1 = _$3`
|
|
9366
9358
|
color: #666666;
|
|
9367
9359
|
font-weight: var(--goa-font-weight-regular);
|
|
9368
9360
|
font-size: var(--goa-font-size-2);
|
|
9369
9361
|
`));
|
|
9370
|
-
const TextCenter = styled.div(_t6$1 || (_t6$1 = _$
|
|
9362
|
+
const TextCenter = styled.div(_t6$1 || (_t6$1 = _$3`
|
|
9371
9363
|
text-align: center;
|
|
9372
9364
|
`));
|
|
9373
|
-
const SideMenuItem = styled.div(_t7 || (_t7 = _$
|
|
9365
|
+
const SideMenuItem = styled.div(_t7 || (_t7 = _$3`
|
|
9374
9366
|
&:hover {
|
|
9375
9367
|
background: #f1f1f1;
|
|
9376
9368
|
}
|
|
9377
9369
|
`));
|
|
9378
|
-
const RowFlex = styled.div(_t8 || (_t8 = _$
|
|
9370
|
+
const RowFlex = styled.div(_t8 || (_t8 = _$3`
|
|
9379
9371
|
display: flex;
|
|
9380
9372
|
align-items: stretch;
|
|
9381
9373
|
`));
|
|
9382
|
-
const RowFlexMenu = styled.div(_t9 || (_t9 = _$
|
|
9374
|
+
const RowFlexMenu = styled.div(_t9 || (_t9 = _$3`
|
|
9383
9375
|
display: flex;
|
|
9384
9376
|
flex-direction: row;
|
|
9385
9377
|
border-bottom: 1px solid #dcdcdc;
|
|
9386
9378
|
`));
|
|
9387
|
-
const FlexTabs = styled.div(_t10 || (_t10 = _$
|
|
9379
|
+
const FlexTabs = styled.div(_t10 || (_t10 = _$3`
|
|
9388
9380
|
flex-direction: column;
|
|
9389
9381
|
flex: 1;
|
|
9390
9382
|
overflow-y: auto !important;
|
|
9391
9383
|
margin-right: 1.5rem;
|
|
9392
9384
|
`));
|
|
9393
|
-
const FlexForm = styled.div(_t11 || (_t11 = _$
|
|
9385
|
+
const FlexForm = styled.div(_t11 || (_t11 = _$3`
|
|
9394
9386
|
flex-direction: column;
|
|
9395
9387
|
margin: 1.5rem 0;
|
|
9396
9388
|
flex: 3;
|
|
9397
9389
|
`));
|
|
9398
|
-
const TabName = styled.div(_t12 || (_t12 = _$
|
|
9390
|
+
const TabName = styled.div(_t12 || (_t12 = _$3`
|
|
9399
9391
|
margin: 1rem 0 1rem 1rem;
|
|
9400
9392
|
font-weight: 700;
|
|
9401
9393
|
`));
|
|
9402
|
-
const Trash = styled.div(_t13 || (_t13 = _$
|
|
9394
|
+
const Trash = styled.div(_t13 || (_t13 = _$3`
|
|
9403
9395
|
margin: 0.75rem 1.25rem 0.75rem 0.75rem;
|
|
9404
9396
|
margin-left: auto;
|
|
9405
9397
|
`));
|
|
9406
|
-
const ListContainer = styled.div(_t14 || (_t14 = _$
|
|
9398
|
+
const ListContainer = styled.div(_t14 || (_t14 = _$3`
|
|
9407
9399
|
padding: 0 1.5rem 0 0;
|
|
9408
9400
|
border: 1px solid #dcdcdc;
|
|
9409
9401
|
`));
|
|
9410
|
-
const TableTHHeader = styled.th(_t15 || (_t15 = _$
|
|
9402
|
+
const TableTHHeader = styled.th(_t15 || (_t15 = _$3`
|
|
9411
9403
|
background-color: var(--goa-color-greyscale-100) !important;
|
|
9412
9404
|
vertical-align: top;
|
|
9413
9405
|
`));
|
|
9414
|
-
const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$
|
|
9406
|
+
const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$3`
|
|
9415
9407
|
display: inline-flex;
|
|
9416
9408
|
align-items: flex-start;
|
|
9417
9409
|
gap: 0.25rem;
|
|
9418
9410
|
font-size: var(--goa-font-size-2);
|
|
9419
9411
|
color: var(--goa-color-interactive-error);
|
|
9420
9412
|
`));
|
|
9421
|
-
const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$
|
|
9413
|
+
const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$3`
|
|
9422
9414
|
display: inline-flex;
|
|
9423
9415
|
align-items: flex-start;
|
|
9424
9416
|
gap: 0.25rem;
|
|
9425
9417
|
font-size: var(--goa-font-size-3);
|
|
9426
9418
|
color: var(--goa-color-interactive-error);
|
|
9427
9419
|
`));
|
|
9428
|
-
styled.label(_t18 || (_t18 = _$
|
|
9420
|
+
styled.label(_t18 || (_t18 = _$3`
|
|
9429
9421
|
color: var(--goa-color-interactive-error);
|
|
9430
9422
|
font-weight: var(--goa-font-weight-regular);
|
|
9431
9423
|
font-size: var(--goa-font-size-3);
|
|
9432
9424
|
line-height: var(--goa-line-height-1);
|
|
9433
9425
|
font-style: normal;
|
|
9434
9426
|
`));
|
|
9435
|
-
styled.div(_t19 || (_t19 = _$
|
|
9427
|
+
styled.div(_t19 || (_t19 = _$3`
|
|
9436
9428
|
margin-top: var(--goa-space-m);
|
|
9437
9429
|
color: var(--goa-color-interactive-error);
|
|
9438
9430
|
font-weight: var(--goa-font-weight-regular);
|
|
@@ -9440,7 +9432,7 @@ styled.div(_t19 || (_t19 = _$2`
|
|
|
9440
9432
|
line-height: var(--goa-line-height-1);
|
|
9441
9433
|
font-style: normal;
|
|
9442
9434
|
`));
|
|
9443
|
-
const HilightCellWarning = styled.div(_t20 || (_t20 = _$
|
|
9435
|
+
const HilightCellWarning = styled.div(_t20 || (_t20 = _$3`
|
|
9444
9436
|
background-color: var(--goa-color-warning-default);
|
|
9445
9437
|
`));
|
|
9446
9438
|
|
|
@@ -10715,14 +10707,14 @@ const ListWithDetailsControl = props => {
|
|
|
10715
10707
|
const GoAListWithDetailsControlRenderer = withJsonFormsArrayLayoutProps(ListWithDetailsControl);
|
|
10716
10708
|
const GoAListWithDetailsTester = rankWith(3, and(uiTypeIs('ListWithDetail')));
|
|
10717
10709
|
|
|
10718
|
-
let _$
|
|
10719
|
-
_t$
|
|
10710
|
+
let _$2 = t => t,
|
|
10711
|
+
_t$2,
|
|
10720
10712
|
_t2$1,
|
|
10721
10713
|
_t3,
|
|
10722
10714
|
_t4,
|
|
10723
10715
|
_t5,
|
|
10724
10716
|
_t6;
|
|
10725
|
-
const SearchBox = styled.div(_t$
|
|
10717
|
+
const SearchBox = styled.div(_t$2 || (_t$2 = _$2`
|
|
10726
10718
|
position: relative;
|
|
10727
10719
|
|
|
10728
10720
|
.suggestions {
|
|
@@ -10764,7 +10756,7 @@ const SearchBox = styled.div(_t$1 || (_t$1 = _$1`
|
|
|
10764
10756
|
pointer-events: none; /* Prevent spinner from interfering with clicks */
|
|
10765
10757
|
}
|
|
10766
10758
|
`));
|
|
10767
|
-
const AddressIndent = styled.div(_t2$1 || (_t2$1 = _$
|
|
10759
|
+
const AddressIndent = styled.div(_t2$1 || (_t2$1 = _$2`
|
|
10768
10760
|
margin: 0 0 var(--goa-space-m) 0;
|
|
10769
10761
|
text-wrap: wrap;
|
|
10770
10762
|
word-break: break-word;
|
|
@@ -10772,20 +10764,20 @@ const AddressIndent = styled.div(_t2$1 || (_t2$1 = _$1`
|
|
|
10772
10764
|
border-radius: var(--goa-border-radius-xl);
|
|
10773
10765
|
padding: var(--goa-space-l);
|
|
10774
10766
|
`));
|
|
10775
|
-
const TextWrap = styled.p(_t3 || (_t3 = _$
|
|
10767
|
+
const TextWrap = styled.p(_t3 || (_t3 = _$2`
|
|
10776
10768
|
text-wrap: auto;
|
|
10777
10769
|
word-break: break-word;
|
|
10778
10770
|
`));
|
|
10779
|
-
const TextWrapDiv = styled.div(_t4 || (_t4 = _$
|
|
10771
|
+
const TextWrapDiv = styled.div(_t4 || (_t4 = _$2`
|
|
10780
10772
|
text-wrap: auto;
|
|
10781
10773
|
word-break: break-word;
|
|
10782
10774
|
`));
|
|
10783
|
-
const LabelDiv = styled.div(_t5 || (_t5 = _$
|
|
10775
|
+
const LabelDiv = styled.div(_t5 || (_t5 = _$2`
|
|
10784
10776
|
font-size: var(--goa-font-size-2);
|
|
10785
10777
|
padding-bottom: var(--goa-space-l);
|
|
10786
10778
|
`));
|
|
10787
10779
|
/* istanbul ignore next */
|
|
10788
|
-
const ListItem = styled.li(_t6 || (_t6 = _$
|
|
10780
|
+
const ListItem = styled.li(_t6 || (_t6 = _$2`
|
|
10789
10781
|
background-color: ${0};
|
|
10790
10782
|
color: ${0};
|
|
10791
10783
|
font-weight: ${0};
|
|
@@ -11073,10 +11065,10 @@ function handleAddressKeyDown(key, value, activeIndex, suggestions, onInputChang
|
|
|
11073
11065
|
return activeIndex;
|
|
11074
11066
|
}
|
|
11075
11067
|
|
|
11076
|
-
let _ = t => t,
|
|
11077
|
-
_t,
|
|
11068
|
+
let _$1 = t => t,
|
|
11069
|
+
_t$1,
|
|
11078
11070
|
_t2;
|
|
11079
|
-
const HelpContentDiv = styled.div(_t || (_t = _`
|
|
11071
|
+
const HelpContentDiv = styled.div(_t$1 || (_t$1 = _$1`
|
|
11080
11072
|
.parent-label {
|
|
11081
11073
|
font-size: 24px;
|
|
11082
11074
|
margin-bottom: var(--goa-space-m);
|
|
@@ -11101,7 +11093,7 @@ const HelpContentDiv = styled.div(_t || (_t = _`
|
|
|
11101
11093
|
margin: var(--goa-space-2xs) 0 var(--goa-space-2xs) 0;
|
|
11102
11094
|
}
|
|
11103
11095
|
`));
|
|
11104
|
-
const InvalidMarkdown = styled.div(_t2 || (_t2 = _`
|
|
11096
|
+
const InvalidMarkdown = styled.div(_t2 || (_t2 = _$1`
|
|
11105
11097
|
color: var(--goa-color-interactive-error);
|
|
11106
11098
|
`));
|
|
11107
11099
|
|
|
@@ -12187,6 +12179,179 @@ const GoAInputBaseFullNameDobControlReview = withJsonFormsAllOfProps(FullNameDob
|
|
|
12187
12179
|
const isFullNameDoB = createSchemaMatchTester(['firstName', 'middleName', 'lastName', 'dateOfBirth'], true);
|
|
12188
12180
|
const FullNameDobTester = rankWith(4, isFullNameDoB);
|
|
12189
12181
|
|
|
12182
|
+
let _ = t => t,
|
|
12183
|
+
_t;
|
|
12184
|
+
const PhoneGrid = styled.div(_t || (_t = _`
|
|
12185
|
+
display: grid;
|
|
12186
|
+
grid-template-columns: 1fr 2fr;
|
|
12187
|
+
gap: 0.2rem;
|
|
12188
|
+
align-items: start;
|
|
12189
|
+
|
|
12190
|
+
goa-form-item {
|
|
12191
|
+
margin-right: 0 !important;
|
|
12192
|
+
}
|
|
12193
|
+
`));
|
|
12194
|
+
const PHONE_REGEX = /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/;
|
|
12195
|
+
const PhoneNumberWithTypeControl = props => {
|
|
12196
|
+
const {
|
|
12197
|
+
data,
|
|
12198
|
+
path,
|
|
12199
|
+
handleChange,
|
|
12200
|
+
enabled,
|
|
12201
|
+
visible,
|
|
12202
|
+
required
|
|
12203
|
+
} = props;
|
|
12204
|
+
const [formData, setFormData] = useState(data || {});
|
|
12205
|
+
const [error, setError] = useState(undefined);
|
|
12206
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12207
|
+
const updateFormData = updated => {
|
|
12208
|
+
setFormData(updated);
|
|
12209
|
+
if (updated.number && !PHONE_REGEX.test(updated.number)) {
|
|
12210
|
+
setError('Enter a valid phone number (e.g., (780) 123-4567)');
|
|
12211
|
+
} else {
|
|
12212
|
+
setError(undefined);
|
|
12213
|
+
}
|
|
12214
|
+
handleChange(path, updated);
|
|
12215
|
+
};
|
|
12216
|
+
return jsx(Visible, {
|
|
12217
|
+
visible: visible,
|
|
12218
|
+
children: jsxs(PhoneGrid, {
|
|
12219
|
+
children: [jsx(GoAFormItem, {
|
|
12220
|
+
label: "Phone type",
|
|
12221
|
+
requirement: required ? 'required' : undefined,
|
|
12222
|
+
children: jsxs(GoADropdown, {
|
|
12223
|
+
name: "type",
|
|
12224
|
+
value: formData.type || '',
|
|
12225
|
+
disabled: !enabled,
|
|
12226
|
+
onChange: (name, value) => updateFormData(Object.assign({}, formData, {
|
|
12227
|
+
type: value
|
|
12228
|
+
})),
|
|
12229
|
+
children: [jsx(GoADropdownItem, {
|
|
12230
|
+
value: "Mobile"
|
|
12231
|
+
}), jsx(GoADropdownItem, {
|
|
12232
|
+
value: "Landline"
|
|
12233
|
+
})]
|
|
12234
|
+
})
|
|
12235
|
+
}), jsx(GoAFormItem, {
|
|
12236
|
+
label: "Phone number",
|
|
12237
|
+
error: error,
|
|
12238
|
+
requirement: required ? 'required' : undefined,
|
|
12239
|
+
children: jsx(GoAInput, {
|
|
12240
|
+
type: "tel",
|
|
12241
|
+
name: "number",
|
|
12242
|
+
placeholder: "(000) 000-0000",
|
|
12243
|
+
value: formData.number || '',
|
|
12244
|
+
disabled: !enabled,
|
|
12245
|
+
onChange: (name, value) => updateFormData(Object.assign({}, formData, {
|
|
12246
|
+
number: value
|
|
12247
|
+
}))
|
|
12248
|
+
})
|
|
12249
|
+
})]
|
|
12250
|
+
})
|
|
12251
|
+
});
|
|
12252
|
+
};
|
|
12253
|
+
const GoAPhoneNumberWithTypeControl = withJsonFormsControlProps(PhoneNumberWithTypeControl);
|
|
12254
|
+
|
|
12255
|
+
const PhoneNumberControl = props => {
|
|
12256
|
+
const {
|
|
12257
|
+
data,
|
|
12258
|
+
path,
|
|
12259
|
+
schema,
|
|
12260
|
+
handleChange,
|
|
12261
|
+
enabled,
|
|
12262
|
+
visible,
|
|
12263
|
+
required
|
|
12264
|
+
} = props;
|
|
12265
|
+
const [error, setError] = useState('');
|
|
12266
|
+
const handleInputChange = (name, value) => {
|
|
12267
|
+
if (value && !PHONE_REGEX.test(value)) {
|
|
12268
|
+
setError('Must be a valid 10-digit phone number in format (000) 000-0000');
|
|
12269
|
+
} else {
|
|
12270
|
+
setError('');
|
|
12271
|
+
}
|
|
12272
|
+
handleChange(path, value);
|
|
12273
|
+
};
|
|
12274
|
+
return jsx(Visible, {
|
|
12275
|
+
visible: visible,
|
|
12276
|
+
children: jsx(GoAFormItem, {
|
|
12277
|
+
label: (schema === null || schema === void 0 ? void 0 : schema.title) || 'Phone number',
|
|
12278
|
+
requirement: required ? 'required' : undefined,
|
|
12279
|
+
error: error,
|
|
12280
|
+
testId: `form-item-${path}`,
|
|
12281
|
+
children: jsx(GoAInput, {
|
|
12282
|
+
type: "tel",
|
|
12283
|
+
name: path,
|
|
12284
|
+
disabled: !enabled,
|
|
12285
|
+
"aria-label": "phone number input",
|
|
12286
|
+
testId: `phone-input-${path}`,
|
|
12287
|
+
value: data || '',
|
|
12288
|
+
onChange: (name, value) => handleInputChange(name, value),
|
|
12289
|
+
placeholder: "(000) 000-0000",
|
|
12290
|
+
width: "100%"
|
|
12291
|
+
})
|
|
12292
|
+
})
|
|
12293
|
+
});
|
|
12294
|
+
};
|
|
12295
|
+
const GoAPhoneNumberControl = withJsonFormsControlProps(PhoneNumberControl);
|
|
12296
|
+
|
|
12297
|
+
const isPhoneNumber = createSchemaMatchTester(['phoneNumber'], false);
|
|
12298
|
+
const PhoneNumberTester = rankWith(3, isPhoneNumber);
|
|
12299
|
+
|
|
12300
|
+
const PhoneNumberReviewControl = props => {
|
|
12301
|
+
const {
|
|
12302
|
+
data,
|
|
12303
|
+
id,
|
|
12304
|
+
required
|
|
12305
|
+
} = props;
|
|
12306
|
+
return jsx(GoAFormItem, {
|
|
12307
|
+
label: "Phone number",
|
|
12308
|
+
error: required && !data ? 'Phone number is required' : '',
|
|
12309
|
+
requirement: required ? 'required' : undefined,
|
|
12310
|
+
children: jsx(TextWrapDiv, {
|
|
12311
|
+
children: jsx("div", {
|
|
12312
|
+
"data-testid": `phone-control-${id}`,
|
|
12313
|
+
children: data || ''
|
|
12314
|
+
})
|
|
12315
|
+
})
|
|
12316
|
+
});
|
|
12317
|
+
};
|
|
12318
|
+
const GoAInputBasePhoneNumberReviewControl = withJsonFormsAllOfProps(PhoneNumberReviewControl);
|
|
12319
|
+
|
|
12320
|
+
const isPhoneNumberWithType = createSchemaMatchTester(['number', 'type'], true);
|
|
12321
|
+
const PhoneNumberWithTypeTester = rankWith(4, isPhoneNumberWithType);
|
|
12322
|
+
|
|
12323
|
+
const PhoneNumberWithTypeReviewControl = props => {
|
|
12324
|
+
const {
|
|
12325
|
+
data,
|
|
12326
|
+
id,
|
|
12327
|
+
required
|
|
12328
|
+
} = props;
|
|
12329
|
+
return jsxs(PhoneGrid, {
|
|
12330
|
+
children: [jsx(GoAFormItem, {
|
|
12331
|
+
label: "Phone number",
|
|
12332
|
+
error: required && !(data === null || data === void 0 ? void 0 : data.number) ? 'Phone number is required' : '',
|
|
12333
|
+
requirement: required ? 'required' : undefined,
|
|
12334
|
+
children: jsx(TextWrapDiv, {
|
|
12335
|
+
children: jsx("div", {
|
|
12336
|
+
"data-testid": `phone-number-control-${id}`,
|
|
12337
|
+
children: (data === null || data === void 0 ? void 0 : data.number) || ''
|
|
12338
|
+
})
|
|
12339
|
+
})
|
|
12340
|
+
}), jsx(GoAFormItem, {
|
|
12341
|
+
label: "Phone type",
|
|
12342
|
+
error: required && !(data === null || data === void 0 ? void 0 : data.type) ? 'Phone type is required' : '',
|
|
12343
|
+
requirement: required ? 'required' : undefined,
|
|
12344
|
+
children: jsx(TextWrapDiv, {
|
|
12345
|
+
children: jsx("div", {
|
|
12346
|
+
"data-testid": `phone-type-control-${id}`,
|
|
12347
|
+
children: (data === null || data === void 0 ? void 0 : data.type) || ''
|
|
12348
|
+
})
|
|
12349
|
+
})
|
|
12350
|
+
})]
|
|
12351
|
+
});
|
|
12352
|
+
};
|
|
12353
|
+
const GoAInputBasePhoneNumberWithTypeReviewControl = withJsonFormsAllOfProps(PhoneNumberWithTypeReviewControl);
|
|
12354
|
+
|
|
12190
12355
|
var uncurryThis$1 = functionUncurryThis;
|
|
12191
12356
|
|
|
12192
12357
|
// eslint-disable-next-line es/no-set -- safe
|
|
@@ -13316,6 +13481,12 @@ const GoAReviewRenderers = [...GoABaseReviewRenderers, {
|
|
|
13316
13481
|
}, {
|
|
13317
13482
|
tester: AddressLookUpTester,
|
|
13318
13483
|
renderer: withJsonFormsControlProps(AddressLookUpControlReview)
|
|
13484
|
+
}, {
|
|
13485
|
+
tester: PhoneNumberTester,
|
|
13486
|
+
renderer: withJsonFormsControlProps(PhoneNumberReviewControl)
|
|
13487
|
+
}, {
|
|
13488
|
+
tester: PhoneNumberWithTypeTester,
|
|
13489
|
+
renderer: withJsonFormsControlProps(PhoneNumberWithTypeReviewControl)
|
|
13319
13490
|
}];
|
|
13320
13491
|
const GoARenderers = [...GoABaseRenderers, {
|
|
13321
13492
|
tester: CategorizationStepperRendererTester,
|
|
@@ -13335,10 +13506,16 @@ const GoARenderers = [...GoABaseRenderers, {
|
|
|
13335
13506
|
}, {
|
|
13336
13507
|
tester: FullNameDobTester,
|
|
13337
13508
|
renderer: withJsonFormsControlProps(FullNameDobControl)
|
|
13509
|
+
}, {
|
|
13510
|
+
tester: PhoneNumberTester,
|
|
13511
|
+
renderer: withJsonFormsControlProps(PhoneNumberControl)
|
|
13512
|
+
}, {
|
|
13513
|
+
tester: PhoneNumberWithTypeTester,
|
|
13514
|
+
renderer: withJsonFormsControlProps(PhoneNumberWithTypeControl)
|
|
13338
13515
|
}, {
|
|
13339
13516
|
tester: GoACalculationControlTester,
|
|
13340
13517
|
renderer: GoACalculationControl
|
|
13341
13518
|
}];
|
|
13342
13519
|
const GoACells = [...InputCells];
|
|
13343
13520
|
|
|
13344
|
-
export { ADD_DATALIST_ACTION, ADD_NO_ANONYMOUS_ACTION, ADD_REGISTER_DATA_ACTION, ADD_REGISTER_DATA_ERROR, AddressLookUpControl, AddressLookUpControlReview, AddressLookUpTester, AddressLoopUpControlTableReview, ArrayControl, ArrayControlBase, ArrayControlReview, BooleanComponent, BooleanControl, BooleanRadioComponent, BooleanRadioControl, CategorizationPagesRendererTester, CategorizationStepperRendererTester, CheckboxGroup, ContextProviderC, ContextProviderClass, ContextProviderFactory, EnumCheckboxControl, EnumRadioControl, EnumSelect, FileUploader, FileUploaderReview, FileUploaderTester, FormPageStepper, FormPagesView, FormStepper, FormStepperControl, FormStepperPagesControl, FormStepperReviewControl, FormStepperReviewer, FormStepperView, FullNameControl, FullNameControlReview, FullNameDobControl, FullNameDobReviewControl, FullNameDobTester, FullNameReviewControl, FullNameTester, GoAArrayControlRenderer, GoAArrayControlReviewRenderer, GoAArrayControlTester, GoABaseInputReviewComponent, GoABaseRenderers, GoABaseReviewRenderers, GoABaseTableReviewRenderers, GoABooleanControl, GoABooleanControlTester, GoABooleanRadioControl, GoABooleanRadioControlTester, GoACalculationControl, GoACalculationControlTester, GoACells, GoACheckoutGroupControlTester, GoADateControl, GoADateControlTester, GoADateInput, GoADateTimeControl, GoADateTimeControlTester, GoADateTimeInput, GoAEmailControl, GoAEmailControlTester, GoAEmailInput, GoAEnumCheckboxGroupControl, GoAEnumControl, GoAEnumControlTester, GoAEnumRadioGroupControl, GoAInputBaseControl, GoAInputBaseFullNameControlReview, GoAInputBaseFullNameDobControlReview, GoAInputBaseTableReview, GoAInputBaseTableReviewControl, GoAInputDateControl, GoAInputDateTimeControl, GoAInputEmailControl, GoAInputInteger, GoAInputIntegerControl, GoAInputNumberControl, GoAInputText, GoAInputTextControl, GoAInputTimeControl, GoAIntegerControl, GoAIntegerControlTester, GoAListWithDetailsControlRenderer, GoAListWithDetailsTester, GoANumberControl, GoANumberControlTester, GoANumberInput, GoARadioGroupControlTester, GoARenderers, GoAReviewRenderers, GoATextControl, GoATextControlTester, GoATimeControl, GoATimeControlTester, GoATimeInput, GoInputBaseReview, GoInputBaseReviewControl, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ListWithDetailsControl, MultiLineText, MultiLineTextControl, MultiLineTextControlInput, MultiLineTextControlTester, RadioGroup, categoriesAreValid, createDefaultAjv, enumControl, errMalformedDate, formatSin, isAddressLookup, isFullName, isFullNameDoB, registerReducer, resolveRefs, tryResolveRefs };
|
|
13521
|
+
export { ADD_DATALIST_ACTION, ADD_NO_ANONYMOUS_ACTION, ADD_REGISTER_DATA_ACTION, ADD_REGISTER_DATA_ERROR, AddressLookUpControl, AddressLookUpControlReview, AddressLookUpTester, AddressLoopUpControlTableReview, ArrayControl, ArrayControlBase, ArrayControlReview, BooleanComponent, BooleanControl, BooleanRadioComponent, BooleanRadioControl, CategorizationPagesRendererTester, CategorizationStepperRendererTester, CheckboxGroup, ContextProviderC, ContextProviderClass, ContextProviderFactory, EnumCheckboxControl, EnumRadioControl, EnumSelect, FileUploader, FileUploaderReview, FileUploaderTester, FormPageStepper, FormPagesView, FormStepper, FormStepperControl, FormStepperPagesControl, FormStepperReviewControl, FormStepperReviewer, FormStepperView, FullNameControl, FullNameControlReview, FullNameDobControl, FullNameDobReviewControl, FullNameDobTester, FullNameReviewControl, FullNameTester, GoAArrayControlRenderer, GoAArrayControlReviewRenderer, GoAArrayControlTester, GoABaseInputReviewComponent, GoABaseRenderers, GoABaseReviewRenderers, GoABaseTableReviewRenderers, GoABooleanControl, GoABooleanControlTester, GoABooleanRadioControl, GoABooleanRadioControlTester, GoACalculationControl, GoACalculationControlTester, GoACells, GoACheckoutGroupControlTester, GoADateControl, GoADateControlTester, GoADateInput, GoADateTimeControl, GoADateTimeControlTester, GoADateTimeInput, GoAEmailControl, GoAEmailControlTester, GoAEmailInput, GoAEnumCheckboxGroupControl, GoAEnumControl, GoAEnumControlTester, GoAEnumRadioGroupControl, GoAInputBaseControl, GoAInputBaseFullNameControlReview, GoAInputBaseFullNameDobControlReview, GoAInputBasePhoneNumberReviewControl, GoAInputBasePhoneNumberWithTypeReviewControl, GoAInputBaseTableReview, GoAInputBaseTableReviewControl, GoAInputDateControl, GoAInputDateTimeControl, GoAInputEmailControl, GoAInputInteger, GoAInputIntegerControl, GoAInputNumberControl, GoAInputText, GoAInputTextControl, GoAInputTimeControl, GoAIntegerControl, GoAIntegerControlTester, GoAListWithDetailsControlRenderer, GoAListWithDetailsTester, GoANumberControl, GoANumberControlTester, GoANumberInput, GoAPhoneNumberControl, GoAPhoneNumberWithTypeControl, GoARadioGroupControlTester, GoARenderers, GoAReviewRenderers, GoATextControl, GoATextControlTester, GoATimeControl, GoATimeControlTester, GoATimeInput, GoInputBaseReview, GoInputBaseReviewControl, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ListWithDetailsControl, MultiLineText, MultiLineTextControl, MultiLineTextControlInput, MultiLineTextControlTester, PHONE_REGEX, PhoneGrid, PhoneNumberControl, PhoneNumberReviewControl, PhoneNumberTester, PhoneNumberWithTypeControl, PhoneNumberWithTypeReviewControl, PhoneNumberWithTypeTester, RadioGroup, categoriesAreValid, createDefaultAjv, enumControl, errMalformedDate, formatSin, isAddressLookup, isFullName, isFullNameDoB, isPhoneNumber, isPhoneNumberWithType, registerReducer, resolveRefs, tryResolveRefs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.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",
|
|
@@ -17,7 +17,6 @@ export declare const TableReviewItem: import("styled-components/dist/types").ISt
|
|
|
17
17
|
export declare const TableReviewPageTitleRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
18
|
export declare const TableReviewCategoryLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
19
19
|
export declare const CategoryStatus: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
|
|
20
|
-
export declare const TocPageRef: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
|
|
21
20
|
export declare const CompletionStatus: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
21
|
interface PageStepperRowProps {
|
|
23
22
|
disabled: boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ControlProps } from '@jsonforms/core';
|
|
2
|
+
type PhoneNumberControlProps = ControlProps;
|
|
3
|
+
export declare const PhoneNumberControl: (props: PhoneNumberControlProps) => JSX.Element;
|
|
4
|
+
export declare const GoAPhoneNumberControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ControlProps } from '@jsonforms/core';
|
|
2
|
+
type PhoneNumberReviewControlProps = ControlProps;
|
|
3
|
+
export declare const PhoneNumberReviewControl: (props: PhoneNumberReviewControlProps) => JSX.Element;
|
|
4
|
+
export declare const GoAInputBasePhoneNumberReviewControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const isPhoneNumberWithType: import("@jsonforms/core").Tester;
|
|
2
|
+
export declare const PhoneNumberWithTypeTester: (uischema: import("@jsonforms/core").UISchemaElement, schema: import("@jsonforms/core").JsonSchema, context: import("@jsonforms/core").TesterContext) => number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ControlProps } from '@jsonforms/core';
|
|
2
|
+
export declare const PhoneGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const PHONE_REGEX: RegExp;
|
|
4
|
+
export declare const PhoneNumberWithTypeControl: (props: ControlProps) => JSX.Element;
|
|
5
|
+
export declare const GoAPhoneNumberWithTypeControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ControlProps } from '@jsonforms/core';
|
|
2
|
+
type PhoneNumberWithTypeReviewProps = ControlProps;
|
|
3
|
+
export declare const PhoneNumberWithTypeReviewControl: (props: PhoneNumberWithTypeReviewProps) => JSX.Element;
|
|
4
|
+
export declare const GoAInputBasePhoneNumberWithTypeReviewControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
5
|
+
export {};
|