@graphcommerce/next-config 7.1.0-canary.39 → 7.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,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- ## 7.1.0-canary.39
3
+ ## 7.1.0-canary.41
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -28,4 +28,5 @@ exports.demoConfig = {
28
28
  sidebarGallery: { paginationVariant: 'DOTS' },
29
29
  configurableVariantForSimple: true,
30
30
  configurableVariantValues: { url: true, content: true, gallery: true },
31
+ recentlyViewedProducts: { enabled: true, maxCount: 20 },
31
32
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SidebarGalleryConfigSchema = exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = 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.SidebarGalleryPaginationVariantSchema = 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;
@@ -36,6 +36,7 @@ function GraphCommerceConfigSchema() {
36
36
  productFiltersLayout: exports.ProductFiltersLayoutSchema.nullish(),
37
37
  productFiltersPro: zod_1.z.boolean().nullish(),
38
38
  productRoute: zod_1.z.string().nullish(),
39
+ recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
39
40
  robotsAllow: zod_1.z.boolean().nullish(),
40
41
  sidebarGallery: SidebarGalleryConfigSchema().nullish(),
41
42
  storefront: zod_1.z.array(GraphCommerceStorefrontConfigSchema()),
@@ -76,6 +77,13 @@ function MagentoConfigurableVariantValuesSchema() {
76
77
  });
77
78
  }
78
79
  exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema;
80
+ function RecentlyViewedProductsConfigSchema() {
81
+ return zod_1.z.object({
82
+ enabled: zod_1.z.boolean().nullish(),
83
+ maxCount: zod_1.z.number().nullish()
84
+ });
85
+ }
86
+ exports.RecentlyViewedProductsConfigSchema = RecentlyViewedProductsConfigSchema;
79
87
  function SidebarGalleryConfigSchema() {
80
88
  return zod_1.z.object({
81
89
  paginationVariant: exports.SidebarGalleryPaginationVariantSchema.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": "7.1.0-canary.39",
5
+ "version": "7.1.0-canary.41",
6
6
  "type": "commonjs",
7
7
  "main": "dist/index.js",
8
8
  "types": "src/index.ts",
@@ -20,7 +20,7 @@
20
20
  "inspectpack": "^4.7.1",
21
21
  "js-yaml-loader": "^1.2.2",
22
22
  "lodash": "^4.17.21",
23
- "workbox-build": "^7.0.0",
23
+ "workbox-build": "*",
24
24
  "znv": "^0.4.0",
25
25
  "zod": "^3.22.4"
26
26
  },
@@ -24,10 +24,13 @@ export const demoConfig: PartialDeep<GraphCommerceConfig, { recurseIntoArrays: t
24
24
  productFiltersLayout: 'DEFAULT',
25
25
  compareVariant: 'ICON',
26
26
  robotsAllow: false,
27
+
27
28
  demoMode: true,
28
29
  limitSsg: true,
29
30
  compare: true,
30
31
  sidebarGallery: { paginationVariant: 'DOTS' },
31
32
  configurableVariantForSimple: true,
32
33
  configurableVariantValues: { url: true, content: true, gallery: true },
34
+
35
+ recentlyViewedProducts: { enabled: true, maxCount: 20 },
33
36
  }
@@ -277,6 +277,8 @@ export type GraphCommerceConfig = {
277
277
  * Example: '/product/'
278
278
  */
279
279
  productRoute?: InputMaybe<Scalars['String']['input']>;
280
+ /** Settings for recently viewed products */
281
+ recentlyViewedProducts?: InputMaybe<RecentlyViewedProductsConfig>;
280
282
  /**
281
283
  * Allow the site to be indexed by search engines.
282
284
  * If false, the robots.txt file will be set to disallow all.
@@ -384,6 +386,14 @@ export type ProductFiltersLayout =
384
386
  | 'DEFAULT'
385
387
  | 'SIDEBAR';
386
388
 
389
+ /** Settings for recently viewed products */
390
+ export type RecentlyViewedProductsConfig = {
391
+ /** Enable/disable recently viewed products */
392
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
393
+ /** Number of recently viewed products to be stored in localStorage */
394
+ maxCount?: InputMaybe<Scalars['Int']['input']>;
395
+ };
396
+
387
397
  /** SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component. */
388
398
  export type SidebarGalleryConfig = {
389
399
  /** Variant used for the pagination */
@@ -439,6 +449,7 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
439
449
  productFiltersLayout: ProductFiltersLayoutSchema.nullish(),
440
450
  productFiltersPro: z.boolean().nullish(),
441
451
  productRoute: z.string().nullish(),
452
+ recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
442
453
  robotsAllow: z.boolean().nullish(),
443
454
  sidebarGallery: SidebarGalleryConfigSchema().nullish(),
444
455
  storefront: z.array(GraphCommerceStorefrontConfigSchema()),
@@ -479,6 +490,13 @@ export function MagentoConfigurableVariantValuesSchema(): z.ZodObject<Properties
479
490
  })
480
491
  }
481
492
 
493
+ export function RecentlyViewedProductsConfigSchema(): z.ZodObject<Properties<RecentlyViewedProductsConfig>> {
494
+ return z.object({
495
+ enabled: z.boolean().nullish(),
496
+ maxCount: z.number().nullish()
497
+ })
498
+ }
499
+
482
500
  export function SidebarGalleryConfigSchema(): z.ZodObject<Properties<SidebarGalleryConfig>> {
483
501
  return z.object({
484
502
  paginationVariant: SidebarGalleryPaginationVariantSchema.nullish()