@useinsider/guido 3.2.0-beta.a14c305 → 3.2.0-beta.a61fffe
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/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useFullStoryBridge.js +14 -0
- package/dist/composables/useRecommendation.js +2 -2
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +21 -18
- package/dist/composables/useStripo.js +42 -42
- package/dist/composables/validators/useCouponBlockValidator.js +24 -0
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +33 -30
- package/dist/config/migrator/itemsBlockMigrator.js +28 -18
- package/dist/config/migrator/radioButtonMigrator.js +64 -44
- package/dist/config/migrator/recommendationMigrator.js +1 -1
- package/dist/enums/extensions/recommendationBlock.js +41 -95
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +36 -30
- package/dist/extensions/Blocks/Checkbox/control.js +23 -23
- package/dist/extensions/Blocks/RadioButton/control.js +15 -15
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +6 -6
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +31 -27
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +8 -8
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/static/styles/components/button.css.js +16 -9
- package/dist/static/styles/components/loader.css.js +4 -0
- package/dist/static/styles/components/narrow-panel.css.js +52 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/package.json +3 -3
- package/dist/enums/displayConditions.js +0 -84
- package/dist/src/enums/displayConditions.d.ts +0 -6
|
@@ -155,6 +155,8 @@ class z {
|
|
|
155
155
|
}
|
|
156
156
|
migrate(t) {
|
|
157
157
|
try {
|
|
158
|
+
if (!this.containsItemsBlock(t))
|
|
159
|
+
return t;
|
|
158
160
|
let o = this.removeJinjaConditionals(t);
|
|
159
161
|
o = this.replaceTemplateVariables(o);
|
|
160
162
|
const l = this.parser.parseFromString(o, "text/html"), a = l.querySelectorAll(
|
|
@@ -178,15 +180,15 @@ class z {
|
|
|
178
180
|
originalPriceStyles: e.originalPriceStyles,
|
|
179
181
|
quantityStyles: e.quantityStyles,
|
|
180
182
|
nodeConfig: R(e.configBlockAttributes)
|
|
181
|
-
}),
|
|
183
|
+
}), u = this.parser.parseFromString(
|
|
182
184
|
`<table><tbody><tr>${c}</tr></tbody></table>`,
|
|
183
185
|
"text/html"
|
|
184
186
|
).querySelector("td");
|
|
185
|
-
if (
|
|
187
|
+
if (u && i.parentNode) {
|
|
186
188
|
const p = R(e.configBlockAttributes);
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
|
|
189
|
+
u.setAttribute("esd-ext-config", JSON.stringify(p));
|
|
190
|
+
const d = u.querySelector("esd-config-block");
|
|
191
|
+
d && d.remove(), i.parentNode.replaceChild(u, i);
|
|
190
192
|
}
|
|
191
193
|
}), l.documentElement.outerHTML);
|
|
192
194
|
} catch (o) {
|
|
@@ -201,22 +203,22 @@ class z {
|
|
|
201
203
|
*/
|
|
202
204
|
extractConfiguration(t) {
|
|
203
205
|
var C, D, P;
|
|
204
|
-
const o = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", l = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", a = parseInt(l) - 1, n = T[o], i = ((P = n == null ? void 0 : n[a]) == null ? void 0 : P.value) || n[0].value, e = t.querySelector('[product-attr="price"]'), c = (e == null ? void 0 : e.getAttribute("data-currency_symbol")) || "USD",
|
|
206
|
+
const o = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", l = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", a = parseInt(l) - 1, n = T[o], i = ((P = n == null ? void 0 : n[a]) == null ? void 0 : P.value) || n[0].value, e = t.querySelector('[product-attr="price"]'), c = (e == null ? void 0 : e.getAttribute("data-currency_symbol")) || "USD", u = ((e == null ? void 0 : e.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", p = (e == null ? void 0 : e.getAttribute("data-formated")) !== "false", d = this.extractConfigBlockAttributes(t, o, l), S = d["data-card_orientation_control_value"];
|
|
205
207
|
let b;
|
|
206
208
|
S ? b = S === "horizontal" ? "horizontal" : "vertical" : b = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
|
|
207
|
-
const y = t.querySelector('a[product-attr="name"]'), I = (y == null ? void 0 : y.getAttribute("style")) || void 0, f = t.querySelector('a[product-attr="button"]'), m = (f == null ? void 0 : f.getAttribute("style")) || void 0,
|
|
209
|
+
const y = t.querySelector('a[product-attr="name"]'), I = (y == null ? void 0 : y.getAttribute("style")) || void 0, f = t.querySelector('a[product-attr="button"]'), m = (f == null ? void 0 : f.getAttribute("style")) || void 0, k = (e == null ? void 0 : e.getAttribute("style")) || void 0, A = t.querySelector("p.original-price"), h = (A == null ? void 0 : A.getAttribute("style")) || void 0, E = t.querySelector('[product-attr="quantity"]'), L = (E == null ? void 0 : E.getAttribute("style")) || void 0;
|
|
208
210
|
return {
|
|
209
211
|
orientation: b,
|
|
210
212
|
itemsType: o,
|
|
211
213
|
itemId: i,
|
|
212
214
|
currencySymbol: c,
|
|
213
|
-
currencyLocation:
|
|
215
|
+
currencyLocation: u,
|
|
214
216
|
formattedPrice: p,
|
|
215
|
-
configBlockAttributes:
|
|
217
|
+
configBlockAttributes: d,
|
|
216
218
|
nameStyles: I,
|
|
217
219
|
buttonStyles: m,
|
|
218
|
-
priceStyles:
|
|
219
|
-
originalPriceStyles:
|
|
220
|
+
priceStyles: k,
|
|
221
|
+
originalPriceStyles: h,
|
|
220
222
|
quantityStyles: L
|
|
221
223
|
};
|
|
222
224
|
}
|
|
@@ -296,6 +298,14 @@ class z {
|
|
|
296
298
|
"data-product_button_link": "{{Abandoned Cart Item (1) Url}}"
|
|
297
299
|
};
|
|
298
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Fast check for the presence of any items block (cart / browsed / purchased)
|
|
303
|
+
* in the raw HTML. Used to gate the migration pipeline so non-items templates
|
|
304
|
+
* are returned untouched.
|
|
305
|
+
*/
|
|
306
|
+
containsItemsBlock(t) {
|
|
307
|
+
return t.includes("esd-cart-items-block") || t.includes("esd-browsed-items-block") || t.includes("esd-purchased-items-block");
|
|
308
|
+
}
|
|
299
309
|
/**
|
|
300
310
|
* Removes Jinja2 conditional statements from HTML
|
|
301
311
|
* Handles all items block types:
|
|
@@ -337,18 +347,18 @@ class z {
|
|
|
337
347
|
const [, i, e, c] = n, _ = x[i];
|
|
338
348
|
if (!_)
|
|
339
349
|
return console.warn(`Unknown variable prefix: ${i}`), l;
|
|
340
|
-
const
|
|
341
|
-
if (!
|
|
350
|
+
const u = q[e];
|
|
351
|
+
if (!u)
|
|
342
352
|
return console.warn(`Unknown variable suffix mapping for: ${e}`), l;
|
|
343
|
-
const { pairsKey: p, defaultKey:
|
|
353
|
+
const { pairsKey: p, defaultKey: d, isArray: S } = u, y = o[p][_];
|
|
344
354
|
if (!y)
|
|
345
355
|
return console.warn(`No data found for: ${p}.${_}`), l;
|
|
346
356
|
if (S) {
|
|
347
|
-
const f = parseInt(c) - 1, m = y[
|
|
348
|
-
return Array.isArray(m) && m[f] ? m[f] : (console.warn(`Array value not found: ${p}.${_}.${
|
|
357
|
+
const f = parseInt(c) - 1, m = y[d];
|
|
358
|
+
return Array.isArray(m) && m[f] ? m[f] : (console.warn(`Array value not found: ${p}.${_}.${d}[${f}]`), l);
|
|
349
359
|
}
|
|
350
|
-
const I = y[
|
|
351
|
-
return I !== void 0 ? String(I) : (console.warn(`Default value not found: ${p}.${_}.${
|
|
360
|
+
const I = y[d];
|
|
361
|
+
return I !== void 0 ? String(I) : (console.warn(`Default value not found: ${p}.${_}.${d}`), l);
|
|
352
362
|
});
|
|
353
363
|
}
|
|
354
364
|
}
|
|
@@ -1,34 +1,54 @@
|
|
|
1
1
|
var x = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var b = (
|
|
4
|
-
import
|
|
5
|
-
class
|
|
2
|
+
var T = (l, e, t) => e in l ? x(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
|
|
3
|
+
var b = (l, e, t) => T(l, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import S from "../../extensions/Blocks/RadioButton/template.js";
|
|
5
|
+
class B {
|
|
6
6
|
constructor() {
|
|
7
7
|
b(this, "parser");
|
|
8
8
|
this.parser = new DOMParser();
|
|
9
9
|
}
|
|
10
|
-
migrate(
|
|
10
|
+
migrate(e) {
|
|
11
11
|
try {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const t = this.parser.parseFromString(e, "text/html"), i = t.querySelectorAll("td.radio-button-block"), s = t.querySelectorAll("td.radio-button-v2");
|
|
13
|
+
if (i.length === 0 && s.length === 0)
|
|
14
|
+
return e;
|
|
15
|
+
let o = !1;
|
|
16
|
+
return i.forEach((r) => {
|
|
17
|
+
if (r.classList.contains("radio-button-v2"))
|
|
15
18
|
return;
|
|
16
|
-
const n =
|
|
17
|
-
`<table id="tempDoc"><tbody><tr>${
|
|
19
|
+
const n = r.getAttribute("id"), a = this.extractTextFromElement(r, "ins-title"), g = this.extractTextFromElement(r, "ins-description"), c = this.extractTextFromElement(r, "ins-subscribe"), u = this.extractTextFromElement(r, "ins-unsubscribe"), d = this.buildTextBlock(a), p = this.buildTextBlock(g), y = this.buildTextBlock({ ...c, classList: "" }), f = this.buildTextBlock({ ...u, classList: "" }), h = S.replace("{-{-TITLE-}-}", d).replace("{-{-DESCRIPTION-}-}", p).replace("{-{-YES-}-}", y).replace("{-{-NO-}-}", f), m = this.parser.parseFromString(
|
|
20
|
+
`<table id="tempDoc"><tbody><tr>${h}</tr></tbody></table>`,
|
|
18
21
|
"text/html"
|
|
19
22
|
).querySelector(".radio-button-v2");
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
} catch (
|
|
23
|
-
return console.error("RadioButtonMigrator failed:",
|
|
23
|
+
m && r.parentNode && (m.setAttribute("id", n || ""), r.parentNode.replaceChild(m, r), o = !0);
|
|
24
|
+
}), o = this.healRadioButtonV2(t) || o, o ? t.documentElement.outerHTML : e;
|
|
25
|
+
} catch (t) {
|
|
26
|
+
return console.error("RadioButtonMigrator failed:", t), e;
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
healRadioButtonV2(e) {
|
|
30
|
+
let t = !1;
|
|
31
|
+
return e.querySelectorAll("td.radio-button-v2").forEach((i) => {
|
|
32
|
+
var p;
|
|
33
|
+
const s = i.querySelector("input#radioYes"), o = i.querySelector("input#radioNo");
|
|
34
|
+
if (!s || !o)
|
|
35
|
+
return;
|
|
36
|
+
const r = ((p = s.parentElement) == null ? void 0 : p.querySelector(":scope > p")) || null;
|
|
37
|
+
if (!r && !s.hasAttribute("align"))
|
|
38
|
+
return;
|
|
39
|
+
const n = s.closest("tr"), a = o.closest("tr");
|
|
40
|
+
if (!n || !a || n === a || !n.parentNode)
|
|
41
|
+
return;
|
|
42
|
+
const g = (r == null ? void 0 : r.innerHTML.trim()) || "Yes", c = a.cloneNode(!0), u = c.querySelector("input#radioNo"), d = c.querySelector("p");
|
|
43
|
+
u && (u.setAttribute("id", "radioYes"), u.removeAttribute("align")), d && (d.innerHTML = g), n.parentNode.replaceChild(c, n), t = !0;
|
|
44
|
+
}), t;
|
|
45
|
+
}
|
|
46
|
+
extractTextFromElement(e, t) {
|
|
47
|
+
var p, y;
|
|
48
|
+
const i = e.querySelector(`.${t}`);
|
|
29
49
|
if (!i)
|
|
30
50
|
return {
|
|
31
|
-
text:
|
|
51
|
+
text: t === "ins-title" ? "Title" : "Description",
|
|
32
52
|
isBold: !1,
|
|
33
53
|
isItalic: !1,
|
|
34
54
|
align: "left",
|
|
@@ -38,51 +58,51 @@ class T {
|
|
|
38
58
|
const s = i.querySelector("p");
|
|
39
59
|
if (!s)
|
|
40
60
|
return {
|
|
41
|
-
text: ((
|
|
61
|
+
text: ((p = i.textContent) == null ? void 0 : p.trim()) || (t === "ins-title" ? "Title" : "Description"),
|
|
42
62
|
isBold: !1,
|
|
43
63
|
isItalic: !1,
|
|
44
64
|
align: i.getAttribute("align") || "left",
|
|
45
65
|
styles: "",
|
|
46
66
|
classList: ""
|
|
47
67
|
};
|
|
48
|
-
const
|
|
68
|
+
const o = ((y = s.textContent) == null ? void 0 : y.trim()) || (t === "ins-title" ? "Title" : "Description"), r = s.getAttribute("style") || "", n = i.getAttribute("align") || s.getAttribute("align") || "left", a = /font-weight\s*:\s*bold/i.test(r) || !!s.querySelector("b, strong"), g = /font-style\s*:\s*italic/i.test(r) || !!s.querySelector("i, em"), c = this.removeStyleProperties(r, ["font-weight", "font-style"]), u = this.convertInlineToBlock(c), d = i.getAttribute("class") || "";
|
|
49
69
|
return {
|
|
50
|
-
text:
|
|
51
|
-
isBold:
|
|
52
|
-
isItalic:
|
|
53
|
-
align:
|
|
54
|
-
styles:
|
|
55
|
-
classList:
|
|
70
|
+
text: o,
|
|
71
|
+
isBold: a,
|
|
72
|
+
isItalic: g,
|
|
73
|
+
align: n,
|
|
74
|
+
styles: u,
|
|
75
|
+
classList: d
|
|
56
76
|
};
|
|
57
77
|
}
|
|
58
|
-
buildTextBlock(
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
const i =
|
|
78
|
+
buildTextBlock(e) {
|
|
79
|
+
let t = e.text;
|
|
80
|
+
e.isBold && e.isItalic ? t = `<strong path="1,0"><em path="1,0,0">${t}</em></strong>` : e.isBold ? t = `<strong path="1,0">${t}</strong>` : e.isItalic && (t = `<em path="1,0">${t}</em>`);
|
|
81
|
+
const i = e.align ? ` align="${e.align}"` : "", s = e.styles ? ` style="${e.styles.replaceAll('"', "'")}"` : "";
|
|
62
82
|
return `
|
|
63
|
-
<td class="esd-block-text ${
|
|
83
|
+
<td class="esd-block-text ${e.classList}" ${i}>
|
|
64
84
|
<p path="1" ${s}>
|
|
65
|
-
${
|
|
85
|
+
${t}
|
|
66
86
|
</p>
|
|
67
87
|
</td>
|
|
68
88
|
`;
|
|
69
89
|
}
|
|
70
|
-
removeStyleProperties(
|
|
71
|
-
return
|
|
72
|
-
const
|
|
73
|
-
return s.replace(
|
|
74
|
-
},
|
|
90
|
+
removeStyleProperties(e, t) {
|
|
91
|
+
return e ? t.reduce((s, o) => {
|
|
92
|
+
const r = new RegExp(`${o}\\s*:\\s*[^;]*;?`, "gi");
|
|
93
|
+
return s.replace(r, "");
|
|
94
|
+
}, e).replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim() : "";
|
|
75
95
|
}
|
|
76
|
-
convertInlineToBlock(
|
|
77
|
-
if (!
|
|
96
|
+
convertInlineToBlock(e) {
|
|
97
|
+
if (!e)
|
|
78
98
|
return "";
|
|
79
|
-
let
|
|
80
|
-
return /display\s*:/i.test(
|
|
99
|
+
let t = e.replace(/display\s*:\s*inline/gi, "display: block");
|
|
100
|
+
return /display\s*:/i.test(t) || (t = t ? `${t}; display: block` : "display: block"), t.replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim();
|
|
81
101
|
}
|
|
82
102
|
}
|
|
83
|
-
function
|
|
84
|
-
return new
|
|
103
|
+
function q(l) {
|
|
104
|
+
return new B().migrate(l);
|
|
85
105
|
}
|
|
86
106
|
export {
|
|
87
|
-
|
|
107
|
+
q as migrateRadioButton
|
|
88
108
|
};
|
|
@@ -13,7 +13,7 @@ class B {
|
|
|
13
13
|
migrate(e) {
|
|
14
14
|
try {
|
|
15
15
|
const t = this.parser.parseFromString(e, "text/html"), s = t.querySelectorAll(
|
|
16
|
-
'td.ins-recommendation-v3-block-1, td.product-block[esd-handler-name*="EmailRecommendationV3"]'
|
|
16
|
+
'td.ins-recommendation-v3-block-1:not(.recommendation-block-v2), td.product-block[esd-handler-name*="EmailRecommendationV3"]:not(.recommendation-block-v2)'
|
|
17
17
|
);
|
|
18
18
|
return w().$patch((i) => {
|
|
19
19
|
i.migrations = { ...i.migrations, [S]: s.length };
|
|
@@ -1,97 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
const u = {
|
|
1
|
+
const s = {
|
|
3
2
|
RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
|
|
4
|
-
},
|
|
3
|
+
}, i = {
|
|
5
4
|
CLIENT_ID: "clientId"
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
name: e("action-builder.similar-bought"),
|
|
19
|
-
path: "purchased-together"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: 13,
|
|
23
|
-
key: "userBased",
|
|
24
|
-
name: e("action-builder.user-based"),
|
|
25
|
-
path: "user-based"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 36,
|
|
29
|
-
key: "highestDiscounted",
|
|
30
|
-
name: e("journey-builder.highest-discounted-items"),
|
|
31
|
-
path: "highest-discounted"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 38,
|
|
35
|
-
key: "manualMerchandising",
|
|
36
|
-
name: e("action-builder.manual-merchandising"),
|
|
37
|
-
path: "manual-merchandising"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: 39,
|
|
41
|
-
key: "newArrivals",
|
|
42
|
-
name: e("action-builder.new-arrivals"),
|
|
43
|
-
path: "new-arrivals"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: 40,
|
|
47
|
-
key: "trendingProducts",
|
|
48
|
-
name: e("journey-builder.trending-products"),
|
|
49
|
-
path: "trending"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: 46,
|
|
53
|
-
key: "mostValuableOfPartner",
|
|
54
|
-
name: e("journey-builder.most-valuable-products"),
|
|
55
|
-
path: "most-valuable"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: 61,
|
|
59
|
-
key: "mostPopular",
|
|
60
|
-
name: e("journey-builder.most-popular-items"),
|
|
61
|
-
path: "most-popular"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: 62,
|
|
65
|
-
key: "mostPurchased",
|
|
66
|
-
name: e("action-builder.most-purchased"),
|
|
67
|
-
path: "top-sellers"
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
}, d = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], m = [
|
|
5
|
+
}, u = [
|
|
6
|
+
{ id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
|
|
7
|
+
{ id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
|
|
8
|
+
{ id: 13, key: "userBased", name: "User Based", path: "user-based" },
|
|
9
|
+
{ id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
|
|
10
|
+
{ id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
|
|
11
|
+
{ id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
|
|
12
|
+
{ id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
|
|
13
|
+
{ id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
|
|
14
|
+
{ id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
|
|
15
|
+
{ id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
|
|
16
|
+
], l = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], c = [
|
|
71
17
|
{ text: "before the amount", value: "0" },
|
|
72
18
|
{ text: "after the amount", value: "1" }
|
|
73
|
-
],
|
|
19
|
+
], d = [
|
|
74
20
|
{ text: "dot(.)", value: "." },
|
|
75
21
|
{ text: "comma(,)", value: "," }
|
|
76
|
-
],
|
|
22
|
+
], p = [
|
|
77
23
|
{ text: "0", value: "0" },
|
|
78
24
|
{ text: "1", value: "1" },
|
|
79
25
|
{ text: "2", value: "2" },
|
|
80
26
|
{ text: "3", value: "3" },
|
|
81
27
|
{ text: "4", value: "4" },
|
|
82
28
|
{ text: "5", value: "5" }
|
|
83
|
-
],
|
|
29
|
+
], e = [
|
|
84
30
|
{ text: "is exactly", value: "=" },
|
|
85
31
|
{ text: "contains", value: "~" },
|
|
86
32
|
{ text: "does not contain", value: "!~" },
|
|
87
33
|
{ text: "any of", value: "||" }
|
|
88
|
-
],
|
|
34
|
+
], a = [
|
|
89
35
|
{ text: "is exactly", value: "=" },
|
|
90
36
|
{ text: "is not exactly", value: "!==" },
|
|
91
37
|
{ text: "contains", value: "~" },
|
|
92
38
|
{ text: "does not contain", value: "!~" },
|
|
93
39
|
{ text: "any of", value: "||" }
|
|
94
|
-
],
|
|
40
|
+
], r = [
|
|
95
41
|
{ text: "is equal to", value: "=" },
|
|
96
42
|
{ text: "is greater than", value: ">" },
|
|
97
43
|
{ text: "is less than", value: "<" }
|
|
@@ -99,39 +45,39 @@ const u = {
|
|
|
99
45
|
{ text: "is equal to", value: "=" },
|
|
100
46
|
{ text: "after", value: ">" },
|
|
101
47
|
{ text: "before", value: "<" }
|
|
102
|
-
],
|
|
48
|
+
], n = [
|
|
103
49
|
{ text: "true", value: "==" },
|
|
104
50
|
{ text: "false", value: "!=" }
|
|
105
|
-
],
|
|
106
|
-
if (!
|
|
107
|
-
return
|
|
108
|
-
switch (
|
|
51
|
+
], m = (t) => {
|
|
52
|
+
if (!t)
|
|
53
|
+
return e;
|
|
54
|
+
switch (t) {
|
|
109
55
|
case "Boolean":
|
|
110
|
-
return
|
|
56
|
+
return n;
|
|
111
57
|
case "Date":
|
|
112
58
|
return o;
|
|
113
59
|
case "Number":
|
|
114
|
-
return
|
|
60
|
+
return r;
|
|
115
61
|
case "String":
|
|
116
|
-
return
|
|
62
|
+
return e;
|
|
117
63
|
case "Strings":
|
|
118
|
-
return
|
|
64
|
+
return a;
|
|
119
65
|
default:
|
|
120
|
-
return
|
|
66
|
+
return e;
|
|
121
67
|
}
|
|
122
68
|
};
|
|
123
69
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
u as
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
70
|
+
l as PriceAttributes,
|
|
71
|
+
i as QUERY_PARAMS,
|
|
72
|
+
u as RecommendationFeedSourceMaps,
|
|
73
|
+
s as URLS,
|
|
74
|
+
p as currencyDecimalCounts,
|
|
75
|
+
c as currencyLocationMaps,
|
|
76
|
+
d as currencyOperators,
|
|
77
|
+
m as getOperatorOptions,
|
|
78
|
+
a as operatorOptionsForArrayOfStrings,
|
|
79
|
+
n as operatorOptionsForBooleans,
|
|
134
80
|
o as operatorOptionsForDates,
|
|
135
|
-
|
|
136
|
-
|
|
81
|
+
r as operatorOptionsForNumbers,
|
|
82
|
+
e as operatorOptionsForStrings
|
|
137
83
|
};
|
package/dist/enums/onboarding.js
CHANGED
|
@@ -2,10 +2,15 @@ const e = [
|
|
|
2
2
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
|
|
3
3
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
|
|
4
4
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
|
|
5
|
-
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]',
|
|
5
|
+
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', E = ".in-ribbons-wrapper", o = ".guido__amp-toggle-html", a = ".in-segments-wrapper", O = '[data-testid="guido-header"]', _ = 158, i = 10;
|
|
6
6
|
export {
|
|
7
|
+
o as AMP_TOGGLE_BUTTON_SELECTOR,
|
|
8
|
+
a as AMP_TOGGLE_WRAPPER_SELECTOR,
|
|
7
9
|
n as CARD_COMPOSITION_TAB_SELECTOR,
|
|
8
|
-
|
|
10
|
+
O as HEADER_SELECTOR,
|
|
11
|
+
_ as POPOVER_LEFT_OFFSET,
|
|
12
|
+
i as POPOVER_TOP_GAP,
|
|
13
|
+
E as RIBBON_SELECTOR,
|
|
9
14
|
e as SERVICE_HOVER_SELECTORS,
|
|
10
15
|
s as SETTINGS_TAB_SELECTOR,
|
|
11
16
|
t as UI_EDITOR_SELECTOR
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
import { useTranslations as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { useTranslations as R } from "../composables/useTranslations.js";
|
|
2
|
+
import { ProductType as s } from "../@types/config/schemas.js";
|
|
3
|
+
import "../@types/config/defaults.js";
|
|
4
|
+
import { getEnvironmentPrefix as S } from "../utils/environmentUtil.js";
|
|
5
|
+
const B = {
|
|
4
6
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
5
7
|
PREFERENCES_LINK_TYPE: 3
|
|
6
|
-
},
|
|
8
|
+
}, i = {
|
|
7
9
|
UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
|
|
8
10
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
9
11
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
10
12
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
11
|
-
}, n =
|
|
13
|
+
}, n = S(), C = {
|
|
12
14
|
UNSUBSCRIBE_URL: `https://mail.${n}.com/user/v1/unsub`,
|
|
13
15
|
PREFERENCES_URL: `https://mail.${n}.com/user/v1/prefs`
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
}, U = {
|
|
17
|
+
[s.EMAIL]: "email",
|
|
18
|
+
[s.ARCHITECT]: "journey",
|
|
19
|
+
[s.UNSUBSCRIBE_PAGES]: "email"
|
|
20
|
+
}, t = "iid", o = {
|
|
21
|
+
name: "Global Unsubscribe",
|
|
22
|
+
sendGridId: "G"
|
|
23
|
+
}, c = "/email/unsubscribe-pages", E = {
|
|
18
24
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
19
25
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
20
26
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
21
27
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
22
28
|
RESUBSCRIBE: 5
|
|
23
|
-
},
|
|
29
|
+
}, u = {
|
|
24
30
|
[E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
|
|
25
31
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
|
|
26
|
-
},
|
|
32
|
+
}, T = {
|
|
27
33
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
28
34
|
E.GLOBAL_UNSUBSCRIBE,
|
|
29
35
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -33,31 +39,31 @@ const _ = {
|
|
|
33
39
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
34
40
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
35
41
|
]
|
|
36
|
-
},
|
|
37
|
-
const
|
|
42
|
+
}, b = () => {
|
|
43
|
+
const e = R();
|
|
38
44
|
return {
|
|
39
|
-
[E.GLOBAL_UNSUBSCRIBE]:
|
|
40
|
-
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]:
|
|
41
|
-
[E.RESUBSCRIBE]:
|
|
42
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]:
|
|
43
|
-
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]:
|
|
45
|
+
[E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
|
|
46
|
+
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
47
|
+
[E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
|
|
48
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
|
|
49
|
+
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
44
50
|
};
|
|
45
|
-
},
|
|
51
|
+
}, P = {
|
|
46
52
|
default: "{{ins-unsubscribe-link}}",
|
|
47
53
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
48
54
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
49
55
|
};
|
|
50
56
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
o as DEFAULT_UNSUBSCRIBE_GROUP,
|
|
58
|
+
t as INSIDER_ID,
|
|
59
|
+
i as LINK_REGEXES,
|
|
60
|
+
B as LINK_TYPES,
|
|
61
|
+
P as MERGE_TAGS,
|
|
56
62
|
E as PAGE_TYPES,
|
|
57
|
-
U as
|
|
58
|
-
|
|
59
|
-
c as
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
U as PRODUCT_TYPE_URL_SEGMENTS,
|
|
64
|
+
T as TYPE_COLLECTIONS,
|
|
65
|
+
c as UNSUBSCRIBE_PAGES_LINK,
|
|
66
|
+
u as UNSUBSCRIBE_SYNC_MODULE_TYPES,
|
|
67
|
+
C as URLS,
|
|
68
|
+
b as getTypeTranslations
|
|
63
69
|
};
|