@anker-in/campaign-ui 0.2.10-beta.9 → 0.2.11-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/chat/{chat-context.js → chatContext.js} +1 -1
- package/dist/cjs/components/chat/{chat-context.js.map → chatContext.js.map} +2 -2
- package/dist/cjs/components/chat/index.js +1 -1
- package/dist/cjs/components/chat/index.js.map +3 -3
- package/dist/cjs/components/credits/context/const.d.ts +2 -1
- package/dist/cjs/components/credits/context/const.js +1 -1
- package/dist/cjs/components/credits/context/const.js.map +2 -2
- package/dist/cjs/components/credits/context/hooks/useActivities.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useActivities.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useAddressValidate.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useAddressValidate.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useCountries.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useCountries.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useFunctionMemberPrice.d.ts +7 -0
- package/dist/cjs/components/credits/context/hooks/useFunctionMemberPrice.js +2 -0
- package/dist/cjs/components/credits/context/hooks/useFunctionMemberPrice.js.map +7 -0
- package/dist/cjs/components/credits/context/hooks/useMyRewards.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useMyRewards.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.d.ts +5 -10
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.d.ts +2 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemCoupon.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemProduct.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useRedeemableList.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemableList.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSubscribed.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscribed.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.d.ts +7 -3
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useUploadReceipt.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useUploadReceipt.js.map +2 -2
- package/dist/cjs/components/credits/context/memberPriceConst.d.ts +10 -0
- package/dist/cjs/components/credits/context/memberPriceConst.js +2 -0
- package/dist/cjs/components/credits/context/memberPriceConst.js.map +7 -0
- package/dist/cjs/components/credits/context/memberPriceTypes.d.ts +46 -0
- package/dist/cjs/components/credits/context/memberPriceTypes.js +2 -0
- package/dist/cjs/components/credits/context/memberPriceTypes.js.map +7 -0
- package/dist/cjs/components/credits/context/provider.d.ts +11 -33
- package/dist/cjs/components/credits/context/provider.js +1 -1
- package/dist/cjs/components/credits/context/provider.js.map +3 -3
- package/dist/cjs/components/credits/context/utils/atobID.d.ts +1 -0
- package/dist/cjs/components/credits/context/utils/atobID.js +2 -0
- package/dist/cjs/components/credits/context/utils/atobID.js.map +7 -0
- package/dist/cjs/components/credits/context/utils/functionDiscountCalculate.d.ts +5 -0
- package/dist/cjs/components/credits/context/utils/functionDiscountCalculate.js +2 -0
- package/dist/cjs/components/credits/context/utils/functionDiscountCalculate.js.map +7 -0
- package/dist/cjs/components/credits/context/utils/getFunctionMemberPrice.d.ts +8 -0
- package/dist/cjs/components/credits/context/utils/getFunctionMemberPrice.js +2 -0
- package/dist/cjs/components/credits/context/utils/getFunctionMemberPrice.js.map +7 -0
- package/dist/cjs/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.d.ts +9 -0
- package/dist/cjs/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js +2 -0
- package/dist/cjs/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js.map +7 -0
- package/dist/cjs/components/credits/context/utils/variantGetCoupon.d.ts +6 -0
- package/dist/cjs/components/credits/context/utils/variantGetCoupon.js +2 -0
- package/dist/cjs/components/credits/context/utils/variantGetCoupon.js.map +7 -0
- package/dist/cjs/components/credits/context/utils.d.ts +4 -0
- package/dist/cjs/components/credits/context/utils.js +1 -1
- package/dist/cjs/components/credits/context/utils.js.map +3 -3
- package/dist/cjs/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.d.ts +4 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js +2 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js.map +7 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/index.d.ts +2 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/index.js +2 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/type.d.ts +1 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/type.js +2 -0
- package/dist/cjs/components/credits/creditsAnkersolixTask/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsBanner/index.d.ts +17 -16
- package/dist/cjs/components/credits/creditsBanner/index.js +2 -0
- package/dist/cjs/components/credits/creditsBanner/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.d.ts +4 -1
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.js +2 -0
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.js.map +7 -0
- package/dist/cjs/components/credits/{credits-benefits → creditsBenefits}/iconInfo.js +1 -1
- package/dist/cjs/components/credits/{credits-benefits → creditsBenefits}/iconInfo.js.map +2 -2
- package/dist/cjs/components/credits/creditsBenefits/index.d.ts +12 -9
- package/dist/cjs/components/credits/creditsBenefits/index.js +4 -0
- package/dist/cjs/components/credits/creditsBenefits/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/CreditsCash.d.ts +5 -0
- package/dist/cjs/components/credits/creditsCash/CreditsCash.js +2 -0
- package/dist/cjs/components/credits/creditsCash/CreditsCash.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.d.ts +1 -7
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.js +2 -0
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/index.d.ts +2 -13
- package/dist/cjs/components/credits/creditsCash/index.js +2 -0
- package/dist/cjs/components/credits/creditsCash/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsCash/type.d.ts +2 -4
- package/dist/cjs/components/credits/creditsCash/type.js +2 -0
- package/dist/cjs/components/credits/creditsCash/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js +2 -0
- package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsFaq/index.d.ts +4 -3
- package/dist/cjs/components/credits/creditsFaq/index.js +2 -0
- package/dist/cjs/components/credits/creditsFaq/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsInfoCard/index.d.ts +10 -15
- package/dist/cjs/components/credits/creditsInfoCard/index.js +2 -0
- package/dist/cjs/components/credits/creditsInfoCard/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/CreditsMemberPrice.d.ts +5 -0
- package/dist/cjs/components/credits/creditsMemberPrice/CreditsMemberPrice.js +2 -0
- package/dist/cjs/components/credits/creditsMemberPrice/CreditsMemberPrice.js.map +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/MemberPriceItem.d.ts +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/MemberPriceItem.js +2 -0
- package/dist/cjs/components/credits/creditsMemberPrice/MemberPriceItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/Pagination.d.ts +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/Pagination.js +2 -0
- package/dist/cjs/components/credits/creditsMemberPrice/Pagination.js.map +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/index.d.ts +2 -0
- package/dist/cjs/components/credits/creditsMemberPrice/index.js +2 -0
- package/dist/cjs/components/credits/creditsMemberPrice/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsMemberPrice/type.d.ts +64 -0
- package/dist/cjs/components/credits/creditsMemberPrice/type.js +2 -0
- package/dist/cjs/components/credits/creditsMemberPrice/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsNavigation/CreditsNavigation.d.ts +4 -0
- package/dist/cjs/components/credits/creditsNavigation/CreditsNavigation.js +2 -0
- package/dist/cjs/components/credits/creditsNavigation/CreditsNavigation.js.map +7 -0
- package/dist/cjs/components/credits/creditsNavigation/index.d.ts +2 -0
- package/dist/cjs/components/credits/creditsNavigation/index.js +2 -0
- package/dist/cjs/components/credits/creditsNavigation/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsNavigation/type.d.ts +7 -0
- package/dist/cjs/components/credits/creditsNavigation/type.js +2 -0
- package/dist/cjs/components/credits/creditsNavigation/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +7 -0
- package/dist/cjs/components/credits/{credits-redeem-list/address-form/form-item.js → creditsRedeemList/AddressForm/FormItem.js} +1 -1
- package/dist/cjs/components/credits/{credits-redeem-list/address-form/form-item.js.map → creditsRedeemList/AddressForm/FormItem.js.map} +2 -2
- package/dist/cjs/components/credits/{credits-redeem-list/address-form → creditsRedeemList/AddressForm}/Input.js.map +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js.map +7 -0
- package/dist/cjs/components/credits/{credits-redeem-list/address-form → creditsRedeemList/AddressForm}/type.js.map +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/CreditsRedeemList.d.ts +5 -0
- package/dist/cjs/components/credits/creditsRedeemList/CreditsRedeemList.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/CreditsRedeemList.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.d.ts +4 -0
- package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +7 -0
- package/dist/cjs/components/credits/{credits-redeem-list/redeem-product-modal → creditsRedeemList/RedeemProductModal}/Error.js +1 -1
- package/dist/cjs/components/credits/{credits-redeem-list/redeem-product-modal → creditsRedeemList/RedeemProductModal}/Error.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.d.ts +6 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/index.d.ts +2 -13
- package/dist/cjs/components/credits/creditsRedeemList/index.js +2 -0
- package/dist/cjs/components/credits/creditsRedeemList/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsRedeemList/type.d.ts +2 -15
- package/dist/cjs/components/credits/creditsRedeemList/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.d.ts +4 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.d.ts +2 -2
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.d.ts +5 -16
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js.map +7 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.d.ts +11 -2
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js +2 -0
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js.map +7 -0
- package/dist/cjs/components/credits/modal/MyRewardsModal.d.ts +4 -1
- package/dist/cjs/components/credits/modal/MyRewardsModal.js +1 -1
- package/dist/cjs/components/credits/modal/MyRewardsModal.js.map +3 -3
- package/dist/cjs/components/credits/modal/activitiesModal.d.ts +4 -1
- package/dist/cjs/components/credits/modal/activitiesModal.js +1 -1
- package/dist/cjs/components/credits/modal/activitiesModal.js.map +3 -3
- package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.js +1 -1
- package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.js.map +3 -3
- package/dist/cjs/components/credits/modal/loadingDots.d.ts +2 -1
- package/dist/cjs/components/credits/modal/loadingDots.js +1 -1
- package/dist/cjs/components/credits/modal/loadingDots.js.map +3 -3
- package/dist/cjs/components/credits/modal/modalContainer.js +1 -1
- package/dist/cjs/components/credits/modal/modalContainer.js.map +3 -3
- package/dist/cjs/components/credits/modal/rulesModal.js +1 -1
- package/dist/cjs/components/credits/modal/rulesModal.js.map +3 -3
- package/dist/cjs/components/credits/modal/subscribeModal.d.ts +15 -0
- package/dist/cjs/components/credits/modal/subscribeModal.js +2 -0
- package/dist/cjs/components/credits/modal/subscribeModal.js.map +7 -0
- package/dist/cjs/components/credits/modal/tip.js +1 -1
- package/dist/cjs/components/credits/modal/tip.js.map +3 -3
- package/dist/cjs/components/credits/type.d.ts +24 -5
- package/dist/cjs/components/credits/type.js +1 -1
- package/dist/cjs/components/credits/type.js.map +1 -1
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/registration/authCodeActivate/Message.d.ts +4 -0
- package/dist/cjs/components/registration/authCodeActivate/Message.js +2 -0
- package/dist/cjs/components/registration/authCodeActivate/Message.js.map +7 -0
- package/dist/cjs/components/registration/authCodeActivate/index.d.ts +3 -0
- package/dist/cjs/components/registration/authCodeActivate/index.js +2 -0
- package/dist/cjs/components/registration/authCodeActivate/index.js.map +7 -0
- package/dist/cjs/components/registration/authCodeActivate/type.d.ts +22 -0
- package/dist/cjs/components/registration/authCodeActivate/type.js +2 -0
- package/dist/cjs/components/registration/authCodeActivate/type.js.map +7 -0
- package/dist/cjs/components/registration/context/index.d.ts +1 -0
- package/dist/cjs/components/registration/context/index.js +2 -0
- package/dist/cjs/components/registration/context/index.js.map +7 -0
- package/dist/cjs/components/registration/context/provider.d.ts +27 -0
- package/dist/cjs/components/registration/context/provider.js +2 -0
- package/dist/cjs/components/registration/context/provider.js.map +7 -0
- package/dist/cjs/components/registration/index.d.ts +2 -0
- package/dist/cjs/components/registration/index.js +2 -0
- package/dist/cjs/components/registration/index.js.map +7 -0
- package/dist/cjs/components/registration/modalContainer.d.ts +14 -0
- package/dist/cjs/components/registration/modalContainer.js +2 -0
- package/dist/cjs/components/registration/modalContainer.js.map +7 -0
- package/dist/cjs/constants.d.ts +1 -0
- package/dist/cjs/constants.js +2 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/debug-env.js +2 -0
- package/dist/cjs/debug-env.js.map +7 -0
- package/dist/cjs/helpers/fetcher.d.ts +1 -1
- package/dist/cjs/helpers/fetcher.js +1 -1
- package/dist/cjs/helpers/fetcher.js.map +3 -3
- package/dist/cjs/helpers/index.d.ts +2 -2
- package/dist/cjs/helpers/index.js +1 -1
- package/dist/cjs/helpers/index.js.map +2 -2
- package/dist/cjs/helpers/track.d.ts +6 -2
- package/dist/cjs/helpers/track.js +1 -1
- package/dist/cjs/helpers/track.js.map +3 -3
- package/dist/cjs/index.d.ts +3 -2
- package/dist/cjs/index.js +1 -726
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/stories/chat.stories.js +2 -0
- package/dist/cjs/stories/chat.stories.js.map +7 -0
- package/dist/cjs/templates/credits.d.ts +73 -0
- package/dist/cjs/templates/credits.js +2 -0
- package/dist/cjs/templates/credits.js.map +7 -0
- package/dist/cjs/templates/index.d.ts +1 -0
- package/dist/cjs/templates/index.js +2 -0
- package/dist/cjs/templates/index.js.map +7 -0
- package/dist/esm/components/chat/index.js +1 -1
- package/dist/esm/components/chat/index.js.map +2 -2
- package/dist/esm/components/credits/context/const.d.ts +2 -1
- package/dist/esm/components/credits/context/const.js +1 -1
- package/dist/esm/components/credits/context/const.js.map +2 -2
- package/dist/esm/components/credits/context/hooks/useActivities.js +1 -1
- package/dist/esm/components/credits/context/hooks/useActivities.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useAddressValidate.js +1 -1
- package/dist/esm/components/credits/context/hooks/useAddressValidate.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useAlpcFetch.js +1 -1
- package/dist/esm/components/credits/context/hooks/useAlpcFetch.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useCountries.js +1 -1
- package/dist/esm/components/credits/context/hooks/useCountries.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useFunctionMemberPrice.d.ts +7 -0
- package/dist/esm/components/credits/context/hooks/useFunctionMemberPrice.js +2 -0
- package/dist/esm/components/credits/context/hooks/useFunctionMemberPrice.js.map +7 -0
- package/dist/esm/components/credits/context/hooks/useMyRewards.js +1 -1
- package/dist/esm/components/credits/context/hooks/useMyRewards.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.d.ts +5 -10
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js +1 -1
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useRedeemCoupon.d.ts +2 -1
- package/dist/esm/components/credits/context/hooks/useRedeemCoupon.js +1 -1
- package/dist/esm/components/credits/context/hooks/useRedeemCoupon.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useRedeemProduct.js +1 -1
- package/dist/esm/components/credits/context/hooks/useRedeemProduct.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useRedeemableList.js +1 -1
- package/dist/esm/components/credits/context/hooks/useRedeemableList.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js +1 -1
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useSubscribed.js +1 -1
- package/dist/esm/components/credits/context/hooks/useSubscribed.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useSubscriptions.d.ts +7 -3
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js +1 -1
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useUploadReceipt.js +1 -1
- package/dist/esm/components/credits/context/hooks/useUploadReceipt.js.map +2 -2
- package/dist/esm/components/credits/context/memberPriceConst.d.ts +10 -0
- package/dist/esm/components/credits/context/memberPriceConst.js +2 -0
- package/dist/esm/components/credits/context/memberPriceConst.js.map +7 -0
- package/dist/esm/components/credits/context/memberPriceTypes.d.ts +46 -0
- package/dist/esm/components/credits/context/memberPriceTypes.js +1 -0
- package/dist/esm/components/credits/context/provider.d.ts +11 -33
- package/dist/esm/components/credits/context/provider.js +1 -1
- package/dist/esm/components/credits/context/provider.js.map +3 -3
- package/dist/esm/components/credits/context/utils/atobID.d.ts +1 -0
- package/dist/esm/components/credits/context/utils/atobID.js +2 -0
- package/dist/esm/components/credits/context/utils/atobID.js.map +7 -0
- package/dist/esm/components/credits/context/utils/functionDiscountCalculate.d.ts +5 -0
- package/dist/esm/components/credits/context/utils/functionDiscountCalculate.js +2 -0
- package/dist/esm/components/credits/context/utils/functionDiscountCalculate.js.map +7 -0
- package/dist/esm/components/credits/context/utils/getFunctionMemberPrice.d.ts +8 -0
- package/dist/esm/components/credits/context/utils/getFunctionMemberPrice.js +2 -0
- package/dist/esm/components/credits/context/utils/getFunctionMemberPrice.js.map +7 -0
- package/dist/esm/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.d.ts +9 -0
- package/dist/esm/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js +2 -0
- package/dist/esm/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js.map +7 -0
- package/dist/esm/components/credits/context/utils/variantGetCoupon.d.ts +6 -0
- package/dist/esm/components/credits/context/utils/variantGetCoupon.js +2 -0
- package/dist/esm/components/credits/context/utils/variantGetCoupon.js.map +7 -0
- package/dist/esm/components/credits/context/utils.d.ts +4 -0
- package/dist/esm/components/credits/context/utils.js +1 -1
- package/dist/esm/components/credits/context/utils.js.map +3 -3
- package/dist/esm/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.d.ts +4 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js +2 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js.map +7 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/index.d.ts +2 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/index.js +2 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/index.js.map +7 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/type.d.ts +1 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/type.js +2 -0
- package/dist/esm/components/credits/creditsAnkersolixTask/type.js.map +7 -0
- package/dist/esm/components/credits/creditsBanner/index.d.ts +17 -16
- package/dist/esm/components/credits/creditsBanner/index.js +1 -1
- package/dist/esm/components/credits/creditsBanner/index.js.map +3 -3
- package/dist/esm/components/credits/creditsBenefits/benefitItem.d.ts +4 -1
- package/dist/esm/components/credits/creditsBenefits/benefitItem.js +2 -2
- package/dist/esm/components/credits/creditsBenefits/benefitItem.js.map +4 -4
- package/dist/esm/components/credits/creditsBenefits/iconInfo.js +1 -1
- package/dist/esm/components/credits/creditsBenefits/iconInfo.js.map +2 -2
- package/dist/esm/components/credits/creditsBenefits/index.d.ts +12 -9
- package/dist/esm/components/credits/creditsBenefits/index.js +3 -3
- package/dist/esm/components/credits/creditsBenefits/index.js.map +3 -3
- package/dist/esm/components/credits/creditsCash/CreditsCash.d.ts +5 -0
- package/dist/esm/components/credits/creditsCash/CreditsCash.js +2 -0
- package/dist/esm/components/credits/creditsCash/CreditsCash.js.map +7 -0
- package/dist/esm/components/credits/creditsCash/RedeemableItem.d.ts +1 -7
- package/dist/esm/components/credits/creditsCash/RedeemableItem.js +1 -1
- package/dist/esm/components/credits/creditsCash/RedeemableItem.js.map +3 -3
- package/dist/esm/components/credits/creditsCash/index.d.ts +2 -13
- package/dist/esm/components/credits/creditsCash/index.js +1 -1
- package/dist/esm/components/credits/creditsCash/index.js.map +4 -4
- package/dist/esm/components/credits/creditsCash/type.d.ts +2 -4
- package/dist/esm/components/credits/creditsFaq/faqItem/FaqItem.js +1 -1
- package/dist/esm/components/credits/creditsFaq/faqItem/FaqItem.js.map +2 -2
- package/dist/esm/components/credits/creditsFaq/index.d.ts +4 -3
- package/dist/esm/components/credits/creditsFaq/index.js +1 -1
- package/dist/esm/components/credits/creditsFaq/index.js.map +3 -3
- package/dist/esm/components/credits/creditsInfoCard/index.d.ts +10 -15
- package/dist/esm/components/credits/creditsInfoCard/index.js +1 -1
- package/dist/esm/components/credits/creditsInfoCard/index.js.map +3 -3
- package/dist/esm/components/credits/creditsMemberPrice/CreditsMemberPrice.d.ts +5 -0
- package/dist/esm/components/credits/creditsMemberPrice/CreditsMemberPrice.js +2 -0
- package/dist/esm/components/credits/creditsMemberPrice/CreditsMemberPrice.js.map +7 -0
- package/dist/esm/components/credits/creditsMemberPrice/MemberPriceItem.d.ts +7 -0
- package/dist/esm/components/credits/creditsMemberPrice/MemberPriceItem.js +2 -0
- package/dist/esm/components/credits/creditsMemberPrice/MemberPriceItem.js.map +7 -0
- package/dist/esm/components/credits/creditsMemberPrice/Pagination.d.ts +7 -0
- package/dist/esm/components/credits/creditsMemberPrice/Pagination.js +2 -0
- package/dist/esm/components/credits/creditsMemberPrice/Pagination.js.map +7 -0
- package/dist/esm/components/credits/creditsMemberPrice/index.d.ts +2 -0
- package/dist/esm/components/credits/creditsMemberPrice/index.js +2 -0
- package/dist/esm/components/credits/creditsMemberPrice/index.js.map +7 -0
- package/dist/esm/components/credits/creditsMemberPrice/type.d.ts +64 -0
- package/dist/esm/components/credits/creditsNavigation/CreditsNavigation.d.ts +4 -0
- package/dist/esm/components/credits/creditsNavigation/CreditsNavigation.js +2 -0
- package/dist/esm/components/credits/creditsNavigation/CreditsNavigation.js.map +7 -0
- package/dist/esm/components/credits/creditsNavigation/index.d.ts +2 -0
- package/dist/esm/components/credits/creditsNavigation/index.js +2 -0
- package/dist/esm/components/credits/creditsNavigation/index.js.map +7 -0
- package/dist/esm/components/credits/creditsNavigation/type.d.ts +7 -0
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/CountrySelect.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/StateSelect.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/index.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/CreditsRedeemList.d.ts +5 -0
- package/dist/esm/components/credits/creditsRedeemList/CreditsRedeemList.js +2 -0
- package/dist/esm/components/credits/creditsRedeemList/CreditsRedeemList.js.map +7 -0
- package/dist/esm/components/credits/creditsRedeemList/NonProductValue.d.ts +4 -0
- package/dist/esm/components/credits/creditsRedeemList/NonProductValue.js +2 -0
- package/dist/esm/components/credits/creditsRedeemList/NonProductValue.js.map +7 -0
- package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Error.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Error.js.map +2 -2
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.d.ts +6 -0
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +2 -0
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +7 -0
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.js.map +3 -3
- package/dist/esm/components/credits/creditsRedeemList/index.d.ts +2 -13
- package/dist/esm/components/credits/creditsRedeemList/index.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/index.js.map +4 -4
- package/dist/esm/components/credits/creditsRedeemList/type.d.ts +2 -15
- package/dist/esm/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.d.ts +4 -0
- package/dist/esm/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js +2 -0
- package/dist/esm/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js.map +7 -0
- package/dist/esm/components/credits/creditsWaysToGetCredits/index.d.ts +2 -2
- package/dist/esm/components/credits/creditsWaysToGetCredits/index.js +1 -1
- package/dist/esm/components/credits/creditsWaysToGetCredits/index.js.map +4 -4
- package/dist/esm/components/credits/creditsWaysToGetCredits/type.d.ts +5 -16
- package/dist/esm/components/credits/creditsWaysToGetCredits/type.js +1 -1
- package/dist/esm/components/credits/creditsWaysToGetCredits/type.js.map +2 -2
- package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.d.ts +11 -2
- package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.js +1 -1
- package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.js.map +3 -3
- package/dist/esm/components/credits/modal/MyRewardsModal.d.ts +4 -1
- package/dist/esm/components/credits/modal/MyRewardsModal.js +1 -1
- package/dist/esm/components/credits/modal/MyRewardsModal.js.map +3 -3
- package/dist/esm/components/credits/modal/activitiesModal.d.ts +4 -1
- package/dist/esm/components/credits/modal/activitiesModal.js +1 -1
- package/dist/esm/components/credits/modal/activitiesModal.js.map +3 -3
- package/dist/esm/components/credits/modal/creditsUploadReceiptModal.js +1 -1
- package/dist/esm/components/credits/modal/creditsUploadReceiptModal.js.map +3 -3
- package/dist/esm/components/credits/modal/loadingDots.d.ts +2 -1
- package/dist/esm/components/credits/modal/loadingDots.js +1 -1
- package/dist/esm/components/credits/modal/loadingDots.js.map +3 -3
- package/dist/esm/components/credits/modal/modalContainer.js +1 -1
- package/dist/esm/components/credits/modal/modalContainer.js.map +3 -3
- package/dist/esm/components/credits/modal/rulesModal.js +1 -1
- package/dist/esm/components/credits/modal/rulesModal.js.map +2 -2
- package/dist/esm/components/credits/modal/subscribeModal.d.ts +15 -0
- package/dist/esm/components/credits/modal/subscribeModal.js +2 -0
- package/dist/esm/components/credits/modal/subscribeModal.js.map +7 -0
- package/dist/esm/components/credits/modal/tip.js +1 -1
- package/dist/esm/components/credits/modal/tip.js.map +3 -3
- package/dist/esm/components/credits/type.d.ts +24 -5
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/registration/authCodeActivate/Message.d.ts +4 -0
- package/dist/esm/components/registration/authCodeActivate/Message.js +2 -0
- package/dist/esm/components/registration/authCodeActivate/Message.js.map +7 -0
- package/dist/esm/components/registration/authCodeActivate/index.d.ts +3 -0
- package/dist/esm/components/registration/authCodeActivate/index.js +2 -0
- package/dist/esm/components/registration/authCodeActivate/index.js.map +7 -0
- package/dist/esm/components/registration/authCodeActivate/type.d.ts +22 -0
- package/dist/esm/components/registration/authCodeActivate/type.js.map +7 -0
- package/dist/esm/components/registration/context/index.d.ts +1 -0
- package/dist/esm/components/registration/context/index.js +2 -0
- package/dist/esm/components/registration/context/index.js.map +7 -0
- package/dist/esm/components/registration/context/provider.d.ts +27 -0
- package/dist/esm/components/registration/context/provider.js +2 -0
- package/dist/esm/components/registration/context/provider.js.map +7 -0
- package/dist/esm/components/registration/index.d.ts +2 -0
- package/dist/esm/components/registration/index.js +2 -0
- package/dist/esm/components/registration/index.js.map +7 -0
- package/dist/esm/components/registration/modalContainer.d.ts +14 -0
- package/dist/esm/components/registration/modalContainer.js +2 -0
- package/dist/esm/components/registration/modalContainer.js.map +7 -0
- package/dist/esm/constants.d.ts +1 -0
- package/dist/esm/constants.js +2 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/helpers/fetcher.d.ts +1 -1
- package/dist/esm/helpers/fetcher.js +1 -1
- package/dist/esm/helpers/fetcher.js.map +3 -3
- package/dist/esm/helpers/index.d.ts +2 -2
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +2 -2
- package/dist/esm/helpers/track.d.ts +6 -2
- package/dist/esm/helpers/track.js +1 -1
- package/dist/esm/helpers/track.js.map +3 -3
- package/dist/esm/index.d.ts +3 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/templates/credits.d.ts +73 -0
- package/dist/esm/templates/credits.js +2 -0
- package/dist/esm/templates/credits.js.map +7 -0
- package/dist/esm/templates/index.d.ts +1 -0
- package/dist/esm/templates/index.js +2 -0
- package/dist/esm/templates/index.js.map +7 -0
- package/package.json +25 -22
- package/src/components/chat/index.tsx +1 -1
- package/src/components/credits/context/const.ts +1 -0
- package/src/components/credits/context/hooks/useActivities.ts +4 -3
- package/src/components/credits/context/hooks/useAddressValidate.ts +2 -2
- package/src/components/credits/context/hooks/useAlpcFetch.ts +14 -10
- package/src/components/credits/context/hooks/useCountries.ts +2 -2
- package/src/components/credits/context/hooks/useFunctionMemberPrice.ts +33 -0
- package/src/components/credits/context/hooks/useMyRewards.ts +4 -3
- package/src/components/credits/context/hooks/useRedeemAndBuy.ts +21 -24
- package/src/components/credits/context/hooks/useRedeemCoupon.ts +7 -3
- package/src/components/credits/context/hooks/useRedeemProduct.ts +5 -2
- package/src/components/credits/context/hooks/useRedeemableList.ts +4 -18
- package/src/components/credits/context/hooks/useSubscribed.ts +6 -7
- package/src/components/credits/context/hooks/useUploadReceipt.tsx +0 -1
- package/src/components/credits/context/memberPriceConst.ts +13 -0
- package/src/components/credits/context/memberPriceTypes.ts +54 -0
- package/src/components/credits/context/provider.tsx +25 -20
- package/src/components/credits/context/utils/atobID.ts +8 -0
- package/src/components/credits/context/utils/functionDiscountCalculate.ts +57 -0
- package/src/components/credits/context/utils/getFunctionMemberPrice.ts +135 -0
- package/src/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.ts +51 -0
- package/src/components/credits/context/utils/variantGetCoupon.ts +34 -0
- package/src/components/credits/context/utils.ts +9 -0
- package/src/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.tsx +273 -0
- package/src/components/credits/creditsAnkersolixTask/index.ts +2 -0
- package/src/components/credits/creditsAnkersolixTask/type.ts +7 -0
- package/src/components/credits/creditsBanner/index.tsx +16 -18
- package/src/components/credits/creditsBenefits/BenefitItem.tsx +108 -0
- package/src/components/credits/creditsBenefits/index.tsx +20 -15
- package/src/components/credits/creditsCash/CreditsCash.tsx +84 -0
- package/src/components/credits/creditsCash/RedeemableItem.tsx +66 -44
- package/src/components/credits/creditsCash/index.ts +2 -0
- package/src/components/credits/creditsCash/type.ts +2 -4
- package/src/components/credits/creditsFaq/faqItem/FaqItem.tsx +12 -12
- package/src/components/credits/creditsFaq/index.tsx +9 -6
- package/src/components/credits/creditsInfoCard/index.tsx +43 -36
- package/src/components/credits/creditsMemberPrice/CreditsMemberPrice.tsx +314 -0
- package/src/components/credits/creditsMemberPrice/MemberPriceItem.tsx +181 -0
- package/src/components/credits/creditsMemberPrice/Pagination.tsx +113 -0
- package/src/components/credits/creditsMemberPrice/index.ts +2 -0
- package/src/components/credits/creditsMemberPrice/type.ts +75 -0
- package/src/components/credits/creditsNavigation/CreditsNavigation.tsx +123 -0
- package/src/components/credits/creditsNavigation/index.ts +2 -0
- package/src/components/credits/creditsNavigation/type.ts +10 -0
- package/src/components/credits/creditsRedeemList/AddressForm/CountrySelect.tsx +8 -3
- package/src/components/credits/creditsRedeemList/AddressForm/StateSelect.tsx +6 -1
- package/src/components/credits/creditsRedeemList/AddressForm/index.tsx +6 -5
- package/src/components/credits/creditsRedeemList/{index.tsx → CreditsRedeemList.tsx} +31 -35
- package/src/components/credits/creditsRedeemList/NonProductValue.tsx +39 -0
- package/src/components/credits/creditsRedeemList/RedeemCouponModal.tsx +11 -13
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Address.tsx +15 -11
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Error.tsx +1 -1
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Init.tsx +6 -12
- package/src/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.tsx +25 -0
- package/src/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.tsx +11 -7
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Success.tsx +5 -1
- package/src/components/credits/creditsRedeemList/RedeemProductModal/index.tsx +4 -5
- package/src/components/credits/creditsRedeemList/RedeemableItem.tsx +24 -32
- package/src/components/credits/creditsRedeemList/index.ts +2 -0
- package/src/components/credits/creditsRedeemList/type.ts +2 -16
- package/src/components/credits/creditsWaysToGetCredits/{index.tsx → CreditsWaysToGetCredits.tsx} +79 -20
- package/src/components/credits/creditsWaysToGetCredits/index.ts +2 -0
- package/src/components/credits/creditsWaysToGetCredits/type.ts +5 -16
- package/src/components/credits/creditsWaysToGetCredits/useActions.ts +24 -10
- package/src/components/credits/modal/MyRewardsModal.tsx +84 -63
- package/src/components/credits/modal/activitiesModal.tsx +62 -46
- package/src/components/credits/modal/creditsUploadReceiptModal.tsx +10 -1
- package/src/components/credits/modal/loadingDots.tsx +9 -7
- package/src/components/credits/modal/modalContainer.tsx +6 -1
- package/src/components/credits/modal/rulesModal.tsx +1 -1
- package/src/components/credits/modal/subscribeModal.tsx +202 -0
- package/src/components/credits/modal/tip.tsx +11 -1
- package/src/components/credits/type.ts +24 -5
- package/src/components/index.ts +3 -3
- package/src/components/registration/authCodeActivate/Message.tsx +43 -0
- package/src/components/registration/authCodeActivate/index.tsx +338 -0
- package/src/components/registration/authCodeActivate/type.ts +23 -0
- package/src/components/registration/context/index.tsx +1 -0
- package/src/components/registration/context/provider.tsx +86 -0
- package/src/components/registration/index.ts +2 -0
- package/src/components/registration/modalContainer.tsx +115 -0
- package/src/constants.ts +1 -0
- package/src/index.ts +3 -4
- package/src/styles/global.css +15 -0
- package/src/templates/Credits.tsx +165 -0
- package/src/templates/index.ts +1 -0
- package/style.css +1 -0
- package/tailwind.config.ts +10 -0
- package/dist/cjs/components/chat/chat-context.d.ts +0 -101
- package/dist/cjs/components/credits/credits-banner/index.d.ts +0 -23
- package/dist/cjs/components/credits/credits-banner/index.js +0 -2
- package/dist/cjs/components/credits/credits-banner/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-benefits/benefitItem.d.ts +0 -19
- package/dist/cjs/components/credits/credits-benefits/benefitItem.js +0 -2
- package/dist/cjs/components/credits/credits-benefits/benefitItem.js.map +0 -7
- package/dist/cjs/components/credits/credits-benefits/iconInfo.d.ts +0 -2
- package/dist/cjs/components/credits/credits-benefits/index.d.ts +0 -12
- package/dist/cjs/components/credits/credits-benefits/index.js +0 -4
- package/dist/cjs/components/credits/credits-benefits/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-cash/RedeemableItem.d.ts +0 -15
- package/dist/cjs/components/credits/credits-cash/RedeemableItem.js +0 -2
- package/dist/cjs/components/credits/credits-cash/RedeemableItem.js.map +0 -7
- package/dist/cjs/components/credits/credits-cash/index.d.ts +0 -13
- package/dist/cjs/components/credits/credits-cash/index.js +0 -2
- package/dist/cjs/components/credits/credits-cash/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-cash/type.d.ts +0 -47
- package/dist/cjs/components/credits/credits-cash/type.js +0 -2
- package/dist/cjs/components/credits/credits-cash/type.js.map +0 -7
- package/dist/cjs/components/credits/credits-faq/faq-item/FaqItem.d.ts +0 -13
- package/dist/cjs/components/credits/credits-faq/faq-item/faq-item.d.ts +0 -13
- package/dist/cjs/components/credits/credits-faq/faq-item/faq-item.js +0 -2
- package/dist/cjs/components/credits/credits-faq/faq-item/faq-item.js.map +0 -7
- package/dist/cjs/components/credits/credits-faq/faqItem/FaqItem.d.ts +0 -13
- package/dist/cjs/components/credits/credits-faq/index.d.ts +0 -16
- package/dist/cjs/components/credits/credits-faq/index.js +0 -2
- package/dist/cjs/components/credits/credits-faq/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-info-card/index.d.ts +0 -20
- package/dist/cjs/components/credits/credits-info-card/index.js +0 -2
- package/dist/cjs/components/credits/credits-info-card/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/AddressForm/Input.d.ts +0 -13
- package/dist/cjs/components/credits/credits-redeem-list/AddressForm/country-select.d.ts +0 -14
- package/dist/cjs/components/credits/credits-redeem-list/AddressForm/form-item.d.ts +0 -6
- package/dist/cjs/components/credits/credits-redeem-list/AddressForm/index.d.ts +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/AddressForm/state-select.d.ts +0 -15
- package/dist/cjs/components/credits/credits-redeem-list/AddressForm/type.d.ts +0 -26
- package/dist/cjs/components/credits/credits-redeem-list/RedeemCouponModal.d.ts +0 -9
- package/dist/cjs/components/credits/credits-redeem-list/RedeemProductModal/Address.d.ts +0 -20
- package/dist/cjs/components/credits/credits-redeem-list/RedeemProductModal/Error.d.ts +0 -8
- package/dist/cjs/components/credits/credits-redeem-list/RedeemProductModal/Init.d.ts +0 -11
- package/dist/cjs/components/credits/credits-redeem-list/RedeemProductModal/ProductInfo.d.ts +0 -8
- package/dist/cjs/components/credits/credits-redeem-list/RedeemProductModal/Success.d.ts +0 -13
- package/dist/cjs/components/credits/credits-redeem-list/RedeemProductModal/index.d.ts +0 -11
- package/dist/cjs/components/credits/credits-redeem-list/RedeemableItem.d.ts +0 -9
- package/dist/cjs/components/credits/credits-redeem-list/RedeemableItem.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/RedeemableItem.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/address-form/Input.d.ts +0 -13
- package/dist/cjs/components/credits/credits-redeem-list/address-form/country-select.d.ts +0 -14
- package/dist/cjs/components/credits/credits-redeem-list/address-form/country-select.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/address-form/country-select.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/address-form/form-item.d.ts +0 -6
- package/dist/cjs/components/credits/credits-redeem-list/address-form/index.d.ts +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/address-form/index.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/address-form/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/address-form/state-select.d.ts +0 -15
- package/dist/cjs/components/credits/credits-redeem-list/address-form/state-select.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/address-form/state-select.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/address-form/type.d.ts +0 -26
- package/dist/cjs/components/credits/credits-redeem-list/index.d.ts +0 -13
- package/dist/cjs/components/credits/credits-redeem-list/index.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/redeem-coupon-modal.d.ts +0 -9
- package/dist/cjs/components/credits/credits-redeem-list/redeem-coupon-modal.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/redeem-coupon-modal.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Address.d.ts +0 -20
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Address.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Address.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Error.d.ts +0 -8
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Init.d.ts +0 -11
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Init.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Init.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/ProductInfo.d.ts +0 -8
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/ProductInfo.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/ProductInfo.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Success.d.ts +0 -13
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Success.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/Success.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/index.d.ts +0 -11
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/index.js +0 -2
- package/dist/cjs/components/credits/credits-redeem-list/redeem-product-modal/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-redeem-list/type.d.ts +0 -77
- package/dist/cjs/components/credits/credits-redeem-list/type.js.map +0 -7
- package/dist/cjs/components/credits/credits-ways-to-get-credits/index.d.ts +0 -2
- package/dist/cjs/components/credits/credits-ways-to-get-credits/index.js +0 -2
- package/dist/cjs/components/credits/credits-ways-to-get-credits/index.js.map +0 -7
- package/dist/cjs/components/credits/credits-ways-to-get-credits/type.d.ts +0 -60
- package/dist/cjs/components/credits/credits-ways-to-get-credits/type.js +0 -2
- package/dist/cjs/components/credits/credits-ways-to-get-credits/type.js.map +0 -7
- package/dist/cjs/components/credits/credits-ways-to-get-credits/useActions.d.ts +0 -96
- package/dist/cjs/components/credits/credits-ways-to-get-credits/useActions.js +0 -2
- package/dist/cjs/components/credits/credits-ways-to-get-credits/useActions.js.map +0 -7
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/country-select.d.ts +0 -14
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/form-item.d.ts +0 -6
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/state-select.d.ts +0 -15
- package/dist/cjs/index.css +0 -2
- package/dist/cjs/index.css.map +0 -7
- package/dist/cjs/shopify/context/ShopifyProvider.d.ts +0 -10
- package/dist/cjs/shopify/context/index.d.ts +0 -1
- package/dist/cjs/shopify/context/shopify-provider.d.ts +0 -10
- package/dist/cjs/shopify/fetchers/create-cart.d.ts +0 -12
- package/dist/cjs/shopify/fetchers/get-products-by-handles.d.ts +0 -7
- package/dist/cjs/shopify/fetchers/index.d.ts +0 -2
- package/dist/cjs/shopify/fragments/article.d.ts +0 -2
- package/dist/cjs/shopify/fragments/blog.d.ts +0 -1
- package/dist/cjs/shopify/fragments/cart.d.ts +0 -1
- package/dist/cjs/shopify/fragments/collection.d.ts +0 -1
- package/dist/cjs/shopify/fragments/image.d.ts +0 -1
- package/dist/cjs/shopify/fragments/index.d.ts +0 -11
- package/dist/cjs/shopify/fragments/metafields.d.ts +0 -2
- package/dist/cjs/shopify/fragments/page-info.d.ts +0 -1
- package/dist/cjs/shopify/fragments/page.d.ts +0 -1
- package/dist/cjs/shopify/fragments/product.d.ts +0 -1
- package/dist/cjs/shopify/fragments/seo.d.ts +0 -1
- package/dist/cjs/shopify/fragments/variant.d.ts +0 -1
- package/dist/cjs/shopify/gql/fragment-masking.d.ts +0 -15
- package/dist/cjs/shopify/gql/gql.d.ts +0 -87
- package/dist/cjs/shopify/gql/graphql.d.ts +0 -7669
- package/dist/cjs/shopify/gql/index.d.ts +0 -3
- package/dist/cjs/shopify/hooks/index.d.ts +0 -2
- package/dist/cjs/shopify/hooks/use-create-cart.d.ts +0 -2
- package/dist/cjs/shopify/hooks/use-products-by-handles.d.ts +0 -4
- package/dist/cjs/shopify/hooks/useCreateCart.d.ts +0 -2
- package/dist/cjs/shopify/hooks/useProductsByHandles.d.ts +0 -4
- package/dist/cjs/shopify/mutations/create-cart.d.ts +0 -1
- package/dist/cjs/shopify/queries/get-product-by-handles.d.ts +0 -1
- package/dist/cjs/shopify/queries/index.d.ts +0 -1
- package/dist/cjs/shopify/src/index.d.ts +0 -5
- package/dist/cjs/shopify/tsup.config.d.ts +0 -2
- package/dist/cjs/shopify/types/article.d.ts +0 -48
- package/dist/cjs/shopify/types/cart.d.ts +0 -173
- package/dist/cjs/shopify/types/checkout.d.ts +0 -42
- package/dist/cjs/shopify/types/collection.d.ts +0 -122
- package/dist/cjs/shopify/types/common.d.ts +0 -42
- package/dist/cjs/shopify/types/config.d.ts +0 -12
- package/dist/cjs/shopify/types/customer.d.ts +0 -30
- package/dist/cjs/shopify/types/fetcher.d.ts +0 -38
- package/dist/cjs/shopify/types/index.d.ts +0 -12
- package/dist/cjs/shopify/types/page.d.ts +0 -33
- package/dist/cjs/shopify/types/product.d.ts +0 -174
- package/dist/cjs/shopify/types/search.d.ts +0 -54
- package/dist/cjs/shopify/types/site.d.ts +0 -33
- package/dist/cjs/shopify/types/type-helper.d.ts +0 -5
- package/dist/cjs/shopify/utils/colors.d.ts +0 -3
- package/dist/cjs/shopify/utils/const.d.ts +0 -76
- package/dist/cjs/shopify/utils/cookie.d.ts +0 -15
- package/dist/cjs/shopify/utils/errors.d.ts +0 -38
- package/dist/cjs/shopify/utils/fetch-graphql-api.d.ts +0 -19
- package/dist/cjs/shopify/utils/handle-fetch-response.d.ts +0 -5
- package/dist/cjs/shopify/utils/helper.d.ts +0 -28
- package/dist/cjs/shopify/utils/normalize/cart.d.ts +0 -7
- package/dist/cjs/shopify/utils/normalize/customer.d.ts +0 -3
- package/dist/cjs/shopify/utils/normalize/index.d.ts +0 -2
- package/dist/cjs/shopify/utils/normalize/metafield.d.ts +0 -5
- package/dist/cjs/shopify/utils/normalize/product.d.ts +0 -16
- package/dist/cjs/shopify/utils/store.d.ts +0 -2
- package/dist/cjs/shopify/utils/type-helper.d.ts +0 -5
- package/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/dist/esm/components/chat/chat-context.d.ts +0 -101
- package/dist/esm/components/chat/chat-context.js +0 -2
- package/dist/esm/components/chat/chat-context.js.map +0 -7
- package/dist/esm/components/credits/credits-banner/index.d.ts +0 -23
- package/dist/esm/components/credits/credits-banner/index.js +0 -2
- package/dist/esm/components/credits/credits-banner/index.js.map +0 -7
- package/dist/esm/components/credits/credits-benefits/benefitItem.d.ts +0 -19
- package/dist/esm/components/credits/credits-benefits/benefitItem.js +0 -2
- package/dist/esm/components/credits/credits-benefits/benefitItem.js.map +0 -7
- package/dist/esm/components/credits/credits-benefits/iconInfo.d.ts +0 -2
- package/dist/esm/components/credits/credits-benefits/iconInfo.js +0 -2
- package/dist/esm/components/credits/credits-benefits/iconInfo.js.map +0 -7
- package/dist/esm/components/credits/credits-benefits/index.d.ts +0 -12
- package/dist/esm/components/credits/credits-benefits/index.js +0 -4
- package/dist/esm/components/credits/credits-benefits/index.js.map +0 -7
- package/dist/esm/components/credits/credits-cash/RedeemableItem.d.ts +0 -15
- package/dist/esm/components/credits/credits-cash/RedeemableItem.js +0 -2
- package/dist/esm/components/credits/credits-cash/RedeemableItem.js.map +0 -7
- package/dist/esm/components/credits/credits-cash/index.d.ts +0 -13
- package/dist/esm/components/credits/credits-cash/index.js +0 -2
- package/dist/esm/components/credits/credits-cash/index.js.map +0 -7
- package/dist/esm/components/credits/credits-cash/type.d.ts +0 -47
- package/dist/esm/components/credits/credits-faq/faq-item/FaqItem.d.ts +0 -13
- package/dist/esm/components/credits/credits-faq/faq-item/faq-item.d.ts +0 -13
- package/dist/esm/components/credits/credits-faq/faq-item/faq-item.js +0 -2
- package/dist/esm/components/credits/credits-faq/faq-item/faq-item.js.map +0 -7
- package/dist/esm/components/credits/credits-faq/faqItem/FaqItem.d.ts +0 -13
- package/dist/esm/components/credits/credits-faq/index.d.ts +0 -16
- package/dist/esm/components/credits/credits-faq/index.js +0 -2
- package/dist/esm/components/credits/credits-faq/index.js.map +0 -7
- package/dist/esm/components/credits/credits-info-card/index.d.ts +0 -20
- package/dist/esm/components/credits/credits-info-card/index.js +0 -2
- package/dist/esm/components/credits/credits-info-card/index.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/AddressForm/Input.d.ts +0 -13
- package/dist/esm/components/credits/credits-redeem-list/AddressForm/country-select.d.ts +0 -14
- package/dist/esm/components/credits/credits-redeem-list/AddressForm/form-item.d.ts +0 -6
- package/dist/esm/components/credits/credits-redeem-list/AddressForm/index.d.ts +0 -2
- package/dist/esm/components/credits/credits-redeem-list/AddressForm/state-select.d.ts +0 -15
- package/dist/esm/components/credits/credits-redeem-list/AddressForm/type.d.ts +0 -26
- package/dist/esm/components/credits/credits-redeem-list/RedeemCouponModal.d.ts +0 -9
- package/dist/esm/components/credits/credits-redeem-list/RedeemProductModal/Address.d.ts +0 -20
- package/dist/esm/components/credits/credits-redeem-list/RedeemProductModal/Error.d.ts +0 -8
- package/dist/esm/components/credits/credits-redeem-list/RedeemProductModal/Init.d.ts +0 -11
- package/dist/esm/components/credits/credits-redeem-list/RedeemProductModal/ProductInfo.d.ts +0 -8
- package/dist/esm/components/credits/credits-redeem-list/RedeemProductModal/Success.d.ts +0 -13
- package/dist/esm/components/credits/credits-redeem-list/RedeemProductModal/index.d.ts +0 -11
- package/dist/esm/components/credits/credits-redeem-list/RedeemableItem.d.ts +0 -9
- package/dist/esm/components/credits/credits-redeem-list/RedeemableItem.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/RedeemableItem.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/address-form/Input.d.ts +0 -13
- package/dist/esm/components/credits/credits-redeem-list/address-form/Input.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/address-form/Input.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/address-form/country-select.d.ts +0 -14
- package/dist/esm/components/credits/credits-redeem-list/address-form/country-select.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/address-form/country-select.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/address-form/form-item.d.ts +0 -6
- package/dist/esm/components/credits/credits-redeem-list/address-form/form-item.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/address-form/form-item.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/address-form/index.d.ts +0 -2
- package/dist/esm/components/credits/credits-redeem-list/address-form/index.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/address-form/index.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/address-form/state-select.d.ts +0 -15
- package/dist/esm/components/credits/credits-redeem-list/address-form/state-select.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/address-form/state-select.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/address-form/type.d.ts +0 -26
- package/dist/esm/components/credits/credits-redeem-list/index.d.ts +0 -13
- package/dist/esm/components/credits/credits-redeem-list/index.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/index.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-coupon-modal.d.ts +0 -9
- package/dist/esm/components/credits/credits-redeem-list/redeem-coupon-modal.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-coupon-modal.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Address.d.ts +0 -20
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Address.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Address.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Error.d.ts +0 -8
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Error.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Error.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Init.d.ts +0 -11
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Init.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Init.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/ProductInfo.d.ts +0 -8
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/ProductInfo.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/ProductInfo.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Success.d.ts +0 -13
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Success.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/Success.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/index.d.ts +0 -11
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/index.js +0 -2
- package/dist/esm/components/credits/credits-redeem-list/redeem-product-modal/index.js.map +0 -7
- package/dist/esm/components/credits/credits-redeem-list/type.d.ts +0 -77
- package/dist/esm/components/credits/credits-ways-to-get-credits/index.d.ts +0 -2
- package/dist/esm/components/credits/credits-ways-to-get-credits/index.js +0 -2
- package/dist/esm/components/credits/credits-ways-to-get-credits/index.js.map +0 -7
- package/dist/esm/components/credits/credits-ways-to-get-credits/type.d.ts +0 -60
- package/dist/esm/components/credits/credits-ways-to-get-credits/type.js +0 -2
- package/dist/esm/components/credits/credits-ways-to-get-credits/type.js.map +0 -7
- package/dist/esm/components/credits/credits-ways-to-get-credits/useActions.d.ts +0 -96
- package/dist/esm/components/credits/credits-ways-to-get-credits/useActions.js +0 -2
- package/dist/esm/components/credits/credits-ways-to-get-credits/useActions.js.map +0 -7
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/country-select.d.ts +0 -14
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/form-item.d.ts +0 -6
- package/dist/esm/components/credits/creditsRedeemList/AddressForm/state-select.d.ts +0 -15
- package/dist/esm/index.css +0 -2
- package/dist/esm/index.css.map +0 -7
- package/dist/esm/shopify/context/ShopifyProvider.d.ts +0 -10
- package/dist/esm/shopify/context/index.d.ts +0 -1
- package/dist/esm/shopify/context/shopify-provider.d.ts +0 -10
- package/dist/esm/shopify/fetchers/create-cart.d.ts +0 -12
- package/dist/esm/shopify/fetchers/get-products-by-handles.d.ts +0 -7
- package/dist/esm/shopify/fetchers/index.d.ts +0 -2
- package/dist/esm/shopify/fragments/article.d.ts +0 -2
- package/dist/esm/shopify/fragments/blog.d.ts +0 -1
- package/dist/esm/shopify/fragments/cart.d.ts +0 -1
- package/dist/esm/shopify/fragments/collection.d.ts +0 -1
- package/dist/esm/shopify/fragments/image.d.ts +0 -1
- package/dist/esm/shopify/fragments/index.d.ts +0 -11
- package/dist/esm/shopify/fragments/metafields.d.ts +0 -2
- package/dist/esm/shopify/fragments/page-info.d.ts +0 -1
- package/dist/esm/shopify/fragments/page.d.ts +0 -1
- package/dist/esm/shopify/fragments/product.d.ts +0 -1
- package/dist/esm/shopify/fragments/seo.d.ts +0 -1
- package/dist/esm/shopify/fragments/variant.d.ts +0 -1
- package/dist/esm/shopify/gql/fragment-masking.d.ts +0 -15
- package/dist/esm/shopify/gql/gql.d.ts +0 -87
- package/dist/esm/shopify/gql/graphql.d.ts +0 -7669
- package/dist/esm/shopify/gql/index.d.ts +0 -3
- package/dist/esm/shopify/hooks/index.d.ts +0 -2
- package/dist/esm/shopify/hooks/use-create-cart.d.ts +0 -2
- package/dist/esm/shopify/hooks/use-products-by-handles.d.ts +0 -4
- package/dist/esm/shopify/hooks/useCreateCart.d.ts +0 -2
- package/dist/esm/shopify/hooks/useProductsByHandles.d.ts +0 -4
- package/dist/esm/shopify/mutations/create-cart.d.ts +0 -1
- package/dist/esm/shopify/queries/get-product-by-handles.d.ts +0 -1
- package/dist/esm/shopify/queries/index.d.ts +0 -1
- package/dist/esm/shopify/src/index.d.ts +0 -5
- package/dist/esm/shopify/tsup.config.d.ts +0 -2
- package/dist/esm/shopify/types/article.d.ts +0 -48
- package/dist/esm/shopify/types/cart.d.ts +0 -173
- package/dist/esm/shopify/types/checkout.d.ts +0 -42
- package/dist/esm/shopify/types/collection.d.ts +0 -122
- package/dist/esm/shopify/types/common.d.ts +0 -42
- package/dist/esm/shopify/types/config.d.ts +0 -12
- package/dist/esm/shopify/types/customer.d.ts +0 -30
- package/dist/esm/shopify/types/fetcher.d.ts +0 -38
- package/dist/esm/shopify/types/index.d.ts +0 -12
- package/dist/esm/shopify/types/page.d.ts +0 -33
- package/dist/esm/shopify/types/product.d.ts +0 -174
- package/dist/esm/shopify/types/search.d.ts +0 -54
- package/dist/esm/shopify/types/site.d.ts +0 -33
- package/dist/esm/shopify/types/type-helper.d.ts +0 -5
- package/dist/esm/shopify/utils/colors.d.ts +0 -3
- package/dist/esm/shopify/utils/const.d.ts +0 -76
- package/dist/esm/shopify/utils/cookie.d.ts +0 -15
- package/dist/esm/shopify/utils/errors.d.ts +0 -38
- package/dist/esm/shopify/utils/fetch-graphql-api.d.ts +0 -19
- package/dist/esm/shopify/utils/handle-fetch-response.d.ts +0 -5
- package/dist/esm/shopify/utils/helper.d.ts +0 -28
- package/dist/esm/shopify/utils/normalize/cart.d.ts +0 -7
- package/dist/esm/shopify/utils/normalize/customer.d.ts +0 -3
- package/dist/esm/shopify/utils/normalize/index.d.ts +0 -2
- package/dist/esm/shopify/utils/normalize/metafield.d.ts +0 -5
- package/dist/esm/shopify/utils/normalize/product.d.ts +0 -16
- package/dist/esm/shopify/utils/store.d.ts +0 -2
- package/dist/esm/shopify/utils/type-helper.d.ts +0 -5
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
- package/src/components/credits/context/hooks/useSendEmailValidation.ts +0 -20
- package/src/components/credits/context/hooks/useSubscriptions.ts +0 -54
- package/src/components/credits/creditsBenefits/benefitItem.tsx +0 -73
- package/src/components/credits/creditsCash/index.tsx +0 -102
- package/src/helpers/fetchResponse.ts +0 -35
- package/src/helpers/fetcher.ts +0 -44
- package/src/helpers/index.ts +0 -2
- package/src/helpers/track.ts +0 -55
- package/src/helpers/utils.ts +0 -8
- /package/dist/cjs/components/credits/{credits-redeem-list/address-form → creditsRedeemList/AddressForm}/Input.js +0 -0
- /package/dist/cjs/components/credits/{credits-redeem-list/address-form → creditsRedeemList/AddressForm}/type.js +0 -0
- /package/dist/cjs/components/credits/{credits-redeem-list → creditsRedeemList}/type.js +0 -0
- /package/dist/esm/components/credits/{credits-cash/type.js.map → context/memberPriceTypes.js.map} +0 -0
- /package/dist/esm/components/credits/{credits-cash → creditsMemberPrice}/type.js +0 -0
- /package/dist/esm/components/credits/{credits-redeem-list/address-form → creditsMemberPrice}/type.js.map +0 -0
- /package/dist/esm/components/credits/{credits-redeem-list/address-form → creditsNavigation}/type.js +0 -0
- /package/dist/esm/components/credits/{credits-redeem-list → creditsNavigation}/type.js.map +0 -0
- /package/dist/esm/components/{credits/credits-redeem-list → registration/authCodeActivate}/type.js +0 -0
- /package/src/components/credits/creditsBenefits/{iconInfo.tsx → IconInfo.tsx} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/credits/context/utils/functionDiscountCalculate.ts"],
|
|
4
|
+
"sourcesContent": ["import { FunctionDiscountType, RoundSelected } from '../memberPriceConst'\nimport { DiscountConfig } from '../memberPriceTypes'\nimport Decimal from 'decimal.js'\n\n// Function \u8BA1\u7B97\u6298\u540E\u4EF7\nexport const functionDiscountCalculate = ({\n config,\n price,\n}: {\n config: DiscountConfig\n price: number\n}) => {\n const { apply_price_ending, one_decimal_place, two_decimal_place, round_selected } =\n config.price_ending_conf || {}\n\n let salePrice = new Decimal(price)\n\n switch (config.discount_type) {\n // \u767E\u5206\u6BD4\u6298\u6263\n case FunctionDiscountType.Percentage:\n salePrice = salePrice.mul(100 - config.discount_value).div(100)\n break\n // \u56FA\u5B9A\u91D1\u989D\u6298\u6263\n case FunctionDiscountType.FixedAmount:\n salePrice = salePrice.sub(config.discount_value)\n break\n // \u56FA\u5B9A\u4EF7\u683C\u6298\u6263\n case FunctionDiscountType.FixedPrice:\n salePrice = new Decimal(config.discount_value)\n break\n default:\n break\n }\n\n if (apply_price_ending) {\n // \u5C0F\u6570\u4F4D\u53D6\u820D\n switch (round_selected) {\n case RoundSelected.RoundHighest:\n salePrice = salePrice.ceil()\n break\n case RoundSelected.RoundLowest:\n salePrice = salePrice.floor()\n break\n case RoundSelected.RoundNearest:\n salePrice = salePrice.round()\n break\n default:\n salePrice = new Decimal(salePrice.toFixed(2, Decimal.ROUND_DOWN))\n break\n }\n\n const priceEnding = salePrice.toString().split('.')\n salePrice = new Decimal(priceEnding[0] + '.' + one_decimal_place + two_decimal_place)\n }\n\n return salePrice.toNumber()\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAoD,+BAEpDC,EAAoB,yBAGb,MAAMH,EAA4B,CAAC,CACxC,OAAAI,EACA,MAAAC,CACF,IAGM,CACJ,KAAM,CAAE,mBAAAC,EAAoB,kBAAAC,EAAmB,kBAAAC,EAAmB,eAAAC,CAAe,EAC/EL,EAAO,mBAAqB,CAAC,EAE/B,IAAIM,EAAY,IAAI,EAAAC,QAAQN,CAAK,EAEjC,OAAQD,EAAO,cAAe,CAE5B,KAAK,uBAAqB,WACxBM,EAAYA,EAAU,IAAI,IAAMN,EAAO,cAAc,EAAE,IAAI,GAAG,EAC9D,MAEF,KAAK,uBAAqB,YACxBM,EAAYA,EAAU,IAAIN,EAAO,cAAc,EAC/C,MAEF,KAAK,uBAAqB,WACxBM,EAAY,IAAI,EAAAC,QAAQP,EAAO,cAAc,EAC7C,MACF,QACE,KACJ,CAEA,GAAIE,EAAoB,CAEtB,OAAQG,EAAgB,CACtB,KAAK,gBAAc,aACjBC,EAAYA,EAAU,KAAK,EAC3B,MACF,KAAK,gBAAc,YACjBA,EAAYA,EAAU,MAAM,EAC5B,MACF,KAAK,gBAAc,aACjBA,EAAYA,EAAU,MAAM,EAC5B,MACF,QACEA,EAAY,IAAI,EAAAC,QAAQD,EAAU,QAAQ,EAAG,EAAAC,QAAQ,UAAU,CAAC,EAChE,KACJ,CAEA,MAAMC,EAAcF,EAAU,SAAS,EAAE,MAAM,GAAG,EAClDA,EAAY,IAAI,EAAAC,QAAQC,EAAY,CAAC,EAAI,IAAML,EAAoBC,CAAiB,CACtF,CAEA,OAAOE,EAAU,SAAS,CAC5B",
|
|
6
|
+
"names": ["functionDiscountCalculate_exports", "__export", "functionDiscountCalculate", "__toCommonJS", "import_memberPriceConst", "import_decimal", "config", "price", "apply_price_ending", "one_decimal_place", "two_decimal_place", "round_selected", "salePrice", "Decimal", "priceEnding"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionMemberPriceConfig, FunctionMemberPriceResult } from '../memberPriceTypes';
|
|
2
|
+
import { ProductVariant } from '@anker-in/lib';
|
|
3
|
+
export declare const getFunctionMemberPrice: ({ memberPriceDiscount, currencyCode, variant, locale, }: {
|
|
4
|
+
memberPriceDiscount?: FunctionMemberPriceConfig[];
|
|
5
|
+
currencyCode?: string;
|
|
6
|
+
variant?: ProductVariant;
|
|
7
|
+
locale: string;
|
|
8
|
+
}) => false | FunctionMemberPriceResult;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var M=Object.create;var a=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var N=(i,r)=>{for(var e in r)a(i,e,{get:r[e],enumerable:!0})},b=(i,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of A(r))!U.call(i,t)&&t!==e&&a(i,t,{get:()=>r[t],enumerable:!(o=S(r,t))||o.enumerable});return i};var D=(i,r,e)=>(e=i!=null?M(_(i)):{},b(r||!i||!i.__esModule?a(e,"default",{value:i,enumerable:!0}):e,i)),x=i=>b(a({},"__esModule",{value:!0}),i);var V={};N(V,{getFunctionMemberPrice:()=>R});module.exports=x(V);var n=require("../utils"),d=require("./functionDiscountCalculate"),c=D(require("decimal.js")),v=require("./getFunctionMemberPriceDiscountConfig"),w=D(require("./variantGetCoupon"));const R=({memberPriceDiscount:i,currencyCode:r,variant:e,locale:o})=>{const t=(0,w.default)({variant:e}),{memberPriceDiscountConfig:m,activeMemberPriceConfig:F}=(0,v.getFunctionMemberPriceDiscountConfig)({config:i,variant:e}),p=!!F?.discount_combinations.other_product_discounts;if(!m)return!1;const s={amount:e?.price.amount||0,priceWithCurrency:(0,n.formatPrice)({amount:e?.price.amount||0,currencyCode:r||"USD",locale:o})},u=m?(0,d.functionDiscountCalculate)({config:m,price:e?.price.amount||0}):e?.price.amount||0,C={amount:u,priceWithCurrency:(0,n.formatPrice)({amount:u,currencyCode:r||"USD",locale:o})};let P=u;if(t?.variant_price4wscode&&e&&p)if(p){const f=new c.default(e.price.amount).minus(t.variant_price4wscode);P=new c.default(u).minus(f).toNumber()}else{const f=new c.default(e.price.amount).minus(t.variant_price4wscode);if(u>f.toNumber())return!1}const h={amount:P,priceWithCurrency:(0,n.formatPrice)({amount:P,currencyCode:r||"USD",locale:o})},W=new c.default(s.amount).minus(h.amount).toNumber(),g={amount:W,priceWithCurrency:(0,n.formatPrice)({amount:W,currencyCode:r||"USD",locale:o,maximumFractionDigits:2})},l=new c.default(s.amount).minus(C.amount).toNumber(),y={amount:l,priceWithCurrency:(0,n.formatPrice)({amount:l,currencyCode:r||"USD",locale:o,maximumFractionDigits:2})};return{hasMemberPrice:!!m,useCoupon:p,originalPrice:s.amount,originalPriceWithCurrency:s.priceWithCurrency,salePrice:h.amount,salePriceWithCurrency:h.priceWithCurrency,salePriceWithoutCoupon:C.amount,salePriceWithoutCouponWithCurrency:C.priceWithCurrency,savePrice:g.amount,savePriceWithCurrency:g.priceWithCurrency,savePriceWithoutCoupon:y.amount,savePriceWithoutCouponWithCurrency:y.priceWithCurrency}};
|
|
2
|
+
//# sourceMappingURL=getFunctionMemberPrice.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/credits/context/utils/getFunctionMemberPrice.ts"],
|
|
4
|
+
"sourcesContent": ["import { formatPrice } from '../utils'\nimport { FunctionMemberPriceConfig, FunctionMemberPriceResult } from '../memberPriceTypes'\nimport { ProductVariant } from '@anker-in/lib'\nimport { functionDiscountCalculate } from './functionDiscountCalculate'\nimport Decimal from 'decimal.js'\nimport { getFunctionMemberPriceDiscountConfig } from './getFunctionMemberPriceDiscountConfig'\nimport variantGetCoupon from './variantGetCoupon'\n\n// \u8BA1\u7B97\u5355\u4EF6\u5546\u54C1\u7684\u4F1A\u5458\u4EF7\nexport const getFunctionMemberPrice = ({\n memberPriceDiscount,\n currencyCode,\n variant,\n locale,\n}: {\n memberPriceDiscount?: FunctionMemberPriceConfig[]\n currencyCode?: string\n variant?: ProductVariant\n locale: string\n}) => {\n const couponData = variantGetCoupon({ variant })\n\n // variant\u5BF9\u5E94\u7684\u4F1A\u5458\u4EF7\u6298\u6263\u914D\u7F6E\n const { memberPriceDiscountConfig, activeMemberPriceConfig } = getFunctionMemberPriceDiscountConfig({\n config: memberPriceDiscount,\n variant,\n })\n\n const useCoupon = !!activeMemberPriceConfig?.discount_combinations.other_product_discounts\n\n if (!memberPriceDiscountConfig) {\n return false as false\n }\n\n const originalPrice = {\n amount: variant?.price.amount || 0,\n priceWithCurrency: formatPrice({\n amount: variant?.price.amount || 0,\n currencyCode: currencyCode || 'USD',\n locale,\n }),\n }\n\n const salePriceWithoutCouponAmount = memberPriceDiscountConfig\n ? functionDiscountCalculate({\n config: memberPriceDiscountConfig,\n price: variant?.price.amount || 0,\n })\n : variant?.price.amount || 0\n const salePriceWithoutCoupon = {\n amount: salePriceWithoutCouponAmount,\n priceWithCurrency: formatPrice({\n amount: salePriceWithoutCouponAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n }),\n }\n\n // function \u4F1A\u5458\u4EF7\u662F\u5728\u539F\u4EF7\u7684\u57FA\u7840\u4E0A\u8FDB\u884C\u8BA1\u7B97\uFF0C\u6682\u4E0D\u652F\u6301\u6298\u540E\u4EF7\n let salePriceAmount = salePriceWithoutCouponAmount\n\n // \u51CF\u53BBcode\u7684\u4F18\u60E0\n if (couponData?.variant_price4wscode && variant && useCoupon) {\n if (useCoupon) {\n // code\u7684\u4F18\u60E0\u91D1\u989D\n const codeSaveAmountDecimal = new Decimal(variant.price.amount).minus(couponData.variant_price4wscode)\n salePriceAmount = new Decimal(salePriceWithoutCouponAmount).minus(codeSaveAmountDecimal).toNumber()\n } else {\n // \u4E0D\u80FD\u4E0E code \u540C\u65F6\u4F7F\u7528\uFF0C\u9700\u8981\u5224\u65AD\u4F1A\u5458\u4EF7\u662F\u5426\u5C0F\u4E8E code \u7684\u4F18\u60E0\u91D1\u989D\uFF0C\u5982\u679C\u5C0F\u4E8E\u5219\u5F53\u505A\u6CA1\u6709\u4F1A\u5458\u4EF7\n const codeSaveAmountDecimal = new Decimal(variant.price.amount).minus(couponData.variant_price4wscode)\n if (salePriceWithoutCouponAmount > codeSaveAmountDecimal.toNumber()) {\n return false as false\n }\n }\n }\n\n const salePrice = {\n amount: salePriceAmount,\n priceWithCurrency: formatPrice({\n amount: salePriceAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n }),\n }\n\n const savePriceAmount = new Decimal(originalPrice.amount).minus(salePrice.amount).toNumber()\n const savePrice = {\n amount: savePriceAmount,\n priceWithCurrency: formatPrice({\n amount: savePriceAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n }),\n }\n\n const savePriceWithoutCouponAmount = new Decimal(originalPrice.amount)\n .minus(salePriceWithoutCoupon.amount)\n .toNumber()\n const savePriceWithoutCoupon = {\n amount: savePriceWithoutCouponAmount,\n priceWithCurrency: formatPrice({\n amount: savePriceWithoutCouponAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n }),\n }\n\n const result: FunctionMemberPriceResult = {\n // \u662F\u5426\u5B58\u5728\u4F1A\u5458\u4EF7\n hasMemberPrice: !!memberPriceDiscountConfig,\n useCoupon,\n // \u539F\u4EF7\n originalPrice: originalPrice.amount,\n originalPriceWithCurrency: originalPrice.priceWithCurrency as string,\n // \u4F7F\u7528\u5238\u540E\u7684\u6298\u540E\u4EF7\n salePrice: salePrice.amount,\n salePriceWithCurrency: salePrice.priceWithCurrency as string,\n\n // \u4E0D\u4F7F\u7528\u5238\u7684\u6298\u540E\u4EF7\n salePriceWithoutCoupon: salePriceWithoutCoupon.amount,\n salePriceWithoutCouponWithCurrency: salePriceWithoutCoupon.priceWithCurrency as string,\n\n // \u5305\u542B\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePrice: savePrice.amount,\n savePriceWithCurrency: savePrice.priceWithCurrency as string,\n\n // \u4E0D\u4F7F\u7528\u5238\u7684\u8282\u7701\u91D1\u989D\n savePriceWithoutCoupon: savePriceWithoutCoupon.amount,\n savePriceWithoutCouponWithCurrency: savePriceWithoutCoupon.priceWithCurrency as string,\n }\n\n return result\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,oBAG5BC,EAA0C,uCAC1CC,EAAoB,yBACpBC,EAAqD,kDACrDC,EAA6B,iCAGtB,MAAMN,EAAyB,CAAC,CACrC,oBAAAO,EACA,aAAAC,EACA,QAAAC,EACA,OAAAC,CACF,IAKM,CACJ,MAAMC,KAAa,EAAAC,SAAiB,CAAE,QAAAH,CAAQ,CAAC,EAGzC,CAAE,0BAAAI,EAA2B,wBAAAC,CAAwB,KAAI,wCAAqC,CAClG,OAAQP,EACR,QAAAE,CACF,CAAC,EAEKM,EAAY,CAAC,CAACD,GAAyB,sBAAsB,wBAEnE,GAAI,CAACD,EACH,MAAO,GAGT,MAAMG,EAAgB,CACpB,OAAQP,GAAS,MAAM,QAAU,EACjC,qBAAmB,eAAY,CAC7B,OAAQA,GAAS,MAAM,QAAU,EACjC,aAAcD,GAAgB,MAC9B,OAAAE,CACF,CAAC,CACH,EAEMO,EAA+BJ,KACjC,6BAA0B,CACxB,OAAQA,EACR,MAAOJ,GAAS,MAAM,QAAU,CAClC,CAAC,EACDA,GAAS,MAAM,QAAU,EACvBS,EAAyB,CAC7B,OAAQD,EACR,qBAAmB,eAAY,CAC7B,OAAQA,EACR,aAAcT,GAAgB,MAC9B,OAAAE,CACF,CAAC,CACH,EAGA,IAAIS,EAAkBF,EAGtB,GAAIN,GAAY,sBAAwBF,GAAWM,EACjD,GAAIA,EAAW,CAEb,MAAMK,EAAwB,IAAI,EAAAC,QAAQZ,EAAQ,MAAM,MAAM,EAAE,MAAME,EAAW,oBAAoB,EACrGQ,EAAkB,IAAI,EAAAE,QAAQJ,CAA4B,EAAE,MAAMG,CAAqB,EAAE,SAAS,CACpG,KAAO,CAEL,MAAMA,EAAwB,IAAI,EAAAC,QAAQZ,EAAQ,MAAM,MAAM,EAAE,MAAME,EAAW,oBAAoB,EACrG,GAAIM,EAA+BG,EAAsB,SAAS,EAChE,MAAO,EAEX,CAGF,MAAME,EAAY,CAChB,OAAQH,EACR,qBAAmB,eAAY,CAC7B,OAAQA,EACR,aAAcX,GAAgB,MAC9B,OAAAE,CACF,CAAC,CACH,EAEMa,EAAkB,IAAI,EAAAF,QAAQL,EAAc,MAAM,EAAE,MAAMM,EAAU,MAAM,EAAE,SAAS,EACrFE,EAAY,CAChB,OAAQD,EACR,qBAAmB,eAAY,CAC7B,OAAQA,EACR,aAAcf,GAAgB,MAC9B,OAAAE,EACA,sBAAuB,CACzB,CAAC,CACH,EAEMe,EAA+B,IAAI,EAAAJ,QAAQL,EAAc,MAAM,EAClE,MAAME,EAAuB,MAAM,EACnC,SAAS,EACNQ,EAAyB,CAC7B,OAAQD,EACR,qBAAmB,eAAY,CAC7B,OAAQA,EACR,aAAcjB,GAAgB,MAC9B,OAAAE,EACA,sBAAuB,CACzB,CAAC,CACH,EA0BA,MAxB0C,CAExC,eAAgB,CAAC,CAACG,EAClB,UAAAE,EAEA,cAAeC,EAAc,OAC7B,0BAA2BA,EAAc,kBAEzC,UAAWM,EAAU,OACrB,sBAAuBA,EAAU,kBAGjC,uBAAwBJ,EAAuB,OAC/C,mCAAoCA,EAAuB,kBAG3D,UAAWM,EAAU,OACrB,sBAAuBA,EAAU,kBAGjC,uBAAwBE,EAAuB,OAC/C,mCAAoCA,EAAuB,iBAC7D,CAGF",
|
|
6
|
+
"names": ["getFunctionMemberPrice_exports", "__export", "getFunctionMemberPrice", "__toCommonJS", "import_utils", "import_functionDiscountCalculate", "import_decimal", "import_getFunctionMemberPriceDiscountConfig", "import_variantGetCoupon", "memberPriceDiscount", "currencyCode", "variant", "locale", "couponData", "variantGetCoupon", "memberPriceDiscountConfig", "activeMemberPriceConfig", "useCoupon", "originalPrice", "salePriceWithoutCouponAmount", "salePriceWithoutCoupon", "salePriceAmount", "codeSaveAmountDecimal", "Decimal", "salePrice", "savePriceAmount", "savePrice", "savePriceWithoutCouponAmount", "savePriceWithoutCoupon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DiscountConfig, FunctionMemberPriceConfig } from '../memberPriceTypes';
|
|
2
|
+
import { ProductVariant } from '@anker-in/lib';
|
|
3
|
+
export declare const getFunctionMemberPriceDiscountConfig: ({ config, variant, }: {
|
|
4
|
+
config?: FunctionMemberPriceConfig[];
|
|
5
|
+
variant?: ProductVariant;
|
|
6
|
+
}) => {
|
|
7
|
+
memberPriceDiscountConfig: DiscountConfig | undefined;
|
|
8
|
+
activeMemberPriceConfig: FunctionMemberPriceConfig | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(n,i)=>{for(var r in i)c(n,r,{get:i[r],enumerable:!0})},g=(n,i,r,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let e of m(i))!s.call(n,e)&&e!==r&&c(n,e,{get:()=>i[e],enumerable:!(t=a(i,e))||t.enumerable});return n};var b=n=>g(c({},"__esModule",{value:!0}),n);var P={};d(P,{getFunctionMemberPriceDiscountConfig:()=>C});module.exports=b(P);var f=require("./atobID");const C=({config:n,variant:i})=>{let r,t;if(!n||!i)return{memberPriceDiscountConfig:r,activeMemberPriceConfig:t};for(const e of n)if(r=e.result_detail.member_discounts?.find(o=>o.main_products.all_store_variant?o:o.main_products.variants.find(u=>String(u.variant_id)===(0,f.atobID)(i.id)))?.discount_conf,r){t=e;break}return r?{memberPriceDiscountConfig:r,activeMemberPriceConfig:t}:{memberPriceDiscountConfig:r,activeMemberPriceConfig:t}};
|
|
2
|
+
//# sourceMappingURL=getFunctionMemberPriceDiscountConfig.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.ts"],
|
|
4
|
+
"sourcesContent": ["import { DiscountConfig, FunctionMemberPriceConfig } from '../memberPriceTypes'\nimport { ProductVariant } from '@anker-in/lib'\nimport { atobID } from './atobID'\n\n// \u83B7\u53D6\u4F1A\u5458\u4EF7\u6298\u6263\u914D\u7F6E\nexport const getFunctionMemberPriceDiscountConfig = ({\n config,\n variant,\n}: {\n config?: FunctionMemberPriceConfig[]\n variant?: ProductVariant\n}) => {\n let memberPriceDiscountConfig: DiscountConfig | undefined\n let activeMemberPriceConfig: FunctionMemberPriceConfig | undefined\n\n if (!config || !variant) {\n return {\n memberPriceDiscountConfig,\n activeMemberPriceConfig,\n }\n }\n\n for (const configItem of config) {\n memberPriceDiscountConfig = configItem.result_detail.member_discounts?.find(discountItem => {\n if (discountItem.main_products.all_store_variant) {\n return discountItem\n }\n\n return discountItem.main_products.variants.find(\n variantConfig => String(variantConfig.variant_id) === atobID(variant.id as string)\n )\n })?.discount_conf\n\n if (memberPriceDiscountConfig) {\n activeMemberPriceConfig = configItem\n break\n }\n }\n\n if (!memberPriceDiscountConfig) {\n return {\n memberPriceDiscountConfig,\n activeMemberPriceConfig,\n }\n }\n\n return {\n memberPriceDiscountConfig,\n activeMemberPriceConfig,\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0CAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAuB,oBAGhB,MAAMF,EAAuC,CAAC,CACnD,OAAAG,EACA,QAAAC,CACF,IAGM,CACJ,IAAIC,EACAC,EAEJ,GAAI,CAACH,GAAU,CAACC,EACd,MAAO,CACL,0BAAAC,EACA,wBAAAC,CACF,EAGF,UAAWC,KAAcJ,EAWvB,GAVAE,EAA4BE,EAAW,cAAc,kBAAkB,KAAKC,GACtEA,EAAa,cAAc,kBACtBA,EAGFA,EAAa,cAAc,SAAS,KACzCC,GAAiB,OAAOA,EAAc,UAAU,OAAM,UAAOL,EAAQ,EAAY,CACnF,CACD,GAAG,cAEAC,EAA2B,CAC7BC,EAA0BC,EAC1B,KACF,CAGF,OAAKF,EAOE,CACL,0BAAAA,EACA,wBAAAC,CACF,EATS,CACL,0BAAAD,EACA,wBAAAC,CACF,CAOJ",
|
|
6
|
+
"names": ["getFunctionMemberPriceDiscountConfig_exports", "__export", "getFunctionMemberPriceDiscountConfig", "__toCommonJS", "import_atobID", "config", "variant", "memberPriceDiscountConfig", "activeMemberPriceConfig", "configItem", "discountItem", "variantConfig"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var m=(e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})},f=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of l(t))!u.call(e,s)&&s!==i&&r(e,s,{get:()=>t[s],enumerable:!(a=c(t,s))||a.enumerable});return e};var w=e=>f(r({},"__esModule",{value:!0}),e);var p={};m(p,{default:()=>g});module.exports=w(p);var d=require("./atobID");const C=({variant:e,channel:t=""})=>{if(!e)return;const i="wsch";return(e?.metafields?.discountCodeApp||[])?.filter(n=>{const o=(0,d.atobID)(e.id);return(!n?.ends_at||new Date(n?.ends_at).getTime()>new Date().getTime())&&new Date(n?.starts_at).getTime()<=new Date().getTime()&&n.variant_shopify_id===+(o||"")&&(t?n?.title?.toLocaleLowerCase().includes(t):!n?.title?.toLocaleLowerCase().includes(i))})?.[0]};var g=C;
|
|
2
|
+
//# sourceMappingURL=variantGetCoupon.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/credits/context/utils/variantGetCoupon.ts"],
|
|
4
|
+
"sourcesContent": ["import { ProductVariant } from '@anker-in/lib'\nimport { atobID } from './atobID'\n\nconst variantGetCoupon = ({\n variant,\n channel = '',\n}: {\n variant?: ProductVariant\n channel?: string\n}) => {\n if (!variant) return undefined\n\n const hideChannel = 'wsch'\n const discountCodeApp = variant?.metafields?.discountCodeApp || []\n\n const results = discountCodeApp?.filter((coupon: any) => {\n const variantId = atobID(variant.id as string)\n const isActive =\n (!coupon?.ends_at || new Date(coupon?.ends_at).getTime() > new Date().getTime()) &&\n new Date(coupon?.starts_at).getTime() <= new Date().getTime() &&\n coupon.variant_shopify_id === +(variantId || '')\n\n return (\n isActive &&\n (channel\n ? coupon?.title?.toLocaleLowerCase().includes(channel)\n : !coupon?.title?.toLocaleLowerCase().includes(hideChannel))\n )\n })\n\n return results?.[0]\n}\n\nexport default variantGetCoupon\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAAuB,oBAEvB,MAAMC,EAAmB,CAAC,CACxB,QAAAC,EACA,QAAAC,EAAU,EACZ,IAGM,CACJ,GAAI,CAACD,EAAS,OAEd,MAAME,EAAc,OAkBpB,OAjBwBF,GAAS,YAAY,iBAAmB,CAAC,IAEhC,OAAQG,GAAgB,CACvD,MAAMC,KAAY,UAAOJ,EAAQ,EAAY,EAM7C,OAJG,CAACG,GAAQ,SAAW,IAAI,KAAKA,GAAQ,OAAO,EAAE,QAAQ,EAAI,IAAI,KAAK,EAAE,QAAQ,IAC9E,IAAI,KAAKA,GAAQ,SAAS,EAAE,QAAQ,GAAK,IAAI,KAAK,EAAE,QAAQ,GAC5DA,EAAO,qBAAuB,EAAEC,GAAa,MAI5CH,EACGE,GAAQ,OAAO,kBAAkB,EAAE,SAASF,CAAO,EACnD,CAACE,GAAQ,OAAO,kBAAkB,EAAE,SAASD,CAAW,EAEhE,CAAC,IAEgB,CAAC,CACpB,EAEA,IAAON,EAAQG",
|
|
6
|
+
"names": ["variantGetCoupon_exports", "__export", "variantGetCoupon_default", "__toCommonJS", "import_atobID", "variantGetCoupon", "variant", "channel", "hideChannel", "coupon", "variantId"]
|
|
7
|
+
}
|
|
@@ -23,3 +23,7 @@ export declare function formatVariantPrice({ amount, baseAmount, currencyCode, l
|
|
|
23
23
|
basePrice: string | undefined;
|
|
24
24
|
discount: string | null;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* 提取 variant id,去掉 gid://shopify/ProductVariant/ 前缀
|
|
28
|
+
*/
|
|
29
|
+
export declare function extractVariantId(id: string | number | undefined): string | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var I=Object.create;var o=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var E=(e,n)=>{for(var r in n)o(e,r,{get:n[r],enumerable:!0})},p=(e,n,r,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of k(n))!C.call(e,i)&&i!==r&&o(e,i,{get:()=>n[i],enumerable:!(t=P(n,i))||t.enumerable});return e};var S=(e,n,r)=>(r=e!=null?I(x(e)):{},p(n||!e||!e.__esModule?o(r,"default",{value:e,enumerable:!0}):r,e)),$=e=>p(o({},"__esModule",{value:!0}),e);var z={};E(z,{emailValidate:()=>U,extractVariantId:()=>v,formatPrice:()=>m,formatVariantPrice:()=>V,getAlpcPath:()=>F,languageTerritory:()=>f,numberFormat:()=>D});module.exports=$(z);var l=S(require("js-cookie")),s=require("./const");function F(e=""){let n=!1;const r=l.default.get("alpcEU");return r===void 0||r===""?["de","eu-de","eu","eu-en","uk","fr","fra"].includes(e)&&(n=!0):Number(r)&&(n=!0),n?"/api/multipass/alpc-eu":"/api/multipass/alpc"}function D(e=0){return typeof Intl>"u"?e:new Intl.NumberFormat().format(e)}const U=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),f=e=>({us:"en-us",uk:"en-gb",ca:"en-ca",au:"en-au",nz:"en-nz",eu:"en-eu",pl:"pl-pl",fr:"fr-fr",de:"de-de",vn:"vi-vn",sg:"en-sg","ae-en":"en-ae",plus:"en-us",cl:"es-cl",es:"es-es",se:"en-se",dk:"en-dk",is:"en-is",no:"en-no",fi:"en-fi"})[e]||"";function m({amount:e,currencyCode:n,locale:r,maximumFractionDigits:t,minimumFractionDigits:i,removeTrailingZeros:a=!1}){let u=new Intl.NumberFormat(f(r)||r,{style:"currency",currency:n||"USD",minimumFractionDigits:t===0?0:i,maximumFractionDigits:t}).format(e);return["eu-de","eu-en","de","eu"].includes(r)&&(u=u?.toString()?.replace(/[\s]/g,"")),a&&(u=u.replace(/(\.\d*?[1-9])0+\b/,"$1").replace(/\.0+\b/,"").replace(/(\,\d*?[1-9])0+\b/,"$1").replace(/\,0+\b/,"")),u}function V({amount:e,baseAmount:n,currencyCode:r,locale:t,maximumFractionDigits:i,minimumFractionDigits:a,removeTrailingZeros:c}){if(typeof Intl>"u")return{price:`${s.PRICE_SYMBOL[t]}${e}`,basePrice:`${s.PRICE_SYMBOL[t]}${n}`,discount:`${s.PRICE_SYMBOL[t]}${n-e||0}`};const u=n>e,d=new Intl.NumberFormat(f(t),{style:"percent"}),g=u?d.format((n-e)/n):null,b=m({amount:e,currencyCode:r,locale:t,removeTrailingZeros:c}),y=u?m({amount:n,currencyCode:r,locale:t,maximumFractionDigits:i,minimumFractionDigits:a,removeTrailingZeros:c}):void 0;return{price:b,basePrice:y,discount:g}}function v(e){return e?(typeof e=="number"?e.toString():e).replace("gid://shopify/ProductVariant/",""):null}
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/credits/context/utils.ts"],
|
|
4
|
-
"sourcesContent": ["import Cookies from 'js-cookie'\nimport { PRICE_SYMBOL } from './const'\n\nexport function getAlpcPath(locale = '') {\n let isEU = false\n const alpcEUCookie = Cookies.get('alpcEU')\n if (alpcEUCookie === undefined || alpcEUCookie === '') {\n if (['de', 'eu-de', 'eu', 'eu-en', 'uk', 'fr', 'fra'].includes(locale)) {\n isEU = true\n }\n } else {\n let alpcEU = Number(alpcEUCookie)\n if (alpcEU) {\n isEU = true\n }\n }\n\n if (isEU) {\n return '/api/multipass/alpc-eu'\n }\n\n return '/api/multipass/alpc'\n}\n\nexport function numberFormat(num: number = 0) {\n if (typeof Intl === 'undefined') {\n return num\n }\n\n return new Intl.NumberFormat().format(num)\n}\n\nexport const emailValidate = (email: any) => {\n return /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n )\n}\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n nz: 'en-nz',\n eu: 'en-eu',\n pl: 'pl-pl',\n fr: 'fr-fr',\n de: 'de-de',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'en-ae',\n plus: 'en-us',\n cl: 'es-cl',\n es: 'es-es',\n // Nordic countries\n se: 'en-se',\n dk: 'en-dk',\n is: 'en-is',\n no: 'en-no',\n fi: 'en-fi',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const formatCurrency = new Intl.NumberFormat(languageTerritory(locale) || locale, {\n style: 'currency',\n currency: currencyCode || 'USD',\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency.format(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n // Adjust the regex to match comma as decimal separator\n formattedValue = formattedValue\n .replace(/(\\.\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\.0+\\b/, '')\n .replace(/(\\,\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n const formatDiscount = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'percent',\n })\n const discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount }\n}\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,gBAAAC,EAAA,uBAAAC,EAAA,gBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,IAAA,eAAAC,
|
|
6
|
-
"names": ["utils_exports", "__export", "emailValidate", "formatPrice", "formatVariantPrice", "getAlpcPath", "languageTerritory", "numberFormat", "__toCommonJS", "import_js_cookie", "import_const", "locale", "isEU", "alpcEUCookie", "Cookies", "num", "email", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "formattedValue", "baseAmount", "hasDiscount", "formatDiscount", "discount", "price", "basePrice"]
|
|
4
|
+
"sourcesContent": ["import Cookies from 'js-cookie'\nimport { PRICE_SYMBOL } from './const'\n\nexport function getAlpcPath(locale = '') {\n let isEU = false\n const alpcEUCookie = Cookies.get('alpcEU')\n if (alpcEUCookie === undefined || alpcEUCookie === '') {\n if (['de', 'eu-de', 'eu', 'eu-en', 'uk', 'fr', 'fra'].includes(locale)) {\n isEU = true\n }\n } else {\n let alpcEU = Number(alpcEUCookie)\n if (alpcEU) {\n isEU = true\n }\n }\n\n if (isEU) {\n return '/api/multipass/alpc-eu'\n }\n\n return '/api/multipass/alpc'\n}\n\nexport function numberFormat(num: number = 0) {\n if (typeof Intl === 'undefined') {\n return num\n }\n\n return new Intl.NumberFormat().format(num)\n}\n\nexport const emailValidate = (email: any) => {\n return /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n )\n}\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n nz: 'en-nz',\n eu: 'en-eu',\n pl: 'pl-pl',\n fr: 'fr-fr',\n de: 'de-de',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'en-ae',\n plus: 'en-us',\n cl: 'es-cl',\n es: 'es-es',\n // Nordic countries\n se: 'en-se',\n dk: 'en-dk',\n is: 'en-is',\n no: 'en-no',\n fi: 'en-fi',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const formatCurrency = new Intl.NumberFormat(languageTerritory(locale) || locale, {\n style: 'currency',\n currency: currencyCode || 'USD',\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency.format(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n // Adjust the regex to match comma as decimal separator\n formattedValue = formattedValue\n .replace(/(\\.\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\.0+\\b/, '')\n .replace(/(\\,\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n const formatDiscount = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'percent',\n })\n const discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount }\n}\n\n/**\n * \u63D0\u53D6 variant id\uFF0C\u53BB\u6389 gid://shopify/ProductVariant/ \u524D\u7F00\n */\nexport function extractVariantId(id: string | number | undefined): string | null {\n if (!id) return null\n const idStr = typeof id === 'number' ? id.toString() : id\n return idStr.replace('gid://shopify/ProductVariant/', '')\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,qBAAAC,EAAA,gBAAAC,EAAA,uBAAAC,EAAA,gBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAT,GAAA,IAAAU,EAAoB,wBACpBC,EAA6B,mBAEtB,SAASL,EAAYM,EAAS,GAAI,CACvC,IAAIC,EAAO,GACX,MAAMC,EAAe,EAAAC,QAAQ,IAAI,QAAQ,EAYzC,OAXID,IAAiB,QAAaA,IAAiB,GAC7C,CAAC,KAAM,QAAS,KAAM,QAAS,KAAM,KAAM,KAAK,EAAE,SAASF,CAAM,IACnEC,EAAO,IAGI,OAAOC,CAAY,IAE9BD,EAAO,IAIPA,EACK,yBAGF,qBACT,CAEO,SAASL,EAAaQ,EAAc,EAAG,CAC5C,OAAI,OAAO,KAAS,IACXA,EAGF,IAAI,KAAK,aAAa,EAAE,OAAOA,CAAG,CAC3C,CAEO,MAAMd,EAAiBe,GACrB,yJAAyJ,KAC9JA,CACF,EAGWV,EAAqBK,IAE/B,CACC,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,QAAS,QACT,KAAM,QACN,GAAI,QACJ,GAAI,QAEJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,GAAGA,CAAM,GAAK,GAET,SAASR,EAAY,CAC1B,OAAAc,EACA,aAAAC,EACA,OAAAP,EACA,sBAAAQ,EACA,sBAAAC,EACA,oBAAAC,EAAsB,EACxB,EAOG,CAQD,IAAIC,EAPmB,IAAI,KAAK,aAAahB,EAAkBK,CAAM,GAAKA,EAAQ,CAChF,MAAO,WACP,SAAUO,GAAgB,MAC1B,sBAAuBC,IAA0B,EAAI,EAAIC,EACzD,sBAAAD,CACF,CAAC,EAEmC,OAAOF,CAAM,EAEjD,MAAI,CAAC,QAAS,QAAS,KAAM,IAAI,EAAE,SAASN,CAAM,IAChDW,EAAiBA,GAAgB,SAAS,GAAG,QAAQ,QAAS,EAAE,GAG9DD,IAEFC,EAAiBA,EACd,QAAQ,oBAAqB,IAAI,EACjC,QAAQ,SAAU,EAAE,EACpB,QAAQ,oBAAqB,IAAI,EACjC,QAAQ,SAAU,EAAE,GAGlBA,CACT,CAEO,SAASlB,EAAmB,CACjC,OAAAa,EACA,WAAAM,EACA,aAAAL,EACA,OAAAP,EACA,sBAAAQ,EACA,sBAAAC,EACA,oBAAAC,CACF,EAQG,CACD,GAAI,OAAO,KAAS,IAClB,MAAO,CACL,MAAO,GAAG,eAAaV,CAAmC,CAAC,GAAGM,CAAM,GACpE,UAAW,GAAG,eAAaN,CAAmC,CAAC,GAAGY,CAAU,GAC5E,SAAU,GAAG,eAAaZ,CAAmC,CAAC,GAAGY,EAAaN,GAAU,CAAC,EAC3F,EAGF,MAAMO,EAAcD,EAAaN,EAC3BQ,EAAiB,IAAI,KAAK,aAAanB,EAAkBK,CAAM,EAAG,CACtE,MAAO,SACT,CAAC,EACKe,EAAWF,EAAcC,EAAe,QAAQF,EAAaN,GAAUM,CAAU,EAAI,KAErFI,EAAQxB,EAAY,CAAE,OAAAc,EAAQ,aAAAC,EAAc,OAAAP,EAAQ,oBAAAU,CAAoB,CAAC,EACzEO,EAAYJ,EACdrB,EAAY,CACV,OAAQoB,EACR,aAAAL,EACA,OAAAP,EACA,sBAAAQ,EACA,sBAAAC,EACA,oBAAAC,CACF,CAAC,EACD,OAEJ,MAAO,CAAE,MAAAM,EAAO,UAAAC,EAAW,SAAAF,CAAS,CACtC,CAKO,SAASxB,EAAiB2B,EAAgD,CAC/E,OAAKA,GACS,OAAOA,GAAO,SAAWA,EAAG,SAAS,EAAIA,GAC1C,QAAQ,gCAAiC,EAAE,EAFxC,IAGlB",
|
|
6
|
+
"names": ["utils_exports", "__export", "emailValidate", "extractVariantId", "formatPrice", "formatVariantPrice", "getAlpcPath", "languageTerritory", "numberFormat", "__toCommonJS", "import_js_cookie", "import_const", "locale", "isEU", "alpcEUCookie", "Cookies", "num", "email", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "formattedValue", "baseAmount", "hasDiscount", "formatDiscount", "discount", "price", "basePrice", "id"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var F=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var K=(t,n)=>{for(var d in n)F(t,d,{get:n[d],enumerable:!0})},Q=(t,n,d,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of G(n))!J.call(t,o)&&o!==d&&F(t,o,{get:()=>n[o],enumerable:!(l=V(n,o))||l.enumerable});return t};var W=t=>Q(F({},"__esModule",{value:!0}),t);var Y={};K(Y,{CreditsAnkersolixTask:()=>X});module.exports=W(Y);var e=require("react/jsx-runtime"),i=require("@anker-in/headless-ui"),b=require("@heroicons/react/24/outline"),A=require("framer-motion"),a=require("react"),f=require("./type"),M=require("../creditsWaysToGetCredits/useActions"),R=require("../context/provider"),c=require("@anker-in/lib"),L=require("../../registration"),T=require("../modal/creditsUploadReceiptModal"),U=require("../modal/subscribeModal"),O=require("../../../constants");const X=({copy:t,classNames:n,id:d})=>{const[l,o]=(0,a.useState)(!1),{profile:B}=(0,R.useCreditsContext)(),{authCodeActivate:D}=(0,L.useRegistration)(),{brand:P}=(0,c.useHeadlessContext)(),h=O.ROUNDED_BRANDS.includes(P),g=!!B,[j,N]=(0,a.useState)(!1),[_,v]=(0,a.useState)(!1),[w,E]=(0,a.useState)(!1),[S,H]=(0,a.useState)(!1),{actions:k}=(0,M.useActions)({copy:t,subscribe:{openSubscribePopup:()=>v(!0),isSuccess:w},uploadReceipt:{openUploadReceiptPopup:()=>N(!0),isSuccess:S}}),I=(0,a.useMemo)(()=>{const s=t.list.map(r=>{if(!k[r.id])return;const{finished:x,notLogin:y,notFinished:C,completed:q}=k[r.id];let u="",m,z;return g?x?(u=q.buttonLabel,m=void 0):(u=C.buttonLabel,m=C.handleClick,z=C.link):(u=y.buttonLabel,m=y.handleClick),{...r,buttonLabel:u,handleClick:m,finished:x,link:z}}).filter(Boolean);return g?s.sort((r,x)=>r?.finished&&!x?.finished?1:!r?.finished&&x?.finished?-1:0):s},[k,t.list,g]),p=I.length>3;return(0,e.jsxs)(i.Container,{id:d,className:"bg-[#F5F5F7]",children:[(0,e.jsx)(i.Heading,{as:"h2",size:"4",html:t.title}),(0,e.jsxs)("div",{className:(0,c.classNames)("mt-[24px] p-[32px] md-l:p-[32px] md:p-[16px] relative overflow-hidden",h?"rounded-[8px]":"",!h&&"l:rounded-none"),style:{background:"linear-gradient(180deg, rgba(255, 241, 214, 0) 39.51%, #F4CA81 119.53%)"},children:[(0,e.jsx)("div",{className:"absolute inset-0 pointer-events-none -z-10",style:{background:"radial-gradient(ellipse 130% 205% at 45% -20%, #FFF6EA 0%, #FFFFFF 73%, #FFF1D6 100%)"}}),(0,e.jsxs)("div",{className:"flex items-center justify-between xl-xxl:h-[448px] l-xl:h-[336px] h-[560px] l:h-auto md:flex-col md:items-start l:h-auto l:mb-[16px] l:flex-col-reverse l:items-start",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-[8px] l:mt-[8px]",children:[(0,e.jsx)(i.Heading,{as:"h3",size:4,html:t?.subtitle,className:"text-[32px] font-bold text-[#080a0f] tracking-[-1.28px] leading-[1.2] xl:text-[24px]"}),(0,e.jsx)("div",{className:"flex items-center gap-[8px]",children:(0,e.jsx)("p",{className:"text-[48px] font-bold tracking-[-1.92px] leading-none bg-gradient-to-r from-[#2c7ed0] via-[#00a9e1] via-43% to-[#00db84] bg-clip-text text-transparent xl-xxl:text-[40px] l-xl:text-[32px] l:text-[24px]",dangerouslySetInnerHTML:{__html:t.equalCredits}})})]}),t.mainImage?.url&&(0,e.jsx)(i.Picture,{className:"h-full object-contain l:mx-auto md:h-auto md:w-full md-l:h-[302px]",imgClassName:"!h-full !object-contain",source:t.mainImage.url})]}),(0,e.jsxs)("div",{className:"relative mt-[24px]",children:[(0,e.jsxs)(A.motion.div,{className:(0,c.classNames)("grid grid-cols-3 gap-[16px] overflow-hidden md:grid-cols-1 md-l:grid-cols-2 min-md:!h-auto"),initial:{height:p?512:"auto"},animate:{height:l||!p?"auto":512},transition:{duration:.3},onAnimationComplete:()=>{if(!l&&p&&window.screen.width<768){const s=document.getElementById(d||"ankersolix-task");s&&s.scrollIntoView({behavior:"smooth",block:"end"})}},children:[I.map(s=>(0,e.jsxs)("div",{className:(0,c.classNames)("flex min-h-[241px] xl-xxl:min-h-[192px] l:min-h-[160px] l-xl:min-h-[170px] flex-col justify-between bg-white p-[32px] xl:p-[16px]",h?"rounded-[16px]":""),children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(i.Text,{as:"p",html:s.title,size:2,className:"text-pretty text-[24px] font-bold xxl:text-[20px]"}),(0,e.jsxs)("div",{className:"mt-[8px] l:mt-[4px] flex items-center",children:[(0,e.jsx)(i.Picture,{className:"size-[24px] xxl:size-[18px] [&_path]:size-full",source:"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/20250902-153351.png?v=1756798450"}),(0,e.jsx)(i.Text,{as:"p",html:s.credits,size:2,className:"ml-[4px] mt-[6px] text-[18px] xxl:text-[14px]"})]})]}),s.handleClick&&!(s.id===f.TaskType.UploadReceipt&&S)&&!(s.id===f.TaskType.Activate&&D.isActivateSuccess)&&!(s.id===f.TaskType.Subscribe&&w)?(0,e.jsx)(i.Button,{as:s.link?"a":"button",...s.link&&{href:s.link},...s.handleClick&&{onClick:s.handleClick},variant:"primary",size:"lg",className:"mt-[24px] w-fit bg-[#080a0f] text-white text-[16px] font-bold tracking-[-0.64px] leading-[1.2]",children:s.buttonLabel}):(0,e.jsx)(i.Button,{variant:"primary",size:"lg",className:"mt-[24px] w-fit bg-[#080a0f] text-white text-[16px] font-bold tracking-[-0.64px] leading-[1.2]",disabled:!0,children:s.buttonLabel})]},s.id)),!l&&p&&(0,e.jsx)("div",{className:"absolute inset-0 pointer-events-none min-md:hidden",style:{background:"linear-gradient(180deg, rgba(244, 202, 129, 0) 66.37%, #f4ca81 100%)"}})]}),p&&(0,e.jsx)(e.Fragment,{children:l?(0,e.jsx)("button",{className:"mx-auto mt-[12px] block w-fit min-md:hidden",onClick:()=>{o(!1)},children:(0,e.jsx)(b.ChevronUpIcon,{className:"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]"})}):(0,e.jsx)(e.Fragment,{children:(0,e.jsx)("div",{className:"absolute bottom-0 flex w-full translate-y-1/2 justify-center min-md:hidden",children:(0,e.jsx)("button",{className:"w-fit",onClick:()=>o(!l),children:(0,e.jsx)(b.ChevronDownIcon,{className:"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]"})})})})})]})]}),t.receipt&&(0,e.jsx)(T.CreditsUploadReceiptModal,{isOpen:j,onClose:()=>{N(!1)},copy:t.receipt,onSuccess:()=>{H(!0)}}),t.subscribe&&(0,e.jsx)(U.CreditsSubscribeModal,{copy:t.subscribe,onSuccess:()=>{E(!0),setTimeout(()=>{v(!1)},3e3)},isOpen:_,onClose:()=>{v(!1)}})]})};
|
|
2
|
+
//# sourceMappingURL=CreditsAnkersolixTask.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Button, Container, Heading, Picture, Text } from '@anker-in/headless-ui'\nimport { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline'\nimport { motion } from 'framer-motion'\nimport { useMemo, useState } from 'react'\n\nimport { TaskType, type CreditsAnkersolixTaskProps } from './type'\nimport { useActions } from '../creditsWaysToGetCredits/useActions'\nimport { useCreditsContext } from '../context/provider'\nimport { classNames as cn, useHeadlessContext } from '@anker-in/lib'\nimport { useRegistration } from '../../registration'\nimport { CreditsUploadReceiptModal } from '../modal/creditsUploadReceiptModal'\nimport { CreditsSubscribeModal } from '../modal/subscribeModal'\nimport { ROUNDED_BRANDS } from '../../../constants'\n\nexport const CreditsAnkersolixTask = ({ copy, classNames, id }: CreditsAnkersolixTaskProps & { id?: string }) => {\n const [showMore, setShowMore] = useState(false)\n const { profile } = useCreditsContext()\n const { authCodeActivate } = useRegistration()\n const { brand } = useHeadlessContext()\n const rounded = ROUNDED_BRANDS.includes(brand)\n const isLogin = !!profile\n\n const [isUploadReceiptModalOpen, setIsUploadReceiptModalOpen] = useState(false)\n const [isSubscribeModalOpen, setIsSubscribeModalOpen] = useState(false)\n const [isSubscribeSuccess, setIsSubscribeSuccess] = useState(false)\n const [isUploadReceiptSuccess, setIsUploadReceiptSuccess] = useState(false)\n\n const { actions } = useActions({\n copy,\n subscribe: {\n openSubscribePopup: () => setIsSubscribeModalOpen(true),\n isSuccess: isSubscribeSuccess,\n },\n uploadReceipt: {\n openUploadReceiptPopup: () => setIsUploadReceiptModalOpen(true),\n isSuccess: isUploadReceiptSuccess,\n },\n })\n const list = useMemo(() => {\n const list = copy.list\n .map(item => {\n if (!actions[item.id as keyof typeof actions]) {\n return undefined\n }\n const { finished, notLogin, notFinished, completed } = actions[item.id as keyof typeof actions]\n let buttonLabel = ''\n let handleClick = undefined\n let link = undefined\n if (!isLogin) {\n buttonLabel = notLogin.buttonLabel\n handleClick = notLogin.handleClick\n } else if (finished) {\n buttonLabel = completed.buttonLabel\n handleClick = undefined\n } else {\n buttonLabel = notFinished.buttonLabel\n handleClick = notFinished.handleClick\n link = (notFinished as { link: string }).link\n }\n return {\n ...item,\n buttonLabel,\n handleClick,\n finished,\n link,\n }\n })\n .filter(Boolean) as {\n title: string\n credits: string\n id: TaskType\n buttonLabel: string\n finished: boolean\n link: string\n handleClick: (() => void) | undefined\n }[]\n\n // \u767B\u5F55\u540E\uFF0C\u4FDD\u7559\u539F\u987A\u5E8F\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EFB\u52A1\u653E\u5728\u6700\u540E\n if (isLogin) {\n return list.sort((a, b) => {\n if (a?.finished && !b?.finished) {\n return 1 // a\u5DF2\u5B8C\u6210\uFF0Cb\u672A\u5B8C\u6210\uFF0Ca\u6392\u5728\u540E\u9762\n }\n if (!a?.finished && b?.finished) {\n return -1 // a\u672A\u5B8C\u6210\uFF0Cb\u5DF2\u5B8C\u6210\uFF0Ca\u6392\u5728\u524D\u9762\n }\n return 0 // \u90FD\u5DF2\u5B8C\u6210\u6216\u90FD\u672A\u5B8C\u6210\uFF0C\u4FDD\u6301\u539F\u987A\u5E8F\n })\n } else {\n return list\n }\n }, [actions, copy.list, isLogin])\n\n // \u53EA\u6709\u5927\u4E8E3\u4E2A\u4EFB\u52A1\u65F6\u624D\u663E\u793A\u8499\u5C42\n const shouldShowMask = list.length > 3\n\n return (\n <Container id={id} className=\"bg-[#F5F5F7]\">\n <Heading as=\"h2\" size=\"4\" html={copy.title} />\n <div\n className={cn(\n 'mt-[24px] p-[32px] md-l:p-[32px] md:p-[16px] relative overflow-hidden',\n rounded ? 'rounded-[8px]' : '',\n !rounded && 'l:rounded-none'\n )}\n style={{\n background: 'linear-gradient(180deg, rgba(255, 241, 214, 0) 39.51%, #F4CA81 119.53%)',\n }}\n >\n {/* \u5F84\u5411\u6E10\u53D8\u80CC\u666F\u5C42 - \u4F7F\u7528\u4F2A\u5143\u7D20\u6A21\u62DF */}\n <div\n className=\"absolute inset-0 pointer-events-none -z-10\"\n style={{\n background: 'radial-gradient(ellipse 130% 205% at 45% -20%, #FFF6EA 0%, #FFFFFF 73%, #FFF1D6 100%)',\n }}\n />\n {/* \u526F\u6807\u9898\u548C\u88C5\u9970\u56FE\u90E8\u5206 */}\n <div className=\"flex items-center justify-between xl-xxl:h-[448px] l-xl:h-[336px] h-[560px] l:h-auto md:flex-col md:items-start l:h-auto l:mb-[16px] l:flex-col-reverse l:items-start\">\n <div className=\"flex flex-col gap-[8px] l:mt-[8px]\">\n <Heading\n as=\"h3\"\n size={4}\n html={copy?.subtitle}\n className=\"text-[32px] font-bold text-[#080a0f] tracking-[-1.28px] leading-[1.2] xl:text-[24px]\"\n />\n <div className=\"flex items-center gap-[8px]\">\n <p\n className=\"text-[48px] font-bold tracking-[-1.92px] leading-none bg-gradient-to-r from-[#2c7ed0] via-[#00a9e1] via-43% to-[#00db84] bg-clip-text text-transparent xl-xxl:text-[40px] l-xl:text-[32px] l:text-[24px]\"\n dangerouslySetInnerHTML={{ __html: copy.equalCredits }}\n />\n </div>\n </div>\n {copy.mainImage?.url && (\n <Picture\n className=\"h-full object-contain l:mx-auto md:h-auto md:w-full md-l:h-[302px]\"\n imgClassName=\"!h-full !object-contain\"\n source={copy.mainImage.url}\n />\n )}\n </div>\n\n {/* \u5361\u7247\u5217\u8868 */}\n <div className=\"relative mt-[24px]\">\n <motion.div\n className={cn('grid grid-cols-3 gap-[16px] overflow-hidden md:grid-cols-1 md-l:grid-cols-2 min-md:!h-auto')}\n initial={{ height: shouldShowMask ? 512 : 'auto' }}\n animate={{ height: showMore || !shouldShowMask ? 'auto' : 512 }}\n transition={{ duration: 0.3 }}\n onAnimationComplete={() => {\n if (!showMore && shouldShowMask && window.screen.width < 768) {\n const section = document.getElementById(id || 'ankersolix-task')\n if (section) {\n section.scrollIntoView({ behavior: 'smooth', block: 'end' })\n }\n }\n }}\n >\n {list.map(item => (\n <div\n key={item.id}\n className={cn(\n 'flex min-h-[241px] xl-xxl:min-h-[192px] l:min-h-[160px] l-xl:min-h-[170px] flex-col justify-between bg-white p-[32px] xl:p-[16px]',\n rounded ? 'rounded-[16px]' : ''\n )}\n >\n <div>\n <Text\n as=\"p\"\n html={item.title}\n size={2}\n className=\"text-pretty text-[24px] font-bold xxl:text-[20px]\"\n />\n <div className=\"mt-[8px] l:mt-[4px] flex items-center\">\n <Picture\n className=\"size-[24px] xxl:size-[18px] [&_path]:size-full\"\n source=\"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/20250902-153351.png?v=1756798450\"\n />\n <Text\n as=\"p\"\n html={item.credits}\n size={2}\n className=\"ml-[4px] mt-[6px] text-[18px] xxl:text-[14px]\"\n />\n </div>\n </div>\n\n {item.handleClick &&\n !(item.id === TaskType.UploadReceipt && isUploadReceiptSuccess) &&\n !(item.id === TaskType.Activate && authCodeActivate.isActivateSuccess) &&\n !(item.id === TaskType.Subscribe && isSubscribeSuccess) ? (\n <Button\n as={item.link ? 'a' : 'button'}\n {...(item.link && { href: item.link })}\n {...(item.handleClick && { onClick: item.handleClick })}\n variant=\"primary\"\n size=\"lg\"\n className=\"mt-[24px] w-fit bg-[#080a0f] text-white text-[16px] font-bold tracking-[-0.64px] leading-[1.2]\"\n >\n {item.buttonLabel}\n </Button>\n ) : (\n <Button\n variant=\"primary\"\n size=\"lg\"\n className=\"mt-[24px] w-fit bg-[#080a0f] text-white text-[16px] font-bold tracking-[-0.64px] leading-[1.2]\"\n disabled\n >\n {item.buttonLabel}\n </Button>\n )}\n </div>\n ))}\n {!showMore && shouldShowMask && (\n <div\n className=\"absolute inset-0 pointer-events-none min-md:hidden\"\n style={{ background: 'linear-gradient(180deg, rgba(244, 202, 129, 0) 66.37%, #f4ca81 100%)' }}\n ></div>\n )}\n </motion.div>\n {shouldShowMask && (\n <>\n {showMore ? (\n <button\n className=\"mx-auto mt-[12px] block w-fit min-md:hidden\"\n onClick={() => {\n setShowMore(false)\n }}\n >\n <ChevronUpIcon className=\"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]\"></ChevronUpIcon>\n </button>\n ) : (\n <>\n <div className=\"absolute bottom-0 flex w-full translate-y-1/2 justify-center min-md:hidden\">\n <button className=\"w-fit\" onClick={() => setShowMore(!showMore)}>\n <ChevronDownIcon className=\"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]\"></ChevronDownIcon>\n </button>\n </div>\n </>\n )}\n </>\n )}\n </div>\n </div>\n {copy.receipt && (\n <CreditsUploadReceiptModal\n isOpen={isUploadReceiptModalOpen}\n onClose={() => {\n setIsUploadReceiptModalOpen(false)\n }}\n copy={copy.receipt}\n onSuccess={() => {\n setIsUploadReceiptSuccess(true)\n }}\n />\n )}\n {copy.subscribe && (\n <CreditsSubscribeModal\n copy={copy.subscribe}\n onSuccess={() => {\n setIsSubscribeSuccess(true)\n setTimeout(() => {\n setIsSubscribeModalOpen(false)\n }, 3000)\n }}\n isOpen={isSubscribeModalOpen}\n onClose={() => {\n setIsSubscribeModalOpen(false)\n }}\n />\n )}\n </Container>\n )\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2BAAAE,IAAA,eAAAC,EAAAH,GAkGM,IAAAI,EAAA,6BAlGNC,EAA0D,iCAC1DC,EAA+C,uCAC/CC,EAAuB,yBACvBC,EAAkC,iBAElCC,EAA0D,kBAC1DC,EAA2B,iDAC3BC,EAAkC,+BAClCC,EAAqD,yBACrDC,EAAgC,8BAChCC,EAA0C,8CAC1CC,EAAsC,mCACtCC,EAA+B,8BAExB,MAAMd,EAAwB,CAAC,CAAE,KAAAe,EAAM,WAAAC,EAAY,GAAAC,CAAG,IAAoD,CAC/G,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAS,EAAK,EACxC,CAAE,QAAAC,CAAQ,KAAI,qBAAkB,EAChC,CAAE,iBAAAC,CAAiB,KAAI,mBAAgB,EACvC,CAAE,MAAAC,CAAM,KAAI,sBAAmB,EAC/BC,EAAU,iBAAe,SAASD,CAAK,EACvCE,EAAU,CAAC,CAACJ,EAEZ,CAACK,EAA0BC,CAA2B,KAAI,YAAS,EAAK,EACxE,CAACC,EAAsBC,CAAuB,KAAI,YAAS,EAAK,EAChE,CAACC,EAAoBC,CAAqB,KAAI,YAAS,EAAK,EAC5D,CAACC,EAAwBC,CAAyB,KAAI,YAAS,EAAK,EAEpE,CAAE,QAAAC,CAAQ,KAAI,cAAW,CAC7B,KAAAlB,EACA,UAAW,CACT,mBAAoB,IAAMa,EAAwB,EAAI,EACtD,UAAWC,CACb,EACA,cAAe,CACb,uBAAwB,IAAMH,EAA4B,EAAI,EAC9D,UAAWK,CACb,CACF,CAAC,EACKG,KAAO,WAAQ,IAAM,CACzB,MAAMA,EAAOnB,EAAK,KACf,IAAIoB,GAAQ,CACX,GAAI,CAACF,EAAQE,EAAK,EAA0B,EAC1C,OAEF,KAAM,CAAE,SAAAC,EAAU,SAAAC,EAAU,YAAAC,EAAa,UAAAC,CAAU,EAAIN,EAAQE,EAAK,EAA0B,EAC9F,IAAIK,EAAc,GACdC,EACAC,EACJ,OAAKlB,EAGMY,GACTI,EAAcD,EAAU,YACxBE,EAAc,SAEdD,EAAcF,EAAY,YAC1BG,EAAcH,EAAY,YAC1BI,EAAQJ,EAAiC,OARzCE,EAAcH,EAAS,YACvBI,EAAcJ,EAAS,aASlB,CACL,GAAGF,EACH,YAAAK,EACA,YAAAC,EACA,SAAAL,EACA,KAAAM,CACF,CACF,CAAC,EACA,OAAO,OAAO,EAWjB,OAAIlB,EACKU,EAAK,KAAK,CAACS,EAAGC,IACfD,GAAG,UAAY,CAACC,GAAG,SACd,EAEL,CAACD,GAAG,UAAYC,GAAG,SACd,GAEF,CACR,EAEMV,CAEX,EAAG,CAACD,EAASlB,EAAK,KAAMS,CAAO,CAAC,EAG1BqB,EAAiBX,EAAK,OAAS,EAErC,SACE,QAAC,aAAU,GAAIjB,EAAI,UAAU,eAC3B,oBAAC,WAAQ,GAAG,KAAK,KAAK,IAAI,KAAMF,EAAK,MAAO,KAC5C,QAAC,OACC,aAAW,EAAA+B,YACT,wEACAvB,EAAU,gBAAkB,GAC5B,CAACA,GAAW,gBACd,EACA,MAAO,CACL,WAAY,yEACd,EAGA,oBAAC,OACC,UAAU,6CACV,MAAO,CACL,WAAY,uFACd,EACF,KAEA,QAAC,OAAI,UAAU,wKACb,qBAAC,OAAI,UAAU,qCACb,oBAAC,WACC,GAAG,KACH,KAAM,EACN,KAAMR,GAAM,SACZ,UAAU,uFACZ,KACA,OAAC,OAAI,UAAU,8BACb,mBAAC,KACC,UAAU,2MACV,wBAAyB,CAAE,OAAQA,EAAK,YAAa,EACvD,EACF,GACF,EACCA,EAAK,WAAW,QACf,OAAC,WACC,UAAU,qEACV,aAAa,0BACb,OAAQA,EAAK,UAAU,IACzB,GAEJ,KAGA,QAAC,OAAI,UAAU,qBACb,qBAAC,SAAO,IAAP,CACC,aAAW,EAAA+B,YAAG,4FAA4F,EAC1G,QAAS,CAAE,OAAQD,EAAiB,IAAM,MAAO,EACjD,QAAS,CAAE,OAAQ3B,GAAY,CAAC2B,EAAiB,OAAS,GAAI,EAC9D,WAAY,CAAE,SAAU,EAAI,EAC5B,oBAAqB,IAAM,CACzB,GAAI,CAAC3B,GAAY2B,GAAkB,OAAO,OAAO,MAAQ,IAAK,CAC5D,MAAME,EAAU,SAAS,eAAe9B,GAAM,iBAAiB,EAC3D8B,GACFA,EAAQ,eAAe,CAAE,SAAU,SAAU,MAAO,KAAM,CAAC,CAE/D,CACF,EAEC,UAAAb,EAAK,IAAIC,MACR,QAAC,OAEC,aAAW,EAAAW,YACT,oIACAvB,EAAU,iBAAmB,EAC/B,EAEA,qBAAC,OACC,oBAAC,QACC,GAAG,IACH,KAAMY,EAAK,MACX,KAAM,EACN,UAAU,oDACZ,KACA,QAAC,OAAI,UAAU,wCACb,oBAAC,WACC,UAAU,iDACV,OAAO,0FACT,KACA,OAAC,QACC,GAAG,IACH,KAAMA,EAAK,QACX,KAAM,EACN,UAAU,gDACZ,GACF,GACF,EAECA,EAAK,aACN,EAAEA,EAAK,KAAO,WAAS,eAAiBJ,IACxC,EAAEI,EAAK,KAAO,WAAS,UAAYd,EAAiB,oBACpD,EAAEc,EAAK,KAAO,WAAS,WAAaN,MAClC,OAAC,UACC,GAAIM,EAAK,KAAO,IAAM,SACrB,GAAIA,EAAK,MAAQ,CAAE,KAAMA,EAAK,IAAK,EACnC,GAAIA,EAAK,aAAe,CAAE,QAASA,EAAK,WAAY,EACrD,QAAQ,UACR,KAAK,KACL,UAAU,iGAET,SAAAA,EAAK,YACR,KAEA,OAAC,UACC,QAAQ,UACR,KAAK,KACL,UAAU,iGACV,SAAQ,GAEP,SAAAA,EAAK,YACR,IAjDGA,EAAK,EAmDZ,CACD,EACA,CAACjB,GAAY2B,MACZ,OAAC,OACC,UAAU,qDACV,MAAO,CAAE,WAAY,sEAAuE,EAC7F,GAEL,EACCA,MACC,mBACG,SAAA3B,KACC,OAAC,UACC,UAAU,8CACV,QAAS,IAAM,CACbC,EAAY,EAAK,CACnB,EAEA,mBAAC,iBAAc,UAAU,kDAAkD,EAC7E,KAEA,mBACE,mBAAC,OAAI,UAAU,6EACb,mBAAC,UAAO,UAAU,QAAQ,QAAS,IAAMA,EAAY,CAACD,CAAQ,EAC5D,mBAAC,mBAAgB,UAAU,kDAAkD,EAC/E,EACF,EACF,EAEJ,GAEJ,GACF,EACCH,EAAK,YACJ,OAAC,6BACC,OAAQU,EACR,QAAS,IAAM,CACbC,EAA4B,EAAK,CACnC,EACA,KAAMX,EAAK,QACX,UAAW,IAAM,CACfiB,EAA0B,EAAI,CAChC,EACF,EAEDjB,EAAK,cACJ,OAAC,yBACC,KAAMA,EAAK,UACX,UAAW,IAAM,CACfe,EAAsB,EAAI,EAC1B,WAAW,IAAM,CACfF,EAAwB,EAAK,CAC/B,EAAG,GAAI,CACT,EACA,OAAQD,EACR,QAAS,IAAM,CACbC,EAAwB,EAAK,CAC/B,EACF,GAEJ,CAEJ",
|
|
6
|
+
"names": ["CreditsAnkersolixTask_exports", "__export", "CreditsAnkersolixTask", "__toCommonJS", "import_jsx_runtime", "import_headless_ui", "import_outline", "import_framer_motion", "import_react", "import_type", "import_useActions", "import_provider", "import_lib", "import_registration", "import_creditsUploadReceiptModal", "import_subscribeModal", "import_constants", "copy", "classNames", "id", "showMore", "setShowMore", "profile", "authCodeActivate", "brand", "rounded", "isLogin", "isUploadReceiptModalOpen", "setIsUploadReceiptModalOpen", "isSubscribeModalOpen", "setIsSubscribeModalOpen", "isSubscribeSuccess", "setIsSubscribeSuccess", "isUploadReceiptSuccess", "setIsUploadReceiptSuccess", "actions", "list", "item", "finished", "notLogin", "notFinished", "completed", "buttonLabel", "handleClick", "link", "a", "b", "shouldShowMask", "cn", "section"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(r,o,p,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of c(o))!d.call(r,m)&&m!==p&&a(r,m,{get:()=>o[m],enumerable:!(x=b(o,m))||x.enumerable});return r},f=(r,o,p)=>(t(r,o,"default"),p&&t(p,o,"default"));var g=r=>t(a({},"__esModule",{value:!0}),r);var e={};module.exports=g(e);f(e,require("./type"),module.exports);f(e,require("./CreditsAnkersolixTask"),module.exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsAnkersolixTask/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './type'\nexport * from './CreditsAnkersolixTask'\n"],
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,kBAAd,gBACAE,EAAAF,EAAc,mCADd",
|
|
6
|
+
"names": ["creditsAnkersolixTask_exports", "__toCommonJS", "__reExport"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type BenefitItem, type CreditsWaysToGetCreditsCopy as CreditsAnkersolixTaskCopy, type CreditsWaysToGetCreditsProps as CreditsAnkersolixTaskProps, TaskType, } from '../creditsWaysToGetCredits/type';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var d=(s,e)=>{for(var r in e)o(s,r,{get:e[r],enumerable:!0})},T=(s,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of C(e))!a.call(s,t)&&t!==r&&o(s,t,{get:()=>e[t],enumerable:!(i=y(e,t))||i.enumerable});return s};var k=s=>T(o({},"__esModule",{value:!0}),s);var n={};d(n,{TaskType:()=>p.TaskType});module.exports=k(n);var p=require("../creditsWaysToGetCredits/type");
|
|
2
|
+
//# sourceMappingURL=type.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsAnkersolixTask/type.ts"],
|
|
4
|
+
"sourcesContent": ["// \u76F4\u63A5\u5F15\u7528\u65E7\u7EC4\u4EF6\u7684\u7C7B\u578B\nexport {\n type BenefitItem,\n type CreditsWaysToGetCreditsCopy as CreditsAnkersolixTaskCopy,\n type CreditsWaysToGetCreditsProps as CreditsAnkersolixTaskProps,\n TaskType,\n} from '../creditsWaysToGetCredits/type'\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0CAAAE,EAAAF,GACA,IAAAG,EAKO",
|
|
6
|
+
"names": ["type_exports", "__export", "__toCommonJS", "import_type"]
|
|
7
|
+
}
|
|
@@ -2,22 +2,23 @@ type Img = {
|
|
|
2
2
|
url: string;
|
|
3
3
|
alt: string;
|
|
4
4
|
};
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
5
|
+
export type CreditsBannerCopy = {
|
|
6
|
+
pcImg: Img;
|
|
7
|
+
laptopImg: Img;
|
|
8
|
+
mobileImg: Img;
|
|
9
|
+
joinNow: string;
|
|
10
|
+
loginIn: string;
|
|
11
|
+
login: {
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
unLogin: {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
20
18
|
};
|
|
21
19
|
};
|
|
22
|
-
export declare function CreditsBanner({ copy }:
|
|
20
|
+
export declare function CreditsBanner({ copy, id }: {
|
|
21
|
+
copy: CreditsBannerCopy;
|
|
22
|
+
id?: string;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var x=Object.create;var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var C=(t,n)=>{for(var e in n)o(t,e,{get:n[e],enumerable:!0})},m=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of I(n))!v.call(t,a)&&a!==e&&o(t,a,{get:()=>n[a],enumerable:!(r=f(n,a))||r.enumerable});return t};var N=(t,n,e)=>(e=t!=null?x(h(t)):{},m(n||!t||!t.__esModule?o(e,"default",{value:t,enumerable:!0}):e,t)),w=t=>m(o({},"__esModule",{value:!0}),t);var b={};C(b,{CreditsBanner:()=>y});module.exports=w(b);var i=require("react/jsx-runtime"),l=require("@anker-in/headless-ui"),p=N(require("classnames")),d=require("../context/provider");function y({copy:t,id:n}){const{profile:e,openSignInPopup:r,openSignUpPopup:a}=(0,d.useCreditsContext)(),s=e?Object.keys(e).length!==0:!1,c=e?.first_name?e?.first_name+" "+e?.last_name:e?.email?.split("@")[0],g=u=>{u==="primary"?a():r()};return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{id:n,className:" relative w-full",children:[(0,i.jsx)(l.Picture,{className:"aspect-h-[804] aspect-w-[1920] md:aspect-h-[660] md:aspect-w-[390] md-l:aspect-h-[660] md-l:aspect-w-[768]",source:`${t.pcImg?.url}, ${t.laptopImg?.url} 1024, ${t.mobileImg?.url} 768`,alt:t.pcImg?.alt,loading:"eager"}),s&&(0,i.jsx)("div",{className:"absolute inset-0 ",style:{background:"linear-gradient(180deg, rgba(245, 245, 247, 0) 70.31%, #F5F5F7 100%)"}}),(0,i.jsx)(l.Container,{className:"l:h-auto !absolute inset-0 mx-auto grid h-full",asChild:!0,children:(0,i.jsx)("div",{className:"grid grid-cols-12",children:(0,i.jsxs)("div",{className:"l:col-span-12 l:justify-start l:truncate l:pt-[64px] col-span-5 flex h-full flex-col justify-center text-[#1F2021]",children:[(0,i.jsx)(l.Heading,{as:"h1",size:"5",html:s?t.login.title?.replace("$name",c||""):t.unLogin.title}),(0,i.jsx)(l.Text,{size:"3",className:"l:mt-[4px] l-xxl:text-[14px] mt-[16px]",html:s?t.login.description:t.unLogin.description}),!s&&(0,i.jsxs)("div",{className:(0,p.default)("mt-[32px] grid w-fit grid-flow-col gap-[12px] l:mt-[24px]",s&&"hidden"),children:[(0,i.jsx)(l.Button,{variant:"secondary",size:"lg",onClick:()=>{g("primary")},children:t.joinNow}),(0,i.jsx)(l.Button,{variant:"primary",size:"lg",onClick:()=>{g("secondary")},children:t.loginIn})]})]})})})]})})}
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsBanner/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Button, Container, Heading, Picture, Text } from '@anker-in/headless-ui'\nimport classNames from 'classnames'\nimport { useCreditsContext } from '../context/provider'\n\ntype Img = {\n url: string\n alt: string\n}\nexport type CreditsBannerCopy = {\n pcImg: Img\n laptopImg: Img\n mobileImg: Img\n joinNow: string\n loginIn: string\n login: {\n title: string\n description: string\n }\n unLogin: {\n title: string\n description: string\n }\n}\n\nexport function CreditsBanner({ copy, id }: { copy: CreditsBannerCopy; id?: string }) {\n const { profile, openSignInPopup, openSignUpPopup } = useCreditsContext()\n const isLogin = profile ? Object.keys(profile).length !== 0 : false\n\n const displayName = profile?.first_name\n ? profile?.first_name + ' ' + profile?.last_name\n : profile?.email?.split('@')[0]\n\n const handleButtonClick = (buttonType: 'primary' | 'secondary') => {\n buttonType === 'primary' ? openSignUpPopup() : openSignInPopup()\n }\n\n return (\n <>\n <div id={id} className=\" relative w-full\">\n <Picture\n className=\"aspect-h-[804] aspect-w-[1920] md:aspect-h-[660] md:aspect-w-[390] md-l:aspect-h-[660] md-l:aspect-w-[768]\"\n source={`${copy.pcImg?.url}, ${copy.laptopImg?.url} 1024, ${copy.mobileImg?.url} 768`}\n alt={copy.pcImg?.alt}\n loading=\"eager\"\n ></Picture>\n {isLogin && (\n <div\n className=\"absolute inset-0 \"\n style={{\n background: 'linear-gradient(180deg, rgba(245, 245, 247, 0) 70.31%, #F5F5F7 100%)',\n }}\n ></div>\n )}\n\n <Container className=\"l:h-auto !absolute inset-0 mx-auto grid h-full\" asChild>\n <div className=\"grid grid-cols-12\">\n <div className=\"l:col-span-12 l:justify-start l:truncate l:pt-[64px] col-span-5 flex h-full flex-col justify-center text-[#1F2021]\">\n <Heading\n as=\"h1\"\n size=\"5\"\n html={isLogin ? copy.login.title?.replace('$name', displayName || '') : copy.unLogin.title}\n ></Heading>\n\n <Text\n size=\"3\"\n className=\"l:mt-[4px] l-xxl:text-[14px] mt-[16px]\"\n html={isLogin ? copy.login.description : copy.unLogin.description}\n ></Text>\n\n {!isLogin && (\n <div\n className={classNames(\n 'mt-[32px] grid w-fit grid-flow-col gap-[12px] l:mt-[24px]',\n isLogin && 'hidden'\n )}\n >\n <Button\n variant=\"secondary\"\n size=\"lg\"\n onClick={() => {\n handleButtonClick('primary')\n }}\n >\n {copy.joinNow}\n </Button>\n <Button\n variant=\"primary\"\n size=\"lg\"\n onClick={() => {\n handleButtonClick('secondary')\n }}\n >\n {copy.loginIn}\n </Button>\n </div>\n )}\n </div>\n </div>\n </Container>\n </div>\n </>\n )\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAqCI,IAAAI,EAAA,6BArCJC,EAA0D,iCAC1DC,EAAuB,yBACvBC,EAAkC,+BAsB3B,SAASL,EAAc,CAAE,KAAAM,EAAM,GAAAC,CAAG,EAA6C,CACpF,KAAM,CAAE,QAAAC,EAAS,gBAAAC,EAAiB,gBAAAC,CAAgB,KAAI,qBAAkB,EAClEC,EAAUH,EAAU,OAAO,KAAKA,CAAO,EAAE,SAAW,EAAI,GAExDI,EAAcJ,GAAS,WACzBA,GAAS,WAAa,IAAMA,GAAS,UACrCA,GAAS,OAAO,MAAM,GAAG,EAAE,CAAC,EAE1BK,EAAqBC,GAAwC,CACjEA,IAAe,UAAYJ,EAAgB,EAAID,EAAgB,CACjE,EAEA,SACE,mBACE,oBAAC,OAAI,GAAIF,EAAI,UAAU,mBACrB,oBAAC,WACC,UAAU,6GACV,OAAQ,GAAGD,EAAK,OAAO,GAAG,KAAKA,EAAK,WAAW,GAAG,UAAUA,EAAK,WAAW,GAAG,OAC/E,IAAKA,EAAK,OAAO,IACjB,QAAQ,QACT,EACAK,MACC,OAAC,OACC,UAAU,oBACV,MAAO,CACL,WAAY,sEACd,EACD,KAGH,OAAC,aAAU,UAAU,iDAAiD,QAAO,GAC3E,mBAAC,OAAI,UAAU,oBACb,oBAAC,OAAI,UAAU,qHACb,oBAAC,WACC,GAAG,KACH,KAAK,IACL,KAAMA,EAAUL,EAAK,MAAM,OAAO,QAAQ,QAASM,GAAe,EAAE,EAAIN,EAAK,QAAQ,MACtF,KAED,OAAC,QACC,KAAK,IACL,UAAU,yCACV,KAAMK,EAAUL,EAAK,MAAM,YAAcA,EAAK,QAAQ,YACvD,EAEA,CAACK,MACA,QAAC,OACC,aAAW,EAAAI,SACT,4DACAJ,GAAW,QACb,EAEA,oBAAC,UACC,QAAQ,YACR,KAAK,KACL,QAAS,IAAM,CACbE,EAAkB,SAAS,CAC7B,EAEC,SAAAP,EAAK,QACR,KACA,OAAC,UACC,QAAQ,UACR,KAAK,KACL,QAAS,IAAM,CACbO,EAAkB,WAAW,CAC/B,EAEC,SAAAP,EAAK,QACR,GACF,GAEJ,EACF,EACF,GACF,EACF,CAEJ",
|
|
6
|
+
"names": ["creditsBanner_exports", "__export", "CreditsBanner", "__toCommonJS", "import_jsx_runtime", "import_headless_ui", "import_classnames", "import_provider", "copy", "id", "profile", "openSignInPopup", "openSignUpPopup", "isLogin", "displayName", "handleButtonClick", "buttonType", "classNames"]
|
|
7
|
+
}
|
|
@@ -7,7 +7,7 @@ export interface BenefitItemCopy {
|
|
|
7
7
|
note?: string;
|
|
8
8
|
tag?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const BenefitItem: ({ item, handleClick, isNoteActive, index, }: {
|
|
10
|
+
declare const BenefitItem: ({ item, handleClick, isNoteActive, index, bigIcon, cardBgColor, cardBorderColor, }: {
|
|
11
11
|
item: BenefitItemCopy;
|
|
12
12
|
handleClick: ({ item, index }: {
|
|
13
13
|
item: BenefitItemCopy;
|
|
@@ -15,5 +15,8 @@ declare const BenefitItem: ({ item, handleClick, isNoteActive, index, }: {
|
|
|
15
15
|
}) => void;
|
|
16
16
|
isNoteActive: boolean;
|
|
17
17
|
index: number;
|
|
18
|
+
bigIcon?: boolean;
|
|
19
|
+
cardBgColor?: string;
|
|
20
|
+
cardBorderColor?: string;
|
|
18
21
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export default BenefitItem;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var F=Object.create;var r=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var k=(e,o)=>{for(var n in o)r(e,n,{get:o[n],enumerable:!0})},b=(e,o,n,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of h(o))!C.call(e,i)&&i!==n&&r(e,i,{get:()=>o[i],enumerable:!(a=N(o,i))||a.enumerable});return e};var y=(e,o,n)=>(n=e!=null?F(D(e)):{},b(o||!e||!e.__esModule?r(n,"default",{value:e,enumerable:!0}):n,e)),z=e=>b(r({},"__esModule",{value:!0}),e);var B={};k(B,{default:()=>w});module.exports=z(B);var t=require("react/jsx-runtime"),s=require("@anker-in/headless-ui"),l=require("@anker-in/lib"),f=y(require("./IconInfo")),u=require("../../../constants");const I=({item:e,handleClick:o,isNoteActive:n,index:a,bigIcon:i,cardBgColor:x,cardBorderColor:c})=>{const{brand:g}=(0,l.useHeadlessContext)(),m=u.ROUNDED_BRANDS.includes(g),v=i?"mb-[16px] size-[64px] xl-xxl:size-[54px] xl:size-[48px] md:absolute md:bottom-[16px] md:right-[16px] md:mb-0":"mb-[16px] size-[31px] md:absolute md:bottom-[16px] md:right-[16px] md:mb-0";console.log("cardBgColor in BenefitItem",x);const d={};return x?d.background=x:d.background="linear-gradient(119.61deg, #FAFAFA 38.58%, #FFFFFF 63.73%, #F9FCFF 89.37%)",c&&(d.borderColor=c),(0,t.jsx)("div",{className:(0,l.classNames)("relative flex-1 flex flex-col rounded-[16px] border border-white px-[24px] pb-[26px] pt-[24px] md:min-h-[180px] md:p-[16px]",!m&&"rounded-none"),style:d,children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(s.Picture,{className:v,alt:e.icon?.alt,source:e.icon?.url}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(s.Heading,{html:e.text,size:"2",className:"break-all md-l:line-clamp-3"}),e.note&&(0,t.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&p.preventDefault()},className:"relative mb-1 ml-[4px]",onClick:()=>o({item:e,index:a}),children:[(0,t.jsx)(f.default,{}),(0,t.jsx)("div",{className:(0,l.classNames)("absolute -bottom-[12px] left-[32px] z-10 w-[356px] -translate-x-full translate-y-full md:w-[276px]",n?"block":"hidden"),children:(0,t.jsxs)("div",{className:(0,l.classNames)("relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow",!m&&"rounded-none"),children:[(0,t.jsx)(s.Text,{as:"p",size:"2",html:e.note,className:"desktop:text-[18px]"}),(0,t.jsx)("div",{className:(0,l.classNames)("absolute -top-[10px] right-[9px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]",!m&&"rounded-none")})]})})]})]}),e.tag&&(0,t.jsx)(s.Text,{as:"div",html:e.tag,className:"mt-[2px] text-[16px] font-bold text-[#6D6D6F]"})]})})};var w=I;
|
|
2
|
+
//# sourceMappingURL=BenefitItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsBenefits/BenefitItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Heading, Picture, Text } from '@anker-in/headless-ui'\nimport { classNames as cn, useHeadlessContext } from '@anker-in/lib'\nimport IconInfo from './IconInfo'\nimport { ROUNDED_BRANDS } from '../../../constants'\n\nexport interface BenefitItemCopy {\n icon: {\n alt: string\n url: string\n }\n text: string\n note?: string\n tag?: string\n}\nconst BenefitItem = ({\n item,\n handleClick,\n isNoteActive,\n index,\n bigIcon,\n cardBgColor,\n cardBorderColor,\n}: {\n item: BenefitItemCopy\n handleClick: ({ item, index }: { item: BenefitItemCopy; index: number }) => void\n isNoteActive: boolean\n index: number\n bigIcon?: boolean\n cardBgColor?: string\n cardBorderColor?: string\n}) => {\n const { brand } = useHeadlessContext()\n const rounded = ROUNDED_BRANDS.includes(brand)\n\n // \u6839\u636E bigIcon \u8BBE\u7F6E\u4E0D\u540C\u5C4F\u5E55\u4E0B\u7684\u56FE\u6807\u5927\u5C0F\n // \u5C3A\u5BF8\uFF1A\u22651921px=64px, 1441-1920px=54px, \u22641440px=48px\n const iconSizeClass = bigIcon\n ? 'mb-[16px] size-[64px] xl-xxl:size-[54px] xl:size-[48px] md:absolute md:bottom-[16px] md:right-[16px] md:mb-0'\n : 'mb-[16px] size-[31px] md:absolute md:bottom-[16px] md:right-[16px] md:mb-0'\n\n console.log('cardBgColor in BenefitItem', cardBgColor)\n // \u80CC\u666F\u8272\u548C\u8FB9\u6846\u8272\u5904\u7406\n const cardStyle: React.CSSProperties = {}\n if (cardBgColor) {\n cardStyle.background = cardBgColor\n } else {\n cardStyle.background = 'linear-gradient(119.61deg, #FAFAFA 38.58%, #FFFFFF 63.73%, #F9FCFF 89.37%)'\n }\n if (cardBorderColor) {\n cardStyle.borderColor = cardBorderColor\n }\n\n return (\n <div\n className={cn(\n 'relative flex-1 flex flex-col rounded-[16px] border border-white px-[24px] pb-[26px] pt-[24px] md:min-h-[180px] md:p-[16px]',\n !rounded && 'rounded-none'\n )}\n style={cardStyle}\n >\n <div className=\"flex flex-col\">\n <Picture className={iconSizeClass} alt={item.icon?.alt} source={item.icon?.url} />\n <div className=\"flex items-center\">\n <Heading html={item.text} size=\"2\" className=\"break-all md-l:line-clamp-3\" />\n {item.note && (\n <div\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n }\n }}\n className=\"relative mb-1 ml-[4px]\"\n onClick={() => handleClick({ item, index })}\n >\n <IconInfo />\n <div\n className={cn(\n 'absolute -bottom-[12px] left-[32px] z-10 w-[356px] -translate-x-full translate-y-full md:w-[276px]',\n isNoteActive ? 'block' : 'hidden'\n )}\n >\n <div\n className={cn(\n 'relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow',\n !rounded && 'rounded-none'\n )}\n >\n <Text as=\"p\" size=\"2\" html={item.note} className=\"desktop:text-[18px]\" />\n <div\n className={cn(\n 'absolute -top-[10px] right-[9px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]',\n !rounded && 'rounded-none'\n )}\n />\n </div>\n </div>\n </div>\n )}\n </div>\n {item.tag && <Text as=\"div\" html={item.tag} className=\"mt-[2px] text-[16px] font-bold text-[#6D6D6F]\" />}\n </div>\n </div>\n )\n}\n\nexport default BenefitItem\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6DQ,IAAAI,EAAA,6BA7DRC,EAAuC,iCACvCC,EAAqD,yBACrDC,EAAqB,yBACrBC,EAA+B,8BAW/B,MAAMC,EAAc,CAAC,CACnB,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,MAAAC,EACA,QAAAC,EACA,YAAAC,EACA,gBAAAC,CACF,IAQM,CACJ,KAAM,CAAE,MAAAC,CAAM,KAAI,sBAAmB,EAC/BC,EAAU,iBAAe,SAASD,CAAK,EAIvCE,EAAgBL,EAClB,+GACA,6EAEJ,QAAQ,IAAI,6BAA8BC,CAAW,EAErD,MAAMK,EAAiC,CAAC,EACxC,OAAIL,EACFK,EAAU,WAAaL,EAEvBK,EAAU,WAAa,6EAErBJ,IACFI,EAAU,YAAcJ,MAIxB,OAAC,OACC,aAAW,EAAAK,YACT,8HACA,CAACH,GAAW,cACd,EACA,MAAOE,EAEP,oBAAC,OAAI,UAAU,gBACb,oBAAC,WAAQ,UAAWD,EAAe,IAAKT,EAAK,MAAM,IAAK,OAAQA,EAAK,MAAM,IAAK,KAChF,QAAC,OAAI,UAAU,oBACb,oBAAC,WAAQ,KAAMA,EAAK,KAAM,KAAK,IAAI,UAAU,8BAA8B,EAC1EA,EAAK,SACJ,QAAC,OACC,KAAK,SACL,SAAU,EACV,UAAWY,GAAK,EACVA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCA,EAAE,eAAe,CAErB,EACA,UAAU,yBACV,QAAS,IAAMX,EAAY,CAAE,KAAAD,EAAM,MAAAG,CAAM,CAAC,EAE1C,oBAAC,EAAAU,QAAA,EAAS,KACV,OAAC,OACC,aAAW,EAAAF,YACT,qGACAT,EAAe,QAAU,QAC3B,EAEA,oBAAC,OACC,aAAW,EAAAS,YACT,0FACA,CAACH,GAAW,cACd,EAEA,oBAAC,QAAK,GAAG,IAAI,KAAK,IAAI,KAAMR,EAAK,KAAM,UAAU,sBAAsB,KACvE,OAAC,OACC,aAAW,EAAAW,YACT,mHACA,CAACH,GAAW,cACd,EACF,GACF,EACF,GACF,GAEJ,EACCR,EAAK,QAAO,OAAC,QAAK,GAAG,MAAM,KAAMA,EAAK,IAAK,UAAU,gDAAgD,GACxG,EACF,CAEJ,EAEA,IAAOR,EAAQO",
|
|
6
|
+
"names": ["BenefitItem_exports", "__export", "BenefitItem_default", "__toCommonJS", "import_jsx_runtime", "import_headless_ui", "import_lib", "import_IconInfo", "import_constants", "BenefitItem", "item", "handleClick", "isNoteActive", "index", "bigIcon", "cardBgColor", "cardBorderColor", "brand", "rounded", "iconSizeClass", "cardStyle", "cn", "e", "IconInfo"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";var e=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var h=(l,C)=>{for(var t in C)e(l,t,{get:C[t],enumerable:!0})},r=(l,C,t,i)=>{if(C&&typeof C=="object"||typeof C=="function")for(let o of f(C))!g.call(l,o)&&o!==t&&e(l,o,{get:()=>C[o],enumerable:!(i=p(C,o))||i.enumerable});return l};var w=l=>r(e({},"__esModule",{value:!0}),l);var a={};h(a,{IconInfo:()=>n,default:()=>v});module.exports=w(a);var s=require("react/jsx-runtime");const n=()=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-[18px] cursor-pointer [&_svg]:size-full",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,s.jsx)("path",{d:"M9 1.125C11.1744 1.125 13.1441 2.00737 14.5684 3.43164C15.9926 4.85593 16.875 6.8256 16.875 9C16.875 11.1744 15.9926 13.1441 14.5684 14.5684C13.1441 15.9926 11.1744 16.875 9 16.875C6.8256 16.875 4.85593 15.9926 3.43164 14.5684C2.00737 13.1441 1.125 11.1744 1.125 9C1.125 6.8256 2.00738 4.85593 3.43164 3.43164C4.85593 2.00738 6.8256 1.125 9 1.125ZM9 2.625C7.23941 2.625 5.64668 3.33772 4.49219 4.49219C3.33772 5.64668 2.625 7.23941 2.625 9C2.625 10.7606 3.33772 12.3533 4.49219 13.5078C5.64668 14.6623 7.23941 15.375 9 15.375C10.7606 15.375 12.3533 14.6623 13.5078 13.5078C14.6623 12.3533 15.375 10.7606 15.375 9C15.375 7.23941 14.6623 5.64668 13.5078 4.49219C12.3533 3.33772 10.7606 2.625 9 2.625Z",fill:"#6D6D6F"}),(0,s.jsx)("path",{d:"M9 11.583C9.51777 11.583 9.9375 12.0027 9.9375 12.5205V12.5596C9.93718 13.0771 9.51757 13.4971 9 13.4971C8.48243 13.4971 8.06282 13.0771 8.0625 12.5596V12.5205C8.0625 12.0027 8.48223 11.583 9 11.583ZM8.99902 4.5C9.51671 4.49959 9.93696 4.91886 9.9375 5.43652L9.94043 9.37109C9.94084 9.88884 9.52165 10.3091 9.00391 10.3096C8.48616 10.31 8.06587 9.89079 8.06543 9.37305L8.0625 5.43848C8.06209 4.92079 8.48136 4.50054 8.99902 4.5Z",fill:"#6D6D6F"})]});var v=n;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=IconInfo.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/components/credits/
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsBenefits/IconInfo.tsx"],
|
|
4
4
|
"sourcesContent": ["export const IconInfo = () => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n className='size-[18px] cursor-pointer [&_svg]:size-full'\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='none'\n >\n <path\n d='M9 1.125C11.1744 1.125 13.1441 2.00737 14.5684 3.43164C15.9926 4.85593 16.875 6.8256 16.875 9C16.875 11.1744 15.9926 13.1441 14.5684 14.5684C13.1441 15.9926 11.1744 16.875 9 16.875C6.8256 16.875 4.85593 15.9926 3.43164 14.5684C2.00737 13.1441 1.125 11.1744 1.125 9C1.125 6.8256 2.00738 4.85593 3.43164 3.43164C4.85593 2.00738 6.8256 1.125 9 1.125ZM9 2.625C7.23941 2.625 5.64668 3.33772 4.49219 4.49219C3.33772 5.64668 2.625 7.23941 2.625 9C2.625 10.7606 3.33772 12.3533 4.49219 13.5078C5.64668 14.6623 7.23941 15.375 9 15.375C10.7606 15.375 12.3533 14.6623 13.5078 13.5078C14.6623 12.3533 15.375 10.7606 15.375 9C15.375 7.23941 14.6623 5.64668 13.5078 4.49219C12.3533 3.33772 10.7606 2.625 9 2.625Z'\n fill='#6D6D6F'\n />\n <path\n d='M9 11.583C9.51777 11.583 9.9375 12.0027 9.9375 12.5205V12.5596C9.93718 13.0771 9.51757 13.4971 9 13.4971C8.48243 13.4971 8.06282 13.0771 8.0625 12.5596V12.5205C8.0625 12.0027 8.48223 11.583 9 11.583ZM8.99902 4.5C9.51671 4.49959 9.93696 4.91886 9.9375 5.43652L9.94043 9.37109C9.94084 9.88884 9.52165 10.3091 9.00391 10.3096C8.48616 10.31 8.06587 9.89079 8.06543 9.37305L8.0625 5.43848C8.06209 4.92079 8.48136 4.50054 8.99902 4.5Z'\n fill='#6D6D6F'\n />\n </svg>\n )\n}\n\nexport default IconInfo\n"],
|
|
5
5
|
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAEI,IAAAK,EAAA,6BAFG,MAAMH,EAAW,OAEpB,QAAC,OACC,MAAM,6BACN,UAAU,+CACV,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OAEL,oBAAC,QACC,EAAE,6rBACF,KAAK,UACP,KACA,OAAC,QACC,EAAE,+aACF,KAAK,UACP,GACF,EAIJ,IAAOC,EAAQD",
|
|
6
|
-
"names": ["
|
|
6
|
+
"names": ["IconInfo_exports", "__export", "IconInfo", "IconInfo_default", "__toCommonJS", "import_jsx_runtime"]
|
|
7
7
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import 'swiper/css';
|
|
2
2
|
import 'swiper/css/grid';
|
|
3
3
|
import 'swiper/css/pagination';
|
|
4
|
-
import { type BenefitItemCopy } from './
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export {}
|
|
4
|
+
import { type BenefitItemCopy } from './BenefitItem';
|
|
5
|
+
export type CreditsBenefitsCopy = {
|
|
6
|
+
title: string;
|
|
7
|
+
benefits: BenefitItemCopy[];
|
|
8
|
+
bigIcon?: boolean;
|
|
9
|
+
cardBgColor?: string;
|
|
10
|
+
cardBorderColor?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const CreditsBenefits: ({ copy, id }: {
|
|
13
|
+
copy: CreditsBenefitsCopy;
|
|
14
|
+
id?: string;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";var B=Object.create;var a=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var N=(e,i)=>{for(var t in i)a(e,t,{get:i[t],enumerable:!0})},f=(e,i,t,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of x(i))!k.call(e,s)&&s!==t&&a(e,s,{get:()=>i[s],enumerable:!(n=w(i,s))||n.enumerable});return e};var h=(e,i,t)=>(t=e!=null?B(I(e)):{},f(i||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),_=e=>f(a({},"__esModule",{value:!0}),e);var z={};N(z,{CreditsBenefits:()=>S});module.exports=_(z);var o=require("react/jsx-runtime"),y=require("swiper/css"),D=require("swiper/css/grid"),G=require("swiper/css/pagination"),d=require("@anker-in/headless-ui"),b=require("react"),m=require("swiper/modules"),p=require("swiper/react"),g=h(require("./BenefitItem")),C=require("../context/provider"),c=require("@anker-in/lib");const S=({copy:e,id:i})=>{const[t,n]=(0,b.useState)(null),{profile:s,gtm:v}=(0,C.useCreditsContext)(),u=({item:l,index:r})=>{(0,c.gaTrack)({event:"ga4Event",event_name:"lp_button",member_active_status:s?.activated?"active":"not active",event_parameters:{page_group:v.pageGroup,position:e.title,button_name:l.text,info:""}}),t===r?n(null):(n(r),setTimeout(()=>{n(null)},5e3))};return(0,o.jsxs)(d.Container,{id:i,className:"!z-[30] bg-[#F5F5F7]",children:[(0,o.jsx)(d.Heading,{as:"h2",size:"4",html:e?.title}),(0,o.jsx)("div",{className:"mt-[24px] grid grid-cols-4 gap-[16px] l:hidden items-stretch",children:e.benefits.map((l,r)=>(0,o.jsx)(g.default,{item:l,handleClick:u,isNoteActive:t===r,index:r,bigIcon:e.bigIcon,cardBgColor:e.cardBgColor,cardBorderColor:e.cardBorderColor},r))}),(0,o.jsxs)("div",{className:"mt-[24px] hidden l:block",children:[(0,o.jsx)(p.Swiper,{spaceBetween:16,slidesPerView:2,slidesPerGroup:2,grid:{rows:2,fill:"row"},breakpoints:{768:{slidesPerView:3,slidesPerGroup:3}},wrapperClass:"!items-stretch",modules:[m.Grid,m.Pagination],pagination:{clickable:!0,el:"#benefits-pagination",renderBullet(l,r){return`<div class='${r} !flex justify-center size-[8px] rounded-full bg-[#D9D9D9] cursor-pointer items-center'>
|
|
2
|
+
</div>`}},children:e.benefits.map((l,r)=>(0,o.jsx)(p.SwiperSlide,{className:(0,c.classNames)("!h-auto !flex",t===r&&"!z-[100]"),children:(0,o.jsx)(g.default,{item:l,handleClick:u,isNoteActive:t===r,index:r,bigIcon:e.bigIcon,cardBgColor:e.cardBgColor,cardBorderColor:e.cardBorderColor})},r))}),(0,o.jsx)("div",{id:"benefits-pagination",className:`mx-auto mt-[12px] grid !w-fit grid-flow-col [&_.swiper-pagination-bullet-active>div]:!bg-[#151515]
|
|
3
|
+
[&_.swiper-pagination-bullet]:cursor-pointer [&_.swiper-pagination-bullet]:rounded-full`})]}),t&&(0,o.jsx)("div",{role:"button",tabIndex:0,className:"fixed inset-0 z-10",onClick:()=>n(null),onKeyDown:l=>l.key==="Escape"&&n(null)})]})};
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsBenefits/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import 'swiper/css'\nimport 'swiper/css/grid'\nimport 'swiper/css/pagination'\n\nimport { Container, Heading } from '@anker-in/headless-ui'\nimport { useState } from 'react'\nimport { Grid, Pagination } from 'swiper/modules'\nimport { Swiper, SwiperSlide } from 'swiper/react'\n\nimport BenefitItem, { type BenefitItemCopy } from './BenefitItem'\nimport { useCreditsContext } from '../context/provider'\nimport { gaTrack, classNames as cn } from '@anker-in/lib'\n\nexport type CreditsBenefitsCopy = {\n title: string\n benefits: BenefitItemCopy[]\n bigIcon?: boolean\n cardBgColor?: string\n cardBorderColor?: string\n}\n\nexport const CreditsBenefits = ({ copy, id }: { copy: CreditsBenefitsCopy; id?: string }) => {\n const [activeNoteIndex, setActiveNoteIndex] = useState<number | null>(null)\n const { profile, gtm } = useCreditsContext()\n const handleClick = ({ item, index }: { item: BenefitItemCopy; index: number }) => {\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: gtm.pageGroup,\n position: copy.title,\n button_name: item.text,\n info: '',\n },\n })\n if (activeNoteIndex === index) {\n setActiveNoteIndex(null)\n } else {\n setActiveNoteIndex(index)\n setTimeout(() => {\n setActiveNoteIndex(null)\n }, 5000)\n }\n }\n\n return (\n <Container id={id} className=\"!z-[30] bg-[#F5F5F7]\">\n <Heading as=\"h2\" size=\"4\" html={copy?.title} />\n <div className=\"mt-[24px] grid grid-cols-4 gap-[16px] l:hidden items-stretch\">\n {copy.benefits.map((item, index) => (\n <BenefitItem\n key={index}\n item={item}\n handleClick={handleClick}\n isNoteActive={activeNoteIndex === index}\n index={index}\n bigIcon={copy.bigIcon}\n cardBgColor={copy.cardBgColor}\n cardBorderColor={copy.cardBorderColor}\n />\n ))}\n </div>\n <div className=\"mt-[24px] hidden l:block\">\n <Swiper\n spaceBetween={16}\n slidesPerView={2}\n slidesPerGroup={2}\n grid={{\n rows: 2,\n fill: 'row',\n }}\n breakpoints={{\n 768: {\n slidesPerView: 3,\n slidesPerGroup: 3,\n },\n }}\n wrapperClass=\"!items-stretch\"\n modules={[Grid, Pagination]}\n pagination={{\n clickable: true,\n el: '#benefits-pagination',\n renderBullet(index, className) {\n return `<div class='${className} !flex justify-center size-[8px] rounded-full bg-[#D9D9D9] cursor-pointer items-center'>\n </div>`\n },\n }}\n >\n {copy.benefits.map((item, index) => (\n <SwiperSlide key={index} className={cn('!h-auto !flex', activeNoteIndex === index && '!z-[100]')}>\n <BenefitItem\n item={item}\n handleClick={handleClick}\n isNoteActive={activeNoteIndex === index}\n index={index}\n bigIcon={copy.bigIcon}\n cardBgColor={copy.cardBgColor}\n cardBorderColor={copy.cardBorderColor}\n />\n </SwiperSlide>\n ))}\n </Swiper>\n <div\n id=\"benefits-pagination\"\n className=\"mx-auto mt-[12px] grid !w-fit grid-flow-col [&_.swiper-pagination-bullet-active>div]:!bg-[#151515] \n [&_.swiper-pagination-bullet]:cursor-pointer [&_.swiper-pagination-bullet]:rounded-full\"\n ></div>\n </div>\n\n {activeNoteIndex && (\n <div\n role=\"button\"\n tabIndex={0}\n className=\"fixed inset-0 z-10\"\n onClick={() => setActiveNoteIndex(null)}\n onKeyDown={e => e.key === 'Escape' && setActiveNoteIndex(null)}\n />\n )}\n </Container>\n )\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAgDM,IAAAI,EAAA,6BAhDNC,EAAO,sBACPC,EAAO,2BACPC,EAAO,iCAEPC,EAAmC,iCACnCC,EAAyB,iBACzBC,EAAiC,0BACjCD,EAAoC,wBAEpCE,EAAkD,4BAClDC,EAAkC,+BAClCC,EAA0C,yBAUnC,MAAMX,EAAkB,CAAC,CAAE,KAAAY,EAAM,GAAAC,CAAG,IAAkD,CAC3F,KAAM,CAACC,EAAiBC,CAAkB,KAAI,YAAwB,IAAI,EACpE,CAAE,QAAAC,EAAS,IAAAC,CAAI,KAAI,qBAAkB,EACrCC,EAAc,CAAC,CAAE,KAAAC,EAAM,MAAAC,CAAM,IAAgD,IACjF,WAAQ,CACN,MAAO,WACP,WAAY,YACZ,qBAAsBJ,GAAS,UAAY,SAAW,aACtD,iBAAkB,CAChB,WAAYC,EAAI,UAChB,SAAUL,EAAK,MACf,YAAaO,EAAK,KAClB,KAAM,EACR,CACF,CAAC,EACGL,IAAoBM,EACtBL,EAAmB,IAAI,GAEvBA,EAAmBK,CAAK,EACxB,WAAW,IAAM,CACfL,EAAmB,IAAI,CACzB,EAAG,GAAI,EAEX,EAEA,SACE,QAAC,aAAU,GAAIF,EAAI,UAAU,uBAC3B,oBAAC,WAAQ,GAAG,KAAK,KAAK,IAAI,KAAMD,GAAM,MAAO,KAC7C,OAAC,OAAI,UAAU,+DACZ,SAAAA,EAAK,SAAS,IAAI,CAACO,EAAMC,OACxB,OAAC,EAAAC,QAAA,CAEC,KAAMF,EACN,YAAaD,EACb,aAAcJ,IAAoBM,EAClC,MAAOA,EACP,QAASR,EAAK,QACd,YAAaA,EAAK,YAClB,gBAAiBA,EAAK,iBAPjBQ,CAQP,CACD,EACH,KACA,QAAC,OAAI,UAAU,2BACb,oBAAC,UACC,aAAc,GACd,cAAe,EACf,eAAgB,EAChB,KAAM,CACJ,KAAM,EACN,KAAM,KACR,EACA,YAAa,CACX,IAAK,CACH,cAAe,EACf,eAAgB,CAClB,CACF,EACA,aAAa,iBACb,QAAS,CAAC,OAAM,YAAU,EAC1B,WAAY,CACV,UAAW,GACX,GAAI,uBACJ,aAAaA,EAAOE,EAAW,CAC7B,MAAO,eAAeA,CAAS;AAAA,qBAEjC,CACF,EAEC,SAAAV,EAAK,SAAS,IAAI,CAACO,EAAMC,OACxB,OAAC,eAAwB,aAAW,EAAAG,YAAG,gBAAiBT,IAAoBM,GAAS,UAAU,EAC7F,mBAAC,EAAAC,QAAA,CACC,KAAMF,EACN,YAAaD,EACb,aAAcJ,IAAoBM,EAClC,MAAOA,EACP,QAASR,EAAK,QACd,YAAaA,EAAK,YAClB,gBAAiBA,EAAK,gBACxB,GATgBQ,CAUlB,CACD,EACH,KACA,OAAC,OACC,GAAG,sBACH,UAAU;AAAA,mGAEX,GACH,EAECN,MACC,OAAC,OACC,KAAK,SACL,SAAU,EACV,UAAU,qBACV,QAAS,IAAMC,EAAmB,IAAI,EACtC,UAAWS,GAAKA,EAAE,MAAQ,UAAYT,EAAmB,IAAI,EAC/D,GAEJ,CAEJ",
|
|
6
|
+
"names": ["creditsBenefits_exports", "__export", "CreditsBenefits", "__toCommonJS", "import_jsx_runtime", "import_css", "import_grid", "import_pagination", "import_headless_ui", "import_react", "import_modules", "import_BenefitItem", "import_provider", "import_lib", "copy", "id", "activeNoteIndex", "setActiveNoteIndex", "profile", "gtm", "handleClick", "item", "index", "BenefitItem", "className", "cn", "e"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var D=Object.create;var l=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var B=(e,t)=>{for(var s in t)l(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of L(t))!_.call(e,r)&&r!==s&&l(e,r,{get:()=>t[r],enumerable:!(m=F(t,r))||m.enumerable});return e};var f=(e,t,s)=>(s=e!=null?D(S(e)):{},g(t||!e||!e.__esModule?l(s,"default",{value:e,enumerable:!0}):s,e)),H=e=>g(l({},"__esModule",{value:!0}),e);var P={};B(P,{CreditsCash:()=>M});module.exports=H(P);var n=require("react/jsx-runtime"),c=require("@anker-in/headless-ui"),p=require("react"),x=f(require("./RedeemableItem")),b=f(require("../context/hooks/useRedeemableList")),h=f(require("../modal/rulesModal")),y=require("@anker-in/lib"),v=require("@anker-in/lib"),N=require("../context/provider");const M=({copy:e,id:t})=>{const[s,m]=(0,p.useState)(),{redeemableList:r}=(0,b.default)(),{pageCommon:I}=(0,N.useCreditsContext)(),R=[],{data:u}=(0,y.useProductsByHandles)({handles:e?.list?.map(i=>i.products?.[0]?.handle)||[],metafieldIdentifiers:{variant:R}}),k=(0,p.useMemo)(()=>u?.map(i=>{const o=e.list.find(d=>d.products?.[0]?.handle===i.handle),a=r.find(d=>d.id?.toString()===o?.redeemId?.toString()),C=i.variants?.find(d=>d.sku===o?.products?.[0]?.sku)||i.variants?.[0];return!a||!C?null:{product:i,productVariant:C,alpcData:{id:a?.id,consumeCredits:a?.consume_credits,remainingInventory:a?.remaining_inventory,isLimited:a?.is_limited,consumeType:a?.consume_type,title:a?.name,desc:a?.note},config:o}}).filter(Boolean),[u,e.list,r]);return(0,n.jsxs)(c.Container,{id:t,className:(0,v.classNames)("bg-[#F5F5F5]"),children:[(0,n.jsx)(c.Heading,{as:"h2",size:"4",html:e.title}),(0,n.jsx)("div",{className:"relative mt-[24px] grid grid-cols-4 gap-[16px] l:gap-[12px] md:grid-cols-2 md-xl:grid-cols-3",children:k?.map((i,o)=>(0,n.jsx)(x.default,{copy:e,itemData:i,setRules:m,currencyCode:u?.[0]?.price.currencyCode||"USD"},o))}),s&&(0,n.jsx)(h.default,{overlayClassName:"md:px-[16px] md:items-center",className:"md:h-fit md:rounded-b-[16px]",isOpen:s.length>0,onClose:()=>m([]),titleClassName:"border-b-transparent h-[56px]",rules:s,scrollClassName:"md:mt-[8px] md:mb-[24px] md:pt-0",title:I?.ruleLabel,ruleClassName:"text-[#1d1d1f] font-bold"})]})};
|
|
2
|
+
//# sourceMappingURL=CreditsCash.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsCash/CreditsCash.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Container, Heading, Text } from '@anker-in/headless-ui'\nimport { useMemo, useState } from 'react'\n\nimport RedeemableItem from './RedeemableItem'\nimport useRedeemableList from '../context/hooks/useRedeemableList'\nimport RulesModal from '../modal/rulesModal'\nimport { useProductsByHandles } from '@anker-in/lib'\nimport { CreditsCashCopy, RedeemItem } from './type'\nimport { Product, classNames as cn } from '@anker-in/lib'\nimport { useCreditsContext } from '../context/provider'\nimport { numberFormat } from '../context/utils'\n\nexport const CreditsCash = ({ copy, id }: { copy: CreditsCashCopy; id?: string }) => {\n const [rules, setRules] = useState<string | string[]>()\n const { redeemableList } = useRedeemableList()\n const { pageCommon } = useCreditsContext()\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 return (\n <Container id={id} className={cn('bg-[#F5F5F5]')}>\n <Heading as=\"h2\" size=\"4\" html={copy.title} />\n\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 currencyCode={productByHandles?.[0]?.price.currencyCode || 'USD'}\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={pageCommon?.ruleLabel}\n ruleClassName=\"text-[#1d1d1f] font-bold\"\n />\n )}\n </Container>\n )\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAqDI,IAAAI,EAAA,6BArDJC,EAAyC,iCACzCC,EAAkC,iBAElCC,EAA2B,+BAC3BC,EAA8B,iDAC9BC,EAAuB,kCACvBC,EAAqC,yBAErCA,EAA0C,yBAC1CC,EAAkC,+BAG3B,MAAMT,EAAc,CAAC,CAAE,KAAAU,EAAM,GAAAC,CAAG,IAA8C,CACnF,KAAM,CAACC,EAAOC,CAAQ,KAAI,YAA4B,EAChD,CAAE,eAAAC,CAAe,KAAI,EAAAC,SAAkB,EACvC,CAAE,WAAAC,CAAW,KAAI,qBAAkB,EAEnCC,EAAqC,CAAC,EAEtC,CAAE,KAAMC,CAAiB,KAAI,wBAAqB,CACtD,QAASR,GAAM,MAAM,IAAIS,GAAQA,EAAK,WAAW,CAAC,GAAG,MAAM,GAAK,CAAC,EACjE,qBAAsB,CACpB,QAASF,CACX,CACF,CAAC,EAEKG,KAAO,WAAQ,IACZF,GACH,IAAKG,GAAqB,CAC1B,MAAMC,EAASZ,EAAK,KAAK,KAAKS,GAAQA,EAAK,WAAW,CAAC,GAAG,SAAWE,EAAQ,MAAM,EAC7EE,EAAWT,EAAe,KAAKK,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,EAAkBR,EAAK,KAAMI,CAAc,CAAC,EAEhD,SACE,QAAC,aAAU,GAAIH,EAAI,aAAW,EAAAe,YAAG,cAAc,EAC7C,oBAAC,WAAQ,GAAG,KAAK,KAAK,IAAI,KAAMhB,EAAK,MAAO,KAE5C,OAAC,OAAI,UAAU,+FACZ,SAAAU,GAAM,IAAI,CAACD,EAAMQ,OAChB,OAAC,EAAAC,QAAA,CAEC,KAAMlB,EACN,SAAUS,EACV,SAAUN,EACV,aAAcK,IAAmB,CAAC,GAAG,MAAM,cAAgB,OAJtDS,CAKP,CACD,EACH,EAECf,MACC,OAAC,EAAAiB,QAAA,CACC,iBAAiB,+BACjB,UAAU,+BACV,OAAQjB,EAAM,OAAS,EACvB,QAAS,IAAMC,EAAS,CAAC,CAAC,EAC1B,eAAe,gCACf,MAAOD,EACP,gBAAgB,mCAChB,MAAOI,GAAY,UACnB,cAAc,2BAChB,GAEJ,CAEJ",
|
|
6
|
+
"names": ["CreditsCash_exports", "__export", "CreditsCash", "__toCommonJS", "import_jsx_runtime", "import_headless_ui", "import_react", "import_RedeemableItem", "import_useRedeemableList", "import_rulesModal", "import_lib", "import_provider", "copy", "id", "rules", "setRules", "redeemableList", "useRedeemableList", "pageCommon", "variantMetafieldIdentifiers", "productByHandles", "item", "list", "product", "config", "alpcData", "productVariant", "variant", "cn", "index", "RedeemableItem", "RulesModal"]
|
|
7
|
+
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { CreditsCashCopy, RedeemItem } from './type';
|
|
2
|
-
declare function RedeemableItem({ copy, itemData, setRules, className,
|
|
2
|
+
declare function RedeemableItem({ copy, itemData, setRules, className, }: {
|
|
3
3
|
copy: CreditsCashCopy;
|
|
4
4
|
itemData: RedeemItem;
|
|
5
5
|
className?: string;
|
|
6
6
|
setRules: (rules: string[]) => void;
|
|
7
7
|
currencyCode: string;
|
|
8
|
-
authCodeActivate: {
|
|
9
|
-
openAuthCodePopup: Function;
|
|
10
|
-
isSuccess: boolean;
|
|
11
|
-
setOnSuccess: (arg: Function) => void;
|
|
12
|
-
isSendingActivateEmail: boolean;
|
|
13
|
-
};
|
|
14
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
9
|
export default RedeemableItem;
|