@graphcommerce/next-config 8.1.0-canary.40 → 8.1.0-canary.41
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,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.1.0-canary.41
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
COMPACT means: "< Page X of Y >"
|
|
9
|
+
EXTENDED means: "< 1 2 ... [5] ... 10 11 >" ([@FrankHarland](https://github.com/FrankHarland))
|
|
10
|
+
|
|
3
11
|
## 8.1.0-canary.40
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -62,6 +62,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
|
|
|
62
62
|
"GC_PREVIEW_SECRET",
|
|
63
63
|
"GC_PRODUCT_FILTERS_LAYOUT",
|
|
64
64
|
"GC_PRODUCT_FILTERS_PRO",
|
|
65
|
+
"GC_PRODUCT_LIST_PAGINATION_VARIANT",
|
|
65
66
|
"GC_PRODUCT_ROUTE",
|
|
66
67
|
"GC_RECENTLY_VIEWED_PRODUCTS",
|
|
67
68
|
"GC_RECENTLY_VIEWED_PRODUCTS_ENABLED",
|
package/dist/generated/config.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SidebarGalleryConfigSchema = exports.RecentlyViewedProductsConfigSchema = exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.DatalayerConfigSchema = exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
3
|
+
exports.SidebarGalleryConfigSchema = exports.RecentlyViewedProductsConfigSchema = exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.DatalayerConfigSchema = exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.PaginationVariantSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
|
|
7
7
|
exports.isDefinedNonNullAny = isDefinedNonNullAny;
|
|
8
8
|
exports.definedNonNullAnySchema = zod_1.z.any().refine((v) => (0, exports.isDefinedNonNullAny)(v));
|
|
9
9
|
exports.CompareVariantSchema = zod_1.z.enum(['CHECKBOX', 'ICON']);
|
|
10
|
+
exports.PaginationVariantSchema = zod_1.z.enum(['COMPACT', 'EXTENDED']);
|
|
10
11
|
exports.ProductFiltersLayoutSchema = zod_1.z.enum(['DEFAULT', 'SIDEBAR']);
|
|
11
12
|
exports.SidebarGalleryPaginationVariantSchema = zod_1.z.enum(['DOTS', 'THUMBNAILS_BOTTOM']);
|
|
12
13
|
function DatalayerConfigSchema() {
|
|
@@ -46,6 +47,7 @@ function GraphCommerceConfigSchema() {
|
|
|
46
47
|
previewSecret: zod_1.z.string().nullish(),
|
|
47
48
|
productFiltersLayout: exports.ProductFiltersLayoutSchema.default("DEFAULT").nullish(),
|
|
48
49
|
productFiltersPro: zod_1.z.boolean().nullish(),
|
|
50
|
+
productListPaginationVariant: exports.PaginationVariantSchema.nullish(),
|
|
49
51
|
productRoute: zod_1.z.string().nullish(),
|
|
50
52
|
recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
|
|
51
53
|
robotsAllow: zod_1.z.boolean().nullish(),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/next-config",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "8.1.0-canary.
|
|
5
|
+
"version": "8.1.0-canary.41",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "src/index.ts",
|
package/src/config/demoConfig.ts
CHANGED
package/src/generated/config.ts
CHANGED
|
@@ -293,6 +293,13 @@ export type GraphCommerceConfig = {
|
|
|
293
293
|
productFiltersLayout?: InputMaybe<ProductFiltersLayout>;
|
|
294
294
|
/** Product filters with better UI for mobile and desktop. */
|
|
295
295
|
productFiltersPro?: InputMaybe<Scalars['Boolean']['input']>;
|
|
296
|
+
/**
|
|
297
|
+
* Pagination variant for the product listings.
|
|
298
|
+
*
|
|
299
|
+
* COMPACT means: "< Page X of Y >"
|
|
300
|
+
* EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >"
|
|
301
|
+
*/
|
|
302
|
+
productListPaginationVariant?: InputMaybe<PaginationVariant>;
|
|
296
303
|
/**
|
|
297
304
|
* By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
|
|
298
305
|
*
|
|
@@ -422,6 +429,10 @@ export type MagentoConfigurableVariantValues = {
|
|
|
422
429
|
url?: InputMaybe<Scalars['Boolean']['input']>;
|
|
423
430
|
};
|
|
424
431
|
|
|
432
|
+
export type PaginationVariant =
|
|
433
|
+
| 'COMPACT'
|
|
434
|
+
| 'EXTENDED';
|
|
435
|
+
|
|
425
436
|
export type ProductFiltersLayout =
|
|
426
437
|
| 'DEFAULT'
|
|
427
438
|
| 'SIDEBAR';
|
|
@@ -458,6 +469,8 @@ export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny
|
|
|
458
469
|
|
|
459
470
|
export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']);
|
|
460
471
|
|
|
472
|
+
export const PaginationVariantSchema = z.enum(['COMPACT', 'EXTENDED']);
|
|
473
|
+
|
|
461
474
|
export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR']);
|
|
462
475
|
|
|
463
476
|
export const SidebarGalleryPaginationVariantSchema = z.enum(['DOTS', 'THUMBNAILS_BOTTOM']);
|
|
@@ -499,6 +512,7 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
|
|
|
499
512
|
previewSecret: z.string().nullish(),
|
|
500
513
|
productFiltersLayout: ProductFiltersLayoutSchema.default("DEFAULT").nullish(),
|
|
501
514
|
productFiltersPro: z.boolean().nullish(),
|
|
515
|
+
productListPaginationVariant: PaginationVariantSchema.nullish(),
|
|
502
516
|
productRoute: z.string().nullish(),
|
|
503
517
|
recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
|
|
504
518
|
robotsAllow: z.boolean().nullish(),
|