@abgov/jsonforms-components 2.24.1 → 2.24.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.
Files changed (2) hide show
  1. package/index.esm.js +35 -33
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -6947,40 +6947,42 @@ const GoAEmailInput = props => {
6947
6947
  const splintIndex = splitErrors.findIndex(e => e === 'is a required property');
6948
6948
  splitErrors[splintIndex] = `${primaryLabel} is required`;
6949
6949
  const finalErrors = splitErrors.join('\n');
6950
- return jsx(GoAFormItem, {
6951
- error: isVisited && finalErrors,
6952
- testId: "form-email-input-wrapper",
6953
- requirement: required ? 'required' : undefined,
6954
- label: primaryLabel,
6955
- children: jsx(GoAInput, {
6956
- error: isVisited && finalErrors.length > 0,
6957
- type: 'email',
6958
- width: width,
6959
- name: "Email address",
6960
- value: data,
6961
- testId: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`,
6962
- disabled: !enabled,
6963
- readonly: readOnly,
6964
- onChange: (name, value) => {
6965
- if (!isVisited) {
6966
- setIsVisited(true);
6967
- }
6968
- onChangeForInputControl({
6969
- name,
6970
- value,
6971
- controlProps: props
6972
- });
6973
- },
6974
- onBlur: (name, value) => {
6975
- if (!isVisited) {
6976
- setIsVisited(true);
6950
+ return jsx(FormFieldWrapper, {
6951
+ children: jsx(GoAFormItem, {
6952
+ error: isVisited && finalErrors,
6953
+ testId: "form-email-input-wrapper",
6954
+ requirement: required ? 'required' : undefined,
6955
+ label: primaryLabel,
6956
+ children: jsx(GoAInput, {
6957
+ error: isVisited && finalErrors.length > 0,
6958
+ type: 'email',
6959
+ width: width,
6960
+ name: "Email address",
6961
+ value: data,
6962
+ testId: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`,
6963
+ disabled: !enabled,
6964
+ readonly: readOnly,
6965
+ onChange: (name, value) => {
6966
+ if (!isVisited) {
6967
+ setIsVisited(true);
6968
+ }
6969
+ onChangeForInputControl({
6970
+ name,
6971
+ value,
6972
+ controlProps: props
6973
+ });
6974
+ },
6975
+ onBlur: (name, value) => {
6976
+ if (!isVisited) {
6977
+ setIsVisited(true);
6978
+ }
6979
+ onBlurForTextControl({
6980
+ name,
6981
+ value,
6982
+ controlProps: props
6983
+ });
6977
6984
  }
6978
- onBlurForTextControl({
6979
- name,
6980
- value,
6981
- controlProps: props
6982
- });
6983
- }
6985
+ })
6984
6986
  })
6985
6987
  });
6986
6988
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.24.1",
3
+ "version": "2.24.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",