@gem-sdk/pages 1.53.8 → 1.54.0

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.
@@ -36,6 +36,7 @@ const Toolbox = ()=>{
36
36
  const changeCreateThemeSectionCount = core.useShopStore((s)=>s.changeCreateThemeSectionCount);
37
37
  const changeShopPlan = core.useShopStore((s)=>s.changeShopPlan);
38
38
  const clearModal = core.useModalStore((s)=>s.clearModal);
39
+ const changeLimitCreateThemeSection = core.useShopStore((s)=>s.changeLimitCreateThemeSection);
39
40
  const fonts = react.useMemo(()=>genFonts.getFontsFromDataBuilder(state), [
40
41
  state
41
42
  ]);
@@ -329,6 +330,13 @@ const Toolbox = ()=>{
329
330
  }, [
330
331
  setSalePageProductId
331
332
  ]);
333
+ const onLimitCreateThemeSection = react.useCallback((e)=>{
334
+ const data = e.detail;
335
+ if (!data) return;
336
+ changeLimitCreateThemeSection(data);
337
+ }, [
338
+ changeLimitCreateThemeSection
339
+ ]);
332
340
  react.useEffect(()=>{
333
341
  if (fonts) {
334
342
  setFontsToHead('google-font-element', fonts);
@@ -356,6 +364,7 @@ const Toolbox = ()=>{
356
364
  window.addEventListener('update-item-attribute', onUpdateItemAttribute);
357
365
  window.addEventListener('set-product-offer', onUpdateProductOffers);
358
366
  window.addEventListener('update-sale-page-product-id', onUpdateSalePageProductId);
367
+ window.addEventListener('limit-create-theme-section', onLimitCreateThemeSection);
359
368
  return ()=>{
360
369
  window.removeEventListener('update-shop-info', onChangeShopInfo);
361
370
  window.removeEventListener('revalidate-query', onRevalidateQuery);
@@ -375,6 +384,7 @@ const Toolbox = ()=>{
375
384
  window.removeEventListener('update-item-attribute', onUpdateItemAttribute);
376
385
  window.removeEventListener('set-product-offer', onUpdateProductOffers);
377
386
  window.removeEventListener('update-sale-page-product-id', onUpdateSalePageProductId);
387
+ window.removeEventListener('limit-create-theme-section', onLimitCreateThemeSection);
378
388
  };
379
389
  }, [
380
390
  onAddEntity,
@@ -395,7 +405,8 @@ const Toolbox = ()=>{
395
405
  onUpdateItemName,
396
406
  onUpdateItemAttribute,
397
407
  onUpdateProductOffers,
398
- onUpdateSalePageProductId
408
+ onUpdateSalePageProductId,
409
+ onLimitCreateThemeSection
399
410
  ]);
400
411
  return /*#__PURE__*/ jsxRuntime.jsx("div", {
401
412
  className: "toolbox"
@@ -76,7 +76,7 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
76
76
  children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
77
77
  components: components,
78
78
  children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
79
- className: `${isPostPurchase ? 'gp-bg-white' : ''} `,
79
+ className: `${isPostPurchase ? 'gp-bg-white post-purchase-page' : ''} `,
80
80
  children: [
81
81
  isPostPurchase && /*#__PURE__*/ jsxRuntime.jsx(Header.default, {
82
82
  pageType: "POST_PURCHASE"
@@ -32,6 +32,7 @@ const Toolbox = ()=>{
32
32
  const changeCreateThemeSectionCount = useShopStore((s)=>s.changeCreateThemeSectionCount);
33
33
  const changeShopPlan = useShopStore((s)=>s.changeShopPlan);
34
34
  const clearModal = useModalStore((s)=>s.clearModal);
35
+ const changeLimitCreateThemeSection = useShopStore((s)=>s.changeLimitCreateThemeSection);
35
36
  const fonts = useMemo(()=>getFontsFromDataBuilder(state), [
36
37
  state
37
38
  ]);
@@ -325,6 +326,13 @@ const Toolbox = ()=>{
325
326
  }, [
326
327
  setSalePageProductId
327
328
  ]);
329
+ const onLimitCreateThemeSection = useCallback((e)=>{
330
+ const data = e.detail;
331
+ if (!data) return;
332
+ changeLimitCreateThemeSection(data);
333
+ }, [
334
+ changeLimitCreateThemeSection
335
+ ]);
328
336
  useEffect(()=>{
329
337
  if (fonts) {
330
338
  setFontsToHead('google-font-element', fonts);
@@ -352,6 +360,7 @@ const Toolbox = ()=>{
352
360
  window.addEventListener('update-item-attribute', onUpdateItemAttribute);
353
361
  window.addEventListener('set-product-offer', onUpdateProductOffers);
354
362
  window.addEventListener('update-sale-page-product-id', onUpdateSalePageProductId);
363
+ window.addEventListener('limit-create-theme-section', onLimitCreateThemeSection);
355
364
  return ()=>{
356
365
  window.removeEventListener('update-shop-info', onChangeShopInfo);
357
366
  window.removeEventListener('revalidate-query', onRevalidateQuery);
@@ -371,6 +380,7 @@ const Toolbox = ()=>{
371
380
  window.removeEventListener('update-item-attribute', onUpdateItemAttribute);
372
381
  window.removeEventListener('set-product-offer', onUpdateProductOffers);
373
382
  window.removeEventListener('update-sale-page-product-id', onUpdateSalePageProductId);
383
+ window.removeEventListener('limit-create-theme-section', onLimitCreateThemeSection);
374
384
  };
375
385
  }, [
376
386
  onAddEntity,
@@ -391,7 +401,8 @@ const Toolbox = ()=>{
391
401
  onUpdateItemName,
392
402
  onUpdateItemAttribute,
393
403
  onUpdateProductOffers,
394
- onUpdateSalePageProductId
404
+ onUpdateSalePageProductId,
405
+ onLimitCreateThemeSection
395
406
  ]);
396
407
  return /*#__PURE__*/ jsx("div", {
397
408
  className: "toolbox"
@@ -74,7 +74,7 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
74
74
  children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
75
75
  components: components,
76
76
  children: /*#__PURE__*/ jsxs("div", {
77
- className: `${isPostPurchase ? 'gp-bg-white' : ''} `,
77
+ className: `${isPostPurchase ? 'gp-bg-white post-purchase-page' : ''} `,
78
78
  children: [
79
79
  isPostPurchase && /*#__PURE__*/ jsx(Header, {
80
80
  pageType: "POST_PURCHASE"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "1.53.8",
3
+ "version": "1.54.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,10 +26,10 @@
26
26
  "next": "latest"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "1.53.1",
30
- "@gem-sdk/plugin-cookie-bar": "1.53.0",
31
- "@gem-sdk/plugin-quick-view": "1.53.0",
32
- "@gem-sdk/plugin-sticky-add-to-cart": "1.53.0"
29
+ "@gem-sdk/core": "1.54.0",
30
+ "@gem-sdk/plugin-cookie-bar": "1.54.0",
31
+ "@gem-sdk/plugin-quick-view": "1.54.0",
32
+ "@gem-sdk/plugin-sticky-add-to-cart": "1.54.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "next": ">=13"