@useinsider/guido 2.0.0-beta.782343a → 2.0.0-beta.7a88d79
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/@types/config/schemas.js +53 -39
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -2
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +4 -13
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +103 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/{controls/main/index.js → control.js} +67 -101
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +43 -37
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +72 -125
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +69 -91
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +17 -54
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +62 -66
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +6 -7
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +290 -363
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +26 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +28 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +11 -19
- package/dist/src/extensions/Blocks/Recommendation/{controls/main/index.d.ts → control.d.ts} +3 -6
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +7 -15
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/stores/config.d.ts +147 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -13
- package/dist/stores/config.js +7 -0
- package/package.json +3 -3
- 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/selectors.js +0 -11
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -179
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -76
- 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/omnibusDiscount/textAfter.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -183
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -19
- 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 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -75
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -22
- 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 -16
- 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 -57
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { currencyDecimalCounts as
|
|
5
|
-
import { UEAttr as
|
|
6
|
-
import { CommonControl as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const A = "ui-elements-recommendation-block", t = {
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var R = (s, n, e) => n in s ? _(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
|
|
3
|
+
var r = (s, n, e) => R(s, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { currencyDecimalCounts as l, currencyOperators as c, currencyLocationMaps as h } from "../../../enums/extensions/recommendationBlock.js";
|
|
5
|
+
import { UEAttr as m, ModificationDescription as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
6
|
+
import { CommonControl as g } from "../common-control.js";
|
|
7
|
+
import { useRecommendationExtensionStore as O } from "./store/recommendation.js";
|
|
8
|
+
import { prepareProductRows as p } from "./templates/blockTemplate.js";
|
|
9
|
+
import { DEFAULT_CARD_COMPOSITION as C, getDefaultProducts as E } from "./templates/templateUtils.js";
|
|
10
|
+
import { useDebounceFn as U } from "../../../node_modules/@vueuse/shared/index.js";
|
|
11
|
+
const L = "ui-elements-recommendation-block", t = {
|
|
13
12
|
ALGORITHM: "strategy",
|
|
14
13
|
PRODUCT_IDS: "productIds",
|
|
15
14
|
LOCALE: "language",
|
|
@@ -22,23 +21,24 @@ const A = "ui-elements-recommendation-block", t = {
|
|
|
22
21
|
FILTERS: "filterStatus",
|
|
23
22
|
PRODUCT_COUNT: "size",
|
|
24
23
|
PRODUCT_IN_ROW: "cardsInRow",
|
|
25
|
-
SHUFFLE_PRODUCTS: "shuffleProducts"
|
|
24
|
+
SHUFFLE_PRODUCTS: "shuffleProducts",
|
|
25
|
+
RESPONSIVE: "unresponsive"
|
|
26
26
|
};
|
|
27
|
-
class
|
|
27
|
+
class b extends g {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(...arguments);
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
r(this, "store", O());
|
|
31
|
+
r(this, "storeUnsubscription", () => {
|
|
32
32
|
});
|
|
33
|
-
|
|
33
|
+
r(this, "addFilterListener", () => {
|
|
34
34
|
});
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
r(this, "addFilterButton", null);
|
|
36
|
+
r(this, "_debouncedRegenerateProductRows", U(() => {
|
|
37
37
|
this._regenerateProductRows();
|
|
38
38
|
}, 500));
|
|
39
39
|
}
|
|
40
40
|
getId() {
|
|
41
|
-
return
|
|
41
|
+
return L;
|
|
42
42
|
}
|
|
43
43
|
getTemplate() {
|
|
44
44
|
return `
|
|
@@ -49,21 +49,17 @@ class w extends N {
|
|
|
49
49
|
${this._getFilterStatus()}
|
|
50
50
|
${this._getProductLayout()}
|
|
51
51
|
${this._getShuffleProducts()}
|
|
52
|
+
${this._getResponsive()}
|
|
52
53
|
</div>
|
|
53
54
|
`;
|
|
54
55
|
}
|
|
55
56
|
async onRender() {
|
|
56
|
-
|
|
57
|
+
await Promise.all([
|
|
57
58
|
this.store.fetchRecommendationFilters(),
|
|
58
59
|
this.store.fetchRecommendationCreateData(),
|
|
59
60
|
this.store.fetchRecommendationProducts()
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"fetchRecommendationFilters",
|
|
63
|
-
"fetchRecommendationCreateData",
|
|
64
|
-
"fetchRecommendationProducts"
|
|
65
|
-
][i]} failed`, o.reason);
|
|
66
|
-
}), this._listenStateUpdates(), this._initializeSelectItems(), this._setFormValues(), this._listenToFormUpdates();
|
|
61
|
+
// TODO: We need to change the location. It's just for testing
|
|
62
|
+
]), this._listenStateUpdates(), this._initializeSelectItems(), this._setFormValues(), this._listenToFormUpdates();
|
|
67
63
|
}
|
|
68
64
|
onDestroy() {
|
|
69
65
|
var e;
|
|
@@ -83,25 +79,27 @@ class w extends N {
|
|
|
83
79
|
[t.CURRENCY_DECIMAL_COUNT]: e.currencySettings.decimalCount,
|
|
84
80
|
[t.PRODUCT_COUNT]: e.size,
|
|
85
81
|
[t.PRODUCT_IN_ROW]: e.cardsInRow,
|
|
86
|
-
[t.SHUFFLE_PRODUCTS]: e.shuffleProducts
|
|
82
|
+
[t.SHUFFLE_PRODUCTS]: e.shuffleProducts,
|
|
83
|
+
[t.RESPONSIVE]: !e.unresponsive
|
|
87
84
|
});
|
|
88
85
|
}
|
|
89
86
|
_initializeSelectItems() {
|
|
90
|
-
const { store: e } = this, o = e.getActivePredictiveAlgorithms, i = e.getLanguages,
|
|
87
|
+
const { store: e } = this, o = e.getActivePredictiveAlgorithms, i = e.getLanguages, a = {
|
|
91
88
|
[t.ALGORITHM]: o,
|
|
92
89
|
[t.LOCALE]: i,
|
|
93
90
|
[t.CURRENCY]: e.currencyList,
|
|
94
|
-
[t.CURRENCY_LOCATION]:
|
|
91
|
+
[t.CURRENCY_LOCATION]: h,
|
|
95
92
|
[t.CURRENCY_SYMBOL]: e.getCurrencySymbolList,
|
|
96
|
-
[t.CURRENCY_THOUSAND_SEPARATOR]:
|
|
97
|
-
[t.CURRENCY_DECIMAL_SEPARATOR]:
|
|
98
|
-
[t.CURRENCY_DECIMAL_COUNT]:
|
|
93
|
+
[t.CURRENCY_THOUSAND_SEPARATOR]: c,
|
|
94
|
+
[t.CURRENCY_DECIMAL_SEPARATOR]: c,
|
|
95
|
+
[t.CURRENCY_DECIMAL_COUNT]: l,
|
|
99
96
|
[t.PRODUCT_COUNT]: Number(e.recommendationConfigs.size),
|
|
100
97
|
[t.PRODUCT_IN_ROW]: e.recommendationConfigs.cardsInRow,
|
|
101
|
-
[t.SHUFFLE_PRODUCTS]: e.recommendationConfigs.shuffleProducts
|
|
98
|
+
[t.SHUFFLE_PRODUCTS]: e.recommendationConfigs.shuffleProducts,
|
|
99
|
+
[t.RESPONSIVE]: !e.recommendationConfigs.unresponsive
|
|
102
100
|
};
|
|
103
|
-
Object.entries(
|
|
104
|
-
this.api.setUIEAttribute(
|
|
101
|
+
Object.entries(a).forEach(([u, d]) => {
|
|
102
|
+
this.api.setUIEAttribute(u, m.SELECTPICKER.items, d);
|
|
105
103
|
});
|
|
106
104
|
}
|
|
107
105
|
_getAlgorithms() {
|
|
@@ -147,7 +145,7 @@ class w extends N {
|
|
|
147
145
|
this._GuSelect({
|
|
148
146
|
name: t.CURRENCY_LOCATION,
|
|
149
147
|
placeholder: "Select Currency Location",
|
|
150
|
-
options:
|
|
148
|
+
options: h
|
|
151
149
|
}),
|
|
152
150
|
this._GuLabel({ text: "Currency Symbol" }),
|
|
153
151
|
this._GuSelect({
|
|
@@ -159,19 +157,19 @@ class w extends N {
|
|
|
159
157
|
this._GuSelect({
|
|
160
158
|
name: t.CURRENCY_THOUSAND_SEPARATOR,
|
|
161
159
|
placeholder: "Select Thousand Separator",
|
|
162
|
-
options:
|
|
160
|
+
options: c
|
|
163
161
|
}),
|
|
164
162
|
this._GuLabel({ text: "Decimal Separator" }),
|
|
165
163
|
this._GuSelect({
|
|
166
164
|
name: t.CURRENCY_DECIMAL_SEPARATOR,
|
|
167
165
|
placeholder: "Select Decimal Separator",
|
|
168
|
-
options:
|
|
166
|
+
options: c
|
|
169
167
|
}),
|
|
170
168
|
this._GuLabel({ text: "Decimal Count" }),
|
|
171
169
|
this._GuSelect({
|
|
172
170
|
name: t.CURRENCY_DECIMAL_COUNT,
|
|
173
171
|
placeholder: "Select Decimal Count",
|
|
174
|
-
options:
|
|
172
|
+
options: l
|
|
175
173
|
})
|
|
176
174
|
])}
|
|
177
175
|
`;
|
|
@@ -206,6 +204,20 @@ class w extends N {
|
|
|
206
204
|
])}
|
|
207
205
|
`;
|
|
208
206
|
}
|
|
207
|
+
_getResponsive() {
|
|
208
|
+
return `
|
|
209
|
+
${this._GuTwoColumns([
|
|
210
|
+
this._GuLabel({ text: "Responsive Block" }),
|
|
211
|
+
this._GuToggle(t.RESPONSIVE)
|
|
212
|
+
])}
|
|
213
|
+
`;
|
|
214
|
+
}
|
|
215
|
+
_onFilterChange(e) {
|
|
216
|
+
this.currentNode && this.store.$patch({
|
|
217
|
+
filterStatus: e,
|
|
218
|
+
filterSelectionDrawerStatus: e
|
|
219
|
+
});
|
|
220
|
+
}
|
|
209
221
|
_onFilterSelectClick() {
|
|
210
222
|
this.store.$patch({
|
|
211
223
|
filterSelectionDrawerStatus: !0
|
|
@@ -223,54 +235,23 @@ class w extends N {
|
|
|
223
235
|
*/
|
|
224
236
|
_getCardComposition() {
|
|
225
237
|
if (!this.currentNode)
|
|
226
|
-
return
|
|
238
|
+
return C;
|
|
227
239
|
const e = this.currentNode.querySelector(".ins-recommendation-v3-block-v2");
|
|
228
240
|
if (!e || !("getAttribute" in e))
|
|
229
|
-
return
|
|
241
|
+
return C;
|
|
230
242
|
const o = e.getAttribute("data-card-composition");
|
|
231
|
-
return o ? o.split(",").filter(Boolean) :
|
|
243
|
+
return o ? o.split(",").filter(Boolean) : C;
|
|
232
244
|
}
|
|
233
245
|
_regenerateProductRows() {
|
|
234
246
|
if (!this.currentNode || !("querySelector" in this.currentNode))
|
|
235
247
|
return;
|
|
236
|
-
const e = this.currentNode.querySelector(
|
|
237
|
-
if (!e)
|
|
248
|
+
const e = this.currentNode.querySelector(".ins-recommendation-product-container");
|
|
249
|
+
if (!e) {
|
|
250
|
+
console.error("Could not find container table for product rows");
|
|
238
251
|
return;
|
|
239
|
-
const o = this.store.recommendationProducts.length > 0 ? this.store.recommendationProducts : L(), { cardsInRow: i } = this.store.recommendationConfigs, n = this._getCardComposition(), r = f(o, i, n);
|
|
240
|
-
this.api.getDocumentModifier().modifyHtml(e).setInnerHtml(r).apply(new g("Updated product")), this._reapplySpacing();
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Reapply spacing values after product regeneration
|
|
244
|
-
* This ensures spacing persists when products are regenerated
|
|
245
|
-
*/
|
|
246
|
-
_reapplySpacing() {
|
|
247
|
-
if (!this.currentNode)
|
|
248
|
-
return;
|
|
249
|
-
const e = this.currentNode.querySelector(".ins-recommendation-v3-block-v2");
|
|
250
|
-
if (!e || !("getAttribute" in e))
|
|
251
|
-
return;
|
|
252
|
-
const o = e.getAttribute("data-column-spacing"), i = e.getAttribute("data-row-spacing"), n = this.api.getDocumentModifier();
|
|
253
|
-
if (o) {
|
|
254
|
-
const r = parseInt(o);
|
|
255
|
-
if (!Number.isNaN(r)) {
|
|
256
|
-
const h = `0 ${Math.floor(r / 2)}px`;
|
|
257
|
-
Array.from(
|
|
258
|
-
this.currentNode.querySelectorAll(".product-card-wrapper")
|
|
259
|
-
).forEach((c) => {
|
|
260
|
-
"parentNode" in c && c.parentNode && typeof c.parentNode == "object" && "tagName" in c.parentNode && c.parentNode.tagName === "TD" && n.modifyHtml(c.parentNode).setStyle("padding", h);
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
if (i) {
|
|
265
|
-
const r = parseInt(i);
|
|
266
|
-
if (!Number.isNaN(r)) {
|
|
267
|
-
const l = `${r}px`;
|
|
268
|
-
Array.from(this.currentNode.querySelectorAll(".spacer")).forEach((m) => {
|
|
269
|
-
n.modifyHtml(m).setStyle("height", l);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
252
|
}
|
|
273
|
-
|
|
253
|
+
const o = this.store.recommendationProducts.length > 0 ? this.store.recommendationProducts : E(), { cardsInRow: i } = this.store.recommendationConfigs, a = this._getCardComposition(), u = p(o, i, a);
|
|
254
|
+
this.api.getDocumentModifier().modifyHtml(e).setInnerHtml(u).apply(new S("Updated product"));
|
|
274
255
|
}
|
|
275
256
|
_onCurrencyConfigChange(e, o) {
|
|
276
257
|
this.currentNode && this.store.$patch({
|
|
@@ -299,31 +280,16 @@ class w extends N {
|
|
|
299
280
|
_listenToFormUpdates() {
|
|
300
281
|
var o;
|
|
301
282
|
this.api.onValueChanged(t.ALGORITHM, (i) => {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}), this.api.onValueChanged(t.PRODUCT_IDS, (i) => {
|
|
305
|
-
this._onDataChange(t.PRODUCT_IDS, i.split(",") || []);
|
|
306
|
-
}), this.api.onValueChanged(t.LOCALE, (i) => {
|
|
307
|
-
this._onDataChange(t.LOCALE, i);
|
|
308
|
-
}), this.api.onValueChanged(t.CURRENCY, (i) => {
|
|
309
|
-
this._onCurrencyChange(i);
|
|
310
|
-
}), [
|
|
283
|
+
this._onDataChange(t.ALGORITHM, i), this._setProductIdsVisibility();
|
|
284
|
+
}), this.api.onValueChanged(t.PRODUCT_IDS, (i) => this._onDataChange(t.PRODUCT_IDS, i.split(",") || [])), this.api.onValueChanged(t.LOCALE, (i) => this._onDataChange(t.LOCALE, i)), this.api.onValueChanged(t.CURRENCY, (i) => this._onCurrencyChange(i)), [
|
|
311
285
|
t.CURRENCY_LOCATION,
|
|
312
286
|
t.CURRENCY_SYMBOL,
|
|
313
287
|
t.CURRENCY_THOUSAND_SEPARATOR,
|
|
314
288
|
t.CURRENCY_DECIMAL_SEPARATOR,
|
|
315
289
|
t.CURRENCY_DECIMAL_COUNT
|
|
316
290
|
].forEach((i) => {
|
|
317
|
-
this.api.onValueChanged(i, (
|
|
318
|
-
|
|
319
|
-
});
|
|
320
|
-
}), this.api.onValueChanged(t.PRODUCT_COUNT, (i) => {
|
|
321
|
-
this._onDataChange(t.PRODUCT_COUNT, i.toString());
|
|
322
|
-
}), this.api.onValueChanged(t.PRODUCT_IN_ROW, (i) => {
|
|
323
|
-
this._onDataChange(t.PRODUCT_IN_ROW, i);
|
|
324
|
-
}), this.api.onValueChanged(t.SHUFFLE_PRODUCTS, (i) => {
|
|
325
|
-
this._onDataChange(t.SHUFFLE_PRODUCTS, i);
|
|
326
|
-
}), this.addFilterListener = this._onFilterSelectClick.bind(this), this.addFilterButton = this.getContainer().querySelector("#guido__btn-add-filter"), (o = this.addFilterButton) == null || o.addEventListener("click", this.addFilterListener);
|
|
291
|
+
this.api.onValueChanged(i, (a) => this._onCurrencyConfigChange(i, a));
|
|
292
|
+
}), this.api.onValueChanged(t.PRODUCT_COUNT, (i) => this._onDataChange(t.PRODUCT_COUNT, i.toString())), this.api.onValueChanged(t.PRODUCT_IN_ROW, (i) => this._onDataChange(t.PRODUCT_IN_ROW, i)), this.api.onValueChanged(t.SHUFFLE_PRODUCTS, (i) => this._onDataChange(t.SHUFFLE_PRODUCTS, i)), this.api.onValueChanged(t.RESPONSIVE, (i) => this._onDataChange(t.RESPONSIVE, i)), this.addFilterListener = this._onFilterSelectClick.bind(this), this.addFilterButton = this.getContainer().querySelector("#guido__btn-add-filter"), (o = this.addFilterButton) == null || o.addEventListener("click", this.addFilterListener);
|
|
327
293
|
}
|
|
328
294
|
_listenStateUpdates() {
|
|
329
295
|
this.storeUnsubscription = this.store.$subscribe((e) => {
|
|
@@ -335,6 +301,6 @@ class w extends N {
|
|
|
335
301
|
}
|
|
336
302
|
}
|
|
337
303
|
export {
|
|
338
|
-
|
|
339
|
-
|
|
304
|
+
L as CONTROL_BLOCK_ID,
|
|
305
|
+
b as RecommendationBlockControl
|
|
340
306
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonAlignBuiltInControl as t } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class c extends t {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_ALIGN;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as ButtonAlignControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonBorderBuiltInControl as t } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class s extends t {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_BORDER;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as ButtonBorderControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonBorderRadiusBuiltInControl as t } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class i extends t {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_BORDER_RADIUS;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as ButtonBorderRadiusControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonColorBuiltInControl as t } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class c extends t {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_COLOR;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as ButtonColorControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonFitToContainerBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class s extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_FIT_TO_CONTENT;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as ButtonFitToContentControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonFontFamilyBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class s extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_FONT_FAMILY;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as ButtonFontFamilyControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonMarginsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class m extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_MARGINS;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as ButtonMarginsControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonPaddingsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class i extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_PADDINGS;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as ButtonPaddingsControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonTextBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class c extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_TEXT;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as ButtonTextControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonTextSizeBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as o, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class s extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return o.BUTTON_TEXT_SIZE;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as ButtonTextSizeControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonTextStyleAndFontColorBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as e, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class s extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return e.BUTTON_TEXT_STYLE_AND_FONT_COLOR;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(t) {
|
|
8
|
+
return t.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.BUTTON}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as ButtonTextStyleAndFontColorControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageMarginsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class l extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.IMAGE_MARGINS;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(e) {
|
|
8
|
+
return e.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.IMAGE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
l as ImageMarginsControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageSizeBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class s extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.IMAGE_SIZE;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(e) {
|
|
8
|
+
return e.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.IMAGE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as ImageSizeControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextAlignBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class m extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_ALIGN;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(e) {
|
|
8
|
+
return e.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as NameAlignControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextBlockBackgroundBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class m extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_BACKGROUND;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as NameBackgroundControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextColorBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class m extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_COLOR;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as NameColorControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextFontFamilyBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class d extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_FONT_FAMILY;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
d as NameFontFamilyControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextPaddingsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as n } from "../../constants.js";
|
|
3
|
+
class c extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_PADDINGS;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(e) {
|
|
8
|
+
return e.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${n.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as NamePaddingsControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextSizeBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class m extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_SIZE;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as NameSizeControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextStyleBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class m extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.NAME_STYLE;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.NAME}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
m as NameStyleControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextAlignBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class i extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.OLD_PRICE_ALIGN;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(e) {
|
|
8
|
+
return e.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.OLD_PRICE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as OldPriceAlignControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextBlockBackgroundBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as r, RecommendationBlockId as t } from "../../constants.js";
|
|
3
|
+
class i extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return r.OLD_PRICE_BACKGROUND;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${t.OLD_PRICE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as OldPriceBackgroundControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextColorBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as r, RecommendationBlockId as t } from "../../constants.js";
|
|
3
|
+
class i extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return r.OLD_PRICE_COLOR;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${t.OLD_PRICE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as OldPriceColorControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextFontFamilyBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class i extends e {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.OLD_PRICE_FONT_FAMILY;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(o) {
|
|
8
|
+
return o.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.OLD_PRICE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as OldPriceFontFamilyControl
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextPaddingsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RecommendationControlId as t, RecommendationBlockId as r } from "../../constants.js";
|
|
3
|
+
class i extends o {
|
|
4
|
+
getId() {
|
|
5
|
+
return t.OLD_PRICE_PADDINGS;
|
|
6
|
+
}
|
|
7
|
+
getTargetNodes(e) {
|
|
8
|
+
return e.closest(".ins-recommendation-product-container").querySelectorAll(`[esd-extension-block-id="${r.OLD_PRICE}"]`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as OldPricePaddingsControl
|
|
13
|
+
};
|