@abgov/jsonforms-components 1.49.0 → 1.49.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
CHANGED
|
@@ -7867,7 +7867,8 @@ const AddressInputs = ({
|
|
|
7867
7867
|
readOnly,
|
|
7868
7868
|
errors,
|
|
7869
7869
|
handleOnBlur,
|
|
7870
|
-
requiredFields
|
|
7870
|
+
requiredFields,
|
|
7871
|
+
enabled
|
|
7871
7872
|
}) => {
|
|
7872
7873
|
var _a, _b;
|
|
7873
7874
|
const provinces = [{
|
|
@@ -7916,7 +7917,7 @@ const AddressInputs = ({
|
|
|
7916
7917
|
children: jsx(GoAInput, {
|
|
7917
7918
|
name: "addressLine2",
|
|
7918
7919
|
testId: "address-form-address2",
|
|
7919
|
-
disabled:
|
|
7920
|
+
disabled: !enabled,
|
|
7920
7921
|
readonly: readOnly,
|
|
7921
7922
|
ariaLabel: 'address-form-address2',
|
|
7922
7923
|
placeholder: "Unit number, suite, apartment",
|
|
@@ -7935,7 +7936,7 @@ const AddressInputs = ({
|
|
|
7935
7936
|
name: "municipality",
|
|
7936
7937
|
testId: "address-form-city",
|
|
7937
7938
|
ariaLabel: 'address-form-city',
|
|
7938
|
-
disabled:
|
|
7939
|
+
disabled: !enabled,
|
|
7939
7940
|
readonly: readOnly,
|
|
7940
7941
|
value: (address === null || address === void 0 ? void 0 : address.municipality) || '',
|
|
7941
7942
|
onChange: (name, value) => handleInputChange(name, value),
|
|
@@ -7950,7 +7951,7 @@ const AddressInputs = ({
|
|
|
7950
7951
|
name: "postalCode",
|
|
7951
7952
|
testId: "address-form-postal-code",
|
|
7952
7953
|
ariaLabel: 'address-form-postal-code',
|
|
7953
|
-
disabled:
|
|
7954
|
+
disabled: !enabled,
|
|
7954
7955
|
readonly: readOnly,
|
|
7955
7956
|
placeholder: "A0A 0A0",
|
|
7956
7957
|
value: (address === null || address === void 0 ? void 0 : address.postalCode) || '',
|
|
@@ -7970,6 +7971,7 @@ const AddressInputs = ({
|
|
|
7970
7971
|
children: "Alberta"
|
|
7971
7972
|
}), !isAlbertaAddress && jsx(GoADropdown, {
|
|
7972
7973
|
name: "subdivisionCode",
|
|
7974
|
+
disabled: !enabled,
|
|
7973
7975
|
testId: "address-form-province-dropdown",
|
|
7974
7976
|
ariaLabel: 'address-form-province',
|
|
7975
7977
|
value: (address === null || address === void 0 ? void 0 : address.subdivisionCode) || '',
|
|
@@ -8541,6 +8543,7 @@ const AddressLookUpControl = props => {
|
|
|
8541
8543
|
address: address,
|
|
8542
8544
|
errors: errors,
|
|
8543
8545
|
readOnly: readOnly,
|
|
8546
|
+
enabled: enabled,
|
|
8544
8547
|
handleInputChange: handleInputChange,
|
|
8545
8548
|
isAlbertaAddress: isAlbertaAddress,
|
|
8546
8549
|
handleOnBlur: handleRequiredFieldBlur,
|
|
@@ -8708,7 +8711,8 @@ const NameInputs = ({
|
|
|
8708
8711
|
lastName,
|
|
8709
8712
|
handleInputChange,
|
|
8710
8713
|
data,
|
|
8711
|
-
requiredFields
|
|
8714
|
+
requiredFields,
|
|
8715
|
+
disabled
|
|
8712
8716
|
}) => {
|
|
8713
8717
|
var _a, _b;
|
|
8714
8718
|
const [errors, setErrors] = useState({});
|
|
@@ -8736,6 +8740,7 @@ const NameInputs = ({
|
|
|
8736
8740
|
children: jsx(GoAInput, {
|
|
8737
8741
|
type: "text",
|
|
8738
8742
|
name: "firstName",
|
|
8743
|
+
disabled: disabled,
|
|
8739
8744
|
testId: "name-form-first-name",
|
|
8740
8745
|
ariaLabel: 'name-form-first-name',
|
|
8741
8746
|
value: firstName || '',
|
|
@@ -8752,6 +8757,7 @@ const NameInputs = ({
|
|
|
8752
8757
|
children: jsx(GoAInput, {
|
|
8753
8758
|
type: "text",
|
|
8754
8759
|
name: "middleName",
|
|
8760
|
+
disabled: disabled,
|
|
8755
8761
|
testId: "name-form-middle-name",
|
|
8756
8762
|
ariaLabel: 'name-form-middle-name',
|
|
8757
8763
|
value: middleName || '',
|
|
@@ -8766,6 +8772,7 @@ const NameInputs = ({
|
|
|
8766
8772
|
children: jsx(GoAInput, {
|
|
8767
8773
|
type: "text",
|
|
8768
8774
|
name: "lastName",
|
|
8775
|
+
disabled: disabled,
|
|
8769
8776
|
testId: "name-form-last-name",
|
|
8770
8777
|
ariaLabel: 'name-form-last-name',
|
|
8771
8778
|
value: lastName || '',
|
|
@@ -8833,7 +8840,8 @@ const FullNameControl = props => {
|
|
|
8833
8840
|
data,
|
|
8834
8841
|
path,
|
|
8835
8842
|
schema,
|
|
8836
|
-
handleChange
|
|
8843
|
+
handleChange,
|
|
8844
|
+
enabled
|
|
8837
8845
|
} = props;
|
|
8838
8846
|
const requiredFields = schema.required;
|
|
8839
8847
|
const defaultName = {
|
|
@@ -8859,6 +8867,7 @@ const FullNameControl = props => {
|
|
|
8859
8867
|
lastName: defaultName.lastName,
|
|
8860
8868
|
handleInputChange: handleInputChange,
|
|
8861
8869
|
data: data,
|
|
8870
|
+
disabled: !enabled,
|
|
8862
8871
|
requiredFields: requiredFields
|
|
8863
8872
|
});
|
|
8864
8873
|
};
|
|
@@ -8894,7 +8903,7 @@ const FullNameDobControl = props => {
|
|
|
8894
8903
|
path,
|
|
8895
8904
|
schema,
|
|
8896
8905
|
handleChange,
|
|
8897
|
-
|
|
8906
|
+
enabled
|
|
8898
8907
|
} = props;
|
|
8899
8908
|
const requiredFields = schema.required;
|
|
8900
8909
|
const [errors, setErrors] = useState({});
|
|
@@ -8952,6 +8961,7 @@ const FullNameDobControl = props => {
|
|
|
8952
8961
|
requirement: ((_a = schema === null || schema === void 0 ? void 0 : schema.required) === null || _a === void 0 ? void 0 : _a.includes('firstName')) ? 'required' : undefined,
|
|
8953
8962
|
error: (_b = errors === null || errors === void 0 ? void 0 : errors['firstName']) !== null && _b !== void 0 ? _b : '',
|
|
8954
8963
|
children: jsx(GoAInput, {
|
|
8964
|
+
disabled: !enabled,
|
|
8955
8965
|
type: "text",
|
|
8956
8966
|
name: "firstName",
|
|
8957
8967
|
testId: "name-form-first-name",
|
|
@@ -8971,6 +8981,7 @@ const FullNameDobControl = props => {
|
|
|
8971
8981
|
children: jsx(GoAInput, {
|
|
8972
8982
|
type: "text",
|
|
8973
8983
|
name: "middleName",
|
|
8984
|
+
disabled: !enabled,
|
|
8974
8985
|
testId: "name-form-middle-name",
|
|
8975
8986
|
ariaLabel: 'name-form-middle-name',
|
|
8976
8987
|
value: formData.middleName || '',
|
|
@@ -8984,6 +8995,7 @@ const FullNameDobControl = props => {
|
|
|
8984
8995
|
children: jsx(GoAInput, {
|
|
8985
8996
|
type: "text",
|
|
8986
8997
|
name: "lastName",
|
|
8998
|
+
disabled: !enabled,
|
|
8987
8999
|
testId: "name-form-last-name",
|
|
8988
9000
|
ariaLabel: 'name-form-last-name',
|
|
8989
9001
|
value: formData.lastName || '',
|
|
@@ -9005,6 +9017,7 @@ const FullNameDobControl = props => {
|
|
|
9005
9017
|
children: jsx(GoAInput, {
|
|
9006
9018
|
type: "date",
|
|
9007
9019
|
name: "dateOfBirth",
|
|
9020
|
+
disabled: !enabled,
|
|
9008
9021
|
min: validDates().minDate,
|
|
9009
9022
|
max: validDates().maxDate,
|
|
9010
9023
|
testId: `dob-form-dateOfBirth`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.49.
|
|
3
|
+
"version": "1.49.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",
|