@vue-stripe/vue-stripe 4.5.0 → 5.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.
Files changed (64) hide show
  1. package/README.md +190 -47
  2. package/dist/cjs/index.js +1 -0
  3. package/dist/es/index.js +943 -0
  4. package/dist/types/components/VueStripeAddressElement.vue.d.ts +105 -0
  5. package/dist/types/components/VueStripeAddressElement.vue.d.ts.map +1 -0
  6. package/dist/types/components/VueStripeCardCvcElement.vue.d.ts +24 -0
  7. package/dist/types/components/VueStripeCardCvcElement.vue.d.ts.map +1 -0
  8. package/dist/types/components/VueStripeCardElement.vue.d.ts +197 -0
  9. package/dist/types/components/VueStripeCardElement.vue.d.ts.map +1 -0
  10. package/dist/types/components/VueStripeCardExpiryElement.vue.d.ts +24 -0
  11. package/dist/types/components/VueStripeCardExpiryElement.vue.d.ts.map +1 -0
  12. package/dist/types/components/VueStripeCardNumberElement.vue.d.ts +24 -0
  13. package/dist/types/components/VueStripeCardNumberElement.vue.d.ts.map +1 -0
  14. package/dist/types/components/VueStripeCheckout.vue.d.ts +74 -0
  15. package/dist/types/components/VueStripeCheckout.vue.d.ts.map +1 -0
  16. package/dist/types/components/VueStripeElements.vue.d.ts +90 -0
  17. package/dist/types/components/VueStripeElements.vue.d.ts.map +1 -0
  18. package/dist/types/components/VueStripeExpressCheckoutElement.vue.d.ts +220 -0
  19. package/dist/types/components/VueStripeExpressCheckoutElement.vue.d.ts.map +1 -0
  20. package/dist/types/components/VueStripeLinkAuthenticationElement.vue.d.ts +167 -0
  21. package/dist/types/components/VueStripeLinkAuthenticationElement.vue.d.ts.map +1 -0
  22. package/dist/types/components/VueStripePaymentElement.vue.d.ts +206 -0
  23. package/dist/types/components/VueStripePaymentElement.vue.d.ts.map +1 -0
  24. package/dist/types/components/VueStripeProvider.vue.d.ts +42 -0
  25. package/dist/types/components/VueStripeProvider.vue.d.ts.map +1 -0
  26. package/dist/types/components/index.d.ts +12 -0
  27. package/dist/types/components/index.d.ts.map +1 -0
  28. package/dist/types/composables/index.d.ts +6 -0
  29. package/dist/types/composables/index.d.ts.map +1 -0
  30. package/dist/types/composables/usePaymentIntent.d.ts +45 -0
  31. package/dist/types/composables/usePaymentIntent.d.ts.map +1 -0
  32. package/dist/types/composables/useSetupIntent.d.ts +62 -0
  33. package/dist/types/composables/useSetupIntent.d.ts.map +1 -0
  34. package/dist/types/composables/useStripe.d.ts +27 -0
  35. package/dist/types/composables/useStripe.d.ts.map +1 -0
  36. package/dist/types/composables/useStripeCheckout.d.ts +72 -0
  37. package/dist/types/composables/useStripeCheckout.d.ts.map +1 -0
  38. package/dist/types/composables/useStripeElements.d.ts +26 -0
  39. package/dist/types/composables/useStripeElements.d.ts.map +1 -0
  40. package/dist/types/index.d.ts +7 -0
  41. package/dist/types/index.d.ts.map +1 -0
  42. package/dist/types/plugin.d.ts +23 -0
  43. package/dist/types/plugin.d.ts.map +1 -0
  44. package/dist/types/tsconfig.build.tsbuildinfo +1 -0
  45. package/dist/types/types/index.d.ts +171 -0
  46. package/dist/types/types/index.d.ts.map +1 -0
  47. package/dist/types/utils/constants.d.ts +11 -0
  48. package/dist/types/utils/constants.d.ts.map +1 -0
  49. package/dist/types/utils/element-factory.d.ts +28 -0
  50. package/dist/types/utils/element-factory.d.ts.map +1 -0
  51. package/dist/types/utils/errors.d.ts +11 -0
  52. package/dist/types/utils/errors.d.ts.map +1 -0
  53. package/dist/types/utils/injection-keys.d.ts +15 -0
  54. package/dist/types/utils/injection-keys.d.ts.map +1 -0
  55. package/dist/umd/index.js +1 -0
  56. package/dist/vue-stripe.css +1 -0
  57. package/package.json +66 -65
  58. package/CONTRIBUTING.md +0 -77
  59. package/LICENSE +0 -21
  60. package/babel.config.js +0 -22
  61. package/dist/index.js +0 -7
  62. package/dist/vue-stripe.js +0 -7
  63. package/rollup.config.js +0 -37
  64. package/typings/index.d.ts +0 -73
@@ -0,0 +1,220 @@
1
+ import { StripeExpressCheckoutElement as StripeExpressCheckoutElementType, StripeExpressCheckoutElementOptions, StripeExpressCheckoutElementClickEvent, StripeExpressCheckoutElementConfirmEvent, StripeExpressCheckoutElementReadyEvent, StripeError, StripeExpressCheckoutElementShippingAddressChangeEvent, StripeExpressCheckoutElementShippingRateChangeEvent, StripeExpressCheckoutElementUpdateOptions } from '@stripe/stripe-js';
2
+ import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
3
+ interface Props {
4
+ options?: StripeExpressCheckoutElementOptions;
5
+ }
6
+ interface ShippingAddressChangeEvent {
7
+ address: {
8
+ city?: string;
9
+ country: string;
10
+ line1?: string;
11
+ line2?: string;
12
+ postal_code?: string;
13
+ state?: string;
14
+ };
15
+ name?: string;
16
+ }
17
+ interface ShippingRateChangeEvent {
18
+ shippingRate: {
19
+ id: string;
20
+ amount: number;
21
+ displayName: string;
22
+ };
23
+ }
24
+ declare function __VLS_template(): {
25
+ attrs: Partial<{}>;
26
+ slots: {
27
+ error?(_: {
28
+ error: string;
29
+ }): any;
30
+ loading?(_: {}): any;
31
+ };
32
+ refs: {
33
+ elementRef: HTMLDivElement;
34
+ };
35
+ rootEl: HTMLDivElement;
36
+ };
37
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
38
+ declare const __VLS_component: DefineComponent<Props, {
39
+ element: Ref<{
40
+ mount: (domElement: string | HTMLElement) => void;
41
+ blur: () => void;
42
+ clear: () => void;
43
+ destroy: () => void;
44
+ focus: () => void;
45
+ unmount: () => void;
46
+ on: {
47
+ (eventType: "ready", handler: (event: StripeExpressCheckoutElementReadyEvent) => any): StripeExpressCheckoutElementType;
48
+ (eventType: "click", handler: (event: StripeExpressCheckoutElementClickEvent) => any): StripeExpressCheckoutElementType;
49
+ (eventType: "focus", handler: (event: {
50
+ elementType: "expressCheckout";
51
+ }) => any): StripeExpressCheckoutElementType;
52
+ (eventType: "blur", handler: (event: {
53
+ elementType: "expressCheckout";
54
+ }) => any): StripeExpressCheckoutElementType;
55
+ (eventType: "escape", handler: (event: {
56
+ elementType: "expressCheckout";
57
+ }) => any): StripeExpressCheckoutElementType;
58
+ (eventType: "loaderror", handler: (event: {
59
+ elementType: "expressCheckout";
60
+ error: StripeError;
61
+ }) => any): StripeExpressCheckoutElementType;
62
+ (eventType: "confirm", handler: (event: StripeExpressCheckoutElementConfirmEvent) => any): StripeExpressCheckoutElementType;
63
+ (eventType: "cancel", handler: (event: {
64
+ elementType: "expressCheckout";
65
+ }) => any): StripeExpressCheckoutElementType;
66
+ (eventType: "shippingaddresschange", handler: (event: StripeExpressCheckoutElementShippingAddressChangeEvent) => any): StripeExpressCheckoutElementType;
67
+ (eventType: "shippingratechange", handler: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any): StripeExpressCheckoutElementType;
68
+ };
69
+ once: {
70
+ (eventType: "ready", handler: (event: StripeExpressCheckoutElementReadyEvent) => any): StripeExpressCheckoutElementType;
71
+ (eventType: "click", handler: (event: StripeExpressCheckoutElementClickEvent) => any): StripeExpressCheckoutElementType;
72
+ (eventType: "focus", handler: (event: {
73
+ elementType: "expressCheckout";
74
+ }) => any): StripeExpressCheckoutElementType;
75
+ (eventType: "blur", handler: (event: {
76
+ elementType: "expressCheckout";
77
+ }) => any): StripeExpressCheckoutElementType;
78
+ (eventType: "escape", handler: (event: {
79
+ elementType: "expressCheckout";
80
+ }) => any): StripeExpressCheckoutElementType;
81
+ (eventType: "loaderror", handler: (event: {
82
+ elementType: "expressCheckout";
83
+ error: StripeError;
84
+ }) => any): StripeExpressCheckoutElementType;
85
+ (eventType: "confirm", handler: (event: StripeExpressCheckoutElementConfirmEvent) => any): StripeExpressCheckoutElementType;
86
+ (eventType: "cancel", handler: (event: {
87
+ elementType: "expressCheckout";
88
+ }) => any): StripeExpressCheckoutElementType;
89
+ (eventType: "shippingaddresschange", handler: (event: StripeExpressCheckoutElementShippingAddressChangeEvent) => any): StripeExpressCheckoutElementType;
90
+ (eventType: "shippingratechange", handler: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any): StripeExpressCheckoutElementType;
91
+ };
92
+ off: {
93
+ (eventType: "ready", handler?: (event: StripeExpressCheckoutElementReadyEvent) => any): StripeExpressCheckoutElementType;
94
+ (eventType: "click", handler?: (event: StripeExpressCheckoutElementClickEvent) => any): StripeExpressCheckoutElementType;
95
+ (eventType: "focus", handler?: (event: {
96
+ elementType: "expressCheckout";
97
+ }) => any): StripeExpressCheckoutElementType;
98
+ (eventType: "blur", handler?: (event: {
99
+ elementType: "expressCheckout";
100
+ }) => any): StripeExpressCheckoutElementType;
101
+ (eventType: "escape", handler?: (event: {
102
+ elementType: "expressCheckout";
103
+ }) => any): StripeExpressCheckoutElementType;
104
+ (eventType: "loaderror", handler?: (event: {
105
+ elementType: "expressCheckout";
106
+ error: StripeError;
107
+ }) => any): StripeExpressCheckoutElementType;
108
+ (eventType: "confirm", handler?: (event: StripeExpressCheckoutElementConfirmEvent) => any): StripeExpressCheckoutElementType;
109
+ (eventType: "cancel", handler?: (event: {
110
+ elementType: "expressCheckout";
111
+ }) => any): StripeExpressCheckoutElementType;
112
+ (eventType: "shippingaddresschange", handler?: (event: StripeExpressCheckoutElementShippingAddressChangeEvent) => any): StripeExpressCheckoutElementType;
113
+ (eventType: "shippingratechange", handler?: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any): StripeExpressCheckoutElementType;
114
+ };
115
+ update: (options: StripeExpressCheckoutElementUpdateOptions) => StripeExpressCheckoutElementType;
116
+ } | null, StripeExpressCheckoutElementType | {
117
+ mount: (domElement: string | HTMLElement) => void;
118
+ blur: () => void;
119
+ clear: () => void;
120
+ destroy: () => void;
121
+ focus: () => void;
122
+ unmount: () => void;
123
+ on: {
124
+ (eventType: "ready", handler: (event: StripeExpressCheckoutElementReadyEvent) => any): StripeExpressCheckoutElementType;
125
+ (eventType: "click", handler: (event: StripeExpressCheckoutElementClickEvent) => any): StripeExpressCheckoutElementType;
126
+ (eventType: "focus", handler: (event: {
127
+ elementType: "expressCheckout";
128
+ }) => any): StripeExpressCheckoutElementType;
129
+ (eventType: "blur", handler: (event: {
130
+ elementType: "expressCheckout";
131
+ }) => any): StripeExpressCheckoutElementType;
132
+ (eventType: "escape", handler: (event: {
133
+ elementType: "expressCheckout";
134
+ }) => any): StripeExpressCheckoutElementType;
135
+ (eventType: "loaderror", handler: (event: {
136
+ elementType: "expressCheckout";
137
+ error: StripeError;
138
+ }) => any): StripeExpressCheckoutElementType;
139
+ (eventType: "confirm", handler: (event: StripeExpressCheckoutElementConfirmEvent) => any): StripeExpressCheckoutElementType;
140
+ (eventType: "cancel", handler: (event: {
141
+ elementType: "expressCheckout";
142
+ }) => any): StripeExpressCheckoutElementType;
143
+ (eventType: "shippingaddresschange", handler: (event: StripeExpressCheckoutElementShippingAddressChangeEvent) => any): StripeExpressCheckoutElementType;
144
+ (eventType: "shippingratechange", handler: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any): StripeExpressCheckoutElementType;
145
+ };
146
+ once: {
147
+ (eventType: "ready", handler: (event: StripeExpressCheckoutElementReadyEvent) => any): StripeExpressCheckoutElementType;
148
+ (eventType: "click", handler: (event: StripeExpressCheckoutElementClickEvent) => any): StripeExpressCheckoutElementType;
149
+ (eventType: "focus", handler: (event: {
150
+ elementType: "expressCheckout";
151
+ }) => any): StripeExpressCheckoutElementType;
152
+ (eventType: "blur", handler: (event: {
153
+ elementType: "expressCheckout";
154
+ }) => any): StripeExpressCheckoutElementType;
155
+ (eventType: "escape", handler: (event: {
156
+ elementType: "expressCheckout";
157
+ }) => any): StripeExpressCheckoutElementType;
158
+ (eventType: "loaderror", handler: (event: {
159
+ elementType: "expressCheckout";
160
+ error: StripeError;
161
+ }) => any): StripeExpressCheckoutElementType;
162
+ (eventType: "confirm", handler: (event: StripeExpressCheckoutElementConfirmEvent) => any): StripeExpressCheckoutElementType;
163
+ (eventType: "cancel", handler: (event: {
164
+ elementType: "expressCheckout";
165
+ }) => any): StripeExpressCheckoutElementType;
166
+ (eventType: "shippingaddresschange", handler: (event: StripeExpressCheckoutElementShippingAddressChangeEvent) => any): StripeExpressCheckoutElementType;
167
+ (eventType: "shippingratechange", handler: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any): StripeExpressCheckoutElementType;
168
+ };
169
+ off: {
170
+ (eventType: "ready", handler?: (event: StripeExpressCheckoutElementReadyEvent) => any): StripeExpressCheckoutElementType;
171
+ (eventType: "click", handler?: (event: StripeExpressCheckoutElementClickEvent) => any): StripeExpressCheckoutElementType;
172
+ (eventType: "focus", handler?: (event: {
173
+ elementType: "expressCheckout";
174
+ }) => any): StripeExpressCheckoutElementType;
175
+ (eventType: "blur", handler?: (event: {
176
+ elementType: "expressCheckout";
177
+ }) => any): StripeExpressCheckoutElementType;
178
+ (eventType: "escape", handler?: (event: {
179
+ elementType: "expressCheckout";
180
+ }) => any): StripeExpressCheckoutElementType;
181
+ (eventType: "loaderror", handler?: (event: {
182
+ elementType: "expressCheckout";
183
+ error: StripeError;
184
+ }) => any): StripeExpressCheckoutElementType;
185
+ (eventType: "confirm", handler?: (event: StripeExpressCheckoutElementConfirmEvent) => any): StripeExpressCheckoutElementType;
186
+ (eventType: "cancel", handler?: (event: {
187
+ elementType: "expressCheckout";
188
+ }) => any): StripeExpressCheckoutElementType;
189
+ (eventType: "shippingaddresschange", handler?: (event: StripeExpressCheckoutElementShippingAddressChangeEvent) => any): StripeExpressCheckoutElementType;
190
+ (eventType: "shippingratechange", handler?: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any): StripeExpressCheckoutElementType;
191
+ };
192
+ update: (options: StripeExpressCheckoutElementUpdateOptions) => StripeExpressCheckoutElementType;
193
+ } | null>;
194
+ loading: Ref<boolean, boolean>;
195
+ error: Ref<string | null, string | null>;
196
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
197
+ cancel: () => any;
198
+ click: (event: StripeExpressCheckoutElementClickEvent) => any;
199
+ ready: (event: StripeExpressCheckoutElementReadyEvent) => any;
200
+ confirm: (event: StripeExpressCheckoutElementConfirmEvent) => any;
201
+ shippingaddresschange: (event: ShippingAddressChangeEvent) => any;
202
+ shippingratechange: (event: ShippingRateChangeEvent) => any;
203
+ }, string, PublicProps, Readonly<Props> & Readonly<{
204
+ onCancel?: () => any;
205
+ onClick?: (event: StripeExpressCheckoutElementClickEvent) => any;
206
+ onReady?: (event: StripeExpressCheckoutElementReadyEvent) => any;
207
+ onConfirm?: (event: StripeExpressCheckoutElementConfirmEvent) => any;
208
+ onShippingaddresschange?: (event: ShippingAddressChangeEvent) => any;
209
+ onShippingratechange?: (event: ShippingRateChangeEvent) => any;
210
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
211
+ elementRef: HTMLDivElement;
212
+ }, HTMLDivElement>;
213
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
214
+ export default _default;
215
+ type __VLS_WithTemplateSlots<T, S> = T & {
216
+ new (): {
217
+ $slots: S;
218
+ };
219
+ };
220
+ //# sourceMappingURL=VueStripeExpressCheckoutElement.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueStripeExpressCheckoutElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeExpressCheckoutElement.vue"],"names":[],"mappings":";AAyOA,OAAO,KAAK,EACV,4BAA4B,IAAI,gCAAgC,EAChE,mCAAmC,EACnC,sCAAsC,EACtC,wCAAwC,EACxC,sCAAsC,EACvC,MAAM,mBAAmB,CAAA;AAI1B,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,mCAAmC,CAAA;CAC9C;AAED,UAAU,0BAA0B;IAClC,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,UAAU,uBAAuB;IAC/B,YAAY,EAAE;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAqID,iBAAS,cAAc;WA8DT,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,167 @@
1
+ import { StripeLinkAuthenticationElement, StripeLinkAuthenticationElementOptions, StripeLinkAuthenticationElementChangeEvent, StripeError } from '@stripe/stripe-js';
2
+ import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
3
+ interface Props {
4
+ options?: StripeLinkAuthenticationElementOptions;
5
+ }
6
+ declare const _default: DefineComponent<Props, {
7
+ element: Ref<{
8
+ mount: (domElement: string | HTMLElement) => void;
9
+ blur: () => void;
10
+ clear: () => void;
11
+ destroy: () => void;
12
+ focus: () => void;
13
+ unmount: () => void;
14
+ on: {
15
+ (eventType: "change", handler: (event: StripeLinkAuthenticationElementChangeEvent) => any): StripeLinkAuthenticationElement;
16
+ (eventType: "ready", handler: (event: {
17
+ elementType: "linkAuthentication";
18
+ }) => any): StripeLinkAuthenticationElement;
19
+ (eventType: "focus", handler: (event: {
20
+ elementType: "linkAuthentication";
21
+ }) => any): StripeLinkAuthenticationElement;
22
+ (eventType: "blur", handler: (event: {
23
+ elementType: "linkAuthentication";
24
+ }) => any): StripeLinkAuthenticationElement;
25
+ (eventType: "escape", handler: (event: {
26
+ elementType: "linkAuthentication";
27
+ }) => any): StripeLinkAuthenticationElement;
28
+ (eventType: "loaderror", handler: (event: {
29
+ elementType: "linkAuthentication";
30
+ error: StripeError;
31
+ }) => any): StripeLinkAuthenticationElement;
32
+ (eventType: "loaderstart", handler: (event: {
33
+ elementType: "linkAuthentication";
34
+ }) => any): StripeLinkAuthenticationElement;
35
+ };
36
+ once: {
37
+ (eventType: "change", handler: (event: StripeLinkAuthenticationElementChangeEvent) => any): StripeLinkAuthenticationElement;
38
+ (eventType: "ready", handler: (event: {
39
+ elementType: "linkAuthentication";
40
+ }) => any): StripeLinkAuthenticationElement;
41
+ (eventType: "focus", handler: (event: {
42
+ elementType: "linkAuthentication";
43
+ }) => any): StripeLinkAuthenticationElement;
44
+ (eventType: "blur", handler: (event: {
45
+ elementType: "linkAuthentication";
46
+ }) => any): StripeLinkAuthenticationElement;
47
+ (eventType: "escape", handler: (event: {
48
+ elementType: "linkAuthentication";
49
+ }) => any): StripeLinkAuthenticationElement;
50
+ (eventType: "loaderror", handler: (event: {
51
+ elementType: "linkAuthentication";
52
+ error: StripeError;
53
+ }) => any): StripeLinkAuthenticationElement;
54
+ (eventType: "loaderstart", handler: (event: {
55
+ elementType: "linkAuthentication";
56
+ }) => any): StripeLinkAuthenticationElement;
57
+ };
58
+ off: {
59
+ (eventType: "change", handler?: (event: StripeLinkAuthenticationElementChangeEvent) => any): StripeLinkAuthenticationElement;
60
+ (eventType: "ready", handler?: (event: {
61
+ elementType: "linkAuthentication";
62
+ }) => any): StripeLinkAuthenticationElement;
63
+ (eventType: "focus", handler?: (event: {
64
+ elementType: "linkAuthentication";
65
+ }) => any): StripeLinkAuthenticationElement;
66
+ (eventType: "blur", handler?: (event: {
67
+ elementType: "linkAuthentication";
68
+ }) => any): StripeLinkAuthenticationElement;
69
+ (eventType: "escape", handler?: (event: {
70
+ elementType: "linkAuthentication";
71
+ }) => any): StripeLinkAuthenticationElement;
72
+ (eventType: "loaderror", handler?: (event: {
73
+ elementType: "linkAuthentication";
74
+ error: StripeError;
75
+ }) => any): StripeLinkAuthenticationElement;
76
+ (eventType: "loaderstart", handler?: (event: {
77
+ elementType: "linkAuthentication";
78
+ }) => any): StripeLinkAuthenticationElement;
79
+ };
80
+ } | null, StripeLinkAuthenticationElement | {
81
+ mount: (domElement: string | HTMLElement) => void;
82
+ blur: () => void;
83
+ clear: () => void;
84
+ destroy: () => void;
85
+ focus: () => void;
86
+ unmount: () => void;
87
+ on: {
88
+ (eventType: "change", handler: (event: StripeLinkAuthenticationElementChangeEvent) => any): StripeLinkAuthenticationElement;
89
+ (eventType: "ready", handler: (event: {
90
+ elementType: "linkAuthentication";
91
+ }) => any): StripeLinkAuthenticationElement;
92
+ (eventType: "focus", handler: (event: {
93
+ elementType: "linkAuthentication";
94
+ }) => any): StripeLinkAuthenticationElement;
95
+ (eventType: "blur", handler: (event: {
96
+ elementType: "linkAuthentication";
97
+ }) => any): StripeLinkAuthenticationElement;
98
+ (eventType: "escape", handler: (event: {
99
+ elementType: "linkAuthentication";
100
+ }) => any): StripeLinkAuthenticationElement;
101
+ (eventType: "loaderror", handler: (event: {
102
+ elementType: "linkAuthentication";
103
+ error: StripeError;
104
+ }) => any): StripeLinkAuthenticationElement;
105
+ (eventType: "loaderstart", handler: (event: {
106
+ elementType: "linkAuthentication";
107
+ }) => any): StripeLinkAuthenticationElement;
108
+ };
109
+ once: {
110
+ (eventType: "change", handler: (event: StripeLinkAuthenticationElementChangeEvent) => any): StripeLinkAuthenticationElement;
111
+ (eventType: "ready", handler: (event: {
112
+ elementType: "linkAuthentication";
113
+ }) => any): StripeLinkAuthenticationElement;
114
+ (eventType: "focus", handler: (event: {
115
+ elementType: "linkAuthentication";
116
+ }) => any): StripeLinkAuthenticationElement;
117
+ (eventType: "blur", handler: (event: {
118
+ elementType: "linkAuthentication";
119
+ }) => any): StripeLinkAuthenticationElement;
120
+ (eventType: "escape", handler: (event: {
121
+ elementType: "linkAuthentication";
122
+ }) => any): StripeLinkAuthenticationElement;
123
+ (eventType: "loaderror", handler: (event: {
124
+ elementType: "linkAuthentication";
125
+ error: StripeError;
126
+ }) => any): StripeLinkAuthenticationElement;
127
+ (eventType: "loaderstart", handler: (event: {
128
+ elementType: "linkAuthentication";
129
+ }) => any): StripeLinkAuthenticationElement;
130
+ };
131
+ off: {
132
+ (eventType: "change", handler?: (event: StripeLinkAuthenticationElementChangeEvent) => any): StripeLinkAuthenticationElement;
133
+ (eventType: "ready", handler?: (event: {
134
+ elementType: "linkAuthentication";
135
+ }) => any): StripeLinkAuthenticationElement;
136
+ (eventType: "focus", handler?: (event: {
137
+ elementType: "linkAuthentication";
138
+ }) => any): StripeLinkAuthenticationElement;
139
+ (eventType: "blur", handler?: (event: {
140
+ elementType: "linkAuthentication";
141
+ }) => any): StripeLinkAuthenticationElement;
142
+ (eventType: "escape", handler?: (event: {
143
+ elementType: "linkAuthentication";
144
+ }) => any): StripeLinkAuthenticationElement;
145
+ (eventType: "loaderror", handler?: (event: {
146
+ elementType: "linkAuthentication";
147
+ error: StripeError;
148
+ }) => any): StripeLinkAuthenticationElement;
149
+ (eventType: "loaderstart", handler?: (event: {
150
+ elementType: "linkAuthentication";
151
+ }) => any): StripeLinkAuthenticationElement;
152
+ };
153
+ } | null>;
154
+ focus: () => void | undefined;
155
+ blur: () => void | undefined;
156
+ clear: () => void | undefined;
157
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
158
+ change: (event: StripeLinkAuthenticationElementChangeEvent) => any;
159
+ ready: (element: StripeLinkAuthenticationElement) => any;
160
+ }, string, PublicProps, Readonly<Props> & Readonly<{
161
+ onChange?: (event: StripeLinkAuthenticationElementChangeEvent) => any;
162
+ onReady?: (element: StripeLinkAuthenticationElement) => any;
163
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
164
+ elementRef: HTMLDivElement;
165
+ }, HTMLDivElement>;
166
+ export default _default;
167
+ //# sourceMappingURL=VueStripeLinkAuthenticationElement.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueStripeLinkAuthenticationElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeLinkAuthenticationElement.vue"],"names":[],"mappings":";AAwIA,OAAO,KAAK,EACV,+BAA+B,EAC/B,sCAAsC,EACtC,0CAA0C,EAC3C,MAAM,mBAAmB,CAAA;AAI1B,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,sCAAsC,CAAA;CACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2JD,wBAUG"}
@@ -0,0 +1,206 @@
1
+ import { StripePaymentElement as StripePaymentElementType, StripePaymentElementOptions, StripePaymentElementChangeEvent, StripeError, StripePaymentElementCardDetailsChangeEvent, StripePaymentElementSavedPaymentMethodUpdateEvent, StripePaymentElementSavedPaymentMethodRemoveEvent } from '@stripe/stripe-js';
2
+ import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
3
+ interface Props {
4
+ options?: StripePaymentElementOptions;
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: StripePaymentElementChangeEvent) => any): StripePaymentElementType;
30
+ (eventType: "ready", handler: (event: {
31
+ elementType: "payment";
32
+ }) => any): StripePaymentElementType;
33
+ (eventType: "focus", handler: (event: {
34
+ elementType: "payment";
35
+ }) => any): StripePaymentElementType;
36
+ (eventType: "blur", handler: (event: {
37
+ elementType: "payment";
38
+ }) => any): StripePaymentElementType;
39
+ (eventType: "escape", handler: (event: {
40
+ elementType: "payment";
41
+ }) => any): StripePaymentElementType;
42
+ (eventType: "loaderror", handler: (event: {
43
+ elementType: "payment";
44
+ error: StripeError;
45
+ }) => any): StripePaymentElementType;
46
+ (eventType: "loaderstart", handler: (event: {
47
+ elementType: "payment";
48
+ }) => any): StripePaymentElementType;
49
+ (eventType: "carddetailschange", handler: (event: StripePaymentElementCardDetailsChangeEvent) => any): StripePaymentElementType;
50
+ (eventType: "savedpaymentmethodupdate", handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any): StripePaymentElementType;
51
+ (eventType: "savedpaymentmethodremove", handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any): StripePaymentElementType;
52
+ };
53
+ once: {
54
+ (eventType: "change", handler: (event: StripePaymentElementChangeEvent) => any): StripePaymentElementType;
55
+ (eventType: "ready", handler: (event: {
56
+ elementType: "payment";
57
+ }) => any): StripePaymentElementType;
58
+ (eventType: "focus", handler: (event: {
59
+ elementType: "payment";
60
+ }) => any): StripePaymentElementType;
61
+ (eventType: "blur", handler: (event: {
62
+ elementType: "payment";
63
+ }) => any): StripePaymentElementType;
64
+ (eventType: "escape", handler: (event: {
65
+ elementType: "payment";
66
+ }) => any): StripePaymentElementType;
67
+ (eventType: "loaderror", handler: (event: {
68
+ elementType: "payment";
69
+ error: StripeError;
70
+ }) => any): StripePaymentElementType;
71
+ (eventType: "loaderstart", handler: (event: {
72
+ elementType: "payment";
73
+ }) => any): StripePaymentElementType;
74
+ };
75
+ off: {
76
+ (eventType: "change", handler?: (event: StripePaymentElementChangeEvent) => any): StripePaymentElementType;
77
+ (eventType: "ready", handler?: (event: {
78
+ elementType: "payment";
79
+ }) => any): StripePaymentElementType;
80
+ (eventType: "focus", handler?: (event: {
81
+ elementType: "payment";
82
+ }) => any): StripePaymentElementType;
83
+ (eventType: "blur", handler?: (event: {
84
+ elementType: "payment";
85
+ }) => any): StripePaymentElementType;
86
+ (eventType: "escape", handler?: (event: {
87
+ elementType: "payment";
88
+ }) => any): StripePaymentElementType;
89
+ (eventType: "loaderror", handler?: (event: {
90
+ elementType: "payment";
91
+ error: StripeError;
92
+ }) => any): StripePaymentElementType;
93
+ (eventType: "loaderstart", handler?: (event: {
94
+ elementType: "payment";
95
+ }) => any): StripePaymentElementType;
96
+ };
97
+ update: (options: Partial<StripePaymentElementOptions>) => StripePaymentElementType;
98
+ collapse: () => StripePaymentElementType;
99
+ } | null, StripePaymentElementType | {
100
+ mount: (domElement: string | HTMLElement) => void;
101
+ blur: () => void;
102
+ clear: () => void;
103
+ destroy: () => void;
104
+ focus: () => void;
105
+ unmount: () => void;
106
+ on: {
107
+ (eventType: "change", handler: (event: StripePaymentElementChangeEvent) => any): StripePaymentElementType;
108
+ (eventType: "ready", handler: (event: {
109
+ elementType: "payment";
110
+ }) => any): StripePaymentElementType;
111
+ (eventType: "focus", handler: (event: {
112
+ elementType: "payment";
113
+ }) => any): StripePaymentElementType;
114
+ (eventType: "blur", handler: (event: {
115
+ elementType: "payment";
116
+ }) => any): StripePaymentElementType;
117
+ (eventType: "escape", handler: (event: {
118
+ elementType: "payment";
119
+ }) => any): StripePaymentElementType;
120
+ (eventType: "loaderror", handler: (event: {
121
+ elementType: "payment";
122
+ error: StripeError;
123
+ }) => any): StripePaymentElementType;
124
+ (eventType: "loaderstart", handler: (event: {
125
+ elementType: "payment";
126
+ }) => any): StripePaymentElementType;
127
+ (eventType: "carddetailschange", handler: (event: StripePaymentElementCardDetailsChangeEvent) => any): StripePaymentElementType;
128
+ (eventType: "savedpaymentmethodupdate", handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any): StripePaymentElementType;
129
+ (eventType: "savedpaymentmethodremove", handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any): StripePaymentElementType;
130
+ };
131
+ once: {
132
+ (eventType: "change", handler: (event: StripePaymentElementChangeEvent) => any): StripePaymentElementType;
133
+ (eventType: "ready", handler: (event: {
134
+ elementType: "payment";
135
+ }) => any): StripePaymentElementType;
136
+ (eventType: "focus", handler: (event: {
137
+ elementType: "payment";
138
+ }) => any): StripePaymentElementType;
139
+ (eventType: "blur", handler: (event: {
140
+ elementType: "payment";
141
+ }) => any): StripePaymentElementType;
142
+ (eventType: "escape", handler: (event: {
143
+ elementType: "payment";
144
+ }) => any): StripePaymentElementType;
145
+ (eventType: "loaderror", handler: (event: {
146
+ elementType: "payment";
147
+ error: StripeError;
148
+ }) => any): StripePaymentElementType;
149
+ (eventType: "loaderstart", handler: (event: {
150
+ elementType: "payment";
151
+ }) => any): StripePaymentElementType;
152
+ };
153
+ off: {
154
+ (eventType: "change", handler?: (event: StripePaymentElementChangeEvent) => any): StripePaymentElementType;
155
+ (eventType: "ready", handler?: (event: {
156
+ elementType: "payment";
157
+ }) => any): StripePaymentElementType;
158
+ (eventType: "focus", handler?: (event: {
159
+ elementType: "payment";
160
+ }) => any): StripePaymentElementType;
161
+ (eventType: "blur", handler?: (event: {
162
+ elementType: "payment";
163
+ }) => any): StripePaymentElementType;
164
+ (eventType: "escape", handler?: (event: {
165
+ elementType: "payment";
166
+ }) => any): StripePaymentElementType;
167
+ (eventType: "loaderror", handler?: (event: {
168
+ elementType: "payment";
169
+ error: StripeError;
170
+ }) => any): StripePaymentElementType;
171
+ (eventType: "loaderstart", handler?: (event: {
172
+ elementType: "payment";
173
+ }) => any): StripePaymentElementType;
174
+ };
175
+ update: (options: Partial<StripePaymentElementOptions>) => StripePaymentElementType;
176
+ collapse: () => StripePaymentElementType;
177
+ } | null>;
178
+ loading: Ref<boolean, boolean>;
179
+ error: Ref<string | null, string | null>;
180
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
181
+ blur: () => any;
182
+ change: (event: StripePaymentElementChangeEvent) => any;
183
+ focus: () => any;
184
+ ready: (element: StripePaymentElementType) => any;
185
+ escape: () => any;
186
+ loaderstart: () => any;
187
+ loaderstop: () => any;
188
+ }, string, PublicProps, Readonly<Props> & Readonly<{
189
+ onBlur?: () => any;
190
+ onChange?: (event: StripePaymentElementChangeEvent) => any;
191
+ onFocus?: () => any;
192
+ onReady?: (element: StripePaymentElementType) => any;
193
+ onEscape?: () => any;
194
+ onLoaderstart?: () => any;
195
+ onLoaderstop?: () => any;
196
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
197
+ elementRef: HTMLDivElement;
198
+ }, HTMLDivElement>;
199
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
200
+ export default _default;
201
+ type __VLS_WithTemplateSlots<T, S> = T & {
202
+ new (): {
203
+ $slots: S;
204
+ };
205
+ };
206
+ //# sourceMappingURL=VueStripePaymentElement.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueStripePaymentElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripePaymentElement.vue"],"names":[],"mappings":";AAgOA,OAAO,KAAK,EACV,oBAAoB,IAAI,wBAAwB,EAChD,2BAA2B,EAC3B,+BAA+B,EAChC,MAAM,mBAAmB,CAAA;AAW1B,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,2BAA2B,CAAA;CACtC;AA2ID,iBAAS,cAAc;WA8DT,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,42 @@
1
+ import { Stripe } from '@stripe/stripe-js';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi';
3
+ interface Props {
4
+ publishableKey?: string;
5
+ stripeKey?: string;
6
+ stripeAccount?: string;
7
+ apiVersion?: string;
8
+ locale?: string;
9
+ options?: {
10
+ stripeAccount?: string;
11
+ apiVersion?: string;
12
+ locale?: string;
13
+ };
14
+ }
15
+ declare function __VLS_template(): {
16
+ attrs: Partial<{}>;
17
+ slots: {
18
+ error?(_: {
19
+ error: string;
20
+ }): any;
21
+ loading?(_: {}): any;
22
+ default?(_: {}): any;
23
+ };
24
+ refs: {};
25
+ rootEl: any;
26
+ };
27
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
+ declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
29
+ load: (stripe: Stripe) => any;
30
+ error: (error: Error) => any;
31
+ }, string, PublicProps, Readonly<Props> & Readonly<{
32
+ onLoad?: (stripe: Stripe) => any;
33
+ onError?: (error: Error) => any;
34
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
+ export default _default;
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+ //# sourceMappingURL=VueStripeProvider.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueStripeProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VueStripeProvider.vue"],"names":[],"mappings":";AAgJA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAK3D,UAAU,KAAK;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE;QACR,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AA6ED,iBAAS,cAAc;WAuDT,OAAO,IAA6B;;;;YAZvB,GAAG;yBACD,GAAG;yBACH,GAAG;;;;EAe/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;uFAOnB,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"}