@useinsider/guido 3.18.2-beta.45f708c → 3.18.2-beta.4d2b065
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 +21 -3
- package/dist/@types/config/schemas.js +59 -51
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +72 -70
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -9
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +51 -66
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +40 -24
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -26
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +20 -21
- package/dist/composables/useCustomInterfaceAppearance.js +47 -53
- package/dist/composables/useHtmlValidator.js +79 -84
- package/dist/composables/useLegacyStrategyConversion.js +61 -0
- package/dist/composables/useRecommendation.js +35 -40
- package/dist/composables/useStripo.js +30 -30
- package/dist/enums/extensions/recommendationBlock.js +41 -39
- package/dist/extensions/Blocks/Recommendation/block.js +39 -43
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +80 -84
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +94 -82
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +97 -96
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +144 -179
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +16 -26
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -21
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +46 -37
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +5 -3
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -8
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +6 -7
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +70 -76
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +0 -4
- package/dist/src/services/recommendationApi.d.ts +2 -1
- package/dist/src/stores/config.d.ts +322 -0
- package/dist/src/stores/onboarding.d.ts +421 -0
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
- package/dist/static/assets/icons/line-info.svg.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +74 -39
- package/dist/stores/config.js +74 -60
- package/dist/stores/onboarding.js +6 -1
- package/dist/utils/templatePreparation.js +55 -55
- package/package.json +5 -5
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +0 -24
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +0 -14
- package/dist/static/styles/components/skeleton.css.js +0 -23
|
@@ -1,47 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, defineAsyncComponent as S, ref as T, computed as o, watch as x } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
3
|
+
import { useToaster as h } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as C } from "../../../../composables/useTranslations.js";
|
|
5
5
|
import { DOTTED_DATE_LOCALE as B } from "../../../../enums/date.js";
|
|
6
|
-
import { URLS as
|
|
6
|
+
import { URLS as L } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
7
|
import { ToasterTypeOptions as d } from "../../../../enums/toaster.js";
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
8
|
+
import { useRecommendationExtensionStore as I } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
10
9
|
import N from "./StrategyInfoBoxContent.vue.js";
|
|
11
|
-
import { formatShortDate as
|
|
12
|
-
import { asText as
|
|
13
|
-
import { escapeHtml as
|
|
14
|
-
import { InSkeleton as
|
|
15
|
-
const
|
|
10
|
+
import { formatShortDate as k } from "../../../../utils/dateUtil.js";
|
|
11
|
+
import { asText as _ } from "../../../../utils/genericUtil.js";
|
|
12
|
+
import { escapeHtml as b } from "../../../../utils/htmlEscape.js";
|
|
13
|
+
import { InSkeleton as P } from "@useinsider/design-system-vue";
|
|
14
|
+
const Z = /* @__PURE__ */ E({
|
|
16
15
|
__name: "AssignStrategyDrawer",
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
render: (
|
|
20
|
-
}),
|
|
21
|
-
loader: async () => (await
|
|
22
|
-
loadingComponent:
|
|
16
|
+
setup(U) {
|
|
17
|
+
const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
|
|
18
|
+
render: (s) => s(P, { props: { sizing: { width: t, height: r } } })
|
|
19
|
+
}), v = S({
|
|
20
|
+
loader: async () => (await c()).OrgStrategyDetailModal,
|
|
21
|
+
loadingComponent: g(480, 240),
|
|
23
22
|
delay: 0
|
|
24
23
|
}), D = S({
|
|
25
|
-
loader: async () => (await
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
loader: async () => (await c()).OrgStrategyDropdown,
|
|
25
|
+
loadingComponent: g(240, 42),
|
|
26
|
+
delay: 0
|
|
27
|
+
}), a = C(), e = I(), { showToaster: n } = h(), i = T(null), m = "legacy", l = T(!1), w = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: L.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
28
|
+
x(() => e.assignStrategyDrawerStatus, (t) => {
|
|
28
29
|
if (!t)
|
|
29
30
|
return;
|
|
30
31
|
const { strategyId: r } = e.recommendationConfigs;
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
i.value = r || (e.isLegacyStrategyBlock ? m : null), l.value = !1, e.fetchStrategies().catch(() => {
|
|
33
|
+
n({
|
|
33
34
|
type: d.Error,
|
|
34
|
-
message:
|
|
35
|
+
message: a("discovery-strategy.error-description")
|
|
35
36
|
});
|
|
36
37
|
});
|
|
37
38
|
});
|
|
38
39
|
const y = (t) => {
|
|
39
|
-
const r =
|
|
40
|
+
const r = _(t.updated_at || t.created_at);
|
|
40
41
|
if (!r)
|
|
41
42
|
return "";
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
},
|
|
43
|
+
const s = k(r, B);
|
|
44
|
+
return a("recommendation-strategy.last-updated-on", { value: s });
|
|
45
|
+
}, u = o(() => ({
|
|
46
|
+
text: a("ds-steps.legacy-strategy"),
|
|
47
|
+
value: m,
|
|
48
|
+
hidden: !0
|
|
49
|
+
})), p = o(() => e.strategies.map((t) => ({
|
|
45
50
|
text: t.name,
|
|
46
51
|
value: t.strategy_id,
|
|
47
52
|
infoBoxProps: {
|
|
@@ -49,77 +54,57 @@ const rt = /* @__PURE__ */ A({
|
|
|
49
54
|
theme: "light",
|
|
50
55
|
variant: "information",
|
|
51
56
|
className: "assign-strategy-info-box",
|
|
52
|
-
titleText:
|
|
57
|
+
titleText: b(_(t.name)),
|
|
53
58
|
descriptionStatus: !0,
|
|
54
59
|
descriptionText: y(t),
|
|
55
60
|
slot: N,
|
|
56
|
-
slotProps: { strategy: t }
|
|
57
|
-
// The info box drops the option's value/text, so the id is the only channel
|
|
58
|
-
// that can carry the strategy back to the click handler.
|
|
59
|
-
buttonOptions: [{
|
|
60
|
-
id: `${n}${t.strategy_id}`,
|
|
61
|
-
text: o("eureka.edit-strategy"),
|
|
62
|
-
type: "text",
|
|
63
|
-
// Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
|
|
64
|
-
// silently render blank space instead of failing.
|
|
65
|
-
icon: "line-open-website"
|
|
66
|
-
}]
|
|
61
|
+
slotProps: { strategy: t }
|
|
67
62
|
}
|
|
68
|
-
}))),
|
|
69
|
-
|
|
70
|
-
const r = (f = t == null ? void 0 : t.id) != null && f.startsWith(n) ? t.id.slice(n.length) : "";
|
|
71
|
-
if (!r)
|
|
72
|
-
return;
|
|
73
|
-
const a = e.currentRecommendationId;
|
|
74
|
-
String(s.value ?? "") === r && (s.value = null);
|
|
75
|
-
const l = e.recommendationConfigs.strategyId === r;
|
|
76
|
-
l && e.removeStrategy(), e.openStrategyEdit(r), l && a !== null && _(a, "Removed recommendation strategy");
|
|
77
|
-
}, p = g(() => {
|
|
78
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
|
|
63
|
+
}))), O = o(() => e.isLegacyStrategyBlock ? [u.value, ...p.value] : p.value), f = o(() => {
|
|
64
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(i.value ?? ""));
|
|
79
65
|
return t ? { ...t, fallback_config: null } : null;
|
|
80
|
-
}),
|
|
66
|
+
}), A = o(() => ({
|
|
81
67
|
primaryButton: {
|
|
82
68
|
styling: "solid",
|
|
83
69
|
type: "primary",
|
|
84
|
-
labelText:
|
|
70
|
+
labelText: a("products.assign-btn")
|
|
85
71
|
},
|
|
86
72
|
cancelOrBackButton: {
|
|
87
73
|
styling: "ghost",
|
|
88
74
|
type: "secondary",
|
|
89
|
-
labelText:
|
|
75
|
+
labelText: a("products.cancel")
|
|
90
76
|
}
|
|
91
77
|
}));
|
|
92
|
-
return { __sfc: !0, loadOrganisms:
|
|
78
|
+
return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: v, OrgStrategyDropdown: D, trans: a, store: e, showToaster: n, selectedStrategyId: i, LEGACY_OPTION_VALUE: m, showSelectionError: l, drawerDescription: w, lastUpdatedText: y, legacyStrategyOption: u, remoteStrategyOptions: p, strategyOptions: O, selectedStrategy: f, footerButtonGroupOptions: A, closeDrawer: () => {
|
|
93
79
|
e.closeAssignStrategyDrawer();
|
|
94
80
|
}, assignStrategy: async () => {
|
|
95
|
-
const t =
|
|
81
|
+
const t = f.value;
|
|
96
82
|
if (!t) {
|
|
97
|
-
|
|
83
|
+
l.value = !0;
|
|
98
84
|
return;
|
|
99
85
|
}
|
|
100
86
|
let r = "";
|
|
101
87
|
try {
|
|
102
88
|
r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
|
|
103
|
-
} catch (
|
|
104
|
-
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed",
|
|
89
|
+
} catch (s) {
|
|
90
|
+
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", s);
|
|
105
91
|
}
|
|
106
92
|
if (!r) {
|
|
107
|
-
|
|
93
|
+
n({
|
|
108
94
|
type: d.Error,
|
|
109
|
-
message:
|
|
95
|
+
message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
|
|
110
96
|
});
|
|
111
97
|
return;
|
|
112
98
|
}
|
|
113
|
-
|
|
114
|
-
e.assignStrategy(t), i({
|
|
99
|
+
e.assignStrategy(t), n({
|
|
115
100
|
type: d.Success,
|
|
116
|
-
message:
|
|
117
|
-
}), e.closeAssignStrategyDrawer()
|
|
101
|
+
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
102
|
+
}), e.closeAssignStrategyDrawer();
|
|
118
103
|
}, onSelect: (t) => {
|
|
119
|
-
|
|
104
|
+
i.value = t.value, l.value = !1;
|
|
120
105
|
} };
|
|
121
106
|
}
|
|
122
107
|
});
|
|
123
108
|
export {
|
|
124
|
-
|
|
109
|
+
Z as default
|
|
125
110
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import s from "./LegacyStrategyUpdatedModal.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
6
|
+
return e.store.legacyStrategyUpdatedModalStatus ? a("div", { staticClass: "legacy-strategy-updated-modal" }, [a(e.WpModal, { attrs: { id: "guido__legacy-strategy-updated-modal", size: "small", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("ds-steps.recommendation-strategy-migration-modal-title") }, on: { close: e.close, "primary-action": e.close } }, [a("p", [t._v(t._s(e.messageParts[0])), a("b", [t._v(t._s(e.strategyName))]), t._v(t._s(e.messageParts[1]))])])], 1) : t._e();
|
|
7
|
+
}, l = [], n = /* @__PURE__ */ o(
|
|
8
|
+
s,
|
|
9
|
+
r,
|
|
10
|
+
l,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"da2225a1"
|
|
14
|
+
);
|
|
15
|
+
const m = n.exports;
|
|
16
|
+
export {
|
|
17
|
+
m as default
|
|
18
|
+
};
|
package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as i, computed as s } from "vue";
|
|
2
|
+
import p from "../../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useTranslations as d } from "../../../../composables/useTranslations.js";
|
|
4
|
+
import { useRecommendationExtensionStore as g } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
+
const M = /* @__PURE__ */ i({
|
|
6
|
+
__name: "LegacyStrategyUpdatedModal",
|
|
7
|
+
setup(l) {
|
|
8
|
+
const e = d(), t = g(), n = s(() => ({
|
|
9
|
+
primaryButton: {
|
|
10
|
+
type: "primary",
|
|
11
|
+
labelText: e("action-builder.ok")
|
|
12
|
+
}
|
|
13
|
+
})), m = s(() => {
|
|
14
|
+
var r;
|
|
15
|
+
const { strategyId: a } = t.recommendationConfigs;
|
|
16
|
+
return ((r = t.assignedStrategy) == null ? void 0 : r.name) || `#${a}`;
|
|
17
|
+
}), o = "__STRATEGY_NAME__", c = s(() => e("email-editor.legacy-strategy-updated-message", { strategyName: o }).split(o));
|
|
18
|
+
return { __sfc: !0, trans: e, store: t, footerButtonOptions: n, strategyName: m, NAME_TOKEN: o, messageParts: c, close: () => {
|
|
19
|
+
t.closeLegacyStrategyUpdatedModal();
|
|
20
|
+
}, WpModal: p };
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
M as default
|
|
25
|
+
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ToasterTypeOptions as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { defineComponent as y, computed as n } from "vue";
|
|
2
|
+
import f from "../../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useToaster as u } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as _ } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { ToasterTypeOptions as R } from "../../../../enums/toaster.js";
|
|
6
|
+
import "../../../../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
7
|
+
import { CURRENT_CONFIG_VERSION as T } from "../../../../extensions/Blocks/Recommendation/constants/defaultConfig.js";
|
|
8
|
+
import { useRecommendationExtensionStore as v } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { commitBlockChangeOutsidePanel as N } from "../../../../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
|
|
10
|
+
import { escapeHtml as S } from "../../../../utils/htmlEscape.js";
|
|
11
|
+
const w = /* @__PURE__ */ y({
|
|
10
12
|
__name: "RemoveStrategyModal",
|
|
11
|
-
setup(
|
|
12
|
-
const t =
|
|
13
|
+
setup(h) {
|
|
14
|
+
const t = _(), e = v(), { showToaster: a } = u(), i = n(() => ({
|
|
13
15
|
cancelOrBackButton: {
|
|
14
16
|
type: "secondary",
|
|
15
17
|
labelText: t("products.cancel"),
|
|
@@ -19,25 +21,39 @@ const B = /* @__PURE__ */ d({
|
|
|
19
21
|
type: "danger",
|
|
20
22
|
labelText: t("discovery-strategy.remove")
|
|
21
23
|
}
|
|
22
|
-
})), m =
|
|
23
|
-
var
|
|
24
|
-
const { strategyId:
|
|
25
|
-
return ((
|
|
26
|
-
}),
|
|
24
|
+
})), m = n(() => {
|
|
25
|
+
var r;
|
|
26
|
+
const { strategyId: o } = e.recommendationConfigs;
|
|
27
|
+
return o ? ((r = e.assignedStrategy) == null ? void 0 : r.name) || `#${o}` : t("ds-steps.legacy-strategy");
|
|
28
|
+
}), s = "__STRATEGY_NAME__", d = n(() => t("email-editor.remove-strategy-confirm-message", { strategyName: s }).split(s)), c = () => {
|
|
27
29
|
e.closeRemoveStrategyModal();
|
|
28
30
|
};
|
|
29
|
-
return { __sfc: !0, trans: t, store: e, showToaster:
|
|
30
|
-
const
|
|
31
|
-
e.removeStrategy(), c()
|
|
32
|
-
|
|
31
|
+
return { __sfc: !0, trans: t, store: e, showToaster: a, footerButtonOptions: i, strategyName: m, NAME_TOKEN: s, messageParts: d, close: c, handleConfirm: async () => {
|
|
32
|
+
const o = m.value, r = e.currentRecommendationId;
|
|
33
|
+
e.removeStrategy(), c();
|
|
34
|
+
const { strategyId: l, size: g } = e.recommendationConfigs;
|
|
35
|
+
if (a({
|
|
36
|
+
type: R.Success,
|
|
33
37
|
// The toast renders through a sanitizing v-html, so the name is escaped first.
|
|
34
38
|
message: t("email-editor.strategy-removed-success", {
|
|
35
|
-
strategyName: `<b>${
|
|
39
|
+
strategyName: `<b>${S(o)}</b>`
|
|
36
40
|
})
|
|
37
|
-
}),
|
|
38
|
-
|
|
41
|
+
}), r !== null) {
|
|
42
|
+
try {
|
|
43
|
+
await e.fetchRecommendationProducts();
|
|
44
|
+
} catch (p) {
|
|
45
|
+
console.error("[RemoveStrategyModal] product refetch failed", p);
|
|
46
|
+
}
|
|
47
|
+
N(
|
|
48
|
+
r,
|
|
49
|
+
{ strategyId: l, size: g, configVersion: T },
|
|
50
|
+
e.recommendationProducts,
|
|
51
|
+
"Removed recommendation strategy"
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}, WpModal: f };
|
|
39
55
|
}
|
|
40
56
|
});
|
|
41
57
|
export {
|
|
42
|
-
|
|
58
|
+
w as default
|
|
43
59
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import h from "./
|
|
8
|
-
import w from "./
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
1
|
+
import { defineComponent as f, computed as e, onMounted as O, watch as t } from "vue";
|
|
2
|
+
import y from "./AMPOnboarding.vue.js";
|
|
3
|
+
import u from "./GenericOnboarding.vue.js";
|
|
4
|
+
import v from "./ItemsOnboarding.vue.js";
|
|
5
|
+
import S from "./NewVersionPopup.vue.js";
|
|
6
|
+
import l from "./RecommendationLegacyStrategyOnboarding.vue.js";
|
|
7
|
+
import h from "./RecommendationStrategyOnboarding.vue.js";
|
|
8
|
+
import w from "./TextBlockOnboarding.vue.js";
|
|
9
|
+
import P from "./VersionHistoryOnboarding.vue.js";
|
|
10
|
+
import { usePartner as _ } from "../../../composables/usePartner.js";
|
|
11
|
+
import { useEditorStore as A } from "../../../stores/editor.js";
|
|
12
|
+
import { useOnboardingStore as H } from "../../../stores/onboarding.js";
|
|
13
|
+
import { usePreviewStore as M } from "../../../stores/preview.js";
|
|
14
|
+
const U = /* @__PURE__ */ f({
|
|
14
15
|
__name: "OnboardingWrapper",
|
|
15
16
|
emits: ["onboarding-finished"],
|
|
16
|
-
setup(
|
|
17
|
-
const o =
|
|
18
|
-
{ type: "newVersionPopup", component:
|
|
19
|
-
{ type: "genericOnboarding", component:
|
|
20
|
-
{ type: "textBlockOnboarding", component:
|
|
21
|
-
{ type: "versionHistoryOnboarding", component:
|
|
22
|
-
{ type: "ampOnboarding", component:
|
|
23
|
-
{ type: "itemsOnboarding", component:
|
|
24
|
-
{ type: "recommendationStrategyOnboarding", component:
|
|
25
|
-
|
|
17
|
+
setup(x, { emit: g }) {
|
|
18
|
+
const o = H(), r = A(), a = M(), { isTestPartner: s } = _(), m = e(() => r.isStripoInitialized), p = e(() => s()), d = [
|
|
19
|
+
{ type: "newVersionPopup", component: S },
|
|
20
|
+
{ type: "genericOnboarding", component: u },
|
|
21
|
+
{ type: "textBlockOnboarding", component: w },
|
|
22
|
+
{ type: "versionHistoryOnboarding", component: P },
|
|
23
|
+
{ type: "ampOnboarding", component: y },
|
|
24
|
+
{ type: "itemsOnboarding", component: v },
|
|
25
|
+
{ type: "recommendationStrategyOnboarding", component: h },
|
|
26
|
+
{ type: "recommendationLegacyStrategyOnboarding", component: l }
|
|
27
|
+
], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), b = e(() => d.filter((n) => c(n.type)));
|
|
26
28
|
return O(async () => {
|
|
27
29
|
await o.fetchUserModalState();
|
|
28
30
|
}), t(
|
|
@@ -31,7 +33,7 @@ const N = /* @__PURE__ */ b({
|
|
|
31
33
|
n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
|
|
32
34
|
}
|
|
33
35
|
), t(
|
|
34
|
-
() =>
|
|
36
|
+
() => a.emailFormat,
|
|
35
37
|
(n, i) => {
|
|
36
38
|
i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
37
39
|
}
|
|
@@ -40,9 +42,9 @@ const N = /* @__PURE__ */ b({
|
|
|
40
42
|
(n) => {
|
|
41
43
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
42
44
|
}
|
|
43
|
-
), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore:
|
|
45
|
+
), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
|
|
44
46
|
}
|
|
45
47
|
});
|
|
46
48
|
export {
|
|
47
|
-
|
|
49
|
+
U as default
|
|
48
50
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import s from "./RecommendationLegacyStrategyOnboarding.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import c from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var d = function() {
|
|
5
|
+
var t, n, r, a, i;
|
|
6
|
+
var o = this, g = o._self._c, e = o._self._setupProxy;
|
|
7
|
+
return e.isVisible ? g(e.InOnboard, { key: "guido__recommendation-legacy-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (t = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__recommendation-legacy-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": e.onboardingStore.onboardings.recommendationLegacyStrategyOnboarding.config, "pointer-position": (r = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (a = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : a.right, "top-position": (i = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : i.top }, on: { close: function(p) {
|
|
8
|
+
return e.onboardingStore.close(e.ONBOARDING_TYPE);
|
|
9
|
+
}, nextButtonClick: e.handleNext } }) : o._e();
|
|
10
|
+
}, m = [], l = /* @__PURE__ */ c(
|
|
11
|
+
s,
|
|
12
|
+
d,
|
|
13
|
+
m,
|
|
14
|
+
!1,
|
|
15
|
+
null,
|
|
16
|
+
"19d8cb42"
|
|
17
|
+
);
|
|
18
|
+
const f = l.exports;
|
|
19
|
+
export {
|
|
20
|
+
f as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent as d, computed as g, watch as l } from "vue";
|
|
2
|
+
import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { ACADEMY_LINKS as u } from "../../../enums/academy.js";
|
|
5
|
+
import { useOnboardingStore as y } from "../../../stores/onboarding.js";
|
|
6
|
+
import { InOnboard as f } from "@useinsider/design-system-vue";
|
|
7
|
+
const A = /* @__PURE__ */ d({
|
|
8
|
+
__name: "RecommendationLegacyStrategyOnboarding",
|
|
9
|
+
setup(O) {
|
|
10
|
+
const n = "recommendationLegacyStrategyOnboarding", o = p(), t = y(), { getTopPosition: i } = b(), r = `<a href="${u.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${o("action-builder.visit-academy")}</a>`, a = () => [
|
|
11
|
+
{
|
|
12
|
+
classes: "guido-recommendation-legacy-strategy-onboarding",
|
|
13
|
+
right: "40px",
|
|
14
|
+
top: i(485),
|
|
15
|
+
position: "Top Right",
|
|
16
|
+
title: o("email-editor.onboarding-recommendation-strategy-legacy-title"),
|
|
17
|
+
description: o("email-editor.onboarding-recommendation-strategy-legacy-description", {
|
|
18
|
+
academyLink: r
|
|
19
|
+
}),
|
|
20
|
+
imageSource: "",
|
|
21
|
+
backButtonClick: () => {
|
|
22
|
+
},
|
|
23
|
+
nextButtonType: "text",
|
|
24
|
+
nextButtonText: o("action-builder.ok"),
|
|
25
|
+
nextButtonClick: () => {
|
|
26
|
+
t.close(n);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
], s = g(
|
|
30
|
+
() => t.onboardings.recommendationLegacyStrategyOnboarding.config.length > 0 && t.onboardings.recommendationLegacyStrategyOnboarding.isActive
|
|
31
|
+
), m = () => {
|
|
32
|
+
var e, c;
|
|
33
|
+
(c = (e = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : e.nextButtonClick) == null || c.call(e);
|
|
34
|
+
};
|
|
35
|
+
return l(
|
|
36
|
+
() => t.isActive(n),
|
|
37
|
+
(e) => {
|
|
38
|
+
e && t.setConfig(n, a());
|
|
39
|
+
},
|
|
40
|
+
{ immediate: !0 }
|
|
41
|
+
), { __sfc: !0, ONBOARDING_TYPE: n, trans: o, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: s, handleNext: m, InOnboard: f };
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
A as default
|
|
46
|
+
};
|
|
@@ -2,9 +2,9 @@ import d from "./RecommendationStrategyOnboarding.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import g from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var m = function() {
|
|
5
|
-
var e, n, r,
|
|
5
|
+
var e, n, r, a, i;
|
|
6
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": (
|
|
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": (a = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : a.right, "top-position": (i = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : i.top }, on: { close: function(p) {
|
|
8
8
|
return o.onboardingStore.close(o.ONBOARDING_TYPE);
|
|
9
9
|
}, nextButtonClick: o.handleNext } }) : t._e();
|
|
10
10
|
}, c = [], _ = /* @__PURE__ */ g(
|
|
@@ -13,7 +13,7 @@ var m = function() {
|
|
|
13
13
|
c,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"1f4a4044"
|
|
17
17
|
);
|
|
18
18
|
const S = _.exports;
|
|
19
19
|
export {
|
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { ACADEMY_LINKS as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const h = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as c, computed as g, watch as b } from "vue";
|
|
2
|
+
import { useRibbonOffset as p } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as u } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { ACADEMY_LINKS as l } from "../../../enums/academy.js";
|
|
5
|
+
import { useOnboardingStore as f } from "../../../stores/onboarding.js";
|
|
6
|
+
import { InOnboard as O } from "@useinsider/design-system-vue";
|
|
7
|
+
const B = /* @__PURE__ */ c({
|
|
9
8
|
__name: "RecommendationStrategyOnboarding",
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
9
|
+
setup(_) {
|
|
10
|
+
const e = "recommendationStrategyOnboarding", n = u(), t = f(), { getTopPosition: i } = p(), r = `<a href="${l.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${n("action-builder.visit-academy")}</a>`, a = () => [
|
|
12
11
|
{
|
|
13
12
|
classes: "guido-recommendation-strategy-onboarding",
|
|
14
13
|
// Sits in the gap left of the settings panel and points at the strategy section, which
|
|
15
14
|
// starts 208px down: the panel header and its tab row are fixed chrome above it.
|
|
16
15
|
right: "426px",
|
|
17
|
-
top:
|
|
16
|
+
top: i(208),
|
|
18
17
|
position: "Right Top",
|
|
19
|
-
title:
|
|
20
|
-
description:
|
|
21
|
-
academyLink:
|
|
18
|
+
title: n("email-editor.onboarding-recommendation-strategy-title"),
|
|
19
|
+
description: n("email-editor.onboarding-recommendation-strategy-description", {
|
|
20
|
+
academyLink: r
|
|
22
21
|
}),
|
|
23
22
|
imageSource: "",
|
|
24
23
|
backButtonClick: () => {
|
|
25
24
|
},
|
|
26
25
|
nextButtonType: "text",
|
|
27
|
-
nextButtonText:
|
|
26
|
+
nextButtonText: n("action-builder.ok"),
|
|
28
27
|
nextButtonClick: () => {
|
|
29
|
-
t.close(
|
|
28
|
+
t.close(e);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
],
|
|
31
|
+
], m = g(() => t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
|
|
33
32
|
var o, s;
|
|
34
33
|
(s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
|
|
35
34
|
};
|
|
36
35
|
return b(
|
|
37
|
-
() => t.isActive(
|
|
36
|
+
() => t.isActive(e),
|
|
38
37
|
(o) => {
|
|
39
|
-
o && t.setConfig(
|
|
38
|
+
o && t.setConfig(e, a());
|
|
40
39
|
},
|
|
41
40
|
{ immediate: !0 }
|
|
42
|
-
), { __sfc: !0, ONBOARDING_TYPE:
|
|
41
|
+
), { __sfc: !0, ONBOARDING_TYPE: e, trans: n, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: m, handleNext: d, InOnboard: O };
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
B as default
|
|
47
46
|
};
|