@graphcommerce/next-ui 3.14.6 → 3.15.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/AppShell/AppShellHeader/index.tsx +11 -23
- package/AppShell/MenuFab.tsx +2 -3
- package/CHANGELOG.md +45 -0
- package/Page/Document.tsx +3 -2
- package/package.json +2 -2
- package/types.d.ts +9 -0
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useHistoryLink,
|
|
3
|
-
usePageContext,
|
|
4
|
-
usePageRouter,
|
|
5
|
-
usePrevUp,
|
|
6
|
-
useUp,
|
|
7
|
-
} from '@graphcommerce/framer-next-pages'
|
|
1
|
+
import { usePageContext, usePageRouter, usePrevUp, useUp } from '@graphcommerce/framer-next-pages'
|
|
8
2
|
import { Fab, makeStyles, Theme } from '@material-ui/core'
|
|
9
3
|
import clsx from 'clsx'
|
|
10
4
|
import { m, MotionValue, useMotionValue, useTransform } from 'framer-motion'
|
|
@@ -250,10 +244,6 @@ export default function AppShellHeader(props: AppShellHeaderProps) {
|
|
|
250
244
|
const titleOffset = useMotionValue<number>(100)
|
|
251
245
|
const titleHeight = useMotionValue<number>(100)
|
|
252
246
|
|
|
253
|
-
const { href: historyHref, onClick: historyOnClick } = useHistoryLink({
|
|
254
|
-
href: up?.href ?? '',
|
|
255
|
-
})
|
|
256
|
-
|
|
257
247
|
const setOffset = useCallback(
|
|
258
248
|
(offsetTop: number, offsetParent: Element | null, clientHeight: number) => {
|
|
259
249
|
titleHeight.set(clientHeight)
|
|
@@ -339,18 +329,16 @@ export default function AppShellHeader(props: AppShellHeaderProps) {
|
|
|
339
329
|
|
|
340
330
|
const canClickBack = backSteps > 0 && router.asPath !== prevUp?.href
|
|
341
331
|
let back = canClickBack && (
|
|
342
|
-
<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
</Button>
|
|
353
|
-
</PageLink>
|
|
332
|
+
<Button
|
|
333
|
+
onClick={() => router.back()}
|
|
334
|
+
variant='pill-link'
|
|
335
|
+
size='small'
|
|
336
|
+
className={classes.backButton}
|
|
337
|
+
startIcon={backIcon}
|
|
338
|
+
aria-label='Back'
|
|
339
|
+
>
|
|
340
|
+
{up?.href === router.asPath ? up?.title : 'Back'}
|
|
341
|
+
</Button>
|
|
354
342
|
)
|
|
355
343
|
if (!canClickBack && up?.href) {
|
|
356
344
|
back = (
|
package/AppShell/MenuFab.tsx
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,51 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.15.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.15.0...@graphcommerce/next-ui@3.15.1) (2021-11-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* better handling to go back from product page ([ff8e72b](https://github.com/ho-nl/m2-pwa/commit/ff8e72beef81b9fb0d20cbfbd50c282f0144aed7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.15.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.14.8...@graphcommerce/next-ui@3.15.0) (2021-11-11)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* lingui configuration and integration greatly simplified and fixed ssr ([d8ec22a](https://github.com/ho-nl/m2-pwa/commit/d8ec22a80295af854a4cf6f357c4fb137c5b550d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [3.14.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.14.7...@graphcommerce/next-ui@3.14.8) (2021-11-09)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **menu-fab:** revert h3 styling for mobile menu ([7a45b4f](https://github.com/ho-nl/m2-pwa/commit/7a45b4fb8b0165f7a072bc0658833c819c9f8082))
|
|
34
|
+
* restyle menu to h4 ([642e166](https://github.com/ho-nl/m2-pwa/commit/642e16635dc06f38bed91ffd1a374922ac70439b))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [3.14.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.14.6...@graphcommerce/next-ui@3.14.7) (2021-11-09)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* make sure the translations are ran ([9d77807](https://github.com/ho-nl/m2-pwa/commit/9d7780711fc1d66884a7465e18d175a6a1d40abb))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
6
51
|
## [3.14.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.14.2...@graphcommerce/next-ui@3.14.3) (2021-11-06)
|
|
7
52
|
|
|
8
53
|
|
package/Page/Document.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ServerStyleSheets } from '@material-ui/core/styles'
|
|
2
|
-
|
|
2
|
+
// eslint-disable-next-line @next/next/no-document-import-in-page
|
|
3
|
+
import NextDocument, { DocumentContext, DocumentInitialProps } from 'next/document'
|
|
3
4
|
import React from 'react'
|
|
4
5
|
|
|
5
6
|
export default class Document extends NextDocument {
|
|
6
|
-
static getInitialProps = async (ctx: DocumentContext) => {
|
|
7
|
+
static getInitialProps = async (ctx: DocumentContext): Promise<DocumentInitialProps> => {
|
|
7
8
|
const sheets = new ServerStyleSheets()
|
|
8
9
|
const originalRenderPage = ctx.renderPage
|
|
9
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.1",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"project": "./tsconfig.json"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "9fb7a52af72eb5c9677f24e11d7b62871151c46e"
|
|
57
57
|
}
|
package/types.d.ts
CHANGED
|
@@ -11,3 +11,12 @@ declare module 'react' {
|
|
|
11
11
|
loading?: 'lazy' | 'eager' | 'auto'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
declare module '*.po' {
|
|
16
|
+
const messages: Record<
|
|
17
|
+
string,
|
|
18
|
+
string | Array<string | Array<string | (string | undefined) | Record<string, unknown>>>
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
export const messages
|
|
22
|
+
}
|