@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,122 +0,0 @@
|
|
|
1
|
-
import { ATTR_PRODUCT_IMAGE as a, ATTR_PRODUCT_NAME as o, ATTR_PRODUCT_OLD_PRICE as c, ATTR_PRODUCT_PRICE as s, ATTR_PRODUCT_OMNIBUS_PRICE as l, ATTR_PRODUCT_OMNIBUS_DISCOUNT as n, ATTR_PRODUCT_BUTTON as i } from "../constants/selectors.js";
|
|
2
|
-
const m = {
|
|
3
|
-
TITLE: "You May Also Like!"
|
|
4
|
-
}, g = [
|
|
5
|
-
a,
|
|
6
|
-
o,
|
|
7
|
-
c,
|
|
8
|
-
s,
|
|
9
|
-
l,
|
|
10
|
-
n,
|
|
11
|
-
i
|
|
12
|
-
], b = {
|
|
13
|
-
[a]: !0,
|
|
14
|
-
[o]: !0,
|
|
15
|
-
[s]: !0,
|
|
16
|
-
[c]: !0,
|
|
17
|
-
[l]: !1,
|
|
18
|
-
[n]: !1,
|
|
19
|
-
[i]: !0
|
|
20
|
-
}, T = `
|
|
21
|
-
<tr>
|
|
22
|
-
<td class="spacer" style="height: 10px;"></td>
|
|
23
|
-
</tr>
|
|
24
|
-
`, d = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
|
|
25
|
-
function R(t) {
|
|
26
|
-
return !t || typeof t != "string" || t.trim() === "" ? d : t.startsWith("http://") ? t.replace("http://", "https://") : t;
|
|
27
|
-
}
|
|
28
|
-
function e(t) {
|
|
29
|
-
return {
|
|
30
|
-
name: "Product Name",
|
|
31
|
-
image_url: d,
|
|
32
|
-
price: { USD: 18 },
|
|
33
|
-
original_price: { USD: 20 },
|
|
34
|
-
discount: { USD: 2 },
|
|
35
|
-
url: `https://example.com/product/${t}`,
|
|
36
|
-
item_id: t,
|
|
37
|
-
in_stock: 1,
|
|
38
|
-
locale: "en",
|
|
39
|
-
product_attributes: {},
|
|
40
|
-
category: []
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function D() {
|
|
44
|
-
return [
|
|
45
|
-
e("1"),
|
|
46
|
-
e("2"),
|
|
47
|
-
e("3"),
|
|
48
|
-
e("4"),
|
|
49
|
-
e("5"),
|
|
50
|
-
e("6")
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
|
-
function U(t = "grid", r) {
|
|
54
|
-
const p = t === "list" ? `
|
|
55
|
-
data-layout="list"` : "";
|
|
56
|
-
return `
|
|
57
|
-
<td
|
|
58
|
-
align="left"
|
|
59
|
-
class="ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block es-p20${r ? ` ${r}` : ""}"${p}>
|
|
60
|
-
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
61
|
-
<tr>
|
|
62
|
-
<td align="center">
|
|
63
|
-
<table
|
|
64
|
-
class="container"
|
|
65
|
-
width="100%"
|
|
66
|
-
cellpadding="0"
|
|
67
|
-
cellspacing="0"
|
|
68
|
-
border="0">
|
|
69
|
-
<tbody>
|
|
70
|
-
<tr>
|
|
71
|
-
<td>
|
|
72
|
-
<table
|
|
73
|
-
width="100%"
|
|
74
|
-
cellpadding="0"
|
|
75
|
-
cellspacing="0"
|
|
76
|
-
border="0">
|
|
77
|
-
<tbody>
|
|
78
|
-
<tr>
|
|
79
|
-
<td
|
|
80
|
-
class="esd-block-text es-p10t es-p10b es-p20l es-p20r"
|
|
81
|
-
align="center">
|
|
82
|
-
<p style="font-size: 28px; color: #333333;">
|
|
83
|
-
<strong>{-{-TITLE-}-}</strong>
|
|
84
|
-
</p>
|
|
85
|
-
</td>
|
|
86
|
-
</tr>
|
|
87
|
-
</tbody>
|
|
88
|
-
</table>
|
|
89
|
-
</td>
|
|
90
|
-
</tr>
|
|
91
|
-
${T}
|
|
92
|
-
<tr>
|
|
93
|
-
<td>
|
|
94
|
-
<table
|
|
95
|
-
class="ins-recommendation-product-container"
|
|
96
|
-
width="100%"
|
|
97
|
-
cellpadding="0"
|
|
98
|
-
cellspacing="0"
|
|
99
|
-
border="0"
|
|
100
|
-
>
|
|
101
|
-
{-{-PRODUCT_ROWS-}-}
|
|
102
|
-
</table>
|
|
103
|
-
</td>
|
|
104
|
-
</tr>
|
|
105
|
-
</tbody>
|
|
106
|
-
</table>
|
|
107
|
-
</td>
|
|
108
|
-
</tr>
|
|
109
|
-
</table>
|
|
110
|
-
</td>
|
|
111
|
-
`;
|
|
112
|
-
}
|
|
113
|
-
export {
|
|
114
|
-
m as DEFAULTS,
|
|
115
|
-
g as DEFAULT_CARD_COMPOSITION,
|
|
116
|
-
b as DEFAULT_CARD_VISIBILITY,
|
|
117
|
-
d as PLACEHOLDER_IMAGE,
|
|
118
|
-
U as createBlockTemplate,
|
|
119
|
-
D as getDefaultProducts,
|
|
120
|
-
R as sanitizeImageUrl,
|
|
121
|
-
T as spacer
|
|
122
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
function d(a, t) {
|
|
2
|
-
const { thousandSeparator: s, decimalSeparator: e, decimalCount: r } = t, u = Math.abs(a).toFixed(r), [c, o] = u.split("."), n = c.replace(
|
|
3
|
-
/\B(?=(\d{3})+(?!\d))/g,
|
|
4
|
-
s
|
|
5
|
-
), i = a < 0 ? "-" : "";
|
|
6
|
-
return r > 0 && o ? `${i}${n}${e}${o}` : `${i}${n}`;
|
|
7
|
-
}
|
|
8
|
-
function m(a) {
|
|
9
|
-
const { price: t, currency: s } = a, {
|
|
10
|
-
symbol: e,
|
|
11
|
-
alignment: r,
|
|
12
|
-
thousandSeparator: u,
|
|
13
|
-
decimalSeparator: c,
|
|
14
|
-
decimalCount: o
|
|
15
|
-
} = s;
|
|
16
|
-
if (typeof t != "number" || Number.isNaN(t)) {
|
|
17
|
-
const i = "0".repeat(o), $ = `0${c}${i}`;
|
|
18
|
-
return r === "before" ? `${e} ${$}` : `${$} ${e}`;
|
|
19
|
-
}
|
|
20
|
-
const n = d(t, {
|
|
21
|
-
thousandSeparator: u,
|
|
22
|
-
decimalSeparator: c,
|
|
23
|
-
decimalCount: o
|
|
24
|
-
});
|
|
25
|
-
return r === "before" ? `${e} ${n}` : `${n} ${e}`;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
m as formatPrice
|
|
29
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
function a(t) {
|
|
2
|
-
return typeof t == "object" && t !== null && "tagName" in t && typeof t.tagName == "string";
|
|
3
|
-
}
|
|
4
|
-
function r(t) {
|
|
5
|
-
return typeof t == "object" && t !== null && "getTagName" in t && typeof t.getTagName == "function";
|
|
6
|
-
}
|
|
7
|
-
function n(t) {
|
|
8
|
-
return typeof t == "object" && t !== null && "getStyle" in t && typeof t.getStyle == "function";
|
|
9
|
-
}
|
|
10
|
-
function u(t) {
|
|
11
|
-
return typeof t == "object" && t !== null && "parent" in t && typeof t.parent == "function";
|
|
12
|
-
}
|
|
13
|
-
function g(t) {
|
|
14
|
-
return typeof t == "object" && t !== null && "tagName" in t && t.tagName === "TD";
|
|
15
|
-
}
|
|
16
|
-
function p(t, e) {
|
|
17
|
-
return !t || !n(t) ? null : t.getStyle(e);
|
|
18
|
-
}
|
|
19
|
-
function N(t) {
|
|
20
|
-
return !t || !u(t) ? null : t.parent();
|
|
21
|
-
}
|
|
22
|
-
function l(t, e = "UNKNOWN") {
|
|
23
|
-
return t ? a(t) ? t.tagName.toUpperCase() : r(t) ? t.getTagName().toUpperCase() : e : e;
|
|
24
|
-
}
|
|
25
|
-
const f = /* @__PURE__ */ new Set(["TD", "BLOCK_IMAGE", "BLOCK_BUTTON"]);
|
|
26
|
-
function i(t) {
|
|
27
|
-
return f.has(t.toUpperCase());
|
|
28
|
-
}
|
|
29
|
-
function c(t) {
|
|
30
|
-
const e = l(t);
|
|
31
|
-
return i(e);
|
|
32
|
-
}
|
|
33
|
-
function s(t) {
|
|
34
|
-
return c(t) ? "table-cell" : "table-row";
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
s as getTableDisplayValue,
|
|
38
|
-
l as getTagName,
|
|
39
|
-
n as hasGetStyle,
|
|
40
|
-
u as hasParent,
|
|
41
|
-
c as isTableCellNode,
|
|
42
|
-
i as isTableCellTag,
|
|
43
|
-
g as isTdNode,
|
|
44
|
-
N as safeGetParent,
|
|
45
|
-
p as safeGetStyle
|
|
46
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formats a price template variable with the correct currency alignment.
|
|
3
|
-
* @param campaignId - The recommendation block campaign ID
|
|
4
|
-
* @param productIndex - Zero-based product index
|
|
5
|
-
* @param attribute - Price attribute name (e.g., 'price', 'original_price')
|
|
6
|
-
* @param alignment - Currency alignment from block config: 'before' or 'after'
|
|
7
|
-
* @returns Formatted price string with currency variable in correct position
|
|
8
|
-
*/
|
|
9
|
-
export declare function formatPriceVariable(campaignId: string, productIndex: number, attribute: string, alignment: string): string;
|
|
10
|
-
/**
|
|
11
|
-
* Transforms recommendation block HTML by replacing product data with
|
|
12
|
-
* template variables.
|
|
13
|
-
* Preserves the full document structure (DOCTYPE, html, head, body).
|
|
14
|
-
* @param html - The raw template HTML
|
|
15
|
-
* @returns HTML with template variables replacing product data
|
|
16
|
-
*/
|
|
17
|
-
export declare function prepareRecommendationBlocks(html: string): string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Block IDs used in the Recommendation Extension
|
|
3
|
-
* These IDs are used in the esd-extension-block-id attribute to identify specific blocks
|
|
4
|
-
*/
|
|
5
|
-
export declare enum RecommendationBlockId {
|
|
6
|
-
BUTTON = "recommendation-block-button",
|
|
7
|
-
NAME = "recommendation-block-name",
|
|
8
|
-
PRICE = "recommendation-block-price",
|
|
9
|
-
OLD_PRICE = "recommendation-block-old-price",
|
|
10
|
-
OMNIBUS_PRICE = "recommendation-block-omnibus-price",
|
|
11
|
-
OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount",
|
|
12
|
-
IMAGE = "recommendation-block-image"
|
|
13
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default Configuration for Recommendation Block
|
|
3
|
-
*
|
|
4
|
-
* This module provides the default values for RecommendationNodeConfig.
|
|
5
|
-
* These values are used when:
|
|
6
|
-
* - A new block is dropped into the template
|
|
7
|
-
* - Migrating legacy templates without stored config
|
|
8
|
-
* - Merging partial updates with existing config
|
|
9
|
-
*/
|
|
10
|
-
import type { RecommendationNodeConfig, CurrencyConfig, OmnibusTextConfig } from '../types/nodeConfig';
|
|
11
|
-
/**
|
|
12
|
-
* Default currency configuration
|
|
13
|
-
* Uses USD as the base currency with standard formatting
|
|
14
|
-
* Note: symbol stores the currency code (e.g., 'USD'), not the symbol character ('$')
|
|
15
|
-
* This matches the Currency Symbol dropdown which shows currency codes
|
|
16
|
-
*/
|
|
17
|
-
export declare const DEFAULT_CURRENCY: CurrencyConfig;
|
|
18
|
-
/**
|
|
19
|
-
* Default omnibus price text configuration
|
|
20
|
-
* Pre-filled with common EU Omnibus Directive text
|
|
21
|
-
*/
|
|
22
|
-
export declare const DEFAULT_OMNIBUS_PRICE: OmnibusTextConfig;
|
|
23
|
-
/**
|
|
24
|
-
* Default omnibus discount text configuration
|
|
25
|
-
*/
|
|
26
|
-
export declare const DEFAULT_OMNIBUS_DISCOUNT: OmnibusTextConfig;
|
|
27
|
-
/**
|
|
28
|
-
* Default card composition order
|
|
29
|
-
* Defines the visual order of elements in product cards
|
|
30
|
-
*/
|
|
31
|
-
export declare const DEFAULT_COMPOSITION: string[];
|
|
32
|
-
/**
|
|
33
|
-
* Default visibility settings for card elements
|
|
34
|
-
* Omnibus elements are hidden by default (not all regions require them)
|
|
35
|
-
*/
|
|
36
|
-
export declare const DEFAULT_VISIBILITY: Record<string, boolean>;
|
|
37
|
-
/**
|
|
38
|
-
* Complete default configuration for Recommendation Block
|
|
39
|
-
*
|
|
40
|
-
* This is the single source of truth for default values.
|
|
41
|
-
* All other code should import and use this constant.
|
|
42
|
-
*/
|
|
43
|
-
export declare const DEFAULT_NODE_CONFIG: RecommendationNodeConfig;
|
|
44
|
-
/**
|
|
45
|
-
* Current configuration version
|
|
46
|
-
* Increment this when making breaking changes to the schema
|
|
47
|
-
* Used for migration detection
|
|
48
|
-
*/
|
|
49
|
-
export declare const CURRENT_CONFIG_VERSION = 1;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recommendation Extension Constants
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports all constants for the Recommendation extension.
|
|
5
|
-
* Import from this file for cleaner imports.
|
|
6
|
-
* @example
|
|
7
|
-
* import { RecommendationBlockId, CONTAINER_SELECTOR } from './constants';
|
|
8
|
-
*/
|
|
9
|
-
export { RecommendationBlockId } from './blockIds';
|
|
10
|
-
export { RecommendationControlId } from './controlIds';
|
|
11
|
-
export { CONTAINER_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, } from './selectors';
|
|
12
|
-
export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
13
|
-
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, } from './defaultConfig';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/** Type-safe layout orientation values */
|
|
2
|
-
export declare const LAYOUT_VALUES: {
|
|
3
|
-
GRID: "grid";
|
|
4
|
-
LIST: "list";
|
|
5
|
-
};
|
|
6
|
-
/** Layout options for radio button UI control */
|
|
7
|
-
export declare const LAYOUT_OPTIONS: ({
|
|
8
|
-
icon: string;
|
|
9
|
-
value: "grid";
|
|
10
|
-
} | {
|
|
11
|
-
icon: string;
|
|
12
|
-
value: "list";
|
|
13
|
-
})[];
|
|
14
|
-
/** Default number of products displayed per row in grid layout */
|
|
15
|
-
export declare const DEFAULT_PRODUCTS_PER_ROW = 3;
|
|
16
|
-
/** Default number of cards in a row (used in store initialization) */
|
|
17
|
-
export declare const DEFAULT_CARDS_IN_ROW = 3;
|
|
18
|
-
/** Maximum number of products that can be displayed */
|
|
19
|
-
export declare const MAX_PRODUCT_COUNT = 9;
|
|
20
|
-
/** Minimum number of products that can be displayed */
|
|
21
|
-
export declare const MIN_PRODUCT_COUNT = 1;
|
|
22
|
-
/** Maximum number of products per row in grid layout */
|
|
23
|
-
export declare const MAX_PRODUCTS_PER_ROW = 4;
|
|
24
|
-
/** Minimum number of products per row in grid layout */
|
|
25
|
-
export declare const MIN_PRODUCTS_PER_ROW = 1;
|
|
26
|
-
/** Default column spacing between product cards (5px on each side = 10px total) */
|
|
27
|
-
export declare const DEFAULT_COLUMN_SPACING = 10;
|
|
28
|
-
/** Default row spacing between product rows */
|
|
29
|
-
export declare const DEFAULT_ROW_SPACING = 20;
|
|
30
|
-
/** Minimum spacing value */
|
|
31
|
-
export declare const MIN_SPACING = 0;
|
|
32
|
-
/** Maximum spacing value */
|
|
33
|
-
export declare const MAX_SPACING = 50;
|
|
34
|
-
/** Spacing adjustment step */
|
|
35
|
-
export declare const SPACING_STEP = 5;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors and data attributes used across the Recommendation extension
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Container selector for the product container element
|
|
6
|
-
* Used across controls to target elements within the recommendation block
|
|
7
|
-
*/
|
|
8
|
-
export declare const CONTAINER_SELECTOR = ".ins-recommendation-product-container";
|
|
9
|
-
/**
|
|
10
|
-
* Currency HTML attributes set on the block element
|
|
11
|
-
* These are read by the HTML compiler at runtime to format prices
|
|
12
|
-
*/
|
|
13
|
-
export declare const CURRENCY_ATTR: {
|
|
14
|
-
readonly CURRENCY: "currency";
|
|
15
|
-
readonly SYMBOL: "currency-symbol";
|
|
16
|
-
readonly ALIGNMENT: "currency-alignment";
|
|
17
|
-
readonly THOUSAND_SEPARATOR: "currency-thousand-separator";
|
|
18
|
-
readonly DECIMAL_SEPARATOR: "currency-decimal-separator";
|
|
19
|
-
readonly DECIMAL_COUNT: "currency-decimal-count";
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Attribute type constants used in templates
|
|
23
|
-
* These are used as keys in ElementRenderer and composition arrays
|
|
24
|
-
*/
|
|
25
|
-
export declare const ATTR_PRODUCT_IMAGE = "productImage";
|
|
26
|
-
export declare const ATTR_PRODUCT_NAME = "productName";
|
|
27
|
-
export declare const ATTR_PRODUCT_PRICE = "productPrice";
|
|
28
|
-
export declare const ATTR_PRODUCT_OLD_PRICE = "productOldPrice";
|
|
29
|
-
export declare const ATTR_PRODUCT_OMNIBUS_PRICE = "productOmnibusPrice";
|
|
30
|
-
export declare const ATTR_PRODUCT_OMNIBUS_DISCOUNT = "productOmnibusDiscount";
|
|
31
|
-
export declare const ATTR_PRODUCT_BUTTON = "productButton";
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Button Element Controls
|
|
3
|
-
*
|
|
4
|
-
* Controls for styling the CTA button element in recommendation cards.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Grouped Button Controls
|
|
8
|
-
* Use this object for cleaner imports in extension.ts
|
|
9
|
-
*/
|
|
10
|
-
export declare const ButtonControls: {
|
|
11
|
-
readonly align: {
|
|
12
|
-
new (): {
|
|
13
|
-
getId(): string;
|
|
14
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
15
|
-
getParentControlId(): string;
|
|
16
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
17
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
18
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
19
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
20
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly border: {
|
|
24
|
-
new (): {
|
|
25
|
-
getId(): string;
|
|
26
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
27
|
-
getParentControlId(): string;
|
|
28
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonBorderControlLabels | undefined;
|
|
29
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
30
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
31
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
32
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
readonly borderRadius: {
|
|
36
|
-
new (): {
|
|
37
|
-
getId(): string;
|
|
38
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
39
|
-
getParentControlId(): string;
|
|
40
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonBorderRadiusControlLabels | undefined;
|
|
41
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
42
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
43
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
44
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
readonly color: {
|
|
48
|
-
new (): {
|
|
49
|
-
getId(): string;
|
|
50
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
51
|
-
getParentControlId(): string;
|
|
52
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
53
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
54
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
55
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
56
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
readonly fontFamily: {
|
|
60
|
-
new (): {
|
|
61
|
-
getId(): string;
|
|
62
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
63
|
-
getParentControlId(): string;
|
|
64
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
65
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
66
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
67
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
68
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
readonly margins: {
|
|
72
|
-
new (): {
|
|
73
|
-
getId(): string;
|
|
74
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
75
|
-
getParentControlId(): string;
|
|
76
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
77
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
78
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
79
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
80
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
readonly paddings: {
|
|
84
|
-
new (): {
|
|
85
|
-
getId(): string;
|
|
86
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
87
|
-
getParentControlId(): string;
|
|
88
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
89
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
90
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
91
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
92
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
readonly text: {
|
|
96
|
-
new (): {
|
|
97
|
-
getId(): string;
|
|
98
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
99
|
-
getParentControlId(): string;
|
|
100
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
101
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
102
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
103
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
104
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
readonly textSize: {
|
|
108
|
-
new (): {
|
|
109
|
-
getId(): string;
|
|
110
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
111
|
-
getParentControlId(): string;
|
|
112
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
113
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
114
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
115
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
116
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
readonly textStyleAndFontColor: {
|
|
120
|
-
new (): {
|
|
121
|
-
getId(): string;
|
|
122
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
123
|
-
getParentControlId(): string;
|
|
124
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonTextStyleAndFontColorControlLabels | undefined;
|
|
125
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
126
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
127
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
128
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
readonly fitToContent: {
|
|
132
|
-
new (): {
|
|
133
|
-
getId(): string;
|
|
134
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
135
|
-
getParentControlId(): string;
|
|
136
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
137
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
138
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
139
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
140
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../../common-control';
|
|
3
|
-
export declare const CARD_BACKGROUND_COLOR_CONTROL_ID = "recommendation-card-background-color-control";
|
|
4
|
-
/**
|
|
5
|
-
* Control for managing recommendation card background color
|
|
6
|
-
* This control is displayed in the Styles tab
|
|
7
|
-
*/
|
|
8
|
-
export declare class CardBackgroundColorControl extends CommonControl {
|
|
9
|
-
getId(): string;
|
|
10
|
-
getTemplate(): string;
|
|
11
|
-
onRender(): void;
|
|
12
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
13
|
-
_setFormValues(): void;
|
|
14
|
-
/**
|
|
15
|
-
* Gets the appropriate selector based on layout
|
|
16
|
-
* Grid: .product-card-segment (inner table per product cell)
|
|
17
|
-
* List: .product-card-wrapper (table per product row)
|
|
18
|
-
*/
|
|
19
|
-
_getCardSelector(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Reads the current background color from the first product card element
|
|
22
|
-
* @returns The background color value or 'transparent' if not found
|
|
23
|
-
*/
|
|
24
|
-
_getCurrentCardBackgroundColor(): string;
|
|
25
|
-
/**
|
|
26
|
-
* Handles card background color changes
|
|
27
|
-
* Applies the color to all product card elements based on layout
|
|
28
|
-
*/
|
|
29
|
-
_onCardBackgroundColorChange(color: string): void;
|
|
30
|
-
_listenToFormUpdates(): void;
|
|
31
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Element Controls
|
|
3
|
-
*
|
|
4
|
-
* Controls for styling the product image element in recommendation cards.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Grouped Image Controls
|
|
8
|
-
* Use this object for cleaner imports in extension.ts
|
|
9
|
-
*/
|
|
10
|
-
export declare const ImageControls: {
|
|
11
|
-
readonly size: {
|
|
12
|
-
new (): {
|
|
13
|
-
getId(): string;
|
|
14
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
15
|
-
getParentControlId(): string;
|
|
16
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
17
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
18
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
19
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
20
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly margins: {
|
|
24
|
-
new (): {
|
|
25
|
-
getId(): string;
|
|
26
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
27
|
-
getParentControlId(): string;
|
|
28
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
29
|
-
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
30
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
31
|
-
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
32
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout Control
|
|
3
|
-
*
|
|
4
|
-
* Manages recommendation block layout orientation
|
|
5
|
-
* Allows switching between grid and list layouts
|
|
6
|
-
*
|
|
7
|
-
* Configuration is stored via node config (persists with template).
|
|
8
|
-
*/
|
|
9
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
10
|
-
import { CommonControl } from '../../../common-control';
|
|
11
|
-
import { type Orientation } from '../../templates';
|
|
12
|
-
export declare const LAYOUT_CONTROL_ID = "recommendation-layout-control";
|
|
13
|
-
/**
|
|
14
|
-
* Control for managing recommendation block layout orientation
|
|
15
|
-
* Allows switching between grid and list layouts
|
|
16
|
-
*/
|
|
17
|
-
export declare class LayoutControl extends CommonControl {
|
|
18
|
-
private store;
|
|
19
|
-
private isChangingLayout;
|
|
20
|
-
getId(): string;
|
|
21
|
-
getTemplate(): string;
|
|
22
|
-
onRender(): void;
|
|
23
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
24
|
-
_setFormValues(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Handles layout change
|
|
27
|
-
* Updates node config, data attribute and regenerates product rows
|
|
28
|
-
*/
|
|
29
|
-
_onLayoutChange(layout: Orientation): void;
|
|
30
|
-
/**
|
|
31
|
-
* Regenerates product rows based on the selected layout
|
|
32
|
-
* Uses unified style-preserving regeneration to maintain user customizations
|
|
33
|
-
* @param layout - The layout to use for regeneration (passed explicitly to avoid stale DOM reads)
|
|
34
|
-
*/
|
|
35
|
-
_regenerateProductRows(layout: Orientation): void;
|
|
36
|
-
_listenToFormUpdates(): void;
|
|
37
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Algorithm Selection Control
|
|
3
|
-
*
|
|
4
|
-
* Handles recommendation algorithm selection and product IDs for manual merchandising:
|
|
5
|
-
* - Algorithm/strategy selection
|
|
6
|
-
* - Product IDs input (visible only for manual merchandising)
|
|
7
|
-
*
|
|
8
|
-
* Configuration is stored via node config (persists with template).
|
|
9
|
-
* Algorithm options are fetched from API and cached in Pinia store.
|
|
10
|
-
*/
|
|
11
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
12
|
-
import { CommonControl } from '../../../common-control';
|
|
13
|
-
export declare const ALGORITHM_CONTROL_ID = "recommendation-algorithm-control";
|
|
14
|
-
/**
|
|
15
|
-
* Control for selecting recommendation algorithm and manual product IDs
|
|
16
|
-
*/
|
|
17
|
-
export declare class AlgorithmControl extends CommonControl {
|
|
18
|
-
private store;
|
|
19
|
-
getId(): string;
|
|
20
|
-
getTemplate(): string;
|
|
21
|
-
onRender(): void;
|
|
22
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
23
|
-
_setFormValues(): void;
|
|
24
|
-
_initializeSelectItems(): void;
|
|
25
|
-
_setProductIdsVisibility(strategy?: string): void;
|
|
26
|
-
_onAlgorithmChange(value: string): void;
|
|
27
|
-
_onProductIdsChange(value: string): void;
|
|
28
|
-
_listenToFormUpdates(): void;
|
|
29
|
-
}
|