@vue-stripe/vue-stripe 4.5.0 → 5.0.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 +174 -58
- package/dist/cjs/index.js +1 -0
- package/dist/es/index.js +896 -0
- package/dist/types/components/VueStripeAddressElement.vue.d.ts +105 -0
- package/dist/types/components/VueStripeAddressElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeCardCvcElement.vue.d.ts +24 -0
- package/dist/types/components/VueStripeCardCvcElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeCardElement.vue.d.ts +197 -0
- package/dist/types/components/VueStripeCardElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeCardExpiryElement.vue.d.ts +24 -0
- package/dist/types/components/VueStripeCardExpiryElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeCardNumberElement.vue.d.ts +24 -0
- package/dist/types/components/VueStripeCardNumberElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeCheckout.vue.d.ts +50 -0
- package/dist/types/components/VueStripeCheckout.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeElements.vue.d.ts +90 -0
- package/dist/types/components/VueStripeElements.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeExpressCheckoutElement.vue.d.ts +220 -0
- package/dist/types/components/VueStripeExpressCheckoutElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeLinkAuthenticationElement.vue.d.ts +167 -0
- package/dist/types/components/VueStripeLinkAuthenticationElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripePaymentElement.vue.d.ts +206 -0
- package/dist/types/components/VueStripePaymentElement.vue.d.ts.map +1 -0
- package/dist/types/components/VueStripeProvider.vue.d.ts +42 -0
- package/dist/types/components/VueStripeProvider.vue.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/usePaymentIntent.d.ts +45 -0
- package/dist/types/composables/usePaymentIntent.d.ts.map +1 -0
- package/dist/types/composables/useSetupIntent.d.ts +62 -0
- package/dist/types/composables/useSetupIntent.d.ts.map +1 -0
- package/dist/types/composables/useStripe.d.ts +27 -0
- package/dist/types/composables/useStripe.d.ts.map +1 -0
- package/dist/types/composables/useStripeCheckout.d.ts +9 -0
- package/dist/types/composables/useStripeCheckout.d.ts.map +1 -0
- package/dist/types/composables/useStripeElements.d.ts +26 -0
- package/dist/types/composables/useStripeElements.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +23 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/types/index.d.ts +171 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/constants.d.ts +11 -0
- package/dist/types/utils/constants.d.ts.map +1 -0
- package/dist/types/utils/element-factory.d.ts +28 -0
- package/dist/types/utils/element-factory.d.ts.map +1 -0
- package/dist/types/utils/errors.d.ts +11 -0
- package/dist/types/utils/errors.d.ts.map +1 -0
- package/dist/types/utils/injection-keys.d.ts +15 -0
- package/dist/types/utils/injection-keys.d.ts.map +1 -0
- package/dist/umd/index.js +1 -0
- package/dist/vue-stripe.css +1 -0
- package/package.json +67 -66
- package/CONTRIBUTING.md +0 -77
- package/LICENSE +0 -21
- package/babel.config.js +0 -22
- package/dist/index.js +0 -7
- package/dist/vue-stripe.js +0 -7
- package/rollup.config.js +0 -37
- package/typings/index.d.ts +0 -73
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { StripeAddressElement as StripeAddressElementType, StripeAddressElementOptions, StripeAddressElementChangeEvent, StripeError } from '@stripe/stripe-js';
|
|
2
|
+
import { DefineComponent, ExtractPropTypes, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
|
|
3
|
+
interface AddressElementWithEvents extends StripeAddressElementType {
|
|
4
|
+
on(eventType: string, handler: (...args: any[]) => void): this;
|
|
5
|
+
off(eventType: string, handler?: (...args: any[]) => void): this;
|
|
6
|
+
getValue(): Promise<Pick<StripeAddressElementChangeEvent, 'complete' | 'isNewAddress' | 'value'>>;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
9
|
+
options: {
|
|
10
|
+
type: () => StripeAddressElementOptions;
|
|
11
|
+
default: () => {
|
|
12
|
+
mode: "shipping";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}>, {
|
|
16
|
+
addressRef: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
17
|
+
element: Ref<{
|
|
18
|
+
on: (eventType: string, handler: (...args: any[]) => void) => AddressElementWithEvents;
|
|
19
|
+
off: (eventType: string, handler?: (...args: any[]) => void) => AddressElementWithEvents;
|
|
20
|
+
getValue: () => Promise<Pick<StripeAddressElementChangeEvent, "complete" | "isNewAddress" | "value">>;
|
|
21
|
+
mount: (domElement: string | HTMLElement) => void;
|
|
22
|
+
blur: () => void;
|
|
23
|
+
clear: () => void;
|
|
24
|
+
destroy: () => void;
|
|
25
|
+
focus: () => void;
|
|
26
|
+
unmount: () => void;
|
|
27
|
+
once: {
|
|
28
|
+
(eventType: "change", handler: (event: StripeAddressElementChangeEvent) => any): StripeAddressElementType;
|
|
29
|
+
(eventType: "ready", handler: (event: {
|
|
30
|
+
elementType: "address";
|
|
31
|
+
}) => any): StripeAddressElementType;
|
|
32
|
+
(eventType: "focus", handler: (event: {
|
|
33
|
+
elementType: "address";
|
|
34
|
+
}) => any): StripeAddressElementType;
|
|
35
|
+
(eventType: "blur", handler: (event: {
|
|
36
|
+
elementType: "address";
|
|
37
|
+
}) => any): StripeAddressElementType;
|
|
38
|
+
(eventType: "escape", handler: (event: {
|
|
39
|
+
elementType: "address";
|
|
40
|
+
}) => any): StripeAddressElementType;
|
|
41
|
+
(eventType: "loaderror", handler: (event: {
|
|
42
|
+
elementType: "address";
|
|
43
|
+
error: StripeError;
|
|
44
|
+
}) => any): StripeAddressElementType;
|
|
45
|
+
(eventType: "loaderstart", handler: (event: {
|
|
46
|
+
elementType: "address";
|
|
47
|
+
}) => any): StripeAddressElementType;
|
|
48
|
+
};
|
|
49
|
+
update: (options: Partial<StripeAddressElementOptions>) => StripeAddressElementType;
|
|
50
|
+
} | null, AddressElementWithEvents | {
|
|
51
|
+
on: (eventType: string, handler: (...args: any[]) => void) => AddressElementWithEvents;
|
|
52
|
+
off: (eventType: string, handler?: (...args: any[]) => void) => AddressElementWithEvents;
|
|
53
|
+
getValue: () => Promise<Pick<StripeAddressElementChangeEvent, "complete" | "isNewAddress" | "value">>;
|
|
54
|
+
mount: (domElement: string | HTMLElement) => void;
|
|
55
|
+
blur: () => void;
|
|
56
|
+
clear: () => void;
|
|
57
|
+
destroy: () => void;
|
|
58
|
+
focus: () => void;
|
|
59
|
+
unmount: () => void;
|
|
60
|
+
once: {
|
|
61
|
+
(eventType: "change", handler: (event: StripeAddressElementChangeEvent) => any): StripeAddressElementType;
|
|
62
|
+
(eventType: "ready", handler: (event: {
|
|
63
|
+
elementType: "address";
|
|
64
|
+
}) => any): StripeAddressElementType;
|
|
65
|
+
(eventType: "focus", handler: (event: {
|
|
66
|
+
elementType: "address";
|
|
67
|
+
}) => any): StripeAddressElementType;
|
|
68
|
+
(eventType: "blur", handler: (event: {
|
|
69
|
+
elementType: "address";
|
|
70
|
+
}) => any): StripeAddressElementType;
|
|
71
|
+
(eventType: "escape", handler: (event: {
|
|
72
|
+
elementType: "address";
|
|
73
|
+
}) => any): StripeAddressElementType;
|
|
74
|
+
(eventType: "loaderror", handler: (event: {
|
|
75
|
+
elementType: "address";
|
|
76
|
+
error: StripeError;
|
|
77
|
+
}) => any): StripeAddressElementType;
|
|
78
|
+
(eventType: "loaderstart", handler: (event: {
|
|
79
|
+
elementType: "address";
|
|
80
|
+
}) => any): StripeAddressElementType;
|
|
81
|
+
};
|
|
82
|
+
update: (options: Partial<StripeAddressElementOptions>) => StripeAddressElementType;
|
|
83
|
+
} | null>;
|
|
84
|
+
getValue: () => Promise<Pick<StripeAddressElementChangeEvent, "value" | "complete" | "isNewAddress">>;
|
|
85
|
+
focus: () => void;
|
|
86
|
+
clear: () => void;
|
|
87
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("blur" | "change" | "focus" | "ready" | "escape" | "loadError")[], "blur" | "change" | "focus" | "ready" | "escape" | "loadError", PublicProps, Readonly< ExtractPropTypes<{
|
|
88
|
+
options: {
|
|
89
|
+
type: () => StripeAddressElementOptions;
|
|
90
|
+
default: () => {
|
|
91
|
+
mode: "shipping";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
}>> & Readonly<{
|
|
95
|
+
onFocus?: (...args: any[]) => any;
|
|
96
|
+
onBlur?: (...args: any[]) => any;
|
|
97
|
+
onChange?: (...args: any[]) => any;
|
|
98
|
+
onReady?: (...args: any[]) => any;
|
|
99
|
+
onEscape?: (...args: any[]) => any;
|
|
100
|
+
onLoadError?: (...args: any[]) => any;
|
|
101
|
+
}>, {
|
|
102
|
+
options: StripeAddressElementOptions;
|
|
103
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
104
|
+
export default _default;
|
|
105
|
+
//# sourceMappingURL=VueStripeAddressElement.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeAddressElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeAddressElement.vue"],"names":[],"mappings":";AAGA;AAqJA,OAAO,KAAK,EACV,oBAAoB,IAAI,wBAAwB,EAChD,2BAA2B,EAC3B,+BAA+B,EAChC,MAAM,mBAAmB,CAAA;AAK1B,UAAU,wBAAyB,SAAQ,wBAAwB;IAEjE,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI,CAAA;IAE9D,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI,CAAA;IAChE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC,CAAA;CAClG;;;cAMqB,MAAM,2BAA2B;;;;;;;;wBAVvC,MAAM,WAAW,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;yBAExC,MAAM,YAAY,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;wBAC7C,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAHnF,MAAM,WAAW,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;yBAExC,MAAM,YAAY,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;wBAC7C,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAO7E,MAAM,2BAA2B;;;;;;;;;;;;;;;AAJvD,wBA2HC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../vue-demi';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("blur" | "change" | "focus" | "ready" | "escape")[], "blur" | "change" | "focus" | "ready" | "escape", PublicProps, Readonly< ExtractPropTypes<{
|
|
10
|
+
options: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{
|
|
15
|
+
onFocus?: (...args: any[]) => any;
|
|
16
|
+
onBlur?: (...args: any[]) => any;
|
|
17
|
+
onChange?: (...args: any[]) => any;
|
|
18
|
+
onReady?: (...args: any[]) => any;
|
|
19
|
+
onEscape?: (...args: any[]) => any;
|
|
20
|
+
}>, {
|
|
21
|
+
options: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=VueStripeCardCvcElement.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeCardCvcElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeCardCvcElement.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkDA,wBAIC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { StripeCardElement as StripeCardElementType, StripeCardElementOptions, StripeCardElementChangeEvent, StripeError, StripeCardElementUpdateOptions } from '@stripe/stripe-js';
|
|
2
|
+
import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
|
|
3
|
+
interface Props {
|
|
4
|
+
options?: StripeCardElementOptions;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
error?(_: {
|
|
10
|
+
error: string;
|
|
11
|
+
}): any;
|
|
12
|
+
loading?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {
|
|
15
|
+
elementRef: HTMLDivElement;
|
|
16
|
+
};
|
|
17
|
+
rootEl: HTMLDivElement;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: DefineComponent<Props, {
|
|
21
|
+
element: Ref<{
|
|
22
|
+
mount: (domElement: string | HTMLElement) => void;
|
|
23
|
+
blur: () => void;
|
|
24
|
+
clear: () => void;
|
|
25
|
+
destroy: () => void;
|
|
26
|
+
focus: () => void;
|
|
27
|
+
unmount: () => void;
|
|
28
|
+
on: {
|
|
29
|
+
(eventType: "change", handler: (event: StripeCardElementChangeEvent) => any): StripeCardElementType;
|
|
30
|
+
(eventType: "ready", handler: (event: {
|
|
31
|
+
elementType: "card";
|
|
32
|
+
}) => any): StripeCardElementType;
|
|
33
|
+
(eventType: "focus", handler: (event: {
|
|
34
|
+
elementType: "card";
|
|
35
|
+
}) => any): StripeCardElementType;
|
|
36
|
+
(eventType: "blur", handler: (event: {
|
|
37
|
+
elementType: "card";
|
|
38
|
+
}) => any): StripeCardElementType;
|
|
39
|
+
(eventType: "escape", handler: (event: {
|
|
40
|
+
elementType: "card";
|
|
41
|
+
}) => any): StripeCardElementType;
|
|
42
|
+
(eventType: "networkschange", handler: (event: {
|
|
43
|
+
elementType: "card";
|
|
44
|
+
}) => any): StripeCardElementType;
|
|
45
|
+
(eventType: "loaderror", handler: (event: {
|
|
46
|
+
elementType: "card";
|
|
47
|
+
error: StripeError;
|
|
48
|
+
}) => any): StripeCardElementType;
|
|
49
|
+
};
|
|
50
|
+
once: {
|
|
51
|
+
(eventType: "change", handler: (event: StripeCardElementChangeEvent) => any): StripeCardElementType;
|
|
52
|
+
(eventType: "ready", handler: (event: {
|
|
53
|
+
elementType: "card";
|
|
54
|
+
}) => any): StripeCardElementType;
|
|
55
|
+
(eventType: "focus", handler: (event: {
|
|
56
|
+
elementType: "card";
|
|
57
|
+
}) => any): StripeCardElementType;
|
|
58
|
+
(eventType: "blur", handler: (event: {
|
|
59
|
+
elementType: "card";
|
|
60
|
+
}) => any): StripeCardElementType;
|
|
61
|
+
(eventType: "escape", handler: (event: {
|
|
62
|
+
elementType: "card";
|
|
63
|
+
}) => any): StripeCardElementType;
|
|
64
|
+
(eventType: "networkschange", handler: (event: {
|
|
65
|
+
elementType: "card";
|
|
66
|
+
}) => any): StripeCardElementType;
|
|
67
|
+
(eventType: "loaderror", handler: (event: {
|
|
68
|
+
elementType: "card";
|
|
69
|
+
error: StripeError;
|
|
70
|
+
}) => any): StripeCardElementType;
|
|
71
|
+
};
|
|
72
|
+
off: {
|
|
73
|
+
(eventType: "change", handler?: (event: StripeCardElementChangeEvent) => any): StripeCardElementType;
|
|
74
|
+
(eventType: "ready", handler?: (event: {
|
|
75
|
+
elementType: "card";
|
|
76
|
+
}) => any): StripeCardElementType;
|
|
77
|
+
(eventType: "focus", handler?: (event: {
|
|
78
|
+
elementType: "card";
|
|
79
|
+
}) => any): StripeCardElementType;
|
|
80
|
+
(eventType: "blur", handler?: (event: {
|
|
81
|
+
elementType: "card";
|
|
82
|
+
}) => any): StripeCardElementType;
|
|
83
|
+
(eventType: "escape", handler?: (event: {
|
|
84
|
+
elementType: "card";
|
|
85
|
+
}) => any): StripeCardElementType;
|
|
86
|
+
(eventType: "networkschange", handler?: (event: {
|
|
87
|
+
elementType: "card";
|
|
88
|
+
}) => any): StripeCardElementType;
|
|
89
|
+
(eventType: "loaderror", handler?: (event: {
|
|
90
|
+
elementType: "card";
|
|
91
|
+
error: StripeError;
|
|
92
|
+
}) => any): StripeCardElementType;
|
|
93
|
+
};
|
|
94
|
+
update: (options: StripeCardElementUpdateOptions) => void;
|
|
95
|
+
} | null, StripeCardElementType | {
|
|
96
|
+
mount: (domElement: string | HTMLElement) => void;
|
|
97
|
+
blur: () => void;
|
|
98
|
+
clear: () => void;
|
|
99
|
+
destroy: () => void;
|
|
100
|
+
focus: () => void;
|
|
101
|
+
unmount: () => void;
|
|
102
|
+
on: {
|
|
103
|
+
(eventType: "change", handler: (event: StripeCardElementChangeEvent) => any): StripeCardElementType;
|
|
104
|
+
(eventType: "ready", handler: (event: {
|
|
105
|
+
elementType: "card";
|
|
106
|
+
}) => any): StripeCardElementType;
|
|
107
|
+
(eventType: "focus", handler: (event: {
|
|
108
|
+
elementType: "card";
|
|
109
|
+
}) => any): StripeCardElementType;
|
|
110
|
+
(eventType: "blur", handler: (event: {
|
|
111
|
+
elementType: "card";
|
|
112
|
+
}) => any): StripeCardElementType;
|
|
113
|
+
(eventType: "escape", handler: (event: {
|
|
114
|
+
elementType: "card";
|
|
115
|
+
}) => any): StripeCardElementType;
|
|
116
|
+
(eventType: "networkschange", handler: (event: {
|
|
117
|
+
elementType: "card";
|
|
118
|
+
}) => any): StripeCardElementType;
|
|
119
|
+
(eventType: "loaderror", handler: (event: {
|
|
120
|
+
elementType: "card";
|
|
121
|
+
error: StripeError;
|
|
122
|
+
}) => any): StripeCardElementType;
|
|
123
|
+
};
|
|
124
|
+
once: {
|
|
125
|
+
(eventType: "change", handler: (event: StripeCardElementChangeEvent) => any): StripeCardElementType;
|
|
126
|
+
(eventType: "ready", handler: (event: {
|
|
127
|
+
elementType: "card";
|
|
128
|
+
}) => any): StripeCardElementType;
|
|
129
|
+
(eventType: "focus", handler: (event: {
|
|
130
|
+
elementType: "card";
|
|
131
|
+
}) => any): StripeCardElementType;
|
|
132
|
+
(eventType: "blur", handler: (event: {
|
|
133
|
+
elementType: "card";
|
|
134
|
+
}) => any): StripeCardElementType;
|
|
135
|
+
(eventType: "escape", handler: (event: {
|
|
136
|
+
elementType: "card";
|
|
137
|
+
}) => any): StripeCardElementType;
|
|
138
|
+
(eventType: "networkschange", handler: (event: {
|
|
139
|
+
elementType: "card";
|
|
140
|
+
}) => any): StripeCardElementType;
|
|
141
|
+
(eventType: "loaderror", handler: (event: {
|
|
142
|
+
elementType: "card";
|
|
143
|
+
error: StripeError;
|
|
144
|
+
}) => any): StripeCardElementType;
|
|
145
|
+
};
|
|
146
|
+
off: {
|
|
147
|
+
(eventType: "change", handler?: (event: StripeCardElementChangeEvent) => any): StripeCardElementType;
|
|
148
|
+
(eventType: "ready", handler?: (event: {
|
|
149
|
+
elementType: "card";
|
|
150
|
+
}) => any): StripeCardElementType;
|
|
151
|
+
(eventType: "focus", handler?: (event: {
|
|
152
|
+
elementType: "card";
|
|
153
|
+
}) => any): StripeCardElementType;
|
|
154
|
+
(eventType: "blur", handler?: (event: {
|
|
155
|
+
elementType: "card";
|
|
156
|
+
}) => any): StripeCardElementType;
|
|
157
|
+
(eventType: "escape", handler?: (event: {
|
|
158
|
+
elementType: "card";
|
|
159
|
+
}) => any): StripeCardElementType;
|
|
160
|
+
(eventType: "networkschange", handler?: (event: {
|
|
161
|
+
elementType: "card";
|
|
162
|
+
}) => any): StripeCardElementType;
|
|
163
|
+
(eventType: "loaderror", handler?: (event: {
|
|
164
|
+
elementType: "card";
|
|
165
|
+
error: StripeError;
|
|
166
|
+
}) => any): StripeCardElementType;
|
|
167
|
+
};
|
|
168
|
+
update: (options: StripeCardElementUpdateOptions) => void;
|
|
169
|
+
} | null>;
|
|
170
|
+
loading: Ref<boolean, boolean>;
|
|
171
|
+
error: Ref<string | null, string | null>;
|
|
172
|
+
focus: () => void | undefined;
|
|
173
|
+
blur: () => void | undefined;
|
|
174
|
+
clear: () => void | undefined;
|
|
175
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
176
|
+
blur: () => any;
|
|
177
|
+
change: (event: StripeCardElementChangeEvent) => any;
|
|
178
|
+
focus: () => any;
|
|
179
|
+
ready: (element: StripeCardElementType) => any;
|
|
180
|
+
escape: () => any;
|
|
181
|
+
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
182
|
+
onBlur?: () => any;
|
|
183
|
+
onChange?: (event: StripeCardElementChangeEvent) => any;
|
|
184
|
+
onFocus?: () => any;
|
|
185
|
+
onReady?: (element: StripeCardElementType) => any;
|
|
186
|
+
onEscape?: () => any;
|
|
187
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
188
|
+
elementRef: HTMLDivElement;
|
|
189
|
+
}, HTMLDivElement>;
|
|
190
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
191
|
+
export default _default;
|
|
192
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
193
|
+
new (): {
|
|
194
|
+
$slots: S;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=VueStripeCardElement.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeCardElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeCardElement.vue"],"names":[],"mappings":";AA4NA,OAAO,KAAK,EACV,iBAAiB,IAAI,qBAAqB,EAC1C,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,mBAAmB,CAAA;AAI1B,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,wBAAwB,CAAA;CACnC;AA4ID,iBAAS,cAAc;WA+DT,OAAO,IAA6B;;;;YAZvB,GAAG;yBACD,GAAG;;;;;;EAgB/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAOpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../vue-demi';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("blur" | "change" | "focus" | "ready" | "escape")[], "blur" | "change" | "focus" | "ready" | "escape", PublicProps, Readonly< ExtractPropTypes<{
|
|
10
|
+
options: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{
|
|
15
|
+
onFocus?: (...args: any[]) => any;
|
|
16
|
+
onBlur?: (...args: any[]) => any;
|
|
17
|
+
onChange?: (...args: any[]) => any;
|
|
18
|
+
onReady?: (...args: any[]) => any;
|
|
19
|
+
onEscape?: (...args: any[]) => any;
|
|
20
|
+
}>, {
|
|
21
|
+
options: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=VueStripeCardExpiryElement.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeCardExpiryElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeCardExpiryElement.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkDA,wBAIC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../vue-demi';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("blur" | "change" | "focus" | "ready" | "escape")[], "blur" | "change" | "focus" | "ready" | "escape", PublicProps, Readonly< ExtractPropTypes<{
|
|
10
|
+
options: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{
|
|
15
|
+
onFocus?: (...args: any[]) => any;
|
|
16
|
+
onBlur?: (...args: any[]) => any;
|
|
17
|
+
onChange?: (...args: any[]) => any;
|
|
18
|
+
onReady?: (...args: any[]) => any;
|
|
19
|
+
onEscape?: (...args: any[]) => any;
|
|
20
|
+
}>, {
|
|
21
|
+
options: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=VueStripeCardNumberElement.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeCardNumberElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeCardNumberElement.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwDA,wBAIC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { RedirectToCheckoutOptions } from '@stripe/stripe-js';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
|
|
3
|
+
interface Props {
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
priceId?: string;
|
|
6
|
+
mode?: 'payment' | 'subscription';
|
|
7
|
+
successUrl?: string;
|
|
8
|
+
cancelUrl?: string;
|
|
9
|
+
customerEmail?: string;
|
|
10
|
+
clientReferenceId?: string;
|
|
11
|
+
submitType?: 'auto' | 'book' | 'donate' | 'pay';
|
|
12
|
+
options?: Partial<RedirectToCheckoutOptions>;
|
|
13
|
+
buttonText?: string;
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
buttonClass?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function __VLS_template(): {
|
|
19
|
+
attrs: Partial<{}>;
|
|
20
|
+
slots: {
|
|
21
|
+
default?(_: {}): any;
|
|
22
|
+
loading?(_: {}): any;
|
|
23
|
+
};
|
|
24
|
+
refs: {};
|
|
25
|
+
rootEl: HTMLButtonElement;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
29
|
+
error: (error: Error) => any;
|
|
30
|
+
click: () => any;
|
|
31
|
+
success: () => any;
|
|
32
|
+
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
33
|
+
onError?: (error: Error) => any;
|
|
34
|
+
onClick?: () => any;
|
|
35
|
+
onSuccess?: () => any;
|
|
36
|
+
}>, {
|
|
37
|
+
mode: "payment" | "subscription";
|
|
38
|
+
buttonText: string;
|
|
39
|
+
loadingText: string;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
buttonClass: string;
|
|
42
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
43
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=VueStripeCheckout.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeCheckout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeCheckout.vue"],"names":[],"mappings":";AA+JA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAIlE,UAAU,KAAK;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,SAAS,GAAG,cAAc,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAyFD,iBAAS,cAAc;WA2CT,OAAO,IAA6B;;yBAXrB,GAAG;yBACH,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;UAjKZ,SAAS,GAAG,cAAc;gBAOpB,MAAM;iBACL,MAAM;cACT,OAAO;iBACJ,MAAM;gGAgKpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAYpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
|
|
2
|
+
type ElementsOptions = Record<string, any>;
|
|
3
|
+
/**
|
|
4
|
+
* Mode for Payment Element - determines the type of intent
|
|
5
|
+
* - 'payment': For PaymentIntent (one-time payments)
|
|
6
|
+
* - 'setup': For SetupIntent (saving payment methods for future use)
|
|
7
|
+
* - 'subscription': For Subscription billing
|
|
8
|
+
*/
|
|
9
|
+
type ElementsMode = 'payment' | 'setup' | 'subscription';
|
|
10
|
+
/**
|
|
11
|
+
* Indicates intent to save payment method for future use
|
|
12
|
+
* - 'off_session': Save for off-session payments (e.g., recurring charges)
|
|
13
|
+
* - 'on_session': Save for on-session payments (customer present)
|
|
14
|
+
*/
|
|
15
|
+
type SetupFutureUsage = 'off_session' | 'on_session';
|
|
16
|
+
/**
|
|
17
|
+
* Controls when to capture funds from customer's account
|
|
18
|
+
* - 'automatic': Capture automatically after authorization
|
|
19
|
+
* - 'automatic_async': Capture automatically with async processing
|
|
20
|
+
* - 'manual': Capture manually via API call
|
|
21
|
+
*/
|
|
22
|
+
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';
|
|
23
|
+
interface Props {
|
|
24
|
+
/**
|
|
25
|
+
* Client secret from PaymentIntent or SetupIntent.
|
|
26
|
+
* When provided, Elements will use the intent-based flow.
|
|
27
|
+
* When omitted, use mode/currency/amount for deferred intent creation.
|
|
28
|
+
*/
|
|
29
|
+
clientSecret?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Mode for deferred intent creation (without clientSecret).
|
|
32
|
+
* Required when clientSecret is not provided.
|
|
33
|
+
* - 'payment': One-time payment
|
|
34
|
+
* - 'setup': Save payment method for future
|
|
35
|
+
* - 'subscription': Recurring billing
|
|
36
|
+
*/
|
|
37
|
+
mode?: ElementsMode | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Currency code (e.g., 'usd', 'eur') for deferred intent creation.
|
|
40
|
+
* Required when using mode without clientSecret.
|
|
41
|
+
*/
|
|
42
|
+
currency?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Amount in smallest currency unit (e.g., cents for USD).
|
|
45
|
+
* Required for 'payment' and 'subscription' modes.
|
|
46
|
+
* Shown in Apple Pay, Google Pay, and BNPL UIs.
|
|
47
|
+
*/
|
|
48
|
+
amount?: number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Indicates intent to save payment method for future use.
|
|
51
|
+
* When set, displays additional input fields and mandates as needed.
|
|
52
|
+
*/
|
|
53
|
+
setupFutureUsage?: SetupFutureUsage | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Controls when to capture funds from customer's account.
|
|
56
|
+
*/
|
|
57
|
+
captureMethod?: CaptureMethod | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* List of payment method types to display.
|
|
60
|
+
* Omit to use Dashboard payment method settings.
|
|
61
|
+
*/
|
|
62
|
+
paymentMethodTypes?: string[] | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Additional options passed to stripe.elements().
|
|
65
|
+
* See Stripe documentation for all available options.
|
|
66
|
+
*/
|
|
67
|
+
options?: ElementsOptions | undefined;
|
|
68
|
+
}
|
|
69
|
+
declare function __VLS_template(): {
|
|
70
|
+
attrs: Partial<{}>;
|
|
71
|
+
slots: {
|
|
72
|
+
error?(_: {
|
|
73
|
+
error: string;
|
|
74
|
+
}): any;
|
|
75
|
+
loading?(_: {}): any;
|
|
76
|
+
default?(_: {}): any;
|
|
77
|
+
};
|
|
78
|
+
refs: {};
|
|
79
|
+
rootEl: any;
|
|
80
|
+
};
|
|
81
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
82
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
83
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
84
|
+
export default _default;
|
|
85
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
86
|
+
new (): {
|
|
87
|
+
$slots: S;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=VueStripeElements.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueStripeElements.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeElements.vue"],"names":[],"mappings":";AA0PA,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAE1C;;;;;GAKG;AACH,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,cAAc,CAAA;AAExD;;;;GAIG;AACH,KAAK,gBAAgB,GAAG,aAAa,GAAG,YAAY,CAAA;AAEpD;;;;;GAKG;AACH,KAAK,aAAa,GAAG,WAAW,GAAG,iBAAiB,GAAG,QAAQ,CAAA;AAE/D,UAAU,KAAK;IACb;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC/C;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACzC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;CACtC;AAsHD,iBAAS,cAAc;WAuDT,OAAO,IAA6B;;;;YAZvB,GAAG;yBACD,GAAG;yBACH,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+SAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAOpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|