@anker-in/campaign-ui 0.1.10 → 0.2.0

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 (614) hide show
  1. package/dist/cjs/components/chat/action.js +1 -1
  2. package/dist/cjs/components/chat/action.js.map +1 -1
  3. package/dist/cjs/components/chat/button.d.ts +1 -1
  4. package/dist/cjs/components/chat/button.js +1 -1
  5. package/dist/cjs/components/chat/button.js.map +1 -1
  6. package/dist/cjs/components/chat/index.js +1 -1
  7. package/dist/cjs/components/chat/index.js.map +2 -2
  8. package/dist/cjs/components/chat/{Messages.d.ts → messages.d.ts} +1 -1
  9. package/dist/cjs/components/chat/messages.js +1 -1
  10. package/dist/cjs/components/chat/messages.js.map +2 -2
  11. package/dist/cjs/components/chat/props.js +1 -1
  12. package/dist/cjs/components/chat/props.js.map +2 -2
  13. package/dist/cjs/components/chat/response.js +1 -1
  14. package/dist/cjs/components/chat/response.js.map +2 -2
  15. package/dist/cjs/components/chat/suggestions.d.ts +1 -1
  16. package/dist/cjs/components/chat/suggestions.js.map +1 -1
  17. package/dist/cjs/components/credits/context/const.d.ts +82 -0
  18. package/dist/cjs/components/credits/context/const.js +2 -0
  19. package/dist/cjs/components/credits/context/const.js.map +7 -0
  20. package/dist/cjs/components/credits/context/hooks/useActivities.d.ts +12 -0
  21. package/dist/cjs/components/credits/context/hooks/useActivities.js +2 -0
  22. package/dist/cjs/components/credits/context/hooks/useActivities.js.map +7 -0
  23. package/dist/cjs/components/credits/context/hooks/useAddressValidate.d.ts +34 -0
  24. package/dist/cjs/components/credits/context/hooks/useAddressValidate.js +2 -0
  25. package/dist/cjs/components/credits/context/hooks/useAddressValidate.js.map +7 -0
  26. package/dist/cjs/components/credits/context/hooks/useAlpcFetch.d.ts +23 -0
  27. package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js +2 -0
  28. package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js.map +7 -0
  29. package/dist/cjs/components/credits/context/hooks/useClickOutside.d.ts +3 -0
  30. package/dist/cjs/components/credits/context/hooks/useClickOutside.js +2 -0
  31. package/dist/cjs/components/credits/context/hooks/useClickOutside.js.map +7 -0
  32. package/dist/cjs/components/credits/context/hooks/useCopy.d.ts +5 -0
  33. package/dist/cjs/components/credits/context/hooks/useCopy.js +2 -0
  34. package/dist/cjs/components/credits/context/hooks/useCopy.js.map +7 -0
  35. package/dist/cjs/components/credits/context/hooks/useCountries.d.ts +8 -0
  36. package/dist/cjs/components/credits/context/hooks/useCountries.js +2 -0
  37. package/dist/cjs/components/credits/context/hooks/useCountries.js.map +7 -0
  38. package/dist/cjs/components/credits/context/hooks/useFirstPurchaseFinished.d.ts +1 -0
  39. package/dist/cjs/components/credits/context/hooks/useFirstPurchaseFinished.js +2 -0
  40. package/dist/cjs/components/credits/context/hooks/useFirstPurchaseFinished.js.map +7 -0
  41. package/dist/cjs/components/credits/context/hooks/useMyRewards.d.ts +14 -0
  42. package/dist/cjs/components/credits/context/hooks/useMyRewards.js +2 -0
  43. package/dist/cjs/components/credits/context/hooks/useMyRewards.js.map +7 -0
  44. package/dist/cjs/components/credits/context/hooks/useReceiptUploaded.d.ts +2 -0
  45. package/dist/cjs/components/credits/context/hooks/useReceiptUploaded.js +2 -0
  46. package/dist/cjs/components/credits/context/hooks/useReceiptUploaded.js.map +7 -0
  47. package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.d.ts +9 -0
  48. package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js +2 -0
  49. package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js.map +7 -0
  50. package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.d.ts +18 -0
  51. package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js +2 -0
  52. package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js.map +7 -0
  53. package/dist/cjs/components/credits/context/hooks/useRedeemProduct.d.ts +16 -0
  54. package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js +2 -0
  55. package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js.map +7 -0
  56. package/dist/cjs/components/credits/context/hooks/useRedeemableList.d.ts +7 -0
  57. package/dist/cjs/components/credits/context/hooks/useRedeemableList.js +2 -0
  58. package/dist/cjs/components/credits/context/hooks/useRedeemableList.js.map +7 -0
  59. package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.d.ts +1 -0
  60. package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js +2 -0
  61. package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js.map +7 -0
  62. package/dist/cjs/components/credits/context/hooks/useSubscribed.d.ts +1 -0
  63. package/dist/cjs/components/credits/context/hooks/useSubscribed.js +2 -0
  64. package/dist/cjs/components/credits/context/hooks/useSubscribed.js.map +7 -0
  65. package/dist/cjs/components/credits/context/hooks/useSubscriptions.d.ts +9 -0
  66. package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +2 -0
  67. package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +7 -0
  68. package/dist/cjs/components/credits/context/hooks/useUploadReceipt.d.ts +14 -0
  69. package/dist/cjs/components/credits/context/hooks/useUploadReceipt.js +2 -0
  70. package/dist/cjs/components/credits/context/hooks/useUploadReceipt.js.map +7 -0
  71. package/dist/cjs/components/credits/context/provider.d.ts +49 -0
  72. package/dist/cjs/components/credits/context/provider.js +2 -0
  73. package/dist/cjs/components/credits/context/provider.js.map +7 -0
  74. package/dist/cjs/components/credits/context/response.d.ts +63 -0
  75. package/dist/cjs/components/credits/context/response.js +2 -0
  76. package/dist/cjs/components/credits/context/response.js.map +7 -0
  77. package/dist/cjs/components/credits/context/utils.d.ts +25 -0
  78. package/dist/cjs/components/credits/context/utils.js +2 -0
  79. package/dist/cjs/components/credits/context/utils.js.map +7 -0
  80. package/dist/cjs/components/credits/creditsBanner/index.d.ts +23 -0
  81. package/dist/cjs/components/credits/creditsBanner/index.js +2 -0
  82. package/dist/cjs/components/credits/creditsBanner/index.js.map +7 -0
  83. package/dist/cjs/components/credits/creditsBenefits/benefitItem.d.ts +19 -0
  84. package/dist/cjs/components/credits/creditsBenefits/benefitItem.js +2 -0
  85. package/dist/cjs/components/credits/creditsBenefits/benefitItem.js.map +7 -0
  86. package/dist/cjs/components/credits/creditsBenefits/iconInfo.d.ts +2 -0
  87. package/dist/cjs/components/credits/creditsBenefits/iconInfo.js +2 -0
  88. package/dist/cjs/components/credits/creditsBenefits/iconInfo.js.map +7 -0
  89. package/dist/cjs/components/credits/creditsBenefits/index.d.ts +12 -0
  90. package/dist/cjs/components/credits/creditsBenefits/index.js +4 -0
  91. package/dist/cjs/components/credits/creditsBenefits/index.js.map +7 -0
  92. package/dist/cjs/components/credits/creditsCash/RedeemableItem.d.ts +13 -0
  93. package/dist/cjs/components/credits/creditsCash/RedeemableItem.js +2 -0
  94. package/dist/cjs/components/credits/creditsCash/RedeemableItem.js.map +7 -0
  95. package/dist/cjs/components/credits/creditsCash/index.d.ts +11 -0
  96. package/dist/cjs/components/credits/creditsCash/index.js +2 -0
  97. package/dist/cjs/components/credits/creditsCash/index.js.map +7 -0
  98. package/dist/cjs/components/credits/creditsCash/type.d.ts +47 -0
  99. package/dist/cjs/components/credits/creditsCash/type.js +2 -0
  100. package/dist/cjs/components/credits/creditsCash/type.js.map +7 -0
  101. package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.d.ts +13 -0
  102. package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js +2 -0
  103. package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js.map +7 -0
  104. package/dist/cjs/components/credits/creditsFaq/index.d.ts +16 -0
  105. package/dist/cjs/components/credits/creditsFaq/index.js +2 -0
  106. package/dist/cjs/components/credits/creditsFaq/index.js.map +7 -0
  107. package/dist/cjs/components/credits/creditsInfoCard/index.d.ts +20 -0
  108. package/dist/cjs/components/credits/creditsInfoCard/index.js +2 -0
  109. package/dist/cjs/components/credits/creditsInfoCard/index.js.map +7 -0
  110. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.d.ts +14 -0
  111. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js +2 -0
  112. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +7 -0
  113. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.d.ts +6 -0
  114. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.js +2 -0
  115. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/FormItem.js.map +7 -0
  116. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.d.ts +13 -0
  117. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.js +2 -0
  118. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/Input.js.map +7 -0
  119. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.d.ts +15 -0
  120. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js +2 -0
  121. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +7 -0
  122. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.d.ts +2 -0
  123. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js +2 -0
  124. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js.map +7 -0
  125. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.d.ts +26 -0
  126. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.js +2 -0
  127. package/dist/cjs/components/credits/creditsRedeemList/AddressForm/type.js.map +7 -0
  128. package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.d.ts +6 -0
  129. package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.js +2 -0
  130. package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.js.map +7 -0
  131. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +9 -0
  132. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +2 -0
  133. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +7 -0
  134. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.d.ts +20 -0
  135. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js +2 -0
  136. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +7 -0
  137. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.d.ts +8 -0
  138. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js +2 -0
  139. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js.map +7 -0
  140. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.d.ts +11 -0
  141. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js +2 -0
  142. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +7 -0
  143. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.d.ts +6 -0
  144. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +2 -0
  145. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +7 -0
  146. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.d.ts +8 -0
  147. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +2 -0
  148. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +7 -0
  149. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.d.ts +13 -0
  150. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js +2 -0
  151. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +7 -0
  152. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.d.ts +11 -0
  153. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js +2 -0
  154. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +7 -0
  155. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.d.ts +9 -0
  156. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js +2 -0
  157. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js.map +7 -0
  158. package/dist/cjs/components/credits/creditsRedeemList/index.d.ts +12 -0
  159. package/dist/cjs/components/credits/creditsRedeemList/index.js +2 -0
  160. package/dist/cjs/components/credits/creditsRedeemList/index.js.map +7 -0
  161. package/dist/cjs/components/credits/creditsRedeemList/type.d.ts +77 -0
  162. package/dist/cjs/components/credits/creditsRedeemList/type.js +2 -0
  163. package/dist/cjs/components/credits/creditsRedeemList/type.js.map +7 -0
  164. package/dist/cjs/components/credits/creditsWaysToGetCredits/index.d.ts +2 -0
  165. package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js +2 -0
  166. package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js.map +7 -0
  167. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.d.ts +59 -0
  168. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js +2 -0
  169. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js.map +7 -0
  170. package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.d.ts +96 -0
  171. package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js +2 -0
  172. package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js.map +7 -0
  173. package/dist/cjs/components/credits/index.d.ts +10 -0
  174. package/dist/cjs/components/credits/index.js +2 -0
  175. package/dist/cjs/components/credits/index.js.map +7 -0
  176. package/dist/cjs/components/credits/modal/MyRewardsModal.d.ts +32 -0
  177. package/dist/cjs/components/credits/modal/MyRewardsModal.js +2 -0
  178. package/dist/cjs/components/credits/modal/MyRewardsModal.js.map +7 -0
  179. package/dist/cjs/components/credits/modal/activitiesModal.d.ts +32 -0
  180. package/dist/cjs/components/credits/modal/activitiesModal.js +2 -0
  181. package/dist/cjs/components/credits/modal/activitiesModal.js.map +7 -0
  182. package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.d.ts +24 -0
  183. package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.js +2 -0
  184. package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.js.map +7 -0
  185. package/dist/cjs/components/credits/modal/loadingDots.d.ts +6 -0
  186. package/dist/cjs/components/credits/modal/loadingDots.js +2 -0
  187. package/dist/cjs/components/credits/modal/loadingDots.js.map +7 -0
  188. package/dist/cjs/components/credits/modal/modalContainer.d.ts +15 -0
  189. package/dist/cjs/components/credits/modal/modalContainer.js +2 -0
  190. package/dist/cjs/components/credits/modal/modalContainer.js.map +7 -0
  191. package/dist/cjs/components/credits/modal/rulesModal.d.ts +7 -0
  192. package/dist/cjs/components/credits/modal/rulesModal.js +2 -0
  193. package/dist/cjs/components/credits/modal/rulesModal.js.map +7 -0
  194. package/dist/cjs/components/credits/modal/tip.d.ts +5 -0
  195. package/dist/cjs/components/credits/modal/tip.js +2 -0
  196. package/dist/cjs/components/credits/modal/tip.js.map +7 -0
  197. package/dist/cjs/components/credits/type.d.ts +55 -0
  198. package/dist/cjs/components/credits/type.js +2 -0
  199. package/dist/cjs/components/credits/type.js.map +7 -0
  200. package/dist/cjs/components/index.d.ts +3 -2
  201. package/dist/cjs/components/index.js +1 -1
  202. package/dist/cjs/components/index.js.map +3 -3
  203. package/dist/cjs/components/registration/authCodeActivate/Message.d.ts +4 -0
  204. package/dist/cjs/components/registration/authCodeActivate/Message.js +2 -0
  205. package/dist/cjs/components/registration/authCodeActivate/Message.js.map +7 -0
  206. package/dist/cjs/components/registration/authCodeActivate/index.d.ts +3 -0
  207. package/dist/cjs/components/registration/authCodeActivate/index.js +2 -0
  208. package/dist/cjs/components/registration/authCodeActivate/index.js.map +7 -0
  209. package/dist/cjs/components/registration/authCodeActivate/type.d.ts +23 -0
  210. package/dist/cjs/components/registration/authCodeActivate/type.js +2 -0
  211. package/dist/cjs/components/registration/authCodeActivate/type.js.map +7 -0
  212. package/dist/cjs/components/registration/index.d.ts +1 -0
  213. package/dist/cjs/components/registration/index.js +2 -0
  214. package/dist/cjs/components/registration/index.js.map +7 -0
  215. package/dist/cjs/components/registration/modalContainer.d.ts +15 -0
  216. package/dist/cjs/components/registration/modalContainer.js +2 -0
  217. package/dist/cjs/components/registration/modalContainer.js.map +7 -0
  218. package/dist/cjs/debug-env.d.ts +7 -0
  219. package/dist/cjs/debug-env.js +2 -0
  220. package/dist/cjs/debug-env.js.map +7 -0
  221. package/dist/cjs/helpers/fetcher.js +1 -1
  222. package/dist/cjs/helpers/fetcher.js.map +2 -2
  223. package/dist/cjs/helpers/index.d.ts +2 -2
  224. package/dist/cjs/helpers/index.js +1 -1
  225. package/dist/cjs/helpers/index.js.map +2 -2
  226. package/dist/cjs/helpers/track.d.ts +19 -0
  227. package/dist/cjs/helpers/track.js +2 -0
  228. package/dist/cjs/helpers/track.js.map +7 -0
  229. package/dist/cjs/index.d.ts +1 -1
  230. package/dist/cjs/index.js +1 -1
  231. package/dist/cjs/index.js.map +2 -2
  232. package/dist/cjs/stories/chat.stories.d.ts +1 -1
  233. package/dist/cjs/stories/chat.stories.js +1 -1
  234. package/dist/cjs/stories/chat.stories.js.map +3 -3
  235. package/dist/esm/components/chat/action.js +1 -1
  236. package/dist/esm/components/chat/action.js.map +1 -1
  237. package/dist/esm/components/chat/button.d.ts +1 -1
  238. package/dist/esm/components/chat/button.js +1 -1
  239. package/dist/esm/components/chat/button.js.map +1 -1
  240. package/dist/esm/components/chat/index.js +1 -1
  241. package/dist/esm/components/chat/index.js.map +2 -2
  242. package/dist/esm/components/chat/{Messages.d.ts → messages.d.ts} +1 -1
  243. package/dist/esm/components/chat/messages.js +1 -1
  244. package/dist/esm/components/chat/messages.js.map +2 -2
  245. package/dist/esm/components/chat/props.js +0 -1
  246. package/dist/esm/components/chat/props.js.map +3 -3
  247. package/dist/esm/components/chat/response.js +1 -1
  248. package/dist/esm/components/chat/response.js.map +2 -2
  249. package/dist/esm/components/chat/suggestions.d.ts +1 -1
  250. package/dist/esm/components/chat/suggestions.js.map +1 -1
  251. package/dist/esm/components/credits/context/const.d.ts +82 -0
  252. package/dist/esm/components/credits/context/const.js +2 -0
  253. package/dist/esm/components/credits/context/const.js.map +7 -0
  254. package/dist/esm/components/credits/context/hooks/useActivities.d.ts +12 -0
  255. package/dist/esm/components/credits/context/hooks/useActivities.js +2 -0
  256. package/dist/esm/components/credits/context/hooks/useActivities.js.map +7 -0
  257. package/dist/esm/components/credits/context/hooks/useAddressValidate.d.ts +34 -0
  258. package/dist/esm/components/credits/context/hooks/useAddressValidate.js +2 -0
  259. package/dist/esm/components/credits/context/hooks/useAddressValidate.js.map +7 -0
  260. package/dist/esm/components/credits/context/hooks/useAlpcFetch.d.ts +23 -0
  261. package/dist/esm/components/credits/context/hooks/useAlpcFetch.js +2 -0
  262. package/dist/esm/components/credits/context/hooks/useAlpcFetch.js.map +7 -0
  263. package/dist/esm/components/credits/context/hooks/useClickOutside.d.ts +3 -0
  264. package/dist/esm/components/credits/context/hooks/useClickOutside.js +2 -0
  265. package/dist/esm/components/credits/context/hooks/useClickOutside.js.map +7 -0
  266. package/dist/esm/components/credits/context/hooks/useCopy.d.ts +5 -0
  267. package/dist/esm/components/credits/context/hooks/useCopy.js +2 -0
  268. package/dist/esm/components/credits/context/hooks/useCopy.js.map +7 -0
  269. package/dist/esm/components/credits/context/hooks/useCountries.d.ts +8 -0
  270. package/dist/esm/components/credits/context/hooks/useCountries.js +2 -0
  271. package/dist/esm/components/credits/context/hooks/useCountries.js.map +7 -0
  272. package/dist/esm/components/credits/context/hooks/useFirstPurchaseFinished.d.ts +1 -0
  273. package/dist/esm/components/credits/context/hooks/useFirstPurchaseFinished.js +2 -0
  274. package/dist/esm/components/credits/context/hooks/useFirstPurchaseFinished.js.map +7 -0
  275. package/dist/esm/components/credits/context/hooks/useMyRewards.d.ts +14 -0
  276. package/dist/esm/components/credits/context/hooks/useMyRewards.js +2 -0
  277. package/dist/esm/components/credits/context/hooks/useMyRewards.js.map +7 -0
  278. package/dist/esm/components/credits/context/hooks/useReceiptUploaded.d.ts +2 -0
  279. package/dist/esm/components/credits/context/hooks/useReceiptUploaded.js +2 -0
  280. package/dist/esm/components/credits/context/hooks/useReceiptUploaded.js.map +7 -0
  281. package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.d.ts +9 -0
  282. package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js +2 -0
  283. package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js.map +7 -0
  284. package/dist/esm/components/credits/context/hooks/useRedeemCoupon.d.ts +18 -0
  285. package/dist/esm/components/credits/context/hooks/useRedeemCoupon.js +2 -0
  286. package/dist/esm/components/credits/context/hooks/useRedeemCoupon.js.map +7 -0
  287. package/dist/esm/components/credits/context/hooks/useRedeemProduct.d.ts +16 -0
  288. package/dist/esm/components/credits/context/hooks/useRedeemProduct.js +2 -0
  289. package/dist/esm/components/credits/context/hooks/useRedeemProduct.js.map +7 -0
  290. package/dist/esm/components/credits/context/hooks/useRedeemableList.d.ts +7 -0
  291. package/dist/esm/components/credits/context/hooks/useRedeemableList.js +2 -0
  292. package/dist/esm/components/credits/context/hooks/useRedeemableList.js.map +7 -0
  293. package/dist/esm/components/credits/context/hooks/useSendEmailValidation.d.ts +1 -0
  294. package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js +2 -0
  295. package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js.map +7 -0
  296. package/dist/esm/components/credits/context/hooks/useSubscribed.d.ts +1 -0
  297. package/dist/esm/components/credits/context/hooks/useSubscribed.js +2 -0
  298. package/dist/esm/components/credits/context/hooks/useSubscribed.js.map +7 -0
  299. package/dist/esm/components/credits/context/hooks/useSubscriptions.d.ts +9 -0
  300. package/dist/esm/components/credits/context/hooks/useSubscriptions.js +2 -0
  301. package/dist/esm/components/credits/context/hooks/useSubscriptions.js.map +7 -0
  302. package/dist/esm/components/credits/context/hooks/useUploadReceipt.d.ts +14 -0
  303. package/dist/esm/components/credits/context/hooks/useUploadReceipt.js +2 -0
  304. package/dist/esm/components/credits/context/hooks/useUploadReceipt.js.map +7 -0
  305. package/dist/esm/components/credits/context/provider.d.ts +49 -0
  306. package/dist/esm/components/credits/context/provider.js +2 -0
  307. package/dist/esm/components/credits/context/provider.js.map +7 -0
  308. package/dist/esm/components/credits/context/response.d.ts +63 -0
  309. package/dist/esm/components/credits/context/response.js +1 -0
  310. package/dist/esm/components/credits/context/utils.d.ts +25 -0
  311. package/dist/esm/components/credits/context/utils.js +2 -0
  312. package/dist/esm/components/credits/context/utils.js.map +7 -0
  313. package/dist/esm/components/credits/creditsBanner/index.d.ts +23 -0
  314. package/dist/esm/components/credits/creditsBanner/index.js +2 -0
  315. package/dist/esm/components/credits/creditsBanner/index.js.map +7 -0
  316. package/dist/esm/components/credits/creditsBenefits/benefitItem.d.ts +19 -0
  317. package/dist/esm/components/credits/creditsBenefits/benefitItem.js +2 -0
  318. package/dist/esm/components/credits/creditsBenefits/benefitItem.js.map +7 -0
  319. package/dist/esm/components/credits/creditsBenefits/iconInfo.d.ts +2 -0
  320. package/dist/esm/components/credits/creditsBenefits/iconInfo.js +2 -0
  321. package/dist/esm/components/credits/creditsBenefits/iconInfo.js.map +7 -0
  322. package/dist/esm/components/credits/creditsBenefits/index.d.ts +12 -0
  323. package/dist/esm/components/credits/creditsBenefits/index.js +4 -0
  324. package/dist/esm/components/credits/creditsBenefits/index.js.map +7 -0
  325. package/dist/esm/components/credits/creditsCash/RedeemableItem.d.ts +13 -0
  326. package/dist/esm/components/credits/creditsCash/RedeemableItem.js +2 -0
  327. package/dist/esm/components/credits/creditsCash/RedeemableItem.js.map +7 -0
  328. package/dist/esm/components/credits/creditsCash/index.d.ts +11 -0
  329. package/dist/esm/components/credits/creditsCash/index.js +2 -0
  330. package/dist/esm/components/credits/creditsCash/index.js.map +7 -0
  331. package/dist/esm/components/credits/creditsCash/type.d.ts +47 -0
  332. package/dist/esm/components/credits/creditsCash/type.js +1 -0
  333. package/dist/esm/components/credits/creditsFaq/faqItem/FaqItem.d.ts +13 -0
  334. package/dist/esm/components/credits/creditsFaq/faqItem/FaqItem.js +2 -0
  335. package/dist/esm/components/credits/creditsFaq/faqItem/FaqItem.js.map +7 -0
  336. package/dist/esm/components/credits/creditsFaq/index.d.ts +16 -0
  337. package/dist/esm/components/credits/creditsFaq/index.js +2 -0
  338. package/dist/esm/components/credits/creditsFaq/index.js.map +7 -0
  339. package/dist/esm/components/credits/creditsInfoCard/index.d.ts +20 -0
  340. package/dist/esm/components/credits/creditsInfoCard/index.js +2 -0
  341. package/dist/esm/components/credits/creditsInfoCard/index.js.map +7 -0
  342. package/dist/esm/components/credits/creditsRedeemList/AddressForm/CountrySelect.d.ts +14 -0
  343. package/dist/esm/components/credits/creditsRedeemList/AddressForm/CountrySelect.js +2 -0
  344. package/dist/esm/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +7 -0
  345. package/dist/esm/components/credits/creditsRedeemList/AddressForm/FormItem.d.ts +6 -0
  346. package/dist/esm/components/credits/creditsRedeemList/AddressForm/FormItem.js +2 -0
  347. package/dist/esm/components/credits/creditsRedeemList/AddressForm/FormItem.js.map +7 -0
  348. package/dist/esm/components/credits/creditsRedeemList/AddressForm/Input.d.ts +13 -0
  349. package/dist/esm/components/credits/creditsRedeemList/AddressForm/Input.js +2 -0
  350. package/dist/esm/components/credits/creditsRedeemList/AddressForm/Input.js.map +7 -0
  351. package/dist/esm/components/credits/creditsRedeemList/AddressForm/StateSelect.d.ts +15 -0
  352. package/dist/esm/components/credits/creditsRedeemList/AddressForm/StateSelect.js +2 -0
  353. package/dist/esm/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +7 -0
  354. package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.d.ts +2 -0
  355. package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.js +2 -0
  356. package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.js.map +7 -0
  357. package/dist/esm/components/credits/creditsRedeemList/AddressForm/type.d.ts +26 -0
  358. package/dist/esm/components/credits/creditsRedeemList/AddressForm/type.js +1 -0
  359. package/dist/esm/components/credits/creditsRedeemList/AddressForm/type.js.map +7 -0
  360. package/dist/esm/components/credits/creditsRedeemList/NonProductValue.d.ts +6 -0
  361. package/dist/esm/components/credits/creditsRedeemList/NonProductValue.js +2 -0
  362. package/dist/esm/components/credits/creditsRedeemList/NonProductValue.js.map +7 -0
  363. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +9 -0
  364. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js +2 -0
  365. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js.map +7 -0
  366. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.d.ts +20 -0
  367. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.js +2 -0
  368. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +7 -0
  369. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Error.d.ts +8 -0
  370. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Error.js +2 -0
  371. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Error.js.map +7 -0
  372. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.d.ts +11 -0
  373. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.js +2 -0
  374. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +7 -0
  375. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.d.ts +6 -0
  376. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +2 -0
  377. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +7 -0
  378. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.d.ts +8 -0
  379. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +2 -0
  380. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +7 -0
  381. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.d.ts +13 -0
  382. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.js +2 -0
  383. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +7 -0
  384. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.d.ts +11 -0
  385. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.js +2 -0
  386. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +7 -0
  387. package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.d.ts +9 -0
  388. package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.js +2 -0
  389. package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.js.map +7 -0
  390. package/dist/esm/components/credits/creditsRedeemList/index.d.ts +12 -0
  391. package/dist/esm/components/credits/creditsRedeemList/index.js +2 -0
  392. package/dist/esm/components/credits/creditsRedeemList/index.js.map +7 -0
  393. package/dist/esm/components/credits/creditsRedeemList/type.d.ts +77 -0
  394. package/dist/esm/components/credits/creditsRedeemList/type.js +1 -0
  395. package/dist/esm/components/credits/creditsRedeemList/type.js.map +7 -0
  396. package/dist/esm/components/credits/creditsWaysToGetCredits/index.d.ts +2 -0
  397. package/dist/esm/components/credits/creditsWaysToGetCredits/index.js +2 -0
  398. package/dist/esm/components/credits/creditsWaysToGetCredits/index.js.map +7 -0
  399. package/dist/esm/components/credits/creditsWaysToGetCredits/type.d.ts +59 -0
  400. package/dist/esm/components/credits/creditsWaysToGetCredits/type.js +2 -0
  401. package/dist/esm/components/credits/creditsWaysToGetCredits/type.js.map +7 -0
  402. package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.d.ts +96 -0
  403. package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.js +2 -0
  404. package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.js.map +7 -0
  405. package/dist/esm/components/credits/index.d.ts +10 -0
  406. package/dist/esm/components/credits/index.js +2 -0
  407. package/dist/esm/components/credits/index.js.map +7 -0
  408. package/dist/esm/components/credits/modal/MyRewardsModal.d.ts +32 -0
  409. package/dist/esm/components/credits/modal/MyRewardsModal.js +2 -0
  410. package/dist/esm/components/credits/modal/MyRewardsModal.js.map +7 -0
  411. package/dist/esm/components/credits/modal/activitiesModal.d.ts +32 -0
  412. package/dist/esm/components/credits/modal/activitiesModal.js +2 -0
  413. package/dist/esm/components/credits/modal/activitiesModal.js.map +7 -0
  414. package/dist/esm/components/credits/modal/creditsUploadReceiptModal.d.ts +24 -0
  415. package/dist/esm/components/credits/modal/creditsUploadReceiptModal.js +2 -0
  416. package/dist/esm/components/credits/modal/creditsUploadReceiptModal.js.map +7 -0
  417. package/dist/esm/components/credits/modal/loadingDots.d.ts +6 -0
  418. package/dist/esm/components/credits/modal/loadingDots.js +2 -0
  419. package/dist/esm/components/credits/modal/loadingDots.js.map +7 -0
  420. package/dist/esm/components/credits/modal/modalContainer.d.ts +15 -0
  421. package/dist/esm/components/credits/modal/modalContainer.js +2 -0
  422. package/dist/esm/components/credits/modal/modalContainer.js.map +7 -0
  423. package/dist/esm/components/credits/modal/rulesModal.d.ts +7 -0
  424. package/dist/esm/components/credits/modal/rulesModal.js +2 -0
  425. package/dist/esm/components/credits/modal/rulesModal.js.map +7 -0
  426. package/dist/esm/components/credits/modal/tip.d.ts +5 -0
  427. package/dist/esm/components/credits/modal/tip.js +2 -0
  428. package/dist/esm/components/credits/modal/tip.js.map +7 -0
  429. package/dist/esm/components/credits/type.d.ts +55 -0
  430. package/dist/esm/components/credits/type.js +1 -0
  431. package/dist/esm/components/credits/type.js.map +7 -0
  432. package/dist/esm/components/index.d.ts +3 -2
  433. package/dist/esm/components/index.js +1 -1
  434. package/dist/esm/components/index.js.map +2 -2
  435. package/dist/esm/components/registration/authCodeActivate/Message.d.ts +4 -0
  436. package/dist/esm/components/registration/authCodeActivate/Message.js +2 -0
  437. package/dist/esm/components/registration/authCodeActivate/Message.js.map +7 -0
  438. package/dist/esm/components/registration/authCodeActivate/index.d.ts +3 -0
  439. package/dist/esm/components/registration/authCodeActivate/index.js +2 -0
  440. package/dist/esm/components/registration/authCodeActivate/index.js.map +7 -0
  441. package/dist/esm/components/registration/authCodeActivate/type.d.ts +23 -0
  442. package/dist/esm/components/registration/authCodeActivate/type.js +1 -0
  443. package/dist/esm/components/registration/authCodeActivate/type.js.map +7 -0
  444. package/dist/esm/components/registration/index.d.ts +1 -0
  445. package/dist/esm/components/registration/index.js +2 -0
  446. package/dist/esm/components/registration/index.js.map +7 -0
  447. package/dist/esm/components/registration/modalContainer.d.ts +15 -0
  448. package/dist/esm/components/registration/modalContainer.js +2 -0
  449. package/dist/esm/components/registration/modalContainer.js.map +7 -0
  450. package/dist/esm/debug-env.d.ts +7 -0
  451. package/dist/esm/debug-env.js +2 -0
  452. package/dist/esm/debug-env.js.map +7 -0
  453. package/dist/esm/helpers/fetcher.js +1 -1
  454. package/dist/esm/helpers/fetcher.js.map +2 -2
  455. package/dist/esm/helpers/index.d.ts +2 -2
  456. package/dist/esm/helpers/index.js +1 -1
  457. package/dist/esm/helpers/index.js.map +2 -2
  458. package/dist/esm/helpers/track.d.ts +19 -0
  459. package/dist/esm/helpers/track.js +2 -0
  460. package/dist/esm/helpers/track.js.map +7 -0
  461. package/dist/esm/index.d.ts +1 -1
  462. package/dist/esm/index.js +1 -1
  463. package/dist/esm/index.js.map +1 -1
  464. package/dist/esm/stories/chat.stories.d.ts +1 -1
  465. package/dist/esm/stories/chat.stories.js +1 -1
  466. package/dist/esm/stories/chat.stories.js.map +2 -2
  467. package/package.json +46 -33
  468. package/src/components/chat/button.tsx +1 -1
  469. package/src/components/chat/index.tsx +6 -6
  470. package/src/components/chat/messages.tsx +2 -2
  471. package/src/components/chat/response.tsx +1 -4
  472. package/src/components/chat/suggestions.tsx +1 -1
  473. package/src/components/credits/context/const.ts +104 -0
  474. package/src/components/credits/context/hooks/useActivities.ts +70 -0
  475. package/src/components/credits/context/hooks/useAddressValidate.ts +281 -0
  476. package/src/components/credits/context/hooks/useAlpcFetch.ts +295 -0
  477. package/src/components/credits/context/hooks/useClickOutside.ts +34 -0
  478. package/src/components/credits/context/hooks/useCopy.ts +35 -0
  479. package/src/components/credits/context/hooks/useCountries.ts +55 -0
  480. package/src/components/credits/context/hooks/useFirstPurchaseFinished.ts +24 -0
  481. package/src/components/credits/context/hooks/useMyRewards.ts +97 -0
  482. package/src/components/credits/context/hooks/useReceiptUploaded.ts +24 -0
  483. package/src/components/credits/context/hooks/useRedeemAndBuy.ts +59 -0
  484. package/src/components/credits/context/hooks/useRedeemCoupon.ts +34 -0
  485. package/src/components/credits/context/hooks/useRedeemProduct.ts +34 -0
  486. package/src/components/credits/context/hooks/useRedeemableList.ts +77 -0
  487. package/src/components/credits/context/hooks/useSendEmailValidation.ts +20 -0
  488. package/src/components/credits/context/hooks/useSubscribed.ts +37 -0
  489. package/src/components/credits/context/hooks/useSubscriptions.ts +29 -0
  490. package/src/components/credits/context/hooks/useUploadReceipt.tsx +29 -0
  491. package/src/components/credits/context/provider.tsx +86 -0
  492. package/src/components/credits/context/response.ts +72 -0
  493. package/src/components/credits/context/utils.ts +149 -0
  494. package/src/components/credits/creditsBanner/index.tsx +105 -0
  495. package/src/components/credits/creditsBenefits/benefitItem.tsx +73 -0
  496. package/src/components/credits/creditsBenefits/iconInfo.tsx +23 -0
  497. package/src/components/credits/creditsBenefits/index.tsx +117 -0
  498. package/src/components/credits/creditsCash/RedeemableItem.tsx +211 -0
  499. package/src/components/credits/creditsCash/index.tsx +100 -0
  500. package/src/components/credits/creditsCash/type.ts +46 -0
  501. package/src/components/credits/creditsFaq/faqItem/FaqItem.tsx +95 -0
  502. package/src/components/credits/creditsFaq/index.tsx +86 -0
  503. package/src/components/credits/creditsInfoCard/index.tsx +177 -0
  504. package/src/components/credits/creditsRedeemList/AddressForm/CountrySelect.tsx +111 -0
  505. package/src/components/credits/creditsRedeemList/AddressForm/FormItem.tsx +23 -0
  506. package/src/components/credits/creditsRedeemList/AddressForm/Input.tsx +58 -0
  507. package/src/components/credits/creditsRedeemList/AddressForm/StateSelect.tsx +126 -0
  508. package/src/components/credits/creditsRedeemList/AddressForm/index.tsx +155 -0
  509. package/src/components/credits/creditsRedeemList/AddressForm/type.ts +24 -0
  510. package/src/components/credits/creditsRedeemList/NonProductValue.tsx +38 -0
  511. package/src/components/credits/creditsRedeemList/RedeemCouponModal.tsx +211 -0
  512. package/src/components/credits/creditsRedeemList/RedeemProductModal/Address.tsx +72 -0
  513. package/src/components/credits/creditsRedeemList/RedeemProductModal/Error.tsx +14 -0
  514. package/src/components/credits/creditsRedeemList/RedeemProductModal/Init.tsx +121 -0
  515. package/src/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.tsx +23 -0
  516. package/src/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.tsx +72 -0
  517. package/src/components/credits/creditsRedeemList/RedeemProductModal/Success.tsx +45 -0
  518. package/src/components/credits/creditsRedeemList/RedeemProductModal/index.tsx +195 -0
  519. package/src/components/credits/creditsRedeemList/RedeemableItem.tsx +178 -0
  520. package/src/components/credits/creditsRedeemList/index.tsx +189 -0
  521. package/src/components/credits/creditsRedeemList/type.ts +78 -0
  522. package/src/components/credits/creditsWaysToGetCredits/index.tsx +188 -0
  523. package/src/components/credits/creditsWaysToGetCredits/type.ts +63 -0
  524. package/src/components/credits/creditsWaysToGetCredits/useActions.ts +217 -0
  525. package/src/components/credits/index.ts +11 -0
  526. package/src/components/credits/modal/MyRewardsModal.tsx +321 -0
  527. package/src/components/credits/modal/activitiesModal.tsx +258 -0
  528. package/src/components/credits/modal/creditsUploadReceiptModal.tsx +141 -0
  529. package/src/components/credits/modal/loadingDots.tsx +19 -0
  530. package/src/components/credits/modal/modalContainer.tsx +112 -0
  531. package/src/components/credits/modal/rulesModal.tsx +44 -0
  532. package/src/components/credits/modal/tip.tsx +92 -0
  533. package/src/components/credits/type.ts +60 -0
  534. package/src/components/index.ts +4 -2
  535. package/src/debug-env.ts +18 -0
  536. package/src/helpers/fetcher.ts +1 -1
  537. package/src/helpers/index.ts +2 -2
  538. package/src/helpers/track.ts +73 -0
  539. package/src/index.ts +1 -1
  540. package/src/stories/chat.stories.tsx +1 -1
  541. package/{dist/esm/styles/chat.css → src/styles/global.css} +1 -0
  542. package/style.css +1 -0
  543. package/tailwind.config.ts +82 -0
  544. package/dist/cjs/components/animation/CodeEditor.d.ts +0 -7
  545. package/dist/cjs/components/animation/CodeEditor.js +0 -2
  546. package/dist/cjs/components/animation/CodeEditor.js.map +0 -7
  547. package/dist/cjs/components/animation/Preview.d.ts +0 -5
  548. package/dist/cjs/components/animation/Preview.js +0 -2
  549. package/dist/cjs/components/animation/Preview.js.map +0 -7
  550. package/dist/cjs/components/animation/bannerAni.d.ts +0 -16
  551. package/dist/cjs/components/animation/bannerAni.js +0 -59
  552. package/dist/cjs/components/animation/bannerAni.js.map +0 -7
  553. package/dist/cjs/components/animation/libs.d.js +0 -2
  554. package/dist/cjs/components/animation/textAni.d.ts +0 -9
  555. package/dist/cjs/components/animation/textAni.js +0 -2
  556. package/dist/cjs/components/animation/textAni.js.map +0 -7
  557. package/dist/cjs/components/chat/message.d.ts +0 -2
  558. package/dist/cjs/components/chat/response copy.d.ts +0 -2
  559. package/dist/cjs/components/chat/rresponse.d.ts +0 -2
  560. package/dist/cjs/components/theme.d.ts +0 -13
  561. package/dist/cjs/helpers/component-props.d.ts +0 -7
  562. package/dist/cjs/helpers/component-props.js +0 -2
  563. package/dist/cjs/helpers/component-props.js.map +0 -7
  564. package/dist/cjs/helpers/constants.d.ts +0 -2
  565. package/dist/cjs/helpers/constants.js +0 -2
  566. package/dist/cjs/helpers/constants.js.map +0 -7
  567. package/dist/cjs/tsconfig.tsbuildinfo +0 -1
  568. package/dist/esm/components/animation/CodeEditor.d.ts +0 -7
  569. package/dist/esm/components/animation/CodeEditor.js +0 -2
  570. package/dist/esm/components/animation/CodeEditor.js.map +0 -7
  571. package/dist/esm/components/animation/Preview.d.ts +0 -5
  572. package/dist/esm/components/animation/Preview.js +0 -2
  573. package/dist/esm/components/animation/Preview.js.map +0 -7
  574. package/dist/esm/components/animation/bannerAni.d.ts +0 -16
  575. package/dist/esm/components/animation/bannerAni.js +0 -59
  576. package/dist/esm/components/animation/bannerAni.js.map +0 -7
  577. package/dist/esm/components/animation/libs.d.js +0 -2
  578. package/dist/esm/components/animation/libs.d.js.map +0 -7
  579. package/dist/esm/components/animation/textAni.d.ts +0 -9
  580. package/dist/esm/components/animation/textAni.js +0 -2
  581. package/dist/esm/components/animation/textAni.js.map +0 -7
  582. package/dist/esm/components/chat/Markdown.d.ts +0 -5
  583. package/dist/esm/components/chat/marksdown.d.ts +0 -5
  584. package/dist/esm/components/chat/message.d.ts +0 -2
  585. package/dist/esm/components/chat/response copy.d.ts +0 -2
  586. package/dist/esm/components/chat/rresponse.d.ts +0 -2
  587. package/dist/esm/components/theme.d.ts +0 -13
  588. package/dist/esm/helpers/component-props.d.ts +0 -7
  589. package/dist/esm/helpers/component-props.js +0 -1
  590. package/dist/esm/helpers/constants.d.ts +0 -2
  591. package/dist/esm/helpers/constants.js +0 -2
  592. package/dist/esm/helpers/constants.js.map +0 -7
  593. package/dist/esm/styles/css/animations.css +0 -35
  594. package/dist/esm/styles/css/button.css +0 -56
  595. package/dist/esm/styles/css/colors.css +0 -12
  596. package/dist/esm/styles/css/console.css +0 -134
  597. package/dist/esm/styles/css/header.css +0 -43
  598. package/dist/esm/styles/css/input.css +0 -89
  599. package/dist/esm/styles/css/markdown.css +0 -131
  600. package/dist/esm/styles/css/messages.css +0 -73
  601. package/dist/esm/styles/css/panel.css +0 -23
  602. package/dist/esm/styles/css/popup.css +0 -44
  603. package/dist/esm/styles/css/response.css +0 -26
  604. package/dist/esm/styles/css/sidebar.css +0 -31
  605. package/dist/esm/styles/css/suggestions.css +0 -35
  606. package/dist/esm/styles/css/window.css +0 -60
  607. package/dist/esm/styles/index.css +0 -1
  608. package/dist/esm/tsconfig.tsbuildinfo +0 -1
  609. /package/dist/cjs/components/chat/{Markdown.d.ts → markdown.d.ts} +0 -0
  610. /package/dist/cjs/components/chat/{Response.d.ts → response.d.ts} +0 -0
  611. /package/dist/{cjs/components/chat/marksdown.d.ts → esm/components/chat/markdown.d.ts} +0 -0
  612. /package/dist/esm/components/chat/{Response.d.ts → response.d.ts} +0 -0
  613. /package/dist/{cjs/components/animation/libs.d.js.map → esm/components/credits/context/response.js.map} +0 -0
  614. /package/dist/esm/{helpers/component-props.js.map → components/credits/creditsCash/type.js.map} +0 -0
@@ -0,0 +1,13 @@
1
+ import { CreditsCashCopy, RedeemItem } from './type';
2
+ declare function RedeemableItem({ copy, itemData, setRules, className, authCodeActivate, }: {
3
+ copy: CreditsCashCopy;
4
+ itemData: RedeemItem;
5
+ className?: string;
6
+ setRules: (rules: string[]) => void;
7
+ currencyCode: string;
8
+ authCodeActivate: {
9
+ openAuthCodePopup: Function;
10
+ isSuccess: boolean;
11
+ };
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export default RedeemableItem;
@@ -0,0 +1,2 @@
1
+ import{jsx as l,jsxs as n}from"react/jsx-runtime";import{Button as F,Text as u,Picture as g}from"@anker-in/headless-ui";import{useMemo as s,useState as I}from"react";import{cn as p}from"../../../helpers";import{useCreditsContext as R}from"../context/provider";import{useRedeemAndBuy as k}from"../context/hooks/useRedeemAndBuy";import{numberFormat as y}from"../context/utils";import{gaTrack as b}from"../../../helpers/track";function E({copy:t,itemData:e,setRules:h,className:C,authCodeActivate:x}){const{creditInfo:c,profile:i,openSignUpPopup:N,gtm:{pageGroup:m}}=R(),[f,v]=I(null),{trigger:_,isMutating:w}=k({},{onError:a=>{v(a.message)}}),r=s(()=>!!i,[i?.activated]),o=s(()=>r&&i?.activated&&e.alpcData?.consumeCredits>Number(c?.available_credit||0),[r,i?.activated,e.alpcData?.consumeCredits,c?.available_credit]),S=s(()=>!!(e.alpcData?.remainingInventory<=0&&e.alpcData?.isLimited||!e.productVariant?.availableForSale||o),[e.alpcData?.remainingInventory,e.alpcData?.isLimited,e.productVariant?.availableForSale,o]),z=()=>{v(null),r?!i?.activated&&!x.isSuccess?x.openAuthCodePopup():(_({productVariant:e?.productVariant,redeemId:e?.config?.redeemId}),b({event:"ga4Event",event_name:"lp_button",member_active_status:i?.activated?"active":"not active",event_parameters:{page_group:m,position:t.title,button_name:d,info:e?.alpcData?.id?.toString()}})):N()},d=s(()=>e.productVariant?.availableForSale?r?t.btnRedeem:t.unlockRewards:t?.soldOut||"Sold Out",[r,e.productVariant?.availableForSale,t.btnRedeem,t.unlockRewards,t?.soldOut]);return n("div",{className:p("flex flex-col items-center rounded-[16px] bg-[#EAEAEC] p-[24px] md:rounded-[12px] md:px-[8px] xl:py-[16px] md-xl:px-[16px]",C),children:[l("div",{className:p("relative mx-auto h-[224px] w-fit l:h-[120px] l-xxl:h-[138px]"),children:l(g,{className:"mx-auto h-full w-auto",imgClassName:"h-full object-contain",source:e?.config?.image?.url||e?.productVariant?.metafields?.global?.transparentImg||e?.productVariant?.image?.url})}),n("div",{className:p("mt-[22px] w-full l:mt-[8px]"),children:[l(u,{html:e?.product?.title,title:e.config?.title||e.alpcData?.title||e.product?.title,size:2,className:"line-clamp-2 h-[58px] text-[24px] leading-[1.2] l:h-[40px] l:text-[16px] l-xxl:h-[48px] l-xxl:text-[20px]"}),e?.config?.rules?.split("<br>")?.length>0&&l("button",{type:"button",onClick:()=>{h(e?.config?.rules?.split("<br>")),b({event:"ga4Event",event_name:"lp_button",member_active_status:i?.activated?"active":"not active",event_parameters:{page_group:m,position:t.title,button_name:t?.ruleLabel,info:e?.alpcData?.id?.toString()}})},className:"mt-[8px] text-[16px] font-bold underline xxl:text-[14px]",tabIndex:0,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&a.preventDefault()},children:t?.ruleLabel}),n("div",{className:"mt-[24px] flex items-center l:mt-[12px] laptop:text-[16px] lg-desktop:text-[18px]",children:[l(g,{className:"size-[24px] l-xxl:size-[22px] md-l:size-[18px] md:size-[16px]",source:"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/icon_hire_purchase.png?v=1757496783"}),l(u,{html:`${y(e?.alpcData?.consumeCredits)} + ${e?.config?.price}`,size:2,as:"p",className:"ml-[4px] mt-[4px] text-[28px] font-bold leading-none md:text-[18px] l-xxl:text-[24px] md-l:text-[20px] "})]}),n("div",{className:"group relative w-full",children:[l(F,{disabled:S,variant:"primary",size:"lg",className:"mt-[8px] md:px-[10px] l:w-full",loading:w,onClick:()=>{z()},title:o?t.insufficientCredits:d,children:d}),l("div",{className:p("absolute -bottom-[20px] left-0 z-10 w-[300px] translate-y-full opacity-0 transition-opacity group-hover:opacity-100 md:-bottom-[14px] md:w-[160px]",o?"block":"hidden"),children:n("div",{className:"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow md:px-[10px] md:py-[8px]",children:[l(u,{as:"p",size:"2",html:t?.insufficientCredits,className:"text-[14px]"}),l("div",{className:"absolute -top-[10px] left-[48px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]"})]})})]})]}),f&&l("div",{className:"mt-[8px] text-[14px] text-[#FF0000]",children:f})]})}var K=E;export{K as default};
2
+ //# sourceMappingURL=RedeemableItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/components/credits/creditsCash/RedeemableItem.tsx"],
4
+ "sourcesContent": ["import { Button, Text, Picture } from '@anker-in/headless-ui'\nimport { useMemo, useState } from 'react'\nimport { cn } from '../../../helpers'\n\nimport { CreditsCashCopy, RedeemItem } from './type'\nimport { useCreditsContext } from '../context/provider'\nimport { useRedeemAndBuy } from '../context/hooks/useRedeemAndBuy'\nimport { numberFormat } from '../context/utils'\nimport { gaTrack } from '../../../helpers/track'\n\nfunction RedeemableItem({\n copy,\n itemData,\n setRules,\n className,\n authCodeActivate,\n}: {\n copy: CreditsCashCopy\n itemData: RedeemItem\n className?: string\n setRules: (rules: string[]) => void\n currencyCode: string\n authCodeActivate: {\n openAuthCodePopup: Function\n isSuccess: boolean\n }\n}) {\n const {\n creditInfo,\n profile,\n openSignUpPopup,\n gtm: { pageGroup },\n } = useCreditsContext()\n const [error, setError] = useState<string | null>(null)\n const { trigger, isMutating } = useRedeemAndBuy(\n {},\n {\n onError: error => {\n setError(error.message)\n },\n }\n )\n\n const isLogin = useMemo(() => {\n return !!profile\n }, [profile?.activated])\n\n const inSufficientCredit = useMemo(() => {\n return (\n isLogin && profile?.activated && itemData.alpcData?.consumeCredits > Number(creditInfo?.available_credit || 0)\n )\n }, [isLogin, profile?.activated, itemData.alpcData?.consumeCredits, creditInfo?.available_credit])\n\n const isDisabled = useMemo(() => {\n // \u5151\u6362\u9650\u5236\n if (itemData.alpcData?.remainingInventory <= 0 && itemData.alpcData?.isLimited) {\n return true\n }\n\n // \u5546\u54C1\u5E93\u5B58\u9650\u5236\n if (!itemData.productVariant?.availableForSale) {\n return true\n }\n\n // \u79EF\u5206\u4E0D\u8DB3\n if (inSufficientCredit) {\n return true\n }\n return false\n }, [\n itemData.alpcData?.remainingInventory,\n itemData.alpcData?.isLimited,\n itemData.productVariant?.availableForSale,\n inSufficientCredit,\n ])\n\n const handleRedeem = () => {\n setError(null)\n if (!isLogin) {\n openSignUpPopup()\n } else if (!profile?.activated && !authCodeActivate.isSuccess) {\n authCodeActivate.openAuthCodePopup()\n } else {\n trigger({\n productVariant: itemData?.productVariant,\n redeemId: itemData?.config?.redeemId,\n })\n gaTrack({\n event: 'ga4Event',\n event_name: 'lp_button',\n member_active_status: profile?.activated ? 'active' : 'not active',\n event_parameters: {\n page_group: pageGroup,\n position: copy.title,\n button_name: redeemButtonText,\n info: itemData?.alpcData?.id?.toString(),\n },\n })\n }\n }\n\n const redeemButtonText = useMemo(() => {\n // \u7F3A\u8D27\u6587\u6848\n if (!itemData.productVariant?.availableForSale) {\n return copy?.soldOut || 'Sold Out'\n } else if (!isLogin) {\n return copy.unlockRewards\n } else {\n return copy.btnRedeem\n }\n }, [isLogin, itemData.productVariant?.availableForSale, copy.btnRedeem, copy.unlockRewards, copy?.soldOut])\n\n return (\n <div\n className={cn(\n 'flex flex-col items-center rounded-[16px] bg-[#EAEAEC] p-[24px] md:rounded-[12px] md:px-[8px] xl:py-[16px] md-xl:px-[16px]',\n className\n )}\n >\n <div className={cn('relative mx-auto h-[224px] w-fit l:h-[120px] l-xxl:h-[138px]')}>\n <Picture\n className=\"mx-auto h-full w-auto\"\n imgClassName=\"h-full object-contain\"\n source={\n itemData?.config?.image?.url ||\n itemData?.productVariant?.metafields?.global?.transparentImg ||\n itemData?.productVariant?.image?.url\n }\n ></Picture>\n </div>\n <div className={cn('mt-[22px] w-full l:mt-[8px]')}>\n <Text\n html={itemData?.product?.title}\n title={itemData.config?.title || itemData.alpcData?.title || itemData.product?.title}\n size={2}\n className=\"line-clamp-2 h-[58px] text-[24px] leading-[1.2] l:h-[40px] l:text-[16px] l-xxl:h-[48px] l-xxl:text-[20px]\"\n />\n {itemData?.config?.rules?.split('<br>')?.length > 0 && (\n <button\n type=\"button\"\n onClick={() => {\n setRules(itemData?.config?.rules?.split('<br>'))\n gaTrack({\n event: 'ga4Event',\n event_name: 'lp_button',\n member_active_status: profile?.activated ? 'active' : 'not active',\n event_parameters: {\n page_group: pageGroup,\n position: copy.title,\n button_name: copy?.ruleLabel,\n info: itemData?.alpcData?.id?.toString(),\n },\n })\n }}\n className=\"mt-[8px] text-[16px] font-bold underline xxl:text-[14px]\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n }\n }}\n >\n {copy?.ruleLabel}\n </button>\n )}\n <div className=\"mt-[24px] flex items-center l:mt-[12px] laptop:text-[16px] lg-desktop:text-[18px]\">\n <Picture\n className=\"size-[24px] l-xxl:size-[22px] md-l:size-[18px] md:size-[16px]\"\n source=\"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/icon_hire_purchase.png?v=1757496783\"\n />\n <Text\n html={`${numberFormat(itemData?.alpcData?.consumeCredits)} + ${itemData?.config?.price}`}\n size={2}\n as=\"p\"\n className=\"ml-[4px] mt-[4px] text-[28px] font-bold leading-none md:text-[18px] l-xxl:text-[24px] md-l:text-[20px] \"\n />\n </div>\n\n <div className=\"group relative w-full\">\n <Button\n disabled={isDisabled}\n variant=\"primary\"\n size=\"lg\"\n className=\"mt-[8px] md:px-[10px] l:w-full\"\n loading={isMutating}\n onClick={() => {\n handleRedeem()\n }}\n title={inSufficientCredit ? copy.insufficientCredits : redeemButtonText}\n >\n {redeemButtonText}\n </Button>\n <div\n className={cn(\n 'absolute -bottom-[20px] left-0 z-10 w-[300px] translate-y-full opacity-0 transition-opacity group-hover:opacity-100 md:-bottom-[14px] md:w-[160px]',\n inSufficientCredit ? 'block' : 'hidden'\n )}\n >\n <div className=\"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow md:px-[10px] md:py-[8px]\">\n <Text as=\"p\" size=\"2\" html={copy?.insufficientCredits} className=\"text-[14px]\" />\n <div className=\"absolute -top-[10px] left-[48px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]\" />\n </div>\n </div>\n </div>\n </div>\n {error && <div className=\"mt-[8px] text-[14px] text-[#FF0000]\">{error}</div>}\n </div>\n )\n}\n\nexport default RedeemableItem\n"],
5
+ "mappings": "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",
6
+ "names": ["jsx", "jsxs", "Button", "Text", "Picture", "useMemo", "useState", "cn", "useCreditsContext", "useRedeemAndBuy", "numberFormat", "gaTrack", "RedeemableItem", "copy", "itemData", "setRules", "className", "authCodeActivate", "creditInfo", "profile", "openSignUpPopup", "pageGroup", "error", "setError", "trigger", "isMutating", "isLogin", "inSufficientCredit", "isDisabled", "handleRedeem", "redeemButtonText", "e", "RedeemableItem_default"]
7
+ }
@@ -0,0 +1,11 @@
1
+ import { CreditsCashCopy } from './type';
2
+ export declare const CreditsCash: ({ copy, className, hideTitle, cardClassName, authCodeActivate, }: {
3
+ copy: CreditsCashCopy;
4
+ className?: string;
5
+ hideTitle?: boolean;
6
+ cardClassName?: string;
7
+ authCodeActivate: {
8
+ openAuthCodePopup: Function;
9
+ isSuccess: boolean;
10
+ };
11
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as r,jsxs as k}from"react/jsx-runtime";import{Container as h,Heading as b}from"@anker-in/headless-ui";import{useMemo as v,useState as x}from"react";import y from"./RedeemableItem";import N from"../context/hooks/useRedeemableList";import{cn as I}from"../../../helpers";import R from"../modal/rulesModal";import{useProductsByHandles as S}from"@anker-in/lib";const U=({copy:s,className:u="",hideTitle:p=!1,cardClassName:f,authCodeActivate:C})=>{const[n,d]=x(),{redeemableList:l}=N(),g=[],{data:o}=S({handles:s?.list?.map(e=>e.products?.[0]?.handle)||[],metafieldIdentifiers:{variant:g}}),m=v(()=>o?.map(e=>{const a=s.list.find(i=>i.products?.[0]?.handle===e.handle),t=l.find(i=>i.id?.toString()===a?.redeemId?.toString()),c=e.variants?.find(i=>i.sku===a?.products?.[0]?.sku)||e.variants?.[0];return!t||!c?null:{product:e,productVariant:c,alpcData:{id:t?.id,consumeCredits:t?.consume_credits,remainingInventory:t?.remaining_inventory,isLimited:t?.is_limited,consumeType:t?.consume_type,title:t?.name,desc:t?.note},config:a}}).filter(Boolean),[o,s.list,l]);return console.log("list",m),k(h,{className:I("bg-[#F5F5F5]",u),children:[!p&&r(b,{as:"h2",size:"4",html:s.title}),r("div",{className:"relative mt-[24px] grid grid-cols-4 gap-[16px] l:gap-[12px] md:grid-cols-2 md-xl:grid-cols-3",children:m?.map((e,a)=>r(y,{copy:s,itemData:e,setRules:d,className:f,currencyCode:o?.[0]?.price.currencyCode||"USD",authCodeActivate:C},a))}),n&&r(R,{overlayClassName:"md:px-[16px] md:items-center",className:"md:h-fit md:rounded-b-[16px]",isOpen:n.length>0,onClose:()=>d([]),titleClassName:"border-b-transparent h-[56px]",rules:n,scrollClassName:"md:mt-[8px] md:mb-[24px] md:pt-0",title:s?.ruleLabel,ruleClassName:"text-[#1d1d1f] font-bold"})]})};export{U as CreditsCash};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/components/credits/creditsCash/index.tsx"],
4
+ "sourcesContent": ["import { Container, Heading } from '@anker-in/headless-ui'\nimport { useMemo, useState } from 'react'\n\nimport RedeemableItem from './RedeemableItem'\nimport useRedeemableList from '../context/hooks/useRedeemableList'\nimport { cn } from '../../../helpers'\nimport RulesModal from '../modal/rulesModal'\nimport { useHeadlessContext, useProductsByHandles } from '@anker-in/lib'\nimport { CreditsCashCopy, RedeemItem } from './type'\nimport { Product } from '@anker-in/lib'\n\nexport const CreditsCash = ({\n copy,\n className = '',\n hideTitle = false,\n cardClassName,\n authCodeActivate,\n}: {\n copy: CreditsCashCopy\n className?: string\n hideTitle?: boolean\n cardClassName?: string\n authCodeActivate: {\n openAuthCodePopup: Function\n isSuccess: boolean\n }\n}) => {\n const [rules, setRules] = useState<string | string[]>()\n const { redeemableList } = useRedeemableList()\n\n const variantMetafieldIdentifiers: any[] = []\n\n const { data: productByHandles } = useProductsByHandles({\n handles: copy?.list?.map(item => item.products?.[0]?.handle) || [],\n metafieldIdentifiers: {\n variant: variantMetafieldIdentifiers,\n },\n })\n\n const list = useMemo(() => {\n return productByHandles\n ?.map((product: Product) => {\n const config = copy.list.find(item => item.products?.[0]?.handle === product.handle)\n const alpcData = redeemableList.find(item => item.id?.toString() === config?.redeemId?.toString())\n const productVariant =\n product.variants?.find((variant: any) => variant.sku === config?.products?.[0]?.sku) || product.variants?.[0]\n if (!alpcData || !productVariant) return null\n return {\n product,\n productVariant,\n alpcData: {\n id: alpcData?.id,\n consumeCredits: alpcData?.consume_credits,\n remainingInventory: alpcData?.remaining_inventory,\n isLimited: alpcData?.is_limited,\n consumeType: alpcData?.consume_type,\n title: alpcData?.name,\n desc: alpcData?.note,\n },\n config,\n }\n })\n .filter(Boolean) as unknown as RedeemItem[]\n }, [productByHandles, copy.list, redeemableList])\n\n console.log('list', list)\n\n return (\n <Container className={cn('bg-[#F5F5F5]', className)}>\n {!hideTitle && <Heading as=\"h2\" size=\"4\" html={copy.title} />}\n <div className=\"relative mt-[24px] grid grid-cols-4 gap-[16px] l:gap-[12px] md:grid-cols-2 md-xl:grid-cols-3\">\n {list?.map((item, index: number) => (\n <RedeemableItem\n key={index}\n copy={copy}\n itemData={item}\n setRules={setRules}\n className={cardClassName}\n currencyCode={productByHandles?.[0]?.price.currencyCode || 'USD'}\n authCodeActivate={authCodeActivate}\n />\n ))}\n </div>\n\n {rules && (\n <RulesModal\n overlayClassName=\"md:px-[16px] md:items-center\"\n className=\"md:h-fit md:rounded-b-[16px]\"\n isOpen={rules.length > 0}\n onClose={() => setRules([])}\n titleClassName=\"border-b-transparent h-[56px]\"\n rules={rules}\n scrollClassName=\"md:mt-[8px] md:mb-[24px] md:pt-0\"\n title={copy?.ruleLabel}\n ruleClassName=\"text-[#1d1d1f] font-bold\"\n />\n )}\n </Container>\n )\n}\n"],
5
+ "mappings": "AAoEI,OACiB,OAAAA,EADjB,QAAAC,MAAA,oBApEJ,OAAS,aAAAC,EAAW,WAAAC,MAAe,wBACnC,OAAS,WAAAC,EAAS,YAAAC,MAAgB,QAElC,OAAOC,MAAoB,mBAC3B,OAAOC,MAAuB,qCAC9B,OAAS,MAAAC,MAAU,mBACnB,OAAOC,MAAgB,sBACvB,OAA6B,wBAAAC,MAA4B,gBAIlD,MAAMC,EAAc,CAAC,CAC1B,KAAAC,EACA,UAAAC,EAAY,GACZ,UAAAC,EAAY,GACZ,cAAAC,EACA,iBAAAC,CACF,IASM,CACJ,KAAM,CAACC,EAAOC,CAAQ,EAAIb,EAA4B,EAChD,CAAE,eAAAc,CAAe,EAAIZ,EAAkB,EAEvCa,EAAqC,CAAC,EAEtC,CAAE,KAAMC,CAAiB,EAAIX,EAAqB,CACtD,QAASE,GAAM,MAAM,IAAIU,GAAQA,EAAK,WAAW,CAAC,GAAG,MAAM,GAAK,CAAC,EACjE,qBAAsB,CACpB,QAASF,CACX,CACF,CAAC,EAEKG,EAAOnB,EAAQ,IACZiB,GACH,IAAKG,GAAqB,CAC1B,MAAMC,EAASb,EAAK,KAAK,KAAKU,GAAQA,EAAK,WAAW,CAAC,GAAG,SAAWE,EAAQ,MAAM,EAC7EE,EAAWP,EAAe,KAAKG,GAAQA,EAAK,IAAI,SAAS,IAAMG,GAAQ,UAAU,SAAS,CAAC,EAC3FE,EACJH,EAAQ,UAAU,KAAMI,GAAiBA,EAAQ,MAAQH,GAAQ,WAAW,CAAC,GAAG,GAAG,GAAKD,EAAQ,WAAW,CAAC,EAC9G,MAAI,CAACE,GAAY,CAACC,EAAuB,KAClC,CACL,QAAAH,EACA,eAAAG,EACA,SAAU,CACR,GAAID,GAAU,GACd,eAAgBA,GAAU,gBAC1B,mBAAoBA,GAAU,oBAC9B,UAAWA,GAAU,WACrB,YAAaA,GAAU,aACvB,MAAOA,GAAU,KACjB,KAAMA,GAAU,IAClB,EACA,OAAAD,CACF,CACF,CAAC,EACA,OAAO,OAAO,EAChB,CAACJ,EAAkBT,EAAK,KAAMO,CAAc,CAAC,EAEhD,eAAQ,IAAI,OAAQI,CAAI,EAGtBtB,EAACC,EAAA,CAAU,UAAWM,EAAG,eAAgBK,CAAS,EAC/C,WAACC,GAAad,EAACG,EAAA,CAAQ,GAAG,KAAK,KAAK,IAAI,KAAMS,EAAK,MAAO,EAC3DZ,EAAC,OAAI,UAAU,+FACZ,SAAAuB,GAAM,IAAI,CAACD,EAAMO,IAChB7B,EAACM,EAAA,CAEC,KAAMM,EACN,SAAUU,EACV,SAAUJ,EACV,UAAWH,EACX,aAAcM,IAAmB,CAAC,GAAG,MAAM,cAAgB,MAC3D,iBAAkBL,GANba,CAOP,CACD,EACH,EAECZ,GACCjB,EAACS,EAAA,CACC,iBAAiB,+BACjB,UAAU,+BACV,OAAQQ,EAAM,OAAS,EACvB,QAAS,IAAMC,EAAS,CAAC,CAAC,EAC1B,eAAe,gCACf,MAAOD,EACP,gBAAgB,mCAChB,MAAOL,GAAM,UACb,cAAc,2BAChB,GAEJ,CAEJ",
6
+ "names": ["jsx", "jsxs", "Container", "Heading", "useMemo", "useState", "RedeemableItem", "useRedeemableList", "cn", "RulesModal", "useProductsByHandles", "CreditsCash", "copy", "className", "hideTitle", "cardClassName", "authCodeActivate", "rules", "setRules", "redeemableList", "variantMetafieldIdentifiers", "productByHandles", "item", "list", "product", "config", "alpcData", "productVariant", "variant", "index"]
7
+ }
@@ -0,0 +1,47 @@
1
+ import { ProductVariant, Product } from '@anker-in/lib';
2
+ import { AlpcConsumeType } from '../context/const';
3
+ type RedeemableItemConfig = {
4
+ title: string;
5
+ desc: string;
6
+ price: string;
7
+ credit: string;
8
+ rules: string;
9
+ image: {
10
+ url: string;
11
+ };
12
+ mobileImage: {
13
+ url: string;
14
+ };
15
+ redeemId: number;
16
+ };
17
+ export type CreditsCashCopy = {
18
+ title: string;
19
+ list: (RedeemableItemConfig & {
20
+ products: {
21
+ handle: string;
22
+ sku: string;
23
+ }[];
24
+ })[];
25
+ soldOut: string;
26
+ ruleLabel: string;
27
+ unlockRewards: string;
28
+ btnRedeem: string;
29
+ off: string;
30
+ insufficientCredits: string;
31
+ };
32
+ export type RedeemItem = {
33
+ product: Product;
34
+ productVariant: ProductVariant;
35
+ alpcData: {
36
+ id: number;
37
+ consumeCredits: number;
38
+ remainingInventory: number;
39
+ isLimited: boolean;
40
+ consumeType: AlpcConsumeType.Product;
41
+ showCredit: boolean;
42
+ title: string;
43
+ desc: string;
44
+ };
45
+ config: RedeemableItemConfig;
46
+ };
47
+ export {};
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ type FaqItemProps = {
3
+ index: number;
4
+ question?: string;
5
+ answer?: string | number;
6
+ showDots: boolean;
7
+ itemRightIconRender?: ({ expanded }: {
8
+ expanded: boolean;
9
+ }) => ReactNode;
10
+ defaultExpended?: boolean;
11
+ };
12
+ export declare const FaqItem: ({ index, question, answer, showDots, itemRightIconRender, defaultExpended, }: FaqItemProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as t,jsxs as x}from"react/jsx-runtime";import{Heading as f,Text as l}from"@anker-in/headless-ui";import{ChevronDownIcon as b}from"@heroicons/react/24/outline";import{cn as e}from"../../../../helpers/index";import{motion as c}from"framer-motion";import{useEffect as u,useState as v}from"react";const k=({index:a,question:n,answer:o,showDots:s,itemRightIconRender:p,defaultExpended:m=!1})=>{const[r,d]=v(m);return u(()=>{a==0&&d(!0),n||d(!0)},[a,n]),x("div",{className:e("relative mx-0 border-b-[1px] border-[#e4e5e6] py-[24px] l:py-[16px]"),children:[x("div",{className:"relative flex items-center",onClick:()=>{d(!r)},role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&i.preventDefault()},children:[t(f,{html:n,as:"h3",className:e(s?'before:absolute before:left-[-15px] before:top-[8px] before:h-[6px] before:w-[6px] before:rounded-[50%] before:bg-[#000] before:content-[""]':"","relative block flex-1 cursor-pointer pr-[10px] text-[18px] font-bold text-[#1D1D1F] l:text-[16px]")}),p?p({expanded:r}):t(b,{className:e("size-[16px] shrink-0 cursor-pointer stroke-[2.5px] transition-all",r?"rotate-180":"")})]}),t(c.div,{initial:!1,animate:{height:r?"auto":0},className:"overflow-hidden [&_td]:border [&_td]:border-[#333] [&_td]:px-[8px] [&_td]:py-[4px]",children:o?.toString()?.includes("https://www.youtube.com")?t(l,{as:"div",className:e("mt-[8px]"),"data-ratio":"16:9","data-content":o,html:o?.toString()}):t(l,{as:"div",html:o?.toString(),className:e("mt-[8px] text-[16px] font-bold leading-[1.5] text-[#3D3D3F] l:text-[14px] [&_a]:text-brand [&_a]:underline")})})]},a)};export{k as FaqItem};
2
+ //# sourceMappingURL=FaqItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/components/credits/creditsFaq/faqItem/FaqItem.tsx"],
4
+ "sourcesContent": ["import { Heading, Text } from '@anker-in/headless-ui'\nimport { ChevronDownIcon } from '@heroicons/react/24/outline'\nimport { cn } from '../../../../helpers/index'\nimport { motion } from 'framer-motion'\nimport { type ReactNode, useEffect, useState } from 'react'\n\ntype FaqItemProps = {\n index: number\n question?: string\n answer?: string | number\n showDots: boolean\n itemRightIconRender?: ({ expanded }: { expanded: boolean }) => ReactNode\n defaultExpended?: boolean\n}\n\nexport const FaqItem = ({\n index,\n question,\n answer,\n showDots,\n itemRightIconRender,\n defaultExpended = false,\n}: FaqItemProps) => {\n const [expanded, setExpanded] = useState(defaultExpended)\n useEffect(() => {\n if (index == 0) {\n setExpanded(true)\n }\n if (!question) {\n setExpanded(true)\n }\n }, [index, question])\n\n return (\n <div key={index} className={cn('relative mx-0 border-b-[1px] border-[#e4e5e6] py-[24px] l:py-[16px]')}>\n <div\n className='relative flex items-center'\n onClick={() => {\n setExpanded(!expanded)\n }}\n role='button'\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n }\n }}\n >\n <Heading\n html={question}\n as='h3'\n className={cn(\n showDots\n ? 'before:absolute before:left-[-15px] before:top-[8px] before:h-[6px] before:w-[6px] before:rounded-[50%] before:bg-[#000] before:content-[\"\"]'\n : '',\n 'relative block flex-1 cursor-pointer pr-[10px] text-[18px] font-bold text-[#1D1D1F] l:text-[16px]',\n )}\n ></Heading>\n {itemRightIconRender ? (\n itemRightIconRender({ expanded })\n ) : (\n <ChevronDownIcon\n className={cn(\n 'size-[16px] shrink-0 cursor-pointer stroke-[2.5px] transition-all',\n expanded ? 'rotate-180' : '',\n )}\n />\n )}\n </div>\n <motion.div\n initial={false}\n animate={{ height: !expanded ? 0 : 'auto' }}\n className='overflow-hidden [&_td]:border [&_td]:border-[#333] [&_td]:px-[8px] [&_td]:py-[4px]'\n >\n {answer?.toString()?.includes('https://www.youtube.com') ? (\n <Text\n as='div'\n className={cn('mt-[8px]')}\n data-ratio='16:9'\n data-content={answer}\n html={answer?.toString()}\n ></Text>\n ) : (\n <Text\n as='div'\n html={answer?.toString()}\n className={cn(\n 'mt-[8px] text-[16px] font-bold leading-[1.5] text-[#3D3D3F] l:text-[14px] [&_a]:text-brand [&_a]:underline',\n )}\n ></Text>\n )}\n </motion.div>\n </div>\n )\n}\n"],
5
+ "mappings": "AAmCM,OAaE,OAAAA,EAbF,QAAAC,MAAA,oBAnCN,OAAS,WAAAC,EAAS,QAAAC,MAAY,wBAC9B,OAAS,mBAAAC,MAAuB,8BAChC,OAAS,MAAAC,MAAU,4BACnB,OAAS,UAAAC,MAAc,gBACvB,OAAyB,aAAAC,EAAW,YAAAC,MAAgB,QAW7C,MAAMC,EAAU,CAAC,CACtB,MAAAC,EACA,SAAAC,EACA,OAAAC,EACA,SAAAC,EACA,oBAAAC,EACA,gBAAAC,EAAkB,EACpB,IAAoB,CAClB,KAAM,CAACC,EAAUC,CAAW,EAAIT,EAASO,CAAe,EACxD,OAAAR,EAAU,IAAM,CACVG,GAAS,GACXO,EAAY,EAAI,EAEbN,GACHM,EAAY,EAAI,CAEpB,EAAG,CAACP,EAAOC,CAAQ,CAAC,EAGlBV,EAAC,OAAgB,UAAWI,EAAG,sEAAsE,EACnG,UAAAJ,EAAC,OACC,UAAU,6BACV,QAAS,IAAM,CACbgB,EAAY,CAACD,CAAQ,CACvB,EACA,KAAK,SACL,SAAU,EACV,UAAYE,GAAM,EACZA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCA,EAAE,eAAe,CAErB,EAEA,UAAAlB,EAACE,EAAA,CACC,KAAMS,EACN,GAAG,KACH,UAAWN,EACTQ,EACI,+IACA,GACJ,mGACF,EACD,EACAC,EACCA,EAAoB,CAAE,SAAAE,CAAS,CAAC,EAEhChB,EAACI,EAAA,CACC,UAAWC,EACT,oEACAW,EAAW,aAAe,EAC5B,EACF,GAEJ,EACAhB,EAACM,EAAO,IAAP,CACC,QAAS,GACT,QAAS,CAAE,OAASU,EAAe,OAAJ,CAAW,EAC1C,UAAU,qFAET,SAAAJ,GAAQ,SAAS,GAAG,SAAS,yBAAyB,EACrDZ,EAACG,EAAA,CACC,GAAG,MACH,UAAWE,EAAG,UAAU,EACxB,aAAW,OACX,eAAcO,EACd,KAAMA,GAAQ,SAAS,EACxB,EAEDZ,EAACG,EAAA,CACC,GAAG,MACH,KAAMS,GAAQ,SAAS,EACvB,UAAWP,EACT,4GACF,EACD,EAEL,IAzDQK,CA0DV,CAEJ",
6
+ "names": ["jsx", "jsxs", "Heading", "Text", "ChevronDownIcon", "cn", "motion", "useEffect", "useState", "FaqItem", "index", "question", "answer", "showDots", "itemRightIconRender", "defaultExpended", "expanded", "setExpanded", "e"]
7
+ }
@@ -0,0 +1,16 @@
1
+ export type FaqCopy = {
2
+ title: string;
3
+ subTitle: string;
4
+ learnMore: {
5
+ link: string;
6
+ label: string;
7
+ };
8
+ items: {
9
+ category_name: string;
10
+ question: string;
11
+ answer: string;
12
+ }[];
13
+ };
14
+ export declare const CreditsFaq: ({ copy }: {
15
+ copy: FaqCopy;
16
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as t,jsxs as v}from"react/jsx-runtime";import{Container as u,Heading as b,Tabs as p,TabsList as x,TabsTrigger as c,Text as d}from"@anker-in/headless-ui";import{cn as T}from"../../../helpers/index";import{useMemo as o,useState as h}from"react";import{FaqItem as q}from"./faqItem/FaqItem";const C=({copy:a})=>{const{title:m,items:r,subTitle:i=""}=a||{},n=o(()=>Array.from(new Set(r?.map?.(e=>e.category_name).filter(e=>!!e))),[r]),[l,g]=h(n[0]?.toString()||""),f=o(()=>r?n.length?r.filter(e=>e?.category_name===l):r:[],[r,n.length,l]);return v(u,{className:"bg-[#F5F5F7]",id:"faq",children:[m&&t(b,{as:"h2",size:"4",html:a?.title}),i&&t("div",{className:"mt-[8px] flex flex-row",children:t(d,{size:"4",as:"p",html:i,className:"flex-1"})}),t(p,{align:"left",shape:"rounded",className:"mt-[24px]",value:l.toString(),onValueChange:e=>{g(e)},children:t(x,{children:n.map((e,s)=>t(c,{value:e?.toString()||"",children:e},s))})}),t("div",{className:T("mt-[24px] flex flex-col overflow-auto pt-0"),children:f?.map((e,s)=>t(q,{index:s,defaultExpended:r.length===1,question:e.question,answer:e.answer,showDots:!1},s))}),a.learnMore?.link&&a.learnMore?.label&&t("a",{href:a.learnMore?.link,target:"_blank",className:"mt-[24px] block w-full text-center text-[18px] font-bold text-brand hover:underline l:text-[16px]",children:a.learnMore?.label})]})};export{C as CreditsFaq};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/components/credits/creditsFaq/index.tsx"],
4
+ "sourcesContent": ["import { Container, Heading, Tabs, TabsList, TabsTrigger, Text } from '@anker-in/headless-ui'\nimport { cn } from '../../../helpers/index'\nimport { useMemo, useState } from 'react'\n\nimport { FaqItem } from './faqItem/FaqItem'\n\nexport type FaqCopy = {\n title: string\n subTitle: string\n learnMore: {\n link: string\n label: string\n }\n items: {\n category_name: string\n question: string\n answer: string\n }[]\n}\nexport const CreditsFaq = ({ copy }: { copy: FaqCopy }) => {\n const { title, items: faqList, subTitle = '' } = copy || {}\n const categoryList = useMemo(() => {\n return Array.from(new Set(faqList?.map?.(faq => faq.category_name).filter(item => !!item)))\n }, [faqList])\n const [activeTab, setActiveTab] = useState<string>(categoryList[0]?.toString() || '')\n\n const currentList = useMemo(() => {\n if (!faqList) return []\n if (categoryList.length) {\n return faqList.filter(item => item?.category_name === activeTab)\n }\n return faqList\n }, [faqList, categoryList.length, activeTab])\n\n return (\n <Container className=\"bg-[#F5F5F7]\" id=\"faq\">\n {title && <Heading as=\"h2\" size=\"4\" html={copy?.title} />}\n {subTitle && (\n <div className=\"mt-[8px] flex flex-row\">\n <Text size=\"4\" as=\"p\" html={subTitle} className=\"flex-1\" />\n </div>\n )}\n {/* faq-nav */}\n <Tabs\n align=\"left\"\n shape=\"rounded\"\n className=\"mt-[24px]\"\n value={activeTab.toString()}\n onValueChange={value => {\n setActiveTab(value)\n }}\n >\n <TabsList>\n {categoryList.map((item, index) => (\n <TabsTrigger key={index} value={item?.toString() || ''}>\n {item}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n <div className={cn('mt-[24px] flex flex-col overflow-auto pt-0')}>\n {currentList?.map((item, index) => {\n return (\n <FaqItem\n key={index}\n index={index}\n defaultExpended={faqList.length === 1}\n question={item.question}\n answer={item.answer}\n showDots={false}\n ></FaqItem>\n )\n })}\n </div>\n {copy.learnMore?.link && copy.learnMore?.label && (\n <a\n href={copy.learnMore?.link}\n target=\"_blank\"\n className=\"mt-[24px] block w-full text-center text-[18px] font-bold text-brand hover:underline l:text-[16px]\"\n >\n {copy.learnMore?.label}\n </a>\n )}\n </Container>\n )\n}\n"],
5
+ "mappings": "AAmCI,OACY,OAAAA,EADZ,QAAAC,MAAA,oBAnCJ,OAAS,aAAAC,EAAW,WAAAC,EAAS,QAAAC,EAAM,YAAAC,EAAU,eAAAC,EAAa,QAAAC,MAAY,wBACtE,OAAS,MAAAC,MAAU,yBACnB,OAAS,WAAAC,EAAS,YAAAC,MAAgB,QAElC,OAAS,WAAAC,MAAe,oBAejB,MAAMC,EAAa,CAAC,CAAE,KAAAC,CAAK,IAAyB,CACzD,KAAM,CAAE,MAAAC,EAAO,MAAOC,EAAS,SAAAC,EAAW,EAAG,EAAIH,GAAQ,CAAC,EACpDI,EAAeR,EAAQ,IACpB,MAAM,KAAK,IAAI,IAAIM,GAAS,MAAMG,GAAOA,EAAI,aAAa,EAAE,OAAOC,GAAQ,CAAC,CAACA,CAAI,CAAC,CAAC,EACzF,CAACJ,CAAO,CAAC,EACN,CAACK,EAAWC,CAAY,EAAIX,EAAiBO,EAAa,CAAC,GAAG,SAAS,GAAK,EAAE,EAE9EK,EAAcb,EAAQ,IACrBM,EACDE,EAAa,OACRF,EAAQ,OAAOI,GAAQA,GAAM,gBAAkBC,CAAS,EAE1DL,EAJc,CAAC,EAKrB,CAACA,EAASE,EAAa,OAAQG,CAAS,CAAC,EAE5C,OACEnB,EAACC,EAAA,CAAU,UAAU,eAAe,GAAG,MACpC,UAAAY,GAASd,EAACG,EAAA,CAAQ,GAAG,KAAK,KAAK,IAAI,KAAMU,GAAM,MAAO,EACtDG,GACChB,EAAC,OAAI,UAAU,yBACb,SAAAA,EAACO,EAAA,CAAK,KAAK,IAAI,GAAG,IAAI,KAAMS,EAAU,UAAU,SAAS,EAC3D,EAGFhB,EAACI,EAAA,CACC,MAAM,OACN,MAAM,UACN,UAAU,YACV,MAAOgB,EAAU,SAAS,EAC1B,cAAeG,GAAS,CACtBF,EAAaE,CAAK,CACpB,EAEA,SAAAvB,EAACK,EAAA,CACE,SAAAY,EAAa,IAAI,CAACE,EAAMK,IACvBxB,EAACM,EAAA,CAAwB,MAAOa,GAAM,SAAS,GAAK,GACjD,SAAAA,GADeK,CAElB,CACD,EACH,EACF,EACAxB,EAAC,OAAI,UAAWQ,EAAG,4CAA4C,EAC5D,SAAAc,GAAa,IAAI,CAACH,EAAMK,IAErBxB,EAACW,EAAA,CAEC,MAAOa,EACP,gBAAiBT,EAAQ,SAAW,EACpC,SAAUI,EAAK,SACf,OAAQA,EAAK,OACb,SAAU,IALLK,CAMN,CAEJ,EACH,EACCX,EAAK,WAAW,MAAQA,EAAK,WAAW,OACvCb,EAAC,KACC,KAAMa,EAAK,WAAW,KACtB,OAAO,SACP,UAAU,oGAET,SAAAA,EAAK,WAAW,MACnB,GAEJ,CAEJ",
6
+ "names": ["jsx", "jsxs", "Container", "Heading", "Tabs", "TabsList", "TabsTrigger", "Text", "cn", "useMemo", "useState", "FaqItem", "CreditsFaq", "copy", "title", "faqList", "subTitle", "categoryList", "faq", "item", "activeTab", "setActiveTab", "currentList", "value", "index"]
7
+ }
@@ -0,0 +1,20 @@
1
+ import { type MyRewardsMetafields } from '../modal/MyRewardsModal';
2
+ import { type MyActivitiesMetafields } from '../modal/activitiesModal';
3
+ type ButtonConfig = {
4
+ text: string;
5
+ type: 'activities' | 'rewards';
6
+ };
7
+ export interface InfoCardProps {
8
+ data: {
9
+ balanceLabel: string;
10
+ comingSoonLabel: string;
11
+ comingSoonTips: string;
12
+ buttons: ButtonConfig[];
13
+ pointUnit: string;
14
+ infoIcon: string;
15
+ myActivities: MyActivitiesMetafields;
16
+ myRewards: MyRewardsMetafields;
17
+ };
18
+ }
19
+ export declare function CreditsInfoCard({ data }: InfoCardProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Button as g,Container as u,Text as n}from"@anker-in/headless-ui";import{useCallback as y,useState as m}from"react";import{useCreditsContext as w}from"../context/provider";import{cn as l}from"../../../helpers";import{numberFormat as c}from"../context/utils";import N from"../modal/activitiesModal";import C from"../modal/MyRewardsModal";import{gaNormalClick as k}from"../../../helpers/track";function T({data:t}){const[f,p]=m(!1),[v,x]=m(!1),[r,o]=m(!1),b=y(s=>{if(k({position:"info_card",label:s.text}),s.type)switch(s.type){case"activities":p(!0);break;case"rewards":x(!0);break}},[]),{creditInfo:a}=w();return i(u,{asChild:!0,id:"infoCard",className:"-mb-[86px] -translate-y-[86px] x:-mb-[30px] x:-translate-y-[30px]",children:[i("div",{className:l("mx-auto flex justify-between items-center rounded-[12px] border border-white px-[24px] py-[40px]","l:flex-col l:items-start","min-l:px-[48px]","min-xl:px-[100px]"),style:{background:"linear-gradient(119.61deg, rgba(250, 250, 250, 0.6) 38.58%, rgba(255, 255, 255, 0.6) 63.73%, rgba(249, 252, 255, 0.6) 89.37%)",backdropFilter:"blur(8px)"},children:[i("div",{className:l("grid grid-cols-2 gap-[24px] font-bold l:w-full md:grid-cols-1 md:flex-col md:gap-[16px] min-md:items-center"),children:[i("div",{className:"mr-[80px] md:mr-[0] md:flex-1 md-xl:mr-[64px]",children:[e("div",{className:l("mb-[24px] text-[14px] font-bold l:mb-[6px] xl:text-[16px] min-md:text-[18px] l-xl:mb-[16px]"),children:t.balanceLabel}),i("div",{className:"flex items-baseline",children:[e("div",{className:l("mr-[8px] text-[36px] font-extrabold","min-md:text-[44px]","min-xl:text-[56px]"),children:a?c(a.available_credit):0}),e("div",{className:"text-[16px]",children:t?.pointUnit})]})]}),i("div",{className:"w-fit md:flex-1",children:[i("div",{className:l("mb-[24px] flex text-[18px] l:mb-[6px] l:text-[14px] l-xl:mb-[16px]"),children:[e(n,{className:"text-[14px] font-bold xl:text-[16px] min-md:text-[18px]",html:t.comingSoonLabel}),t.comingSoonTips&&i("div",{className:"group relative ml-[4px] flex cursor-pointer items-start",children:[e(n,{as:"div",html:t?.infoIcon,className:"size-[18px] cursor-pointer [&_svg]:size-full",onClick:()=>{r?o(!1):(o(!0),setTimeout(()=>{o(!1)},5e3))}}),e("div",{className:l("absolute -bottom-[12px] -left-[32px] z-10 w-[356px] translate-y-full md:w-[276px]",r?"block":"hidden"),children:i("div",{className:"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow",children:[e(n,{size:"2",html:t.comingSoonTips,className:"desktop:text-[18px]"}),e("div",{className:"absolute -top-[10px] left-[40px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]"})]})})]})]}),i("div",{className:"flex items-baseline ",children:[e("div",{className:l("mr-[8px] text-[36px] font-extrabold","min-l:text-[44px]","min-xl:text-[56px]"),children:a?c(a.pending_credit):0}),e("div",{className:"text-[16px]",children:t?.pointUnit})]})]})]}),e("div",{className:l("grid w-fit md:w-full l:mt-[32px] l:gap-[12px] min-l:gap-[16px] min-l:pl-[48px] md-l:grid-cols-2"),children:t.buttons?.map((s,d)=>e(g,{variant:d===0?"secondary":"primary",size:"lg",className:"min-w-[156px] laptop:min-w-[189px]",onClick:()=>{b(s)},children:s.text},d))}),t?.myActivities&&e(N,{isOpen:f,data:t?.myActivities,onClose:()=>{p(!1)}}),t?.myRewards&&e(C,{isOpen:v,data:t?.myRewards,onClose:()=>{x(!1)}})]}),r&&e("div",{role:"button",tabIndex:0,className:"fixed inset-0 z-10",onClick:()=>o(!1),onKeyDown:s=>s.key==="Escape"&&o(!1)})]})}export{T as CreditsInfoCard};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/components/credits/creditsInfoCard/index.tsx"],
4
+ "sourcesContent": ["import { Button, Container, Text } from '@anker-in/headless-ui'\n\nimport { useCallback, useState } from 'react'\nimport { useCreditsContext } from '../context/provider'\nimport { cn } from '../../../helpers'\nimport { numberFormat } from '../context/utils'\nimport ActivitiesModal from '../modal/activitiesModal'\nimport MyRewardsModal, { type MyRewardsMetafields } from '../modal/MyRewardsModal'\nimport { type MyActivitiesMetafields } from '../modal/activitiesModal'\nimport { gaNormalClick } from '../../../helpers/track'\n\ntype ButtonConfig = {\n text: string\n type: 'activities' | 'rewards'\n}\nexport interface InfoCardProps {\n data: {\n balanceLabel: string\n comingSoonLabel: string\n comingSoonTips: string\n buttons: ButtonConfig[]\n pointUnit: string\n infoIcon: string\n myActivities: MyActivitiesMetafields\n myRewards: MyRewardsMetafields\n }\n}\nexport function CreditsInfoCard({ data }: InfoCardProps) {\n const [openActivities, setOpenActivities] = useState(false)\n const [openRewards, setOpenRewards] = useState(false)\n const [hover, setHover] = useState<boolean>(false)\n\n const handleButtonClick = useCallback((buttonConfig: ButtonConfig) => {\n gaNormalClick({ position: 'info_card', label: buttonConfig.text })\n\n if (buttonConfig.type) {\n switch (buttonConfig.type) {\n case 'activities':\n setOpenActivities(true)\n break\n case 'rewards':\n setOpenRewards(true)\n break\n }\n }\n }, [])\n\n const { creditInfo } = useCreditsContext()\n\n return (\n <Container asChild id=\"infoCard\" className=\"-mb-[86px] -translate-y-[86px] x:-mb-[30px] x:-translate-y-[30px]\">\n <div\n className={cn(\n 'mx-auto flex justify-between items-center rounded-[12px] border border-white px-[24px] py-[40px]',\n 'l:flex-col l:items-start',\n 'min-l:px-[48px]',\n 'min-xl:px-[100px]'\n )}\n style={{\n background:\n 'linear-gradient(119.61deg, rgba(250, 250, 250, 0.6) 38.58%, rgba(255, 255, 255, 0.6) 63.73%, rgba(249, 252, 255, 0.6) 89.37%)',\n backdropFilter: 'blur(8px)',\n }}\n >\n <div\n className={cn(\n 'grid grid-cols-2 gap-[24px] font-bold l:w-full md:grid-cols-1 md:flex-col md:gap-[16px] min-md:items-center'\n )}\n >\n <div className=\"mr-[80px] md:mr-[0] md:flex-1 md-xl:mr-[64px]\">\n <div\n className={cn(\n 'mb-[24px] text-[14px] font-bold l:mb-[6px] xl:text-[16px] min-md:text-[18px] l-xl:mb-[16px]'\n )}\n >\n {data.balanceLabel}\n </div>\n <div className=\"flex items-baseline\">\n <div className={cn('mr-[8px] text-[36px] font-extrabold', 'min-md:text-[44px]', 'min-xl:text-[56px]')}>\n {creditInfo ? numberFormat(creditInfo.available_credit) : 0}\n </div>\n <div className=\"text-[16px]\">{data?.pointUnit}</div>\n </div>\n </div>\n <div className=\"w-fit md:flex-1\">\n <div className={cn('mb-[24px] flex text-[18px] l:mb-[6px] l:text-[14px] l-xl:mb-[16px]')}>\n <Text className=\"text-[14px] font-bold xl:text-[16px] min-md:text-[18px]\" html={data.comingSoonLabel} />\n {data.comingSoonTips && (\n <div className=\"group relative ml-[4px] flex cursor-pointer items-start\">\n <Text\n as=\"div\"\n html={data?.infoIcon}\n className=\"size-[18px] cursor-pointer [&_svg]:size-full\"\n onClick={() => {\n if (hover) {\n setHover(false)\n } else {\n setHover(true)\n setTimeout(() => {\n setHover(false)\n }, 5000)\n }\n }}\n />\n <div\n className={cn(\n 'absolute -bottom-[12px] -left-[32px] z-10 w-[356px] translate-y-full md:w-[276px]',\n hover ? 'block' : 'hidden'\n )}\n >\n <div className=\"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow\">\n <Text size=\"2\" html={data.comingSoonTips} className=\"desktop:text-[18px]\" />\n <div className=\"absolute -top-[10px] left-[40px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]\" />\n </div>\n </div>\n </div>\n )}\n </div>\n <div className=\"flex items-baseline \">\n <div className={cn('mr-[8px] text-[36px] font-extrabold', 'min-l:text-[44px]', 'min-xl:text-[56px]')}>\n {creditInfo ? numberFormat(creditInfo.pending_credit) : 0}\n </div>\n <div className=\"text-[16px]\">{data?.pointUnit}</div>\n </div>\n </div>\n </div>\n <div\n className={cn(\n 'grid w-fit md:w-full l:mt-[32px] l:gap-[12px] min-l:gap-[16px] min-l:pl-[48px] md-l:grid-cols-2'\n )}\n >\n {data.buttons?.map((item, index) => (\n <Button\n key={index}\n variant={index === 0 ? 'secondary' : 'primary'}\n size=\"lg\"\n className=\"min-w-[156px] laptop:min-w-[189px]\"\n onClick={() => {\n handleButtonClick(item)\n }}\n >\n {item.text}\n </Button>\n ))}\n </div>\n\n {data?.myActivities && (\n <ActivitiesModal\n isOpen={openActivities}\n data={data?.myActivities}\n onClose={() => {\n setOpenActivities(false)\n }}\n />\n )}\n {data?.myRewards && (\n <MyRewardsModal\n isOpen={openRewards}\n data={data?.myRewards}\n onClose={() => {\n setOpenRewards(false)\n }}\n ></MyRewardsModal>\n )}\n </div>\n {hover && (\n <div\n role=\"button\"\n tabIndex={0}\n className=\"fixed inset-0 z-10\"\n onClick={() => setHover(false)}\n onKeyDown={e => e.key === 'Escape' && setHover(false)}\n />\n )}\n </Container>\n )\n}\n"],
5
+ "mappings": "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",
6
+ "names": ["jsx", "jsxs", "Button", "Container", "Text", "useCallback", "useState", "useCreditsContext", "cn", "numberFormat", "ActivitiesModal", "MyRewardsModal", "gaNormalClick", "CreditsInfoCard", "data", "openActivities", "setOpenActivities", "openRewards", "setOpenRewards", "hover", "setHover", "handleButtonClick", "buttonConfig", "creditInfo", "item", "index", "e"]
7
+ }
@@ -0,0 +1,14 @@
1
+ interface Country {
2
+ id: string;
3
+ code: string;
4
+ name: string;
5
+ }
6
+ interface CountrySelectProps {
7
+ countries: Country[];
8
+ loading?: boolean;
9
+ className?: string;
10
+ value?: string;
11
+ onChange: (code: string) => void;
12
+ }
13
+ export declare function CountrySelect({ countries, loading, className, value, onChange }: CountrySelectProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as o,jsxs as c}from"react/jsx-runtime";import{Picture as x}from"@anker-in/headless-ui";import b from"../../context/hooks/useClickOutside";import s from"classnames";import{useEffect as v,useState as p}from"react";function w({countries:t,loading:d,className:r,value:n,onChange:i}){const[u,l]=p(!1),[f,a]=p(""),g=b(()=>{l(!1)});return v(()=>{const e=t.filter(m=>m.code===n);e.length&&a(e[0].name)},[a,t,n]),c("div",{className:"relative",children:[o("select",{className:s("!h-[50px] pr-[45px] min-l:hidden",r),style:{WebkitTextFillColor:"black"},disabled:d,value:n,onChange:e=>{i(e.target.value)},children:t.map(e=>o("option",{value:e.code,children:e.name},e.code))}),o("div",{className:s("absolute left-0 top-0 hidden !h-[50px] rounded-[2px] pr-[45px] text-[16px] font-bold focus:!border-[#6D6D6F] min-l:!block",r),onClick:()=>{l(!0)},role:"button",tabIndex:0,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&e.preventDefault()},children:f}),o(x,{source:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/country-select.png?v=1692202500",imgClassName:"pointer-events-none absolute right-0 top-0 bottom-0 !w-[45px] object-cover",alt:"arrow"}),o("div",{ref:g,className:s("absolute left-0 top-[58px] z-30 max-h-[334px] w-full cursor-pointer overflow-auto rounded-[4px] bg-white shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]",{"!hidden":!u}),children:o("ul",{className:"py-[6px]",children:t.map(e=>c("li",{value:e.code,className:s("relative px-[14px] py-[17px] text-[16px] font-bold leading-[1] transition hover:bg-[#EAEAEC]",{"!bg-[#EAEAEC]":e.code===n}),children:[o("button",{className:"absolute left-0 top-0 z-1 size-full opacity-0",value:e.code,onClick:()=>{a(e.name),l(!1),i(e.code)}}),e.name]},e.code))})})]})}export{w as CountrySelect};
2
+ //# sourceMappingURL=CountrySelect.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/components/credits/creditsRedeemList/AddressForm/CountrySelect.tsx"],
4
+ "sourcesContent": ["import { Picture } from '@anker-in/headless-ui'\nimport useClickOutside from '../../context/hooks/useClickOutside'\nimport classNames from 'classnames'\nimport { useEffect, useState } from 'react'\n\ninterface Country {\n id: string\n code: string\n name: string\n}\n\ninterface CountrySelectProps {\n countries: Country[]\n loading?: boolean\n className?: string\n value?: string\n onChange: (code: string) => void\n}\n\nexport function CountrySelect({ countries, loading, className, value, onChange }: CountrySelectProps) {\n const [show, setShow] = useState(false)\n const [display, setDisplay] = useState<any>('')\n\n const dorpdown = useClickOutside<HTMLDivElement>(() => {\n setShow(false)\n })\n\n useEffect(() => {\n const target = countries.filter(item => item.code === value)\n if (target.length) setDisplay(target[0].name)\n }, [setDisplay, countries, value])\n\n return (\n <div className=\"relative\">\n <select\n className={classNames('!h-[50px] pr-[45px] min-l:hidden', className)}\n style={{\n WebkitTextFillColor: 'black',\n }}\n disabled={loading}\n value={value}\n onChange={event => {\n onChange(event.target.value)\n }}\n >\n {countries.map((item: { id: string; name: string; code: string }) => (\n <option key={item.code} value={item.code}>\n {item.name}\n </option>\n ))}\n </select>\n\n <div\n className={classNames(\n 'absolute left-0 top-0 hidden !h-[50px] rounded-[2px] pr-[45px] text-[16px] font-bold focus:!border-[#6D6D6F] min-l:!block',\n className\n )}\n onClick={() => {\n setShow(true)\n }}\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n }\n }}\n >\n {display}\n </div>\n\n <Picture\n source=\"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/country-select.png?v=1692202500\"\n imgClassName=\"pointer-events-none absolute right-0 top-0 bottom-0 !w-[45px] object-cover\"\n alt=\"arrow\"\n />\n\n <div\n ref={dorpdown}\n className={classNames(\n 'absolute left-0 top-[58px] z-30 max-h-[334px] w-full cursor-pointer overflow-auto rounded-[4px] bg-white shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]',\n { '!hidden': !show }\n )}\n >\n <ul className=\"py-[6px]\">\n {countries.map((item: { id: string; name: string; code: string }) => (\n <li\n key={item.code}\n value={item.code}\n className={classNames(\n 'relative px-[14px] py-[17px] text-[16px] font-bold leading-[1] transition hover:bg-[#EAEAEC]',\n { '!bg-[#EAEAEC]': item.code === value }\n )}\n >\n <button\n className=\"absolute left-0 top-0 z-1 size-full opacity-0\"\n value={item.code}\n onClick={() => {\n setDisplay(item.name)\n setShow(false)\n onChange(item.code)\n }}\n />\n {item.name}\n </li>\n ))}\n </ul>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "AA8CU,cAAAA,EAwCE,QAAAC,MAxCF,oBA9CV,OAAS,WAAAC,MAAe,wBACxB,OAAOC,MAAqB,sCAC5B,OAAOC,MAAgB,aACvB,OAAS,aAAAC,EAAW,YAAAC,MAAgB,QAgB7B,SAASC,EAAc,CAAE,UAAAC,EAAW,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,SAAAC,CAAS,EAAuB,CACpG,KAAM,CAACC,EAAMC,CAAO,EAAIR,EAAS,EAAK,EAChC,CAACS,EAASC,CAAU,EAAIV,EAAc,EAAE,EAExCW,EAAWd,EAAgC,IAAM,CACrDW,EAAQ,EAAK,CACf,CAAC,EAED,OAAAT,EAAU,IAAM,CACd,MAAMa,EAASV,EAAU,OAAOW,GAAQA,EAAK,OAASR,CAAK,EACvDO,EAAO,QAAQF,EAAWE,EAAO,CAAC,EAAE,IAAI,CAC9C,EAAG,CAACF,EAAYR,EAAWG,CAAK,CAAC,EAG/BV,EAAC,OAAI,UAAU,WACb,UAAAD,EAAC,UACC,UAAWI,EAAW,mCAAoCM,CAAS,EACnE,MAAO,CACL,oBAAqB,OACvB,EACA,SAAUD,EACV,MAAOE,EACP,SAAUS,GAAS,CACjBR,EAASQ,EAAM,OAAO,KAAK,CAC7B,EAEC,SAAAZ,EAAU,IAAKW,GACdnB,EAAC,UAAuB,MAAOmB,EAAK,KACjC,SAAAA,EAAK,MADKA,EAAK,IAElB,CACD,EACH,EAEAnB,EAAC,OACC,UAAWI,EACT,4HACAM,CACF,EACA,QAAS,IAAM,CACbI,EAAQ,EAAI,CACd,EACA,KAAK,SACL,SAAU,EACV,UAAW,GAAK,EACV,EAAE,MAAQ,SAAW,EAAE,MAAQ,MACjC,EAAE,eAAe,CAErB,EAEC,SAAAC,EACH,EAEAf,EAACE,EAAA,CACC,OAAO,yFACP,aAAa,6EACb,IAAI,QACN,EAEAF,EAAC,OACC,IAAKiB,EACL,UAAWb,EACT,sJACA,CAAE,UAAW,CAACS,CAAK,CACrB,EAEA,SAAAb,EAAC,MAAG,UAAU,WACX,SAAAQ,EAAU,IAAKW,GACdlB,EAAC,MAEC,MAAOkB,EAAK,KACZ,UAAWf,EACT,+FACA,CAAE,gBAAiBe,EAAK,OAASR,CAAM,CACzC,EAEA,UAAAX,EAAC,UACC,UAAU,gDACV,MAAOmB,EAAK,KACZ,QAAS,IAAM,CACbH,EAAWG,EAAK,IAAI,EACpBL,EAAQ,EAAK,EACbF,EAASO,EAAK,IAAI,CACpB,EACF,EACCA,EAAK,OAhBDA,EAAK,IAiBZ,CACD,EACH,EACF,GACF,CAEJ",
6
+ "names": ["jsx", "jsxs", "Picture", "useClickOutside", "classNames", "useEffect", "useState", "CountrySelect", "countries", "loading", "className", "value", "onChange", "show", "setShow", "display", "setDisplay", "dorpdown", "target", "item", "event"]
7
+ }
@@ -0,0 +1,6 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ export declare const FormItem: ({ error, children, label, required, }: PropsWithChildren<{
3
+ label?: string;
4
+ required: boolean;
5
+ error?: string;
6
+ }>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import{Text as i}from"@anker-in/headless-ui";const d=({error:t,children:m,label:o,required:p})=>s("div",{children:[o&&e(i,{html:p?`${o} *`:o,className:"text-[16px] font-bold"}),e("div",{className:"mt-[8px] h-[50px] w-full text-[14px] font-semibold",children:m}),t&&typeof t=="string"&&e(i,{as:"div",html:t,className:"mt-[8px] text-[16px] font-bold text-[#FF4D4D]"})]});export{d as FormItem};
2
+ //# sourceMappingURL=FormItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/components/credits/creditsRedeemList/AddressForm/FormItem.tsx"],
4
+ "sourcesContent": ["import { Text } from '@anker-in/headless-ui'\nimport { type PropsWithChildren } from 'react'\n\nexport const FormItem = ({\n error,\n children,\n label,\n required,\n}: PropsWithChildren<{\n label?: string\n required: boolean\n error?: string\n}>) => {\n return (\n <div>\n {label && <Text html={required ? `${label} *` : label} className=\"text-[16px] font-bold\"></Text>}\n <div className=\"mt-[8px] h-[50px] w-full text-[14px] font-semibold\">{children}</div>\n {error && typeof error === 'string' && (\n <Text as=\"div\" html={error} className=\"mt-[8px] text-[16px] font-bold text-[#FF4D4D]\" />\n )}\n </div>\n )\n}\n"],
5
+ "mappings": "AAcI,OACY,OAAAA,EADZ,QAAAC,MAAA,oBAdJ,OAAS,QAAAC,MAAY,wBAGd,MAAMC,EAAW,CAAC,CACvB,MAAAC,EACA,SAAAC,EACA,MAAAC,EACA,SAAAC,CACF,IAMIN,EAAC,OACE,UAAAK,GAASN,EAACE,EAAA,CAAK,KAAMK,EAAW,GAAGD,CAAK,KAAOA,EAAO,UAAU,wBAAwB,EACzFN,EAAC,OAAI,UAAU,qDAAsD,SAAAK,EAAS,EAC7ED,GAAS,OAAOA,GAAU,UACzBJ,EAACE,EAAA,CAAK,GAAG,MAAM,KAAME,EAAO,UAAU,gDAAgD,GAE1F",
6
+ "names": ["jsx", "jsxs", "Text", "FormItem", "error", "children", "label", "required"]
7
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface InputProps {
3
+ className?: string;
4
+ value: string;
5
+ error?: string | boolean;
6
+ placeholder: string;
7
+ required?: boolean;
8
+ disabled?: boolean;
9
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
10
+ onBlur?: () => void;
11
+ }
12
+ export declare function Input({ className, error, value, placeholder, disabled, onChange, onBlur }: InputProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as m}from"react/jsx-runtime";import h from"classnames";import{useCallback as r,useEffect as g,useState as b}from"react";function C({className:s,error:u,value:t,placeholder:c,disabled:p,onChange:a,onBlur:o}){const[v,e]=b(!1);g(()=>{t&&e(!0)},[t]);const d=r(n=>{const l=n.currentTarget.value;l&&e(!!l),a(n)},[a]),i=r(n=>{e(!!n.currentTarget.value),o&&o()},[o]),f=r(()=>{e(!0)},[]);return m("input",{className:h("w-full rounded-[2px] border border-[#6D6D6F] p-[14px] text-[16px] font-bold placeholder:text-[16px] placeholder:font-bold placeholder:text-[#6D6D6F] focus:outline-none focus:ring-0",s,u&&"border-[#FF4D4D]"),value:t,placeholder:c,disabled:p,onChange:d,onBlur:i,onFocus:f})}export{C as Input};
2
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/components/credits/creditsRedeemList/AddressForm/Input.tsx"],
4
+ "sourcesContent": ["import classNames from 'classnames'\nimport React, { useCallback, useEffect, useState } from 'react'\n\ninterface InputProps {\n className?: string\n value: string\n error?: string | boolean\n placeholder: string\n required?: boolean\n disabled?: boolean\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => void\n onBlur?: () => void\n}\n\nexport function Input({ className, error, value, placeholder, disabled, onChange, onBlur }: InputProps) {\n const [focus, setFocus] = useState(false)\n\n useEffect(() => {\n if (value) setFocus(true)\n }, [value])\n\n const handleOnChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const val = event.currentTarget.value\n if (val) setFocus(!!val)\n onChange(event)\n },\n [onChange],\n )\n\n const handleOnBlur = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setFocus(!!event.currentTarget.value)\n onBlur && onBlur()\n },\n [onBlur],\n )\n\n const handleOnFocus = useCallback(() => {\n setFocus(true)\n }, [])\n\n return (\n <input\n className={classNames(\n 'w-full rounded-[2px] border border-[#6D6D6F] p-[14px] text-[16px] font-bold placeholder:text-[16px] placeholder:font-bold placeholder:text-[#6D6D6F] focus:outline-none focus:ring-0',\n className,\n error && 'border-[#FF4D4D]',\n )}\n value={value}\n placeholder={placeholder}\n disabled={disabled}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n ></input>\n )\n}\n"],
5
+ "mappings": "AA2CI,cAAAA,MAAA,oBA3CJ,OAAOC,MAAgB,aACvB,OAAgB,eAAAC,EAAa,aAAAC,EAAW,YAAAC,MAAgB,QAajD,SAASC,EAAM,CAAE,UAAAC,EAAW,MAAAC,EAAO,MAAAC,EAAO,YAAAC,EAAa,SAAAC,EAAU,SAAAC,EAAU,OAAAC,CAAO,EAAe,CACtG,KAAM,CAACC,EAAOC,CAAQ,EAAIV,EAAS,EAAK,EAExCD,EAAU,IAAM,CACVK,GAAOM,EAAS,EAAI,CAC1B,EAAG,CAACN,CAAK,CAAC,EAEV,MAAMO,EAAiBb,EACpBc,GAA+C,CAC9C,MAAMC,EAAMD,EAAM,cAAc,MAC5BC,GAAKH,EAAS,CAAC,CAACG,CAAG,EACvBN,EAASK,CAAK,CAChB,EACA,CAACL,CAAQ,CACX,EAEMO,EAAehB,EAClBc,GAA+C,CAC9CF,EAAS,CAAC,CAACE,EAAM,cAAc,KAAK,EACpCJ,GAAUA,EAAO,CACnB,EACA,CAACA,CAAM,CACT,EAEMO,EAAgBjB,EAAY,IAAM,CACtCY,EAAS,EAAI,CACf,EAAG,CAAC,CAAC,EAEL,OACEd,EAAC,SACC,UAAWC,EACT,uLACAK,EACAC,GAAS,kBACX,EACA,MAAOC,EACP,YAAaC,EACb,SAAUC,EACV,SAAUK,EACV,OAAQG,EACR,QAASC,EACV,CAEL",
6
+ "names": ["jsx", "classNames", "useCallback", "useEffect", "useState", "Input", "className", "error", "value", "placeholder", "disabled", "onChange", "onBlur", "focus", "setFocus", "handleOnChange", "event", "val", "handleOnBlur", "handleOnFocus"]
7
+ }
@@ -0,0 +1,15 @@
1
+ interface StateSelectProps {
2
+ states: {
3
+ code: string;
4
+ id: string;
5
+ name: string;
6
+ }[];
7
+ className?: string;
8
+ countryId?: string;
9
+ defaultCode?: string;
10
+ stateName?: string;
11
+ stateCode?: string;
12
+ onChange: (code: string, name: string) => void;
13
+ }
14
+ export declare function StateSelect({ states, stateName, stateCode, className, onChange }: StateSelectProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ import{Fragment as w,jsx as n,jsxs as f}from"react/jsx-runtime";import a from"classnames";import{Picture as h}from"@anker-in/headless-ui";import{useEffect as b,useMemo as y,useState as u}from"react";import k from"../../context/hooks/useClickOutside";function F({states:t,stateName:i="",stateCode:s="",className:r="",onChange:c}){const[g,d]=u(!1),[v,p]=u(""),x=k(()=>{d(!1)}),l=y(()=>{const e=t.find(o=>s?o.code===s:o.name===i);return e?[e?.id,e?.name,e?.code].join(","):""},[t,s,i]);return b(()=>{const e=t.filter(o=>[o.id,o.name,o.code].join(",")===l);e.length&&p(e[0].name)},[p,t,l]),n("div",{className:"relative h-full",children:t.length?f(w,{children:[n("select",{className:a("h-[52px] pr-[45px] min-l:hidden",r),value:l,style:{WebkitTextFillColor:l?"black":"#666"},onChange:e=>{const[,o,m]=e.target.value.split(",");c(m,o)},children:t.map(e=>n("option",{value:[e.id,e.name,e.code].join(","),children:e.name},e.id))}),n("div",{className:a("absolute left-0 top-0 hidden h-[52px] pr-[45px] min-l:!block",r),onClick:()=>{d(!0)},role:"button",tabIndex:0,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&e.preventDefault()},children:v}),n(h,{source:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/country-select.png?v=1692202500",className:"pointer-events-none absolute right-0 top-1/2 h-[45px] !w-[45px] -translate-y-1/2 object-cover",alt:"arrow"}),n("div",{ref:x,className:a("absolute left-0 top-[58px] z-30 max-h-[334px] w-full cursor-pointer overflow-auto rounded-[4px] bg-white shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]",{"!hidden":!g}),children:n("ul",{className:"py-[6px]",children:t.map(e=>f("li",{value:[e.id,e.name,e.code].join(","),className:a("relative px-[14px] py-[17px] text-[16px] font-semibold leading-[1] transition hover:bg-[#F7F8F9]",{"!bg-[#e8e8e8]":[e.id,e.name,e.code].join(",")===l}),children:[n("button",{className:"absolute left-0 top-0 z-1 size-full opacity-0",value:[e.id,e.name,e.code].join(","),onClick:()=>{p(e.name),d(!1),c(e.code,e.name)}}),e.name]},e.id))})})]}):n("input",{className:r,value:i,style:{WebkitTextFillColor:"black"},onChange:e=>{c("",e.target.value)}})})}export{F as StateSelect};
2
+ //# sourceMappingURL=StateSelect.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/components/credits/creditsRedeemList/AddressForm/StateSelect.tsx"],
4
+ "sourcesContent": ["import classNames from 'classnames'\nimport { Picture } from '@anker-in/headless-ui'\nimport { useEffect, useMemo, useState } from 'react'\nimport useClickOutside from '../../context/hooks/useClickOutside'\n\ninterface StateSelectProps {\n states: { code: string; id: string; name: string }[]\n className?: string\n countryId?: string\n defaultCode?: string\n stateName?: string\n stateCode?: string\n onChange: (code: string, name: string) => void\n}\n\nexport function StateSelect({ states, stateName = '', stateCode = '', className = '', onChange }: StateSelectProps) {\n const [show, setShow] = useState(false)\n const [display, setDisplay] = useState<any>('')\n\n const dropdown = useClickOutside<HTMLDivElement>(() => {\n setShow(false)\n })\n\n const value = useMemo(() => {\n const currentState = states.find(item => (stateCode ? item.code === stateCode : item.name === stateName))\n\n return currentState ? [currentState?.id, currentState?.name, currentState?.code].join(',') : ''\n }, [states, stateCode, stateName])\n\n useEffect(() => {\n const target = states.filter(item => [item.id, item.name, item.code].join(',') === value)\n if (target.length) setDisplay(target[0].name)\n }, [setDisplay, states, value])\n\n return (\n <div className=\"relative h-full\">\n {states.length ? (\n <>\n <select\n className={classNames('h-[52px] pr-[45px] min-l:hidden', className)}\n value={value}\n style={{\n WebkitTextFillColor: value ? 'black' : '#666',\n }}\n onChange={event => {\n const [, name, code] = event.target.value.split(',')\n onChange(code, name)\n }}\n >\n {states.map((item: { id: string; name: string; code: string }) => (\n <option key={item.id} value={[item.id, item.name, item.code].join(',')}>\n {item.name}\n </option>\n ))}\n </select>\n <div\n className={classNames('absolute left-0 top-0 hidden h-[52px] pr-[45px] min-l:!block', className)}\n onClick={() => {\n setShow(true)\n }}\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n }\n }}\n >\n {display}\n </div>\n\n <Picture\n source=\"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/country-select.png?v=1692202500\"\n className=\"pointer-events-none absolute right-0 top-1/2 h-[45px] !w-[45px] -translate-y-1/2 object-cover\"\n alt=\"arrow\"\n />\n\n <div\n ref={dropdown}\n className={classNames(\n 'absolute left-0 top-[58px] z-30 max-h-[334px] w-full cursor-pointer overflow-auto rounded-[4px] bg-white shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]',\n { '!hidden': !show }\n )}\n >\n <ul className=\"py-[6px]\">\n {states.map((item: { id: string; name: string; code: string }) => (\n <li\n key={item.id}\n value={[item.id, item.name, item.code].join(',')}\n className={classNames(\n 'relative px-[14px] py-[17px] text-[16px] font-semibold leading-[1] transition hover:bg-[#F7F8F9]',\n {\n '!bg-[#e8e8e8]': [item.id, item.name, item.code].join(',') === value,\n }\n )}\n >\n <button\n className=\"absolute left-0 top-0 z-1 size-full opacity-0\"\n value={[item.id, item.name, item.code].join(',')}\n onClick={() => {\n setDisplay(item.name)\n setShow(false)\n onChange(item.code, item.name)\n }}\n />\n {item.name}\n </li>\n ))}\n </ul>\n </div>\n </>\n ) : (\n <input\n className={className}\n value={stateName}\n style={{\n WebkitTextFillColor: 'black',\n }}\n onChange={event => {\n onChange('', event.target.value)\n }}\n ></input>\n )}\n </div>\n )\n}\n"],
5
+ "mappings": "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",
6
+ "names": ["Fragment", "jsx", "jsxs", "classNames", "Picture", "useEffect", "useMemo", "useState", "useClickOutside", "StateSelect", "states", "stateName", "stateCode", "className", "onChange", "show", "setShow", "display", "setDisplay", "dropdown", "value", "currentState", "item", "target", "event", "name", "code"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import { AddressFormProps } from './type';
2
+ export declare const AddressForm: ({ countries, countriesLoading, form, validate, errors, onChange }: AddressFormProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import{jsx as a,jsxs as B}from"react/jsx-runtime";import x from"classnames";import{useCallback as F,useEffect as _,useMemo as N,useState as S}from"react";import{CountrySelect as w}from"./CountrySelect";import{FormItem as I}from"./FormItem";import{Input as q}from"./Input";import{StateSelect as P}from"./StateSelect";import{ALPC_COUNTRY_MAP as K}from"../../context/const";import{useCreditsContext as U}from"../../context/provider";import{useHeadlessContext as z}from"@anker-in/lib";const J=({countries:c,countriesLoading:g,form:n,validate:C,errors:h,onChange:l})=>{const{profile:u,customer:r}=U(),{locale:m}=z(),[e,i]=S(),p=N(()=>c.find(o=>o.code===e?.country)?.provinces||[],[e,c]),b=N(()=>n?.flat().find(o=>o.type==="state")?.key,[n]),A=F(()=>{if(r?.defaultAddress)return{name:(r?.defaultAddress.firstName||"")+" "+(r?.defaultAddress.lastName||""),first_name:r?.defaultAddress.firstName,last_name:r?.defaultAddress.lastName,address1:r?.defaultAddress.address1,address2:r?.defaultAddress.address2,city:r?.defaultAddress.city,phone:r?.defaultAddress.phone,country:r?.defaultAddress.countryCodeV2,province:r?.defaultAddress.province,province_code:r?.defaultAddress.provinceCode,email:r?.email||u?.email,zip:r?.defaultAddress.zip};{let s=K.get(m)||m;return s==="UK"&&(s="GB"),s==="EU"&&(s="NL"),{email:u?.email,country:s}}},[r,u?.email,m]);return _(()=>{if(r){const s=A();i(s),l(s)}},[r,A]),e?a("div",{className:"grid gap-[20px]",children:n&&n.map((s,o)=>a("div",{className:"item-center -mx-[6px] flex",children:s.map((t,k)=>{const f=h.find(d=>d.key===t.key)?.message,y=x("h-full w-full appearance-none rounded-[2px] border bg-white px-[14px] py-[17px] leading-[1] outline-none placeholder:text-[#999] autofill:shadow-white focus:border-brand disabled:pointer-events-none disabled:text-[#999] disabled:bg-[#F7F8F9] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",f?"!border-[#F84D4F]":"border-[#d8d8d8]");return t.type==="state"&&!p.length?null:a("div",{className:x("mx-[6px] flex-1"),children:B(I,{error:f,required:t.required,label:t.label,children:[t.type==="country"&&a(w,{className:y,countries:c,loading:g,value:e.country,onChange:d=>{e.country!==d&&(e.province="",e.province_code=""),e.country=d,i({...e}),l(e)}}),t.type==="state"&&a(P,{className:y,states:p,stateCode:e.province_code,stateName:e.province,onChange:(d,v)=>{e.province_code=d,e.province=v,i({...e}),l(e)}}),t.type!=="state"&&t.type!=="country"&&a(q,{placeholder:t.label,className:y,error:f,value:e[t.key],required:t.required,disabled:t.type==="email",onChange:d=>{const v=d.target.value;e[t.key]=v,i({...e}),l(e)},onBlur:()=>{C({ignoreKeys:p.length&&b?[b]:[]})}})]})},k)})},o))}):null};export{J as AddressForm};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/components/credits/creditsRedeemList/AddressForm/index.tsx"],
4
+ "sourcesContent": ["import classNames from 'classnames'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\n\nimport { CountrySelect } from './CountrySelect'\nimport { FormItem } from './FormItem'\nimport { Input } from './Input'\nimport { StateSelect } from './StateSelect'\nimport { ALPC_COUNTRY_MAP } from '../../context/const'\nimport { useCreditsContext } from '../../context/provider'\nimport { useHeadlessContext } from '@anker-in/lib'\nimport { AddressFormProps } from './type'\n\nexport const AddressForm = ({ countries, countriesLoading, form, validate, errors, onChange }: AddressFormProps) => {\n const { profile, customer } = useCreditsContext()\n const { locale } = useHeadlessContext()\n\n const [address, setAddress] = useState<Record<string, any>>()\n\n const states = useMemo(() => {\n const currentCountry = countries.find(item => item.code === address?.country)\n\n return currentCountry?.provinces || []\n }, [address, countries])\n\n const stateInputKey = useMemo(() => {\n const stateInput = form?.flat().find(item => item.type === 'state')\n return stateInput?.key\n }, [form])\n\n const getDefaultAddress = useCallback(() => {\n if (customer?.defaultAddress) {\n return {\n name: (customer?.defaultAddress.firstName || '') + ' ' + (customer?.defaultAddress.lastName || ''),\n first_name: customer?.defaultAddress.firstName,\n last_name: customer?.defaultAddress.lastName,\n address1: customer?.defaultAddress.address1,\n address2: customer?.defaultAddress.address2,\n city: customer?.defaultAddress.city,\n phone: customer?.defaultAddress.phone,\n country: customer?.defaultAddress.countryCodeV2,\n province: customer?.defaultAddress.province,\n province_code: customer?.defaultAddress.provinceCode,\n email: customer?.email || profile?.email,\n zip: customer?.defaultAddress.zip,\n }\n } else {\n let defaultCountry = ALPC_COUNTRY_MAP.get(locale) || locale\n if (defaultCountry === 'UK') {\n defaultCountry = 'GB'\n }\n if (defaultCountry === 'EU') {\n defaultCountry = 'NL'\n }\n return {\n email: profile?.email,\n country: defaultCountry,\n }\n }\n }, [customer, profile?.email, locale])\n\n useEffect(() => {\n if (customer) {\n const defaultAddress = getDefaultAddress()\n setAddress(defaultAddress)\n onChange(defaultAddress)\n }\n }, [customer, getDefaultAddress])\n\n if (!address) {\n return null\n }\n\n return (\n <div className=\"grid gap-[20px]\">\n {form &&\n form.map((row, rowIndex: number) => (\n <div key={rowIndex} className=\"item-center -mx-[6px] flex\">\n {row.map((input, inputIndex: number) => {\n const error = errors.find(item => item.key === input.key)?.message\n const inputClassName = classNames(\n 'h-full w-full appearance-none rounded-[2px] border bg-white px-[14px] py-[17px] leading-[1] outline-none placeholder:text-[#999] autofill:shadow-white focus:border-brand disabled:pointer-events-none disabled:text-[#999] disabled:bg-[#F7F8F9] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',\n error ? '!border-[#F84D4F]' : 'border-[#d8d8d8]'\n )\n\n if (input.type === 'state') {\n if (!states.length) {\n return null\n }\n }\n\n return (\n <div key={inputIndex} className={classNames('mx-[6px] flex-1')}>\n <FormItem error={error} required={input.required} label={input.label}>\n {input.type === 'country' && (\n <CountrySelect\n className={inputClassName}\n countries={countries}\n loading={countriesLoading}\n value={address.country}\n onChange={selectedCountryCode => {\n if (address.country !== selectedCountryCode) {\n address.province = ''\n address.province_code = ''\n }\n address.country = selectedCountryCode\n setAddress({ ...address })\n onChange(address)\n }}\n ></CountrySelect>\n )}\n {input.type === 'state' && (\n <StateSelect\n className={inputClassName}\n states={states}\n stateCode={address.province_code}\n stateName={address.province}\n onChange={(provinceCode, provinceName) => {\n address.province_code = provinceCode\n address.province = provinceName\n setAddress({ ...address })\n onChange(address)\n }}\n ></StateSelect>\n )}\n\n {input.type !== 'state' && input.type !== 'country' && (\n <Input\n placeholder={input.label}\n className={inputClassName}\n error={error}\n value={address[input.key]}\n required={input.required}\n disabled={input.type === 'email'}\n onChange={event => {\n const value = event.target.value\n address[input.key] = value\n setAddress({ ...address })\n onChange(address)\n }}\n onBlur={() => {\n validate({\n ignoreKeys: states.length && stateInputKey ? [stateInputKey] : [],\n })\n }}\n />\n )}\n </FormItem>\n </div>\n )\n })}\n </div>\n ))}\n </div>\n )\n}\n"],
5
+ "mappings": "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",
6
+ "names": ["jsx", "jsxs", "classNames", "useCallback", "useEffect", "useMemo", "useState", "CountrySelect", "FormItem", "Input", "StateSelect", "ALPC_COUNTRY_MAP", "useCreditsContext", "useHeadlessContext", "AddressForm", "countries", "countriesLoading", "form", "validate", "errors", "onChange", "profile", "customer", "locale", "address", "setAddress", "states", "item", "stateInputKey", "getDefaultAddress", "defaultCountry", "defaultAddress", "row", "rowIndex", "input", "inputIndex", "error", "inputClassName", "selectedCountryCode", "provinceCode", "provinceName", "event", "value"]
7
+ }
@@ -0,0 +1,26 @@
1
+ import { CreditsRedeemListCopy } from '../type';
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
+ export interface AddressFormProps {
13
+ form: CreditsRedeemListCopy['redeemModal']['product']['addressForm'];
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
+ }
26
+ export {};
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import { RedeemableItem } from '../type';
2
+ import { CreditsRedeemListCopy } from './type';
3
+ export declare const NoneProductValue: ({ item, copy }: {
4
+ item: RedeemableItem;
5
+ copy: CreditsRedeemListCopy;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as p}from"react/jsx-runtime";import{Text as l}from"@anker-in/headless-ui";import{ConsumeType as o}from"../context/const";const s=({item:t,copy:x})=>t.config?.type===o.ShippingCoupon?e("div",{className:"absolute left-[16px] l-xxl:left-[12px] bottom-[8px] l:left-[8px] font-extrabold text-white md:bottom-[4px] md:left-[5px]",children:e(l,{className:"text-[32px] font-bold leading-none md:text-[12px] l-xxl:text-[20px] w-[70%] md:w-full md-l:text-[14px]",html:t.config?.value,as:"p"})}):e("div",{className:"absolute left-[16px] l-xxl:left-[12px] l:left-[8px] bottom-[8px] font-extrabold text-white md:bottom-[4px] md:left-[5px]",children:t.config?.value?p("div",{className:"flex items-end",children:[e(l,{className:"text-[64px] font-extrabold leading-none md:text-[20px] l-xxl:text-[40px] md-l:text-[22px]",html:t.config?.value.toString()}),e(l,{className:"ml-[4px] text-[24px] font-bold leading-[2] md:ml-[2px] l:text-[12px] xxl:leading-[1.4] l-xxl:text-[20px]",html:t.config?.type===o.GiftCard?x?.giftCardLabel:x?.off})]}):e(l,{className:"text-[24px] w-[70%] font-bold leading-none",html:t.config?.title,as:"p"})});export{s as NoneProductValue};
2
+ //# sourceMappingURL=NonProductValue.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/components/credits/creditsRedeemList/NonProductValue.tsx"],
4
+ "sourcesContent": ["import { Text } from '@anker-in/headless-ui'\nimport { RedeemableItem } from '../type'\nimport { ConsumeType } from '../context/const'\nimport { CreditsRedeemListCopy } from './type'\n\nexport const NoneProductValue = ({ item, copy }: { item: RedeemableItem; copy: CreditsRedeemListCopy }) => {\n // shipping coupon \u4EC5\u5C55\u793A\u6587\u6848\n if (item.config?.type === ConsumeType.ShippingCoupon) {\n return (\n <div className=\"absolute left-[16px] l-xxl:left-[12px] bottom-[8px] l:left-[8px] font-extrabold text-white md:bottom-[4px] md:left-[5px]\">\n <Text\n className=\"text-[32px] font-bold leading-none md:text-[12px] l-xxl:text-[20px] w-[70%] md:w-full md-l:text-[14px]\"\n html={item.config?.value}\n as=\"p\"\n />\n </div>\n )\n } else {\n return (\n <div className=\"absolute left-[16px] l-xxl:left-[12px] l:left-[8px] bottom-[8px] font-extrabold text-white md:bottom-[4px] md:left-[5px]\">\n {item.config?.value ? (\n <div className=\"flex items-end\">\n <Text\n className=\"text-[64px] font-extrabold leading-none md:text-[20px] l-xxl:text-[40px] md-l:text-[22px]\"\n html={item.config?.value.toString()}\n />\n <Text\n className=\"ml-[4px] text-[24px] font-bold leading-[2] md:ml-[2px] l:text-[12px] xxl:leading-[1.4] l-xxl:text-[20px]\"\n html={item.config?.type === ConsumeType.GiftCard ? copy?.giftCardLabel : copy?.off}\n />\n </div>\n ) : (\n <Text className=\"text-[24px] w-[70%] font-bold leading-none\" html={item.config?.title} as=\"p\" />\n )}\n </div>\n )\n }\n}\n"],
5
+ "mappings": "AAUQ,cAAAA,EAWE,QAAAC,MAXF,oBAVR,OAAS,QAAAC,MAAY,wBAErB,OAAS,eAAAC,MAAmB,mBAGrB,MAAMC,EAAmB,CAAC,CAAE,KAAAC,EAAM,KAAAC,CAAK,IAExCD,EAAK,QAAQ,OAASF,EAAY,eAElCH,EAAC,OAAI,UAAU,2HACb,SAAAA,EAACE,EAAA,CACC,UAAU,yGACV,KAAMG,EAAK,QAAQ,MACnB,GAAG,IACL,EACF,EAIAL,EAAC,OAAI,UAAU,2HACZ,SAAAK,EAAK,QAAQ,MACZJ,EAAC,OAAI,UAAU,iBACb,UAAAD,EAACE,EAAA,CACC,UAAU,4FACV,KAAMG,EAAK,QAAQ,MAAM,SAAS,EACpC,EACAL,EAACE,EAAA,CACC,UAAU,2GACV,KAAMG,EAAK,QAAQ,OAASF,EAAY,SAAWG,GAAM,cAAgBA,GAAM,IACjF,GACF,EAEAN,EAACE,EAAA,CAAK,UAAU,6CAA6C,KAAMG,EAAK,QAAQ,MAAO,GAAG,IAAI,EAElG",
6
+ "names": ["jsx", "jsxs", "Text", "ConsumeType", "NoneProductValue", "item", "copy"]
7
+ }
@@ -0,0 +1,9 @@
1
+ import type { ModalContainerProps } from '../modal/modalContainer';
2
+ import type { RedeemableItem as RedeemableItemType } from '../type';
3
+ import { CreditsRedeemListCopy } from './type';
4
+ declare function RedeemCouponModal({ item, copy, onError, ...props }: ModalContainerProps & {
5
+ item: RedeemableItemType;
6
+ copy: CreditsRedeemListCopy;
7
+ onError: (code: number) => void;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export default RedeemCouponModal;