@faststore/core 2.2.65 → 2.2.67
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 +46 -43
- 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/routes-manifest.json +1 -1
- package/.next/server/chunks/74.js +125 -76
- package/.next/server/chunks/796.js +143 -84
- package/.next/server/middleware-build-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 +4 -2
- 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.nft.json +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +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 +4 -4
- 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/static/bjKPEUMtAwRNUNjBl_iEY/_buildManifest.js +1 -0
- package/.next/static/chunks/762-1e3db91e2888dca7.js +1 -0
- package/.next/static/chunks/846-d7c6a8d1d102ccf3.js +1 -0
- package/.next/static/chunks/pages/{404-419470fcedcaba54.js → 404-5e6c01505839ca4e.js} +1 -1
- package/.next/static/chunks/pages/{500-337a57eb2c9da6ba.js → 500-92239cdd00a581dd.js} +1 -1
- package/.next/static/chunks/pages/[...slug]-36dce5cc96853b94.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-039e11d837033561.js +1 -0
- package/.next/static/chunks/pages/{account-acd169fb6e00021f.js → account-2d15d4e38b855872.js} +1 -1
- package/.next/static/chunks/pages/{checkout-5de711ccb807644b.js → checkout-e34b1a2945839749.js} +1 -1
- package/.next/static/chunks/pages/index-a5448a22526e3ea8.js +1 -0
- package/.next/static/chunks/pages/{login-c38b2107d504199c.js → login-1b197c0b0d5ba457.js} +1 -1
- package/.next/static/chunks/pages/{s-a6e95c34a89ccbfb.js → s-ed126d7e39eec25b.js} +1 -1
- package/.next/static/chunks/{webpack-adf61d0bc3a8dbb3.js → webpack-6c4b31200fed6646.js} +1 -1
- package/.next/static/css/{d2e8564f2bf133d9.css → 4ee95588f27a8b6b.css} +1 -1
- package/.next/static/css/527e334fa69cf40a.css +1 -0
- package/.next/static/css/563a68087e4de59c.css +1 -0
- package/.next/static/css/c33c62a3d0c77436.css +1 -0
- package/.next/trace +82 -81
- package/.turbo/turbo-build.log +9 -10
- package/.turbo/turbo-test.log +9 -9
- package/cms/faststore/sections.json +21 -11
- package/package.json +4 -4
- package/src/components/cms/GlobalSections.tsx +1 -1
- package/src/components/region/RegionBar/RegionBar.tsx +17 -21
- package/src/components/sections/BannerNewsletter/BannerNewsletter.tsx +4 -2
- package/src/components/sections/BannerText/BannerText.tsx +17 -19
- package/src/components/sections/Footer/Footer.tsx +3 -1
- package/src/components/sections/Footer/section.module.scss +2 -0
- package/src/components/sections/Newsletter/Newsletter.tsx +46 -20
- package/src/components/sections/Newsletter/Overrides.tsx +21 -4
- package/src/components/sections/Newsletter/section.module.scss +0 -2
- package/src/components/sections/RegionBar/DefaultComponents.ts +7 -0
- package/src/components/sections/RegionBar/OverriddenDefaultRegionBar.ts +12 -0
- package/src/components/ui/Newsletter/Newsletter.tsx +131 -180
- package/src/components/ui/Newsletter/NewsletterAddendum.tsx +7 -8
- package/src/sdk/overrides/sections.tsx +4 -0
- package/src/typings/overrides.ts +23 -5
- package/.next/static/8bY0SvP6sqeD3bp_3Ie2r/_buildManifest.js +0 -1
- package/.next/static/chunks/875-e59a8e9803b1d863.js +0 -1
- package/.next/static/chunks/pages/[...slug]-4fd81d8f84dd561f.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-551e8bbc72bab530.js +0 -1
- package/.next/static/chunks/pages/index-7d0e3d61afd0a37c.js +0 -1
- package/.next/static/css/e67c73ff7fbc8c54.css +0 -1
- package/.next/static/css/eababca67e15ef4b.css +0 -1
- package/.next/static/css/f0e64672053efd0c.css +0 -1
- package/src/components/sections/RegionBar/Overrides.tsx +0 -16
- /package/.next/static/{8bY0SvP6sqeD3bp_3Ie2r → bjKPEUMtAwRNUNjBl_iEY}/_ssgManifest.js +0 -0
|
@@ -1,204 +1,155 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useRef } from 'react'
|
|
2
|
+
import type { FormEvent } from 'react'
|
|
3
|
+
|
|
3
4
|
import { useUI } from '@faststore/ui'
|
|
4
5
|
import type { InputFieldProps } from '@faststore/ui'
|
|
5
6
|
|
|
6
7
|
import { useNewsletter } from 'src/sdk/newsletter/useNewsletter'
|
|
8
|
+
|
|
9
|
+
import type { NewsletterProps as SectionNewsletterProps } from 'src/components/sections/Newsletter'
|
|
7
10
|
import {
|
|
11
|
+
Newsletter as NewsletterWrapper,
|
|
12
|
+
NewsletterAddendum,
|
|
13
|
+
NewsletterContent,
|
|
14
|
+
NewsletterForm,
|
|
15
|
+
NewsletterHeader,
|
|
8
16
|
ToastIconSuccess,
|
|
9
17
|
ToastIconError,
|
|
10
18
|
HeaderIcon,
|
|
11
19
|
InputFieldName,
|
|
12
20
|
InputFieldEmail,
|
|
13
21
|
Button,
|
|
14
|
-
__experimentalNewsletterAddendum as NewsletterAddendum,
|
|
15
22
|
} from 'src/components/sections/Newsletter/Overrides'
|
|
16
23
|
|
|
17
|
-
export type
|
|
18
|
-
title: string
|
|
19
|
-
message: string
|
|
20
|
-
icon: string
|
|
21
|
-
}
|
|
24
|
+
export type NewsletterProps = SectionNewsletterProps
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* The Privacy Policy disclaimer.
|
|
42
|
-
*/
|
|
43
|
-
privacyPolicy?: string
|
|
44
|
-
/**
|
|
45
|
-
* The email input label.
|
|
46
|
-
*/
|
|
47
|
-
emailInputLabel?: string
|
|
48
|
-
/**
|
|
49
|
-
* The name input visibility.
|
|
50
|
-
*/
|
|
51
|
-
displayNameInput?: boolean
|
|
52
|
-
/**
|
|
53
|
-
* The name input label.
|
|
54
|
-
*/
|
|
55
|
-
nameInputLabel?: string
|
|
56
|
-
/**
|
|
57
|
-
* The subscribe button label.
|
|
58
|
-
*/
|
|
59
|
-
subscribeButtonLabel?: string
|
|
60
|
-
/**
|
|
61
|
-
* The subscribe button loading label.
|
|
62
|
-
*/
|
|
63
|
-
subscribeButtonLoadingLabel?: string
|
|
64
|
-
/**
|
|
65
|
-
* The card Variant
|
|
66
|
-
*/
|
|
67
|
-
card: Boolean
|
|
26
|
+
function Newsletter({
|
|
27
|
+
icon: { icon, alt: iconAlt },
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
privacyPolicy,
|
|
31
|
+
emailInputLabel,
|
|
32
|
+
displayNameInput,
|
|
33
|
+
nameInputLabel,
|
|
34
|
+
subscribeButtonLabel,
|
|
35
|
+
subscribeButtonLoadingLabel,
|
|
36
|
+
card,
|
|
37
|
+
toastSubscribe,
|
|
38
|
+
toastSubscribeError,
|
|
39
|
+
colorVariant,
|
|
40
|
+
}: NewsletterProps) {
|
|
41
|
+
const { pushToast } = useUI()
|
|
42
|
+
const { subscribeUser, loading, data } = useNewsletter()
|
|
68
43
|
|
|
69
|
-
|
|
44
|
+
const formRef = useRef<HTMLFormElement>(null)
|
|
45
|
+
const nameInputRef = useRef<HTMLInputElement>(null)
|
|
46
|
+
const emailInputRef = useRef<HTMLInputElement>(null)
|
|
70
47
|
|
|
71
|
-
|
|
72
|
-
|
|
48
|
+
const onSubmit = (event: FormEvent) => {
|
|
49
|
+
event.preventDefault()
|
|
73
50
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
privacyPolicy,
|
|
81
|
-
emailInputLabel,
|
|
82
|
-
displayNameInput,
|
|
83
|
-
nameInputLabel,
|
|
84
|
-
subscribeButtonLabel,
|
|
85
|
-
subscribeButtonLoadingLabel,
|
|
86
|
-
card,
|
|
87
|
-
toastSubscribe,
|
|
88
|
-
toastSubscribeError,
|
|
89
|
-
},
|
|
90
|
-
ref
|
|
91
|
-
) {
|
|
92
|
-
const { subscribeUser, loading, data } = useNewsletter()
|
|
93
|
-
const nameInputRef = useRef<HTMLInputElement>(null)
|
|
94
|
-
const emailInputRef = useRef<HTMLInputElement>(null)
|
|
51
|
+
subscribeUser({
|
|
52
|
+
data: {
|
|
53
|
+
name: nameInputRef.current?.value ?? '',
|
|
54
|
+
email: emailInputRef.current?.value ?? '',
|
|
55
|
+
},
|
|
56
|
+
})
|
|
95
57
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
58
|
+
if (data?.subscribeToNewsletter?.id) {
|
|
59
|
+
pushToast({
|
|
60
|
+
...toastSubscribe,
|
|
61
|
+
status: 'INFO',
|
|
62
|
+
icon: (
|
|
63
|
+
<ToastIconSuccess.Component
|
|
64
|
+
width={30}
|
|
65
|
+
height={30}
|
|
66
|
+
{...ToastIconSuccess.props}
|
|
67
|
+
name={toastSubscribe.icon ?? ToastIconSuccess.props.name}
|
|
68
|
+
/>
|
|
69
|
+
),
|
|
70
|
+
})
|
|
71
|
+
} else {
|
|
72
|
+
pushToast({
|
|
73
|
+
...toastSubscribeError,
|
|
74
|
+
status: 'ERROR',
|
|
75
|
+
icon: (
|
|
76
|
+
<ToastIconError.Component
|
|
77
|
+
width={30}
|
|
78
|
+
height={30}
|
|
79
|
+
{...ToastIconError.props}
|
|
80
|
+
name={toastSubscribe.icon ?? ToastIconError.props.name}
|
|
81
|
+
/>
|
|
82
|
+
),
|
|
105
83
|
})
|
|
106
|
-
|
|
107
|
-
if (data?.subscribeToNewsletter?.id) {
|
|
108
|
-
pushToast({
|
|
109
|
-
...toastSubscribe,
|
|
110
|
-
status: 'INFO',
|
|
111
|
-
icon: (
|
|
112
|
-
<ToastIconSuccess.Component
|
|
113
|
-
width={30}
|
|
114
|
-
height={30}
|
|
115
|
-
{...ToastIconSuccess.props}
|
|
116
|
-
name={toastSubscribe.icon ?? ToastIconSuccess.props.name}
|
|
117
|
-
/>
|
|
118
|
-
),
|
|
119
|
-
})
|
|
120
|
-
} else {
|
|
121
|
-
pushToast({
|
|
122
|
-
...toastSubscribeError,
|
|
123
|
-
status: 'ERROR',
|
|
124
|
-
icon: (
|
|
125
|
-
<ToastIconError.Component
|
|
126
|
-
width={30}
|
|
127
|
-
height={30}
|
|
128
|
-
{...ToastIconError.props}
|
|
129
|
-
name={toastSubscribe.icon ?? ToastIconError.props.name}
|
|
130
|
-
/>
|
|
131
|
-
),
|
|
132
|
-
})
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const formElement = event.currentTarget as HTMLFormElement
|
|
136
|
-
|
|
137
|
-
formElement.reset()
|
|
138
84
|
}
|
|
139
85
|
|
|
140
|
-
|
|
141
|
-
<div data-fs-newsletter={card ? 'card' : ''}>
|
|
142
|
-
<form
|
|
143
|
-
ref={ref}
|
|
144
|
-
data-fs-newsletter-form
|
|
145
|
-
data-fs-content="newsletter"
|
|
146
|
-
onSubmit={handleSubmit}
|
|
147
|
-
>
|
|
148
|
-
<header data-fs-newsletter-header>
|
|
149
|
-
<h3>
|
|
150
|
-
<HeaderIcon.Component
|
|
151
|
-
width={32}
|
|
152
|
-
height={32}
|
|
153
|
-
{...HeaderIcon.props}
|
|
154
|
-
name={icon?.icon ?? HeaderIcon.props.name}
|
|
155
|
-
/>
|
|
156
|
-
{title}
|
|
157
|
-
</h3>
|
|
158
|
-
{description && <span> {description}</span>}
|
|
159
|
-
</header>
|
|
160
|
-
|
|
161
|
-
<div data-fs-newsletter-controls>
|
|
162
|
-
<>
|
|
163
|
-
{displayNameInput ? (
|
|
164
|
-
<InputFieldName.Component
|
|
165
|
-
id="newsletter-name"
|
|
166
|
-
required
|
|
167
|
-
{...(InputFieldName.props as InputFieldProps)}
|
|
168
|
-
label={nameInputLabel ?? InputFieldName.props.label}
|
|
169
|
-
// Dynamic props shouldn't be overridable
|
|
170
|
-
// This decision can be reviewed later if needed
|
|
171
|
-
inputRef={nameInputRef}
|
|
172
|
-
/>
|
|
173
|
-
) : null}
|
|
174
|
-
<InputFieldEmail.Component
|
|
175
|
-
id="newsletter-email"
|
|
176
|
-
type="email"
|
|
177
|
-
required
|
|
178
|
-
{...(InputFieldEmail.props as InputFieldProps)}
|
|
179
|
-
label={emailInputLabel ?? InputFieldEmail.props.label}
|
|
180
|
-
// Dynamic props shouldn't be overridable
|
|
181
|
-
// This decision can be reviewed later if needed
|
|
182
|
-
inputRef={emailInputRef}
|
|
183
|
-
/>
|
|
184
|
-
<NewsletterAddendum.Component
|
|
185
|
-
addendum={privacyPolicy}
|
|
186
|
-
{...NewsletterAddendum.props}
|
|
187
|
-
/>
|
|
188
|
-
<Button.Component
|
|
189
|
-
variant="secondary"
|
|
190
|
-
inverse
|
|
191
|
-
type="submit"
|
|
192
|
-
{...Button.props}
|
|
193
|
-
>
|
|
194
|
-
{loading ? subscribeButtonLoadingLabel : subscribeButtonLabel}
|
|
195
|
-
</Button.Component>
|
|
196
|
-
</>
|
|
197
|
-
</div>
|
|
198
|
-
</form>
|
|
199
|
-
</div>
|
|
200
|
-
)
|
|
86
|
+
formRef.current.reset()
|
|
201
87
|
}
|
|
202
|
-
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<NewsletterWrapper.Component
|
|
91
|
+
card={card}
|
|
92
|
+
colorVariant={colorVariant}
|
|
93
|
+
{...NewsletterWrapper.props}
|
|
94
|
+
>
|
|
95
|
+
<NewsletterForm.Component
|
|
96
|
+
ref={formRef}
|
|
97
|
+
onSubmit={onSubmit}
|
|
98
|
+
{...NewsletterForm.props}
|
|
99
|
+
>
|
|
100
|
+
<NewsletterHeader.Component
|
|
101
|
+
title={title}
|
|
102
|
+
description={description}
|
|
103
|
+
icon={
|
|
104
|
+
<HeaderIcon.Component
|
|
105
|
+
width={32}
|
|
106
|
+
height={32}
|
|
107
|
+
{...HeaderIcon.props}
|
|
108
|
+
name={icon ?? HeaderIcon.props.name}
|
|
109
|
+
aria-label={iconAlt ?? HeaderIcon.props['aria-label']}
|
|
110
|
+
/>
|
|
111
|
+
}
|
|
112
|
+
{...NewsletterHeader.props}
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
<NewsletterContent.Component {...NewsletterContent.props}>
|
|
116
|
+
{displayNameInput && (
|
|
117
|
+
<InputFieldName.Component
|
|
118
|
+
id="newsletter-name"
|
|
119
|
+
required
|
|
120
|
+
{...(InputFieldName.props as InputFieldProps)}
|
|
121
|
+
label={nameInputLabel ?? InputFieldName.props.label}
|
|
122
|
+
// Dynamic props shouldn't be overridable
|
|
123
|
+
// This decision can be reviewed later if needed
|
|
124
|
+
inputRef={nameInputRef}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
<InputFieldEmail.Component
|
|
128
|
+
id="newsletter-email"
|
|
129
|
+
type="email"
|
|
130
|
+
required
|
|
131
|
+
{...(InputFieldEmail.props as InputFieldProps)}
|
|
132
|
+
label={emailInputLabel ?? InputFieldEmail.props.label}
|
|
133
|
+
// Dynamic props shouldn't be overridable
|
|
134
|
+
// This decision can be reviewed later if needed
|
|
135
|
+
inputRef={emailInputRef}
|
|
136
|
+
/>
|
|
137
|
+
<NewsletterAddendum.Component
|
|
138
|
+
addendum={privacyPolicy}
|
|
139
|
+
{...NewsletterAddendum.props}
|
|
140
|
+
/>
|
|
141
|
+
<Button.Component
|
|
142
|
+
variant="secondary"
|
|
143
|
+
inverse
|
|
144
|
+
type="submit"
|
|
145
|
+
{...Button.props}
|
|
146
|
+
>
|
|
147
|
+
{loading ? subscribeButtonLoadingLabel : subscribeButtonLabel}
|
|
148
|
+
</Button.Component>
|
|
149
|
+
</NewsletterContent.Component>
|
|
150
|
+
</NewsletterForm.Component>
|
|
151
|
+
</NewsletterWrapper.Component>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
203
154
|
|
|
204
155
|
export default Newsletter
|
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
* This is a limitation not only for this component, but for every native & custom component that makes use of Rich Text.
|
|
15
15
|
*/
|
|
16
16
|
import draftToHtml from 'draftjs-to-html'
|
|
17
|
+
import { NewsletterAddendum as UINewsletterAddendum } from '@faststore/ui'
|
|
18
|
+
import type { NewsletterAddendumProps as UINewsletterAddendumProps } from '@faststore/ui'
|
|
17
19
|
|
|
18
20
|
export interface NewsletterAddendumProps {
|
|
19
21
|
/**
|
|
20
22
|
* Expects a string of a JSON object in the form of draftjs's raw content state.
|
|
21
23
|
*/
|
|
22
|
-
addendum:
|
|
24
|
+
addendum: UINewsletterAddendumProps['addendum']
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
function getLinkElementAsString(url: string, text: string) {
|
|
26
28
|
return `
|
|
27
|
-
<a
|
|
29
|
+
<a
|
|
28
30
|
data-fs-link="true"
|
|
29
31
|
data-fs-link-variant="inline"
|
|
30
32
|
data-fs-link-inverse="true"
|
|
@@ -75,12 +77,9 @@ export function NewsletterAddendum({
|
|
|
75
77
|
...otherProps
|
|
76
78
|
}: NewsletterAddendumProps) {
|
|
77
79
|
return (
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
dangerouslySetInnerHTML={{
|
|
81
|
-
__html: cmsToHtml(addendum),
|
|
82
|
-
}}
|
|
80
|
+
<UINewsletterAddendum
|
|
81
|
+
dangerouslySetInnerHTML={{ __html: cmsToHtml(addendum) }}
|
|
83
82
|
{...otherProps}
|
|
84
|
-
|
|
83
|
+
/>
|
|
85
84
|
)
|
|
86
85
|
}
|
|
@@ -6,6 +6,7 @@ import ProductShelf from '../../components/sections/ProductShelf'
|
|
|
6
6
|
import CrossSellingShelf from '../../components/sections/CrossSellingShelf'
|
|
7
7
|
import ProductDetails from '../../components/sections/ProductDetails'
|
|
8
8
|
import ProductGallery from '../../components/sections/ProductGallery'
|
|
9
|
+
import RegionBar from '../../components/sections/RegionBar'
|
|
9
10
|
|
|
10
11
|
import type { DefaultSectionComponentsDefinitions } from '../../typings/overridesDefinition'
|
|
11
12
|
import type { SectionsOverrides } from '../../typings/overrides'
|
|
@@ -17,6 +18,7 @@ import { HeroDefaultComponents } from '../../components/sections/Hero/DefaultCom
|
|
|
17
18
|
import { ProductDetailsDefaultComponents } from '../../components/sections/ProductDetails/DefaultComponents'
|
|
18
19
|
import { ProductGalleryDefaultComponents } from '../../components/sections/ProductGallery/DefaultComponents'
|
|
19
20
|
import { ProductShelfDefaultComponents } from '../../components/sections/ProductShelf/DefaultComponents'
|
|
21
|
+
import { RegionBarDefaultComponents } from '../../components/sections/RegionBar/DefaultComponents'
|
|
20
22
|
|
|
21
23
|
export const Sections = {
|
|
22
24
|
Alert,
|
|
@@ -27,6 +29,7 @@ export const Sections = {
|
|
|
27
29
|
ProductDetails,
|
|
28
30
|
ProductGallery,
|
|
29
31
|
ProductShelf,
|
|
32
|
+
RegionBar,
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
export const DefaultComponents: Partial<
|
|
@@ -43,4 +46,5 @@ export const DefaultComponents: Partial<
|
|
|
43
46
|
ProductDetails: ProductDetailsDefaultComponents,
|
|
44
47
|
ProductGallery: ProductGalleryDefaultComponents,
|
|
45
48
|
ProductShelf: ProductShelfDefaultComponents,
|
|
49
|
+
RegionBar: RegionBarDefaultComponents,
|
|
46
50
|
}
|
package/src/typings/overrides.ts
CHANGED
|
@@ -26,6 +26,11 @@ import type {
|
|
|
26
26
|
NavbarSliderFooterProps,
|
|
27
27
|
NavbarSliderHeaderProps,
|
|
28
28
|
NavbarSliderProps,
|
|
29
|
+
NewsletterProps,
|
|
30
|
+
NewsletterAddendumProps,
|
|
31
|
+
NewsletterContentProps,
|
|
32
|
+
NewsletterFormProps,
|
|
33
|
+
NewsletterHeaderProps,
|
|
29
34
|
ProductPriceProps,
|
|
30
35
|
ProductShelfProps,
|
|
31
36
|
ProductTitleProps,
|
|
@@ -40,7 +45,6 @@ import type {
|
|
|
40
45
|
ComponentOverrideDefinition,
|
|
41
46
|
SectionOverrideDefinition,
|
|
42
47
|
} from './overridesDefinition'
|
|
43
|
-
import { NewsletterAddendumProps } from 'src/components/ui/Newsletter/NewsletterAddendum'
|
|
44
48
|
|
|
45
49
|
export type SectionOverride = {
|
|
46
50
|
[K in keyof SectionsOverrides]: SectionOverrideDefinition<K>
|
|
@@ -57,6 +61,7 @@ export type SupportedSectionsOverridesV2 = Pick<
|
|
|
57
61
|
| 'ProductShelf'
|
|
58
62
|
| 'ProductDetails'
|
|
59
63
|
| 'ProductGallery'
|
|
64
|
+
| 'RegionBar'
|
|
60
65
|
>
|
|
61
66
|
|
|
62
67
|
/**
|
|
@@ -133,6 +138,23 @@ export type SectionsOverrides = {
|
|
|
133
138
|
>
|
|
134
139
|
}
|
|
135
140
|
Newsletter: {
|
|
141
|
+
Newsletter: ComponentOverrideDefinition<NewsletterProps, NewsletterProps>
|
|
142
|
+
NewsletterAddendum: ComponentOverrideDefinition<
|
|
143
|
+
NewsletterAddendumProps,
|
|
144
|
+
NewsletterAddendumProps
|
|
145
|
+
>
|
|
146
|
+
NewsletterContent: ComponentOverrideDefinition<
|
|
147
|
+
NewsletterContentProps,
|
|
148
|
+
NewsletterContentProps
|
|
149
|
+
>
|
|
150
|
+
NewsletterForm: ComponentOverrideDefinition<
|
|
151
|
+
NewsletterFormProps,
|
|
152
|
+
NewsletterFormProps
|
|
153
|
+
>
|
|
154
|
+
NewsletterHeader: ComponentOverrideDefinition<
|
|
155
|
+
NewsletterHeaderProps,
|
|
156
|
+
NewsletterHeaderProps
|
|
157
|
+
>
|
|
136
158
|
ToastIconSuccess: ComponentOverrideDefinition<IconProps, IconProps>
|
|
137
159
|
ToastIconError: ComponentOverrideDefinition<IconProps, IconProps>
|
|
138
160
|
HeaderIcon: ComponentOverrideDefinition<IconProps, IconProps>
|
|
@@ -145,10 +167,6 @@ export type SectionsOverrides = {
|
|
|
145
167
|
Omit<InputFieldProps, 'inputRef'>
|
|
146
168
|
>
|
|
147
169
|
Button: ComponentOverrideDefinition<ButtonProps, ButtonProps>
|
|
148
|
-
__experimentalNewsletterAddendum: ComponentOverrideDefinition<
|
|
149
|
-
NewsletterAddendumProps,
|
|
150
|
-
NewsletterAddendumProps
|
|
151
|
-
>
|
|
152
170
|
}
|
|
153
171
|
ProductDetails: {
|
|
154
172
|
ProductTitle: ComponentOverrideDefinition<
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,e,a){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,e,"static/css/d2e8564f2bf133d9.css","static/chunks/pages/index-7d0e3d61afd0a37c.js"],"/404":[s,c,e,a,"static/chunks/pages/404-419470fcedcaba54.js"],"/500":[s,c,e,a,"static/chunks/pages/500-337a57eb2c9da6ba.js"],"/_error":["static/chunks/pages/_error-319451dea77827a6.js"],"/account":[s,c,e,"static/chunks/pages/account-acd169fb6e00021f.js"],"/checkout":[s,c,e,"static/chunks/pages/checkout-5de711ccb807644b.js"],"/login":[s,c,e,a,"static/chunks/pages/login-c38b2107d504199c.js"],"/s":[s,c,e,"static/chunks/pages/s-a6e95c34a89ccbfb.js"],"/[slug]/p":[s,c,e,"static/css/e67c73ff7fbc8c54.css","static/chunks/pages/[slug]/p-551e8bbc72bab530.js"],"/[...slug]":[s,c,e,"static/css/eababca67e15ef4b.css","static/chunks/pages/[...slug]-4fd81d8f84dd561f.js"],sortedPages:["/","/404","/500","/_app","/_error","/account","/checkout","/login","/s","/[slug]/p","/[...slug]"]}}("static/chunks/897-b07932d813bb7dac.js","static/css/f0e64672053efd0c.css","static/chunks/875-e59a8e9803b1d863.js","static/css/df588bb98c0b0ca6.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|