@verifiedinc-public/shared-ui-elements 6.4.2 → 6.5.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/dist/components/form/AddressInput/autofill.hook.d.ts +10 -0
- package/dist/components/form/AddressInput/context.d.ts +14 -0
- package/dist/components/form/AddressInput/hook.d.ts +22 -0
- package/dist/components/form/AddressInput/index.d.ts +29 -0
- package/dist/components/form/AddressInput/types.d.ts +25 -0
- package/dist/components/form/AddressInput/utils.d.ts +6 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/ContentWithLoader-C6e2MTxG.mjs +155 -0
- package/dist/shared/toSentenceCase-C6ZGgmg7.mjs +1 -0
- package/dist/utils/address/index.mjs +4 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/string/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/shared/ContentWithLoader-Iy530UiQ.mjs +0 -158
- /package/dist/{components/form/OneClickForm/utils/addressFormatter.d.ts → utils/address/index.d.ts} +0 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Address, PlaceAddressComponent, PlaceSuggestion } from './types';
|
2
|
+
type AutoFillHookReturn = {
|
3
|
+
handleAutoComplete: (value: string) => Promise<void>;
|
4
|
+
fetchPlace: (placeId: string) => Promise<PlaceAddressComponent[] | null>;
|
5
|
+
buildAddress: (placeComponents: PlaceAddressComponent[]) => Address;
|
6
|
+
suggestions: PlaceSuggestion[];
|
7
|
+
isPending: boolean;
|
8
|
+
};
|
9
|
+
export declare function useAutoFill(): AutoFillHookReturn;
|
10
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
interface AddressInputContextType {
|
3
|
+
googlePlacesAutocompletePlaces?: string;
|
4
|
+
googlePlacesGetPlace?: string;
|
5
|
+
}
|
6
|
+
export declare const AddressInputContext: import('react').Context<AddressInputContextType>;
|
7
|
+
interface AddressInputProviderProps {
|
8
|
+
children: ReactNode;
|
9
|
+
googlePlacesAutocompletePlaces?: string;
|
10
|
+
googlePlacesGetPlace?: string;
|
11
|
+
}
|
12
|
+
export declare function AddressInputProvider({ children, googlePlacesAutocompletePlaces, googlePlacesGetPlace, }: AddressInputProviderProps): import("react").JSX.Element;
|
13
|
+
export declare function useAddressInputContext(): AddressInputContextType;
|
14
|
+
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Address, Option, PlaceSuggestion } from './types';
|
2
|
+
type DataFieldAddressInputReturn = {
|
3
|
+
value: Option;
|
4
|
+
inputValue: string;
|
5
|
+
suggestions: PlaceSuggestion[];
|
6
|
+
isPending: boolean;
|
7
|
+
isFetchingPlace: boolean;
|
8
|
+
error: string | undefined;
|
9
|
+
handleInputChange: (newInputValue: string, changeOptions?: {
|
10
|
+
shouldValidate?: boolean;
|
11
|
+
}) => void;
|
12
|
+
handleOptionChange: (option: Option) => Promise<void>;
|
13
|
+
handleClear: () => void;
|
14
|
+
};
|
15
|
+
export declare function useDataFieldAddressInput({ name, defaultValue: _defaultValue, onChange, }: {
|
16
|
+
name: string;
|
17
|
+
defaultValue: Address | null;
|
18
|
+
onChange: (value: string | Address | null, changeOptions?: {
|
19
|
+
shouldValidate?: boolean;
|
20
|
+
}) => void;
|
21
|
+
}): DataFieldAddressInputReturn;
|
22
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ReactElement, ComponentType } from 'react';
|
2
|
+
import { TextFieldProps } from '@mui/material';
|
3
|
+
import { Address } from './types';
|
4
|
+
export type AddressInputProps = {
|
5
|
+
name: string;
|
6
|
+
defaultValue: Address | null;
|
7
|
+
onChange: (value: string | Address | null, changeOptions?: {
|
8
|
+
shouldValidate?: boolean;
|
9
|
+
}) => void;
|
10
|
+
label?: TextFieldProps['label'];
|
11
|
+
disabled?: boolean;
|
12
|
+
variant?: TextFieldProps['variant'];
|
13
|
+
size?: TextFieldProps['size'];
|
14
|
+
helperText?: TextFieldProps['helperText'];
|
15
|
+
inputProps?: TextFieldProps['inputProps'];
|
16
|
+
InputProps?: TextFieldProps['InputProps'];
|
17
|
+
ClearAdornment?: ComponentType<{
|
18
|
+
onClick: () => void;
|
19
|
+
}>;
|
20
|
+
service: {
|
21
|
+
googlePlacesAutocompletePlaces?: string;
|
22
|
+
googlePlacesGetPlace?: string;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* This component composes the fields of address except line 2.
|
27
|
+
* @constructor
|
28
|
+
*/
|
29
|
+
export declare function AddressInput(props: AddressInputProps): ReactElement;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
export type Option = {
|
2
|
+
title: string;
|
3
|
+
value: string;
|
4
|
+
};
|
5
|
+
export type Address = {
|
6
|
+
line1?: string;
|
7
|
+
city?: string;
|
8
|
+
state?: string;
|
9
|
+
zipCode?: string;
|
10
|
+
country: string;
|
11
|
+
};
|
12
|
+
export type PlaceAddressComponent = {
|
13
|
+
types: string[];
|
14
|
+
longText: string;
|
15
|
+
shortText: string;
|
16
|
+
languageCode: string;
|
17
|
+
};
|
18
|
+
export type PlaceSuggestion = {
|
19
|
+
placePrediction: {
|
20
|
+
text: {
|
21
|
+
text: string;
|
22
|
+
};
|
23
|
+
place: string;
|
24
|
+
};
|
25
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* Returns the autocomplete attribute value based on the type of the field.
|
3
|
+
* @param type The type of the field.
|
4
|
+
* @returns The autocomplete attribute value.
|
5
|
+
*/
|
6
|
+
export declare function getAutoCompleteAttributeValue(type: string): "off" | "tel" | "email" | "address-line2" | "family-name" | "given-name" | "street-address address-level2 address-level1 postal-code";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{A as a,
|
1
|
+
"use strict";import{A as a,ac as s,Q as e,c as t,a0 as r,Y as n,B as i,a2 as o,a1 as d,a8 as l,a7 as p,ad as m,C,a5 as c,D as u,i as h,N as S,h as g,_ as P,E as y,F as I,ab as B,I as f,b as T,L as k,M as b,g as D,k as O,W as R,O as L,a6 as F,e as v,f as E,P as N,X as A,R as x,aa as M,Z as w,S as V,d as W,$ as q,T as H,j,a as z,V as Q,U as G,a9 as U,H as J,v as K,t as X,p as Y,u as Z,l as _,r as $,G as aa,z as sa,q as ea,J as ta,s as ra,m as na,K as ia,n as oa,o as da,w as la,a3 as pa,x as ma,y as Ca,a4 as ca}from"../shared/ContentWithLoader-C6e2MTxG.mjs";import{a as ua,b as ha,P as Sa,S as ga}from"../shared/PageSectionHeader-lc9WunC-.mjs";import{B as Pa,C as ya,i as Ia,E as Ba,L as fa,j as Ta,M as ka,g as ba,O as Da,P as Oa,R as Ra,e as La,d as Fa,S as va,a as Ea,b as Na,k as Aa,c as xa,f as Ma,W as wa,h as Va,m as Wa,u as qa}from"../shared/SignupBigNumbers-Cw2-qCYv.mjs";import{SnackbarProvider as Ha}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,t as Alert,r as Backdrop,n as Banner,i as BasePhoneInput,Pa as BigNumber,o as BrandFilterInput,d as Button,l as CalendlyDialog,p as CalendlyDialogComponent,m as ContentWithLoader,C as CredentialRequestsEditor,ya as CustomAlertComponent,c as CustomDialog,u as DateInput,h as DateRangeInput,S as DefaultInput,g as EmailInput,Ia as EmptyChartSection,Ba as ErrorCodesChart,P as ExactBirthdayBanner,y as ExportToPdfButton,I as FullWidthAlert,B as IconPlayer,f as Image,T as LegalLink,k as LinkButton,fa as LoadingChartSection,b as MandatoryEnum,Ta as MetricLastUpdated,ka as MonthlySignupsOverviewTable,D as OTPInput,O as OneClickForm,ba as OneClickOverTimeChart,Da as OneClickPercentageChart,R as OneClickPoweredByVerified,L as OriginalButton,ua as PageHeader,ha as PageSectionHeader,Sa as Paragraph,F as PersistentDialog,v as PhoneInput,Oa as PieChart,E as PrettyPhoneInput,N as PrivacyPolicyNotice,A as QRCodeDisplay,x as RadioOption,Ra as ReasonCodesChart,M as RequiredLabel,w as ResendPhoneBanner,La as RiskScoreBarChart,Fa as RiskScorePieChart,V as SSNInput,ga as SectionHeader,W as SelectInput,va as SeriesChart,Ea as SeriesChartLegend,Na as SeriesPercentageChart,Aa as SignupBigNumbers,xa as SimpleBarChart,Ma as SimpleLegend,Ha as SnackbarProvider,q as TestPhoneNumbersBanner,H as TextButton,j as TimezoneInput,z as Typography,Q as VerifiedImage,G as VerifiedIncLogo,wa as When,U as WhenStyled,J as extractChildrenFromCredentialFieldSet,K as extractTypesFromSchema,X as filterRepeatedCredentials,Y as findCorrectSchemaProperty,Z as findCredentialsByType,_ as getCredentialTypeDisplayInfo,$ as getCredentialValues,aa as getLastPathName,sa as getParentPath,ea as getReferencedSchemaNames,ta as hasMandatoryFieldEmpty,ra as isNewCredentialAgainstInstance,na as isRequiredCredentialDisplayInfo,ia as isSomeFieldInputAllowed,oa as isValidInputCredential,da as makeCredentialDisplayInfoList,Va as mapMonthlySignupsOverviewTableData,Wa as mapTimeSeriesData,la as sortCredentialsBySchema,pa as toOption,ma as transformToFormObject,Ca as transformToFormSchema,ca as useBrandFilterInput,qa as useSnackbar};
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{A as a,
|
1
|
+
"use strict";import{A as a,ac as s,Q as e,c as t,a0 as r,Y as o,B as i,a2 as n,a1 as m,a8 as d,a7 as l,ad as p,C as u,a5 as c,D as h,i as C,N as S,h as g,_ as f,E as y,F as P,ab as k,I as T,b as D,L as b,M as B,g as I,k as F,W as O,O as R,a6 as L,e as N,f as v,P as w,X as U,R as A,aa as M,Z as E,S as x,d as W,$ as Y,T as G,j as H,a as V,V as z,U as j,a9 as _,H as q,v as Q,t as J,p as K,u as X,l as Z,r as $,G as aa,z as sa,q as ea,J as ta,s as ra,m as oa,K as ia,n as na,o as ma,w as da,a3 as la,x as pa,y as ua,a4 as ca}from"./shared/ContentWithLoader-C6e2MTxG.mjs";import{a as ha,b as Ca,P as Sa,S as ga}from"./shared/PageSectionHeader-lc9WunC-.mjs";import{B as fa,C as ya,i as Pa,E as ka,L as Ta,j as Da,M as ba,g as Ba,O as Ia,P as Fa,R as Oa,e as Ra,d as La,S as Na,a as va,b as wa,k as Ua,c as Aa,f as Ma,W as Ea,h as xa,m as Wa,u as Ya}from"./shared/SignupBigNumbers-Cw2-qCYv.mjs";import{b as Ga,k as Ha,a as Va,i as za,u as ja,j as _a,d as qa,c as Qa,l as Ja,e as Ka,f as Xa,g as Za,h as $a}from"./shared/useStyledQRCode-BN5wt-Zb.mjs";import{u as as,a as ss}from"./shared/usePrevious-Dppy11px.mjs";import{a as es,b as ts,u as rs}from"./shared/useOnClickOutside-LHfgekbP.mjs";import{u as os}from"./shared/useCounter-BV32zXDQ.mjs";import{u as is}from"./shared/useResizeObserver-D7K4jTvT.mjs";import{b as ns,a as ms,x as ds,m as ls,e as ps,d as us,q as cs,v as hs,h as Cs,j as Ss,g as gs,p as fs,u as ys,n as Ps,c as ks,l as Ts,o as Ds,s as bs,f as Bs,i as Is,r as Fs,t as Os,k as Rs,w as Ls,y as Ns}from"./shared/colors-CSvtCJK4.mjs";import{s as vs,t as ws}from"./shared/shadows-levwxV7v.mjs";import{wrapPromise as Us}from"./utils/wrapPromise/index.mjs";import{f as As,b as Ms,a as Es,c as xs,t as Ws,u as Ys}from"./shared/uuidColor-DxkgIjlu.mjs";import{c as Gs,g as Hs,a as Vs,p as zs,s as js,v as _s}from"./shared/phone-DCga5nUC.mjs";import{masks as qs}from"./utils/masks/index.mjs";import{o as Qs}from"./shared/omitProperty-CgN5EPAy.mjs";import{D as Js,a as Ks,m as Xs,s as Zs}from"./shared/makeGoogleFont-DJFPTTVt.mjs";import{toCapitalize as $s}from"./utils/string/index.mjs";import{t as ae}from"./shared/toSentenceCase-C6ZGgmg7.mjs";import{k as se}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{alpha as ee,contrastColor as te,darken as re,getThemeFromPrimaryColor as oe,lighten as ie}from"./utils/color/index.mjs";import{addressFormatter as ne,fromUSAddress as me,parseCountryCode as de,toUSaddress as le,toUSaddressPretty as pe}from"./utils/address/index.mjs";import{U as ue,d as ce,e as he,f as Ce,g as Se,a as ge,s as fe}from"./shared/unix.schema-CM7mF14M.mjs";import{M as ye,S as Pe,p as ke}from"./shared/ssn.schema-l5RuYEx9.mjs";import{SnackbarProvider as Te}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,t as Alert,r as Backdrop,o as Banner,i as BasePhoneInput,fa as BigNumber,n as BrandFilterInput,m as Button,d as CalendlyDialog,l as CalendlyDialogComponent,p as ContentWithLoader,u as CredentialRequestsEditor,ya as CustomAlertComponent,c as CustomDialog,Js as DEFAULT_FONT_FAMILY,Ks as DEFAULT_FONT_WEIGHTS,h as DateInput,C as DateRangeInput,S as DefaultInput,g as EmailInput,Pa as EmptyChartSection,ka as ErrorCodesChart,f as ExactBirthdayBanner,y as ExportToPdfButton,P as FullWidthAlert,k as IconPlayer,T as Image,D as LegalLink,b as LinkButton,Ta as LoadingChartSection,B as MandatoryEnum,ye as MaskedAndUnmaskedSSNSchema,Da as MetricLastUpdated,ba as MonthlySignupsOverviewTable,I as OTPInput,F as OneClickForm,Ba as OneClickOverTimeChart,Ia as OneClickPercentageChart,O as OneClickPoweredByVerified,R as OriginalButton,ha as PageHeader,Ca as PageSectionHeader,Sa as Paragraph,L as PersistentDialog,N as PhoneInput,Fa as PieChart,v as PrettyPhoneInput,w as PrivacyPolicyNotice,U as QRCodeDisplay,A as RadioOption,Oa as ReasonCodesChart,M as RequiredLabel,E as ResendPhoneBanner,Ra as RiskScoreBarChart,La as RiskScorePieChart,x as SSNInput,Pe as SSNSchema,ga as SectionHeader,W as SelectInput,Na as SeriesChart,va as SeriesChartLegend,wa as SeriesPercentageChart,Ua as SignupBigNumbers,Aa as SimpleBarChart,Ma as SimpleLegend,Te as SnackbarProvider,Y as TestPhoneNumbersBanner,G as TextButton,H as TimezoneInput,V as Typography,ue as USDateSchema,z as VerifiedImage,j as VerifiedIncLogo,Ea as When,_ as WhenStyled,ne as addressFormatter,ee as alpha,ns as black,ms as blue,ds as colors,te as contrastColor,Gs as countries,ls as dangerContrast,ps as darkBlue,us as darkGreen,cs as darkGrey,hs as darkGreyContrast,Cs as darkRed,Ss as darkYellow,re as darken,ce as descriptionSchema,he as emailSchema,q as extractChildrenFromCredentialFieldSet,Q as extractTypesFromSchema,Ce as fieldSchema,J as filterRepeatedCredentials,K as findCorrectSchemaProperty,X as findCredentialsByType,As as formatDateMMDDYYYY,Ms as formatDateMMYY,Es as formatDateToTimestamp,xs as formatExtendedDate,me as fromUSAddress,Z as getCredentialTypeDisplayInfo,$ as getCredentialValues,Se as getDateSchemaWithPastValidation,aa as getLastPathName,sa as getParentPath,Hs as getPhoneData,Vs as getPhoneDataByFieldName,ea as getReferencedSchemaNames,oe as getThemeFromPrimaryColor,ge as getUnixSchema,gs as green,fs as grey,ys as greyContrast,ta as hasMandatoryFieldEmpty,Ps as infoContrast,ra as isNewCredentialAgainstInstance,oa as isRequiredCredentialDisplayInfo,ia as isSomeFieldInputAllowed,na as isValidInputCredential,se as kebabCaseToPretty,ks as lightBlue,Ts as lightGreen,Ds as lightGrey,bs as lightGreyContrast,Bs as lightRed,Is as lightYellow,ie as lighten,ma as makeCredentialDisplayInfoList,Xs as makeGoogleFontUrl,xa as mapMonthlySignupsOverviewTableData,Wa as mapTimeSeriesData,qs as masks,Qs as omitProperties,de as parseCountryCode,zs as parseToPhoneNational,ke as phoneSchema,Fs as red,vs as shadows,js as sortByCountryName,da as sortCredentialsBySchema,Zs as ssnFormatter,fe as stateSchema,Os as textDisabled,ws as theme,$s as toCapitalize,la as toOption,ae as toSentenceCase,le as toUSaddress,pe as toUSaddressPretty,Ws as toUTCMilliseconds,pa as transformToFormObject,ua as transformToFormSchema,ca as useBrandFilterInput,Ga as useCallbackRef,as as useCopyToClipboard,os as useCounter,Ha as useDebounceCallback,es as useDebounceValue,Va as useDisclosure,za as useIntersectionObserver,ja as useLocalStorage,_a as useNavigatorOnline,ts as useOnClickOutside,ss as usePrevious,rs as useQRCode,is as useResizeObserver,qa as useScript,Qa as useSearchParams,Ya as useSnackbar,Ja as useStyledQRCode,Ka as useThrottle,Xa as useToggle,Za as useWindowScroll,$a as useWindowSize,Ys as uuidToHashedColor,_s as validatePhone,Rs as warningContrast,Ls as white,Us as wrapPromise,Ns as yellow};
|