@faststore/core 2.2.70 → 2.2.71
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 +62 -52
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1gneedd +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- 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-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +4 -4
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/117.js +427 -0
- package/.next/server/chunks/184.js +61 -0
- package/.next/server/chunks/350.js +2846 -35
- package/.next/server/chunks/585.js +22 -0
- package/.next/server/chunks/632.js +514 -0
- package/.next/server/chunks/661.js +1451 -0
- package/.next/server/chunks/693.js +58 -0
- package/.next/server/chunks/719.js +84 -0
- package/.next/server/chunks/74.js +569 -6467
- package/.next/server/chunks/779.js +58 -0
- package/.next/server/chunks/854.js +72 -0
- package/.next/server/chunks/863.js +22 -0
- package/.next/server/chunks/{520.js → 898.js} +250 -30
- package/.next/server/chunks/903.js +1926 -0
- 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 +0 -21
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js +0 -21
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +9 -9
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1373 -33
- 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/_error.js.nft.json +1 -1
- package/.next/server/pages/account.js +0 -21
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/checkout.js +0 -21
- 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.html +2 -2
- 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 +5 -5
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js +0 -21
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +4 -58
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/static/IDskqcKTB7kE5quFZAhgJ/_buildManifest.js +1 -0
- package/.next/static/chunks/223-cb77217cce52d45c.js +1 -0
- package/.next/static/chunks/251.11f5198fc8bef3a4.js +1 -0
- package/.next/static/chunks/397-0d3aada1012cd78b.js +1 -0
- package/.next/static/chunks/585.6561778b7763b79e.js +1 -0
- package/.next/static/chunks/675-479a97aecebead97.js +1 -0
- package/.next/static/chunks/800.5d92de2974baf641.js +1 -0
- package/.next/static/chunks/881-57643fb90f59e576.js +1 -0
- package/.next/static/chunks/988.afda042dd9ba11d1.js +1 -0
- package/.next/static/chunks/pages/404-e106cb9a78182f5f.js +1 -0
- package/.next/static/chunks/pages/500-d28aa4a8ce88bddd.js +1 -0
- package/.next/static/chunks/pages/[...slug]-cf872b9e9befd47c.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-4a75b11857b82b5c.js +1 -0
- package/.next/static/chunks/pages/{account-3741291b1e89c2e7.js → account-bf9c88a9cac80d8a.js} +1 -1
- package/.next/static/chunks/pages/{checkout-95066de007bdbbdb.js → checkout-6ca76c1e88a28ac4.js} +1 -1
- package/.next/static/chunks/pages/index-629ba146ae5f0ecf.js +1 -0
- package/.next/static/chunks/pages/login-d2af0de13ea75848.js +1 -0
- package/.next/static/chunks/pages/s-d729254b91430d1c.js +1 -0
- package/.next/static/chunks/webpack-54ce04ec11860b0b.js +1 -0
- package/.next/static/css/021de9c7b050d301.css +1 -0
- package/.next/static/css/510895065f32ed2f.css +1 -0
- package/.next/static/css/7e897ebb936fac09.css +1 -0
- package/.next/static/css/938781cdc945862e.css +1 -0
- package/.next/static/css/9558da13053ac066.css +1 -0
- package/.next/static/css/def381bf7c69fa2e.css +1 -0
- package/.next/trace +82 -82
- package/.turbo/turbo-build.log +19 -19
- package/.turbo/turbo-test.log +11 -11
- package/index.ts +13 -0
- package/package.json +2 -2
- package/src/components/sections/Alert/Alert.tsx +11 -3
- package/src/components/sections/Alert/OverriddenDefaultAlert.ts +7 -4
- package/src/components/sections/BannerText/BannerText.tsx +10 -2
- package/src/components/sections/BannerText/OverriddenDefaultBannerText.ts +7 -4
- package/src/components/sections/Breadcrumb/Breadcrumb.tsx +9 -3
- package/src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb.ts +7 -4
- package/src/components/sections/CrossSellingShelf/CrossSellingShelf.tsx +8 -2
- package/src/components/sections/CrossSellingShelf/OverriddenDefaultCrossSellingShelf.ts +2 -1
- package/src/components/sections/EmptyState/Overrides.tsx +2 -2
- package/src/components/sections/Hero/Hero.tsx +11 -3
- package/src/components/sections/Hero/OverriddenDefaultHero.ts +7 -4
- package/src/components/sections/Navbar/Navbar.tsx +10 -2
- package/src/components/sections/Navbar/OverriddenDefaultNavbar.ts +6 -4
- package/src/components/sections/Newsletter/Newsletter.tsx +10 -2
- package/src/components/sections/Newsletter/OverriddenDefaultNewsletter.ts +6 -4
- package/src/components/sections/ProductDetails/OverriddenDefaultProductDetails.ts +7 -4
- package/src/components/sections/ProductDetails/ProductDetails.tsx +16 -8
- package/src/components/sections/ProductGallery/OverriddenDefaultProductGallery.ts +6 -4
- package/src/components/sections/ProductGallery/ProductGallery.tsx +13 -5
- package/src/components/sections/ProductShelf/OverriddenDefaultProductShelf.ts +7 -4
- package/src/components/sections/ProductShelf/ProductShelf.tsx +12 -2
- package/src/components/sections/RegionBar/OverriddenDefaultRegionBar.ts +6 -4
- package/src/components/sections/RegionBar/RegionBar.tsx +11 -5
- package/src/sdk/overrides/getOverriddenSection.tsx +45 -44
- package/src/sdk/overrides/overrides.ts +2 -2
- package/src/typings/overrides.ts +265 -187
- package/src/typings/overridesDefinition.ts +20 -6
- package/.next/server/chunks/445.js +0 -167
- package/.next/server/chunks/829.js +0 -2938
- package/.next/server/chunks/934.js +0 -125
- package/.next/static/9t0jxL0Q7hZ_ItlxJLOtn/_buildManifest.js +0 -1
- package/.next/static/chunks/251.65e0bb7a2f58b3db.js +0 -1
- package/.next/static/chunks/464-bc1301cb64b71518.js +0 -1
- package/.next/static/chunks/557-4f8a963d7e07e582.js +0 -1
- package/.next/static/chunks/585.ee7478bead8853ae.js +0 -1
- package/.next/static/chunks/800.8f4f91b39aa47346.js +0 -1
- package/.next/static/chunks/988.a57dac6501fb5184.js +0 -1
- package/.next/static/chunks/pages/404-8aa1a5d5e6a66a9a.js +0 -1
- package/.next/static/chunks/pages/500-36ea8ba52ee65fe2.js +0 -1
- package/.next/static/chunks/pages/[...slug]-29c2c581a7246de4.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-d4a3fd33abda8f62.js +0 -1
- package/.next/static/chunks/pages/index-bbd90798e45dc0ff.js +0 -1
- package/.next/static/chunks/pages/login-f0d8dfab2f856c25.js +0 -1
- package/.next/static/chunks/pages/s-e9b663c3e4f84b0a.js +0 -1
- package/.next/static/chunks/webpack-776cfd646b505dc5.js +0 -1
- package/.next/static/css/0c844be3b8585e70.css +0 -1
- package/.next/static/css/557d58510041152c.css +0 -1
- package/.next/static/css/a6bcc59f42b42f36.css +0 -1
- package/.next/static/css/ecdecb8d639a8311.css +0 -1
- package/src/sdk/overrides/sections.tsx +0 -58
- /package/.next/static/{9t0jxL0Q7hZ_ItlxJLOtn → IDskqcKTB7kE5quFZAhgJ}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$ yarn partytown & yarn generate && next build
|
|
2
2
|
$ partytown copylib ./public/~partytown
|
|
3
|
-
$ faststore generate-graphql -c
|
|
4
3
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
4
|
+
$ faststore generate-graphql -c
|
|
5
5
|
success - GraphQL schema, types, and optimizations successfully generated 🎉
|
|
6
6
|
warn - You have enabled experimental feature (scrollRestoration) in next.config.js.
|
|
7
7
|
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
|
|
@@ -38,28 +38,28 @@ info - Generating static pages (7/7)
|
|
|
38
38
|
info - Finalizing page optimization...
|
|
39
39
|
|
|
40
40
|
Route (pages) Size First Load JS
|
|
41
|
-
┌ ● /
|
|
42
|
-
├ └ css/
|
|
43
|
-
├ /_app 0 B 83.
|
|
44
|
-
├ ● /[...slug] 4.
|
|
45
|
-
├ └ css/
|
|
46
|
-
├ ● /[slug]/p
|
|
47
|
-
├ └ css/
|
|
48
|
-
├ ○ /404 1.
|
|
49
|
-
├ ● /500 1.
|
|
50
|
-
├ ● /account
|
|
51
|
-
├ λ /api/graphql 0 B 83.
|
|
52
|
-
├ λ /api/health/live 0 B 83.
|
|
53
|
-
├ λ /api/health/ready 0 B 83.
|
|
54
|
-
├ λ /api/preview 0 B 83.
|
|
55
|
-
├ ● /checkout 660 B
|
|
56
|
-
├ ● /login
|
|
57
|
-
└ ● /s
|
|
41
|
+
┌ ● / 3.38 kB 129 kB
|
|
42
|
+
├ └ css/7e897ebb936fac09.css 6.55 kB
|
|
43
|
+
├ /_app 0 B 83.8 kB
|
|
44
|
+
├ ● /[...slug] 4.49 kB 141 kB
|
|
45
|
+
├ └ css/510895065f32ed2f.css 7 kB
|
|
46
|
+
├ ● /[slug]/p 10.9 kB 136 kB
|
|
47
|
+
├ └ css/def381bf7c69fa2e.css 11.3 kB
|
|
48
|
+
├ ○ /404 1.19 kB 112 kB
|
|
49
|
+
├ ● /500 1.21 kB 112 kB
|
|
50
|
+
├ ● /account 675 B 111 kB
|
|
51
|
+
├ λ /api/graphql 0 B 83.8 kB
|
|
52
|
+
├ λ /api/health/live 0 B 83.8 kB
|
|
53
|
+
├ λ /api/health/ready 0 B 83.8 kB
|
|
54
|
+
├ λ /api/preview 0 B 83.8 kB
|
|
55
|
+
├ ● /checkout 660 B 111 kB
|
|
56
|
+
├ ● /login 1.14 kB 112 kB
|
|
57
|
+
└ ● /s 4.63 kB 126 kB
|
|
58
58
|
+ First Load JS shared by all 86.8 kB
|
|
59
59
|
├ chunks/framework-dfd14d7ce6600b03.js 45.3 kB
|
|
60
60
|
├ chunks/main-e4e873ee741162eb.js 24.2 kB
|
|
61
61
|
├ chunks/pages/_app-30b9666307e4b3b1.js 12.1 kB
|
|
62
|
-
├ chunks/webpack-
|
|
62
|
+
├ chunks/webpack-54ce04ec11860b0b.js 2.25 kB
|
|
63
63
|
└ css/5d1f64b61ea581f4.css 3.05 kB
|
|
64
64
|
|
|
65
65
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
$ jest
|
|
2
|
-
PASS test/server/index.test.ts (
|
|
2
|
+
PASS test/server/index.test.ts (22.442 s)
|
|
3
3
|
FastStore GraphQL Layer
|
|
4
4
|
@faststore/api
|
|
5
|
-
✓ should return a valid GraphQL schema (
|
|
6
|
-
✓ should return a valid GraphQL schema contain all expected types (
|
|
7
|
-
✓ should return a valid GraphQL schema contain all expected queries (
|
|
8
|
-
✓ should return a valid GraphQL schema contain all expected mutations
|
|
5
|
+
✓ should return a valid GraphQL schema (12 ms)
|
|
6
|
+
✓ should return a valid GraphQL schema contain all expected types (9 ms)
|
|
7
|
+
✓ should return a valid GraphQL schema contain all expected queries (2 ms)
|
|
8
|
+
✓ should return a valid GraphQL schema contain all expected mutations
|
|
9
9
|
VTEX API Extension
|
|
10
|
-
✓ getTypeDefsFromFolder function should return an Array (
|
|
10
|
+
✓ getTypeDefsFromFolder function should return an Array (30 ms)
|
|
11
11
|
Third Party API Extension
|
|
12
|
-
✓ getTypeDefsFromFolder function should return an Array (
|
|
12
|
+
✓ getTypeDefsFromFolder function should return an Array (9 ms)
|
|
13
13
|
Final Schema after merging
|
|
14
|
-
✓ should return a valid merged GraphQL schema (
|
|
14
|
+
✓ should return a valid merged GraphQL schema (42 ms)
|
|
15
15
|
Envelop
|
|
16
|
-
✓ should exist with its plugins (
|
|
17
|
-
✓ should handle options and execute (
|
|
16
|
+
✓ should exist with its plugins (43 ms)
|
|
17
|
+
✓ should handle options and execute (567 ms)
|
|
18
18
|
|
|
19
19
|
Test Suites: 1 passed, 1 total
|
|
20
20
|
Tests: 9 passed, 9 total
|
|
21
21
|
Snapshots: 0 total
|
|
22
|
-
Time:
|
|
22
|
+
Time: 22.575 s
|
|
23
23
|
Ran all test suites.
|
package/index.ts
CHANGED
|
@@ -18,3 +18,16 @@ export { useProductsQuery } from './src/sdk/product/useProductsQuery'
|
|
|
18
18
|
|
|
19
19
|
export * from './src/typings/overrides'
|
|
20
20
|
export { getOverriddenSection } from './src/sdk/overrides/getOverriddenSection'
|
|
21
|
+
|
|
22
|
+
// Overridable Sections
|
|
23
|
+
export { default as AlertSection } from './src/components/sections/Alert'
|
|
24
|
+
export { default as BannerTextSection } from './src/components/sections/BannerText'
|
|
25
|
+
export { default as BreadcrumbSection } from './src/components/sections/Breadcrumb'
|
|
26
|
+
export { default as CrossSellingShelfSection } from './src/components/sections/CrossSellingShelf'
|
|
27
|
+
export { default as HeroSection } from './src/components/sections/Hero'
|
|
28
|
+
export { default as NavbarSection } from './src/components/sections/Navbar'
|
|
29
|
+
export { default as NewsletterSection } from './src/components/sections/Newsletter'
|
|
30
|
+
export { default as ProductDetailsSection } from './src/components/sections/ProductDetails'
|
|
31
|
+
export { default as ProductGallerySection } from './src/components/sections/ProductGallery'
|
|
32
|
+
export { default as ProductShelfSection } from './src/components/sections/ProductShelf'
|
|
33
|
+
export { default as RegionBarSection } from './src/components/sections/RegionBar'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.71",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"node": "18.19.0",
|
|
124
124
|
"yarn": "1.19.1"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "8f5eb691823d713771a804589591b66b6effae55"
|
|
127
127
|
}
|
|
@@ -2,8 +2,10 @@ import type { ReactNode } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import CommonAlert, {
|
|
4
4
|
type AlertProps as CommonAlertProps,
|
|
5
|
-
} from '
|
|
6
|
-
import { useOverrideComponents } from '
|
|
5
|
+
} from '../../../components/common/Alert'
|
|
6
|
+
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
7
|
+
import { AlertDefaultComponents } from './DefaultComponents'
|
|
8
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
7
9
|
|
|
8
10
|
export interface AlertProps extends Omit<CommonAlertProps, 'link' | 'icon'> {
|
|
9
11
|
icon: string
|
|
@@ -35,4 +37,10 @@ function Alert({ icon, content, link: { text, to }, dismissible }: AlertProps) {
|
|
|
35
37
|
)
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
const OverridableAlert = getOverridableSection<typeof Alert>(
|
|
41
|
+
'Alert',
|
|
42
|
+
Alert,
|
|
43
|
+
AlertDefaultComponents
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
export default OverridableAlert
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/Alert'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import
|
|
3
|
+
import Alert from '.'
|
|
4
|
+
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* This component exists to support overrides 1.0
|
|
7
9
|
*
|
|
8
10
|
* This allows users to override the default Alert section present in the Headless CMS
|
|
9
11
|
*/
|
|
10
|
-
export const OverriddenDefaultAlert = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
12
|
+
export const OverriddenDefaultAlert = getOverriddenSection({
|
|
13
|
+
...(override as SectionOverrideDefinitionV1<'Alert'>),
|
|
14
|
+
Section: Alert,
|
|
15
|
+
})
|
|
@@ -3,10 +3,12 @@ import {
|
|
|
3
3
|
BannerTextContentProps as UIBannerTextContentProps,
|
|
4
4
|
} from '@faststore/ui'
|
|
5
5
|
|
|
6
|
-
import { useOverrideComponents } from '
|
|
6
|
+
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
7
7
|
import Section from '../Section'
|
|
8
8
|
|
|
9
9
|
import styles from './section.module.scss'
|
|
10
|
+
import { BannerTextDefaultComponents } from './DefaultComponents'
|
|
11
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
10
12
|
|
|
11
13
|
export interface BannerTextProps {
|
|
12
14
|
title: UIBannerTextContentProps['title']
|
|
@@ -55,4 +57,10 @@ function BannerText({
|
|
|
55
57
|
)
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
const OverridableBannerText = getOverridableSection<typeof BannerText>(
|
|
61
|
+
'BannerText',
|
|
62
|
+
BannerText,
|
|
63
|
+
BannerTextDefaultComponents
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
export default OverridableBannerText
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/BannerText'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import
|
|
3
|
+
import BannerText from '.'
|
|
4
|
+
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* This component exists to support overrides 1.0
|
|
7
9
|
*
|
|
8
10
|
* This allows users to override the default BannerText section present in the Headless CMS
|
|
9
11
|
*/
|
|
10
|
-
export const OverriddenDefaultBannerText = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
12
|
+
export const OverriddenDefaultBannerText = getOverriddenSection({
|
|
13
|
+
...(override as SectionOverrideDefinitionV1<'BannerText'>),
|
|
14
|
+
Section: BannerText,
|
|
15
|
+
})
|
|
@@ -9,8 +9,10 @@ import {
|
|
|
9
9
|
isPDP,
|
|
10
10
|
isPLP,
|
|
11
11
|
usePage,
|
|
12
|
-
} from '
|
|
13
|
-
import { useOverrideComponents } from '
|
|
12
|
+
} from '../../../sdk/overrides/PageProvider'
|
|
13
|
+
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
14
|
+
import { BreadcrumbDefaultComponents } from './DefaultComponents'
|
|
15
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
14
16
|
|
|
15
17
|
interface BreadcrumbSectionProps {
|
|
16
18
|
icon: string
|
|
@@ -39,4 +41,8 @@ function BreadcrumbSection({ ...otherProps }: BreadcrumbSectionProps) {
|
|
|
39
41
|
)
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
const OverridableBreadcrumbSection = getOverridableSection<
|
|
45
|
+
typeof BreadcrumbSection
|
|
46
|
+
>('Breadcrumb', BreadcrumbSection, BreadcrumbDefaultComponents)
|
|
47
|
+
|
|
48
|
+
export default memo(OverridableBreadcrumbSection)
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/Breadcrumb'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import
|
|
3
|
+
import Breadcrumb from '.'
|
|
4
|
+
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* This component exists to support overrides 1.0
|
|
7
9
|
*
|
|
8
10
|
* This allows users to override the default Breadcrumb section present in the Headless CMS
|
|
9
11
|
*/
|
|
10
|
-
export const OverriddenDefaultBreadcrumb = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
12
|
+
export const OverriddenDefaultBreadcrumb = getOverriddenSection({
|
|
13
|
+
...(override as SectionOverrideDefinitionV1<'Breadcrumb'>),
|
|
14
|
+
Section: Breadcrumb,
|
|
15
|
+
})
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { useMemo } from 'react'
|
|
2
2
|
|
|
3
|
-
import UIProductShelf from '
|
|
3
|
+
import UIProductShelf from '../../../components/ui/ProductShelf'
|
|
4
4
|
import { useInView } from 'react-intersection-observer'
|
|
5
5
|
import { usePDP } from 'src/sdk/overrides/PageProvider'
|
|
6
6
|
import styles from '../ProductShelf/section.module.scss'
|
|
7
7
|
import Section from '../Section'
|
|
8
|
+
import { CrossSellingShelfDefaultComponents } from './DefaultComponents'
|
|
9
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
8
10
|
|
|
9
11
|
interface Props {
|
|
10
12
|
numberOfItems: number
|
|
@@ -43,4 +45,8 @@ const CrossSellingShelf = ({
|
|
|
43
45
|
)
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
const OverridableCrossSellingShelf = getOverridableSection<
|
|
49
|
+
typeof CrossSellingShelf
|
|
50
|
+
>('CrossSellingShelf', CrossSellingShelf, CrossSellingShelfDefaultComponents)
|
|
51
|
+
|
|
52
|
+
export default OverridableCrossSellingShelf
|
|
@@ -2,13 +2,13 @@ import { EmptyState as UIEmptyState } from '@faststore/ui'
|
|
|
2
2
|
|
|
3
3
|
import { getSectionOverrides } from 'src/sdk/overrides/overrides'
|
|
4
4
|
import { override } from 'src/customizations/src/components/overrides/EmptyState'
|
|
5
|
-
import type {
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
6
6
|
|
|
7
7
|
const { EmptyState } = getSectionOverrides(
|
|
8
8
|
{
|
|
9
9
|
EmptyState: UIEmptyState,
|
|
10
10
|
},
|
|
11
|
-
override as
|
|
11
|
+
override as SectionOverrideDefinitionV1<'EmptyState'>
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
export { EmptyState }
|
|
@@ -3,13 +3,15 @@ import {
|
|
|
3
3
|
HeroHeaderProps as UIHeroHeaderProps,
|
|
4
4
|
} from '@faststore/ui'
|
|
5
5
|
import { ReactNode } from 'react'
|
|
6
|
-
import { Image } from '
|
|
6
|
+
import { Image } from '../../../components/ui/Image'
|
|
7
7
|
|
|
8
|
-
import { useOverrideComponents } from '
|
|
8
|
+
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
9
9
|
|
|
10
10
|
import Section from '../Section'
|
|
11
11
|
|
|
12
12
|
import styles from './section.module.scss'
|
|
13
|
+
import { HeroDefaultComponents } from './DefaultComponents'
|
|
14
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
13
15
|
|
|
14
16
|
export type HeroProps = {
|
|
15
17
|
title: UIHeroHeaderProps['title']
|
|
@@ -74,4 +76,10 @@ const Hero = ({
|
|
|
74
76
|
)
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
|
|
79
|
+
const OverridableHero = getOverridableSection<typeof Hero>(
|
|
80
|
+
'Hero',
|
|
81
|
+
Hero,
|
|
82
|
+
HeroDefaultComponents
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
export default OverridableHero
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/Hero'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import
|
|
3
|
+
import Hero from '.'
|
|
4
|
+
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* This component exists to support overrides 1.0
|
|
7
9
|
*
|
|
8
10
|
* This allows users to override the default Hero section present in the Headless CMS
|
|
9
11
|
*/
|
|
10
|
-
export const OverriddenDefaultHero = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
12
|
+
export const OverriddenDefaultHero = getOverriddenSection({
|
|
13
|
+
...(override as SectionOverrideDefinitionV1<'Hero'>),
|
|
14
|
+
Section: Hero,
|
|
15
|
+
})
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
1
2
|
import Section from '../Section'
|
|
2
3
|
|
|
3
4
|
import styles from './section.module.scss'
|
|
4
5
|
|
|
5
|
-
import Navbar from '
|
|
6
|
+
import Navbar from '../../../components/navigation/Navbar'
|
|
7
|
+
import { NavbarDefaultComponents } from './DefaultComponents'
|
|
6
8
|
|
|
7
9
|
type PageLinks = {
|
|
8
10
|
url: string
|
|
@@ -91,4 +93,10 @@ function NavbarSection({
|
|
|
91
93
|
)
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
const OverridableNavbar = getOverridableSection<typeof NavbarSection>(
|
|
97
|
+
'Navbar',
|
|
98
|
+
NavbarSection,
|
|
99
|
+
NavbarDefaultComponents
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
export default OverridableNavbar
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/Navbar'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import type {
|
|
3
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
|
+
import Navbar from './Navbar'
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* This component exists to support overrides 1.0
|
|
7
8
|
*
|
|
8
9
|
* This allows users to override the default Navbar section present in the Headless CMS
|
|
9
10
|
*/
|
|
10
|
-
export const OverriddenDefaultNavbar = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
11
|
+
export const OverriddenDefaultNavbar = getOverriddenSection({
|
|
12
|
+
...(override as SectionOverrideDefinitionV1<'Navbar'>),
|
|
13
|
+
Section: Navbar,
|
|
14
|
+
})
|
|
@@ -4,10 +4,12 @@ import {
|
|
|
4
4
|
NewsletterHeaderProps as UINewsletterHeaderProps,
|
|
5
5
|
} from '@faststore/ui'
|
|
6
6
|
|
|
7
|
-
import UINewsletter from '
|
|
7
|
+
import UINewsletter from '../../ui/Newsletter'
|
|
8
8
|
|
|
9
9
|
import Section from '../Section'
|
|
10
10
|
import styles from './section.module.scss'
|
|
11
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
12
|
+
import { NewsletterDefaultComponents } from './DefaultComponents'
|
|
11
13
|
|
|
12
14
|
type SubscribeMessage = {
|
|
13
15
|
icon: string
|
|
@@ -111,4 +113,10 @@ function Newsletter({
|
|
|
111
113
|
)
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
const OverridableNewsletter = getOverridableSection<typeof Newsletter>(
|
|
117
|
+
'Newsletter',
|
|
118
|
+
Newsletter,
|
|
119
|
+
NewsletterDefaultComponents
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
export default OverridableNewsletter
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/Newsletter'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import type {
|
|
3
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
|
+
import Newsletter from './Newsletter'
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* This component exists to support overrides 1.0
|
|
7
8
|
*
|
|
8
9
|
* This allows users to override the default Newsletter section present in the Headless CMS
|
|
9
10
|
*/
|
|
10
|
-
export const OverriddenDefaultNewsletter = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
11
|
+
export const OverriddenDefaultNewsletter = getOverriddenSection({
|
|
12
|
+
...(override as SectionOverrideDefinitionV1<'Newsletter'>),
|
|
13
|
+
Section: Newsletter,
|
|
14
|
+
})
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/ProductDetails'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import
|
|
3
|
+
import ProductDetails from './ProductDetails'
|
|
4
|
+
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* This component exists to support overrides 1.0
|
|
7
9
|
*
|
|
8
10
|
* This allows users to override the default ProductDetails section present in the Headless CMS
|
|
9
11
|
*/
|
|
10
|
-
export const OverriddenDefaultProductDetails = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
12
|
+
export const OverriddenDefaultProductDetails = getOverriddenSection({
|
|
13
|
+
...(override as SectionOverrideDefinitionV1<'ProductDetails'>),
|
|
14
|
+
Section: ProductDetails,
|
|
15
|
+
})
|
|
@@ -4,18 +4,20 @@ import { gql } from '@faststore/graphql-utils'
|
|
|
4
4
|
import type { CurrencyCode, ViewItemEvent } from '@faststore/sdk'
|
|
5
5
|
import { sendAnalyticsEvent } from '@faststore/sdk'
|
|
6
6
|
|
|
7
|
-
import type { AnalyticsItem } from '
|
|
8
|
-
import { useFormattedPrice } from '
|
|
9
|
-
import { useSession } from '
|
|
7
|
+
import type { AnalyticsItem } from '../../../sdk/analytics/types'
|
|
8
|
+
import { useFormattedPrice } from '../../../sdk/product/useFormattedPrice'
|
|
9
|
+
import { useSession } from '../../../sdk/session'
|
|
10
10
|
|
|
11
11
|
import Section from '../Section'
|
|
12
|
-
import ProductDescription from '
|
|
13
|
-
import { ProductDetailsSettings } from '
|
|
12
|
+
import ProductDescription from '../../../components/ui/ProductDescription'
|
|
13
|
+
import { ProductDetailsSettings } from '../../../components/ui/ProductDetails'
|
|
14
14
|
|
|
15
15
|
import styles from './section.module.scss'
|
|
16
16
|
|
|
17
|
-
import { usePDP } from '
|
|
18
|
-
import { useOverrideComponents } from '
|
|
17
|
+
import { usePDP } from '../../../sdk/overrides/PageProvider'
|
|
18
|
+
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
19
|
+
import { ProductDetailsDefaultComponents } from './DefaultComponents'
|
|
20
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
19
21
|
|
|
20
22
|
export interface ProductDetailsProps {
|
|
21
23
|
productTitle: {
|
|
@@ -280,4 +282,10 @@ export const fragment = gql`
|
|
|
280
282
|
}
|
|
281
283
|
`
|
|
282
284
|
|
|
283
|
-
|
|
285
|
+
const OverridableProductDetails = getOverridableSection<typeof ProductDetails>(
|
|
286
|
+
'ProductDetails',
|
|
287
|
+
ProductDetails,
|
|
288
|
+
ProductDetailsDefaultComponents
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
export default OverridableProductDetails
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/ProductGallery'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import type {
|
|
3
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
|
+
import ProductGallery from '.'
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* This component exists to support overrides 1.0
|
|
7
8
|
*
|
|
8
9
|
* This allows users to override the default ProductGallery section present in the Headless CMS
|
|
9
10
|
*/
|
|
10
|
-
export const OverriddenDefaultProductGallery = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
11
|
+
export const OverriddenDefaultProductGallery = getOverriddenSection({
|
|
12
|
+
...(override as SectionOverrideDefinitionV1<'ProductGallery'>),
|
|
13
|
+
Section: ProductGallery,
|
|
14
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { mark } from '
|
|
1
|
+
import { mark } from '../../../sdk/tests/mark'
|
|
2
2
|
|
|
3
3
|
import ProductGallery, {
|
|
4
4
|
ProductGalleryProps,
|
|
5
|
-
} from '
|
|
5
|
+
} from '../../ui/ProductGallery/ProductGallery'
|
|
6
6
|
import Section from '../Section'
|
|
7
7
|
import type { EmptyGalleryProps } from './EmptyGallery'
|
|
8
8
|
|
|
@@ -13,8 +13,10 @@ import {
|
|
|
13
13
|
isPLP,
|
|
14
14
|
isSearchPage,
|
|
15
15
|
usePage,
|
|
16
|
-
} from '
|
|
17
|
-
import { useOverrideComponents } from '
|
|
16
|
+
} from '../../../sdk/overrides/PageProvider'
|
|
17
|
+
import { useOverrideComponents } from '../../../sdk/overrides/OverrideContext'
|
|
18
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
19
|
+
import { ProductGalleryDefaultComponents } from './DefaultComponents'
|
|
18
20
|
|
|
19
21
|
export interface ProductGallerySectionProps {
|
|
20
22
|
searchTermLabel?: ProductGalleryProps['searchTermLabel']
|
|
@@ -69,4 +71,10 @@ function ProductGallerySection({
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
ProductGallerySection.displayName = 'ProductGallery'
|
|
72
|
-
|
|
74
|
+
const MarkedProductGallery = mark(ProductGallerySection)
|
|
75
|
+
|
|
76
|
+
const OverridableProductGallery = getOverridableSection<
|
|
77
|
+
typeof MarkedProductGallery
|
|
78
|
+
>('ProductGallery', MarkedProductGallery, ProductGalleryDefaultComponents)
|
|
79
|
+
|
|
80
|
+
export default OverridableProductGallery
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { override } from 'src/customizations/src/components/overrides/ProductShelf'
|
|
2
2
|
import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
|
|
3
|
-
import
|
|
3
|
+
import ProductShelf from '.'
|
|
4
|
+
|
|
5
|
+
import type { SectionOverrideDefinitionV1 } from 'src/typings/overridesDefinition'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* This component exists to support overrides 1.0
|
|
7
9
|
*
|
|
8
10
|
* This allows users to override the default ProductShelf section present in the Headless CMS
|
|
9
11
|
*/
|
|
10
|
-
export const OverriddenDefaultProductShelf = getOverriddenSection(
|
|
11
|
-
override as
|
|
12
|
-
|
|
12
|
+
export const OverriddenDefaultProductShelf = getOverriddenSection({
|
|
13
|
+
...(override as SectionOverrideDefinitionV1<'ProductShelf'>),
|
|
14
|
+
Section: ProductShelf,
|
|
15
|
+
})
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { useInView } from 'react-intersection-observer'
|
|
2
2
|
import Section from '../Section'
|
|
3
3
|
|
|
4
|
-
import ProductShelf, {
|
|
4
|
+
import ProductShelf, {
|
|
5
|
+
ProductShelfProps,
|
|
6
|
+
} from '../../../components/ui/ProductShelf'
|
|
5
7
|
import styles from './section.module.scss'
|
|
8
|
+
import { ProductShelfDefaultComponents } from './DefaultComponents'
|
|
9
|
+
import { getOverridableSection } from '../../../sdk/overrides/getOverriddenSection'
|
|
6
10
|
|
|
7
11
|
function ProductShelfSection({
|
|
8
12
|
...otherProps
|
|
@@ -19,4 +23,10 @@ function ProductShelfSection({
|
|
|
19
23
|
)
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
const OverridableProductShelf = getOverridableSection<typeof ProductShelf>(
|
|
27
|
+
'ProductShelf',
|
|
28
|
+
ProductShelfSection,
|
|
29
|
+
ProductShelfDefaultComponents
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
export default OverridableProductShelf
|