@abgov/jsonforms-components 1.48.1 → 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.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* This css file is here to override any parent/root css files
|
|
2
|
+
that add spacing, sizes, color that the help content uses
|
|
3
|
+
to display markdown content it uses.
|
|
4
|
+
*/
|
|
5
|
+
li > ul,
|
|
6
|
+
li > ol,
|
|
7
|
+
li > ul,
|
|
8
|
+
li > ol {
|
|
9
|
+
padding-left: var(--goa-space-m) !important;
|
|
10
|
+
margin-top: initial;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
em {
|
|
14
|
+
font-size: var(--goa-typography-body-s) !important;
|
|
15
|
+
color: var(--goa-color-text-default) !important;
|
|
16
|
+
}
|
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) || '',
|
|
@@ -8273,7 +8275,8 @@ const HelpContentComponent = _a => {
|
|
|
8273
8275
|
if (helpText === undefined) return '';
|
|
8274
8276
|
if (typeof helpText === 'string') return helpText;
|
|
8275
8277
|
if (Array.isArray(helpText)) {
|
|
8276
|
-
|
|
8278
|
+
//Two spaces after the text inserts a line break in markdown.
|
|
8279
|
+
const data = helpText.join(' \n');
|
|
8277
8280
|
return data;
|
|
8278
8281
|
}
|
|
8279
8282
|
return '';
|
|
@@ -8540,6 +8543,7 @@ const AddressLookUpControl = props => {
|
|
|
8540
8543
|
address: address,
|
|
8541
8544
|
errors: errors,
|
|
8542
8545
|
readOnly: readOnly,
|
|
8546
|
+
enabled: enabled,
|
|
8543
8547
|
handleInputChange: handleInputChange,
|
|
8544
8548
|
isAlbertaAddress: isAlbertaAddress,
|
|
8545
8549
|
handleOnBlur: handleRequiredFieldBlur,
|
|
@@ -8707,7 +8711,8 @@ const NameInputs = ({
|
|
|
8707
8711
|
lastName,
|
|
8708
8712
|
handleInputChange,
|
|
8709
8713
|
data,
|
|
8710
|
-
requiredFields
|
|
8714
|
+
requiredFields,
|
|
8715
|
+
disabled
|
|
8711
8716
|
}) => {
|
|
8712
8717
|
var _a, _b;
|
|
8713
8718
|
const [errors, setErrors] = useState({});
|
|
@@ -8735,6 +8740,7 @@ const NameInputs = ({
|
|
|
8735
8740
|
children: jsx(GoAInput, {
|
|
8736
8741
|
type: "text",
|
|
8737
8742
|
name: "firstName",
|
|
8743
|
+
disabled: disabled,
|
|
8738
8744
|
testId: "name-form-first-name",
|
|
8739
8745
|
ariaLabel: 'name-form-first-name',
|
|
8740
8746
|
value: firstName || '',
|
|
@@ -8751,6 +8757,7 @@ const NameInputs = ({
|
|
|
8751
8757
|
children: jsx(GoAInput, {
|
|
8752
8758
|
type: "text",
|
|
8753
8759
|
name: "middleName",
|
|
8760
|
+
disabled: disabled,
|
|
8754
8761
|
testId: "name-form-middle-name",
|
|
8755
8762
|
ariaLabel: 'name-form-middle-name',
|
|
8756
8763
|
value: middleName || '',
|
|
@@ -8765,6 +8772,7 @@ const NameInputs = ({
|
|
|
8765
8772
|
children: jsx(GoAInput, {
|
|
8766
8773
|
type: "text",
|
|
8767
8774
|
name: "lastName",
|
|
8775
|
+
disabled: disabled,
|
|
8768
8776
|
testId: "name-form-last-name",
|
|
8769
8777
|
ariaLabel: 'name-form-last-name',
|
|
8770
8778
|
value: lastName || '',
|
|
@@ -8832,7 +8840,8 @@ const FullNameControl = props => {
|
|
|
8832
8840
|
data,
|
|
8833
8841
|
path,
|
|
8834
8842
|
schema,
|
|
8835
|
-
handleChange
|
|
8843
|
+
handleChange,
|
|
8844
|
+
enabled
|
|
8836
8845
|
} = props;
|
|
8837
8846
|
const requiredFields = schema.required;
|
|
8838
8847
|
const defaultName = {
|
|
@@ -8858,6 +8867,7 @@ const FullNameControl = props => {
|
|
|
8858
8867
|
lastName: defaultName.lastName,
|
|
8859
8868
|
handleInputChange: handleInputChange,
|
|
8860
8869
|
data: data,
|
|
8870
|
+
disabled: !enabled,
|
|
8861
8871
|
requiredFields: requiredFields
|
|
8862
8872
|
});
|
|
8863
8873
|
};
|
|
@@ -8893,7 +8903,7 @@ const FullNameDobControl = props => {
|
|
|
8893
8903
|
path,
|
|
8894
8904
|
schema,
|
|
8895
8905
|
handleChange,
|
|
8896
|
-
|
|
8906
|
+
enabled
|
|
8897
8907
|
} = props;
|
|
8898
8908
|
const requiredFields = schema.required;
|
|
8899
8909
|
const [errors, setErrors] = useState({});
|
|
@@ -8951,6 +8961,7 @@ const FullNameDobControl = props => {
|
|
|
8951
8961
|
requirement: ((_a = schema === null || schema === void 0 ? void 0 : schema.required) === null || _a === void 0 ? void 0 : _a.includes('firstName')) ? 'required' : undefined,
|
|
8952
8962
|
error: (_b = errors === null || errors === void 0 ? void 0 : errors['firstName']) !== null && _b !== void 0 ? _b : '',
|
|
8953
8963
|
children: jsx(GoAInput, {
|
|
8964
|
+
disabled: !enabled,
|
|
8954
8965
|
type: "text",
|
|
8955
8966
|
name: "firstName",
|
|
8956
8967
|
testId: "name-form-first-name",
|
|
@@ -8970,6 +8981,7 @@ const FullNameDobControl = props => {
|
|
|
8970
8981
|
children: jsx(GoAInput, {
|
|
8971
8982
|
type: "text",
|
|
8972
8983
|
name: "middleName",
|
|
8984
|
+
disabled: !enabled,
|
|
8973
8985
|
testId: "name-form-middle-name",
|
|
8974
8986
|
ariaLabel: 'name-form-middle-name',
|
|
8975
8987
|
value: formData.middleName || '',
|
|
@@ -8983,6 +8995,7 @@ const FullNameDobControl = props => {
|
|
|
8983
8995
|
children: jsx(GoAInput, {
|
|
8984
8996
|
type: "text",
|
|
8985
8997
|
name: "lastName",
|
|
8998
|
+
disabled: !enabled,
|
|
8986
8999
|
testId: "name-form-last-name",
|
|
8987
9000
|
ariaLabel: 'name-form-last-name',
|
|
8988
9001
|
value: formData.lastName || '',
|
|
@@ -9004,6 +9017,7 @@ const FullNameDobControl = props => {
|
|
|
9004
9017
|
children: jsx(GoAInput, {
|
|
9005
9018
|
type: "date",
|
|
9006
9019
|
name: "dateOfBirth",
|
|
9020
|
+
disabled: !enabled,
|
|
9007
9021
|
min: validDates().minDate,
|
|
9008
9022
|
max: validDates().maxDate,
|
|
9009
9023
|
testId: `dob-form-dateOfBirth`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.
|
|
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",
|