@gem-sdk/components 20.1.2 → 20.1.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./constants.js");const t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);exports.checkIconVisibility=e=>e?.enableIcon===!0,exports.escapeSingleQuoteForAttr=o,exports.getGPProductButtonState=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",
|
|
1
|
+
"use strict";var e=require("./constants.js");const t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);exports.checkIconVisibility=e=>e?.enableIcon===!0,exports.escapeSingleQuoteForAttr=o,exports.getGPProductButtonState=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",inStock:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),exports.getRenderComparePriceSettings=e=>({lineThrough:!0,typo:a(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),exports.getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:a(e?.priceTypo)}),exports.renderSeparator=t=>({dot:e.SEPARATOR.DOT,"vertical-line":e.SEPARATOR.VERTICAL_LINE,"horizontal-line":e.SEPARATOR.HORIZONTAL_LINE})[t??"horizontal-line"]??e.SEPARATOR.HORIZONTAL_LINE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",
|
|
1
|
+
import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",inStock:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),n=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,s=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{a as checkIconVisibility,o as escapeSingleQuoteForAttr,c as getGPProductButtonState,i as getRenderComparePriceSettings,l as getRenderRegularPriceSettings,n as renderSeparator};
|