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