@gem-sdk/components 12.0.0-dev.56 → 12.0.0-dev.57
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.
- package/dist/cjs/post-purchase/product/components/product-subscription/common/classes.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-subscription/common/styles.js +1 -1
- package/dist/cjs/third-party/components/SealSubscriptions.liquid.js +10 -6
- package/dist/esm/post-purchase/product/components/product-subscription/common/classes.js +1 -1
- package/dist/esm/post-purchase/product/components/product-subscription/common/styles.js +1 -1
- package/dist/esm/third-party/components/SealSubscriptions.liquid.js +13 -9
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getWrapperClasses=()=>core.composeClasses("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>core.composeClasses("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>core.composeClasses("gp-text-xs gp-leading-[1.3]"),getSellingPlanRadioOptionsClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioOptionTextClasses=()=>core.composeClasses("gp-text-[14px] gp-leading-[1.3] gp-text-
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getWrapperClasses=()=>core.composeClasses("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>core.composeClasses("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>core.composeClasses("gp-text-xs gp-leading-[1.3]"),getSellingPlanRadioOptionsClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioOptionTextClasses=()=>core.composeClasses("gp-text-[14px] gp-leading-[1.3] gp-text-[#545454]"),getSubscriptionRadioLabelClasses=e=>{let s=e?"gp-opacity-50 gp-cursor-not-allowed":"";return core.composeClasses(`gp-flex gp-items-center gp-cursor-pointer gp-gap-2 ${s}`.trim())},getSubscriptionRadioInputClasses=()=>core.composeClasses("gp-relative gp-min-h-[18px] gp-min-w-[18px] gp-mt-[3px] gp-w-4 gp-h-4 gp-cursor-pointer gp-appearance-none gp-rounded-full gp-bg-light-100 gp-transition-all gp-border-light-500 gp-border-2 checked:gp-border-[#1879b9] checked:gp-border-[6px] checked:gp-after:gp-content-[''] checked:gp-after:gp-absolute checked:gp-after:gp-top-1/2 checked:gp-after:gp-left-1/2 checked:gp-after:gp-transform checked:gp-after:gp--translate-x-1/2 checked:gp-after:gp--translate-y-1/2 checked:gp-after:gp-h-2 checked:gp-after:gp-w-2 checked:gp-after:gp-rounded-full checked:gp-after:gp-bg-white disabled:gp-cursor-not-allowed"),getSellingPlanDropdownContainerClasses=()=>core.composeClasses("gp-relative"),getSellingPlanDropdownLabelClasses=()=>core.composeClasses("!gp-max-w-[calc(100%_-_66px)] gp-absolute gp-left-[12px] gp-top-[6px] gp-p-0 gp-text-xs gp-leading-[1.3] gp-text-[#737373] gp-transition-[top]"),getSellingPlanDropdownLabelSpanClasses=()=>core.composeClasses("gp-max-w-full"),getSellingPlanDropdownLabelInnerSpanClasses=()=>core.composeClasses("gp-block gp-overflow-hidden"),getSellingPlanDropdownSelectClasses=({isNoLabel:e=!1})=>core.composeClasses(`gp-min-h-[47px] gp-appearance-none gp-bg-transparent gp-w-full gp-whitespace-nowrap gp-rounded-[5px] gp-border gp-border-[#d9d9d9] gp-pl-[11px] gp-pr-[40px] gp-text-[14px] gp-outline-none gp-text-[#545454] gp-leading-[1.3] ${e?"gp-pt-0 gp-pb-0":"gp-pt-[21px] gp-pb-[6px]"}`),getSellingPlanDropdownOptionClasses=()=>core.composeClasses("gp-text-[14px] gp-text-black"),getSellingPlanDropdownIconContainerClasses=()=>core.composeClasses("gp-pointer-events-none gp-absolute gp-right-[2px] gp-top-[50%] gp-flex gp-h-[43%] gp-w-[40px] gp-translate-y-[-50%] gp-items-center gp-justify-center gp-border-l-[1px] gp-bg-white gp-border-[#545454]"),getSellingPlanDropdownIconClasses=()=>core.composeClasses("gp-h-[10px] gp-w-[10px]");exports.getContainerClasses=getContainerClasses,exports.getSellingPlanDropdownContainerClasses=getSellingPlanDropdownContainerClasses,exports.getSellingPlanDropdownIconClasses=getSellingPlanDropdownIconClasses,exports.getSellingPlanDropdownIconContainerClasses=getSellingPlanDropdownIconContainerClasses,exports.getSellingPlanDropdownLabelClasses=getSellingPlanDropdownLabelClasses,exports.getSellingPlanDropdownLabelInnerSpanClasses=getSellingPlanDropdownLabelInnerSpanClasses,exports.getSellingPlanDropdownLabelSpanClasses=getSellingPlanDropdownLabelSpanClasses,exports.getSellingPlanDropdownOptionClasses=getSellingPlanDropdownOptionClasses,exports.getSellingPlanDropdownSelectClasses=getSellingPlanDropdownSelectClasses,exports.getSellingPlanRadioContainerClasses=getSellingPlanRadioContainerClasses,exports.getSellingPlanRadioLabelClasses=getSellingPlanRadioLabelClasses,exports.getSellingPlanRadioOptionTextClasses=getSellingPlanRadioOptionTextClasses,exports.getSellingPlanRadioOptionsClasses=getSellingPlanRadioOptionsClasses,exports.getSubscriptionRadioInputClasses=getSubscriptionRadioInputClasses,exports.getSubscriptionRadioLabelClasses=getSubscriptionRadioLabelClasses,exports.getWrapperClasses=getWrapperClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helper=require("../../../../common/helper.js");const getSubscriptionStyles=e=>{let{width:t}=e??{},r=core.makeStyle({w:t}),l=core.makeStyle({rg:"
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helper=require("../../../../common/helper.js");const getSubscriptionStyles=e=>{let{width:t}=e??{},r=core.makeStyle({w:t}),l=core.makeStyle({rg:"8px"});return core.filterTruthyStyles({...r,...l})},getSubscriptionWrapperStyles=e=>core.filterTruthyStyles({...core.makeStyle({jc:e??"left"})}),getSellingPlanRadioOptionsStyles=({sellingPlanItemGap:e,sellingType:t})=>{let r=helper.postPurchaseSpacing[e??"tight"]||"9px",l=core.makeStyle({rg:"subscription"===t?r:"9px"});return core.filterTruthyStyles({...l})};exports.getSellingPlanRadioOptionsStyles=getSellingPlanRadioOptionsStyles,exports.getSubscriptionStyles=getSubscriptionStyles,exports.getSubscriptionWrapperStyles=getSubscriptionWrapperStyles;
|
|
@@ -37,17 +37,21 @@
|
|
|
37
37
|
const productWrapper = detail?.element?.closest('gp-product');
|
|
38
38
|
if (!productWrapper) return;
|
|
39
39
|
|
|
40
|
-
const
|
|
41
|
-
const
|
|
40
|
+
const gpPriceElements = productWrapper.querySelectorAll('gp-product-price .gp-price.gp-money');
|
|
41
|
+
const compareAtPriceElements = productWrapper.querySelectorAll('gp-product-price .gp-product-compare-price');
|
|
42
42
|
|
|
43
|
-
if (
|
|
44
|
-
|
|
43
|
+
if (gpPriceElements.length > 0 && typeof detail.price !== 'undefined') {
|
|
44
|
+
gpPriceElements.forEach(function(el) {
|
|
45
|
+
el.innerHTML = formatCurrency(detail.price, moneyFormatGp);
|
|
46
|
+
});
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
if (
|
|
49
|
+
if (compareAtPriceElements.length > 0) {
|
|
48
50
|
const compareAtPrice = detail?.compareAtPrice || 0;
|
|
49
51
|
setTimeout(function() {
|
|
50
|
-
|
|
52
|
+
compareAtPriceElements.forEach(function(el) {
|
|
53
|
+
el.innerHTML = formatCurrency(compareAtPrice, moneyFormatGp);
|
|
54
|
+
});
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e}from"@gem-sdk/core";let getWrapperClasses=()=>e("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>e("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>e("gp-text-xs gp-leading-[1.3]"),getSellingPlanRadioOptionsClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioOptionTextClasses=()=>e("gp-text-[14px] gp-leading-[1.3] gp-text-
|
|
1
|
+
import{composeClasses as e}from"@gem-sdk/core";let getWrapperClasses=()=>e("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>e("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>e("gp-text-xs gp-leading-[1.3]"),getSellingPlanRadioOptionsClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioOptionTextClasses=()=>e("gp-text-[14px] gp-leading-[1.3] gp-text-[#545454]"),getSubscriptionRadioLabelClasses=p=>{let g=p?"gp-opacity-50 gp-cursor-not-allowed":"";return e(`gp-flex gp-items-center gp-cursor-pointer gp-gap-2 ${g}`.trim())},getSubscriptionRadioInputClasses=()=>e("gp-relative gp-min-h-[18px] gp-min-w-[18px] gp-mt-[3px] gp-w-4 gp-h-4 gp-cursor-pointer gp-appearance-none gp-rounded-full gp-bg-light-100 gp-transition-all gp-border-light-500 gp-border-2 checked:gp-border-[#1879b9] checked:gp-border-[6px] checked:gp-after:gp-content-[''] checked:gp-after:gp-absolute checked:gp-after:gp-top-1/2 checked:gp-after:gp-left-1/2 checked:gp-after:gp-transform checked:gp-after:gp--translate-x-1/2 checked:gp-after:gp--translate-y-1/2 checked:gp-after:gp-h-2 checked:gp-after:gp-w-2 checked:gp-after:gp-rounded-full checked:gp-after:gp-bg-white disabled:gp-cursor-not-allowed"),getSellingPlanDropdownContainerClasses=()=>e("gp-relative"),getSellingPlanDropdownLabelClasses=()=>e("!gp-max-w-[calc(100%_-_66px)] gp-absolute gp-left-[12px] gp-top-[6px] gp-p-0 gp-text-xs gp-leading-[1.3] gp-text-[#737373] gp-transition-[top]"),getSellingPlanDropdownLabelSpanClasses=()=>e("gp-max-w-full"),getSellingPlanDropdownLabelInnerSpanClasses=()=>e("gp-block gp-overflow-hidden"),getSellingPlanDropdownSelectClasses=({isNoLabel:p=!1})=>e(`gp-min-h-[47px] gp-appearance-none gp-bg-transparent gp-w-full gp-whitespace-nowrap gp-rounded-[5px] gp-border gp-border-[#d9d9d9] gp-pl-[11px] gp-pr-[40px] gp-text-[14px] gp-outline-none gp-text-[#545454] gp-leading-[1.3] ${p?"gp-pt-0 gp-pb-0":"gp-pt-[21px] gp-pb-[6px]"}`),getSellingPlanDropdownOptionClasses=()=>e("gp-text-[14px] gp-text-black"),getSellingPlanDropdownIconContainerClasses=()=>e("gp-pointer-events-none gp-absolute gp-right-[2px] gp-top-[50%] gp-flex gp-h-[43%] gp-w-[40px] gp-translate-y-[-50%] gp-items-center gp-justify-center gp-border-l-[1px] gp-bg-white gp-border-[#545454]"),getSellingPlanDropdownIconClasses=()=>e("gp-h-[10px] gp-w-[10px]");export{getContainerClasses,getSellingPlanDropdownContainerClasses,getSellingPlanDropdownIconClasses,getSellingPlanDropdownIconContainerClasses,getSellingPlanDropdownLabelClasses,getSellingPlanDropdownLabelInnerSpanClasses,getSellingPlanDropdownLabelSpanClasses,getSellingPlanDropdownOptionClasses,getSellingPlanDropdownSelectClasses,getSellingPlanRadioContainerClasses,getSellingPlanRadioLabelClasses,getSellingPlanRadioOptionTextClasses,getSellingPlanRadioOptionsClasses,getSubscriptionRadioInputClasses,getSubscriptionRadioLabelClasses,getWrapperClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyle as t,filterTruthyStyles as e}from"@gem-sdk/core";import{postPurchaseSpacing as r}from"../../../../common/helper.js";let getSubscriptionStyles=r=>{let{width:i}=r??{},p=t({w:i}),l=t({rg:"
|
|
1
|
+
import{makeStyle as t,filterTruthyStyles as e}from"@gem-sdk/core";import{postPurchaseSpacing as r}from"../../../../common/helper.js";let getSubscriptionStyles=r=>{let{width:i}=r??{},p=t({w:i}),l=t({rg:"8px"});return e({...p,...l})},getSubscriptionWrapperStyles=r=>e({...t({jc:r??"left"})}),getSellingPlanRadioOptionsStyles=({sellingPlanItemGap:i,sellingType:p})=>{let l=r[i??"tight"]||"9px",o=t({rg:"subscription"===p?l:"9px"});return e({...o})};export{getSellingPlanRadioOptionsStyles,getSubscriptionStyles,getSubscriptionWrapperStyles};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{template as e,makeStyleResponsive as t}from"@gem-sdk/core";let SealSubscriptions=({setting:r,advanced:
|
|
1
|
+
import{template as e,makeStyleResponsive as t}from"@gem-sdk/core";let SealSubscriptions=({setting:r,advanced:n})=>{let{align:o}=r??{};return e`
|
|
2
2
|
<div
|
|
3
|
-
class="${
|
|
4
|
-
style="${{...t("ta",
|
|
3
|
+
class="${n?.cssClass}"
|
|
4
|
+
style="${{...t("ta",o)}}"
|
|
5
5
|
>
|
|
6
6
|
<div class="sealsubs-target-element" data-handle="{{ product.handle }}"></div>
|
|
7
7
|
</div>
|
|
@@ -37,17 +37,21 @@ import{template as e,makeStyleResponsive as t}from"@gem-sdk/core";let SealSubscr
|
|
|
37
37
|
const productWrapper = detail?.element?.closest('gp-product');
|
|
38
38
|
if (!productWrapper) return;
|
|
39
39
|
|
|
40
|
-
const
|
|
41
|
-
const
|
|
40
|
+
const gpPriceElements = productWrapper.querySelectorAll('gp-product-price .gp-price.gp-money');
|
|
41
|
+
const compareAtPriceElements = productWrapper.querySelectorAll('gp-product-price .gp-product-compare-price');
|
|
42
42
|
|
|
43
|
-
if (
|
|
44
|
-
|
|
43
|
+
if (gpPriceElements.length > 0 && typeof detail.price !== 'undefined') {
|
|
44
|
+
gpPriceElements.forEach(function(el) {
|
|
45
|
+
el.innerHTML = formatCurrency(detail.price, moneyFormatGp);
|
|
46
|
+
});
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
if (
|
|
49
|
+
if (compareAtPriceElements.length > 0) {
|
|
48
50
|
const compareAtPrice = detail?.compareAtPrice || 0;
|
|
49
51
|
setTimeout(function() {
|
|
50
|
-
|
|
52
|
+
compareAtPriceElements.forEach(function(el) {
|
|
53
|
+
el.innerHTML = formatCurrency(compareAtPrice, moneyFormatGp);
|
|
54
|
+
});
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "12.0.0-dev.
|
|
3
|
+
"version": "12.0.0-dev.57",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"i18n:generate-keys-usage": "node ./scripts/en-keys-usage.js"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/core": "12.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "12.0.0-dev.57",
|
|
31
31
|
"@gem-sdk/styles": "12.0.0-dev.53",
|
|
32
32
|
"@gem-sdk/system": "12.0.0-dev.53",
|
|
33
33
|
"@types/react-transition-group": "^4.4.12",
|