@gem-sdk/components 2.0.0-dev.387 → 2.0.0-dev.389

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.
@@ -52,11 +52,16 @@ const ProductBundleDiscount = ({ rawChildren, setting, styles: styles$1, advance
52
52
  return core.template`
53
53
  {% for productBundle in productBundleItem %}
54
54
  ${system.Liquid(`
55
- {% assign attrs = productBundle | split: '($3)' %}
55
+ {% assign attrs = productBundle | split: '($3)' %}
56
56
  {% assign parsedAttrs = '' %}
57
57
  {% for attr in attrs %}
58
58
  {% assign attrParts = attr | split: '($:)' %}
59
- {% assign parsedAttrs = parsedAttrs | append: attrParts[0] | append: '=' | append: attrParts[2] | append: ' ' %}
59
+ {% assign attrKey = attrParts[0] %}
60
+ {% assign attrValue = attrParts[2] | strip %}
61
+
62
+ {% if attrValue != '' %}
63
+ {% assign parsedAttrs = parsedAttrs | append: attrKey | append: '=' | append: attrValue | append: ' ' %}
64
+ {% endif %}
60
65
  {% endfor %}
61
66
  `)}
62
67
  ${system.LiquidIf(`forloop.index0 == ${i}`, renderBundleItem('{{ parsedAttrs | strip }}', i))}
@@ -2,11 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var thirdParty = require('../helpers/thirdParty.js');
5
+ var core = require('@gem-sdk/core');
6
6
 
7
7
  const EcomsendBackInStockAlert = ({ setting, advanced })=>{
8
- const { align, appBlockId } = setting ?? {};
9
- return thirdParty.getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
8
+ const { align } = setting ?? {};
9
+ return core.template`
10
+ <div
11
+ class="${advanced?.cssClass}"
12
+ style="${{
13
+ ...core.makeStyleResponsive('ta', align)
14
+ }}"
15
+ >
16
+ <div id="sealapps-bis-widget"></div>
17
+ </div>
18
+ `;
10
19
  };
11
20
 
12
21
  exports.default = EcomsendBackInStockAlert;
@@ -44,11 +44,6 @@ const config = {
44
44
  {
45
45
  id: 'setting',
46
46
  controls: [
47
- {
48
- id: 'appBlockId',
49
- type: 'input',
50
- default: ''
51
- },
52
47
  {
53
48
  id: 'widgetType',
54
49
  label: 'Choose widget',
@@ -48,11 +48,16 @@ const ProductBundleDiscount = ({ rawChildren, setting, styles, advanced, style }
48
48
  return template`
49
49
  {% for productBundle in productBundleItem %}
50
50
  ${Liquid(`
51
- {% assign attrs = productBundle | split: '($3)' %}
51
+ {% assign attrs = productBundle | split: '($3)' %}
52
52
  {% assign parsedAttrs = '' %}
53
53
  {% for attr in attrs %}
54
54
  {% assign attrParts = attr | split: '($:)' %}
55
- {% assign parsedAttrs = parsedAttrs | append: attrParts[0] | append: '=' | append: attrParts[2] | append: ' ' %}
55
+ {% assign attrKey = attrParts[0] %}
56
+ {% assign attrValue = attrParts[2] | strip %}
57
+
58
+ {% if attrValue != '' %}
59
+ {% assign parsedAttrs = parsedAttrs | append: attrKey | append: '=' | append: attrValue | append: ' ' %}
60
+ {% endif %}
56
61
  {% endfor %}
57
62
  `)}
58
63
  ${LiquidIf(`forloop.index0 == ${i}`, renderBundleItem('{{ parsedAttrs | strip }}', i))}
@@ -1,8 +1,17 @@
1
- import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
1
+ import { template, makeStyleResponsive } from '@gem-sdk/core';
2
2
 
3
3
  const EcomsendBackInStockAlert = ({ setting, advanced })=>{
4
- const { align, appBlockId } = setting ?? {};
5
- return getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
4
+ const { align } = setting ?? {};
5
+ return template`
6
+ <div
7
+ class="${advanced?.cssClass}"
8
+ style="${{
9
+ ...makeStyleResponsive('ta', align)
10
+ }}"
11
+ >
12
+ <div id="sealapps-bis-widget"></div>
13
+ </div>
14
+ `;
6
15
  };
7
16
 
8
17
  export { EcomsendBackInStockAlert as default };
@@ -40,11 +40,6 @@ const config = {
40
40
  {
41
41
  id: 'setting',
42
42
  controls: [
43
- {
44
- id: 'appBlockId',
45
- type: 'input',
46
- default: ''
47
- },
48
43
  {
49
44
  id: 'widgetType',
50
45
  label: 'Choose widget',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.387",
3
+ "version": "2.0.0-dev.389",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -22,7 +22,7 @@
22
22
  "relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
23
23
  },
24
24
  "devDependencies": {
25
- "@gem-sdk/core": "2.0.0-dev.386",
25
+ "@gem-sdk/core": "2.0.0-dev.388",
26
26
  "@gem-sdk/styles": "2.0.0-dev.381",
27
27
  "@gem-sdk/system": "2.0.0-dev.371",
28
28
  "@types/react-transition-group": "^4.4.5"