@verifiedinc-public/shared-ui-elements 5.7.0 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/components/chart/index.mjs +1 -1
  2. package/dist/components/form/DateInput/index.d.ts +5 -2
  3. package/dist/components/form/InputMask.d.ts +1 -1
  4. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplay.d.ts +2 -1
  5. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayContext.d.ts +4 -2
  6. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItem.d.ts +2 -4
  7. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItemContext.d.ts +5 -2
  8. package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/EditModeButton.d.ts +2 -0
  9. package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/index.d.ts +1 -0
  10. package/dist/components/form/OneClickForm/components/CredentialsDisplay/hooks.d.ts +1 -0
  11. package/dist/components/form/OneClickForm/components/CredentialsDisplay/types.d.ts +1 -0
  12. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractChildrenFromCredentialFieldSet.d.ts +9 -0
  13. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/index.d.ts +1 -0
  14. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormSchema.d.ts +9 -2
  15. package/dist/components/form/OneClickForm/components/DataField/DataFieldAtomic.d.ts +2 -1
  16. package/dist/components/form/OneClickForm/components/DataField/DataFieldCheckbox.d.ts +2 -1
  17. package/dist/components/form/OneClickForm/components/DataField/DataFieldClearAdornment.d.ts +2 -1
  18. package/dist/components/form/OneClickForm/components/DataField/DataFieldComposite.d.ts +2 -2
  19. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/index.d.ts +2 -1
  20. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/getAddressFormat.d.ts +2 -0
  21. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/index.d.ts +1 -0
  22. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/renderInstance.d.ts +3 -0
  23. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/index.d.ts +2 -1
  24. package/dist/components/form/OneClickForm/components/DataField/DataFieldInputLabel.d.ts +19 -0
  25. package/dist/components/form/OneClickForm/components/DataField/DataFieldInputModeHeader.d.ts +2 -1
  26. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabel.d.ts +2 -19
  27. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabelText.d.ts +2 -1
  28. package/dist/components/form/OneClickForm/components/DataField/DataFieldLeftSide.d.ts +2 -1
  29. package/dist/components/form/OneClickForm/components/DataField/DataFieldPaper.d.ts +2 -2
  30. package/dist/components/form/OneClickForm/components/DataField/DataFieldStack.d.ts +2 -3
  31. package/dist/components/form/OneClickForm/components/DataField/DataFieldValue.d.ts +2 -2
  32. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldImage.d.ts +2 -1
  33. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldInputAddress.d.ts +2 -1
  34. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldText.d.ts +6 -0
  35. package/dist/components/form/OneClickForm/components/DataField/formats/index.d.ts +1 -1
  36. package/dist/components/form/OneClickForm/components/DataField/index.d.ts +4 -1
  37. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/autofill.hook.d.ts +13 -0
  38. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/hook.d.ts +16 -0
  39. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/index.d.ts +6 -0
  40. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/types.d.ts +4 -0
  41. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldDateInput.d.ts +2 -1
  42. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldImageInput.d.ts +2 -1
  43. package/dist/components/form/OneClickForm/components/DataField/inputs/index.d.ts +1 -0
  44. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabel.d.ts +7 -0
  45. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabelInput.d.ts +7 -0
  46. package/dist/components/form/OneClickForm/components/DataField/utils/index.d.ts +1 -0
  47. package/dist/components/form/OneClickForm/constants/credentialTypes.d.ts +6 -0
  48. package/dist/components/form/OneClickForm/constants/index.d.ts +1 -0
  49. package/dist/components/form/OneClickForm/contexts/one-click-form-options.context.d.ts +7 -2
  50. package/dist/components/form/OneClickForm/index.d.ts +2 -2
  51. package/dist/components/form/OneClickForm/styles/input.d.ts +4 -1
  52. package/dist/components/form/OneClickForm/utils/addressFormatter.d.ts +45 -1
  53. package/dist/components/form/OneClickForm/utils/calendarDateFormatter.d.ts +1 -1
  54. package/dist/components/index.mjs +1 -1
  55. package/dist/hooks/index.d.ts +1 -0
  56. package/dist/hooks/index.mjs +1 -1
  57. package/dist/hooks/useDebounceCallback.d.ts +46 -0
  58. package/dist/index.mjs +1 -1
  59. package/dist/shared/{SignupBigNumbers-DTFFbGIC.mjs → SignupBigNumbers-BO1JJl6G.mjs} +2 -2
  60. package/dist/shared/_baseGetTag-B6tQMIzM.mjs +1 -0
  61. package/dist/shared/index-D9rPRjCc.mjs +88 -0
  62. package/dist/shared/{omitProperty-CA_SIosy.mjs → omitProperty-DZYdN2vK.mjs} +1 -1
  63. package/dist/shared/phone-DVFDc4Vz.mjs +1 -0
  64. package/dist/shared/{shadows-Dhd7FrwF.mjs → shadows-DpONhygS.mjs} +1 -1
  65. package/dist/shared/toNumber-BUb3rTFh.mjs +1 -0
  66. package/dist/shared/useDebounceCallback-CO7X29ng.mjs +1 -0
  67. package/dist/shared/useOnClickOutside-DgJxDzLx.mjs +1 -0
  68. package/dist/shared/uuidColor-LRbEKYAZ.mjs +20 -0
  69. package/dist/styles/index.mjs +1 -1
  70. package/dist/utils/index.mjs +1 -1
  71. package/dist/utils/phone/index.mjs +1 -1
  72. package/package.json +5 -3
  73. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils.d.ts +0 -2
  74. package/dist/components/form/OneClickForm/components/DataField/DataFieldToggleButton.d.ts +0 -9
  75. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldInputText.d.ts +0 -9
  76. package/dist/components/form/OneClickForm/components/shared/DateInput.d.ts +0 -19
  77. package/dist/shared/_commonjsHelpers-BkfeUUK-.mjs +0 -1
  78. package/dist/shared/index-DvgfXZhq.mjs +0 -88
  79. package/dist/shared/phone-D5XIxT7-.mjs +0 -1
  80. package/dist/shared/useNavigatorOnline-LJuH4983.mjs +0 -1
  81. package/dist/shared/useOnClickOutside-BpHwxqHS.mjs +0 -1
  82. package/dist/shared/uuidColor-CQNs37so.mjs +0 -20
@@ -1 +1 @@
1
- "use strict";import{B as a,i as s,E as e,L as r,j as i,M as t,g as C,O as h,P as n,R as o,e as S,d as m,S as g,a as p,b as c,k as d,c as l,f as O,h as b,m as k}from"../../shared/SignupBigNumbers-DTFFbGIC.mjs";export{a as BigNumber,s as EmptyChartSection,e as ErrorCodesChart,r as LoadingChartSection,i as MetricLastUpdated,t as MonthlySignupsOverviewTable,C as OneClickOverTimeChart,h as OneClickPercentageChart,n as PieChart,o as ReasonCodesChart,S as RiskScoreBarChart,m as RiskScorePieChart,g as SeriesChart,p as SeriesChartLegend,c as SeriesPercentageChart,d as SignupBigNumbers,l as SimpleBarChart,O as SimpleLegend,b as mapMonthlySignupsOverviewTableData,k as mapTimeSeriesData};
1
+ "use strict";import{B as a,i as s,E as e,L as r,j as i,M as t,g as C,O as h,P as n,R as o,e as S,d as m,S as g,a as p,b as c,k as d,c as l,f as O,h as b,m as k}from"../../shared/SignupBigNumbers-BO1JJl6G.mjs";export{a as BigNumber,s as EmptyChartSection,e as ErrorCodesChart,r as LoadingChartSection,i as MetricLastUpdated,t as MonthlySignupsOverviewTable,C as OneClickOverTimeChart,h as OneClickPercentageChart,n as PieChart,o as ReasonCodesChart,S as RiskScoreBarChart,m as RiskScorePieChart,g as SeriesChart,p as SeriesChartLegend,c as SeriesPercentageChart,d as SignupBigNumbers,l as SimpleBarChart,O as SimpleLegend,b as mapMonthlySignupsOverviewTableData,k as mapTimeSeriesData};
@@ -1,13 +1,16 @@
1
- import { ChangeEventHandler } from 'react';
1
+ import { ReactNode, ChangeEventHandler } from 'react';
2
2
  import { TextFieldProps } from '@mui/material';
3
+ import { InputMaskProps } from '../InputMask';
3
4
  interface DateInputProps extends Omit<TextFieldProps, 'onBlur' | 'onChange'> {
4
- label?: string;
5
+ label?: ReactNode;
5
6
  value?: string;
6
7
  helperText?: string;
7
8
  onChange?: (value: string) => void;
8
9
  onBlur?: ChangeEventHandler<HTMLInputElement>;
10
+ pickerDefaultSelectedDate?: Date;
9
11
  pickerClickOutsideBoundaryElement?: HTMLElement;
10
12
  pickerInputOverflow?: boolean;
13
+ inputMaskProps?: Readonly<Partial<InputMaskProps>>;
11
14
  }
12
15
  export declare const DateInput: import('react').ForwardRefExoticComponent<Omit<Readonly<DateInputProps>, "ref"> & import('react').RefAttributes<unknown>>;
13
16
  export {};
@@ -12,7 +12,7 @@ interface BeforeMaskedStateChangeOptions {
12
12
  currentState: State;
13
13
  nextState: State;
14
14
  }
15
- interface InputMaskProps {
15
+ export interface InputMaskProps {
16
16
  children: ReactNode;
17
17
  mask: string | Array<RegExp | string>;
18
18
  value: string;
@@ -1 +1,2 @@
1
- export default function CredentialsDisplay(): import("react").JSX.Element;
1
+ import { ReactElement } from 'react';
2
+ export default function CredentialsDisplay(): ReactElement;
@@ -1,10 +1,11 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { CredentialDisplayInfo, CredentialRequests, Credentials } from './types';
3
3
  export type CredentialsDisplayContext = {
4
4
  credentialRequests: any[];
5
5
  credentials: any[];
6
6
  displayInfoList: CredentialDisplayInfo[];
7
7
  schema: any;
8
+ isEditMode: boolean;
8
9
  handleChangeCredentialInstance(path: string, credentialId: string): void;
9
10
  handleChangeValueCredential(path: string, value: unknown, options?: {
10
11
  shouldValidate?: boolean;
@@ -13,6 +14,7 @@ export type CredentialsDisplayContext = {
13
14
  handleChangeValidationCredential(path: string, valid: boolean, message?: string): void;
14
15
  handleSelectCredential(path: string, checked: boolean, shouldCascade: boolean): void;
15
16
  handleToggleEditModeCredential(path: string, editMode: boolean): void;
17
+ setEditMode(editMode: boolean): void;
16
18
  };
17
19
  type CredentialValue = {
18
20
  credentials: Credentials[];
@@ -32,5 +34,5 @@ export declare function useCredentialsDisplay(): CredentialsDisplayContext;
32
34
  export default function CredentialsDisplayProvider({ value, children, }: {
33
35
  value: CredentialValue;
34
36
  children: ReactNode | ReactNode[];
35
- }): import("react").JSX.Element;
37
+ }): ReactElement;
36
38
  export {};
@@ -1,8 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { SxProps } from '@mui/material';
1
+ import { ReactElement, ReactNode } from 'react';
3
2
  type CredentialsDisplayItemProps = {
4
3
  providerProps: any;
5
- sx?: SxProps;
6
4
  children?: ReactNode;
7
5
  };
8
6
  /**
@@ -11,5 +9,5 @@ type CredentialsDisplayItemProps = {
11
9
  * @param props
12
10
  * @constructor
13
11
  */
14
- export declare function CredentialsDisplayItem({ providerProps, ...props }: CredentialsDisplayItemProps): import("react").JSX.Element;
12
+ export declare function CredentialsDisplayItem({ providerProps, ...props }: CredentialsDisplayItemProps): ReactElement;
15
13
  export {};
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { FieldValues, UseControllerReturn } from 'react-hook-form';
3
3
  import { CredentialDisplayInfo, CredentialFieldSet } from './types';
4
4
  export type CredentialsDisplayItemContext = {
@@ -17,6 +17,9 @@ export type CredentialsDisplayItemContext = {
17
17
  handleChangeDebouncedValueCredential(value: unknown, options?: {
18
18
  shouldValidate?: boolean;
19
19
  }): void;
20
+ handleChangeChildValueCredential(childPath: string, value: unknown, options?: {
21
+ shouldValidate?: boolean;
22
+ }): void;
20
23
  handleClearValueCredential(): void;
21
24
  handleChangeValidationCredential(valid: boolean, message?: string): void;
22
25
  handleChangeCredentialInstance(credentialId: string): void;
@@ -39,5 +42,5 @@ type CredentialsDisplayItemProviderProps = {
39
42
  * @param props
40
43
  * @constructor
41
44
  */
42
- export default function CredentialsDisplayItemProvider(props: CredentialsDisplayItemProviderProps): import("react").JSX.Element;
45
+ export default function CredentialsDisplayItemProvider(props: CredentialsDisplayItemProviderProps): ReactElement;
43
46
  export {};
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export declare function EditModeButton(): ReactElement | null;
@@ -0,0 +1 @@
1
+ export * from './EditModeButton';
@@ -3,5 +3,6 @@
3
3
  */
4
4
  export declare function useCredentialsDisplayItemValid(): {
5
5
  isValid: boolean;
6
+ isFormInvalid: boolean;
6
7
  errorMessage: string | undefined;
7
8
  };
@@ -60,6 +60,7 @@ export interface CredentialField {
60
60
  id: string;
61
61
  value: string;
62
62
  credentialDisplayInfo: CredentialDisplayInfo;
63
+ type: string;
63
64
  }
64
65
  export type CredentialFieldSet = CredentialField & {
65
66
  [key: string]: CredentialFieldSet;
@@ -0,0 +1,9 @@
1
+ import { CredentialFieldSet } from '../types';
2
+ /**
3
+ * Extracts all nested child credential fields from a CredentialFieldSet object.
4
+ *
5
+ * @param {CredentialFieldSet} credentialFieldSet - The credential field set to extract child fields from.
6
+ * @returns {Record<string, CredentialFieldSet>} An object containing only the nested credential field sets,
7
+ * where keys are the property names and values are the corresponding CredentialFieldSet objects.
8
+ */
9
+ export declare function extractChildrenFromCredentialFieldSet(credentialFieldSet: CredentialFieldSet): Record<string, CredentialFieldSet>;
@@ -14,3 +14,4 @@ export * from './transformToFormObject';
14
14
  export * from './transformToFormSchema';
15
15
  export * from './getParentPath';
16
16
  export * from './getLastPathName';
17
+ export * from './extractChildrenFromCredentialFieldSet';
@@ -1,8 +1,15 @@
1
1
  import { OneClickFormOptions } from '../../../contexts/one-click-form-options.context';
2
- import { CredentialDisplayInfo } from '../types';
2
+ import { CredentialFieldSet } from '../types';
3
3
  import * as zod from 'zod';
4
+ type Options = {
5
+ schema: any;
6
+ };
7
+ type Context = {
8
+ parentFieldSet?: CredentialFieldSet;
9
+ };
4
10
  /**
5
11
  * Transforms the display info list into a form schema.
6
12
  * @param displayInfoList
7
13
  */
8
- export declare function transformToFormSchema(displayInfoList: CredentialDisplayInfo[], oneClickFormOptions: OneClickFormOptions): zod.ZodObject<any>;
14
+ export declare function transformToFormSchema(fieldSet: CredentialFieldSet, options: Options, oneClickFormOptions: OneClickFormOptions, context?: Context): zod.ZodObject<any>;
15
+ export {};
@@ -1,5 +1,6 @@
1
+ import { ReactElement } from 'react';
1
2
  /**
2
3
  * This component renders an atomic level credential, it displays the component by displayFormat.
3
4
  * @constructor
4
5
  */
5
- export declare function DataFieldAtomic(): import("react").JSX.Element;
6
+ export declare function DataFieldAtomic(): ReactElement | null;
@@ -1,6 +1,7 @@
1
+ import { ReactElement } from 'react';
1
2
  /**
2
3
  * This component renders and manages the check for atomic and composite level,
3
4
  * when composite, it controls the children also by selecting/deselecting them.
4
5
  * @constructor
5
6
  */
6
- export declare function DataFieldCheckbox(): import("react").JSX.Element;
7
+ export declare function DataFieldCheckbox(): ReactElement | null;
@@ -1,5 +1,6 @@
1
+ import { ReactElement } from 'react';
1
2
  type DataFieldClearAdornmentProps = Readonly<{
2
3
  onClick?: () => void;
3
4
  }>;
4
- export declare function DataFieldClearAdornment({ onClick, }: DataFieldClearAdornmentProps): import("react").JSX.Element;
5
+ export declare function DataFieldClearAdornment({ onClick, }: DataFieldClearAdornmentProps): ReactElement;
5
6
  export {};
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  type DataFieldCompositeProps = {
3
3
  children?: ReactNode | ReactNode[] | undefined;
4
4
  };
@@ -7,5 +7,5 @@ type DataFieldCompositeProps = {
7
7
  * @param props
8
8
  * @constructor
9
9
  */
10
- export declare function DataFieldComposite(props: DataFieldCompositeProps): import("react").JSX.Element;
10
+ export declare function DataFieldComposite(props: DataFieldCompositeProps): ReactElement | null;
11
11
  export {};
@@ -1 +1,2 @@
1
- export declare function HeaderSelect(): import("react").JSX.Element;
1
+ import { ReactElement } from 'react';
2
+ export declare function HeaderSelect(): ReactElement;
@@ -0,0 +1,2 @@
1
+ import { CredentialDisplayInfo } from '../../../../CredentialsDisplay/types';
2
+ export declare function getAddressFormat(credentialDisplayInfo: CredentialDisplayInfo): string | null;
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from 'react';
2
+ import { CredentialDisplayInfo } from '../../../../CredentialsDisplay/types';
3
+ export declare const renderInstance: (renderAsString: boolean) => (credentialDisplayInfo: CredentialDisplayInfo) => string | import("react").JSX.Element | (string | ReactElement<any, string | import('react').JSXElementConstructor<any>>)[];
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from 'react';
1
2
  type DataFieldHeaderProps = Readonly<{
2
3
  block?: boolean;
3
4
  onFocus?: () => void;
@@ -7,5 +8,5 @@ type DataFieldHeaderProps = Readonly<{
7
8
  * of desired credential to be used.
8
9
  * @constructor
9
10
  */
10
- export declare function DataFieldHeader(props: DataFieldHeaderProps): import("react").JSX.Element;
11
+ export declare function DataFieldHeader(props: DataFieldHeaderProps): ReactElement;
11
12
  export {};
@@ -0,0 +1,19 @@
1
+ import { PropsWithChildren, ReactElement, ReactNode } from 'react';
2
+ import { OverridableStringUnion } from '@mui/types';
3
+ import { Variant } from '@mui/material/styles/createTypography';
4
+ import { SxProps } from '@mui/material';
5
+ import { TypographyPropsVariantOverrides } from '@mui/material/Typography/Typography';
6
+ type DataFieldLabelInputProps = PropsWithChildren & {
7
+ label?: ReactNode;
8
+ variant?: OverridableStringUnion<'inherit' | Variant, TypographyPropsVariantOverrides>;
9
+ sx?: SxProps;
10
+ };
11
+ /**
12
+ * Component to display a credential label.
13
+ * @param variant
14
+ * @param label
15
+ * @param sx
16
+ * @constructor
17
+ */
18
+ export declare function DataFieldInputLabel({ variant, label, sx, }: DataFieldLabelInputProps): ReactElement;
19
+ export {};
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from 'react';
1
2
  import { SxProps } from '@mui/material';
2
3
  type DataFieldInputModeHeaderProps = {
3
4
  sx?: SxProps;
@@ -6,5 +7,5 @@ type DataFieldInputModeHeaderProps = {
6
7
  * Component that displays the header on input mode for a data field.
7
8
  * @constructor
8
9
  */
9
- export declare function DataFieldInputModeHeader(props: Readonly<DataFieldInputModeHeaderProps>): import("react").JSX.Element | null;
10
+ export declare function DataFieldInputModeHeader(props: Readonly<DataFieldInputModeHeaderProps>): ReactElement | null;
10
11
  export {};
@@ -1,19 +1,2 @@
1
- import { PropsWithChildren, ReactNode } from 'react';
2
- import { OverridableStringUnion } from '@mui/types';
3
- import { Variant } from '@mui/material/styles/createTypography';
4
- import { SxProps } from '@mui/material';
5
- import { TypographyPropsVariantOverrides } from '@mui/material/Typography/Typography';
6
- type DataFieldLabelProps = PropsWithChildren & {
7
- label?: ReactNode;
8
- variant?: OverridableStringUnion<'inherit' | Variant, TypographyPropsVariantOverrides>;
9
- sx?: SxProps;
10
- };
11
- /**
12
- * Component to display a credential label.
13
- * @param variant
14
- * @param label
15
- * @param sx
16
- * @constructor
17
- */
18
- export declare function DataFieldLabel({ variant, label, sx }: DataFieldLabelProps): import("react").JSX.Element;
19
- export {};
1
+ import { ReactElement } from 'react';
2
+ export declare function DataFieldLabel(): ReactElement;
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from 'react';
1
2
  type DataFieldLabelTextProps = {
2
3
  prefix?: string;
3
4
  hideRequired?: boolean;
@@ -6,5 +7,5 @@ type DataFieldLabelTextProps = {
6
7
  * Component to display a credential label text, when required it renders an asterisk.
7
8
  * @constructor
8
9
  */
9
- export declare function DataFieldLabelText(props: DataFieldLabelTextProps): import("react").JSX.Element;
10
+ export declare function DataFieldLabelText(props: DataFieldLabelTextProps): ReactElement;
10
11
  export {};
@@ -1,6 +1,7 @@
1
+ import { ReactElement } from 'react';
1
2
  /**
2
3
  * This component will render the left side of a data field,
3
4
  * rendering checkbox or nothing depending on the isSelectable field.
4
5
  * @constructor
5
6
  */
6
- export declare function DataFieldLeftSide(): import("react").JSX.Element;
7
+ export declare function DataFieldLeftSide(): ReactElement;
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
2
  import { SxProps } from '@mui/material';
3
3
  type DataFieldPaperProps = PropsWithChildren & {
4
4
  sx?: SxProps;
@@ -9,5 +9,5 @@ type DataFieldPaperProps = PropsWithChildren & {
9
9
  * @param sx
10
10
  * @constructor
11
11
  */
12
- export declare function DataFieldPaper({ children, sx }: DataFieldPaperProps): import("react").JSX.Element;
12
+ export declare function DataFieldPaper({ children, sx, }: DataFieldPaperProps): ReactElement;
13
13
  export {};
@@ -1,9 +1,8 @@
1
+ import { ReactElement } from 'react';
1
2
  import { StackProps } from '@mui/material';
2
- type DataFieldStackProps = StackProps;
3
3
  /**
4
4
  * This component renders a sequence of data field atomic/composite credentials and spaces them.
5
5
  * @param props
6
6
  * @constructor
7
7
  */
8
- export declare function DataFieldStack(props: DataFieldStackProps): import("react").JSX.Element;
9
- export {};
8
+ export declare function DataFieldStack(props: StackProps): ReactElement;
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
2
  import { SxProps } from '@mui/material';
3
3
  type DataFieldValueProps = PropsWithChildren & {
4
4
  sx?: SxProps;
@@ -9,5 +9,5 @@ type DataFieldValueProps = PropsWithChildren & {
9
9
  * @param sx
10
10
  * @constructor
11
11
  */
12
- export declare function DataFieldValue({ children, sx }: DataFieldValueProps): import("react").JSX.Element;
12
+ export declare function DataFieldValue({ children, sx, }: DataFieldValueProps): ReactElement;
13
13
  export {};
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from 'react';
1
2
  type DataFieldImageProps = {
2
3
  hasMultipleInstances: boolean;
3
4
  };
@@ -5,5 +6,5 @@ type DataFieldImageProps = {
5
6
  * This component is responsible to render the credential of type Image.
6
7
  * @constructor
7
8
  */
8
- export declare function DataFieldImage(props: DataFieldImageProps): import("react").JSX.Element;
9
+ export declare function DataFieldImage(props: DataFieldImageProps): ReactElement;
9
10
  export {};
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from 'react';
1
2
  type DataFieldInputAddressProps = {
2
3
  hasMultipleInstances: boolean;
3
4
  };
@@ -5,5 +6,5 @@ type DataFieldInputAddressProps = {
5
6
  * This component renders and manages display format Address.
6
7
  * @constructor
7
8
  */
8
- export declare function DataFieldInputAddress(props: DataFieldInputAddressProps): import("react").JSX.Element;
9
+ export declare function DataFieldInputAddress(props: DataFieldInputAddressProps): ReactElement;
9
10
  export {};
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * This component renders and manages the input value for display format Text or to strings.
4
+ * @constructor
5
+ */
6
+ export declare function DataFieldText(): ReactElement;
@@ -1,3 +1,3 @@
1
1
  export * from './DataFieldImage';
2
2
  export * from './DataFieldInputAddress';
3
- export * from './DataFieldInputText';
3
+ export * from './DataFieldText';
@@ -1,5 +1,8 @@
1
- export * from './DataFieldLabel';
1
+ export * from './DataFieldInputLabel';
2
2
  export * from './DataFieldValue';
3
3
  export * from './DataFieldGroup';
4
4
  export * from './DataFieldLegend';
5
5
  export * from './DataFieldLabelText';
6
+ export * from './DataFieldLabel';
7
+ export * from './DataFieldInputModeHeader';
8
+ export * from './DataFieldLeftSide';
@@ -0,0 +1,13 @@
1
+ export type Address = {
2
+ line1?: string;
3
+ city?: string;
4
+ state?: string;
5
+ zipCode?: string;
6
+ country: string;
7
+ };
8
+ export declare function useAutoFill(): {
9
+ handleAutoComplete: (value: string) => Promise<void>;
10
+ buildAddress: (place: google.maps.places.Place) => Address;
11
+ suggestions: google.maps.places.AutocompleteSuggestion[];
12
+ isPending: boolean;
13
+ };
@@ -0,0 +1,16 @@
1
+ import { useCredentialsDisplayItem } from '../../../CredentialsDisplay/CredentialsDisplayItemContext';
2
+ import { Option } from './types';
3
+ export declare function useDataFieldAddressInput({ credentialsDisplayItem, }: {
4
+ credentialsDisplayItem: ReturnType<typeof useCredentialsDisplayItem>;
5
+ }): {
6
+ value: Option;
7
+ inputValue: string;
8
+ suggestions: google.maps.places.AutocompleteSuggestion[];
9
+ isPending: boolean;
10
+ isFetchingPlace: boolean;
11
+ error: string | undefined;
12
+ handleInputChange: (newInputValue: string, changeOptions?: {
13
+ shouldValidate?: boolean;
14
+ }) => void;
15
+ handleOptionChange: (option: Option) => Promise<void>;
16
+ };
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * This component composes the fields of address except line 2.
4
+ * @constructor
5
+ */
6
+ export declare function DataFieldAddressInput(): ReactElement;
@@ -0,0 +1,4 @@
1
+ export type Option = {
2
+ title: string;
3
+ value: google.maps.places.AutocompleteSuggestion | undefined;
4
+ };
@@ -1,5 +1,6 @@
1
+ import { ReactElement } from 'react';
1
2
  /**
2
3
  * This component manages the input of type Date.
3
4
  * @constructor
4
5
  */
5
- export declare function DataFieldDateInput(): import("react").JSX.Element;
6
+ export declare function DataFieldDateInput(): ReactElement;
@@ -1,5 +1,6 @@
1
+ import { ReactElement } from 'react';
1
2
  /**
2
3
  * This component manages the input of type Image.
3
4
  * @constructor
4
5
  */
5
- export declare function DataFieldImageInput(): import("react").JSX.Element;
6
+ export declare function DataFieldImageInput(): ReactElement;
@@ -4,3 +4,4 @@ export * from './DataFieldPhoneInput';
4
4
  export * from './DataFieldDateInput';
5
5
  export * from './DataFieldSSNInput';
6
6
  export * from './DataFieldImageInput';
7
+ export * from './DataFieldAddressInput';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gets the credential label based on the type.
3
+ * @param label The credential label
4
+ * @param type The credential type
5
+ * @returns The credential label
6
+ */
7
+ export declare function getCredentialLabel(label: string | undefined, type: string): string | undefined;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gets the credential label based on the type.
3
+ * @param label The credential label
4
+ * @param type The credential type
5
+ * @returns The credential label
6
+ */
7
+ export declare function getCredentialLabelInput(label: string | undefined, type: string): string | undefined;
@@ -1,3 +1,4 @@
1
1
  export * from './hasSomeRequiredEmptyCredential';
2
2
  export * from './getCredentialSeparator';
3
3
  export * from './defaults';
4
+ export * from './getCredentialLabel';
@@ -0,0 +1,6 @@
1
+ export declare const credentialTypes: {
2
+ readonly SSNCredential: "SSNCredential";
3
+ readonly FullNameCredential: "FullNameCredential";
4
+ readonly AddressCredential: "AddressCredential";
5
+ readonly Line2Credential: "Line2Credential";
6
+ };
@@ -0,0 +1 @@
1
+ export * from './credentialTypes';
@@ -1,5 +1,6 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  type OneClickOptionFeatures = {
3
+ googlePlacesApiKey?: string;
3
4
  selectableCredentials?: boolean;
4
5
  phoneCredentialWhitelist?: string[];
5
6
  phoneCredentialRegexWhitelist?: string;
@@ -9,9 +10,13 @@ type OneClickOptionFeatures = {
9
10
  type OneClickOptionServicePaths = {
10
11
  credentialImagePath: string;
11
12
  };
13
+ type OneClickOptionApiKeys = {
14
+ googlePlacesApiKey?: string;
15
+ };
12
16
  export type OneClickFormOptions = {
13
17
  features: OneClickOptionFeatures;
14
18
  servicePaths: OneClickOptionServicePaths;
19
+ apiKeys: OneClickOptionApiKeys;
15
20
  };
16
21
  type OneClickFormOptionsContext = {
17
22
  options: OneClickFormOptions;
@@ -26,5 +31,5 @@ export declare function useOneClickFormOptions(): OneClickFormOptionsContext;
26
31
  * @param props
27
32
  * @constructor
28
33
  */
29
- export declare function OneClickFormOptionsProvider(props: OneClickFormOptionsProviderProps): import("react").JSX.Element;
34
+ export declare function OneClickFormOptionsProvider(props: OneClickFormOptionsProviderProps): ReactElement;
30
35
  export {};
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
3
  import { OneClickFormOptions } from './contexts/one-click-form-options.context';
4
4
  import { CredentialRequests, Credentials, CredentialSchemas } from './types/request';
@@ -10,5 +10,5 @@ type OneClickFormProps = {
10
10
  renderExtra?: ReactNode;
11
11
  queryClient?: QueryClient;
12
12
  };
13
- export declare function OneClickForm({ credentialRequests, credentials, schema, options, renderExtra, queryClient: _queryClient, }: OneClickFormProps): import("react").JSX.Element;
13
+ export declare function OneClickForm({ credentialRequests, credentials, schema, options, renderExtra, queryClient: _queryClient, }: OneClickFormProps): ReactElement;
14
14
  export {};
@@ -2,5 +2,8 @@ import { TextFieldProps } from '@mui/material';
2
2
  /**
3
3
  * The base style definition for input fields, it should reflect changes across all inputs.
4
4
  */
5
- export declare const inputStyle: TextFieldProps;
5
+ export declare const inputStyle: {
6
+ readonly variant: "outlined";
7
+ readonly size: "small";
8
+ };
6
9
  export declare const readOnlyInputStyle: TextFieldProps;
@@ -6,7 +6,51 @@
6
6
  export declare const parseCountryCode: (code: string) => string;
7
7
  /**
8
8
  * Formats an address value.
9
- * @param {string} rawValue the raw address value in the format street, city, ISO 3166-2code postalcode
9
+ * @param {string} rawValue the raw address value in the format street, city, ISO 3166-2 alpha-2 code postalcode
10
10
  * @returns {string} the formatted address value in the format street\n city, region, postalcode\n country
11
+ * @deprecated Use toUSaddress and fromUSAddress instead
11
12
  */
12
13
  export declare const addressFormatter: (rawValue: string) => string;
14
+ /**
15
+ * Formats an address to U.S format.
16
+ * @param {string} address the address value in the format: street number street name city, state, zipCode.
17
+ * @returns {string} the formatted address value in the format: line1, city, state, country(optional), zipCode.
18
+ * @returns {string} with available parts if some fields are missing
19
+ */
20
+ export declare const toUSaddress: (parts: {
21
+ line1?: string;
22
+ line2?: string;
23
+ city?: string;
24
+ state?: string;
25
+ zipCode?: string;
26
+ country?: string;
27
+ }) => string;
28
+ /**
29
+ * Formats an address to U.S format (pretty).
30
+ * @param {string} address the address value in the format: street number street name city, state, zipCode.
31
+ * @returns {string} the formatted address value in the format: line1, city, state, country(optional), zipCode.
32
+ * @returns {null} if the address parts are invalid
33
+ */
34
+ export declare const toUSaddressPretty: (parts: {
35
+ line1: string;
36
+ line2?: string;
37
+ city: string;
38
+ state: string;
39
+ zipCode: string;
40
+ country?: string;
41
+ }) => string | null;
42
+ /**
43
+ * Parses a US formatted address string back into its component parts.
44
+ * Expected format: "street address, city, state zipCode"
45
+ * Example: "5320 Newell Rd, Palo Alto, CA 94303"
46
+ *
47
+ * @param {string} formattedAddress The formatted address string
48
+ * @returns Object containing the address parts or null if parsing fails
49
+ */
50
+ export declare const fromUSAddress: (formattedAddress: string) => {
51
+ line1?: string;
52
+ city?: string;
53
+ state?: string;
54
+ zipCode?: string;
55
+ country: string;
56
+ } | null;