@metrifox/react-sdk 0.0.9 → 0.0.11
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 +148 -4
- package/dist/index.cjs +47 -24
- package/dist/index.d.ts +95 -1
- package/dist/index.js +46 -23
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,84 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
3
|
|
|
4
|
+
interface PricingTableTheme {
|
|
5
|
+
card?: CardTheme;
|
|
6
|
+
button?: ButtonTheme;
|
|
7
|
+
featureList?: FeatureListTheme;
|
|
8
|
+
tabs?: TabsTheme;
|
|
9
|
+
intervalToggle?: IntervalToggleTheme;
|
|
10
|
+
currentSubscriptionCard?: CurrentSubscriptionCard;
|
|
11
|
+
freeTrialTag?: FreeTrialTheme;
|
|
12
|
+
checkoutBar?: CheckoutBarTheme;
|
|
13
|
+
}
|
|
14
|
+
interface CardTheme {
|
|
15
|
+
background?: string;
|
|
16
|
+
borderColor?: string;
|
|
17
|
+
descriptionColor?: string;
|
|
18
|
+
header?: CardHeaderTheme;
|
|
19
|
+
description?: CardDescriptionTheme;
|
|
20
|
+
price?: CardPriceTheme;
|
|
21
|
+
}
|
|
22
|
+
interface CardHeaderTheme {
|
|
23
|
+
background?: string;
|
|
24
|
+
textColor?: string;
|
|
25
|
+
}
|
|
26
|
+
interface CardDescriptionTheme {
|
|
27
|
+
textColor?: string;
|
|
28
|
+
textButtonColor?: string;
|
|
29
|
+
}
|
|
30
|
+
interface CardPriceTheme {
|
|
31
|
+
amountColor?: string;
|
|
32
|
+
primaryTextColor?: string;
|
|
33
|
+
secondaryTextColor?: string;
|
|
34
|
+
textButtonColor?: string;
|
|
35
|
+
background?: string;
|
|
36
|
+
borderColor?: string;
|
|
37
|
+
}
|
|
38
|
+
interface ButtonTheme {
|
|
39
|
+
background?: string;
|
|
40
|
+
textColor?: string;
|
|
41
|
+
secondaryBackground?: string;
|
|
42
|
+
secondaryTextColor?: string;
|
|
43
|
+
textButtonColor?: string;
|
|
44
|
+
}
|
|
45
|
+
interface FeatureListTheme {
|
|
46
|
+
textColor?: string;
|
|
47
|
+
iconColor?: string;
|
|
48
|
+
}
|
|
49
|
+
interface TabsTheme {
|
|
50
|
+
inactiveText?: string;
|
|
51
|
+
activeText?: string;
|
|
52
|
+
indicator?: string;
|
|
53
|
+
borderColor?: string;
|
|
54
|
+
}
|
|
55
|
+
interface IntervalToggleTheme {
|
|
56
|
+
background?: string;
|
|
57
|
+
activeBackground?: string;
|
|
58
|
+
activeText?: string;
|
|
59
|
+
inactiveText?: string;
|
|
60
|
+
}
|
|
61
|
+
interface CurrentSubscriptionCard {
|
|
62
|
+
header: CardHeaderTheme;
|
|
63
|
+
gradientColor?: string;
|
|
64
|
+
}
|
|
65
|
+
interface FreeTrialTheme {
|
|
66
|
+
background?: string;
|
|
67
|
+
textColor?: string;
|
|
68
|
+
}
|
|
69
|
+
interface CheckoutBarTheme {
|
|
70
|
+
background?: string;
|
|
71
|
+
borderColor?: string;
|
|
72
|
+
textColor?: string;
|
|
73
|
+
buttonBackground?: string;
|
|
74
|
+
buttonTextColor?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
4
77
|
interface MetrifoxInitConfig {
|
|
5
78
|
clientKey: string;
|
|
6
79
|
baseUrl?: string;
|
|
80
|
+
webAppUrl?: string;
|
|
81
|
+
pricingTableTheme?: PricingTableTheme;
|
|
7
82
|
}
|
|
8
83
|
declare const metrifoxInit: (config: MetrifoxInitConfig) => void;
|
|
9
84
|
|
|
@@ -299,6 +374,7 @@ interface Tier {
|
|
|
299
374
|
min_price: number | null;
|
|
300
375
|
max_price: number | null;
|
|
301
376
|
flat_fee: number | null;
|
|
377
|
+
total_unit_quantity: number | null;
|
|
302
378
|
}
|
|
303
379
|
interface Entitlement {
|
|
304
380
|
carryover_enabled: boolean;
|
|
@@ -353,5 +429,23 @@ declare const PriceCard: ({ plan, interval, featureOrderMap, isPricePage, isCust
|
|
|
353
429
|
buttonAction?: () => void;
|
|
354
430
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
355
431
|
|
|
356
|
-
|
|
432
|
+
declare const PricingTable: ({ checkoutUsername, productKey, plansOnly, singlePurchasesOnly, showTabHeader, }: {
|
|
433
|
+
checkoutUsername: string;
|
|
434
|
+
productKey: string;
|
|
435
|
+
plansOnly?: boolean;
|
|
436
|
+
singlePurchasesOnly?: boolean;
|
|
437
|
+
showTabHeader?: boolean;
|
|
438
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
439
|
+
|
|
440
|
+
declare const useCheckoutUrl: () => {
|
|
441
|
+
getCheckoutUrl: ({ offeringKey, billingInterval, customerKey, }: {
|
|
442
|
+
offeringKey: string;
|
|
443
|
+
billingInterval?: string;
|
|
444
|
+
customerKey?: string;
|
|
445
|
+
}) => Promise<string>;
|
|
446
|
+
loading: boolean;
|
|
447
|
+
error: unknown;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
export { CustomerPortal, PriceCard, PricingTable, metrifoxInit, useCheckoutUrl };
|
|
357
451
|
export type { Offering as ProductOffering };
|