@useinsider/guido 3.2.0-beta.565bfaf → 3.2.0-beta.b397787
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/composables/useFullStoryBridge.js +17 -0
- package/dist/composables/useRecommendation.js +2 -2
- package/dist/composables/useStripo.js +34 -33
- package/dist/enums/displayConditions.js +78 -82
- package/dist/enums/extensions/recommendationBlock.js +41 -95
- package/dist/enums/unsubscribe.js +16 -17
- 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 +3 -3
- package/dist/src/composables/useFullStoryBridge.d.ts +10 -0
- package/dist/src/enums/displayConditions.d.ts +1 -5
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
- package/dist/src/enums/unsubscribe.d.ts +3 -8
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const o = (s, t) => {
|
|
2
|
+
const n = window[s];
|
|
3
|
+
return typeof n == "string" ? n : t;
|
|
4
|
+
}, f = () => ({ injectFullStory: () => {
|
|
5
|
+
var i;
|
|
6
|
+
const t = o("_fs_org", "");
|
|
7
|
+
if (!t)
|
|
8
|
+
return;
|
|
9
|
+
const e = document.querySelector("ui-editor"), n = (i = e == null ? void 0 : e.shadowRoot) == null ? void 0 : i.querySelector("iframe");
|
|
10
|
+
if (!(n != null && n.contentDocument))
|
|
11
|
+
return;
|
|
12
|
+
const r = o("_fs_host", "fullstory.com"), g = o("_fs_script", "edge.fullstory.com/s/fs.js"), u = o("_fs_namespace", "FS"), c = n.contentDocument.createElement("script");
|
|
13
|
+
c.textContent = `window['_fs_run_in_iframe']=true;window['_fs_host']='${r}';window['_fs_script']='${g}';window['_fs_org']='${t}';window['_fs_namespace']='${u}';(function(m,n,e,t,l,o,g,y){if(e in m){if(m.console&&m.console.log){m.console.log('FullStory namespace conflict.');}return;}g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};g.anonymize=function(){g.identify(!!0)};g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};g.log=function(a,b){g("log",[a,b])};g.consent=function(a){g("consent",!arguments.length||a)};g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};g.clearUserCookie=function(){};g.setVars=function(n,p){g('setVars',[n,p])};g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];if(m[y])m[y]=function(){return g._api(y,arguments)};g._v="1.3.0";})(window,document,window['_fs_namespace'],'script','user');`, n.contentDocument.head.appendChild(c);
|
|
14
|
+
} });
|
|
15
|
+
export {
|
|
16
|
+
f as useFullStoryBridge
|
|
17
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RecommendationFeedSourceMaps as g, URLS as p } from "../enums/extensions/recommendationBlock.js";
|
|
2
2
|
import { MinDeviceViewport as R, DefaultPadding as b } from "../enums/recommendation.js";
|
|
3
3
|
import { useRecommendationExtensionStore as u } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
4
|
import { generateCompleteFilterQuery as x } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
|
|
@@ -47,7 +47,7 @@ const N = () => ({
|
|
|
47
47
|
const n = u(), o = I(), a = Number(i), r = n.blockStates[a];
|
|
48
48
|
if (!r)
|
|
49
49
|
return "";
|
|
50
|
-
const { recommendationConfigs: e } = r, l = ((m = g
|
|
50
|
+
const { recommendationConfigs: e } = r, l = ((m = g.find((s) => s.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
|
|
51
51
|
t.set("locale", e.language), t.set("currency", e.currencySettings.value), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
|
|
52
52
|
const f = e.filters.filter((s) => s.isValid), c = x(f);
|
|
53
53
|
c && t.set("filter", c), e.shuffleProducts && t.set("shuffle", "true");
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
1
|
+
import { useActionsApi as D } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as I } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as P } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as U } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as R } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useStripoEventHandler as q } from "./useStripoEventHandler.js";
|
|
7
|
+
import { useToaster as x } from "./useToaster.js";
|
|
8
|
+
import { localePatch as H } from "../config/i18n/index.js";
|
|
9
|
+
import { displayConditions as O } from "../enums/displayConditions.js";
|
|
10
|
+
import { useStripoApi as j } from "../services/stripoApi.js";
|
|
11
|
+
import L from "../static/styles/customEditorStyle.css.js";
|
|
11
12
|
import { useEditorStore as C } from "../stores/editor.js";
|
|
12
|
-
import { dynamicContentToMergeTags as
|
|
13
|
-
import
|
|
14
|
-
const
|
|
15
|
-
const { features:
|
|
16
|
-
var
|
|
17
|
-
const e = C(), { html: p, css: a } = i, { baseBlocks: o, extensions: d } = await
|
|
13
|
+
import { dynamicContentToMergeTags as $ } from "../utils/genericUtil.js";
|
|
14
|
+
import z from "../package.json.js";
|
|
15
|
+
const se = (E, l) => {
|
|
16
|
+
const { features: c, template: h, isFeatureEnabled: u } = P(), { handleError: m } = x(), { getToken: b, getCustomFonts: w, getSyncModulesStatus: k } = j(), { handleEvent: B } = q(), { getStripoBlocksConfig: T } = I(), V = async (i, n = [], r = !1) => {
|
|
17
|
+
var g, y, S;
|
|
18
|
+
const e = C(), { html: p, css: a } = i, { baseBlocks: o, extensions: d } = await T(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, F = ((y = c.value) == null ? void 0 : y.modulesDisabled) ?? !1, v = ((S = h.value) == null ? void 0 : S.forceRecreate) ?? !1;
|
|
18
19
|
window.UIEditor.initEditor(
|
|
19
20
|
document.querySelector("#guido-editor"),
|
|
20
21
|
{
|
|
21
22
|
metadata: E,
|
|
22
23
|
html: p,
|
|
23
24
|
css: a,
|
|
24
|
-
forceRecreate:
|
|
25
|
+
forceRecreate: v,
|
|
25
26
|
locale: "en",
|
|
26
27
|
undoButtonSelector: "#guido__undo-button",
|
|
27
28
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -31,12 +32,12 @@ const ie = (E, c) => {
|
|
|
31
32
|
customAppearanceMergetags: !u("liquidSyntax"),
|
|
32
33
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
33
34
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
34
|
-
customViewStyles:
|
|
35
|
-
conditionsEnabled:
|
|
36
|
-
customConditionsEnabled:
|
|
37
|
-
conditionCategories:
|
|
35
|
+
customViewStyles: L,
|
|
36
|
+
conditionsEnabled: f,
|
|
37
|
+
customConditionsEnabled: f,
|
|
38
|
+
conditionCategories: O,
|
|
38
39
|
enableXSSSecurity: !0,
|
|
39
|
-
modulesDisabled:
|
|
40
|
+
modulesDisabled: F,
|
|
40
41
|
syncModulesEnabled: r,
|
|
41
42
|
messageSettingsEnabled: !0,
|
|
42
43
|
displayGmailAnnotations: !0,
|
|
@@ -52,8 +53,8 @@ const ie = (E, c) => {
|
|
|
52
53
|
},
|
|
53
54
|
mergeTags: [
|
|
54
55
|
{
|
|
55
|
-
entries:
|
|
56
|
-
|
|
56
|
+
entries: $(
|
|
57
|
+
l.preselectedDynamicContentList,
|
|
57
58
|
u("liquidSyntax")
|
|
58
59
|
)
|
|
59
60
|
}
|
|
@@ -68,8 +69,8 @@ const ie = (E, c) => {
|
|
|
68
69
|
},
|
|
69
70
|
onTemplateLoaded() {
|
|
70
71
|
try {
|
|
71
|
-
const { importCss: t } =
|
|
72
|
-
t(), s(), A(),
|
|
72
|
+
const { importCss: t } = U(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: M } = D(), { injectFullStory: A } = R();
|
|
73
|
+
t(), s(), A(), M(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
73
74
|
e.hasChanges = !1;
|
|
74
75
|
}, 1e3);
|
|
75
76
|
} catch (t) {
|
|
@@ -88,23 +89,23 @@ const ie = (E, c) => {
|
|
|
88
89
|
onDataChanged() {
|
|
89
90
|
e.hasChanges = !0;
|
|
90
91
|
},
|
|
91
|
-
onEvent:
|
|
92
|
+
onEvent: B,
|
|
92
93
|
ignoreClickOutsideSelectors: [
|
|
93
94
|
"#guido-dynamic-content-modal",
|
|
94
95
|
".in-on-board-wrapper",
|
|
95
96
|
".in-drawer__container"
|
|
96
97
|
],
|
|
97
98
|
extensions: d,
|
|
98
|
-
localePatch:
|
|
99
|
+
localePatch: H
|
|
99
100
|
}
|
|
100
101
|
);
|
|
101
|
-
},
|
|
102
|
+
}, _ = (i) => new Promise((n, r) => {
|
|
102
103
|
var d;
|
|
103
104
|
if (document.getElementById("UiEditorScript")) {
|
|
104
105
|
i(), n();
|
|
105
106
|
return;
|
|
106
107
|
}
|
|
107
|
-
const e =
|
|
108
|
+
const e = z.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
|
|
108
109
|
o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
|
|
109
110
|
i(), n();
|
|
110
111
|
}, o.onerror = () => {
|
|
@@ -112,15 +113,15 @@ const ie = (E, c) => {
|
|
|
112
113
|
}, document.body.appendChild(o);
|
|
113
114
|
});
|
|
114
115
|
return { initPlugin: async (i) => {
|
|
115
|
-
await
|
|
116
|
+
await _(async () => {
|
|
116
117
|
const n = C(), [r, e] = await Promise.all([
|
|
117
118
|
w(),
|
|
118
119
|
k()
|
|
119
120
|
]);
|
|
120
|
-
n.syncModulesEnabled = e, await
|
|
121
|
+
n.syncModulesEnabled = e, await V(i, r, e);
|
|
121
122
|
});
|
|
122
123
|
} };
|
|
123
124
|
};
|
|
124
125
|
export {
|
|
125
|
-
|
|
126
|
+
se as useStripo
|
|
126
127
|
};
|
|
@@ -1,84 +1,80 @@
|
|
|
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
|
-
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
];
|
|
81
|
-
};
|
|
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
|
+
];
|
|
82
78
|
export {
|
|
83
|
-
|
|
79
|
+
e as displayConditions
|
|
84
80
|
};
|
|
@@ -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
|
};
|
|
@@ -8,22 +8,22 @@ const _ = {
|
|
|
8
8
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
9
9
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
10
10
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
11
|
-
}, n = R(),
|
|
11
|
+
}, n = R(), r = {
|
|
12
12
|
UNSUBSCRIBE_URL: `https://mail.${n}.com/user/v1/unsub`,
|
|
13
13
|
PREFERENCES_URL: `https://mail.${n}.com/user/v1/prefs`
|
|
14
|
-
},
|
|
15
|
-
name:
|
|
16
|
-
sendGridId:
|
|
17
|
-
}
|
|
14
|
+
}, B = "iid", i = {
|
|
15
|
+
name: "Global Unsubscribe",
|
|
16
|
+
sendGridId: "G"
|
|
17
|
+
}, C = "/email/unsubscribe-pages", E = {
|
|
18
18
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
19
19
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
20
20
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
21
21
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
22
22
|
RESUBSCRIBE: 5
|
|
23
|
-
},
|
|
23
|
+
}, U = {
|
|
24
24
|
[E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
|
|
25
25
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
|
|
26
|
-
},
|
|
26
|
+
}, t = {
|
|
27
27
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
28
28
|
E.GLOBAL_UNSUBSCRIBE,
|
|
29
29
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -33,7 +33,7 @@ const _ = {
|
|
|
33
33
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
34
34
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
35
35
|
]
|
|
36
|
-
},
|
|
36
|
+
}, c = () => {
|
|
37
37
|
const s = e();
|
|
38
38
|
return {
|
|
39
39
|
[E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
|
|
@@ -42,22 +42,21 @@ const _ = {
|
|
|
42
42
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
|
|
43
43
|
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
44
44
|
};
|
|
45
|
-
},
|
|
45
|
+
}, o = {
|
|
46
46
|
default: "{{ins-unsubscribe-link}}",
|
|
47
47
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
48
48
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
i as DEFAULT_UNSUBSCRIBE_GROUP,
|
|
52
|
+
B as INSIDER_ID,
|
|
53
53
|
I as LINK_REGEXES,
|
|
54
54
|
_ as LINK_TYPES,
|
|
55
|
-
|
|
55
|
+
o as MERGE_TAGS,
|
|
56
56
|
E as PAGE_TYPES,
|
|
57
|
-
|
|
57
|
+
t as TYPE_COLLECTIONS,
|
|
58
58
|
C as UNSUBSCRIBE_PAGES_LINK,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
o as getTypeTranslations
|
|
59
|
+
U as UNSUBSCRIBE_SYNC_MODULE_TYPES,
|
|
60
|
+
r as URLS,
|
|
61
|
+
c as getTypeTranslations
|
|
63
62
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (
|
|
4
|
-
import { useHttp as
|
|
5
|
-
import {
|
|
6
|
-
import { Control as
|
|
7
|
-
const
|
|
8
|
-
class
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var l = (r, n, e) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
|
|
3
|
+
var o = (r, n, e) => l(r, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { useHttp as L } from "../../../composables/useHttp.js";
|
|
5
|
+
import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
|
|
6
|
+
import { Control as h, UIElementType as i, UEAttr as t, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
+
const m = "ui-elements-checkbox", u = "select", { get: C } = L();
|
|
8
|
+
class S extends h {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
o(this, "currentNode");
|
|
@@ -13,13 +13,13 @@ class I extends p {
|
|
|
13
13
|
o(this, "unsubList", []);
|
|
14
14
|
}
|
|
15
15
|
getId() {
|
|
16
|
-
return
|
|
16
|
+
return m;
|
|
17
17
|
}
|
|
18
18
|
_setFormValues() {
|
|
19
19
|
if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
|
|
20
20
|
const e = this.currentNode.getAttribute("id");
|
|
21
21
|
if (e) {
|
|
22
|
-
const s = e ===
|
|
22
|
+
const s = e === c.sendGridId ? e : Number(e);
|
|
23
23
|
s && (this.selectedUnsubGroup = s);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -29,18 +29,18 @@ class I extends p {
|
|
|
29
29
|
}
|
|
30
30
|
_getLabel(e, s = `${Math.random()}`) {
|
|
31
31
|
return `
|
|
32
|
-
<${
|
|
32
|
+
<${i.LABEL}
|
|
33
33
|
${t.LABEL.text}="${e}"
|
|
34
34
|
${t.LABEL.name}="${s}">
|
|
35
|
-
</${
|
|
35
|
+
</${i.LABEL}>
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
_getSelectItem(e, s) {
|
|
39
39
|
return `
|
|
40
|
-
<${
|
|
40
|
+
<${i.SELECT_ITEM}
|
|
41
41
|
${t.SELECT_ITEM.text}="${e}"
|
|
42
42
|
${t.SELECT_ITEM.value}="${s}">
|
|
43
|
-
</${
|
|
43
|
+
</${i.SELECT_ITEM}>`;
|
|
44
44
|
}
|
|
45
45
|
_getSelect() {
|
|
46
46
|
return this.unsubList.map((e) => this._getSelectItem(e.name, e.sendGridId)).join("");
|
|
@@ -49,22 +49,22 @@ class I extends p {
|
|
|
49
49
|
return `
|
|
50
50
|
<div class="checkbox-controls-container">
|
|
51
51
|
<div class="checkbox-select-container container two-columns stretch">
|
|
52
|
-
<${
|
|
52
|
+
<${i.LABEL}
|
|
53
53
|
${t.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
|
|
54
54
|
${t.LABEL.name}="${Math.random()}">
|
|
55
|
-
</${
|
|
55
|
+
</${i.LABEL}>
|
|
56
56
|
|
|
57
|
-
<${
|
|
57
|
+
<${i.SELECTPICKER}
|
|
58
58
|
${t.SELECTPICKER.name}="${u}"
|
|
59
59
|
${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
60
60
|
${this._getSelect()}
|
|
61
|
-
</${
|
|
61
|
+
</${i.SELECTPICKER}>
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
64
|
`;
|
|
65
65
|
}
|
|
66
66
|
_onSelectChange(e) {
|
|
67
|
-
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new
|
|
67
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new p(`Updated text to ${e}`));
|
|
68
68
|
}
|
|
69
69
|
_listenToFormUpdates() {
|
|
70
70
|
this.api.onValueChanged(u, (e) => this._onSelectChange(e));
|
|
@@ -76,18 +76,18 @@ class I extends p {
|
|
|
76
76
|
async onRender() {
|
|
77
77
|
const e = await C(
|
|
78
78
|
"/unsubscribe-groups/unsubscribe-list"
|
|
79
|
-
), s = [
|
|
79
|
+
), s = [c, ...e.data], E = s.map((a) => ({
|
|
80
80
|
[t.SELECT_ITEM.text]: a.name,
|
|
81
81
|
[t.SELECT_ITEM.value]: a.sendGridId
|
|
82
82
|
}));
|
|
83
83
|
this.unsubList = s, this.api.setUIEAttribute(
|
|
84
84
|
u,
|
|
85
85
|
t.SELECTPICKER.items,
|
|
86
|
-
|
|
86
|
+
E
|
|
87
87
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
m as CHECKBOX_CONTROL_BLOCK_ID,
|
|
92
|
+
S as CheckboxControl
|
|
93
93
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (r, n, t) =>
|
|
4
|
-
import { useHttp as
|
|
5
|
-
import {
|
|
6
|
-
import { Control as
|
|
7
|
-
const
|
|
8
|
-
class
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var l = (r, n, t) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
|
|
3
|
+
var o = (r, n, t) => l(r, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { useHttp as L } from "../../../composables/useHttp.js";
|
|
5
|
+
import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
|
|
6
|
+
import { Control as p, UIElementType as i, UEAttr as e, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
+
const m = "ui-elements-radio-button", u = "select", { get: $ } = L();
|
|
8
|
+
class S extends p {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
o(this, "currentNode");
|
|
@@ -13,13 +13,13 @@ class I extends h {
|
|
|
13
13
|
o(this, "unsubList", []);
|
|
14
14
|
}
|
|
15
15
|
getId() {
|
|
16
|
-
return
|
|
16
|
+
return m;
|
|
17
17
|
}
|
|
18
18
|
_setFormValues() {
|
|
19
19
|
if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
|
|
20
20
|
const t = this.currentNode.getAttribute("id");
|
|
21
21
|
if (t) {
|
|
22
|
-
const s = t ===
|
|
22
|
+
const s = t === c.sendGridId ? t : Number(t);
|
|
23
23
|
s && (this.selectedUnsubGroup = s);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -64,7 +64,7 @@ class I extends h {
|
|
|
64
64
|
`;
|
|
65
65
|
}
|
|
66
66
|
_onSelectChange(t) {
|
|
67
|
-
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new
|
|
67
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new h(`Updated text to ${t}`));
|
|
68
68
|
}
|
|
69
69
|
_listenToFormUpdates() {
|
|
70
70
|
this.api.onValueChanged(u, (t) => this._onSelectChange(t));
|
|
@@ -76,18 +76,18 @@ class I extends h {
|
|
|
76
76
|
async onRender() {
|
|
77
77
|
const t = await $(
|
|
78
78
|
"/unsubscribe-groups/unsubscribe-list"
|
|
79
|
-
), s = [
|
|
79
|
+
), s = [c, ...t.data], E = s.map((a) => ({
|
|
80
80
|
[e.SELECT_ITEM.text]: a.name,
|
|
81
81
|
[e.SELECT_ITEM.value]: a.sendGridId
|
|
82
82
|
}));
|
|
83
83
|
this.unsubList = s, this.api.setUIEAttribute(
|
|
84
84
|
u,
|
|
85
85
|
e.SELECTPICKER.items,
|
|
86
|
-
|
|
86
|
+
E
|
|
87
87
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
m as CONTROL_BLOCK_ID,
|
|
92
|
+
S as RadioButtonControl
|
|
93
93
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as k } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
2
|
import { useRecommendationApi as y } from "../../../../services/recommendationApi.js";
|
|
3
3
|
import { useConfigStore as C } from "../../../../stores/config.js";
|
|
4
4
|
import { defineStore as G } from "pinia";
|
|
@@ -115,7 +115,7 @@ const v = () => ({
|
|
|
115
115
|
getActivePredictiveAlgorithms: (t) => {
|
|
116
116
|
const r = [];
|
|
117
117
|
return t.activePredictiveAlgorithms.filter((e) => !w.includes(e)).forEach((e) => {
|
|
118
|
-
r.push(...g
|
|
118
|
+
r.push(...g.filter((n) => n.id === e));
|
|
119
119
|
}), r.map((e) => ({
|
|
120
120
|
text: e.name,
|
|
121
121
|
value: e.key
|
|
@@ -375,7 +375,7 @@ const v = () => ({
|
|
|
375
375
|
},
|
|
376
376
|
async _doFetchProducts() {
|
|
377
377
|
var p;
|
|
378
|
-
const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c = b(n), i = ((p = g
|
|
378
|
+
const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c = b(n), i = ((p = g.find((a) => a.key === e.strategy)) == null ? void 0 : p.path) || "", o = C(), s = {
|
|
379
379
|
locale: e.language,
|
|
380
380
|
currency: e.currencySettings.value,
|
|
381
381
|
partnerName: o.partnerName,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridges FullStory from the parent window into the Stripo editor iframe.
|
|
3
|
+
*
|
|
4
|
+
* If FullStory is detected on the parent window (window._fs_org exists),
|
|
5
|
+
* injects the FullStory recording snippet into the editor's iframe
|
|
6
|
+
* with _fs_run_in_iframe = true so it reports to the parent session.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useFullStoryBridge: () => {
|
|
9
|
+
injectFullStory: () => void;
|
|
10
|
+
};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import type { ConditionCategories } from '@@/Types/condition-categories';
|
|
2
|
-
|
|
3
|
-
* Get display conditions lazily so translations resolve at access time.
|
|
4
|
-
* Must be called within a Vue component context or after Pinia is initialized.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getDisplayConditions: () => ConditionCategories;
|
|
2
|
+
export declare const displayConditions: ConditionCategories;
|
|
@@ -6,11 +6,7 @@ export declare const URLS: {
|
|
|
6
6
|
export declare const QUERY_PARAMS: {
|
|
7
7
|
CLIENT_ID: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
* Get recommendation feed source maps lazily so translated names resolve at access time.
|
|
11
|
-
* Must be called within a Vue component context or after Pinia is initialized.
|
|
12
|
-
*/
|
|
13
|
-
export declare const getRecommendationFeedSourceMaps: () => RecommendationFeedItem[];
|
|
9
|
+
export declare const RecommendationFeedSourceMaps: RecommendationFeedItem[];
|
|
14
10
|
export declare const PriceAttributes: string[];
|
|
15
11
|
export declare const currencyLocationMaps: TextValueObject[];
|
|
16
12
|
export declare const currencyOperators: TextValueObject[];
|
|
@@ -13,14 +13,9 @@ export declare const URLS: {
|
|
|
13
13
|
PREFERENCES_URL: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const INSIDER_ID = "iid";
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* Must be called within a Vue component context or after Pinia is initialized.
|
|
20
|
-
*/
|
|
21
|
-
export declare const getDefaultUnsubscribeGroup: () => {
|
|
22
|
-
name: string;
|
|
23
|
-
sendGridId: string;
|
|
16
|
+
export declare const DEFAULT_UNSUBSCRIBE_GROUP: {
|
|
17
|
+
readonly name: "Global Unsubscribe";
|
|
18
|
+
readonly sendGridId: "G";
|
|
24
19
|
};
|
|
25
20
|
export declare const UNSUBSCRIBE_PAGES_LINK = "/email/unsubscribe-pages";
|
|
26
21
|
export declare const PAGE_TYPES: {
|
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.b397787",
|
|
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",
|