@coinflowlabs/vue 1.11.0 → 1.12.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.
@@ -0,0 +1,38 @@
1
+ import { PropType } from 'vue';
2
+ import { CoinflowEnvs, MerchantTheme } from '../../lib/common';
3
+ export interface CardFormV2TokenResponse {
4
+ token: string;
5
+ expMonth?: string;
6
+ expYear?: string;
7
+ }
8
+ declare function tokenize(): Promise<CardFormV2TokenResponse>;
9
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
+ args: {
11
+ type: PropType<{
12
+ merchantId: string;
13
+ env?: CoinflowEnvs;
14
+ theme?: MerchantTheme;
15
+ variant: "card-form" | "card-number-form" | "cvv-form";
16
+ token?: string;
17
+ onLoad?: () => void;
18
+ }>;
19
+ required: true;
20
+ };
21
+ }>, {
22
+ tokenize: typeof tokenize;
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
+ args: {
25
+ type: PropType<{
26
+ merchantId: string;
27
+ env?: CoinflowEnvs;
28
+ theme?: MerchantTheme;
29
+ variant: "card-form" | "card-number-form" | "cvv-form";
30
+ token?: string;
31
+ onLoad?: () => void;
32
+ }>;
33
+ required: true;
34
+ };
35
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
36
+ iframeRef: HTMLIFrameElement;
37
+ }, HTMLIFrameElement>;
38
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -6,7 +6,81 @@ import { default as CoinflowCvvInput } from './components/card-form/CoinflowCvvI
6
6
  import { default as CoinflowCvvOnlyInput } from './components/card-form/CoinflowCvvOnlyInput.vue';
7
7
  import { default as CoinflowPurchaseProtection } from './components/CoinflowPurchaseProtection.vue';
8
8
  import { default as CoinflowCardNumberOnlyInput } from './components/card-form/CoinflowCardNumberOnlyInput.vue';
9
+ import { default as CoinflowCardFormV2 } from './components/card-form/CoinflowCardFormV2.vue';
9
10
  import { default as CoinflowApplePayButton } from './components/mobile-wallet/CoinflowApplePayButton.vue';
10
11
  import { default as CoinflowGooglePayButton } from './components/mobile-wallet/CoinflowGooglePayButton.vue';
11
12
  export * from './lib/common';
12
- export { CoinflowIframe, CoinflowWithdraw, CoinflowCvvInput, CoinflowCardNumberInput, CoinflowPurchase, CoinflowCvvOnlyInput, CoinflowPurchaseProtection, CoinflowCardNumberOnlyInput, CoinflowApplePayButton, CoinflowGooglePayButton, };
13
+ declare const CoinflowCardForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
14
+ args: {
15
+ type: import('vue').PropType<{
16
+ merchantId: string;
17
+ env?: import('./lib/common').CoinflowEnvs;
18
+ theme?: import('./lib/common').MerchantTheme;
19
+ variant: "card-form" | "card-number-form" | "cvv-form";
20
+ token?: string;
21
+ onLoad?: () => void;
22
+ }>;
23
+ required: true;
24
+ };
25
+ }>, {
26
+ tokenize: () => Promise<import('./components/card-form/CoinflowCardFormV2.vue').CardFormV2TokenResponse>;
27
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
28
+ args: {
29
+ type: import('vue').PropType<{
30
+ merchantId: string;
31
+ env?: import('./lib/common').CoinflowEnvs;
32
+ theme?: import('./lib/common').MerchantTheme;
33
+ variant: "card-form" | "card-number-form" | "cvv-form";
34
+ token?: string;
35
+ onLoad?: () => void;
36
+ }>;
37
+ required: true;
38
+ };
39
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
40
+ iframeRef: HTMLIFrameElement;
41
+ }, HTMLIFrameElement>;
42
+ /** @deprecated Use CoinflowCardForm instead */
43
+ declare const CoinflowLegacyCardNumberInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
44
+ args: {
45
+ type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
46
+ required: true;
47
+ };
48
+ }>, {
49
+ getToken: () => Promise<import('./lib/common').CoinflowCardTokenResponse>;
50
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
51
+ args: {
52
+ type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
53
+ required: true;
54
+ };
55
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
56
+ /** @deprecated Use CoinflowCardForm instead */
57
+ declare const CoinflowLegacyCvvInput: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
58
+ /** @deprecated Use CoinflowCardForm instead */
59
+ declare const CoinflowLegacyCvvOnlyInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
60
+ args: {
61
+ type: import('vue').PropType<import('./lib/common').CoinflowCvvOnlyInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
62
+ required: true;
63
+ };
64
+ }>, {
65
+ getToken: () => Promise<import('./lib/common').CoinflowCardTokenResponse>;
66
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
67
+ args: {
68
+ type: import('vue').PropType<import('./lib/common').CoinflowCvvOnlyInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
69
+ required: true;
70
+ };
71
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
72
+ /** @deprecated Use CoinflowCardForm instead */
73
+ declare const CoinflowLegacyCardNumberOnlyInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
74
+ args: {
75
+ type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
76
+ required: true;
77
+ };
78
+ }>, {
79
+ getToken: () => Promise<import('./lib/common').CoinflowCardTokenResponse>;
80
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
81
+ args: {
82
+ type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
83
+ required: true;
84
+ };
85
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
86
+ export { CoinflowIframe, CoinflowWithdraw, CoinflowPurchase, CoinflowPurchaseProtection, CoinflowApplePayButton, CoinflowGooglePayButton, CoinflowCardForm, CoinflowCardFormV2, CoinflowLegacyCardNumberInput, CoinflowLegacyCvvInput, CoinflowLegacyCvvOnlyInput, CoinflowLegacyCardNumberOnlyInput, CoinflowCardNumberInput, CoinflowCvvInput, CoinflowCvvOnlyInput, CoinflowCardNumberOnlyInput, };
@@ -86,6 +86,12 @@ export type MerchantTheme = {
86
86
  ctaColor?: string;
87
87
  font?: string;
88
88
  style?: MerchantStyle;
89
+ fontSize?: string;
90
+ fontWeight?: string;
91
+ cardNumberPlaceholder?: string;
92
+ cvvPlaceholder?: string;
93
+ expirationPlaceholder?: string;
94
+ showCardIcon?: boolean;
89
95
  };
90
96
  interface BaseCustomerInfo {
91
97
  verificationId?: string;
@@ -193,6 +193,16 @@ export interface TypedCurrencyCents<T extends Currency> extends Cents {
193
193
  currency: T;
194
194
  }
195
195
  export declare function isTypedCurrencyCents<T extends Currency>(cents: CurrencyCents, currency: T): cents is TypedCurrencyCents<T>;
196
+ export interface ExchangeRate<T extends Currency = Currency> {
197
+ base: Currency;
198
+ rate: number;
199
+ to: T;
200
+ }
201
+ export declare function invertRate<T extends Currency = Currency>(ex: {
202
+ base: T;
203
+ rate: number;
204
+ to: Currency;
205
+ }): ExchangeRate<T>;
196
206
  export interface TokenSubtotal {
197
207
  /**
198
208
  * The tokens address
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.11.0",
4
+ "version": "1.12.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",