@gem-sdk/components 10.0.2 → 11.2.1

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 (58) hide show
  1. package/dist/cjs/post-purchase/product/settings/product-description/configs/settings-v2.js +1 -1
  2. package/dist/cjs/post-purchase/product/settings/product-description/configs/ui-v2.js +1 -1
  3. package/dist/cjs/post-purchase/product/settings/product-title/configs/settings-v2.js +1 -1
  4. package/dist/cjs/post-purchase/product/settings/product-title/configs/ui-v2.js +1 -1
  5. package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +4 -4
  6. package/dist/cjs/product/components/product-bundle/setting/configs/settings.js +1 -1
  7. package/dist/cjs/product/components/product-button/AddToCartButton.liquid.js +1 -1
  8. package/dist/cjs/product/components/product-button/PriceComponent.liquid.js +1 -1
  9. package/dist/cjs/product/components/product-button/ProductButtonPrice.liquid.js +1 -1
  10. package/dist/cjs/product/components/product-button/SoldOutButton.liquid.js +1 -1
  11. package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +41 -0
  12. package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +66 -0
  13. package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +25 -77
  14. package/dist/cjs/product/components/product-variants/common/base/styles.js +1 -1
  15. package/dist/cjs/product/components/product-variants/common/const.js +1 -0
  16. package/dist/cjs/product/components/product-variants/common/dropdown/styles.js +1 -1
  17. package/dist/cjs/product/components/product-variants/components/color/color.liquid.js +3 -3
  18. package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.js +1 -1
  19. package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js +3 -3
  20. package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  21. package/dist/cjs/product/settings/product-variant/configs/presets.js +1 -1
  22. package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
  23. package/dist/cjs/product/settings/product-variant/swatches-style-config/color.js +1 -1
  24. package/dist/cjs/product/settings/product-variant/swatches-style-config/dropdown.js +1 -1
  25. package/dist/cjs/product/settings/product-variant/swatches-style-config/image-shopify.js +1 -1
  26. package/dist/cjs/product/settings/product-variant/swatches-style-config/image.js +1 -1
  27. package/dist/cjs/third-party/settings/BloyRewardsProgramLoyalty/index.js +1 -1
  28. package/dist/cjs/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
  29. package/dist/esm/post-purchase/product/settings/product-description/configs/settings-v2.js +1 -1
  30. package/dist/esm/post-purchase/product/settings/product-description/configs/ui-v2.js +1 -1
  31. package/dist/esm/post-purchase/product/settings/product-title/configs/settings-v2.js +1 -1
  32. package/dist/esm/post-purchase/product/settings/product-title/configs/ui-v2.js +1 -1
  33. package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +6 -6
  34. package/dist/esm/product/components/product-bundle/setting/configs/settings.js +1 -1
  35. package/dist/esm/product/components/product-button/AddToCartButton.liquid.js +1 -1
  36. package/dist/esm/product/components/product-button/PriceComponent.liquid.js +1 -1
  37. package/dist/esm/product/components/product-button/ProductButtonPrice.liquid.js +1 -1
  38. package/dist/esm/product/components/product-button/SoldOutButton.liquid.js +1 -1
  39. package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +41 -0
  40. package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +66 -0
  41. package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +28 -80
  42. package/dist/esm/product/components/product-variants/common/base/styles.js +1 -1
  43. package/dist/esm/product/components/product-variants/common/const.js +1 -0
  44. package/dist/esm/product/components/product-variants/common/dropdown/styles.js +1 -1
  45. package/dist/esm/product/components/product-variants/components/color/color.liquid.js +3 -3
  46. package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.js +1 -1
  47. package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js +5 -5
  48. package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  49. package/dist/esm/product/settings/product-variant/configs/presets.js +1 -1
  50. package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
  51. package/dist/esm/product/settings/product-variant/swatches-style-config/color.js +1 -1
  52. package/dist/esm/product/settings/product-variant/swatches-style-config/dropdown.js +1 -1
  53. package/dist/esm/product/settings/product-variant/swatches-style-config/image-shopify.js +1 -1
  54. package/dist/esm/product/settings/product-variant/swatches-style-config/image.js +1 -1
  55. package/dist/esm/third-party/settings/BloyRewardsProgramLoyalty/index.js +2 -2
  56. package/dist/esm/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
  57. package/dist/types/index.d.ts +1 -0
  58. package/package.json +4 -4
@@ -1 +1 @@
1
- "use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:{desktop:"0.6px"}}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-1"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},compoDefaultValue:{attrs:{color:"text-1"}},hiddenSetting:{},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF"},compoDefaultValue:{normal:"#FFFFFF",hover:"highlight",active:"highlight"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-1"},compoDefaultValue:{normal:"text-1"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},compoDefaultValue:{normal:{borderType:"style-2",border:"solid",color:"line-2"}}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"optionHasShadow",type:"toggle",default:{normal:!1}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",enable:!0,distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];exports.ProductVariantSettings=ProductVariantSettings;
1
+ "use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-1"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},compoDefaultValue:{attrs:{color:"text-2"}},hiddenSetting:{},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF"},compoDefaultValue:{normal:"#FFFFFF",hover:"highlight",active:"highlight"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},compoDefaultValue:{normal:{borderType:"style-2",border:"solid",color:"line-2"}}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"optionHasShadow",type:"toggle",default:{normal:!1}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",enable:!0,distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];exports.ProductVariantSettings=ProductVariantSettings;
@@ -1 +1 @@
1
- "use strict";const colorPresetConfig={color:{width:{desktop:"45px",tablet:"45px",mobile:"45px"},height:"45px",spacing:"8px",optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{btrr:"999999px",bblr:"999999px",bbrr:"999999px",btlr:"999999px",radiusType:"custom"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}}};exports.colorPresetConfig=colorPresetConfig;
1
+ "use strict";const colorPresetConfig={color:{width:{desktop:"45px"},height:"45px",spacing:"8px",optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{btrr:"999999px",bblr:"999999px",bbrr:"999999px",btlr:"999999px",radiusType:"custom"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}}};exports.colorPresetConfig=colorPresetConfig;
@@ -1 +1 @@
1
- "use strict";const dropdownPresetConfig={dropdown:{width:{desktop:"100%",tablet:"100%",mobile:"100%"},height:"45px",optionTextColor:{normal:"text-1"},optionBgColor:{normal:"#FFFFFF",hover:"#FFFFFF",active:"#FFFFFF"},optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}}};exports.dropdownPresetConfig=dropdownPresetConfig;
1
+ "use strict";const dropdownPresetConfig={dropdown:{width:{desktop:"100%"},height:"45px",optionTextColor:{normal:"text-1"},optionBgColor:{normal:"#FFFFFF",hover:"#FFFFFF",active:"#FFFFFF"},optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}}};exports.dropdownPresetConfig=dropdownPresetConfig;
@@ -1 +1 @@
1
- "use strict";const imageShopifyPresetConfig={image_shopify:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"8px",optionBgColor:{normal:"#FFFFFF",hover:"#FFFFFF",active:"#121212"},optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}}}};exports.imageShopifyPresetConfig=imageShopifyPresetConfig;
1
+ "use strict";const imageShopifyPresetConfig={image_shopify:{width:{desktop:"64px"},height:"64px",spacing:"8px",optionBgColor:{normal:"#FFFFFF",hover:"#FFFFFF",active:"#121212"},optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}}}};exports.imageShopifyPresetConfig=imageShopifyPresetConfig;
@@ -1 +1 @@
1
- "use strict";const imagePresetConfig={image:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"8px",optionBgColor:{normal:"#FFFFFF"},optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:45,enable:!1}}}};exports.imagePresetConfig=imagePresetConfig;
1
+ "use strict";const imagePresetConfig={image:{width:{desktop:"64px"},height:"64px",spacing:"8px",optionBgColor:{normal:"#FFFFFF"},optionBorder:{normal:{border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:45,enable:!1}}}};exports.imagePresetConfig=imagePresetConfig;
@@ -1,4 +1,4 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var BloyRewardsProgramLoyalty=require("../../configs/BloyRewardsProgramLoyalty.js"),uiV2=require("./uiV2.js"),helpers=require("../../common/helpers.js");const config={tag:BloyRewardsProgramLoyalty.default.tag,label:BloyRewardsProgramLoyalty.default.label,icon:'<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/eb1dd8939bb7b954d714a5344a78df08/icon/CITe8tmBxYoDEAE=.png?width=22&height=22">',editorConfigs:{component:{isThirdParty:!0}},presets:[{id:BloyRewardsProgramLoyalty.default.id,name:{en:BloyRewardsProgramLoyalty.default.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/eb1dd8939bb7b954d714a5344a78df08/icon/CITe8tmBxYoDEAE=.png?width=22&height=22">
3
3
  <span class="preset-item-title">BLOY Rewards Program & Loyalty</span>
4
- </div>`},components:[{tag:BloyRewardsProgramLoyalty.default.tag}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Bloy Loyalty Guide",value:"bloy-loyalty-guide"},{label:"Bloy Loyalty Points Program",value:"bloy-loyalty-points-program"},{label:"Bloy Loyalty Vip Program",value:"bloy-loyalty-vip-program"},{label:"Bloy Loyalty Ways Earn",value:"bloy-loyalty-ways-earn"},{label:"Point On Product Page",value:"product-point-preview"}],default:"bloy-loyalty-guide"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:helpers.get3rdPartyInstallLink({handle:"bloy-loyalty"}),appName:BloyRewardsProgramLoyalty.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bloy-loyalty",appName:BloyRewardsProgramLoyalty.default.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:[],uiV2:uiV2.default};exports.default=config;
4
+ </div>`},components:[{tag:BloyRewardsProgramLoyalty.default.tag}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Bloy Loyalty Guide",value:"bloy-loyalty-guide"},{label:"Bloy Loyalty Points Program",value:"bloy-loyalty-points-program"},{label:"Bloy Loyalty Vip Program",value:"bloy-loyalty-vip-program"},{label:"Bloy Loyalty Ways Earn",value:"bloy-loyalty-ways-earn"},{label:"Bloy Loyalty Ways Redeem",value:"bloy-loyalty-ways-redeem"},{label:"Point On Product Page",value:"bloy-point-caculator-pdp"}],default:"bloy-loyalty-guide"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:helpers.get3rdPartyInstallLink({handle:"bloy-loyalty"}),appName:BloyRewardsProgramLoyalty.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bloy-loyalty",appName:BloyRewardsProgramLoyalty.default.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:[],uiV2:uiV2.default};exports.default=config;
@@ -1,4 +1,4 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var BonLoyaltyRewardsReferrals=require("../../configs/BonLoyaltyRewardsReferrals.js"),uiV1=require("./uiV1.js"),uiV2=require("./uiV2.js"),helpers=require("../../common/helpers.js");const config={tag:BonLoyaltyRewardsReferrals.default.tag,label:BonLoyaltyRewardsReferrals.default.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:BonLoyaltyRewardsReferrals.default.id,name:{en:BonLoyaltyRewardsReferrals.default.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:BonLoyaltyRewardsReferrals.default.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:helpers.get3rdPartyInstallLink({handle:"bon-loyalty-rewards-referrals"}),appName:BonLoyaltyRewardsReferrals.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bon-loyalty",appName:BonLoyaltyRewardsReferrals.default.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:uiV1.default,uiV2:uiV2.default};exports.default=config;
4
+ </div>`},components:[{tag:BonLoyaltyRewardsReferrals.default.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:helpers.get3rdPartyInstallLink({handle:"bon-loyalty-rewards-referrals"}),appName:BonLoyaltyRewardsReferrals.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bon-loyalty",appName:BonLoyaltyRewardsReferrals.default.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:uiV1.default,uiV2:uiV2.default};exports.default=config;
@@ -1 +1 @@
1
- let settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}]}]},{id:"style",controls:[{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"}]}];export{settingV2};
1
+ let settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}]}]},{id:"style",controls:[{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{settingV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Text"},controls:[{type:"control",label:{en:""},setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:{en:"Text align"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Text"},controls:[{type:"control",label:{en:"Direction"},setting:{id:"direction"},controlChangeTrigger:{settings:[{action:{controlId:"textAlign",newValue:"right",groupType:"style",controlType:"style"},condition:"direction === 'rtl' && textAlign === 'left'",source:["direction","textAlign"]},{action:{controlId:"textAlign",newValue:"left",groupType:"style",controlType:"style"},condition:"direction === 'ltr' && textAlign === 'right'",source:["direction","textAlign"]}],options:{noRecordHistory:!0}}},{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:{en:"Text align"}}]}];export{SettingUIV2};
@@ -1 +1 @@
1
- let settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}]}]},{id:"style",controls:[{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"xlarge",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"}]}];export{settingV2};
1
+ let settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}]}]},{id:"style",controls:[{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"xlarge",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{settingV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Text"},controls:[{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:{en:"Text align"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Text"},controls:[{type:"control",label:{en:"Direction"},setting:{id:"direction"},controlChangeTrigger:{settings:[{action:{controlId:"textAlign",newValue:"right",groupType:"style",controlType:"style"},condition:"direction === 'rtl' && textAlign === 'left'",source:["direction","textAlign"]},{action:{controlId:"textAlign",newValue:"left",groupType:"style",controlType:"style"},condition:"direction === 'ltr' && textAlign === 'right'",source:["direction","textAlign"]}],options:{noRecordHistory:!0}}},{type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",setting:{id:"textAlign"},label:{en:"Text align"}}]}];export{SettingUIV2};
@@ -1,15 +1,15 @@
1
- import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as d}from"../../../helpers.js";import{createStyle as o,createClass as a,createStateOrContext as i,Liquid as p,LiquidIf as n}from"@gem-sdk/system";import{getSizeSettings as c,getContainerStyles as l}from"./common/styles.js";import{getContainerClasses as u}from"./common/classes.js";import m from"./ProductBundleDiscountChildrenItem.liquid.js";let ProductBundleDiscount=({rawChildren:f,setting:g,styles:I,advanced:$,style:P})=>{let S=g?.hasPreSelectItem?g?.selectItemDefault??0:-1,_=t=>S===t,h=(t,e)=>m({index:e,rawChildrenItem:f?.[e],setting:g,styles:I,isSelected:_(e),bundleItem:t}),y=o(c(I)?.gap),A=a(u(g,$?.cssClass)),B=o(l(y,I,P)),D=i({styles:I,settings:{useProductCompareAtPrice:g?.useProductCompareAtPrice,selectItemDefault:g?.selectItemDefault,hideNoDiscountItem:g?.hideNoDiscountItem,hasPreSelectItem:g?.hasPreSelectItem,iconItemColor:g?.iconItemColor}}),j=()=>e(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-bundle-discount-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-bundle-discount-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return t`
1
+ import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as d}from"../../../helpers.js";import{createStyle as o,createClass as a,createStateOrContext as i,Liquid as n,LiquidIf as p}from"@gem-sdk/system";import{getSizeSettings as l,getContainerStyles as u}from"./common/styles.js";import{getContainerClasses as c}from"./common/classes.js";import m from"./ProductBundleDiscountChildrenItem.liquid.js";let ProductBundleDiscount=({rawChildren:f,setting:g,styles:I,advanced:$,style:P})=>{let y=g?.hasPreSelectItem?g?.selectItemDefault??0:-1,B=t=>y===t,S=(t,e)=>m({index:e,rawChildrenItem:f?.[e],setting:g,styles:I,isSelected:B(e),bundleItem:t}),_=o(l(I)?.gap),h=a(c(g,$?.cssClass)),A=o(u(_,I,P)),D=i({styles:I,settings:{useProductCompareAtPrice:g?.useProductCompareAtPrice,selectItemDefault:g?.selectItemDefault,hideNoDiscountItem:g?.hideNoDiscountItem,hasPreSelectItem:g?.hasPreSelectItem,iconItemColor:g?.iconItemColor,applyToInBetweenQuantities:g?.applyToInBetweenQuantities}}),j=()=>e(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-bundle-discount-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-bundle-discount-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return t`
2
2
  <gp-product-bundle-discount
3
3
  gp-data='${JSON.stringify(D)}'
4
- style="${B}"
5
- class="${A}">
6
- ${p(`
4
+ style="${A}"
5
+ class="${h}">
6
+ ${n(`
7
7
  {%- assign gempages_product_bundle = product.metafields.gp_discount.gp_discount_selected_products -%}
8
8
  {% assign productBundleItem = gempages_product_bundle | split: '($1)' %}
9
9
  `)}
10
10
  ${f?.map((e,s)=>t`
11
11
  {% for productBundle in productBundleItem %}
12
- ${p(`
12
+ ${n(`
13
13
  {% assign attrs = productBundle | split: '($3)' %}
14
14
  {% assign parsedAttrs = '' %}
15
15
  {% for attr in attrs %}
@@ -22,7 +22,7 @@ import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-s
22
22
  {% endif %}
23
23
  {% endfor %}
24
24
  `)}
25
- ${n(`forloop.index0 == ${s}`,h("{{ parsedAttrs | strip }}",s))}
25
+ ${p(`forloop.index0 == ${s}`,S("{{ parsedAttrs | strip }}",s))}
26
26
  {% endfor %}
27
27
  `).join("")}
28
28
  </gp-product-bundle-discount>
@@ -1 +1 @@
1
- import{verticalOne as e}from"../../../../settings/bundle-layout/vertical-one.js";import{verticalTwo as t}from"../../../../settings/bundle-layout/vertical-two.js";import{verticalThree as l}from"../../../../settings/bundle-layout/vertical-three.js";import{horizontalThree as o}from"../../../../settings/bundle-layout/horizontal-three.js";import{horizontalTwo as a}from"../../../../settings/bundle-layout/horizontal-two.js";import{horizontalOne as i}from"../../../../settings/bundle-layout/horizontal-one.js";let ProductBundleDiscountSettings=[{id:"setting",controls:[{id:"enableDisplayCondition",type:"toggle",default:!0},{id:"childItem",label:"Item management",type:"product-bundle-child-item",default:[],childTemplate:{verticalOne:e,verticalTwo:t,verticalThree:l,horizontalOne:i,horizontalTwo:a,horizontalThree:o}},{id:"hideNoDiscountItem",default:!1,type:"select",options:[{label:"All bundle",value:!1},{label:"Hide all no-discount bundles",value:!0}]},{id:"bundleItems",type:"bundleItem",default:void 0},{id:"hasPreSelectItem",type:"toggle",default:!0},{id:"useProductCompareAtPrice",default:!1,type:"select",options:[{label:"Total product price",value:!1},{label:"Total product compare-at price",value:!0}]},{id:"selectItemDefault",type:"select-product-bundle",hide:!0,default:0},{id:"layout",label:"Layout",type:"layout-segment",iconViewBox:"0 0 120 80",enableItemBackground:!0,enableTooltip:!0,default:"vertical-layout",options:[{label:"Vertical layout",value:"vertical-layout",type:"product-bundle"},{label:"Horizontal layout",value:"horizontal-layout",type:"product-bundle"}]},{id:"enableIcon",type:"toggle",default:!0},{id:"iconPosition",label:"Layout",type:"option:illustration",default:"center",options:[{label:"Top",value:"baseline",svgName:"gp-bundle-horizontal-base-line-layout"},{label:"Center",value:"center",svgName:"gp-bundle-horizontal-center-layout"}]},{id:"iconHorizontalPosition",label:"Layout",type:"option:illustration",default:"center",options:[{label:"Left",value:"baseline",svgName:"gp-bundle-vertical-baseline-layout"},{label:"Center",value:"center",svgName:"gp-bundle-vertical-center-layout"}]},{id:"iconSize",type:"input:stepper",devices:{desktop:{default:24},tablet:{default:24},mobile:{default:24}},min:0},{id:"iconSpacing",type:"dropdown:input",hideUnit:!1,inputType:"number",default:"12px",displayOptions:[{label:"Small",value:"8px",showValue:!0},{label:"Medium",value:"16px",showValue:!0},{label:"Large",value:"24px",showValue:!0}]},{id:"iconItemColor",type:"color-picker-v2",label:"Icon",default:"line-2"}]},{id:"style",controls:[{id:"size",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"24px",left:"16px",bottom:"24px",right:"16px"},gap:"12px",width:"100%"}}},settingConfig:{width:{name:"Width",displayOptions:["full"]},padding:{name:"Padding",paddingConfig:{small:{vertical:"8px",horizontal:"8px"},medium:{vertical:"16px",horizontal:"16px"},large:{vertical:"24px",horizontal:"24px"}}}},hiddenSettings:["shape","height"],hiddenShowMore:!0},{id:"behavior-state",type:"behavior-state",controls:[{id:"borderBundle",type:"border",label:"Border",default:{normal:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-2",isCustom:!1},hover:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-2",isCustom:!1},active:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#FF614C",isCustom:!1}},state:{hover:!0,normal:!0,active:!0},compoDefaultValue:{hover:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!1}}},{id:"iconColor",type:"color-picker-v2",label:"Icon",default:{normal:"line-2",active:"#FF614C"},state:{hover:!0,normal:!0,active:!0},compoDefaultValue:{hover:"text-3"}},{id:"backgroundColor",type:"color-picker-v2",label:"Background",default:{normal:"#FFFFFF",active:"#FFF2F0"},state:{hover:!0,normal:!0,active:!0},compoDefaultValue:{hover:"bg-2"}},{id:"hasBoxShadowBundle",type:"toggle",label:"Enable Button Shadow"},{id:"boxShadowBundle",type:"shadow-v2",default:{},state:{normal:!0,hover:!0,active:!0}},{id:"roundedBundle",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0,active:!0}}]},{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"}],default:"left"},{id:"enableHoverEffect",type:"toggle",default:!0},{id:"enableActiveEffect",type:"toggle",default:!0}]}];export{ProductBundleDiscountSettings};
1
+ import{verticalOne as e}from"../../../../settings/bundle-layout/vertical-one.js";import{verticalTwo as t}from"../../../../settings/bundle-layout/vertical-two.js";import{verticalThree as l}from"../../../../settings/bundle-layout/vertical-three.js";import{horizontalThree as o}from"../../../../settings/bundle-layout/horizontal-three.js";import{horizontalTwo as a}from"../../../../settings/bundle-layout/horizontal-two.js";import{horizontalOne as i}from"../../../../settings/bundle-layout/horizontal-one.js";let ProductBundleDiscountSettings=[{id:"setting",controls:[{id:"enableDisplayCondition",type:"toggle",default:!0},{id:"childItem",label:"Item management",type:"product-bundle-child-item",default:[],childTemplate:{verticalOne:e,verticalTwo:t,verticalThree:l,horizontalOne:i,horizontalTwo:a,horizontalThree:o}},{id:"applyToInBetweenQuantities",type:"toggle",default:!1},{id:"hideNoDiscountItem",default:!1,type:"select",options:[{label:"All bundle",value:!1},{label:"Hide all no-discount bundles",value:!0}]},{id:"bundleItems",type:"bundleItem",default:void 0},{id:"hasPreSelectItem",type:"toggle",default:!0},{id:"useProductCompareAtPrice",default:!1,type:"select",options:[{label:"Total product price",value:!1},{label:"Total product compare-at price",value:!0}]},{id:"selectItemDefault",type:"select-product-bundle",hide:!0,default:0},{id:"layout",label:"Layout",type:"layout-segment",iconViewBox:"0 0 120 80",enableItemBackground:!0,enableTooltip:!0,default:"vertical-layout",options:[{label:"Vertical layout",value:"vertical-layout",type:"product-bundle"},{label:"Horizontal layout",value:"horizontal-layout",type:"product-bundle"}]},{id:"enableIcon",type:"toggle",default:!0},{id:"iconPosition",label:"Layout",type:"option:illustration",default:"center",options:[{label:"Top",value:"baseline",svgName:"gp-bundle-horizontal-base-line-layout"},{label:"Center",value:"center",svgName:"gp-bundle-horizontal-center-layout"}]},{id:"iconHorizontalPosition",label:"Layout",type:"option:illustration",default:"center",options:[{label:"Left",value:"baseline",svgName:"gp-bundle-vertical-baseline-layout"},{label:"Center",value:"center",svgName:"gp-bundle-vertical-center-layout"}]},{id:"iconSize",type:"input:stepper",devices:{desktop:{default:24},tablet:{default:24},mobile:{default:24}},min:0},{id:"iconSpacing",type:"dropdown:input",hideUnit:!1,inputType:"number",default:"12px",displayOptions:[{label:"Small",value:"8px",showValue:!0},{label:"Medium",value:"16px",showValue:!0},{label:"Large",value:"24px",showValue:!0}]},{id:"iconItemColor",type:"color-picker-v2",label:"Icon",default:"line-2"}]},{id:"style",controls:[{id:"size",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"24px",left:"16px",bottom:"24px",right:"16px"},gap:"12px",width:"100%"}}},settingConfig:{width:{name:"Width",displayOptions:["full"]},padding:{name:"Padding",paddingConfig:{small:{vertical:"8px",horizontal:"8px"},medium:{vertical:"16px",horizontal:"16px"},large:{vertical:"24px",horizontal:"24px"}}}},hiddenSettings:["shape","height"],hiddenShowMore:!0},{id:"behavior-state",type:"behavior-state",controls:[{id:"borderBundle",type:"border",label:"Border",default:{normal:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-2",isCustom:!1},hover:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-2",isCustom:!1},active:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#FF614C",isCustom:!1}},state:{hover:!0,normal:!0,active:!0},compoDefaultValue:{hover:{border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!1}}},{id:"iconColor",type:"color-picker-v2",label:"Icon",default:{normal:"line-2",active:"#FF614C"},state:{hover:!0,normal:!0,active:!0},compoDefaultValue:{hover:"text-3"}},{id:"backgroundColor",type:"color-picker-v2",label:"Background",default:{normal:"#FFFFFF",active:"#FFF2F0"},state:{hover:!0,normal:!0,active:!0},compoDefaultValue:{hover:"bg-2"}},{id:"hasBoxShadowBundle",type:"toggle",label:"Enable Button Shadow"},{id:"boxShadowBundle",type:"shadow-v2",default:{},state:{normal:!0,hover:!0,active:!0}},{id:"roundedBundle",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0,active:!0}}]},{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"}],default:"left"},{id:"enableHoverEffect",type:"toggle",default:!0},{id:"enableActiveEffect",type:"toggle",default:!0}]}];export{ProductBundleDiscountSettings};
@@ -1 +1 @@
1
- import{createClass as t}from"@gem-sdk/system";import{getAddToCartButtonData as s}from"./common/data.js";import{getAddToCartButtonClasses as e}from"./common/classes.js";import o from"./ProductButtonPrice.liquid.js";import r from"../../../button/components/Button.liquid.js";let AddToCartButton=a=>{let{pageContext:i,...d}=a,{styles:n,setting:m,advanced:l,builderProps:u,builderAttrs:p}=d,{buttonStyle:c,buttonStyles:b,getButtonSettings:f}=s(d),v=t(e({isLiquid:!0})),g=f({isLiquid:!0}),j=o({setting:m,styles:n});return r({style:c,advanced:l,nodePrice:j,styles:b,setting:g,className:v,wrapClassName:"{% unless variant.available %} !gp-hidden {% endunless %}",builderProps:u,builderAttrs:p,customAttrs:{name:"add","gp-data-hidden":"{% unless variant.available %}true{% endunless %}"},pageContext:i})};export{AddToCartButton};
1
+ import{createClass as t}from"@gem-sdk/system";import{getAddToCartButtonData as s}from"./common/data.js";import{getAddToCartButtonClasses as e}from"./common/classes.js";import o from"./ProductButtonPrice.liquid.js";import r from"../../../button/components/Button.liquid.js";let AddToCartButton=a=>{let{pageContext:i,...d}=a,{styles:n,setting:m,advanced:l,builderProps:u,builderAttrs:p}=d,{buttonStyle:c,buttonStyles:b,getButtonSettings:f}=s(d),v=t(e({isLiquid:!0})),g=f({isLiquid:!0}),j=o({setting:m,styles:n,pageContext:i});return r({style:c,advanced:l,nodePrice:j,styles:b,setting:g,className:v,wrapClassName:"{% unless variant.available %} !gp-hidden {% endunless %}",builderProps:u,builderAttrs:p,customAttrs:{name:"add","gp-data-hidden":"{% unless variant.available %}true{% endunless %}"},pageContext:i})};export{AddToCartButton};
@@ -1 +1 @@
1
- import{createClass as e}from"@gem-sdk/system";import{ProductPrice as t}from"../product-price/ProductPrice.liquid.js";import{getProductPriceClasses as o}from"./common/classes.js";let PriceComponent=({priceType:r,settings:s})=>{let{lineThrough:m,typo:i,opacityPrice:c}=s,p=e(o());return t({setting:{priceType:r},styles:{typo:i,lineThrough:m,opacityPrice:c},classNames:p})};export{PriceComponent as default};
1
+ import{createClass as e}from"@gem-sdk/system";import{ProductPrice as t}from"../product-price/ProductPrice.liquid.js";import{getProductPriceClasses as o}from"./common/classes.js";let PriceComponent=({priceType:r,settings:s,pageContext:m})=>{let{lineThrough:i,typo:c,opacityPrice:p}=s,l=e(o());return t({setting:{priceType:r},styles:{typo:c,lineThrough:i,opacityPrice:p},classNames:l,pageContext:m})};export{PriceComponent as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{PriceType as r}from"./types.js";import{getRenderRegularPriceSettings as e,getRenderComparePriceSettings as t}from"./common/helpers.js";import o from"./PriceLayout.liquid.js";import i from"./PriceComponent.liquid.js";import{PRICE_LAYOUT as a}from"./common/constants.js";let ProductButtonPrice=({setting:s,styles:p})=>{let c=()=>i({priceType:r.Regular,settings:e(s)}),n=()=>i({priceType:r.Compare,settings:t(s)}),u=()=>{if(!s?.priceLayout)return[c];switch(s?.priceLayout){case a.PRICE_ONLY:return[c];case a.PRICE_BEFORE:return[c,n];case a.PRICE_AFTER:return[n,c];default:return[c,n]}},m=u();return o({components:m,separator:s?.separator,showPrice:!!p?.enablePrice,showSeparator:!!p?.enableSeparator})};export{ProductButtonPrice as default};
2
+ import{PriceType as r}from"./types.js";import{getRenderRegularPriceSettings as e,getRenderComparePriceSettings as t}from"./common/helpers.js";import o from"./PriceLayout.liquid.js";import i from"./PriceComponent.liquid.js";import{PRICE_LAYOUT as a}from"./common/constants.js";let ProductButtonPrice=({setting:s,styles:p,pageContext:c})=>{let n=()=>i({priceType:r.Regular,settings:e(s),pageContext:c}),u=()=>i({priceType:r.Compare,settings:t(s),pageContext:c}),m=()=>{if(!s?.priceLayout)return[n];switch(s?.priceLayout){case a.PRICE_ONLY:return[n];case a.PRICE_BEFORE:return[n,u];case a.PRICE_AFTER:return[u,n];default:return[n,u]}},P=m();return o({components:P,separator:s?.separator,showPrice:!!p?.enablePrice,showSeparator:!!p?.enableSeparator})};export{ProductButtonPrice as default};
@@ -1 +1 @@
1
- import{createClass as t}from"@gem-sdk/system";import{getSoldOutButtonData as i}from"./common/data.js";import o from"./ProductButtonPrice.liquid.js";import{getSoldOutButtonClasses as d}from"./common/classes.js";import e from"../../../button/components/Button.liquid.js";let SoldOutButton=s=>{let{pageContext:a,...r}=s,{styles:u,setting:l,advanced:n,builderProps:m,builderAttrs:p}=r,{buttonStyle:c,buttonStyles:f,buttonSettings:b}=i(r),v=t(d({isLiquid:!0})),g=o({setting:l,styles:u});return e({advanced:n,style:c,styles:f,nodePrice:g,setting:b,className:v,wrapClassName:"{% if variant.available %} !gp-hidden {% endif %}",builderAttrs:p,builderProps:{...m,uidTranslate:m?.uid,uid:`${m?.uid}-sold-out`},pageContext:a,isUseTranslatedValue:!1,dataId:`${m?.uid}-sold-out`,customAttrs:{"gp-data-hidden":"{% if variant.available %}true{% endif %}"}})};export{SoldOutButton};
1
+ import{createClass as t}from"@gem-sdk/system";import{getSoldOutButtonData as i}from"./common/data.js";import o from"./ProductButtonPrice.liquid.js";import{getSoldOutButtonClasses as d}from"./common/classes.js";import e from"../../../button/components/Button.liquid.js";let SoldOutButton=s=>{let{pageContext:a,...r}=s,{styles:u,setting:l,advanced:n,builderProps:m,builderAttrs:p}=r,{buttonStyle:c,buttonStyles:f,buttonSettings:b}=i(r),v=t(d({isLiquid:!0})),g=o({setting:l,styles:u,pageContext:a});return e({advanced:n,style:c,styles:f,nodePrice:g,setting:b,className:v,wrapClassName:"{% if variant.available %} !gp-hidden {% endif %}",builderAttrs:p,builderProps:{...m,uidTranslate:m?.uid,uid:`${m?.uid}-sold-out`},pageContext:a,isUseTranslatedValue:!1,dataId:`${m?.uid}-sold-out`,customAttrs:{"gp-data-hidden":"{% if variant.available %}true{% endif %}"}})};export{SoldOutButton};
@@ -0,0 +1,41 @@
1
+ import{template as e}from"@gem-sdk/core";import{Liquid as s,LiquidIf as i}from"@gem-sdk/system";import{OPTION_VALUES_DELIMITER as n}from"./common/const.js";let renderOptionValuesNewFormatSwatches=t=>{let{renderVariantItem:o,variantPresetsLiquid:r}=t;return e`
2
+ ${s("{%- assign optionRendered = false -%}")}
3
+ ${s("{%- assign swatches = shop.metafields.GEMPAGES.swatchesJSONFormat.value -%}")}
4
+
5
+ ${s(`{% for swatch in swatches %}
6
+ {%- assign optionTitle = swatch.optionTitle -%}
7
+ {%- assign optionType = swatch.optionType -%}
8
+ {%- assign labelsString = "" -%}
9
+ {%- assign colorArraysString = "" -%}
10
+ {%- assign imageUrlsString = "" -%}
11
+
12
+ {% for optionValue in swatch.optionValues %}
13
+ {%- assign labelsString = labelsString | append: optionValue.label | append: '${n}' -%}
14
+ {%- assign colorsJoined = optionValue.colors | join: '${n}' -%}
15
+ {%- assign colorArraysString = colorArraysString | append: colorsJoined | append: '${n}' -%}
16
+ {%- assign imageUrlsString = imageUrlsString | append: optionValue.imageUrl | append: '${n}' -%}
17
+ {% endfor %}
18
+
19
+ {%- assign labels = labelsString | split: '${n}' | slice: 0, labelsString.size -%}
20
+ {%- assign colorStrings = colorArraysString | split: '${n}' | slice: 0, colorArraysString.size -%}
21
+ {%- assign imageUrls = imageUrlsString | split: '${n}' | slice: 0, imageUrlsString.size -%}
22
+
23
+ {% if optionTitle == option.name %}
24
+ {%- assign variantPresetString = "${r}" -%}
25
+ {%- assign optionName = option.name | replace: "'", "&apos;" | replace: '"', "&quot;" -%}
26
+ {%- assign items = variantPresetString | split: '($2)' -%}
27
+ {%- assign type = 'dropdown' -%}
28
+
29
+ {% for item in items %}
30
+ {%- assign itemPreset = item | split: '($1)' -%}
31
+ {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
32
+ {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
33
+ {% endfor %}
34
+ {%- assign optionRendered = true -%}
35
+
36
+ ${o({showDropdown:!0})}
37
+ {% endif %}
38
+ {% endfor %}`)}
39
+
40
+ ${i("optionRendered == false",o({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
41
+ `};export{renderOptionValuesNewFormatSwatches};
@@ -0,0 +1,66 @@
1
+ import{Liquid as e,LiquidFor as s,LiquidIf as t}from"@gem-sdk/system";import{template as i}from"@gem-sdk/core";let renderOptionValuesOld=a=>{let{renderVariantItem:n,variantPresetsLiquid:o}=a;return i`
2
+ ${e("{%- assign optionRendered = false -%}")}
3
+ ${e("{%- assign swatches = shop.metafields.GEMPAGES.swatches -%}")}
4
+ ${e("{%- assign swatchesItems = swatches | split: '($1)' -%}")}
5
+
6
+ ${s("swatchesItem in swatchesItems",`
7
+ ${e('{%- assign colorArraysString = "" -%}')}
8
+ ${e('{%- assign labelsString = "" -%}')}
9
+ ${e('{%- assign imageUrlsString = "" -%}')}
10
+ ${e("{%- assign attrItems = swatchesItem | split: '($3)' -%}")}
11
+
12
+ ${s("attrItem in attrItems",`
13
+ ${e("{%- assign attrs = attrItem | split: '($2)' -%}")}
14
+ ${e("{%- assign optionKey = attrs[0] -%}")}
15
+ ${e("{%- assign optionValue = attrs[1] -%}")}
16
+ ${e(`
17
+ {% if optionKey == 'optionTitle' %}
18
+ {% assign optionTitle = optionValue %}
19
+ {% elsif optionKey == 'optionType' %}
20
+ {% assign optionType = optionValue %}
21
+ {% endif %}
22
+ `)}
23
+
24
+ ${t('optionKey == "optionValues"',`
25
+ ${e("{%- assign opValueItems = optionValue | split: '($4)' -%}")}
26
+ ${s("opValueItem in opValueItems",`
27
+ ${e("{%- assign opValueItemAttrs = opValueItem | split: '($6)' -%}")}
28
+ ${s("opValueItemAttr in opValueItemAttrs",`
29
+ ${e("{%- assign attrs = opValueItemAttr | split: '($5)' -%}")}
30
+ ${e("{%- assign opValueItemKey = attrs[0] -%}")}
31
+ ${e("{%- assign opValueItemValue = attrs[1] -%}")}
32
+
33
+ ${t('opValueItemKey == "label"',`${e("{%- assign labelsString = labelsString | append: opValueItemValue -%}")}
34
+ ${e('{%- assign labelsString = labelsString | append: "($8)" -%}')}`)}
35
+
36
+ ${t('opValueItemKey == "colors"',`${e("{%- assign colorArraysString = colorArraysString | append: opValueItemValue -%}")}
37
+ ${e('{%- assign colorArraysString = colorArraysString | append: "($8)" -%}')}`)}
38
+
39
+ ${t('opValueItemKey == "imageUrl"',`${e("{%- assign imageUrlsString = imageUrlsString | append: opValueItemValue -%}")}
40
+ ${e('{%- assign imageUrlsString = imageUrlsString | append: "($8)" -%}')}`)}
41
+ `)}
42
+ `)}
43
+ `)}
44
+ `)}
45
+
46
+ ${e("{%- assign labels = labelsString | split: '($8)' -%}")}
47
+ ${e("{%- assign colorStrings = colorArraysString | split: '($8)' -%}")}
48
+ ${e("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
49
+
50
+ ${t("optionTitle == option.name",`
51
+ ${e(`{%- assign variantPresetString = "${o}" -%}`)}
52
+ ${e('{%- assign optionName = option.name | replace: "\'", "&apos;" | replace: \'"\', "&quot;" -%}')}
53
+ ${e("{%- assign items = variantPresetString | split:'($2)' -%}")}
54
+ ${e("{%- assign type = 'dropdown' -%}")}
55
+ ${s("item in items",`
56
+ ${e("{%- assign itemPreset = item | split:'($1)' -%}")}
57
+ ${t("itemPreset[0] == optionName",e("{%- assign type = itemPreset[1] -%}"))}
58
+ ${t('itemPreset[0] == "base"',e("{%- assign type = itemPreset[1] -%}"))}
59
+ `)}
60
+ ${e("{%- assign optionRendered = true -%}")}
61
+ ${n({showDropdown:!0})}
62
+ `)}
63
+ `)}
64
+
65
+ ${t("optionRendered == false",n({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
66
+ `};export{renderOptionValuesOld};
@@ -1,6 +1,8 @@
1
- import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as i,isLocalEnv as a,baseAssetURL as o}from"@gem-sdk/core";import n from"../../../text/components/Text.liquid.js";import r from"./components/variants/index.liquid.js";import p from"./components/dropdown-swatches/Dropdown.liquid.js";import l from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as m}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as c,createStyle as u,createStateOrContext as g,createAttr as $,Liquid as v,LiquidFor as f,LiquidIf as y,If as _}from"@gem-sdk/system";import{getAttrs as h}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as S,getWrapperStyle as V}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as I}from"./common/main/classes.js";import{getTextVariantTitleData as b,getDropdownGroupData as w}from"./common/main/getData.js";import{getWrapVariantOptionClass as A}from"./common/variants/classes.js";import{getStyleOfObject as P}from"../../helpers/function.js";import{getMarginBottomStyle as T}from"./common/variants/styles.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=N=>{let{builderProps:D,styles:x,setting:E,advanced:O}=N,{align:U,swatchItemWidth:C,dropdownItemWidth:K,swatchSpacing:q,optionTypo:k,marginBottom:F}=x??{},{label:G,optionType:J,showAsSwatches:L,layout:R,hasPreSelected:W}=E??{},z=O?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:H}=D??{},M="groupOption"===J,Q=()=>{let e={};return s.forEach(t=>{let s=i(C,t);e[t]="auto"===s}),e},Y=()=>{let e={};return s.forEach(t=>{e[t]=K?.[t]==="fill"}),e},B=e(()=>{let e=d(E?.variantPresets,x);return{...E,variantPresets:e}},[E?.variantPresets,x]),X=e=>{let t={"'":"&apos;",'"':"&quot;"},s=e;for(let i in t)e.indexOf(i)>=0&&(s=s.replaceAll(i,t[i]));return s},Z=()=>E?.variantPresets?.map(e=>`${X(e.optionName)}($2)${e.optionType}`).join("($1)"),ee=()=>E?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),et=c(j(U)),es=u(S(q,q)),ei=b(N,"Liquid"),ea=c(A(R,U)),eo=()=>t`
2
- ${v(`{%- assign presets = "${Z()}" | split: '($1)' -%}`)}
3
- ${v(`{% assign hiddenPresetOptions = "${ee()}" | split: ',' %}`)}
1
+ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiveValueByScreen as s}from"@gem-sdk/core";import a from"../../../text/components/Text.liquid.js";import n from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as _,If as $}from"@gem-sdk/system";import{getAttrs as g}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as S,getDropdownGroupData as b}from"./common/main/getData.js";import{getWrapVariantOptionClass as A}from"./common/variants/classes.js";import{getStyleOfObject as P}from"../../helpers/function.js";import{getMarginBottomStyle as D}from"./common/variants/styles.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as V}from"./OptionVariantsOldFormat.liquid.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=E=>{let{builderProps:O,styles:T,setting:x,advanced:q}=E,{align:F,swatchItemWidth:G,dropdownItemWidth:C,swatchSpacing:I,optionTypo:k,marginBottom:L}=T??{},{label:J,optionType:z,showAsSwatches:M,layout:U,hasPreSelected:W}=x??{},R=q?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:Y}=O??{},H="groupOption"===z,K=()=>{let e={};return o.forEach(t=>{let i=s(G,t);e[t]="auto"===i}),e},Q=()=>{let e={};return o.forEach(t=>{e[t]=C?.[t]==="fill"}),e},B=x?.variantPresets?d(x?.variantPresets,T):[],X=B?.map(e=>({...e,presets:{[e.optionType]:e.presets[e.optionType]}})),Z={...x,variantPresetsOptionType:X},ee=e=>{let t={"'":"&apos;",'"':"&quot;"},i=e;for(let o in t)e.indexOf(o)>=0&&(i=i.replaceAll(o,t[o]));return i},et=()=>x?.variantPresets?.map(e=>`${ee(e.optionName)}($2)${e.optionType}`).join("($1)"),ei=()=>x?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),eo=({showDropdown:t,isRenderDefault:i,typeOfOption:o})=>e`
2
+ ${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:o,activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...Z,swatchAutoWidth:K(),optionTypo:k,isRenderDefault:i}))}
3
+ ${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,es=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:eo,variantPresetsLiquid:es??""},en=m(j(F)),er=c(h(I,I)),ep=S(E,"Liquid"),el=m(A(U,F)),ed=()=>e`
4
+ ${v(`{%- assign presets = "${et()}" | split: '($1)' -%}`)}
5
+ ${v(`{% assign hiddenPresetOptions = "${ei()}" | split: ',' %}`)}
4
6
 
5
7
  ${v(`{% assign all_option_names = options | map: 'name' %}
6
8
  {% assign filtered_options_string = '' %}
@@ -30,20 +32,20 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
30
32
  ${f("option in options",`
31
33
  <div
32
34
  option-name="{{option.name | escape}}"
33
- class="${ea} ${y("hiddenPresetOptions contains option.name","gp-hidden")}"
34
- style="${P(T(F))}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
35
+ class="${el} ${_("hiddenPresetOptions contains option.name","gp-hidden")}"
36
+ style="${P(D(L))}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
35
37
  >
36
38
  ${v("{%- assign showVariantClass = 'variant-display' -%}")}
37
39
  ${v("{%- assign optionName = option.name -%}")}
38
40
  ${f("preset in presets",`
39
41
  ${v("{%- assign presetDetail = preset | split: '($2)' -%}")}
40
- ${y("presetDetail[1] == 'dropdown' and presetDetail[0] == optionName",`${v("{%- assign showVariantClass = '' -%}")} ${v("{%- break -%}")}`)}
42
+ ${_("presetDetail[1] == 'dropdown' and presetDetail[0] == optionName",`${v("{%- assign showVariantClass = '' -%}")} ${v("{%- break -%}")}`)}
41
43
  `)}
42
- ${_(G,n(ei)," ")}
44
+ ${$(J,a(ep)," ")}
43
45
  <div
44
46
  variant-option-name="{{option.name | escape}}"
45
- class="${et}"
46
- style="${P(es)}"
47
+ class="${en}"
48
+ style="${P(er)}"
47
49
  >
48
50
  ${v("{%- assign values = option.values -%}")}
49
51
  ${v("{%- assign rootForloop = forloop.index0 -%}")}
@@ -56,78 +58,24 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
56
58
  {%- assign selectedValue = variant.option3 -%}
57
59
  {%- endif -%}
58
60
  `)}
59
- ${_(!W,v("{%- assign selectedValue = null -%}"),"")}
60
- ${_(L,er(),ep())}
61
+ ${$(!W,v("{%- assign selectedValue = null -%}"),"")}
62
+ ${$(M,em(),eo({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
61
63
  </div>
62
64
  </div>`)}
63
- `,en=E?.variantPresets?.map(e=>({name:X(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),er=()=>t`
64
- ${v("{%- assign optionRendered = false -%}")}
65
- ${v("{%- assign swatches = shop.metafields.GEMPAGES.swatches -%}")}
66
- ${v("{%- assign swatchesItems = swatches | split: '($1)' -%}")}
67
-
68
- ${f("swatchesItem in swatchesItems",`
69
- ${v('{%- assign colorArraysString = "" -%}')}
70
- ${v('{%- assign labelsString = "" -%}')}
71
- ${v('{%- assign imageUrlsString = "" -%}')}
72
- ${v("{%- assign attrItems = swatchesItem | split: '($3)' -%}")}
73
-
74
- ${f("attrItem in attrItems",`${v("{%- assign attrs = attrItem | split: '($2)' -%}")}
75
- ${v("{%- assign optionKey = attrs[0] -%}")}
76
- ${v("{%- assign optionValue = attrs[1] -%}")}
77
- ${v(`
78
- {% if optionKey == 'optionTitle' %}
79
- {% assign optionTitle = optionValue %}
80
- {% elsif optionKey == 'optionType' %}
81
- {% assign optionType = optionValue %}
82
- {% endif %}
83
- `)}
84
-
85
- ${y("optionKey == 'optionValues'",`${v("{%- assign opValueItems = optionValue | split: '($4)' -%}")}
86
- ${f("opValueItem in opValueItems",`${v("{%- assign opValueItemAttrs = opValueItem | split: '($6)' -%}")}
87
- ${f("opValueItemAttr in opValueItemAttrs",`${v("{%- assign attrs = opValueItemAttr | split: '($5)' -%}")}
88
- ${v("{%- assign opValueItemKey = attrs[0] -%}")}
89
- ${v("{%- assign opValueItemValue = attrs[1] -%}")}
90
-
91
- ${y("opValueItemKey == 'label'",`${v("{%- assign labelsString = labelsString | append: opValueItemValue -%}")}${v('{%- assign labelsString = labelsString | append: "($8)" -%}')}`)}
92
-
93
- ${y("opValueItemKey == 'colors'",`${v("{%- assign colorArraysString = colorArraysString | append: opValueItemValue -%}")}${v('{%- assign colorArraysString = colorArraysString | append: "($8)" -%}')}`)}
94
-
95
- ${y("opValueItemKey == 'imageUrl'",`${v("{%- assign imageUrlsString = imageUrlsString | append: opValueItemValue -%}")}${v('{%- assign imageUrlsString = imageUrlsString | append: "($8)" -%}')}`)}`)}`)}`)}
96
- `)}
97
-
98
- ${v("{%- assign labels = labelsString | split: '($8)' -%}")}
99
- ${v("{%- assign colorStrings = colorArraysString | split: '($8)' -%}")}
100
- ${v("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
101
-
102
- ${y("optionTitle == option.name",`
103
- ${v(`{%- assign variantPresetString = "${en}" -%}`)}
104
- ${v('{%- assign optionName = option.name | replace: "\'", "&apos;" | replace: \'"\', "&quot;" -%}')}
105
- ${v("{%- assign items = variantPresetString | split:'($2)' -%}")}
106
- ${v("{%- assign type = 'dropdown' -%}")}
107
- ${f("item in items",`
108
- ${v("{%- assign itemPreset = item | split:'($1)' -%}")}
109
- ${y("itemPreset[0] == optionName",v("{%- assign type = itemPreset[1] -%}"))}
110
- ${y('itemPreset[0] == "base"',v("{%- assign type = itemPreset[1] -%}"))}
111
- `)}
112
- ${v("{%- assign optionRendered = true -%}")}
113
- ${f("value in values",r({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:L,uid:H,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",optionType:"optionType",activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...x,...B,swatchAutoWidth:Q(),optionTypo:k}))}
114
- ${y("type == 'dropdown'",p({...x,...B,swatchAutoWidth:Y(),optionTypo:k}))}
115
- `)}
116
- `)}
117
-
118
- ${y("optionRendered == false",ep())}
119
- `,ep=()=>f("value in values",r({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:L,uid:H,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:"optionType",activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...x,...B,swatchAutoWidth:Q(),optionTypo:k,isRenderDefault:!0})),el=c(I(U)),em=w(N),ed=()=>`
120
- <div className="${el}">
121
- ${l(em)}
65
+ `,em=()=>e`
66
+ ${_("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ea),V(ea))}
67
+ `,ec=m(w(F)),eu=b(E),ev=()=>`
68
+ <div className="${ec}">
69
+ ${p(eu)}
122
70
  </div>
123
- `;g({setting:B,styles:JSON.stringify(x),variants:"{{ product.variants | json | escape }}",optionsWithValues:"{{ product.options_with_values | json | escape }}",variantSelected:"{{ variant | json | escape }}",variantInventoryQuantity:"{{ product.variants | map: 'inventory_quantity' | json | escape }}",variantInventoryPolicy:"{{ product.variants | map: 'inventory_policy' | json | escape }}",moneyFormat:"{{ shop.money_format | json | escape }}",productId:"{{ product.id | json | escape }}",productUrl:"{{ product.url | json | escape }}",productHandle:"{{ product.handle | json | escape }}",displayState:`${JSON.stringify(z)}`,totalVariantCombinations:"{{ total_combinations }}",firstAvailableVariant:"{{ product.selected_or_first_available_variant | json | escape }}"});let ec=$(h({uid:H,hasPreSelected:W,cssClass:O?.cssClass})),eu=u(V(N)),eg=c({"gp-flex gp-flex-col !gp-ml-0":!0}),e$=()=>{let e=a?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${m('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return t`
71
+ `,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${i}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
124
72
  ${v("{%- assign total_combinations = 1 -%}")}
125
73
  ${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
126
74
  <gp-product-variants
127
- ${ec}
75
+ ${ef}
128
76
  gp-data='{
129
- "setting":${JSON.stringify(B)?.replaceAll("'","&#039;")},
130
- "styles":${JSON.stringify(x)},
77
+ "setting":${JSON.stringify(Z)?.replaceAll("'","&#039;")},
78
+ "styles":${JSON.stringify(T)},
131
79
  "variants":{{product.variants | json | escape}},
132
80
  "optionsWithValues": {{product.options_with_values | json | escape}},
133
81
  "variantSelected": {{ variant | json | escape }},
@@ -137,7 +85,7 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
137
85
  "productId": {{product.id | json | escape}},
138
86
  "productUrl": {{product.url | json | escape}},
139
87
  "productHandle": {{product.handle | json | escape}},
140
- "displayState": ${JSON.stringify(z)},
88
+ "displayState": ${JSON.stringify(R)},
141
89
  "totalVariantCombinations": {{total_combinations}},
142
90
  "firstAvailableVariant": {{product.selected_or_first_available_variant | json | escape}}
143
91
  }
@@ -145,13 +93,13 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
145
93
  <div class="gp-hidden" style="--hvr-shadow: none; --hvr-shadow-tablet: none; --hvr-shadow-mobile: none"></div>
146
94
  ${v("{%- assign options = product.options_with_values -%}")}
147
95
  ${v("{%- assign variants = product.variants -%}")}
148
- ${y("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",t`<div
149
- class="${eg}"
150
- style="${eu}"
96
+ ${_("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",e`<div
97
+ class="${e$}"
98
+ style="${e_}"
151
99
  >
152
- ${_(M,ed(),eo())}
100
+ ${$(H,ev(),ed())}
153
101
  </div>`)}
154
102
  </gp-product-variants>
155
103
 
156
- ${e$()}
104
+ ${eg()}
157
105
  `};export{ProductVariants as default};
@@ -1 +1 @@
1
- import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as i,getGlobalColorStateStyle as p,handleConvertBorderStyle as a,handleConvertBorderWidth as n,handleConvertBorderColor as d,makeStyleResponsive as h}from"@gem-sdk/core";import{filterTruthyObject as c}from"../../../../../helpers.js";let getColorStyleWidth=e=>{let t=e?.height||"32px",o=e?.width||{desktop:t},r=Object.fromEntries(Object.entries(o).map(([e,o])=>{let r=o&&"undefined"!==o&&"auto"!==o?o:t;return[e,r]}));return h("minw",r)},getWrapperStyleActive=i=>{let{preset:p,optionTypography:a,optionTypo:n,typeOfOption:d}=i,h=p?.optionBgColor,s=p?.optionTextColor,g=p?.optionBorder,b=p?.optionHasShadow,m=p?.optionShadow,u=p?.optionRounded,w="color"===d,x="image"===d||"image_shopify"===d,y=e(n,a),S=e=>{let t=h?.active??h?.normal,o=g?.active??g?.normal;return r({bg:e&&l(t),bs:o?.border,bw:o?.width,bc:l(o?.color)})},v=m?.active??m?.normal,C=b?.active??b?.normal,f=s?.active??s?.normal;return c({...S(!w),...t(u),...o({value:v,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:C},!0),...y,...!w&&!x&&r({c:l(f)}),...w&&getColorStyleWidth(p),...r({h:p?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:t,optionTransform:l,optionTypography:h,optionTypo:s,typeOfOption:g}=e,b=t?.optionBgColor,m=t?.optionTextColor,u=t?.optionBorder,w=t?.optionHasShadow,x=t?.optionShadow,y=t?.optionRounded,S="color"===g,v="image"===g||"image_shopify"===g,C=["normal","hover"].reduce((e,t)=>({...e,...o({value:x?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:w?.[t]})}),{});return c({...i(y),...C,...!S&&p("bg",b),...!S&&a(u),...!S&&n(u),...!S&&d(u),...!S&&!v&&r({c:l}),...!S&&!v&&p("c",m),...typoStyleNotIn(s,h,["--c"]),...S&&getColorStyleWidth(t),...r({h:t?.height})})};function typoStyleNotIn(t,o,r){let l=e(t,o);return r&&0!==r.length?Object.fromEntries(Object.entries(l).filter(([e])=>!r.includes(e))):l}let getWrapperTextStyle=e=>{let{preset:o,typeOfOption:r,checked:l}=e,p=o?.optionBorder,h=o?.optionRounded,s="color"===r,g=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},b={...h,active:{...h?.active||{},radiusType:"custom"}},m=l?t(b):i(h),u=!l&&s?{...a(p),...n(p),...d(p)}:{};return c({...!s&&g(),...s&&m,...u})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},p=t=>t?{"--bs":"none"}:a(e),h=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--hvr-c":"unset",...p(o),...n(e),...d(e),...i(t),...l()});return h(!!o)},getTextStyle=({optionTypo:t,optionTypography:o})=>{let r=e(t,o);return delete r["--c"],c({...r})};export{getColorStyle,getTextStyle,getWrapperStyleActive,getWrapperStyleNormalAndHover,getWrapperTextStyle};
1
+ import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as i,getGlobalColorStateStyle as p,handleConvertBorderStyle as a,handleConvertBorderWidth as n,handleConvertBorderColor as d,makeStyleResponsive as h}from"@gem-sdk/core";import{filterTruthyObject as c}from"../../../../../helpers.js";let getColorStyleWidth=e=>{let t=e?.height||"32px",o=e?.width||{desktop:t},r=Object.fromEntries(Object.entries(o).map(([e,o])=>{let r=o&&"undefined"!==o&&"auto"!==o&&"Auto"!==o?o:t;return[e,r]}));return h("minw",r)},getWrapperStyleActive=i=>{let{preset:p,optionTypography:a,optionTypo:n,typeOfOption:d}=i,h=p?.optionBgColor,s=p?.optionTextColor,g=p?.optionBorder,b=p?.optionHasShadow,u=p?.optionShadow,m=p?.optionRounded,w="color"===d,x="image"===d||"image_shopify"===d,y=e(n,a),S=e=>{let t=h?.active??h?.normal,o=g?.active??g?.normal;return r({bg:e&&l(t),bs:o?.border,bw:o?.width,bc:l(o?.color)})},v=u?.active??u?.normal,C=b?.active??b?.normal,f=s?.active??s?.normal;return c({...S(!w),...t(m),...o({value:v,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:C},!0),...y,...!w&&!x&&r({c:l(f)}),...w&&getColorStyleWidth(p),...r({h:p?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:t,optionTransform:l,optionTypography:h,optionTypo:s,typeOfOption:g}=e,b=t?.optionBgColor,u=t?.optionTextColor,m=t?.optionBorder,w=t?.optionHasShadow,x=t?.optionShadow,y=t?.optionRounded,S="color"===g,v="image"===g||"image_shopify"===g,C=["normal","hover"].reduce((e,t)=>({...e,...o({value:x?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:w?.[t]})}),{});return c({...i(y),...C,...!S&&p("bg",b),...!S&&a(m),...!S&&n(m),...!S&&d(m),...!S&&!v&&r({c:l}),...!S&&!v&&p("c",u),...typoStyleNotIn(s,h,["--c"]),...S&&getColorStyleWidth(t),...r({h:t?.height})})};function typoStyleNotIn(t,o,r){let l=e(t,o);return r&&0!==r.length?Object.fromEntries(Object.entries(l).filter(([e])=>!r.includes(e))):l}let getWrapperTextStyle=e=>{let{preset:o,typeOfOption:r,checked:l}=e,p=o?.optionBorder,h=o?.optionRounded,s="color"===r,g=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},b={...h,active:{...h?.active||{},radiusType:"custom"}},u=l?t(b):i(h),m=!l&&s?{...a(p),...n(p),...d(p)}:{};return c({...!s&&g(),...s&&u,...m})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},p=t=>t?{"--bs":"none"}:a(e),h=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--hvr-c":"unset",...p(o),...n(e),...d(e),...i(t),...l()});return h(!!o)},getTextStyle=({optionTypo:t,optionTypography:o})=>{let r=e(t,o);return delete r["--c"],c({...r})};export{getColorStyle,getTextStyle,getWrapperStyleActive,getWrapperStyleNormalAndHover,getWrapperTextStyle};
@@ -0,0 +1 @@
1
+ let OPTION_VALUES_DELIMITER="|||";export{OPTION_VALUES_DELIMITER};
@@ -1 +1 @@
1
- import{composeTypographyStyle as e,makeStyle as t,getSingleColorVariable as o,getStyleShadow as r,makeStyleResponsive as c,makeWidth as a,getGlobalColorStateStyle as i,handleConvertBorderStyle as s,handleConvertBorderWidth as l,handleConvertBorderColor as p,composeRadius as n}from"@gem-sdk/core";import{filterTruthyObject as b}from"../../../../../helpers.js";let getSelectStyle=({width:d,height:g,optionTypo:h,optionTypography:v,optionBgColor:m,optionTextColor:u,optionRounded:w,optionHasShadow:S,optionShadow:f,optionBorder:k,optionTransform:y,isCombine:x})=>{let j=e(h,v),A=t({bg:o(m?.active),bs:k?.active?.border,bw:k?.active?.width,bc:k?.active?.color}),E=[x?"active":"normal","hover"].reduce((e,t)=>({...e,...r({value:f?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:S?.[t]})}),{});return b({...c("w",a(d)),...t({h:g}),...E,...A,...t({tt:y}),...j,...i("c",u),...i("bg",m),...s(k),...l(k),...p(k),...n(w),appearance:"none","background-image":"url(https://cdn.shopify.com/s/files/1/1827/4239/t/1/assets/ico-select.svg?v=155563818344741998551488860031)","background-repeat":"no-repeat","background-position":"right 16px center"})};export{getSelectStyle};
1
+ import{composeTypographyStyle as e,makeStyleResponsive as t,makeStyle as o,getSingleColorVariable as a,getStyleShadow as r,makeWidth as c,getGlobalColorStateStyle as s,handleConvertBorderStyle as l,handleConvertBorderWidth as i,handleConvertBorderColor as d,composeRadius as p}from"@gem-sdk/core";import{filterTruthyObject as h}from"../../../../../helpers.js";let getSelectStyle=({width:n,height:b,optionTypo:g,optionTypography:m,optionBgColor:u,optionTextColor:v,optionRounded:w,optionHasShadow:S,optionShadow:x,optionBorder:y,optionTransform:f,isCombine:k,textAlign:A})=>{let E=e(g,m),F=A?t("ta",A):{},j=o({bg:a(u?.active),bs:y?.active?.border,bw:y?.active?.width,bc:y?.active?.color}),T=[k?"active":"normal","hover"].reduce((e,t)=>({...e,...r({value:x?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:S?.[t]})}),{});return h({...t("w",c(n)),...o({h:b}),...T,...j,...o({tt:f}),...E,...s("c",v),...s("bg",u),...l(y),...i(y),...d(y),...p(w),...r({value:g?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:g?.custom?.hasShadowText}),...F,appearance:"none","background-image":"url(https://cdn.shopify.com/s/files/1/1827/4239/t/1/assets/ico-select.svg?v=155563818344741998551488860031)","background-repeat":"no-repeat","background-position":"right 16px center"})};export{getSelectStyle};