@useinsider/guido 2.1.0-beta.ff1bc98 → 2.1.0-beta.ff9b498
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 +39 -1
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +14 -15
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +104 -114
- package/dist/composables/useRecommendation.js +21 -54
- package/dist/composables/useSave.js +16 -12
- package/dist/composables/useStripo.js +58 -54
- package/dist/composables/useStripoEventHandler.js +27 -12
- package/dist/composables/useSyncModuleExtractor.js +33 -0
- package/dist/config/compiler/recommendationCompilerRules.js +39 -45
- package/dist/config/migrator/itemsBlockMigrator.js +101 -97
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/defaults.js +8 -4
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +15 -16
- package/dist/enums/unsubscribe.js +25 -21
- package/dist/extensions/Blocks/Recommendation/block.js +9 -133
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +187 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +13 -0
- package/dist/extensions/Blocks/Recommendation/control.js +336 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
- package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textAfter.js → omnibusDiscountTextAfterControl.js} +14 -16
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textBefore.js → omnibusDiscountTextBeforeControl.js} +14 -16
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textAfter.js → omnibusPriceTextAfterControl.js} +14 -16
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textBefore.js → omnibusPriceTextBeforeControl.js} +12 -14
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +17 -40
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +3 -19
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +4 -13
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +10 -21
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +207 -254
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +181 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +189 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +209 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +15 -26
- package/dist/extensions/Blocks/controlFactories.js +93 -125
- package/dist/extensions/ModulesTabIcons/extension.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +237 -225
- package/dist/services/recommendationApi.js +8 -11
- package/dist/services/stripoApi.js +50 -14
- package/dist/services/templateLibraryApi.js +13 -16
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/@types/events.d.ts +34 -2
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useRecommendation.d.ts +0 -1
- package/dist/src/composables/useSyncModuleExtractor.d.ts +4 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/enums/unsubscribe.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -67
- package/dist/src/extensions/Blocks/Recommendation/{controls/cardComposition/index.d.ts → cardCompositionControl.d.ts} +3 -23
- package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +24 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +38 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +589 -21
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +468 -138
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{grid/migration.d.ts → migrationTemplate.d.ts} +4 -11
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +52 -0
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/mock/api/settings.d.ts +2 -0
- package/dist/src/services/stripoApi.d.ts +5 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/src/stores/editor.d.ts +23 -0
- package/dist/static/styles/customEditorStyle.css.js +11 -35
- package/dist/stores/editor.js +2 -1
- package/dist/utils/pairProductVariables.js +56 -57
- package/dist/utils/templatePreparation.js +14 -15
- package/package.json +1 -1
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +0 -116
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +0 -66
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +0 -22
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -21
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -80
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -232
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +0 -92
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +0 -102
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +0 -209
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +0 -52
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +0 -250
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +0 -70
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +0 -160
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +0 -67
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -307
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +0 -21
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -108
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -222
- package/dist/extensions/Blocks/Recommendation/services/configService.js +0 -240
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +0 -233
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +0 -66
- package/dist/extensions/Blocks/Recommendation/templates/index.js +0 -12
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +0 -174
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +0 -73
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +0 -134
- package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +0 -6
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +0 -29
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +0 -46
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +0 -17
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -49
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +0 -41
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -143
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -31
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +0 -37
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -29
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +0 -52
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +0 -22
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -79
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +0 -24
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -60
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -23
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -221
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +0 -29
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -97
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -34
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -83
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +0 -151
- package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -20
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +0 -33
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +0 -41
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -8
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +0 -18
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +0 -66
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -166
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -33
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +0 -113
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +0 -77
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { ModificationDescription as S } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
import { RecommendationBlockId as m } from "../../constants/blockIds.js";
|
|
3
|
-
import { CURRENCY_ATTR as y, MOBILE_CONTAINER_SELECTOR as T, DESKTOP_CONTAINER_SELECTOR as w, CONTAINER_SELECTOR as _ } from "../../constants/selectors.js";
|
|
4
|
-
import { RecommendationConfigService as k } from "../../services/configService.js";
|
|
5
|
-
import { useRecommendationExtensionStore as b } from "../../store/recommendation.js";
|
|
6
|
-
import { prepareProductRows as R } from "../../templates/index.js";
|
|
7
|
-
import { formatPrice as D } from "../../utils/priceFormatter.js";
|
|
8
|
-
import { isTdNode as L } from "../../utils/tagName.js";
|
|
9
|
-
import { sanitizeImageUrl as U, getDefaultProducts as H, DEFAULT_CARD_COMPOSITION as C } from "../../templates/utils.js";
|
|
10
|
-
const q = "ins-recommendation-v3-block-v2";
|
|
11
|
-
function E(o) {
|
|
12
|
-
if (!o)
|
|
13
|
-
return null;
|
|
14
|
-
if ("getAttribute" in o) {
|
|
15
|
-
const e = o.getAttribute("class");
|
|
16
|
-
if (e && e.includes(q))
|
|
17
|
-
return o;
|
|
18
|
-
}
|
|
19
|
-
return "querySelector" in o ? o.querySelector(`.${q}`) : null;
|
|
20
|
-
}
|
|
21
|
-
function P(o) {
|
|
22
|
-
const e = E(o);
|
|
23
|
-
if (!e || !("getAttribute" in e))
|
|
24
|
-
return "grid";
|
|
25
|
-
const t = e.getAttribute("data-layout");
|
|
26
|
-
return t === "list" || t === "horizontal" ? "list" : "grid";
|
|
27
|
-
}
|
|
28
|
-
function N(o) {
|
|
29
|
-
const e = E(o);
|
|
30
|
-
if (!e || !("getAttribute" in e))
|
|
31
|
-
return C;
|
|
32
|
-
const t = e.getAttribute("data-card-composition");
|
|
33
|
-
return t ? t.split(",").filter(Boolean) : C;
|
|
34
|
-
}
|
|
35
|
-
function g(o, e, t) {
|
|
36
|
-
if (!e || !("childNodes" in e))
|
|
37
|
-
return !1;
|
|
38
|
-
const n = e.childNodes().find(
|
|
39
|
-
(i) => "getType" in i && i.getType() === "text"
|
|
40
|
-
);
|
|
41
|
-
return n ? (o.modifyHtml(n).setText(t), !0) : !1;
|
|
42
|
-
}
|
|
43
|
-
function h(o, e) {
|
|
44
|
-
return o && o.length > 0 ? o : e.length > 0 ? e : H();
|
|
45
|
-
}
|
|
46
|
-
function $(o) {
|
|
47
|
-
const { currentNode: e, documentModifier: t, products: r, layout: n } = o;
|
|
48
|
-
if (!e || !("querySelector" in e))
|
|
49
|
-
return;
|
|
50
|
-
const i = e.querySelector(T);
|
|
51
|
-
if (!i)
|
|
52
|
-
return;
|
|
53
|
-
const c = b(), u = k.getConfig(e), l = h(r, c.recommendationProducts), s = N(e), d = n ?? P(e), a = R(l, d, {
|
|
54
|
-
productsPerRow: u.mobileCardsInRow,
|
|
55
|
-
composition: s
|
|
56
|
-
});
|
|
57
|
-
t.modifyHtml(i).setInnerHtml(a).apply(new S("Updated mobile product rows"));
|
|
58
|
-
}
|
|
59
|
-
function x(o) {
|
|
60
|
-
const {
|
|
61
|
-
currentNode: e,
|
|
62
|
-
documentModifier: t,
|
|
63
|
-
afterRegenerate: r,
|
|
64
|
-
products: n,
|
|
65
|
-
layout: i
|
|
66
|
-
} = o;
|
|
67
|
-
if (!e || !("querySelector" in e))
|
|
68
|
-
return;
|
|
69
|
-
const c = e.querySelector(w) ?? e.querySelector(_);
|
|
70
|
-
if (!c)
|
|
71
|
-
return;
|
|
72
|
-
const u = b(), l = h(n, u.recommendationProducts), { cardsInRow: s } = u.recommendationConfigs, d = N(e), a = i ?? P(e), p = R(l, a, {
|
|
73
|
-
productsPerRow: s,
|
|
74
|
-
composition: d
|
|
75
|
-
});
|
|
76
|
-
t.modifyHtml(c).setInnerHtml(p).apply(new S("Updated product")), $(o), r == null || r();
|
|
77
|
-
}
|
|
78
|
-
function B(o, e, t, r) {
|
|
79
|
-
const i = `0 ${Math.floor(t / 2)}px`;
|
|
80
|
-
let c = !1;
|
|
81
|
-
return r === "grid" ? Array.from(
|
|
82
|
-
o.querySelectorAll(".attribute-cell")
|
|
83
|
-
).forEach((l) => {
|
|
84
|
-
e.modifyHtml(l).setStyle("padding", i), c = !0;
|
|
85
|
-
}) : Array.from(
|
|
86
|
-
o.querySelectorAll(".product-card-wrapper")
|
|
87
|
-
).forEach((l) => {
|
|
88
|
-
const s = "parentNode" in l ? l.parentNode : null;
|
|
89
|
-
s && L(s) && (e.modifyHtml(s).setStyle("padding", i), c = !0);
|
|
90
|
-
}), c;
|
|
91
|
-
}
|
|
92
|
-
function v(o, e, t) {
|
|
93
|
-
const r = `${t}px`, n = Array.from(o.querySelectorAll(".spacer"));
|
|
94
|
-
let i = !1;
|
|
95
|
-
return n.forEach((c) => {
|
|
96
|
-
e.modifyHtml(c).setStyle("height", r), i = !0;
|
|
97
|
-
}), i;
|
|
98
|
-
}
|
|
99
|
-
function V(o) {
|
|
100
|
-
const { currentNode: e, documentModifier: t } = o;
|
|
101
|
-
if (!e)
|
|
102
|
-
return;
|
|
103
|
-
const r = E(e);
|
|
104
|
-
if (!r || !("getAttribute" in r))
|
|
105
|
-
return;
|
|
106
|
-
const n = r.getAttribute("data-column-spacing"), i = r.getAttribute("data-row-spacing"), c = P(e);
|
|
107
|
-
let u = !1;
|
|
108
|
-
if (n) {
|
|
109
|
-
const l = parseInt(n);
|
|
110
|
-
Number.isNaN(l) || (u = B(
|
|
111
|
-
e,
|
|
112
|
-
t,
|
|
113
|
-
l,
|
|
114
|
-
c
|
|
115
|
-
));
|
|
116
|
-
}
|
|
117
|
-
if (i) {
|
|
118
|
-
const l = parseInt(i);
|
|
119
|
-
if (!Number.isNaN(l)) {
|
|
120
|
-
const s = v(e, t, l);
|
|
121
|
-
u = u || s;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
u && t.apply(new S("Reapply spacing after regeneration"));
|
|
125
|
-
}
|
|
126
|
-
function ee(o) {
|
|
127
|
-
const { currentNode: e, documentModifier: t, afterRegenerate: r, products: n, layout: i } = o;
|
|
128
|
-
e && x({
|
|
129
|
-
currentNode: e,
|
|
130
|
-
documentModifier: t,
|
|
131
|
-
products: n,
|
|
132
|
-
layout: i,
|
|
133
|
-
afterRegenerate: () => {
|
|
134
|
-
setTimeout(() => {
|
|
135
|
-
V({ currentNode: e, documentModifier: t });
|
|
136
|
-
}, 0), r == null || r();
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
function M() {
|
|
141
|
-
const o = b(), { currencySettings: e } = o.recommendationConfigs;
|
|
142
|
-
return {
|
|
143
|
-
code: e.value,
|
|
144
|
-
symbol: e.symbol,
|
|
145
|
-
alignment: e.alignment === "0" ? "before" : "after",
|
|
146
|
-
decimalCount: parseInt(e.decimalCount) || 2,
|
|
147
|
-
decimalSeparator: e.decimalSeparator,
|
|
148
|
-
thousandSeparator: e.thousandSeparator
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
function A(o, e = "price") {
|
|
152
|
-
const t = M(), r = o[e], n = (r == null ? void 0 : r[t.code]) ?? Object.values(r ?? {})[0] ?? 0;
|
|
153
|
-
return D({
|
|
154
|
-
price: n,
|
|
155
|
-
currency: t
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function j(o) {
|
|
159
|
-
var i, c;
|
|
160
|
-
const e = M(), t = ((i = o.original_price) == null ? void 0 : i[e.code]) ?? Object.values(o.original_price ?? {})[0] ?? 0, r = ((c = o.price) == null ? void 0 : c[e.code]) ?? Object.values(o.price ?? {})[0] ?? 0, n = t > 0 ? Math.round((t - r) / t * 100) : 0;
|
|
161
|
-
return n > 0 ? `-${n}%` : "0%";
|
|
162
|
-
}
|
|
163
|
-
function I(o) {
|
|
164
|
-
const { documentModifier: e, product: t, priceEl: r, oldPriceEl: n, omnibusPriceEl: i, omnibusDiscountEl: c } = o;
|
|
165
|
-
let u = !1;
|
|
166
|
-
if (r && "querySelector" in r) {
|
|
167
|
-
const l = r.querySelector("strong"), s = A(t, "price");
|
|
168
|
-
g(e, l, s) && (u = !0);
|
|
169
|
-
}
|
|
170
|
-
if (n && "querySelector" in n) {
|
|
171
|
-
const l = n.querySelector("strong"), s = A(t, "original_price");
|
|
172
|
-
g(e, l, s) && (u = !0);
|
|
173
|
-
}
|
|
174
|
-
if (i && "querySelector" in i) {
|
|
175
|
-
const l = i.querySelector(".omnibus-price-value"), s = A(t, "original_price");
|
|
176
|
-
g(e, l, s) && (u = !0);
|
|
177
|
-
}
|
|
178
|
-
if (c && "querySelector" in c) {
|
|
179
|
-
const l = c.querySelector(".omnibus-discount-value"), s = j(t);
|
|
180
|
-
g(e, l, s) && (u = !0);
|
|
181
|
-
}
|
|
182
|
-
return u;
|
|
183
|
-
}
|
|
184
|
-
function W(o) {
|
|
185
|
-
const {
|
|
186
|
-
documentModifier: e,
|
|
187
|
-
product: t,
|
|
188
|
-
imageEl: r,
|
|
189
|
-
nameEl: n,
|
|
190
|
-
priceEl: i,
|
|
191
|
-
oldPriceEl: c,
|
|
192
|
-
omnibusPriceEl: u,
|
|
193
|
-
omnibusDiscountEl: l,
|
|
194
|
-
buttonEl: s
|
|
195
|
-
} = o;
|
|
196
|
-
let d = !1;
|
|
197
|
-
if (r && "querySelector" in r) {
|
|
198
|
-
const a = r.querySelector("img");
|
|
199
|
-
a && (e.modifyHtml(a).setAttribute("src", U(t.image_url)).setAttribute("alt", t.name), d = !0);
|
|
200
|
-
const p = r.querySelector("a");
|
|
201
|
-
p && (e.modifyHtml(p).setAttribute("href", t.url), d = !0);
|
|
202
|
-
}
|
|
203
|
-
if (n && "querySelector" in n) {
|
|
204
|
-
const a = n.querySelector("strong");
|
|
205
|
-
g(e, a, t.name) && (d = !0);
|
|
206
|
-
}
|
|
207
|
-
if (I({
|
|
208
|
-
documentModifier: e,
|
|
209
|
-
product: t,
|
|
210
|
-
priceEl: i,
|
|
211
|
-
oldPriceEl: c,
|
|
212
|
-
omnibusPriceEl: u,
|
|
213
|
-
omnibusDiscountEl: l
|
|
214
|
-
}) && (d = !0), s && "querySelector" in s) {
|
|
215
|
-
const a = s.querySelector("a.es-button") || s.querySelector("a");
|
|
216
|
-
a && (e.modifyHtml(a).setAttribute("href", t.url), d = !0);
|
|
217
|
-
}
|
|
218
|
-
return d;
|
|
219
|
-
}
|
|
220
|
-
function te(o) {
|
|
221
|
-
const { currentNode: e, documentModifier: t, products: r } = o;
|
|
222
|
-
if (!e || !("querySelectorAll" in e))
|
|
223
|
-
return !1;
|
|
224
|
-
const n = e.querySelectorAll(
|
|
225
|
-
`[esd-extension-block-id="${m.IMAGE}"]`
|
|
226
|
-
), i = e.querySelectorAll(
|
|
227
|
-
`[esd-extension-block-id="${m.NAME}"]`
|
|
228
|
-
), c = e.querySelectorAll(
|
|
229
|
-
`[esd-extension-block-id="${m.PRICE}"]`
|
|
230
|
-
), u = e.querySelectorAll(
|
|
231
|
-
`[esd-extension-block-id="${m.OLD_PRICE}"]`
|
|
232
|
-
), l = e.querySelectorAll(
|
|
233
|
-
`[esd-extension-block-id="${m.OMNIBUS_PRICE}"]`
|
|
234
|
-
), s = e.querySelectorAll(
|
|
235
|
-
`[esd-extension-block-id="${m.OMNIBUS_DISCOUNT}"]`
|
|
236
|
-
), d = e.querySelectorAll(
|
|
237
|
-
`[esd-extension-block-id="${m.BUTTON}"]`
|
|
238
|
-
);
|
|
239
|
-
if (n.length !== r.length)
|
|
240
|
-
return !1;
|
|
241
|
-
let a = !1;
|
|
242
|
-
return r.forEach((p, f) => {
|
|
243
|
-
const O = W({
|
|
244
|
-
documentModifier: t,
|
|
245
|
-
product: p,
|
|
246
|
-
imageEl: n[f] ?? null,
|
|
247
|
-
nameEl: i[f] ?? null,
|
|
248
|
-
priceEl: c[f] ?? null,
|
|
249
|
-
oldPriceEl: u[f] ?? null,
|
|
250
|
-
omnibusPriceEl: l[f] ?? null,
|
|
251
|
-
omnibusDiscountEl: s[f] ?? null,
|
|
252
|
-
buttonEl: d[f] ?? null
|
|
253
|
-
});
|
|
254
|
-
a = a || O;
|
|
255
|
-
}), a && t.apply(new S("Updated product content in-place")), !0;
|
|
256
|
-
}
|
|
257
|
-
function oe(o) {
|
|
258
|
-
const { currentNode: e, documentModifier: t } = o;
|
|
259
|
-
if (!e || !("querySelectorAll" in e))
|
|
260
|
-
return !1;
|
|
261
|
-
const n = b().recommendationProducts;
|
|
262
|
-
if (n.length === 0)
|
|
263
|
-
return !1;
|
|
264
|
-
const i = e.querySelectorAll(
|
|
265
|
-
`[esd-extension-block-id="${m.PRICE}"]`
|
|
266
|
-
), c = e.querySelectorAll(
|
|
267
|
-
`[esd-extension-block-id="${m.OLD_PRICE}"]`
|
|
268
|
-
), u = e.querySelectorAll(
|
|
269
|
-
`[esd-extension-block-id="${m.OMNIBUS_PRICE}"]`
|
|
270
|
-
), l = e.querySelectorAll(
|
|
271
|
-
`[esd-extension-block-id="${m.OMNIBUS_DISCOUNT}"]`
|
|
272
|
-
);
|
|
273
|
-
let s = !1;
|
|
274
|
-
return n.forEach((d, a) => {
|
|
275
|
-
I({
|
|
276
|
-
documentModifier: t,
|
|
277
|
-
product: d,
|
|
278
|
-
priceEl: i[a] ?? null,
|
|
279
|
-
oldPriceEl: c[a] ?? null,
|
|
280
|
-
omnibusPriceEl: u[a] ?? null,
|
|
281
|
-
omnibusDiscountEl: l[a] ?? null
|
|
282
|
-
}) && (s = !0);
|
|
283
|
-
}), s && t.apply(new S("Updated price formatting in-place")), s;
|
|
284
|
-
}
|
|
285
|
-
function re(o) {
|
|
286
|
-
const { currentNode: e, documentModifier: t, currency: r } = o, n = E(e);
|
|
287
|
-
if (!n)
|
|
288
|
-
return;
|
|
289
|
-
const i = r.alignment === "before" ? "0" : "1", c = (u, l) => {
|
|
290
|
-
t.modifyHtml(n).setAttribute(u, l);
|
|
291
|
-
};
|
|
292
|
-
c(y.CURRENCY, r.code), c(y.SYMBOL, r.symbol), c(y.ALIGNMENT, i), c(y.THOUSAND_SEPARATOR, r.thousandSeparator), c(y.DECIMAL_SEPARATOR, r.decimalSeparator), c(y.DECIMAL_COUNT, r.decimalCount.toString()), t.apply(new S("Update currency attributes"));
|
|
293
|
-
}
|
|
294
|
-
export {
|
|
295
|
-
A as formatProductPrice,
|
|
296
|
-
E as getBlockElement,
|
|
297
|
-
N as getCardComposition,
|
|
298
|
-
P as getCurrentLayout,
|
|
299
|
-
V as reapplySpacing,
|
|
300
|
-
$ as regenerateMobileProductRows,
|
|
301
|
-
x as regenerateProductRows,
|
|
302
|
-
ee as regenerateProductRowsWithStyles,
|
|
303
|
-
re as setCurrencyAttributes,
|
|
304
|
-
oe as updatePricesInPlace,
|
|
305
|
-
te as updateProductContentInPlace,
|
|
306
|
-
W as updateSingleProductContent
|
|
307
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ModificationDescription as r } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
const i = "ins-recommendation-desktop-container", s = "ins-recommendation-mobile-container", l = `.${s} { display: none; }`, u = `@media only screen and (max-width: 480px) { .${i} { display: none !important; } .${s} { display: table !important; } }`, c = `.${s}`;
|
|
3
|
-
function a(o, e) {
|
|
4
|
-
return !!o.querySelector(e);
|
|
5
|
-
}
|
|
6
|
-
function d(o) {
|
|
7
|
-
return o.querySelectorAll(`*${i}`).length > 0;
|
|
8
|
-
}
|
|
9
|
-
function p(o) {
|
|
10
|
-
const e = o.getDocumentRootCssNode();
|
|
11
|
-
if (!e)
|
|
12
|
-
return;
|
|
13
|
-
const n = o.getDocumentModifier();
|
|
14
|
-
let t = !1;
|
|
15
|
-
a(e, c) || (n.modifyCss(e).appendRule(l), t = !0), d(e) || (n.modifyCss(e).appendRule(u), t = !0), t && n.apply(new r("Add mobile layout CSS rules"));
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
i as CSS_CLASS_DESKTOP_CONTAINER,
|
|
19
|
-
s as CSS_CLASS_MOBILE_CONTAINER,
|
|
20
|
-
p as ensureMobileCssRulesExist
|
|
21
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { createPaddingsControl as n, createTextBackgroundColorControl as e, createTextFontFamilyControl as l, createTextStyleControl as C, createTextSizeControl as c, createTextColorControl as N, createTextAlignControl as a } from "../../../controlFactories.js";
|
|
2
|
-
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
-
import { RecommendationControlId as t } from "../../constants/controlIds.js";
|
|
4
|
-
import { CONTAINER_SELECTOR as r } from "../../constants/selectors.js";
|
|
5
|
-
import { NameTextTrimControl as i } from "./textTrim.js";
|
|
6
|
-
const m = a(
|
|
7
|
-
t.NAME_ALIGN,
|
|
8
|
-
o.NAME,
|
|
9
|
-
r
|
|
10
|
-
), A = N(
|
|
11
|
-
t.NAME_COLOR,
|
|
12
|
-
o.NAME,
|
|
13
|
-
r
|
|
14
|
-
), E = c(
|
|
15
|
-
t.NAME_SIZE,
|
|
16
|
-
o.NAME,
|
|
17
|
-
r
|
|
18
|
-
), M = C(
|
|
19
|
-
t.NAME_STYLE,
|
|
20
|
-
o.NAME,
|
|
21
|
-
r
|
|
22
|
-
), s = l(
|
|
23
|
-
t.NAME_FONT_FAMILY,
|
|
24
|
-
o.NAME,
|
|
25
|
-
r
|
|
26
|
-
), d = e(
|
|
27
|
-
t.NAME_BACKGROUND,
|
|
28
|
-
o.NAME,
|
|
29
|
-
r
|
|
30
|
-
), T = n(
|
|
31
|
-
t.NAME_PADDINGS,
|
|
32
|
-
o.NAME,
|
|
33
|
-
r
|
|
34
|
-
), F = {
|
|
35
|
-
align: m,
|
|
36
|
-
color: A,
|
|
37
|
-
size: E,
|
|
38
|
-
style: M,
|
|
39
|
-
fontFamily: s,
|
|
40
|
-
background: d,
|
|
41
|
-
paddings: T,
|
|
42
|
-
textTrim: i
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
F as NameControls
|
|
46
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { ModificationDescription as a } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
import { CommonControl as c } from "../../../common-control.js";
|
|
3
|
-
import { RecommendationBlockId as l } from "../../constants/blockIds.js";
|
|
4
|
-
import { RecommendationControlId as m } from "../../constants/controlIds.js";
|
|
5
|
-
import { CONTAINER_SELECTOR as u } from "../../constants/selectors.js";
|
|
6
|
-
const i = {
|
|
7
|
-
TEXT_TRIM_ENABLED: "textTrimEnabled"
|
|
8
|
-
}, o = "text-trim-enabled", d = `.${o}`, T = `.${o} p`, f = `.${o} { max-width: 0; }`, p = `.${o} p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; display: block; }`;
|
|
9
|
-
class g extends c {
|
|
10
|
-
getId() {
|
|
11
|
-
return m.NAME_TEXT_TRIM;
|
|
12
|
-
}
|
|
13
|
-
getTemplate() {
|
|
14
|
-
return `
|
|
15
|
-
<div class="name-text-trim-control-container">
|
|
16
|
-
${this._GuTwoColumns([
|
|
17
|
-
this._GuLabel({ text: "Trim Long Text" }),
|
|
18
|
-
this._GuToggle(i.TEXT_TRIM_ENABLED)
|
|
19
|
-
])}
|
|
20
|
-
</div>
|
|
21
|
-
`;
|
|
22
|
-
}
|
|
23
|
-
onRender() {
|
|
24
|
-
this._setFormValues(), this._listenToFormUpdates();
|
|
25
|
-
}
|
|
26
|
-
onTemplateNodeUpdated(e) {
|
|
27
|
-
super.onTemplateNodeUpdated(e), this._setFormValues();
|
|
28
|
-
}
|
|
29
|
-
_setFormValues() {
|
|
30
|
-
const e = this._getCurrentTrimState();
|
|
31
|
-
this.api.updateValues({
|
|
32
|
-
[i.TEXT_TRIM_ENABLED]: e
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
_getCurrentTrimState() {
|
|
36
|
-
if (!this.currentNode || !("hasClass" in this.currentNode))
|
|
37
|
-
return !1;
|
|
38
|
-
if (this.currentNode.hasClass(o))
|
|
39
|
-
return !0;
|
|
40
|
-
const e = this.currentNode.closest(u);
|
|
41
|
-
if (!e)
|
|
42
|
-
return !1;
|
|
43
|
-
const t = e.querySelector(
|
|
44
|
-
`[esd-extension-block-id="${l.NAME}"]`
|
|
45
|
-
);
|
|
46
|
-
return t && "hasClass" in t ? t.hasClass(o) : !1;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Finds an existing CSS rule in the document stylesheet by exact query
|
|
50
|
-
* @param query - The CSS query to search for (uses Stripo's CSS query syntax)
|
|
51
|
-
* @returns The CSS rule node if found, undefined otherwise
|
|
52
|
-
*/
|
|
53
|
-
_findCssRule(e) {
|
|
54
|
-
const t = this.api.getDocumentRootCssNode();
|
|
55
|
-
if (t)
|
|
56
|
-
return t.querySelector(e);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Finds the .text-trim-enabled p rule by searching all text-trim rules and comparing selectors
|
|
60
|
-
* This is needed because Stripo's CSS query syntax interprets spaces as path separators
|
|
61
|
-
* @returns true if the rule exists
|
|
62
|
-
*/
|
|
63
|
-
_hasParagraphRule() {
|
|
64
|
-
const e = this.api.getDocumentRootCssNode();
|
|
65
|
-
return e ? e.querySelectorAll(`*${o}`).some((s) => "getSelector" in s && typeof s.getSelector == "function" ? s.getSelector() === T : !1) : !1;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Ensures the text-trim CSS rules exist in the document stylesheet
|
|
69
|
-
* Only adds rules if they don't already exist (prevents duplicates across multiple blocks)
|
|
70
|
-
*/
|
|
71
|
-
_ensureCssRulesExist() {
|
|
72
|
-
const e = this.api.getDocumentRootCssNode();
|
|
73
|
-
if (!e)
|
|
74
|
-
return;
|
|
75
|
-
const t = this.api.getDocumentModifier();
|
|
76
|
-
let s = !1;
|
|
77
|
-
this._findCssRule(d) || (t.modifyCss(e).appendRule(f), s = !0), this._hasParagraphRule() || (t.modifyCss(e).appendRule(p), s = !0), s && t.apply(new a("Add text trim CSS rules"));
|
|
78
|
-
}
|
|
79
|
-
_onTextTrimChange(e) {
|
|
80
|
-
if (!this.currentNode || !("closest" in this.currentNode))
|
|
81
|
-
return;
|
|
82
|
-
const t = this.currentNode.closest(u);
|
|
83
|
-
if (!t || !("querySelectorAll" in t))
|
|
84
|
-
return;
|
|
85
|
-
const s = Array.from(
|
|
86
|
-
t.querySelectorAll(`[esd-extension-block-id="${l.NAME}"]`)
|
|
87
|
-
);
|
|
88
|
-
if (!s.length)
|
|
89
|
-
return;
|
|
90
|
-
e && this._ensureCssRulesExist();
|
|
91
|
-
const r = this.api.getDocumentModifier();
|
|
92
|
-
s.forEach((n) => {
|
|
93
|
-
e ? r.modifyHtml(n).setClass(o) : r.modifyHtml(n).removeClass(o);
|
|
94
|
-
}), r.apply(
|
|
95
|
-
new a(
|
|
96
|
-
e ? "Enable product name text trimming" : "Disable product name text trimming"
|
|
97
|
-
)
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
_listenToFormUpdates() {
|
|
101
|
-
this.api.onValueChanged(i.TEXT_TRIM_ENABLED, (e) => {
|
|
102
|
-
this._onTextTrimChange(e);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export {
|
|
107
|
-
g as NameTextTrimControl
|
|
108
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createPaddingsControl as r, createTextBackgroundColorControl as C, createTextFontFamilyControl as e, createTextStyleControl as l, createTextSizeControl as c, createTextColorControl as _, createTextAlignControl as I } from "../../../controlFactories.js";
|
|
2
|
-
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
-
import { RecommendationControlId as t } from "../../constants/controlIds.js";
|
|
4
|
-
import { CONTAINER_SELECTOR as n } from "../../constants/selectors.js";
|
|
5
|
-
const O = I(
|
|
6
|
-
t.OLD_PRICE_ALIGN,
|
|
7
|
-
o.OLD_PRICE,
|
|
8
|
-
n
|
|
9
|
-
), R = _(
|
|
10
|
-
t.OLD_PRICE_COLOR,
|
|
11
|
-
o.OLD_PRICE,
|
|
12
|
-
n
|
|
13
|
-
), a = c(
|
|
14
|
-
t.OLD_PRICE_SIZE,
|
|
15
|
-
o.OLD_PRICE,
|
|
16
|
-
n
|
|
17
|
-
), i = l(
|
|
18
|
-
t.OLD_PRICE_STYLE,
|
|
19
|
-
o.OLD_PRICE,
|
|
20
|
-
n
|
|
21
|
-
), E = e(
|
|
22
|
-
t.OLD_PRICE_FONT_FAMILY,
|
|
23
|
-
o.OLD_PRICE,
|
|
24
|
-
n
|
|
25
|
-
), L = C(
|
|
26
|
-
t.OLD_PRICE_BACKGROUND,
|
|
27
|
-
o.OLD_PRICE,
|
|
28
|
-
n
|
|
29
|
-
), P = r(
|
|
30
|
-
t.OLD_PRICE_PADDINGS,
|
|
31
|
-
o.OLD_PRICE,
|
|
32
|
-
n
|
|
33
|
-
), T = {
|
|
34
|
-
align: O,
|
|
35
|
-
color: R,
|
|
36
|
-
size: a,
|
|
37
|
-
style: i,
|
|
38
|
-
fontFamily: E,
|
|
39
|
-
background: L,
|
|
40
|
-
paddings: P
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
T as OldPriceControls
|
|
44
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { createPaddingsControl as n, createTextBackgroundColorControl as e, createTextFontFamilyControl as C, createTextStyleControl as O, createTextSizeControl as S, createTextColorControl as I, createTextAlignControl as N } from "../../../controlFactories.js";
|
|
2
|
-
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
-
import { RecommendationControlId as t } from "../../constants/controlIds.js";
|
|
4
|
-
import { CONTAINER_SELECTOR as r } from "../../constants/selectors.js";
|
|
5
|
-
import { OmnibusDiscountTextAfterControl as l } from "./textAfter.js";
|
|
6
|
-
import { OmnibusDiscountTextBeforeControl as U } from "./textBefore.js";
|
|
7
|
-
const i = N(
|
|
8
|
-
t.OMNIBUS_DISCOUNT_ALIGN,
|
|
9
|
-
o.OMNIBUS_DISCOUNT,
|
|
10
|
-
r
|
|
11
|
-
), T = I(
|
|
12
|
-
t.OMNIBUS_DISCOUNT_COLOR,
|
|
13
|
-
o.OMNIBUS_DISCOUNT,
|
|
14
|
-
r
|
|
15
|
-
), c = S(
|
|
16
|
-
t.OMNIBUS_DISCOUNT_SIZE,
|
|
17
|
-
o.OMNIBUS_DISCOUNT,
|
|
18
|
-
r
|
|
19
|
-
), _ = O(
|
|
20
|
-
t.OMNIBUS_DISCOUNT_STYLE,
|
|
21
|
-
o.OMNIBUS_DISCOUNT,
|
|
22
|
-
r
|
|
23
|
-
), m = C(
|
|
24
|
-
t.OMNIBUS_DISCOUNT_FONT_FAMILY,
|
|
25
|
-
o.OMNIBUS_DISCOUNT,
|
|
26
|
-
r
|
|
27
|
-
), s = e(
|
|
28
|
-
t.OMNIBUS_DISCOUNT_BACKGROUND,
|
|
29
|
-
o.OMNIBUS_DISCOUNT,
|
|
30
|
-
r
|
|
31
|
-
), B = n(
|
|
32
|
-
t.OMNIBUS_DISCOUNT_PADDINGS,
|
|
33
|
-
o.OMNIBUS_DISCOUNT,
|
|
34
|
-
r
|
|
35
|
-
), g = {
|
|
36
|
-
align: i,
|
|
37
|
-
color: T,
|
|
38
|
-
size: c,
|
|
39
|
-
style: _,
|
|
40
|
-
fontFamily: m,
|
|
41
|
-
background: s,
|
|
42
|
-
paddings: B,
|
|
43
|
-
textBefore: U,
|
|
44
|
-
textAfter: l
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
g as OmnibusDiscountControls
|
|
48
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { createPaddingsControl as n, createTextBackgroundColorControl as e, createTextFontFamilyControl as C, createTextStyleControl as I, createTextSizeControl as l, createTextColorControl as i, createTextAlignControl as c } from "../../../controlFactories.js";
|
|
2
|
-
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
-
import { RecommendationControlId as t } from "../../constants/controlIds.js";
|
|
4
|
-
import { CONTAINER_SELECTOR as r } from "../../constants/selectors.js";
|
|
5
|
-
import { OmnibusPriceTextAfterControl as O } from "./textAfter.js";
|
|
6
|
-
import { OmnibusPriceTextBeforeControl as _ } from "./textBefore.js";
|
|
7
|
-
const m = c(
|
|
8
|
-
t.OMNIBUS_PRICE_ALIGN,
|
|
9
|
-
o.OMNIBUS_PRICE,
|
|
10
|
-
r
|
|
11
|
-
), S = i(
|
|
12
|
-
t.OMNIBUS_PRICE_COLOR,
|
|
13
|
-
o.OMNIBUS_PRICE,
|
|
14
|
-
r
|
|
15
|
-
), B = l(
|
|
16
|
-
t.OMNIBUS_PRICE_SIZE,
|
|
17
|
-
o.OMNIBUS_PRICE,
|
|
18
|
-
r
|
|
19
|
-
), N = I(
|
|
20
|
-
t.OMNIBUS_PRICE_STYLE,
|
|
21
|
-
o.OMNIBUS_PRICE,
|
|
22
|
-
r
|
|
23
|
-
), P = C(
|
|
24
|
-
t.OMNIBUS_PRICE_FONT_FAMILY,
|
|
25
|
-
o.OMNIBUS_PRICE,
|
|
26
|
-
r
|
|
27
|
-
), R = e(
|
|
28
|
-
t.OMNIBUS_PRICE_BACKGROUND,
|
|
29
|
-
o.OMNIBUS_PRICE,
|
|
30
|
-
r
|
|
31
|
-
), a = n(
|
|
32
|
-
t.OMNIBUS_PRICE_PADDINGS,
|
|
33
|
-
o.OMNIBUS_PRICE,
|
|
34
|
-
r
|
|
35
|
-
), f = {
|
|
36
|
-
align: m,
|
|
37
|
-
color: S,
|
|
38
|
-
size: B,
|
|
39
|
-
style: N,
|
|
40
|
-
fontFamily: P,
|
|
41
|
-
background: R,
|
|
42
|
-
paddings: a,
|
|
43
|
-
textBefore: _,
|
|
44
|
-
textAfter: O
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
f as OmnibusPriceControls
|
|
48
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createPaddingsControl as r, createTextBackgroundColorControl as C, createTextFontFamilyControl as e, createTextStyleControl as l, createTextSizeControl as c, createTextColorControl as I, createTextAlignControl as R } from "../../../controlFactories.js";
|
|
2
|
-
import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
3
|
-
import { RecommendationControlId as t } from "../../constants/controlIds.js";
|
|
4
|
-
import { CONTAINER_SELECTOR as n } from "../../constants/selectors.js";
|
|
5
|
-
const a = R(
|
|
6
|
-
t.PRICE_ALIGN,
|
|
7
|
-
o.PRICE,
|
|
8
|
-
n
|
|
9
|
-
), i = I(
|
|
10
|
-
t.PRICE_COLOR,
|
|
11
|
-
o.PRICE,
|
|
12
|
-
n
|
|
13
|
-
), E = c(
|
|
14
|
-
t.PRICE_SIZE,
|
|
15
|
-
o.PRICE,
|
|
16
|
-
n
|
|
17
|
-
), P = l(
|
|
18
|
-
t.PRICE_STYLE,
|
|
19
|
-
o.PRICE,
|
|
20
|
-
n
|
|
21
|
-
), m = e(
|
|
22
|
-
t.PRICE_FONT_FAMILY,
|
|
23
|
-
o.PRICE,
|
|
24
|
-
n
|
|
25
|
-
), s = C(
|
|
26
|
-
t.PRICE_BACKGROUND,
|
|
27
|
-
o.PRICE,
|
|
28
|
-
n
|
|
29
|
-
), d = r(
|
|
30
|
-
t.PRICE_PADDINGS,
|
|
31
|
-
o.PRICE,
|
|
32
|
-
n
|
|
33
|
-
), x = {
|
|
34
|
-
align: a,
|
|
35
|
-
color: i,
|
|
36
|
-
size: E,
|
|
37
|
-
style: P,
|
|
38
|
-
fontFamily: m,
|
|
39
|
-
background: s,
|
|
40
|
-
paddings: d
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
x as PriceControls
|
|
44
|
-
};
|