@useinsider/guido 2.1.0-beta.7d0f92a → 2.1.0-beta.860ef21
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/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +14 -15
- package/dist/composables/useHtmlValidator.js +84 -106
- package/dist/composables/useRecommendation.js +21 -54
- package/dist/config/compiler/recommendationCompilerRules.js +39 -45
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +15 -16
- package/dist/extensions/Blocks/Recommendation/block.js +9 -130
- 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 +193 -230
- 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/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +169 -223
- package/dist/services/recommendationApi.js +9 -10
- package/dist/services/templateLibraryApi.js +13 -16
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useRecommendation.d.ts +0 -1
- 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 -131
- 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/static/styles/components/notification.css.js +1 -0
- package/dist/static/styles/components/wide-panel.css.js +15 -0
- package/dist/static/styles/customEditorStyle.css.js +2 -25
- package/dist/utils/pairProductVariables.js +56 -57
- package/dist/utils/templatePreparation.js +14 -15
- package/package.json +2 -2
- 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 -65
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +0 -20
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -19
- 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 -217
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +0 -70
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +0 -110
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +0 -67
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -286
- 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 -69
- 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 -122
- 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 -35
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -31
- 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 -68
- 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 -42
- 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 -214
- 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 -39
- 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 -57
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -160
- 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,67 +0,0 @@
|
|
|
1
|
-
var r = Object.defineProperty;
|
|
2
|
-
var u = (o, t, e) => t in o ? r(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
-
var n = (o, t, e) => u(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { UEAttr as l } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
-
import { CommonControl as f } from "../../../common-control.js";
|
|
6
|
-
import { RecommendationConfigService as i } from "../../services/configService.js";
|
|
7
|
-
import { useRecommendationExtensionStore as d } from "../../store/recommendation.js";
|
|
8
|
-
const h = "recommendation-shuffle-control", s = {
|
|
9
|
-
SHUFFLE_PRODUCTS: "shuffleProducts"
|
|
10
|
-
};
|
|
11
|
-
class g extends f {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
// Store is used for backward compatibility with product fetching
|
|
15
|
-
n(this, "store", d());
|
|
16
|
-
}
|
|
17
|
-
getId() {
|
|
18
|
-
return h;
|
|
19
|
-
}
|
|
20
|
-
getTemplate() {
|
|
21
|
-
return `
|
|
22
|
-
<div class="shuffle-control-container">
|
|
23
|
-
${this._GuTwoColumns([
|
|
24
|
-
this._GuLabel({ text: "Shuffle Recommended Products" }),
|
|
25
|
-
this._GuToggle(s.SHUFFLE_PRODUCTS)
|
|
26
|
-
])}
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
onRender() {
|
|
31
|
-
this._initializeToggle(), this._setFormValues(), this._listenToFormUpdates();
|
|
32
|
-
}
|
|
33
|
-
onTemplateNodeUpdated(e) {
|
|
34
|
-
super.onTemplateNodeUpdated(e), this._setFormValues();
|
|
35
|
-
}
|
|
36
|
-
_setFormValues() {
|
|
37
|
-
const e = i.getConfig(this.currentNode);
|
|
38
|
-
this.api.updateValues({
|
|
39
|
-
[s.SHUFFLE_PRODUCTS]: e.shuffleProducts
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
_initializeToggle() {
|
|
43
|
-
const e = i.getConfig(this.currentNode);
|
|
44
|
-
this.api.setUIEAttribute(
|
|
45
|
-
s.SHUFFLE_PRODUCTS,
|
|
46
|
-
l.SELECTPICKER.items,
|
|
47
|
-
e.shuffleProducts
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
_onShuffleChange(e) {
|
|
51
|
-
this.currentNode && (i.updateConfig(
|
|
52
|
-
this.api,
|
|
53
|
-
this.currentNode,
|
|
54
|
-
{ shuffleProducts: e },
|
|
55
|
-
`${e ? "Enabled" : "Disabled"} product shuffle`
|
|
56
|
-
), this.store.patchCurrentBlockConfig({ shuffleProducts: e }));
|
|
57
|
-
}
|
|
58
|
-
_listenToFormUpdates() {
|
|
59
|
-
this.api.onValueChanged(s.SHUFFLE_PRODUCTS, (e) => {
|
|
60
|
-
this._onShuffleChange(!!e);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
h as SHUFFLE_CONTROL_ID,
|
|
66
|
-
g as ShuffleControl
|
|
67
|
-
};
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { ModificationDescription as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
import { RecommendationBlockId as f } from "../../constants/blockIds.js";
|
|
3
|
-
import { CURRENCY_ATTR as y, CONTAINER_SELECTOR as I } from "../../constants/selectors.js";
|
|
4
|
-
import { useRecommendationExtensionStore as A } from "../../store/recommendation.js";
|
|
5
|
-
import { prepareProductRows as R } from "../../templates/index.js";
|
|
6
|
-
import { formatPrice as O } from "../../utils/priceFormatter.js";
|
|
7
|
-
import { isTdNode as T } from "../../utils/tagName.js";
|
|
8
|
-
import { sanitizeImageUrl as k, getDefaultProducts as _, DEFAULT_CARD_COMPOSITION as P } from "../../templates/utils.js";
|
|
9
|
-
const C = "ins-recommendation-v3-block-v2";
|
|
10
|
-
function b(o) {
|
|
11
|
-
if (!o)
|
|
12
|
-
return null;
|
|
13
|
-
if ("getAttribute" in o) {
|
|
14
|
-
const e = o.getAttribute("class");
|
|
15
|
-
if (e && e.includes(C))
|
|
16
|
-
return o;
|
|
17
|
-
}
|
|
18
|
-
return "querySelector" in o ? o.querySelector(`.${C}`) : null;
|
|
19
|
-
}
|
|
20
|
-
function q(o) {
|
|
21
|
-
const e = b(o);
|
|
22
|
-
if (!e || !("getAttribute" in e))
|
|
23
|
-
return "grid";
|
|
24
|
-
const t = e.getAttribute("data-layout");
|
|
25
|
-
return t === "list" || t === "horizontal" ? "list" : "grid";
|
|
26
|
-
}
|
|
27
|
-
function D(o) {
|
|
28
|
-
const e = b(o);
|
|
29
|
-
if (!e || !("getAttribute" in e))
|
|
30
|
-
return P;
|
|
31
|
-
const t = e.getAttribute("data-card-composition");
|
|
32
|
-
return t ? t.split(",").filter(Boolean) : P;
|
|
33
|
-
}
|
|
34
|
-
function S(o, e, t) {
|
|
35
|
-
if (!e || !("childNodes" in e))
|
|
36
|
-
return !1;
|
|
37
|
-
const n = e.childNodes().find(
|
|
38
|
-
(i) => "getType" in i && i.getType() === "text"
|
|
39
|
-
);
|
|
40
|
-
return n ? (o.modifyHtml(n).setText(t), !0) : !1;
|
|
41
|
-
}
|
|
42
|
-
function w(o, e) {
|
|
43
|
-
return o && o.length > 0 ? o : e.length > 0 ? e : _();
|
|
44
|
-
}
|
|
45
|
-
function U(o) {
|
|
46
|
-
const { currentNode: e, documentModifier: t, afterRegenerate: r, products: n, layout: i } = o;
|
|
47
|
-
if (!e || !("querySelector" in e))
|
|
48
|
-
return;
|
|
49
|
-
const c = e.querySelector(I);
|
|
50
|
-
if (!c)
|
|
51
|
-
return;
|
|
52
|
-
const s = A(), l = w(n, s.recommendationProducts), { cardsInRow: u } = s.recommendationConfigs, d = D(e), a = i ?? q(e), p = R(l, a, {
|
|
53
|
-
productsPerRow: u,
|
|
54
|
-
composition: d
|
|
55
|
-
});
|
|
56
|
-
t.modifyHtml(c).setInnerHtml(p).apply(new g("Updated product")), r == null || r();
|
|
57
|
-
}
|
|
58
|
-
function $(o, e, t, r) {
|
|
59
|
-
const i = `0 ${Math.floor(t / 2)}px`;
|
|
60
|
-
let c = !1;
|
|
61
|
-
return r === "grid" ? Array.from(
|
|
62
|
-
o.querySelectorAll(".attribute-cell")
|
|
63
|
-
).forEach((l) => {
|
|
64
|
-
e.modifyHtml(l).setStyle("padding", i), c = !0;
|
|
65
|
-
}) : Array.from(
|
|
66
|
-
o.querySelectorAll(".product-card-wrapper")
|
|
67
|
-
).forEach((l) => {
|
|
68
|
-
const u = "parentNode" in l ? l.parentNode : null;
|
|
69
|
-
u && T(u) && (e.modifyHtml(u).setStyle("padding", i), c = !0);
|
|
70
|
-
}), c;
|
|
71
|
-
}
|
|
72
|
-
function L(o, e, t) {
|
|
73
|
-
const r = `${t}px`, n = Array.from(o.querySelectorAll(".spacer"));
|
|
74
|
-
let i = !1;
|
|
75
|
-
return n.forEach((c) => {
|
|
76
|
-
e.modifyHtml(c).setStyle("height", r), i = !0;
|
|
77
|
-
}), i;
|
|
78
|
-
}
|
|
79
|
-
function H(o) {
|
|
80
|
-
const { currentNode: e, documentModifier: t } = o;
|
|
81
|
-
if (!e)
|
|
82
|
-
return;
|
|
83
|
-
const r = b(e);
|
|
84
|
-
if (!r || !("getAttribute" in r))
|
|
85
|
-
return;
|
|
86
|
-
const n = r.getAttribute("data-column-spacing"), i = r.getAttribute("data-row-spacing"), c = q(e);
|
|
87
|
-
let s = !1;
|
|
88
|
-
if (n) {
|
|
89
|
-
const l = parseInt(n);
|
|
90
|
-
Number.isNaN(l) || (s = $(
|
|
91
|
-
e,
|
|
92
|
-
t,
|
|
93
|
-
l,
|
|
94
|
-
c
|
|
95
|
-
));
|
|
96
|
-
}
|
|
97
|
-
if (i) {
|
|
98
|
-
const l = parseInt(i);
|
|
99
|
-
if (!Number.isNaN(l)) {
|
|
100
|
-
const u = L(e, t, l);
|
|
101
|
-
s = s || u;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
s && t.apply(new g("Reapply spacing after regeneration"));
|
|
105
|
-
}
|
|
106
|
-
function K(o) {
|
|
107
|
-
const { currentNode: e, documentModifier: t, afterRegenerate: r, products: n, layout: i } = o;
|
|
108
|
-
e && U({
|
|
109
|
-
currentNode: e,
|
|
110
|
-
documentModifier: t,
|
|
111
|
-
products: n,
|
|
112
|
-
layout: i,
|
|
113
|
-
afterRegenerate: () => {
|
|
114
|
-
setTimeout(() => {
|
|
115
|
-
H({ currentNode: e, documentModifier: t });
|
|
116
|
-
}, 0), r == null || r();
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function h() {
|
|
121
|
-
const o = A(), { currencySettings: e } = o.recommendationConfigs;
|
|
122
|
-
return {
|
|
123
|
-
code: e.value,
|
|
124
|
-
symbol: e.symbol,
|
|
125
|
-
alignment: e.alignment === "0" ? "before" : "after",
|
|
126
|
-
decimalCount: parseInt(e.decimalCount) || 2,
|
|
127
|
-
decimalSeparator: e.decimalSeparator,
|
|
128
|
-
thousandSeparator: e.thousandSeparator
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
function E(o, e = "price") {
|
|
132
|
-
const t = h(), r = o[e], n = (r == null ? void 0 : r[t.code]) ?? Object.values(r ?? {})[0] ?? 0;
|
|
133
|
-
return O({
|
|
134
|
-
price: n,
|
|
135
|
-
currency: t
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function x(o) {
|
|
139
|
-
var i, c;
|
|
140
|
-
const e = h(), 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;
|
|
141
|
-
return n > 0 ? `-${n}%` : "0%";
|
|
142
|
-
}
|
|
143
|
-
function N(o) {
|
|
144
|
-
const { documentModifier: e, product: t, priceEl: r, oldPriceEl: n, omnibusPriceEl: i, omnibusDiscountEl: c } = o;
|
|
145
|
-
let s = !1;
|
|
146
|
-
if (r && "querySelector" in r) {
|
|
147
|
-
const l = r.querySelector("strong"), u = E(t, "price");
|
|
148
|
-
S(e, l, u) && (s = !0);
|
|
149
|
-
}
|
|
150
|
-
if (n && "querySelector" in n) {
|
|
151
|
-
const l = n.querySelector("strong"), u = E(t, "original_price");
|
|
152
|
-
S(e, l, u) && (s = !0);
|
|
153
|
-
}
|
|
154
|
-
if (i && "querySelector" in i) {
|
|
155
|
-
const l = i.querySelector(".omnibus-price-value"), u = E(t, "original_price");
|
|
156
|
-
S(e, l, u) && (s = !0);
|
|
157
|
-
}
|
|
158
|
-
if (c && "querySelector" in c) {
|
|
159
|
-
const l = c.querySelector(".omnibus-discount-value"), u = x(t);
|
|
160
|
-
S(e, l, u) && (s = !0);
|
|
161
|
-
}
|
|
162
|
-
return s;
|
|
163
|
-
}
|
|
164
|
-
function B(o) {
|
|
165
|
-
const {
|
|
166
|
-
documentModifier: e,
|
|
167
|
-
product: t,
|
|
168
|
-
imageEl: r,
|
|
169
|
-
nameEl: n,
|
|
170
|
-
priceEl: i,
|
|
171
|
-
oldPriceEl: c,
|
|
172
|
-
omnibusPriceEl: s,
|
|
173
|
-
omnibusDiscountEl: l,
|
|
174
|
-
buttonEl: u
|
|
175
|
-
} = o;
|
|
176
|
-
let d = !1;
|
|
177
|
-
if (r && "querySelector" in r) {
|
|
178
|
-
const a = r.querySelector("img");
|
|
179
|
-
a && (e.modifyHtml(a).setAttribute("src", k(t.image_url)).setAttribute("alt", t.name), d = !0);
|
|
180
|
-
const p = r.querySelector("a");
|
|
181
|
-
p && (e.modifyHtml(p).setAttribute("href", t.url), d = !0);
|
|
182
|
-
}
|
|
183
|
-
if (n && "querySelector" in n) {
|
|
184
|
-
const a = n.querySelector("strong");
|
|
185
|
-
S(e, a, t.name) && (d = !0);
|
|
186
|
-
}
|
|
187
|
-
if (N({
|
|
188
|
-
documentModifier: e,
|
|
189
|
-
product: t,
|
|
190
|
-
priceEl: i,
|
|
191
|
-
oldPriceEl: c,
|
|
192
|
-
omnibusPriceEl: s,
|
|
193
|
-
omnibusDiscountEl: l
|
|
194
|
-
}) && (d = !0), u && "querySelector" in u) {
|
|
195
|
-
const a = u.querySelector("a.es-button") || u.querySelector("a");
|
|
196
|
-
a && (e.modifyHtml(a).setAttribute("href", t.url), d = !0);
|
|
197
|
-
}
|
|
198
|
-
return d;
|
|
199
|
-
}
|
|
200
|
-
function J(o) {
|
|
201
|
-
const { currentNode: e, documentModifier: t, products: r } = o;
|
|
202
|
-
if (!e || !("querySelectorAll" in e))
|
|
203
|
-
return !1;
|
|
204
|
-
const n = e.querySelectorAll(
|
|
205
|
-
`[esd-extension-block-id="${f.IMAGE}"]`
|
|
206
|
-
), i = e.querySelectorAll(
|
|
207
|
-
`[esd-extension-block-id="${f.NAME}"]`
|
|
208
|
-
), c = e.querySelectorAll(
|
|
209
|
-
`[esd-extension-block-id="${f.PRICE}"]`
|
|
210
|
-
), s = e.querySelectorAll(
|
|
211
|
-
`[esd-extension-block-id="${f.OLD_PRICE}"]`
|
|
212
|
-
), l = e.querySelectorAll(
|
|
213
|
-
`[esd-extension-block-id="${f.OMNIBUS_PRICE}"]`
|
|
214
|
-
), u = e.querySelectorAll(
|
|
215
|
-
`[esd-extension-block-id="${f.OMNIBUS_DISCOUNT}"]`
|
|
216
|
-
), d = e.querySelectorAll(
|
|
217
|
-
`[esd-extension-block-id="${f.BUTTON}"]`
|
|
218
|
-
);
|
|
219
|
-
if (n.length !== r.length)
|
|
220
|
-
return !1;
|
|
221
|
-
let a = !1;
|
|
222
|
-
return r.forEach((p, m) => {
|
|
223
|
-
const M = B({
|
|
224
|
-
documentModifier: t,
|
|
225
|
-
product: p,
|
|
226
|
-
imageEl: n[m] ?? null,
|
|
227
|
-
nameEl: i[m] ?? null,
|
|
228
|
-
priceEl: c[m] ?? null,
|
|
229
|
-
oldPriceEl: s[m] ?? null,
|
|
230
|
-
omnibusPriceEl: l[m] ?? null,
|
|
231
|
-
omnibusDiscountEl: u[m] ?? null,
|
|
232
|
-
buttonEl: d[m] ?? null
|
|
233
|
-
});
|
|
234
|
-
a = a || M;
|
|
235
|
-
}), a && t.apply(new g("Updated product content in-place")), !0;
|
|
236
|
-
}
|
|
237
|
-
function Q(o) {
|
|
238
|
-
const { currentNode: e, documentModifier: t } = o;
|
|
239
|
-
if (!e || !("querySelectorAll" in e))
|
|
240
|
-
return !1;
|
|
241
|
-
const n = A().recommendationProducts;
|
|
242
|
-
if (n.length === 0)
|
|
243
|
-
return !1;
|
|
244
|
-
const i = e.querySelectorAll(
|
|
245
|
-
`[esd-extension-block-id="${f.PRICE}"]`
|
|
246
|
-
), c = e.querySelectorAll(
|
|
247
|
-
`[esd-extension-block-id="${f.OLD_PRICE}"]`
|
|
248
|
-
), s = e.querySelectorAll(
|
|
249
|
-
`[esd-extension-block-id="${f.OMNIBUS_PRICE}"]`
|
|
250
|
-
), l = e.querySelectorAll(
|
|
251
|
-
`[esd-extension-block-id="${f.OMNIBUS_DISCOUNT}"]`
|
|
252
|
-
);
|
|
253
|
-
let u = !1;
|
|
254
|
-
return n.forEach((d, a) => {
|
|
255
|
-
N({
|
|
256
|
-
documentModifier: t,
|
|
257
|
-
product: d,
|
|
258
|
-
priceEl: i[a] ?? null,
|
|
259
|
-
oldPriceEl: c[a] ?? null,
|
|
260
|
-
omnibusPriceEl: s[a] ?? null,
|
|
261
|
-
omnibusDiscountEl: l[a] ?? null
|
|
262
|
-
}) && (u = !0);
|
|
263
|
-
}), u && t.apply(new g("Updated price formatting in-place")), u;
|
|
264
|
-
}
|
|
265
|
-
function X(o) {
|
|
266
|
-
const { currentNode: e, documentModifier: t, currency: r } = o, n = b(e);
|
|
267
|
-
if (!n)
|
|
268
|
-
return;
|
|
269
|
-
const i = r.alignment === "before" ? "0" : "1", c = (s, l) => {
|
|
270
|
-
t.modifyHtml(n).setAttribute(s, l);
|
|
271
|
-
};
|
|
272
|
-
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 g("Update currency attributes"));
|
|
273
|
-
}
|
|
274
|
-
export {
|
|
275
|
-
E as formatProductPrice,
|
|
276
|
-
b as getBlockElement,
|
|
277
|
-
D as getCardComposition,
|
|
278
|
-
q as getCurrentLayout,
|
|
279
|
-
H as reapplySpacing,
|
|
280
|
-
U as regenerateProductRows,
|
|
281
|
-
K as regenerateProductRowsWithStyles,
|
|
282
|
-
X as setCurrencyAttributes,
|
|
283
|
-
Q as updatePricesInPlace,
|
|
284
|
-
J as updateProductContentInPlace,
|
|
285
|
-
B as updateSingleProductContent
|
|
286
|
-
};
|
|
@@ -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
|
-
};
|