@useinsider/guido 1.0.3-beta.2cf8046 → 1.0.3-beta.2df2106
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/README.md +3 -32
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
- package/dist/composables/useActionsApi.js +1 -1
- package/dist/composables/useHtmlCompiler.js +15 -13
- package/dist/composables/useHtmlValidator.js +36 -35
- package/dist/composables/useStripo.js +29 -25
- package/dist/config/compiler/itemsCompilerRules.js +14 -0
- package/dist/enums/unsubscribe.js +27 -26
- package/dist/extensions/Blocks/Checkbox/control.js +15 -14
- package/dist/extensions/Blocks/Checkbox/template.js +14 -9
- package/dist/extensions/Blocks/Items/block.js +26 -26
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +92 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +150 -114
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +77 -4
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +3 -2
- package/dist/extensions/Blocks/Items/extension.js +7 -6
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +57 -56
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +67 -56
- package/dist/extensions/Blocks/Items/settingsPanel.js +69 -43
- package/dist/extensions/Blocks/Items/store/items-block.js +8 -4
- package/dist/extensions/Blocks/Items/template.js +147 -62
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +35 -26
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +29 -27
- package/dist/extensions/Blocks/RadioButton/control.js +18 -17
- package/dist/extensions/Blocks/RadioButton/template.js +18 -9
- package/dist/extensions/Blocks/Unsubscribe/block.js +45 -41
- package/dist/guido.css +1 -1
- package/dist/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/lodash-es/_SetCache.js +13 -0
- package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +13 -12
- package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
- package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
- package/dist/node_modules/lodash-es/_arraySome.js +9 -0
- package/dist/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/lodash-es/_baseGet.js +11 -0
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
- package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
- package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
- package/dist/node_modules/lodash-es/_baseMap.js +11 -0
- package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/lodash-es/_baseRange.js +9 -0
- package/dist/node_modules/lodash-es/_baseToString.js +18 -0
- package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
- package/dist/node_modules/lodash-es/_createRange.js +11 -0
- package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
- package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
- package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
- package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
- package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/lodash-es/_getTag.js +28 -0
- package/dist/node_modules/lodash-es/_hasPath.js +19 -0
- package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/lodash-es/_isKey.js +12 -0
- package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
- package/dist/node_modules/lodash-es/flatMap.js +8 -0
- package/dist/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/lodash-es/keysIn.js +3 -3
- package/dist/node_modules/lodash-es/map.js +11 -0
- package/dist/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/lodash-es/range.js +5 -0
- package/dist/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/lodash-es/toFinite.js +14 -0
- package/dist/node_modules/lodash-es/toNumber.js +22 -0
- package/dist/node_modules/lodash-es/toString.js +7 -0
- package/dist/src/config/compiler/itemsCompilerRules.d.ts +2 -0
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/block.d.ts +14 -0
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +15 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +8 -2
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +9 -1
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +6 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +3 -4
- package/dist/src/utils/environmentUtil.d.ts +5 -0
- package/dist/src/utils/pairProductVariables.d.ts +7 -0
- package/dist/utils/environmentUtil.js +4 -0
- package/dist/utils/pairProductVariables.js +136 -0
- package/package.json +5 -10
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import D from "./_SetCache.js";
|
|
2
|
+
import G from "./_arraySome.js";
|
|
3
|
+
import M from "./_cacheHas.js";
|
|
4
|
+
var x = 1, F = 2;
|
|
5
|
+
function U(n, e, A, d, p, f) {
|
|
6
|
+
var E = A & x, R = n.length, P = e.length;
|
|
7
|
+
if (R != P && !(E && P > R))
|
|
8
|
+
return !1;
|
|
9
|
+
var S = f.get(n), _ = f.get(e);
|
|
10
|
+
if (S && _)
|
|
11
|
+
return S == e && _ == n;
|
|
12
|
+
var v = -1, g = !0, l = A & F ? new D() : void 0;
|
|
13
|
+
for (f.set(n, e), f.set(e, n); ++v < R; ) {
|
|
14
|
+
var i = n[v], L = e[v];
|
|
15
|
+
if (d)
|
|
16
|
+
var C = E ? d(L, i, v, e, n, f) : d(i, L, v, n, e, f);
|
|
17
|
+
if (C !== void 0) {
|
|
18
|
+
if (C)
|
|
19
|
+
continue;
|
|
20
|
+
g = !1;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
if (l) {
|
|
24
|
+
if (!G(e, function(O, w) {
|
|
25
|
+
if (!M(l, w) && (i === O || p(i, O, A, d, f)))
|
|
26
|
+
return l.push(w);
|
|
27
|
+
})) {
|
|
28
|
+
g = !1;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
} else if (!(i === L || p(i, L, A, d, f))) {
|
|
32
|
+
g = !1;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return f.delete(n), f.delete(e), g;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
U as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import m from "./_Symbol.js";
|
|
2
|
+
import t from "./_Uint8Array.js";
|
|
3
|
+
import A from "./eq.js";
|
|
4
|
+
import b from "./_equalArrays.js";
|
|
5
|
+
import o from "./_mapToArray.js";
|
|
6
|
+
import d from "./_setToArray.js";
|
|
7
|
+
var L = 1, O = 2, v = "[object Boolean]", E = "[object Date]", R = "[object Error]", w = "[object Map]", B = "[object Number]", D = "[object RegExp]", P = "[object Set]", S = "[object String]", _ = "[object Symbol]", c = "[object ArrayBuffer]", x = "[object DataView]", i = m ? m.prototype : void 0, n = i ? i.valueOf : void 0;
|
|
8
|
+
function N(e, a, l, s, y, u, r) {
|
|
9
|
+
switch (l) {
|
|
10
|
+
case x:
|
|
11
|
+
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
|
12
|
+
return !1;
|
|
13
|
+
e = e.buffer, a = a.buffer;
|
|
14
|
+
case c:
|
|
15
|
+
return !(e.byteLength != a.byteLength || !u(new t(e), new t(a)));
|
|
16
|
+
case v:
|
|
17
|
+
case E:
|
|
18
|
+
case B:
|
|
19
|
+
return A(+e, +a);
|
|
20
|
+
case R:
|
|
21
|
+
return e.name == a.name && e.message == a.message;
|
|
22
|
+
case D:
|
|
23
|
+
case S:
|
|
24
|
+
return e == a + "";
|
|
25
|
+
case w:
|
|
26
|
+
var f = o;
|
|
27
|
+
case P:
|
|
28
|
+
var T = s & L;
|
|
29
|
+
if (f || (f = d), e.size != a.size && !T)
|
|
30
|
+
return !1;
|
|
31
|
+
var g = r.get(e);
|
|
32
|
+
if (g)
|
|
33
|
+
return g == a;
|
|
34
|
+
s |= O, r.set(e, a);
|
|
35
|
+
var p = b(f(e), f(a), s, y, u, r);
|
|
36
|
+
return r.delete(e), p;
|
|
37
|
+
case _:
|
|
38
|
+
if (n)
|
|
39
|
+
return n.call(e) == n.call(a);
|
|
40
|
+
}
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
N as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import x from "./_getAllKeys.js";
|
|
2
|
+
var q = 1, E = Object.prototype, F = E.hasOwnProperty;
|
|
3
|
+
function I(r, n, A, a, R, f) {
|
|
4
|
+
var v = A & q, d = x(r), g = d.length, S = x(n), _ = S.length;
|
|
5
|
+
if (g != _ && !v)
|
|
6
|
+
return !1;
|
|
7
|
+
for (var l = g; l--; ) {
|
|
8
|
+
var i = d[l];
|
|
9
|
+
if (!(v ? i in n : F.call(n, i)))
|
|
10
|
+
return !1;
|
|
11
|
+
}
|
|
12
|
+
var O = f.get(r), w = f.get(n);
|
|
13
|
+
if (O && w)
|
|
14
|
+
return O == n && w == r;
|
|
15
|
+
var s = !0;
|
|
16
|
+
f.set(r, n), f.set(n, r);
|
|
17
|
+
for (var t = v; ++l < g; ) {
|
|
18
|
+
i = d[l];
|
|
19
|
+
var p = r[i], e = n[i];
|
|
20
|
+
if (a)
|
|
21
|
+
var L = v ? a(e, p, i, n, r, f) : a(p, e, i, r, n, f);
|
|
22
|
+
if (!(L === void 0 ? p === e || R(p, e, A, a, f) : L)) {
|
|
23
|
+
s = !1;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
t || (t = i == "constructor");
|
|
27
|
+
}
|
|
28
|
+
if (s && !t) {
|
|
29
|
+
var u = r.constructor, P = n.constructor;
|
|
30
|
+
u != P && "constructor" in r && "constructor" in n && !(typeof u == "function" && u instanceof u && typeof P == "function" && P instanceof P) && (s = !1);
|
|
31
|
+
}
|
|
32
|
+
return f.delete(r), f.delete(n), s;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
I as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import o from "./_arrayFilter.js";
|
|
2
|
+
import a from "./stubArray.js";
|
|
3
|
+
var n = Object.prototype, l = n.propertyIsEnumerable, t = Object.getOwnPropertySymbols, m = t ? function(r) {
|
|
4
|
+
return r == null ? [] : (r = Object(r), o(t(r), function(e) {
|
|
5
|
+
return l.call(r, e);
|
|
6
|
+
}));
|
|
7
|
+
} : a;
|
|
8
|
+
export {
|
|
9
|
+
m as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import e from "./_DataView.js";
|
|
2
|
+
import a from "./_Map.js";
|
|
3
|
+
import o from "./_Promise.js";
|
|
4
|
+
import i from "./_Set.js";
|
|
5
|
+
import n from "./_WeakMap.js";
|
|
6
|
+
import S from "./_baseGetTag.js";
|
|
7
|
+
import t from "./_toSource.js";
|
|
8
|
+
var g = "[object Map]", j = "[object Object]", f = "[object Promise]", u = "[object Set]", w = "[object WeakMap]", b = "[object DataView]", T = t(e), C = t(a), M = t(o), d = t(i), v = t(n), r = S;
|
|
9
|
+
(e && r(new e(new ArrayBuffer(1))) != b || a && r(new a()) != g || o && r(o.resolve()) != f || i && r(new i()) != u || n && r(new n()) != w) && (r = function(m) {
|
|
10
|
+
var c = S(m), p = c == j ? m.constructor : void 0, s = p ? t(p) : "";
|
|
11
|
+
if (s)
|
|
12
|
+
switch (s) {
|
|
13
|
+
case T:
|
|
14
|
+
return b;
|
|
15
|
+
case C:
|
|
16
|
+
return g;
|
|
17
|
+
case M:
|
|
18
|
+
return f;
|
|
19
|
+
case d:
|
|
20
|
+
return u;
|
|
21
|
+
case v:
|
|
22
|
+
return w;
|
|
23
|
+
}
|
|
24
|
+
return c;
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
r as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import t from "./_castPath.js";
|
|
2
|
+
import a from "./isArguments.js";
|
|
3
|
+
import u from "./isArray.js";
|
|
4
|
+
import o from "./_isIndex.js";
|
|
5
|
+
import e from "./isLength.js";
|
|
6
|
+
import g from "./_toKey.js";
|
|
7
|
+
function P(r, m, s) {
|
|
8
|
+
m = t(m, r);
|
|
9
|
+
for (var n = -1, i = m.length, f = !1; ++n < i; ) {
|
|
10
|
+
var l = g(m[n]);
|
|
11
|
+
if (!(f = r != null && s(r, l)))
|
|
12
|
+
break;
|
|
13
|
+
r = r[l];
|
|
14
|
+
}
|
|
15
|
+
return f || ++n != i ? f : (i = r == null ? 0 : r.length, !!i && e(i) && o(l, i) && (u(r) || a(r)));
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
P as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import o from "./isArray.js";
|
|
2
|
+
import n from "./isSymbol.js";
|
|
3
|
+
var i = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/;
|
|
4
|
+
function m(r, e) {
|
|
5
|
+
if (o(r))
|
|
6
|
+
return !1;
|
|
7
|
+
var t = typeof r;
|
|
8
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || n(r) ? !0 : s.test(r) || !i.test(r) || e != null && r in Object(e);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
m as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import u from "./_memoizeCapped.js";
|
|
2
|
+
var c = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, d = /\\(\\)?/g, h = u(function(e) {
|
|
3
|
+
var r = [];
|
|
4
|
+
return e.charCodeAt(0) === 46 && r.push(""), e.replace(c, function(a, p, o, t) {
|
|
5
|
+
r.push(o ? t.replace(d, "$1") : p || a);
|
|
6
|
+
}), r;
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import n from "./toNumber.js";
|
|
2
|
+
var t = 1 / 0, o = 17976931348623157e292;
|
|
3
|
+
function I(r) {
|
|
4
|
+
if (!r)
|
|
5
|
+
return r === 0 ? r : 0;
|
|
6
|
+
if (r = n(r), r === t || r === -t) {
|
|
7
|
+
var i = r < 0 ? -1 : 1;
|
|
8
|
+
return i * o;
|
|
9
|
+
}
|
|
10
|
+
return r === r ? r : 0;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
I as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import n from "./_baseTrim.js";
|
|
2
|
+
import f from "./isObject.js";
|
|
3
|
+
import o from "./isSymbol.js";
|
|
4
|
+
var s = NaN, m = /^[-+]0x[0-9a-f]+$/i, p = /^0b[01]+$/i, e = /^0o[0-7]+$/i, b = parseInt;
|
|
5
|
+
function O(r) {
|
|
6
|
+
if (typeof r == "number")
|
|
7
|
+
return r;
|
|
8
|
+
if (o(r))
|
|
9
|
+
return s;
|
|
10
|
+
if (f(r)) {
|
|
11
|
+
var t = typeof r.valueOf == "function" ? r.valueOf() : r;
|
|
12
|
+
r = f(t) ? t + "" : t;
|
|
13
|
+
}
|
|
14
|
+
if (typeof r != "string")
|
|
15
|
+
return r === 0 ? r : +r;
|
|
16
|
+
r = n(r);
|
|
17
|
+
var i = p.test(r);
|
|
18
|
+
return i || e.test(r) ? b(r.slice(2), i ? 2 : 8) : m.test(r) ? s : +r;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
O as default
|
|
22
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td
|
|
1
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"checkbox-block\"\n class=\"\n checkbox-block\n checkbox-block-v2\n esd-block-checkbox\n esd-checkbox-block\n esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" style=\"vertical-align: top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
2
|
/**
|
|
3
3
|
* @returns The template for the default checkbox block
|
|
4
4
|
*/
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { Block, BlockCompositionType, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
2
|
export declare const BLOCK_ID = "items-block";
|
|
3
|
+
/**
|
|
4
|
+
* Items Block extension for Stripo email editor.
|
|
5
|
+
*
|
|
6
|
+
* Displays personalized product items (cart items, browsed items, or purchased items)
|
|
7
|
+
* in a configurable card layout with horizontal or vertical orientation.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Multiple product data sources (cart, browsed, purchased)
|
|
11
|
+
* - Configurable card composition (image, name, price, quantity, button)
|
|
12
|
+
* - Orientation control (horizontal/vertical)
|
|
13
|
+
* - Price formatting and currency display options
|
|
14
|
+
* - Product name trimming
|
|
15
|
+
* - Onboarding support
|
|
16
|
+
*/
|
|
3
17
|
export declare class ItemsBlock extends Block {
|
|
4
18
|
getId(): string;
|
|
5
19
|
getIcon(): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
import { CommonControl } from '../../../common-control';
|
|
3
|
+
import { ItemsBlockControlId } from '../../enums/controlEnums';
|
|
4
|
+
export declare const CONTROL_BLOCK_ID = ItemsBlockControlId.PRICE_ORIENTATION;
|
|
5
|
+
export declare class PriceOrientationControl extends CommonControl {
|
|
6
|
+
private store;
|
|
7
|
+
getId(): string;
|
|
8
|
+
getTemplate(): string;
|
|
9
|
+
onRender(): void;
|
|
10
|
+
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
+
_onPriceOrientationChange(value: string): void;
|
|
12
|
+
private _updateHorizontalLayout;
|
|
13
|
+
private _updateVerticalLayout;
|
|
14
|
+
_getPriceOrientation(): string;
|
|
15
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductType } from '@@/Types/extensions/items';
|
|
1
2
|
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
3
|
import { CommonControl } from '../../common-control';
|
|
3
4
|
export declare const CONTROL_BLOCK_ID = "ui-elements-items-block";
|
|
@@ -12,7 +13,7 @@ export declare class ItemsBlockControl extends CommonControl {
|
|
|
12
13
|
_getOrientation(): string;
|
|
13
14
|
_getItemInCart(): string;
|
|
14
15
|
_onOrientationChange(value: string): void;
|
|
15
|
-
_onItemsTypeChange(value: string
|
|
16
|
+
_onItemsTypeChange(value: string): void;
|
|
16
17
|
_onItemIdsChange(value: string): void;
|
|
17
18
|
_initializeSelectItems(): void;
|
|
18
19
|
_listenToFormUpdates(): void;
|
|
@@ -30,8 +31,13 @@ export declare class ItemsBlockControl extends CommonControl {
|
|
|
30
31
|
_updatePrice(price: string): void;
|
|
31
32
|
_updateOriginalPrice(originalPrice: string): void;
|
|
32
33
|
_updateQuantity(quantity: string): void;
|
|
33
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @todo Optimize template reordering for performance.
|
|
36
|
+
* @description Reorders the template structure based on current orientation and visibility settings.
|
|
37
|
+
*/
|
|
34
38
|
_reOrderTemplate(): void;
|
|
39
|
+
_updateDataTypeAttributes(itemsType: ProductType): void;
|
|
40
|
+
_updateDataNumberAttributes(itemId: string): void;
|
|
35
41
|
_reFillTemplate(): void;
|
|
36
42
|
_recalculateTrimming(): void;
|
|
37
43
|
private _getParagraphFromBlock;
|
|
@@ -44,6 +44,7 @@ export declare enum ItemsBlockControlId {
|
|
|
44
44
|
PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control",
|
|
45
45
|
PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control",
|
|
46
46
|
PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control",
|
|
47
|
+
PRICE_ORIENTATION = "items-block-price-orientation-control",
|
|
47
48
|
NAME_ALIGN = "items-block-name-align-control",
|
|
48
49
|
NAME_COLOR = "items-block-name-color-control",
|
|
49
50
|
NAME_SIZE = "items-block-name-size-control",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const templateFirstLine = "<td align=\"center\" class=\"ins-product-td items-block items-block-v2\">";
|
|
1
2
|
export declare const configAttributes: {
|
|
2
3
|
TYPE: string;
|
|
3
4
|
ITEMS_INDEX_SELECT_CONTROL_VALUE: string;
|
|
@@ -7,6 +8,7 @@ export declare const configAttributes: {
|
|
|
7
8
|
PRODUCT_PRICE_FORMATTED: string;
|
|
8
9
|
PRODUCT_PRICE_CURRENCY_SYMBOL: string;
|
|
9
10
|
PRODUCT_PRICE_CURRENCY_LOCATION: string;
|
|
11
|
+
PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION: string;
|
|
10
12
|
PRODUCT_BUTTON_LINK: string;
|
|
11
13
|
PRODUCT_IMAGE_LINK: string;
|
|
12
14
|
PRODUCT_NAME_CONTROL_VALUE: string;
|
|
@@ -158,3 +160,4 @@ export declare const productPairs: {
|
|
|
158
160
|
};
|
|
159
161
|
};
|
|
160
162
|
};
|
|
163
|
+
export declare const itemsBlockDynamicVariables: string[];
|
|
@@ -10,6 +10,7 @@ interface ItemsBlockState {
|
|
|
10
10
|
currencySymbol: string;
|
|
11
11
|
currencyLocation: string;
|
|
12
12
|
formattedPrice: boolean;
|
|
13
|
+
priceOrientation: 'vertical' | 'horizontal';
|
|
13
14
|
templateData: {
|
|
14
15
|
imageSrc: string;
|
|
15
16
|
name: string;
|
|
@@ -30,6 +31,7 @@ export declare const useItemsBlockStore: import("pinia").StoreDefinition<"guidoI
|
|
|
30
31
|
setCurrencySymbol(currencySymbol: string): void;
|
|
31
32
|
setCurrencyLocation(currencyLocation: string): void;
|
|
32
33
|
setFormattedPrice(formattedPrice: boolean): void;
|
|
34
|
+
setPriceOrientation(priceOrientation: "vertical" | "horizontal"): void;
|
|
33
35
|
setTemplateData(templateData: ItemsBlockState["templateData"]): void;
|
|
34
36
|
updateFromAttributes(attributes: {
|
|
35
37
|
itemsType?: string;
|
|
@@ -10,7 +10,15 @@ type TemplateParameters = {
|
|
|
10
10
|
formattedPrice?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Generates the default template for the Items Block.
|
|
14
|
+
* @param params - Template parameters including orientation, items type, item ID, and formatting options
|
|
15
|
+
* @param params.orientation - Layout orientation ('vertical' or 'horizontal')
|
|
16
|
+
* @param params.itemsType - Product data source type ('CART_ITEMS', 'BROWSED_ITEMS', or 'PURCHASED_ITEMS')
|
|
17
|
+
* @param params.itemId - The merge tag for the item (e.g., '{{Abandoned Cart Item (1) Url}}')
|
|
18
|
+
* @param params.currencySymbol - Currency symbol to display (e.g., 'USD')
|
|
19
|
+
* @param params.currencyLocation - Currency position ('0' for before, '1' for after)
|
|
20
|
+
* @param params.formattedPrice - Whether to use formatted price display
|
|
21
|
+
* @returns HTML template string for the Items Block
|
|
14
22
|
*/
|
|
15
23
|
export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, formattedPrice, }: TemplateParameters): string;
|
|
16
24
|
export default migrationTemplate;
|