@useinsider/guido 3.6.1-beta.03230b7 → 3.7.0-beta.2037cb1
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 +14 -0
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +75 -72
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +6 -6
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +9 -9
- package/dist/composables/useActionsApi.js +16 -15
- package/dist/composables/useHtmlCompiler.js +40 -22
- package/dist/composables/useRecommendation.js +34 -33
- package/dist/composables/useStripo.js +44 -39
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +127 -123
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +12 -11
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +46 -46
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +13 -9
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +35 -29
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +28 -28
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +8 -8
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +56 -49
- package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +21 -0
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +17 -17
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +9 -9
- package/dist/guido.css +1 -1
- package/dist/src/components/Guido.vue.d.ts +1 -0
- package/dist/src/composables/useHtmlCompiler.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerCustomizations.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +2 -3
- package/dist/src/utils/ampErrorFilter.d.ts +2 -0
- package/dist/src/utils/templatePreparation.d.ts +16 -0
- package/dist/stores/dynamic-content.js +1 -1
- package/dist/utils/ampErrorFilter.js +8 -0
- package/dist/utils/templatePreparation.js +59 -58
- package/package.json +1 -1
- package/dist/src/composables/useApiExample.d.ts +0 -63
- package/dist/src/composables/useRecommendation.test.d.ts +0 -1
- package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +0 -1
- package/dist/src/config/migrator/recommendation/extractors.test.d.ts +0 -1
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +0 -1
- package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +0 -1
- package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +0 -1
- package/dist/src/config/migrator/recommendationMigrator.test.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.test.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.test.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +0 -1
- package/dist/src/stores/config.test.d.ts +0 -1
- package/dist/src/utils/htmlEscape.test.d.ts +0 -1
- package/dist/src/vitest.setup.d.ts +0 -0
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { useActionsApi as D } from "./useActionsApi.js";
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
2
|
+
import { useBlocksConfig as P } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as I } from "./useConfig.js";
|
|
4
4
|
import { useCustomInterfaceAppearance as U } from "./useCustomInterfaceAppearance.js";
|
|
5
5
|
import { useFullStoryBridge as R } from "./useFullStoryBridge.js";
|
|
6
6
|
import { useStripoEventHandler as q } from "./useStripoEventHandler.js";
|
|
7
7
|
import { useToaster as x } from "./useToaster.js";
|
|
8
8
|
import { localePatch as H } from "../config/i18n/index.js";
|
|
9
9
|
import { useStripoApi as O } from "../services/stripoApi.js";
|
|
10
|
-
import
|
|
11
|
-
import { useEditorStore as
|
|
12
|
-
import { dynamicContentToMergeTags as
|
|
13
|
-
import
|
|
14
|
-
const se = (
|
|
15
|
-
const { features:
|
|
10
|
+
import z from "../static/styles/customEditorStyle.css.js";
|
|
11
|
+
import { useEditorStore as h } from "../stores/editor.js";
|
|
12
|
+
import { dynamicContentToMergeTags as L } from "../utils/genericUtil.js";
|
|
13
|
+
import $ from "../package.json.js";
|
|
14
|
+
const se = (E, c) => {
|
|
15
|
+
const { features: u, template: C, isFeatureEnabled: m } = I(), { handleError: l } = x(), { getToken: w, getCustomFonts: b, getSyncModulesStatus: F } = O(), { handleEvent: k } = q(), { getStripoBlocksConfig: v } = P(), B = async (s, r = [], o = !1) => {
|
|
16
16
|
var g, S, y;
|
|
17
|
-
const e =
|
|
17
|
+
const e = h(), { html: p, css: a } = s, { baseBlocks: i, extensions: d } = await v(), f = ((g = u.value) == null ? void 0 : g.displayConditions) ?? !0, V = ((S = u.value) == null ? void 0 : S.modulesDisabled) ?? !1, _ = ((y = C.value) == null ? void 0 : y.forceRecreate) ?? !1;
|
|
18
18
|
window.UIEditor.initEditor(
|
|
19
19
|
document.querySelector("#guido-editor"),
|
|
20
20
|
{
|
|
21
|
-
metadata:
|
|
21
|
+
metadata: E,
|
|
22
22
|
html: p,
|
|
23
23
|
css: a,
|
|
24
|
-
forceRecreate:
|
|
24
|
+
forceRecreate: _,
|
|
25
25
|
locale: "en",
|
|
26
26
|
undoButtonSelector: "#guido__undo-button",
|
|
27
27
|
redoButtonSelector: "#guido__redo-button",
|
|
28
28
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
29
29
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
30
30
|
codeEditorButtonSelector: "#guido__code-button",
|
|
31
|
-
customAppearanceMergetags: !
|
|
31
|
+
customAppearanceMergetags: !m("liquidSyntax"),
|
|
32
32
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
33
33
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
34
|
-
customViewStyles:
|
|
34
|
+
customViewStyles: z,
|
|
35
35
|
conditionsEnabled: f,
|
|
36
36
|
customConditionsEnabled: f,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
|
-
modulesDisabled:
|
|
39
|
-
syncModulesEnabled:
|
|
38
|
+
modulesDisabled: V,
|
|
39
|
+
syncModulesEnabled: o,
|
|
40
40
|
messageSettingsEnabled: !0,
|
|
41
41
|
displayGmailAnnotations: !0,
|
|
42
42
|
displayHiddenPreheader: !1,
|
|
@@ -45,7 +45,7 @@ const se = (C, l) => {
|
|
|
45
45
|
selectElementAfterDrop: !0,
|
|
46
46
|
sameFontSizeForOutlook: !0,
|
|
47
47
|
allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
|
|
48
|
-
...
|
|
48
|
+
...i ? { baseBlocks: i } : {},
|
|
49
49
|
editorFonts: {
|
|
50
50
|
showDefaultStandardFonts: !0,
|
|
51
51
|
showDefaultNotStandardFonts: !0,
|
|
@@ -53,9 +53,9 @@ const se = (C, l) => {
|
|
|
53
53
|
},
|
|
54
54
|
mergeTags: [
|
|
55
55
|
{
|
|
56
|
-
entries:
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
entries: L(
|
|
57
|
+
c.preselectedDynamicContentList,
|
|
58
|
+
m("liquidSyntax")
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
],
|
|
@@ -64,17 +64,17 @@ const se = (C, l) => {
|
|
|
64
64
|
const n = await w();
|
|
65
65
|
t(n);
|
|
66
66
|
} catch (n) {
|
|
67
|
-
|
|
67
|
+
l(n, "Failed to refresh token");
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
onTemplateLoaded() {
|
|
71
71
|
try {
|
|
72
72
|
const { importCss: t } = U(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: M } = D(), { injectFullStory: A } = R();
|
|
73
|
-
t(), n(), A(), M(),
|
|
73
|
+
t(), n(), A(), M(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
74
74
|
e.hasChanges = !1;
|
|
75
75
|
}, 1e3);
|
|
76
76
|
} catch (t) {
|
|
77
|
-
|
|
77
|
+
l(t, "Failed to load custom interface appearance");
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
onCodeEditorVisibilityChanged(t) {
|
|
@@ -89,7 +89,7 @@ const se = (C, l) => {
|
|
|
89
89
|
onDataChanged() {
|
|
90
90
|
e.hasChanges = !0;
|
|
91
91
|
},
|
|
92
|
-
onEvent:
|
|
92
|
+
onEvent: k,
|
|
93
93
|
ignoreClickOutsideSelectors: [
|
|
94
94
|
"#guido-dynamic-content-modal",
|
|
95
95
|
".in-on-board-wrapper",
|
|
@@ -99,27 +99,32 @@ const se = (C, l) => {
|
|
|
99
99
|
localePatch: H
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
|
-
},
|
|
102
|
+
}, T = (s) => new Promise((r, o) => {
|
|
103
103
|
var d;
|
|
104
104
|
if (document.getElementById("UiEditorScript")) {
|
|
105
|
-
|
|
105
|
+
Promise.resolve(s()).then(r, o);
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
const e =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
}, document.body.appendChild(
|
|
108
|
+
const e = $.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, i = document.createElement("script");
|
|
109
|
+
i.id = "UiEditorScript", i.type = "module", i.src = a, i.onload = () => {
|
|
110
|
+
Promise.resolve(s()).then(r, o);
|
|
111
|
+
}, i.onerror = () => {
|
|
112
|
+
o(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
113
|
+
}, document.body.appendChild(i);
|
|
114
114
|
});
|
|
115
|
-
return { initPlugin: async (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
return { initPlugin: async (s) => {
|
|
116
|
+
const r = h();
|
|
117
|
+
try {
|
|
118
|
+
await T(async () => {
|
|
119
|
+
const [o, e] = await Promise.all([
|
|
120
|
+
b(),
|
|
121
|
+
F()
|
|
122
|
+
]);
|
|
123
|
+
r.syncModulesEnabled = e, await B(s, o, e);
|
|
124
|
+
});
|
|
125
|
+
} catch (o) {
|
|
126
|
+
r.loadingStatus = !1, l(o, "Failed to load the editor");
|
|
127
|
+
}
|
|
123
128
|
} };
|
|
124
129
|
};
|
|
125
130
|
export {
|