@authvia/payment-method-create 0.1.0 → 0.1.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.
@@ -31,6 +31,9 @@ declare const _default: import('vue').DefineComponent<Props, {
31
31
  ach: {
32
32
  demoMode?: boolean;
33
33
  online?: boolean;
34
+ title?: string;
35
+ subtitle?: string;
36
+ submitBtnText?: string;
34
37
  nameOnAccount?: string;
35
38
  routingNumber?: string;
36
39
  accountNumber?: string;
@@ -52,6 +55,12 @@ declare const _default: import('vue').DefineComponent<Props, {
52
55
  card: {
53
56
  allow?: boolean;
54
57
  demoMode?: boolean;
58
+ title?: string;
59
+ subtitle?: string;
60
+ submitBtnText?: string;
61
+ cardNumber?: string;
62
+ expiration?: string;
63
+ cvv?: string;
55
64
  nameOnCard?: string;
56
65
  streetAddress?: string;
57
66
  city?: string;
@@ -1,2 +1,6 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
1
+ import { TermsConfig } from '../../types';
2
+ type __VLS_Props = {
3
+ terms?: TermsConfig;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
2
6
  export default _default;
@@ -1,5 +1,6 @@
1
- import { Ref, ComputedRef, PropType } from 'vue';
1
+ import { ComputedRef, PropType, Ref } from 'vue';
2
2
  import { PaymentMethod, PaymentMethodBillingAddress } from '../../model';
3
+ import { TermsConfig } from '../../types';
3
4
  export interface P_ACHValues {
4
5
  nameOnAccount: string;
5
6
  accountNumber: string;
@@ -11,10 +12,15 @@ export interface P_ACHValues {
11
12
  country: string;
12
13
  postalCode: string;
13
14
  }
15
+ type AchFieldKey = 'routingNumber' | 'accountNumber' | 'nameOnAccount';
16
+ type ValidationRule = (value: unknown) => true | string;
17
+ type VuetifyFieldVariant = 'outlined' | 'plain' | 'underlined' | 'filled' | 'solo' | 'solo-filled' | 'solo-inverted';
14
18
  export interface Props {
15
- dataDemoMode?: boolean;
16
- dataSubmitLabel?: string;
17
- dataPlaid?: Record<string, unknown>;
19
+ demoMode?: boolean;
20
+ submitBtnText?: string;
21
+ plaid?: Record<string, unknown>;
22
+ billingAddress?: PaymentMethodBillingAddress;
23
+ terms?: TermsConfig;
18
24
  forgetHidden?: boolean;
19
25
  forgetDefault?: boolean;
20
26
  authToken: string;
@@ -24,16 +30,24 @@ export interface Props {
24
30
  merchantId?: string;
25
31
  }
26
32
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
27
- dataDemoMode: {
33
+ demoMode: {
28
34
  type: BooleanConstructor;
29
- default: boolean;
35
+ required: false;
30
36
  };
31
- dataSubmitLabel: {
37
+ submitBtnText: {
32
38
  type: StringConstructor;
33
- default: string;
39
+ required: false;
40
+ };
41
+ plaid: {
42
+ type: PropType<Record<string, unknown>>;
43
+ required: false;
44
+ };
45
+ billingAddress: {
46
+ type: PropType<PaymentMethodBillingAddress>;
47
+ required: false;
34
48
  };
35
- dataPlaid: {
36
- type: ObjectConstructor;
49
+ terms: {
50
+ type: PropType<TermsConfig>;
37
51
  required: false;
38
52
  };
39
53
  forgetHidden: {
@@ -80,11 +94,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
80
94
  savings: string;
81
95
  checking: string;
82
96
  };
83
- fieldVariant: ComputedRef<string>;
84
- fieldVariantSafe: ComputedRef<any>;
97
+ fieldVariant: ComputedRef<VuetifyFieldVariant>;
98
+ fieldVariantSafe: ComputedRef<VuetifyFieldVariant>;
85
99
  formData: P_ACHValues;
86
100
  isWorking: Ref<boolean, boolean>;
87
101
  isFormValid: ComputedRef<boolean>;
102
+ markFieldDirty: (field: AchFieldKey) => void;
103
+ getFieldRules: (field: AchFieldKey) => ValidationRule[];
104
+ routingNumberModel: ComputedRef<string>;
105
+ accountNumberModel: ComputedRef<string>;
106
+ nameOnAccountModel: ComputedRef<string>;
107
+ onDigitKeydown: (event: KeyboardEvent) => void;
108
+ onNameKeydown: (event: KeyboardEvent) => void;
109
+ onRoutingPaste: (event: ClipboardEvent) => void;
110
+ onAccountPaste: (event: ClipboardEvent) => void;
111
+ onNamePaste: (event: ClipboardEvent) => void;
88
112
  errorsType: Ref<{
89
113
  other: string | undefined;
90
114
  }, {
@@ -103,8 +127,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
103
127
  azp: string;
104
128
  handleAddressFormSubmit: (data: PaymentMethodBillingAddress) => void;
105
129
  handleUpdateForgetCard: (_value: boolean) => void;
106
- addressFormRef: Ref<any, any>;
107
- formRef: Ref<any, any>;
130
+ addressFormRef: Ref<unknown, unknown>;
131
+ formRef: Ref<unknown, unknown>;
132
+ demoMode: ComputedRef<boolean>;
133
+ plaid: ComputedRef<Record<string, unknown> | undefined>;
134
+ billingAddress: ComputedRef<PaymentMethodBillingAddress | undefined>;
108
135
  streetAddress: string;
109
136
  city: string;
110
137
  state: string;
@@ -113,16 +140,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
113
140
  googleMapsApiKey: string;
114
141
  isAddressFormValid: (isValid: boolean) => void;
115
142
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "success" | "submit")[], "error" | "success" | "submit", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
116
- dataDemoMode: {
143
+ demoMode: {
117
144
  type: BooleanConstructor;
118
- default: boolean;
145
+ required: false;
119
146
  };
120
- dataSubmitLabel: {
147
+ submitBtnText: {
121
148
  type: StringConstructor;
122
- default: string;
149
+ required: false;
150
+ };
151
+ plaid: {
152
+ type: PropType<Record<string, unknown>>;
153
+ required: false;
154
+ };
155
+ billingAddress: {
156
+ type: PropType<PaymentMethodBillingAddress>;
157
+ required: false;
123
158
  };
124
- dataPlaid: {
125
- type: ObjectConstructor;
159
+ terms: {
160
+ type: PropType<TermsConfig>;
126
161
  required: false;
127
162
  };
128
163
  forgetHidden: {
@@ -171,11 +206,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
171
206
  }>, {
172
207
  variant: string;
173
208
  forgetDefault: boolean;
209
+ demoMode: boolean;
174
210
  forgetHidden: boolean;
175
- dataDemoMode: boolean;
176
- dataSubmitLabel: string;
177
211
  }, {}, {
178
- AuthviaFormWithTerms: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
212
+ AuthviaFormWithTerms: import('vue').DefineComponent<{
213
+ terms?: TermsConfig;
214
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
215
+ terms?: TermsConfig;
216
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
179
217
  AuthviaForgotCardOption: import('vue').DefineComponent<import('./AuthviaForgotCardOption.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
180
218
  "update:forgetCard": (value: boolean) => any;
181
219
  }, string, import('vue').PublicProps, Readonly<import('./AuthviaForgotCardOption.vue').Props> & Readonly<{
@@ -1,5 +1,11 @@
1
1
  import { ComputedRef, PropType, Ref } from 'vue';
2
2
  import { PaymentMethodBillingAddress } from '../../model';
3
+ type CreditCardPrefill = {
4
+ cardNumber?: string;
5
+ nameOnCard?: string;
6
+ expiration?: string;
7
+ cvv?: string;
8
+ };
3
9
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
10
  demoMode: {
5
11
  type: BooleanConstructor;
@@ -36,6 +42,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
36
42
  type: StringConstructor;
37
43
  required: false;
38
44
  };
45
+ cardNumber: {
46
+ type: StringConstructor;
47
+ required: false;
48
+ };
49
+ nameOnCard: {
50
+ type: StringConstructor;
51
+ required: false;
52
+ };
53
+ expiration: {
54
+ type: StringConstructor;
55
+ required: false;
56
+ };
57
+ cvv: {
58
+ type: StringConstructor;
59
+ required: false;
60
+ };
39
61
  variant: {
40
62
  type: StringConstructor;
41
63
  required: false;
@@ -49,20 +71,20 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
49
71
  submitLabel: {
50
72
  type: StringConstructor;
51
73
  required: false;
52
- default: string;
74
+ default: any;
53
75
  };
54
76
  }>, {
55
77
  squelch: boolean;
56
78
  token: string;
57
- prefill: Ref<any, any>;
79
+ prefill: Ref<CreditCardPrefill, CreditCardPrefill>;
58
80
  inDemoMode: Ref<boolean, boolean>;
59
81
  isFormReady: Ref<boolean, boolean>;
60
82
  isFormSubmit: Ref<boolean, boolean>;
61
83
  isPaymentMethodAdded: Ref<boolean, boolean>;
62
- paymentMethodResponse: Ref<any, any>;
84
+ paymentMethodResponse: Ref<unknown, unknown>;
63
85
  working: Ref<boolean, boolean>;
64
86
  isMerchantActive: ComputedRef<boolean>;
65
- errorMessage: Ref<any, any>;
87
+ errorMessage: Ref<unknown, unknown>;
66
88
  isBillingAddressMode: Ref<boolean, boolean>;
67
89
  name: string;
68
90
  streetAddress: string;
@@ -71,10 +93,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
71
93
  postalCode: string;
72
94
  country: string;
73
95
  isAddressEditable: boolean;
96
+ cardNumber: ComputedRef<string>;
97
+ nameOnCard: ComputedRef<string>;
98
+ expiration: ComputedRef<string>;
99
+ cvv: ComputedRef<string>;
74
100
  variant: string;
75
- submitLabel: string;
76
- handleSuccess: (event: any) => void;
77
- handleError: (error: any) => void;
101
+ submitLabel: any;
102
+ handleSuccess: (event: unknown) => void;
103
+ handleError: (error: unknown) => void;
78
104
  apiBaseUrl: string;
79
105
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "success")[], "error" | "success", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
80
106
  demoMode: {
@@ -112,6 +138,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
112
138
  type: StringConstructor;
113
139
  required: false;
114
140
  };
141
+ cardNumber: {
142
+ type: StringConstructor;
143
+ required: false;
144
+ };
145
+ nameOnCard: {
146
+ type: StringConstructor;
147
+ required: false;
148
+ };
149
+ expiration: {
150
+ type: StringConstructor;
151
+ required: false;
152
+ };
153
+ cvv: {
154
+ type: StringConstructor;
155
+ required: false;
156
+ };
115
157
  variant: {
116
158
  type: StringConstructor;
117
159
  required: false;
@@ -125,7 +167,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
125
167
  submitLabel: {
126
168
  type: StringConstructor;
127
169
  required: false;
128
- default: string;
170
+ default: any;
129
171
  };
130
172
  }>> & Readonly<{
131
173
  onError?: ((...args: any[]) => any) | undefined;
@@ -10,7 +10,7 @@ declare global {
10
10
  interface Window {
11
11
  __AUTHVIA_DEPENDENCY_REGISTRY__?: DependencyRegistry;
12
12
  __AUTHVIA_WEB_COMPONENT_CSS__?: string;
13
- /** Set by @authvia/customer-add-physical-address plugin when used in web component build */
13
+ /** Set by @authvia/address-create plugin when used in web component build */
14
14
  __AUTHVIA_VUE_PLUGIN_CSS__?: string;
15
15
  Vue?: VueRuntime;
16
16
  }
@@ -1,3 +1,15 @@
1
+ /**
2
+ * Create a font-based MDI iconset that ALWAYS returns icon names as strings.
3
+ * This forces Vuetify to use font mode (CSS classes) instead of SVG mode.
4
+ *
5
+ * CRITICAL: We do NOT import 'mdi' from 'vuetify/iconsets/mdi' because
6
+ * that iconset automatically detects font availability and adds a 'component'
7
+ * property when fonts aren't detected (which happens in Shadow DOM).
8
+ *
9
+ * By creating our own iconset with only strings and NO 'component' property,
10
+ * we force Vuetify to always use font mode.
11
+ */
12
+ export declare const createFontMdiIconset: () => any;
1
13
  export declare const createVuetifyInstance: () => {
2
14
  install: (app: import('vue').App<any>) => void;
3
15
  unmount: () => void;
@@ -1,10 +1,37 @@
1
1
  import { PaymentMethodType } from '../model';
2
+ export interface PaymentMethodDisplayText {
3
+ title?: string;
4
+ subtitle?: string;
5
+ order?: number;
6
+ }
7
+ export interface PaymentMethodDisplayConfigMap {
8
+ ach?: PaymentMethodDisplayText;
9
+ card?: PaymentMethodDisplayText;
10
+ paypal?: PaymentMethodDisplayText;
11
+ paze?: PaymentMethodDisplayText;
12
+ venmo?: PaymentMethodDisplayText;
13
+ }
14
+ export interface TermsLinkConfig {
15
+ show?: boolean;
16
+ text?: string;
17
+ href?: string;
18
+ }
19
+ export interface TermsConfig {
20
+ privacyPolicy?: TermsLinkConfig;
21
+ termsOfService?: TermsLinkConfig;
22
+ }
2
23
  export interface AuthviaPaymentMethodFormProps {
3
24
  token?: string;
4
25
  merchantId?: string;
5
26
  card?: {
6
27
  allow?: boolean;
7
28
  demoMode?: boolean;
29
+ title?: string;
30
+ subtitle?: string;
31
+ submitBtnText?: string;
32
+ cardNumber?: string;
33
+ expiration?: string;
34
+ cvv?: string;
8
35
  nameOnCard?: string;
9
36
  streetAddress?: string;
10
37
  city?: string;
@@ -16,6 +43,9 @@ export interface AuthviaPaymentMethodFormProps {
16
43
  demoMode?: boolean;
17
44
  /** When true, show the "Use your online credentials" (Plaid) option for ACH. */
18
45
  online?: boolean;
46
+ title?: string;
47
+ subtitle?: string;
48
+ submitBtnText?: string;
19
49
  nameOnAccount?: string;
20
50
  routingNumber?: string;
21
51
  accountNumber?: string;
@@ -43,6 +73,8 @@ export interface AuthviaPaymentMethodFormProps {
43
73
  variant?: VuetifyProps['variant'];
44
74
  color?: string;
45
75
  borderRadius?: string;
76
+ paymentMethodDisplay?: PaymentMethodDisplayConfigMap;
77
+ terms?: TermsConfig;
46
78
  forgetHidden?: boolean | string;
47
79
  forgetDefault?: boolean | string;
48
80
  primaryColor?: string;
@@ -0,0 +1,18 @@
1
+ export declare const ACH_ROUTING_MAX_LENGTH: number;
2
+ export declare const ACH_ACCOUNT_MAX_LENGTH: number;
3
+ export declare const ACH_NAME_MAX_LENGTH: number;
4
+ export declare const ACH_NAME_MIN_LENGTH: number;
5
+ export declare const ACH_VALIDATION_MESSAGES: {
6
+ readonly routingRequired: "Routing number cannot be blank";
7
+ readonly routingInvalid: "Routing number is invalid";
8
+ readonly accountRequired: "Account number cannot be blank";
9
+ readonly accountInvalid: "Account number is invalid";
10
+ readonly nameRequired: "Account holder name cannot be blank";
11
+ readonly nameInvalid: "Account holder name is not valid; enter your full name and do not use special characters.";
12
+ };
13
+ export declare const normalizeAchTextValue: (value: unknown) => string;
14
+ export declare const sanitizeAchDigits: (value: unknown, maxLength: number) => string;
15
+ export declare const sanitizeAchName: (value: unknown, maxLength?: number) => string;
16
+ export declare const isValidAchRoutingNumber: (value: string) => boolean;
17
+ export declare const isValidAchAccountNumber: (value: string) => boolean;
18
+ export declare const isValidAchFullName: (value: string) => boolean;
@@ -12,8 +12,6 @@ export declare const truncateString: (str: string, limit: number) => string;
12
12
  * @returns cardholder truncated name
13
13
  */
14
14
  export declare const cardHolderName: (name: string) => string;
15
- export declare const getBrandImg: (brand: string) => string;
16
- export declare const getPaymentMethodIcon: (method: any) => string;
17
15
  export declare function hasPaymentMethodsReadScope(token: string | undefined): boolean;
18
16
  /**
19
17
  * Resolves a theme color for legacy callers. Prefer setting `color` / `fill` via CSS (`--avwc-color`) instead.