@weareconceptstudio/account 1.0.5 → 2.0.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/AccountProvider.d.ts.map +1 -1
- package/dist/AccountProvider.js +36 -9
- package/dist/AccountProvider.js.map +1 -1
- package/dist/components/AccountButton/style.d.ts +1 -1
- package/dist/components/AccountButton/style.d.ts.map +1 -1
- package/dist/components/AccountButton/style.js.map +1 -1
- package/dist/components/AccountContainer/style.d.ts +1 -1
- package/dist/components/AccountContainer/style.d.ts.map +1 -1
- package/dist/components/AccountCounter/index.js +2 -2
- package/dist/components/AccountCounter/index.js.map +1 -1
- package/dist/components/AccountCounter/style.d.ts +1 -1
- package/dist/components/AccountCounter/style.d.ts.map +1 -1
- package/dist/components/AccountCounter/style.js +5 -5
- package/dist/components/CustomCheckbox/style.d.ts +1 -1
- package/dist/components/CustomCheckbox/style.d.ts.map +1 -1
- package/dist/components/CustomCheckbox/style.js.map +1 -1
- package/dist/components/FormInputCode/style.d.ts +1 -1
- package/dist/components/FormInputCode/style.d.ts.map +1 -1
- package/dist/components/FormInputCode/style.js.map +1 -1
- package/dist/components/Loader/style.d.ts +1 -1
- package/dist/components/Loader/style.d.ts.map +1 -1
- package/dist/components/Loader/style.js +1 -1
- package/dist/components/Pagination/style.d.ts +1 -1
- package/dist/components/Pagination/style.d.ts.map +1 -1
- package/dist/components/Pagination/style.js.map +1 -1
- package/dist/components/Sequence/Skeleton/style.d.ts +1 -1
- package/dist/components/Sequence/Skeleton/style.d.ts.map +1 -1
- package/dist/components/Sequence/Skeleton/style.js.map +1 -1
- package/dist/components/Sequence/style.d.ts +1 -1
- package/dist/components/Sequence/style.d.ts.map +1 -1
- package/dist/components/SkeletonModel/style.d.ts +1 -1
- package/dist/components/SkeletonModel/style.d.ts.map +1 -1
- package/dist/components/SkeletonModel/style.js +2 -1
- package/dist/components/SkeletonModel/style.js.map +1 -1
- package/dist/components/TotalCheckout/BalanceComp/index.js +6 -5
- package/dist/components/TotalCheckout/BalanceComp/index.js.map +1 -1
- package/dist/components/TotalCheckout/BalanceComp/style.d.ts +1 -1
- package/dist/components/TotalCheckout/BalanceComp/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/CommentComp/index.js +1 -1
- package/dist/components/TotalCheckout/CommentComp/index.js.map +1 -1
- package/dist/components/TotalCheckout/CommentComp/style.d.ts +1 -1
- package/dist/components/TotalCheckout/CommentComp/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/CommentComp/style.js.map +1 -1
- package/dist/components/TotalCheckout/FreeShippingComp/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/FreeShippingComp/index.js +5 -5
- package/dist/components/TotalCheckout/FreeShippingComp/index.js.map +1 -1
- package/dist/components/TotalCheckout/FreeShippingComp/style.d.ts +1 -1
- package/dist/components/TotalCheckout/FreeShippingComp/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/FreeShippingComp/style.js.map +1 -1
- package/dist/components/TotalCheckout/GiftComp/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/GiftComp/index.js +6 -4
- package/dist/components/TotalCheckout/GiftComp/index.js.map +1 -1
- package/dist/components/TotalCheckout/GiftComp/style.d.ts +1 -1
- package/dist/components/TotalCheckout/GiftComp/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/GiftComp/style.js.map +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/AppliedPromotion/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/AppliedPromotion/index.js.map +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/index.js +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/index.js.map +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/style.d.ts +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/Skeleton/style.d.ts +1 -1
- package/dist/components/TotalCheckout/Skeleton/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/index.js +23 -19
- package/dist/components/TotalCheckout/index.js.map +1 -1
- package/dist/components/TotalCheckout/style.d.ts +1 -1
- package/dist/components/TotalCheckout/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/style.js +16 -1
- package/dist/components/TotalCheckout/style.js.map +1 -1
- package/dist/components/WarningMessage/style.d.ts +1 -1
- package/dist/components/WarningMessage/style.d.ts.map +1 -1
- package/dist/components/WarningMessage/style.js.map +1 -1
- package/dist/components/WarningMessageForPopup/index.d.ts.map +1 -1
- package/dist/components/WarningMessageForPopup/index.js.map +1 -1
- package/dist/components/WarningMessageForPopup/style.d.ts +1 -1
- package/dist/components/WarningMessageForPopup/style.d.ts.map +1 -1
- package/dist/components/WarningMessageForPopup/style.js.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.js +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.d.ts +3 -3
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.js +5 -7
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.d.ts +1 -3
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.js +18 -8
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.js +5 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.d.ts +2 -2
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.js +3 -3
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.js +4 -2
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.js +5 -1
- package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/Voucher/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/Voucher/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/Voucher/style.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/index.d.ts +1 -2
- package/dist/modules/account/AccountBalanceTemplate/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/index.js +2 -2
- package/dist/modules/account/AccountBalanceTemplate/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/style.d.ts +1 -1
- package/dist/modules/account/AccountBalanceTemplate/style.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/style.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountInfo/index.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountInfo/index.js +37 -3
- package/dist/modules/account/AccountSettingsTemplate/AccountInfo/index.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountInfo/style.d.ts +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountInfo/style.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountInfo/style.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountPassword/style.d.ts +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountPassword/style.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/AccountPassword/style.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/style.d.ts +1 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/style.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/index.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/index.js +2 -2
- package/dist/modules/account/AccountSettingsTemplate/index.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/style.d.ts +1 -1
- package/dist/modules/account/AccountSettingsTemplate/style.d.ts.map +1 -1
- package/dist/modules/account/AccountTemplate/index.js +1 -1
- package/dist/modules/account/AccountTemplate/index.js.map +1 -1
- package/dist/modules/account/AccountTemplate/style.d.ts +1 -1
- package/dist/modules/account/AccountTemplate/style.d.ts.map +1 -1
- package/dist/modules/address/AddressForm/index.d.ts.map +1 -1
- package/dist/modules/address/AddressForm/index.js +21 -3
- package/dist/modules/address/AddressForm/index.js.map +1 -1
- package/dist/modules/address/AddressForm/style.d.ts +1 -1
- package/dist/modules/address/AddressForm/style.d.ts.map +1 -1
- package/dist/modules/address/AddressForm/style.js.map +1 -1
- package/dist/modules/address/AddressItem/index.d.ts.map +1 -1
- package/dist/modules/address/AddressItem/index.js +12 -6
- package/dist/modules/address/AddressItem/index.js.map +1 -1
- package/dist/modules/address/AddressItem/style.d.ts +1 -1
- package/dist/modules/address/AddressItem/style.d.ts.map +1 -1
- package/dist/modules/address/AddressItem/style.js.map +1 -1
- package/dist/modules/address/AddressProvider.d.ts.map +1 -1
- package/dist/modules/address/AddressProvider.js +109 -20
- package/dist/modules/address/AddressProvider.js.map +1 -1
- package/dist/modules/address/AddressWrap/index.d.ts.map +1 -1
- package/dist/modules/address/AddressWrap/index.js +4 -2
- package/dist/modules/address/AddressWrap/index.js.map +1 -1
- package/dist/modules/address/AddressesTemplate/index.js +2 -2
- package/dist/modules/address/AddressesTemplate/index.js.map +1 -1
- package/dist/modules/address/AddressesTemplate/style.d.ts +1 -1
- package/dist/modules/address/AddressesTemplate/style.d.ts.map +1 -1
- package/dist/modules/address/AddressesTemplate/style.js.map +1 -1
- package/dist/modules/address/SelectAddress/Skeleton/style.d.ts +1 -1
- package/dist/modules/address/SelectAddress/Skeleton/style.d.ts.map +1 -1
- package/dist/modules/address/SelectAddress/Skeleton/style.js.map +1 -1
- package/dist/modules/address/SelectAddressPopup/index.d.ts.map +1 -1
- package/dist/modules/address/SelectAddressPopup/index.js +29 -21
- package/dist/modules/address/SelectAddressPopup/index.js.map +1 -1
- package/dist/modules/address/SelectAddressPopup/style.d.ts +1 -1
- package/dist/modules/address/SelectAddressPopup/style.d.ts.map +1 -1
- package/dist/modules/address/SelectAddressPopup/style.js.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.js +2 -2
- package/dist/modules/address/ShippingBillingForm/index.js.map +1 -1
- package/dist/modules/address/ShippingBillingForm/style.d.ts +1 -1
- package/dist/modules/address/ShippingBillingForm/style.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingForm/style.js.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/index.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/index.js +10 -3
- package/dist/modules/address/ShippingBillingInfo/index.js.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/style.d.ts +1 -1
- package/dist/modules/address/ShippingBillingInfo/style.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/style.js.map +1 -1
- package/dist/modules/auth/ForgotPasswordTemplate/index.d.ts.map +1 -1
- package/dist/modules/auth/ForgotPasswordTemplate/index.js +3 -1
- package/dist/modules/auth/ForgotPasswordTemplate/index.js.map +1 -1
- package/dist/modules/auth/ForgotPasswordTemplate/style.d.ts +1 -1
- package/dist/modules/auth/ForgotPasswordTemplate/style.d.ts.map +1 -1
- package/dist/modules/auth/ForgotPasswordTemplate/style.js.map +1 -1
- package/dist/modules/auth/ResetPasswordTemplate/ExpiredLink/index.js +1 -1
- package/dist/modules/auth/ResetPasswordTemplate/ExpiredLink/style.d.ts +1 -1
- package/dist/modules/auth/ResetPasswordTemplate/ExpiredLink/style.d.ts.map +1 -1
- package/dist/modules/auth/ResetPasswordTemplate/ExpiredLink/style.js.map +1 -1
- package/dist/modules/auth/ResetPasswordTemplate/style.d.ts +1 -1
- package/dist/modules/auth/ResetPasswordTemplate/style.d.ts.map +1 -1
- package/dist/modules/auth/SignInTemplate/index.d.ts +1 -2
- package/dist/modules/auth/SignInTemplate/index.d.ts.map +1 -1
- package/dist/modules/auth/SignInTemplate/index.js +4 -4
- package/dist/modules/auth/SignInTemplate/index.js.map +1 -1
- package/dist/modules/auth/SignInTemplate/style.d.ts +1 -1
- package/dist/modules/auth/SignInTemplate/style.d.ts.map +1 -1
- package/dist/modules/auth/SignInTemplate/style.js.map +1 -1
- package/dist/modules/auth/SignUpTemplate/index.d.ts +1 -2
- package/dist/modules/auth/SignUpTemplate/index.d.ts.map +1 -1
- package/dist/modules/auth/SignUpTemplate/index.js +4 -4
- package/dist/modules/auth/SignUpTemplate/index.js.map +1 -1
- package/dist/modules/auth/SignUpTemplate/style.d.ts +1 -1
- package/dist/modules/auth/SignUpTemplate/style.d.ts.map +1 -1
- package/dist/modules/auth/SignUpTemplate/style.js +1 -0
- package/dist/modules/auth/SignUpTemplate/style.js.map +1 -1
- package/dist/modules/auth/VerifyEmailAddressTemplate/style.d.ts +1 -1
- package/dist/modules/auth/VerifyEmailAddressTemplate/style.d.ts.map +1 -1
- package/dist/modules/auth/VerifyEmailAddressTemplate/style.js.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/index.d.ts.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/index.js +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/index.js.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/style.d.ts +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/style.d.ts.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/style.js.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/index.js +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/index.js.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/style.d.ts +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/style.d.ts.map +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/style.js.map +1 -1
- package/dist/modules/cart/CartTemplate/index.d.ts.map +1 -1
- package/dist/modules/cart/CartTemplate/index.js +15 -10
- package/dist/modules/cart/CartTemplate/index.js.map +1 -1
- package/dist/modules/cart/CartTemplate/style.d.ts +1 -1
- package/dist/modules/cart/CartTemplate/style.d.ts.map +1 -1
- package/dist/modules/cart/EmptyCart/index.d.ts.map +1 -1
- package/dist/modules/cart/EmptyCart/index.js +5 -3
- package/dist/modules/cart/EmptyCart/index.js.map +1 -1
- package/dist/modules/cart/EmptyCart/style.d.ts +1 -1
- package/dist/modules/cart/EmptyCart/style.d.ts.map +1 -1
- package/dist/modules/cart/EmptyCart/style.js +11 -10
- package/dist/modules/cart/EmptyCart/style.js.map +1 -1
- package/dist/modules/cart/components/CartItems/Item/EditButton.d.ts +11 -0
- package/dist/modules/cart/components/CartItems/Item/EditButton.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/EditButton.js +17 -0
- package/dist/modules/cart/components/CartItems/Item/EditButton.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemActions.d.ts +11 -0
- package/dist/modules/cart/components/CartItems/Item/ItemActions.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemActions.js +17 -0
- package/dist/modules/cart/components/CartItems/Item/ItemActions.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemAttributes.d.ts +8 -0
- package/dist/modules/cart/components/CartItems/Item/ItemAttributes.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemAttributes.js +38 -0
- package/dist/modules/cart/components/CartItems/Item/ItemAttributes.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemImage.d.ts +9 -0
- package/dist/modules/cart/components/CartItems/Item/ItemImage.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemImage.js +12 -0
- package/dist/modules/cart/components/CartItems/Item/ItemImage.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemTitle.d.ts +10 -0
- package/dist/modules/cart/components/CartItems/Item/ItemTitle.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/ItemTitle.js +10 -0
- package/dist/modules/cart/components/CartItems/Item/ItemTitle.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/OutOfStockBadge.d.ts +6 -0
- package/dist/modules/cart/components/CartItems/Item/OutOfStockBadge.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/OutOfStockBadge.js +9 -0
- package/dist/modules/cart/components/CartItems/Item/OutOfStockBadge.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/PriceDisplay.d.ts +7 -0
- package/dist/modules/cart/components/CartItems/Item/PriceDisplay.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/PriceDisplay.js +25 -0
- package/dist/modules/cart/components/CartItems/Item/PriceDisplay.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.d.ts +14 -0
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.js +31 -0
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/TotalDisplay.d.ts +7 -0
- package/dist/modules/cart/components/CartItems/Item/TotalDisplay.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/TotalDisplay.js +25 -0
- package/dist/modules/cart/components/CartItems/Item/TotalDisplay.js.map +1 -0
- package/dist/modules/cart/components/CartItems/Item/index.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/Item/index.js +39 -69
- package/dist/modules/cart/components/CartItems/Item/index.js.map +1 -1
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.d.ts +14 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.js +22 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.d.ts +8 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.js +35 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.d.ts +9 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.js +12 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemPrice.d.ts +8 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemPrice.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemPrice.js +38 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemPrice.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.d.ts +14 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js +47 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTitle.d.ts +10 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTitle.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTitle.js +10 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTitle.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTotal.d.ts +7 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTotal.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTotal.js +41 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemTotal.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileOutOfStockBadge.d.ts +6 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileOutOfStockBadge.d.ts.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileOutOfStockBadge.js +10 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileOutOfStockBadge.js.map +1 -0
- package/dist/modules/cart/components/CartItems/ItemMobile/index.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/ItemMobile/index.js +36 -70
- package/dist/modules/cart/components/CartItems/ItemMobile/index.js.map +1 -1
- package/dist/modules/cart/components/CartItems/index.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/index.js +10 -6
- package/dist/modules/cart/components/CartItems/index.js.map +1 -1
- package/dist/modules/cart/components/CartItems/style.d.ts +1 -1
- package/dist/modules/cart/components/CartItems/style.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/style.js +67 -7
- package/dist/modules/cart/components/CartItems/style.js.map +1 -1
- package/dist/modules/cart/index.d.ts +0 -1
- package/dist/modules/cart/index.d.ts.map +1 -1
- package/dist/modules/cart/index.js +3 -1
- package/dist/modules/cart/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js +4 -5
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.d.ts +4 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.js +13 -4
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/index.js +41 -5
- package/dist/modules/checkout/CheckoutTemplate/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/style.d.ts +1 -1
- package/dist/modules/checkout/CheckoutTemplate/style.d.ts.map +1 -1
- package/dist/modules/checkout/PaymentFailedTemplate/index.js +1 -1
- package/dist/modules/checkout/PaymentFailedTemplate/index.js.map +1 -1
- package/dist/modules/checkout/PaymentFailedTemplate/style.d.ts +1 -1
- package/dist/modules/checkout/PaymentFailedTemplate/style.d.ts.map +1 -1
- package/dist/modules/checkout/PaymentFailedTemplate/style.js.map +1 -1
- package/dist/modules/checkout/ThankYouTemplate/index.js +1 -1
- package/dist/modules/checkout/ThankYouTemplate/index.js.map +1 -1
- package/dist/modules/checkout/ThankYouTemplate/style.d.ts +1 -1
- package/dist/modules/checkout/ThankYouTemplate/style.d.ts.map +1 -1
- package/dist/modules/checkout/ThankYouTemplate/style.js.map +1 -1
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +2 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/order/EmptyOrders/style.d.ts +1 -1
- package/dist/modules/order/EmptyOrders/style.d.ts.map +1 -1
- package/dist/modules/order/EmptyOrders/style.js.map +1 -1
- package/dist/modules/order/OrderDetails/index.d.ts.map +1 -1
- package/dist/modules/order/OrderDetails/index.js +14 -14
- package/dist/modules/order/OrderDetails/index.js.map +1 -1
- package/dist/modules/order/OrderDetails/style.d.ts +1 -1
- package/dist/modules/order/OrderDetails/style.d.ts.map +1 -1
- package/dist/modules/order/OrderDetails/style.js.map +1 -1
- package/dist/modules/order/OrderHistoryTemplate/style.d.ts +1 -1
- package/dist/modules/order/OrderHistoryTemplate/style.d.ts.map +1 -1
- package/dist/modules/order/OrderIndividualTemplate/index.d.ts.map +1 -1
- package/dist/modules/order/OrderIndividualTemplate/index.js +5 -3
- package/dist/modules/order/OrderIndividualTemplate/index.js.map +1 -1
- package/dist/modules/order/OrderIndividualTemplate/style.d.ts +1 -1
- package/dist/modules/order/OrderIndividualTemplate/style.d.ts.map +1 -1
- package/dist/modules/order/OrderRatePopup/style.d.ts +1 -1
- package/dist/modules/order/OrderRatePopup/style.d.ts.map +1 -1
- package/dist/modules/order/OrderRateReview/style.d.ts +1 -1
- package/dist/modules/order/OrderRateReview/style.d.ts.map +1 -1
- package/dist/modules/order/OrderReview/style.d.ts +1 -1
- package/dist/modules/order/OrderReview/style.d.ts.map +1 -1
- package/dist/modules/order/OrderReviewPopup/style.d.ts +1 -1
- package/dist/modules/order/OrderReviewPopup/style.d.ts.map +1 -1
- package/dist/modules/order/OrderReviewPopup/style.js +1 -1
- package/dist/modules/order/OrderReviewTemplate/style.d.ts +1 -1
- package/dist/modules/order/OrderReviewTemplate/style.d.ts.map +1 -1
- package/dist/modules/order/OrderStatus/style.d.ts +1 -1
- package/dist/modules/order/OrderStatus/style.d.ts.map +1 -1
- package/dist/modules/order/OrderedItems/Item/index.d.ts.map +1 -1
- package/dist/modules/order/OrderedItems/Item/index.js +36 -31
- package/dist/modules/order/OrderedItems/Item/index.js.map +1 -1
- package/dist/modules/order/OrderedItems/ItemMobile/index.d.ts.map +1 -1
- package/dist/modules/order/OrderedItems/ItemMobile/index.js +32 -29
- package/dist/modules/order/OrderedItems/ItemMobile/index.js.map +1 -1
- package/dist/modules/order/OrderedItems/Review/Popup/index.d.ts +4 -0
- package/dist/modules/order/OrderedItems/Review/Popup/index.d.ts.map +1 -0
- package/dist/modules/order/OrderedItems/Review/Popup/index.js +70 -0
- package/dist/modules/order/OrderedItems/Review/Popup/index.js.map +1 -0
- package/dist/modules/order/OrderedItems/Review/Popup/style.d.ts +3 -0
- package/dist/modules/order/OrderedItems/Review/Popup/style.d.ts.map +1 -0
- package/dist/modules/order/OrderedItems/Review/Popup/style.js +326 -0
- package/dist/modules/order/OrderedItems/Review/Popup/style.js.map +1 -0
- package/dist/modules/order/OrderedItems/Review/index.d.ts +9 -0
- package/dist/modules/order/OrderedItems/Review/index.d.ts.map +1 -0
- package/dist/modules/order/OrderedItems/Review/index.js +57 -0
- package/dist/modules/order/OrderedItems/Review/index.js.map +1 -0
- package/dist/modules/order/OrderedItems/index.d.ts +2 -1
- package/dist/modules/order/OrderedItems/index.d.ts.map +1 -1
- package/dist/modules/order/OrderedItems/index.js +14 -6
- package/dist/modules/order/OrderedItems/index.js.map +1 -1
- package/dist/modules/order/OrderedItems/style.d.ts +1 -1
- package/dist/modules/order/OrderedItems/style.d.ts.map +1 -1
- package/dist/modules/order/OrderedItems/style.js +48 -12
- package/dist/modules/order/OrderedItems/style.js.map +1 -1
- package/dist/modules/order/OrderedItems/util.d.ts +4 -0
- package/dist/modules/order/OrderedItems/util.d.ts.map +1 -1
- package/dist/modules/order/OrderedItems/util.js +21 -0
- package/dist/modules/order/OrderedItems/util.js.map +1 -1
- package/dist/modules/order/OrdersList/Item/index.d.ts.map +1 -1
- package/dist/modules/order/OrdersList/Item/index.js +6 -7
- package/dist/modules/order/OrdersList/Item/index.js.map +1 -1
- package/dist/modules/order/OrdersList/ItemMobile/index.d.ts.map +1 -1
- package/dist/modules/order/OrdersList/ItemMobile/index.js +7 -7
- package/dist/modules/order/OrdersList/ItemMobile/index.js.map +1 -1
- package/dist/modules/order/OrdersList/index.d.ts.map +1 -1
- package/dist/modules/order/OrdersList/index.js +6 -4
- package/dist/modules/order/OrdersList/index.js.map +1 -1
- package/dist/modules/order/OrdersList/style.d.ts +1 -1
- package/dist/modules/order/OrdersList/style.d.ts.map +1 -1
- package/dist/modules/order/OrdersList/style.js +7 -7
- package/dist/modules/order/OrdersList/style.js.map +1 -1
- package/dist/modules/order/index.d.ts +1 -0
- package/dist/modules/order/index.d.ts.map +1 -1
- package/dist/modules/order/index.js +1 -0
- package/dist/modules/order/index.js.map +1 -1
- package/dist/modules/payment/AddNewCard/index.js +1 -1
- package/dist/modules/payment/AddNewCard/index.js.map +1 -1
- package/dist/modules/payment/AddNewCard/style.d.ts +1 -1
- package/dist/modules/payment/AddNewCard/style.d.ts.map +1 -1
- package/dist/modules/payment/AddNewCard/style.js +4 -1
- package/dist/modules/payment/AddNewCard/style.js.map +1 -1
- package/dist/modules/payment/Card/index.js +1 -1
- package/dist/modules/payment/Card/index.js.map +1 -1
- package/dist/modules/payment/Card/style.d.ts +1 -1
- package/dist/modules/payment/Card/style.d.ts.map +1 -1
- package/dist/modules/payment/Card/style.js +4 -1
- package/dist/modules/payment/Card/style.js.map +1 -1
- package/dist/modules/payment/Cards/style.d.ts +1 -1
- package/dist/modules/payment/Cards/style.d.ts.map +1 -1
- package/dist/modules/payment/Cards/style.js.map +1 -1
- package/dist/modules/payment/Payment/index.js +1 -1
- package/dist/modules/payment/Payment/index.js.map +1 -1
- package/dist/modules/payment/Payment/style.d.ts +1 -1
- package/dist/modules/payment/Payment/style.d.ts.map +1 -1
- package/dist/modules/payment/Payment/style.js.map +1 -1
- package/dist/modules/payment/PaymentMethodItem/style.d.ts +1 -1
- package/dist/modules/payment/PaymentMethodItem/style.d.ts.map +1 -1
- package/dist/modules/payment/PaymentMethodItem/style.js.map +1 -1
- package/dist/modules/payment/PaymentMethods/style.d.ts +1 -1
- package/dist/modules/payment/PaymentMethods/style.d.ts.map +1 -1
- package/dist/modules/payment/PaymentMethods/style.js.map +1 -1
- package/dist/modules/payment/PaymentMethodsTemplate/style.d.ts +1 -1
- package/dist/modules/payment/PaymentMethodsTemplate/style.d.ts.map +1 -1
- package/dist/modules/payment/PaymentWrap/style.d.ts +1 -1
- package/dist/modules/payment/PaymentWrap/style.d.ts.map +1 -1
- package/dist/modules/payment/PaymentWrap/style.js.map +1 -1
- package/dist/modules/payment/SelectPaymentMethodPopup/index.js +1 -1
- package/dist/modules/payment/SelectPaymentMethodPopup/index.js.map +1 -1
- package/dist/modules/payment/SelectPaymentMethodPopup/style.d.ts +1 -1
- package/dist/modules/payment/SelectPaymentMethodPopup/style.d.ts.map +1 -1
- package/dist/modules/payment/SelectPaymentMethodPopup/style.js.map +1 -1
- package/dist/modules/payment/SelectedPayment/index.js +1 -1
- package/dist/modules/payment/SelectedPayment/index.js.map +1 -1
- package/dist/translations/en.d.ts +23 -2
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/en.js +23 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/hy.d.ts +23 -2
- package/dist/translations/hy.d.ts.map +1 -1
- package/dist/translations/hy.js +23 -2
- package/dist/translations/hy.js.map +1 -1
- package/dist/translations/index.d.ts +374 -5
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/index.js +2 -1
- package/dist/translations/index.js.map +1 -1
- package/dist/translations/it.d.ts +309 -0
- package/dist/translations/it.d.ts.map +1 -0
- package/dist/translations/it.js +308 -0
- package/dist/translations/it.js.map +1 -0
- package/dist/translations/ru.d.ts +21 -1
- package/dist/translations/ru.d.ts.map +1 -1
- package/dist/translations/ru.js +25 -5
- package/dist/translations/ru.js.map +1 -1
- package/dist/utils/config.d.ts +48 -4
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +42 -7
- package/dist/utils/config.js.map +1 -1
- package/package.json +14 -6
- package/dist/modules/cart/CartProvider.d.ts +0 -79
- package/dist/modules/cart/CartProvider.d.ts.map +0 -1
- package/dist/modules/cart/CartProvider.js +0 -376
- package/dist/modules/cart/CartProvider.js.map +0 -1
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React, { useState, useRef, createContext, useContext, useMemo, useEffect } from 'react';
|
|
3
|
-
import { getCookie, setCookie, removeCookie, useTranslation, api, isNumeric, cleanObject, } from '@weareconceptstudio/core';
|
|
4
|
-
const CartContext = createContext({});
|
|
5
|
-
export const useCart = () => useContext(CartContext);
|
|
6
|
-
export const CartProvider = ({ useUser, children }) => {
|
|
7
|
-
const { selectedLang } = useTranslation();
|
|
8
|
-
const { isLoggedIn, user } = useUser();
|
|
9
|
-
const idramFormRef = useRef(null);
|
|
10
|
-
const [idramForm, setIdramForm] = useState(null);
|
|
11
|
-
const [cartState, setCartState] = useState({
|
|
12
|
-
itemsCount: 0,
|
|
13
|
-
items: [],
|
|
14
|
-
subtotal: 0,
|
|
15
|
-
total: 0,
|
|
16
|
-
loading: true,
|
|
17
|
-
currency: 'AMD',
|
|
18
|
-
shippingCost: '-',
|
|
19
|
-
remaining: null,
|
|
20
|
-
shippingCostValue: null,
|
|
21
|
-
shippingCityName: null,
|
|
22
|
-
hasFreeGift: null,
|
|
23
|
-
giftThresholdRemaining: null,
|
|
24
|
-
useBalance: null,
|
|
25
|
-
promotion_code: null,
|
|
26
|
-
promotion_error: null,
|
|
27
|
-
discount: null,
|
|
28
|
-
appliedPromotions: [],
|
|
29
|
-
utensils: [],
|
|
30
|
-
});
|
|
31
|
-
const initialCheckoutData = JSON.parse(sessionStorage.getItem('checkoutData')) || {
|
|
32
|
-
addressId: null,
|
|
33
|
-
useBalance: null,
|
|
34
|
-
note: '',
|
|
35
|
-
paymentType: user?.payment_method || 'cash_on_delivery',
|
|
36
|
-
gifts: [],
|
|
37
|
-
card_id: user?.payment_method === 'credit_card' ? user.payment_method : null,
|
|
38
|
-
excludedPromotions: [],
|
|
39
|
-
promotion_code: null,
|
|
40
|
-
promotion_error: null,
|
|
41
|
-
utensils: [],
|
|
42
|
-
};
|
|
43
|
-
const [checkoutData, setCheckoutData] = useState(initialCheckoutData);
|
|
44
|
-
const checkoutDataRef = useRef(checkoutData);
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (typeof window !== 'undefined') {
|
|
47
|
-
sessionStorage.setItem('checkoutData', JSON.stringify(checkoutData));
|
|
48
|
-
}
|
|
49
|
-
checkoutDataRef.current = checkoutData;
|
|
50
|
-
}, [checkoutData]);
|
|
51
|
-
const getCookieItems = () => {
|
|
52
|
-
const cookieCart = getCookie('cart');
|
|
53
|
-
return cookieCart ? JSON.parse(cookieCart) : [];
|
|
54
|
-
};
|
|
55
|
-
const setResourceDecorator = (data) => {
|
|
56
|
-
setCartState((prev) => ({
|
|
57
|
-
...prev,
|
|
58
|
-
...data,
|
|
59
|
-
useBalance: data.useBalance || null,
|
|
60
|
-
promotion_code: data.promotion_code || null,
|
|
61
|
-
promotion_error: data.promotion_error || null,
|
|
62
|
-
loading: false,
|
|
63
|
-
}));
|
|
64
|
-
setCheckoutData((prev) => ({
|
|
65
|
-
...prev,
|
|
66
|
-
useBalance: data.useBalance || null,
|
|
67
|
-
promotion_code: data.promotion_code || null,
|
|
68
|
-
promotion_error: data.promotion_error || null,
|
|
69
|
-
}));
|
|
70
|
-
};
|
|
71
|
-
const isCheckoutPage = useMemo(() => {
|
|
72
|
-
if (typeof window === 'undefined')
|
|
73
|
-
return false;
|
|
74
|
-
return window.location.href.includes('checkout');
|
|
75
|
-
}, [window.location.href]);
|
|
76
|
-
const isCartPage = useMemo(() => {
|
|
77
|
-
if (typeof window === 'undefined')
|
|
78
|
-
return false;
|
|
79
|
-
return window.location.href.includes('cart');
|
|
80
|
-
}, [window.location.href]);
|
|
81
|
-
const cartResourceType = useMemo(() => {
|
|
82
|
-
return isCheckoutPage || isCartPage ? 'cart' : 'cart-summary';
|
|
83
|
-
}, [isCheckoutPage, isCartPage]);
|
|
84
|
-
const getCart = async (params = {}) => {
|
|
85
|
-
let newParams = { ...cleanObject(checkoutDataRef.current), ...params, cartResourceType };
|
|
86
|
-
if (isLoggedIn) {
|
|
87
|
-
const { data } = await api.get({ url: 'cart', lang: selectedLang, params: newParams });
|
|
88
|
-
setResourceDecorator(data);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
const cookieItems = getCookieItems();
|
|
92
|
-
const { data } = await api.post('guest-cart', { items: cookieItems, ...newParams }, selectedLang);
|
|
93
|
-
setResourceDecorator(data);
|
|
94
|
-
}
|
|
95
|
-
return Promise.resolve();
|
|
96
|
-
};
|
|
97
|
-
const toggleCartItem = async ({ productId, qty }) => {
|
|
98
|
-
if (qty === 0)
|
|
99
|
-
return deleteCartItem({ productId });
|
|
100
|
-
return isLoggedIn ? customerToggleCartItem({ productId, qty }) : guestToggleCartItem({ productId, qty });
|
|
101
|
-
};
|
|
102
|
-
const guestToggleCartItem = async ({ productId, qty }) => {
|
|
103
|
-
const cookieItems = getCookieItems();
|
|
104
|
-
const existingItem = cookieItems.find((item) => item.productId === productId);
|
|
105
|
-
const items = existingItem
|
|
106
|
-
? cookieItems.map((item) => (item.productId === productId ? { ...item, qty } : item))
|
|
107
|
-
: [...cookieItems, { productId, qty }];
|
|
108
|
-
setCookie('cart', JSON.stringify(items));
|
|
109
|
-
await getCart();
|
|
110
|
-
return Promise.resolve();
|
|
111
|
-
};
|
|
112
|
-
const customerToggleCartItem = async ({ productId, qty }) => {
|
|
113
|
-
let params = { productId, qty, ...cleanObject(checkoutDataRef.current), cartResourceType };
|
|
114
|
-
const { data } = await api.post('toggle-cart-item', params, selectedLang);
|
|
115
|
-
setResourceDecorator(data);
|
|
116
|
-
};
|
|
117
|
-
const deleteCartItem = async ({ productId }) => {
|
|
118
|
-
let params = { productId, ...cleanObject(checkoutDataRef.current), cartResourceType };
|
|
119
|
-
if (isLoggedIn) {
|
|
120
|
-
const { data } = await api.post('delete-cart-item', params);
|
|
121
|
-
setResourceDecorator(data);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
const items = getCookieItems().filter((item) => item.productId !== productId);
|
|
125
|
-
setCookie('cart', JSON.stringify(items));
|
|
126
|
-
await getCart();
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
const mergeCart = async () => {
|
|
130
|
-
const cookieItems = getCookieItems();
|
|
131
|
-
if (cookieItems.length > 0) {
|
|
132
|
-
removeCookie('cart');
|
|
133
|
-
sessionStorage.clear();
|
|
134
|
-
const { data } = await api.post('merge-cart', { items: cookieItems }, selectedLang);
|
|
135
|
-
setResourceDecorator(data);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
const resetCart = async () => {
|
|
139
|
-
sessionStorage.clear();
|
|
140
|
-
removeCookie('cart');
|
|
141
|
-
setCheckoutData({
|
|
142
|
-
addressId: null,
|
|
143
|
-
useBalance: null,
|
|
144
|
-
note: '',
|
|
145
|
-
paymentType: user?.payment_method || 'cash_on_delivery',
|
|
146
|
-
gifts: [],
|
|
147
|
-
card_id: user?.payment_method === 'credit_card' ? user.payment_method : null,
|
|
148
|
-
excludedPromotions: [],
|
|
149
|
-
promotion_code: null,
|
|
150
|
-
promotion_error: null,
|
|
151
|
-
utensils: [],
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
const clearCart = async () => {
|
|
155
|
-
resetCart();
|
|
156
|
-
if (isLoggedIn) {
|
|
157
|
-
const { data } = await api.post('clear-cart');
|
|
158
|
-
setResourceDecorator(data);
|
|
159
|
-
return Promise.resolve();
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
return await getCart();
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
const reorder = async (orderId) => {
|
|
166
|
-
await api.post('reorder', { orderId });
|
|
167
|
-
window.location.href = `/${selectedLang}/cart`;
|
|
168
|
-
};
|
|
169
|
-
//! Has gift from data
|
|
170
|
-
useEffect(() => {
|
|
171
|
-
const currentGiftMap = new Map(checkoutDataRef.current.gifts?.map((g) => [`${g.promotionId}-${g.productId}`, g]) || []);
|
|
172
|
-
// Build gifts array based on current cart items (source of truth)
|
|
173
|
-
const updatedGifts = cartState.items
|
|
174
|
-
.filter((item) => item.is_gift)
|
|
175
|
-
.map((item) => {
|
|
176
|
-
const key = `${item.appliedPromotion.id}-${item.product.id}`;
|
|
177
|
-
// If gift exists in old checkout data, keep it (preserves user selections)
|
|
178
|
-
if (currentGiftMap.has(key)) {
|
|
179
|
-
return currentGiftMap.get(key);
|
|
180
|
-
}
|
|
181
|
-
// Otherwise, create new gift entry
|
|
182
|
-
return {
|
|
183
|
-
productId: item.product.id,
|
|
184
|
-
promotionId: item.appliedPromotion.id,
|
|
185
|
-
qty: item.qty,
|
|
186
|
-
};
|
|
187
|
-
});
|
|
188
|
-
// Update if gifts changed (added, removed, or modified)
|
|
189
|
-
const hasChanged = updatedGifts.length !== (checkoutDataRef.current.gifts?.length || 0) ||
|
|
190
|
-
updatedGifts.some((gift, i) => {
|
|
191
|
-
const oldGift = checkoutDataRef.current.gifts?.[i];
|
|
192
|
-
return !oldGift || gift.productId !== oldGift.productId || gift.promotionId !== oldGift.promotionId;
|
|
193
|
-
});
|
|
194
|
-
if (hasChanged) {
|
|
195
|
-
setCheckoutData((prev) => ({
|
|
196
|
-
...prev,
|
|
197
|
-
gifts: updatedGifts,
|
|
198
|
-
}));
|
|
199
|
-
}
|
|
200
|
-
}, [cartState.items]);
|
|
201
|
-
//! Utensils
|
|
202
|
-
useEffect(() => {
|
|
203
|
-
const currentUtensils = new Map(checkoutDataRef.current.utensils?.map((g) => [g.utensilId, g]) || []);
|
|
204
|
-
// Build utensils array based on current cart utensils (source of truth)
|
|
205
|
-
const updatedUtensils = cartState.utensils.map((item) => {
|
|
206
|
-
// If utensil exists in old checkout data, keep it (preserves user selections)
|
|
207
|
-
if (currentUtensils.has(item.id)) {
|
|
208
|
-
return currentUtensils.get(item.id);
|
|
209
|
-
}
|
|
210
|
-
// Otherwise, create new utensil entry
|
|
211
|
-
return {
|
|
212
|
-
utensilId: item.id,
|
|
213
|
-
isChecked: true,
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
// Update if utensils changed (added, removed, or modified)
|
|
217
|
-
const hasChanged = updatedUtensils.length !== (checkoutDataRef.current.utensils?.length || 0) ||
|
|
218
|
-
updatedUtensils.some((utensil, i) => {
|
|
219
|
-
const oldUtensil = checkoutDataRef.current.utensils?.[i];
|
|
220
|
-
return !oldUtensil || utensil.utensilId !== oldUtensil.utensilId;
|
|
221
|
-
});
|
|
222
|
-
if (hasChanged) {
|
|
223
|
-
setCheckoutData((prev) => ({
|
|
224
|
-
...prev,
|
|
225
|
-
utensils: updatedUtensils,
|
|
226
|
-
}));
|
|
227
|
-
}
|
|
228
|
-
}, [cartState.utensils]);
|
|
229
|
-
//! Set gift Select
|
|
230
|
-
const setGifts = ({ promotionId, qty, productId }) => {
|
|
231
|
-
setCheckoutData((prev) => ({
|
|
232
|
-
...prev,
|
|
233
|
-
gifts: prev.gifts.map((item) => {
|
|
234
|
-
if (item.promotionId === promotionId && item.productId === productId) {
|
|
235
|
-
return { ...item, qty };
|
|
236
|
-
}
|
|
237
|
-
return item;
|
|
238
|
-
}),
|
|
239
|
-
}));
|
|
240
|
-
};
|
|
241
|
-
const togglePromotion = ({ promotionId }) => {
|
|
242
|
-
setCheckoutData((prev) => {
|
|
243
|
-
const excludedPromotions = prev.excludedPromotions;
|
|
244
|
-
const index = excludedPromotions.indexOf(promotionId);
|
|
245
|
-
if (index > -1) {
|
|
246
|
-
excludedPromotions.splice(index, 1);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
excludedPromotions.push(promotionId);
|
|
250
|
-
}
|
|
251
|
-
const updatedData = { ...prev, excludedPromotions };
|
|
252
|
-
getCart(updatedData);
|
|
253
|
-
return updatedData;
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
const checkoutBtnDisabled = useMemo(() => {
|
|
257
|
-
let isDisabled = false;
|
|
258
|
-
if (isCheckoutPage && isNumeric(checkoutData.paymentType)) {
|
|
259
|
-
const selectedCard = user?.cards?.find((card) => card.id === checkoutData.paymentType);
|
|
260
|
-
isDisabled = selectedCard?.is_expired || false;
|
|
261
|
-
}
|
|
262
|
-
if (!cartState.itemsCount) {
|
|
263
|
-
isDisabled = true;
|
|
264
|
-
}
|
|
265
|
-
return isDisabled;
|
|
266
|
-
}, [checkoutData.paymentType, user, isCheckoutPage, cartState.itemsCount]);
|
|
267
|
-
const fillCheckoutData = (keyOrObject, value) => {
|
|
268
|
-
setCheckoutData((prev) => {
|
|
269
|
-
let updatedData;
|
|
270
|
-
if (typeof keyOrObject === 'string') {
|
|
271
|
-
updatedData = { ...prev, [keyOrObject]: value };
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
updatedData = { ...prev, ...keyOrObject };
|
|
275
|
-
}
|
|
276
|
-
sessionStorage.setItem('checkoutData', JSON.stringify(updatedData));
|
|
277
|
-
return updatedData;
|
|
278
|
-
});
|
|
279
|
-
};
|
|
280
|
-
const fillCart = (key, value) => {
|
|
281
|
-
const updatedData = { ...checkoutDataRef.current, [key]: value };
|
|
282
|
-
getCart(updatedData);
|
|
283
|
-
};
|
|
284
|
-
const idram = (res) => {
|
|
285
|
-
let lang = selectedLang === 'en' ? 'EN' : selectedLang === 'ru' ? 'RU' : 'AM';
|
|
286
|
-
const idramForm = (React.createElement("form", { action: res.url, method: 'POST', ref: idramFormRef },
|
|
287
|
-
React.createElement("input", { type: 'hidden', name: 'EDP_LANGUAGE', value: lang }),
|
|
288
|
-
Object.keys(res.form).map((i, key) => (React.createElement("input", { key: key, type: 'hidden', name: i, value: res.form[i] })))));
|
|
289
|
-
setIdramForm(idramForm);
|
|
290
|
-
};
|
|
291
|
-
const handleCheckout = async () => {
|
|
292
|
-
if (!cartState.itemsCount)
|
|
293
|
-
return;
|
|
294
|
-
if (isNumeric(checkoutData.paymentType)) {
|
|
295
|
-
const selectedCard = user?.cards?.find((card) => card.id === checkoutData.paymentType);
|
|
296
|
-
if (!selectedCard || selectedCard.is_expired) {
|
|
297
|
-
alert('The selected card is expired. Please choose another payment method.');
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
const payload = {
|
|
302
|
-
...cleanObject(checkoutDataRef.current),
|
|
303
|
-
};
|
|
304
|
-
//! Check gift
|
|
305
|
-
if (!payload.gifts?.length)
|
|
306
|
-
delete payload.gifts;
|
|
307
|
-
if (isNumeric(checkoutData.paymentType)) {
|
|
308
|
-
payload.paymentType = 'credit_card';
|
|
309
|
-
payload.card_id = Number(checkoutData.paymentType);
|
|
310
|
-
}
|
|
311
|
-
if (checkoutData.paymentType === 'credit_card') {
|
|
312
|
-
payload.card_id = 0;
|
|
313
|
-
}
|
|
314
|
-
return await api.post('checkout', payload).then((res) => {
|
|
315
|
-
if (res.redirect_url) {
|
|
316
|
-
window.location.href = res.redirect_url;
|
|
317
|
-
}
|
|
318
|
-
else if (res.url) {
|
|
319
|
-
idram(res);
|
|
320
|
-
setTimeout(() => {
|
|
321
|
-
if (idramFormRef.current) {
|
|
322
|
-
idramFormRef.current.submit();
|
|
323
|
-
resetCart();
|
|
324
|
-
}
|
|
325
|
-
}, 100);
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
resetCart();
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
};
|
|
332
|
-
useEffect(() => {
|
|
333
|
-
setCartState((prev) => ({ ...prev, loading: true }));
|
|
334
|
-
getCart();
|
|
335
|
-
if (isLoggedIn)
|
|
336
|
-
mergeCart();
|
|
337
|
-
}, [isCartPage, isCheckoutPage, selectedLang, isLoggedIn]);
|
|
338
|
-
useEffect(() => {
|
|
339
|
-
if (typeof window !== 'undefined') {
|
|
340
|
-
const params = new URLSearchParams(window.location.search);
|
|
341
|
-
if (params.get('cardSaved') === '1' && params.get('cardId')) {
|
|
342
|
-
fillCheckoutData({
|
|
343
|
-
paymentType: params.get('cardId'),
|
|
344
|
-
card_id: Number(params.get('cardId')),
|
|
345
|
-
});
|
|
346
|
-
params.delete('cardSaved');
|
|
347
|
-
params.delete('cardId');
|
|
348
|
-
const newUrl = `${window.location.pathname}?${params.toString()}`;
|
|
349
|
-
window.history.replaceState({}, '', newUrl);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}, []);
|
|
353
|
-
return (React.createElement(CartContext.Provider, { value: {
|
|
354
|
-
...cartState,
|
|
355
|
-
checkoutData,
|
|
356
|
-
getCart,
|
|
357
|
-
setCartState: (data) => setCartState((prev) => ({ ...prev, ...data })),
|
|
358
|
-
toggleCartItem,
|
|
359
|
-
deleteCartItem,
|
|
360
|
-
clearCart,
|
|
361
|
-
reorder,
|
|
362
|
-
mergeCart,
|
|
363
|
-
resetCart,
|
|
364
|
-
setCheckoutData,
|
|
365
|
-
fillCheckoutData,
|
|
366
|
-
handleCheckout,
|
|
367
|
-
fillCart,
|
|
368
|
-
setGifts,
|
|
369
|
-
togglePromotion,
|
|
370
|
-
checkoutBtnDisabled,
|
|
371
|
-
isCheckoutPage,
|
|
372
|
-
} },
|
|
373
|
-
children,
|
|
374
|
-
idramForm));
|
|
375
|
-
};
|
|
376
|
-
//# sourceMappingURL=CartProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartProvider.js","sourceRoot":"","sources":["../../../src/modules/cart/CartProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAC;AAC/G,OAAO,EACN,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,GAAG,EACH,SAAS,EACT,WAAW,GACX,MAAM,0BAA0B,CAAC;AA+DlC,MAAM,WAAW,GAAG,aAAa,CAA2B,EAAE,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAoB,CAAC;AAOxE,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,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