@faststore/core 3.88.7 → 3.89.1
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 +55 -55
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +27 -27
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/1607.js +1 -0
- package/.next/server/chunks/2570.js +1 -1
- package/.next/server/chunks/6886.js +1 -1
- package/.next/server/chunks/9563.js +2 -2
- package/.next/server/chunks/9630.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US.html +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/403.js +1 -1
- package/.next/server/pages/pvt/account/403.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/404.js +1 -1
- package/.next/server/pages/pvt/account/404.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/[...unknown].js.nft.json +1 -1
- package/.next/server/pages/pvt/account/orders/[id].js +1 -1
- package/.next/server/pages/pvt/account/orders/[id].js.nft.json +1 -1
- package/.next/server/pages/pvt/account/orders.js +1 -1
- package/.next/server/pages/pvt/account/orders.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/profile.js +1 -1
- package/.next/server/pages/pvt/account/profile.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/security.js +1 -1
- package/.next/server/pages/pvt/account/security.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/user-details.js +1 -1
- package/.next/server/pages/pvt/account/user-details.js.nft.json +1 -1
- package/.next/server/pages/pvt/account.js.nft.json +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/43JSGz9XxT2_nidd-70dX/_buildManifest.js +1 -0
- package/.next/static/chunks/pages/pvt/account/403-f2858569fde3873b.js +1 -0
- package/.next/static/chunks/pages/pvt/account/404-c68124bed7cb7c48.js +1 -0
- package/.next/static/chunks/pages/pvt/account/orders/[id]-459f6b9a86780410.js +1 -0
- package/.next/static/chunks/pages/pvt/account/orders-f376bbaf561ae429.js +1 -0
- package/.next/static/chunks/pages/pvt/account/profile-b6cdbf02d4682544.js +1 -0
- package/.next/static/chunks/pages/pvt/account/security-e6289a40e745d3c4.js +1 -0
- package/.next/static/chunks/pages/pvt/account/user-details-fba1822e52e7de26.js +1 -0
- package/.next/static/chunks/{webpack-747ebf1e0c896030.js → webpack-f16e329d9f50b79b.js} +1 -1
- package/.next/static/css/{5273202f7c5e5ec1.css → 02eaf202d3d11fd1.css} +1 -1
- package/.next/static/css/0f8f72ecdeb79402.css +1 -0
- package/.next/static/css/2c0f8724c01f2ab8.css +1 -0
- package/.next/static/css/32a4ddbf3999c2a5.css +1 -0
- package/.next/static/css/331f08e9d306e70b.css +1 -0
- package/.next/static/css/{865e30903caadb79.css → 4f0597b0bf0ef2e1.css} +1 -1
- package/.next/static/css/5177628438c28f74.css +1 -0
- package/.next/static/css/6bb0abee27fe0019.css +1 -0
- package/.next/static/css/84ebcfe7a63d709d.css +1 -0
- package/.next/static/css/8df9f9a136312210.css +1 -0
- package/.next/static/css/a8bcd71b15adb1ec.css +1 -0
- package/.next/static/css/a9328b56f3942b82.css +1 -0
- package/.next/static/css/{b7bba8fce075688b.css → b65e005fb943434c.css} +1 -1
- package/.next/static/css/{831a1f72fe4b2d80.css → bd121d85d6ceed46.css} +1 -1
- package/.next/static/css/{dbbb10bf2f162a58.css → be59e989720e6e50.css} +1 -1
- package/.next/static/css/{b1806cbafd0c1f81.css → c29fee5b9f9d48d9.css} +1 -1
- package/.next/static/css/{936c65069d608087.css → c34f6ea9953e2f63.css} +1 -1
- package/.next/static/css/{e46393a76c5d93a9.css → c53b17b6fa994508.css} +1 -1
- package/.next/static/css/{5347dbc8b71de47d.css → ceb410a7062740d1.css} +1 -1
- package/.next/static/css/da0f1f3329c5657a.css +1 -0
- package/.next/static/css/da5bfb1f39c54578.css +1 -0
- package/.next/static/css/f60366555f563deb.css +1 -0
- package/.next/static/css/f81198b7fe9f5f6f.css +1 -0
- package/.next/trace +138 -137
- package/.turbo/turbo-build.log +26 -26
- package/.turbo/turbo-test.log +6 -5
- package/@generated/gql.ts +12 -12
- package/@generated/graphql.ts +13 -14
- package/@generated/persisted-documents.json +6 -6
- package/@generated/schema.graphql +0 -2
- package/CHANGELOG.md +12 -0
- package/package.json +4 -4
- package/src/components/account/MyAccountLayout/MyAccountLayout.tsx +3 -3
- package/src/components/account/MyAccountLayout/styles.scss +10 -0
- package/src/components/account/MyAccountMenu/styles.scss +2 -1
- package/src/components/account/MyAccountUserDetails/MyAccountUserDetails.tsx +18 -39
- package/src/components/account/MyAccountUserDetails/styles.module.scss +1 -93
- package/src/components/account/components/MyAccountHeader/MyAccountHeader.tsx +13 -0
- package/src/components/account/components/MyAccountHeader/index.ts +1 -0
- package/src/components/account/components/MyAccountHeader/styles.scss +13 -0
- package/src/components/account/components/MyAccountStatusBadge/styles.scss +4 -4
- package/src/components/account/components/MyAccountTable/MyAccountTable.tsx +23 -0
- package/src/components/account/components/MyAccountTable/index.ts +1 -0
- package/src/components/account/components/MyAccountTable/styles.scss +67 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +131 -134
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +9 -24
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +37 -42
- package/src/components/account/orders/MyAccountListOrders/styles.module.scss +4 -25
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +1 -6
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +1 -1
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/MyAccountStatusCard.tsx +9 -11
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/styles.scss +27 -11
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/useConnectorPositioning.ts +0 -8
- package/src/components/account/orders/MyAccountOrderDetails/section.module.scss +2 -3
- package/src/components/account/profile/profile.module.scss +1 -85
- package/src/components/account/profile/profile.tsx +24 -31
- package/src/components/account/security/SecurityDrawer.tsx +86 -88
- package/src/components/account/security/SecuritySection.tsx +23 -20
- package/src/components/account/security/styles.module.scss +26 -150
- package/src/experimental/myAccountSeverSideProps.ts +6 -4
- package/src/pages/pvt/account/403.tsx +5 -3
- package/src/pages/pvt/account/404.tsx +5 -3
- package/src/pages/pvt/account/orders/[id].tsx +4 -2
- package/src/pages/pvt/account/orders/index.tsx +4 -2
- package/src/pages/pvt/account/profile.tsx +2 -6
- package/src/pages/pvt/account/security.tsx +4 -5
- package/src/pages/pvt/account/user-details.tsx +4 -2
- package/src/utils/userOrderStatus.ts +5 -5
- package/test/server/index.test.ts +0 -1
- package/.next/static/chunks/pages/pvt/account/403-e4315ace8609a7ff.js +0 -1
- package/.next/static/chunks/pages/pvt/account/404-1e450ae9476bbcaa.js +0 -1
- package/.next/static/chunks/pages/pvt/account/orders/[id]-a3e46af1be9816a4.js +0 -1
- package/.next/static/chunks/pages/pvt/account/orders-db7a364869130660.js +0 -1
- package/.next/static/chunks/pages/pvt/account/profile-e8a7ad7a7d7c60fb.js +0 -1
- package/.next/static/chunks/pages/pvt/account/security-cad4e4260be8b0cd.js +0 -1
- package/.next/static/chunks/pages/pvt/account/user-details-401f6f6e4ce4b9ce.js +0 -1
- package/.next/static/css/04fb2d4b8924b0c6.css +0 -1
- package/.next/static/css/083dc2a5b0de2439.css +0 -1
- package/.next/static/css/175fa823349dc534.css +0 -1
- package/.next/static/css/297be4be3be36ff0.css +0 -1
- package/.next/static/css/2a4b7072e47636f1.css +0 -1
- package/.next/static/css/45fac71f6411cceb.css +0 -1
- package/.next/static/css/6cd282d958f613bc.css +0 -1
- package/.next/static/css/b52f8f6500d3439e.css +0 -1
- package/.next/static/css/b7fc24e8f1eb011f.css +0 -1
- package/.next/static/css/d26cb0a54378b3d9.css +0 -1
- package/.next/static/css/ec7fdad03808422d.css +0 -1
- package/.next/static/css/f93cf36b16950027.css +0 -1
- package/.next/static/css/fd0a7a134ddc3d90.css +0 -1
- package/.next/static/css/fe0bcc13a2b68605.css +0 -1
- package/.next/static/pe6z3Z3bQ07PowbWL75Ts/_buildManifest.js +0 -1
- /package/.next/static/{pe6z3Z3bQ07PowbWL75Ts → 43JSGz9XxT2_nidd-70dX}/_ssgManifest.js +0 -0
|
@@ -133,100 +133,98 @@ export const SecurityDrawer = ({
|
|
|
133
133
|
</SlideOverHeader>
|
|
134
134
|
|
|
135
135
|
<div data-fs-security-drawer-body>
|
|
136
|
-
<div data-fs-security-drawer-body-
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
</div>
|
|
136
|
+
<div data-fs-security-drawer-body-password>
|
|
137
|
+
<Input
|
|
138
|
+
data-fs-security-drawer-input
|
|
139
|
+
id="security-drawer-input-current-password"
|
|
140
|
+
type={showCurrentPassword ? 'text' : 'password'}
|
|
141
|
+
placeholder="Current Password"
|
|
142
|
+
inputMode="text"
|
|
143
|
+
value={currentPassword}
|
|
144
|
+
onChange={(e) => {
|
|
145
|
+
setFormError(null)
|
|
146
|
+
setCurrentPassword(e.target.value)
|
|
147
|
+
}}
|
|
148
|
+
/>
|
|
149
|
+
<IconButton
|
|
150
|
+
data-fs-security-drawer-input-password-toggle
|
|
151
|
+
size="small"
|
|
152
|
+
aria-label="Show Password"
|
|
153
|
+
onClick={() => setShowCurrentPassword((prev) => !prev)}
|
|
154
|
+
icon={
|
|
155
|
+
showCurrentPassword ? (
|
|
156
|
+
<Icon name="EyeSlash" />
|
|
157
|
+
) : (
|
|
158
|
+
<Icon name="Eye" />
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
/>
|
|
162
|
+
</div>
|
|
164
163
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
164
|
+
<div data-fs-security-drawer-body-password>
|
|
165
|
+
<Input
|
|
166
|
+
data-fs-security-drawer-input
|
|
167
|
+
id="security-drawer-input-new-password"
|
|
168
|
+
type={showNewPassword ? 'text' : 'password'}
|
|
169
|
+
placeholder="New Password"
|
|
170
|
+
inputMode="text"
|
|
171
|
+
value={newPassword}
|
|
172
|
+
onChange={(e) => {
|
|
173
|
+
setFormError(null)
|
|
174
|
+
setNewPassword(e.target.value)
|
|
175
|
+
}}
|
|
176
|
+
/>
|
|
177
|
+
<IconButton
|
|
178
|
+
data-fs-security-drawer-input-password-toggle
|
|
179
|
+
size="small"
|
|
180
|
+
aria-label="Show Password"
|
|
181
|
+
onClick={() => setShowNewPassword((prev) => !prev)}
|
|
182
|
+
icon={
|
|
183
|
+
showNewPassword ? <Icon name="EyeSlash" /> : <Icon name="Eye" />
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
{formError && (
|
|
189
|
+
<div data-fs-security-drawer-error>
|
|
190
|
+
<Icon
|
|
191
|
+
width={20}
|
|
192
|
+
height={20}
|
|
193
|
+
name="CircleWavyWarning"
|
|
194
|
+
data-fs-security-drawer-error-icon
|
|
186
195
|
/>
|
|
196
|
+
<span>{formError}</span>
|
|
187
197
|
</div>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
<Icon
|
|
215
|
-
name={rule.isValid ? 'CheckCircle' : 'XCircle'}
|
|
216
|
-
width={20}
|
|
217
|
-
height={20}
|
|
218
|
-
/>
|
|
219
|
-
{rule.label}
|
|
220
|
-
</li>
|
|
221
|
-
))}
|
|
222
|
-
</ul>
|
|
223
|
-
</div>
|
|
224
|
-
)}
|
|
225
|
-
</div>
|
|
198
|
+
)}
|
|
199
|
+
|
|
200
|
+
{newPassword.length > 0 && (
|
|
201
|
+
<div data-fs-security-drawer-password-rules-container>
|
|
202
|
+
<p data-fs-security-drawer-password-rules-title>
|
|
203
|
+
Your password must have at least:
|
|
204
|
+
</p>
|
|
205
|
+
|
|
206
|
+
<ul data-fs-security-drawer-password-rules-list>
|
|
207
|
+
{newPasswordValidations.map((rule, index) => (
|
|
208
|
+
<li
|
|
209
|
+
key={index}
|
|
210
|
+
data-fs-security-drawer-password-rule-item
|
|
211
|
+
data-status={rule.isValid ? 'success' : 'error'}
|
|
212
|
+
>
|
|
213
|
+
<Icon
|
|
214
|
+
name={rule.isValid ? 'CheckCircle' : 'XCircle'}
|
|
215
|
+
width={20}
|
|
216
|
+
height={20}
|
|
217
|
+
/>
|
|
218
|
+
{rule.label}
|
|
219
|
+
</li>
|
|
220
|
+
))}
|
|
221
|
+
</ul>
|
|
222
|
+
</div>
|
|
223
|
+
)}
|
|
226
224
|
</div>
|
|
227
225
|
|
|
228
226
|
<footer data-fs-security-drawer-footer>
|
|
229
|
-
<Button variant="
|
|
227
|
+
<Button variant="secondary" onClick={handleClose}>
|
|
230
228
|
Cancel
|
|
231
229
|
</Button>
|
|
232
230
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import { Button } from '@faststore/ui'
|
|
3
3
|
|
|
4
|
+
import AccountTable from '../components/MyAccountTable'
|
|
5
|
+
import AccountHeader from '../components/MyAccountHeader'
|
|
6
|
+
|
|
4
7
|
import { SecurityDrawer } from './SecurityDrawer'
|
|
5
8
|
import styles from './styles.module.scss'
|
|
6
9
|
|
|
@@ -23,28 +26,28 @@ export const SecuritySection = ({
|
|
|
23
26
|
)}
|
|
24
27
|
|
|
25
28
|
<section data-fs-securiry-section className={styles.section}>
|
|
26
|
-
<
|
|
27
|
-
<h1 data-fs-security-title>Security</h1>
|
|
28
|
-
</header>
|
|
29
|
+
<AccountHeader pageTitle="Security" />
|
|
29
30
|
|
|
30
31
|
<div data-fs-security-container>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
<AccountTable
|
|
33
|
+
rows={[
|
|
34
|
+
{
|
|
35
|
+
heading: 'Password',
|
|
36
|
+
data: (
|
|
37
|
+
<>
|
|
38
|
+
<span data-fs-security-table-data-text>••••••••••</span>
|
|
39
|
+
<Button
|
|
40
|
+
variant="tertiary"
|
|
41
|
+
data-fs-security-table-action-button
|
|
42
|
+
onClick={() => setIsDrawerOpen(true)}
|
|
43
|
+
>
|
|
44
|
+
Reset password
|
|
45
|
+
</Button>
|
|
46
|
+
</>
|
|
47
|
+
),
|
|
48
|
+
},
|
|
49
|
+
]}
|
|
50
|
+
/>
|
|
48
51
|
</div>
|
|
49
52
|
</section>
|
|
50
53
|
</>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@import "@faststore/ui/src/components/atoms/Input/styles.scss";
|
|
6
6
|
@import "@faststore/ui/src/components/atoms/Icon/styles.scss";
|
|
7
7
|
@import "@faststore/ui/src/components/organisms/SlideOver/styles.scss";
|
|
8
|
+
@import "../components/MyAccountTable/styles.scss";
|
|
8
9
|
|
|
9
10
|
// --------------------------------------------------------
|
|
10
11
|
// Design Tokens
|
|
@@ -24,40 +25,20 @@
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
[data-fs-security-drawer-header] {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
width: 100%;
|
|
31
28
|
border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
[data-fs-security-drawer-header-title] {
|
|
35
32
|
font-size: var(--fs-text-size-3);
|
|
36
33
|
font-weight: var(--fs-text-weight-bold);
|
|
37
|
-
color: var(--fs-color-text);
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
[data-fs-security-drawer-body] {
|
|
41
37
|
display: flex;
|
|
42
38
|
flex: 1;
|
|
43
39
|
flex-direction: column;
|
|
44
|
-
gap: var(--fs-spacing-6);
|
|
45
|
-
padding: var(--fs-spacing-6);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[data-fs-security-drawer-body-form] {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
gap: var(--fs-spacing-3);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
[data-fs-security-drawer-footer] {
|
|
55
|
-
display: flex;
|
|
56
40
|
gap: var(--fs-spacing-2);
|
|
57
|
-
|
|
58
|
-
justify-content: center;
|
|
59
|
-
padding: var(--fs-spacing-3);
|
|
60
|
-
border-top: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
41
|
+
padding: var(--fs-spacing-4);
|
|
61
42
|
}
|
|
62
43
|
|
|
63
44
|
[data-fs-security-drawer-input] {
|
|
@@ -68,21 +49,18 @@
|
|
|
68
49
|
font-weight: var(--fs-text-weight-regular);
|
|
69
50
|
}
|
|
70
51
|
|
|
71
|
-
[data-fs-security-drawer-
|
|
52
|
+
[data-fs-security-drawer-password-rules-container] {
|
|
72
53
|
display: flex;
|
|
73
54
|
flex-direction: column;
|
|
74
55
|
gap: var(--fs-spacing-2);
|
|
75
|
-
padding-block: var(--fs-spacing-2);
|
|
76
56
|
}
|
|
77
57
|
|
|
78
|
-
[data-fs-security-drawer-
|
|
79
|
-
margin-bottom: var(--fs-spacing-2);
|
|
58
|
+
[data-fs-security-drawer-password-rules-title] {
|
|
80
59
|
font-size: var(--fs-text-size-1);
|
|
81
|
-
font-weight: var(--fs-text-weight-semibold);
|
|
82
60
|
color: var(--fs-color-text-light);
|
|
83
61
|
}
|
|
84
62
|
|
|
85
|
-
[data-fs-security-drawer-
|
|
63
|
+
[data-fs-security-drawer-password-rules-list] {
|
|
86
64
|
display: grid;
|
|
87
65
|
grid-template-columns: 1fr 1fr;
|
|
88
66
|
gap: var(--fs-spacing-1);
|
|
@@ -90,31 +68,21 @@
|
|
|
90
68
|
list-style: none;
|
|
91
69
|
}
|
|
92
70
|
|
|
93
|
-
[data-fs-security-drawer-
|
|
71
|
+
[data-fs-security-drawer-password-rule-item] {
|
|
94
72
|
display: flex;
|
|
95
73
|
gap: var(--fs-spacing-1);
|
|
96
74
|
align-items: center;
|
|
97
75
|
font-size: var(--fs-text-size-1);
|
|
98
76
|
font-weight: var(--fs-text-weight-regular);
|
|
99
77
|
color: var(--fs-color-danger-text);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
[data-fs-security-drawer-input-password-rule-item][data-status="success"] {
|
|
103
|
-
color: var(--fs-security-drawer-color-success);
|
|
104
|
-
}
|
|
105
78
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
79
|
+
&[data-status="success"] {
|
|
80
|
+
color: var(--fs-security-drawer-color-success);
|
|
81
|
+
}
|
|
109
82
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
align-items: center;
|
|
114
|
-
padding-block: var(--fs-spacing-2);
|
|
115
|
-
font-size: var(--fs-text-size-1);
|
|
116
|
-
font-weight: var(--fs-text-weight-regular);
|
|
117
|
-
color: var(--fs-color-text-light);
|
|
83
|
+
&[data-status="error"] {
|
|
84
|
+
color: var(--fs-security-drawer-color-error);
|
|
85
|
+
}
|
|
118
86
|
}
|
|
119
87
|
|
|
120
88
|
[data-fs-security-drawer-resend] {
|
|
@@ -123,20 +91,16 @@
|
|
|
123
91
|
color: var(--fs-color-text-light);
|
|
124
92
|
}
|
|
125
93
|
|
|
126
|
-
[data-fs-security-drawer-body-
|
|
94
|
+
[data-fs-security-drawer-body-password] {
|
|
127
95
|
position: relative;
|
|
128
96
|
display: flex;
|
|
129
97
|
flex-direction: column;
|
|
130
98
|
gap: var(--fs-spacing-1);
|
|
131
99
|
width: 100%;
|
|
132
|
-
}
|
|
133
100
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
flex-direction: column;
|
|
138
|
-
gap: var(--fs-spacing-1);
|
|
139
|
-
width: 100%;
|
|
101
|
+
&:first-child {
|
|
102
|
+
margin-bottom: var(--fs-spacing-3);
|
|
103
|
+
}
|
|
140
104
|
}
|
|
141
105
|
|
|
142
106
|
[data-fs-security-drawer-input-password-toggle] {
|
|
@@ -155,82 +119,6 @@
|
|
|
155
119
|
transform: translateY(-50%);
|
|
156
120
|
}
|
|
157
121
|
|
|
158
|
-
display: flex;
|
|
159
|
-
flex-direction: column;
|
|
160
|
-
gap: var(--fs-spacing-6);
|
|
161
|
-
|
|
162
|
-
[data-fs-security-header] {
|
|
163
|
-
padding-block: var(--fs-spacing-6);
|
|
164
|
-
padding-inline: var(--fs-spacing-11);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
[data-fs-security-title] {
|
|
168
|
-
font-family: var(--fs-text-face-title);
|
|
169
|
-
font-size: var(--fs-text-size-3);
|
|
170
|
-
font-weight: var(--fs-text-weight-semibold);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
[data-fs-security-container] {
|
|
174
|
-
display: flex;
|
|
175
|
-
flex-direction: column;
|
|
176
|
-
gap: var(--fs-spacing-6);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
[data-fs-security-table] {
|
|
180
|
-
display: grid;
|
|
181
|
-
grid-template-columns: minmax(11.25rem, auto) 1fr;
|
|
182
|
-
width: 100%;
|
|
183
|
-
padding-inline: var(--fs-spacing-11);
|
|
184
|
-
border-spacing: 0;
|
|
185
|
-
border-collapse: collapse;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
[data-fs-security-table-body] {
|
|
189
|
-
display: contents;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
[data-fs-security-table-row] {
|
|
193
|
-
display: contents;
|
|
194
|
-
border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
[data-fs-security-table-heading] {
|
|
198
|
-
display: flex;
|
|
199
|
-
align-items: center;
|
|
200
|
-
padding-block: var(--fs-spacing-4);
|
|
201
|
-
font-family: var(--fs-text-face-body);
|
|
202
|
-
font-size: var(--fs-text-size-2);
|
|
203
|
-
font-weight: var(--fs-text-weight-regular);
|
|
204
|
-
color: var(--fs-color-text-light);
|
|
205
|
-
text-align: left;
|
|
206
|
-
border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
[data-fs-security-table-data] {
|
|
210
|
-
display: flex;
|
|
211
|
-
align-items: center;
|
|
212
|
-
justify-content: space-between;
|
|
213
|
-
padding-block: var(--fs-spacing-4);
|
|
214
|
-
padding-inline: var(--fs-spacing-1);
|
|
215
|
-
border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
216
|
-
|
|
217
|
-
[data-fs-security-table-data-text] {
|
|
218
|
-
padding-block: var(--fs-spacing-4);
|
|
219
|
-
padding-inline: var(--fs-spacing-1);
|
|
220
|
-
font-family: var(--fs-text-face-body);
|
|
221
|
-
font-size: var(--fs-text-size-2);
|
|
222
|
-
font-weight: var(--fs-text-weight-semibold);
|
|
223
|
-
color: var(--fs-color-text);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
[data-fs-security-table-action] {
|
|
228
|
-
display: flex;
|
|
229
|
-
align-items: center;
|
|
230
|
-
justify-content: flex-end;
|
|
231
|
-
padding-inline: var(--fs-spacing-1);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
122
|
[data-fs-security-drawer-error] {
|
|
235
123
|
display: flex;
|
|
236
124
|
gap: var(--fs-spacing-1);
|
|
@@ -246,29 +134,17 @@
|
|
|
246
134
|
flex-shrink: 0;
|
|
247
135
|
}
|
|
248
136
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
[data-fs-security-table] {
|
|
259
|
-
grid-template-columns: 1fr;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
[data-fs-security-table-heading] {
|
|
263
|
-
padding-block: var(--fs-spacing-4) 0;
|
|
264
|
-
border-bottom: none;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
[data-fs-security-table-data] {
|
|
268
|
-
padding-block: var(--fs-spacing-1) var(--fs-spacing-4);
|
|
269
|
-
padding-inline: 0;
|
|
270
|
-
}
|
|
137
|
+
[data-fs-security-drawer-footer] {
|
|
138
|
+
display: flex;
|
|
139
|
+
gap: var(--fs-spacing-3);
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
padding: var(--fs-spacing-3) var(--fs-spacing-4);
|
|
143
|
+
border-top: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
144
|
+
[data-fs-button] { width: 100%; }
|
|
145
|
+
}
|
|
271
146
|
|
|
147
|
+
@include media("<notebook") {
|
|
272
148
|
[data-fs-security-drawer-footer] {
|
|
273
149
|
align-items: center;
|
|
274
150
|
justify-content: flex-end;
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
type GlobalSectionsData,
|
|
11
11
|
getGlobalSectionsData,
|
|
12
12
|
} from 'src/components/cms/GlobalSections'
|
|
13
|
-
import { execute } from 'src/server'
|
|
14
13
|
import { getIsRepresentative } from 'src/sdk/account/getIsRepresentative'
|
|
14
|
+
import { execute } from 'src/server'
|
|
15
15
|
|
|
16
|
+
import { validateUser } from 'src/sdk/account/validateUser'
|
|
16
17
|
import { injectGlobalSections } from 'src/server/cms/global'
|
|
17
18
|
import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
18
|
-
import { validateUser } from 'src/sdk/account/validateUser'
|
|
19
19
|
import storeConfig from '../../discovery.config'
|
|
20
20
|
|
|
21
21
|
export type MyAccountProps = {
|
|
@@ -26,7 +26,9 @@ export type MyAccountProps = {
|
|
|
26
26
|
|
|
27
27
|
const query = gql(`
|
|
28
28
|
query ServerAccountPageQuery {
|
|
29
|
-
|
|
29
|
+
accountProfile {
|
|
30
|
+
name
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
`)
|
|
32
34
|
|
|
@@ -91,7 +93,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
91
93
|
return {
|
|
92
94
|
props: {
|
|
93
95
|
globalSections: globalSectionsResult,
|
|
94
|
-
accountName: account.data.
|
|
96
|
+
accountName: account.data.accountProfile.name,
|
|
95
97
|
isRepresentative,
|
|
96
98
|
},
|
|
97
99
|
}
|
|
@@ -35,7 +35,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
|
35
35
|
|
|
36
36
|
type Props = {
|
|
37
37
|
globalSections: GlobalSectionsData
|
|
38
|
-
accountName: ServerAccountPageQueryQuery['
|
|
38
|
+
accountName: ServerAccountPageQueryQuery['accountProfile']['name']
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function Page({ globalSections: globalSectionsProp, accountName }: Props) {
|
|
@@ -66,7 +66,9 @@ function Page({ globalSections: globalSectionsProp, accountName }: Props) {
|
|
|
66
66
|
|
|
67
67
|
const query = gql(`
|
|
68
68
|
query ServerAccountPageQuery {
|
|
69
|
-
|
|
69
|
+
accountProfile {
|
|
70
|
+
name
|
|
71
|
+
}
|
|
70
72
|
}
|
|
71
73
|
`)
|
|
72
74
|
|
|
@@ -134,7 +136,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
134
136
|
// The sections from the CMS page are not utilized here for the My Account page.
|
|
135
137
|
// page,
|
|
136
138
|
globalSections: globalSectionsResult,
|
|
137
|
-
accountName: account.data.
|
|
139
|
+
accountName: account.data.accountProfile.name,
|
|
138
140
|
},
|
|
139
141
|
}
|
|
140
142
|
}
|
|
@@ -38,7 +38,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
|
38
38
|
type Props = {
|
|
39
39
|
page: PageContentType
|
|
40
40
|
globalSections: GlobalSectionsData
|
|
41
|
-
accountName: ServerAccountPageQueryQuery['
|
|
41
|
+
accountName: ServerAccountPageQueryQuery['accountProfile']['name']
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function Page({
|
|
@@ -66,7 +66,9 @@ function Page({
|
|
|
66
66
|
|
|
67
67
|
const query = gql(`
|
|
68
68
|
query ServerAccountPageQuery {
|
|
69
|
-
|
|
69
|
+
accountProfile {
|
|
70
|
+
name
|
|
71
|
+
}
|
|
70
72
|
}
|
|
71
73
|
`)
|
|
72
74
|
|
|
@@ -133,7 +135,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
133
135
|
props: {
|
|
134
136
|
page,
|
|
135
137
|
globalSections: globalSectionsResult,
|
|
136
|
-
accountName: account.data.
|
|
138
|
+
accountName: account.data.accountProfile.name,
|
|
137
139
|
},
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -257,7 +257,9 @@ const query = gql(`
|
|
|
257
257
|
phone
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
accountProfile {
|
|
261
|
+
name
|
|
262
|
+
}
|
|
261
263
|
}
|
|
262
264
|
`)
|
|
263
265
|
|
|
@@ -346,7 +348,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
346
348
|
props: {
|
|
347
349
|
globalSections: globalSectionsResult,
|
|
348
350
|
order: orderDetails.data.userOrder,
|
|
349
|
-
accountName: orderDetails.data.
|
|
351
|
+
accountName: orderDetails.data.accountProfile.name,
|
|
350
352
|
isRepresentative,
|
|
351
353
|
},
|
|
352
354
|
}
|
|
@@ -120,7 +120,9 @@ const query = gql(`
|
|
|
120
120
|
perPage
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
accountProfile {
|
|
124
|
+
name
|
|
125
|
+
}
|
|
124
126
|
}
|
|
125
127
|
`)
|
|
126
128
|
|
|
@@ -242,7 +244,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
242
244
|
return {
|
|
243
245
|
props: {
|
|
244
246
|
globalSections: globalSectionsResult,
|
|
245
|
-
accountName: listOrders.data.
|
|
247
|
+
accountName: listOrders.data.accountProfile.name,
|
|
246
248
|
listOrders: listOrders.data.listUserOrders,
|
|
247
249
|
total: listOrders.data.listUserOrders.paging.total,
|
|
248
250
|
perPage: listOrders.data.listUserOrders.paging.perPage,
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* ######################################### */
|
|
2
|
-
/* Mocked Page until development is finished, it will be removed after */
|
|
3
|
-
|
|
4
1
|
import type { Locator } from '@vtex/client-cms'
|
|
5
2
|
import type { GetServerSideProps } from 'next'
|
|
6
3
|
import { NextSeo } from 'next-seo'
|
|
@@ -46,8 +43,8 @@ type ProfilePagePros = {
|
|
|
46
43
|
|
|
47
44
|
export default function Profile({
|
|
48
45
|
globalSections: globalSectionsProp,
|
|
49
|
-
accountName,
|
|
50
46
|
accountProfile,
|
|
47
|
+
accountName,
|
|
51
48
|
isRepresentative,
|
|
52
49
|
}: ProfilePagePros) {
|
|
53
50
|
const { sections: globalSections, settings: globalSettings } =
|
|
@@ -73,7 +70,6 @@ export default function Profile({
|
|
|
73
70
|
|
|
74
71
|
const query = gql(`
|
|
75
72
|
query ServerProfileQuery {
|
|
76
|
-
accountName
|
|
77
73
|
accountProfile {
|
|
78
74
|
name
|
|
79
75
|
email
|
|
@@ -155,7 +151,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
155
151
|
return {
|
|
156
152
|
props: {
|
|
157
153
|
globalSections: globalSectionsResult,
|
|
158
|
-
accountName: profile.data.
|
|
154
|
+
accountName: profile.data.accountProfile.name,
|
|
159
155
|
accountProfile: profile.data.accountProfile,
|
|
160
156
|
isRepresentative,
|
|
161
157
|
},
|