@faststore/core 3.44.2 → 3.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +122 -57
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +65 -73
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/129.js +1 -0
- package/.next/server/chunks/1506.js +1 -1
- package/.next/server/chunks/1999.js +1 -0
- package/.next/server/chunks/2091.js +1 -0
- package/.next/server/chunks/2230.js +1 -0
- package/.next/server/chunks/2773.js +1 -0
- package/.next/server/chunks/2880.js +1 -1
- package/.next/server/chunks/3006.js +1 -0
- package/.next/server/chunks/4289.js +2 -2
- package/.next/server/chunks/4559.js +16 -3
- package/.next/server/chunks/4746.js +1 -1
- package/.next/server/chunks/5636.js +2 -0
- package/.next/server/chunks/5772.js +1 -0
- package/.next/server/chunks/6594.js +1 -1
- package/.next/server/chunks/674.js +1 -1
- package/.next/server/chunks/7228.js +1 -1
- package/.next/server/chunks/8038.js +1 -0
- package/.next/server/chunks/804.js +1 -1
- package/.next/server/chunks/8307.js +1 -0
- package/.next/server/chunks/831.js +1 -1
- package/.next/server/chunks/8562.js +1 -1
- package/.next/server/chunks/8646.js +1 -1
- package/.next/server/chunks/9559.js +9 -0
- package/.next/server/chunks/9664.js +1 -0
- package/.next/server/chunks/UIBannerText.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account/403.js +1 -0
- package/.next/server/pages/account/403.js.nft.json +1 -0
- package/.next/server/pages/account/404.js +1 -0
- package/.next/server/pages/account/404.js.nft.json +1 -0
- package/.next/server/pages/account/[...unknown].js +1 -0
- package/.next/server/pages/account/[...unknown].js.nft.json +1 -0
- package/.next/server/pages/account/orders/[id].js +1 -0
- package/.next/server/pages/account/orders/[id].js.nft.json +1 -0
- package/.next/server/pages/account/orders.js +1 -0
- package/.next/server/pages/account/orders.js.nft.json +1 -0
- package/.next/server/pages/account/profile.js +1 -1
- package/.next/server/pages/account/profile.js.nft.json +1 -1
- package/.next/server/pages/account/security.js +1 -0
- package/.next/server/pages/account/security.js.nft.json +1 -0
- package/.next/server/pages/account/user-details.js +1 -0
- package/.next/server/pages/account/user-details.js.nft.json +1 -0
- package/.next/server/pages/account.js +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +2 -2
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account/403.html +28 -0
- package/.next/server/pages/en-US/account/403.json +1 -0
- package/.next/server/pages/en-US/account/404.html +28 -0
- package/.next/server/pages/en-US/account/404.json +1 -0
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/chunks/4349-e6912711a345e5b6.js +1 -0
- package/.next/static/chunks/4625-a77d5db94b3a2b8f.js +1 -0
- package/.next/static/chunks/4746.f94ab461c31311bb.js +1 -0
- package/.next/static/chunks/4774.0450cb0efbfe76f4.js +1 -0
- package/.next/static/chunks/5836.92639eae2107d7af.js +1 -0
- package/.next/static/chunks/630.a3bf6c7cd8c945e1.js +6 -0
- package/.next/static/chunks/6335-1380989b5cc84425.js +1 -0
- package/.next/static/chunks/{2004.a778e11dd3802b72.js → 6410.bd3fa399df59cc80.js} +1 -1
- package/.next/static/chunks/6536.be112cd4a3efe253.js +1 -0
- package/.next/static/chunks/6867.27c1cb57ed76dd02.js +1 -0
- package/.next/static/chunks/7498-9b4ed9d4a65914cc.js +1 -0
- package/.next/static/chunks/7959.df78bb2e81b8d29c.js +1 -0
- package/.next/static/chunks/{9.89f24163370f3a22.js → 9.1db9e34673fbd5c9.js} +1 -1
- package/.next/static/chunks/9540.19d844fec8517602.js +1 -0
- package/.next/static/chunks/{1418-e86227bcf9a5d486.js → 9770-6f30493e3f7ab51b.js} +3 -3
- package/.next/static/chunks/BannerNewsletter.3031c9944928c34a.js +1 -0
- package/.next/static/chunks/BannerText.ca4ae220fed6bdd6.js +1 -0
- package/.next/static/chunks/CartSidebar.3d23093834f2c79a.js +1 -0
- package/.next/static/chunks/{Dropdown.7fe839c5ffce4687.js → Dropdown.534482865327310f.js} +1 -1
- package/.next/static/chunks/{DropdownButton.3991a37657e1d194.js → DropdownButton.90e7cb14e5866e74.js} +1 -1
- package/.next/static/chunks/{DropdownItem.0b3c39f881ca0832.js → DropdownItem.e74df13f69f8c3aa.js} +1 -1
- package/.next/static/chunks/{DropdownMenu.943b2d11ffa50ff6.js → DropdownMenu.56cde48e9fbbefe5.js} +1 -1
- package/.next/static/chunks/{Footer.1f83637df0884013.js → Footer.4bb5645e731073e7.js} +1 -1
- package/.next/static/chunks/Newsletter.f87cd1eca34af5e1.js +1 -0
- package/.next/static/chunks/ProductShelf.9b64813b3d1f4c9a.js +1 -0
- package/.next/static/chunks/ProductTiles.ebf02b46a32f5a53.js +1 -0
- package/.next/static/chunks/RegionModal.cdf4facd086a88e0.js +1 -0
- package/.next/static/chunks/Toast.fbfeced8149ed940.js +1 -0
- package/.next/static/chunks/{UIBannerText.45cf608e46cde628.js → UIBannerText.ef0582cb5cb01720.js} +1 -1
- package/.next/static/chunks/UISKUMatrixSidebar.64a50464062c77e9.js +1 -0
- package/.next/static/chunks/UIToast.22fea5cca8ee2b21.js +1 -0
- package/.next/static/chunks/pages/{404-6300c433469b7262.js → 404-e89b928faf6b9125.js} +1 -1
- package/.next/static/chunks/pages/{500-2d1dd344c8a8827f.js → 500-604704ba70e1e80a.js} +1 -1
- package/.next/static/chunks/pages/[...slug]-f80d7d8c8c7948a4.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-748d6a1dbe59a2c8.js +1 -0
- package/.next/static/chunks/pages/_app-e5a4d3ef47f1b5c3.js +1 -0
- package/.next/static/chunks/pages/account/403-e4e6145815eeef01.js +1 -0
- package/.next/static/chunks/pages/account/404-ecfebfad41d655e9.js +1 -0
- package/.next/static/chunks/pages/account/[...unknown]-b233f92b64bd80cb.js +1 -0
- package/.next/static/chunks/pages/account/orders/[id]-8ab11c6c528911e9.js +1 -0
- package/.next/static/chunks/pages/account/orders-41bc5ef76c592a64.js +1 -0
- package/.next/static/chunks/pages/account/profile-2f501aabce910508.js +1 -0
- package/.next/static/chunks/pages/account/security-10e9e41318110950.js +1 -0
- package/.next/static/chunks/pages/account/user-details-5a7f30c290c25ec9.js +1 -0
- package/.next/static/chunks/pages/{checkout-93b647fc45454d97.js → checkout-cf3d3c3669a5e50b.js} +1 -1
- package/.next/static/chunks/pages/{index-07bc320fc045538c.js → index-e79b4e1ce52a8ea0.js} +1 -1
- package/.next/static/chunks/pages/{login-2454f1cd309c27d2.js → login-013b1f7a2b4bb9e0.js} +1 -1
- package/.next/static/chunks/pages/s-deeb7a0bdb02aaa9.js +1 -0
- package/.next/static/chunks/webpack-889c9cccd383a436.js +1 -0
- package/.next/static/css/2557aa3eaecf6ef0.css +1 -0
- package/.next/static/css/{b8945ac5f5327c34.css → 25ded555cb9a704f.css} +1 -1
- package/.next/static/css/5347dbc8b71de47d.css +1 -0
- package/.next/static/css/84d35f475d0dc928.css +1 -0
- package/.next/static/css/9d1abf05f9ffaf8f.css +1 -0
- package/.next/static/css/b7bba8fce075688b.css +1 -0
- package/.next/static/ptJ56QsnBqlWtpbKOLiri/_buildManifest.js +1 -0
- package/.next/static/ptJ56QsnBqlWtpbKOLiri/_ssgManifest.js +1 -0
- package/.next/trace +129 -112
- package/.turbo/turbo-build.log +40 -30
- package/.turbo/turbo-test.log +5 -5
- package/@generated/gql.ts +34 -2
- package/@generated/graphql.ts +1569 -2
- package/@generated/persisted-documents.json +4 -1
- package/@generated/schema.graphql +750 -0
- package/CHANGELOG.md +12 -0
- package/discovery.config.default.js +1 -1
- package/package.json +7 -8
- package/public/icons.svg +106 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawer.tsx +68 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerBody.tsx +21 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +39 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/index.ts +3 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/section.module.scss +125 -0
- package/src/components/account/MyAccountDrawer/OrganizationSignInButton/OrganizationSignInButton.tsx +50 -0
- package/src/components/account/MyAccountDrawer/OrganizationSignInButton/index.ts +1 -0
- package/src/components/account/MyAccountDrawer/ProfileSummary/ProfileSummary.tsx +69 -0
- package/src/components/account/MyAccountDrawer/ProfileSummary/profile-summary.scss +128 -0
- package/src/components/account/MyAccountLayout/MyAccountLayout.tsx +2 -2
- package/src/components/account/MyAccountLayout/styles.scss +8 -4
- package/src/components/account/MyAccountMenu/styles.scss +3 -2
- package/src/components/account/components/BottomSheet/BottomSheet.tsx +58 -0
- package/src/components/account/components/BottomSheet/styles.scss +35 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordion.tsx +13 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordionButton.tsx +35 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordionItem.tsx +21 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordionPanel.tsx +16 -0
- package/src/components/account/components/MyAccountAccordion/index.ts +4 -0
- package/src/components/account/components/MyAccountAccordion/styles.scss +88 -0
- package/src/components/account/components/MyAccountCard/MyAccountCard.tsx +13 -0
- package/src/components/account/components/MyAccountCard/index.ts +1 -0
- package/src/components/account/components/MyAccountCard/styles.scss +23 -0
- package/src/components/account/components/MyAccountStatusBadge/MyAccountStatusBadge.tsx +28 -0
- package/src/components/account/components/MyAccountStatusBadge/index.ts +1 -0
- package/src/components/account/components/MyAccountStatusBadge/styles.scss +54 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetDateRange/MyAccountFilterFacetDateRange.tsx +113 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetDateRange/index.ts +2 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetDateRange/styles.scss +43 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterSlider.tsx +209 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/section.module.scss +24 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +296 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersEmptyState/MyAccountListOrdersEmptyState.tsx +20 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersEmptyState/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersEmptyState/styles.scss +43 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +210 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +153 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/MyAccountSelectedTags.tsx +119 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/styles.scss +69 -0
- package/src/components/account/orders/MyAccountListOrders/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/styles.module.scss +100 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryCard/MyAccountDeliveryCard.tsx +47 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryCard/styles.scss +44 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordion.tsx +93 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordionDeliveryInfo.tsx +86 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordionProducts.tsx +74 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/index.ts +6 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/styles.scss +193 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountMoreInformationCard/MyAccountMoreInformationCard.tsx +31 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountMoreInformationCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountMoreInformationCard/styles.scss +22 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/MyAccountOrderActionModal.tsx +121 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/index.ts +2 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/styles.module.scss +40 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/useOrderActionModal.ts +38 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +154 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/styles.scss +33 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +106 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderedByCard/MyAccountOrderedByCard.tsx +54 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderedByCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderedByCard/styles.scss +65 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/MyAccountPaymentCard.tsx +157 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/MyAccountPaymentFlagsIcon.tsx +106 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/styles.scss +76 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/MyAccountStatusCard.tsx +276 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/styles.scss +205 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/useConnectorPositioning.ts +74 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountSummaryCard/MyAccountSummaryCard.tsx +92 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountSummaryCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountSummaryCard/styles.scss +45 -0
- package/src/components/account/orders/MyAccountOrderDetails/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/section.module.scss +114 -0
- package/src/components/account/utils/useFormatPrice.ts +18 -0
- package/src/components/cms/RenderSections.tsx +1 -1
- package/src/components/navigation/Navbar/Navbar.tsx +16 -1
- package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +18 -3
- package/src/customizations/src/myAccount/extensions/orders/[id]/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/orders/[id]/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/orders/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/orders/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/profile/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/profile/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/security/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/security/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/user-details/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/user-details/before.tsx +7 -0
- package/src/experimental/myAccountSeverSideProps.ts +12 -1
- package/src/pages/account/403.tsx +103 -0
- package/src/pages/account/404.tsx +95 -0
- package/src/pages/account/[...unknown].tsx +39 -0
- package/src/pages/account/index.tsx +8 -16
- package/src/pages/account/orders/[id].tsx +764 -0
- package/src/pages/account/orders/index.tsx +273 -0
- package/src/pages/account/orders/styles.module.scss +35 -0
- package/src/pages/account/profile.tsx +62 -17
- package/src/pages/account/security.tsx +94 -0
- package/src/pages/account/user-details.tsx +94 -0
- package/src/sdk/account/getMyAccountRoutes.ts +13 -12
- package/src/sdk/account/useApproveOrder.ts +53 -0
- package/src/sdk/account/useCancelOrder.ts +34 -0
- package/src/sdk/account/useDebounce.ts +23 -0
- package/src/sdk/account/useRejectOrder.ts +53 -0
- package/src/sdk/search/useMyAccountFilter.ts +157 -0
- package/src/sdk/session/index.ts +9 -0
- package/src/utils/myAccountRedirect.tsx +36 -0
- package/src/utils/userOrderStatus.ts +141 -0
- package/src/utils/utilities.ts +35 -3
- package/test/server/index.test.ts +9 -1
- package/.next/server/chunks/1246.js +0 -1
- package/.next/server/chunks/2443.js +0 -1
- package/.next/server/chunks/4725.js +0 -1
- package/.next/server/chunks/563.js +0 -1
- package/.next/server/chunks/6968.js +0 -10
- package/.next/server/chunks/7468.js +0 -1
- package/.next/server/chunks/8355.js +0 -1
- package/.next/static/chunks/1173.ca14a5bc4e1264f4.js +0 -1
- package/.next/static/chunks/2206.44239ce81a09bc17.js +0 -1
- package/.next/static/chunks/4349-87a956a73b97519c.js +0 -1
- package/.next/static/chunks/4625-553d20c86b0ca577.js +0 -1
- package/.next/static/chunks/4746.2e16ec0663a3873f.js +0 -1
- package/.next/static/chunks/4774.8e70c01dcd0ed4b3.js +0 -1
- package/.next/static/chunks/4865.4017be0f8e7c8cf0.js +0 -1
- package/.next/static/chunks/5259-90f7ef92cf24e49a.js +0 -1
- package/.next/static/chunks/5836.48126b7866819f9e.js +0 -1
- package/.next/static/chunks/630.13d3dd939b789798.js +0 -6
- package/.next/static/chunks/6335-6eb4ff84af184b88.js +0 -1
- package/.next/static/chunks/6536.d5260107222db13c.js +0 -1
- package/.next/static/chunks/7498-72289e704e7c7056.js +0 -1
- package/.next/static/chunks/7959.7c721505286572c0.js +0 -1
- package/.next/static/chunks/BannerNewsletter.8982f42e60ed8828.js +0 -1
- package/.next/static/chunks/BannerText.5b250db1cf67e44f.js +0 -1
- package/.next/static/chunks/CartSidebar.aa9e43be37034654.js +0 -1
- package/.next/static/chunks/Newsletter.9db4df2d4fb33227.js +0 -1
- package/.next/static/chunks/ProductShelf.9cea36116836c161.js +0 -1
- package/.next/static/chunks/ProductTiles.059a4a6360e1d4ea.js +0 -1
- package/.next/static/chunks/RegionModal.4594b707a1092551.js +0 -1
- package/.next/static/chunks/Toast.01d4ac8bf14c1be5.js +0 -1
- package/.next/static/chunks/UIButton.3186f933c0ecfb31.js +0 -1
- package/.next/static/chunks/UISKUMatrixSidebar.9ac3980a60cfc358.js +0 -1
- package/.next/static/chunks/UIToast.221eb10681d2f642.js +0 -1
- package/.next/static/chunks/pages/[...slug]-c1a62d58f5940747.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-555dc09a5e78260e.js +0 -1
- package/.next/static/chunks/pages/_app-d5641120092ee13b.js +0 -1
- package/.next/static/chunks/pages/account/profile-23b2e9fbbd95a30b.js +0 -1
- package/.next/static/chunks/pages/s-9901e6857f517b8b.js +0 -1
- package/.next/static/chunks/webpack-f338de6955d58a39.js +0 -1
- package/.next/static/css/249b9deaabc0d32d.css +0 -1
- package/.next/static/t5v5T1mAjzrYWEKaMk8mu/_buildManifest.js +0 -1
- package/.next/static/t5v5T1mAjzrYWEKaMk8mu/_ssgManifest.js +0 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
[data-fs-order-status-card] {
|
|
2
|
+
// --------------------------------------------------------
|
|
3
|
+
// Design Tokens for Order Status Card
|
|
4
|
+
// --------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
// Default properties
|
|
7
|
+
--fs-order-status-card-gap : var(--fs-spacing-1);
|
|
8
|
+
--fs-order-status-card-padding : var(--fs-spacing-3) var(--fs-spacing-2);
|
|
9
|
+
--fs-order-status-card-bkg-color : var(--fs-color-neutral-1);
|
|
10
|
+
--fs-order-status-card-border-radius : var(--fs-border-radius-medium);
|
|
11
|
+
|
|
12
|
+
// Step Icon
|
|
13
|
+
--fs-order-status-step-icon-size : var(--fs-spacing-4);
|
|
14
|
+
--fs-order-status-step-icon-half-size : calc(var(--fs-order-status-step-icon-size) / 2);
|
|
15
|
+
--fs-order-status-step-icon-border : var(--fs-border-width) solid var(--fs-border-color-light);
|
|
16
|
+
--fs-order-status-step-icon-border-radius : var(--fs-border-radius-circle);
|
|
17
|
+
--fs-order-status-step-icon-margin : var(--fs-spacing-0);
|
|
18
|
+
|
|
19
|
+
// Step Icon States
|
|
20
|
+
--fs-order-status-step-icon-completed-color : #08a822;
|
|
21
|
+
--fs-order-status-step-icon-failed-color : #5c5c5c;
|
|
22
|
+
--fs-order-status-step-icon-loading-color : var(--fs-color-neutral-4);
|
|
23
|
+
--fs-order-status-step-icon-text-color : var(--fs-color-neutral-0);
|
|
24
|
+
|
|
25
|
+
// Step Content
|
|
26
|
+
--fs-order-status-step-content-gap : var(--fs-spacing-0);
|
|
27
|
+
--fs-order-status-step-label-size : var(--fs-text-size-2);
|
|
28
|
+
--fs-order-status-step-label-weight : var(--fs-text-weight-medium);
|
|
29
|
+
--fs-order-status-step-label-line-height : 1.25;
|
|
30
|
+
--fs-order-status-step-details-size : var(--fs-text-size-1);
|
|
31
|
+
|
|
32
|
+
// Step States Colors
|
|
33
|
+
--fs-order-status-step-loading-color : var(--fs-color-neutral-5);
|
|
34
|
+
--fs-order-status-step-completed-color : var(--fs-color-text);
|
|
35
|
+
--fs-order-status-step-failed-color : var(--fs-color-text);
|
|
36
|
+
--fs-order-status-step-not-started-color : var(--fs-color-disabled-text);
|
|
37
|
+
|
|
38
|
+
// Connector
|
|
39
|
+
--fs-order-status-connector-color : var(--fs-border-color-light);
|
|
40
|
+
--fs-order-status-connector-completed-color : var(--fs-order-status-step-icon-completed-color);
|
|
41
|
+
--fs-order-status-connector-spacing : var(--fs-spacing-0);
|
|
42
|
+
|
|
43
|
+
// Desktop Specific
|
|
44
|
+
--fs-order-status-step-desktop-height : 7.75rem;
|
|
45
|
+
--fs-order-status-step-desktop-min-width : 6.25rem;
|
|
46
|
+
--fs-order-status-step-desktop-max-width : 9rem;
|
|
47
|
+
--fs-order-status-connector-desktop-spacing : 0.625rem;
|
|
48
|
+
|
|
49
|
+
[data-fs-card-body] {
|
|
50
|
+
@include media(">=notebook") {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[data-fs-order-status-content] {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: var(--fs-order-status-card-gap);
|
|
61
|
+
width: 100%;
|
|
62
|
+
overflow-x: auto;
|
|
63
|
+
|
|
64
|
+
@include media(">=notebook") {
|
|
65
|
+
flex-direction: row;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-fs-shipping-step] {
|
|
72
|
+
position: relative;
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: var(--fs-spacing-1);
|
|
75
|
+
align-items: center;
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: var(--fs-order-status-card-padding);
|
|
78
|
+
|
|
79
|
+
&[data-fs-shipping-status="loading"] {
|
|
80
|
+
z-index: -1;
|
|
81
|
+
background-color: var(--fs-order-status-card-bkg-color);
|
|
82
|
+
border-radius: var(--fs-order-status-card-border-radius);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@include media(">=notebook") {
|
|
86
|
+
flex: 1;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
gap: var(--fs-spacing-2);
|
|
89
|
+
align-items: center;
|
|
90
|
+
width: clamp(var(--fs-order-status-step-desktop-min-width), calc((100% - (5 * var(--fs-spacing-2))) / 6), var(--fs-order-status-step-desktop-max-width));
|
|
91
|
+
min-width: var(--fs-order-status-step-desktop-min-width);
|
|
92
|
+
max-width: var(--fs-order-status-step-desktop-max-width);
|
|
93
|
+
height: var(--fs-order-status-step-desktop-height);
|
|
94
|
+
text-align: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-fs-shipping-step-icon] {
|
|
98
|
+
position: relative;
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
width: var(--fs-order-status-step-icon-size);
|
|
104
|
+
height: var(--fs-order-status-step-icon-size);
|
|
105
|
+
margin: var(--fs-order-status-step-icon-margin);
|
|
106
|
+
|
|
107
|
+
[data-fs-icon] {
|
|
108
|
+
color: var(--fs-color-neutral-0);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&[data-fs-shipping-step-completed] {
|
|
112
|
+
background-color: var(--fs-order-status-step-icon-completed-color);
|
|
113
|
+
border-radius: var(--fs-order-status-step-icon-border-radius);
|
|
114
|
+
|
|
115
|
+
[class*="icon"] {
|
|
116
|
+
color: var(--fs-order-status-step-icon-text-color);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&[data-fs-shipping-step-failed] {
|
|
121
|
+
background-color: var(--fs-order-status-step-icon-failed-color);
|
|
122
|
+
border-radius: var(--fs-order-status-step-icon-border-radius);
|
|
123
|
+
|
|
124
|
+
[class*="icon"] {
|
|
125
|
+
color: var(--fs-order-status-step-icon-text-color);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[data-fs-shipping-step-loading] {
|
|
130
|
+
background-color: var(--fs-order-status-step-icon-loading-color);
|
|
131
|
+
border-radius: var(--fs-order-status-step-icon-border-radius);
|
|
132
|
+
|
|
133
|
+
[class*="icon"] {
|
|
134
|
+
color: var(--fs-order-status-step-icon-text-color);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:not([data-fs-shipping-step-completed]):not([data-fs-shipping-step-loading]) {
|
|
139
|
+
border: var(--fs-order-status-step-icon-border);
|
|
140
|
+
border-radius: var(--fs-order-status-step-icon-border-radius);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
[data-fs-shipping-step-content] {
|
|
145
|
+
display: flex;
|
|
146
|
+
flex: 1;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
gap: var(--fs-order-status-step-content-gap);
|
|
149
|
+
|
|
150
|
+
@include media(">=notebook") {
|
|
151
|
+
text-align: center;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
[data-fs-shipping-step-label] {
|
|
156
|
+
font-size: var(--fs-order-status-step-label-size);
|
|
157
|
+
font-weight: var(--fs-order-status-step-label-weight);
|
|
158
|
+
line-height: var(--fs-order-status-step-label-line-height);
|
|
159
|
+
color: var(--fs-color-text);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[data-fs-shipping-step-details] {
|
|
163
|
+
display: flex;
|
|
164
|
+
font-size: var(--fs-order-status-step-details-size);
|
|
165
|
+
color: var(--fs-color-text-light);
|
|
166
|
+
|
|
167
|
+
@include media(">=notebook") {
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-fs-shipping-connector] {
|
|
173
|
+
position: absolute;
|
|
174
|
+
background-color: var(--fs-order-status-connector-color);
|
|
175
|
+
|
|
176
|
+
&[data-fs-shipping-connector-status="completed"] {
|
|
177
|
+
background-color: var(--fs-order-status-connector-completed-color);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
[data-fs-shipping-status="loading"] {
|
|
183
|
+
[data-fs-shipping-step-label] {
|
|
184
|
+
color: var(--fs-order-status-step-loading-color);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[data-fs-shipping-status="completed"] {
|
|
189
|
+
[data-fs-shipping-step-label] {
|
|
190
|
+
color: var(--fs-order-status-step-completed-color);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
[data-fs-shipping-status="not-started"] {
|
|
195
|
+
[data-fs-shipping-step-label] {
|
|
196
|
+
color: var(--fs-order-status-step-not-started-color);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-fs-shipping-status="failed"] {
|
|
201
|
+
[data-fs-shipping-step-label] {
|
|
202
|
+
color: var(--fs-order-status-step-failed-color);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useEffect } from 'react'
|
|
2
|
+
import useScreenResize from 'src/sdk/ui/useScreenResize'
|
|
3
|
+
|
|
4
|
+
export function useConnectorPositioning(
|
|
5
|
+
containerRef: React.RefObject<HTMLDivElement>
|
|
6
|
+
) {
|
|
7
|
+
const { isDesktop, isMobile, isTablet } = useScreenResize()
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const container = containerRef.current
|
|
11
|
+
if (!container) return
|
|
12
|
+
|
|
13
|
+
const calculateContainerGap = () => {
|
|
14
|
+
// Get all steps
|
|
15
|
+
const steps = container.querySelectorAll(
|
|
16
|
+
'[data-fs-shipping-step]'
|
|
17
|
+
) as NodeListOf<HTMLElement>
|
|
18
|
+
|
|
19
|
+
if (steps.length === 0) return
|
|
20
|
+
|
|
21
|
+
// Get container width
|
|
22
|
+
const containerWidth = container.offsetWidth
|
|
23
|
+
|
|
24
|
+
// Calculate total step width
|
|
25
|
+
let totalStepWidth = 0
|
|
26
|
+
steps.forEach((step) => {
|
|
27
|
+
totalStepWidth += step.offsetWidth
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
// Calculate gap width
|
|
31
|
+
const numberOfGaps = steps.length - 1
|
|
32
|
+
const totalGapSpace = containerWidth - totalStepWidth
|
|
33
|
+
const gapWidth = totalGapSpace / numberOfGaps
|
|
34
|
+
|
|
35
|
+
return gapWidth
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const setUpConnectorPositioning = () => {
|
|
39
|
+
const connectors = container.querySelectorAll(
|
|
40
|
+
'[data-fs-shipping-connector]'
|
|
41
|
+
) as NodeListOf<HTMLElement>
|
|
42
|
+
|
|
43
|
+
if (connectors.length === 0) return
|
|
44
|
+
|
|
45
|
+
if (isDesktop) {
|
|
46
|
+
const containerGap = calculateContainerGap()
|
|
47
|
+
connectors.forEach((connector) => {
|
|
48
|
+
connector.style.top =
|
|
49
|
+
'calc(1rem + var(--fs-order-status-step-icon-margin) + var(--fs-order-status-step-icon-half-size))'
|
|
50
|
+
connector.style.left =
|
|
51
|
+
'calc(50% + var(--fs-order-status-step-icon-half-size) + var(--fs-order-status-card-gap))'
|
|
52
|
+
connector.style.width = `calc(((50% - var(--fs-order-status-step-icon-half-size) - var(--fs-order-status-card-gap)) * 2) + ${containerGap}px)`
|
|
53
|
+
connector.style.height = 'var(--fs-border-width)'
|
|
54
|
+
})
|
|
55
|
+
} else {
|
|
56
|
+
connectors.forEach((connector) => {
|
|
57
|
+
connector.style.top =
|
|
58
|
+
'calc(50% + var(--fs-order-status-step-icon-half-size) + var(--fs-order-status-connector-spacing))'
|
|
59
|
+
connector.style.left =
|
|
60
|
+
'calc(var(--fs-spacing-2) + var(--fs-order-status-step-icon-half-size) + var(--fs-order-status-step-icon-margin))'
|
|
61
|
+
connector.style.width = 'var(--fs-border-width)'
|
|
62
|
+
connector.style.height =
|
|
63
|
+
'calc((50% - var(--fs-order-status-step-icon-half-size)) + var(--fs-order-status-card-gap) + (50% - var(--fs-order-status-step-icon-half-size)) - (var(--fs-order-status-connector-spacing) * 2))'
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Calculate on mount and window resize
|
|
69
|
+
setUpConnectorPositioning()
|
|
70
|
+
window.addEventListener('resize', setUpConnectorPositioning)
|
|
71
|
+
|
|
72
|
+
return () => window.removeEventListener('resize', setUpConnectorPositioning)
|
|
73
|
+
}, [containerRef, isDesktop])
|
|
74
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import MyAccountCard from 'src/components/account/components/MyAccountCard'
|
|
2
|
+
import { useFormatPrice } from 'src/components/account/utils/useFormatPrice'
|
|
3
|
+
import { useSession } from 'src/sdk/session'
|
|
4
|
+
|
|
5
|
+
// Interface for order totals (items, shipping, discounts)
|
|
6
|
+
// TODO: Use type from API
|
|
7
|
+
interface Total {
|
|
8
|
+
id: string
|
|
9
|
+
name: string
|
|
10
|
+
value: number
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Interface for payment transactions
|
|
14
|
+
// TODO: Use type from API
|
|
15
|
+
interface Transaction {
|
|
16
|
+
isActive: boolean
|
|
17
|
+
payments: Array<{
|
|
18
|
+
value: number
|
|
19
|
+
referenceValue: number
|
|
20
|
+
}>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface MyAccountSummaryCardProps {
|
|
24
|
+
totals: Total[]
|
|
25
|
+
currencyCode: string
|
|
26
|
+
transactions: Transaction[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function MyAccountSummaryCard({
|
|
30
|
+
totals,
|
|
31
|
+
currencyCode,
|
|
32
|
+
transactions,
|
|
33
|
+
}: MyAccountSummaryCardProps) {
|
|
34
|
+
const formatPrice = useFormatPrice()
|
|
35
|
+
|
|
36
|
+
// Calculate any payment surcharges from active transactions
|
|
37
|
+
const calculatePaymentSurcharge = () => {
|
|
38
|
+
let surchargeAmount = 0
|
|
39
|
+
|
|
40
|
+
transactions.forEach((transaction) => {
|
|
41
|
+
if (transaction.isActive) {
|
|
42
|
+
transaction.payments.forEach((payment) => {
|
|
43
|
+
const baseAmount =
|
|
44
|
+
payment.referenceValue === 0
|
|
45
|
+
? payment.value
|
|
46
|
+
: payment.referenceValue
|
|
47
|
+
const additionalCharge = payment.value - baseAmount
|
|
48
|
+
surchargeAmount += additionalCharge
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
return surchargeAmount
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const getDisplayTotals = () => {
|
|
57
|
+
const surchargeAmount = calculatePaymentSurcharge()
|
|
58
|
+
|
|
59
|
+
if (surchargeAmount > 0) {
|
|
60
|
+
const interestLineItem = {
|
|
61
|
+
id: 'Interest',
|
|
62
|
+
name: 'Interest',
|
|
63
|
+
value: surchargeAmount,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return [...totals, interestLineItem]
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return totals
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const displayTotals = getDisplayTotals()
|
|
73
|
+
|
|
74
|
+
const totalAmount = displayTotals.reduce((sum, total) => sum + total.value, 0)
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<MyAccountCard title="Summary" data-fs-order-summary-card>
|
|
78
|
+
{displayTotals.map((total) => (
|
|
79
|
+
<div key={total.id} data-fs-order-summary-item>
|
|
80
|
+
<span>{total.name}</span>
|
|
81
|
+
<span>{formatPrice(total.value, currencyCode)}</span>
|
|
82
|
+
</div>
|
|
83
|
+
))}
|
|
84
|
+
<div data-fs-order-summary-item data-fs-order-summary-total>
|
|
85
|
+
<span>Total</span>
|
|
86
|
+
<span>{formatPrice(totalAmount, currencyCode)}</span>
|
|
87
|
+
</div>
|
|
88
|
+
</MyAccountCard>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export default MyAccountSummaryCard
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MyAccountSummaryCard'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[data-fs-order-summary-card] {
|
|
2
|
+
// --------------------------------------------------------
|
|
3
|
+
// Design Tokens for Order Summary Card
|
|
4
|
+
// --------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
// Default properties
|
|
7
|
+
--fs-order-summary-card-gap : var(--fs-spacing-1);
|
|
8
|
+
--fs-order-summary-card-item-font-size : var(--fs-text-size-2);
|
|
9
|
+
--fs-order-summary-card-item-line-height : var(--fs-spacing-4);
|
|
10
|
+
--fs-order-summary-card-item-letter-spacing : -2%;
|
|
11
|
+
--fs-order-summary-card-item-font-weight : var(--fs-text-weight-regular);
|
|
12
|
+
--fs-order-summary-card-total-font-weight : var(--fs-text-weight-semibold);
|
|
13
|
+
--fs-order-summary-card-total-border : 1px solid var(--fs-border-color-light);
|
|
14
|
+
--fs-order-summary-card-total-margin-top : var(--fs-spacing-2);
|
|
15
|
+
--fs-order-summary-card-total-padding-top : var(--fs-spacing-2);
|
|
16
|
+
|
|
17
|
+
[data-fs-card-body] {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: var(--fs-order-summary-card-gap);
|
|
21
|
+
|
|
22
|
+
[data-fs-order-summary-item] {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
|
|
27
|
+
span {
|
|
28
|
+
font-size: var(--fs-order-summary-card-item-font-size);
|
|
29
|
+
font-weight: var(--fs-order-summary-card-item-font-weight);
|
|
30
|
+
line-height: var(--fs-order-summary-card-item-line-height);
|
|
31
|
+
letter-spacing: var(--fs-order-summary-card-item-letter-spacing);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&[data-fs-order-summary-total] {
|
|
35
|
+
padding-top: var(--fs-order-summary-card-total-padding-top);
|
|
36
|
+
margin-top: var(--fs-order-summary-card-total-margin-top);
|
|
37
|
+
border-top: var(--fs-order-summary-card-total-border);
|
|
38
|
+
|
|
39
|
+
span {
|
|
40
|
+
font-weight: var(--fs-order-summary-card-total-font-weight);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MyAccountOrderDetails'
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.page {
|
|
2
|
+
@import "@faststore/ui/src/components/atoms/Icon/styles.scss";
|
|
3
|
+
@import "@faststore/ui/src/components/atoms/Badge/styles.scss";
|
|
4
|
+
@import "@faststore/ui/src/components/atoms/Button/styles.scss";
|
|
5
|
+
@import "@faststore/ui/src/components/molecules/Card/styles.scss";
|
|
6
|
+
@import "../../components/MyAccountAccordion/styles.scss";
|
|
7
|
+
@import "../../components/MyAccountCard/styles.scss";
|
|
8
|
+
@import "../../components/MyAccountStatusBadge/styles.scss";
|
|
9
|
+
@import "./MyAccountSummaryCard/styles.scss";
|
|
10
|
+
@import "./MyAccountOrderedByCard/styles.scss";
|
|
11
|
+
@import "./MyAccountDeliveryCard/styles.scss";
|
|
12
|
+
@import "./MyAccountPaymentCard/styles.scss";
|
|
13
|
+
@import "./MyAccountDeliveryOptionAccordion/styles.scss";
|
|
14
|
+
@import "./MyAccountOrderActions/styles.scss";
|
|
15
|
+
@import "./MyAccountStatusCard/styles.scss";
|
|
16
|
+
@import "./MyAccountMoreInformationCard/styles.scss";
|
|
17
|
+
|
|
18
|
+
// --------------------------------------------------------
|
|
19
|
+
// Design Tokens
|
|
20
|
+
// --------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
// Default properties
|
|
23
|
+
--fs-order-details-padding : var(--fs-spacing-5) 20px;
|
|
24
|
+
|
|
25
|
+
// Header
|
|
26
|
+
--fs-order-details-header-gap : var(--fs-spacing-3);
|
|
27
|
+
--fs-order-details-header-margin-bottom : var(--fs-spacing-4);
|
|
28
|
+
--fs-order-details-header-padding : 0;
|
|
29
|
+
--fs-order-details-header-weight : var(--fs-text-weight-semibold);
|
|
30
|
+
--fs-order-details-header-size : var(--fs-text-size-4);
|
|
31
|
+
--fs-order-details-header-line-height : 1.33;
|
|
32
|
+
|
|
33
|
+
// Content
|
|
34
|
+
--fs-order-details-content-gap : var(--fs-spacing-4);
|
|
35
|
+
|
|
36
|
+
// --------------------------------------------------------
|
|
37
|
+
// Structural Styles
|
|
38
|
+
// --------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
padding: var(--fs-order-details-padding);
|
|
41
|
+
|
|
42
|
+
@include media (">=notebook") {
|
|
43
|
+
--fs-order-details-padding : 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-fs-order-details-header] {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: var(--fs-order-details-header-gap);
|
|
50
|
+
align-items: flex-start;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
padding: var(--fs-order-details-header-padding);
|
|
53
|
+
margin-bottom: var(--fs-order-details-header-margin-bottom);
|
|
54
|
+
|
|
55
|
+
@include media (">tablet") {
|
|
56
|
+
--fs-order-details-header-gap : var(--fs-spacing-2);
|
|
57
|
+
--fs-order-details-header-margin-bottom : 0;
|
|
58
|
+
--fs-order-details-header-padding : var(--fs-spacing-6) 0;
|
|
59
|
+
|
|
60
|
+
flex-flow: row;
|
|
61
|
+
align-items: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-fs-order-details-header-title] {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
gap: var(--fs-spacing-1);
|
|
68
|
+
align-items: center;
|
|
69
|
+
|
|
70
|
+
[data-fs-order-details-header-back-button] {
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[data-fs-order-details-header-title-wrapper] {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: var(--fs-spacing-1);
|
|
78
|
+
align-items: center;
|
|
79
|
+
|
|
80
|
+
@include media(">tablet") {
|
|
81
|
+
flex-flow: row wrap;
|
|
82
|
+
align-items: center;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-fs-order-details-header-title-text] {
|
|
87
|
+
font-size: var(--fs-order-details-header-size);
|
|
88
|
+
font-weight: var(--fs-order-details-header-weight);
|
|
89
|
+
line-height: var(--fs-order-details-header-line-height);
|
|
90
|
+
|
|
91
|
+
@include truncate-title(1);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-fs-order-details-content] {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: var(--fs-order-details-content-gap);
|
|
100
|
+
|
|
101
|
+
@include media (">=notebook") {
|
|
102
|
+
display: grid;
|
|
103
|
+
grid-template-columns: repeat(2, 1fr);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-fs-order-status-card] {
|
|
107
|
+
grid-column: span 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-fs-delivery-option-accordion] {
|
|
111
|
+
grid-column: span 2;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useSession } from 'src/sdk/session'
|
|
2
|
+
import { useCallback } from 'react'
|
|
3
|
+
|
|
4
|
+
// Format price values according to the specified currency (converts cents to standard units)
|
|
5
|
+
export const useFormatPrice = () => {
|
|
6
|
+
const { locale } = useSession()
|
|
7
|
+
|
|
8
|
+
return useCallback(
|
|
9
|
+
(value: number, currencyCode: string) => {
|
|
10
|
+
return new Intl.NumberFormat(locale, {
|
|
11
|
+
style: 'currency',
|
|
12
|
+
currency: currencyCode,
|
|
13
|
+
minimumFractionDigits: 2,
|
|
14
|
+
}).format(value / 100)
|
|
15
|
+
},
|
|
16
|
+
[locale]
|
|
17
|
+
)
|
|
18
|
+
}
|
|
@@ -10,7 +10,10 @@ import Link from 'src/components/ui/Link'
|
|
|
10
10
|
import Logo from 'src/components/ui/Logo'
|
|
11
11
|
import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
|
|
12
12
|
|
|
13
|
+
import storeConfig from 'discovery.config'
|
|
13
14
|
import dynamic from 'next/dynamic'
|
|
15
|
+
import { OrganizationSignInButton } from 'src/components/account/MyAccountDrawer/OrganizationSignInButton'
|
|
16
|
+
import { useSession } from 'src/sdk/session'
|
|
14
17
|
import useScreenResize from 'src/sdk/ui/useScreenResize'
|
|
15
18
|
import type { NavbarProps as SectionNavbarProps } from '../../sections/Navbar'
|
|
16
19
|
|
|
@@ -98,9 +101,16 @@ function Navbar({
|
|
|
98
101
|
const scrollDirection = useScrollDirection()
|
|
99
102
|
const { openNavbar, navbar: displayNavbar } = useUI()
|
|
100
103
|
const { isDesktop, isMobile } = useScreenResize()
|
|
104
|
+
const { person, b2b } = useSession()
|
|
101
105
|
|
|
102
106
|
const searchMobileRef = useRef<SearchInputRef>(null)
|
|
103
107
|
const [searchExpanded, setSearchExpanded] = useState(false)
|
|
108
|
+
const isFaststoreMyAccountEnabled =
|
|
109
|
+
storeConfig.experimental?.enableFaststoreMyAccount
|
|
110
|
+
|
|
111
|
+
const isRepresentative = b2b?.isRepresentative
|
|
112
|
+
|
|
113
|
+
const isOrganizationEnabled = isFaststoreMyAccountEnabled && isRepresentative
|
|
104
114
|
|
|
105
115
|
const handlerExpandSearch = useCallback(() => {
|
|
106
116
|
setSearchExpanded(true)
|
|
@@ -176,7 +186,12 @@ function Navbar({
|
|
|
176
186
|
aria-hidden={!searchExpanded}
|
|
177
187
|
/>
|
|
178
188
|
)}
|
|
179
|
-
{!isMobile &&
|
|
189
|
+
{!isMobile &&
|
|
190
|
+
(isOrganizationEnabled ? (
|
|
191
|
+
<OrganizationSignInButton icon={signInButton.icon} />
|
|
192
|
+
) : (
|
|
193
|
+
<ButtonSignIn.Component {...signInButton} />
|
|
194
|
+
))}
|
|
180
195
|
|
|
181
196
|
<CartToggle {...cart} />
|
|
182
197
|
</NavbarButtons.Component>
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { useFadeEffect, useUI } from '@faststore/ui'
|
|
2
2
|
import { Suspense } from 'react'
|
|
3
3
|
|
|
4
|
+
import storeConfig from 'discovery.config'
|
|
5
|
+
import NavbarLinks from 'src/components/navigation/NavbarLinks'
|
|
4
6
|
import { ButtonSignInFallback } from 'src/components/ui/Button'
|
|
5
7
|
import Link from 'src/components/ui/Link'
|
|
6
|
-
import NavbarLinks from 'src/components/navigation/NavbarLinks'
|
|
7
8
|
import Logo from 'src/components/ui/Logo'
|
|
8
9
|
|
|
9
10
|
import type { NavbarProps } from '../Navbar'
|
|
10
11
|
|
|
11
|
-
import
|
|
12
|
+
import { OrganizationSignInButton } from 'src/components/account/MyAccountDrawer/OrganizationSignInButton'
|
|
12
13
|
import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
|
|
14
|
+
import { useSession } from 'src/sdk/session'
|
|
15
|
+
import styles from './section.module.scss'
|
|
13
16
|
|
|
14
17
|
interface NavbarSliderProps {
|
|
15
18
|
logo: NavbarProps['logo']
|
|
@@ -36,6 +39,14 @@ function NavbarSlider({
|
|
|
36
39
|
|
|
37
40
|
const { closeNavbar } = useUI()
|
|
38
41
|
const { fade, fadeOut } = useFadeEffect()
|
|
42
|
+
const { b2b } = useSession()
|
|
43
|
+
|
|
44
|
+
const isFaststoreMyAccountEnabled =
|
|
45
|
+
storeConfig.experimental?.enableFaststoreMyAccount
|
|
46
|
+
|
|
47
|
+
const isRepresentative = b2b?.isRepresentative
|
|
48
|
+
|
|
49
|
+
const isOrganizationEnabled = isFaststoreMyAccountEnabled && isRepresentative
|
|
39
50
|
|
|
40
51
|
return (
|
|
41
52
|
<NavbarSliderWrapper.Component
|
|
@@ -65,7 +76,11 @@ function NavbarSlider({
|
|
|
65
76
|
</NavbarSliderContent.Component>
|
|
66
77
|
<NavbarSliderFooter.Component {...NavbarSliderFooter.props}>
|
|
67
78
|
<Suspense fallback={<ButtonSignInFallback />}>
|
|
68
|
-
|
|
79
|
+
{isOrganizationEnabled ? (
|
|
80
|
+
<OrganizationSignInButton icon={signInButton.icon} />
|
|
81
|
+
) : (
|
|
82
|
+
<ButtonSignIn.Component {...signInButton} />
|
|
83
|
+
)}
|
|
69
84
|
</Suspense>
|
|
70
85
|
</NavbarSliderFooter.Component>
|
|
71
86
|
</NavbarSliderWrapper.Component>
|