@gem-sdk/components 2.1.19 → 2.1.21

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.
Files changed (44) hide show
  1. package/dist/cjs/article/components/ArticleList.js +1 -1
  2. package/dist/cjs/banner/components/hero-banner/index.liquid.js +9 -7
  3. package/dist/cjs/banner/components/hero-banner/utils/index.js +5 -3
  4. package/dist/cjs/form/components/textarea/TextArea.liquid.js +2 -2
  5. package/dist/cjs/image/components/Image.js +0 -1
  6. package/dist/cjs/image/components/Image.liquid.js +0 -1
  7. package/dist/cjs/marquee/components/MarqueeBase.liquid.js +7 -26
  8. package/dist/cjs/post-purchase/product/components/ProductDiscountTag.js +5 -2
  9. package/dist/cjs/post-purchase/product/components/ProductOffer.js +16 -3
  10. package/dist/cjs/post-purchase/product/components/ProductPrice.js +3 -1
  11. package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
  12. package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +127 -0
  13. package/dist/cjs/post-purchase/product/hooks/useDynamicProduct.js +28 -0
  14. package/dist/cjs/post-purchase/product/settings/ProductOffer.js +26 -0
  15. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +12 -4
  16. package/dist/cjs/product/setting/ProductButton.js +1 -1
  17. package/dist/cjs/sticky/setting/preset-config.js +2 -2
  18. package/dist/cjs/third-party/components/NotifyBackInStockPreOrder.js +1 -1
  19. package/dist/cjs/third-party/components/ShopifySubscriptions.liquid.js +3 -2
  20. package/dist/cjs/third-party/setting/NotifyBackInStockPreOrder.js +2 -2
  21. package/dist/cjs/third-party/setting/ShopifySubscriptions.js +22 -0
  22. package/dist/esm/article/components/ArticleList.js +1 -1
  23. package/dist/esm/banner/components/hero-banner/index.liquid.js +9 -7
  24. package/dist/esm/banner/components/hero-banner/utils/index.js +5 -3
  25. package/dist/esm/form/components/textarea/TextArea.liquid.js +2 -2
  26. package/dist/esm/image/components/Image.js +0 -1
  27. package/dist/esm/image/components/Image.liquid.js +0 -1
  28. package/dist/esm/marquee/components/MarqueeBase.liquid.js +7 -26
  29. package/dist/esm/post-purchase/product/components/ProductDiscountTag.js +5 -2
  30. package/dist/esm/post-purchase/product/components/ProductOffer.js +16 -3
  31. package/dist/esm/post-purchase/product/components/ProductPrice.js +3 -1
  32. package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
  33. package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +125 -0
  34. package/dist/esm/post-purchase/product/hooks/useDynamicProduct.js +26 -0
  35. package/dist/esm/post-purchase/product/settings/ProductOffer.js +26 -0
  36. package/dist/esm/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +13 -5
  37. package/dist/esm/product/setting/ProductButton.js +1 -1
  38. package/dist/esm/sticky/setting/preset-config.js +2 -2
  39. package/dist/esm/third-party/components/NotifyBackInStockPreOrder.js +1 -1
  40. package/dist/esm/third-party/components/ShopifySubscriptions.liquid.js +3 -2
  41. package/dist/esm/third-party/setting/NotifyBackInStockPreOrder.js +2 -2
  42. package/dist/esm/third-party/setting/ShopifySubscriptions.js +22 -0
  43. package/dist/types/index.d.ts +4 -0
  44. package/package.json +2 -2
@@ -1,8 +1,9 @@
1
1
  import { template, makeStyleResponsive } from '@gem-sdk/core';
2
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
3
 
3
4
  const ShopifySubscriptions = ({ setting, advanced })=>{
4
- const { align } = setting ?? {};
5
- return template`
5
+ const { align, widgetType, appBlockId } = setting ?? {};
6
+ return widgetType === 'app-block' ? getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`) : template`
6
7
  <div
7
8
  class="${advanced?.cssClass}"
8
9
  style="${{
@@ -3,7 +3,7 @@ import { AppConfig } from '../components/NotifyBackInStockPreOrder.js';
3
3
  const config = {
4
4
  tag: AppConfig.tag,
5
5
  label: AppConfig.label,
6
- icon: '<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/9216cd5dd17ab1a38de2641bae109159/icon/CNWHjbfSt4MDEAE=.png">',
6
+ icon: `<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`,
7
7
  editorConfigs: {
8
8
  placeholder: {
9
9
  flowTag: [
@@ -23,7 +23,7 @@ const config = {
23
23
  hideTextContent: true,
24
24
  icon: {
25
25
  desktop: `<div class="w-full flex flex-col items-center">
26
- <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/9216cd5dd17ab1a38de2641bae109159/icon/CNWHjbfSt4MDEAE=.png">
26
+ <img class="w-24 border border-dark-200 rounded-medium" src="${AppConfig.logoUrl}">
27
27
  <span class="preset-item-title">Notify! Back in Stock|PreOrder</span>
28
28
  </div>`
29
29
  },
@@ -38,6 +38,11 @@ const config = {
38
38
  {
39
39
  id: 'setting',
40
40
  controls: [
41
+ {
42
+ id: 'appBlockId',
43
+ type: 'input',
44
+ default: ''
45
+ },
41
46
  {
42
47
  id: 'install',
43
48
  type: 'open-link',
@@ -54,6 +59,23 @@ const config = {
54
59
  href: 'https://admin.shopify.com/?redirect=/apps/subscriptions-remix',
55
60
  appName: AppConfig.label
56
61
  },
62
+ {
63
+ id: 'widgetType',
64
+ label: 'Choose widget',
65
+ type: 'select',
66
+ default: 'app-block',
67
+ options: [
68
+ {
69
+ label: 'app block',
70
+ value: 'app-block'
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ id: 'productHandle',
76
+ type: 'product-handle',
77
+ hide: true
78
+ },
57
79
  {
58
80
  id: 'align',
59
81
  label: 'Alignment',
@@ -2927,6 +2927,9 @@ type ShopifySubscriptionsProps = BaseProps<{
2927
2927
  align?: ObjectDevices<AlignProp>;
2928
2928
  openApp?: any;
2929
2929
  install?: any;
2930
+ appBlockId?: string;
2931
+ widgetType?: string;
2932
+ productHandle?: string;
2930
2933
  }>;
2931
2934
  declare const ShopifySubscriptions$1: React.FC<ShopifySubscriptionsProps>;
2932
2935
 
@@ -4586,6 +4589,7 @@ type ProductOfferSettings = Omit<ProductSetting, 'productSetting'> & {
4586
4589
  productIds?: string[];
4587
4590
  };
4588
4591
  productOfferLayout: ObjectDevices<'1col' | '2col'>;
4592
+ dynamicOfferQuantity?: number;
4589
4593
  discountAndShippingFee?: boolean;
4590
4594
  };
4591
4595
  type ProductOfferStyles = RowProps$1['styles'] & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.19",
3
+ "version": "2.1.21",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -21,7 +21,7 @@
21
21
  "format": "prettier --write \"./src/**/*.{ts,tsx}\""
22
22
  },
23
23
  "devDependencies": {
24
- "@gem-sdk/core": "2.1.18",
24
+ "@gem-sdk/core": "2.1.21",
25
25
  "@gem-sdk/styles": "2.1.0",
26
26
  "@types/react-transition-group": "^4.4.5"
27
27
  },