@faststore/core 3.11.2 → 3.11.4
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 +36 -36
- 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/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +13 -13
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/1163.js +2 -2
- package/.next/server/chunks/3157.js +1 -1
- package/.next/server/chunks/{1377.js → 3668.js} +1 -1
- package/.next/server/chunks/4012.js +1 -1
- package/.next/server/chunks/5754.js +2 -2
- package/.next/server/chunks/6859.js +1 -1
- package/.next/server/chunks/8640.js +1 -1
- package/.next/server/chunks/8857.js +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 +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- 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 +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 +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/account.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 +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/{bYvT7j3s1L8_ALPlSxNjt → FO1Q-M-kedNdmpX1S3tkc}/_buildManifest.js +1 -1
- package/.next/static/chunks/{1153.d7522522b6c917ed.js → 1153.7f616071da309cf5.js} +1 -1
- package/.next/static/chunks/1978.8bdcdd4ec5c7ac88.js +1 -0
- package/.next/static/chunks/{5156.fe20405ee7a0d2d5.js → 5156.d1a2bac5ee6f64ac.js} +1 -1
- package/.next/static/chunks/{5217.350e250227ef3657.js → 5217.2c285832cd2bb950.js} +1 -1
- package/.next/static/chunks/{6941-6223429b182b7109.js → 6941-691e0f68baf2036e.js} +2 -2
- package/.next/static/chunks/7498-745c09c46899ea49.js +1 -0
- package/.next/static/chunks/{8857.0ff8f6604fb061a8.js → 8857.141d2a4640c89f4a.js} +1 -1
- package/.next/static/chunks/{main-209ac4974b020af1.js → main-48d1188fa94dad34.js} +1 -1
- package/.next/static/chunks/pages/{_app-91d65e1abd88251d.js → _app-e0cf85dd2f4d858c.js} +1 -1
- package/.next/static/chunks/pages/{_error-85cabf0d7a5ea2f2.js → _error-6a4b9b22c63bd9d7.js} +1 -1
- package/.next/static/chunks/{webpack-a63f842ae0d7bdfd.js → webpack-ed53dd91aa26df33.js} +1 -1
- package/.next/trace +102 -102
- package/.turbo/turbo-build.log +8 -7
- package/.turbo/turbo-test.log +5 -5
- package/CHANGELOG.md +8 -0
- package/README.md +0 -3
- package/codegen.ts +1 -1
- package/cypress/integration/a11y.test.js +0 -1
- package/cypress/integration/analytics.test.js +0 -1
- package/cypress/integration/cart.test.js +0 -1
- package/cypress/integration/plp.test.js +0 -1
- package/cypress/integration/search.test.js +0 -1
- package/cypress/integration/seo.test.js +0 -1
- package/cypress/plugins/index.js +0 -3
- package/cypress/support/commands.js +0 -1
- package/discovery.config.default.js +1 -1
- package/next-seo.config.ts +1 -1
- package/next.config.js +3 -0
- package/package.json +9 -11
- package/src/components/auth/ProfileChallenge/ProfileChallenge.tsx +1 -1
- package/src/components/cart/CartSidebar/CartSidebar.tsx +1 -1
- package/src/components/cart/OrderSummary/OrderSummary.tsx +1 -1
- package/src/components/cms/GlobalSections.tsx +2 -2
- package/src/components/cms/RenderSections.tsx +4 -4
- package/src/components/cms/SectionBoundary.tsx +1 -1
- package/src/components/cms/global/Components.ts +1 -1
- package/src/components/cms/home/Components.ts +1 -1
- package/src/components/cms/plp/Components.ts +1 -1
- package/src/components/cms/search/Components.ts +1 -1
- package/src/components/common/Alert/Alert.tsx +1 -1
- package/src/components/common/Footer/Footer.tsx +1 -1
- package/src/components/product/NotAvailableButton/NotAvailableButton.tsx +1 -1
- package/src/components/product/ProductCard/ProductCard.tsx +1 -1
- package/src/components/product/ProductGrid/ProductGrid.tsx +1 -1
- package/src/components/region/RegionModal/RegionModal.tsx +1 -1
- package/src/components/search/Filter/FilterDesktop.tsx +1 -1
- package/src/components/search/SearchDropdown/SearchDropdown.tsx +2 -2
- package/src/components/search/SearchInput/SearchInput.tsx +1 -1
- package/src/components/search/SearchTop/SearchTop.tsx +1 -1
- package/src/components/sections/BannerText/BannerText.tsx +1 -1
- package/src/components/sections/Breadcrumb/Breadcrumb.tsx +4 -4
- package/src/components/sections/Hero/Hero.tsx +2 -2
- package/src/components/sections/Newsletter/Newsletter.tsx +1 -1
- package/src/components/sections/ProductGallery/ProductGallery.tsx +5 -5
- package/src/components/sections/ProductShelf/ProductShelf.tsx +1 -1
- package/src/components/sections/RegionBar/RegionBar.tsx +3 -1
- package/src/components/templates/ProductListingPage/ProductListing.tsx +2 -2
- package/src/components/templates/SearchPage/SearchPage.tsx +5 -3
- package/src/components/ui/Image/Image.tsx +1 -1
- package/src/components/ui/Image/loader.ts +1 -1
- package/src/components/ui/Link/Link.tsx +1 -1
- package/src/components/ui/ProductGallery/ProductGallery.tsx +5 -5
- package/src/components/ui/ProductGallery/ProductGalleryPage.tsx +1 -1
- package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +1 -1
- package/src/components/ui/SkuSelector/Selectors.tsx +2 -2
- package/src/customizations/src/components/index.tsx +0 -1
- package/src/customizations/src/components/overrides/Alert.tsx +1 -1
- package/src/customizations/src/components/overrides/BannerText.tsx +1 -1
- package/src/customizations/src/components/overrides/Breadcrumb.tsx +1 -1
- package/src/customizations/src/components/overrides/CrossSellingShelf.tsx +1 -1
- package/src/customizations/src/components/overrides/EmptyState.tsx +1 -1
- package/src/customizations/src/components/overrides/Hero.tsx +1 -1
- package/src/customizations/src/components/overrides/Navbar.tsx +1 -1
- package/src/customizations/src/components/overrides/Newsletter.tsx +1 -1
- package/src/customizations/src/components/overrides/ProductDetails.tsx +1 -1
- package/src/customizations/src/components/overrides/ProductGallery.tsx +1 -1
- package/src/customizations/src/components/overrides/ProductShelf.tsx +1 -1
- package/src/customizations/src/components/overrides/RegionBar.tsx +1 -1
- package/src/experimental/searchServerSideFunctions/getServerSideProps.ts +4 -4
- package/src/experimental/searchServerSideFunctions/getStaticProps.ts +4 -4
- package/src/fonts/WebFonts.tsx +0 -2
- package/src/pages/404.tsx +4 -4
- package/src/pages/500.tsx +4 -4
- package/src/pages/[...slug].tsx +6 -6
- package/src/pages/[slug]/p.tsx +6 -6
- package/src/pages/account.tsx +3 -3
- package/src/pages/api/preview.ts +12 -6
- package/src/pages/checkout.tsx +3 -3
- package/src/pages/index.tsx +1 -1
- package/src/pages/login.tsx +4 -4
- package/src/pages/s.tsx +1 -1
- package/src/plugins/index.ts +0 -1
- package/src/sdk/analytics/platform/vtex/rc.ts +3 -3
- package/src/sdk/analytics/types.ts +2 -2
- package/src/sdk/error/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/src/sdk/error/MissingContentError/MissingContentError.ts +1 -1
- package/src/sdk/error/MultipleContentError/MultipleContentError.ts +1 -1
- package/src/sdk/graphql/request.ts +2 -2
- package/src/sdk/overrides/OverrideContext.tsx +3 -3
- package/src/sdk/overrides/PageProvider.tsx +3 -4
- package/src/sdk/overrides/getOverriddenSection.tsx +2 -2
- package/src/sdk/overrides/overrides.ts +1 -1
- package/src/sdk/product/useAllVariantProducts.ts +1 -1
- package/src/sdk/product/useLocalizedVariables.ts +1 -1
- package/src/sdk/product/usePageProductsQuery.ts +1 -1
- package/src/sdk/product/useProductGalleryQuery.ts +1 -1
- package/src/sdk/product/useProductsPrefetch.ts +1 -1
- package/src/sdk/search/useFilter.ts +10 -7
- package/src/sdk/shipping/useShippingSimulation.ts +2 -2
- package/src/server/cms/index.ts +1 -1
- package/src/server/cms/pdp.ts +2 -2
- package/src/server/cms/plp.ts +4 -4
- package/src/server/index.ts +4 -5
- package/src/typings/global.d.ts +6 -6
- package/src/typings/overrides.ts +25 -25
- package/src/typings/overridesDefinition.ts +4 -4
- package/src/utils/multipleTemplates.ts +3 -3
- package/test/server/cms/index.test.ts +1 -1
- package/.next/cache/eslint/.cache_1gneedd +0 -1
- package/.next/static/chunks/1978.b33d8b2c02b89474.js +0 -1
- package/.next/static/chunks/7498-304bc236a51fc94c.js +0 -1
- /package/.next/static/{bYvT7j3s1L8_ALPlSxNjt → FO1Q-M-kedNdmpX1S3tkc}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -30,7 +30,8 @@ This information is used to shape Next.js' roadmap and prioritize features.
|
|
|
30
30
|
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
|
|
31
31
|
https://nextjs.org/telemetry
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Skipping linting
|
|
34
|
+
Checking validity of types ...
|
|
34
35
|
Creating an optimized production build ...
|
|
35
36
|
Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc.js" https://nextjs.org/docs/messages/swc-disabled
|
|
36
37
|
Using external babel configuration from /home/runner/work/faststore/faststore/packages/core/.babelrc.js
|
|
@@ -38,8 +39,8 @@ https://nextjs.org/telemetry
|
|
|
38
39
|
Collecting page data ...
|
|
39
40
|
Generating static pages (0/7) ...
|
|
40
41
|
|
|
41
42
|
Generating static pages (1/7)
|
|
42
|
-
|
|
43
43
|
Generating static pages (3/7)
|
|
44
44
|
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
45
|
+
|
|
45
46
|
Generating static pages (3/7)
|
|
46
47
|
|
|
47
48
|
Generating static pages (5/7)
|
|
48
49
|
|
|
49
50
|
✓ Generating static pages (7/7)
|
|
50
51
|
Finalizing page optimization ...
|
|
@@ -50,7 +51,7 @@ Route (pages) Size First Load JS
|
|
|
50
51
|
├ └ css/b1806cbafd0c1f81.css 3.06 kB
|
|
51
52
|
├ /_app 0 B 92 kB
|
|
52
53
|
├ ● /[...slug] 2.09 kB 131 kB
|
|
53
|
-
├ ● /[slug]/p 34 kB
|
|
54
|
+
├ ● /[slug]/p 34.1 kB 153 kB
|
|
54
55
|
├ ├ css/bf1560439df2c1a1.css 5.66 kB
|
|
55
56
|
├ ├ css/e3ff5d95518a5c79.css 6.01 kB
|
|
56
57
|
├ └ css/d23b961580181439.css 15.6 kB
|
|
@@ -66,13 +67,13 @@ Route (pages) Size First Load JS
|
|
|
66
67
|
└ ● /s 2.92 kB 132 kB
|
|
67
68
|
+ First Load JS shared by all 95 kB
|
|
68
69
|
├ chunks/framework-12a146e94cfcf7c4.js 45.4 kB
|
|
69
|
-
├ chunks/main-
|
|
70
|
-
├ chunks/pages/_app-
|
|
71
|
-
├ chunks/webpack-
|
|
70
|
+
├ chunks/main-48d1188fa94dad34.js 33.1 kB
|
|
71
|
+
├ chunks/pages/_app-e0cf85dd2f4d858c.js 9.97 kB
|
|
72
|
+
├ chunks/webpack-ed53dd91aa26df33.js 3.57 kB
|
|
72
73
|
└ css/ee0556daedda6306.css 3.07 kB
|
|
73
74
|
|
|
74
75
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
|
75
76
|
○ (Static) automatically rendered as static HTML (uses no initial props)
|
|
76
77
|
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
|
|
77
78
|
|
|
78
|
-
Done in
|
|
79
|
+
Done in 69.01s.
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
yarn run v1.22.22
|
|
2
2
|
$ jest
|
|
3
|
-
PASS test/utils/multipleTemplates.test.ts (
|
|
4
|
-
PASS test/server/cms/index.test.ts (
|
|
5
|
-
PASS test/server/index.test.ts (
|
|
3
|
+
PASS test/utils/multipleTemplates.test.ts (33.571 s)
|
|
4
|
+
PASS test/server/cms/index.test.ts (34.063 s)
|
|
5
|
+
PASS test/server/index.test.ts (38.869 s)
|
|
6
6
|
|
|
7
7
|
Test Suites: 3 passed, 3 total
|
|
8
8
|
Tests: 19 passed, 19 total
|
|
9
9
|
Snapshots: 0 total
|
|
10
|
-
Time:
|
|
10
|
+
Time: 39.982 s
|
|
11
11
|
Ran all test suites.
|
|
12
|
-
Done in
|
|
12
|
+
Done in 41.52s.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.11.4](https://github.com/vtex/faststore/compare/v3.11.3...v3.11.4) (2025-01-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @faststore/core
|
|
9
|
+
|
|
10
|
+
## [3.11.3](https://github.com/vtex/faststore/compare/v3.11.2...v3.11.3) (2025-01-29)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @faststore/core
|
|
13
|
+
|
|
6
14
|
## [3.11.2](https://github.com/vtex/faststore/compare/v3.11.1...v3.11.2) (2025-01-29)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @faststore/core
|
package/README.md
CHANGED
|
@@ -51,7 +51,6 @@ A quick look at the top-level files and directories you'll see in a this NextJS
|
|
|
51
51
|
├── .prettierrrc
|
|
52
52
|
├── .stylelintignore
|
|
53
53
|
├── .gitignore
|
|
54
|
-
├── .eslintignore
|
|
55
54
|
├── codegen.ts
|
|
56
55
|
├── cypress
|
|
57
56
|
├── cypress.config.ts
|
|
@@ -98,8 +97,6 @@ A quick look at the top-level files and directories you'll see in a this NextJS
|
|
|
98
97
|
|
|
99
98
|
13. **`.prettierignore`**: Ignore listed files when applying prettier rules
|
|
100
99
|
|
|
101
|
-
14. **`.eslintignore`**: Ignore listed files when applying eslint rules
|
|
102
|
-
|
|
103
100
|
## 💻 Code Structure
|
|
104
101
|
|
|
105
102
|
All code is inside the `src` folder. The code is split into folders that implement an MVC-like architecture.
|
package/codegen.ts
CHANGED
package/cypress/plugins/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line spaced-comment
|
|
2
1
|
/// <reference types="cypress" />
|
|
3
2
|
// ***********************************************************
|
|
4
3
|
// This example plugins/index.js can be used to load plugins
|
|
@@ -22,13 +21,11 @@ module.exports = (on, config) => {
|
|
|
22
21
|
|
|
23
22
|
on('task', {
|
|
24
23
|
log(message) {
|
|
25
|
-
// eslint-disable-next-line no-console
|
|
26
24
|
console.log(message)
|
|
27
25
|
|
|
28
26
|
return null
|
|
29
27
|
},
|
|
30
28
|
table(message) {
|
|
31
|
-
// eslint-disable-next-line no-console
|
|
32
29
|
console.table(message)
|
|
33
30
|
|
|
34
31
|
return null
|
|
@@ -6,7 +6,7 @@ module.exports = {
|
|
|
6
6
|
author: 'Store Framework',
|
|
7
7
|
plp: {
|
|
8
8
|
titleTemplate: '%s | FastStore PLP',
|
|
9
|
-
descriptionTemplate: '%s products on FastStore Product Listing Page'
|
|
9
|
+
descriptionTemplate: '%s products on FastStore Product Listing Page',
|
|
10
10
|
},
|
|
11
11
|
search: {
|
|
12
12
|
titleTemplate: '%s: Search results title',
|
package/next-seo.config.ts
CHANGED
package/next.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"@envelop/graphql-jit": "^8.0.3",
|
|
44
44
|
"@envelop/parser-cache": "^6.0.2",
|
|
45
45
|
"@envelop/validation-cache": "^6.0.2",
|
|
46
|
-
"@faststore/api": "^3.
|
|
47
|
-
"@faststore/components": "^3.11.
|
|
48
|
-
"@faststore/graphql-utils": "^3.
|
|
49
|
-
"@faststore/lighthouse": "^3.
|
|
50
|
-
"@faststore/sdk": "^3.
|
|
51
|
-
"@faststore/ui": "^3.11.
|
|
46
|
+
"@faststore/api": "^3.11.4",
|
|
47
|
+
"@faststore/components": "^3.11.4",
|
|
48
|
+
"@faststore/graphql-utils": "^3.11.3",
|
|
49
|
+
"@faststore/lighthouse": "^3.11.3",
|
|
50
|
+
"@faststore/sdk": "^3.11.4",
|
|
51
|
+
"@faststore/ui": "^3.11.4",
|
|
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",
|
|
@@ -81,13 +81,11 @@
|
|
|
81
81
|
"sharp": "^0.32.6",
|
|
82
82
|
"style-loader": "^3.3.1",
|
|
83
83
|
"swr": "^1.3.0",
|
|
84
|
-
"tsx": "^4.6.2"
|
|
85
|
-
"typescript": "4.7.3"
|
|
84
|
+
"tsx": "^4.6.2"
|
|
86
85
|
},
|
|
87
86
|
"devDependencies": {
|
|
88
87
|
"@cypress/code-coverage": "^3.12.1",
|
|
89
88
|
"@envelop/testing": "^6.0.0",
|
|
90
|
-
"@faststore/eslint-config": "^3.9.0",
|
|
91
89
|
"@lhci/cli": "^0.9.0",
|
|
92
90
|
"@testing-library/cypress": "^10.0.1",
|
|
93
91
|
"@types/cypress": "^1.1.3",
|
|
@@ -103,5 +101,5 @@
|
|
|
103
101
|
"jest": "^29.7.0",
|
|
104
102
|
"ts-jest": "29.1.1"
|
|
105
103
|
},
|
|
106
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "12b2c7ae619a3f903e514cfd2dffd7d75cfb0a6d"
|
|
107
105
|
}
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
|
|
8
8
|
import type { CurrencyCode, ViewCartEvent } from '@faststore/sdk'
|
|
9
9
|
import { Icon, useFadeEffect, useUI } from '@faststore/ui'
|
|
10
|
-
import { ReactNode, useCallback, useEffect, useMemo } from 'react'
|
|
10
|
+
import { type ReactNode, useCallback, useEffect, useMemo } from 'react'
|
|
11
11
|
import { useCart } from 'src/sdk/cart'
|
|
12
12
|
import { useCheckoutButton } from 'src/sdk/cart/useCheckoutButton'
|
|
13
13
|
import { useSession } from 'src/sdk/session'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Locator, Section } from '@vtex/client-cms'
|
|
1
|
+
import type { Locator, Section } from '@vtex/client-cms'
|
|
2
2
|
import storeConfig from 'discovery.config'
|
|
3
|
-
import { PageContentType, getPage } from 'src/server/cms'
|
|
3
|
+
import { type PageContentType, getPage } from 'src/server/cms'
|
|
4
4
|
|
|
5
5
|
export const GLOBAL_SECTIONS_CONTENT_TYPE = 'globalSections'
|
|
6
6
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ComponentType,
|
|
3
|
-
PropsWithChildren,
|
|
4
|
-
ReactNode,
|
|
2
|
+
type ComponentType,
|
|
3
|
+
type PropsWithChildren,
|
|
4
|
+
type ReactNode,
|
|
5
5
|
memo,
|
|
6
6
|
useMemo,
|
|
7
7
|
} from 'react'
|
|
8
8
|
|
|
9
9
|
import { useUI } from '@faststore/ui'
|
|
10
|
-
import { Section } from '@vtex/client-cms'
|
|
10
|
+
import type { Section } from '@vtex/client-cms'
|
|
11
11
|
import dynamic from 'next/dynamic'
|
|
12
12
|
import useTTI from 'src/sdk/performance/useTTI'
|
|
13
13
|
import SectionBoundary from './SectionBoundary'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic'
|
|
2
|
-
import { ComponentType } from 'react'
|
|
2
|
+
import type { ComponentType } from 'react'
|
|
3
3
|
|
|
4
4
|
import { OverriddenDefaultAlert as Alert } from 'src/components/sections/Alert/OverriddenDefaultAlert'
|
|
5
5
|
import { OverriddenDefaultNavbar as Navbar } from 'src/components/sections/Navbar/OverriddenDefaultNavbar'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic'
|
|
2
|
-
import { ComponentType } from 'react'
|
|
2
|
+
import type { ComponentType } from 'react'
|
|
3
3
|
|
|
4
4
|
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
5
5
|
import Incentives from 'src/components/sections/Incentives'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic'
|
|
2
|
-
import { ComponentType } from 'react'
|
|
2
|
+
import type { ComponentType } from 'react'
|
|
3
3
|
|
|
4
4
|
import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
|
|
5
5
|
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic'
|
|
2
|
-
import { ComponentType } from 'react'
|
|
2
|
+
import type { ComponentType } from 'react'
|
|
3
3
|
|
|
4
4
|
import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
|
|
5
5
|
import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropsWithChildren, ReactNode } from 'react'
|
|
2
2
|
import { useCallback, useState } from 'react'
|
|
3
3
|
|
|
4
|
-
import { AlertProps as UIAlertProps } from '@faststore/ui'
|
|
4
|
+
import type { AlertProps as UIAlertProps } from '@faststore/ui'
|
|
5
5
|
|
|
6
6
|
import Section from 'src/components/sections/Section/Section'
|
|
7
7
|
import styles from './section.module.scss'
|
|
@@ -7,7 +7,7 @@ import { memo, useMemo } from 'react'
|
|
|
7
7
|
|
|
8
8
|
import { gql } from '@generated'
|
|
9
9
|
import type { ProductSummary_ProductFragment } from '@generated/graphql'
|
|
10
|
-
import { ImageProps } from 'next/image'
|
|
10
|
+
import type { ImageProps } from 'next/image'
|
|
11
11
|
import NextLink from 'next/link'
|
|
12
12
|
import { Image } from 'src/components/ui/Image'
|
|
13
13
|
import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from '@faststore/ui'
|
|
5
5
|
import type { ClientManyProductsQueryQuery } from '@generated/graphql'
|
|
6
6
|
import ProductGridSkeleton from 'src/components/skeletons/ProductGridSkeleton'
|
|
7
|
-
import { ProductCardProps } from '../ProductCard'
|
|
7
|
+
import type { ProductCardProps } from '../ProductCard'
|
|
8
8
|
|
|
9
9
|
import { memo } from 'react'
|
|
10
10
|
import ViewportObserver from 'src/components/cms/ViewportObserver'
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { gql } from '@generated/gql'
|
|
11
11
|
import type { Filter_FacetsFragment } from '@generated/graphql'
|
|
12
12
|
import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
|
|
13
|
-
import { useFilter } from 'src/sdk/search/useFilter'
|
|
13
|
+
import type { useFilter } from 'src/sdk/search/useFilter'
|
|
14
14
|
|
|
15
15
|
interface Props {
|
|
16
16
|
/**
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
import { SearchHistory } from '../SearchHistory'
|
|
10
10
|
import { SearchTop } from '../SearchTop'
|
|
11
11
|
|
|
12
|
-
import { SearchState } from '@faststore/sdk'
|
|
13
|
-
import { ProductSummary_ProductFragment } from '@generated/graphql'
|
|
12
|
+
import type { SearchState } from '@faststore/sdk'
|
|
13
|
+
import type { ProductSummary_ProductFragment } from '@generated/graphql'
|
|
14
14
|
import SearchProductItem from 'src/components/search/SearchProductItem'
|
|
15
15
|
import { formatSearchPath } from 'src/sdk/search/formatSearchPath'
|
|
16
16
|
import type {
|
|
@@ -25,7 +25,7 @@ import type {
|
|
|
25
25
|
SearchInputFieldRef as UISearchInputFieldRef,
|
|
26
26
|
} from '@faststore/ui'
|
|
27
27
|
|
|
28
|
-
import { SearchProviderContextValue } from '@faststore/ui'
|
|
28
|
+
import type { SearchProviderContextValue } from '@faststore/ui'
|
|
29
29
|
|
|
30
30
|
import useSearchHistory from 'src/sdk/search/useSearchHistory'
|
|
31
31
|
import useSuggestions from 'src/sdk/search/useSuggestions'
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@faststore/ui'
|
|
6
6
|
import type { HTMLAttributes } from 'react'
|
|
7
7
|
|
|
8
|
-
import { SearchState } from '@faststore/sdk'
|
|
8
|
+
import type { SearchState } from '@faststore/sdk'
|
|
9
9
|
import type { StoreSuggestionTerm } from '@generated/graphql'
|
|
10
10
|
import { formatSearchPath } from 'src/sdk/search/formatSearchPath'
|
|
11
11
|
import useTopSearch from 'src/sdk/search/useTopSearch'
|
|
@@ -4,8 +4,8 @@ import Section from '../Section'
|
|
|
4
4
|
|
|
5
5
|
import styles from './section.module.scss'
|
|
6
6
|
import {
|
|
7
|
-
PDPContext,
|
|
8
|
-
PLPContext,
|
|
7
|
+
type PDPContext,
|
|
8
|
+
type PLPContext,
|
|
9
9
|
isPDP,
|
|
10
10
|
isPLP,
|
|
11
11
|
usePage,
|
|
@@ -31,8 +31,8 @@ function BreadcrumbSection({ ...otherProps }: BreadcrumbSectionProps) {
|
|
|
31
31
|
const breadcrumbList = isPDP(context)
|
|
32
32
|
? context?.data?.product?.breadcrumbList?.itemListElement
|
|
33
33
|
: isPLP(context)
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
? context?.data?.collection?.breadcrumbList?.itemListElement
|
|
35
|
+
: fallback
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<Section className={`${styles.section} section-breadcrumb`}>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
HeroProps as UIHeroProps,
|
|
3
3
|
HeroHeaderProps as UIHeroHeaderProps,
|
|
4
4
|
} from '@faststore/ui'
|
|
5
|
-
import { ReactNode } from 'react'
|
|
5
|
+
import type { ReactNode } from 'react'
|
|
6
6
|
import { Image } from '../../../components/ui/Image'
|
|
7
7
|
|
|
8
8
|
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import ProductGallery, {
|
|
2
|
-
ProductGalleryProps,
|
|
2
|
+
type ProductGalleryProps,
|
|
3
3
|
} from '../../ui/ProductGallery/ProductGallery'
|
|
4
4
|
import Section from '../Section'
|
|
5
5
|
import type { EmptyGalleryProps } from './EmptyGallery'
|
|
6
6
|
|
|
7
7
|
import styles from './section.module.scss'
|
|
8
8
|
import {
|
|
9
|
-
PLPContext,
|
|
10
|
-
SearchPageContext,
|
|
9
|
+
type PLPContext,
|
|
10
|
+
type SearchPageContext,
|
|
11
11
|
isPLP,
|
|
12
12
|
isSearchPage,
|
|
13
13
|
usePage,
|
|
@@ -39,8 +39,8 @@ function ProductGallerySection({
|
|
|
39
39
|
const [title, searchTerm] = isSearchPage(context)
|
|
40
40
|
? [context?.data?.title, context?.data?.searchTerm]
|
|
41
41
|
: isPLP(context)
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
? [context?.data?.collection?.seo?.title]
|
|
43
|
+
: ['']
|
|
44
44
|
|
|
45
45
|
const totalCount = context?.data?.search?.products?.pageInfo?.totalCount ?? 0
|
|
46
46
|
|
|
@@ -2,7 +2,7 @@ import { useInView } from 'react-intersection-observer'
|
|
|
2
2
|
import Section from '../Section'
|
|
3
3
|
|
|
4
4
|
import ProductShelf, {
|
|
5
|
-
ProductShelfProps,
|
|
5
|
+
type ProductShelfProps,
|
|
6
6
|
} from '../../../components/ui/ProductShelf'
|
|
7
7
|
import styles from './section.module.scss'
|
|
8
8
|
import { ProductShelfDefaultComponents } from './DefaultComponents'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { getOverridableSection } from '../../..//sdk/overrides/getOverriddenSection'
|
|
2
|
-
import RegionBar, {
|
|
2
|
+
import RegionBar, {
|
|
3
|
+
type RegionBarProps,
|
|
4
|
+
} from '../../region/RegionBar/RegionBar'
|
|
3
5
|
import Section from '../Section/Section'
|
|
4
6
|
import { RegionBarDefaultComponents } from './DefaultComponents'
|
|
5
7
|
import styles from './section.module.scss'
|
|
@@ -9,9 +9,9 @@ import COMPONENTS from 'src/components/cms/plp/Components'
|
|
|
9
9
|
import RenderSections, {
|
|
10
10
|
LazyLoadingSection,
|
|
11
11
|
} from 'src/components/cms/RenderSections'
|
|
12
|
-
import { PLPContentType } from 'src/server/cms/plp'
|
|
12
|
+
import type { PLPContentType } from 'src/server/cms/plp'
|
|
13
13
|
|
|
14
|
-
import PageProvider, { PLPContext } from 'src/sdk/overrides/PageProvider'
|
|
14
|
+
import PageProvider, { type PLPContext } from 'src/sdk/overrides/PageProvider'
|
|
15
15
|
import {
|
|
16
16
|
useCreateUseGalleryPage,
|
|
17
17
|
UseGalleryPageContext,
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { ClientProductGalleryQueryQuery as ClientProductGalleryQuery } from '@generated/graphql'
|
|
2
2
|
import RenderSections from 'src/components/cms/RenderSections'
|
|
3
3
|
import COMPONENTS from 'src/components/cms/search/Components'
|
|
4
|
-
import { SearchPageContextType } from 'src/pages/s'
|
|
5
|
-
import PageProvider, {
|
|
4
|
+
import type { SearchPageContextType } from 'src/pages/s'
|
|
5
|
+
import PageProvider, {
|
|
6
|
+
type SearchPageContext,
|
|
7
|
+
} from 'src/sdk/overrides/PageProvider'
|
|
6
8
|
import {
|
|
7
9
|
useCreateUseGalleryPage,
|
|
8
10
|
UseGalleryPageContext,
|
|
9
11
|
} from 'src/sdk/product/usePageProductsQuery'
|
|
10
|
-
import { SearchContentType } from 'src/server/cms'
|
|
12
|
+
import type { SearchContentType } from 'src/server/cms'
|
|
11
13
|
|
|
12
14
|
export type SearchPageProps = {
|
|
13
15
|
data: SearchPageContextType & ClientProductGalleryQuery
|
|
@@ -10,7 +10,7 @@ export type LinkProps<T extends LinkElementType = 'a'> = UILinkProps<T> &
|
|
|
10
10
|
AnchorHTMLAttributes<HTMLAnchorElement>
|
|
11
11
|
|
|
12
12
|
const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link<
|
|
13
|
-
T extends LinkElementType = 'a'
|
|
13
|
+
T extends LinkElementType = 'a',
|
|
14
14
|
>(
|
|
15
15
|
{ href, inverse, children, variant = 'default', ...otherProps }: LinkProps<T>,
|
|
16
16
|
ref: Ref<HTMLAnchorElement>
|
|
@@ -9,13 +9,13 @@ import ProductGridSkeleton from 'src/components/skeletons/ProductGridSkeleton'
|
|
|
9
9
|
|
|
10
10
|
import dynamic from 'next/dynamic'
|
|
11
11
|
|
|
12
|
-
import { ProductCardProps } from 'src/components/product/ProductCard'
|
|
13
|
-
import { FilterSliderProps } from 'src/components/search/Filter/FilterSlider'
|
|
14
|
-
import { SortProps } from 'src/components/search/Sort/Sort'
|
|
12
|
+
import type { ProductCardProps } from 'src/components/product/ProductCard'
|
|
13
|
+
import type { FilterSliderProps } from 'src/components/search/Filter/FilterSlider'
|
|
14
|
+
import type { SortProps } from 'src/components/search/Sort/Sort'
|
|
15
15
|
import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
|
|
16
16
|
import {
|
|
17
|
-
PLPContext,
|
|
18
|
-
SearchPageContext,
|
|
17
|
+
type PLPContext,
|
|
18
|
+
type SearchPageContext,
|
|
19
19
|
usePage,
|
|
20
20
|
} from 'src/sdk/overrides/PageProvider'
|
|
21
21
|
import { useProductsPrefetch } from 'src/sdk/product/useProductsPrefetch'
|