@abgov/jsonforms-components 2.27.1 → 2.28.1
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 +286 -96
- package/package.json +1 -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,
|
|
@@ -7101,14 +7101,14 @@ let _$5 = t => t,
|
|
|
7101
7101
|
_t21,
|
|
7102
7102
|
_t22,
|
|
7103
7103
|
_t23;
|
|
7104
|
-
const ReviewItem = styled.div(_t$
|
|
7104
|
+
const ReviewItem = styled.div(_t$6 || (_t$6 = _$6`
|
|
7105
7105
|
display: flex;
|
|
7106
7106
|
flex-direction: column;
|
|
7107
7107
|
div:empty {
|
|
7108
7108
|
display: none;
|
|
7109
7109
|
}
|
|
7110
7110
|
`));
|
|
7111
|
-
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$
|
|
7111
|
+
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$6`
|
|
7112
7112
|
margin-bottom: var(--goa-space-m);
|
|
7113
7113
|
padding: var(--goa-space-xl) var(--goa-space-2xl);
|
|
7114
7114
|
border: 1px solid var(--goa-color-greyscale-300);
|
|
@@ -7118,18 +7118,18 @@ const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$5`
|
|
|
7118
7118
|
max-width: 1600px;
|
|
7119
7119
|
}
|
|
7120
7120
|
`));
|
|
7121
|
-
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$
|
|
7121
|
+
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$6`
|
|
7122
7122
|
display: flex;
|
|
7123
7123
|
align-items: center;
|
|
7124
7124
|
justify-content: space-between;
|
|
7125
7125
|
margin-bottom: var(--goa-space-xl);
|
|
7126
7126
|
`));
|
|
7127
|
-
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$
|
|
7127
|
+
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$6`
|
|
7128
7128
|
font-size: var(--goa-space-l);
|
|
7129
7129
|
line-height: var(--goa-space-xl);
|
|
7130
7130
|
font-weight: 300;
|
|
7131
7131
|
`));
|
|
7132
|
-
const Anchor = styled.div(_t5$3 || (_t5$3 = _$
|
|
7132
|
+
const Anchor = styled.div(_t5$3 || (_t5$3 = _$6`
|
|
7133
7133
|
color: #0070c4;
|
|
7134
7134
|
text-decoration: underline;
|
|
7135
7135
|
outline: none;
|
|
@@ -7140,20 +7140,20 @@ const Anchor = styled.div(_t5$3 || (_t5$3 = _$5`
|
|
|
7140
7140
|
background-color: #e6f7ff;
|
|
7141
7141
|
}
|
|
7142
7142
|
`));
|
|
7143
|
-
styled.div(_t6$2 || (_t6$2 = _$
|
|
7143
|
+
styled.div(_t6$2 || (_t6$2 = _$6`
|
|
7144
7144
|
margin-left: var(--goa-space-m);
|
|
7145
7145
|
`));
|
|
7146
|
-
styled.div(_t7$1 || (_t7$1 = _$
|
|
7146
|
+
styled.div(_t7$1 || (_t7$1 = _$6`
|
|
7147
7147
|
margin-bottom: var(--goa-space-m);
|
|
7148
7148
|
`));
|
|
7149
|
-
styled.div(_t8$1 || (_t8$1 = _$
|
|
7149
|
+
styled.div(_t8$1 || (_t8$1 = _$6`
|
|
7150
7150
|
margin: var(--goa-space-s);
|
|
7151
7151
|
width: 100%;
|
|
7152
7152
|
`));
|
|
7153
|
-
styled.h3(_t9$1 || (_t9$1 = _$
|
|
7153
|
+
styled.h3(_t9$1 || (_t9$1 = _$6`
|
|
7154
7154
|
text-transform: capitalize;
|
|
7155
7155
|
`));
|
|
7156
|
-
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$
|
|
7156
|
+
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
|
|
7157
7157
|
@media screen and (max-width: 767px) {
|
|
7158
7158
|
margin-bottom: var(--goa-space-l);
|
|
7159
7159
|
}
|
|
@@ -7163,52 +7163,52 @@ const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$5`
|
|
|
7163
7163
|
margin-bottom: var(--goa-space-l);
|
|
7164
7164
|
}
|
|
7165
7165
|
`));
|
|
7166
|
-
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$
|
|
7166
|
+
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$6`
|
|
7167
7167
|
flex: 1;
|
|
7168
7168
|
margin-bottom: var(--goa-space-m);
|
|
7169
7169
|
font-size: var(--goa-font-size-7);
|
|
7170
7170
|
line-height: var(--goa-line-height-4);
|
|
7171
7171
|
font-weight: var(--goa-font-weight-regular);
|
|
7172
7172
|
`));
|
|
7173
|
-
const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$
|
|
7173
|
+
const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$6`
|
|
7174
7174
|
margin-top: var(--goa-space-2xl);
|
|
7175
7175
|
`));
|
|
7176
|
-
styled.div(_t13$1 || (_t13$1 = _$
|
|
7176
|
+
styled.div(_t13$1 || (_t13$1 = _$6`
|
|
7177
7177
|
margin-bottom: var(--goa-space-2xl);
|
|
7178
7178
|
`));
|
|
7179
|
-
const PageBorder = styled.div(_t14$1 || (_t14$1 = _$
|
|
7179
|
+
const PageBorder = styled.div(_t14$1 || (_t14$1 = _$6`
|
|
7180
7180
|
padding: var(--goa-space-m) var(--goa-space-3xl);
|
|
7181
7181
|
`));
|
|
7182
|
-
const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$
|
|
7182
|
+
const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$6`
|
|
7183
7183
|
.element-style {
|
|
7184
7184
|
max-width: 1600px;
|
|
7185
7185
|
}
|
|
7186
7186
|
`));
|
|
7187
|
-
const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$
|
|
7187
|
+
const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$6`
|
|
7188
7188
|
padding: var(--goa-space-xl) var(--goa-space-2xl);
|
|
7189
7189
|
border: 1px solid var(--goa-color-greyscale-300);
|
|
7190
7190
|
border-radius: var(--goa-border-radius-xl);
|
|
7191
7191
|
`));
|
|
7192
|
-
const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$
|
|
7192
|
+
const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$6`
|
|
7193
7193
|
margin-top: var(--goa-space-xl);
|
|
7194
7194
|
display: flex;
|
|
7195
7195
|
justify-content: space-between;
|
|
7196
7196
|
`));
|
|
7197
|
-
const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$
|
|
7197
|
+
const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$6`
|
|
7198
7198
|
color: var(--goa-color-text-secondary) !important;
|
|
7199
7199
|
margin-bottom: var(--goa-space-l);
|
|
7200
7200
|
`));
|
|
7201
|
-
const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$
|
|
7201
|
+
const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$6`
|
|
7202
7202
|
width: var(--goa-space-xl);
|
|
7203
7203
|
padding-right: var(--goa-space-xl);
|
|
7204
7204
|
align-content: center;
|
|
7205
7205
|
`));
|
|
7206
|
-
const CompletionStatus = styled.div(_t20$1 || (_t20$1 = _$
|
|
7206
|
+
const CompletionStatus = styled.div(_t20$1 || (_t20$1 = _$6`
|
|
7207
7207
|
padding: 0;
|
|
7208
7208
|
margin: 0;
|
|
7209
7209
|
margin-bottom: 0 !important;
|
|
7210
7210
|
`));
|
|
7211
|
-
const PageStepperRow = styled.tr(_t21 || (_t21 = _$
|
|
7211
|
+
const PageStepperRow = styled.tr(_t21 || (_t21 = _$6`
|
|
7212
7212
|
${0}
|
|
7213
7213
|
`), ({
|
|
7214
7214
|
disabled
|
|
@@ -7218,7 +7218,7 @@ const PageStepperRow = styled.tr(_t21 || (_t21 = _$5`
|
|
|
7218
7218
|
` : `
|
|
7219
7219
|
cursor: pointer;
|
|
7220
7220
|
`);
|
|
7221
|
-
const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$
|
|
7221
|
+
const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
|
|
7222
7222
|
& > td {
|
|
7223
7223
|
border: 0 !important;
|
|
7224
7224
|
padding-top: var(--goa-space-l);
|
|
@@ -7230,7 +7230,7 @@ const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$5`
|
|
|
7230
7230
|
border-top: none !important;
|
|
7231
7231
|
}
|
|
7232
7232
|
`));
|
|
7233
|
-
const SummaryRowLink = styled.a(_t23 || (_t23 = _$
|
|
7233
|
+
const SummaryRowLink = styled.a(_t23 || (_t23 = _$6`
|
|
7234
7234
|
position: relative;
|
|
7235
7235
|
top: var(--goa-space-xs);
|
|
7236
7236
|
`));
|
|
@@ -7604,7 +7604,7 @@ const pickPropertyValues = (obj, property, endWithType) => {
|
|
|
7604
7604
|
Object.entries(obj).forEach(function ([key, value]) {
|
|
7605
7605
|
if (key === property) {
|
|
7606
7606
|
values.push(value);
|
|
7607
|
-
} else if (_$
|
|
7607
|
+
} else if (_$c.isObject(value)) {
|
|
7608
7608
|
// if the object type is equal to end type, we are not going to continue the recursive approach
|
|
7609
7609
|
if ((value === null || value === void 0 ? void 0 : value.type) === endWithType) {
|
|
7610
7610
|
if (property in value) {
|
|
@@ -7613,7 +7613,7 @@ const pickPropertyValues = (obj, property, endWithType) => {
|
|
|
7613
7613
|
} else {
|
|
7614
7614
|
values = [...values, ...pickPropertyValues(value, property, endWithType)];
|
|
7615
7615
|
}
|
|
7616
|
-
} else if (_$
|
|
7616
|
+
} else if (_$c.isArray(value)) {
|
|
7617
7617
|
const nextValues = value.map(function (arrayObj) {
|
|
7618
7618
|
return pickPropertyValues(arrayObj, property, endWithType);
|
|
7619
7619
|
});
|
|
@@ -8571,9 +8571,9 @@ const FormStepperPageReviewer = props => {
|
|
|
8571
8571
|
};
|
|
8572
8572
|
withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperPageReviewer)));
|
|
8573
8573
|
|
|
8574
|
-
let _$
|
|
8575
|
-
_t$
|
|
8576
|
-
const BackButtonWrapper = styled.span(_t$
|
|
8574
|
+
let _$5 = t => t,
|
|
8575
|
+
_t$5;
|
|
8576
|
+
const BackButtonWrapper = styled.span(_t$5 || (_t$5 = _$5`
|
|
8577
8577
|
.back-link::before {
|
|
8578
8578
|
content: '';
|
|
8579
8579
|
display: inline-block;
|
|
@@ -8592,6 +8592,11 @@ const BackButtonWrapper = styled.span(_t$4 || (_t$4 = _$4`
|
|
|
8592
8592
|
|
|
8593
8593
|
.back-link {
|
|
8594
8594
|
margin-top: var(--goa-space-m);
|
|
8595
|
+
color: #0070c4;
|
|
8596
|
+
text-decoration: underline;
|
|
8597
|
+
text-underline-offset: 2px;
|
|
8598
|
+
text-decoration-color: currentColor;
|
|
8599
|
+
display: inline-block;
|
|
8595
8600
|
}
|
|
8596
8601
|
display: inline-block;
|
|
8597
8602
|
color: #0070c4;
|
|
@@ -8875,8 +8880,8 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
8875
8880
|
return t;
|
|
8876
8881
|
}
|
|
8877
8882
|
|
|
8878
|
-
let _$
|
|
8879
|
-
_t$
|
|
8883
|
+
let _$4 = t => t,
|
|
8884
|
+
_t$4;
|
|
8880
8885
|
const GoAContextMenuIcon = props => {
|
|
8881
8886
|
return jsx(GoAIconButton, {
|
|
8882
8887
|
icon: props.type,
|
|
@@ -8887,7 +8892,7 @@ const GoAContextMenuIcon = props => {
|
|
|
8887
8892
|
disabled: props.disabled
|
|
8888
8893
|
});
|
|
8889
8894
|
};
|
|
8890
|
-
const GoAContextMenu = styled.div(_t$
|
|
8895
|
+
const GoAContextMenu = styled.div(_t$4 || (_t$4 = _$4`
|
|
8891
8896
|
display: flex;
|
|
8892
8897
|
align-items: center;
|
|
8893
8898
|
background-color: #fff;
|
|
@@ -9314,8 +9319,8 @@ function objectListReducer(state, action) {
|
|
|
9314
9319
|
}
|
|
9315
9320
|
}
|
|
9316
9321
|
|
|
9317
|
-
let _$
|
|
9318
|
-
_t$
|
|
9322
|
+
let _$3 = t => t,
|
|
9323
|
+
_t$3,
|
|
9319
9324
|
_t2$2,
|
|
9320
9325
|
_t3$1,
|
|
9321
9326
|
_t4$1,
|
|
@@ -9335,18 +9340,18 @@ let _$2 = t => t,
|
|
|
9335
9340
|
_t18,
|
|
9336
9341
|
_t19,
|
|
9337
9342
|
_t20;
|
|
9338
|
-
const DeleteDialogContent = styled.div(_t$
|
|
9343
|
+
const DeleteDialogContent = styled.div(_t$3 || (_t$3 = _$3`
|
|
9339
9344
|
margin-bottom: var(--goa-space-m);
|
|
9340
9345
|
`));
|
|
9341
|
-
const NonEmptyCellStyle = styled.div(_t2$2 || (_t2$2 = _$
|
|
9346
|
+
const NonEmptyCellStyle = styled.div(_t2$2 || (_t2$2 = _$3`
|
|
9342
9347
|
goa-table thead th {
|
|
9343
9348
|
background-color: #000:
|
|
9344
9349
|
}
|
|
9345
9350
|
`));
|
|
9346
|
-
const ToolBarHeader = styled.div(_t3$1 || (_t3$1 = _$
|
|
9351
|
+
const ToolBarHeader = styled.div(_t3$1 || (_t3$1 = _$3`
|
|
9347
9352
|
margin-bottom: var(--goa-space-l);
|
|
9348
9353
|
`));
|
|
9349
|
-
const ObjectArrayTitle = styled.h3(_t4$1 || (_t4$1 = _$
|
|
9354
|
+
const ObjectArrayTitle = styled.h3(_t4$1 || (_t4$1 = _$3`
|
|
9350
9355
|
margin-bottom: var(--goa-space-l);
|
|
9351
9356
|
|
|
9352
9357
|
span {
|
|
@@ -9354,77 +9359,77 @@ const ObjectArrayTitle = styled.h3(_t4$1 || (_t4$1 = _$2`
|
|
|
9354
9359
|
font-size: var(--goa-font-size-2);
|
|
9355
9360
|
}
|
|
9356
9361
|
`));
|
|
9357
|
-
const RequiredSpan = styled.span(_t5$1 || (_t5$1 = _$
|
|
9362
|
+
const RequiredSpan = styled.span(_t5$1 || (_t5$1 = _$3`
|
|
9358
9363
|
color: #666666;
|
|
9359
9364
|
font-weight: var(--goa-font-weight-regular);
|
|
9360
9365
|
font-size: var(--goa-font-size-2);
|
|
9361
9366
|
`));
|
|
9362
|
-
const TextCenter = styled.div(_t6$1 || (_t6$1 = _$
|
|
9367
|
+
const TextCenter = styled.div(_t6$1 || (_t6$1 = _$3`
|
|
9363
9368
|
text-align: center;
|
|
9364
9369
|
`));
|
|
9365
|
-
const SideMenuItem = styled.div(_t7 || (_t7 = _$
|
|
9370
|
+
const SideMenuItem = styled.div(_t7 || (_t7 = _$3`
|
|
9366
9371
|
&:hover {
|
|
9367
9372
|
background: #f1f1f1;
|
|
9368
9373
|
}
|
|
9369
9374
|
`));
|
|
9370
|
-
const RowFlex = styled.div(_t8 || (_t8 = _$
|
|
9375
|
+
const RowFlex = styled.div(_t8 || (_t8 = _$3`
|
|
9371
9376
|
display: flex;
|
|
9372
9377
|
align-items: stretch;
|
|
9373
9378
|
`));
|
|
9374
|
-
const RowFlexMenu = styled.div(_t9 || (_t9 = _$
|
|
9379
|
+
const RowFlexMenu = styled.div(_t9 || (_t9 = _$3`
|
|
9375
9380
|
display: flex;
|
|
9376
9381
|
flex-direction: row;
|
|
9377
9382
|
border-bottom: 1px solid #dcdcdc;
|
|
9378
9383
|
`));
|
|
9379
|
-
const FlexTabs = styled.div(_t10 || (_t10 = _$
|
|
9384
|
+
const FlexTabs = styled.div(_t10 || (_t10 = _$3`
|
|
9380
9385
|
flex-direction: column;
|
|
9381
9386
|
flex: 1;
|
|
9382
9387
|
overflow-y: auto !important;
|
|
9383
9388
|
margin-right: 1.5rem;
|
|
9384
9389
|
`));
|
|
9385
|
-
const FlexForm = styled.div(_t11 || (_t11 = _$
|
|
9390
|
+
const FlexForm = styled.div(_t11 || (_t11 = _$3`
|
|
9386
9391
|
flex-direction: column;
|
|
9387
9392
|
margin: 1.5rem 0;
|
|
9388
9393
|
flex: 3;
|
|
9389
9394
|
`));
|
|
9390
|
-
const TabName = styled.div(_t12 || (_t12 = _$
|
|
9395
|
+
const TabName = styled.div(_t12 || (_t12 = _$3`
|
|
9391
9396
|
margin: 1rem 0 1rem 1rem;
|
|
9392
9397
|
font-weight: 700;
|
|
9393
9398
|
`));
|
|
9394
|
-
const Trash = styled.div(_t13 || (_t13 = _$
|
|
9399
|
+
const Trash = styled.div(_t13 || (_t13 = _$3`
|
|
9395
9400
|
margin: 0.75rem 1.25rem 0.75rem 0.75rem;
|
|
9396
9401
|
margin-left: auto;
|
|
9397
9402
|
`));
|
|
9398
|
-
const ListContainer = styled.div(_t14 || (_t14 = _$
|
|
9403
|
+
const ListContainer = styled.div(_t14 || (_t14 = _$3`
|
|
9399
9404
|
padding: 0 1.5rem 0 0;
|
|
9400
9405
|
border: 1px solid #dcdcdc;
|
|
9401
9406
|
`));
|
|
9402
|
-
const TableTHHeader = styled.th(_t15 || (_t15 = _$
|
|
9407
|
+
const TableTHHeader = styled.th(_t15 || (_t15 = _$3`
|
|
9403
9408
|
background-color: var(--goa-color-greyscale-100) !important;
|
|
9404
9409
|
vertical-align: top;
|
|
9405
9410
|
`));
|
|
9406
|
-
const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$
|
|
9411
|
+
const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$3`
|
|
9407
9412
|
display: inline-flex;
|
|
9408
9413
|
align-items: flex-start;
|
|
9409
9414
|
gap: 0.25rem;
|
|
9410
9415
|
font-size: var(--goa-font-size-2);
|
|
9411
9416
|
color: var(--goa-color-interactive-error);
|
|
9412
9417
|
`));
|
|
9413
|
-
const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$
|
|
9418
|
+
const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$3`
|
|
9414
9419
|
display: inline-flex;
|
|
9415
9420
|
align-items: flex-start;
|
|
9416
9421
|
gap: 0.25rem;
|
|
9417
9422
|
font-size: var(--goa-font-size-3);
|
|
9418
9423
|
color: var(--goa-color-interactive-error);
|
|
9419
9424
|
`));
|
|
9420
|
-
styled.label(_t18 || (_t18 = _$
|
|
9425
|
+
styled.label(_t18 || (_t18 = _$3`
|
|
9421
9426
|
color: var(--goa-color-interactive-error);
|
|
9422
9427
|
font-weight: var(--goa-font-weight-regular);
|
|
9423
9428
|
font-size: var(--goa-font-size-3);
|
|
9424
9429
|
line-height: var(--goa-line-height-1);
|
|
9425
9430
|
font-style: normal;
|
|
9426
9431
|
`));
|
|
9427
|
-
styled.div(_t19 || (_t19 = _$
|
|
9432
|
+
styled.div(_t19 || (_t19 = _$3`
|
|
9428
9433
|
margin-top: var(--goa-space-m);
|
|
9429
9434
|
color: var(--goa-color-interactive-error);
|
|
9430
9435
|
font-weight: var(--goa-font-weight-regular);
|
|
@@ -9432,7 +9437,7 @@ styled.div(_t19 || (_t19 = _$2`
|
|
|
9432
9437
|
line-height: var(--goa-line-height-1);
|
|
9433
9438
|
font-style: normal;
|
|
9434
9439
|
`));
|
|
9435
|
-
const HilightCellWarning = styled.div(_t20 || (_t20 = _$
|
|
9440
|
+
const HilightCellWarning = styled.div(_t20 || (_t20 = _$3`
|
|
9436
9441
|
background-color: var(--goa-color-warning-default);
|
|
9437
9442
|
`));
|
|
9438
9443
|
|
|
@@ -10707,14 +10712,14 @@ const ListWithDetailsControl = props => {
|
|
|
10707
10712
|
const GoAListWithDetailsControlRenderer = withJsonFormsArrayLayoutProps(ListWithDetailsControl);
|
|
10708
10713
|
const GoAListWithDetailsTester = rankWith(3, and(uiTypeIs('ListWithDetail')));
|
|
10709
10714
|
|
|
10710
|
-
let _$
|
|
10711
|
-
_t$
|
|
10715
|
+
let _$2 = t => t,
|
|
10716
|
+
_t$2,
|
|
10712
10717
|
_t2$1,
|
|
10713
10718
|
_t3,
|
|
10714
10719
|
_t4,
|
|
10715
10720
|
_t5,
|
|
10716
10721
|
_t6;
|
|
10717
|
-
const SearchBox = styled.div(_t$
|
|
10722
|
+
const SearchBox = styled.div(_t$2 || (_t$2 = _$2`
|
|
10718
10723
|
position: relative;
|
|
10719
10724
|
|
|
10720
10725
|
.suggestions {
|
|
@@ -10756,7 +10761,7 @@ const SearchBox = styled.div(_t$1 || (_t$1 = _$1`
|
|
|
10756
10761
|
pointer-events: none; /* Prevent spinner from interfering with clicks */
|
|
10757
10762
|
}
|
|
10758
10763
|
`));
|
|
10759
|
-
const AddressIndent = styled.div(_t2$1 || (_t2$1 = _$
|
|
10764
|
+
const AddressIndent = styled.div(_t2$1 || (_t2$1 = _$2`
|
|
10760
10765
|
margin: 0 0 var(--goa-space-m) 0;
|
|
10761
10766
|
text-wrap: wrap;
|
|
10762
10767
|
word-break: break-word;
|
|
@@ -10764,20 +10769,20 @@ const AddressIndent = styled.div(_t2$1 || (_t2$1 = _$1`
|
|
|
10764
10769
|
border-radius: var(--goa-border-radius-xl);
|
|
10765
10770
|
padding: var(--goa-space-l);
|
|
10766
10771
|
`));
|
|
10767
|
-
const TextWrap = styled.p(_t3 || (_t3 = _$
|
|
10772
|
+
const TextWrap = styled.p(_t3 || (_t3 = _$2`
|
|
10768
10773
|
text-wrap: auto;
|
|
10769
10774
|
word-break: break-word;
|
|
10770
10775
|
`));
|
|
10771
|
-
const TextWrapDiv = styled.div(_t4 || (_t4 = _$
|
|
10776
|
+
const TextWrapDiv = styled.div(_t4 || (_t4 = _$2`
|
|
10772
10777
|
text-wrap: auto;
|
|
10773
10778
|
word-break: break-word;
|
|
10774
10779
|
`));
|
|
10775
|
-
const LabelDiv = styled.div(_t5 || (_t5 = _$
|
|
10780
|
+
const LabelDiv = styled.div(_t5 || (_t5 = _$2`
|
|
10776
10781
|
font-size: var(--goa-font-size-2);
|
|
10777
10782
|
padding-bottom: var(--goa-space-l);
|
|
10778
10783
|
`));
|
|
10779
10784
|
/* istanbul ignore next */
|
|
10780
|
-
const ListItem = styled.li(_t6 || (_t6 = _$
|
|
10785
|
+
const ListItem = styled.li(_t6 || (_t6 = _$2`
|
|
10781
10786
|
background-color: ${0};
|
|
10782
10787
|
color: ${0};
|
|
10783
10788
|
font-weight: ${0};
|
|
@@ -11065,10 +11070,10 @@ function handleAddressKeyDown(key, value, activeIndex, suggestions, onInputChang
|
|
|
11065
11070
|
return activeIndex;
|
|
11066
11071
|
}
|
|
11067
11072
|
|
|
11068
|
-
let _ = t => t,
|
|
11069
|
-
_t,
|
|
11073
|
+
let _$1 = t => t,
|
|
11074
|
+
_t$1,
|
|
11070
11075
|
_t2;
|
|
11071
|
-
const HelpContentDiv = styled.div(_t || (_t = _`
|
|
11076
|
+
const HelpContentDiv = styled.div(_t$1 || (_t$1 = _$1`
|
|
11072
11077
|
.parent-label {
|
|
11073
11078
|
font-size: 24px;
|
|
11074
11079
|
margin-bottom: var(--goa-space-m);
|
|
@@ -11093,7 +11098,7 @@ const HelpContentDiv = styled.div(_t || (_t = _`
|
|
|
11093
11098
|
margin: var(--goa-space-2xs) 0 var(--goa-space-2xs) 0;
|
|
11094
11099
|
}
|
|
11095
11100
|
`));
|
|
11096
|
-
const InvalidMarkdown = styled.div(_t2 || (_t2 = _`
|
|
11101
|
+
const InvalidMarkdown = styled.div(_t2 || (_t2 = _$1`
|
|
11097
11102
|
color: var(--goa-color-interactive-error);
|
|
11098
11103
|
`));
|
|
11099
11104
|
|
|
@@ -12179,6 +12184,179 @@ const GoAInputBaseFullNameDobControlReview = withJsonFormsAllOfProps(FullNameDob
|
|
|
12179
12184
|
const isFullNameDoB = createSchemaMatchTester(['firstName', 'middleName', 'lastName', 'dateOfBirth'], true);
|
|
12180
12185
|
const FullNameDobTester = rankWith(4, isFullNameDoB);
|
|
12181
12186
|
|
|
12187
|
+
let _ = t => t,
|
|
12188
|
+
_t;
|
|
12189
|
+
const PhoneGrid = styled.div(_t || (_t = _`
|
|
12190
|
+
display: grid;
|
|
12191
|
+
grid-template-columns: 1fr 2fr;
|
|
12192
|
+
gap: 0.2rem;
|
|
12193
|
+
align-items: start;
|
|
12194
|
+
|
|
12195
|
+
goa-form-item {
|
|
12196
|
+
margin-right: 0 !important;
|
|
12197
|
+
}
|
|
12198
|
+
`));
|
|
12199
|
+
const PHONE_REGEX = /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/;
|
|
12200
|
+
const PhoneNumberWithTypeControl = props => {
|
|
12201
|
+
const {
|
|
12202
|
+
data,
|
|
12203
|
+
path,
|
|
12204
|
+
handleChange,
|
|
12205
|
+
enabled,
|
|
12206
|
+
visible,
|
|
12207
|
+
required
|
|
12208
|
+
} = props;
|
|
12209
|
+
const [formData, setFormData] = useState(data || {});
|
|
12210
|
+
const [error, setError] = useState(undefined);
|
|
12211
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12212
|
+
const updateFormData = updated => {
|
|
12213
|
+
setFormData(updated);
|
|
12214
|
+
if (updated.number && !PHONE_REGEX.test(updated.number)) {
|
|
12215
|
+
setError('Enter a valid phone number (e.g., (780) 123-4567)');
|
|
12216
|
+
} else {
|
|
12217
|
+
setError(undefined);
|
|
12218
|
+
}
|
|
12219
|
+
handleChange(path, updated);
|
|
12220
|
+
};
|
|
12221
|
+
return jsx(Visible, {
|
|
12222
|
+
visible: visible,
|
|
12223
|
+
children: jsxs(PhoneGrid, {
|
|
12224
|
+
children: [jsx(GoAFormItem, {
|
|
12225
|
+
label: "Phone type",
|
|
12226
|
+
requirement: required ? 'required' : undefined,
|
|
12227
|
+
children: jsxs(GoADropdown, {
|
|
12228
|
+
name: "type",
|
|
12229
|
+
value: formData.type || '',
|
|
12230
|
+
disabled: !enabled,
|
|
12231
|
+
onChange: (name, value) => updateFormData(Object.assign({}, formData, {
|
|
12232
|
+
type: value
|
|
12233
|
+
})),
|
|
12234
|
+
children: [jsx(GoADropdownItem, {
|
|
12235
|
+
value: "Mobile"
|
|
12236
|
+
}), jsx(GoADropdownItem, {
|
|
12237
|
+
value: "Landline"
|
|
12238
|
+
})]
|
|
12239
|
+
})
|
|
12240
|
+
}), jsx(GoAFormItem, {
|
|
12241
|
+
label: "Phone number",
|
|
12242
|
+
error: error,
|
|
12243
|
+
requirement: required ? 'required' : undefined,
|
|
12244
|
+
children: jsx(GoAInput, {
|
|
12245
|
+
type: "tel",
|
|
12246
|
+
name: "number",
|
|
12247
|
+
placeholder: "(000) 000-0000",
|
|
12248
|
+
value: formData.number || '',
|
|
12249
|
+
disabled: !enabled,
|
|
12250
|
+
onChange: (name, value) => updateFormData(Object.assign({}, formData, {
|
|
12251
|
+
number: value
|
|
12252
|
+
}))
|
|
12253
|
+
})
|
|
12254
|
+
})]
|
|
12255
|
+
})
|
|
12256
|
+
});
|
|
12257
|
+
};
|
|
12258
|
+
const GoAPhoneNumberWithTypeControl = withJsonFormsControlProps(PhoneNumberWithTypeControl);
|
|
12259
|
+
|
|
12260
|
+
const PhoneNumberControl = props => {
|
|
12261
|
+
const {
|
|
12262
|
+
data,
|
|
12263
|
+
path,
|
|
12264
|
+
schema,
|
|
12265
|
+
handleChange,
|
|
12266
|
+
enabled,
|
|
12267
|
+
visible,
|
|
12268
|
+
required
|
|
12269
|
+
} = props;
|
|
12270
|
+
const [error, setError] = useState('');
|
|
12271
|
+
const handleInputChange = (name, value) => {
|
|
12272
|
+
if (value && !PHONE_REGEX.test(value)) {
|
|
12273
|
+
setError('Must be a valid 10-digit phone number in format (000) 000-0000');
|
|
12274
|
+
} else {
|
|
12275
|
+
setError('');
|
|
12276
|
+
}
|
|
12277
|
+
handleChange(path, value);
|
|
12278
|
+
};
|
|
12279
|
+
return jsx(Visible, {
|
|
12280
|
+
visible: visible,
|
|
12281
|
+
children: jsx(GoAFormItem, {
|
|
12282
|
+
label: (schema === null || schema === void 0 ? void 0 : schema.title) || 'Phone number',
|
|
12283
|
+
requirement: required ? 'required' : undefined,
|
|
12284
|
+
error: error,
|
|
12285
|
+
testId: `form-item-${path}`,
|
|
12286
|
+
children: jsx(GoAInput, {
|
|
12287
|
+
type: "tel",
|
|
12288
|
+
name: path,
|
|
12289
|
+
disabled: !enabled,
|
|
12290
|
+
"aria-label": "phone number input",
|
|
12291
|
+
testId: `phone-input-${path}`,
|
|
12292
|
+
value: data || '',
|
|
12293
|
+
onChange: (name, value) => handleInputChange(name, value),
|
|
12294
|
+
placeholder: "(000) 000-0000",
|
|
12295
|
+
width: "100%"
|
|
12296
|
+
})
|
|
12297
|
+
})
|
|
12298
|
+
});
|
|
12299
|
+
};
|
|
12300
|
+
const GoAPhoneNumberControl = withJsonFormsControlProps(PhoneNumberControl);
|
|
12301
|
+
|
|
12302
|
+
const isPhoneNumber = createSchemaMatchTester(['phoneNumber'], false);
|
|
12303
|
+
const PhoneNumberTester = rankWith(3, isPhoneNumber);
|
|
12304
|
+
|
|
12305
|
+
const PhoneNumberReviewControl = props => {
|
|
12306
|
+
const {
|
|
12307
|
+
data,
|
|
12308
|
+
id,
|
|
12309
|
+
required
|
|
12310
|
+
} = props;
|
|
12311
|
+
return jsx(GoAFormItem, {
|
|
12312
|
+
label: "Phone number",
|
|
12313
|
+
error: required && !data ? 'Phone number is required' : '',
|
|
12314
|
+
requirement: required ? 'required' : undefined,
|
|
12315
|
+
children: jsx(TextWrapDiv, {
|
|
12316
|
+
children: jsx("div", {
|
|
12317
|
+
"data-testid": `phone-control-${id}`,
|
|
12318
|
+
children: data || ''
|
|
12319
|
+
})
|
|
12320
|
+
})
|
|
12321
|
+
});
|
|
12322
|
+
};
|
|
12323
|
+
const GoAInputBasePhoneNumberReviewControl = withJsonFormsAllOfProps(PhoneNumberReviewControl);
|
|
12324
|
+
|
|
12325
|
+
const isPhoneNumberWithType = createSchemaMatchTester(['number', 'type'], true);
|
|
12326
|
+
const PhoneNumberWithTypeTester = rankWith(4, isPhoneNumberWithType);
|
|
12327
|
+
|
|
12328
|
+
const PhoneNumberWithTypeReviewControl = props => {
|
|
12329
|
+
const {
|
|
12330
|
+
data,
|
|
12331
|
+
id,
|
|
12332
|
+
required
|
|
12333
|
+
} = props;
|
|
12334
|
+
return jsxs(PhoneGrid, {
|
|
12335
|
+
children: [jsx(GoAFormItem, {
|
|
12336
|
+
label: "Phone number",
|
|
12337
|
+
error: required && !(data === null || data === void 0 ? void 0 : data.number) ? 'Phone number is required' : '',
|
|
12338
|
+
requirement: required ? 'required' : undefined,
|
|
12339
|
+
children: jsx(TextWrapDiv, {
|
|
12340
|
+
children: jsx("div", {
|
|
12341
|
+
"data-testid": `phone-number-control-${id}`,
|
|
12342
|
+
children: (data === null || data === void 0 ? void 0 : data.number) || ''
|
|
12343
|
+
})
|
|
12344
|
+
})
|
|
12345
|
+
}), jsx(GoAFormItem, {
|
|
12346
|
+
label: "Phone type",
|
|
12347
|
+
error: required && !(data === null || data === void 0 ? void 0 : data.type) ? 'Phone type is required' : '',
|
|
12348
|
+
requirement: required ? 'required' : undefined,
|
|
12349
|
+
children: jsx(TextWrapDiv, {
|
|
12350
|
+
children: jsx("div", {
|
|
12351
|
+
"data-testid": `phone-type-control-${id}`,
|
|
12352
|
+
children: (data === null || data === void 0 ? void 0 : data.type) || ''
|
|
12353
|
+
})
|
|
12354
|
+
})
|
|
12355
|
+
})]
|
|
12356
|
+
});
|
|
12357
|
+
};
|
|
12358
|
+
const GoAInputBasePhoneNumberWithTypeReviewControl = withJsonFormsAllOfProps(PhoneNumberWithTypeReviewControl);
|
|
12359
|
+
|
|
12182
12360
|
var uncurryThis$1 = functionUncurryThis;
|
|
12183
12361
|
|
|
12184
12362
|
// eslint-disable-next-line es/no-set -- safe
|
|
@@ -13308,6 +13486,12 @@ const GoAReviewRenderers = [...GoABaseReviewRenderers, {
|
|
|
13308
13486
|
}, {
|
|
13309
13487
|
tester: AddressLookUpTester,
|
|
13310
13488
|
renderer: withJsonFormsControlProps(AddressLookUpControlReview)
|
|
13489
|
+
}, {
|
|
13490
|
+
tester: PhoneNumberTester,
|
|
13491
|
+
renderer: withJsonFormsControlProps(PhoneNumberReviewControl)
|
|
13492
|
+
}, {
|
|
13493
|
+
tester: PhoneNumberWithTypeTester,
|
|
13494
|
+
renderer: withJsonFormsControlProps(PhoneNumberWithTypeReviewControl)
|
|
13311
13495
|
}];
|
|
13312
13496
|
const GoARenderers = [...GoABaseRenderers, {
|
|
13313
13497
|
tester: CategorizationStepperRendererTester,
|
|
@@ -13327,10 +13511,16 @@ const GoARenderers = [...GoABaseRenderers, {
|
|
|
13327
13511
|
}, {
|
|
13328
13512
|
tester: FullNameDobTester,
|
|
13329
13513
|
renderer: withJsonFormsControlProps(FullNameDobControl)
|
|
13514
|
+
}, {
|
|
13515
|
+
tester: PhoneNumberTester,
|
|
13516
|
+
renderer: withJsonFormsControlProps(PhoneNumberControl)
|
|
13517
|
+
}, {
|
|
13518
|
+
tester: PhoneNumberWithTypeTester,
|
|
13519
|
+
renderer: withJsonFormsControlProps(PhoneNumberWithTypeControl)
|
|
13330
13520
|
}, {
|
|
13331
13521
|
tester: GoACalculationControlTester,
|
|
13332
13522
|
renderer: GoACalculationControl
|
|
13333
13523
|
}];
|
|
13334
13524
|
const GoACells = [...InputCells];
|
|
13335
13525
|
|
|
13336
|
-
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 };
|
|
13526
|
+
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.1",
|
|
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",
|
|
@@ -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 {};
|