@anker-in/campaign-ui 0.2.10-beta.11 → 0.2.10-beta.12
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/cjs/components/chat/chatContext.js +2 -0
- package/dist/cjs/components/chat/chatContext.js.map +7 -0
- package/dist/cjs/components/chat/suggestions.d.ts +1 -1
- package/dist/cjs/components/credits/context/hooks/useActivities.d.ts +1 -1
- package/dist/cjs/components/credits/context/hooks/useActivities.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useActivities.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useAddressValidate.d.ts +3 -6
- package/dist/cjs/components/credits/context/hooks/useAddressValidate.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useAddressValidate.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useCountries.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useCountries.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useMyRewards.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useMyRewards.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.d.ts +2 -2
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemableList.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemableList.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSubscribed.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscribed.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +3 -3
- package/dist/cjs/components/credits/context/response.d.ts +1 -1
- package/dist/cjs/components/credits/creditsBanner/index.js +2 -0
- package/dist/cjs/components/credits/creditsBanner/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.js +2 -0
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsBenefits/iconInfo.js +2 -0
- package/dist/cjs/components/credits/creditsBenefits/iconInfo.js.map +7 -0
- package/dist/cjs/components/credits/creditsBenefits/index.js +4 -0
- package/dist/cjs/components/credits/creditsBenefits/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.js +2 -0
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/index.js +2 -0
- package/dist/cjs/components/credits/creditsCash/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/type.d.ts +1 -1
- package/dist/cjs/components/credits/creditsCash/type.js +2 -0
- package/dist/cjs/components/credits/creditsCash/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js +2 -0
- package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsFaq/index.js +2 -0
- package/dist/cjs/components/credits/creditsFaq/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsInfoCard/index.js +2 -0
- package/dist/cjs/components/credits/creditsInfoCard/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.d.ts +26 -1
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +26 -2
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal.d.ts +62 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/index.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/type.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.d.ts +18 -2
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.d.ts +1 -1
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js.map +7 -0
- package/dist/cjs/components/credits/index.d.ts +9 -9
- package/dist/cjs/components/credits/modal/activitiesModal.d.ts +1 -1
- package/dist/cjs/components/credits/modal/loadingDots.js +1 -1
- package/dist/cjs/components/credits/modal/loadingDots.js.map +2 -2
- package/dist/cjs/components/credits/type.d.ts +1 -11
- package/dist/cjs/components/credits/type.js +1 -1
- package/dist/cjs/components/credits/type.js.map +1 -1
- package/dist/cjs/components/index.d.ts +3 -3
- package/dist/cjs/helpers/ssr-safe.d.ts +33 -0
- package/dist/cjs/index.css +387 -1
- package/dist/cjs/index.css.map +1 -1
- package/dist/cjs/index.d.ts +7 -2
- package/dist/cjs/index.js +1 -705
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/shopify/context/ShopifyProvider.d.ts +1 -1
- package/dist/cjs/shopify/context/index.d.ts +1 -1
- package/dist/cjs/shopify/fetchers/create-cart.d.ts +2 -1
- package/dist/cjs/shopify/hooks/index.d.ts +2 -2
- package/dist/cjs/shopify/hooks/useProductsByHandles.d.ts +1 -1
- package/dist/cjs/shopify/types/index.d.ts +0 -2
- package/dist/cjs/stories/chat.stories.d.ts +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/components/chat/button.d.ts +1 -1
- package/dist/esm/components/chat/suggestions.d.ts +1 -1
- package/dist/esm/components/credits/context/hooks/useActivities.d.ts +1 -1
- package/dist/esm/components/credits/context/hooks/useAddressValidate.d.ts +3 -6
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.d.ts +2 -2
- package/dist/esm/components/credits/context/response.d.ts +1 -1
- package/dist/esm/components/credits/creditsCash/type.d.ts +1 -1
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.d.ts +26 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +26 -2
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal.d.ts +62 -0
- package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.d.ts +21 -21
- package/dist/esm/components/credits/index.d.ts +9 -9
- package/dist/esm/components/credits/modal/activitiesModal.d.ts +1 -1
- package/dist/esm/components/credits/modal/rulesModal.d.ts +1 -1
- package/dist/esm/components/credits/type.d.ts +1 -11
- package/dist/esm/helpers/index.d.ts +2 -2
- package/dist/esm/helpers/ssr-safe.d.ts +33 -0
- package/dist/esm/index.css +387 -1
- package/dist/esm/index.css.map +1 -1
- package/dist/esm/index.d.ts +7 -2
- package/dist/esm/index.js +1 -705
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/shopify/context/ShopifyProvider.d.ts +1 -1
- package/dist/esm/shopify/context/index.d.ts +1 -1
- package/dist/esm/shopify/fetchers/create-cart.d.ts +2 -1
- package/dist/esm/shopify/hooks/index.d.ts +2 -2
- package/dist/esm/shopify/hooks/useProductsByHandles.d.ts +1 -1
- package/dist/esm/shopify/types/index.d.ts +0 -2
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -14,14 +14,11 @@ export type FormData = {
|
|
|
14
14
|
placeholder: string;
|
|
15
15
|
type?: string;
|
|
16
16
|
}[];
|
|
17
|
-
export declare const useAddressValidate: ({ address, validatorInfo, formData,
|
|
17
|
+
export declare const useAddressValidate: ({ address, validatorInfo, formData, copy, }: {
|
|
18
18
|
address: Record<string, any>;
|
|
19
19
|
validatorInfo: any;
|
|
20
|
-
formData:
|
|
21
|
-
|
|
22
|
-
require: string;
|
|
23
|
-
email: string;
|
|
24
|
-
};
|
|
20
|
+
formData: FormData;
|
|
21
|
+
copy?: any;
|
|
25
22
|
}) => {
|
|
26
23
|
validate: ({ force, ignoreKeys }: {
|
|
27
24
|
force?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ProductVariant } from '
|
|
1
|
+
import type { ProductVariant } from '../../../../shopify/types/product';
|
|
2
2
|
export declare const useRedeemAndBuy: () => import("swr/mutation").SWRMutationResponse<{
|
|
3
3
|
success: boolean;
|
|
4
|
-
url:
|
|
4
|
+
url: any;
|
|
5
5
|
error?: undefined;
|
|
6
6
|
} | {
|
|
7
7
|
success: boolean;
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FormData } from '../RedeemProductModal';
|
|
2
|
+
type ShippingCountry = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
code: string;
|
|
6
|
+
provinces: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
code: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
interface AddressFormProps {
|
|
13
|
+
form: FormData;
|
|
14
|
+
onChange: (address: any) => void;
|
|
15
|
+
validate: (args: {
|
|
16
|
+
force?: boolean;
|
|
17
|
+
ignoreKeys?: string[];
|
|
18
|
+
}) => boolean;
|
|
19
|
+
errors: {
|
|
20
|
+
key: string;
|
|
21
|
+
message: string;
|
|
22
|
+
}[];
|
|
23
|
+
countries: ShippingCountry[];
|
|
24
|
+
countriesLoading: boolean;
|
|
25
|
+
}
|
|
2
26
|
export declare const AddressForm: ({ countries, countriesLoading, form, validate, errors, onChange }: AddressFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export {};
|
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
import type { ModalContainerProps } from '../modal/modalContainer';
|
|
2
2
|
import type { RedeemableItem as RedeemableItemType } from '../type';
|
|
3
|
-
|
|
3
|
+
export type RedeemCouponModalCopy = {
|
|
4
|
+
ruleLabel: string;
|
|
5
|
+
pointUnit: string;
|
|
6
|
+
commonError: string;
|
|
7
|
+
redeemLimitError: string;
|
|
8
|
+
inventoryNotEnough: string;
|
|
9
|
+
creditsNotEnough: string;
|
|
10
|
+
crossSiteError: string;
|
|
11
|
+
copied: string;
|
|
12
|
+
off: string;
|
|
13
|
+
copy: string;
|
|
14
|
+
coupon: {
|
|
15
|
+
successTitle: string;
|
|
16
|
+
successDesc: string;
|
|
17
|
+
successButton: string;
|
|
18
|
+
successButtonUrl: string;
|
|
19
|
+
};
|
|
20
|
+
confirmTitle: string;
|
|
21
|
+
confirmButton: string;
|
|
22
|
+
imageMapping: {
|
|
23
|
+
coupon: {
|
|
24
|
+
url: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
4
28
|
declare function RedeemCouponModal({ item, copy, onError, ...props }: ModalContainerProps & {
|
|
5
29
|
item: RedeemableItemType;
|
|
6
|
-
copy:
|
|
30
|
+
copy: RedeemCouponModalCopy;
|
|
7
31
|
onError: (code: number) => void;
|
|
8
32
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
33
|
export default RedeemCouponModal;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AlpcErrorCode } from '../context/const';
|
|
2
|
+
import type { ModalContainerProps } from '../modal/modalContainer';
|
|
3
|
+
import type { RedeemableItem as RedeemableItemType } from '../type';
|
|
4
|
+
export type FormData = {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
tips: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
}[];
|
|
12
|
+
export type RedeemProductModalCopy = {
|
|
13
|
+
confirmTitle: string;
|
|
14
|
+
confirmButton: string;
|
|
15
|
+
off: string;
|
|
16
|
+
giftCardLabel: string;
|
|
17
|
+
pointUnit: string;
|
|
18
|
+
imageMapping: Record<string, {
|
|
19
|
+
url: string;
|
|
20
|
+
}>;
|
|
21
|
+
validatorInfo: {
|
|
22
|
+
addressInfo: {
|
|
23
|
+
name: string;
|
|
24
|
+
country: string;
|
|
25
|
+
province: string;
|
|
26
|
+
city: string;
|
|
27
|
+
address: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
shippingAddress: string;
|
|
31
|
+
shippingProduct: string;
|
|
32
|
+
product: {
|
|
33
|
+
addressForm: FormData;
|
|
34
|
+
form: FormData;
|
|
35
|
+
successDesc: string[];
|
|
36
|
+
rules: string[];
|
|
37
|
+
steps: {
|
|
38
|
+
imageUrl: string;
|
|
39
|
+
title: string;
|
|
40
|
+
}[];
|
|
41
|
+
quantityLabel: string;
|
|
42
|
+
totalPriceLabel: string;
|
|
43
|
+
variantLabel: string;
|
|
44
|
+
shippingFeeLabel: string;
|
|
45
|
+
paymentButton: string;
|
|
46
|
+
stepTitle: string;
|
|
47
|
+
};
|
|
48
|
+
errorImageUrl: string;
|
|
49
|
+
commonError: string;
|
|
50
|
+
redeemLimitError: string;
|
|
51
|
+
inventoryNotEnough: string;
|
|
52
|
+
inventoryNotEnoughImageUrl: string;
|
|
53
|
+
creditsNotEnough: string;
|
|
54
|
+
crossSiteError: string;
|
|
55
|
+
};
|
|
56
|
+
type RedeemProductModalProps = ModalContainerProps & {
|
|
57
|
+
item: RedeemableItemType;
|
|
58
|
+
copy: RedeemProductModalCopy;
|
|
59
|
+
onError: (code: AlpcErrorCode) => void;
|
|
60
|
+
};
|
|
61
|
+
declare function RedeemProductModal({ item, copy, onError, ...props }: RedeemProductModalProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export default RedeemProductModal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreditsWaysToGetCreditsProps } from '
|
|
1
|
+
import type { CreditsWaysToGetCreditsProps } from '.';
|
|
2
2
|
export declare const useActions: ({ copy, subscribe, uploadReceipt, activate, gaParameters, }: CreditsWaysToGetCreditsProps & {
|
|
3
3
|
gaParameters?: {
|
|
4
4
|
position: string;
|
|
@@ -8,88 +8,88 @@ export declare const useActions: ({ copy, subscribe, uploadReceipt, activate, ga
|
|
|
8
8
|
activate: {
|
|
9
9
|
finished: any;
|
|
10
10
|
notLogin: {
|
|
11
|
-
buttonLabel:
|
|
11
|
+
buttonLabel: any;
|
|
12
12
|
handleClick: () => void;
|
|
13
13
|
};
|
|
14
14
|
notFinished: {
|
|
15
|
-
buttonLabel:
|
|
15
|
+
buttonLabel: any;
|
|
16
16
|
handleClick: () => void;
|
|
17
17
|
};
|
|
18
18
|
completed: {
|
|
19
|
-
buttonLabel:
|
|
19
|
+
buttonLabel: any;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
subscribe: {
|
|
23
23
|
finished: boolean;
|
|
24
24
|
notLogin: {
|
|
25
|
-
buttonLabel:
|
|
25
|
+
buttonLabel: any;
|
|
26
26
|
handleClick: () => void;
|
|
27
27
|
};
|
|
28
28
|
notFinished: {
|
|
29
|
-
buttonLabel:
|
|
29
|
+
buttonLabel: any;
|
|
30
30
|
handleClick: () => void;
|
|
31
31
|
};
|
|
32
32
|
completed: {
|
|
33
|
-
buttonLabel:
|
|
33
|
+
buttonLabel: any;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
completeProfile: {
|
|
37
37
|
finished: any;
|
|
38
38
|
notLogin: {
|
|
39
|
-
buttonLabel:
|
|
39
|
+
buttonLabel: any;
|
|
40
40
|
handleClick: () => void;
|
|
41
41
|
};
|
|
42
42
|
notFinished: {
|
|
43
|
-
buttonLabel:
|
|
43
|
+
buttonLabel: any;
|
|
44
44
|
link: string;
|
|
45
45
|
handleClick: () => void;
|
|
46
46
|
};
|
|
47
47
|
completed: {
|
|
48
|
-
buttonLabel:
|
|
48
|
+
buttonLabel: any;
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
firstPurchase: {
|
|
52
52
|
finished: boolean;
|
|
53
53
|
notLogin: {
|
|
54
|
-
buttonLabel:
|
|
54
|
+
buttonLabel: any;
|
|
55
55
|
handleClick: () => void;
|
|
56
56
|
};
|
|
57
57
|
notFinished: {
|
|
58
|
-
buttonLabel:
|
|
59
|
-
link:
|
|
58
|
+
buttonLabel: any;
|
|
59
|
+
link: any;
|
|
60
60
|
handleClick: () => void;
|
|
61
61
|
};
|
|
62
62
|
completed: {
|
|
63
|
-
buttonLabel:
|
|
63
|
+
buttonLabel: any;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
uploadReceipt: {
|
|
67
67
|
finished: boolean;
|
|
68
68
|
notLogin: {
|
|
69
|
-
buttonLabel:
|
|
69
|
+
buttonLabel: any;
|
|
70
70
|
handleClick: () => void;
|
|
71
71
|
};
|
|
72
72
|
notFinished: {
|
|
73
|
-
buttonLabel:
|
|
73
|
+
buttonLabel: any;
|
|
74
74
|
handleClick: () => void;
|
|
75
75
|
};
|
|
76
76
|
completed: {
|
|
77
|
-
buttonLabel:
|
|
77
|
+
buttonLabel: any;
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
shop: {
|
|
81
81
|
finished: boolean;
|
|
82
82
|
notLogin: {
|
|
83
|
-
buttonLabel:
|
|
83
|
+
buttonLabel: any;
|
|
84
84
|
handleClick: () => void;
|
|
85
85
|
};
|
|
86
86
|
notFinished: {
|
|
87
|
-
buttonLabel:
|
|
88
|
-
link:
|
|
87
|
+
buttonLabel: any;
|
|
88
|
+
link: any;
|
|
89
89
|
handleClick: () => void;
|
|
90
90
|
};
|
|
91
91
|
completed: {
|
|
92
|
-
buttonLabel:
|
|
92
|
+
buttonLabel: any;
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { CreditsProvider, useCreditsContext } from './context/provider';
|
|
2
|
-
export { useUploadReceipt as useCreditsUploadReceipt } from './context/hooks/useUploadReceipt';
|
|
3
|
-
export { CreditsUploadReceiptModal } from './modal/creditsUploadReceiptModal';
|
|
4
|
-
export { CreditsBanner } from './creditsBanner';
|
|
5
|
-
export { CreditsBenefits } from './creditsBenefits';
|
|
6
|
-
export { CreditsInfoCard } from './creditsInfoCard';
|
|
7
|
-
export { CreditsWaysToGetCredits } from './creditsWaysToGetCredits';
|
|
8
|
-
export { CreditsFaq } from './creditsFaq';
|
|
1
|
+
export { CreditsProvider, useCreditsContext } from './context/provider.js';
|
|
2
|
+
export { useUploadReceipt as useCreditsUploadReceipt } from './context/hooks/useUploadReceipt.js';
|
|
3
|
+
export { CreditsUploadReceiptModal } from './modal/creditsUploadReceiptModal.js';
|
|
4
|
+
export { CreditsBanner } from './creditsBanner/index.js';
|
|
5
|
+
export { CreditsBenefits } from './creditsBenefits/index.js';
|
|
6
|
+
export { CreditsInfoCard } from './creditsInfoCard/index.js';
|
|
7
|
+
export { CreditsWaysToGetCredits } from './creditsWaysToGetCredits/index.js';
|
|
8
|
+
export { CreditsFaq } from './creditsFaq/index.js';
|
|
9
9
|
export { CreditsCash } from './creditsCash';
|
|
10
|
-
export { CreditsRedeemList } from './creditsRedeemList';
|
|
10
|
+
export { CreditsRedeemList } from './creditsRedeemList/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Product, ProductVariant } from '
|
|
1
|
+
import type { Product, ProductVariant } from '../../shopify/types/product';
|
|
2
2
|
import type { AlpcConsumeType, ConsumeType } from './context/const';
|
|
3
3
|
export interface Subscription {
|
|
4
4
|
preference: {
|
|
@@ -43,13 +43,3 @@ export interface ShippingZone {
|
|
|
43
43
|
name: string;
|
|
44
44
|
countries: ShippingCountry[];
|
|
45
45
|
}
|
|
46
|
-
export type CreditsPageCommon = {
|
|
47
|
-
pointUnit: string;
|
|
48
|
-
ruleLabel: string;
|
|
49
|
-
soldOut: string;
|
|
50
|
-
imageMapping: {
|
|
51
|
-
[key in ConsumeType]: {
|
|
52
|
-
url: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { cn } from './utils';
|
|
2
|
-
export { noop } from './utils';
|
|
1
|
+
export { cn } from './utils.js';
|
|
2
|
+
export { noop } from './utils.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SSR 安全工具函数
|
|
4
|
+
* 确保组件在服务端和客户端都能正常工作
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 检查是否在浏览器环境
|
|
8
|
+
*/
|
|
9
|
+
export declare const isBrowser: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 检查是否在服务端环境
|
|
12
|
+
*/
|
|
13
|
+
export declare const isServer: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 安全获取 window 对象
|
|
16
|
+
*/
|
|
17
|
+
export declare const safeWindow: Window;
|
|
18
|
+
/**
|
|
19
|
+
* 安全获取 document 对象
|
|
20
|
+
*/
|
|
21
|
+
export declare const safeDocument: Document;
|
|
22
|
+
/**
|
|
23
|
+
* 安全执行浏览器 API
|
|
24
|
+
*/
|
|
25
|
+
export declare const safeExecute: <T>(fn: () => T, fallback?: T) => T | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* 客户端渲染检查 Hook
|
|
28
|
+
*/
|
|
29
|
+
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
30
|
+
/**
|
|
31
|
+
* 延迟执行(仅在客户端)
|
|
32
|
+
*/
|
|
33
|
+
export declare const useClientOnly: () => boolean;
|