@gem-sdk/components 2.2.0 → 2.3.0

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.
@@ -5,17 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var core = require('@gem-sdk/core');
6
6
 
7
7
  const EcomsendBackInStockAlert = ({ setting, advanced })=>{
8
- const { align } = setting ?? {};
8
+ const { align, productId } = setting ?? {};
9
9
  return core.template`
10
- <div
11
- class="${advanced?.cssClass}"
12
- style="${{
10
+ <div
11
+ class="${advanced?.cssClass}"
12
+ style="${{
13
13
  ...core.makeStyleResponsive('ta', align)
14
14
  }}"
15
- >
16
- <div id="sealapps-bis-widget"></div>
17
- </div>
18
- `;
15
+ >
16
+ ${productId ? `<div style="display: block" class="ecomsend-bis-block" data-product-id="${productId}"></div>` : `<div id="sealapps-bis-widget"></div>`}
17
+ </div>
18
+ `;
19
19
  };
20
20
 
21
21
  exports.default = EcomsendBackInStockAlert;
@@ -14,20 +14,44 @@ const AppConfig = {
14
14
  };
15
15
  const widgetTypeOptions = [
16
16
  {
17
- label: 'Fly Bundles: Volume Block',
18
- value: 'app-block-volume'
17
+ label: 'Fly Bundles: Quantity Breaks',
18
+ value: 'app-block-volume',
19
+ hideOnPage: [
20
+ 'GP_ARTICLE',
21
+ 'GP_BLOG',
22
+ 'GP_COLLECTION',
23
+ 'GP_INDEX',
24
+ 'GP_STATIC'
25
+ ]
19
26
  },
20
27
  {
21
- label: 'Fly Bundles: Upsell Block',
22
- value: 'app-block-upsell-block'
28
+ label: 'Fly Bundles: Frequently Bought Together',
29
+ value: 'app-block-upsell-block',
30
+ hideOnPage: [
31
+ 'GP_ARTICLE',
32
+ 'GP_BLOG',
33
+ 'GP_COLLECTION',
34
+ 'GP_INDEX',
35
+ 'GP_STATIC'
36
+ ]
23
37
  },
24
38
  {
25
- label: 'Fly Bundles: Fixed Block',
26
- value: 'app-block-fbt'
39
+ label: 'Fly Bundles: Product Bundles',
40
+ value: 'app-block-fbt',
41
+ hideOnPage: [
42
+ 'GP_ARTICLE',
43
+ 'GP_BLOG',
44
+ 'GP_COLLECTION',
45
+ 'GP_INDEX',
46
+ 'GP_STATIC'
47
+ ]
27
48
  },
28
49
  {
29
50
  label: 'Fly Bundles: Custom Block',
30
- value: 'app-block-custom'
51
+ value: 'app-block-custom',
52
+ hideOnPage: [
53
+ 'GP_PRODUCT'
54
+ ]
31
55
  }
32
56
  ];
33
57
  const FlyBundlesUpsellsFbtContent = ({ widgetName })=>{
@@ -54,6 +54,11 @@ const config = {
54
54
  ],
55
55
  default: 'product-restore-email'
56
56
  },
57
+ {
58
+ id: 'productId',
59
+ label: 'Product ID',
60
+ type: 'input'
61
+ },
57
62
  {
58
63
  id: 'install',
59
64
  type: 'open-link',
@@ -121,6 +126,17 @@ const config = {
121
126
  setting: {
122
127
  id: 'align'
123
128
  }
129
+ },
130
+ {
131
+ type: 'control',
132
+ setting: {
133
+ id: 'productId'
134
+ },
135
+ options: {
136
+ hideOnPages: [
137
+ 'GP_PRODUCT'
138
+ ]
139
+ }
124
140
  }
125
141
  ]
126
142
  };
@@ -114,6 +114,11 @@ const config = {
114
114
  },
115
115
  label: {
116
116
  en: 'Custom Block ID'
117
+ },
118
+ options: {
119
+ hideOnPages: [
120
+ 'GP_PRODUCT'
121
+ ]
117
122
  }
118
123
  },
119
124
  {
@@ -1,17 +1,17 @@
1
1
  import { template, makeStyleResponsive } from '@gem-sdk/core';
2
2
 
3
3
  const EcomsendBackInStockAlert = ({ setting, advanced })=>{
4
- const { align } = setting ?? {};
4
+ const { align, productId } = setting ?? {};
5
5
  return template`
6
- <div
7
- class="${advanced?.cssClass}"
8
- style="${{
6
+ <div
7
+ class="${advanced?.cssClass}"
8
+ style="${{
9
9
  ...makeStyleResponsive('ta', align)
10
10
  }}"
11
- >
12
- <div id="sealapps-bis-widget"></div>
13
- </div>
14
- `;
11
+ >
12
+ ${productId ? `<div style="display: block" class="ecomsend-bis-block" data-product-id="${productId}"></div>` : `<div id="sealapps-bis-widget"></div>`}
13
+ </div>
14
+ `;
15
15
  };
16
16
 
17
17
  export { EcomsendBackInStockAlert as default };
@@ -10,20 +10,44 @@ const AppConfig = {
10
10
  };
11
11
  const widgetTypeOptions = [
12
12
  {
13
- label: 'Fly Bundles: Volume Block',
14
- value: 'app-block-volume'
13
+ label: 'Fly Bundles: Quantity Breaks',
14
+ value: 'app-block-volume',
15
+ hideOnPage: [
16
+ 'GP_ARTICLE',
17
+ 'GP_BLOG',
18
+ 'GP_COLLECTION',
19
+ 'GP_INDEX',
20
+ 'GP_STATIC'
21
+ ]
15
22
  },
16
23
  {
17
- label: 'Fly Bundles: Upsell Block',
18
- value: 'app-block-upsell-block'
24
+ label: 'Fly Bundles: Frequently Bought Together',
25
+ value: 'app-block-upsell-block',
26
+ hideOnPage: [
27
+ 'GP_ARTICLE',
28
+ 'GP_BLOG',
29
+ 'GP_COLLECTION',
30
+ 'GP_INDEX',
31
+ 'GP_STATIC'
32
+ ]
19
33
  },
20
34
  {
21
- label: 'Fly Bundles: Fixed Block',
22
- value: 'app-block-fbt'
35
+ label: 'Fly Bundles: Product Bundles',
36
+ value: 'app-block-fbt',
37
+ hideOnPage: [
38
+ 'GP_ARTICLE',
39
+ 'GP_BLOG',
40
+ 'GP_COLLECTION',
41
+ 'GP_INDEX',
42
+ 'GP_STATIC'
43
+ ]
23
44
  },
24
45
  {
25
46
  label: 'Fly Bundles: Custom Block',
26
- value: 'app-block-custom'
47
+ value: 'app-block-custom',
48
+ hideOnPage: [
49
+ 'GP_PRODUCT'
50
+ ]
27
51
  }
28
52
  ];
29
53
  const FlyBundlesUpsellsFbtContent = ({ widgetName })=>{
@@ -50,6 +50,11 @@ const config = {
50
50
  ],
51
51
  default: 'product-restore-email'
52
52
  },
53
+ {
54
+ id: 'productId',
55
+ label: 'Product ID',
56
+ type: 'input'
57
+ },
53
58
  {
54
59
  id: 'install',
55
60
  type: 'open-link',
@@ -117,6 +122,17 @@ const config = {
117
122
  setting: {
118
123
  id: 'align'
119
124
  }
125
+ },
126
+ {
127
+ type: 'control',
128
+ setting: {
129
+ id: 'productId'
130
+ },
131
+ options: {
132
+ hideOnPages: [
133
+ 'GP_PRODUCT'
134
+ ]
135
+ }
120
136
  }
121
137
  ]
122
138
  };
@@ -110,6 +110,11 @@ const config = {
110
110
  },
111
111
  label: {
112
112
  en: 'Custom Block ID'
113
+ },
114
+ options: {
115
+ hideOnPages: [
116
+ 'GP_PRODUCT'
117
+ ]
113
118
  }
114
119
  },
115
120
  {
@@ -3532,6 +3532,7 @@ type EcomsendBackInStockAlertProps = BaseProps<{
3532
3532
  openApp?: any;
3533
3533
  install?: any;
3534
3534
  appBlockId?: string;
3535
+ productId?: string;
3535
3536
  widgetType?: string;
3536
3537
  }>;
3537
3538
  declare const EcomsendBackInStockAlert$1: React.FC<EcomsendBackInStockAlertProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",