@useinsider/guido 3.2.0-beta.1a14d2a → 3.2.0-beta.1fbcb96
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/useRecommendation.js +2 -2
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useStripo.js +5 -5
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/enums/displayConditions.js +82 -78
- package/dist/enums/extensions/recommendationBlock.js +95 -41
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +39 -31
- package/dist/extensions/Blocks/Checkbox/control.js +23 -23
- package/dist/extensions/Blocks/RadioButton/control.js +15 -15
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +8 -8
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
- package/dist/package.json.js +1 -1
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/enums/displayConditions.d.ts +5 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +5 -1
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +13 -3
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/stores/onboarding.js +4 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRecommendation as
|
|
2
|
-
import { DUMMY_IMAGE_MAPPINGS as
|
|
1
|
+
import { useRecommendation as C } from "../../composables/useRecommendation.js";
|
|
2
|
+
import { DUMMY_IMAGE_MAPPINGS as h, REGEX as T, VerticalOrientation as M, CSS as E, ATTRIBUTES as A, CONDITIONS as g, HTML as N } from "../../enums/recommendation.js";
|
|
3
3
|
import { prepareRecommendationBlocks as x } from "./utils/recommendationCompilerUtils.js";
|
|
4
4
|
const w = [
|
|
5
5
|
{
|
|
@@ -8,7 +8,7 @@ const w = [
|
|
|
8
8
|
type: "custom",
|
|
9
9
|
processor: (c) => {
|
|
10
10
|
let e = c;
|
|
11
|
-
return Object.entries(
|
|
11
|
+
return Object.entries(h).forEach(([, l]) => {
|
|
12
12
|
Object.entries(l).forEach(([n, s]) => {
|
|
13
13
|
e = e.replaceAll(s, `{{${n}}}`);
|
|
14
14
|
});
|
|
@@ -30,13 +30,13 @@ const w = [
|
|
|
30
30
|
description: "Adding recommendation unresponsive css",
|
|
31
31
|
type: "custom",
|
|
32
32
|
processor: (c) => {
|
|
33
|
-
const { calculateCardWidth: e, getRecommendationCampaignData: l } =
|
|
33
|
+
const { calculateCardWidth: e, getRecommendationCampaignData: l } = C();
|
|
34
34
|
let n = c;
|
|
35
35
|
const s = n.match(T.ID);
|
|
36
36
|
if (s) {
|
|
37
37
|
const a = [];
|
|
38
38
|
if (s.forEach((i) => {
|
|
39
|
-
const
|
|
39
|
+
const d = /recommendation-id="(.*?)"/i.exec(i), _ = d ? d[1].trim() : "", R = l(_);
|
|
40
40
|
R.textTrimming && R.orientation === M && a.push(e(R));
|
|
41
41
|
}), a.length) {
|
|
42
42
|
const i = `width:${Math.min(...a)}px!important;`;
|
|
@@ -60,25 +60,25 @@ const w = [
|
|
|
60
60
|
type: "custom",
|
|
61
61
|
processor: (c) => {
|
|
62
62
|
let e = c;
|
|
63
|
-
const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } =
|
|
63
|
+
const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = C();
|
|
64
64
|
return l !== null && l.forEach((s) => {
|
|
65
65
|
const a = s.match(T.CUSTOM_FIELD);
|
|
66
66
|
if (!a)
|
|
67
67
|
return;
|
|
68
|
-
const [i] = a,
|
|
69
|
-
if (!
|
|
68
|
+
const [i] = a, d = i.match(T.CUSTOM_FIELD_INDEXES_PART), _ = i.match(T.CUSTOM_FIELD_NAME_PART), R = s.match(T.ATTRIBUTE_PARAGRAPH_START_TAG);
|
|
69
|
+
if (!d || !_ || !R)
|
|
70
70
|
return;
|
|
71
|
-
const [S] =
|
|
71
|
+
const [S] = d, [b] = _, [m] = R, o = b.substring(1, b.length - 2), r = m.match(T.COMPOSITION) !== null;
|
|
72
72
|
let t = i;
|
|
73
73
|
if (r) {
|
|
74
|
-
const I = S.substring(2, S.length - 3),
|
|
75
|
-
o === A.OMNIBUS_PRICE && (
|
|
74
|
+
const I = S.substring(2, S.length - 3), p = n(I);
|
|
75
|
+
o === A.OMNIBUS_PRICE && (p.priceBeforeTextValue && (t = `${p.priceBeforeTextValue}${t}`), p.priceAfterTextValue && (t = `${t}${p.priceAfterTextValue}`)), o === A.OMNIBUS_DISCOUNT && (p.discountBeforeTextValue && (t = `${p.discountBeforeTextValue}${t}`), p.discountAfterTextValue && (t = `${t}${p.discountAfterTextValue}`));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const u = S.substring(2);
|
|
78
78
|
let f = "";
|
|
79
|
-
o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${
|
|
80
|
-
const $ = `${
|
|
81
|
-
e = e.replace(s,
|
|
79
|
+
o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${u}${A.DISCOUNT}`).replaceAll(`{${A.OMNIBUS_DISCOUNT}}`, `${u}${A.OMNIBUS_DISCOUNT}`).replaceAll(`{${A.OMNIBUS_PRICE}}`, `${u}${A.OMNIBUS_PRICE}`));
|
|
80
|
+
const $ = `${m}${t}${N.PARAGRAPH_END_TAG}`, y = `${f}${r ? $ : s}${g.ELSE}${m}${N.PARAGRAPH_END_TAG}${g.END_IF}`;
|
|
81
|
+
e = e.replace(s, y);
|
|
82
82
|
}), e;
|
|
83
83
|
},
|
|
84
84
|
priority: 53
|
|
@@ -136,7 +136,7 @@ const w = [
|
|
|
136
136
|
/@media[^{]*max-width\s*:\s*480px[^{]*\{((?:[^{}]*\{[^{}]*\})*[^{}]*)\}/g,
|
|
137
137
|
(l, n) => {
|
|
138
138
|
const s = n.match(/[^{}]+\{[^{}]*\}/g) || [], a = /ins-recommendation|product-image-cell|button-cell|product-info-cell/;
|
|
139
|
-
return s.every((
|
|
139
|
+
return s.every((d) => a.test(d)) ? "" : l;
|
|
140
140
|
}
|
|
141
141
|
)), e;
|
|
142
142
|
},
|
|
@@ -151,7 +151,7 @@ const w = [
|
|
|
151
151
|
/<a\b[^>]*\bes-button\b[^>]*>/g,
|
|
152
152
|
(o) => o.replace(
|
|
153
153
|
/([;"]color:)([^;"]+)/g,
|
|
154
|
-
(r, t,
|
|
154
|
+
(r, t, u) => u.includes("!important") ? r : `${t}${u} !important`
|
|
155
155
|
)
|
|
156
156
|
), l = /<!--REC_START-->([\s\S]*?)<!--REC_END-->/g, n = / style="([^"]*)"/g, s = /* @__PURE__ */ new Map();
|
|
157
157
|
let a = l.exec(e);
|
|
@@ -163,12 +163,12 @@ const w = [
|
|
|
163
163
|
}
|
|
164
164
|
n.lastIndex = 0, a = l.exec(e);
|
|
165
165
|
}
|
|
166
|
-
const i = /* @__PURE__ */ new Map(),
|
|
166
|
+
const i = /* @__PURE__ */ new Map(), d = [];
|
|
167
167
|
let _ = 0;
|
|
168
168
|
if (s.forEach((o, r) => {
|
|
169
169
|
if (o >= 6) {
|
|
170
|
-
const t = `rc${_++}
|
|
171
|
-
i.set(r, t),
|
|
170
|
+
const t = `rc${_++}`;
|
|
171
|
+
i.set(r, t), d.push(`.${t}{${r}}`);
|
|
172
172
|
}
|
|
173
173
|
}), i.size === 0) {
|
|
174
174
|
let o = e;
|
|
@@ -182,23 +182,23 @@ const w = [
|
|
|
182
182
|
caseB: new RegExp(` style="${t}"((?:[^>]*?))(class="[^"]*")`, "g")
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
|
-
let
|
|
186
|
-
return
|
|
185
|
+
let m = e.replace("</style>", `${d.join("")}</style>`);
|
|
186
|
+
return m = m.replace(
|
|
187
187
|
/<!--REC_START-->([\s\S]*?)<!--REC_END-->/g,
|
|
188
188
|
(o, r) => {
|
|
189
189
|
let t = r;
|
|
190
|
-
return i.forEach((
|
|
190
|
+
return i.forEach((u, f) => {
|
|
191
191
|
const $ = b.get(f);
|
|
192
192
|
t = t.replace(
|
|
193
193
|
$.caseA,
|
|
194
|
-
(
|
|
194
|
+
(y, I, p) => S(I, u) + p
|
|
195
195
|
), t = t.replace(
|
|
196
196
|
$.caseB,
|
|
197
|
-
(
|
|
198
|
-
), t = t.replaceAll(` style="${f}"`, ` class="${
|
|
197
|
+
(y, I, p) => I + S(p, u)
|
|
198
|
+
), t = t.replaceAll(` style="${f}"`, ` class="${u}"`);
|
|
199
199
|
}), t;
|
|
200
200
|
}
|
|
201
|
-
),
|
|
201
|
+
), m = m.replaceAll("<!--REC_START-->", ""), m = m.replaceAll("<!--REC_END-->", ""), m;
|
|
202
202
|
},
|
|
203
203
|
priority: 58
|
|
204
204
|
}
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as p, LINK_TYPES as
|
|
3
|
-
import { parsePageList as
|
|
4
|
-
import { useConfigStore as
|
|
5
|
-
import { useDynamicContentStore as
|
|
6
|
-
import { useUnsubscribeStore as
|
|
7
|
-
|
|
1
|
+
import { usePartner as U } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as p, PRODUCT_TYPE_URL_SEGMENTS as R, LINK_TYPES as _, INSIDER_ID as m, URLS as y } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { parsePageList as N } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
4
|
+
import { useConfigStore as C } from "../../stores/config.js";
|
|
5
|
+
import { useDynamicContentStore as L } from "../../stores/dynamic-content.js";
|
|
6
|
+
import { useUnsubscribeStore as P } from "../../stores/unsubscribe.js";
|
|
7
|
+
import { ProductType as B } from "../../@types/config/schemas.js";
|
|
8
|
+
import "../../@types/config/defaults.js";
|
|
9
|
+
const F = [
|
|
8
10
|
{
|
|
9
11
|
id: "add-unsubscribe-link-values",
|
|
10
12
|
description: "Adding unsubscribe link values",
|
|
11
13
|
type: "custom",
|
|
12
|
-
processor: (
|
|
13
|
-
const { getPartnerName: i } =
|
|
14
|
-
if (!
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
processor: (s) => {
|
|
15
|
+
const { getPartnerName: i } = U(), n = C(), t = L(), E = P(), c = n.variationId;
|
|
16
|
+
if (!c)
|
|
17
|
+
return s;
|
|
18
|
+
const r = R[n.productType] ?? R[B.EMAIL];
|
|
19
|
+
let e = s;
|
|
20
|
+
const d = `/${i()}/${r}/${c}?user={{iid}}`, f = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]");
|
|
21
|
+
let a = !1, l = !1;
|
|
22
|
+
return f.forEach((g) => {
|
|
23
|
+
var S;
|
|
24
|
+
const u = g.getAttribute("data-unsubscribe-page-list");
|
|
22
25
|
if (!u)
|
|
23
26
|
return;
|
|
24
|
-
const
|
|
25
|
-
(
|
|
27
|
+
const I = N(u), b = ((S = E.templates) == null ? void 0 : S.filter(
|
|
28
|
+
(o) => I.includes(o.id)
|
|
26
29
|
)) ?? [];
|
|
27
|
-
|
|
28
|
-
}), (
|
|
30
|
+
a = a || b.some((o) => o.type === _.UNSUBSCRIBE_LINK_TYPE), l = l || b.some((o) => o.type === _.PREFERENCES_LINK_TYPE);
|
|
31
|
+
}), (a || l) && (t.selectedDynamicContentList.some((u) => u.value === m) || t.selectedDynamicContentList.push({
|
|
29
32
|
text: m,
|
|
30
33
|
value: m,
|
|
31
34
|
fallback: ""
|
|
32
|
-
})),
|
|
35
|
+
})), a && (e = e.replace(
|
|
33
36
|
p.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
34
|
-
|
|
37
|
+
y.UNSUBSCRIBE_URL + d
|
|
35
38
|
)), l && (e = e.replace(
|
|
36
39
|
p.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
37
|
-
|
|
38
|
-
)),
|
|
40
|
+
y.PREFERENCES_URL + d
|
|
41
|
+
)), f.length && (e = e.replace(p.UNSUBSCRIBE_LINK_REGEX, "")), e;
|
|
39
42
|
},
|
|
40
43
|
priority: 60
|
|
41
44
|
},
|
|
@@ -52,25 +55,25 @@ const G = [
|
|
|
52
55
|
id: "format-comment-braces",
|
|
53
56
|
description: "Adding spaces around comment braces for proper formatting",
|
|
54
57
|
type: "custom",
|
|
55
|
-
processor: (
|
|
58
|
+
processor: (s) => s.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
|
|
56
59
|
priority: 62
|
|
57
60
|
},
|
|
58
61
|
{
|
|
59
62
|
id: "add-universal-link-flags",
|
|
60
63
|
description: "Adding universal link flags",
|
|
61
64
|
type: "custom",
|
|
62
|
-
processor: (
|
|
63
|
-
let i =
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
-
if (
|
|
65
|
+
processor: (s) => {
|
|
66
|
+
let i = s;
|
|
67
|
+
const n = i.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
68
|
+
return n && n.forEach((t) => {
|
|
69
|
+
if (t.includes("insEmail=1"))
|
|
67
70
|
return;
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
return
|
|
71
|
+
if (t.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
72
|
+
const c = t.replace(/href=(["'`”])(.*?)\1/gm, (r) => {
|
|
73
|
+
const e = r.slice(6, r.length - 1).trim();
|
|
74
|
+
return r.includes("?") || r.includes("#") ? e.slice(-1) === "&" ? r.replace(e, `${e}insEmail=1`) : r.replace(e, `${e}&insEmail=1`) : r.replace(e, `${e}?insEmail=1`);
|
|
72
75
|
});
|
|
73
|
-
i = i.replace(
|
|
76
|
+
i = i.replace(t, c);
|
|
74
77
|
}
|
|
75
78
|
}), i;
|
|
76
79
|
},
|
|
@@ -78,5 +81,5 @@ const G = [
|
|
|
78
81
|
}
|
|
79
82
|
];
|
|
80
83
|
export {
|
|
81
|
-
|
|
84
|
+
F as unsubscribeCompilerRules
|
|
82
85
|
};
|
|
@@ -1,80 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
import { useTranslations as i } from "../composables/useTranslations.js";
|
|
2
|
+
const t = () => {
|
|
3
|
+
const e = i();
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
category: e("journey-builder.demographics"),
|
|
7
|
+
conditions: [
|
|
8
|
+
{
|
|
9
|
+
id: 1,
|
|
10
|
+
name: e("condition.language"),
|
|
11
|
+
description: e("journey-builder.display-condition-language-description"),
|
|
12
|
+
beforeScript: '{% if language == "en_US" %}',
|
|
13
|
+
afterScript: "{% endif %}"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 2,
|
|
17
|
+
name: e("condition.country"),
|
|
18
|
+
description: e("journey-builder.display-condition-country-description"),
|
|
19
|
+
beforeScript: '{% if country == "Australia" %}',
|
|
20
|
+
afterScript: "{% endif %}"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 3,
|
|
24
|
+
name: e("stripo-editor.country-and-city"),
|
|
25
|
+
description: e("journey-builder.display-condition-country-city-description"),
|
|
26
|
+
beforeScript: '{% if country == "United Kingdom" and city == "London" %}',
|
|
27
|
+
afterScript: "{% endif %}"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 4,
|
|
31
|
+
name: e("stripo-editor.age-less-than-operator"),
|
|
32
|
+
description: e("journey-builder.display-condition-age-less-than"),
|
|
33
|
+
beforeScript: "{% if age < 18 %}",
|
|
34
|
+
afterScript: "{% endif %}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 5,
|
|
38
|
+
name: e("stripo-editor.age-equal-greater-operator"),
|
|
39
|
+
description: e("journey-builder.display-condition-age-equal-greater"),
|
|
40
|
+
beforeScript: "{% if age >= 25 %}",
|
|
41
|
+
afterScript: "{% endif %}"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 6,
|
|
45
|
+
name: e("stripo-editor.age-greater-less-operators"),
|
|
46
|
+
description: e("journey-builder.display-condition-age-between"),
|
|
47
|
+
beforeScript: "{% if age > 18 and age < 25 %}",
|
|
48
|
+
afterScript: "{% endif %}"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 7,
|
|
52
|
+
name: e("condition.gender"),
|
|
53
|
+
description: e("journey-builder.display-condition-gender-female"),
|
|
54
|
+
beforeScript: '{% if gender == "Female" %}',
|
|
55
|
+
afterScript: "{% endif %}"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 8,
|
|
59
|
+
name: e("journey-builder.state"),
|
|
60
|
+
description: e("stripo-editor.state-description"),
|
|
61
|
+
beforeScript: '{% if c_state == "VIC" or c_state == "NSW" or c_state == "QLD" %}',
|
|
62
|
+
afterScript: "{% endif %}"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 9,
|
|
66
|
+
name: e("journey-builder.vip-user"),
|
|
67
|
+
description: e("stripo-editor.vip-user-description"),
|
|
68
|
+
beforeScript: "{% if c_is_vip_user %}",
|
|
69
|
+
afterScript: "{% endif %}"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 10,
|
|
73
|
+
name: e("journey-builder.membership-type"),
|
|
74
|
+
description: e("stripo-editor.membership-type-description"),
|
|
75
|
+
beforeScript: "{% if c_is_gold_member or c_is_silver_member %}",
|
|
76
|
+
afterScript: "{% endif %}"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
};
|
|
78
82
|
export {
|
|
79
|
-
|
|
83
|
+
t as getDisplayConditions
|
|
80
84
|
};
|
|
@@ -1,43 +1,97 @@
|
|
|
1
|
-
|
|
1
|
+
import { useTranslations as a } from "../../composables/useTranslations.js";
|
|
2
|
+
const u = {
|
|
2
3
|
RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
|
|
3
|
-
},
|
|
4
|
+
}, l = {
|
|
4
5
|
CLIENT_ID: "clientId"
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
}, c = () => {
|
|
7
|
+
const e = a();
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
id: 11,
|
|
11
|
+
key: "similarViewed",
|
|
12
|
+
name: e("action-builder.similar-viewed"),
|
|
13
|
+
path: "viewed-together"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 12,
|
|
17
|
+
key: "similarBought",
|
|
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 = [
|
|
17
71
|
{ text: "before the amount", value: "0" },
|
|
18
72
|
{ text: "after the amount", value: "1" }
|
|
19
|
-
],
|
|
73
|
+
], p = [
|
|
20
74
|
{ text: "dot(.)", value: "." },
|
|
21
75
|
{ text: "comma(,)", value: "," }
|
|
22
|
-
],
|
|
76
|
+
], v = [
|
|
23
77
|
{ text: "0", value: "0" },
|
|
24
78
|
{ text: "1", value: "1" },
|
|
25
79
|
{ text: "2", value: "2" },
|
|
26
80
|
{ text: "3", value: "3" },
|
|
27
81
|
{ text: "4", value: "4" },
|
|
28
82
|
{ text: "5", value: "5" }
|
|
29
|
-
],
|
|
83
|
+
], t = [
|
|
30
84
|
{ text: "is exactly", value: "=" },
|
|
31
85
|
{ text: "contains", value: "~" },
|
|
32
86
|
{ text: "does not contain", value: "!~" },
|
|
33
87
|
{ text: "any of", value: "||" }
|
|
34
|
-
],
|
|
88
|
+
], r = [
|
|
35
89
|
{ text: "is exactly", value: "=" },
|
|
36
90
|
{ text: "is not exactly", value: "!==" },
|
|
37
91
|
{ text: "contains", value: "~" },
|
|
38
92
|
{ text: "does not contain", value: "!~" },
|
|
39
93
|
{ text: "any of", value: "||" }
|
|
40
|
-
],
|
|
94
|
+
], n = [
|
|
41
95
|
{ text: "is equal to", value: "=" },
|
|
42
96
|
{ text: "is greater than", value: ">" },
|
|
43
97
|
{ text: "is less than", value: "<" }
|
|
@@ -45,39 +99,39 @@ const s = {
|
|
|
45
99
|
{ text: "is equal to", value: "=" },
|
|
46
100
|
{ text: "after", value: ">" },
|
|
47
101
|
{ text: "before", value: "<" }
|
|
48
|
-
],
|
|
102
|
+
], s = [
|
|
49
103
|
{ text: "true", value: "==" },
|
|
50
104
|
{ text: "false", value: "!=" }
|
|
51
|
-
],
|
|
52
|
-
if (!
|
|
53
|
-
return
|
|
54
|
-
switch (
|
|
105
|
+
], h = (e) => {
|
|
106
|
+
if (!e)
|
|
107
|
+
return t;
|
|
108
|
+
switch (e) {
|
|
55
109
|
case "Boolean":
|
|
56
|
-
return
|
|
110
|
+
return s;
|
|
57
111
|
case "Date":
|
|
58
112
|
return o;
|
|
59
113
|
case "Number":
|
|
60
|
-
return
|
|
114
|
+
return n;
|
|
61
115
|
case "String":
|
|
62
|
-
return
|
|
116
|
+
return t;
|
|
63
117
|
case "Strings":
|
|
64
|
-
return
|
|
118
|
+
return r;
|
|
65
119
|
default:
|
|
66
|
-
return
|
|
120
|
+
return t;
|
|
67
121
|
}
|
|
68
122
|
};
|
|
69
123
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
u as
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
124
|
+
d as PriceAttributes,
|
|
125
|
+
l as QUERY_PARAMS,
|
|
126
|
+
u as URLS,
|
|
127
|
+
v as currencyDecimalCounts,
|
|
128
|
+
m as currencyLocationMaps,
|
|
129
|
+
p as currencyOperators,
|
|
130
|
+
h as getOperatorOptions,
|
|
131
|
+
c as getRecommendationFeedSourceMaps,
|
|
132
|
+
r as operatorOptionsForArrayOfStrings,
|
|
133
|
+
s as operatorOptionsForBooleans,
|
|
80
134
|
o as operatorOptionsForDates,
|
|
81
|
-
|
|
82
|
-
|
|
135
|
+
n as operatorOptionsForNumbers,
|
|
136
|
+
t as operatorOptionsForStrings
|
|
83
137
|
};
|
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
|