@sheerid/jslib 1.106.0 → 1.107.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.
Files changed (97) hide show
  1. package/README.md +104 -0
  2. package/__tests__/__helpers__/renderers.d.ts +7 -0
  3. package/es5/Tmetrix.bundle.js +5 -5
  4. package/es5/messages_ar.bundle.js +5 -5
  5. package/es5/messages_bg.bundle.js +5 -5
  6. package/es5/messages_cs.bundle.js +5 -5
  7. package/es5/messages_da.bundle.js +5 -5
  8. package/es5/messages_de.bundle.js +5 -5
  9. package/es5/messages_el.bundle.js +5 -5
  10. package/es5/messages_en-GB.bundle.js +5 -5
  11. package/es5/messages_es-ES.bundle.js +5 -5
  12. package/es5/messages_es.bundle.js +5 -5
  13. package/es5/messages_fi.bundle.js +5 -5
  14. package/es5/messages_fr-CA.bundle.js +5 -5
  15. package/es5/messages_fr.bundle.js +5 -5
  16. package/es5/messages_ga.bundle.js +5 -5
  17. package/es5/messages_hr.bundle.js +5 -5
  18. package/es5/messages_hu.bundle.js +5 -5
  19. package/es5/messages_id.bundle.js +5 -5
  20. package/es5/messages_it.bundle.js +5 -5
  21. package/es5/messages_iw.bundle.js +5 -5
  22. package/es5/messages_ja.bundle.js +5 -5
  23. package/es5/messages_ko.bundle.js +5 -5
  24. package/es5/messages_lo.bundle.js +5 -5
  25. package/es5/messages_lt.bundle.js +5 -5
  26. package/es5/messages_ms.bundle.js +5 -5
  27. package/es5/messages_nl.bundle.js +5 -5
  28. package/es5/messages_no.bundle.js +5 -5
  29. package/es5/messages_pl.bundle.js +5 -5
  30. package/es5/messages_pt-BR.bundle.js +5 -5
  31. package/es5/messages_pt.bundle.js +5 -5
  32. package/es5/messages_ru.bundle.js +5 -5
  33. package/es5/messages_sk.bundle.js +5 -5
  34. package/es5/messages_sl.bundle.js +5 -5
  35. package/es5/messages_sr.bundle.js +5 -5
  36. package/es5/messages_sv.bundle.js +5 -5
  37. package/es5/messages_th.bundle.js +5 -5
  38. package/es5/messages_tr.bundle.js +5 -5
  39. package/es5/messages_zh-HK.bundle.js +5 -5
  40. package/es5/messages_zh.bundle.js +5 -5
  41. package/manifest.json +46 -46
  42. package/package.json +1 -1
  43. package/sheerid-requestOrg.css +4 -4
  44. package/sheerid-requestOrg.js +15 -15
  45. package/sheerid-requestOrg.js.map +1 -1
  46. package/sheerid-utils.js +9 -9
  47. package/sheerid-utils.js.map +1 -1
  48. package/sheerid.css +4 -4
  49. package/sheerid.js +18 -18
  50. package/sheerid.js.map +1 -1
  51. package/sheerides6.js +124 -57
  52. package/sheerides6.js.map +1 -1
  53. package/src/components/FieldLabel.d.ts +2 -2
  54. package/src/components/FormFields/Address/AddressComponent.d.ts +3 -7
  55. package/src/components/FormFields/BirthDate/BirthDateComponent.d.ts +1 -1
  56. package/src/components/FormFields/BranchOfService/BranchOfServiceComponent.d.ts +1 -1
  57. package/src/components/FormFields/ChangeLocale/ChangeLocaleComponent.d.ts +1 -1
  58. package/src/components/FormFields/City/City.d.ts +2 -2
  59. package/src/components/FormFields/CollegeName/CollegeNameComponent.d.ts +1 -1
  60. package/src/components/FormFields/Company/CompanyComponent.d.ts +1 -1
  61. package/src/components/FormFields/Country/CountryComponent.d.ts +1 -1
  62. package/src/components/FormFields/DischargeDate/DischargeDateComponent.d.ts +1 -1
  63. package/src/components/FormFields/DriverLicenseNumber/DriverLicenseNumberComponent.d.ts +1 -1
  64. package/src/components/FormFields/Email/EmailComponent.d.ts +1 -1
  65. package/src/components/FormFields/FirstName/FirstNameComponent.d.ts +1 -1
  66. package/src/components/FormFields/FirstResponderOrganization/FirstResponderOrganizationComponent.d.ts +1 -1
  67. package/src/components/FormFields/FirstResponderStatus/FirstResponderStatusComponent.d.ts +1 -1
  68. package/src/components/FormFields/FormFieldCustom/FormFieldCustom.d.ts +18 -0
  69. package/src/components/FormFields/FormFieldCustom/FormFieldCustom.test.d.ts +1 -0
  70. package/src/components/FormFields/FormFieldLayout/FormFieldLayout.d.ts +14 -0
  71. package/src/components/FormFields/FormFieldText/FormFieldText.d.ts +17 -0
  72. package/src/components/FormFields/FormFieldText/FormFieldText.test.d.ts +1 -0
  73. package/src/components/FormFields/LastName/LastNameComponent.d.ts +1 -1
  74. package/src/components/FormFields/LicensedProfessionalOrganization/LicensedProfessionalOrganizationComponent.d.ts +1 -1
  75. package/src/components/FormFields/LowIncomeOrganization/LowIncomeOrganizationComponent.d.ts +1 -1
  76. package/src/components/FormFields/MedicalProfessionalOrganization/MedicalProfessionalOrganizationComponent.d.ts +1 -1
  77. package/src/components/FormFields/MedicalStatus/MedicalStatusComponent.d.ts +1 -1
  78. package/src/components/FormFields/MemberId/MemberIdComponent.d.ts +1 -1
  79. package/src/components/FormFields/MembershipOrganization/MembershipOrganizationComponent.d.ts +1 -1
  80. package/src/components/FormFields/MilitaryStatus/MilitaryStatusComponent.d.ts +1 -1
  81. package/src/components/FormFields/PhoneNumber/PhoneNumberComponent.d.ts +1 -1
  82. package/src/components/FormFields/SMSCode/SMSCodeComponent.d.ts +1 -1
  83. package/src/components/FormFields/SSN/SSN.d.ts +1 -1
  84. package/src/components/FormFields/State/State.d.ts +1 -1
  85. package/src/components/FormFields/State/StateSelectComponent.d.ts +1 -1
  86. package/src/components/FormFields/Status/StatusComponent.d.ts +1 -1
  87. package/src/components/FormFields/TeacherSchool/TeacherSchoolComponent.d.ts +1 -1
  88. package/src/components/FormInputs/InputText/InputText.d.ts +3 -19
  89. package/src/components/StepMemberPersonalInfo/StepMemberPersonalInfoComponent.d.ts +0 -1
  90. package/src/components/StepMilitaryPersonalInfo/StepCollectMilitaryStatusComponent.d.ts +1 -1
  91. package/src/components/StepPending/ReviewPendingComponent.d.ts +1 -1
  92. package/src/es6.d.ts +3 -0
  93. package/src/lib/installScript/modal.d.ts +3 -3
  94. package/src/lib/types/types.d.ts +9 -1
  95. package/src/lib/utils/strings.d.ts +1 -0
  96. package/src/lib/utils/strings.test.d.ts +1 -0
  97. package/types-reference.zip +0 -0
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
2
  interface FieldLabelProps {
3
- text: JSX.Element | string | React.ReactNode;
3
+ text: React.ReactNode;
4
4
  htmlForLabel: string;
5
5
  id?: string;
6
6
  displayClasses?: string;
7
7
  isRequired?: boolean;
8
- children?: JSX.Element | any;
8
+ children?: React.ReactNode;
9
9
  }
10
10
  export declare const FieldLabel: React.FC<FieldLabelProps>;
11
11
  export {};
@@ -1,11 +1,7 @@
1
1
  /// <reference types="react-intl" />
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps } from "../../../lib/types/types";
4
- interface PassedProps {
5
- onKeyDown?: Function;
6
- }
7
- export declare const Address: ({ value, isErrored, onChange, intl, onKeyDown, placeholder, }: FormFieldComponentProps & PassedProps) => JSX.Element;
8
- export declare const AddressComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
9
- WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
4
+ export declare const Address: ({ value, isErrored, onChange, intl, isRequired, onKeyDown, placeholder, }: FormFieldComponentProps) => JSX.Element;
5
+ export declare const AddressComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
+ WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & ReactIntl.InjectedIntlProps>;
10
7
  };
11
- export {};
@@ -7,6 +7,6 @@ export declare const BirthDate: {
7
7
  value: string;
8
8
  };
9
9
  };
10
- export declare const BirthDateComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
10
+ export declare const BirthDateComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
11
11
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & InjectedIntlProps>;
12
12
  };
@@ -5,7 +5,7 @@ interface BranchOfServiceComponentProps {
5
5
  organizations: Organization[];
6
6
  }
7
7
  export declare const BranchOfService: ({ autoFocus, onChange, value, isErrored, organizations, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps & BranchOfServiceComponentProps) => JSX.Element;
8
- export declare const BranchOfServiceComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps & BranchOfServiceComponentProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "organizations">, any> & {
8
+ export declare const BranchOfServiceComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps & BranchOfServiceComponentProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "organizations">, any> & {
9
9
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & BranchOfServiceComponentProps & ReactIntl.InjectedIntlProps>;
10
10
  };
11
11
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { InjectedIntlProps } from "react-intl";
3
3
  import { InputSelectComponentProps } from "../../../lib/types/types";
4
- export declare const ChangeLocaleComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options">, any> & {
4
+ export declare const ChangeLocaleComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options">, any> & {
5
5
  WrappedComponent: React.ComponentType<InputSelectComponentProps & InjectedIntlProps>;
6
6
  };
@@ -5,8 +5,8 @@ interface PassedProps {
5
5
  explanation?: string | JSX.Element;
6
6
  onKeyDown?: Function;
7
7
  }
8
- export declare const City: ({ value, isErrored, onChange, intl, onKeyDown, placeholder, }: FormFieldComponentProps & PassedProps) => JSX.Element;
9
- export declare const CityComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation">, any> & {
8
+ export declare const City: ({ value, isErrored, onChange, intl, isRequired, onKeyDown, placeholder, }: FormFieldComponentProps & PassedProps) => JSX.Element;
9
+ export declare const CityComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
10
10
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
11
11
  };
12
12
  export {};
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const CollegeName: ({ onChange, value, isErrored, verificationService, intl, placeholder, isRequired, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const CollegeNameComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const CollegeNameComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const Company: ({ onChange, value, isErrored, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const CompanyComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const CompanyComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { InputSelectComponentProps } from "../../../lib/types/types";
4
4
  export declare const Country: ({ value, isErrored, options, onChange, onKeyDown, intl, placeholder, isRequired, }: InputSelectComponentProps) => JSX.Element;
5
- export declare const CountryComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options">, any> & {
5
+ export declare const CountryComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options">, any> & {
6
6
  WrappedComponent: React.ComponentType<InputSelectComponentProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -7,6 +7,6 @@ export declare const DischargeDate: {
7
7
  value: string;
8
8
  };
9
9
  };
10
- export declare const DischargeDateComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
10
+ export declare const DischargeDateComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
11
11
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & InjectedIntlProps>;
12
12
  };
@@ -5,7 +5,7 @@ interface PassedProps {
5
5
  explanation?: string | JSX.Element;
6
6
  }
7
7
  export declare const DriverLicenseNumber: ({ value, isErrored, onChange, explanation, intl, placeholder, isRequired, }: FormFieldComponentProps & PassedProps) => JSX.Element;
8
- export declare const DriverLicenseNumberComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation">, any> & {
8
+ export declare const DriverLicenseNumberComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
9
9
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
10
10
  };
11
11
  export {};
@@ -6,7 +6,7 @@ interface PassedProps {
6
6
  onKeyDown?: Function;
7
7
  }
8
8
  export declare const Email: ({ value, isErrored, onChange, explanation, intl, onKeyDown, placeholder, }: FormFieldComponentProps & PassedProps) => JSX.Element;
9
- export declare const EmailComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation">, any> & {
9
+ export declare const EmailComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
10
10
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
11
11
  };
12
12
  export {};
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps } from "../../../lib/types/types";
4
4
  export declare const FirstName: ({ value, isErrored, onChange, intl, placeholder, }: FormFieldComponentProps) => JSX.Element;
5
- export declare const FirstNameComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const FirstNameComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const FirstResponderOrganization: ({ onChange, value, isErrored, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const FirstResponderOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const FirstResponderOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { InputSelectComponentProps } from "../../../lib/types/types";
4
4
  export declare const FirstResponderStatus: ({ value, isErrored, options, onChange, placeholder, intl, onKeyDown, }: InputSelectComponentProps) => JSX.Element;
5
- export declare const FirstResponderStatusComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options">, any> & {
5
+ export declare const FirstResponderStatusComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options">, any> & {
6
6
  WrappedComponent: React.ComponentType<InputSelectComponentProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { InjectedIntl } from "react-intl";
3
+ import { FormFieldConfig, VerificationService } from "../../../lib/types/types";
4
+ export interface FormFieldCustomProps {
5
+ config: FormFieldConfig;
6
+ verificationService: VerificationService;
7
+ intl: InjectedIntl;
8
+ }
9
+ export declare const getMessageIdForLabel: (config: FormFieldConfig) => string;
10
+ export declare const getMessageIdForPlaceholder: (config: FormFieldConfig) => string;
11
+ /**
12
+ * Custom form field component.
13
+ * Implementors can render a form field passing in config using setOptions, rather than
14
+ * having to create an entire React project and override component(s).
15
+ */
16
+ export declare const FormFieldCustom: React.ComponentClass<Pick<FormFieldCustomProps, "verificationService" | "config">, any> & {
17
+ WrappedComponent: React.ComponentType<FormFieldCustomProps & ReactIntl.InjectedIntlProps>;
18
+ };
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface FormFieldLayoutProps {
3
+ fieldId: string;
4
+ label: React.ReactNode;
5
+ isRequired: boolean;
6
+ showPlaceholderAndHideLabel?: boolean;
7
+ errorMessage?: React.ReactNode;
8
+ children?: React.ReactNode;
9
+ }
10
+ /**
11
+ * In the JSLIB, a FormField has a label, inline error message, and children like a text input
12
+ * This component provides consistent structure, classnames and some accessibility considerations for all FormFields
13
+ */
14
+ export declare const FormFieldLayout: ({ fieldId, label, errorMessage, isRequired, showPlaceholderAndHideLabel, children, }: FormFieldLayoutProps) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { InputTextProps } from "../../FormInputs/InputText/InputText";
3
+ export interface FormFieldTextComponentProps extends Omit<InputTextProps, "onChange" | "id" | "errorId" | "isErrored"> {
4
+ fieldId: string;
5
+ value: string;
6
+ onChange: (value: string) => void;
7
+ placeholder: string;
8
+ label: React.ReactNode;
9
+ showPlaceholderAndHideLabel?: boolean;
10
+ errorMessage?: React.ReactNode;
11
+ }
12
+ /**
13
+ * Generic text field component.
14
+ * In the JSLIB, a field has a label, inline error message, and an input of some kind.
15
+ */
16
+ export declare const FormFieldText: ({ fieldId, value, onChange, placeholder, label, errorMessage, showPlaceholderAndHideLabel, required, ...inputTextProps }: FormFieldTextComponentProps) => JSX.Element;
17
+ export declare const FormFieldTextComponent: ({ fieldId, value, onChange, placeholder, label, errorMessage, showPlaceholderAndHideLabel, required, ...inputTextProps }: FormFieldTextComponentProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps } from "../../../lib/types/types";
4
4
  export declare const LastName: ({ value, isErrored, onChange, intl, placeholder, }: FormFieldComponentProps) => JSX.Element;
5
- export declare const LastNameComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const LastNameComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const LicensedProfessionalOrganization: ({ value, isErrored, onChange, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const LicensedProfessionalOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const LicensedProfessionalOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const LowIncomeOrganization: ({ value, isErrored, onChange, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const LowIncomeOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const LowIncomeOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const MedicalProfessionalOrganization: ({ onChange, value, isErrored, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const MedicalProfessionalOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const MedicalProfessionalOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { InputSelectComponentProps } from "../../../lib/types/types";
4
4
  export declare const MedicalStatus: ({ value, isErrored, options, onChange, intl, placeholder, onKeyDown, }: InputSelectComponentProps) => JSX.Element;
5
- export declare const MedicalStatusComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options">, any> & {
5
+ export declare const MedicalStatusComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options">, any> & {
6
6
  WrappedComponent: React.ComponentType<InputSelectComponentProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -6,7 +6,7 @@ interface PassedProps {
6
6
  label?: JSX.Element;
7
7
  }
8
8
  export declare const MemberId: ({ value, isErrored, onChange, explanation, intl, placeholder, isRequired, label, }: FormFieldComponentProps & PassedProps) => JSX.Element;
9
- export declare const MemberIdComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "label" | "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation">, any> & {
9
+ export declare const MemberIdComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "label" | "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
10
10
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
11
11
  };
12
12
  export {};
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const MembershipOrganization: ({ value, isErrored, onChange, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const MembershipOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const MembershipOrganizationComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -2,6 +2,6 @@ import React from "react";
2
2
  import { InjectedIntlProps } from "react-intl";
3
3
  import { InputSelectComponentProps } from "../../../lib/types/types";
4
4
  export declare const MilitaryStatus: ({ value, isErrored, options, onChange, intl, placeholder, }: InputSelectComponentProps & InjectedIntlProps) => JSX.Element;
5
- export declare const MilitaryStatusComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options">, any> & {
5
+ export declare const MilitaryStatusComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options">, any> & {
6
6
  WrappedComponent: React.ComponentType<InputSelectComponentProps & InjectedIntlProps>;
7
7
  };
@@ -12,7 +12,7 @@ interface PhoneNumberProps {
12
12
  internationalSupport?: boolean;
13
13
  selectedCountryCode?: string;
14
14
  }
15
- export declare const PhoneNumberComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PhoneNumberProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation" | "onCarrierConsentChange" | "displaySmsConsent" | "requireCarrierConsent" | "carrierConsent" | "internationalSupport" | "selectedCountryCode">, any> & {
15
+ export declare const PhoneNumberComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PhoneNumberProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation" | "onCarrierConsentChange" | "displaySmsConsent" | "requireCarrierConsent" | "carrierConsent" | "internationalSupport" | "selectedCountryCode">, any> & {
16
16
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PhoneNumberProps & ReactIntl.InjectedIntlProps>;
17
17
  };
18
18
  export {};
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps } from "../../../lib/types/types";
4
4
  export declare const SMSCode: ({ onChange, value, isErrored, errorId, intl, placeholder, }: FormFieldComponentProps) => JSX.Element;
5
- export declare const SMSCodeComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const SMSCodeComponent: React.ComponentClass<Pick<FormFieldComponentProps<any>, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -6,7 +6,7 @@ interface PassedProps {
6
6
  label?: React.ReactNode;
7
7
  }
8
8
  export declare const SocialSecurity: ({ value, isErrored, onChange, intl, explanation, placeholder, isRequired, label, }: FormFieldComponentProps & PassedProps) => JSX.Element;
9
- export declare const SocialSecurityNumber: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "label" | "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation">, any> & {
9
+ export declare const SocialSecurityNumber: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "label" | "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
10
10
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
11
11
  };
12
12
  export {};
@@ -6,7 +6,7 @@ interface PassedProps {
6
6
  onKeyDown?: Function;
7
7
  }
8
8
  export declare const State: ({ value, isErrored, onChange, intl, onKeyDown, placeholder, }: FormFieldComponentProps & PassedProps) => JSX.Element;
9
- export declare const StateComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService" | "explanation">, any> & {
9
+ export declare const StateComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & PassedProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
10
10
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
11
11
  };
12
12
  export {};
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { InputSelectComponentProps } from "../../../lib/types/types";
4
4
  export declare const StateSelect: ({ value, isErrored, options, onChange, onKeyDown, intl, placeholder, label, isRequired, }: InputSelectComponentProps) => JSX.Element;
5
- export declare const StateSelectComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options">, any> & {
5
+ export declare const StateSelectComponent: React.ComponentClass<Pick<InputSelectComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options">, any> & {
6
6
  WrappedComponent: React.ComponentType<InputSelectComponentProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -5,7 +5,7 @@ interface StatusComponentProps extends InputSelectComponentProps {
5
5
  segmentId: string;
6
6
  }
7
7
  export declare const Status: ({ value, isErrored, options, onChange, intl, placeholder, onKeyDown, segmentId, }: StatusComponentProps) => JSX.Element;
8
- export declare const StatusComponent: React.ComponentClass<Pick<StatusComponentProps, "label" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "options" | "segmentId">, any> & {
8
+ export declare const StatusComponent: React.ComponentClass<Pick<StatusComponentProps, "label" | "isErrored" | "onChange" | "onKeyDown" | "placeholder" | "value" | "isRequired" | "options" | "segmentId">, any> & {
9
9
  WrappedComponent: React.ComponentType<StatusComponentProps & ReactIntl.InjectedIntlProps>;
10
10
  };
11
11
  export {};
@@ -2,6 +2,6 @@
2
2
  import React from "react";
3
3
  import { FormFieldComponentProps, VerificationServiceProps } from "../../../lib/types/types";
4
4
  export declare const TeacherSchool: ({ value, isErrored, onChange, verificationService, intl, placeholder, }: FormFieldComponentProps & VerificationServiceProps) => JSX.Element;
5
- export declare const TeacherSchoolComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isRequired" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "verificationService">, any> & {
5
+ export declare const TeacherSchoolComponent: React.ComponentClass<Pick<FormFieldComponentProps<any> & VerificationServiceProps, "errorId" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService">, any> & {
6
6
  WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & VerificationServiceProps & ReactIntl.InjectedIntlProps>;
7
7
  };
@@ -1,5 +1,4 @@
1
- import React, { AllHTMLAttributes } from "react";
2
- import { InjectedIntlProps } from "react-intl";
1
+ import React, { InputHTMLAttributes } from "react";
3
2
  export declare type InputTextProps = {
4
3
  id: string;
5
4
  isErrored: boolean;
@@ -13,20 +12,5 @@ export declare type InputTextProps = {
13
12
  ariaDescribedBy?: string;
14
13
  ariaLabel?: string;
15
14
  type?: "text" | "email" | "password" | "search" | "url" | "tel";
16
- } & AllHTMLAttributes<HTMLInputElement> & InjectedIntlProps;
17
- export declare const InputTextComponent: React.ComponentClass<Pick<{
18
- id: string;
19
- isErrored: boolean;
20
- className?: string;
21
- hidePlaceholder?: boolean;
22
- onChange?: React.ChangeEventHandler;
23
- onKeyDown?: React.ChangeEventHandler;
24
- ref?: never;
25
- refId?: string;
26
- required?: boolean;
27
- ariaDescribedBy?: string;
28
- ariaLabel?: string;
29
- type?: "text" | "email" | "password" | "search" | "url" | "tel";
30
- } & React.AllHTMLAttributes<HTMLInputElement>, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "id" | "step" | "color" | "content" | "size" | "wrap" | "multiple" | "height" | "translate" | "width" | "prefix" | "src" | "ref" | "children" | "list" | "dangerouslySetInnerHTML" | "name" | "type" | "isErrored" | "className" | "hidePlaceholder" | "refId" | "ariaDescribedBy" | "ariaLabel" | "onChange" | "onKeyDown" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "value" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, any> & {
31
- WrappedComponent: React.ComponentType<InputTextProps>;
32
- };
15
+ } & InputHTMLAttributes<HTMLInputElement>;
16
+ export declare const InputTextComponent: ({ id, isErrored, className, hidePlaceholder, refId, required, type, ariaDescribedBy, ariaLabel, ...props }: InputTextProps) => JSX.Element;
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Step Member Personal Info Component
3
- * TODO - We need to import more from es6
4
3
  */
5
4
  import React from "react";
6
5
  import { InjectedIntl } from "react-intl";
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { VerificationService } from "../../es6";
2
+ import { VerificationService } from "../../lib/types/types";
3
3
  interface StepCollectMilitaryStatusComponentProps {
4
4
  verificationService: VerificationService;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { MaxReviewTime, VerificationService, PendingResponse } from "../../es6";
2
+ import { MaxReviewTime, PendingResponse, VerificationService } from "../../lib/types/types";
3
3
  interface ReviewPendingProps {
4
4
  intl: any;
5
5
  logo: JSX.Element;
package/src/es6.d.ts CHANGED
@@ -53,6 +53,9 @@ export { StateSelectComponent } from "./components/FormFields/State/StateSelectC
53
53
  export { SMSCodeComponent } from "./components/FormFields/SMSCode/SMSCodeComponent";
54
54
  export { SocialSecurityNumber } from "./components/FormFields/SSN/SSN";
55
55
  export { DriverLicenseNumberComponent } from "./components/FormFields/DriverLicenseNumber/DriverLicenseNumberComponent";
56
+ export { FormFieldCustom } from "./components/FormFields/FormFieldCustom/FormFieldCustom";
57
+ export { FormFieldText } from "./components/FormFields/FormFieldText/FormFieldText";
58
+ export { FormFieldLayout } from "./components/FormFields/FormFieldLayout/FormFieldLayout";
56
59
  export { AcceptableUploadsComponent } from "./components/AcceptableUploadsComponent/AcceptableUploadsComponent";
57
60
  export { UploadInfoComponent } from "./components/UploadInfoComponent/UploadInfoComponent";
58
61
  export { PoweredByComponent } from "./components/PoweredBy/PoweredByComponent";
@@ -1,4 +1,4 @@
1
- import { ViewModel } from "../types/types";
1
+ import { IframeUserConfiguration, ViewModel } from "../types/types";
2
2
  import Iframe from "./iframe";
3
3
  declare class Modal {
4
4
  verificationUrl: string;
@@ -10,9 +10,9 @@ declare class Modal {
10
10
  closeButtonText: string;
11
11
  closeButton: HTMLButtonElement;
12
12
  stopPropagation: boolean;
13
- constructor(url: string, userConfig: any);
13
+ constructor(url: string, userConfig: IframeUserConfiguration);
14
14
  createCloseBtn(): HTMLButtonElement;
15
- closeModal(historyEventTrigger?: boolean): void;
15
+ closeModal(): void;
16
16
  static createOverlay(): HTMLElement;
17
17
  createWrapper(): HTMLElement;
18
18
  popStateEventHandler: () => void;
@@ -36,6 +36,13 @@ export interface SheerIdJsApi {
36
36
  getMessages(locale: Locale, programThemeMessages?: ProgramThemeMessages, segment?: Segment): Promise<StringMap>;
37
37
  collectDeviceProfile(verificationId: string, programId: string): void;
38
38
  }
39
+ export interface FormFieldConfig {
40
+ fieldId: string;
41
+ fieldType: string;
42
+ validate: (value: string | boolean) => ErrorId | string | undefined;
43
+ showPlaceholderAndHideLabel?: boolean;
44
+ required?: boolean;
45
+ }
39
46
  export interface RequestOrganizationApi {
40
47
  RequestOrganizationForm: new (element: HTMLElement, programId: DatabaseId) => void;
41
48
  setOptions(options: Options): void;
@@ -153,6 +160,7 @@ export declare type Options = {
153
160
  httpRequestTimeout?: number;
154
161
  hideTestModeFlag?: boolean;
155
162
  hideMilitaryFamilyAcceptableUploads?: boolean;
163
+ customFormFields?: FormFieldConfig[];
156
164
  };
157
165
  export declare type RestApiOptions = {
158
166
  serviceUrl: string;
@@ -330,7 +338,7 @@ export declare type FormSelectChoice<v = string | number, l = string> = {
330
338
  };
331
339
  export declare type InputSelectOnKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => void;
332
340
  export interface FormFieldComponentProps<T = any> {
333
- onChange: Function;
341
+ onChange: (value: T) => void;
334
342
  value: T;
335
343
  intl?: InjectedIntl;
336
344
  autoFocus?: boolean;
@@ -0,0 +1 @@
1
+ export declare const dashed: (camel: any) => any;
@@ -0,0 +1 @@
1
+ export {};
Binary file