@faststore/core 2.1.31 → 2.1.35
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 +67 -67
- 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 +3 -3
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/186.js +16 -39
- package/.next/server/chunks/253.js +22 -48
- package/.next/server/chunks/289.js +4 -7
- package/.next/server/chunks/350.js +1 -1
- package/.next/server/chunks/721.js +22 -51
- package/.next/server/chunks/74.js +154 -215
- package/.next/server/chunks/81.js +88 -172
- package/.next/server/chunks/907.js +54 -100
- 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.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +82 -135
- 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/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account.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.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +2 -2
- package/.next/static/chunks/209-d1d2eeaeefbc68f7.js +1 -0
- package/.next/static/chunks/548-6b23e7ad82cd22b9.js +1 -0
- package/.next/static/chunks/{64.7ea3677ac3a10e00.js → 64.2f385ef39cd5877d.js} +1 -1
- package/.next/static/chunks/706-1020d118bb59b204.js +1 -0
- package/.next/static/chunks/{738-67a288ca3569cdbb.js → 738-a5ff304828f20cbf.js} +1 -1
- package/.next/static/chunks/791-681afeb766a9098f.js +1 -0
- package/.next/static/chunks/pages/404-14d27e3706f3d2c3.js +1 -0
- package/.next/static/chunks/pages/500-250ccf5c9626e451.js +1 -0
- package/.next/static/chunks/pages/[...slug]-bcfaf0c5d60b57a0.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-c1f2b05344981f12.js +1 -0
- package/.next/static/chunks/pages/index-bdbfb082027ed2b7.js +1 -0
- package/.next/static/chunks/pages/login-b1bdf30c951bb60d.js +1 -0
- package/.next/static/chunks/webpack-73cade94715ad9e1.js +1 -0
- package/.next/static/css/208b7dd52a0981bd.css +1 -0
- package/.next/static/css/41ef280537acec50.css +1 -0
- package/.next/static/css/4ad5a6bd11a9f8d8.css +1 -0
- package/.next/static/css/5330ae3076254840.css +1 -0
- package/.next/static/css/5972921daee792bb.css +1 -0
- package/.next/static/css/6e1a7434f061d0ef.css +1 -0
- package/.next/static/css/82a475e147f4b2ee.css +1 -0
- package/.next/static/css/af5ef0767b748cb3.css +1 -0
- package/.next/static/css/cb7d1fcea42fab9c.css +1 -0
- package/.next/static/css/d67fbe2a613293c1.css +1 -0
- package/.next/static/uXS-aZT8ClbPcIudKFF0d/_buildManifest.js +1 -0
- package/.next/trace +80 -80
- package/.turbo/turbo-build.log +10 -19
- package/package.json +8 -8
- package/src/components/common/Alert/Alert.tsx +5 -8
- package/src/components/navigation/Navbar/Navbar.tsx +22 -22
- package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +8 -7
- package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +15 -14
- package/src/components/product/ProductGrid/ProductGrid.tsx +5 -10
- package/src/components/region/RegionBar/RegionBar.tsx +27 -13
- package/src/components/search/Filter/Filter.tsx +6 -11
- package/src/components/sections/Alert/Alert.tsx +17 -13
- package/src/components/sections/Alert/Overrides.tsx +13 -25
- package/src/components/sections/BannerText/BannerText.tsx +24 -20
- package/src/components/sections/BannerText/Overrides.tsx +11 -23
- package/src/components/sections/Breadcrumb/Overrides.tsx +13 -25
- package/src/components/sections/EmptyState/EmptyState.tsx +6 -8
- package/src/components/sections/EmptyState/Overrides.tsx +12 -24
- package/src/components/sections/Hero/Hero.tsx +15 -12
- package/src/components/sections/Hero/Overrides.tsx +12 -24
- package/src/components/sections/Navbar/Overrides.tsx +43 -31
- package/src/components/sections/Newsletter/Overrides.tsx +28 -26
- package/src/components/sections/ProductDetails/Overrides.tsx +51 -38
- package/src/components/sections/ProductDetails/ProductDetails.tsx +22 -30
- package/src/components/sections/ProductGallery/Overrides.tsx +44 -35
- package/src/components/sections/ProductShelf/Overrides.tsx +14 -28
- package/src/components/sections/RegionBar/Overrides.tsx +12 -24
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +9 -7
- package/src/components/ui/ImageGallery/ImageGallery.tsx +13 -19
- package/src/components/ui/Newsletter/Newsletter.tsx +23 -24
- package/src/components/ui/ProductDetails/ProductDetailsSettings.tsx +21 -17
- package/src/components/ui/ProductGallery/ProductGallery.tsx +31 -38
- package/src/components/ui/ProductShelf/ProductShelf.tsx +11 -16
- package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +2 -3
- package/src/components/ui/SkuSelector/Selectors.tsx +8 -7
- package/src/customizations/components/overrides/Alert.tsx +3 -7
- package/src/customizations/components/overrides/BannerText.tsx +3 -7
- package/src/customizations/components/overrides/Breadcrumb.tsx +3 -7
- package/src/customizations/components/overrides/EmptyState.tsx +3 -6
- package/src/customizations/components/overrides/Hero.tsx +3 -8
- package/src/customizations/components/overrides/Navbar.tsx +3 -16
- package/src/customizations/components/overrides/Newsletter.tsx +3 -11
- package/src/customizations/components/overrides/ProductDetails.tsx +3 -18
- package/src/customizations/components/overrides/ProductGallery.tsx +3 -16
- package/src/customizations/components/overrides/ProductShelf.tsx +3 -8
- package/src/customizations/components/overrides/RegionBar.tsx +3 -8
- package/src/typings/overrideDefinitionUtils.ts +40 -0
- package/src/typings/overrides.ts +267 -0
- package/src/utils/overrides.ts +53 -0
- package/.next/static/chunks/209-9a50f2317fccb202.js +0 -1
- package/.next/static/chunks/548-ab84e9e8b49413ab.js +0 -1
- package/.next/static/chunks/706-5aea41dd07970d2d.js +0 -1
- package/.next/static/chunks/791-63b1ccf9964b6517.js +0 -1
- package/.next/static/chunks/pages/404-d5f20744ecd83121.js +0 -1
- package/.next/static/chunks/pages/500-3911549ab88d0378.js +0 -1
- package/.next/static/chunks/pages/[...slug]-2232ce78cb672654.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-16595182cbda6bb9.js +0 -1
- package/.next/static/chunks/pages/index-7c2ec2e4b6081dbc.js +0 -1
- package/.next/static/chunks/pages/login-4cc4b8e52608f076.js +0 -1
- package/.next/static/chunks/webpack-a86bbea19dfdfd35.js +0 -1
- package/.next/static/css/08e3fc80f9bad95d.css +0 -1
- package/.next/static/css/1b23beb5af203ffb.css +0 -1
- package/.next/static/css/4b19e1e142e038b0.css +0 -1
- package/.next/static/css/584640ffee46aa49.css +0 -1
- package/.next/static/css/7486a2a5fcda5283.css +0 -1
- package/.next/static/css/7d822a137c54a781.css +0 -1
- package/.next/static/css/a49f71ae6bb528e0.css +0 -1
- package/.next/static/css/d1ad1d89f8d5c7a1.css +0 -1
- package/.next/static/css/e02cdad8fc000339.css +0 -1
- package/.next/static/css/f9d59f597a4d8f82.css +0 -1
- package/.next/static/xYGxa3PwWTjNHEfOkCiX-/_buildManifest.js +0 -1
- package/src/typings/overrides.d.ts +0 -97
- /package/.next/static/{xYGxa3PwWTjNHEfOkCiX- → uXS-aZT8ClbPcIudKFF0d}/_ssgManifest.js +0 -0
|
@@ -3,28 +3,16 @@ import {
|
|
|
3
3
|
BannerTextContent as UIBannerTextContent,
|
|
4
4
|
} from '@faststore/ui'
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
7
|
+
import { override } from 'src/customizations/components/overrides/BannerText'
|
|
8
|
+
import type { BannerTextOverrideDefinition } from 'src/typings/overrides'
|
|
7
9
|
|
|
8
|
-
const
|
|
10
|
+
const { BannerText, BannerTextContent } = getSectionOverrides(
|
|
11
|
+
{
|
|
12
|
+
BannerText: UIBannerText,
|
|
13
|
+
BannerTextContent: UIBannerTextContent,
|
|
14
|
+
},
|
|
15
|
+
override as BannerTextOverrideDefinition
|
|
16
|
+
)
|
|
9
17
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Object.entries(BannerTextCustomizations.components).forEach(([key, value]) => {
|
|
13
|
-
if (value.Component) {
|
|
14
|
-
bannerTextComponentsCustomization[key] = value.Component
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
Object.entries(BannerTextCustomizations.components).forEach(([key, value]) => {
|
|
19
|
-
if (value.props) {
|
|
20
|
-
bannerTextPropsCustomization[key] = value.props
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
const Components = {
|
|
25
|
-
BannerText: UIBannerText,
|
|
26
|
-
BannerTextContent: UIBannerTextContent,
|
|
27
|
-
...bannerTextComponentsCustomization,
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { Components, bannerTextPropsCustomization as Props }
|
|
18
|
+
export { BannerText, BannerTextContent }
|
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
import { Breadcrumb as UIBreadcrumb, Icon as UIIcon } from '@faststore/ui'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (value.props) {
|
|
17
|
-
breadcrumbPropsCustomization[key] = value.props
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
const Components = {
|
|
22
|
-
Breadcrumb: UIBreadcrumb,
|
|
23
|
-
Icon: UIIcon,
|
|
24
|
-
...breadcrumbComponentsCustomization,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { Components, breadcrumbPropsCustomization as Props }
|
|
3
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
4
|
+
import { override } from 'src/customizations/components/overrides/Breadcrumb'
|
|
5
|
+
import type { BreadcrumbOverrideDefinition } from 'src/typings/overrides'
|
|
6
|
+
|
|
7
|
+
const { Breadcrumb, Icon } = getSectionOverrides(
|
|
8
|
+
{
|
|
9
|
+
Breadcrumb: UIBreadcrumb,
|
|
10
|
+
Icon: UIIcon,
|
|
11
|
+
},
|
|
12
|
+
override as BreadcrumbOverrideDefinition
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
export { Breadcrumb, Icon }
|
|
@@ -4,9 +4,7 @@ import type { PropsWithChildren } from 'react'
|
|
|
4
4
|
import Section from '../Section'
|
|
5
5
|
import styles from './section.module.scss'
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const { EmptyState: EmptyStateWrapper } = Components
|
|
7
|
+
import { EmptyState as EmptyStateWrapper } from 'src/components/sections/EmptyState/Overrides'
|
|
10
8
|
|
|
11
9
|
export interface EmptyStateProps {
|
|
12
10
|
title: string
|
|
@@ -14,20 +12,20 @@ export interface EmptyStateProps {
|
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
function EmptyState({
|
|
17
|
-
title =
|
|
18
|
-
titleIcon =
|
|
15
|
+
title = EmptyStateWrapper.props.title,
|
|
16
|
+
titleIcon = EmptyStateWrapper.props.titleIcon,
|
|
19
17
|
children,
|
|
20
18
|
}: PropsWithChildren<EmptyStateProps>) {
|
|
21
19
|
return (
|
|
22
20
|
<Section className={`${styles.section} section-empty-state`}>
|
|
23
|
-
<EmptyStateWrapper
|
|
21
|
+
<EmptyStateWrapper.Component
|
|
24
22
|
bkgColor="light"
|
|
25
|
-
{...
|
|
23
|
+
{...EmptyStateWrapper.props}
|
|
26
24
|
title={title}
|
|
27
25
|
titleIcon={titleIcon}
|
|
28
26
|
>
|
|
29
27
|
{children}
|
|
30
|
-
</EmptyStateWrapper>
|
|
28
|
+
</EmptyStateWrapper.Component>
|
|
31
29
|
</Section>
|
|
32
30
|
)
|
|
33
31
|
}
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { EmptyState as UIEmptyState } from '@faststore/ui'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Object.entries(EmptyStateCustomizations.components).forEach(([key, value]) => {
|
|
16
|
-
if (value.props) {
|
|
17
|
-
emptyStatePropsCustomization[key] = value.props
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
const Components = {
|
|
22
|
-
EmptyState: UIEmptyState,
|
|
23
|
-
...emptyStateComponentsCustomization,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Components, emptyStatePropsCustomization as Props }
|
|
3
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
4
|
+
import { override } from 'src/customizations/components/overrides/EmptyState'
|
|
5
|
+
import type { EmptyStateOverrideDefinition } from 'src/typings/overrides'
|
|
6
|
+
|
|
7
|
+
const { EmptyState } = getSectionOverrides(
|
|
8
|
+
{
|
|
9
|
+
EmptyState: UIEmptyState,
|
|
10
|
+
},
|
|
11
|
+
override as EmptyStateOverrideDefinition
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
export { EmptyState }
|
|
@@ -2,9 +2,14 @@ import {
|
|
|
2
2
|
HeroProps as UIHeroProps,
|
|
3
3
|
HeroHeaderProps as UIHeroHeaderProps,
|
|
4
4
|
} from '@faststore/ui'
|
|
5
|
-
import { Components, Props } from './Overrides'
|
|
6
5
|
import { ReactNode } from 'react'
|
|
7
6
|
import { Image } from 'src/components/ui/Image'
|
|
7
|
+
import {
|
|
8
|
+
Hero as HeroWrapper,
|
|
9
|
+
HeroImage,
|
|
10
|
+
HeroHeader,
|
|
11
|
+
} from 'src/components/sections/Hero/Overrides'
|
|
12
|
+
|
|
8
13
|
import Section from '../Section'
|
|
9
14
|
|
|
10
15
|
import styles from './section.module.scss'
|
|
@@ -25,25 +30,23 @@ export type HeroProps = {
|
|
|
25
30
|
icon?: ReactNode
|
|
26
31
|
}
|
|
27
32
|
|
|
28
|
-
const { Hero: HeroWrapper, HeroImage, HeroHeader } = Components
|
|
29
|
-
|
|
30
33
|
const Hero = ({
|
|
31
34
|
link,
|
|
32
35
|
title,
|
|
33
36
|
subtitle,
|
|
34
37
|
image,
|
|
35
|
-
variant =
|
|
36
|
-
colorVariant =
|
|
38
|
+
variant = HeroWrapper.props.variant ?? 'primary',
|
|
39
|
+
colorVariant = HeroWrapper.props.colorVariant ?? 'main',
|
|
37
40
|
icon,
|
|
38
41
|
}: HeroProps) => {
|
|
39
42
|
return (
|
|
40
43
|
<Section className={`${styles.section} section-hero`}>
|
|
41
|
-
<HeroWrapper
|
|
42
|
-
{...
|
|
44
|
+
<HeroWrapper.Component
|
|
45
|
+
{...HeroWrapper.props}
|
|
43
46
|
variant={variant}
|
|
44
47
|
colorVariant={colorVariant}
|
|
45
48
|
>
|
|
46
|
-
<HeroImage {...
|
|
49
|
+
<HeroImage.Component {...HeroImage.props}>
|
|
47
50
|
<Image
|
|
48
51
|
loading="eager"
|
|
49
52
|
src={image.src}
|
|
@@ -52,16 +55,16 @@ const Hero = ({
|
|
|
52
55
|
height={240}
|
|
53
56
|
sizes="(max-width: 360px) 50vw, (max-width: 768px) 90vw, 50vw"
|
|
54
57
|
/>
|
|
55
|
-
</HeroImage>
|
|
56
|
-
<HeroHeader
|
|
58
|
+
</HeroImage.Component>
|
|
59
|
+
<HeroHeader.Component
|
|
57
60
|
title={title}
|
|
58
61
|
subtitle={subtitle}
|
|
59
62
|
link={link?.url}
|
|
60
63
|
linkText={link?.text}
|
|
61
64
|
icon={icon}
|
|
62
|
-
{...
|
|
65
|
+
{...HeroHeader.props}
|
|
63
66
|
/>
|
|
64
|
-
</HeroWrapper>
|
|
67
|
+
</HeroWrapper.Component>
|
|
65
68
|
</Section>
|
|
66
69
|
)
|
|
67
70
|
}
|
|
@@ -4,29 +4,17 @@ import {
|
|
|
4
4
|
HeroHeader as UIHeroHeader,
|
|
5
5
|
} from '@faststore/ui'
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
8
|
+
import { override } from 'src/customizations/components/overrides/Hero'
|
|
9
|
+
import type { HeroOverrideDefinition } from 'src/typings/overrides'
|
|
8
10
|
|
|
9
|
-
const
|
|
11
|
+
const { Hero, HeroImage, HeroHeader } = getSectionOverrides(
|
|
12
|
+
{
|
|
13
|
+
Hero: UIHero,
|
|
14
|
+
HeroImage: UIHeroImage,
|
|
15
|
+
HeroHeader: UIHeroHeader,
|
|
16
|
+
},
|
|
17
|
+
override as HeroOverrideDefinition
|
|
18
|
+
)
|
|
10
19
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Object.entries(HeroCustomizations.components).forEach(([key, value]) => {
|
|
14
|
-
if (value.Component) {
|
|
15
|
-
heroComponentsCustomization[key] = value.Component
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
Object.entries(HeroCustomizations.components).forEach(([key, value]) => {
|
|
20
|
-
if (value.props) {
|
|
21
|
-
heroPropsCustomization[key] = value.props
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const Components = {
|
|
26
|
-
Hero: UIHero,
|
|
27
|
-
HeroImage: UIHeroImage,
|
|
28
|
-
HeroHeader: UIHeroHeader,
|
|
29
|
-
...heroComponentsCustomization,
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { Components, heroPropsCustomization as Props }
|
|
20
|
+
export { Hero, HeroImage, HeroHeader }
|
|
@@ -12,37 +12,49 @@ import {
|
|
|
12
12
|
IconButton as UIIconButton,
|
|
13
13
|
} from '@faststore/ui'
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
16
|
+
import { override } from 'src/customizations/components/overrides/Navbar'
|
|
17
|
+
import type { NavbarOverrideDefinition } from 'src/typings/overrides'
|
|
16
18
|
|
|
17
|
-
const
|
|
19
|
+
const {
|
|
20
|
+
Navbar,
|
|
21
|
+
NavbarLinks,
|
|
22
|
+
NavbarLinksList,
|
|
23
|
+
NavbarSlider,
|
|
24
|
+
NavbarSliderHeader,
|
|
25
|
+
NavbarSliderContent,
|
|
26
|
+
NavbarSliderFooter,
|
|
27
|
+
NavbarHeader,
|
|
28
|
+
NavbarRow,
|
|
29
|
+
NavbarButtons,
|
|
30
|
+
IconButton,
|
|
31
|
+
} = getSectionOverrides(
|
|
32
|
+
{
|
|
33
|
+
Navbar: UINavbar,
|
|
34
|
+
NavbarLinks: UINavbarLinks,
|
|
35
|
+
NavbarLinksList: UINavbarLinksList,
|
|
36
|
+
NavbarSlider: UINavbarSlider,
|
|
37
|
+
NavbarSliderHeader: UINavbarSliderHeader,
|
|
38
|
+
NavbarSliderContent: UINavbarSliderContent,
|
|
39
|
+
NavbarSliderFooter: UINavbarSliderFooter,
|
|
40
|
+
NavbarHeader: UINavbarHeader,
|
|
41
|
+
NavbarRow: UINavbarRow,
|
|
42
|
+
NavbarButtons: UINavbarButtons,
|
|
43
|
+
IconButton: UIIconButton,
|
|
44
|
+
},
|
|
45
|
+
override as NavbarOverrideDefinition
|
|
46
|
+
)
|
|
18
47
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const Components = {
|
|
34
|
-
Navbar: UINavbar,
|
|
35
|
-
NavbarLinks: UINavbarLinks,
|
|
36
|
-
NavbarLinksList: UINavbarLinksList,
|
|
37
|
-
NavbarSlider: UINavbarSlider,
|
|
38
|
-
NavbarSliderHeader: UINavbarSliderHeader,
|
|
39
|
-
NavbarSliderContent: UINavbarSliderContent,
|
|
40
|
-
NavbarSliderFooter: UINavbarSliderFooter,
|
|
41
|
-
NavbarHeader: UINavbarHeader,
|
|
42
|
-
NavbarRow: UINavbarRow,
|
|
43
|
-
NavbarButtons: UINavbarButtons,
|
|
44
|
-
IconButton: UIIconButton,
|
|
45
|
-
...navbarComponentsCustomization,
|
|
48
|
+
export {
|
|
49
|
+
Navbar,
|
|
50
|
+
NavbarLinks,
|
|
51
|
+
NavbarLinksList,
|
|
52
|
+
NavbarSlider,
|
|
53
|
+
NavbarSliderHeader,
|
|
54
|
+
NavbarSliderContent,
|
|
55
|
+
NavbarSliderFooter,
|
|
56
|
+
NavbarHeader,
|
|
57
|
+
NavbarRow,
|
|
58
|
+
NavbarButtons,
|
|
59
|
+
IconButton,
|
|
46
60
|
}
|
|
47
|
-
|
|
48
|
-
export { Components, navbarPropsCustomization as Props }
|
|
@@ -4,32 +4,34 @@ import {
|
|
|
4
4
|
Icon as UIIcon,
|
|
5
5
|
} from '@faststore/ui'
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
8
|
+
import { override } from 'src/customizations/components/overrides/Newsletter'
|
|
9
|
+
import type { NewsletterOverrideDefinition } from 'src/typings/overrides'
|
|
8
10
|
|
|
9
|
-
const
|
|
11
|
+
const {
|
|
12
|
+
ToastIconSuccess,
|
|
13
|
+
ToastIconError,
|
|
14
|
+
HeaderIcon,
|
|
15
|
+
InputFieldName,
|
|
16
|
+
InputFieldEmail,
|
|
17
|
+
Button,
|
|
18
|
+
} = getSectionOverrides(
|
|
19
|
+
{
|
|
20
|
+
ToastIconSuccess: UIIcon,
|
|
21
|
+
ToastIconError: UIIcon,
|
|
22
|
+
HeaderIcon: UIIcon,
|
|
23
|
+
InputFieldName: UIInputField,
|
|
24
|
+
InputFieldEmail: UIInputField,
|
|
25
|
+
Button: UIButton,
|
|
26
|
+
},
|
|
27
|
+
override as NewsletterOverrideDefinition
|
|
28
|
+
)
|
|
10
29
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Object.entries(NewsletterCustomizations.components).forEach(([key, value]) => {
|
|
20
|
-
if (value.props) {
|
|
21
|
-
newsletterPropsCustomization[key] = value.props
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const Components = {
|
|
26
|
-
ToastIconSuccess: UIIcon,
|
|
27
|
-
ToastIconError: UIIcon,
|
|
28
|
-
HeaderIcon: UIIcon,
|
|
29
|
-
InputFieldName: UIInputField,
|
|
30
|
-
InputFieldEmail: UIInputField,
|
|
31
|
-
Button: UIButton,
|
|
32
|
-
...newsletterComponentsCustomization,
|
|
30
|
+
export {
|
|
31
|
+
ToastIconSuccess,
|
|
32
|
+
ToastIconError,
|
|
33
|
+
HeaderIcon,
|
|
34
|
+
InputFieldName,
|
|
35
|
+
InputFieldEmail,
|
|
36
|
+
Button,
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
export { Components, newsletterPropsCustomization as Props }
|
|
@@ -10,47 +10,60 @@ import {
|
|
|
10
10
|
ImageZoom as UIImageZoom,
|
|
11
11
|
ImageGallery as UIImageGallery,
|
|
12
12
|
} from '@faststore/ui'
|
|
13
|
-
import ImageGallery from 'src/components/ui/ImageGallery'
|
|
14
|
-
import ShippingSimulation from 'src/components/ui/ShippingSimulation/ShippingSimulation'
|
|
15
|
-
import { Image } from 'src/components/ui/Image'
|
|
16
|
-
|
|
17
|
-
import ProductDetailsCustomizations from 'src/customizations/components/overrides/ProductDetails'
|
|
18
|
-
|
|
19
|
-
const productDetailsComponentsCustomization = {}
|
|
20
13
|
|
|
21
|
-
|
|
14
|
+
import LocalImageGallery from 'src/components/ui/ImageGallery'
|
|
15
|
+
import LocalShippingSimulation from 'src/components/ui/ShippingSimulation/ShippingSimulation'
|
|
16
|
+
import { Image } from 'src/components/ui/Image'
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
productDetailsComponentsCustomization[key] = value.Component
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
)
|
|
18
|
+
import { getSectionOverrides } from 'src/utils/overrides'
|
|
19
|
+
import { override } from 'src/customizations/components/overrides/ProductDetails'
|
|
20
|
+
import type { ProductDetailsOverrideDefinition } from 'src/typings/overrides'
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
const {
|
|
23
|
+
ProductTitle,
|
|
24
|
+
DiscountBadge,
|
|
25
|
+
BuyButton,
|
|
26
|
+
Icon,
|
|
27
|
+
Price,
|
|
28
|
+
QuantitySelector,
|
|
29
|
+
SkuSelector,
|
|
30
|
+
ShippingSimulation,
|
|
31
|
+
ImageGallery,
|
|
32
|
+
ImageZoom,
|
|
33
|
+
__experimentalImageGalleryImage,
|
|
34
|
+
__experimentalImageGallery,
|
|
35
|
+
__experimentalShippingSimulation,
|
|
36
|
+
} = getSectionOverrides(
|
|
37
|
+
{
|
|
38
|
+
ProductTitle: UIProductTitle,
|
|
39
|
+
DiscountBadge: UIDiscountBadge,
|
|
40
|
+
BuyButton: UIBuyButton,
|
|
41
|
+
Icon: UIIcon,
|
|
42
|
+
Price: UIPrice,
|
|
43
|
+
QuantitySelector: UIQuantitySelector,
|
|
44
|
+
SkuSelector: UISkuSelector,
|
|
45
|
+
ShippingSimulation: UIShippingSimulation,
|
|
46
|
+
ImageGallery: UIImageGallery,
|
|
47
|
+
ImageZoom: UIImageZoom,
|
|
48
|
+
__experimentalImageGalleryImage: Image,
|
|
49
|
+
__experimentalImageGallery: LocalImageGallery,
|
|
50
|
+
__experimentalShippingSimulation: LocalShippingSimulation,
|
|
51
|
+
},
|
|
52
|
+
override as ProductDetailsOverrideDefinition
|
|
37
53
|
)
|
|
38
54
|
|
|
39
|
-
|
|
40
|
-
ProductTitle
|
|
41
|
-
DiscountBadge
|
|
42
|
-
BuyButton
|
|
43
|
-
Icon
|
|
44
|
-
Price
|
|
45
|
-
QuantitySelector
|
|
46
|
-
SkuSelector
|
|
47
|
-
ShippingSimulation
|
|
48
|
-
ImageGallery
|
|
49
|
-
ImageZoom
|
|
50
|
-
__experimentalImageGalleryImage
|
|
51
|
-
__experimentalImageGallery
|
|
52
|
-
__experimentalShippingSimulation
|
|
53
|
-
...productDetailsComponentsCustomization,
|
|
55
|
+
export {
|
|
56
|
+
ProductTitle,
|
|
57
|
+
DiscountBadge,
|
|
58
|
+
BuyButton,
|
|
59
|
+
Icon,
|
|
60
|
+
Price,
|
|
61
|
+
QuantitySelector,
|
|
62
|
+
SkuSelector,
|
|
63
|
+
ShippingSimulation,
|
|
64
|
+
ImageGallery,
|
|
65
|
+
ImageZoom,
|
|
66
|
+
__experimentalImageGalleryImage,
|
|
67
|
+
__experimentalImageGallery,
|
|
68
|
+
__experimentalShippingSimulation,
|
|
54
69
|
}
|
|
55
|
-
|
|
56
|
-
export { Components, productDetailsPropsCustomization as Props }
|
|
@@ -18,16 +18,11 @@ import { ProductDetailsSettings } from 'src/components/ui/ProductDetails'
|
|
|
18
18
|
import styles from './section.module.scss'
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
-
Components,
|
|
22
|
-
Props,
|
|
23
|
-
} from 'src/components/sections/ProductDetails/Overrides'
|
|
24
|
-
|
|
25
|
-
const {
|
|
26
21
|
ProductTitle,
|
|
27
22
|
DiscountBadge,
|
|
28
|
-
__experimentalImageGallery
|
|
29
|
-
__experimentalShippingSimulation
|
|
30
|
-
}
|
|
23
|
+
__experimentalImageGallery as ImageGallery,
|
|
24
|
+
__experimentalShippingSimulation as ShippingSimulation,
|
|
25
|
+
} from 'src/components/sections/ProductDetails/Overrides'
|
|
31
26
|
|
|
32
27
|
interface ProductDetailsContextProps {
|
|
33
28
|
context: ProductDetailsFragment_ProductFragment
|
|
@@ -70,25 +65,22 @@ function ProductDetails({
|
|
|
70
65
|
refNumber: showRefNumber,
|
|
71
66
|
discountBadge: {
|
|
72
67
|
showDiscountBadge,
|
|
73
|
-
size: discountBadgeSize =
|
|
68
|
+
size: discountBadgeSize = DiscountBadge.props.size,
|
|
74
69
|
},
|
|
75
70
|
},
|
|
76
71
|
buyButton: { icon: buyButtonIcon, title: buyButtonTitle },
|
|
77
72
|
shippingSimulator: {
|
|
78
|
-
title: shippingSimulatorTitle =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
'__experimentalShippingSimulation'
|
|
85
|
-
].optionsLabel,
|
|
73
|
+
title: shippingSimulatorTitle = ShippingSimulation.props.title,
|
|
74
|
+
inputLabel: shippingSimulatorInputLabel = ShippingSimulation.props
|
|
75
|
+
.inputLabel,
|
|
76
|
+
shippingOptionsTableTitle:
|
|
77
|
+
shippingSimulatorOptionsTableTitle = ShippingSimulation.props
|
|
78
|
+
.optionsLabel,
|
|
86
79
|
link: {
|
|
87
|
-
to: shippingSimulatorLinkUrl =
|
|
80
|
+
to: shippingSimulatorLinkUrl = ShippingSimulation.props
|
|
88
81
|
.idkPostalCodeLinkProps?.href,
|
|
89
|
-
text: shippingSimulatorLinkText =
|
|
90
|
-
|
|
91
|
-
].idkPostalCodeLinkProps?.children,
|
|
82
|
+
text: shippingSimulatorLinkText = ShippingSimulation.props
|
|
83
|
+
.idkPostalCodeLinkProps?.children,
|
|
92
84
|
},
|
|
93
85
|
},
|
|
94
86
|
productDescription: {
|
|
@@ -165,16 +157,16 @@ function ProductDetails({
|
|
|
165
157
|
<section data-fs-product-details>
|
|
166
158
|
<section data-fs-product-details-body data-fs-content="product-details">
|
|
167
159
|
<header data-fs-product-details-title data-fs-product-details-section>
|
|
168
|
-
<ProductTitle
|
|
160
|
+
<ProductTitle.Component
|
|
169
161
|
// TODO: We should review this prop. There's now way to override the title and use the dynamic name value.
|
|
170
162
|
// Maybe passing a ProductTitleHeader component as a prop would be better, as it would be overridable.
|
|
171
163
|
// Maybe now it's worth to make title always a h1 and receive only the name, as it would be easier for users to override.
|
|
172
164
|
title={<h1>{name}</h1>}
|
|
173
|
-
{...
|
|
165
|
+
{...ProductTitle.props}
|
|
174
166
|
label={
|
|
175
167
|
showDiscountBadge && (
|
|
176
|
-
<DiscountBadge
|
|
177
|
-
{...
|
|
168
|
+
<DiscountBadge.Component
|
|
169
|
+
{...DiscountBadge.props}
|
|
178
170
|
size={discountBadgeSize}
|
|
179
171
|
// Dynamic props shouldn't be overridable
|
|
180
172
|
// This decision can be reviewed later if needed
|
|
@@ -186,9 +178,9 @@ function ProductDetails({
|
|
|
186
178
|
refNumber={showRefNumber && productId}
|
|
187
179
|
/>
|
|
188
180
|
</header>
|
|
189
|
-
<ImageGallery
|
|
181
|
+
<ImageGallery.Component
|
|
190
182
|
data-fs-product-details-gallery
|
|
191
|
-
{...
|
|
183
|
+
{...ImageGallery.props}
|
|
192
184
|
images={productImages}
|
|
193
185
|
/>
|
|
194
186
|
<section data-fs-product-details-info>
|
|
@@ -211,13 +203,13 @@ function ProductDetails({
|
|
|
211
203
|
</section>
|
|
212
204
|
|
|
213
205
|
{availability && (
|
|
214
|
-
<ShippingSimulation
|
|
206
|
+
<ShippingSimulation.Component
|
|
215
207
|
data-fs-product-details-section
|
|
216
208
|
data-fs-product-details-shipping
|
|
217
209
|
formatter={useFormattedPrice}
|
|
218
|
-
{...
|
|
210
|
+
{...ShippingSimulation.props}
|
|
219
211
|
idkPostalCodeLinkProps={{
|
|
220
|
-
...
|
|
212
|
+
...ShippingSimulation.props.idkPostalCodeLinkProps,
|
|
221
213
|
href: shippingSimulatorLinkUrl,
|
|
222
214
|
children: shippingSimulatorLinkText,
|
|
223
215
|
}}
|