@sheerid/jslib 1.104.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.
- package/README.md +104 -0
- package/__tests__/__helpers__/renderers.d.ts +7 -0
- package/es5/Tmetrix.bundle.js +5 -5
- package/es5/messages_ar.bundle.js +5 -5
- package/es5/messages_bg.bundle.js +5 -5
- package/es5/messages_cs.bundle.js +5 -5
- package/es5/messages_da.bundle.js +5 -5
- package/es5/messages_de.bundle.js +5 -5
- package/es5/messages_el.bundle.js +5 -5
- package/es5/messages_en-GB.bundle.js +5 -5
- package/es5/messages_es-ES.bundle.js +5 -5
- package/es5/messages_es.bundle.js +5 -5
- package/es5/messages_fi.bundle.js +5 -5
- package/es5/messages_fr-CA.bundle.js +5 -5
- package/es5/messages_fr.bundle.js +5 -5
- package/es5/messages_ga.bundle.js +5 -5
- package/es5/messages_hr.bundle.js +5 -5
- package/es5/messages_hu.bundle.js +5 -5
- package/es5/messages_id.bundle.js +5 -5
- package/es5/messages_it.bundle.js +5 -5
- package/es5/messages_iw.bundle.js +5 -5
- package/es5/messages_ja.bundle.js +5 -5
- package/es5/messages_ko.bundle.js +5 -5
- package/es5/messages_lo.bundle.js +5 -5
- package/es5/messages_lt.bundle.js +5 -5
- package/es5/messages_ms.bundle.js +5 -5
- package/es5/messages_nl.bundle.js +5 -5
- package/es5/messages_no.bundle.js +5 -5
- package/es5/messages_pl.bundle.js +5 -5
- package/es5/messages_pt-BR.bundle.js +5 -5
- package/es5/messages_pt.bundle.js +5 -5
- package/es5/messages_ru.bundle.js +5 -5
- package/es5/messages_sk.bundle.js +5 -5
- package/es5/messages_sl.bundle.js +5 -5
- package/es5/messages_sr.bundle.js +5 -5
- package/es5/messages_sv.bundle.js +5 -5
- package/es5/messages_th.bundle.js +5 -5
- package/es5/messages_tr.bundle.js +5 -5
- package/es5/messages_zh-HK.bundle.js +5 -5
- package/es5/messages_zh.bundle.js +5 -5
- package/es6/{en-GB-5eb8e845.es.js → en-GB-52e5c64c.es.js} +3 -3
- package/es6/{en-GB-5eb8e845.es.js.map → en-GB-52e5c64c.es.js.map} +1 -1
- package/localized-messages/en-GB.json +2 -2
- package/localized-messages/en-US.json +2 -2
- package/manifest.json +46 -46
- package/package.json +1 -1
- package/sheerid-requestOrg.css +4 -4
- package/sheerid-requestOrg.js +15 -15
- package/sheerid-requestOrg.js.map +1 -1
- package/sheerid-utils.js +9 -9
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +4 -4
- package/sheerid.js +18 -18
- package/sheerid.js.map +1 -1
- package/sheerides6.js +211 -128
- package/sheerides6.js.map +1 -1
- package/src/components/FieldLabel.d.ts +2 -2
- package/src/components/FormFields/Address/AddressComponent.d.ts +3 -7
- package/src/components/FormFields/BirthDate/BirthDateComponent.d.ts +1 -1
- package/src/components/FormFields/BranchOfService/BranchOfServiceComponent.d.ts +1 -1
- package/src/components/FormFields/ChangeLocale/ChangeLocaleComponent.d.ts +1 -1
- package/src/components/FormFields/City/City.d.ts +2 -2
- package/src/components/FormFields/CollegeName/CollegeNameComponent.d.ts +1 -1
- package/src/components/FormFields/Company/CompanyComponent.d.ts +1 -1
- package/src/components/FormFields/Country/CountryComponent.d.ts +1 -1
- package/src/components/FormFields/DischargeDate/DischargeDateComponent.d.ts +1 -1
- package/src/components/FormFields/DriverLicenseNumber/DriverLicenseNumberComponent.d.ts +1 -1
- package/src/components/FormFields/Email/EmailComponent.d.ts +1 -1
- package/src/components/FormFields/FirstName/FirstNameComponent.d.ts +1 -1
- package/src/components/FormFields/FirstResponderOrganization/FirstResponderOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/FirstResponderStatus/FirstResponderStatusComponent.d.ts +1 -1
- package/src/components/FormFields/FormFieldCustom/FormFieldCustom.d.ts +18 -0
- package/src/components/FormFields/FormFieldCustom/FormFieldCustom.test.d.ts +1 -0
- package/src/components/FormFields/FormFieldLayout/FormFieldLayout.d.ts +14 -0
- package/src/components/FormFields/FormFieldText/FormFieldText.d.ts +17 -0
- package/src/components/FormFields/FormFieldText/FormFieldText.test.d.ts +1 -0
- package/src/components/FormFields/LastName/LastNameComponent.d.ts +1 -1
- package/src/components/FormFields/LicensedProfessionalOrganization/LicensedProfessionalOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/LowIncomeOrganization/LowIncomeOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/MedicalProfessionalOrganization/MedicalProfessionalOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/MedicalStatus/MedicalStatusComponent.d.ts +1 -1
- package/src/components/FormFields/MemberId/MemberIdComponent.d.ts +1 -1
- package/src/components/FormFields/MembershipOrganization/MembershipOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/MilitaryStatus/MilitaryStatusComponent.d.ts +1 -1
- package/src/components/FormFields/PhoneNumber/PhoneNumberComponent.d.ts +1 -1
- package/src/components/FormFields/SMSCode/SMSCodeComponent.d.ts +1 -1
- package/src/components/FormFields/SSN/SSN.d.ts +8 -3
- package/src/components/FormFields/State/State.d.ts +1 -1
- package/src/components/FormFields/State/StateSelectComponent.d.ts +1 -1
- package/src/components/FormFields/Status/StatusComponent.d.ts +1 -1
- package/src/components/FormFields/TeacherSchool/TeacherSchoolComponent.d.ts +1 -1
- package/src/components/FormInputs/InputText/InputText.d.ts +3 -19
- package/src/components/StepMemberPersonalInfo/StepMemberPersonalInfoComponent.d.ts +0 -1
- package/src/components/StepMilitaryPersonalInfo/StepCollectMilitaryStatusComponent.d.ts +1 -1
- package/src/components/StepPending/ReviewPendingComponent.d.ts +1 -1
- package/src/es6.d.ts +3 -0
- package/src/lib/VerificationService/VerificationServiceActions.d.ts +5 -0
- package/src/lib/VerificationService/VerificationServiceHelpers.d.ts +1 -1
- package/src/lib/installScript/modal.d.ts +3 -3
- package/src/lib/types/types.d.ts +13 -1
- package/src/lib/utils/strings.d.ts +1 -0
- package/src/lib/utils/strings.test.d.ts +1 -0
- package/types-reference.zip +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface FieldLabelProps {
|
|
3
|
-
text:
|
|
3
|
+
text: React.ReactNode;
|
|
4
4
|
htmlForLabel: string;
|
|
5
5
|
id?: string;
|
|
6
6
|
displayClasses?: string;
|
|
7
7
|
isRequired?: boolean;
|
|
8
|
-
children?:
|
|
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
|
-
|
|
5
|
-
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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 {};
|
package/src/components/FormFields/MembershipOrganization/MembershipOrganizationComponent.d.ts
CHANGED
|
@@ -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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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
|
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/// <reference types="react-intl" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FormFieldComponentProps } from "../../../lib/types/types";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
interface PassedProps {
|
|
5
|
+
explanation?: React.ReactNode;
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
}
|
|
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" | "isErrored" | "onChange" | "onKeyDown" | "autoFocus" | "placeholder" | "value" | "isRequired" | "verificationService" | "explanation">, any> & {
|
|
10
|
+
WrappedComponent: React.ComponentType<FormFieldComponentProps<any> & PassedProps & ReactIntl.InjectedIntlProps>;
|
|
7
11
|
};
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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, {
|
|
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
|
-
} &
|
|
17
|
-
export declare const InputTextComponent:
|
|
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,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MaxReviewTime,
|
|
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";
|
|
@@ -42,6 +42,11 @@ export declare const createUpdateLocale: CreateUpdateProps;
|
|
|
42
42
|
* @param dispatch
|
|
43
43
|
*/
|
|
44
44
|
export declare const createUpdateProgramTheme: BoundActionCreator;
|
|
45
|
+
/**
|
|
46
|
+
* @description Perform a full reset of the in-memory state
|
|
47
|
+
* Useful to fully reset the form and start over again, similar to a page refresh.
|
|
48
|
+
*/
|
|
49
|
+
export declare const createResetState: (dispatch: Dispatch) => BoundAction;
|
|
45
50
|
/**
|
|
46
51
|
* @description Action creator to update the field validation errors, which are those that are shown to a user as they fill-in the HTML form.
|
|
47
52
|
* @param dispatch
|
|
@@ -18,7 +18,7 @@ export declare const initViewModel: ({ previousViewModel, currentStep, locale, f
|
|
|
18
18
|
fingerprint?: string;
|
|
19
19
|
country?: Country;
|
|
20
20
|
}) => ViewModel;
|
|
21
|
-
export declare const clearUploadedFiles: (viewModel: DocUploadViewModel) =>
|
|
21
|
+
export declare const clearUploadedFiles: (viewModel: DocUploadViewModel) => DocUploadViewModel | undefined;
|
|
22
22
|
export declare const collectThreatMetrixProfile: (verificationId: string) => Promise<void>;
|
|
23
23
|
export declare const enhanceOrganizationFromTheme: (viewModel: ViewModel, programTheme: ProgramTheme) => ViewModel;
|
|
24
24
|
export declare const determineCountry: (verificationResponse: VerificationResponse, countries: Country[]) => Country;
|
|
@@ -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:
|
|
13
|
+
constructor(url: string, userConfig: IframeUserConfiguration);
|
|
14
14
|
createCloseBtn(): HTMLButtonElement;
|
|
15
|
-
closeModal(
|
|
15
|
+
closeModal(): void;
|
|
16
16
|
static createOverlay(): HTMLElement;
|
|
17
17
|
createWrapper(): HTMLElement;
|
|
18
18
|
popStateEventHandler: () => void;
|
package/src/lib/types/types.d.ts
CHANGED
|
@@ -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:
|
|
341
|
+
onChange: (value: T) => void;
|
|
334
342
|
value: T;
|
|
335
343
|
intl?: InjectedIntl;
|
|
336
344
|
autoFocus?: boolean;
|
|
@@ -434,6 +442,7 @@ export declare type InactiveMilitaryPersonalInfoRequest = {
|
|
|
434
442
|
birthDate: BirthDate;
|
|
435
443
|
dischargeDate: DischargeDate;
|
|
436
444
|
country?: Country;
|
|
445
|
+
socialSecurityNumber?: number;
|
|
437
446
|
} & WithOrganization & WithCoreFields;
|
|
438
447
|
export declare type InactiveMilitaryPersonalInfoViewModel = {
|
|
439
448
|
status: MilitaryStatus;
|
|
@@ -457,6 +466,7 @@ export declare type MemberPersonalInfoRequest = {
|
|
|
457
466
|
address1?: string;
|
|
458
467
|
city?: string;
|
|
459
468
|
state?: string;
|
|
469
|
+
country?: Country;
|
|
460
470
|
} & WithOrganization & WithCoreFields;
|
|
461
471
|
export declare type MemberPersonalInfoViewModel = MemberPersonalInfoRequest & WithLocaleAndCountry & WithFieldsToSkipValidation;
|
|
462
472
|
/**
|
|
@@ -492,6 +502,7 @@ export declare type EmploymentPersonalInfoRequest = {
|
|
|
492
502
|
postalCode: string;
|
|
493
503
|
phoneNumber?: PhoneNumber;
|
|
494
504
|
shouldCollectAddress?: Boolean;
|
|
505
|
+
country?: Country;
|
|
495
506
|
} & WithAddress & WithOrganization & WithCoreFields;
|
|
496
507
|
export declare type SMSLoopVerificationRequest = {
|
|
497
508
|
smsCode: string;
|
|
@@ -1479,6 +1490,7 @@ export interface VerificationServiceFunctions {
|
|
|
1479
1490
|
readonly updateFieldValidationErrors: (fieldValidationErrors: FieldValidationErrors) => void;
|
|
1480
1491
|
readonly submitStep: (stepName: VerificationStep, viewModel: ViewModel, previousResponse: VerificationResponse) => Promise<void>;
|
|
1481
1492
|
readonly updateLocale: (viewModel: ViewModel, programTheme: ProgramTheme, segment: Segment) => void;
|
|
1493
|
+
readonly resetState: () => void;
|
|
1482
1494
|
}
|
|
1483
1495
|
/**
|
|
1484
1496
|
* @description View-Model Request Organization Service
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashed: (camel: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types-reference.zip
CHANGED
|
Binary file
|