@useinsider/guido 3.22.0-beta.0951deb → 3.22.0-beta.91802bb
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/README.md +35 -5
- package/dist/@types/config/schemas.js +39 -41
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +107 -99
- package/dist/composables/useBlocksConfig.js +24 -32
- package/dist/composables/useEditorOpenMetrics.js +167 -0
- package/dist/composables/useStripo.js +93 -82
- package/dist/enums/academy.js +0 -1
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -10
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
- package/dist/node_modules/valibot/dist/index.js +261 -297
- package/dist/package.json.js +6 -4
- package/dist/public/prefetchRuntime.js +4 -0
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useEditorOpenMetrics.d.ts +27 -0
- package/dist/src/composables/useStripo.d.ts +2 -1
- package/dist/src/enums/academy.d.ts +0 -1
- package/dist/src/library.d.ts +1 -0
- package/dist/src/public/prefetchRuntime.d.ts +1 -0
- package/dist/src/stores/config.d.ts +0 -166
- package/dist/src/utils/runtimePrefetch.d.ts +4 -0
- package/dist/src/utils/stripoRuntime.d.ts +3 -0
- package/dist/static/stripo-runtime-manifest.json.js +9 -0
- package/dist/stores/config.js +6 -13
- package/dist/utils/pairProductVariables.js +29 -30
- package/dist/utils/runtimePrefetch.js +26 -0
- package/dist/utils/stripoRuntime.js +13 -0
- package/package.json +6 -1
- package/dist/@types/display-condition.js +0 -25
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
- package/dist/composables/useDisplayConditions.js +0 -102
- package/dist/enums/display-condition.js +0 -12
- package/dist/extensions/DisplayConditions/bridge.js +0 -17
- package/dist/extensions/DisplayConditions/constants.js +0 -17
- package/dist/extensions/DisplayConditions/control.js +0 -178
- package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
- package/dist/extensions/DisplayConditions/extension.js +0 -28
- package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
- package/dist/extensions/DisplayConditions/library.js +0 -27
- package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
- package/dist/services/displayConditionApi.js +0 -39
- package/dist/src/@types/display-condition.d.ts +0 -59
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
- package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
- package/dist/src/composables/useDisplayConditions.d.ts +0 -16
- package/dist/src/enums/display-condition.d.ts +0 -15
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
- package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
- package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
- package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
- package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
- package/dist/src/mock/api/display-conditions.d.ts +0 -2
- package/dist/src/services/displayConditionApi.d.ts +0 -8
- package/dist/src/stores/display-condition.d.ts +0 -81
- package/dist/src/utils/displayCondition.d.ts +0 -10
- package/dist/src/utils/protectTableText.d.ts +0 -2
- package/dist/stores/display-condition.js +0 -28
- package/dist/utils/displayCondition.js +0 -26
- package/dist/utils/protectTableText.js +0 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useConfigStore as
|
|
3
|
-
const
|
|
1
|
+
import r from "../extensions/ModulesTabIcons/extension.js";
|
|
2
|
+
import { useConfigStore as l } from "../stores/config.js";
|
|
3
|
+
const a = {
|
|
4
4
|
"amp-accordion": "ampAccordionEnabled",
|
|
5
5
|
"amp-carousel": "ampCarouselEnabled",
|
|
6
6
|
"amp-form-controls": "ampFormControlsEnabled",
|
|
@@ -14,7 +14,7 @@ const s = {
|
|
|
14
14
|
"text-block": "textEnabled",
|
|
15
15
|
"timer-block": "timerEnabled",
|
|
16
16
|
"video-block": "videoEnabled"
|
|
17
|
-
},
|
|
17
|
+
}, s = {
|
|
18
18
|
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
19
19
|
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
20
20
|
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
@@ -22,48 +22,40 @@ const s = {
|
|
|
22
22
|
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
23
23
|
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
24
24
|
"items-block": () => import("../extensions/Blocks/Items/extension.js")
|
|
25
|
-
},
|
|
26
|
-
if (!
|
|
25
|
+
}, i = (n) => {
|
|
26
|
+
if (!n || !n.length)
|
|
27
27
|
return {};
|
|
28
28
|
const t = {};
|
|
29
|
-
return
|
|
30
|
-
const e =
|
|
29
|
+
return n.forEach((o) => {
|
|
30
|
+
const e = a[o];
|
|
31
31
|
e && (t[e] = !1);
|
|
32
32
|
}), t;
|
|
33
|
-
}, m = async (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return n;
|
|
42
|
-
const e = await Promise.all(
|
|
43
|
-
o.map(async (r) => {
|
|
44
|
-
const a = i[r];
|
|
45
|
-
return a ? (await a()).default : null;
|
|
33
|
+
}, b = () => [r], m = async (n) => {
|
|
34
|
+
const t = b();
|
|
35
|
+
if (!n || !n.length)
|
|
36
|
+
return t;
|
|
37
|
+
const o = await Promise.all(
|
|
38
|
+
n.map(async (e) => {
|
|
39
|
+
const c = s[e];
|
|
40
|
+
return c ? (await c()).default : null;
|
|
46
41
|
})
|
|
47
42
|
);
|
|
48
43
|
return [
|
|
49
|
-
...
|
|
50
|
-
...
|
|
44
|
+
...t,
|
|
45
|
+
...o.filter((e) => e !== null)
|
|
51
46
|
];
|
|
52
|
-
},
|
|
53
|
-
const
|
|
47
|
+
}, E = () => {
|
|
48
|
+
const n = l();
|
|
54
49
|
return {
|
|
55
50
|
getStripoBlocksConfig: async () => {
|
|
56
|
-
const
|
|
51
|
+
const o = n.blocks;
|
|
57
52
|
return {
|
|
58
|
-
baseBlocks:
|
|
59
|
-
extensions: await
|
|
60
|
-
n == null ? void 0 : n.includeCustoms,
|
|
61
|
-
o.externalDisplayConditions
|
|
62
|
-
)
|
|
53
|
+
baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
|
|
54
|
+
extensions: await m(o == null ? void 0 : o.includeCustoms)
|
|
63
55
|
};
|
|
64
56
|
}
|
|
65
57
|
};
|
|
66
58
|
};
|
|
67
59
|
export {
|
|
68
|
-
|
|
60
|
+
E as useBlocksConfig
|
|
69
61
|
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { SYNC_MODULE_CLASS as w } from "./useSyncModuleExtractor.js";
|
|
2
|
+
import { readRuntimePrefetchState as S } from "../utils/runtimePrefetch.js";
|
|
3
|
+
import { getStripoVersion as R } from "../utils/stripoRuntime.js";
|
|
4
|
+
import M from "../package.json.js";
|
|
5
|
+
const A = [
|
|
6
|
+
"setup",
|
|
7
|
+
"host_ready",
|
|
8
|
+
"migration_start",
|
|
9
|
+
"migration_end",
|
|
10
|
+
"default_template_start",
|
|
11
|
+
"default_template_end",
|
|
12
|
+
"timer_clone_start",
|
|
13
|
+
"timer_clone_end",
|
|
14
|
+
"plugin_start",
|
|
15
|
+
"script_ready",
|
|
16
|
+
"fonts_sync_ready",
|
|
17
|
+
"blocks_config_ready",
|
|
18
|
+
"init_editor",
|
|
19
|
+
"token_start",
|
|
20
|
+
"token_end",
|
|
21
|
+
"ready"
|
|
22
|
+
], m = "guido:open:", h = "total", p = [
|
|
23
|
+
["host_wait", "setup", "host_ready"],
|
|
24
|
+
["migration", "migration_start", "migration_end"],
|
|
25
|
+
["default_template", "default_template_start", "default_template_end"],
|
|
26
|
+
["timer_clone", "timer_clone_start", "timer_clone_end"],
|
|
27
|
+
["script", "plugin_start", "script_ready"],
|
|
28
|
+
["fonts_sync", "script_ready", "fonts_sync_ready"],
|
|
29
|
+
["blocks_config", "fonts_sync_ready", "blocks_config_ready"],
|
|
30
|
+
["editor_config", "blocks_config_ready", "init_editor"],
|
|
31
|
+
["stripo_load", "init_editor", "ready"],
|
|
32
|
+
["token", "token_start", "token_end"]
|
|
33
|
+
], b = (e) => new RegExp(`(?:^|[\\s"'])(?:${e})(?=[\\s"'])`, "g"), N = /<img\b/gi, $ = b(w), L = /\srecommendation-id=/g, C = b("items-block-v2|esd-(?:cart|browsed|purchased)-items-block"), I = "esd-timer-id", f = {
|
|
34
|
+
html_bytes: null,
|
|
35
|
+
css_bytes: null,
|
|
36
|
+
image_count: null,
|
|
37
|
+
synced_module_count: null,
|
|
38
|
+
recommendation_block_count: null,
|
|
39
|
+
items_block_count: null,
|
|
40
|
+
has_timers: null,
|
|
41
|
+
force_recreate: null
|
|
42
|
+
};
|
|
43
|
+
let l = null;
|
|
44
|
+
const i = (e) => {
|
|
45
|
+
try {
|
|
46
|
+
e();
|
|
47
|
+
} catch (t) {
|
|
48
|
+
console.debug("guido:open: metrics step failed", t);
|
|
49
|
+
}
|
|
50
|
+
}, k = () => window.DD_RUM, g = (e, t) => e === void 0 || t === void 0 ? null : Math.round(t - e), _ = (e, t) => {
|
|
51
|
+
var r;
|
|
52
|
+
return ((r = e.match(t)) == null ? void 0 : r.length) ?? 0;
|
|
53
|
+
}, y = (e) => new TextEncoder().encode(e).length, O = (e) => {
|
|
54
|
+
if (!e)
|
|
55
|
+
return f;
|
|
56
|
+
try {
|
|
57
|
+
const { html: t, css: r, forceRecreate: o } = e;
|
|
58
|
+
return {
|
|
59
|
+
html_bytes: y(t),
|
|
60
|
+
css_bytes: y(r),
|
|
61
|
+
image_count: _(t, N),
|
|
62
|
+
synced_module_count: _(t, $),
|
|
63
|
+
recommendation_block_count: _(t, L),
|
|
64
|
+
items_block_count: _(t, C),
|
|
65
|
+
has_timers: t.includes(I),
|
|
66
|
+
force_recreate: o
|
|
67
|
+
};
|
|
68
|
+
} catch (t) {
|
|
69
|
+
return console.debug("guido:open: template weight failed", t), f;
|
|
70
|
+
}
|
|
71
|
+
}, E = () => {
|
|
72
|
+
i(() => {
|
|
73
|
+
A.forEach((e) => performance.clearMarks(`${m}${e}`)), [...p.map(([e]) => e), h].forEach((e) => performance.clearMeasures(`${m}${e}`));
|
|
74
|
+
});
|
|
75
|
+
}, c = (e, t) => {
|
|
76
|
+
if (e.finished || e.marks[t] !== void 0)
|
|
77
|
+
return;
|
|
78
|
+
const r = performance.now();
|
|
79
|
+
e.marks[t] = r, e === l && i(() => performance.mark(`${m}${t}`, { startTime: r }));
|
|
80
|
+
}, s = (e) => {
|
|
81
|
+
e.finished = !0, document.removeEventListener("visibilitychange", e.onVisibilityChange), window.removeEventListener("pagehide", e.onPageHide);
|
|
82
|
+
}, B = (e, t) => {
|
|
83
|
+
const { marks: r } = e, o = p.map(([n, a, d]) => [n, r[a], r[d]]);
|
|
84
|
+
o.push([h, r.setup, t]), o.forEach(([n, a, d]) => {
|
|
85
|
+
a !== void 0 && d !== void 0 && i(() => performance.measure(`${m}${n}`, { start: a, end: d }));
|
|
86
|
+
});
|
|
87
|
+
}, D = (e, t, r) => {
|
|
88
|
+
const { marks: o, context: n } = e, a = Object.fromEntries(
|
|
89
|
+
p.map(([d, v, P]) => [`${d}_ms`, g(o[v], o[P])])
|
|
90
|
+
);
|
|
91
|
+
return {
|
|
92
|
+
outcome: t,
|
|
93
|
+
open_ms: g(o.setup, r),
|
|
94
|
+
...a,
|
|
95
|
+
script_preloaded: e.scriptPreloaded,
|
|
96
|
+
runtime_prefetch: e.runtimePrefetch,
|
|
97
|
+
...O(e.template),
|
|
98
|
+
partner_name: (n == null ? void 0 : n.partnerName) ?? null,
|
|
99
|
+
product_type: (n == null ? void 0 : n.productType) ?? null,
|
|
100
|
+
template_id: (n == null ? void 0 : n.templateId) ?? null,
|
|
101
|
+
variation_id: (n == null ? void 0 : n.variationId) ?? null,
|
|
102
|
+
guido_version: M.version,
|
|
103
|
+
stripo_version: R(),
|
|
104
|
+
was_backgrounded: e.wasBackgrounded
|
|
105
|
+
};
|
|
106
|
+
}, u = (e, t) => {
|
|
107
|
+
i(() => {
|
|
108
|
+
const r = e.marks.ready ?? performance.now(), o = D(e, t, r);
|
|
109
|
+
e.template = null, e === l && B(e, r), console.debug("guido:open", o), i(() => {
|
|
110
|
+
var n, a;
|
|
111
|
+
return (a = (n = k()) == null ? void 0 : n.addAction) == null ? void 0 : a.call(n, "guido_editor_open", o);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}, T = (e) => {
|
|
115
|
+
e.finished || (s(e), u(e, "abandoned"));
|
|
116
|
+
}, H = () => {
|
|
117
|
+
const e = {
|
|
118
|
+
marks: {},
|
|
119
|
+
context: null,
|
|
120
|
+
template: null,
|
|
121
|
+
scriptPreloaded: null,
|
|
122
|
+
runtimePrefetch: null,
|
|
123
|
+
wasBackgrounded: document.visibilityState === "hidden",
|
|
124
|
+
finished: !1,
|
|
125
|
+
onVisibilityChange: () => {
|
|
126
|
+
document.visibilityState === "hidden" && (e.wasBackgrounded = !0);
|
|
127
|
+
},
|
|
128
|
+
onPageHide: () => T(e)
|
|
129
|
+
};
|
|
130
|
+
return e;
|
|
131
|
+
}, Y = (e) => ({
|
|
132
|
+
mark: (t) => c(e, t),
|
|
133
|
+
timed: async (t, r) => {
|
|
134
|
+
c(e, `${t}_start`);
|
|
135
|
+
const o = await r();
|
|
136
|
+
return c(e, `${t}_end`), o;
|
|
137
|
+
},
|
|
138
|
+
setContext: (t) => {
|
|
139
|
+
e.context = t;
|
|
140
|
+
},
|
|
141
|
+
setTemplate: (t) => {
|
|
142
|
+
e.template = t;
|
|
143
|
+
},
|
|
144
|
+
setScriptPreloaded: (t) => {
|
|
145
|
+
e.scriptPreloaded = t;
|
|
146
|
+
},
|
|
147
|
+
markReady: () => {
|
|
148
|
+
e.finished || (c(e, "ready"), s(e), i(() => {
|
|
149
|
+
var t, r;
|
|
150
|
+
return (r = (t = k()) == null ? void 0 : t.addTiming) == null ? void 0 : r.call(t, "guido_editor_ready");
|
|
151
|
+
}), setTimeout(() => u(e, "ready"), 0));
|
|
152
|
+
},
|
|
153
|
+
markFailed: () => {
|
|
154
|
+
e.finished || (s(e), u(e, "error"));
|
|
155
|
+
},
|
|
156
|
+
dispose: () => {
|
|
157
|
+
T(e), e === l && (E(), l = null);
|
|
158
|
+
}
|
|
159
|
+
}), K = () => {
|
|
160
|
+
const e = H();
|
|
161
|
+
return E(), l = e, i(() => {
|
|
162
|
+
e.runtimePrefetch = S();
|
|
163
|
+
}), document.addEventListener("visibilitychange", e.onVisibilityChange), window.addEventListener("pagehide", e.onPageHide), c(e, "setup"), Y(e);
|
|
164
|
+
};
|
|
165
|
+
export {
|
|
166
|
+
K as startEditorOpenMetrics
|
|
167
|
+
};
|
|
@@ -1,44 +1,54 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useFullStoryBridge as
|
|
6
|
-
import { useModuleRepair as
|
|
7
|
-
import { useStripoEventHandler as
|
|
8
|
-
import { useStripoNotifications as
|
|
9
|
-
import { useToaster as
|
|
10
|
-
import { localePatch as
|
|
11
|
-
import { en as
|
|
12
|
-
import { ToasterTypeOptions as
|
|
13
|
-
import { useStripoApi as
|
|
14
|
-
import
|
|
15
|
-
import { useEditorStore as
|
|
16
|
-
import { buildMergeTagEntries as
|
|
17
|
-
import
|
|
18
|
-
let
|
|
19
|
-
const
|
|
20
|
-
const { features:
|
|
21
|
-
var d;
|
|
1
|
+
import { useActionsApi as M } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as N } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as j } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as _ } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as z } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useModuleRepair as $ } from "./useModuleRepair.js";
|
|
7
|
+
import { useStripoEventHandler as G } from "./useStripoEventHandler.js";
|
|
8
|
+
import { useStripoNotifications as X } from "./useStripoNotifications.js";
|
|
9
|
+
import { useToaster as J } from "./useToaster.js";
|
|
10
|
+
import { localePatch as K } from "../config/i18n/index.js";
|
|
11
|
+
import { en as B } from "../config/i18n/en/index.js";
|
|
12
|
+
import { ToasterTypeOptions as Q } from "../enums/toaster.js";
|
|
13
|
+
import { useStripoApi as W } from "../services/stripoApi.js";
|
|
14
|
+
import Y from "../static/styles/customEditorStyle.css.js";
|
|
15
|
+
import { useEditorStore as v } from "../stores/editor.js";
|
|
16
|
+
import { buildMergeTagEntries as Z, flattenDynamicContentList as ee } from "../utils/genericUtil.js";
|
|
17
|
+
import { getStripoRuntimeBaseUrl as te } from "../utils/stripoRuntime.js";
|
|
18
|
+
let d = null, T = !1;
|
|
19
|
+
const we = (e) => {
|
|
20
|
+
const { features: u, template: m, isFeatureEnabled: p } = j(), { handleError: f, showToaster: F } = J(), { getToken: A, getCustomFonts: P, getSyncModulesStatus: R } = W(), { handleEvent: U } = G(), { handleModuleAdd: V } = $(), { getStripoBlocksConfig: D } = N(), { getStripoNotifications: I } = X(), g = () => d || (d = new Promise((a, s) => {
|
|
22
21
|
if (document.getElementById("UiEditorScript")) {
|
|
23
|
-
|
|
22
|
+
a();
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
const i = te();
|
|
26
|
+
if (!i) {
|
|
27
|
+
s(
|
|
28
|
+
new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
|
|
29
|
+
);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const n = `${i}UIEditor.js`, t = document.createElement("script");
|
|
33
|
+
t.id = "UiEditorScript", t.type = "module", t.src = n, t.onload = () => {
|
|
34
|
+
T = !0, a();
|
|
35
|
+
}, t.onerror = () => {
|
|
36
|
+
t.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${n}`));
|
|
37
|
+
}, document.body.appendChild(t);
|
|
38
|
+
}), d.catch(() => {
|
|
39
|
+
d = null;
|
|
40
|
+
}), d), L = async (a, s, i, n = [], t = !1) => {
|
|
41
|
+
var C, w, k, b;
|
|
42
|
+
const o = v(), { html: c, css: S } = a, { baseBlocks: y, extensions: q } = await D();
|
|
43
|
+
e.mark("blocks_config_ready");
|
|
44
|
+
const E = ((C = u.value) == null ? void 0 : C.displayConditions) ?? !0, x = ((w = u.value) == null ? void 0 : w.modulesDisabled) ?? !1, h = !!c || (((k = m.value) == null ? void 0 : k.forceRecreate) ?? !1), O = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
|
|
45
|
+
e.setTemplate({ html: c, css: S, forceRecreate: h }), _().importCss(), e.mark("init_editor"), await window.UIEditor.initEditor(
|
|
36
46
|
document.querySelector("#guido-editor"),
|
|
37
47
|
{
|
|
38
48
|
metadata: s,
|
|
39
|
-
html:
|
|
40
|
-
css:
|
|
41
|
-
forceRecreate:
|
|
49
|
+
html: c,
|
|
50
|
+
css: S,
|
|
51
|
+
forceRecreate: h,
|
|
42
52
|
locale: "en",
|
|
43
53
|
undoButtonSelector: "#guido__undo-button",
|
|
44
54
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -48,12 +58,12 @@ const he = () => {
|
|
|
48
58
|
customAppearanceMergetags: !p("liquidSyntax"),
|
|
49
59
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
50
60
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
51
|
-
customViewStyles:
|
|
52
|
-
conditionsEnabled:
|
|
53
|
-
customConditionsEnabled:
|
|
61
|
+
customViewStyles: Y,
|
|
62
|
+
conditionsEnabled: E,
|
|
63
|
+
customConditionsEnabled: E,
|
|
54
64
|
enableXSSSecurity: !0,
|
|
55
|
-
modulesDisabled:
|
|
56
|
-
syncModulesEnabled:
|
|
65
|
+
modulesDisabled: x,
|
|
66
|
+
syncModulesEnabled: t,
|
|
57
67
|
messageSettingsEnabled: !0,
|
|
58
68
|
displayGmailAnnotations: !0,
|
|
59
69
|
displayHiddenPreheader: !1,
|
|
@@ -63,55 +73,56 @@ const he = () => {
|
|
|
63
73
|
copyPasteEnabled: !1,
|
|
64
74
|
selectElementAfterDrop: !0,
|
|
65
75
|
sameFontSizeForOutlook: !0,
|
|
66
|
-
allowedScriptSourceDomains:
|
|
67
|
-
...
|
|
76
|
+
allowedScriptSourceDomains: O,
|
|
77
|
+
...y ? { baseBlocks: y } : {},
|
|
68
78
|
editorFonts: {
|
|
69
79
|
showDefaultStandardFonts: !0,
|
|
70
80
|
showDefaultNotStandardFonts: !0,
|
|
71
|
-
customFonts:
|
|
81
|
+
customFonts: n
|
|
72
82
|
},
|
|
73
83
|
mergeTags: [
|
|
74
84
|
{
|
|
75
|
-
entries:
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
entries: Z(
|
|
86
|
+
i.preselectedDynamicContentList,
|
|
87
|
+
ee((b = m.value) == null ? void 0 : b.dynamicContentList),
|
|
78
88
|
p("liquidSyntax")
|
|
79
89
|
)
|
|
80
90
|
}
|
|
81
91
|
],
|
|
82
|
-
async onTokenRefreshRequest(
|
|
92
|
+
async onTokenRefreshRequest(r) {
|
|
83
93
|
try {
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
e.mark("token_start");
|
|
95
|
+
const l = await A();
|
|
96
|
+
e.mark("token_end"), r(l);
|
|
86
97
|
} catch (l) {
|
|
87
|
-
|
|
98
|
+
f(l, "Failed to refresh token");
|
|
88
99
|
}
|
|
89
100
|
},
|
|
90
101
|
onTemplateLoaded() {
|
|
91
102
|
try {
|
|
92
|
-
const { activateCustomViewStyles:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, 1e3);
|
|
96
|
-
} catch (
|
|
97
|
-
|
|
103
|
+
const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = M(), { injectFullStory: H } = z();
|
|
104
|
+
_().importCss(), r(), H(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
105
|
+
o.hasChanges = !1;
|
|
106
|
+
}, 1e3), e.markReady();
|
|
107
|
+
} catch (r) {
|
|
108
|
+
f(r, "Failed to load custom interface appearance");
|
|
98
109
|
}
|
|
99
110
|
},
|
|
100
|
-
onCodeEditorVisibilityChanged(
|
|
101
|
-
|
|
111
|
+
onCodeEditorVisibilityChanged(r) {
|
|
112
|
+
o.isCodeEditorOpen = r;
|
|
102
113
|
},
|
|
103
|
-
onEditorVisualModeChanged(
|
|
104
|
-
|
|
114
|
+
onEditorVisualModeChanged(r) {
|
|
115
|
+
o.editorVisualMode = r.toLowerCase();
|
|
105
116
|
},
|
|
106
|
-
onVersionHistoryVisibilityChanged(
|
|
107
|
-
|
|
117
|
+
onVersionHistoryVisibilityChanged(r) {
|
|
118
|
+
o.isVersionHistoryOpen = r;
|
|
108
119
|
},
|
|
109
120
|
onDataChanged() {
|
|
110
|
-
|
|
121
|
+
o.hasChanges = !0, o.changeSeq += 1;
|
|
111
122
|
},
|
|
112
|
-
onEvent:
|
|
113
|
-
onModuleAdd:
|
|
114
|
-
notifications:
|
|
123
|
+
onEvent: U,
|
|
124
|
+
onModuleAdd: V,
|
|
125
|
+
notifications: I(),
|
|
115
126
|
// Stripo deselects the block on any click outside the canvas, so every surface
|
|
116
127
|
// that belongs to the block's own flow has to be listed here (SD-153273).
|
|
117
128
|
ignoreClickOutsideSelectors: [
|
|
@@ -121,35 +132,35 @@ const he = () => {
|
|
|
121
132
|
".in-modal-v2-wrapper",
|
|
122
133
|
".in-toasts-wrapper"
|
|
123
134
|
],
|
|
124
|
-
extensions:
|
|
125
|
-
localePatch:
|
|
135
|
+
extensions: q,
|
|
136
|
+
localePatch: K
|
|
126
137
|
}
|
|
127
138
|
);
|
|
128
139
|
};
|
|
129
|
-
return { initPlugin: async (
|
|
130
|
-
const
|
|
140
|
+
return { initPlugin: async (a, s, i) => {
|
|
141
|
+
const n = v();
|
|
131
142
|
try {
|
|
132
|
-
await
|
|
133
|
-
const [
|
|
134
|
-
|
|
135
|
-
|
|
143
|
+
e.mark("plugin_start"), e.setScriptPreloaded(T), await g(), e.mark("script_ready");
|
|
144
|
+
const [t, o] = await Promise.all([
|
|
145
|
+
P(),
|
|
146
|
+
R()
|
|
136
147
|
]);
|
|
137
|
-
|
|
148
|
+
e.mark("fonts_sync_ready"), n.syncModulesEnabled = o, await L(a, s, i, t, o);
|
|
138
149
|
} catch {
|
|
139
|
-
|
|
140
|
-
type:
|
|
141
|
-
message:
|
|
150
|
+
n.loadingStatus = !1, F({
|
|
151
|
+
type: Q.Error,
|
|
152
|
+
message: B["An error has occurred. Please report the error code to support."],
|
|
142
153
|
actionButton: {
|
|
143
|
-
text:
|
|
154
|
+
text: B["Reload page"],
|
|
144
155
|
onClick: () => window.location.reload()
|
|
145
156
|
}
|
|
146
|
-
});
|
|
157
|
+
}), e.markFailed();
|
|
147
158
|
}
|
|
148
159
|
}, preloadRuntime: () => {
|
|
149
|
-
|
|
160
|
+
g().catch(() => {
|
|
150
161
|
});
|
|
151
162
|
} };
|
|
152
163
|
};
|
|
153
164
|
export {
|
|
154
|
-
|
|
165
|
+
we as useStripo
|
|
155
166
|
};
|
package/dist/enums/academy.js
CHANGED
|
@@ -2,7 +2,6 @@ const e = "https://academy.insiderone.com", o = {
|
|
|
2
2
|
EMAIL_EDITOR: `${e}/docs/email-drag-and-drop-editor`,
|
|
3
3
|
GLOBAL_UNSUBSCRIBE: `${e}/docs/global-unsubscribe-preference-center`,
|
|
4
4
|
AMP_FOR_EMAILS: `${e}/docs/amp-for-emails`,
|
|
5
|
-
EMAIL_DISPLAY_CONDITIONS: `${e}/docs/new-editor-add-display-conditions-to-an-email`,
|
|
6
5
|
EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`
|
|
7
6
|
};
|
|
8
7
|
export {
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-f2154cb6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-f2154cb6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-f2154cb6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
package/dist/library.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
-
import { MessageType as t, ProductType as
|
|
2
|
+
import { MessageType as t, ProductType as f } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
5
|
-
import { assignTrackingIds as
|
|
4
|
+
import { getValidationErrors as p, isValidConfig as s, parseConfig as m, parseConfigSafe as g, validateConfig as n } from "./@types/config/validator.js";
|
|
5
|
+
import { assignTrackingIds as l, readTrackFloor as x, readTrackSeq as c } from "./utils/linkTrackingIds.js";
|
|
6
6
|
import { useGuidoEmailEditorStore as C } from "./stores/guido-email-editor.js";
|
|
7
|
+
import { prefetchGuidoRuntime as E } from "./utils/runtimePrefetch.js";
|
|
7
8
|
export {
|
|
8
9
|
a as Guido,
|
|
9
10
|
t as MessageType,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
f as ProductType,
|
|
12
|
+
l as assignTrackingIds,
|
|
13
|
+
p as getValidationErrors,
|
|
14
|
+
s as isValidConfig,
|
|
15
|
+
m as parseConfig,
|
|
16
|
+
g as parseConfigSafe,
|
|
17
|
+
E as prefetchGuidoRuntime,
|
|
16
18
|
x as readTrackFloor,
|
|
17
|
-
|
|
19
|
+
c as readTrackSeq,
|
|
18
20
|
C as useGuidoEmailEditorStore,
|
|
19
21
|
n as validateConfig
|
|
20
22
|
};
|