@abgov/jsonforms-components 1.56.2 → 1.57.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 +6 -7
- package/package.json +1 -1
- package/src/lib/Additional/GoACalloutControl.d.ts +1 -1
- package/src/lib/Controls/FileUploader/ContextMenu.d.ts +1 -1
- package/src/lib/Controls/FormStepper/FormStepperControl.d.ts +1 -1
- package/src/lib/Controls/FormStepper/PageStepperControl.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -6195,7 +6195,6 @@ const FormStepperView = props => {
|
|
|
6195
6195
|
const submitForm = submitFormFunction && submitFormFunction();
|
|
6196
6196
|
const optionProps = uischema.options || {};
|
|
6197
6197
|
const [isOpen, setIsOpen] = useState(false);
|
|
6198
|
-
const [isSelected, setIsSelected] = useState(false);
|
|
6199
6198
|
const handleSubmit = () => {
|
|
6200
6199
|
if (submitForm) {
|
|
6201
6200
|
submitForm(data);
|
|
@@ -6217,9 +6216,7 @@ const FormStepperView = props => {
|
|
|
6217
6216
|
className: "formStepper",
|
|
6218
6217
|
children: [jsxs(GoAFormStepper, {
|
|
6219
6218
|
testId: `form-stepper-headers-${(_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.testId}` || 'form-stepper-test',
|
|
6220
|
-
step: isSelected === false ? -1 : activeId + 1,
|
|
6221
6219
|
onChange: step => {
|
|
6222
|
-
setIsSelected(true);
|
|
6223
6220
|
goToPage(step - 1);
|
|
6224
6221
|
},
|
|
6225
6222
|
children: [categories === null || categories === void 0 ? void 0 : categories.map((c, index) => {
|
|
@@ -6679,7 +6676,6 @@ const FileUploader = _a => {
|
|
|
6679
6676
|
const helpText = (_p = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _p === void 0 ? void 0 : _p.help;
|
|
6680
6677
|
const sentenceCaseLabel = convertToSentenceCase(label);
|
|
6681
6678
|
return jsxs(FileUploaderStyle, {
|
|
6682
|
-
id: "file-upload",
|
|
6683
6679
|
className: "FileUploader",
|
|
6684
6680
|
children: [required ? jsx(GoAFormItem, {
|
|
6685
6681
|
label: sentenceCaseLabel,
|
|
@@ -7427,6 +7423,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7427
7423
|
},
|
|
7428
7424
|
children: !isInReview && jsx(GoAIconButton, {
|
|
7429
7425
|
icon: "trash",
|
|
7426
|
+
testId: "trash-icon-button",
|
|
7430
7427
|
"aria-label": `remove-element-${num}`,
|
|
7431
7428
|
onClick: () => openDeleteDialog(num)
|
|
7432
7429
|
})
|
|
@@ -9034,6 +9031,7 @@ const AddressViews = ({
|
|
|
9034
9031
|
gap: "s",
|
|
9035
9032
|
children: [jsxs(GoAFormItem, {
|
|
9036
9033
|
label: "Province",
|
|
9034
|
+
error: !isAlbertaAddress && (data === null || data === void 0 ? void 0 : data.subdivisionCode) === undefined ? 'Province is required' : '',
|
|
9037
9035
|
children: [isAlbertaAddress && jsx("div", {
|
|
9038
9036
|
"data-testid": "address-form-province-view",
|
|
9039
9037
|
children: "Alberta"
|
|
@@ -9114,7 +9112,7 @@ const NameInputs = ({
|
|
|
9114
9112
|
mb: "m",
|
|
9115
9113
|
testId: "wrapper",
|
|
9116
9114
|
children: [jsx(GoAFormItem, {
|
|
9117
|
-
testId: "
|
|
9115
|
+
testId: "form-item-first-name",
|
|
9118
9116
|
label: "First name",
|
|
9119
9117
|
requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('firstName')) ? 'required' : undefined,
|
|
9120
9118
|
error: (_a = errors === null || errors === void 0 ? void 0 : errors['firstName']) !== null && _a !== void 0 ? _a : '',
|
|
@@ -9132,7 +9130,7 @@ const NameInputs = ({
|
|
|
9132
9130
|
width: "100%"
|
|
9133
9131
|
})
|
|
9134
9132
|
}), jsx(GoAFormItem, {
|
|
9135
|
-
testId: "
|
|
9133
|
+
testId: "form-item-middle-name",
|
|
9136
9134
|
label: "Middle name",
|
|
9137
9135
|
requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('middleName')) ? 'required' : undefined,
|
|
9138
9136
|
children: jsx(GoAInput, {
|
|
@@ -9146,7 +9144,7 @@ const NameInputs = ({
|
|
|
9146
9144
|
width: "100%"
|
|
9147
9145
|
})
|
|
9148
9146
|
}), jsx(GoAFormItem, {
|
|
9149
|
-
testId: "
|
|
9147
|
+
testId: "form-item-last-name",
|
|
9150
9148
|
label: "Last name",
|
|
9151
9149
|
requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('lastName')) ? 'required' : undefined,
|
|
9152
9150
|
error: (_b = errors === null || errors === void 0 ? void 0 : errors['lastName']) !== null && _b !== void 0 ? _b : '',
|
|
@@ -9343,6 +9341,7 @@ const FullNameDobControl = props => {
|
|
|
9343
9341
|
label: "Last name",
|
|
9344
9342
|
requirement: ((_d = schema === null || schema === void 0 ? void 0 : schema.required) === null || _d === void 0 ? void 0 : _d.includes('lastName')) ? 'required' : undefined,
|
|
9345
9343
|
error: (_e = errors === null || errors === void 0 ? void 0 : errors['lastName']) !== null && _e !== void 0 ? _e : '',
|
|
9344
|
+
testId: "form-item-last-name",
|
|
9346
9345
|
children: jsx(GoAInput, {
|
|
9347
9346
|
type: "text",
|
|
9348
9347
|
name: "lastName",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RankedTester } from '@jsonforms/core';
|
|
3
|
-
import { GoACalloutSize, GoACalloutType } from '@abgov/react-components
|
|
3
|
+
import { GoACalloutSize, GoACalloutType } from '@abgov/react-components';
|
|
4
4
|
export interface CalloutProps {
|
|
5
5
|
size?: GoACalloutSize;
|
|
6
6
|
type?: GoACalloutType;
|