@anker-in/headless-ui 1.0.26-alpha.1762857531976 → 1.0.26-alpha.1762914443262

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 (174) hide show
  1. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +1 -1
  2. package/dist/cjs/biz-components/AiuiProvider/index.js.map +1 -1
  3. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  4. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  5. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  6. package/dist/cjs/biz-components/CollectionShelves/index.d.ts +7 -0
  7. package/dist/cjs/biz-components/CollectionShelves/index.js +2 -0
  8. package/dist/cjs/biz-components/CollectionShelves/index.js.map +7 -0
  9. package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +7 -0
  10. package/dist/cjs/biz-components/CollectionsBanner/index.js +2 -0
  11. package/dist/cjs/biz-components/CollectionsBanner/index.js.map +7 -0
  12. package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +43 -0
  13. package/dist/cjs/biz-components/CollectionsBanner/types.js +2 -0
  14. package/dist/cjs/biz-components/CollectionsBanner/types.js.map +7 -0
  15. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
  16. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  17. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  18. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  19. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  20. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  21. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  22. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  23. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  24. package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  25. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +2 -0
  26. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  27. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  28. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  29. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  30. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  31. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  32. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  33. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  34. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  35. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  36. package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  37. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +2 -0
  38. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  39. package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  40. package/dist/cjs/biz-components/CollectionsFilters/component/price.js +2 -0
  41. package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +7 -0
  42. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  43. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  44. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  45. package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +24 -0
  46. package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
  47. package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
  48. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -3
  49. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  50. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  51. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.d.ts +10 -0
  52. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +2 -0
  53. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +7 -0
  54. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  55. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  56. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  57. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  58. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  59. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  60. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
  61. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +2 -2
  62. package/dist/cjs/biz-components/Paginator/index.d.ts +7 -0
  63. package/dist/cjs/biz-components/Paginator/index.js +7 -0
  64. package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
  65. package/dist/cjs/biz-components/TextMarquee/index.d.ts +10 -0
  66. package/dist/cjs/biz-components/TextMarquee/index.js +2 -0
  67. package/dist/cjs/biz-components/TextMarquee/index.js.map +7 -0
  68. package/dist/cjs/biz-components/Title/index.js +1 -1
  69. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  70. package/dist/cjs/biz-components/Title/types.d.ts +1 -0
  71. package/dist/cjs/biz-components/Title/types.js +1 -1
  72. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  73. package/dist/cjs/biz-components/index.d.ts +9 -0
  74. package/dist/cjs/biz-components/index.js +1 -1
  75. package/dist/cjs/biz-components/index.js.map +3 -3
  76. package/dist/cjs/components/breadcrumb.d.ts +12 -0
  77. package/dist/cjs/components/breadcrumb.js +2 -0
  78. package/dist/cjs/components/breadcrumb.js.map +7 -0
  79. package/dist/cjs/components/index.d.ts +1 -0
  80. package/dist/cjs/components/index.js +1 -1
  81. package/dist/cjs/components/index.js.map +3 -3
  82. package/dist/cjs/helpers/utils.d.ts +1 -0
  83. package/dist/cjs/helpers/utils.js +1 -1
  84. package/dist/cjs/helpers/utils.js.map +3 -3
  85. package/dist/cjs/hooks/useRollout.d.ts +2 -14
  86. package/dist/cjs/hooks/useRollout.js +1 -1
  87. package/dist/cjs/hooks/useRollout.js.map +3 -3
  88. package/dist/esm/biz-components/AiuiProvider/index.d.ts +1 -1
  89. package/dist/esm/biz-components/AiuiProvider/index.js.map +1 -1
  90. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  91. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  92. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  93. package/dist/esm/biz-components/CollectionShelves/index.d.ts +7 -0
  94. package/dist/esm/biz-components/CollectionShelves/index.js +2 -0
  95. package/dist/esm/biz-components/CollectionShelves/index.js.map +7 -0
  96. package/dist/esm/biz-components/CollectionsBanner/index.d.ts +7 -0
  97. package/dist/esm/biz-components/CollectionsBanner/index.js +2 -0
  98. package/dist/esm/biz-components/CollectionsBanner/index.js.map +7 -0
  99. package/dist/esm/biz-components/CollectionsBanner/types.d.ts +43 -0
  100. package/dist/esm/biz-components/CollectionsBanner/types.js +1 -0
  101. package/dist/esm/biz-components/CollectionsBanner/types.js.map +7 -0
  102. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
  103. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  104. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  105. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  106. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  107. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  108. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  109. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  110. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  111. package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  112. package/dist/esm/biz-components/CollectionsFilters/FilterList.js +2 -0
  113. package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  114. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  115. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  116. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  117. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  118. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  119. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  120. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  121. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  122. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  123. package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  124. package/dist/esm/biz-components/CollectionsFilters/component/helper.js +2 -0
  125. package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  126. package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  127. package/dist/esm/biz-components/CollectionsFilters/component/price.js +2 -0
  128. package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +7 -0
  129. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  130. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  131. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  132. package/dist/esm/biz-components/CollectionsFilters/index.d.ts +24 -0
  133. package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
  134. package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
  135. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -3
  136. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  137. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  138. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.d.ts +10 -0
  139. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +2 -0
  140. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +7 -0
  141. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  142. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  143. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  144. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  145. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  146. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  147. package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
  148. package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +2 -2
  149. package/dist/esm/biz-components/Paginator/index.d.ts +7 -0
  150. package/dist/esm/biz-components/Paginator/index.js +7 -0
  151. package/dist/esm/biz-components/Paginator/index.js.map +7 -0
  152. package/dist/esm/biz-components/TextMarquee/index.d.ts +10 -0
  153. package/dist/esm/biz-components/TextMarquee/index.js +2 -0
  154. package/dist/esm/biz-components/TextMarquee/index.js.map +7 -0
  155. package/dist/esm/biz-components/Title/index.js +1 -1
  156. package/dist/esm/biz-components/Title/index.js.map +3 -3
  157. package/dist/esm/biz-components/Title/types.d.ts +1 -0
  158. package/dist/esm/biz-components/index.d.ts +9 -0
  159. package/dist/esm/biz-components/index.js +1 -1
  160. package/dist/esm/biz-components/index.js.map +2 -2
  161. package/dist/esm/components/breadcrumb.d.ts +12 -0
  162. package/dist/esm/components/breadcrumb.js +2 -0
  163. package/dist/esm/components/breadcrumb.js.map +7 -0
  164. package/dist/esm/components/index.d.ts +1 -0
  165. package/dist/esm/components/index.js +1 -1
  166. package/dist/esm/components/index.js.map +2 -2
  167. package/dist/esm/helpers/utils.d.ts +1 -0
  168. package/dist/esm/helpers/utils.js +1 -1
  169. package/dist/esm/helpers/utils.js.map +3 -3
  170. package/dist/esm/hooks/useRollout.d.ts +2 -14
  171. package/dist/esm/hooks/useRollout.js +1 -1
  172. package/dist/esm/hooks/useRollout.js.map +3 -3
  173. package/package.json +1 -1
  174. package/style.css +23 -0
@@ -0,0 +1,215 @@
1
+ export declare enum RuleType {
2
+ AUTO_FREE_GIFT = 1,// 自动赠品
3
+ BUNDLE = 2,// 组合
4
+ VOLUME_DISCOUNT = 3,// 量价折扣
5
+ ORDER_DISCOUNT = 4,// 订单折扣
6
+ PRICE_DISCOUNT = 5
7
+ }
8
+ export type FunctionMemberPriceResult = {
9
+ hasMemberPrice: boolean;
10
+ useCoupon: boolean;
11
+ originalPrice: number;
12
+ originalPriceWithCurrency: string;
13
+ salePrice: number;
14
+ salePriceWithCurrency: string;
15
+ salePriceWithoutCoupon: number;
16
+ salePriceWithoutCouponWithCurrency: string;
17
+ savePrice: number;
18
+ savePriceWithCurrency: string;
19
+ savePriceWithoutCoupon: number;
20
+ savePriceWithoutCouponWithCurrency: string;
21
+ };
22
+ export declare enum ProductionsCombination {
23
+ SAME_PRODUCT = 0,// 相同产品
24
+ SAME_VARIANT = 1,// 相同变体
25
+ MIX_MATCH = 2
26
+ }
27
+ export declare enum DiscountOptions {
28
+ MINIMUM_QUANTITY = 1,
29
+ FIXED_QUANTITY = 2,
30
+ TIERED_QUANTITY = 3
31
+ }
32
+ export declare enum DISCOUNT_TYPE {
33
+ PERCENTAGE = 1,// 百分比
34
+ FIXED_AMOUNT = 2,// 固定金额
35
+ FIXED_PRICE = 3
36
+ }
37
+ export declare enum ROUND_SELECTED {
38
+ ROUND_HIGHEST = 1,// 向上取整
39
+ ROUND_LOWEST = 2,// 向下取整
40
+ ROUND_NEAREST = 3
41
+ }
42
+ export declare enum DISCOUNT_BASE_TYPE {
43
+ CURRENT_PRICE = 1,// 折后价
44
+ COMPARE_AT_PRICE = 2
45
+ }
46
+ export type TieredDiscount = {
47
+ quantity: number;
48
+ discount: number;
49
+ discount_type: DISCOUNT_TYPE;
50
+ };
51
+ type VariantItem = {
52
+ variant_id: string;
53
+ sku: string;
54
+ handle: string;
55
+ };
56
+ export type RuleCondition = {
57
+ with_special_url_params: string[];
58
+ without_special_url_params: string[];
59
+ with_user_tags: string[];
60
+ without_user_tags: string[];
61
+ };
62
+ export type DiscountConfig = {
63
+ discount_type: DISCOUNT_TYPE;
64
+ discount_value: number;
65
+ price_ending_conf: {
66
+ apply_price_ending: boolean;
67
+ conf_one_decimal_place: boolean;
68
+ conf_two_decimal_place: false;
69
+ one_decimal_place: number;
70
+ two_decimal_place: number;
71
+ round_selected: ROUND_SELECTED;
72
+ };
73
+ };
74
+ export type FunctionDiscountConfig = {
75
+ rule_id: number;
76
+ rule_type: RuleType;
77
+ discount_labels: {
78
+ cart_checkout_label: string;
79
+ product_label: string;
80
+ sold_out_label: string;
81
+ };
82
+ discount_combinations: {
83
+ other_order_discounts: boolean;
84
+ other_product_discounts: boolean;
85
+ shipping_discounts: boolean;
86
+ };
87
+ rule_conditions: RuleCondition[];
88
+ };
89
+ export type VolumeConfig = {
90
+ result_detail: {
91
+ productions_combination: ProductionsCombination;
92
+ discount_options: DiscountOptions;
93
+ discount_exclude_customed_price: boolean;
94
+ tiered_discounts: TieredDiscount[];
95
+ main_product: {
96
+ variant_list: VariantItem[];
97
+ all_store_variant: boolean;
98
+ };
99
+ };
100
+ } & FunctionDiscountConfig;
101
+ export type FunctionMemberPriceConfig = {
102
+ result_detail: {
103
+ member_discounts: {
104
+ main_products: {
105
+ variants: {
106
+ variant_id: string;
107
+ sku: string;
108
+ handle: string;
109
+ discount_value: number;
110
+ }[];
111
+ skip_variants: {
112
+ variant_id: string;
113
+ sku: string;
114
+ handle: string;
115
+ discount_value: number;
116
+ }[];
117
+ dynamic_conf: {
118
+ in_collections?: string[];
119
+ not_in_collections?: string[];
120
+ in_products?: string[];
121
+ not_in_products?: string[];
122
+ SKU: {
123
+ in?: string[];
124
+ not_in?: string[];
125
+ start_with?: string;
126
+ notstart_with?: string;
127
+ end_with?: string;
128
+ unend_with?: string;
129
+ contain?: string;
130
+ uncontain?: string;
131
+ };
132
+ };
133
+ all_store_variant: boolean;
134
+ };
135
+ discount_conf: DiscountConfig;
136
+ }[];
137
+ limit_discount_max: number;
138
+ };
139
+ } & FunctionDiscountConfig;
140
+ export type PriceDiscountConfig = FunctionDiscountConfig & {
141
+ result_detail: {
142
+ main_product: {
143
+ variant_list: {
144
+ variant_id: string;
145
+ sku: string;
146
+ handle: string;
147
+ }[];
148
+ all_store_variant: boolean;
149
+ };
150
+ price_conf: {
151
+ discount_type: DISCOUNT_TYPE;
152
+ discount_base: DISCOUNT_BASE_TYPE;
153
+ discount_amount: number;
154
+ price_ending_conf: {
155
+ apply_price_ending: false;
156
+ one_decimal_place: number;
157
+ two_decimal_place: number;
158
+ round_selected: ROUND_SELECTED;
159
+ };
160
+ };
161
+ };
162
+ };
163
+ export type ProductImage = {
164
+ url: string;
165
+ alt?: string;
166
+ };
167
+ export type ProductOption = {
168
+ __typename?: 'MultipleChoiceOption';
169
+ id: string;
170
+ displayName: string;
171
+ values: ProductOptionValues[];
172
+ };
173
+ export type ProductOptionValues = {
174
+ label: string;
175
+ hexColors?: string[];
176
+ };
177
+ export type ProductVariant = {
178
+ id: string | number;
179
+ options: ProductOption[];
180
+ availableForSale?: boolean;
181
+ quantityAvailable: number;
182
+ metafields?: Record<string, any>;
183
+ [key: string]: any;
184
+ };
185
+ export type ProductPrice = {
186
+ value: number;
187
+ currencyCode?: 'USD' | 'EUR' | 'ARS' | string;
188
+ retailPrice?: number;
189
+ salePrice?: number;
190
+ listPrice?: number;
191
+ extendedSalePrice?: number;
192
+ extendedListPrice?: number;
193
+ };
194
+ export type Product = any & {
195
+ id: string;
196
+ name: string;
197
+ description: string;
198
+ descriptionHtml?: string;
199
+ productType?: string;
200
+ sku?: string;
201
+ slug?: string;
202
+ handle?: string;
203
+ path?: string;
204
+ images: ProductImage[];
205
+ variants: ProductVariant[];
206
+ price: ProductPrice;
207
+ listPrice?: number;
208
+ options: ProductOption[];
209
+ preRender?: string;
210
+ seo?: any;
211
+ metafields?: {
212
+ [key: string]: any;
213
+ };
214
+ };
215
+ export {};
@@ -0,0 +1,2 @@
1
+ var i=(n=>(n[n.AUTO_FREE_GIFT=1]="AUTO_FREE_GIFT",n[n.BUNDLE=2]="BUNDLE",n[n.VOLUME_DISCOUNT=3]="VOLUME_DISCOUNT",n[n.ORDER_DISCOUNT=4]="ORDER_DISCOUNT",n[n.PRICE_DISCOUNT=5]="PRICE_DISCOUNT",n))(i||{}),r=(t=>(t[t.SAME_PRODUCT=0]="SAME_PRODUCT",t[t.SAME_VARIANT=1]="SAME_VARIANT",t[t.MIX_MATCH=2]="MIX_MATCH",t))(r||{}),o=(t=>(t[t.MINIMUM_QUANTITY=1]="MINIMUM_QUANTITY",t[t.FIXED_QUANTITY=2]="FIXED_QUANTITY",t[t.TIERED_QUANTITY=3]="TIERED_QUANTITY",t))(o||{}),s=(t=>(t[t.PERCENTAGE=1]="PERCENTAGE",t[t.FIXED_AMOUNT=2]="FIXED_AMOUNT",t[t.FIXED_PRICE=3]="FIXED_PRICE",t))(s||{}),a=(t=>(t[t.ROUND_HIGHEST=1]="ROUND_HIGHEST",t[t.ROUND_LOWEST=2]="ROUND_LOWEST",t[t.ROUND_NEAREST=3]="ROUND_NEAREST",t))(a||{}),u=(e=>(e[e.CURRENT_PRICE=1]="CURRENT_PRICE",e[e.COMPARE_AT_PRICE=2]="COMPARE_AT_PRICE",e))(u||{});export{u as DISCOUNT_BASE_TYPE,s as DISCOUNT_TYPE,o as DiscountOptions,r as ProductionsCombination,a as ROUND_SELECTED,i as RuleType};
2
+ //# sourceMappingURL=priceProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/biz-components/CollectionsFilters/component/priceProps.ts"],
4
+ "sourcesContent": ["export enum RuleType {\n AUTO_FREE_GIFT = 1, // \u81EA\u52A8\u8D60\u54C1\n BUNDLE = 2, // \u7EC4\u5408\n VOLUME_DISCOUNT = 3, // \u91CF\u4EF7\u6298\u6263\n ORDER_DISCOUNT = 4, // \u8BA2\u5355\u6298\u6263\n PRICE_DISCOUNT = 5, // \u4EF7\u683C\u6298\u6263\n}\n\n\nexport type FunctionMemberPriceResult = {\n // \u662F\u5426\u5305\u542B\u4F1A\u5458\u4EF7\n hasMemberPrice: boolean\n // \u662F\u5426\u53EF\u4EE5\u53E0\u52A0\u5238\n useCoupon: boolean\n // \u539F\u4EF7\n originalPrice: number\n // \u539F\u4EF7\u5E26\u8D27\u5E01\u7B26\u53F7\n originalPriceWithCurrency: string\n // \u6298\u540E\u4EF7\n salePrice: number\n // \u6298\u540E\u4EF7\u5E26\u8D27\u5E01\u7B26\u53F7\n salePriceWithCurrency: string\n // \u4E0D\u4F7F\u7528\u5238\u7684\u6298\u540E\u4EF7\n salePriceWithoutCoupon: number\n // \u4E0D\u4F7F\u7528\u5238\u7684\u6298\u540E\u4EF7\u5E26\u8D27\u5E01\u7B26\u53F7\n salePriceWithoutCouponWithCurrency: string\n // \u5305\u542B\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePrice: number\n // \u5305\u542B\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\u5E26\u8D27\u5E01\u7B26\u53F7\n savePriceWithCurrency: string\n // \u4E0D\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePriceWithoutCoupon: number\n // \u4E0D\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\u5E26\u8D27\u5E01\u7B26\u53F7\n savePriceWithoutCouponWithCurrency: string\n}\n\nexport enum ProductionsCombination {\n SAME_PRODUCT, // \u76F8\u540C\u4EA7\u54C1\n SAME_VARIANT, // \u76F8\u540C\u53D8\u4F53\n MIX_MATCH, // \u7EC4\u5408\n}\n\nexport enum DiscountOptions {\n MINIMUM_QUANTITY = 1,\n FIXED_QUANTITY,\n TIERED_QUANTITY,\n}\n\nexport enum DISCOUNT_TYPE {\n PERCENTAGE = 1, // \u767E\u5206\u6BD4\n FIXED_AMOUNT, // \u56FA\u5B9A\u91D1\u989D\n FIXED_PRICE, // \u56FA\u5B9A\u4EF7\u683C\n}\n\nexport enum ROUND_SELECTED {\n ROUND_HIGHEST = 1, // \u5411\u4E0A\u53D6\u6574\n ROUND_LOWEST, // \u5411\u4E0B\u53D6\u6574\n ROUND_NEAREST, // \u56DB\u820D\u4E94\u5165\n}\n\nexport enum DISCOUNT_BASE_TYPE {\n CURRENT_PRICE = 1, // \u6298\u540E\u4EF7\n COMPARE_AT_PRICE = 2, // \u5404\u6E20\u9053\u62C9\u9F50\u7684\u539F\u4EF7\n}\n\n\nexport type TieredDiscount = {\n quantity: number //\u6570\u91CF\n discount: number //\u6298\u6263\n discount_type: DISCOUNT_TYPE\n}\n\n// \u5B9A\u4E49\u53D8\u4F53\u9879\u7C7B\u578B\ntype VariantItem = {\n variant_id: string // \u53D8\u4F53ID\n sku: string // \u5E93\u5B58\u5355\u4F4D\n handle: string // \u5904\u7406\u6807\u8BC6\n}\n\n// \u5B9A\u4E49\u89C4\u5219\u6761\u4EF6\u7C7B\u578B\nexport type RuleCondition = {\n with_special_url_params: string[] // \u5305\u542B\u7279\u6B8AURL\u53C2\u6570\n without_special_url_params: string[] // \u4E0D\u5305\u542B\u7279\u6B8AURL\u53C2\u6570\n with_user_tags: string[] // \u5305\u542B\u7528\u6237\u6807\u7B7E\n without_user_tags: string[] // \u4E0D\u5305\u542B\u7528\u6237\u6807\u7B7E\n}\n\n// \u4EF7\u683C\u8BA1\u7B97\u914D\u7F6E\uFF0C\u5C0F\u6570\u4F4D\u53D6\u820D\u89C4\u5219\nexport type DiscountConfig = {\n discount_type: DISCOUNT_TYPE\n discount_value: number\n price_ending_conf: {\n apply_price_ending: boolean\n conf_one_decimal_place: boolean\n conf_two_decimal_place: false\n one_decimal_place: number\n two_decimal_place: number\n round_selected: ROUND_SELECTED\n }\n}\n\n// function \u6298\u6263\u7C7B\u578B\u914D\u7F6E\u7684\u57FA\u7840\u7C7B\u578B\nexport type FunctionDiscountConfig = {\n // \u89C4\u5219ID\n rule_id: number\n // \u89C4\u5219\u7C7B\u578B\n rule_type: RuleType\n // \u6298\u6263\u6807\u7B7E\n discount_labels: {\n // \u8D2D\u7269\u8F66\u7ED3\u8D26\u6807\u7B7E\n cart_checkout_label: string\n // \u4EA7\u54C1\u6807\u7B7E\n product_label: string\n // \u552E\u7F44\u6807\u7B7E\n sold_out_label: string\n }\n // \u6298\u6263\u53EF\u7EC4\u5408\u89C4\u5219\n discount_combinations: {\n // \u662F\u5426\u4E0E\u5176\u4ED6\u8BA2\u5355\u6298\u6263\u7EC4\u5408\n other_order_discounts: boolean\n // \u662F\u5426\u4E0E\u5176\u4ED6\u4EA7\u54C1\u6298\u6263\u7EC4\u5408\n other_product_discounts: boolean\n // \u662F\u5426\u4E0E\u5176\u4ED6\u8FD0\u8D39\u6298\u6263\u7EC4\u5408\n shipping_discounts: boolean\n }\n // \u89C4\u5219\u6761\u4EF6\n rule_conditions: RuleCondition[]\n}\n\n// \u9636\u68AF\u6298\u6263\u7C7B\u578B\u914D\u7F6E\uFF08\u5C0Fb\uFF09\nexport type VolumeConfig = {\n // \u89C4\u5219\u7ED3\u679C\n result_detail: {\n //\u4EA7\u54C1\u53E0\u52A0\u8BA1\u6570\u89C4\u5219\n productions_combination: ProductionsCombination\n //\u6298\u6263\u5E94\u7528\u65B9\u5F0F\n discount_options: DiscountOptions\n //\u4E0D\u5305\u542B\u5B9A\u5236\u5316\u4EF7\u683C\n discount_exclude_customed_price: boolean //false.\u6298\u6263\u4E0D\u6392\u9664\u5B9A\u5236\u5316\u4EF7\u683C true.\u6298\u6263\u6392\u9664\u5B9A\u5236\u5316\u4EF7\u683C\n //\u6298\u6263\u9636\u68AF\u5217\u8868\uFF08\u5012\u5E8F\uFF0C\u4ECE\u5927\u5230\u5C0F\uFF09\n tiered_discounts: TieredDiscount[]\n main_product: {\n variant_list: VariantItem[] // \u53D8\u4F53\u5217\u8868\n all_store_variant: boolean // \u6240\u6709\u5546\u5E97\u53D8\u4F53\n }\n }\n} & FunctionDiscountConfig\n\nexport type FunctionMemberPriceConfig = {\n // \u89C4\u5219\u7ED3\u679C\n result_detail: {\n member_discounts: {\n main_products: {\n // \u6307\u5B9A\u751F\u6548\u7684 variant\n variants: {\n variant_id: string\n sku: string\n handle: string\n discount_value: number\n }[]\n // \u4E0D\u751F\u6548\u7684 variant\n skip_variants: {\n variant_id: string\n sku: string\n handle: string\n discount_value: number\n }[]\n // \u751F\u6548\u7684 variant \u7684\u52A8\u6001\u914D\u7F6E\u89C4\u5219\n dynamic_conf: {\n // \u5728\u6307\u5B9A collection \u4E2D\n in_collections?: string[]\n // \u4E0D\u5728\u6307\u5B9A collection \u4E2D\n not_in_collections?: string[]\n // \u5728\u6307\u5B9A\u4EA7\u54C1\u4E2D\n in_products?: string[]\n // \u4E0D\u5728\u6307\u5B9A\u4EA7\u54C1\u4E2D\n not_in_products?: string[]\n // SKU\u540D\u79F0\u89C4\u5219\n SKU: {\n // \u5FC5\u987B\u5728\u6307\u5B9ASKU\u8303\u56F4\u5185\n in?: string[]\n // \u5FC5\u987B\u4E0D\u5728\u6307\u5B9ASKU\u8303\u56F4\u5185\n not_in?: string[]\n // \u5FC5\u987B\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u5F00\u5934\n start_with?: string\n // \u5FC5\u987B\u4E0D\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u5F00\u5934\n notstart_with?: string\n // \u5FC5\u987B\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u7ED3\u675F\n end_with?: string\n // \u5FC5\u987B\u4E0D\u4EE5\u6307\u5B9A\u5B57\u7B26\u4E32\u7ED3\u675F\n unend_with?: string\n // \u5FC5\u987B\u5305\u542B\u6307\u5B9A\u5B57\u7B26\u4E32\n contain?: string\n // \u5FC5\u987B\u4E0D\u5305\u542B\u6307\u5B9A\u5B57\u7B26\u4E32\n uncontain?: string\n }\n }\n all_store_variant: boolean\n }\n discount_conf: DiscountConfig\n }[]\n limit_discount_max: number\n }\n} & FunctionDiscountConfig\n\n// \u76F4\u964D\u6298\u6263\nexport type PriceDiscountConfig = FunctionDiscountConfig & {\n result_detail: {\n main_product: {\n variant_list: {\n variant_id: string\n sku: string\n handle: string\n }[]\n all_store_variant: boolean\n }\n price_conf: {\n discount_type: DISCOUNT_TYPE\n discount_base: DISCOUNT_BASE_TYPE\n discount_amount: number\n price_ending_conf: {\n apply_price_ending: false\n one_decimal_place: number\n two_decimal_place: number\n round_selected: ROUND_SELECTED\n }\n }\n }\n}\n\nexport type ProductImage = {\n url: string\n alt?: string\n}\n\nexport type ProductOption = {\n __typename?: 'MultipleChoiceOption'\n id: string\n displayName: string\n values: ProductOptionValues[]\n}\n\nexport type ProductOptionValues = {\n label: string\n hexColors?: string[]\n}\n\nexport type ProductVariant = {\n id: string | number\n options: ProductOption[]\n availableForSale?: boolean\n quantityAvailable: number\n metafields?: Record<string, any>\n [key: string]: any\n}\n\nexport type ProductPrice = {\n value: number\n currencyCode?: 'USD' | 'EUR' | 'ARS' | string\n retailPrice?: number\n salePrice?: number\n listPrice?: number\n extendedSalePrice?: number\n extendedListPrice?: number\n}\n\nexport type Product = any & {\n id: string\n name: string\n description: string\n descriptionHtml?: string\n productType?: string\n sku?: string\n slug?: string\n handle?: string\n path?: string\n images: ProductImage[]\n variants: ProductVariant[]\n price: ProductPrice\n listPrice?: number\n options: ProductOption[]\n preRender?: string\n seo?: any\n metafields?: { [key: string]: any }\n}"],
5
+ "mappings": "AAAO,IAAKA,OACVA,IAAA,eAAiB,GAAjB,iBACAA,IAAA,OAAS,GAAT,SACAA,IAAA,gBAAkB,GAAlB,kBACAA,IAAA,eAAiB,GAAjB,iBACAA,IAAA,eAAiB,GAAjB,iBALUA,OAAA,IAoCAC,OACVA,IAAA,+BACAA,IAAA,+BACAA,IAAA,yBAHUA,OAAA,IAMAC,OACVA,IAAA,iBAAmB,GAAnB,mBACAA,IAAA,mCACAA,IAAA,qCAHUA,OAAA,IAMAC,OACVA,IAAA,WAAa,GAAb,aACAA,IAAA,+BACAA,IAAA,6BAHUA,OAAA,IAMAC,OACVA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,+BACAA,IAAA,iCAHUA,OAAA,IAMAC,OACVA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,iBAAmB,GAAnB,mBAFUA,OAAA",
6
+ "names": ["RuleType", "ProductionsCombination", "DiscountOptions", "DISCOUNT_TYPE", "ROUND_SELECTED", "DISCOUNT_BASE_TYPE"]
7
+ }
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ type CollectionsFiltersProps = {
3
+ metafields: any;
4
+ result: any;
5
+ allResult: any;
6
+ pageSize?: number;
7
+ filterPrice: any;
8
+ isLoading?: boolean;
9
+ refreshStarRating?: () => void;
10
+ loadMore?: React.ReactNode;
11
+ noResultNode?: React.ReactNode;
12
+ data?: any;
13
+ onNextPage?: (v: string) => void;
14
+ onPrevPage?: (v: string) => void;
15
+ onFilteredChange?: (filtered: any) => void;
16
+ onSortAndReverseChange?: (sortKey: string, reverse: boolean) => void;
17
+ onPrimaryChange?: (item: any, sku: string) => void;
18
+ onSecondaryChange?: (item: any, sku: string) => void;
19
+ };
20
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<CollectionsFiltersProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
21
+ className?: string | undefined;
22
+ data?: Record<string, any> | undefined;
23
+ } & import("react").RefAttributes<any>>;
24
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import{jsx as l,jsxs as h}from"react/jsx-runtime";import $ from"./FilterList";import j from"./FilterHeader";import ee from"./FilterCardWrap";import{withLayout as te}from"../../shared/Styles.js";import oe from"./component/TabFilter";import{useState as o,useMemo as c,useEffect as O,useRef as w}from"react";import{handleSortKeyAndReverse as re,handleFilters as I,handleFilterOptions as ne,getComponentData as se}from"./component/filtersFun";function ae(L){const{data:i,result:n={},allResult:y={},loadMore:K=null,noResultNode:_=null,metafields:s={},filterPrice:v={},isLoading:b=!1,refreshStarRating:k,onFilteredChange:C,onSortAndReverseChange:M,onPrimaryChange:A,onSecondaryChange:V,onNextPage:z,onPrevPage:T}=L,{shop_filters_pair:a}=s,{data:F}=se(s,"FilterProduct"),[d,W]=o(!1),[E,P]=o(!1),[H,q]=o([]),[r,x]=o({}),[u,B]=o(0),[p,f]=o(1),[G,J]=o(!1),[Q,U]=o(!1),X=w(null),m=w(!1);c(()=>{const e=a?.filter_txt?.sortList,[t,Z]=re(e,u);M?.(t,Z)},[a?.filter_txt?.sortList,r,u]);const Y=e=>!e?.metafields?.seoSetting?.noindex,R=c(()=>y?.products?.filter(Y)?.length||0,[y?.products]),g=c(()=>ne(n,v,a,F),[v,n?.filters,a?.filter_txt?.offers?.name,a?.filter_txt?.offers?.onsale]),S=c(()=>g?.length?g?.map?.(e=>({...e,options:e?.options?.map?.(t=>({...t,checked:r?.[e?.value]?.indexOf?.(t?.value)>-1}))})):[],[r,g]),N=e=>{x?.({}),e&&f(1),C?.(I({}))},D=e=>{x(e),f(1),C?.(I(e))};return O(()=>{const t=(r?.offers||[])?.includes?.("onsale");J(t)},[r]),O(()=>{!m.current&&n?.products?.length&&(m.current=!0),m.current&&U(!0)},[n?.products]),h("div",{className:"size-full box-border",children:[l("div",{className:"laptop:mb-12 mb-6",children:l(oe,{tabs:i?.tabItems,filtered:r,filtersPair:S,filtersData:F,metafields:s,onTabClick:e=>D(e)})}),l(j,{total:R||0,metafields:s,closeFilter:d,sortKeyIndx:u,shopifyData:i,onSortChange:B,onCloseFilter:W,onClearFiltered:()=>N(),onMobileOpenDrawer:P}),h("div",{className:"flex-1 overflow-hidden tablet:flex desktop:gap-x-16 tablet:gap-x-8",children:[!d&&l($,{shopifyData:i,filtered:r,openOptions:H,closeFilter:d,filtersPair:S,mobileDrawerVisible:E,onFilteredChange:D,onClearFiltered:()=>N(!1),onOpenOptions:q,onCloseDrawer:P}),h("div",{className:"flex-1 overflow-y-auto relative",children:[l(ee,{page:p,result:n,shopifyData:i,total:R,isSale:G,ref:X,metafields:s,closeFilter:d,noResultNode:Q&&!b?_:null,refreshStarRating:k,onNextPage:e=>{f(p+1),z?.(e)},onPrevPage:e=>{f(p-1),T?.(e)},onPrimaryChange:(e,t)=>A?.(e,t),onSecondaryChange:(e,t)=>V?.(e,t)}),b&&K||null]})]})]})}var me=te(ae);export{me as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionsFilters/index.tsx"],
4
+ "sourcesContent": ["import FilterList from './FilterList'\nimport FilterHeader from './FilterHeader'\nimport FilterCardWrap from './FilterCardWrap'\nimport { withLayout } from '../../shared/Styles.js'\nimport TabFilter from './component/TabFilter'\nimport { useState, useMemo, useEffect, useRef } from 'react'\nimport { handleSortKeyAndReverse, handleFilters, handleFilterOptions, getComponentData } from './component/filtersFun'\n\ntype CollectionsFiltersProps = {\n metafields: any\n result: any\n allResult: any\n pageSize?: number\n filterPrice: any\n isLoading?: boolean\n refreshStarRating?: () => void\n loadMore?: React.ReactNode\n noResultNode?: React.ReactNode\n data?: any\n onNextPage?: (v: string) => void\n onPrevPage?: (v: string) => void\n onFilteredChange?: (filtered: any) => void\n onSortAndReverseChange?: (sortKey: string, reverse: boolean) => void\n onPrimaryChange?: (item: any, sku: string) => void\n onSecondaryChange?: (item: any, sku: string) => void\n}\nfunction CollectionsFilters(props: CollectionsFiltersProps) {\n const {\n data,\n result = {},\n allResult = {},\n loadMore = null,\n noResultNode = null,\n metafields = {},\n filterPrice = {},\n isLoading = false,\n refreshStarRating,\n onFilteredChange,\n onSortAndReverseChange,\n onPrimaryChange,\n onSecondaryChange,\n onNextPage,\n onPrevPage,\n } = props\n\n const { shop_filters_pair } = metafields\n\n const { data: filterProductData } = getComponentData(metafields, 'FilterProduct')\n\n const [closeFilter, setCloseFilter] = useState<boolean>(false)\n const [mobileDrawerVisible, setMobileDrawerVisible] = useState<boolean>(false) // \u79FB\u52A8\u7AEF\u7B5B\u9009\u9009\u9879\u5C55\u793A\u72B6\u6001\n const [openOptions, setOpenOptions] = useState<any[]>([]) // \u5C55\u5F00\u7684\u7B5B\u9009\u9879\n const [filtered, setFiltered] = useState<any>({}) // \u9009\u62E9\u7684\u7B5B\u9009\u9009\u9879\n const [sortKeyIndx, setSortKeyIndx] = useState<number>(0) // \u6392\u5E8F\u65B9\u5F0F\n const [currentPage, setCurrentPage] = useState<number>(1)\n const [isSale, setIsSale] = useState<boolean>(false)\n const [isRefresh, setIsRefresh] = useState<boolean>(false)\n\n const filterCardWrapRef = useRef<any>(null)\n const initRefresh = useRef<boolean>(false)\n\n // \u5904\u7406\u6392\u5E8F\u6570\u636E\n useMemo(() => {\n const sortList = shop_filters_pair?.filter_txt?.sortList\n const [sortKey, reverse] = handleSortKeyAndReverse(sortList, sortKeyIndx)\n onSortAndReverseChange?.(sortKey, reverse)\n }, [shop_filters_pair?.filter_txt?.sortList, filtered, sortKeyIndx])\n\n const hasNoIndex = (product: { metafields: { seoSetting: { noindex: any } } }) => {\n return !product?.metafields?.seoSetting?.noindex\n }\n const totalCount = useMemo(() => {\n return allResult?.products?.filter(hasNoIndex)?.length || 0\n }, [allResult?.products])\n\n // \u5904\u7406\u7B5B\u9009\u9879\u6570\u636E\n const filtersOptions = useMemo(() => {\n return handleFilterOptions(result, filterPrice, shop_filters_pair, filterProductData)\n }, [\n filterPrice,\n result?.filters,\n shop_filters_pair?.filter_txt?.offers?.name,\n shop_filters_pair?.filter_txt?.offers?.onsale,\n ])\n\n const filtersPair = useMemo(() => {\n if (!filtersOptions?.length) return []\n return filtersOptions?.map?.((filter: any) => {\n return {\n ...filter,\n options: filter?.options?.map?.((opt: any) => {\n return {\n ...opt,\n checked: filtered?.[filter?.value]?.indexOf?.(opt?.value) > -1,\n }\n }),\n }\n })\n }, [filtered, filtersOptions])\n\n\n const clearFiltered = (flag?: boolean) => {\n setFiltered?.({})\n if (flag) {\n setCurrentPage(1)\n }\n onFilteredChange?.(handleFilters({}))\n }\n\n const filterChange = (v: any) => {\n setFiltered(v)\n setCurrentPage(1)\n onFilteredChange?.(handleFilters(v))\n }\n\n useEffect(() => {\n const offers = filtered?.offers || []\n const isShowSale = offers?.includes?.('onsale')\n setIsSale(isShowSale)\n }, [filtered])\n\n useEffect(() => {\n if (!initRefresh.current && result?.products?.length) {\n initRefresh.current = true\n }\n if (initRefresh.current) {\n setIsRefresh(true)\n }\n }, [result?.products])\n\n return (\n <div className=\"size-full box-border\">\n {/* \u5934\u90E8 */}\n <div className=\"laptop:mb-12 mb-6\">\n <TabFilter\n tabs={data?.tabItems}\n filtered={filtered}\n filtersPair={filtersPair}\n filtersData={filterProductData}\n metafields={metafields}\n onTabClick={v => filterChange(v)}\n />\n </div>\n <FilterHeader\n total={totalCount || 0}\n metafields={metafields}\n closeFilter={closeFilter}\n sortKeyIndx={sortKeyIndx}\n shopifyData={data}\n onSortChange={setSortKeyIndx}\n onCloseFilter={setCloseFilter}\n onClearFiltered={() => clearFiltered()}\n onMobileOpenDrawer={setMobileDrawerVisible}\n />\n {/* PC\u7B5B\u9009\u9009\u9879 */}\n <div className=\"flex-1 overflow-hidden tablet:flex desktop:gap-x-16 tablet:gap-x-8\">\n {!closeFilter && (\n <FilterList\n shopifyData={data}\n filtered={filtered}\n openOptions={openOptions}\n closeFilter={closeFilter}\n filtersPair={filtersPair}\n mobileDrawerVisible={mobileDrawerVisible}\n onFilteredChange={filterChange}\n onClearFiltered={() => clearFiltered(false)}\n onOpenOptions={setOpenOptions}\n onCloseDrawer={setMobileDrawerVisible}\n />\n )}\n <div className=\"flex-1 overflow-y-auto relative\">\n <FilterCardWrap\n page={currentPage}\n result={result}\n shopifyData={data}\n total={totalCount}\n isSale={isSale}\n ref={filterCardWrapRef}\n metafields={metafields}\n closeFilter={closeFilter}\n noResultNode={isRefresh && !isLoading ? noResultNode : null}\n refreshStarRating={refreshStarRating}\n onNextPage={v => {\n setCurrentPage(currentPage + 1)\n onNextPage?.(v)\n }}\n onPrevPage={v => {\n setCurrentPage(currentPage - 1)\n onPrevPage?.(v)\n }}\n onPrimaryChange={(e, data) => onPrimaryChange?.(e, data)}\n onSecondaryChange={(e, data) => onSecondaryChange?.(e, data)}\n />\n {isLoading ? loadMore || null : null}\n </div>\n </div>\n </div>\n )\n}\n\nexport default withLayout(CollectionsFilters)"],
5
+ "mappings": "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",
6
+ "names": ["jsx", "jsxs", "FilterList", "FilterHeader", "FilterCardWrap", "withLayout", "TabFilter", "useState", "useMemo", "useEffect", "useRef", "handleSortKeyAndReverse", "handleFilters", "handleFilterOptions", "getComponentData", "CollectionsFilters", "props", "data", "result", "allResult", "loadMore", "noResultNode", "metafields", "filterPrice", "isLoading", "refreshStarRating", "onFilteredChange", "onSortAndReverseChange", "onPrimaryChange", "onSecondaryChange", "onNextPage", "onPrevPage", "shop_filters_pair", "filterProductData", "closeFilter", "setCloseFilter", "mobileDrawerVisible", "setMobileDrawerVisible", "openOptions", "setOpenOptions", "filtered", "setFiltered", "sortKeyIndx", "setSortKeyIndx", "currentPage", "setCurrentPage", "isSale", "setIsSale", "isRefresh", "setIsRefresh", "filterCardWrapRef", "initRefresh", "sortList", "sortKey", "reverse", "hasNoIndex", "product", "totalCount", "filtersOptions", "filtersPair", "filter", "opt", "clearFiltered", "flag", "filterChange", "v", "isShowSale", "CollectionsFilters_default"]
7
+ }
@@ -12,18 +12,16 @@ interface BenefitsTabTextConfig {
12
12
  bundleOffer?: string;
13
13
  creditsTitle?: string;
14
14
  creditsDesc?: string;
15
- yourBenefits?: string;
16
15
  off?: string;
17
- memberBenefits?: string;
18
16
  memberBenefitsNotLogin?: string;
19
17
  memberBenefitsNotLoginText?: string;
20
- installment?: string;
21
18
  forNewMember?: string;
22
19
  expressShipping?: string;
23
20
  creditsAfterActivation?: string;
24
21
  active?: string;
25
22
  flexibleInstallment?: string;
26
23
  }
24
+ export type ProductBenefitsTabsValueType = 'coupon' | 'membership' | 'pay' | 'installment';
27
25
  export type ModalData = {
28
26
  needClickAway?: boolean;
29
27
  className?: string;
@@ -1,4 +1,4 @@
1
- import{Fragment as B,jsx as e,jsxs as o}from"react/jsx-runtime";import{Button as J,Checkbox as K,Text as p,Picture as A,Heading as Q}from"../../../../../components/index.js";import c from"./ProductBenefitsTabs/index.js";import{useBizProductContext as Z}from"../../../BizProductProvider.js";import{useBenefits as X}from"../../../hooks/useBenefits";import{formatPrice as m}from"../../../utils/index.js";import{replaceTemplate as H}from"../../../utils/textFormat";import{useRef as ee,useState as te}from"react";import{useAiuiContext as R}from"../../../../AiuiProvider/index.js";import oe from"../../../../../hooks/useCountDown.js";import ne from"../../../hooks/useCopy";import{cn as C}from"../../../../../helpers/index.js";const se={couponCode:"Code",copyCode:"Copy Code",copied:"Copied",expired:"Expired",offCoupon:"{discount} off coupon",offMemberOnly:"{amount} off Member Only",loginNow:"Login now",selectFreeGift:"You can select the free gift below.",bundleSaveUpTo:"Bundle purchases save extra up to",bundleOffer:"We offer {count} bundle for you",creditsTitle:"Soundcore credits for cash",creditsDesc:"100 Soundcore credits=$1",yourBenefits:"Your Benefits",off:" off",memberBenefits:"Member Benefits",memberBenefitsNotLogin:"You will enjoy a {amount} member discount after logging in.",memberBenefitsNotLoginText:"Sign Up to Get Benefits Below",installment:"Installment",forNewMember:"{amount} off for New Member",expressShipping:"Express Shipping Method",creditsAfterActivation:"You will get soundcoreCredits after activation. ",active:"Active",flexibleInstallment:"Flexible installment payment "},ie=({item:t,textConfig:d})=>{const{trackingData:i}=R(),{copied:l,copy:b}=ne(),a=i?.common?.coupon,{days:x,hours:k,minutes:h,seconds:w}=oe({endTime:t?.ends_at||""}),{openModal:v}=Z();return o(B,{children:[e("style",{jsx:!0,children:`
1
+ import{Fragment as M,jsx as e,jsxs as n}from"react/jsx-runtime";import{Button as ae,Checkbox as ie,Text as p,Picture as v,Heading as $}from"../../../../../components/index.js";import d from"./ProductBenefitsTabs/index.js";import{useBizProductContext as O}from"../../../BizProductProvider.js";import{useBenefits as se}from"../../../hooks/useBenefits";import{formatPrice as g}from"../../../utils/index.js";import{replaceTemplate as R}from"../../../utils/textFormat";import{useEffect as le,useMemo as U,useRef as re,useState as W}from"react";import{useAiuiContext as q}from"../../../../AiuiProvider/index.js";import ce from"../../../../../hooks/useCountDown.js";import pe from"../../../hooks/useCopy";import{cn as Z}from"../../../../../helpers/index.js";import de from"./ProductBenefitsTabs/ModalContainer.js";const ue={couponCode:"Code",copyCode:"Copy Code",copied:"Copied",expired:"Expired",offCoupon:"{discount} off coupon",offMemberOnly:"{amount} off Member Only",loginNow:"Login now",selectFreeGift:"You can select the free gift below.",bundleSaveUpTo:"Bundle purchases save extra up to",bundleOffer:"We offer {count} bundle for you",creditsTitle:"Soundcore credits for cash",creditsDesc:"100 Soundcore credits=$1",off:" off",memberBenefitsNotLogin:"You will enjoy a {amount} member discount after logging in.",memberBenefitsNotLoginText:"Sign Up to Get Benefits Below",forNewMember:"{amount} off for New Member",expressShipping:"Express Shipping Method",creditsAfterActivation:"You will get soundcoreCredits after activation. ",active:"Active",flexibleInstallment:"Flexible installment payment "},fe=({item:a,textConfig:L,benefitPayloadData:i})=>{const{trackingData:l}=q(),{copied:x,copy:C}=pe(),r=l?.common?.coupon,{days:y,hours:B,minutes:S,seconds:N}=ce({endTime:a?.ends_at||""}),{openModal:P}=O();return n(M,{children:[e("style",{jsx:!0,children:`
2
2
  .coupon-card {
3
3
  /* \u4F7F\u7528mask\u521B\u5EFA\u5185\u5207\u5706\u89D2 */
4
4
  mask:
@@ -14,7 +14,7 @@ import{Fragment as B,jsx as e,jsxs as o}from"react/jsx-runtime";import{Button as
14
14
  bottom left;
15
15
  mask-repeat: no-repeat;
16
16
  }
17
- `}),o("div",{style:{background:t.couponBgColor||"white"},className:C("relative h-[100px] p-3 overflow-hidden laptop:h-[112px] lg-desktop:h-[130px]",t.borderStyle==="inset"?"coupon-card ":"rounded-[8px]"),children:[t?.bgImage?.url&&e(A,{source:t.bgImage.url,alt:t.bgImage.alt,className:"absolute bottom-0 right-0 w-auto",imgClassName:"object-contain"}),o("div",{className:"relative z-1 ",children:[o("div",{className:"flex items-center justify-start",children:[t.useAble&&e(K,{size:"lg",className:"mr-2 rounded-full border-[#D1D1D1] border-[1.6px] data-[state=checked]:border-primary",checked:t?.isAutoUse,onCheckedChange:T=>{t?.onUseChange?.(T)}}),e(p,{html:t.title,className:"text-[16px] leading-[1.2] font-bold laptop:text-[20px] lg-desktop:text-[24px]"})]}),t.description&&e(p,{...typeof t.description=="string"?{html:t.description}:{},as:"p",className:"mt-2 pr-8 text-[14px] font-bold text-[#3D3D3F] lg-desktop:text-[16px]",children:t.description}),t.code&&o("div",{className:"desktop:mt-2 flex items-center gap-2",children:[e(p,{html:`${d.couponCode}: ${t.code}`,className:"text-[14px] lg-desktop:text-[16px] font-bold text-[#3D3D3F]"}),e("button",{className:"text-[14px] lg-desktop:text-[16px] font-bold underline",onClick:()=>b(t.code??""),children:l?a?.copied||d.copied:a?.copy||d.copyCode})]}),t.ends_at&&e("button",{onClick:()=>{a?.modal&&v(a?.modal)},className:"lg-desktop:mt-[24px] text-brand-0 desktop:mt-4 mt-[14px] text-left text-[14px] font-bold lg-desktop:text-[16px] text-[#1F2021] md-l:hidden",children:Number(x)<Number(a?.hurry?.daysLeft)?o(B,{children:[e("span",{children:a?.ends}),e("span",{className:"font-bold",children:` ${x} ${a?.days} ${k.toString().padStart(2,"0")}:${h.toString().padStart(2,"0")}:${w.toString().padStart(2,"0")}`})]}):a?.hurry?.label||d.expired})]})]})]})},le=({coupons:t,className:d,textConfig:i})=>e("div",{className:C("flex flex-col gap-3 laptop:grid laptop:grid-cols-2 desktop:grid-cols-1",d),children:t?.map((l,b)=>e(ie,{item:l,textConfig:i},b))}),ae=({textConfig:t})=>{const{isLogin:d,profile:i,variant:l,renderInstallments:b,onUseCouponChange:a,onUseMemberDiscountChange:x,discount:k,savingDetail:h,openModal:w,openSignInPopup:v,openAuthCodePopup:T,openSignUpPopup:E}=Z(),$=X({variant:l}),[L,G]=te("coupon"),{trackingData:I,locale:f="us",copyWriting:j}=R(),M=ee(null),n={...se,...t},{activated:z=!1}=i||{},{memberDiscount:u,commonCoupon:g,creditsRedemption:y,freeGift:_,bundle:S,paidShipping:O,fullGift:D,levelDiscount:F}=$,W=I?.productsBenefits??{},{thirdParty:re={}}=I?.common||{},N=[g?.enable?{...g.config,isAutoUse:h?.coupon>0,useAble:!0,borderStyle:"rounded",code:g?.config?.title??"",description:g?.config?.desc??"",onUseChange:s=>{const r=s?k?.codeSavings??0:0;a?.(r)},title:H(n.offCoupon,{discount:g?.config?.value_type=="percentage"?Math.abs(Number(g?.config?.value||0))+"%":m({amount:Math.abs(Number(g?.config?.fixed_value||0)),currencyCode:l.price.currencyCode,locale:f})})}:null,u.enable?{useAble:!0,isAutoUse:!!i?.email&&!!h?.member,title:H(n.offMemberOnly,{amount:m({amount:u?.config?.amount??0,currencyCode:l.price.currencyCode,locale:f})}),description:o(B,{children:[i?.email?u?.config?.description??"":n.memberBenefitsNotLogin.replace("{amount}",m({amount:u?.config?.amount??0,currencyCode:l.price.currencyCode,locale:f}))??""," ",i?.email?"":e("span",{role:"button",tabIndex:0,onClick:()=>v?.(),className:"underline",children:n.loginNow})]}),borderStyle:"rounded",onUseChange:s=>{if(i?.email){const r=s?u?.config?.amount??0:0;x?.(r)}else v?.()}}:null,F.enable?{title:F?.config?.title??"",description:F?.config?.tag??"",borderStyle:"inset",bgImage:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/levelDiscount.png?v=1760437385"}}:null,_.enable?{title:_?.config?.title??"",description:n.selectFreeGift,borderStyle:"inset",bgImage:{url:"https://cdn.shopify.com/s/files/1/0516/3761/6830/files/gift.png?v=1759113534"},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,S.enable?{title:`${n.bundleSaveUpTo} ${m({amount:Math.max(...S?.config?.bundleList?.map(s=>s.savings??0)??[]),currencyCode:l.price.currencyCode,locale:f})}`,borderStyle:"inset",description:n.bundleOffer.replace("{count}",S?.config?.bundleList?.length?.toString()??""),bgImage:{url:"https://cdn.shopify.com/s/files/1/0516/3761/6830/files/bundle.png?v=1759113534"},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,D.enable?{title:D?.config?.title??"",description:D?.config?.desc??"",borderStyle:"inset",bgImage:{url:"https://cdn.shopify.com/s/files/1/0516/3761/6830/files/fullGift.png?v=1759141790"},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,y.enable?{title:n.creditsTitle,description:n.creditsDesc,borderStyle:"inset",bgImage:{url:"https://cdn.shopify.com/s/files/1/0516/3761/6830/files/cash.png?v=1759113534"},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null].filter(Boolean),Y=()=>{T?.()};if(!c)return null;const P=s=>{if(M.current){const r=M.current,U=s.currentTarget,q=U.offsetLeft-r.offsetWidth/2+U.offsetWidth/2;r.scrollTo({left:q,behavior:"smooth"})}};return o(c,{className:"relative","ipc-product-detail-benefits-tabs":!0,onValueChange:s=>G(s),defaultValue:N?.length?"coupon":"membership",children:[e("div",{className:"absolute right-0 z-[1] top-0 w-[25px] rounded-xl h-[40px] bg-gradient-to-r from-transparent to-[#EAEAEC]"}),o(c.List,{ref:M,children:[N?.length?e(c.Trigger,{className:C(L==="coupon"&&"text-[#1D1D1F]"),value:"coupon",onClick:P,children:n.yourBenefits}):null,e(c.Trigger,{className:C(L==="membership"&&"text-[#1D1D1F]"),value:"membership",onClick:P,children:n.memberBenefits}),e(c.Trigger,{className:C(L==="installment"&&"text-[#1D1D1F]"),value:"installment",onClick:P,children:n.installment})]}),e("style",{global:!0,jsx:!0,children:`
17
+ `}),n("div",{style:{background:a.couponBgColor||"white"},className:Z("relative h-[100px] p-3 overflow-hidden laptop:h-[112px] lg-desktop:h-[130px]",a.borderStyle==="inset"?"coupon-card ":"rounded-[8px]"),children:[a?.bgImage?.url&&e(v,{source:a.bgImage.url,alt:a.bgImage.alt,className:"absolute bottom-0 right-0 w-auto",imgClassName:"object-contain"}),n("div",{className:"relative z-1 ",children:[n("div",{className:"flex items-center justify-start",children:[a.useAble&&e(ie,{size:"lg",className:"mr-2 rounded-full border-[#D1D1D1] border-[1.6px] data-[state=checked]:border-primary",checked:a?.isAutoUse,onCheckedChange:F=>{a?.onUseChange?.(F)}}),e(p,{html:a.title,className:"text-[16px] leading-[1.2] font-bold laptop:text-[20px] lg-desktop:text-[24px]"})]}),a.description&&e(p,{...typeof a.description=="string"?{html:a.description}:{},as:"p",className:"mt-2 pr-8 text-[14px] font-bold text-[#3D3D3F] lg-desktop:text-[16px]",children:a.description}),a.code&&n("div",{className:"desktop:mt-2 flex items-center gap-2",children:[e(p,{html:`${i?.couponBenefitData?.commonCoupon?.couponCode}: ${a.code}`,className:"text-[14px] lg-desktop:text-[16px] font-bold text-[#3D3D3F]"}),e("button",{className:"text-[14px] lg-desktop:text-[16px] font-bold underline",onClick:()=>C(a.code??""),children:x?r?.copied||i?.couponBenefitData?.commonCoupon?.copied:r?.copy||i?.couponBenefitData?.commonCoupon?.copyCode})]}),a.ends_at&&e("button",{onClick:()=>{r?.modal&&P(r?.modal)},className:"lg-desktop:mt-[24px] text-brand-0 desktop:mt-4 mt-[14px] text-left text-[14px] font-bold lg-desktop:text-[16px] text-[#1F2021] md-l:hidden",children:Number(y)<Number(r?.hurry?.daysLeft)?n(M,{children:[e("span",{children:r?.ends}),e("span",{className:"font-bold",children:` ${y} ${r?.days} ${B.toString().padStart(2,"0")}:${S.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`})]}):r?.hurry?.label||i?.couponBenefitData?.commonCoupon?.expired})]})]})]})},be=({coupons:a,className:L,textConfig:i,benefitPayloadData:l})=>e("div",{className:Z("flex flex-col gap-3 laptop:grid laptop:grid-cols-2 desktop:grid-cols-1",L),children:a?.map((x,C)=>e(fe,{item:x,textConfig:i,benefitPayloadData:l},C))}),me=({textConfig:a})=>{const{isLogin:L,profile:i,variant:l,renderInstallments:x,onUseCouponChange:C,onUseMemberDiscountChange:r,discount:y,savingDetail:B,openModal:S,openSignInPopup:N,openAuthCodePopup:P,openSignUpPopup:F,product:E}=O(),u=U(()=>E?.payload?.components?.find(t=>t.componentKey==="ProductBenefits")?.data||{},[E?.payload]),[Y,G]=W(!1),K=se({variant:l}),{locale:b="us",copyWriting:J}=q(),I=re(null),Q={...ue,...a},{activated:X=!1}=i||{},{memberDiscount:m,commonCoupon:f,creditsRedemption:k,freeGift:j,bundle:H,paidShipping:ee,fullGift:A,levelDiscount:V}=K,o=U(()=>{const t=u?.benefitTabs?.find(c=>c?.value==="coupon")??{},s=u?.benefitTabs?.find(c=>c?.value==="membership")??{},w=u?.benefitTabs?.find(c=>c?.value==="installment")??{},D=u?.benefitTabs?.find(c=>c?.value==="pay")??{};return{couponBenefitData:t,membershipBenefitData:s,installmentBenefitData:w,payBenefitData:D}},[u]),h=[f?.enable?{...f.config,isAutoUse:B?.coupon>0,useAble:!0,borderStyle:"rounded",code:f?.config?.title??"",description:f?.config?.desc??"",onUseChange:t=>{const s=t?y?.codeSavings??0:0;C?.(s)},title:R(o?.couponBenefitData?.commonCoupon?.offCoupon,{discount:f?.config?.value_type=="percentage"?Math.abs(Number(f?.config?.value||0))+"%":g({amount:Math.abs(Number(f?.config?.fixed_value||0)),currencyCode:l.price.currencyCode,locale:b})})}:null,m.enable?{useAble:!0,isAutoUse:!!i?.email&&!!B?.member,title:R(o?.couponBenefitData?.member?.offMemberOnly,{amount:g({amount:m?.config?.amount??0,currencyCode:l.price.currencyCode,locale:b})}),description:n(M,{children:[i?.email?o?.couponBenefitData?.member?.memberDiscounts:o?.membershipBenefitData?.memberBenefitsNotLogin?.replace("{amount}",g({amount:m?.config?.amount??0,currencyCode:l.price.currencyCode,locale:b}))??""," ",i?.email?"":e("span",{role:"button",tabIndex:0,onClick:()=>N?.(),className:"underline",children:o?.couponBenefitData?.member?.loginNow})]}),borderStyle:"rounded",onUseChange:t=>{if(i?.email){const s=t?m?.config?.amount??0:0;r?.(s)}else N?.()}}:null,V.enable?{title:V?.config?.title??"",description:V?.config?.tag??"",borderStyle:"inset",bgImage:{url:o?.couponBenefitData?.levelDiscount?.bgImage}}:null,j.enable?{title:j?.config?.title??"",description:o?.couponBenefitData?.freeGift?.selectFreeGift,borderStyle:"inset",bgImage:{url:o?.couponBenefitData?.freeGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,H.enable?{title:`${o?.couponBenefitData?.bundle?.bundleSaveUpTo} ${g({amount:Math.max(...H?.config?.bundleList?.map(t=>t.savings??0)??[]),currencyCode:l.price.currencyCode,locale:b})}`,borderStyle:"inset",description:o?.couponBenefitData?.bundle?.bundleOffer.replace("{count}",H?.config?.bundleList?.length?.toString()??""),bgImage:{url:o?.couponBenefitData?.bundle?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,A.enable?{title:A?.config?.title??"",description:A?.config?.desc??"",borderStyle:"inset",bgImage:{url:o?.couponBenefitData?.fullGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,k.enable?{title:o?.couponBenefitData?.creditsRedemption?.creditsTitle,description:o?.couponBenefitData?.creditsRedemption?.creditsDesc,borderStyle:"inset",bgImage:{url:o?.couponBenefitData?.creditsRedemption?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null].filter(Boolean);le(()=>{_(h?.length?"coupon":"membership")},[]);const[z,_]=W("coupon"),te=()=>{P?.()};if(!d)return null;const oe=(t,s)=>{if(_(s),I.current){const w=I.current,D=t.currentTarget,c=D.offsetLeft-w.offsetWidth/2+D.offsetWidth/2;w.scrollTo({left:c,behavior:"smooth"})}},ne=U(()=>u?.benefitTabs?.map(t=>t?.value==="coupon"&&!h?.length?null:t).filter(Boolean),[u,h]);return n(d,{className:"relative",id:"ipc-product-detail-benefits-tabs",onValueChange:t=>_(t),value:z,children:[e("div",{className:"absolute right-0 z-[1] top-0 w-[25px] h-[40px] bg-gradient-to-r from-transparent to-[#EAEAEC]"}),e(d.List,{ref:I,children:ne?.map(t=>e(d.Trigger,{className:Z(z===t.value&&"text-[#1D1D1F]"),value:t.value,onClick:s=>oe(s,t?.value),children:t.label},t?.value))}),e("style",{global:!0,jsx:!0,children:`
18
18
  .benefits-tabs-content::-webkit-scrollbar {
19
19
  width: 4px; /* \u6EDA\u52A8\u6761\u5BBD\u5EA6 */
20
20
  height: 64px; /* \u6A2A\u5411\u6EDA\u52A8\u6761\u9AD8\u5EA6 */
@@ -32,9 +32,9 @@ import{Fragment as B,jsx as e,jsxs as o}from"react/jsx-runtime";import{Button as
32
32
  .benefits-tabs-content::-webkit-scrollbar-thumb:hover {
33
33
  background-color: rgba(100, 100, 100, 0.6);
34
34
  }
35
- `}),N?.length?e(c.Content,{value:"coupon",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px]",children:e("div",{className:"p-3 lg-desktop:p-4",children:e(le,{coupons:N,className:"",textConfig:n})})}):null,e(c.Content,{value:"membership",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px]",children:o("div",{className:"p-3 lg-desktop:p-4",children:[!i?.email&&e("h3",{className:"mb-2 text-left text-lg font-bold",children:n.memberBenefitsNotLoginText}),e("div",{className:`rounded-[16px] ${i?.email?"max-h-[240px]":"max-h-[160px]"}`,children:o("ul",{className:`list-none [&_li:first-child]:rounded-t-[16px]
35
+ `}),h?.length?e(d.Content,{value:"coupon",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px]",children:e("div",{className:"p-3 lg-desktop:p-4",children:e(be,{coupons:h,textConfig:Q,benefitPayloadData:o})})}):null,e(d.Content,{value:"membership",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px]",children:n("div",{className:"p-3 lg-desktop:p-4",children:[!i?.email&&e("h3",{className:"mb-2 text-left text-lg font-bold",children:o?.membershipBenefitData?.memberBenefitsNotLoginText}),e("div",{className:"rounded-[16px]",children:n("ul",{className:`list-none [&_li:first-child]:rounded-t-[16px]
36
36
  [&_li:last-child]:rounded-b-[16px] [&_li:last-child]:last:border-b-0 [&_li]:flex [&_li]:items-center [&_li]:gap-2
37
37
  [&_li]:border-b [&_li]:border-b-[#E4E5E6] [&_li]:bg-white [&_li]:px-4
38
38
  [&_li]:py-4
39
- [&_li]:text-left`,children:[u.enable&&o("li",{className:"justify-between",children:[o("div",{className:"flex gap-2",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:e("path",{d:"M20 3.5C21.6569 3.5 23 4.84315 23 6.5V9.65625C23 10.0791 22.7342 10.4566 22.3359 10.5986C21.6665 10.8372 21.1816 11.4844 21.1816 12.25C21.1816 13.0156 21.6665 13.6628 22.3359 13.9014C22.7342 14.0434 23 14.4209 23 14.8438V18C23 19.6569 21.6569 21 20 21H4C2.34315 21 1 19.6569 1 18V14.8438L1.01172 14.6875C1.06803 14.3301 1.31557 14.0256 1.66406 13.9014C2.33345 13.6628 2.81836 13.0156 2.81836 12.25C2.81836 11.4844 2.33345 10.8372 1.66406 10.5986C1.26583 10.4566 1 10.0791 1 9.65625V6.5C1 4.84315 2.34315 3.5 4 3.5H20ZM4 5.5C3.44772 5.5 3 5.94772 3 6.5V9.03125C4.08987 9.68678 4.81836 10.8833 4.81836 12.25C4.81836 13.6165 4.08963 14.8122 3 15.4678V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V15.4678C19.9104 14.8122 19.1816 13.6165 19.1816 12.25C19.1816 10.8833 19.9101 9.68677 21 9.03125V6.5C21 5.94772 20.5523 5.5 20 5.5H4ZM15.793 6.79297C16.1835 6.40244 16.8165 6.40244 17.207 6.79297C17.5976 7.18349 17.5976 7.81651 17.207 8.20703L8.20703 17.207C7.81651 17.5976 7.18349 17.5976 6.79297 17.207C6.40244 16.8165 6.40244 16.1835 6.79297 15.793L15.793 6.79297ZM15.25 13.25C16.3546 13.25 17.25 14.1454 17.25 15.25C17.25 16.3546 16.3546 17.25 15.25 17.25C14.1454 17.25 13.25 16.3546 13.25 15.25C13.25 14.1454 14.1454 13.25 15.25 13.25ZM15.25 14.75C14.9739 14.75 14.75 14.9739 14.75 15.25C14.75 15.5261 14.9739 15.75 15.25 15.75C15.5261 15.75 15.75 15.5261 15.75 15.25C15.75 14.9739 15.5261 14.75 15.25 14.75ZM8.75 6.75C9.85457 6.75 10.75 7.64543 10.75 8.75C10.75 9.85457 9.85457 10.75 8.75 10.75C7.64543 10.75 6.75 9.85457 6.75 8.75C6.75 7.64543 7.64543 6.75 8.75 6.75ZM8.75 8.25C8.47386 8.25 8.25 8.47386 8.25 8.75C8.25 9.02614 8.47386 9.25 8.75 9.25C9.02614 9.25 9.25 9.02614 9.25 8.75C9.25 8.47386 9.02614 8.25 8.75 8.25Z",fill:"#1D1D1F"})}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:H(n.forNewMember,{amount:m({amount:u?.config?.amount??0,currencyCode:l.price.currencyCode,locale:f})})})]}),!!i?.email&&e(V,{})]}),W?.items?.map((s,r)=>s.modalText?o("li",{className:"justify-between",children:[o("button",{onClick:()=>w?.({title:s.text,content:s.modalText}),className:"flex justify-between",children:[e(A,{source:s.icon,alt:s.text,className:"mr-[8px] size-[20px] shrink-0"}),e(p,{className:"text-left text-[16px] font-bold x:text-[14px]",children:s.text})]},r),!!i?.email&&e(V,{})]},r):o("li",{className:"justify-between",children:[o("div",{className:"flex gap-2",children:[e(A,{source:s.icon,alt:s.text,className:"mr-[8px] size-[20px] shrink-0"}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:s.text})]}),!!i?.email&&e(V,{})]},r)),O.enable?o("li",{children:[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M19 3C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H10V16H21C21.5523 16 22 16.4477 22 17C22 17.5523 21.5523 18 21 18H19.9961C19.9961 19.6559 18.6547 21 16.998 21C15.3414 21 14 19.6559 14 18H10C10 19.6568 8.65684 21 7 21C5.34317 21 4 19.6568 4 18H2C1.44772 18 1 17.5523 1 17V10.6738L1.00488 10.5771C1.02632 10.3554 1.12145 10.146 1.27637 9.9834L4.77637 6.31055L4.84961 6.24023C5.02993 6.08586 5.26042 6 5.5 6H8V5C8 3.89544 8.89541 3 10 3H19ZM6.00488 18.1025C6.05622 18.6067 6.48234 19 7 19C7.51766 19 7.94378 18.6067 7.99512 18.1025L8 18H6L6.00488 18.1025ZM16.0049 18.1025C16.0561 18.6074 16.4823 19 16.998 19C17.5138 19 17.94 18.6074 17.9912 18.1025L17.9961 18H16L16.0049 18.1025ZM3 11.0723V16H8V8H5.92773L3 11.0723ZM21.6621 6.8252C22.0348 6.41765 22.6676 6.38902 23.0752 6.76172C23.4827 7.13443 23.5104 7.76725 23.1377 8.1748L18.0518 13.7363C17.6625 14.162 17.003 14.1954 16.5732 13.8105L13.333 10.9092C12.9216 10.5408 12.8865 9.90853 13.2549 9.49707C13.6232 9.08565 14.2555 9.05066 14.667 9.41895L17.208 11.6943L21.6621 6.8252Z",fill:"#1D1D1F"})}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:n.expressShipping})]}):null,y.enable?o("li",{children:[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM17 13C17.5523 13 18 13.4477 18 14C18 14.5523 17.5523 15 17 15H9.41406L9.70703 15.293C10.0976 15.6835 10.0976 16.3165 9.70703 16.707C9.31651 17.0976 8.68349 17.0976 8.29297 16.707L6.29297 14.707C6.00697 14.421 5.92139 13.9909 6.07617 13.6172C6.23098 13.2436 6.59558 13 7 13H17ZM14.293 7.29297C14.6835 6.90244 15.3165 6.90244 15.707 7.29297L17.707 9.29297C17.993 9.57897 18.0786 10.0091 17.9238 10.3828C17.769 10.7564 17.4044 11 17 11H7C6.44772 11 6 10.5523 6 10C6 9.44771 6.44772 9 7 9H14.5859L14.293 8.70703C13.9024 8.31651 13.9024 7.68349 14.293 7.29297Z",fill:"#1D1D1F"})}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:z?y?.config?.label?.replace("{{amount}}",m({amount:y?.config?.amount??0,currencyCode:l.price.currencyCode,locale:f})):o(B,{children:[n.creditsAfterActivation,e("span",{role:"button",tabIndex:0,onClick:()=>Y(),className:"underline",children:n.active})]})})]}):null]})}),!i?.email&&e("div",{className:"px-4 pt-4",children:e(J,{variant:"primary",className:"w-full",onClick:()=>E?.(),children:j?.signUp})})]})}),e(c.Content,{value:"installment",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px] ",children:o("div",{className:"p-3 lg-desktop:p-4",children:[e(Q,{size:2,className:"mb-2 text-left text-lg font-bold",children:n.flexibleInstallment}),e("div",{className:"overflow-hidden rounded-[16px] p-3 lg-desktop:p-4 bg-white",children:b})]})})]})},V=t=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...t,children:e("path",{d:"M4 9.19472L8.51935 13.667L16.2668 6.00024",stroke:"#2BBC4F",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});var Ne=ae;export{Ne as default};
39
+ [&_li]:text-left`,children:[m.enable&&n("li",{className:"justify-between",children:[n("div",{className:"flex gap-2",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:e("path",{d:"M20 3.5C21.6569 3.5 23 4.84315 23 6.5V9.65625C23 10.0791 22.7342 10.4566 22.3359 10.5986C21.6665 10.8372 21.1816 11.4844 21.1816 12.25C21.1816 13.0156 21.6665 13.6628 22.3359 13.9014C22.7342 14.0434 23 14.4209 23 14.8438V18C23 19.6569 21.6569 21 20 21H4C2.34315 21 1 19.6569 1 18V14.8438L1.01172 14.6875C1.06803 14.3301 1.31557 14.0256 1.66406 13.9014C2.33345 13.6628 2.81836 13.0156 2.81836 12.25C2.81836 11.4844 2.33345 10.8372 1.66406 10.5986C1.26583 10.4566 1 10.0791 1 9.65625V6.5C1 4.84315 2.34315 3.5 4 3.5H20ZM4 5.5C3.44772 5.5 3 5.94772 3 6.5V9.03125C4.08987 9.68678 4.81836 10.8833 4.81836 12.25C4.81836 13.6165 4.08963 14.8122 3 15.4678V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V15.4678C19.9104 14.8122 19.1816 13.6165 19.1816 12.25C19.1816 10.8833 19.9101 9.68677 21 9.03125V6.5C21 5.94772 20.5523 5.5 20 5.5H4ZM15.793 6.79297C16.1835 6.40244 16.8165 6.40244 17.207 6.79297C17.5976 7.18349 17.5976 7.81651 17.207 8.20703L8.20703 17.207C7.81651 17.5976 7.18349 17.5976 6.79297 17.207C6.40244 16.8165 6.40244 16.1835 6.79297 15.793L15.793 6.79297ZM15.25 13.25C16.3546 13.25 17.25 14.1454 17.25 15.25C17.25 16.3546 16.3546 17.25 15.25 17.25C14.1454 17.25 13.25 16.3546 13.25 15.25C13.25 14.1454 14.1454 13.25 15.25 13.25ZM15.25 14.75C14.9739 14.75 14.75 14.9739 14.75 15.25C14.75 15.5261 14.9739 15.75 15.25 15.75C15.5261 15.75 15.75 15.5261 15.75 15.25C15.75 14.9739 15.5261 14.75 15.25 14.75ZM8.75 6.75C9.85457 6.75 10.75 7.64543 10.75 8.75C10.75 9.85457 9.85457 10.75 8.75 10.75C7.64543 10.75 6.75 9.85457 6.75 8.75C6.75 7.64543 7.64543 6.75 8.75 6.75ZM8.75 8.25C8.47386 8.25 8.25 8.47386 8.25 8.75C8.25 9.02614 8.47386 9.25 8.75 9.25C9.02614 9.25 9.25 9.02614 9.25 8.75C9.25 8.47386 9.02614 8.25 8.75 8.25Z",fill:"#1D1D1F"})}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:R(o?.membershipBenefitData?.forNewMember,{amount:g({amount:m?.config?.amount??0,currencyCode:l.price.currencyCode,locale:b})})})]}),!!i?.email&&e(T,{})]}),o?.membershipBenefitData?.equities?.map((t,s)=>t.modalText?n("li",{className:"justify-between gap-2",children:[n("button",{onClick:()=>S?.({title:t.label,content:t.modalText}),className:"flex justify-between",children:[e(v,{source:t.icon,alt:t.text,className:"size-6 shrink-0"}),e(p,{className:"text-left text-[16px] font-bold x:text-[14px]",children:t.text})]},s),!!i?.email&&e(T,{})]},s):n("li",{className:"justify-between",children:[n("div",{className:"flex gap-2",children:[e(v,{source:t.icon,alt:t.text,className:" size-6 shrink-0"}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:t.label})]}),!!i?.email&&e(T,{})]},s)),ee.enable?n("li",{className:"justify-between",children:[n("div",{className:"flex gap-2",children:[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M19 3C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H10V16H21C21.5523 16 22 16.4477 22 17C22 17.5523 21.5523 18 21 18H19.9961C19.9961 19.6559 18.6547 21 16.998 21C15.3414 21 14 19.6559 14 18H10C10 19.6568 8.65684 21 7 21C5.34317 21 4 19.6568 4 18H2C1.44772 18 1 17.5523 1 17V10.6738L1.00488 10.5771C1.02632 10.3554 1.12145 10.146 1.27637 9.9834L4.77637 6.31055L4.84961 6.24023C5.02993 6.08586 5.26042 6 5.5 6H8V5C8 3.89544 8.89541 3 10 3H19ZM6.00488 18.1025C6.05622 18.6067 6.48234 19 7 19C7.51766 19 7.94378 18.6067 7.99512 18.1025L8 18H6L6.00488 18.1025ZM16.0049 18.1025C16.0561 18.6074 16.4823 19 16.998 19C17.5138 19 17.94 18.6074 17.9912 18.1025L17.9961 18H16L16.0049 18.1025ZM3 11.0723V16H8V8H5.92773L3 11.0723ZM21.6621 6.8252C22.0348 6.41765 22.6676 6.38902 23.0752 6.76172C23.4827 7.13443 23.5104 7.76725 23.1377 8.1748L18.0518 13.7363C17.6625 14.162 17.003 14.1954 16.5732 13.8105L13.333 10.9092C12.9216 10.5408 12.8865 9.90853 13.2549 9.49707C13.6232 9.08565 14.2555 9.05066 14.667 9.41895L17.208 11.6943L21.6621 6.8252Z",fill:"#1D1D1F"})}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:o?.membershipBenefitData?.expressShipping})]}),!!i?.email&&e(T,{})]}):null,k.enable?n("li",{children:[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM17 13C17.5523 13 18 13.4477 18 14C18 14.5523 17.5523 15 17 15H9.41406L9.70703 15.293C10.0976 15.6835 10.0976 16.3165 9.70703 16.707C9.31651 17.0976 8.68349 17.0976 8.29297 16.707L6.29297 14.707C6.00697 14.421 5.92139 13.9909 6.07617 13.6172C6.23098 13.2436 6.59558 13 7 13H17ZM14.293 7.29297C14.6835 6.90244 15.3165 6.90244 15.707 7.29297L17.707 9.29297C17.993 9.57897 18.0786 10.0091 17.9238 10.3828C17.769 10.7564 17.4044 11 17 11H7C6.44772 11 6 10.5523 6 10C6 9.44771 6.44772 9 7 9H14.5859L14.293 8.70703C13.9024 8.31651 13.9024 7.68349 14.293 7.29297Z",fill:"#1D1D1F"})}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",children:X?k?.config?.label?.replace("{{amount}}",g({amount:k?.config?.amount??0,currencyCode:l.price.currencyCode,locale:b})):n(M,{children:[o?.membershipBenefitData?.creditsAfterActivation,e("span",{role:"button",tabIndex:0,onClick:()=>te(),className:"underline",children:o?.membershipBenefitData?.active})]})})]}):null]})}),!i?.email&&e("div",{className:"px-4 pt-4",children:e(ae,{variant:"primary",className:"w-full",onClick:()=>F?.(),children:J?.signUp})})]})}),n(d.Content,{value:"pay",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px] ",children:[n("div",{className:"p-3 lg-desktop:p-4",children:[e($,{size:2,className:"mb-2 text-left text-lg font-bold",children:o?.payBenefitData?.payMethod}),n("div",{className:"flex items-center gap-2 justify-between rounded-[16px] p-3 lg-desktop:p-4 bg-white",children:[n("div",{className:"flex items-center gap-2",children:[e(v,{source:o?.payBenefitData?.icon,className:"size-[40px] h-[20px] desktop:size-[70px] desktop:h-[34px] shrink-0"}),e(p,{as:"p",className:"text-left text-[16px] font-bold x:text-[14px]",html:o?.payBenefitData?.withCheckout})]}),e("button",{className:"underline text-brand-0 whitespace-nowrap text-sm font-bold desktop:text-[16px]",onClick:()=>G(!0),children:o?.payBenefitData?.learnMore})]})]}),e(de,{showModal:Y,closeModal:()=>G(!1),children:e(v,{source:o?.payBenefitData?.payImage})})]}),e(d.Content,{value:"installment",className:"benefits-tabs-content overflow-y-auto lg-desktop:h-[240px] desktop:h-[196px] h-[180px] laptop:h-[220px] ",children:n("div",{className:"p-3 lg-desktop:p-4",children:[e($,{size:2,className:"mb-2 text-left text-lg font-bold",children:o?.installmentBenefitData?.flexibleInstallment}),e("div",{className:"overflow-hidden rounded-[16px] p-3 lg-desktop:p-4 bg-white",children:x})]})})]})},T=a=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...a,children:e("path",{d:"M4 9.19472L8.51935 13.667L16.2668 6.00024",stroke:"#2BBC4F",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});var Le=me;export{Le as default};
40
40
  //# sourceMappingURL=BenefitsTab.js.map