@graphcommerce/docs 8.1.0-canary.40 → 8.1.0-canary.42

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.1.0-canary.42
4
+
5
+ ## 8.1.0-canary.41
6
+
7
+ ### Patch Changes
8
+
9
+ - [#2242](https://github.com/graphcommerce-org/graphcommerce/pull/2242) [`a4cce76`](https://github.com/graphcommerce-org/graphcommerce/commit/a4cce76ca37af2bec604e953ada4bb11bd91f55d) - Add option to show an extended version of the pagination component. Configurable via the "productListPaginationVariant" key in your graphcommerce.config.js
10
+ COMPACT means: "< Page X of Y >"
11
+ EXTENDED means: "< 1 2 ... [5] ... 10 11 >" ([@FrankHarland](https://github.com/FrankHarland))
12
+
3
13
  ## 8.1.0-canary.40
4
14
 
5
15
  ## 8.1.0-canary.39
@@ -181,6 +181,8 @@ Enable customer account deletion through the account section
181
181
 
182
182
  #### dataLayer: [DatalayerConfig](#DatalayerConfig)
183
183
 
184
+ Datalayer config
185
+
184
186
  #### debug: [GraphCommerceDebugConfig](#GraphCommerceDebugConfig)
185
187
 
186
188
  Debug configuration for GraphCommerce
@@ -295,6 +297,13 @@ SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
295
297
 
296
298
  Product filters with better UI for mobile and desktop.
297
299
 
300
+ #### productListPaginationVariant: COMPACT | EXTENDED = `COMPACT`
301
+
302
+ Pagination variant for the product listings.
303
+
304
+ COMPACT means: "< Page X of Y >"
305
+ EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >"
306
+
298
307
  #### productRoute: string
299
308
 
300
309
  By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
@@ -43,8 +43,10 @@ data needed to render the layout (header, footer, menu etc.)
43
43
 
44
44
  export const getStaticProps: GetPageStaticProps = async ({ locale }) => {
45
45
  ...
46
-
47
- const layout = staticClient.query({ query: LayoutDocument, fetchPolicy: 'cache-first' })
46
+ const layout = staticClient.query({
47
+ query: LayoutDocument,
48
+ fetchPolicy: cacheFirst(staticClient),
49
+ })
48
50
 
49
51
  return {
50
52
  props: {
@@ -93,9 +93,9 @@ AboutUs.pageOptions = pageOptions
93
93
 
94
94
  export default AboutUs
95
95
 
96
- export const getStaticProps: GetPageStaticProps = async ({ locale }) => {
97
- const client = graphqlSharedClient(locale)
98
- const staticClient = graphqlSsrClient(locale)
96
+ export const getStaticProps: GetPageStaticProps = async (context) => {
97
+ const client = graphqlSharedClient(context)
98
+ const staticClient = graphqlSsrClient(context)
99
99
 
100
100
  const conf = client.query({ query: StoreConfigDocument })
101
101
  const layout = staticClient.query({
@@ -210,9 +210,9 @@ AboutUs.pageOptions = pageOptions
210
210
 
211
211
  export default AboutUs
212
212
 
213
- export const getStaticProps: GetPageStaticProps = async ({ locale }) => {
214
- const client = graphqlSharedClient(locale)
215
- const staticClient = graphqlSsrClient(locale)
213
+ export const getStaticProps: GetPageStaticProps = async (context) => {
214
+ const client = graphqlSharedClient(context)
215
+ const staticClient = graphqlSsrClient(context)
216
216
 
217
217
  const conf = client.query({ query: StoreConfigDocument })
218
218
  const page = hygraphPageContent(staticClient, 'about/about-us')
@@ -259,12 +259,10 @@ export const getStaticPaths: GetPageStaticPaths = (context) => ({
259
259
  fallback: 'blocking',
260
260
  })
261
261
 
262
- export const getStaticProps: GetPageStaticProps = async ({
263
- locale,
264
- params,
265
- }) => {
266
- const client = graphqlSharedClient(locale)
267
- const staticClient = graphqlSsrClient(locale)
262
+ export const getStaticProps: GetPageStaticProps = async (context) => {
263
+ const { params } = context
264
+ const client = graphqlSharedClient(context)
265
+ const staticClient = graphqlSsrClient(context)
268
266
 
269
267
  const conf = client.query({ query: StoreConfigDocument })
270
268
  const page = hygraphPageContent(staticClient, `about/${params?.url}`)
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@graphcommerce/docs",
3
3
  "homepage": "https://www.graphcommerce.org/docs",
4
4
  "repository": "github:graphcommerce-org/graphcommerce/docs",
5
- "version": "8.1.0-canary.40",
5
+ "version": "8.1.0-canary.42",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.40"
8
+ "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.42"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }