@abgov/jsonforms-components 2.36.0 → 2.36.2
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 +16 -48
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -928,7 +928,6 @@ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'somethin
|
|
|
928
928
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$c || (DESCRIPTORS$c && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
929
929
|
|
|
930
930
|
var functionName = {
|
|
931
|
-
EXISTS: EXISTS,
|
|
932
931
|
PROPER: PROPER,
|
|
933
932
|
CONFIGURABLE: CONFIGURABLE
|
|
934
933
|
};
|
|
@@ -2329,9 +2328,6 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
|
2329
2328
|
};
|
|
2330
2329
|
|
|
2331
2330
|
var stringMultibyte = {
|
|
2332
|
-
// `String.prototype.codePointAt` method
|
|
2333
|
-
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
2334
|
-
codeAt: createMethod$2(false),
|
|
2335
2331
|
// `String.prototype.at` method
|
|
2336
2332
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
2337
2333
|
charAt: createMethod$2(true)
|
|
@@ -4042,9 +4038,7 @@ if (!set || !clear) {
|
|
|
4042
4038
|
}
|
|
4043
4039
|
|
|
4044
4040
|
var task$1 = {
|
|
4045
|
-
set: set
|
|
4046
|
-
clear: clear
|
|
4047
|
-
};
|
|
4041
|
+
set: set};
|
|
4048
4042
|
|
|
4049
4043
|
var global$8 = global$q;
|
|
4050
4044
|
var DESCRIPTORS$3 = descriptors;
|
|
@@ -5217,7 +5211,7 @@ const PageReviewValueCol = styled.td(_t5$5 || (_t5$5 = _$a`
|
|
|
5217
5211
|
`));
|
|
5218
5212
|
//Check and unchecked are different heights otherwise
|
|
5219
5213
|
const CheckboxWrapper = styled.div(_t6$3 || (_t6$3 = _$a`
|
|
5220
|
-
height: 28px;
|
|
5214
|
+
min-height: 28px;
|
|
5221
5215
|
`));
|
|
5222
5216
|
styled.h4(_t7$2 || (_t7$2 = _$a`
|
|
5223
5217
|
margin: 0 0 0.25rem 0;
|
|
@@ -5400,12 +5394,6 @@ var createMethod$1 = function (TYPE) {
|
|
|
5400
5394
|
};
|
|
5401
5395
|
|
|
5402
5396
|
var stringTrim = {
|
|
5403
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
5404
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
5405
|
-
start: createMethod$1(1),
|
|
5406
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
5407
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
5408
|
-
end: createMethod$1(2),
|
|
5409
5397
|
// `String.prototype.trim` method
|
|
5410
5398
|
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
5411
5399
|
trim: createMethod$1(3)
|
|
@@ -5884,7 +5872,6 @@ const GoAInputText = props => {
|
|
|
5884
5872
|
setIsVisited();
|
|
5885
5873
|
}
|
|
5886
5874
|
onChangeForInputControl({
|
|
5887
|
-
name,
|
|
5888
5875
|
value: formattedValue,
|
|
5889
5876
|
controlProps: props
|
|
5890
5877
|
});
|
|
@@ -5894,7 +5881,6 @@ const GoAInputText = props => {
|
|
|
5894
5881
|
setIsVisited();
|
|
5895
5882
|
}
|
|
5896
5883
|
onBlurForTextControl({
|
|
5897
|
-
name,
|
|
5898
5884
|
controlProps: props,
|
|
5899
5885
|
value: autoCapitalize ? value.toUpperCase() : value
|
|
5900
5886
|
});
|
|
@@ -5951,14 +5937,12 @@ const MultiLineText = props => {
|
|
|
5951
5937
|
}
|
|
5952
5938
|
if (value.length === 0 || required && errors.length === 0 && value.length > 0) {
|
|
5953
5939
|
onKeyPressForTextControl({
|
|
5954
|
-
name,
|
|
5955
5940
|
value: newValue,
|
|
5956
5941
|
key,
|
|
5957
5942
|
controlProps: props
|
|
5958
5943
|
});
|
|
5959
5944
|
}
|
|
5960
5945
|
onChangeForInputControl({
|
|
5961
|
-
name,
|
|
5962
5946
|
value: newValue,
|
|
5963
5947
|
controlProps: props
|
|
5964
5948
|
});
|
|
@@ -6079,14 +6063,12 @@ const GoADateInput = props => {
|
|
|
6079
6063
|
setIsVisited();
|
|
6080
6064
|
}
|
|
6081
6065
|
onChangeForDateControl({
|
|
6082
|
-
name,
|
|
6083
6066
|
value,
|
|
6084
6067
|
controlProps: props
|
|
6085
6068
|
});
|
|
6086
6069
|
},
|
|
6087
6070
|
onKeyPress: (name, value, key) => {
|
|
6088
6071
|
onKeyPressForDateControl({
|
|
6089
|
-
name,
|
|
6090
6072
|
value,
|
|
6091
6073
|
key,
|
|
6092
6074
|
controlProps: props
|
|
@@ -6097,7 +6079,6 @@ const GoADateInput = props => {
|
|
|
6097
6079
|
setIsVisited();
|
|
6098
6080
|
}
|
|
6099
6081
|
onBlurForDateControl({
|
|
6100
|
-
name,
|
|
6101
6082
|
value,
|
|
6102
6083
|
controlProps: props
|
|
6103
6084
|
});
|
|
@@ -6152,7 +6133,6 @@ const GoANumberInput = props => {
|
|
|
6152
6133
|
setIsVisited();
|
|
6153
6134
|
}
|
|
6154
6135
|
onBlurForNumericControl({
|
|
6155
|
-
name,
|
|
6156
6136
|
value,
|
|
6157
6137
|
controlProps: props
|
|
6158
6138
|
});
|
|
@@ -6162,7 +6142,6 @@ const GoANumberInput = props => {
|
|
|
6162
6142
|
setIsVisited();
|
|
6163
6143
|
}
|
|
6164
6144
|
onChangeForNumericControl({
|
|
6165
|
-
name,
|
|
6166
6145
|
value,
|
|
6167
6146
|
controlProps: props
|
|
6168
6147
|
});
|
|
@@ -6217,7 +6196,6 @@ const GoAInputInteger = props => {
|
|
|
6217
6196
|
setIsVisited();
|
|
6218
6197
|
}
|
|
6219
6198
|
onBlurForNumericControl({
|
|
6220
|
-
name,
|
|
6221
6199
|
value,
|
|
6222
6200
|
controlProps: props
|
|
6223
6201
|
});
|
|
@@ -6227,7 +6205,6 @@ const GoAInputInteger = props => {
|
|
|
6227
6205
|
setIsVisited();
|
|
6228
6206
|
}
|
|
6229
6207
|
onChangeForNumericControl({
|
|
6230
|
-
name,
|
|
6231
6208
|
value,
|
|
6232
6209
|
controlProps: props
|
|
6233
6210
|
});
|
|
@@ -6269,14 +6246,12 @@ const GoADateTimeInput = props => {
|
|
|
6269
6246
|
setIsVisited();
|
|
6270
6247
|
}
|
|
6271
6248
|
onChangeForDateTimeControl({
|
|
6272
|
-
name,
|
|
6273
6249
|
value,
|
|
6274
6250
|
controlProps: props
|
|
6275
6251
|
});
|
|
6276
6252
|
},
|
|
6277
6253
|
onKeyPress: (name, value, key) => {
|
|
6278
6254
|
onKeyPressForDateControl({
|
|
6279
|
-
name,
|
|
6280
6255
|
value,
|
|
6281
6256
|
key,
|
|
6282
6257
|
controlProps: props
|
|
@@ -6287,7 +6262,6 @@ const GoADateTimeInput = props => {
|
|
|
6287
6262
|
setIsVisited();
|
|
6288
6263
|
}
|
|
6289
6264
|
onBlurForDateControl({
|
|
6290
|
-
name,
|
|
6291
6265
|
value,
|
|
6292
6266
|
controlProps: props
|
|
6293
6267
|
});
|
|
@@ -6341,7 +6315,6 @@ const GoATimeInput = props => {
|
|
|
6341
6315
|
onChange: (name, value) => {},
|
|
6342
6316
|
onKeyPress: (name, value, key) => {
|
|
6343
6317
|
onKeyPressForTimeControl({
|
|
6344
|
-
name,
|
|
6345
6318
|
value,
|
|
6346
6319
|
key,
|
|
6347
6320
|
controlProps: props
|
|
@@ -6982,7 +6955,6 @@ const GoAEmailInput = props => {
|
|
|
6982
6955
|
setIsVisited(true);
|
|
6983
6956
|
}
|
|
6984
6957
|
onChangeForInputControl({
|
|
6985
|
-
name,
|
|
6986
6958
|
value,
|
|
6987
6959
|
controlProps: props
|
|
6988
6960
|
});
|
|
@@ -6992,7 +6964,6 @@ const GoAEmailInput = props => {
|
|
|
6992
6964
|
setIsVisited(true);
|
|
6993
6965
|
}
|
|
6994
6966
|
onBlurForTextControl({
|
|
6995
|
-
name,
|
|
6996
6967
|
value,
|
|
6997
6968
|
controlProps: props
|
|
6998
6969
|
});
|
|
@@ -7608,11 +7579,7 @@ var createMethod = function (IS_RIGHT) {
|
|
|
7608
7579
|
var arrayReduce = {
|
|
7609
7580
|
// `Array.prototype.reduce` method
|
|
7610
7581
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
7611
|
-
left: createMethod(false)
|
|
7612
|
-
// `Array.prototype.reduceRight` method
|
|
7613
|
-
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
|
7614
|
-
right: createMethod(true)
|
|
7615
|
-
};
|
|
7582
|
+
left: createMethod(false)};
|
|
7616
7583
|
|
|
7617
7584
|
var fails$2 = fails$v;
|
|
7618
7585
|
|
|
@@ -8989,12 +8956,8 @@ const TaskList = ({
|
|
|
8989
8956
|
}
|
|
8990
8957
|
return sections;
|
|
8991
8958
|
}, [categories]);
|
|
8992
|
-
|
|
8993
|
-
const
|
|
8994
|
-
const completedGroups = useMemo(() => mergedSections.filter(section => {
|
|
8995
|
-
const visibleCats = section.categories.filter(shouldShow);
|
|
8996
|
-
return visibleCats.length > 0 && visibleCats.every(cat => cat.isCompleted);
|
|
8997
|
-
}).length, [mergedSections]);
|
|
8959
|
+
const totalPages = useMemo(() => mergedSections.reduce((count, section) => count + section.categories.filter(shouldShow).length, 0), [mergedSections]);
|
|
8960
|
+
const completedPages = useMemo(() => mergedSections.reduce((count, section) => count + section.categories.filter(cat => shouldShow(cat) && cat.isCompleted).length, 0), [mergedSections]);
|
|
8998
8961
|
let globalIndex = 0;
|
|
8999
8962
|
let sectionIndex = 1;
|
|
9000
8963
|
return jsx(PageBorder, {
|
|
@@ -9012,8 +8975,8 @@ const TaskList = ({
|
|
|
9012
8975
|
ml: "xl",
|
|
9013
8976
|
children: subtitle
|
|
9014
8977
|
}), jsx(ApplicationStatus, {
|
|
9015
|
-
completedGroups:
|
|
9016
|
-
totalGroups:
|
|
8978
|
+
completedGroups: completedPages,
|
|
8979
|
+
totalGroups: totalPages
|
|
9017
8980
|
}), jsx(GoATable, {
|
|
9018
8981
|
width: "100%",
|
|
9019
8982
|
children: jsxs("tbody", {
|
|
@@ -10435,7 +10398,6 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
10435
10398
|
error: error === null || error === void 0 ? void 0 : error.message,
|
|
10436
10399
|
isRequired: (_a = required === null || required === void 0 ? void 0 : required.includes(tableKeys[element])) !== null && _a !== void 0 ? _a : false,
|
|
10437
10400
|
errors: errors !== undefined ? errors : [],
|
|
10438
|
-
count: count !== undefined ? count : -1,
|
|
10439
10401
|
element,
|
|
10440
10402
|
rowPath,
|
|
10441
10403
|
index: i
|
|
@@ -10743,7 +10705,7 @@ const ObjectArrayControl = props => {
|
|
|
10743
10705
|
visible: visible,
|
|
10744
10706
|
"data-testid": "jsonforms-object-list-wrapper",
|
|
10745
10707
|
children: [jsxs(ToolBarHeader, {
|
|
10746
|
-
children: [isInReview
|
|
10708
|
+
children: [isInReview ? listTitle ? isListWithDetail && additionalProps.required && (data === null || data === undefined) ? jsx("b", {
|
|
10747
10709
|
children: jsxs(ListWithDetailWarningIconDiv, {
|
|
10748
10710
|
children: [jsx(GoAIcon, {
|
|
10749
10711
|
type: "warning",
|
|
@@ -10764,9 +10726,15 @@ const ObjectArrayControl = props => {
|
|
|
10764
10726
|
},
|
|
10765
10727
|
children: maxItemsError
|
|
10766
10728
|
})]
|
|
10767
|
-
})
|
|
10729
|
+
}) : null : listTitle && jsxs(ObjectArrayTitle, {
|
|
10768
10730
|
children: [listTitle, " ", jsx("span", {
|
|
10769
10731
|
children: additionalProps.required && '(required)'
|
|
10732
|
+
}), maxItemsError && jsx("span", {
|
|
10733
|
+
style: {
|
|
10734
|
+
color: 'red',
|
|
10735
|
+
marginLeft: '1rem'
|
|
10736
|
+
},
|
|
10737
|
+
children: maxItemsError
|
|
10770
10738
|
})]
|
|
10771
10739
|
}), !isInReview && jsx(ObjectArrayToolBar, {
|
|
10772
10740
|
errors: errors,
|
|
@@ -12447,7 +12415,7 @@ const NameInputs = ({
|
|
|
12447
12415
|
// eslint-disable-next-line
|
|
12448
12416
|
const handleRequiredFieldBlur = (name, updatedData) => {
|
|
12449
12417
|
const err = Object.assign({}, errors);
|
|
12450
|
-
if ((!(data === null || data === void 0 ? void 0 : data[name]) || (data === null || data === void 0 ? void 0 : data[name]) === '') && requiredFields.includes(name) && (
|
|
12418
|
+
if ((!(data === null || data === void 0 ? void 0 : data[name]) || (data === null || data === void 0 ? void 0 : data[name]) === '') && requiredFields.includes(name) && (true)) {
|
|
12451
12419
|
const modifiedName = name === 'firstName' ? 'First name' : name === 'lastName' ? 'Last name' : '';
|
|
12452
12420
|
err[name] = `${modifiedName} is required`;
|
|
12453
12421
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.2",
|
|
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",
|