@useinsider/guido 3.22.0 → 3.23.0-beta.0e4cf11
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 +42 -5
- package/dist/@types/config/schemas.js +11 -10
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +124 -103
- package/dist/components/organisms/AutoSaveController.vue2.js +20 -10
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +58 -73
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +99 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +11 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +60 -35
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +11 -11
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +9 -9
- package/dist/composables/useAccessibilityApi.js +51 -0
- package/dist/composables/useCustomInterfaceAppearance.js +42 -41
- package/dist/composables/useEditorOpenMetrics.js +167 -0
- package/dist/composables/useStripo.js +93 -82
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +22 -22
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/config/migrator/recommendation/compositionMapper.js +56 -49
- package/dist/config/migrator/recommendation/extractors.js +100 -40
- package/dist/config/migrator/recommendation/htmlBuilder.js +285 -207
- package/dist/config/migrator/recommendation/settingsMapper.js +37 -36
- package/dist/config/migrator/recommendation/themeMapper.js +53 -41
- package/dist/config/migrator/recommendationMigrator.js +68 -61
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -17
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +14 -17
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -17
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +9 -10
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -13
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +29 -30
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +15 -16
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +25 -26
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +27 -28
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +75 -80
- package/dist/extensions/Blocks/Recommendation/block.js +33 -24
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +27 -26
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +13 -13
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +165 -175
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +8 -8
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +15 -15
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +12 -12
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +23 -22
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +19 -18
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +82 -91
- package/dist/extensions/Blocks/Recommendation/utils/inlinePriceOrder.js +12 -0
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +3 -2
- package/dist/extensions/Blocks/common-control.js +62 -55
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -10
- package/dist/package.json.js +6 -4
- package/dist/public/prefetchRuntime.js +4 -0
- package/dist/sprite.svg +10 -0
- package/dist/src/@types/config/schemas.d.ts +2 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +19 -1
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -19
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -19
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useEditorOpenMetrics.d.ts +27 -0
- package/dist/src/composables/useStripo.d.ts +3 -2
- package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +3 -1
- package/dist/src/config/migrator/recommendation/extractors.d.ts +35 -6
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +3 -1
- package/dist/src/config/migrator/recommendation/themeMapper.d.ts +3 -1
- package/dist/src/config/migrator/recommendation/types.d.ts +11 -1
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +5 -10
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +1 -13
- package/dist/src/extensions/Blocks/Recommendation/utils/inlinePriceOrder.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +2 -19
- package/dist/src/extensions/Blocks/common-control.d.ts +2 -0
- package/dist/src/library.d.ts +1 -0
- package/dist/src/public/prefetchRuntime.d.ts +1 -0
- package/dist/src/stores/autosave.d.ts +73 -1
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/onboarding.d.ts +966 -35
- package/dist/src/stores/unsubscribe.d.ts +10 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/runtimePrefetch.d.ts +4 -0
- package/dist/src/utils/stripoRuntime.d.ts +3 -0
- package/dist/src/utils/templatePreparation.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +5 -8
- package/dist/static/stripo-runtime-manifest.json.js +9 -0
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/autosave.js +12 -7
- package/dist/stores/editor.js +8 -3
- package/dist/stores/onboarding.js +48 -22
- package/dist/stores/unsubscribe.js +33 -29
- package/dist/utils/runtimePrefetch.js +26 -0
- package/dist/utils/stripoRuntime.js +13 -0
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +8 -3
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { RecommendationBlockId as g } from "../../../extensions/Blocks/Recommendation/constants/blockIds.js";
|
|
2
|
-
import { CSS_CLASS_SKIP_COMPILE as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { CSS_CLASS_SKIP_COMPILE as dt, ATTR_RECOMMENDATION_TITLE as pt, CURRENCY_ATTR as O, ATTR_PRODUCT_PRICE as v, ATTR_PRODUCT_OLD_PRICE as k, ATTR_PRODUCT_IMAGE as L, ATTR_PRODUCT_BUTTON as U, CSS_CLASS_RECO_BUTTON as J, ATTR_PRODUCT_NAME as q, ATTR_PRODUCT_OMNIBUS_PRICE as H, ATTR_PRODUCT_OMNIBUS_DISCOUNT as Q, ATTR_CUSTOM_PREFIX as Z } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
3
|
+
import { CSS_CLASS_NO_MOBILE_LAYOUT as ut } from "../../../extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js";
|
|
4
|
+
import { CSS_CLASS_TEXT_TRIM as bt } from "../../../extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js";
|
|
5
|
+
import { buildTitleRows as $t } from "../../../extensions/Blocks/Recommendation/templates/titleRows.js";
|
|
6
|
+
import { compositionKeyToProductAttr as W, bareAttributeName as tt } from "../../../extensions/Blocks/Recommendation/utils/compositionKeys.js";
|
|
7
|
+
import { resolveInlinePriceOrder as gt } from "../../../extensions/Blocks/Recommendation/utils/inlinePriceOrder.js";
|
|
8
|
+
import { formatPrice as V } from "../../../extensions/Blocks/Recommendation/utils/priceFormatter.js";
|
|
6
9
|
import { escapeHtml as r } from "../../../utils/htmlEscape.js";
|
|
7
|
-
import { appendStyle as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
+
import { appendStyle as m } from "./themeMapper.js";
|
|
11
|
+
const et = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png", ot = "attribute-cell", nt = "Buy", lt = "border-width: 1px; background: rgb(217, 234, 211); border-color: rgb(106, 168, 79)", it = "color: rgb(56, 118, 29); background: rgb(217, 234, 211); font-family: arial, 'helvetica neue', helvetica, sans-serif; font-size: 16px; font-weight: normal; line-height: 120%; mso-border-alt: 10px solid rgb(217, 234, 211); mso-padding-alt: 0", mt = "ins-recommendation-product-container ins-recommendation-desktop-container", ft = "ins-recommendation-product-container ins-recommendation-mobile-container", st = "font-size: 16px; color: #333333", j = "font-size: 14px; color: #999999", ct = `${j}; text-decoration: line-through; margin: 0`;
|
|
12
|
+
function yt(t) {
|
|
10
13
|
return t.replace(/>\s+</g, "><").trim();
|
|
11
14
|
}
|
|
12
15
|
function f(t) {
|
|
13
16
|
return t ? ` align="${r(t)}"` : ' align="center"';
|
|
14
17
|
}
|
|
15
|
-
function
|
|
18
|
+
function P() {
|
|
16
19
|
return {
|
|
17
20
|
tdStyle: "",
|
|
18
21
|
pStyle: "",
|
|
@@ -21,25 +24,28 @@ function _() {
|
|
|
21
24
|
textTrimming: !1
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
return t ? { ...t, wrapBold: !0 } : { ...
|
|
27
|
+
function G(t) {
|
|
28
|
+
return t ? { ...t, wrapBold: !0 } : { ...P(), wrapBold: !0 };
|
|
26
29
|
}
|
|
27
|
-
function
|
|
28
|
-
let
|
|
29
|
-
return
|
|
30
|
+
function x(t, e) {
|
|
31
|
+
let o = r(t);
|
|
32
|
+
return e.wrapBold && e.wrapItalic ? o = `<strong><em>${o}</em></strong>` : e.wrapBold ? o = `<strong>${o}</strong>` : e.wrapItalic && (o = `<em>${o}</em>`), o;
|
|
30
33
|
}
|
|
31
34
|
function u(t) {
|
|
32
35
|
return t ? ` style="${r(t)}"` : "";
|
|
33
36
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
37
|
+
function D(t) {
|
|
38
|
+
return t.textTrimming ? ` ${bt}` : "";
|
|
36
39
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
40
|
+
function R(t, e) {
|
|
41
|
+
return `<td width="${t}%" class="${ot}" ${e}`;
|
|
42
|
+
}
|
|
43
|
+
function St(t, e, o, n) {
|
|
44
|
+
const s = t.width ? ` width="${t.width}"` : "", l = t.height ? ` height="${t.height}"` : "", i = ["display: block", "max-width: 100%", "height: auto"];
|
|
39
45
|
t.width && i.push(`width: ${t.width}px`), t.height && i.push(`height: ${t.height}px`);
|
|
40
|
-
const c = i.join("; "), a =
|
|
46
|
+
const c = i.join("; "), a = o ? ` style="background-color: ${r(o)}"` : "";
|
|
41
47
|
return `
|
|
42
|
-
${
|
|
48
|
+
${R(n, 'valign="top" style="padding: 0 5px; height: 100%"')}>
|
|
43
49
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
44
50
|
class="product-card-segment"${a}>
|
|
45
51
|
<tbody>
|
|
@@ -47,9 +53,9 @@ function at(t, o, e, s) {
|
|
|
47
53
|
<td align="center"
|
|
48
54
|
class="esd-block-image product-image es-p5"
|
|
49
55
|
esd-extension-block-id="${g.IMAGE}">
|
|
50
|
-
<a target="_blank" href="https://example.com/product/${
|
|
51
|
-
<img src="${
|
|
52
|
-
class="adapt-img"${
|
|
56
|
+
<a target="_blank" href="https://example.com/product/${e + 1}">
|
|
57
|
+
<img src="${et}" alt="Product Name"
|
|
58
|
+
class="adapt-img"${s}${l}
|
|
53
59
|
style="${c}">
|
|
54
60
|
</a>
|
|
55
61
|
</td>
|
|
@@ -59,18 +65,18 @@ function at(t, o, e, s) {
|
|
|
59
65
|
</td>
|
|
60
66
|
`;
|
|
61
67
|
}
|
|
62
|
-
function
|
|
63
|
-
const a = `table-layout: fixed${
|
|
68
|
+
function F(t, e, o, n, s, l, i) {
|
|
69
|
+
const a = `table-layout: fixed${l ? `; background-color: ${r(l)}` : ""}`, p = u(s.tdStyle), d = f(s.align), b = `esd-block-text ${e}`.trim(), $ = m(n, s.pStyle);
|
|
64
70
|
return `
|
|
65
|
-
${
|
|
71
|
+
${R(i, 'valign="top" style="padding: 0 5px; height: 100%"')}>
|
|
66
72
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
67
73
|
class="product-card-segment" style="${a}">
|
|
68
74
|
<tbody>
|
|
69
75
|
<tr valign="top">
|
|
70
|
-
<td${
|
|
76
|
+
<td${d}
|
|
71
77
|
class="${b}"
|
|
72
|
-
esd-extension-block-id="${t}"${
|
|
73
|
-
<p contenteditable="false"${u(
|
|
78
|
+
esd-extension-block-id="${t}"${p}>
|
|
79
|
+
<p contenteditable="false"${u($)}>${x(o, s)}</p>
|
|
74
80
|
</td>
|
|
75
81
|
</tr>
|
|
76
82
|
</tbody>
|
|
@@ -78,19 +84,19 @@ function G(t, o, e, s, l, n, i) {
|
|
|
78
84
|
</td>
|
|
79
85
|
`;
|
|
80
86
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
87
|
+
function ht(t, e, o, n) {
|
|
88
|
+
const s = e ? ` style="background-color: ${r(e)}"` : "", l = u(t.tdStyle), i = f(t.align), c = m(j, t.pStyle);
|
|
83
89
|
return `
|
|
84
|
-
${
|
|
90
|
+
${R(o, 'valign="top" style="padding: 0 5px; height: 100%"')}>
|
|
85
91
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
86
|
-
class="product-card-segment"${
|
|
92
|
+
class="product-card-segment"${s}>
|
|
87
93
|
<tbody>
|
|
88
94
|
<tr valign="top">
|
|
89
95
|
<td${i}
|
|
90
96
|
class="esd-block-text product-old-price es-p15l es-p15r"
|
|
91
|
-
esd-extension-block-id="${g.OLD_PRICE}"${
|
|
92
|
-
<p contenteditable="false"${u(
|
|
93
|
-
<s>${
|
|
97
|
+
esd-extension-block-id="${g.OLD_PRICE}"${l}>
|
|
98
|
+
<p contenteditable="false"${u(c)}>
|
|
99
|
+
<s>${x(n, t)}</s>
|
|
94
100
|
</p>
|
|
95
101
|
</td>
|
|
96
102
|
</tr>
|
|
@@ -99,21 +105,21 @@ function dt(t, o, e, s) {
|
|
|
99
105
|
</td>
|
|
100
106
|
`;
|
|
101
107
|
}
|
|
102
|
-
function
|
|
103
|
-
const c =
|
|
108
|
+
function K(t, e, o, n, s, l, i) {
|
|
109
|
+
const c = s ? `; background-color: ${r(s)}` : "", a = u(n.tdStyle), p = f(n.align), b = m("font-size: 12px; color: #666666", n.pStyle);
|
|
104
110
|
return `
|
|
105
|
-
${
|
|
111
|
+
${R(i, 'valign="top" style="padding: 0 5px; height: 100%"')}>
|
|
106
112
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
107
113
|
class="product-card-segment" style="table-layout: fixed${c}">
|
|
108
114
|
<tbody>
|
|
109
115
|
<tr valign="top">
|
|
110
|
-
<td${
|
|
116
|
+
<td${p}
|
|
111
117
|
data-text-before="" data-text-after=""
|
|
112
|
-
class="esd-block-text ${
|
|
118
|
+
class="esd-block-text ${l} es-p15l es-p15r"
|
|
113
119
|
esd-extension-block-id="${t}"${a}>
|
|
114
120
|
<p contenteditable="false"${u(b)}>
|
|
115
121
|
<span class="omnibus-text-before"></span>
|
|
116
|
-
<span class="${
|
|
122
|
+
<span class="${e}">${r(o)}</span>
|
|
117
123
|
<span class="omnibus-text-after"></span>
|
|
118
124
|
</p>
|
|
119
125
|
</td>
|
|
@@ -123,12 +129,12 @@ function z(t, o, e, s, l, n, i) {
|
|
|
123
129
|
</td>
|
|
124
130
|
`;
|
|
125
131
|
}
|
|
126
|
-
function
|
|
127
|
-
const
|
|
132
|
+
function xt(t, e, o, n) {
|
|
133
|
+
const s = o ? ` style="background-color: ${r(o)}"` : "", l = m("padding: 0 5px; height: 100%", e.tdStyle), i = f(e.align), c = e.text || nt, a = m(lt, e.spanStyle), p = m(it, e.aStyle);
|
|
128
134
|
return `
|
|
129
|
-
${
|
|
135
|
+
${R(n, `valign="top" style="${r(l)}"`)}>
|
|
130
136
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
131
|
-
class="product-card-segment"${
|
|
137
|
+
class="product-card-segment"${s}>
|
|
132
138
|
<tbody>
|
|
133
139
|
<tr valign="top">
|
|
134
140
|
<td${i}
|
|
@@ -136,8 +142,8 @@ function pt(t, o, e, s) {
|
|
|
136
142
|
esd-extension-block-id="${g.BUTTON}">
|
|
137
143
|
<span class="es-button-border" style="${r(a)}">
|
|
138
144
|
<a href="https://example.com/product/${t + 1}" target="_blank"
|
|
139
|
-
class="es-button ${
|
|
140
|
-
style="${r(
|
|
145
|
+
class="es-button ${J}"
|
|
146
|
+
style="${r(p)}">${r(c)}</a>
|
|
141
147
|
</span>
|
|
142
148
|
</td>
|
|
143
149
|
</tr>
|
|
@@ -146,18 +152,18 @@ function pt(t, o, e, s) {
|
|
|
146
152
|
</td>
|
|
147
153
|
`;
|
|
148
154
|
}
|
|
149
|
-
function
|
|
150
|
-
const
|
|
155
|
+
function Ct(t, e, o, n, s) {
|
|
156
|
+
const l = n ? `; background-color: ${r(n)}` : "", i = u(o.tdStyle), c = f(o.align), p = m("font-size: 12px; color: #666666; margin: 0", o.pStyle), d = `esd-block-text product-custom-attribute es-p0t es-p0b es-p15l es-p15r${D(o)}`, b = e.replace(/_/g, " ").replace(/\b\w/g, ($) => $.toUpperCase());
|
|
151
157
|
return `
|
|
152
|
-
${
|
|
158
|
+
${R(s, 'valign="middle" style="padding: 0 5px; height: 100%"')}>
|
|
153
159
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
154
|
-
class="product-card-segment" style="table-layout: fixed${
|
|
160
|
+
class="product-card-segment" style="table-layout: fixed${l}">
|
|
155
161
|
<tbody>
|
|
156
162
|
<tr valign="top">
|
|
157
163
|
<td product-attr="${r(t)}"${c}
|
|
158
|
-
class="
|
|
164
|
+
class="${d}"
|
|
159
165
|
esd-extension-block-id="${g.CUSTOM_ATTRIBUTE}"${i}>
|
|
160
|
-
<p contenteditable="false"${u(
|
|
166
|
+
<p contenteditable="false"${u(p)}>${r(b)}</p>
|
|
161
167
|
</td>
|
|
162
168
|
</tr>
|
|
163
169
|
</tbody>
|
|
@@ -165,111 +171,155 @@ function ut(t, o, e, s, l) {
|
|
|
165
171
|
</td>
|
|
166
172
|
`;
|
|
167
173
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
174
|
+
function Tt(t, e, o, n, s) {
|
|
175
|
+
const l = e ? ` style="background-color: ${r(e)}"` : "", i = G(t[v]), c = t[k] ?? P(), a = ($) => `
|
|
176
|
+
<td${f(i.align)} valign="middle"
|
|
177
|
+
class="esd-block-text product-price ${$}"
|
|
178
|
+
esd-extension-block-id="${g.PRICE}"${u(i.tdStyle)}>
|
|
179
|
+
<p contenteditable="false"${u(m(st, i.pStyle))}>${x(n.pricePlaceholder, i)}</p>
|
|
180
|
+
</td>
|
|
181
|
+
`, p = ($) => `
|
|
182
|
+
<td${f(c.align)} valign="middle"
|
|
183
|
+
class="esd-block-text product-old-price ${$}"
|
|
184
|
+
esd-extension-block-id="${g.OLD_PRICE}"${u(c.tdStyle)}>
|
|
185
|
+
<p contenteditable="false"${u(m(j, c.pStyle))}>
|
|
186
|
+
<s>${x(n.oldPricePlaceholder, c)}</s>
|
|
187
|
+
</p>
|
|
188
|
+
</td>
|
|
189
|
+
`, d = s ? p("es-p15l es-p5r") : a("es-p15l es-p5r"), b = s ? a("es-p5l es-p15r") : p("es-p5l es-p15r");
|
|
190
|
+
return `
|
|
191
|
+
${R(o, 'valign="top" style="padding: 0 5px; height: 100%"')}>
|
|
192
|
+
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
193
|
+
class="product-card-segment"${l}>
|
|
194
|
+
<tbody>
|
|
195
|
+
<tr valign="top">
|
|
196
|
+
<td align="center">
|
|
197
|
+
<table cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 0 auto">
|
|
198
|
+
<tbody>
|
|
199
|
+
<tr valign="middle">${d}${b}</tr>
|
|
200
|
+
</tbody>
|
|
201
|
+
</table>
|
|
202
|
+
</td>
|
|
203
|
+
</tr>
|
|
204
|
+
</tbody>
|
|
205
|
+
</table>
|
|
206
|
+
</td>
|
|
207
|
+
`;
|
|
208
|
+
}
|
|
209
|
+
function Pt(t, e, o, n, s, l, i) {
|
|
210
|
+
const c = e[t], a = c ?? P();
|
|
211
|
+
if (i.inlinePrice && t === i.inlinePrice.anchor)
|
|
212
|
+
return Tt(e, n, l, i, i.inlinePrice.originalFirst);
|
|
170
213
|
switch (t) {
|
|
171
|
-
case
|
|
172
|
-
return
|
|
214
|
+
case L:
|
|
215
|
+
return St(
|
|
173
216
|
c ?? {},
|
|
174
|
-
l,
|
|
175
217
|
s,
|
|
176
|
-
n
|
|
218
|
+
n,
|
|
219
|
+
l
|
|
177
220
|
);
|
|
178
|
-
case
|
|
179
|
-
return
|
|
221
|
+
case q:
|
|
222
|
+
return F(
|
|
180
223
|
g.NAME,
|
|
181
|
-
|
|
224
|
+
`product-name es-p10t es-p10b es-p15l es-p15r${D(a)}`,
|
|
182
225
|
"Product Name",
|
|
183
226
|
"font-size: 16px; color: #333333",
|
|
184
227
|
a,
|
|
185
|
-
|
|
186
|
-
|
|
228
|
+
n,
|
|
229
|
+
l
|
|
187
230
|
);
|
|
188
|
-
case
|
|
189
|
-
return
|
|
231
|
+
case v:
|
|
232
|
+
return F(
|
|
190
233
|
g.PRICE,
|
|
191
234
|
"product-price es-p15l es-p15r",
|
|
192
235
|
i.pricePlaceholder,
|
|
193
236
|
"font-size: 16px; color: #333333",
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
237
|
+
G(c),
|
|
238
|
+
n,
|
|
239
|
+
l
|
|
197
240
|
);
|
|
198
|
-
case
|
|
199
|
-
return
|
|
200
|
-
case
|
|
201
|
-
return
|
|
241
|
+
case k:
|
|
242
|
+
return ht(a, n, l, i.oldPricePlaceholder);
|
|
243
|
+
case H:
|
|
244
|
+
return K(
|
|
202
245
|
g.OMNIBUS_PRICE,
|
|
203
246
|
"omnibus-price-value",
|
|
204
247
|
i.omnibusPricePlaceholder,
|
|
205
248
|
a,
|
|
206
|
-
|
|
249
|
+
n,
|
|
207
250
|
"product-omnibus-price",
|
|
208
|
-
|
|
251
|
+
l
|
|
209
252
|
);
|
|
210
|
-
case
|
|
211
|
-
return
|
|
253
|
+
case Q:
|
|
254
|
+
return K(
|
|
212
255
|
g.OMNIBUS_DISCOUNT,
|
|
213
256
|
"omnibus-discount-value",
|
|
214
257
|
"-10%",
|
|
215
258
|
a,
|
|
216
|
-
|
|
259
|
+
n,
|
|
217
260
|
"product-omnibus-discount",
|
|
218
|
-
|
|
261
|
+
l
|
|
219
262
|
);
|
|
220
|
-
case
|
|
221
|
-
return
|
|
222
|
-
l,
|
|
223
|
-
c ?? {},
|
|
263
|
+
case U:
|
|
264
|
+
return xt(
|
|
224
265
|
s,
|
|
225
|
-
|
|
266
|
+
c ?? {},
|
|
267
|
+
n,
|
|
268
|
+
l
|
|
226
269
|
);
|
|
227
270
|
default:
|
|
228
|
-
if (t.startsWith(
|
|
229
|
-
const
|
|
230
|
-
return
|
|
271
|
+
if (t.startsWith(Z)) {
|
|
272
|
+
const p = o[t] ?? W(t), d = tt(p);
|
|
273
|
+
return Ct(p, d, a, n, l);
|
|
231
274
|
}
|
|
232
275
|
return null;
|
|
233
276
|
}
|
|
234
277
|
}
|
|
235
|
-
const
|
|
278
|
+
const rt = `
|
|
236
279
|
<tr>
|
|
237
280
|
<td class="spacer" style="height: 10px"></td>
|
|
238
281
|
</tr>
|
|
239
282
|
`;
|
|
240
|
-
function
|
|
283
|
+
function wt(t) {
|
|
241
284
|
return {
|
|
242
|
-
pricePlaceholder:
|
|
243
|
-
oldPricePlaceholder:
|
|
244
|
-
omnibusPricePlaceholder:
|
|
285
|
+
pricePlaceholder: V({ price: 18, currency: t }),
|
|
286
|
+
oldPricePlaceholder: V({ price: 20, currency: t }),
|
|
287
|
+
omnibusPricePlaceholder: V({ price: 20, currency: t })
|
|
245
288
|
};
|
|
246
289
|
}
|
|
247
|
-
function
|
|
248
|
-
const
|
|
290
|
+
function At(t, e, o) {
|
|
291
|
+
const n = e.includes(v) && e.includes(k), l = o[v] !== !1 === (o[k] !== !1);
|
|
292
|
+
return t || !n || !l ? null : gt(e);
|
|
293
|
+
}
|
|
294
|
+
function _t(t, e, o, n) {
|
|
295
|
+
const { composition: s, visibility: l, perElement: i, customAttrValues: c, cardBg: a } = n, p = (100 / o).toFixed(2), d = o - e, b = `<td class="${ot}" style="padding: 0 5px;" width="${p}%"></td>`, $ = d > 0 ? b.repeat(d) : "";
|
|
249
296
|
return `
|
|
250
297
|
<tr class="recommendation-product-row">
|
|
251
298
|
<td>
|
|
252
299
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"
|
|
253
300
|
class="product-card-wrapper" style="table-layout: fixed">
|
|
254
|
-
<tbody>${
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
301
|
+
<tbody>${s.filter((C) => {
|
|
302
|
+
var y;
|
|
303
|
+
return C !== ((y = n.inlinePrice) == null ? void 0 : y.skip);
|
|
304
|
+
}).map((C) => {
|
|
305
|
+
const y = l[C] !== !1, T = y ? "" : ' style="display: none"', I = y ? "1" : "0", A = [];
|
|
306
|
+
for (let _ = 0; _ < e; _ += 1) {
|
|
307
|
+
const E = Pt(
|
|
308
|
+
C,
|
|
259
309
|
i,
|
|
260
310
|
c,
|
|
261
311
|
a,
|
|
262
|
-
t +
|
|
263
|
-
|
|
264
|
-
|
|
312
|
+
t + _,
|
|
313
|
+
p,
|
|
314
|
+
n
|
|
265
315
|
);
|
|
266
|
-
E &&
|
|
316
|
+
E && A.push(E);
|
|
267
317
|
}
|
|
268
|
-
return
|
|
318
|
+
return A.length === 0 ? "" : `
|
|
269
319
|
<tr class="recommendation-attribute-row"
|
|
270
|
-
data-attribute-type="${r(
|
|
271
|
-
data-visibility="${
|
|
272
|
-
${
|
|
320
|
+
data-attribute-type="${r(C)}"
|
|
321
|
+
data-visibility="${I}"${T}>
|
|
322
|
+
${A.join("")}${$}
|
|
273
323
|
</tr>
|
|
274
324
|
`;
|
|
275
325
|
}).filter(Boolean).join("")}</tbody>
|
|
@@ -278,49 +328,67 @@ function mt(t, o, e, s) {
|
|
|
278
328
|
</tr>
|
|
279
329
|
`;
|
|
280
330
|
}
|
|
281
|
-
function
|
|
282
|
-
const
|
|
283
|
-
for (let
|
|
284
|
-
const
|
|
285
|
-
|
|
331
|
+
function X(t, e, o) {
|
|
332
|
+
const n = [];
|
|
333
|
+
for (let s = 0; s < t; s += e) {
|
|
334
|
+
const l = Math.min(e, t - s);
|
|
335
|
+
s > 0 && n.push(rt), n.push(_t(s, l, e, o));
|
|
286
336
|
}
|
|
287
|
-
return
|
|
337
|
+
return n.join("");
|
|
338
|
+
}
|
|
339
|
+
function Rt(t, e, o) {
|
|
340
|
+
const n = G(t[v]), s = t[k] ?? P(), l = (c) => `
|
|
341
|
+
<td class="esd-block-text product-price" esd-extension-block-id="${g.PRICE}"
|
|
342
|
+
${f(n.align ?? "left")} valign="middle"
|
|
343
|
+
${u(m(`width: auto${c}`, n.tdStyle))}>
|
|
344
|
+
<p contenteditable="false"${u(m(`${st}; margin: 0`, n.pStyle))}>${x(e.pricePlaceholder, n)}</p>
|
|
345
|
+
</td>
|
|
346
|
+
`, i = (c) => `
|
|
347
|
+
<td class="esd-block-text product-old-price" esd-extension-block-id="${g.OLD_PRICE}"
|
|
348
|
+
${f(s.align ?? "left")} valign="middle"
|
|
349
|
+
${u(m(`width: auto${c}`, s.tdStyle))}>
|
|
350
|
+
<p contenteditable="false"${u(m(ct, s.pStyle))}>${`<s>${x(e.oldPricePlaceholder, s)}</s>`}</p>
|
|
351
|
+
</td>
|
|
352
|
+
`;
|
|
353
|
+
return o ? i("; padding-right: 8px") + l("") : l("; padding-right: 8px") + i("");
|
|
288
354
|
}
|
|
289
|
-
function
|
|
290
|
-
const
|
|
291
|
-
if (t ===
|
|
292
|
-
|
|
355
|
+
function It(t, e, o, n) {
|
|
356
|
+
const s = e[t];
|
|
357
|
+
if (n.inlinePrice && t === n.inlinePrice.anchor)
|
|
358
|
+
return Rt(e, n, n.inlinePrice.originalFirst);
|
|
359
|
+
if (t === q) {
|
|
360
|
+
const l = s ?? P(), i = m("font-size: 16px; color: #333333; margin: 0", l.pStyle), c = f(l.align ?? "left");
|
|
293
361
|
return `
|
|
294
|
-
<td class="esd-block-text product-name"
|
|
295
|
-
esd-extension-block-id="${g.NAME}"${c}${u(
|
|
296
|
-
<p contenteditable="false"${u(i)}>${
|
|
362
|
+
<td class="esd-block-text product-name${D(l)}"
|
|
363
|
+
esd-extension-block-id="${g.NAME}"${c}${u(l.tdStyle)}>
|
|
364
|
+
<p contenteditable="false"${u(i)}>${x("Product Name", l)}</p>
|
|
297
365
|
</td>
|
|
298
366
|
`;
|
|
299
367
|
}
|
|
300
|
-
if (t ===
|
|
301
|
-
const
|
|
368
|
+
if (t === v) {
|
|
369
|
+
const l = G(s), i = m("font-size: 16px; color: #333333; margin: 0", l.pStyle), c = f(l.align ?? "left");
|
|
302
370
|
return `
|
|
303
371
|
<td class="esd-block-text product-price"
|
|
304
|
-
esd-extension-block-id="${g.PRICE}"${c}${u(
|
|
305
|
-
<p contenteditable="false"${u(i)}>${
|
|
372
|
+
esd-extension-block-id="${g.PRICE}"${c}${u(l.tdStyle)}>
|
|
373
|
+
<p contenteditable="false"${u(i)}>${x(n.pricePlaceholder, l)}</p>
|
|
306
374
|
</td>
|
|
307
375
|
`;
|
|
308
376
|
}
|
|
309
|
-
if (t ===
|
|
310
|
-
const
|
|
377
|
+
if (t === k) {
|
|
378
|
+
const l = s ?? P(), i = m(ct, l.pStyle), c = f(l.align ?? "left");
|
|
311
379
|
return `
|
|
312
380
|
<td class="esd-block-text product-old-price"
|
|
313
|
-
esd-extension-block-id="${g.OLD_PRICE}"${
|
|
314
|
-
<p contenteditable="false"${u(
|
|
381
|
+
esd-extension-block-id="${g.OLD_PRICE}"${c}${u(l.tdStyle)}>
|
|
382
|
+
<p contenteditable="false"${u(i)}><s>${x(n.oldPricePlaceholder, l)}</s></p>
|
|
315
383
|
</td>
|
|
316
384
|
`;
|
|
317
385
|
}
|
|
318
|
-
if (t ===
|
|
319
|
-
const
|
|
386
|
+
if (t === H || t === Q) {
|
|
387
|
+
const l = t === H, i = l ? g.OMNIBUS_PRICE : g.OMNIBUS_DISCOUNT, c = l ? "omnibus-price-value" : "omnibus-discount-value", a = l ? n.omnibusPricePlaceholder : "-10%", p = l ? "product-omnibus-price" : "product-omnibus-discount", d = s ?? P(), b = m("font-size: 12px; color: #666666; margin: 0", d.pStyle), $ = f(d.align ?? "left");
|
|
320
388
|
return `
|
|
321
|
-
<td class="esd-block-text ${
|
|
389
|
+
<td class="esd-block-text ${p}"
|
|
322
390
|
data-text-before="" data-text-after=""
|
|
323
|
-
esd-extension-block-id="${i}"${
|
|
391
|
+
esd-extension-block-id="${i}"${$}${u(d.tdStyle)}>
|
|
324
392
|
<p contenteditable="false"${u(b)}>
|
|
325
393
|
<span class="omnibus-text-before"></span>
|
|
326
394
|
<span class="${c}">${r(a)}</span>
|
|
@@ -329,56 +397,59 @@ function ft(t, o, e, s) {
|
|
|
329
397
|
</td>
|
|
330
398
|
`;
|
|
331
399
|
}
|
|
332
|
-
if (t.startsWith(
|
|
333
|
-
const
|
|
400
|
+
if (t.startsWith(Z)) {
|
|
401
|
+
const l = s ?? P(), i = o[t] ?? W(t), a = tt(i).replace(/_/g, " ").replace(/\b\w/g, ($) => $.toUpperCase()), p = m("font-size: 12px; color: #666666; margin: 0", l.pStyle), d = f(l.align ?? "left"), b = g.CUSTOM_ATTRIBUTE;
|
|
334
402
|
return `
|
|
335
403
|
<td product-attr="${r(i)}"
|
|
336
|
-
class="esd-block-text product-custom-attribute"
|
|
337
|
-
esd-extension-block-id="${b}"${
|
|
338
|
-
<p contenteditable="false"${u(
|
|
404
|
+
class="esd-block-text product-custom-attribute${D(l)}"
|
|
405
|
+
esd-extension-block-id="${b}"${d}${u(l.tdStyle)}>
|
|
406
|
+
<p contenteditable="false"${u(p)}>${r(a)}</p>
|
|
339
407
|
</td>
|
|
340
408
|
`;
|
|
341
409
|
}
|
|
342
410
|
return null;
|
|
343
411
|
}
|
|
344
|
-
function
|
|
345
|
-
const { composition:
|
|
412
|
+
function Et(t, e) {
|
|
413
|
+
const { composition: o, visibility: n, perElement: s, customAttrValues: l, cardBg: i } = e, c = i ? `background-color: ${r(i)}` : "", a = c ? `style="table-layout: fixed; ${c}"` : 'style="table-layout: fixed"', p = s[L] ?? {}, d = n[L] !== !1, b = p.width ? ` width="${p.width}"` : "", $ = d ? "" : ' style="display: none"', w = `
|
|
346
414
|
<td width="120"
|
|
347
415
|
class="esd-block-image product-image-cell recommendation-attribute-row es-p5"
|
|
348
416
|
esd-extension-block-id="${g.IMAGE}"
|
|
349
|
-
data-attribute-type="${
|
|
350
|
-
data-visibility="${
|
|
351
|
-
align="center" valign="middle"${
|
|
417
|
+
data-attribute-type="${L}"
|
|
418
|
+
data-visibility="${d ? "1" : "0"}"
|
|
419
|
+
align="center" valign="middle"${$}>
|
|
352
420
|
<a target="_blank" href="https://example.com/product/${t + 1}">
|
|
353
|
-
<img src="${
|
|
421
|
+
<img src="${et}" alt="Product Name"
|
|
354
422
|
class="adapt-img product-image"${b}
|
|
355
423
|
style="display: block; max-width: 100%; height: auto">
|
|
356
424
|
</a>
|
|
357
425
|
</td>
|
|
358
|
-
`,
|
|
426
|
+
`, y = `
|
|
359
427
|
<td class="product-info-cell" valign="middle" style="padding: 15px">
|
|
360
428
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%"
|
|
361
429
|
style="table-layout: fixed">
|
|
362
|
-
<tbody>${
|
|
363
|
-
|
|
364
|
-
return
|
|
365
|
-
|
|
366
|
-
|
|
430
|
+
<tbody>${o.filter((S) => {
|
|
431
|
+
var h;
|
|
432
|
+
return S !== L && S !== U && S !== ((h = e.inlinePrice) == null ? void 0 : h.skip);
|
|
433
|
+
}).map((S) => {
|
|
434
|
+
const h = n[S] !== !1, N = h ? "" : ' style="display: none"', B = h ? "1" : "0", M = It(S, s, l, e);
|
|
435
|
+
return M ? `<tr class="recommendation-attribute-row"
|
|
436
|
+
data-attribute-type="${r(S)}"
|
|
437
|
+
data-visibility="${B}"${N}>${M}</tr>` : "";
|
|
367
438
|
}).filter(Boolean).join(`
|
|
368
439
|
`)}</tbody>
|
|
369
440
|
</table>
|
|
370
441
|
</td>
|
|
371
|
-
`,
|
|
442
|
+
`, T = s[U] ?? {}, I = n[U] !== !1, A = T.text || nt, _ = m(lt, T.spanStyle ?? ""), E = m(it, T.aStyle ?? ""), z = I ? "" : ' style="display: none"', Y = `
|
|
372
443
|
<td width="100"
|
|
373
444
|
class="esd-block-button button-cell recommendation-attribute-row product-button es-p5l es-p5r"
|
|
374
445
|
esd-extension-block-id="${g.BUTTON}"
|
|
375
|
-
data-attribute-type="${
|
|
376
|
-
data-visibility="${
|
|
377
|
-
align="${r(
|
|
378
|
-
<span class="es-button-border" style="${r(
|
|
446
|
+
data-attribute-type="${U}"
|
|
447
|
+
data-visibility="${I ? "1" : "0"}"
|
|
448
|
+
align="${r(T.align ?? "center")}" valign="middle"${z}>
|
|
449
|
+
<span class="es-button-border" style="${r(_)}">
|
|
379
450
|
<a href="https://example.com/product/${t + 1}" target="_blank"
|
|
380
|
-
class="es-button ${
|
|
381
|
-
style="${r(E)}">${r(
|
|
451
|
+
class="es-button ${J}"
|
|
452
|
+
style="${r(E)}">${r(A)}</a>
|
|
382
453
|
</span>
|
|
383
454
|
</td>
|
|
384
455
|
`;
|
|
@@ -388,64 +459,71 @@ function yt(t, o) {
|
|
|
388
459
|
<table width="100%" cellpadding="0" cellspacing="0" border="0"
|
|
389
460
|
class="product-card-wrapper" ${a}>
|
|
390
461
|
<tbody>
|
|
391
|
-
<tr>${
|
|
462
|
+
<tr>${w}${y}${Y}</tr>
|
|
392
463
|
</tbody>
|
|
393
464
|
</table>
|
|
394
465
|
</td>
|
|
395
466
|
</tr>
|
|
396
467
|
`;
|
|
397
468
|
}
|
|
398
|
-
function
|
|
399
|
-
const
|
|
400
|
-
for (let
|
|
401
|
-
|
|
402
|
-
return
|
|
469
|
+
function Ot(t, e) {
|
|
470
|
+
const o = [];
|
|
471
|
+
for (let n = 0; n < t; n += 1)
|
|
472
|
+
n > 0 && o.push(rt), o.push(Et(n, e));
|
|
473
|
+
return o.join("");
|
|
403
474
|
}
|
|
404
|
-
function
|
|
405
|
-
var a,
|
|
406
|
-
const
|
|
407
|
-
(a =
|
|
408
|
-
const
|
|
409
|
-
return `<p${u(
|
|
475
|
+
function vt(t, e) {
|
|
476
|
+
var a, p, d, b, $, w;
|
|
477
|
+
const o = t == null ? void 0 : t.theme, n = [];
|
|
478
|
+
(a = o == null ? void 0 : o.textStyle) != null && a["font-family"] && n.push(`font-family: ${o.textStyle["font-family"]}`), n.push(`font-size: ${((p = o == null ? void 0 : o.textStyle) == null ? void 0 : p["font-size"]) ?? "28px"}`), n.push(`color: ${((d = o == null ? void 0 : o.textColor) == null ? void 0 : d.color) ?? "#333333"}`), (b = o == null ? void 0 : o.textStyle) != null && b["font-weight"] && n.push(`font-weight: ${o.textStyle["font-weight"]}`), ($ = o == null ? void 0 : o.textStyle) != null && $["font-style"] && n.push(`font-style: ${o.textStyle["font-style"]}`);
|
|
479
|
+
const s = n.join("; "), l = ((w = o == null ? void 0 : o.textStyle) == null ? void 0 : w["font-weight"]) !== "normal", i = r(e), c = l ? `<strong>${i}</strong>` : i;
|
|
480
|
+
return `<p${u(s)}>${c}</p>`;
|
|
410
481
|
}
|
|
411
|
-
function
|
|
412
|
-
const
|
|
413
|
-
return ` ${
|
|
482
|
+
function kt(t) {
|
|
483
|
+
const e = t.alignment === "before" ? "0" : "1";
|
|
484
|
+
return ` ${O.CURRENCY}="${r(t.code)}" ${O.SYMBOL}="${r(t.symbol)}" ${O.ALIGNMENT}="${e}" ${O.THOUSAND_SEPARATOR}="${r(t.thousandSeparator)}" ${O.DECIMAL_SEPARATOR}="${r(t.decimalSeparator)}" ${O.DECIMAL_COUNT}="${t.decimalCount}"`;
|
|
414
485
|
}
|
|
415
|
-
function
|
|
486
|
+
function Yt(t) {
|
|
416
487
|
const {
|
|
417
|
-
nodeConfig:
|
|
418
|
-
composition:
|
|
419
|
-
cardBg:
|
|
420
|
-
titleText:
|
|
421
|
-
extraClasses:
|
|
488
|
+
nodeConfig: e,
|
|
489
|
+
composition: o,
|
|
490
|
+
cardBg: n,
|
|
491
|
+
titleText: s,
|
|
492
|
+
extraClasses: l = "",
|
|
422
493
|
legacyId: i,
|
|
423
494
|
legacyBgColor: c,
|
|
424
495
|
preserveInnerHtml: a,
|
|
425
|
-
skipCompile:
|
|
426
|
-
|
|
496
|
+
skipCompile: p = !1,
|
|
497
|
+
blockPadding: d
|
|
498
|
+
} = t, b = e.layout === "list" ? ' data-layout="list"' : "", $ = e.layout === "list" ? " es-m-p0 ins-recommendation-list-layout" : "", w = o.composition.join(","), C = JSON.stringify(o.customAttributes), y = [
|
|
427
499
|
"recommendation-block-v2",
|
|
428
500
|
"esd-block-recommendation-v3-block",
|
|
429
|
-
|
|
430
|
-
`ins-recommendation-v3-block-${
|
|
501
|
+
`${d ? d.classes : "es-p20"}${$}`,
|
|
502
|
+
`ins-recommendation-v3-block-${e.recommendationId}`,
|
|
431
503
|
// Marker class Stripo's block infrastructure uses to identify recommendation
|
|
432
504
|
// blocks. Without it, certain Styles-panel controls (e.g. button "Fit to
|
|
433
505
|
// Container") are suppressed even though every other selector matches.
|
|
434
506
|
"esd-recommendation-block",
|
|
435
507
|
"esd-extension-block",
|
|
436
508
|
"esd-container-frame",
|
|
437
|
-
"
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
].filter(Boolean).join(" "),
|
|
441
|
-
const
|
|
442
|
-
composition:
|
|
443
|
-
visibility:
|
|
444
|
-
perElement:
|
|
445
|
-
customAttrValues:
|
|
446
|
-
cardBg:
|
|
447
|
-
...
|
|
448
|
-
|
|
509
|
+
e.mobileLayoutEnabled ? "" : ut,
|
|
510
|
+
p ? dt : "",
|
|
511
|
+
l
|
|
512
|
+
].filter(Boolean).join(" "), T = kt(e.currency), I = e.visibility[pt] !== !1, A = ` esd-ext-config="${r(JSON.stringify(e))}"`, _ = i ? ` id="${r(i)}"` : "", E = c ? ` bgcolor="${r(c)}"` : "", z = d != null && d.style ? ` style="${d.style}"` : "", S = a ?? (() => {
|
|
513
|
+
const h = parseInt(e.size) || 6, N = {
|
|
514
|
+
composition: o.composition,
|
|
515
|
+
visibility: o.visibility,
|
|
516
|
+
perElement: o.perElementStyles,
|
|
517
|
+
customAttrValues: o.customAttrValues,
|
|
518
|
+
cardBg: n,
|
|
519
|
+
...wt(e.currency),
|
|
520
|
+
inlinePrice: At(
|
|
521
|
+
e.priceMovedToNextLine,
|
|
522
|
+
o.composition,
|
|
523
|
+
o.visibility
|
|
524
|
+
)
|
|
525
|
+
}, B = e.layout === "list", M = B ? Ot(h, N) : X(h, e.cardsInRow, N), at = e.mobileLayoutEnabled && !B ? `<td><table width="100%" cellpadding="0" cellspacing="0" border="0"
|
|
526
|
+
class="${ft}" style="display: none">${X(h, e.mobileCardsInRow, N)}</table></td>` : "";
|
|
449
527
|
return `
|
|
450
528
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
451
529
|
<tbody>
|
|
@@ -453,15 +531,15 @@ function Et(t) {
|
|
|
453
531
|
<td align="center">
|
|
454
532
|
<table class="container" width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
455
533
|
<tbody>
|
|
456
|
-
${
|
|
534
|
+
${I ? $t(vt(o.titleVariable, s), !0, e.rowSpacing) : ""}
|
|
457
535
|
<tr>
|
|
458
536
|
<td>
|
|
459
537
|
<table width="100%" cellpadding="0" cellspacing="0" border="0"
|
|
460
|
-
class="${
|
|
538
|
+
class="${mt}">${M}
|
|
461
539
|
</table>
|
|
462
540
|
</td>
|
|
463
541
|
</tr>
|
|
464
|
-
<tr class="ins-recommendation-mobile-row"
|
|
542
|
+
<tr class="ins-recommendation-mobile-row">${at}</tr>
|
|
465
543
|
</tbody>
|
|
466
544
|
</table>
|
|
467
545
|
</td>
|
|
@@ -469,22 +547,22 @@ function Et(t) {
|
|
|
469
547
|
</tbody>
|
|
470
548
|
</table>`;
|
|
471
549
|
})();
|
|
472
|
-
return
|
|
550
|
+
return yt(`
|
|
473
551
|
<td align="left"
|
|
474
552
|
esd-extension-block-id="recommendation-block"
|
|
475
553
|
width="520"
|
|
476
|
-
class="${
|
|
477
|
-
recommendation-id="${
|
|
478
|
-
data-card-composition="${r(
|
|
479
|
-
data-custom-attributes="${r(
|
|
480
|
-
data-column-spacing="${
|
|
481
|
-
data-row-spacing="${
|
|
482
|
-
data-mobile-column-spacing="${
|
|
483
|
-
data-mobile-row-spacing="${
|
|
484
|
-
hide-price="${
|
|
554
|
+
class="${y}"${_}${E}${z}
|
|
555
|
+
recommendation-id="${e.recommendationId}"${T}
|
|
556
|
+
data-card-composition="${r(w)}"
|
|
557
|
+
data-custom-attributes="${r(C)}"
|
|
558
|
+
data-column-spacing="${e.columnSpacing}"
|
|
559
|
+
data-row-spacing="${e.rowSpacing}"
|
|
560
|
+
data-mobile-column-spacing="${e.mobileColumnSpacing}"
|
|
561
|
+
data-mobile-row-spacing="${e.mobileRowSpacing}"
|
|
562
|
+
hide-price="${e.priceHideIfSameAsDiscounted}"${b}${A}>${S}
|
|
485
563
|
</td>
|
|
486
564
|
`);
|
|
487
565
|
}
|
|
488
566
|
export {
|
|
489
|
-
|
|
567
|
+
Yt as buildBlockHtml
|
|
490
568
|
};
|