@anker-in/campaign-ui 0.2.0 → 0.2.2-beta.1
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/index.js +1 -1
- package/dist/cjs/components/chat/index.js.map +3 -3
- 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/useAlpcFetch.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useAlpcFetch.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.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useRedeemAndBuy.js.map +2 -2
- 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/useSubscribed.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscribed.js.map +3 -3
- 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/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 +1 -1
- package/dist/cjs/components/credits/creditsBanner/index.js.map +3 -3
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.d.ts +4 -1
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.js +2 -2
- package/dist/cjs/components/credits/creditsBenefits/benefitItem.js.map +4 -4
- package/dist/cjs/components/credits/creditsBenefits/iconInfo.js +1 -1
- package/dist/cjs/components/credits/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 +3 -3
- package/dist/cjs/components/credits/creditsBenefits/index.js.map +3 -3
- 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 -5
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.js +1 -1
- package/dist/cjs/components/credits/creditsCash/RedeemableItem.js.map +3 -3
- package/dist/cjs/components/credits/creditsCash/index.d.ts +2 -11
- package/dist/cjs/components/credits/creditsCash/index.js +1 -1
- package/dist/cjs/components/credits/creditsCash/index.js.map +4 -4
- package/dist/cjs/components/credits/creditsCash/type.d.ts +1 -3
- package/dist/cjs/components/credits/creditsCash/type.js +1 -1
- package/dist/cjs/components/credits/creditsCash/type.js.map +1 -1
- package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js +1 -1
- package/dist/cjs/components/credits/creditsFaq/faqItem/FaqItem.js.map +3 -3
- package/dist/cjs/components/credits/creditsFaq/index.d.ts +4 -3
- package/dist/cjs/components/credits/creditsFaq/index.js +1 -1
- package/dist/cjs/components/credits/creditsFaq/index.js.map +3 -3
- package/dist/cjs/components/credits/creditsInfoCard/index.d.ts +10 -15
- package/dist/cjs/components/credits/creditsInfoCard/index.js +1 -1
- package/dist/cjs/components/credits/creditsInfoCard/index.js.map +3 -3
- 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/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 +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/CountrySelect.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/StateSelect.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/AddressForm/index.js.map +3 -3
- 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 +1 -3
- package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/NonProductValue.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Error.js.map +2 -2
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js.map +3 -3
- package/dist/cjs/components/credits/creditsRedeemList/index.d.ts +2 -12
- package/dist/cjs/components/credits/creditsRedeemList/index.js +1 -1
- package/dist/cjs/components/credits/creditsRedeemList/index.js.map +4 -4
- package/dist/cjs/components/credits/creditsRedeemList/type.d.ts +2 -15
- package/dist/cjs/components/credits/creditsRedeemList/type.js.map +1 -1
- 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 +1 -1
- package/dist/cjs/components/credits/creditsWaysToGetCredits/index.js.map +4 -4
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.d.ts +5 -15
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js +1 -1
- package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js.map +2 -2
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.d.ts +11 -2
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js +1 -1
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js.map +3 -3
- 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.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/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 +23 -4
- 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 +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/registration/authCodeActivate/Message.js +1 -1
- package/dist/cjs/components/registration/authCodeActivate/Message.js.map +2 -2
- package/dist/cjs/components/registration/authCodeActivate/index.js +1 -1
- package/dist/cjs/components/registration/authCodeActivate/index.js.map +3 -3
- package/dist/cjs/components/registration/authCodeActivate/type.d.ts +1 -2
- package/dist/cjs/components/registration/authCodeActivate/type.js +1 -1
- package/dist/cjs/components/registration/authCodeActivate/type.js.map +1 -1
- 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 +1 -0
- package/dist/cjs/components/registration/index.js +1 -1
- package/dist/cjs/components/registration/index.js.map +2 -2
- package/dist/cjs/components/registration/modalContainer.d.ts +1 -2
- package/dist/cjs/components/registration/modalContainer.js +1 -1
- package/dist/cjs/components/registration/modalContainer.js.map +3 -3
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- 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/hooks/useActivities.js +1 -1
- package/dist/esm/components/credits/context/hooks/useActivities.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/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.js +1 -1
- package/dist/esm/components/credits/context/hooks/useRedeemAndBuy.js.map +2 -2
- 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/useSubscribed.js +1 -1
- package/dist/esm/components/credits/context/hooks/useSubscribed.js.map +3 -3
- 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/memberPriceTypes.js.map +7 -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/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 -5
- 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 -11
- 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 +1 -3
- 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/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/creditsMemberPrice/type.js +1 -0
- package/dist/esm/components/credits/creditsMemberPrice/type.js.map +7 -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/creditsNavigation/type.js +1 -0
- package/dist/esm/components/credits/creditsNavigation/type.js.map +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 +1 -3
- package/dist/esm/components/credits/creditsRedeemList/NonProductValue.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/NonProductValue.js.map +3 -3
- 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.js +1 -1
- package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +3 -3
- 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 -12
- 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 -15
- 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.js +1 -1
- package/dist/esm/components/credits/modal/MyRewardsModal.js.map +3 -3
- 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/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 +23 -4
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/registration/authCodeActivate/Message.js +1 -1
- package/dist/esm/components/registration/authCodeActivate/Message.js.map +2 -2
- package/dist/esm/components/registration/authCodeActivate/index.js +1 -1
- package/dist/esm/components/registration/authCodeActivate/index.js.map +3 -3
- package/dist/esm/components/registration/authCodeActivate/type.d.ts +1 -2
- 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 +1 -0
- package/dist/esm/components/registration/index.js +1 -1
- package/dist/esm/components/registration/index.js.map +2 -2
- package/dist/esm/components/registration/modalContainer.d.ts +1 -2
- package/dist/esm/components/registration/modalContainer.js +1 -1
- package/dist/esm/components/registration/modalContainer.js.map +3 -3
- package/dist/esm/index.d.ts +2 -1
- 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/dist/index.js +40660 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +40648 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +24 -22
- package/src/components/chat/index.tsx +1 -1
- package/src/components/credits/context/hooks/useActivities.ts +3 -2
- package/src/components/credits/context/hooks/useAlpcFetch.ts +8 -4
- package/src/components/credits/context/hooks/useFunctionMemberPrice.ts +33 -0
- package/src/components/credits/context/hooks/useMyRewards.ts +3 -2
- package/src/components/credits/context/hooks/useRedeemAndBuy.ts +0 -2
- package/src/components/credits/context/hooks/useRedeemCoupon.ts +4 -1
- package/src/components/credits/context/hooks/useRedeemProduct.ts +4 -1
- package/src/components/credits/context/hooks/useRedeemableList.ts +3 -3
- package/src/components/credits/context/hooks/useSubscribed.ts +1 -2
- 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/creditsAnkersolixTask/CreditsAnkersolixTask.tsx +270 -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 +15 -17
- package/src/components/credits/creditsBenefits/BenefitItem.tsx +107 -0
- package/src/components/credits/creditsBenefits/index.tsx +17 -12
- package/src/components/credits/creditsCash/{index.tsx → CreditsCash.tsx} +11 -27
- package/src/components/credits/creditsCash/RedeemableItem.tsx +43 -21
- package/src/components/credits/creditsCash/index.ts +2 -0
- package/src/components/credits/creditsCash/type.ts +1 -3
- package/src/components/credits/creditsFaq/faqItem/FaqItem.tsx +12 -12
- package/src/components/credits/creditsFaq/index.tsx +7 -5
- package/src/components/credits/creditsInfoCard/index.tsx +39 -34
- package/src/components/credits/creditsMemberPrice/CreditsMemberPrice.tsx +389 -0
- package/src/components/credits/creditsMemberPrice/MemberPriceItem.tsx +158 -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 +7 -3
- package/src/components/credits/creditsRedeemList/AddressForm/StateSelect.tsx +5 -1
- package/src/components/credits/creditsRedeemList/AddressForm/index.tsx +5 -4
- package/src/components/credits/creditsRedeemList/{index.tsx → CreditsRedeemList.tsx} +30 -29
- package/src/components/credits/creditsRedeemList/NonProductValue.tsx +4 -3
- package/src/components/credits/creditsRedeemList/RedeemCouponModal.tsx +6 -6
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Address.tsx +14 -11
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Error.tsx +1 -1
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Init.tsx +4 -2
- package/src/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.tsx +3 -1
- package/src/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.tsx +9 -5
- package/src/components/credits/creditsRedeemList/RedeemProductModal/Success.tsx +4 -1
- package/src/components/credits/creditsRedeemList/RedeemProductModal/index.tsx +2 -2
- package/src/components/credits/creditsRedeemList/RedeemableItem.tsx +11 -7
- 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} +65 -16
- package/src/components/credits/creditsWaysToGetCredits/index.ts +2 -0
- package/src/components/credits/creditsWaysToGetCredits/type.ts +5 -15
- package/src/components/credits/creditsWaysToGetCredits/useActions.ts +22 -8
- package/src/components/credits/modal/MyRewardsModal.tsx +10 -2
- package/src/components/credits/modal/activitiesModal.tsx +8 -3
- package/src/components/credits/modal/creditsUploadReceiptModal.tsx +9 -1
- package/src/components/credits/modal/modalContainer.tsx +5 -1
- package/src/components/credits/modal/rulesModal.tsx +1 -1
- package/src/components/credits/modal/subscribeModal.tsx +201 -0
- package/src/components/credits/modal/tip.tsx +10 -1
- package/src/components/credits/type.ts +23 -4
- package/src/components/index.ts +2 -2
- 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 +114 -0
- package/src/index.ts +2 -1
- package/src/templates/Credits.tsx +165 -0
- package/src/templates/index.ts +1 -0
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.d.ts +0 -1
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js +0 -2
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js.map +0 -7
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.d.ts +0 -9
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +0 -2
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +0 -7
- package/dist/cjs/helpers/fetchResponse.d.ts +0 -14
- package/dist/cjs/helpers/fetchResponse.js +0 -2
- package/dist/cjs/helpers/fetchResponse.js.map +0 -7
- package/dist/cjs/helpers/fetcher.d.ts +0 -2
- package/dist/cjs/helpers/fetcher.js +0 -2
- package/dist/cjs/helpers/fetcher.js.map +0 -7
- package/dist/cjs/helpers/index.d.ts +0 -2
- package/dist/cjs/helpers/index.js +0 -2
- package/dist/cjs/helpers/index.js.map +0 -7
- package/dist/cjs/helpers/track.d.ts +0 -19
- package/dist/cjs/helpers/track.js +0 -2
- package/dist/cjs/helpers/track.js.map +0 -7
- package/dist/cjs/helpers/utils.d.ts +0 -3
- package/dist/cjs/helpers/utils.js +0 -2
- package/dist/cjs/helpers/utils.js.map +0 -7
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.d.ts +0 -1
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js +0 -2
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js.map +0 -7
- package/dist/esm/components/credits/context/hooks/useSubscriptions.d.ts +0 -9
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js +0 -2
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js.map +0 -7
- package/dist/esm/helpers/fetchResponse.d.ts +0 -14
- package/dist/esm/helpers/fetchResponse.js +0 -2
- package/dist/esm/helpers/fetchResponse.js.map +0 -7
- package/dist/esm/helpers/fetcher.d.ts +0 -2
- package/dist/esm/helpers/fetcher.js +0 -2
- package/dist/esm/helpers/fetcher.js.map +0 -7
- package/dist/esm/helpers/index.d.ts +0 -2
- package/dist/esm/helpers/index.js +0 -2
- package/dist/esm/helpers/index.js.map +0 -7
- package/dist/esm/helpers/track.d.ts +0 -19
- package/dist/esm/helpers/track.js +0 -2
- package/dist/esm/helpers/track.js.map +0 -7
- package/dist/esm/helpers/utils.d.ts +0 -3
- package/dist/esm/helpers/utils.js +0 -2
- package/dist/esm/helpers/utils.js.map +0 -7
- package/src/components/credits/context/hooks/useSendEmailValidation.ts +0 -20
- package/src/components/credits/context/hooks/useSubscriptions.ts +0 -29
- package/src/components/credits/creditsBenefits/benefitItem.tsx +0 -73
- 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 -73
- package/src/helpers/utils.ts +0 -8
- /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/memberPriceTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import { FunctionDiscountType, RoundSelected } from './memberPriceConst'\n\n// \u4EF7\u683C\u7ED3\u5C3E\u914D\u7F6E\nexport type PriceEndingConf = {\n apply_price_ending: boolean\n one_decimal_place: string\n two_decimal_place: string\n round_selected: RoundSelected\n}\n\n// \u6298\u6263\u914D\u7F6E\nexport type DiscountConfig = {\n discount_type: FunctionDiscountType\n discount_value: number\n price_ending_conf?: PriceEndingConf\n}\n\n// \u4F1A\u5458\u4EF7\u914D\u7F6E\u7C7B\u578B\nexport type FunctionMemberPriceConfig = {\n rule_id: string\n result_detail: {\n member_discounts?: {\n user_identity: number // \u7528\u6237\u8EAB\u4EFD\uFF1A1-\u666E\u901A\u4F1A\u5458\uFF0C2-\u9AD8\u7EA7\u4F1A\u5458\u7B49\n main_products: {\n all_store_variant: boolean\n variants: {\n variant_id: string\n sku: string\n handle: string\n }[]\n }\n discount_conf: DiscountConfig\n }[]\n }\n discount_combinations: {\n other_product_discounts: boolean\n }\n}\n\n// \u4F1A\u5458\u4EF7\u8BA1\u7B97\u7ED3\u679C\nexport type FunctionMemberPriceResult = {\n hasMemberPrice: boolean\n useCoupon: boolean\n originalPrice: number\n originalPriceWithCurrency: string\n salePrice: number\n salePriceWithCurrency: string\n salePriceWithoutCoupon: number\n salePriceWithoutCouponWithCurrency: string\n savePrice: number\n savePriceWithCurrency: string\n savePriceWithoutCoupon: number\n savePriceWithoutCouponWithCurrency: string\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["memberPriceTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import type { DTC_TASK_TYPE } from './const';
|
|
3
3
|
import type { CreditInfoResponse } from './response';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
removeProfile: () => void;
|
|
8
|
-
taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
|
|
9
|
-
openSignInPopup: () => void;
|
|
10
|
-
openSignUpPopup: () => void;
|
|
11
|
-
creditInfo?: CreditInfoResponse;
|
|
12
|
-
customer?: any;
|
|
13
|
-
customerLoading: boolean;
|
|
14
|
-
fetchCreditInfo: (user_id: string) => void;
|
|
15
|
-
gtm: {
|
|
16
|
-
pageGroup: string;
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
export declare function CreditsProvider({ children, profile, removeProfile, isLoadingProfile, openSignInPopup, openSignUpPopup, taskIdToTypeMapping, creditInfo, customer, customerLoading, fetchCreditInfo, gtm, }: {
|
|
20
|
-
children: React.ReactNode;
|
|
21
|
-
profile: any;
|
|
22
|
-
removeProfile: () => void;
|
|
23
|
-
isLoadingProfile: boolean;
|
|
24
|
-
openSignInPopup: () => void;
|
|
25
|
-
openSignUpPopup: () => void;
|
|
26
|
-
taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
|
|
27
|
-
creditInfo?: CreditInfoResponse;
|
|
28
|
-
customer: any;
|
|
29
|
-
fetchCreditInfo: (user_id: string) => void;
|
|
30
|
-
customerLoading: boolean;
|
|
31
|
-
gtm: {
|
|
32
|
-
pageGroup: string;
|
|
33
|
-
};
|
|
34
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export declare function useCreditsContext(): {
|
|
4
|
+
import { CreditsPageCommon } from '../type';
|
|
5
|
+
import { FunctionMemberPriceConfig } from './memberPriceTypes';
|
|
6
|
+
type Context = {
|
|
36
7
|
profile: any;
|
|
37
8
|
isLoadingProfile: boolean;
|
|
38
9
|
removeProfile: () => void;
|
|
@@ -46,4 +17,11 @@ export declare function useCreditsContext(): {
|
|
|
46
17
|
gtm: {
|
|
47
18
|
pageGroup: string;
|
|
48
19
|
};
|
|
20
|
+
pageCommon: CreditsPageCommon;
|
|
21
|
+
memberPriceDiscount?: FunctionMemberPriceConfig[];
|
|
22
|
+
alpcBrand?: string;
|
|
49
23
|
};
|
|
24
|
+
export declare const CreditsContext: import("react").Context<Context>;
|
|
25
|
+
export declare function CreditsProvider({ children, profile, removeProfile, isLoadingProfile, openSignInPopup, openSignUpPopup, taskIdToTypeMapping, creditInfo, customer, customerLoading, fetchCreditInfo, gtm, pageCommon, memberPriceDiscount, alpcBrand, }: PropsWithChildren<Context>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function useCreditsContext(): Context;
|
|
27
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var h=(e,o)=>{for(var n in o)p(e,n,{get:o[n],enumerable:!0})},b=(e,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of I(o))!T.call(e,r)&&r!==n&&p(e,r,{get:()=>o[r],enumerable:!(t=v(o,r))||t.enumerable});return e};var y=e=>b(p({},"__esModule",{value:!0}),e);var D={};h(D,{CreditsContext:()=>d,CreditsProvider:()=>S,useCreditsContext:()=>_});module.exports=y(D);var s=require("react/jsx-runtime"),i=require("react");const d=(0,i.createContext)({profile:null,isLoadingProfile:!1,taskIdToTypeMapping:{},removeProfile:()=>{},openSignInPopup:()=>{},openSignUpPopup:()=>{},creditInfo:void 0,customerLoading:!1,fetchCreditInfo:e=>{},gtm:{pageGroup:""},pageCommon:{},memberPriceDiscount:void 0,alpcBrand:void 0});function S({children:e,profile:o,removeProfile:n,isLoadingProfile:t,openSignInPopup:r,openSignUpPopup:m,taskIdToTypeMapping:C,creditInfo:f,customer:u,customerLoading:a,fetchCreditInfo:g,gtm:c,pageCommon:P,memberPriceDiscount:l,alpcBrand:x}){return(0,s.jsx)(d.Provider,{value:{profile:o,isLoadingProfile:t,removeProfile:n,openSignInPopup:r,openSignUpPopup:m,taskIdToTypeMapping:C,creditInfo:f,fetchCreditInfo:g,customer:u,customerLoading:a,gtm:c,pageCommon:P,memberPriceDiscount:l,alpcBrand:x},children:e})}function _(){const e=(0,i.useContext)(d);if(!e)throw new Error("useCreditsContext must be used within a CreditsProvider");return e}
|
|
2
2
|
//# sourceMappingURL=provider.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/credits/context/provider.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,oBAAAC,EAAA,sBAAAC,IAAA,eAAAC,EAAAL,
|
|
6
|
-
"names": ["provider_exports", "__export", "CreditsContext", "CreditsProvider", "useCreditsContext", "__toCommonJS", "import_jsx_runtime", "import_react", "user_id", "children", "profile", "removeProfile", "isLoadingProfile", "openSignInPopup", "openSignUpPopup", "taskIdToTypeMapping", "creditInfo", "customer", "customerLoading", "fetchCreditInfo", "gtm"]
|
|
4
|
+
"sourcesContent": ["import { createContext, PropsWithChildren, useContext } from 'react'\nimport type { DTC_TASK_TYPE } from './const'\nimport type { CreditInfoResponse } from './response'\nimport { CreditsPageCommon } from '../type'\nimport { FunctionMemberPriceConfig } from './memberPriceTypes'\n\ntype Context = {\n profile: any\n isLoadingProfile: boolean\n removeProfile: () => void\n taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>\n openSignInPopup: () => void\n openSignUpPopup: () => void\n creditInfo?: CreditInfoResponse\n customer?: any\n customerLoading: boolean\n fetchCreditInfo: (user_id: string) => void\n gtm: {\n pageGroup: string\n }\n pageCommon: CreditsPageCommon\n memberPriceDiscount?: FunctionMemberPriceConfig[]\n alpcBrand?: string\n}\n\nexport const CreditsContext = createContext<Context>({\n profile: null,\n isLoadingProfile: false,\n taskIdToTypeMapping: {},\n removeProfile: () => {},\n openSignInPopup: () => {},\n openSignUpPopup: () => {},\n creditInfo: undefined,\n customerLoading: false,\n fetchCreditInfo: (user_id: string) => {},\n gtm: {\n pageGroup: '',\n },\n pageCommon: {},\n memberPriceDiscount: undefined,\n alpcBrand: undefined,\n})\n\nexport function CreditsProvider({\n children,\n profile,\n removeProfile,\n isLoadingProfile,\n openSignInPopup,\n openSignUpPopup,\n taskIdToTypeMapping,\n creditInfo,\n customer,\n customerLoading,\n fetchCreditInfo,\n gtm,\n pageCommon,\n memberPriceDiscount,\n alpcBrand,\n}: PropsWithChildren<Context>) {\n return (\n <CreditsContext.Provider\n value={{\n profile,\n isLoadingProfile,\n removeProfile,\n openSignInPopup,\n openSignUpPopup,\n taskIdToTypeMapping,\n creditInfo,\n fetchCreditInfo,\n customer,\n customerLoading,\n gtm,\n pageCommon,\n memberPriceDiscount,\n alpcBrand,\n }}\n >\n {children}\n </CreditsContext.Provider>\n )\n}\n\nexport function useCreditsContext() {\n const context = useContext(CreditsContext)\n if (!context) {\n throw new Error('useCreditsContext must be used within a CreditsProvider')\n }\n return context\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,oBAAAC,EAAA,sBAAAC,IAAA,eAAAC,EAAAL,GA6DI,IAAAM,EAAA,6BA7DJC,EAA6D,iBAyBtD,MAAML,KAAiB,iBAAuB,CACnD,QAAS,KACT,iBAAkB,GAClB,oBAAqB,CAAC,EACtB,cAAe,IAAM,CAAC,EACtB,gBAAiB,IAAM,CAAC,EACxB,gBAAiB,IAAM,CAAC,EACxB,WAAY,OACZ,gBAAiB,GACjB,gBAAkBM,GAAoB,CAAC,EACvC,IAAK,CACH,UAAW,EACb,EACA,WAAY,CAAC,EACb,oBAAqB,OACrB,UAAW,MACb,CAAC,EAEM,SAASL,EAAgB,CAC9B,SAAAM,EACA,QAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,oBAAAC,EACA,WAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,IAAAC,EACA,WAAAC,EACA,oBAAAC,EACA,UAAAC,CACF,EAA+B,CAC7B,SACE,OAACrB,EAAe,SAAf,CACC,MAAO,CACL,QAAAQ,EACA,iBAAAE,EACA,cAAAD,EACA,gBAAAE,EACA,gBAAAC,EACA,oBAAAC,EACA,WAAAC,EACA,gBAAAG,EACA,SAAAF,EACA,gBAAAC,EACA,IAAAE,EACA,WAAAC,EACA,oBAAAC,EACA,UAAAC,CACF,EAEC,SAAAd,EACH,CAEJ,CAEO,SAASL,GAAoB,CAClC,MAAMoB,KAAU,cAAWtB,CAAc,EACzC,GAAI,CAACsB,EACH,MAAM,IAAI,MAAM,yDAAyD,EAE3E,OAAOA,CACT",
|
|
6
|
+
"names": ["provider_exports", "__export", "CreditsContext", "CreditsProvider", "useCreditsContext", "__toCommonJS", "import_jsx_runtime", "import_react", "user_id", "children", "profile", "removeProfile", "isLoadingProfile", "openSignInPopup", "openSignUpPopup", "taskIdToTypeMapping", "creditInfo", "customer", "customerLoading", "fetchCreditInfo", "gtm", "pageCommon", "memberPriceDiscount", "alpcBrand", "context"]
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function atobID(id: string): string | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},u=(t,e,r,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!i.call(t,n)&&n!==r&&s(t,n,{get:()=>e[n],enumerable:!(p=o(e,n))||p.enumerable});return t};var c=t=>u(s({},"__esModule",{value:!0}),t);var a={};l(a,{atobID:()=>g});module.exports=c(a);function g(t){return t&&typeof t=="string"&&t.includes("/")?t.split("/").pop()?.split("?")?.shift():t}
|
|
2
|
+
//# sourceMappingURL=atobID.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/credits/context/utils/atobID.ts"],
|
|
4
|
+
"sourcesContent": ["// \u4ECE Shopify GraphQL ID \u4E2D\u63D0\u53D6\u6570\u5B57 ID\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,IAAA,eAAAC,EAAAH,GACO,SAASE,EAAOE,EAAY,CACjC,OAAIA,GAAM,OAAOA,GAAO,UAAYA,EAAG,SAAS,GAAG,EAC1CA,EAAG,MAAM,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,GAAG,MAAM,EAEvCA,CAEX",
|
|
6
|
+
"names": ["atobID_exports", "__export", "atobID", "__toCommonJS", "id"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.create;var u=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var k=(e,n)=>{for(var c in n)u(e,c,{get:n[c],enumerable:!0})},s=(e,n,c,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of m(n))!f.call(e,o)&&o!==c&&u(e,o,{get:()=>n[o],enumerable:!(a=_(n,o))||a.enumerable});return e};var w=(e,n,c)=>(c=e!=null?p(b(e)):{},s(n||!e||!e.__esModule?u(c,"default",{value:e,enumerable:!0}):c,e)),D=e=>s(u({},"__esModule",{value:!0}),e);var R={};k(R,{functionDiscountCalculate:()=>g});module.exports=D(R);var i=require("../memberPriceConst"),r=w(require("decimal.js"));const g=({config:e,price:n})=>{const{apply_price_ending:c,one_decimal_place:a,two_decimal_place:o,round_selected:d}=e.price_ending_conf||{};let t=new r.default(n);switch(e.discount_type){case i.FunctionDiscountType.Percentage:t=t.mul(100-e.discount_value).div(100);break;case i.FunctionDiscountType.FixedAmount:t=t.sub(e.discount_value);break;case i.FunctionDiscountType.FixedPrice:t=new r.default(e.discount_value);break;default:break}if(c){switch(d){case i.RoundSelected.RoundHighest:t=t.ceil();break;case i.RoundSelected.RoundLowest:t=t.floor();break;case i.RoundSelected.RoundNearest:t=t.round();break;default:t=new r.default(t.toFixed(2,r.default.ROUND_DOWN));break}const l=t.toString().split(".");t=new r.default(l[0]+"."+a+o)}return t.toNumber()};
|
|
2
|
+
//# sourceMappingURL=functionDiscountCalculate.js.map
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var F=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var J=(t,n)=>{for(var r in n)F(t,r,{get:n[r],enumerable:!0})},K=(t,n,r,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of V(n))!G.call(t,a)&&a!==r&&F(t,a,{get:()=>n[a],enumerable:!(l=q(n,a))||l.enumerable});return t};var Q=t=>K(F({},"__esModule",{value:!0}),t);var X={};J(X,{CreditsAnkersolixTask:()=>W});module.exports=Q(X);var e=require("react/jsx-runtime"),i=require("@anker-in/headless-ui"),b=require("@heroicons/react/24/outline"),A=require("framer-motion"),o=require("react"),f=require("./type"),M=require("../creditsWaysToGetCredits/useActions"),R=require("../context/provider"),d=require("@anker-in/lib"),L=require("../../registration"),T=require("../modal/creditsUploadReceiptModal"),U=require("../modal/subscribeModal");const W=({copy:t,classNames:n,id:r})=>{const[l,a]=(0,o.useState)(!1),{profile:O}=(0,R.useCreditsContext)(),{authCodeActivate:B}=(0,L.useRegistration)(),{brand:D}=(0,d.useHeadlessContext)(),g=d.ROUNDED_BRANDS.includes(D),h=!!O,[P,N]=(0,o.useState)(!1),[_,v]=(0,o.useState)(!1),[w,E]=(0,o.useState)(!1),[S,H]=(0,o.useState)(!1),{actions:k}=(0,M.useActions)({copy:t,subscribe:{openSubscribePopup:()=>v(!0),isSuccess:w},uploadReceipt:{openUploadReceiptPopup:()=>N(!0),isSuccess:S}}),I=(0,o.useMemo)(()=>{const s=t.list.map(c=>{if(!k[c.id])return;const{finished:m,notLogin:y,notFinished:C,completed:j}=k[c.id];let x="",u,z;return h?m?(x=j.buttonLabel,u=void 0):(x=C.buttonLabel,u=C.handleClick,z=C.link):(x=y.buttonLabel,u=y.handleClick),{...c,buttonLabel:x,handleClick:u,finished:m,link:z}}).filter(Boolean);return h?s.sort((c,m)=>c?.finished&&!m?.finished?1:!c?.finished&&m?.finished?-1:0):s},[k,t.list,h]),p=I.length>3;return(0,e.jsxs)(i.Container,{id:r,className:"[&>div]:l:!px-0 bg-[#F5F5F7]",children:[(0,e.jsx)(i.Heading,{as:"h2",size:"4",html:t.title,className:"md:px-[16px]"}),(0,e.jsxs)("div",{className:(0,d.classNames)("mt-[24px] p-[32px] md-l:p-[32px] md:p-[16px] relative overflow-hidden",g?"rounded-[8px]":"",!g&&"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 h-[560px] md: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]",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:"w-full max-w-[50%] md:max-w-full md:mt-[24px] l:max-w-full l:mt-[24px]",source:t.mainImage.url})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)(A.motion.div,{className:(0,d.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(r||"ankersolix-task");s&&s.scrollIntoView({behavior:"smooth",block:"end"})}},children:[I.map(s=>(0,e.jsxs)("div",{className:(0,d.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] md:p-[16px] l:p-[24px]",""),children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(i.Heading,{as:"h4",html:s.title,size:2,className:"text-[24px] font-bold text-[#080a0f] tracking-[-0.96px] leading-[1.2] text-pretty md:text-[18px] l:text-[20px]"}),(0,e.jsxs)("div",{className:"mt-[8px] flex items-center gap-[4px]",children:[(0,e.jsx)(i.Picture,{className:"size-[24px] [&_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:"text-[18px] font-bold text-[#080a0f] tracking-[-0.36px] leading-[1.4] md:text-[16px]"})]})]}),s.handleClick&&!(s.id===f.TaskType.UploadReceipt&&S)&&!(s.id===f.TaskType.Activate&&B.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:()=>{a(!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:()=>a(!l),children:(0,e.jsx)(b.ChevronDownIcon,{className:"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]"})})})})})]})]}),t.receipt&&(0,e.jsx)(T.CreditsUploadReceiptModal,{isOpen:P,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, ROUNDED_BRANDS } from '@anker-in/lib'\nimport { useRegistration } from '../../registration'\nimport { CreditsUploadReceiptModal } from '../modal/creditsUploadReceiptModal'\nimport { CreditsSubscribeModal } from '../modal/subscribeModal'\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=\"[&>div]:l:!px-0 bg-[#F5F5F7]\">\n <Heading as=\"h2\" size=\"4\" html={copy.title} className='md:px-[16px]'/>\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 h-[560px] md: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]\">\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 className=\"w-full max-w-[50%] md:max-w-full md:mt-[24px] l:max-w-full l:mt-[24px]\" source={copy.mainImage.url} />\n )}\n </div>\n\n {/* \u5361\u7247\u5217\u8868 */}\n <div className=\"relative\">\n <motion.div\n className={cn(\n 'grid grid-cols-3 gap-[16px] overflow-hidden md:grid-cols-1 md-l:grid-cols-2 min-md:!h-auto'\n )}\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] md:p-[16px] l:p-[24px]',\n rounded ? '' : ''\n )}\n >\n <div>\n <Heading\n as=\"h4\"\n html={item.title}\n size={2}\n className=\"text-[24px] font-bold text-[#080a0f] tracking-[-0.96px] leading-[1.2] text-pretty md:text-[18px] l:text-[20px]\"\n />\n <div className=\"mt-[8px] flex items-center gap-[4px]\">\n <Picture\n className=\"size-[24px] [&_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=\"text-[18px] font-bold text-[#080a0f] tracking-[-0.36px] leading-[1.4] md:text-[16px]\"\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,GAiGM,IAAAI,EAAA,6BAjGNC,EAA0D,iCAC1DC,EAA+C,uCAC/CC,EAAuB,yBACvBC,EAAkC,iBAElCC,EAA0D,kBAC1DC,EAA2B,iDAC3BC,EAAkC,+BAClCC,EAAqE,yBACrEC,EAAgC,8BAChCC,EAA0C,8CAC1CC,EAAsC,mCAE/B,MAAMb,EAAwB,CAAC,CAAE,KAAAc,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,+BAC3B,oBAAC,WAAQ,GAAG,KAAK,KAAK,IAAI,KAAMF,EAAK,MAAO,UAAU,eAAc,KACpE,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,yIACb,qBAAC,OAAI,UAAU,0BACb,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,WAAQ,UAAU,yEAAyE,OAAQA,EAAK,UAAU,IAAK,GAE5H,KAGA,QAAC,OAAI,UAAU,WACb,qBAAC,SAAO,IAAP,CACC,aAAW,EAAA+B,YACT,4FACF,EACA,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,+IACU,EACZ,EAEA,qBAAC,OACC,oBAAC,WACC,GAAG,KACH,KAAMX,EAAK,MACX,KAAM,EACN,UAAU,iHACZ,KACA,QAAC,OAAI,UAAU,uCACb,oBAAC,WACC,UAAU,iCACV,OAAO,0FACT,KACA,OAAC,QACC,GAAG,IACH,KAAMA,EAAK,QACX,KAAM,EACN,UAAU,uFACZ,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", "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 {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
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
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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}\
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["creditsBanner_exports", "__export", "CreditsBanner", "__toCommonJS", "import_jsx_runtime", "import_headless_ui", "import_classnames", "import_provider", "copy", "profile", "openSignInPopup", "openSignUpPopup", "isLogin", "displayName", "handleButtonClick", "buttonType", "classNames"]
|
|
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,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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
"use strict";var v=Object.create;var r=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var C=(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 l of N(o))!D.call(e,l)&&l!==n&&r(e,l,{get:()=>o[l],enumerable:!(a=F(o,l))||a.enumerable});return e};var k=(e,o,n)=>(n=e!=null?v(h(e)):{},b(o||!e||!e.__esModule?r(n,"default",{value:e,enumerable:!0}):n,e)),y=e=>b(r({},"__esModule",{value:!0}),e);var w={};C(w,{default:()=>I});module.exports=y(w);var t=require("react/jsx-runtime"),s=require("@anker-in/headless-ui"),i=require("@anker-in/lib"),f=k(require("./IconInfo"));const z=({item:e,handleClick:o,isNoteActive:n,index:a,bigIcon:l,cardBgColor:x,cardBorderColor:c})=>{const{brand:u}=(0,i.useHeadlessContext)(),m=i.ROUNDED_BRANDS.includes(u),g=l?"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,i.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:g,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"}),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,i.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,i.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,i.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 I=z;
|
|
2
|
+
//# sourceMappingURL=BenefitItem.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/components/credits/creditsBenefits/
|
|
4
|
-
"sourcesContent": ["import { Heading, Picture, Text } from '@anker-in/headless-ui'\nimport { cn } from '
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../../../src/components/credits/creditsBenefits/BenefitItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Heading, Picture, Text } from '@anker-in/headless-ui'\nimport { classNames as cn, useHeadlessContext, ROUNDED_BRANDS } from '@anker-in/lib'\nimport IconInfo from './IconInfo'\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\" />\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,GA4DQ,IAAAI,EAAA,6BA5DRC,EAAuC,iCACvCC,EAAqE,yBACrEC,EAAqB,yBAWrB,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,YAAY,EACxDA,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,IAAOP,EAAQM",
|
|
6
|
+
"names": ["BenefitItem_exports", "__export", "BenefitItem_default", "__toCommonJS", "import_jsx_runtime", "import_headless_ui", "import_lib", "import_IconInfo", "BenefitItem", "item", "handleClick", "isNoteActive", "index", "bigIcon", "cardBgColor", "cardBorderColor", "brand", "rounded", "iconSizeClass", "cardStyle", "cn", "e", "IconInfo"]
|
|
7
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/creditsBenefits/
|
|
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
|
}
|