@useinsider/guido 3.2.0-beta.cb38cc7 → 3.2.0-beta.d3d7a5a
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/useRibbonOffset.js +21 -0
- package/dist/composables/useStripo.js +14 -16
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/migrator/radioButtonMigrator.js +64 -44
- package/dist/enums/onboarding.js +7 -2
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- 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/services/templateLibraryApi.js +5 -4
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/stores/onboarding.d.ts +4 -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 -80
- package/dist/src/enums/displayConditions.d.ts +0 -2
package/dist/package.json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useConfig as w } from "../composables/useConfig.js";
|
|
2
2
|
import { useHttp as b } from "../composables/useHttp.js";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
3
|
+
import { useToaster as C } from "../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as h } from "../composables/useTranslations.js";
|
|
5
5
|
import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
|
|
6
6
|
import { EditorType as v } from "../enums/defaults.js";
|
|
7
7
|
import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
@@ -9,7 +9,7 @@ import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
|
|
|
9
9
|
import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
|
|
10
10
|
import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
|
|
11
11
|
const $ = () => {
|
|
12
|
-
const { get: n, post: m } = b(), { handleError: o, showToaster: l } =
|
|
12
|
+
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
|
|
13
13
|
return {
|
|
14
14
|
getCategories: async () => {
|
|
15
15
|
try {
|
|
@@ -62,7 +62,8 @@ const $ = () => {
|
|
|
62
62
|
stripoConfig: r({
|
|
63
63
|
editor: "stripo",
|
|
64
64
|
html: a.rawHtml,
|
|
65
|
-
css: a.css
|
|
65
|
+
css: a.css,
|
|
66
|
+
dynamicContentList: a.dynamicContentList
|
|
66
67
|
})
|
|
67
68
|
}, { data: { type: T } } = await m(
|
|
68
69
|
"/newsletter/template-library/create-template",
|
|
@@ -3,3 +3,9 @@ export declare const UI_EDITOR_SELECTOR = "ui-editor";
|
|
|
3
3
|
export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
|
|
4
4
|
export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
|
|
5
5
|
export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
|
|
6
|
+
export declare const DYNAMIC_CONTENT_BUTTON_SELECTOR = "#guido__btn-add-dynamic-content";
|
|
7
|
+
export declare const AMP_TOGGLE_BUTTON_SELECTOR = ".guido__amp-toggle-html";
|
|
8
|
+
export declare const AMP_TOGGLE_WRAPPER_SELECTOR = ".in-segments-wrapper";
|
|
9
|
+
export declare const HEADER_SELECTOR = "[data-testid=\"guido-header\"]";
|
|
10
|
+
export declare const POPOVER_LEFT_OFFSET = 158;
|
|
11
|
+
export declare const POPOVER_TOP_GAP = 10;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle
|
|
1
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
2
|
/**
|
|
3
3
|
* @returns The template for the default checkbox block
|
|
4
4
|
*/
|
|
@@ -1392,6 +1392,10 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
|
|
|
1392
1392
|
close(type: OnboardingType): Promise<void>;
|
|
1393
1393
|
next(type: OnboardingType): void;
|
|
1394
1394
|
previous(type: OnboardingType): void;
|
|
1395
|
+
updateCardPosition(type: OnboardingType, cardIndex: number, position: {
|
|
1396
|
+
top: string;
|
|
1397
|
+
position: string;
|
|
1398
|
+
}): void;
|
|
1395
1399
|
setConfig(type: OnboardingType, config: OnboardingCardConfig[]): void;
|
|
1396
1400
|
onDiscoverNowClicked(): Promise<void>;
|
|
1397
1401
|
onRemindMeLater(): void;
|
|
@@ -71,6 +71,10 @@ const t = () => ({
|
|
|
71
71
|
previous(n) {
|
|
72
72
|
this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
|
|
73
73
|
},
|
|
74
|
+
updateCardPosition(n, i, o) {
|
|
75
|
+
const s = this.onboardings[n].config[i];
|
|
76
|
+
s && (s.top = o.top, s.position = o.position);
|
|
77
|
+
},
|
|
74
78
|
setConfig(n, i) {
|
|
75
79
|
this.onboardings[n].config = i ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
|
|
76
80
|
},
|
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import { productPairs as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
Object.entries(
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
switch (
|
|
1
|
+
import { productPairs as L } from "../extensions/Blocks/Items/enums/productEnums.js";
|
|
2
|
+
function q(w) {
|
|
3
|
+
const y = w.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), T = new DOMParser().parseFromString(y, "text/html"), C = L.PAIRS_FOR_EXTENSION;
|
|
4
|
+
Object.entries(C).forEach(([r, f]) => {
|
|
5
|
+
T.querySelectorAll(".ins-product-td").forEach((o) => {
|
|
6
|
+
const A = o.getAttribute("data-number") || "1", b = o.getAttribute("data-type") || "CART_ITEMS";
|
|
7
|
+
o.querySelectorAll(`[product-attr="${r}"]`).forEach((e) => {
|
|
8
|
+
var k, F, I;
|
|
9
|
+
const $ = e.getAttribute("data-type") || b, d = e.getAttribute("data-number") || A, u = f[$];
|
|
10
|
+
if (u)
|
|
11
|
+
switch (r) {
|
|
12
12
|
case "imageSrc": {
|
|
13
|
-
let t = null,
|
|
14
|
-
if (e.tagName === "IMG" ? (t = e,
|
|
13
|
+
let t = null, i = null;
|
|
14
|
+
if (e.tagName === "IMG" ? (t = e, i = t.closest("a")) : (t = e.querySelector("img"), i = e.querySelector("a") || e.closest("a")), !t)
|
|
15
15
|
break;
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
}) && (t.src = `{{${
|
|
16
|
+
const a = u.DEFAULT, s = u.ATTR;
|
|
17
|
+
if (a && t.src) {
|
|
18
|
+
const c = t.src;
|
|
19
|
+
a.some((h) => {
|
|
20
|
+
const l = h.split("/").pop() || "", g = c.split("/").pop() || "";
|
|
21
|
+
return c.includes(h) || c.includes(l) || g === l;
|
|
22
|
+
}) && (t.src = `{{${s}_${d}}}`);
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const n = (F = (k = C.name) == null ? void 0 : k[$]) == null ? void 0 : F.ATTR;
|
|
25
|
+
if (n && t.setAttribute("alt", `{{${n}_${d}}}`), i) {
|
|
26
|
+
const c = (I = C.itemLink) == null ? void 0 : I[$];
|
|
27
|
+
if (c) {
|
|
28
|
+
const E = c.HREF, h = c.DEFAULT_HREF || "#!", l = i.href;
|
|
29
|
+
(l === "#" || l === "" || l.endsWith("#!") || l.endsWith(h) || l === `${window.location.href}${h}` || !l || l === window.location.href) && (i.href = `{{${E}_${d}}}`);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
33
34
|
case "name": {
|
|
34
|
-
const t =
|
|
35
|
-
e.textContent && (e.textContent = `{{${
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
(
|
|
35
|
+
const t = u, i = t.ATTR, a = t.DEFAULT_HREF || "#!", s = t.HREF;
|
|
36
|
+
e.textContent && (e.textContent = `{{${i}_${d}}}`);
|
|
37
|
+
const n = e.closest("a") || (e.tagName === "A" ? e : null);
|
|
38
|
+
if (n && s) {
|
|
39
|
+
const c = n.href, E = `${window.location.href}${a}`;
|
|
40
|
+
(c === E || c.endsWith(a)) && (n.href = `{{${s}_${d}}}`);
|
|
40
41
|
}
|
|
41
42
|
break;
|
|
42
43
|
}
|
|
43
44
|
case "price":
|
|
44
45
|
case "originalPrice": {
|
|
45
|
-
const t =
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
let
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
|
|
46
|
+
const t = u, i = e.getAttribute("data-formated"), a = e.getAttribute("data-single_price"), s = i === "true", n = a === "true", c = e.getAttribute("data-curency") || "before";
|
|
47
|
+
let E;
|
|
48
|
+
n ? E = s ? t.SINGLE_PRICE_FORMATTED : t.SINGLE_PRICE : E = s ? t.PRICE_FORMATTED : t.PRICE;
|
|
49
|
+
const h = t.CURRENCY;
|
|
50
|
+
let l = `{{${E}_${d}}}`;
|
|
51
|
+
if (h) {
|
|
52
|
+
const g = `{{${h}_${d}}}`;
|
|
53
|
+
l = c === "after" ? `${l} ${g}` : `${g} ${l}`;
|
|
53
54
|
}
|
|
54
|
-
e.textContent =
|
|
55
|
+
e.textContent = l;
|
|
55
56
|
break;
|
|
56
57
|
}
|
|
57
58
|
case "quantity": {
|
|
58
|
-
const t =
|
|
59
|
-
e.textContent && e.textContent.trim() ===
|
|
59
|
+
const t = u, i = t.ATTR, a = t.DEFAULT;
|
|
60
|
+
e.textContent && e.textContent.trim() === a && (e.textContent = `{{${i}_${d}}}`);
|
|
60
61
|
break;
|
|
61
62
|
}
|
|
62
63
|
case "button": {
|
|
63
|
-
const t =
|
|
64
|
-
if (
|
|
65
|
-
const
|
|
66
|
-
(
|
|
64
|
+
const t = u, i = t.HREF, a = t.DEFAULT_HREF || "#!", s = e.tagName === "A" ? e : e.querySelector("a");
|
|
65
|
+
if (s) {
|
|
66
|
+
const n = s.href || "", c = `${window.location.href}${a}`;
|
|
67
|
+
(n === "" || n === "#" || n === c || n.endsWith(a) || n.endsWith("#!") || n === window.location.href) && (s.href = `{{${i}_${d}}}`);
|
|
67
68
|
}
|
|
68
69
|
break;
|
|
69
70
|
}
|
|
70
71
|
case "itemLink": {
|
|
71
|
-
const t =
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
(
|
|
72
|
+
const t = u, i = t.HREF, a = t.DEFAULT_HREF || "#!", s = e;
|
|
73
|
+
if (s.href) {
|
|
74
|
+
const n = s.href, c = `${window.location.href}${a}`;
|
|
75
|
+
(n === c || n.endsWith(a)) && (s.href = `{{${i}_${d}}}`);
|
|
75
76
|
}
|
|
76
77
|
break;
|
|
77
78
|
}
|
|
78
79
|
default: {
|
|
79
|
-
if ("ATTR" in
|
|
80
|
-
const t =
|
|
81
|
-
e.textContent && (e.textContent = `{{${t}_${
|
|
80
|
+
if ("ATTR" in u) {
|
|
81
|
+
const t = u.ATTR;
|
|
82
|
+
e.textContent && (e.textContent = `{{${t}_${d}}}`);
|
|
82
83
|
}
|
|
83
84
|
break;
|
|
84
85
|
}
|
|
@@ -86,55 +87,55 @@ function L(F) {
|
|
|
86
87
|
});
|
|
87
88
|
});
|
|
88
89
|
});
|
|
89
|
-
const S =
|
|
90
|
-
` : "",
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
element:
|
|
95
|
-
outerHtml:
|
|
96
|
-
type:
|
|
97
|
-
number:
|
|
98
|
-
nodup:
|
|
90
|
+
const S = y.match(/<!DOCTYPE[^>]*>/i), M = S ? `${S[0]}
|
|
91
|
+
` : "", P = T.querySelectorAll(".ins-product-td"), H = [];
|
|
92
|
+
P.forEach((r) => {
|
|
93
|
+
const f = r.getAttribute("data-type") || "CART_ITEMS", p = r.getAttribute("data-number") || "1", o = r.getAttribute("data-nodup"), A = r.outerHTML;
|
|
94
|
+
H.push({
|
|
95
|
+
element: r,
|
|
96
|
+
outerHtml: A,
|
|
97
|
+
type: f,
|
|
98
|
+
number: p,
|
|
99
|
+
nodup: o || void 0
|
|
99
100
|
});
|
|
100
101
|
});
|
|
101
|
-
let
|
|
102
|
-
|
|
103
|
-
let
|
|
104
|
-
switch (
|
|
102
|
+
let _ = M + T.documentElement.outerHTML;
|
|
103
|
+
H.reverse().forEach(({ outerHtml: r, type: f, number: p }) => {
|
|
104
|
+
let o = "";
|
|
105
|
+
switch (f) {
|
|
105
106
|
case "CART_ITEMS":
|
|
106
|
-
|
|
107
|
+
o = "ins_apr_total_product_kind";
|
|
107
108
|
break;
|
|
108
109
|
case "BROWSED_ITEMS":
|
|
109
|
-
|
|
110
|
+
o = "browsed_item_total_product_kind";
|
|
110
111
|
break;
|
|
111
112
|
case "PURCHASED_ITEMS":
|
|
112
|
-
|
|
113
|
+
o = "purchased_item_total_product_kind";
|
|
113
114
|
break;
|
|
114
115
|
}
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
|
|
116
|
+
if (o) {
|
|
117
|
+
const b = parseInt(p) - 1, $ = `${`{% if ${o} > ${b} %}`}${r}{% endif %}`;
|
|
118
|
+
_ = _.replace(r, $);
|
|
118
119
|
}
|
|
119
120
|
});
|
|
120
|
-
const
|
|
121
|
-
return
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
121
|
+
const D = T.querySelectorAll('[product-attr="originalPrice"][data-type="CART_ITEMS"]'), R = [];
|
|
122
|
+
return D.forEach((r) => {
|
|
123
|
+
const f = r.getAttribute("data-number"), p = r.getAttribute("data-type");
|
|
124
|
+
if (!f || p !== "CART_ITEMS")
|
|
124
125
|
return;
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
|
|
126
|
+
const o = r.closest(".product-original-price-class");
|
|
127
|
+
if (o) {
|
|
128
|
+
const A = o.outerHTML;
|
|
129
|
+
R.some((m) => m.tdOuterHtml === A) || R.push({ tdOuterHtml: A, number: f });
|
|
129
130
|
}
|
|
130
|
-
}),
|
|
131
|
-
const
|
|
132
|
-
if (!
|
|
133
|
-
const
|
|
134
|
-
|
|
131
|
+
}), R.reverse().forEach(({ tdOuterHtml: r, number: f }) => {
|
|
132
|
+
const p = `{% if ins_apr_price_${f} != ins_apr_originalprice_${f} %}`;
|
|
133
|
+
if (!_.includes(p) && !r.includes("{% if")) {
|
|
134
|
+
const A = `${p}${r}{% endif %}`;
|
|
135
|
+
_ = _.replace(r, A);
|
|
135
136
|
}
|
|
136
|
-
}),
|
|
137
|
+
}), _.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
137
138
|
}
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
q as pairProductVariables
|
|
140
141
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.2.0-beta.
|
|
3
|
+
"version": "3.2.0-beta.d3d7a5a",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"author": "",
|
|
33
33
|
"license": "ISC",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@stripoinc/ui-editor-extensions": "3.
|
|
35
|
+
"@stripoinc/ui-editor-extensions": "3.8.0",
|
|
36
36
|
"@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
|
|
37
37
|
"@vueuse/core": "11.3.0",
|
|
38
38
|
"lodash-es": "4.17.21",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"guido": {
|
|
88
88
|
"stripo": {
|
|
89
|
-
"version": "2.
|
|
89
|
+
"version": "2.62.0"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
const e = [
|
|
2
|
-
{
|
|
3
|
-
category: "Demographics",
|
|
4
|
-
conditions: [
|
|
5
|
-
{
|
|
6
|
-
id: 1,
|
|
7
|
-
name: "Language",
|
|
8
|
-
description: "Users who are in the English will see the banner",
|
|
9
|
-
beforeScript: '{% if language == "en_US" %}',
|
|
10
|
-
afterScript: "{% endif %}"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
id: 2,
|
|
14
|
-
name: "Country",
|
|
15
|
-
description: "Only people who live in Australia will see the banner",
|
|
16
|
-
beforeScript: '{% if country == "Australia" %}',
|
|
17
|
-
afterScript: "{% endif %}"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: 3,
|
|
21
|
-
name: "Country & City",
|
|
22
|
-
description: "Only people who are located in that country and city",
|
|
23
|
-
beforeScript: '{% if country == "United Kingdom" and city == "London" %}',
|
|
24
|
-
afterScript: "{% endif %}"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 4,
|
|
28
|
-
name: "Age (Less than operator)",
|
|
29
|
-
description: "Users whose age is less than 18",
|
|
30
|
-
beforeScript: "{% if age < 18 %}",
|
|
31
|
-
afterScript: "{% endif %}"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 5,
|
|
35
|
-
name: "Age (Equal and greater than operator)",
|
|
36
|
-
description: "Users whose age is equal or greater than 25",
|
|
37
|
-
beforeScript: "{% if age >= 25 %}",
|
|
38
|
-
afterScript: "{% endif %}"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 6,
|
|
42
|
-
name: "Age (Greater than & less than operators)",
|
|
43
|
-
description: "Users whose age is between 18 and 25",
|
|
44
|
-
beforeScript: "{% if age > 18 and age < 25 %}",
|
|
45
|
-
afterScript: "{% endif %}"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 7,
|
|
49
|
-
name: "Gender",
|
|
50
|
-
description: "Users whose gender is Female",
|
|
51
|
-
beforeScript: '{% if gender == "Female" %}',
|
|
52
|
-
afterScript: "{% endif %}"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: 8,
|
|
56
|
-
name: "State",
|
|
57
|
-
description: "Users whose state is one of the followings. c_state is a custom attribute. Use this condition if you have the attribute with the same naming. ",
|
|
58
|
-
beforeScript: '{% if c_state == "VIC" or c_state == "NSW" or c_state == "QLD" %}',
|
|
59
|
-
afterScript: "{% endif %}"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 9,
|
|
63
|
-
name: "VIP User",
|
|
64
|
-
description: "Users who are VIP users for that brand. c_is_vip_user = true. c_is_vip_user is a custom attribute. Use this condition if you have the attribute with the same naming.",
|
|
65
|
-
beforeScript: "{% if c_is_vip_user %}",
|
|
66
|
-
afterScript: "{% endif %}"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: 10,
|
|
70
|
-
name: "Membership Type",
|
|
71
|
-
description: "Users who belong to gold or silver membership type. c_is_gold_member = true, c_is_silver_member = true. These are custom attributes. Use this condition if you have the attribute with the same naming.",
|
|
72
|
-
beforeScript: "{% if c_is_gold_member or c_is_silver_member %}",
|
|
73
|
-
afterScript: "{% endif %}"
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
];
|
|
78
|
-
export {
|
|
79
|
-
e as displayConditions
|
|
80
|
-
};
|