@graphcommerce/next-config 6.2.0-canary.48 → 6.2.0-canary.50
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 +12 -0
- package/dist/config/demoConfig.js +2 -0
- package/dist/generated/config.js +3 -1
- package/package.json +1 -1
- package/src/config/demoConfig.ts +2 -0
- package/src/generated/config.ts +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 6.2.0-canary.50
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
## 6.2.0-canary.49
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
|
|
14
|
+
|
|
3
15
|
## 6.2.0-canary.48
|
|
4
16
|
|
|
5
17
|
## 6.2.0-canary.47
|
package/dist/generated/config.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
3
|
+
exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.ProductFiltersLayoutSchema = 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.ProductFiltersLayoutSchema = zod_1.z.enum(['DEFAULT', 'SIDEBAR']);
|
|
10
11
|
function GraphCommerceConfigSchema() {
|
|
11
12
|
return zod_1.z.object({
|
|
12
13
|
canonicalBaseUrl: zod_1.z.string().min(1),
|
|
@@ -26,6 +27,7 @@ function GraphCommerceConfigSchema() {
|
|
|
26
27
|
limitSsg: zod_1.z.boolean().nullish(),
|
|
27
28
|
magentoEndpoint: zod_1.z.string().min(1),
|
|
28
29
|
previewSecret: zod_1.z.string().nullish(),
|
|
30
|
+
productFiltersLayout: exports.ProductFiltersLayoutSchema.nullish(),
|
|
29
31
|
productFiltersPro: zod_1.z.boolean().nullish(),
|
|
30
32
|
productRoute: zod_1.z.string().nullish(),
|
|
31
33
|
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": "6.2.0-canary.
|
|
5
|
+
"version": "6.2.0-canary.50",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "src/index.ts",
|
package/src/config/demoConfig.ts
CHANGED
|
@@ -21,6 +21,8 @@ export const demoConfig: PartialDeep<GraphCommerceConfig, { recurseIntoArrays: t
|
|
|
21
21
|
{ locale: 'en-ca', magentoStoreCode: 'en_CA' },
|
|
22
22
|
],
|
|
23
23
|
productFiltersPro: true,
|
|
24
|
+
productFiltersLayout: 'DEFAULT',
|
|
25
|
+
compareVariant: 'ICON',
|
|
24
26
|
robotsAllow: false,
|
|
25
27
|
demoMode: true,
|
|
26
28
|
limitSsg: true,
|
package/src/generated/config.ts
CHANGED
|
@@ -223,6 +223,12 @@ export type GraphCommerceConfig = {
|
|
|
223
223
|
magentoEndpoint: Scalars['String']['input'];
|
|
224
224
|
/** To enable next.js' preview mode, configure the secret you'd like to use. */
|
|
225
225
|
previewSecret?: InputMaybe<Scalars['String']['input']>;
|
|
226
|
+
/**
|
|
227
|
+
* Layout how the filters are rendered.
|
|
228
|
+
* DEFAULT: Will be rendered as horzontal chips on desktop and mobile
|
|
229
|
+
* SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
|
|
230
|
+
*/
|
|
231
|
+
productFiltersLayout?: InputMaybe<ProductFiltersLayout>;
|
|
226
232
|
/**
|
|
227
233
|
* Product filters with better UI for mobile and desktop.
|
|
228
234
|
*
|
|
@@ -322,6 +328,10 @@ export type GraphCommerceStorefrontConfig = {
|
|
|
322
328
|
magentoStoreCode: Scalars['String']['input'];
|
|
323
329
|
};
|
|
324
330
|
|
|
331
|
+
export type ProductFiltersLayout =
|
|
332
|
+
| 'DEFAULT'
|
|
333
|
+
| 'SIDEBAR';
|
|
334
|
+
|
|
325
335
|
|
|
326
336
|
type Properties<T> = Required<{
|
|
327
337
|
[K in keyof T]: z.ZodType<T[K], any, T[K]>;
|
|
@@ -335,6 +345,8 @@ export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny
|
|
|
335
345
|
|
|
336
346
|
export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']);
|
|
337
347
|
|
|
348
|
+
export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR']);
|
|
349
|
+
|
|
338
350
|
export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerceConfig>> {
|
|
339
351
|
return z.object({
|
|
340
352
|
canonicalBaseUrl: z.string().min(1),
|
|
@@ -354,6 +366,7 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
|
|
|
354
366
|
limitSsg: z.boolean().nullish(),
|
|
355
367
|
magentoEndpoint: z.string().min(1),
|
|
356
368
|
previewSecret: z.string().nullish(),
|
|
369
|
+
productFiltersLayout: ProductFiltersLayoutSchema.nullish(),
|
|
357
370
|
productFiltersPro: z.boolean().nullish(),
|
|
358
371
|
productRoute: z.string().nullish(),
|
|
359
372
|
robotsAllow: z.boolean().nullish(),
|