@useinsider/guido 3.18.2-beta.c3e75f6 → 3.18.2-beta.dfce34a
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/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +30 -30
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +76 -52
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
- package/dist/components/organisms/header/EditorActions.vue.js +4 -4
- package/dist/components/organisms/header/EditorActions.vue2.js +25 -23
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
- package/dist/composables/useActionsApi.js +47 -52
- package/dist/composables/useCodeEditorApi.js +9 -23
- package/dist/composables/useCustomInterfaceAppearance.js +56 -46
- package/dist/composables/useHtmlValidator.js +87 -82
- package/dist/composables/useRecommendation.js +40 -35
- package/dist/composables/useStripo.js +30 -30
- package/dist/composables/useTranslations.js +2 -3
- package/dist/composables/useVersionHistoryApi.js +24 -33
- package/dist/enums/extensions/recommendationBlock.js +38 -31
- package/dist/extensions/Blocks/Recommendation/block.js +61 -42
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +40 -35
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -140
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
- package/dist/guido.css +1 -1
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +86 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
- package/dist/src/stores/onboarding.d.ts +377 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
- package/dist/static/styles/components/skeleton.css.js +23 -0
- package/dist/stores/onboarding.js +41 -36
- package/dist/stores/unsubscribe.js +3 -3
- package/dist/utils/templatePreparation.js +55 -55
- package/package.json +5 -5
- package/dist/src/utils/stripoEditorApi.d.ts +0 -4
- package/dist/utils/stripoEditorApi.js +0 -11
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import d from "./RecommendationStrategyOnboarding.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import g from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var m = function() {
|
|
5
|
+
var e, n, r, i, a;
|
|
6
|
+
var t = this, s = t._self._c, o = t._self._setupProxy;
|
|
7
|
+
return o.isVisible ? s(o.InOnboard, { key: "guido__recommendation-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__recommendation-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": o.onboardingStore.onboardings.recommendationStrategyOnboarding.config, "pointer-position": (r = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (i = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : i.right, "top-position": (a = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : a.top }, on: { close: function(p) {
|
|
8
|
+
return o.onboardingStore.close(o.ONBOARDING_TYPE);
|
|
9
|
+
}, nextButtonClick: o.handleNext } }) : t._e();
|
|
10
|
+
}, c = [], _ = /* @__PURE__ */ g(
|
|
11
|
+
d,
|
|
12
|
+
m,
|
|
13
|
+
c,
|
|
14
|
+
!1,
|
|
15
|
+
null,
|
|
16
|
+
"ec2027ff"
|
|
17
|
+
);
|
|
18
|
+
const S = _.exports;
|
|
19
|
+
export {
|
|
20
|
+
S as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as g, computed as p, watch as b } from "vue";
|
|
2
|
+
import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { ACADEMY_LINKS as f } from "../../../enums/academy.js";
|
|
5
|
+
import { useRecommendationExtensionStore as O } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
6
|
+
import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
|
|
7
|
+
import { InOnboard as y } from "@useinsider/design-system-vue";
|
|
8
|
+
const h = /* @__PURE__ */ g({
|
|
9
|
+
__name: "RecommendationStrategyOnboarding",
|
|
10
|
+
setup(C) {
|
|
11
|
+
const n = "recommendationStrategyOnboarding", e = l(), t = _(), i = O(), { getTopPosition: r } = u(), a = `<a href="${f.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${e("action-builder.visit-academy")}</a>`, m = () => [
|
|
12
|
+
{
|
|
13
|
+
classes: "guido-recommendation-strategy-onboarding",
|
|
14
|
+
// Sits in the gap left of the settings panel and points at the strategy section, which
|
|
15
|
+
// starts 208px down: the panel header and its tab row are fixed chrome above it.
|
|
16
|
+
right: "426px",
|
|
17
|
+
top: r(208),
|
|
18
|
+
position: "Right Top",
|
|
19
|
+
title: e("email-editor.onboarding-recommendation-strategy-title"),
|
|
20
|
+
description: e("email-editor.onboarding-recommendation-strategy-description", {
|
|
21
|
+
academyLink: a
|
|
22
|
+
}),
|
|
23
|
+
imageSource: "",
|
|
24
|
+
backButtonClick: () => {
|
|
25
|
+
},
|
|
26
|
+
nextButtonType: "text",
|
|
27
|
+
nextButtonText: e("action-builder.ok"),
|
|
28
|
+
nextButtonClick: () => {
|
|
29
|
+
t.close(n);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
], c = p(() => i.strategyPanelOpen && t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
|
|
33
|
+
var o, s;
|
|
34
|
+
(s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
|
|
35
|
+
};
|
|
36
|
+
return b(
|
|
37
|
+
() => t.isActive(n),
|
|
38
|
+
(o) => {
|
|
39
|
+
o && t.setConfig(n, m());
|
|
40
|
+
},
|
|
41
|
+
{ immediate: !0 }
|
|
42
|
+
), { __sfc: !0, ONBOARDING_TYPE: n, trans: e, onboardingStore: t, recommendationStore: i, getTopPosition: r, academyLink: a, buildOnboardingCards: m, isVisible: c, handleNext: d, InOnboard: y };
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
h as default
|
|
47
|
+
};
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { filterAmpErrors as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
() => p(new Error(`${n} did not report completion within ${l}ms`)),
|
|
1
|
+
import { filterAmpErrors as v } from "../utils/ampErrorFilter.js";
|
|
2
|
+
import { useToaster as y } from "./useToaster.js";
|
|
3
|
+
const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
4
|
+
const w = setTimeout(
|
|
5
|
+
() => m(new Error(`${n} did not report completion within ${l}ms`)),
|
|
7
6
|
l
|
|
8
|
-
),
|
|
9
|
-
clearTimeout(
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
d(t);
|
|
15
|
-
}
|
|
16
|
-
}), P = () => {
|
|
17
|
-
const { handleError: n } = D(), l = (t = {}) => r(
|
|
7
|
+
), p = (A) => (t) => {
|
|
8
|
+
clearTimeout(w), A(t);
|
|
9
|
+
};
|
|
10
|
+
u(p(T), p(m));
|
|
11
|
+
}), I = () => {
|
|
12
|
+
const { handleError: n } = y(), l = (t = {}) => s(
|
|
18
13
|
"compileEmail",
|
|
19
|
-
|
|
20
|
-
(e,
|
|
14
|
+
d,
|
|
15
|
+
(e, a) => {
|
|
21
16
|
const o = { ...{
|
|
22
17
|
minimize: !0,
|
|
23
18
|
utmEntity: {
|
|
@@ -37,53 +32,53 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
|
|
|
37
32
|
forceAmp: !1,
|
|
38
33
|
resetDataSavedFlag: !1,
|
|
39
34
|
disableLineHeightsReplace: !0
|
|
40
|
-
}, ...t },
|
|
41
|
-
callback: (
|
|
42
|
-
|
|
43
|
-
html:
|
|
44
|
-
ampHtml:
|
|
45
|
-
ampErrors:
|
|
46
|
-
displayConditions:
|
|
35
|
+
}, ...t }, c = {
|
|
36
|
+
callback: (r, C, f, S, g) => {
|
|
37
|
+
r ? a(r) : e({
|
|
38
|
+
html: C,
|
|
39
|
+
ampHtml: f,
|
|
40
|
+
ampErrors: v(S ?? []),
|
|
41
|
+
displayConditions: g
|
|
47
42
|
});
|
|
48
43
|
},
|
|
49
44
|
...o
|
|
50
45
|
};
|
|
51
|
-
|
|
46
|
+
window.StripoEditorApi.actionsApi.compileEmail(c);
|
|
52
47
|
}
|
|
53
48
|
);
|
|
54
49
|
return {
|
|
55
50
|
getCompiledEmail: l,
|
|
56
|
-
getTemplateData: () =>
|
|
51
|
+
getTemplateData: () => s(
|
|
57
52
|
"getTemplateData",
|
|
58
|
-
|
|
53
|
+
d,
|
|
59
54
|
(t) => {
|
|
60
|
-
const e = ({ html:
|
|
61
|
-
html:
|
|
62
|
-
css:
|
|
55
|
+
const e = ({ html: a, css: i, width: o, height: E, utmParams: c, syncModulesIds: r }) => t({
|
|
56
|
+
html: a,
|
|
57
|
+
css: i,
|
|
63
58
|
width: o,
|
|
64
59
|
height: E,
|
|
65
|
-
utmParams:
|
|
66
|
-
syncModulesIds:
|
|
60
|
+
utmParams: c,
|
|
61
|
+
syncModulesIds: r
|
|
67
62
|
});
|
|
68
|
-
|
|
63
|
+
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
69
64
|
}
|
|
70
65
|
),
|
|
71
66
|
activateCustomViewStyles: (t = !0) => {
|
|
72
|
-
|
|
67
|
+
window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
|
|
73
68
|
},
|
|
74
69
|
getPreviewData: async (t) => {
|
|
75
70
|
try {
|
|
76
71
|
const {
|
|
77
72
|
html: e,
|
|
78
|
-
displayConditions:
|
|
79
|
-
ampHtml:
|
|
73
|
+
displayConditions: a,
|
|
74
|
+
ampHtml: i = "",
|
|
80
75
|
ampErrors: o = []
|
|
81
76
|
} = await l({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
82
77
|
return {
|
|
83
78
|
html: e,
|
|
84
|
-
ampHtml:
|
|
79
|
+
ampHtml: i,
|
|
85
80
|
ampErrors: o,
|
|
86
|
-
displayConditions:
|
|
81
|
+
displayConditions: a
|
|
87
82
|
};
|
|
88
83
|
} catch (e) {
|
|
89
84
|
return n(e, "Error loading preview"), {
|
|
@@ -95,30 +90,30 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
|
|
|
95
90
|
}
|
|
96
91
|
},
|
|
97
92
|
updateTimerInClonedTemplate: () => new Promise((t) => {
|
|
98
|
-
var e,
|
|
99
|
-
if (typeof ((
|
|
93
|
+
var e, a;
|
|
94
|
+
if (typeof ((a = (e = window.StripoEditorApi) == null ? void 0 : e.actionsApi) == null ? void 0 : a.updateTimerInClonedTemplate) != "function") {
|
|
100
95
|
t(null);
|
|
101
96
|
return;
|
|
102
97
|
}
|
|
103
98
|
try {
|
|
104
|
-
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((
|
|
105
|
-
|
|
99
|
+
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
|
|
100
|
+
i ? (n(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
106
101
|
});
|
|
107
|
-
} catch (
|
|
108
|
-
n(
|
|
102
|
+
} catch (i) {
|
|
103
|
+
n(i, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
109
104
|
}
|
|
110
105
|
}),
|
|
111
106
|
updateHtmlAndCss: (t, e) => {
|
|
112
|
-
const { actionsApi:
|
|
113
|
-
return
|
|
114
|
-
|
|
107
|
+
const { actionsApi: a } = window.StripoEditorApi;
|
|
108
|
+
return s("updateHtmlAndCss", D, (i) => {
|
|
109
|
+
a.updateHtmlAndCss(t, e, () => i());
|
|
115
110
|
});
|
|
116
111
|
},
|
|
117
|
-
editorSave: () =>
|
|
112
|
+
editorSave: () => s(
|
|
118
113
|
"save",
|
|
119
|
-
|
|
114
|
+
d,
|
|
120
115
|
(t) => {
|
|
121
|
-
|
|
116
|
+
window.StripoEditorApi.actionsApi.save((e) => {
|
|
122
117
|
if (e) {
|
|
123
118
|
n(e, "Failed to save template"), t(!1);
|
|
124
119
|
return;
|
|
@@ -130,5 +125,5 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
|
|
|
130
125
|
};
|
|
131
126
|
};
|
|
132
127
|
export {
|
|
133
|
-
|
|
128
|
+
I as useActionsApi
|
|
134
129
|
};
|
|
@@ -1,25 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
i({ type: d.Error, message: p });
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
o(e);
|
|
13
|
-
};
|
|
14
|
-
return {
|
|
15
|
-
openCodeEditor: () => {
|
|
16
|
-
t((o) => o.openCodeEditor());
|
|
17
|
-
},
|
|
18
|
-
closeCodeEditor: () => {
|
|
19
|
-
t((o) => o.closeCodeEditor());
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
1
|
+
const i = () => ({
|
|
2
|
+
openCodeEditor: () => {
|
|
3
|
+
window.StripoEditorApi.codeEditorApi.openCodeEditor();
|
|
4
|
+
},
|
|
5
|
+
closeCodeEditor: () => {
|
|
6
|
+
window.StripoEditorApi.codeEditorApi.closeCodeEditor();
|
|
7
|
+
}
|
|
8
|
+
});
|
|
23
9
|
export {
|
|
24
|
-
|
|
10
|
+
i as useCodeEditorApi
|
|
25
11
|
};
|
|
@@ -1,67 +1,77 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
1
|
+
import p from "../static/assets/icons/line-change.svg.js";
|
|
2
|
+
import s from "../static/assets/icons/line-delete.svg.js";
|
|
3
|
+
import a from "../static/assets/icons/line-plus.svg.js";
|
|
4
|
+
import f from "../static/styles/base.css.js";
|
|
5
|
+
import C from "../static/styles/components/alert-message.css.js";
|
|
6
|
+
import c from "../static/styles/components/amp-block.css.js";
|
|
7
|
+
import l from "../static/styles/components/base-input.css.js";
|
|
8
|
+
import d from "../static/styles/components/button-group.css.js";
|
|
9
|
+
import u from "../static/styles/components/button.css.js";
|
|
10
|
+
import h from "../static/styles/components/combobox.css.js";
|
|
11
|
+
import g from "../static/styles/components/counter.css.js";
|
|
12
|
+
import w from "../static/styles/components/dropdown-menu.css.js";
|
|
13
|
+
import y from "../static/styles/components/loader.css.js";
|
|
14
|
+
import I from "../static/styles/components/narrow-panel.css.js";
|
|
15
|
+
import A from "../static/styles/components/popup.css.js";
|
|
16
|
+
import b from "../static/styles/components/recommendation-strategy.css.js";
|
|
17
|
+
import B from "../static/styles/components/skeleton.css.js";
|
|
18
|
+
import D from "../static/styles/components/switcher.css.js";
|
|
19
|
+
import $ from "../static/styles/components/tabs.css.js";
|
|
20
|
+
import P from "../static/styles/components/tools.css.js";
|
|
21
|
+
import R from "../static/styles/components/version-history.css.js";
|
|
22
|
+
import T from "../static/styles/components/wide-panel.css.js";
|
|
22
23
|
import x from "../static/styles/variables.css.js";
|
|
23
|
-
function r(
|
|
24
|
-
return `--guido-icon-${
|
|
24
|
+
function r(S, o) {
|
|
25
|
+
return `--guido-icon-${S}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
-
${r("line-change",
|
|
28
|
-
${r("line-delete",
|
|
29
|
-
${r("line-plus",
|
|
30
|
-
}`,
|
|
27
|
+
const M = `:host {
|
|
28
|
+
${r("line-change", p)}
|
|
29
|
+
${r("line-delete", s)}
|
|
30
|
+
${r("line-plus", a)}
|
|
31
|
+
}`, O = [
|
|
31
32
|
x,
|
|
32
33
|
// Must be on top
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
M,
|
|
35
|
+
f,
|
|
35
36
|
// Must be on top
|
|
36
|
-
s,
|
|
37
37
|
C,
|
|
38
|
-
a,
|
|
39
|
-
f,
|
|
40
38
|
c,
|
|
41
|
-
u,
|
|
42
39
|
l,
|
|
43
40
|
d,
|
|
41
|
+
u,
|
|
44
42
|
h,
|
|
45
43
|
g,
|
|
46
|
-
|
|
44
|
+
w,
|
|
47
45
|
y,
|
|
48
|
-
|
|
46
|
+
I,
|
|
47
|
+
A,
|
|
49
48
|
B,
|
|
49
|
+
D,
|
|
50
50
|
$,
|
|
51
51
|
P,
|
|
52
|
-
|
|
52
|
+
R,
|
|
53
|
+
T,
|
|
54
|
+
b
|
|
53
55
|
// Last: overrides button.css / wide-panel.css defaults
|
|
54
56
|
].join(`
|
|
55
57
|
|
|
56
|
-
`),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const m =
|
|
63
|
-
|
|
58
|
+
`), V = 3e4;
|
|
59
|
+
let e = null;
|
|
60
|
+
function W() {
|
|
61
|
+
return e || (e = new CSSStyleSheet(), e.replaceSync(O)), e;
|
|
62
|
+
}
|
|
63
|
+
const So = () => ({ importCss: () => {
|
|
64
|
+
const o = W(), i = Date.now() + V, m = () => {
|
|
65
|
+
var n;
|
|
66
|
+
const t = (n = document.querySelector("ui-editor")) == null ? void 0 : n.shadowRoot;
|
|
67
|
+
if (t) {
|
|
68
|
+
t.adoptedStyleSheets.includes(o) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, o]);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
Date.now() < i && requestAnimationFrame(m);
|
|
72
|
+
};
|
|
73
|
+
m();
|
|
64
74
|
} });
|
|
65
75
|
export {
|
|
66
|
-
|
|
76
|
+
So as useCustomInterfaceAppearance
|
|
67
77
|
};
|