@faststore/core 3.91.0 → 3.91.2
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 +43 -43
- 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 +10 -10
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/4168.js +1 -1
- package/.next/server/chunks/870.js +1 -1
- package/.next/server/chunks/8737.js +1 -0
- package/.next/server/chunks/948.js +1 -1
- package/.next/server/chunks/9563.js +1 -1
- package/.next/server/chunks/9630.js +1 -1
- package/.next/server/chunks/UISKUMatrixSidebar.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.nft.json +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/api/graphql.js +1 -1
- 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.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US.html +1 -1
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/403.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/404.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/[...unknown].js.nft.json +1 -1
- package/.next/server/pages/pvt/account/orders/[id].js +1 -1
- package/.next/server/pages/pvt/account/orders/[id].js.nft.json +1 -1
- package/.next/server/pages/pvt/account/orders.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/profile.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/security.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/user-details.js.nft.json +1 -1
- package/.next/server/pages/pvt/account.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/{2927.5a79877943a6bf7c.js → 2927.23bae2c79f0ac0f3.js} +1 -1
- package/.next/static/chunks/4803.18fbf77cd924d443.js +1 -0
- package/.next/static/chunks/{7191-7fb36e620e08cb4c.js → 7191-eef95438b827504b.js} +1 -1
- package/.next/static/chunks/9173-51ba7ca2f546f879.js +1 -0
- package/.next/static/chunks/9979.aedbc094bdc2c599.js +1 -0
- package/.next/static/chunks/{RegionSlider.d295bcc2f86210cd.js → RegionSlider.13955219e942a100.js} +1 -1
- package/.next/static/chunks/UISKUMatrixSidebar.2cfa8552a84d2f5f.js +1 -0
- package/.next/static/chunks/UIToast.de15325248043ce5.js +1 -0
- package/.next/static/chunks/pages/[slug]/{p-323813ea2a7455fb.js → p-5f89d29d02064f15.js} +1 -1
- package/.next/static/chunks/pages/_app-e8ac4d8f914feb94.js +1 -0
- package/.next/static/chunks/pages/{index-5c3eb58eefd7cb0f.js → index-f285046ed161df07.js} +1 -1
- package/.next/static/chunks/pages/pvt/account/orders/[id]-22c8d393fc857a39.js +1 -0
- package/.next/static/chunks/pages/{s-5319ae49907c3391.js → s-a056370e5ad4366b.js} +1 -1
- package/.next/static/chunks/{webpack-083c0d59a2221fa9.js → webpack-95c6847556354c4b.js} +1 -1
- package/.next/static/e1Iy_PbcFsZ57QejzRzyL/_buildManifest.js +1 -0
- package/.next/trace +138 -138
- package/.turbo/turbo-build.log +22 -22
- package/.turbo/turbo-test.log +5 -5
- package/CHANGELOG.md +13 -0
- package/discovery.config.default.js +1 -1
- package/package.json +7 -7
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountBuyingPolicyAlert/MyAccountBuyingPolicyAlert.tsx +5 -2
- package/src/components/navigation/Navbar/Navbar.tsx +20 -12
- package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +15 -8
- package/src/pages/s.tsx +12 -12
- package/src/sdk/session/index.ts +76 -4
- package/.next/server/chunks/5335.js +0 -1
- package/.next/static/FslBA_VdamNtaqLHejDIJ/_buildManifest.js +0 -1
- package/.next/static/chunks/2561.c30def9d5569bd92.js +0 -1
- package/.next/static/chunks/4803.c1405eca2ccf78c8.js +0 -1
- package/.next/static/chunks/9173-045983ab6e18cfb4.js +0 -1
- package/.next/static/chunks/UISKUMatrixSidebar.072f0b5bf8e172f6.js +0 -1
- package/.next/static/chunks/UIToast.5b849b0ef95e25ce.js +0 -1
- package/.next/static/chunks/pages/_app-43bcb55c76e1d67e.js +0 -1
- package/.next/static/chunks/pages/pvt/account/orders/[id]-459f6b9a86780410.js +0 -1
- /package/.next/static/{FslBA_VdamNtaqLHejDIJ → e1Iy_PbcFsZ57QejzRzyL}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.91.1 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.
|
|
6
|
+
> @faststore/core@3.91.1 partytown /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> partytown copylib ./public/~partytown
|
|
8
8
|
|
|
9
9
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
10
10
|
|
|
11
|
-
> @faststore/core@3.
|
|
11
|
+
> @faststore/core@3.91.1 generate /home/runner/work/faststore/faststore/packages/core
|
|
12
12
|
> na run generate:schema && na run generate:codegen && na run format:generated
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
> @faststore/core@3.
|
|
15
|
+
> @faststore/core@3.91.1 generate:schema /home/runner/work/faststore/faststore/packages/core
|
|
16
16
|
> tsx src/server/generator/generateGraphQLSchemaFile.ts
|
|
17
17
|
|
|
18
18
|
Schema GraphQL file generated successfully
|
|
19
19
|
|
|
20
|
-
> @faststore/core@3.
|
|
20
|
+
> @faststore/core@3.91.1 generate:codegen /home/runner/work/faststore/faststore/packages/core
|
|
21
21
|
> graphql-codegen
|
|
22
22
|
|
|
23
23
|
[STARTED] Parse Configuration
|
|
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
|
|
|
37
37
|
[CLI] Loading Documents
|
|
38
38
|
[CLI] Generating output
|
|
39
39
|
|
|
40
|
-
> @faststore/core@3.
|
|
40
|
+
> @faststore/core@3.91.1 format:generated /home/runner/work/faststore/faststore/packages/core
|
|
41
41
|
> prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
> @faststore/core@3.
|
|
44
|
+
> @faststore/core@3.91.1 build /home/runner/work/faststore/faststore/packages/core
|
|
45
45
|
> next build
|
|
46
46
|
|
|
47
47
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
@@ -73,42 +73,42 @@ Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Cont
|
|
|
73
73
|
Collecting build traces ...
|
|
74
74
|
|
|
75
75
|
Route (pages) Size First Load JS
|
|
76
|
-
┌ ● / 7.
|
|
76
|
+
┌ ● / 7.36 kB 146 kB
|
|
77
77
|
├ └ css/c29fee5b9f9d48d9.css 3.07 kB
|
|
78
|
-
├ /_app 0 B
|
|
78
|
+
├ /_app 0 B 108 kB
|
|
79
79
|
├ ● /[...slug] 2.49 kB 156 kB
|
|
80
|
-
├ ● /[slug]/p 97.
|
|
80
|
+
├ ● /[slug]/p 97.5 kB 236 kB
|
|
81
81
|
├ └ css/a9328b56f3942b82.css 22 kB
|
|
82
82
|
├ ○ /404 1.57 kB 140 kB
|
|
83
83
|
├ ● /500 1.57 kB 140 kB
|
|
84
|
-
├ λ /api/graphql 0 B
|
|
85
|
-
├ λ /api/health/live 0 B
|
|
86
|
-
├ λ /api/health/ready 0 B
|
|
87
|
-
├ λ /api/preview 0 B
|
|
84
|
+
├ λ /api/graphql 0 B 108 kB
|
|
85
|
+
├ λ /api/health/live 0 B 108 kB
|
|
86
|
+
├ λ /api/health/ready 0 B 108 kB
|
|
87
|
+
├ λ /api/preview 0 B 108 kB
|
|
88
88
|
├ ● /checkout 749 B 139 kB
|
|
89
89
|
├ ● /login 1.7 kB 140 kB
|
|
90
90
|
├ λ /pvt/account 247 B 108 kB
|
|
91
91
|
├ ● /pvt/account/[...unknown] 287 B 108 kB
|
|
92
|
-
├ λ /pvt/account/403 2.98 kB
|
|
92
|
+
├ λ /pvt/account/403 2.98 kB 142 kB
|
|
93
93
|
├ └ css/c53b17b6fa994508.css 4.66 kB
|
|
94
|
-
├ λ /pvt/account/404 2.18 kB
|
|
94
|
+
├ λ /pvt/account/404 2.18 kB 141 kB
|
|
95
95
|
├ └ css/ceb410a7062740d1.css 4.72 kB
|
|
96
96
|
├ λ /pvt/account/orders 10.6 kB 149 kB
|
|
97
97
|
├ └ css/244373752cfc52c7.css 13.9 kB
|
|
98
|
-
├ λ /pvt/account/orders/[id] 12.1 kB
|
|
98
|
+
├ λ /pvt/account/orders/[id] 12.1 kB 151 kB
|
|
99
99
|
├ └ css/da5bfb1f39c54578.css 13.3 kB
|
|
100
|
-
├ λ /pvt/account/profile 1.98 kB
|
|
100
|
+
├ λ /pvt/account/profile 1.98 kB 141 kB
|
|
101
101
|
├ └ css/b65e005fb943434c.css 4.4 kB
|
|
102
|
-
├ λ /pvt/account/security 3.96 kB
|
|
102
|
+
├ λ /pvt/account/security 3.96 kB 143 kB
|
|
103
103
|
├ └ css/6bb0abee27fe0019.css 5.65 kB
|
|
104
104
|
├ λ /pvt/account/user-details 1.91 kB 140 kB
|
|
105
105
|
├ └ css/bd121d85d6ceed46.css 4.52 kB
|
|
106
|
-
└ ● /s 3.
|
|
106
|
+
└ ● /s 3.29 kB 157 kB
|
|
107
107
|
+ First Load JS shared by all 111 kB
|
|
108
108
|
├ chunks/framework-d514426edf885c68.js 45.4 kB
|
|
109
109
|
├ chunks/main-595f5e3b626b9fff.js 33.2 kB
|
|
110
|
-
├ chunks/pages/_app-
|
|
111
|
-
├ chunks/webpack-
|
|
110
|
+
├ chunks/pages/_app-e8ac4d8f914feb94.js 25.2 kB
|
|
111
|
+
├ chunks/webpack-95c6847556354c4b.js 3.84 kB
|
|
112
112
|
└ css/24a5e8f6808266fe.css 3.53 kB
|
|
113
113
|
|
|
114
114
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.91.1 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/
|
|
6
|
-
PASS test/
|
|
5
|
+
PASS test/server/cms/global.test.ts (27.666 s)
|
|
6
|
+
PASS test/utils/multipleTemplates.test.ts (28.301 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (
|
|
8
|
+
PASS test/server/index.test.ts (31.297 s)
|
|
9
9
|
|
|
10
10
|
Test Suites: 4 passed, 4 total
|
|
11
11
|
Tests: 22 passed, 22 total
|
|
12
12
|
Snapshots: 0 total
|
|
13
|
-
Time:
|
|
13
|
+
Time: 32.383 s
|
|
14
14
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 3.91.2 (2025-10-27)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- update buying policy alert message to include dynamic description SFS-2861 ([#3076](https://github.com/vtex/faststore/issues/3076)) ([f8f470e](https://github.com/vtex/faststore/commit/f8f470e7d70a0a2556e6136d84f57540b734b528))
|
|
11
|
+
- update SEO for search page ([#3081](https://github.com/vtex/faststore/issues/3081)) ([315a244](https://github.com/vtex/faststore/commit/315a244c3ee119f0c5d1f61a095ac70754582026))
|
|
12
|
+
|
|
13
|
+
## [3.91.1](https://github.com/vtex/faststore/compare/v3.91.0...v3.91.1) (2025-10-24)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- signin button flickering - SFS-2862 ([#3078](https://github.com/vtex/faststore/issues/3078)) ([edd4ac0](https://github.com/vtex/faststore/commit/edd4ac084817467e6dcedc6cd5fe89923b0f55e3))
|
|
18
|
+
|
|
6
19
|
# [3.91.0](https://github.com/vtex/faststore/compare/v3.90.1...v3.91.0) (2025-10-24)
|
|
7
20
|
|
|
8
21
|
### Features
|
|
@@ -15,7 +15,7 @@ module.exports = {
|
|
|
15
15
|
descriptionTemplate: '%s products on FastStore Product Detail Page',
|
|
16
16
|
},
|
|
17
17
|
search: {
|
|
18
|
-
titleTemplate: '%s
|
|
18
|
+
titleTemplate: '%s | Search results',
|
|
19
19
|
descriptionTemplate: '%s: Search results description',
|
|
20
20
|
noIndex: true,
|
|
21
21
|
noFollow: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.91.
|
|
3
|
+
"version": "3.91.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@envelop/graphql-jit": "^8.0.3",
|
|
45
45
|
"@envelop/parser-cache": "^6.0.2",
|
|
46
46
|
"@envelop/validation-cache": "^6.0.2",
|
|
47
|
-
"@faststore/api": "^3.91.
|
|
48
|
-
"@faststore/graphql-utils": "^3.
|
|
49
|
-
"@faststore/lighthouse": "^3.
|
|
50
|
-
"@faststore/sdk": "^3.
|
|
51
|
-
"@faststore/ui": "^3.
|
|
47
|
+
"@faststore/api": "^3.91.2",
|
|
48
|
+
"@faststore/graphql-utils": "^3.91.2",
|
|
49
|
+
"@faststore/lighthouse": "^3.91.2",
|
|
50
|
+
"@faststore/sdk": "^3.91.2",
|
|
51
|
+
"@faststore/ui": "^3.91.2",
|
|
52
52
|
"@graphql-codegen/cli": "5.0.2",
|
|
53
53
|
"@graphql-codegen/client-preset": "4.2.6",
|
|
54
54
|
"@graphql-codegen/typescript": "4.0.7",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"ts-jest": "29.1.1",
|
|
117
117
|
"typescript": "5.3.2"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "6fa73a4cd395be39afc7e376c45beb3201bc50a9"
|
|
120
120
|
}
|
|
@@ -14,6 +14,9 @@ interface MyAccountBuyingPolicyAlertProps {
|
|
|
14
14
|
onAuthorizationComplete?: () => void
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export const BUYING_POLICY_APPROVAL_REQUIRED_MESSAGE =
|
|
18
|
+
'This buying policy requires your approval before the order can proceed.'
|
|
19
|
+
|
|
17
20
|
export default function MyAccountBuyingPolicyAlert({
|
|
18
21
|
ruleForAuthorization,
|
|
19
22
|
onAuthorizationComplete,
|
|
@@ -89,8 +92,8 @@ export default function MyAccountBuyingPolicyAlert({
|
|
|
89
92
|
<div data-fs-buying-policy-message>
|
|
90
93
|
<h3 data-fs-buying-policy-title>{ruleForAuthorization.rule.name}</h3>
|
|
91
94
|
<p data-fs-buying-policy-description>
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
{ruleForAuthorization?.rule?.trigger?.condition?.description ??
|
|
96
|
+
BUYING_POLICY_APPROVAL_REQUIRED_MESSAGE}
|
|
94
97
|
</p>
|
|
95
98
|
</div>
|
|
96
99
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useCallback, useRef, useState } from 'react'
|
|
2
1
|
import dynamic from 'next/dynamic'
|
|
2
|
+
import { useCallback, useRef, useState } from 'react'
|
|
3
3
|
|
|
4
4
|
import { Icon as UIIcon, useScrollDirection, useUI } from '@faststore/ui'
|
|
5
5
|
|
|
6
|
+
import { Skeleton as UISkeleton } from '@faststore/ui'
|
|
7
|
+
import { OrganizationSignInButton } from 'src/components/account/MyAccountDrawer/OrganizationSignInButton'
|
|
8
|
+
import CartToggle from 'src/components/cart/CartToggle'
|
|
6
9
|
import type { SearchInputRef } from 'src/components/search/SearchInput'
|
|
7
10
|
import SearchInput from 'src/components/search/SearchInput'
|
|
8
|
-
import CartToggle from 'src/components/cart/CartToggle'
|
|
9
11
|
import Link from 'src/components/ui/Link'
|
|
10
12
|
import Logo from 'src/components/ui/Logo'
|
|
11
|
-
import { OrganizationSignInButton } from 'src/components/account/MyAccountDrawer/OrganizationSignInButton'
|
|
12
13
|
import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
|
|
13
14
|
import { useSession } from 'src/sdk/session'
|
|
14
15
|
import useScreenResize from 'src/sdk/ui/useScreenResize'
|
|
@@ -99,8 +100,8 @@ function Navbar({
|
|
|
99
100
|
} = useOverrideComponents<'Navbar'>()
|
|
100
101
|
const scrollDirection = useScrollDirection()
|
|
101
102
|
const { openNavbar, navbar: displayNavbar } = useUI()
|
|
102
|
-
const { isDesktop
|
|
103
|
-
const { b2b } = useSession()
|
|
103
|
+
const { isDesktop } = useScreenResize()
|
|
104
|
+
const { b2b, isSessionReady } = useSession()
|
|
104
105
|
|
|
105
106
|
const searchMobileRef = useRef<SearchInputRef>(null)
|
|
106
107
|
const [searchExpanded, setSearchExpanded] = useState(false)
|
|
@@ -185,14 +186,21 @@ function Navbar({
|
|
|
185
186
|
aria-hidden={!searchExpanded}
|
|
186
187
|
/>
|
|
187
188
|
)}
|
|
188
|
-
{
|
|
189
|
-
(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
{isDesktop &&
|
|
190
|
+
(isSessionReady ? (
|
|
191
|
+
isOrganizationEnabled ? (
|
|
192
|
+
<OrganizationSignInButton
|
|
193
|
+
icon={signInButton.icon}
|
|
194
|
+
isRepresentative={isRepresentative}
|
|
195
|
+
/>
|
|
196
|
+
) : (
|
|
197
|
+
<ButtonSignIn.Component {...signInButton} />
|
|
198
|
+
)
|
|
194
199
|
) : (
|
|
195
|
-
<
|
|
200
|
+
<UISkeleton
|
|
201
|
+
data-fs-navbar-signin-skeleton
|
|
202
|
+
size={{ width: '140px', height: '2.5rem' }}
|
|
203
|
+
/>
|
|
196
204
|
))}
|
|
197
205
|
|
|
198
206
|
<CartToggle {...cart} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFadeEffect, useUI } from '@faststore/ui'
|
|
1
|
+
import { Skeleton as UISkeleton, useFadeEffect, useUI } from '@faststore/ui'
|
|
2
2
|
import { Suspense } from 'react'
|
|
3
3
|
|
|
4
4
|
import storeConfig from 'discovery.config'
|
|
@@ -39,7 +39,7 @@ function NavbarSlider({
|
|
|
39
39
|
|
|
40
40
|
const { closeNavbar } = useUI()
|
|
41
41
|
const { fade, fadeOut } = useFadeEffect()
|
|
42
|
-
const { b2b } = useSession()
|
|
42
|
+
const { b2b, isSessionReady } = useSession()
|
|
43
43
|
|
|
44
44
|
const isFaststoreMyAccountEnabled =
|
|
45
45
|
storeConfig.experimental?.enableFaststoreMyAccount
|
|
@@ -76,13 +76,20 @@ function NavbarSlider({
|
|
|
76
76
|
</NavbarSliderContent.Component>
|
|
77
77
|
<NavbarSliderFooter.Component {...NavbarSliderFooter.props}>
|
|
78
78
|
<Suspense fallback={<ButtonSignInFallback />}>
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
{isSessionReady ? (
|
|
80
|
+
isOrganizationEnabled ? (
|
|
81
|
+
<OrganizationSignInButton
|
|
82
|
+
icon={signInButton.icon}
|
|
83
|
+
isRepresentative={isRepresentative}
|
|
84
|
+
/>
|
|
85
|
+
) : (
|
|
86
|
+
<ButtonSignIn.Component {...signInButton} />
|
|
87
|
+
)
|
|
84
88
|
) : (
|
|
85
|
-
<
|
|
89
|
+
<UISkeleton
|
|
90
|
+
data-fs-navbar-slider-signin-skeleton
|
|
91
|
+
size={{ width: '140px', height: '2.5rem' }}
|
|
92
|
+
/>
|
|
86
93
|
)}
|
|
87
94
|
</Suspense>
|
|
88
95
|
</NavbarSliderFooter.Component>
|
package/src/pages/s.tsx
CHANGED
|
@@ -54,28 +54,28 @@ function generateSEOData(storeConfig: StoreConfig, searchTerm?: string) {
|
|
|
54
54
|
|
|
55
55
|
const isSSREnabled = storeConfig.experimental.enableSearchSSR
|
|
56
56
|
|
|
57
|
+
const title = searchTerm ?? seo.title ?? 'Search Results'
|
|
58
|
+
const titleTemplate = searchSeo?.titleTemplate ?? seo.titleTemplate
|
|
59
|
+
const description = searchSeo?.descriptionTemplate
|
|
60
|
+
? searchSeo.descriptionTemplate.replace(/%s/g, () => searchTerm)
|
|
61
|
+
: seo.description
|
|
62
|
+
|
|
57
63
|
// default behavior without SSR
|
|
58
64
|
if (!isSSREnabled) {
|
|
59
65
|
return {
|
|
60
66
|
noindex: searchSeo?.noIndex ?? true,
|
|
61
67
|
nofollow: searchSeo?.noFollow ?? true,
|
|
62
|
-
title
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
title,
|
|
69
|
+
titleTemplate,
|
|
70
|
+
description,
|
|
65
71
|
openGraph: {
|
|
66
72
|
type: 'website',
|
|
67
|
-
title
|
|
68
|
-
description
|
|
73
|
+
title,
|
|
74
|
+
description,
|
|
69
75
|
},
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
78
|
|
|
73
|
-
const title = searchTerm ?? 'Search Results'
|
|
74
|
-
const titleTemplate = searchSeo?.titleTemplate ?? seo.titleTemplate
|
|
75
|
-
const description = searchSeo?.descriptionTemplate
|
|
76
|
-
? searchSeo.descriptionTemplate.replace(/%s/g, () => searchTerm)
|
|
77
|
-
: seo.description
|
|
78
|
-
|
|
79
79
|
const canonical = searchTerm
|
|
80
80
|
? `${storeConfig.storeUrl}/s?q=${searchTerm.replaceAll(' ', '+')}`
|
|
81
81
|
: undefined
|
|
@@ -116,7 +116,7 @@ function Page({
|
|
|
116
116
|
|
|
117
117
|
const { noindex, nofollow, ...seoData } = generateSEOData(
|
|
118
118
|
storeConfig,
|
|
119
|
-
searchTerm
|
|
119
|
+
searchTerm ?? searchParams.term ?? undefined
|
|
120
120
|
)
|
|
121
121
|
|
|
122
122
|
return (
|
package/src/sdk/session/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Session } from '@faststore/sdk'
|
|
2
2
|
import { createSessionStore } from '@faststore/sdk'
|
|
3
|
-
import { useMemo } from 'react'
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from 'react'
|
|
4
4
|
|
|
5
5
|
import { gql } from '@generated'
|
|
6
6
|
import type {
|
|
@@ -18,6 +18,8 @@ import { request } from '../graphql/request'
|
|
|
18
18
|
import { createValidationStore, useStore } from '../useStore'
|
|
19
19
|
import { getPostalCode } from '../userLocation/index'
|
|
20
20
|
|
|
21
|
+
const SESSION_READY_KEY = 'faststore_session_ready'
|
|
22
|
+
|
|
21
23
|
export const mutation = gql(`
|
|
22
24
|
mutation ValidateSession($session: IStoreSession!, $search: String!) {
|
|
23
25
|
validateSession(session: $session, search: $search) {
|
|
@@ -160,15 +162,20 @@ interface SessionOptions {
|
|
|
160
162
|
* This key is used only in the useAuth hook and is only required to send on the ValidateSession mutation,
|
|
161
163
|
* so we remove it from the session's channel object to avoid unnecessary cache invalidations and query executions.
|
|
162
164
|
*
|
|
165
|
+
* The hook also provides session stability management to prevent UI blinking effects during session validation.
|
|
166
|
+
* The session ready state is persisted in sessionStorage to maintain consistency across page navigations
|
|
167
|
+
* and provide faster loading times on subsequent page visits.
|
|
168
|
+
*
|
|
163
169
|
* @param options - Optional configuration for the hook.
|
|
164
170
|
* @param options.filter - A boolean value indicating whether to filter the channel object or not. Default is true.
|
|
165
|
-
* @returns An object containing the session data, channel object,
|
|
171
|
+
* @returns An object containing the session data, channel object, validation status, and session readiness status.
|
|
166
172
|
*/
|
|
167
|
-
|
|
168
173
|
export const useSession = ({ filter }: SessionOptions = { filter: true }) => {
|
|
169
174
|
const currentSessionStore = sessionStore.read() ?? sessionStore.readInitial()
|
|
170
175
|
const resultSessionStore = useStore(sessionStore)
|
|
171
176
|
const isValidating = useStore(validationStore)
|
|
177
|
+
const { isSessionReady } = useSessionReady({ isValidating })
|
|
178
|
+
|
|
172
179
|
let { channel, ...session } = resultSessionStore ?? currentSessionStore
|
|
173
180
|
|
|
174
181
|
if (filter) {
|
|
@@ -182,7 +189,72 @@ export const useSession = ({ filter }: SessionOptions = { filter: true }) => {
|
|
|
182
189
|
...session,
|
|
183
190
|
channel,
|
|
184
191
|
isValidating,
|
|
192
|
+
isSessionReady,
|
|
185
193
|
}),
|
|
186
|
-
[isValidating, session, channel]
|
|
194
|
+
[isValidating, session, channel, isSessionReady]
|
|
187
195
|
)
|
|
188
196
|
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Custom hook to manage session readiness state.
|
|
200
|
+
* Provides session stability management to prevent UI blinking effects during session validation.
|
|
201
|
+
* The session ready state is persisted in sessionStorage to maintain consistency across page navigations
|
|
202
|
+
* and provide faster loading times on subsequent page visits.
|
|
203
|
+
*
|
|
204
|
+
* @param isValidating - Whether the session is currently being validated
|
|
205
|
+
* @returns An object containing the session readiness status
|
|
206
|
+
*/
|
|
207
|
+
export const useSessionReady = ({
|
|
208
|
+
isValidating,
|
|
209
|
+
}: { isValidating: boolean }) => {
|
|
210
|
+
// Initialize with persisted state from sessionStorage
|
|
211
|
+
const [isSessionReady, setIsSessionReady] = useState(() => {
|
|
212
|
+
if (typeof window === 'undefined') return false
|
|
213
|
+
try {
|
|
214
|
+
return sessionStorage.getItem(SESSION_READY_KEY) === 'true'
|
|
215
|
+
} catch {
|
|
216
|
+
return false
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
// Wait for session to be stable (not validating and has consistent data)
|
|
221
|
+
const hasValidatedRef = useRef(false)
|
|
222
|
+
|
|
223
|
+
useEffect(() => {
|
|
224
|
+
// Only run the effect if there has already been a change in isValidating (that is, validateSession has already been called at least once)
|
|
225
|
+
if (!hasValidatedRef.current && isValidating) {
|
|
226
|
+
hasValidatedRef.current = true
|
|
227
|
+
return
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (!hasValidatedRef.current) {
|
|
231
|
+
return
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (!isValidating) {
|
|
235
|
+
setIsSessionReady(true)
|
|
236
|
+
// Persist the ready state in sessionStorage
|
|
237
|
+
try {
|
|
238
|
+
sessionStorage.setItem(SESSION_READY_KEY, 'true')
|
|
239
|
+
} catch {
|
|
240
|
+
// Ignore storage errors
|
|
241
|
+
}
|
|
242
|
+
return
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Only set to false if we don't have a persisted ready state
|
|
246
|
+
if (typeof window !== 'undefined') {
|
|
247
|
+
try {
|
|
248
|
+
const persistedReady =
|
|
249
|
+
sessionStorage.getItem(SESSION_READY_KEY) === 'true'
|
|
250
|
+
if (!persistedReady) {
|
|
251
|
+
setIsSessionReady(false)
|
|
252
|
+
}
|
|
253
|
+
} catch {
|
|
254
|
+
setIsSessionReady(false)
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}, [isValidating])
|
|
258
|
+
|
|
259
|
+
return { isSessionReady }
|
|
260
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=5335,exports.ids=[5335],exports.modules={10792:(e,t,r)=>{r.d(t,{Z:()=>d});var a=r(16689),n=r.n(a);let o=(0,a.forwardRef)(function({testId:e="fs-skeleton",loading:t=!0,shimmer:r=!0,children:a,size:o,border:d,borderRadius:i,...s},f){let l={width:o.width,height:o.height};return t?n().createElement("div",{ref:f,"data-fs-skeleton":!0,"data-testid":e,"data-fs-skeleton-border":d||null,style:i?{...l,borderRadius:i}:l,...s},r&&n().createElement("div",{"data-fs-skeleton-shimmer":!0})):n().createElement(n().Fragment,null,a)}),d=o},48957:(e,t,r)=>{r.d(t,{Z:()=>i,u:()=>useHero});var a=r(16689),n=r.n(a);let o=(0,a.createContext)(void 0),d=(0,a.forwardRef)(function({children:e,testId:t="fs-hero",variant:r="primary",colorVariant:a="main",...d},i){return n().createElement(o.Provider,{value:{variant:r,colorVariant:a}},n().createElement("article",{ref:i,"data-fs-hero":!0,"data-fs-hero-variant":r,"data-fs-hero-color-variant":a,"data-testid":t,...d},e))});function useHero(){let e=(0,a.useContext)(o);if(void 0===e)throw Error("Do not use Hero components outside the Hero context.");return e}let i=d},27154:(e,t,r)=>{r.d(t,{Z:()=>f});var a=r(16689),n=r.n(a),o=r(13922),d=r(2614),i=r(48957);let s=(0,a.forwardRef)(function({icon:e,link:t,title:r,linkText:a,linkTargetBlank:s,subtitle:f,children:l,testId:c="fs-hero-heading",...h},m){let{variant:u,colorVariant:v}=(0,i.u)();return n().createElement("header",{ref:m,"data-fs-hero-heading":!0,"data-testid":c,...h},n().createElement("div",{"data-fs-hero-wrapper":!0,"data-fs-content":"hero"},n().createElement("div",{"data-fs-hero-info":!0},n().createElement("h1",{"data-fs-hero-title":!0},r),n().createElement("p",{"data-fs-hero-subtitle":!0},f),!!t&&n().createElement(o.Z,{href:t,inverse:"main"===v,icon:n().createElement(d.Z,{name:"ArrowRight"}),iconPosition:"right",target:s?"_blank":void 0},a)),!!e&&"secondary"===u&&n().createElement("span",{"data-fs-hero-icon":!0},e)))}),f=s},74147:(e,t,r)=>{r.d(t,{Z:()=>d});var a=r(16689),n=r.n(a);let o=(0,a.forwardRef)(function({children:e,testId:t="fs-hero-image",...r},a){return n().createElement("div",{ref:a,"data-fs-hero-image":!0,"data-testid":t,...r},e)}),d=o}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(c,s,t,a,e,u,n){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[c,s,t,e,"static/css/c29fee5b9f9d48d9.css","static/chunks/pages/index-5c3eb58eefd7cb0f.js"],"/404":[c,s,t,a,"static/chunks/pages/404-4b3f1e22c77f849a.js"],"/500":[c,s,t,a,"static/chunks/pages/500-bb2de0c11524b2b8.js"],"/_error":["static/chunks/pages/_error-2b0148be56a716e9.js"],"/checkout":[c,s,t,"static/chunks/pages/checkout-dc07d72b3514c83d.js"],"/login":[c,s,t,a,"static/chunks/pages/login-e97ef92769456bf6.js"],"/pvt/account":["static/chunks/pages/pvt/account-65fefcc699344bdb.js"],"/pvt/account/403":[c,s,t,"static/css/c53b17b6fa994508.css","static/chunks/pages/pvt/account/403-91597100f8956385.js"],"/pvt/account/404":[c,s,t,"static/css/ceb410a7062740d1.css","static/chunks/pages/pvt/account/404-c68124bed7cb7c48.js"],"/pvt/account/orders":[c,s,t,"static/css/244373752cfc52c7.css","static/chunks/pages/pvt/account/orders-34821345bd7401d9.js"],"/pvt/account/orders/[id]":[c,s,t,"static/css/da5bfb1f39c54578.css","static/chunks/pages/pvt/account/orders/[id]-459f6b9a86780410.js"],"/pvt/account/profile":[c,s,t,"static/css/b65e005fb943434c.css","static/chunks/pages/pvt/account/profile-b6cdbf02d4682544.js"],"/pvt/account/security":[c,s,t,"static/css/6bb0abee27fe0019.css","static/chunks/pages/pvt/account/security-e6289a40e745d3c4.js"],"/pvt/account/user-details":[c,s,t,"static/css/bd121d85d6ceed46.css","static/chunks/pages/pvt/account/user-details-fba1822e52e7de26.js"],"/pvt/account/[...unknown]":["static/chunks/pages/pvt/account/[...unknown]-f80f645594d2740c.js"],"/s":[c,s,t,u,n,a,"static/chunks/pages/s-5319ae49907c3391.js"],"/[slug]/p":[c,"static/chunks/1208-9118a8f14ecf05c8.js",s,t,"static/chunks/3474-d34f8f5fe6eacbe6.js",e,"static/css/a9328b56f3942b82.css","static/chunks/pages/[slug]/p-323813ea2a7455fb.js"],"/[...slug]":[c,s,t,u,n,"static/chunks/pages/[...slug]-7878c4679614a34d.js"],sortedPages:["/","/404","/500","/_app","/_error","/checkout","/login","/pvt/account","/pvt/account/403","/pvt/account/404","/pvt/account/orders","/pvt/account/orders/[id]","/pvt/account/profile","/pvt/account/security","/pvt/account/user-details","/pvt/account/[...unknown]","/s","/[slug]/p","/[...slug]"]}}("static/chunks/6031-a7dfc540189ff57c.js","static/css/5177628438c28f74.css","static/chunks/9173-045983ab6e18cfb4.js","static/css/2980acad3f8e1028.css","static/css/331f08e9d306e70b.css","static/css/32a4ddbf3999c2a5.css","static/chunks/7191-7fb36e620e08cb4c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2561],{26410:function(e,t,r){r.d(t,{YD:function(){return useInView},df:function(){return u}});var n=r(44194);function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i=new Map,o=new WeakMap,a=0,s=void 0;function observe(e,t,r,n){if(void 0===r&&(r={}),void 0===n&&(n=s),void 0===window.IntersectionObserver&&void 0!==n){var l=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),function(){}}var u=function(e){var t=Object.keys(e).sort().filter(function(t){return void 0!==e[t]}).map(function(t){var r;return t+"_"+("root"===t?(r=e.root)?(o.has(r)||(a+=1,o.set(r,a.toString())),o.get(r)):"0":e[t])}).toString(),r=i.get(t);if(!r){var n,s=new Map,l=new IntersectionObserver(function(t){t.forEach(function(t){var r,i=t.isIntersecting&&n.some(function(e){return t.intersectionRatio>=e});e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(r=s.get(t.target))||r.forEach(function(e){e(i,t)})})},e);n=l.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:l,elements:s},i.set(t,r)}return r}(r),d=u.id,c=u.observer,f=u.elements,h=f.get(e)||[];return f.has(e)||f.set(e,h),h.push(t),c.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(f.delete(e),c.unobserve(e)),0===f.size&&(c.disconnect(),i.delete(d))}}var l=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function isPlainChildren(e){return"function"!=typeof e.children}var u=function(e){function InView(t){var r;return(r=e.call(this,t)||this).node=null,r._unobserveCb=null,r.handleNode=function(e){!r.node||(r.unobserve(),e||r.props.triggerOnce||r.props.skip||r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=e||null,r.observeNode()},r.handleChange=function(e,t){e&&r.props.triggerOnce&&r.unobserve(),isPlainChildren(r.props)||r.setState({inView:e,entry:t}),r.props.onChange&&r.props.onChange(e,t)},r.state={inView:!!t.initialInView,entry:void 0},r}InView.prototype=Object.create(e.prototype),InView.prototype.constructor=InView,_setPrototypeOf(InView,e);var t=InView.prototype;return t.componentDidUpdate=function(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,r=e.root,n=e.rootMargin,i=e.trackVisibility,o=e.delay,a=e.fallbackInView;this._unobserveCb=observe(this.node,this.handleChange,{threshold:t,root:r,rootMargin:n,trackVisibility:i,delay:o},a)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!isPlainChildren(this.props)){var e=this.state,t=e.inView,r=e.entry;return this.props.children({inView:t,entry:r,ref:this.handleNode})}var i=this.props,o=i.children,a=i.as,s=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(i,l);return n.createElement(a||"div",_extends({ref:this.handleNode},s),o)},InView}(n.Component);function useInView(e){var t=void 0===e?{}:e,r=t.threshold,i=t.delay,o=t.trackVisibility,a=t.rootMargin,s=t.root,l=t.triggerOnce,u=t.skip,d=t.initialInView,c=t.fallbackInView,f=n.useRef(),h=n.useState({inView:!!d}),p=h[0],v=h[1],b=n.useCallback(function(e){void 0!==f.current&&(f.current(),f.current=void 0),!u&&e&&(f.current=observe(e,function(e,t){v({inView:e,entry:t}),t.isIntersecting&&l&&f.current&&(f.current(),f.current=void 0)},{root:s,rootMargin:a,threshold:r,trackVisibility:o,delay:i},c))},[Array.isArray(r)?r.toString():r,s,a,l,u,o,c,i]);(0,n.useEffect)(function(){f.current||!p.entry||l||u||v({inView:!!d})});var g=[b,p.inView,p.entry];return g.ref=g[0],g.inView=g[1],g.entry=g[2],g}u.displayName="InView",u.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1}},10792:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({testId:e="fs-skeleton",loading:t=!0,shimmer:r=!0,children:i,size:o,border:a,borderRadius:s,...l},u){let d={width:o.width,height:o.height};return t?n.createElement("div",{ref:u,"data-fs-skeleton":!0,"data-testid":e,"data-fs-skeleton-border":a||null,style:s?{...d,borderRadius:s}:d,...l},r&&n.createElement("div",{"data-fs-skeleton-shimmer":!0})):n.createElement(n.Fragment,null,i)});t.Z=i},13922:function(e,t,r){var n=r(44194);t.Z=function({icon:e,inverse:t,children:r,disabled:i,iconPosition:o,size:a="regular",variant:s="primary",testId:l="fs-link-button",...u}){let d=(0,n.useRef)(null);return n.createElement("a",{ref:d,"data-fs-button":!0,"data-fs-link-button":!0,"data-fs-button-size":a,"data-fs-button-variant":s,"data-fs-button-inverse":t,"data-fs-button-disabled":i,onFocus:function(e){e.preventDefault(),i&&d.current?.blur()},"data-testid":l,...u},n.createElement("div",{"data-fs-button-wrapper":!0},!!e&&"left"===o&&n.createElement("span",{"data-fs-button-icon":!0},e),r&&n.createElement("span",null,r),!!e&&"right"===o&&n.createElement("span",{"data-fs-button-icon":!0},e)))}},48957:function(e,t,r){r.d(t,{u:function(){return useHero}});var n=r(44194);let i=(0,n.createContext)(void 0),o=(0,n.forwardRef)(function({children:e,testId:t="fs-hero",variant:r="primary",colorVariant:o="main",...a},s){return n.createElement(i.Provider,{value:{variant:r,colorVariant:o}},n.createElement("article",{ref:s,"data-fs-hero":!0,"data-fs-hero-variant":r,"data-fs-hero-color-variant":o,"data-testid":t,...a},e))});function useHero(){let e=(0,n.useContext)(i);if(void 0===e)throw Error("Do not use Hero components outside the Hero context.");return e}t.Z=o},27154:function(e,t,r){var n=r(44194),i=r(13922),o=r(2614),a=r(48957);let s=(0,n.forwardRef)(function({icon:e,link:t,title:r,linkText:s,linkTargetBlank:l,subtitle:u,children:d,testId:c="fs-hero-heading",...f},h){let{variant:p,colorVariant:v}=(0,a.u)();return n.createElement("header",{ref:h,"data-fs-hero-heading":!0,"data-testid":c,...f},n.createElement("div",{"data-fs-hero-wrapper":!0,"data-fs-content":"hero"},n.createElement("div",{"data-fs-hero-info":!0},n.createElement("h1",{"data-fs-hero-title":!0},r),n.createElement("p",{"data-fs-hero-subtitle":!0},u),!!t&&n.createElement(i.Z,{href:t,inverse:"main"===v,icon:n.createElement(o.Z,{name:"ArrowRight"}),iconPosition:"right",target:l?"_blank":void 0},s)),!!e&&"secondary"===p&&n.createElement("span",{"data-fs-hero-icon":!0},e)))});t.Z=s},74147:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({children:e,testId:t="fs-hero-image",...r},i){return n.createElement("div",{ref:i,"data-fs-hero-image":!0,"data-testid":t,...r},e)});t.Z=i},16737:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({testId:e="fs-product-shelf",children:t,...r},i){return n.createElement("div",{ref:i,"data-fs-product-shelf":!0,"data-fs-content":"product-shelf","data-testid":e,...r},t)});t.Z=i},57828:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({testId:e="fs-product-shelf-item",children:t,...r},i){return n.createElement("li",{role:"listitem",ref:i,"data-fs-product-shelf-item":!0,"data-testid":e,...r},t)});t.Z=i},31584:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({testId:e="fs-product-shelf-items",children:t,...r},i){return n.createElement("ul",{role:"list",ref:i,"data-fs-product-shelf-items":!0,"data-fs-content":"product-shelf","data-testid":e,...r},t)});t.Z=i}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4803],{33194:function(e,t,n){"use strict";n.d(t,{Z:function(){return NavbarLinks_NavbarLinks}});var r=n(33067),i=n(34235),o=n(33339),a=n(46355),s=n(44194),c=n(83339),l=n(2614),u=n(97358),b=n(4018),p=n(17552),d=n(31549),RegionButton_RegionButton=function(e){var{icon:t,label:n}=e,{city:r,postalCode:i}=(0,u.kP)(),o=(0,s.useRef)(null),{openModal:a}=(0,p.MS)(o);return(0,d.jsx)(c.Z,{variant:"tertiary",size:"small",icon:(0,d.jsx)(l.Z,{name:t,width:18,height:18,weight:"bold"}),iconPosition:"left",onClick:a,ref:o,children:r&&i?"".concat((0,b._W)(r),", ").concat(i):n})},f=n(16652),j=n(52011),RegionFilterButton_RegionFilterButton=function(e){var t,{filterByPickupPoint:{label:n,icon:{icon:r,alt:i}={}}={}}=e,{openRegionSlider:o}=(0,f.l8)(),{globalPickupPoint:a}=(0,j.z0)(),u=(0,s.useRef)(null);return(0,d.jsx)(c.Z,{variant:"tertiary",size:"small",icon:(0,d.jsx)(l.Z,{name:r,width:18,height:18,weight:"bold","aria-label":i}),iconPosition:"left",onClick:()=>o(f.gK.globalChangePickupPoint),ref:u,children:null!==(t=null==a?void 0:a.name)&&void 0!==t?t:n})},v=n(67345),h=n(29746),g=n(3303),k=["links","onClickLink","region"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var NavbarLinks_NavbarLinks=function(e){var{links:t,onClickLink:n,region:{icon:r,label:s,shouldDisplayRegion:c}}=e,l=(0,i.Z)(e,k),{NavbarLinks:b,NavbarLinksList:p}=(0,h.r3)(),f=(0,o.useRouter)(),{postalCode:y}=(0,u.kP)(),{deliveryPromise:{filterByPickupPoint:m}={}}=(0,g.T)(),{isEnabled:_}=(0,j.z0)(),O=_&&!!y&&(null==m?void 0:m.enabled);return(0,d.jsx)(b.Component,_objectSpread(_objectSpread(_objectSpread({},l),b.props),{},{children:(0,d.jsxs)("div",{"data-fs-navbar-links-wrapper":!0,"data-fs-content":"navbar",children:[c&&(0,d.jsx)(RegionButton_RegionButton,{icon:r,label:s}),O&&(0,d.jsx)(RegionFilterButton_RegionFilterButton,{filterByPickupPoint:m}),(0,d.jsx)(p.Component,_objectSpread(_objectSpread({},p.props),{},{children:t.map(e=>{var{url:t,text:r}=e;return(0,d.jsx)(a.Z,{children:(0,d.jsx)(v.Z,{variant:"display",href:f.asPath.includes(t)?"#":t,prefetch:!1,onClick:n,children:r})},r)})}))]})}))}},34803:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return NavbarSlider_NavbarSlider}});var r=n(33067),i=n(16652),o=n(13666),a=n(44194),s=n(43412),c=n.n(s),l=n(33194),u=n(95558),b=n(67345),p=n(89910),d=n(14960),f=n(29746),j=n(97358),v=n(25417),h=n.n(v),g=n(31549);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var NavbarSlider_NavbarSlider=function(e){var t,{logo:n,links:r,region:s,home:{label:v},signIn:{button:k}}=e,{NavbarSlider:y,NavbarSliderHeader:m,NavbarSliderContent:_,NavbarSliderFooter:O,_experimentalButtonSignIn:P}=(0,f.r3)(),{closeNavbar:x}=(0,i.l8)(),{fade:w,fadeOut:S}=(0,o.b)(),{b2b:Z}=(0,j.kP)(),C=null===(t=c().experimental)||void 0===t?void 0:t.enableFaststoreMyAccount,R=null==Z?void 0:Z.isRepresentative;return(0,g.jsxs)(y.Component,_objectSpread(_objectSpread({fade:w,onDismiss:S,overlayProps:{className:"section ".concat(h().section," section-navbar-slider")},onTransitionEnd:()=>"out"===w&&x()},y.props),{},{children:[(0,g.jsx)(m.Component,_objectSpread(_objectSpread({onClose:S},m.props),{},{children:(0,g.jsx)(b.Z,{"data-fs-navbar-slider-logo":!0,href:n.link?n.link.url:"/",title:n.link?n.link.title:v,onClick:S,children:(0,g.jsx)(p.Z,{alt:n.alt,src:n.src})})})),(0,g.jsx)(_.Component,_objectSpread(_objectSpread({},_.props),{},{children:(0,g.jsx)(l.Z,{onClickLink:S,links:r,region:s})})),(0,g.jsx)(O.Component,_objectSpread(_objectSpread({},O.props),{},{children:(0,g.jsx)(a.Suspense,{fallback:(0,g.jsx)(u.Z,{}),children:C&&R?(0,g.jsx)(d.o,{icon:k.icon,isRepresentative:R}):(0,g.jsx)(P.Component,_objectSpread({},k))})}))]}))}},95558:function(e,t,n){"use strict";var r=n(13922),i=n(2614),o=n(31549);t.Z=function(){return(0,o.jsx)(r.Z,{"data-fs-button-signin-link":!0,href:"/login",className:"text__title-mini",variant:"tertiary",icon:(0,o.jsx)(i.Z,{name:"User",width:18,height:18,weight:"bold"}),iconPosition:"left",children:(0,o.jsx)("span",{children:"Sign In"})})}},25417:function(e){e.exports={section:"section_section__ZKxbf"}},13922:function(e,t,n){"use strict";var r=n(44194);t.Z=function({icon:e,inverse:t,children:n,disabled:i,iconPosition:o,size:a="regular",variant:s="primary",testId:c="fs-link-button",...l}){let u=(0,r.useRef)(null);return r.createElement("a",{ref:u,"data-fs-button":!0,"data-fs-link-button":!0,"data-fs-button-size":a,"data-fs-button-variant":s,"data-fs-button-inverse":t,"data-fs-button-disabled":i,onFocus:function(e){e.preventDefault(),i&&u.current?.blur()},"data-testid":c,...l},r.createElement("div",{"data-fs-button-wrapper":!0},!!e&&"left"===o&&r.createElement("span",{"data-fs-button-icon":!0},e),n&&r.createElement("span",null,n),!!e&&"right"===o&&r.createElement("span",{"data-fs-button-icon":!0},e)))}},46355:function(e,t,n){"use strict";var r=n(44194);let i=(0,r.forwardRef)(function({children:e,testId:t="fs-navbar-links-list-item",...n},i){return r.createElement("li",{"data-fs-navbar-links-list-item":!0,ref:i,"data-testid":t,...n},e)});t.Z=i}}]);
|