@gem-sdk/components 7.0.4 → 8.0.0-dev.20

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 (59) hide show
  1. package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
  2. package/dist/cjs/countdown-timer/common/helpers.js +1 -1
  3. package/dist/cjs/countdown-timer/hooks/useTimeLeft.js +1 -1
  4. package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
  5. package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
  6. package/dist/cjs/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
  7. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +10 -10
  8. package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
  9. package/dist/cjs/product/components/product-badge/utils/common.js +1 -1
  10. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
  11. package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
  12. package/dist/cjs/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
  13. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
  14. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  15. package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
  16. package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +41 -0
  17. package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +66 -0
  18. package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +25 -79
  19. package/dist/cjs/product/components/product-variants/common/base/styles.js +1 -1
  20. package/dist/cjs/product/components/product-variants/common/const.js +1 -0
  21. package/dist/cjs/product/components/product-variants/components/color/color.liquid.js +3 -3
  22. package/dist/cjs/product/components/product-view-more/ProductViewMore.liquid.js +1 -1
  23. package/dist/cjs/product/components/product-view-more/common/helpers.js +1 -1
  24. package/dist/cjs/product/components/product-wrap/Product.liquid.js +12 -10
  25. package/dist/cjs/product/helpers/product-bundle.js +1 -1
  26. package/dist/cjs/third-party/components/Trustoo.liquid.js +6 -5
  27. package/dist/cjs/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
  28. package/dist/cjs/third-party/settings/Trustoo/index.js +1 -1
  29. package/dist/cjs/third-party/settings/Trustoo/uiV2.js +1 -1
  30. package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
  31. package/dist/esm/countdown-timer/common/helpers.js +1 -1
  32. package/dist/esm/countdown-timer/hooks/useTimeLeft.js +1 -1
  33. package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
  34. package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
  35. package/dist/esm/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
  36. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +21 -21
  37. package/dist/esm/product/components/product-badge/common/styles.js +1 -1
  38. package/dist/esm/product/components/product-badge/utils/common.js +1 -1
  39. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
  40. package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
  41. package/dist/esm/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
  42. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +18 -18
  43. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  44. package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
  45. package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +41 -0
  46. package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +66 -0
  47. package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +40 -94
  48. package/dist/esm/product/components/product-variants/common/base/styles.js +1 -1
  49. package/dist/esm/product/components/product-variants/common/const.js +1 -0
  50. package/dist/esm/product/components/product-variants/components/color/color.liquid.js +3 -3
  51. package/dist/esm/product/components/product-view-more/ProductViewMore.liquid.js +1 -1
  52. package/dist/esm/product/components/product-view-more/common/helpers.js +1 -1
  53. package/dist/esm/product/components/product-wrap/Product.liquid.js +33 -31
  54. package/dist/esm/product/helpers/product-bundle.js +1 -1
  55. package/dist/esm/third-party/components/Trustoo.liquid.js +8 -7
  56. package/dist/esm/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
  57. package/dist/esm/third-party/settings/Trustoo/index.js +1 -1
  58. package/dist/esm/third-party/settings/Trustoo/uiV2.js +1 -1
  59. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import{template as o}from"@gem-sdk/core";import l from"../base/base.liquid.js";import{optionRoundedColorDefault as r}from"../../utils/mappingVariantStyles.js";let ColorVariant=({isVariantOutStock:i,swatchValue:s,...n})=>o`
1
+ import{template as o}from"@gem-sdk/core";import r from"../base/base.liquid.js";import{optionRoundedColorDefault as l}from"../../utils/mappingVariantStyles.js";import{OPTION_VALUES_DELIMITER as i}from"../../common/const.js";let ColorVariant=({isVariantOutStock:s,swatchValue:n,...t})=>o`
2
2
  {% assign colorsString = null %}
3
3
  {% assign colors = null %}
4
4
  {% for label in labels %}
@@ -7,7 +7,7 @@ import{template as o}from"@gem-sdk/core";import l from"../base/base.liquid.js";i
7
7
  {% endif %}
8
8
  {% endfor %}
9
9
  {% if colorsString != null %}
10
- {% assign colors = colorsString | split: '($7)' %}
10
+ {% assign colors = colorsString | split: '${i}' %}
11
11
  {% endif %}
12
- ${l({...n,typeOfOption:"color",optionRounded:r})}
12
+ ${r({...t,typeOfOption:"color",optionRounded:l})}
13
13
  `;export{ColorVariant as default};
@@ -1,6 +1,6 @@
1
1
  import{If as e}from"@gem-sdk/system";import{getButtonStyle as r}from"./common/styles.js";import{getSettingPreloadData as s}from"../../../helpers.js";import o from"../../../button/components/Button.liquid.js";import{template as t,isLocalEnv as m,baseAssetURL as p}from"@gem-sdk/core";import{getButtonSettings as i,getButtonLiquidSettings as d}from"./common/helpers.js";let ProductViewMore=({style:c,styles:l,setting:a,advanced:u,builderProps:f,builderAttrs:n,pageContext:v})=>t`
2
2
  <gp-product-view-more>
3
- ${o({styles:l,advanced:u,builderProps:f,builderAttrs:n,setting:{...i(a),...d(a)},style:{...r(c,l)},pageContext:v,className:"btn-view-more"})}
3
+ ${o({styles:l,advanced:u,builderProps:f,builderAttrs:n,setting:{...i(a),...d(a,v)},style:{...r(c,l)},pageContext:v,className:"btn-view-more"})}
4
4
  ${e(m,`<script ${s('class="gps-link" delay',"src")}="{{ 'gp-product-view-more-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${s('class="gps-link" delay',"src")}="${p}/assets-v2/gp-product-view-more-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
5
5
  </gp-product-view-more>
6
6
  `;export{ProductViewMore as default};
@@ -1 +1 @@
1
- let getButtonSettings=t=>{let{label:e,iconSvg:n,iconAlign:i,iconVisible:u,shouldClearSpace:g,enableHoverEffect:l}=t??{};return{label:e,iconSvg:n,iconAlign:i,iconVisible:u,shouldClearSpace:g,htmlType:"submit",enableHoverEffect:l}},getButtonLiquidSettings=t=>{let{translate:e,redirectNewTab:n}=t??{};return{translate:e,btnLink:{link:"{{ product.url }}",target:n?"_blank":"_self"},enableBtnLink:!0}};export{getButtonLiquidSettings,getButtonSettings};
1
+ let getButtonSettings=t=>{let{label:e,iconSvg:n,iconAlign:l,iconVisible:i,shouldClearSpace:u,enableHoverEffect:o}=t??{};return{label:e,iconSvg:n,iconAlign:l,iconVisible:i,shouldClearSpace:u,htmlType:"submit",enableHoverEffect:o}},getButtonLiquidSettings=(t,e)=>{let{translate:n,redirectNewTab:l}=t??{},i=e?.hasCollectionHandle?"{% if collection %}{{ collection.url }}{{ product.url }}{% else %}{{ product.url }}{% endif %}":"{{ product.url }}";return{translate:n,btnLink:{link:i,target:l?"_blank":"_self"},enableBtnLink:!0}};export{getButtonLiquidSettings,getButtonSettings};
@@ -1,14 +1,14 @@
1
- import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import o from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as a,If as d}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as p,STATIC_PRODUCT_STATUS as l,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let Product=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:I}=g??{},{rowSetting:S,rowStyles:b,formatVariantId:j,formatProductId:h,productStatus:q,preSelectedOptionIds:V,productHandle:P,advancedStyle:k}=c(f),w=()=>t`
1
+ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as o}from"@gem-sdk/core";import r from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as a,If as n,Liquid as d,LiquidFor as s}from"@gem-sdk/system";import{getSettingPreloadData as c,getStaticLocale as p}from"../../../helpers.js";import{getData as l,DYNAMIC_PRODUCT_STATUS as u,STATIC_PRODUCT_STATUS as f,PRODUCT_ID_LATEST as m}from"./common/helpers.js";let Product=g=>{let{children:_,setting:v,style:y,builderProps:$,rawChildren:b,advanced:I}=g,{isSyncProduct:S}=v??{},{rowSetting:j,rowStyles:h,formatVariantId:q,formatProductId:V,productStatus:P,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=l(g),x=()=>t`
2
2
  {%- liquid
3
3
  if request.page_type == 'product'
4
- if '${q}' == '${l}'
5
- if '${h}' == '${u}'
4
+ if '${P}' == '${f}'
5
+ if '${V}' == '${m}'
6
6
  paginate collections.all.products by 100000
7
7
  assign product = collections.all.products | sort: 'created_at' | reverse | first
8
8
  endpaginate
9
9
  else
10
- assign product = all_products['${P}']
11
- assign productId = '${h}' | times: 1
10
+ assign product = all_products['${w}']
11
+ assign productId = '${V}' | times: 1
12
12
  if product == empty or product == null
13
13
  paginate collections.all.products by 100000
14
14
  for item in collections.all.products
@@ -21,13 +21,13 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
21
21
  endif
22
22
  endif
23
23
  else
24
- if '${h}' == '${u}'
24
+ if '${V}' == '${m}'
25
25
  paginate collections.all.products by 100000
26
26
  assign product = collections.all.products | sort: 'created_at'| reverse | first
27
27
  endpaginate
28
28
  else
29
- assign product = all_products['${P}']
30
- assign productId = '${h}' | times: 1
29
+ assign product = all_products['${w}']
30
+ assign productId = '${V}' | times: 1
31
31
  if product == empty or product == null
32
32
  paginate collections.all.products by 100000
33
33
  for item in collections.all.products
@@ -40,11 +40,11 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
40
40
  endif
41
41
  endif
42
42
  -%}
43
- `,E=()=>t`
43
+ `,A=()=>t`
44
44
  {%- liquid
45
45
  if request.page_type != 'product'
46
- assign product = all_products['${P}']
47
- assign productId = '${h}' | times: 1
46
+ assign product = all_products['${w}']
47
+ assign productId = '${V}' | times: 1
48
48
  if product == empty or product == null
49
49
  paginate collections.all.products by 100000
50
50
  for item in collections.all.products
@@ -56,30 +56,32 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
56
56
  endif
57
57
  endif
58
58
  -%}
59
- `,x=()=>t`
59
+ `,B=()=>t`
60
60
  {%- assign gpBkProduct = product -%}
61
- ${d(q==p,E(),w())}
62
- `,A=()=>t`
63
- {%- assign initVariantId = ${j} -%}
64
- {%- assign product_form_id = 'product-form-' | append: "${v?.uid}" -%}
65
- ${j?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
66
- ${j?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
61
+ ${n(P==u,A(),x())}
62
+ `,G=()=>t`
63
+ ${d("{%- assign total_combinations = 1 -%}")}
64
+ ${s("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
65
+ {%- assign initVariantId = ${q} -%}
66
+ {%- assign product_form_id = 'product-form-' | append: "${$?.uid}" -%}
67
+ ${q?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
68
+ ${q?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
67
69
  {%-if productSelectedVariant == empty or productSelectedVariant == null -%}
68
70
  {%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
69
71
  {%- endif -%}
70
72
  {%-if variant == empty or variant == null -%}
71
73
  {%- assign variant = product.selected_or_first_available_variant -%}
72
74
  {%- endif -%}
73
- `,B=()=>t`
74
- <div class="gp-text-center">${s("Product","product_not_found")}</div>
75
- `,G=()=>t`
76
- ${A()}
75
+ `,H=()=>t`
76
+ <div class="gp-text-center">${p("Product","product_not_found")}</div>
77
+ `,O=()=>t`
78
+ ${G()}
77
79
  <gp-product
78
- data-uid="${v?.uid}"
79
- data-id="${v?.uid}"
80
- style="${k}"
81
- class="${$?.cssClass}"
82
- gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${V}], "isSyncProduct": "${I}", "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
80
+ data-uid="${$?.uid}"
81
+ data-id="${$?.uid}"
82
+ style="${E}"
83
+ class="${I?.cssClass}"
84
+ gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
83
85
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }}}'
84
86
  >
85
87
  <product-form class="product-form">
@@ -87,13 +89,13 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
87
89
  <input type="hidden" name="id" value="{{ variant.id }}" />
88
90
  <input type="hidden" name="quantity" value="{{ quantity }}" />
89
91
  <button type="submit" onclick="return false;" style="display:none;"></button>
90
- ${o({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:b,setting:S,children:m,rawChildren:_})}
92
+ ${r({builderProps:{...$,uid:$?.uid,uidInteraction:`${$?.uid}-row`},style:y,styles:h,setting:j,children:_,rawChildren:b})}
91
93
  {%- endform -%}
92
94
  </product-form>
93
95
  </gp-product>
94
96
  {%- assign product = gpBkProduct -%}
95
97
  `;return t`
96
- ${x()}
97
- ${a("product != empty and product != null",G(),B())}
98
- ${e(i,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
98
+ ${B()}
99
+ ${a("product != empty and product != null",O(),H())}
100
+ ${e(i,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
99
101
  `};export{Product as default};
@@ -1 +1 @@
1
- import{formatMoney as t}from"@gem-sdk/core";import{DiscountType as e}from"../components/constants/product-bundle.js";let noDiscount=e=>({discountPercentAmount:0,discountAmount:t("0",e)}),applyBundleDiscountAmount=n=>{let{currentVariant:o,bundleItem:u,options:c}=n;if(!c?.useProductCompareAtPrice&&u?.discountType===e.NoDiscount||!u||!o?.price)return noDiscount(c?.moneyFormat||"${{amount}}");let r=Number(o?.price),i=Number(o?.salePrice)||r,a=Number(u?.quantity),m=calculateBundleFixedDiscount(r,u),s=discountPercentAmount(m,a*r),d=r*a-m,l=i*a;return i<=r&&m<=0?noDiscount(c?.moneyFormat||"${{amount}}"):{discountPercentAmount:c?.useProductCompareAtPrice?calculateDiffPercentPrice(d,l):s,discountAmount:c?.useProductCompareAtPrice?calculateDiffFixedPrice(d,l,c?.moneyFormat):t(m.toString(),c?.moneyFormat)}},calculateDiffPercentPrice=(t,e)=>{let n=(e-t)/e*100;return Math.round(n)},calculateDiffFixedPrice=(e,n,o)=>t((n-e).toString(),o),calculateBundleFixedDiscount=(t,n)=>{let o=parseInt(n?.discountValue);return n?.discountType===e.Percentage?t*n.quantity*o/100:n?.discountType===e.FixedAmount?o:0},discountPercentAmount=(t,e)=>Math.round(t/e*100);export{applyBundleDiscountAmount};
1
+ import{convertDecimalToNumber as t,formatMoney as e}from"@gem-sdk/core";import{DiscountType as n}from"../components/constants/product-bundle.js";let noDiscount=t=>({discountPercentAmount:0,discountAmount:e("0",t)}),applyBundleDiscountAmount=o=>{let{currentVariant:u,bundleItem:c,options:r}=o;if(!r?.useProductCompareAtPrice&&c?.discountType===n.NoDiscount||!c||!u?.price)return noDiscount(r?.moneyFormat||"${{amount}}");let i=t(u?.price)??0,a=t(u?.salePrice)??i,m=Number(c?.quantity),s=calculateBundleFixedDiscount(i,c),d=discountPercentAmount(s,m*i),l=i*m-s,p=a*m;return a<=i&&s<=0?noDiscount(r?.moneyFormat||"${{amount}}"):{discountPercentAmount:r?.useProductCompareAtPrice?calculateDiffPercentPrice(l,p):d,discountAmount:r?.useProductCompareAtPrice?calculateDiffFixedPrice(l,p,r?.moneyFormat):e(s.toString(),r?.moneyFormat)}},calculateDiffPercentPrice=(t,e)=>{let n=(e-t)/e*100;return Math.round(n)},calculateDiffFixedPrice=(t,n,o)=>e((n-t).toString(),o),calculateBundleFixedDiscount=(t,e)=>{let o=parseInt(e?.discountValue);return e?.discountType===n.Percentage?t*e.quantity*o/100:e?.discountType===n.FixedAmount?o:0},discountPercentAmount=(t,e)=>Math.round(t/e*100);export{applyBundleDiscountAmount};
@@ -1,9 +1,10 @@
1
- import{template as s,makeStyleResponsive as t}from"@gem-sdk/core";import{getSettingPreloadData as e}from"../../helpers.js";import{getLiquidForAppBlock as i}from"../common/helpers.js";let Trustoo=({setting:a,advanced:d})=>{let{widgetType:r,align:o,version:l,appBlockId:c}=a??{},p={"review-widget":`
1
+ import{template as t,makeStyleResponsive as s}from"@gem-sdk/core";import{getSettingPreloadData as e}from"../../helpers.js";import{getLiquidForAppBlock as i}from"../common/helpers.js";let Trustoo=({setting:d,advanced:a})=>{let{widgetType:r,align:o,version:c,appBlockId:l}=d??{},p=d?.productSetting?.productId?.replace("gid://shopify/Product/","")??"{{product.id}}",n=d?.productSetting?.productTitle??"{{product.title}}",u=d?.productSetting?.productImage??"{{product.images[0]}}",g={"review-widget":`
2
2
  {% if request.page_type == "product" %}
3
3
  <div style="display:block" id="seal-review-widget"></div>
4
4
  {% else %}
5
- <div style="display:block" class="custom-vstar-review-widget" data-product-id="{{ product.id }}" data-product-title="{{ product.title }}" data-product-image="{{ product.images[0] }}"></div> {% endif %}
6
- `,"star-rating-widget":'<div class="custom-vstar-rating-widget" data-product-id="{{product.id}}"></div>',"text-carousel":'<div id="trustoo-text-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"barrage-carousel":'<div id="trustoo-barrage-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"card-carousel":'<div id="trustoo-card-carousel-widget" style="display:block;max-width:1200px;margin:0 auto"></div>',"photo-carousel":'<div id="trustoo-photo-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>'},n=()=>"v2"===l?i(c,o,d?.cssClass):s`
5
+ <div style="display:block" class="custom-vstar-review-widget" data-product-id="${p}" data-product-title="${n}" data-product-image="${u}"></div>
6
+ {% endif %}
7
+ `,"star-rating-widget":'<div class="custom-vstar-rating-widget" data-product-id="{{product.id}}"></div>',"text-carousel":'<div id="trustoo-text-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"barrage-carousel":'<div id="trustoo-barrage-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"card-carousel":'<div id="trustoo-card-carousel-widget" style="display:block;max-width:1200px;margin:0 auto"></div>',"photo-carousel":'<div id="trustoo-photo-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>'},v=()=>"v2"===c?i(l,o,a?.cssClass):t`
7
8
  <div>
8
9
  {% if '${r}' == 'starRatingInList' %}
9
10
  {% if request.page_type != 'product' %}
@@ -26,12 +27,12 @@ import{template as s,makeStyleResponsive as t}from"@gem-sdk/core";import{getSett
26
27
  {% endcase %}
27
28
  {% endif %}
28
29
  </div>
29
- `;return l?n():s`
30
+ `;return c?v():t`
30
31
  <div
31
- class="${d?.cssClass}"
32
- style="${{...t("ta",o)}}"
32
+ class="${a?.cssClass}"
33
+ style="${{...s("ta",o)}}"
33
34
  >
34
- ${r&&p?.[r]}
35
+ ${r&&g?.[r]}
35
36
  <script ${e('class="gps-link" delay',"src")}="https://cdn.vstar.app/static/dist/js/swiper-reviews.min.js" defer="defer"></script>
36
37
  <link ${e('class="gps-link" delay',"href")}="https://cdn.vstar.app/static/css/swiper-reviews.min.css" rel="stylesheet" type="text/css" media="all">
37
38
  </div>
@@ -1,4 +1,4 @@
1
1
  import e from"../../configs/BonLoyaltyRewardsReferrals.js";import l from"./uiV1.js";import a from"./uiV2.js";import{get3rdPartyInstallLink as t}from"../../common/helpers.js";let config={tag:e.tag,label:e.label,icon:'<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/f367f56199c88dba9296f532dfc5b383/icon/CLS4vPSugoUDEAE=.jpeg?width=22&height=22">',editorConfigs:{component:{isThirdParty:!0}},presets:[{id:e.id,name:{en:e.label},hideTextContent:!0,icon:{desktop:`<div class="w-full flex flex-col items-center">
2
2
  <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/f367f56199c88dba9296f532dfc5b383/icon/CLS4vPSugoUDEAE=.jpeg?width=22&height=22">
3
3
  <span class="preset-item-title">BON: Loyalty Rewards Referrals</span>
4
- </div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Loyalty Page Block",value:"loyalty-page-block"},{label:"Loyalty Page Earning Block",value:"loyalty-page-earning-block"},{label:"Loyalty Page Header Block",value:"loyalty-page-header-block"},{label:"Loyalty Page Profile Block",value:"loyalty-page-profile-block"},{label:"Loyalty Page Redeem Block",value:"loyalty-page-redeem-block"},{label:"Loyalty Page Referral Block",value:"loyalty-page-referral-block"},{label:"Loyalty Page Tier Block",value:"loyalty-page-tier-block"},{label:"Product Point Review",value:"product-point-preview"},{label:"Point On Product Page",value:"product-point-preview"}],default:"loyalty-page-block"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:t({handle:"bon-loyalty-rewards-referrals"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bon-loyalty",appName:e.label},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:l,uiV2:a};export{config as default};
4
+ </div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Loyalty Page Block",value:"loyalty-page-block"},{label:"Loyalty Page Earning Block",value:"loyalty-page-earning-block"},{label:"Loyalty Page Header Block",value:"loyalty-page-header-block"},{label:"Loyalty Page Profile Block",value:"loyalty-page-profile-block"},{label:"Loyalty Page Redeem Block",value:"loyalty-page-redeem-block"},{label:"Loyalty Page Referral Block",value:"loyalty-page-referral-block"},{label:"Loyalty Page Tier Block",value:"loyalty-page-tier-block"},{label:"Product Point Review",value:"product-point-preview"},{label:"Point On Product Page",value:"product-point-preview"},{label:"Ways to redeem points",value:"bloy-loyalty-ways-redeem"}],default:"loyalty-page-block"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:t({handle:"bon-loyalty-rewards-referrals"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bon-loyalty",appName:e.label},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:l,uiV2:a};export{config as default};
@@ -3,4 +3,4 @@ import e from"../../configs/Trustoo.js";import t from"./uiV1.js";import l from".
3
3
  <img class="w-24 border border-dark-200 rounded-medium" src="${e.logoUrl}?width=22&height=22">
4
4
  <span class="preset-item-title">${e.label}</span>
5
5
  </div>
6
- `},components:[{tag:e.tag,advanced:{editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n\n.{{rootClassName}} #seal-star-rating-widget {\n margin-top: 0px;\n}"}}}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:a({handle:"trustoo-reviews"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/sealapps-product-review",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"star-rating-widget",disableDefault:!0,options:[{label:"Testimonials",value:"barrage-carousel"},{label:"Card Carousel",value:"card-carousel"},{label:"Photo Carousel",value:"photo-carousel"},{label:"Review Widget",value:"review-widget"},{label:"Star Rating Widget",value:"star-rating-widget"},{label:"Text Carousel",value:"text-carousel"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:t,uiV2:l};export{config as default};
6
+ `},components:[{tag:e.tag,advanced:{editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n\n.{{rootClassName}} #seal-star-rating-widget {\n margin-top: 0px;\n}"}}}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:a({handle:"trustoo-reviews"}),appName:e.label},{id:"productSetting",type:"product",label:"Select Product",isMultiple:!1},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/sealapps-product-review",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"star-rating-widget",disableDefault:!0,options:[{label:"Testimonials",value:"barrage-carousel"},{label:"Card Carousel",value:"card-carousel"},{label:"Photo Carousel",value:"photo-carousel"},{label:"Review Widget",value:"review-widget"},{label:"Star Rating Widget",value:"star-rating-widget"},{label:"Text Carousel",value:"text-carousel"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:t,uiV2:l};export{config as default};
@@ -1 +1 @@
1
- let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
1
+ let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{conditionDisplay:'widgetType == "review-widget"',setting:{id:"productSetting"},label:{en:"Product source"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "7.0.4",
3
+ "version": "8.0.0-dev.20",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,9 +26,9 @@
26
26
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "7.0.0",
30
- "@gem-sdk/styles": "7.0.0",
31
- "@gem-sdk/system": "7.0.0",
29
+ "@gem-sdk/core": "8.0.0-dev.19",
30
+ "@gem-sdk/styles": "7.0.1-dev.6",
31
+ "@gem-sdk/system": "7.0.1-dev.6",
32
32
  "@types/react-transition-group": "^4.4.12",
33
33
  "tsup": "^8.5.0",
34
34
  "postcss-import": "^16.1.1",