@billgangcom/theme-lib 1.68.0 → 1.69.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.
- package/dist/App.d.ts +2 -3
- package/dist/abstractions/IBlock.d.ts +1 -1
- package/dist/abstractions/PageContext.d.ts +73 -69
- package/dist/{builder/constants/api.d.ts → api/constants.d.ts} +2 -0
- package/dist/api/index.d.ts +1 -6
- package/dist/api/request.d.ts +8 -4
- package/dist/assets/storefront-icons/index.d.ts +73 -0
- package/dist/builder/api/index.d.ts +4 -0
- package/dist/builder/components/BlockColors/index.d.ts +1 -1
- package/dist/builder/components/BlockSettings/settings.d.ts +1 -1
- package/dist/builder/components/HeaderSaveButton/api/index.d.ts +1 -4
- package/dist/builder/components/HeaderSaveButton/utils/index.d.ts +1 -1
- package/dist/builder/components/HeaderSettingsPages/api/index.d.ts +1 -4
- package/dist/builder/components/ThemeSettingsColors/utils/getDuplicateColors.d.ts +1 -1
- package/dist/builder/constants/index.d.ts +0 -2
- package/dist/builder/constants/notification.d.ts +1 -0
- package/dist/builder/store/useGeneralStore.d.ts +3 -3
- package/dist/builder/store/useNotificationStore.d.ts +2 -2
- package/dist/builder/ui/ChooseImage/api/index.d.ts +2 -8
- package/dist/builder/ui/Notification/index.d.ts +11 -0
- package/dist/builder/ui/index.d.ts +0 -1
- package/dist/builder.cjs.js +123 -49
- package/dist/builder.es.js +18334 -2840
- package/dist/index-C1GpRLwI.js +15866 -0
- package/dist/index-CtyrP2GR.cjs +80 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +8 -8
- package/dist/lib/createTicket.d.ts +1 -4
- package/dist/lib/generateDynamicStyles.d.ts +1 -1
- package/dist/lib/setupDynamicFonts.d.ts +1 -1
- package/dist/pages/balance/balance-modal.d.ts +7 -0
- package/dist/pages/balance/index.d.ts +1 -0
- package/dist/pages/balance/model.d.ts +6 -0
- package/dist/pages/charge/index.d.ts +1 -0
- package/dist/pages/checkout/index.d.ts +1 -0
- package/dist/pages/checkout/model.d.ts +1 -0
- package/dist/pages/dynamic-page/api/index.d.ts +1 -4
- package/dist/pages/error-page/api/index.d.ts +1 -4
- package/dist/pages/home/index.d.ts +1 -0
- package/dist/pages/home/model.d.ts +26 -0
- package/dist/pages/order/index.d.ts +1 -0
- package/dist/pages/order/model.d.ts +91 -0
- package/dist/pages/orders/index.d.ts +1 -0
- package/dist/pages/orders/model.d.ts +4 -0
- package/dist/pages/rewards/index.d.ts +1 -0
- package/dist/pages/rewards/model.d.ts +71 -0
- package/dist/pages/subscription/index.d.ts +1 -0
- package/dist/pages/subscription/model.d.ts +1 -0
- package/dist/pages/subscriptions/index.d.ts +1 -0
- package/dist/pages/subscriptions/model.d.ts +6 -0
- package/dist/pages/ticket/index.d.ts +1 -0
- package/dist/pages/ticket/model.d.ts +24 -0
- package/dist/pages/tickets/index.d.ts +1 -0
- package/dist/pages/tickets/model.d.ts +21 -0
- package/dist/pages/top-up-balance/index.d.ts +1 -0
- package/dist/storefront/api/auth.d.ts +20 -0
- package/dist/storefront/api/charge.d.ts +1 -0
- package/dist/storefront/api/coupon.d.ts +2 -0
- package/dist/storefront/api/customer.d.ts +6 -0
- package/dist/storefront/api/discord.d.ts +7 -0
- package/dist/storefront/api/fetchGatewaysDetail.d.ts +1 -0
- package/dist/storefront/api/fetchThemeAndSettings.d.ts +1 -0
- package/dist/storefront/api/fetchWithPages.d.ts +11 -0
- package/dist/storefront/api/index.d.ts +18 -0
- package/dist/storefront/api/order.d.ts +14 -0
- package/dist/storefront/api/postBalanceTopUp.d.ts +2 -0
- package/dist/storefront/api/postCashappLink.d.ts +3 -0
- package/dist/storefront/api/referral.d.ts +3 -0
- package/dist/storefront/api/reviews.d.ts +2 -0
- package/dist/storefront/api/signUpReferral.d.ts +2 -0
- package/dist/storefront/api/store.d.ts +6 -0
- package/dist/storefront/api/subscription.d.ts +22 -0
- package/dist/storefront/api/ticket.d.ts +7 -0
- package/dist/storefront/api/transactions.d.ts +5 -0
- package/dist/storefront/components/ActivePaymentMethod/index.d.ts +2 -0
- package/dist/storefront/components/ActiveSubscriptionProduct/index.d.ts +9 -0
- package/dist/storefront/components/Auth/index.d.ts +11 -0
- package/dist/storefront/components/Auth/otp-input.d.ts +7 -0
- package/dist/storefront/components/AuthModal/index.d.ts +6 -0
- package/dist/storefront/components/CancelSubscription/index.d.ts +8 -0
- package/dist/storefront/components/CashAppVerify/index.d.ts +7 -0
- package/dist/storefront/components/ChangePaymentMethod/index.d.ts +7 -0
- package/dist/storefront/components/ChangeSubscriptionPlan/index.d.ts +10 -0
- package/dist/storefront/components/ChargeBlocksRenderer/index.d.ts +6 -0
- package/dist/storefront/components/ChargeItems/index.d.ts +7 -0
- package/dist/storefront/components/ChargeStatusBlock/index.d.ts +10 -0
- package/dist/storefront/components/CheckoutFooter/index.d.ts +6 -0
- package/dist/storefront/components/CheckoutHeader/index.d.ts +7 -0
- package/dist/storefront/components/CheckoutItems/index.d.ts +18 -0
- package/dist/storefront/components/CheckoutOperational/index.d.ts +24 -0
- package/dist/storefront/components/CheckoutOrderMainData/index.d.ts +9 -0
- package/dist/storefront/components/CheckoutPrices/index.d.ts +12 -0
- package/dist/storefront/components/CheckoutProduct/index.d.ts +8 -0
- package/dist/storefront/components/CheckoutProduct/model.d.ts +1 -0
- package/dist/storefront/components/ChoosePlanUpgradeMethod/index.d.ts +9 -0
- package/dist/storefront/components/ConnectDiscord/index.d.ts +6 -0
- package/dist/storefront/components/ConnectDiscord/model.d.ts +22 -0
- package/dist/storefront/components/Coupon/index.d.ts +12 -0
- package/dist/storefront/components/CustomFields/index.d.ts +13 -0
- package/dist/storefront/components/CustomerDashboard/index.d.ts +2 -0
- package/dist/storefront/components/DeliveryItem/index.d.ts +7 -0
- package/dist/storefront/components/InsufficientBalance/index.d.ts +8 -0
- package/dist/storefront/components/LeaveAReview/index.d.ts +9 -0
- package/dist/storefront/components/NoItemsBlock/index.d.ts +7 -0
- package/dist/storefront/components/OpenDelivery/index.d.ts +8 -0
- package/dist/storefront/components/OrderStatusBlock/index.d.ts +9 -0
- package/dist/storefront/components/OrdersTable/index.d.ts +15 -0
- package/dist/storefront/components/PageLoading/index.d.ts +7 -0
- package/dist/storefront/components/PageTitle/index.d.ts +6 -0
- package/dist/storefront/components/Pagination/index.d.ts +15 -0
- package/dist/storefront/components/PayPalF&FNote/index.d.ts +8 -0
- package/dist/storefront/components/PaymentMethod/checkout-balance-payment-method.d.ts +13 -0
- package/dist/storefront/components/PaymentMethod/index.d.ts +15 -0
- package/dist/storefront/components/PaymentMethod/model.d.ts +16 -0
- package/dist/storefront/components/PaymentMethods/index.d.ts +18 -0
- package/dist/storefront/components/ProcessingPayment/index.d.ts +1 -0
- package/dist/storefront/components/ReferralBlock/index.d.ts +13 -0
- package/dist/storefront/components/ReferralBlock/mask.d.ts +1 -0
- package/dist/storefront/components/ReferralBlock/referral-modal.d.ts +7 -0
- package/dist/storefront/components/ReferralBlock/step-item.d.ts +8 -0
- package/dist/storefront/components/SecuredBySsl/index.d.ts +1 -0
- package/dist/storefront/components/Sidebar/card.d.ts +6 -0
- package/dist/storefront/components/Sidebar/index.d.ts +1 -0
- package/dist/storefront/components/Sidebar/nav-list.d.ts +2 -0
- package/dist/storefront/components/StatItem/index.d.ts +14 -0
- package/dist/storefront/components/StatusIndicator/index.d.ts +7 -0
- package/dist/storefront/components/SubmitReview/index.d.ts +7 -0
- package/dist/storefront/components/SubscriptionCoupon/index.d.ts +7 -0
- package/dist/storefront/components/SubscriptionExpiration/index.d.ts +6 -0
- package/dist/storefront/components/SubscriptionExpirationDate/index.d.ts +2 -0
- package/dist/storefront/components/SubscriptionProduct/index.d.ts +7 -0
- package/dist/storefront/components/SubscriptionProduct/model.d.ts +9 -0
- package/dist/storefront/components/SubscriptionStatusBadge/index.d.ts +5 -0
- package/dist/storefront/components/SubscriptionsTable/index.d.ts +11 -0
- package/dist/storefront/components/Table/index.d.ts +17 -0
- package/dist/storefront/components/TermsOfService/index.d.ts +1 -0
- package/dist/storefront/components/TicketRow/index.d.ts +5 -0
- package/dist/storefront/components/TrackPayment/index.d.ts +8 -0
- package/dist/storefront/components/index.d.ts +53 -0
- package/dist/storefront/constants/api.d.ts +3 -0
- package/dist/storefront/constants/index.d.ts +3 -0
- package/dist/storefront/constants/referralSteps.d.ts +6 -0
- package/dist/storefront/constants/routes.d.ts +8 -0
- package/dist/storefront/hooks/index.d.ts +2 -0
- package/dist/storefront/hooks/useCart.d.ts +186 -0
- package/dist/storefront/hooks/useCopy.d.ts +1 -0
- package/dist/storefront/index.d.ts +9 -0
- package/dist/storefront/models/balance.d.ts +46 -0
- package/dist/storefront/models/charge.d.ts +73 -0
- package/dist/storefront/models/checkout.d.ts +16 -0
- package/dist/storefront/models/coupon.d.ts +5 -0
- package/dist/storefront/models/discord.d.ts +22 -0
- package/dist/storefront/models/gateway.d.ts +8 -0
- package/dist/storefront/models/index.d.ts +15 -0
- package/dist/storefront/models/order.d.ts +125 -0
- package/dist/storefront/models/payment.d.ts +15 -0
- package/dist/storefront/models/post.d.ts +5 -0
- package/dist/storefront/models/price.d.ts +5 -0
- package/dist/storefront/models/referral.d.ts +12 -0
- package/dist/storefront/models/referralCode.d.ts +3 -0
- package/dist/{builder/constants/general.d.ts → storefront/models/shop.d.ts} +19 -6
- package/dist/storefront/models/subscription.d.ts +129 -0
- package/dist/storefront/models/transaction.d.ts +12 -0
- package/dist/storefront/store/index.d.ts +6 -0
- package/dist/storefront/store/useCartStore.d.ts +24 -0
- package/dist/storefront/store/useCustomerDashboardStore.d.ts +34 -0
- package/dist/storefront/store/useDiscordStore.d.ts +7 -0
- package/dist/storefront/store/usePaginationPagesStore.d.ts +6 -0
- package/dist/storefront/store/useStorefrontStore.d.ts +21 -0
- package/dist/storefront/store/useSubscriptionStore.d.ts +7 -0
- package/dist/storefront/ui/ActiveBadge/index.d.ts +5 -0
- package/dist/storefront/ui/InputRange/index.d.ts +9 -0
- package/dist/storefront/ui/ProgressBar/index.d.ts +8 -0
- package/dist/storefront/ui/Rating/index.d.ts +8 -0
- package/dist/storefront/ui/Timer/index.d.ts +6 -0
- package/dist/storefront/ui/index.d.ts +5 -0
- package/dist/storefront/utils/index.d.ts +16 -0
- package/dist/storefront/utils/recapcha.d.ts +12 -0
- package/dist/ui/Button/index.d.ts +1 -1
- package/dist/ui/CategorySettings/index.d.ts +1 -1
- package/dist/ui/Input/index.d.ts +2 -0
- package/dist/ui/ItemsSettings/index.d.ts +1 -1
- package/dist/ui/ListingSelector/index.d.ts +1 -1
- package/dist/ui/Loader/index.d.ts +4 -0
- package/dist/ui/Radio/index.d.ts +14 -0
- package/dist/ui/Select/index.d.ts +20 -0
- package/dist/ui/Select/utils/index.d.ts +2 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1105 -1208
- package/package.json +7 -3
- package/dist/api/fetchThemeAndSettings.d.ts +0 -4
- package/dist/index-BaU8m6yb.cjs +0 -194
- package/dist/index-zSoKRTpK.js +0 -34420
- /package/dist/{api → builder/api}/fetchAll.d.ts +0 -0
- /package/dist/{api → builder/api}/fetchData.d.ts +0 -0
- /package/dist/{api → builder/api}/fetchFontsData.d.ts +0 -0
- /package/dist/{api → builder/api}/fetchPagesData.d.ts +0 -0
- /package/dist/{api → storefront/api}/fetchGeneral.d.ts +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { PartOrder } from './order';
|
|
2
|
+
import { Price } from './price';
|
|
3
|
+
export type PostSubscriptionRequest = {
|
|
4
|
+
customerEmail: string;
|
|
5
|
+
gateway: string;
|
|
6
|
+
partOrder: PartOrder;
|
|
7
|
+
recaptcha: string;
|
|
8
|
+
coupon?: string | null;
|
|
9
|
+
customFields: Record<string, string>;
|
|
10
|
+
discordSocialConnectId?: string | null;
|
|
11
|
+
referralCode?: string | null;
|
|
12
|
+
};
|
|
13
|
+
export declare enum SubscriptionStatus {
|
|
14
|
+
RIAL = "RIAL",
|
|
15
|
+
AWAITING_PAYMENT = "AWAITING_PAYMENT",
|
|
16
|
+
ACTIVE = "ACTIVE",
|
|
17
|
+
PAST_DUE = "PAST_DUE",
|
|
18
|
+
CANCELLED = "CANCELLED",
|
|
19
|
+
EXPIRED = "EXPIRED",
|
|
20
|
+
CHANGED_GATEWAY = "CHANGED_GATEWAY",
|
|
21
|
+
REPLACED = "REPLACED"
|
|
22
|
+
}
|
|
23
|
+
export interface SubscriptionItem {
|
|
24
|
+
id: string;
|
|
25
|
+
productName: string;
|
|
26
|
+
status: SubscriptionStatus;
|
|
27
|
+
price: Price;
|
|
28
|
+
gatewayName: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
accessToken: string;
|
|
31
|
+
recurringInterval: string;
|
|
32
|
+
currentChargeAttempt: number;
|
|
33
|
+
nextChargeAttemptAt?: string;
|
|
34
|
+
activeTo?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SubscriptionCoupon {
|
|
37
|
+
isFixed: boolean;
|
|
38
|
+
discount: number;
|
|
39
|
+
name: string;
|
|
40
|
+
initialCouponDurationForSubscriptions?: number;
|
|
41
|
+
currentCouponDurationForSubscriptions?: number;
|
|
42
|
+
}
|
|
43
|
+
interface SubscriptionSettings {
|
|
44
|
+
price: Price;
|
|
45
|
+
recurringIntervalDays: number;
|
|
46
|
+
}
|
|
47
|
+
interface CustomField {
|
|
48
|
+
name: string;
|
|
49
|
+
required: boolean;
|
|
50
|
+
placeholder: string;
|
|
51
|
+
defaultValue: string;
|
|
52
|
+
regex: string;
|
|
53
|
+
type: string;
|
|
54
|
+
}
|
|
55
|
+
interface ProductVariantData {
|
|
56
|
+
id: number;
|
|
57
|
+
name: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
shortDescription?: string;
|
|
60
|
+
price: Price;
|
|
61
|
+
chargeTypes: string[];
|
|
62
|
+
subscriptionSettings: SubscriptionSettings;
|
|
63
|
+
quantity: {
|
|
64
|
+
restrictions: any;
|
|
65
|
+
};
|
|
66
|
+
deliveryTime: number;
|
|
67
|
+
gateways: {
|
|
68
|
+
name: string;
|
|
69
|
+
}[];
|
|
70
|
+
customFields: CustomField[];
|
|
71
|
+
warranty?: {
|
|
72
|
+
text: string;
|
|
73
|
+
durationMilliseconds: number;
|
|
74
|
+
};
|
|
75
|
+
discordSettings: {
|
|
76
|
+
isEnabled: boolean;
|
|
77
|
+
isRequired: boolean;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
interface Type {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
productVariants: {
|
|
84
|
+
data: ProductVariantData;
|
|
85
|
+
position: number;
|
|
86
|
+
isHighlighted: boolean;
|
|
87
|
+
}[];
|
|
88
|
+
position: number;
|
|
89
|
+
}
|
|
90
|
+
interface SubscriptionUpgradePlansData {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
description: string;
|
|
94
|
+
types: Type[];
|
|
95
|
+
}
|
|
96
|
+
export interface SubscriptionUpgradePlans {
|
|
97
|
+
data: SubscriptionUpgradePlansData;
|
|
98
|
+
}
|
|
99
|
+
export interface SubscriptionGatewayInfo {
|
|
100
|
+
card?: {
|
|
101
|
+
brand: string;
|
|
102
|
+
last4: string;
|
|
103
|
+
expires: string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface SubscriptionFullItem {
|
|
107
|
+
id: string;
|
|
108
|
+
productName: string;
|
|
109
|
+
status: SubscriptionStatus;
|
|
110
|
+
price: Price;
|
|
111
|
+
gatewayName: string;
|
|
112
|
+
createdAt: string;
|
|
113
|
+
accessToken: string;
|
|
114
|
+
recurringInterval: string;
|
|
115
|
+
currentChargeAttempt: number;
|
|
116
|
+
nextChargeAttemptAt?: string;
|
|
117
|
+
activeTo?: string;
|
|
118
|
+
productDescription?: string;
|
|
119
|
+
productImage?: {
|
|
120
|
+
id: number;
|
|
121
|
+
cfId: string;
|
|
122
|
+
};
|
|
123
|
+
availableGateways: string[];
|
|
124
|
+
gatewayInfo?: SubscriptionGatewayInfo;
|
|
125
|
+
coupon?: SubscriptionCoupon;
|
|
126
|
+
variantId: number;
|
|
127
|
+
pricingPlanExists: boolean;
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Price } from './price';
|
|
2
|
+
export declare enum TransactionStatus {
|
|
3
|
+
ADDED = "ADDED",
|
|
4
|
+
REMOVED = "REMOVED"
|
|
5
|
+
}
|
|
6
|
+
export interface Transaction {
|
|
7
|
+
id: string;
|
|
8
|
+
price: Price;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
description: string;
|
|
11
|
+
status: TransactionStatus;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { OrderRequest } from '@storefront/models';
|
|
2
|
+
import { Product } from '../../abstractions';
|
|
3
|
+
export type ValidateCouponApiData = {
|
|
4
|
+
restrictToProductIds?: number[];
|
|
5
|
+
isFixed?: boolean;
|
|
6
|
+
discount?: number;
|
|
7
|
+
};
|
|
8
|
+
interface Options {
|
|
9
|
+
cart: OrderRequest;
|
|
10
|
+
products: Product[];
|
|
11
|
+
coupon: ValidateCouponApiData | null;
|
|
12
|
+
pending: boolean;
|
|
13
|
+
applyCouponPending: boolean;
|
|
14
|
+
customerEmail: string | null;
|
|
15
|
+
recaptcha: string;
|
|
16
|
+
setCart: (updater: OrderRequest | ((prev: OrderRequest) => OrderRequest)) => void;
|
|
17
|
+
setProducts: (updater: Product[] | ((prev: Product[]) => Product[])) => void;
|
|
18
|
+
setCoupon: (coupon: ValidateCouponApiData | null) => void;
|
|
19
|
+
setPending: (pending: boolean) => void;
|
|
20
|
+
setApplyCouponPending: (pending: boolean) => void;
|
|
21
|
+
setRecaptcha: (recaptcha: string) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const useCartStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Routes } from '@storefront/constants';
|
|
2
|
+
import { BalanceTopUpSettings, GatewayDetail } from '@storefront/models';
|
|
3
|
+
export interface DashInfo {
|
|
4
|
+
email: string;
|
|
5
|
+
id: number;
|
|
6
|
+
}
|
|
7
|
+
interface Balance {
|
|
8
|
+
amount: number;
|
|
9
|
+
currency: string;
|
|
10
|
+
}
|
|
11
|
+
interface Options {
|
|
12
|
+
route: Routes;
|
|
13
|
+
setRoute: (route: Routes) => void;
|
|
14
|
+
token: string | null;
|
|
15
|
+
setToken: (token: string | null) => void;
|
|
16
|
+
otpRequest: {
|
|
17
|
+
requested: boolean;
|
|
18
|
+
email: string;
|
|
19
|
+
};
|
|
20
|
+
setOtpRequest: (otpRequest: {
|
|
21
|
+
requested: boolean;
|
|
22
|
+
email: string;
|
|
23
|
+
}) => void;
|
|
24
|
+
balanceSettings: BalanceTopUpSettings | null;
|
|
25
|
+
setBalanceSettings: (balanceSettings: BalanceTopUpSettings | null) => void;
|
|
26
|
+
gatewaysDetail: GatewayDetail[] | null;
|
|
27
|
+
setGatewaysDetail: (gatewaysDetail: GatewayDetail[] | null) => void;
|
|
28
|
+
dashInfo: DashInfo | null;
|
|
29
|
+
setDashInfo: (dashInfo: DashInfo | null) => void;
|
|
30
|
+
balance: Balance | null;
|
|
31
|
+
setBalance: (balance: Balance | null) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const useCustomerDashboardStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomerDiscordConnection } from '@storefront/models';
|
|
2
|
+
interface Options {
|
|
3
|
+
discordInfo: CustomerDiscordConnection | null;
|
|
4
|
+
setDiscordInfo: (discordInfo: CustomerDiscordConnection | null) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useDiscordStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ShopInfo, ShopPrivacyPolicy, ShopRefundPolicy, ShopTerms } from '@storefront/models';
|
|
2
|
+
interface StorefrontOptions {
|
|
3
|
+
token: string | null;
|
|
4
|
+
setToken: (token: string | null) => void;
|
|
5
|
+
shopDomain: string;
|
|
6
|
+
setShopDomain: (domain: string) => void;
|
|
7
|
+
shopId: string;
|
|
8
|
+
setShopId: (id: string) => void;
|
|
9
|
+
shopPassword: string;
|
|
10
|
+
setShopPassword: (password: string) => void;
|
|
11
|
+
shopGeneral: ShopInfo | null;
|
|
12
|
+
setShopGeneral: (general: ShopInfo | null) => void;
|
|
13
|
+
shopTerms: ShopTerms | null;
|
|
14
|
+
setShopTerms: (terms: ShopTerms | null) => void;
|
|
15
|
+
shopPrivacyPolicy: ShopPrivacyPolicy | null;
|
|
16
|
+
setShopPrivacyPolicy: (policy: ShopPrivacyPolicy | null) => void;
|
|
17
|
+
shopRefundPolicy: ShopRefundPolicy | null;
|
|
18
|
+
setShopRefundPolicy: (policy: ShopRefundPolicy | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useStorefrontStore: import("zustand").UseBoundStore<import("zustand").StoreApi<StorefrontOptions>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SubscriptionFullItem } from '@storefront/models';
|
|
2
|
+
interface Options {
|
|
3
|
+
subscription: SubscriptionFullItem | null;
|
|
4
|
+
setSubscription: (subscription: SubscriptionFullItem | null) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useSubscriptionStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ClassName = string | undefined | false | null;
|
|
2
|
+
interface PriceSchema {
|
|
3
|
+
amount: number;
|
|
4
|
+
currency?: string;
|
|
5
|
+
quantity?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const ccn: (...classNames: ClassName[]) => string;
|
|
8
|
+
export declare const convertCfImageIdToUrl: (cfImageId: string, imageWidth?: string) => string;
|
|
9
|
+
export declare const formatPrice: (price: PriceSchema) => string;
|
|
10
|
+
export declare const percentageDifference: (oldValue: number, newValue: number) => number;
|
|
11
|
+
export declare const normalizeInterval: (recurringIntervalDays: number) => string;
|
|
12
|
+
export declare const formatTimestamp: (timestamp: number | string) => string;
|
|
13
|
+
export declare const extractDateAndTime: (isoTime: string) => string[];
|
|
14
|
+
export declare const fromLocalStorage: <T>(key: string) => T | null;
|
|
15
|
+
export declare const toLocalStorage: (key: string, value: unknown) => void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReCAPTCHA from 'react-google-recaptcha';
|
|
3
|
+
export declare const SITE_KEY = "6LdQiIIpAAAAAAkhvhS9zuo5WNS5mAzZrALD9cCa";
|
|
4
|
+
type ReCaptchaContextType = {
|
|
5
|
+
recaptchaRef: React.RefObject<ReCAPTCHA>;
|
|
6
|
+
executeRecaptcha: () => Promise<string | null>;
|
|
7
|
+
};
|
|
8
|
+
export declare const ReCaptchaProvider: React.FC<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const useReCaptcha: () => ReCaptchaContextType;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Size = 's' | 'm' | 'l';
|
|
2
|
-
export type TypeButton = 'Primary' | 'Secondary' | 'Tertiary';
|
|
2
|
+
export type TypeButton = 'Primary' | 'Secondary' | 'Tertiary' | 'Special';
|
|
3
3
|
interface Props {
|
|
4
4
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
style?: React.CSSProperties;
|
package/dist/ui/Input/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ModalOption } from './popup';
|
|
3
3
|
import { Other } from '../OtherSettings';
|
|
4
|
-
import { AspectRatio } from '@constants';
|
|
4
|
+
import { AspectRatio } from '@builder/constants';
|
|
5
5
|
export interface ItemBase {
|
|
6
6
|
images: string[];
|
|
7
7
|
name: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Option {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface RadioGroupProps {
|
|
7
|
+
label?: string;
|
|
8
|
+
defaultValue: string;
|
|
9
|
+
options: Option[];
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
flexDirection?: 'row' | 'column';
|
|
12
|
+
}
|
|
13
|
+
export declare const Radio: React.FC<RadioGroupProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
style?: React.CSSProperties;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
value: string;
|
|
7
|
+
options: string[];
|
|
8
|
+
switcher?: {
|
|
9
|
+
value: boolean;
|
|
10
|
+
onChange: (value: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
isSearch?: boolean;
|
|
13
|
+
postfixs?: string[];
|
|
14
|
+
leftAddonOptions?: {
|
|
15
|
+
value: string;
|
|
16
|
+
addon: React.ReactNode;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
export declare const Select: React.FC<Props>;
|
|
20
|
+
export {};
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -18,8 +18,11 @@ export * from './Link';
|
|
|
18
18
|
export * from './ProductCardButtons';
|
|
19
19
|
export * from './MetaInfoPost';
|
|
20
20
|
export * from './ProductCardModal';
|
|
21
|
+
export * from './Loader';
|
|
21
22
|
export * from '../builder/ui';
|
|
22
23
|
export { Input as InputSettings } from '../builder/ui/Input';
|
|
23
24
|
export { Input as InputUI } from './Input';
|
|
24
25
|
export { Textarea as TextareaSettings } from '../builder/ui/Textarea';
|
|
25
26
|
export { Textarea as TextareaUI } from './Textarea';
|
|
27
|
+
export { Select as SelectUI } from './Select';
|
|
28
|
+
export { Radio as RadioUI } from './Radio';
|