@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.
Files changed (147) hide show
  1. package/dist/cjs/components/chat/chatContext.js +2 -0
  2. package/dist/cjs/components/chat/chatContext.js.map +7 -0
  3. package/dist/cjs/components/chat/suggestions.d.ts +1 -1
  4. package/dist/cjs/components/credits/context/hooks/useActivities.d.ts +1 -1
  5. package/dist/cjs/components/credits/context/hooks/useActivities.js +1 -1
  6. package/dist/cjs/components/credits/context/hooks/useActivities.js.map +3 -3
  7. package/dist/cjs/components/credits/context/hooks/useAddressValidate.d.ts +3 -6
  8. package/dist/cjs/components/credits/context/hooks/useAddressValidate.js +1 -1
  9. package/dist/cjs/components/credits/context/hooks/useAddressValidate.js.map +3 -3
  10. package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js +1 -1
  11. package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js.map +3 -3
  12. package/dist/cjs/components/credits/context/hooks/useCountries.js +1 -1
  13. package/dist/cjs/components/credits/context/hooks/useCountries.js.map +3 -3
  14. package/dist/cjs/components/credits/context/hooks/useMyRewards.js +1 -1
  15. package/dist/cjs/components/credits/context/hooks/useMyRewards.js.map +3 -3
  16. package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.d.ts +2 -2
  17. package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js +1 -1
  18. package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js.map +3 -3
  19. package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js +1 -1
  20. package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js.map +3 -3
  21. package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js +1 -1
  22. package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js.map +3 -3
  23. package/dist/cjs/components/credits/context/hooks/useRedeemableList.js +1 -1
  24. package/dist/cjs/components/credits/context/hooks/useRedeemableList.js.map +3 -3
  25. package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js +1 -1
  26. package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js.map +3 -3
  27. package/dist/cjs/components/credits/context/hooks/useSubscribed.js +1 -1
  28. package/dist/cjs/components/credits/context/hooks/useSubscribed.js.map +3 -3
  29. package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +1 -1
  30. package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +3 -3
  31. package/dist/cjs/components/credits/context/response.d.ts +1 -1
  32. package/dist/cjs/components/credits/creditsBanner/index.js +2 -0
  33. package/dist/cjs/components/credits/creditsBanner/index.js.map +7 -0
  34. package/dist/cjs/components/credits/creditsBenefits/benefitItem.js +2 -0
  35. package/dist/cjs/components/credits/creditsBenefits/benefitItem.js.map +7 -0
  36. package/dist/cjs/components/credits/creditsBenefits/iconInfo.js +2 -0
  37. package/dist/cjs/components/credits/creditsBenefits/iconInfo.js.map +7 -0
  38. package/dist/cjs/components/credits/creditsBenefits/index.js +4 -0
  39. package/dist/cjs/components/credits/creditsBenefits/index.js.map +7 -0
  40. package/dist/cjs/components/credits/creditsCash/RedeemableItem.js +2 -0
  41. package/dist/cjs/components/credits/creditsCash/RedeemableItem.js.map +7 -0
  42. package/dist/cjs/components/credits/creditsCash/index.js +2 -0
  43. package/dist/cjs/components/credits/creditsCash/index.js.map +7 -0
  44. package/dist/cjs/components/credits/creditsCash/type.d.ts +1 -1
  45. package/dist/cjs/components/credits/creditsCash/type.js +2 -0
  46. package/dist/cjs/components/credits/creditsCash/type.js.map +7 -0
  47. package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js +2 -0
  48. package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js.map +7 -0
  49. package/dist/cjs/components/credits/creditsFaq/index.js +2 -0
  50. package/dist/cjs/components/credits/creditsFaq/index.js.map +7 -0
  51. package/dist/cjs/components/credits/creditsInfoCard/index.js +2 -0
  52. package/dist/cjs/components/credits/creditsInfoCard/index.js.map +7 -0
  53. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js +2 -0
  54. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +7 -0
  55. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.js +2 -0
  56. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.js.map +7 -0
  57. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.js +2 -0
  58. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.js.map +7 -0
  59. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js +2 -0
  60. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +7 -0
  61. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.d.ts +26 -1
  62. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js +2 -0
  63. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js.map +7 -0
  64. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.js +2 -0
  65. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.js.map +7 -0
  66. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +26 -2
  67. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +2 -0
  68. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +7 -0
  69. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js +2 -0
  70. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +7 -0
  71. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js +2 -0
  72. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js.map +7 -0
  73. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js +2 -0
  74. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +7 -0
  75. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +2 -0
  76. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +7 -0
  77. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js +2 -0
  78. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +7 -0
  79. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js +2 -0
  80. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +7 -0
  81. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal.d.ts +62 -0
  82. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js +2 -0
  83. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js.map +7 -0
  84. package/dist/cjs/components/credits/creditsRedeemList/index.js +2 -0
  85. package/dist/cjs/components/credits/creditsRedeemList/index.js.map +7 -0
  86. package/dist/cjs/components/credits/creditsRedeemList/type.js +2 -0
  87. package/dist/cjs/components/credits/creditsRedeemList/type.js.map +7 -0
  88. package/dist/cjs/components/credits/creditsWaysToGetCredits/index.d.ts +18 -2
  89. package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js +2 -0
  90. package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js.map +7 -0
  91. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js +2 -0
  92. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js.map +7 -0
  93. package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.d.ts +1 -1
  94. package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js +2 -0
  95. package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js.map +7 -0
  96. package/dist/cjs/components/credits/index.d.ts +9 -9
  97. package/dist/cjs/components/credits/modal/activitiesModal.d.ts +1 -1
  98. package/dist/cjs/components/credits/modal/loadingDots.js +1 -1
  99. package/dist/cjs/components/credits/modal/loadingDots.js.map +2 -2
  100. package/dist/cjs/components/credits/type.d.ts +1 -11
  101. package/dist/cjs/components/credits/type.js +1 -1
  102. package/dist/cjs/components/credits/type.js.map +1 -1
  103. package/dist/cjs/components/index.d.ts +3 -3
  104. package/dist/cjs/helpers/ssr-safe.d.ts +33 -0
  105. package/dist/cjs/index.css +387 -1
  106. package/dist/cjs/index.css.map +1 -1
  107. package/dist/cjs/index.d.ts +7 -2
  108. package/dist/cjs/index.js +1 -705
  109. package/dist/cjs/index.js.map +4 -4
  110. package/dist/cjs/shopify/context/ShopifyProvider.d.ts +1 -1
  111. package/dist/cjs/shopify/context/index.d.ts +1 -1
  112. package/dist/cjs/shopify/fetchers/create-cart.d.ts +2 -1
  113. package/dist/cjs/shopify/hooks/index.d.ts +2 -2
  114. package/dist/cjs/shopify/hooks/useProductsByHandles.d.ts +1 -1
  115. package/dist/cjs/shopify/types/index.d.ts +0 -2
  116. package/dist/cjs/stories/chat.stories.d.ts +1 -1
  117. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  118. package/dist/esm/components/chat/button.d.ts +1 -1
  119. package/dist/esm/components/chat/suggestions.d.ts +1 -1
  120. package/dist/esm/components/credits/context/hooks/useActivities.d.ts +1 -1
  121. package/dist/esm/components/credits/context/hooks/useAddressValidate.d.ts +3 -6
  122. package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.d.ts +2 -2
  123. package/dist/esm/components/credits/context/response.d.ts +1 -1
  124. package/dist/esm/components/credits/creditsCash/type.d.ts +1 -1
  125. package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.d.ts +26 -1
  126. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +26 -2
  127. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal.d.ts +62 -0
  128. package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.d.ts +21 -21
  129. package/dist/esm/components/credits/index.d.ts +9 -9
  130. package/dist/esm/components/credits/modal/activitiesModal.d.ts +1 -1
  131. package/dist/esm/components/credits/modal/rulesModal.d.ts +1 -1
  132. package/dist/esm/components/credits/type.d.ts +1 -11
  133. package/dist/esm/helpers/index.d.ts +2 -2
  134. package/dist/esm/helpers/ssr-safe.d.ts +33 -0
  135. package/dist/esm/index.css +387 -1
  136. package/dist/esm/index.css.map +1 -1
  137. package/dist/esm/index.d.ts +7 -2
  138. package/dist/esm/index.js +1 -705
  139. package/dist/esm/index.js.map +4 -4
  140. package/dist/esm/shopify/context/ShopifyProvider.d.ts +1 -1
  141. package/dist/esm/shopify/context/index.d.ts +1 -1
  142. package/dist/esm/shopify/fetchers/create-cart.d.ts +2 -1
  143. package/dist/esm/shopify/hooks/index.d.ts +2 -2
  144. package/dist/esm/shopify/hooks/useProductsByHandles.d.ts +1 -1
  145. package/dist/esm/shopify/types/index.d.ts +0 -2
  146. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- import type { ButtonProps } from './props';
1
+ import type { ButtonProps } from './props.js';
2
2
  declare const DefaultButton: ({ setOpen }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default DefaultButton;
@@ -1,3 +1,3 @@
1
- import type { ChatSuggestions } from './props';
1
+ import type { ChatSuggestions } from './props.js';
2
2
  declare const Suggestions: ({ currentSuggestions }: ChatSuggestions) => false | import("react/jsx-runtime").JSX.Element;
3
3
  export default Suggestions;
@@ -1,4 +1,4 @@
1
- import type { CreditLogResponse } from '../response';
1
+ import type { CreditLogResponse } from '../response.js';
2
2
  declare function useActivities({ page, pageSize, options }: {
3
3
  page: number;
4
4
  pageSize: number;
@@ -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, errorLabel, }: {
17
+ export declare const useAddressValidate: ({ address, validatorInfo, formData, copy, }: {
18
18
  address: Record<string, any>;
19
19
  validatorInfo: any;
20
- formData: any;
21
- errorLabel: {
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 '@anker-in/shopify';
1
+ import type { ProductVariant } from '../../../../shopify/types/product';
2
2
  export declare const useRedeemAndBuy: () => import("swr/mutation").SWRMutationResponse<{
3
3
  success: boolean;
4
- url: string;
4
+ url: any;
5
5
  error?: undefined;
6
6
  } | {
7
7
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { ApprovalStatus, AlpcConsumeType, CreditType, TaskSubType, TaskType } from './const';
1
+ import { ApprovalStatus, AlpcConsumeType, CreditType, TaskSubType, TaskType } from './const.js';
2
2
  interface BaseResponse {
3
3
  brand: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { ProductVariant, Product } from '@anker-in/shopify';
1
+ import { ProductVariant, Product } from 'src/shopify/types';
2
2
  import { AlpcConsumeType } from '../context/const';
3
3
  type RedeemableItemConfig = {
4
4
  title: string;
@@ -1,2 +1,27 @@
1
- import { AddressFormProps } from './type';
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
- import { CreditsRedeemListCopy } from './type';
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: CreditsRedeemListCopy;
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 './type';
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: string;
11
+ buttonLabel: any;
12
12
  handleClick: () => void;
13
13
  };
14
14
  notFinished: {
15
- buttonLabel: string;
15
+ buttonLabel: any;
16
16
  handleClick: () => void;
17
17
  };
18
18
  completed: {
19
- buttonLabel: string;
19
+ buttonLabel: any;
20
20
  };
21
21
  };
22
22
  subscribe: {
23
23
  finished: boolean;
24
24
  notLogin: {
25
- buttonLabel: string;
25
+ buttonLabel: any;
26
26
  handleClick: () => void;
27
27
  };
28
28
  notFinished: {
29
- buttonLabel: string;
29
+ buttonLabel: any;
30
30
  handleClick: () => void;
31
31
  };
32
32
  completed: {
33
- buttonLabel: string;
33
+ buttonLabel: any;
34
34
  };
35
35
  };
36
36
  completeProfile: {
37
37
  finished: any;
38
38
  notLogin: {
39
- buttonLabel: string;
39
+ buttonLabel: any;
40
40
  handleClick: () => void;
41
41
  };
42
42
  notFinished: {
43
- buttonLabel: string;
43
+ buttonLabel: any;
44
44
  link: string;
45
45
  handleClick: () => void;
46
46
  };
47
47
  completed: {
48
- buttonLabel: string;
48
+ buttonLabel: any;
49
49
  };
50
50
  };
51
51
  firstPurchase: {
52
52
  finished: boolean;
53
53
  notLogin: {
54
- buttonLabel: string;
54
+ buttonLabel: any;
55
55
  handleClick: () => void;
56
56
  };
57
57
  notFinished: {
58
- buttonLabel: string;
59
- link: string;
58
+ buttonLabel: any;
59
+ link: any;
60
60
  handleClick: () => void;
61
61
  };
62
62
  completed: {
63
- buttonLabel: string;
63
+ buttonLabel: any;
64
64
  };
65
65
  };
66
66
  uploadReceipt: {
67
67
  finished: boolean;
68
68
  notLogin: {
69
- buttonLabel: string;
69
+ buttonLabel: any;
70
70
  handleClick: () => void;
71
71
  };
72
72
  notFinished: {
73
- buttonLabel: string;
73
+ buttonLabel: any;
74
74
  handleClick: () => void;
75
75
  };
76
76
  completed: {
77
- buttonLabel: string;
77
+ buttonLabel: any;
78
78
  };
79
79
  };
80
80
  shop: {
81
81
  finished: boolean;
82
82
  notLogin: {
83
- buttonLabel: string;
83
+ buttonLabel: any;
84
84
  handleClick: () => void;
85
85
  };
86
86
  notFinished: {
87
- buttonLabel: string;
88
- link: string;
87
+ buttonLabel: any;
88
+ link: any;
89
89
  handleClick: () => void;
90
90
  };
91
91
  completed: {
92
- buttonLabel: string;
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 ModalContainerProps } from './modalContainer';
1
+ import { type ModalContainerProps } from './modalContainer.js';
2
2
  export interface MyActivitiesMetafields {
3
3
  title: string;
4
4
  tips: string;
@@ -1,4 +1,4 @@
1
- import { type ModalContainerProps } from './modalContainer';
1
+ import { type ModalContainerProps } from './modalContainer.js';
2
2
  declare function RulesModal({ rules, className, ruleClassName, ...props }: {
3
3
  rules: string | string[];
4
4
  ruleClassName?: string;
@@ -1,4 +1,4 @@
1
- import type { Product, ProductVariant } from '@anker-in/shopify';
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;