@useinsider/guido 3.18.0-beta.41e529d → 3.18.0-beta.88ff219
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/@types/config/schemas.js +1 -3
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +63 -65
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +9 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +76 -85
- 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 +46 -0
- package/dist/composables/useCustomInterfaceAppearance.js +42 -46
- package/dist/enums/extensions/recommendationBlock.js +35 -31
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +69 -70
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +33 -64
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +133 -113
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +52 -61
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +50 -54
- package/dist/src/services/recommendationApi.d.ts +1 -2
- package/dist/src/stores/config.d.ts +0 -160
- package/dist/src/stores/onboarding.d.ts +377 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +26 -74
- package/dist/stores/config.js +59 -66
- package/dist/stores/onboarding.js +41 -36
- package/package.json +1 -1
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
- package/dist/composables/useLegacyStrategyConversion.js +0 -52
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -58
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -39
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
- package/dist/static/assets/icons/line-info.svg.js +0 -5
- /package/dist/src/components/organisms/{extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts → onboarding/RecommendationStrategyOnboarding.vue.d.ts} +0 -0
|
@@ -24,9 +24,7 @@ const p = {
|
|
|
24
24
|
b(1, "userId is required")
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
|
-
variationId: e(t())
|
|
28
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
29
|
-
campaignId: e(t())
|
|
27
|
+
variationId: e(t())
|
|
30
28
|
}), L = a({
|
|
31
29
|
/** Fallback font name (e.g., "Georgia") */
|
|
32
30
|
name: t(),
|
|
@@ -3,7 +3,7 @@ import o from "./Guido.vue2.js";
|
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(),
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, s = [], n = /* @__PURE__ */ i(
|
|
@@ -12,9 +12,9 @@ var t = function() {
|
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"04935ba3"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { provideGuidoActions as
|
|
4
|
-
import { useGuidoStateBridge as
|
|
5
|
-
import { usePartner as
|
|
6
|
-
import { useStripo as
|
|
7
|
-
import { useTimerClone as
|
|
1
|
+
import { defineComponent as Z, defineAsyncComponent as l, ref as P, computed as u, watch as U, onMounted as ee, onUnmounted as te } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as ne } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as re } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as se } from "../composables/usePartner.js";
|
|
6
|
+
import { useStripo as ae } from "../composables/useStripo.js";
|
|
7
|
+
import { useTimerClone as ie } from "../composables/useTimerClone.js";
|
|
8
8
|
import { migrate as _ } from "../config/migrator/index.js";
|
|
9
9
|
import { ModuleFolderDefaults as N } from "../enums/defaults.js";
|
|
10
|
-
import { RIBBON_SELECTOR as
|
|
11
|
-
import { useRecommendationExtensionStore as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { useStripoApi as
|
|
20
|
-
import { useConfigStore as
|
|
21
|
-
import { useDynamicContentStore as
|
|
22
|
-
import { useEditorStore as
|
|
23
|
-
import { usePreviewStore as
|
|
24
|
-
import { useTemplateStore as
|
|
25
|
-
import { useUnsubscribeStore as
|
|
10
|
+
import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import de from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import me from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import ue from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import pe from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as ge } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as ve } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
|
|
22
|
+
import { useEditorStore as O } from "../stores/editor.js";
|
|
23
|
+
import { usePreviewStore as he } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as be } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
|
|
26
26
|
import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
|
|
27
|
-
const
|
|
27
|
+
const je = /* @__PURE__ */ Z({
|
|
28
28
|
__name: "Guido",
|
|
29
29
|
props: {
|
|
30
30
|
config: null,
|
|
@@ -32,25 +32,23 @@ const Je = /* @__PURE__ */ ee({
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
34
34
|
setup(x, { expose: G, emit: r }) {
|
|
35
|
-
const a = x, H =
|
|
35
|
+
const a = x, H = l(
|
|
36
36
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
37
|
-
), $ =
|
|
37
|
+
), $ = l(
|
|
38
38
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
39
|
-
), z =
|
|
39
|
+
), z = l(
|
|
40
40
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
41
|
-
), q =
|
|
41
|
+
), q = l(
|
|
42
42
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
43
|
-
),
|
|
44
|
-
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
45
|
-
), h = U(), p = U(), f = he(), b = we(), o = Se();
|
|
43
|
+
), b = P(), p = P(), f = Se(), E = Ee(), o = ve();
|
|
46
44
|
a.ready && o.init(a.config);
|
|
47
|
-
const c =
|
|
45
|
+
const c = O(), K = he(), m = u(() => c.hasChanges), { isTestPartner: V } = se(), w = () => {
|
|
48
46
|
var t;
|
|
49
|
-
return (t =
|
|
50
|
-
},
|
|
47
|
+
return (t = b.value) == null ? void 0 : t.handleSave(!0);
|
|
48
|
+
}, C = (t) => {
|
|
51
49
|
c.loadingStatus = t;
|
|
52
50
|
};
|
|
53
|
-
|
|
51
|
+
oe(), re();
|
|
54
52
|
const y = () => {
|
|
55
53
|
var t, e;
|
|
56
54
|
return {
|
|
@@ -61,13 +59,13 @@ const Je = /* @__PURE__ */ ee({
|
|
|
61
59
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
|
|
62
60
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
|
|
63
61
|
};
|
|
64
|
-
}, { initPlugin:
|
|
62
|
+
}, { initPlugin: D, preloadRuntime: k } = ae(), { getDefaultTemplate: T } = ge(), { cloneTimersOnSave: F, hasTimerBlocks: R } = ie(), j = u(() => {
|
|
65
63
|
var t;
|
|
66
64
|
return !((t = o.ui) != null && t.showHeader);
|
|
67
|
-
}),
|
|
68
|
-
() => !!
|
|
65
|
+
}), J = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Q = u(
|
|
66
|
+
() => !!h().recommendationConfigs.strategyId
|
|
69
67
|
);
|
|
70
|
-
|
|
68
|
+
ne({
|
|
71
69
|
onBack: () => {
|
|
72
70
|
console.debug("guido:back"), r("back");
|
|
73
71
|
},
|
|
@@ -84,11 +82,11 @@ const Je = /* @__PURE__ */ ee({
|
|
|
84
82
|
});
|
|
85
83
|
const I = (t) => {
|
|
86
84
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
87
|
-
},
|
|
85
|
+
}, L = () => {
|
|
88
86
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
89
87
|
};
|
|
90
|
-
|
|
91
|
-
r("on-change",
|
|
88
|
+
U(() => m.value, () => {
|
|
89
|
+
r("on-change", m.value);
|
|
92
90
|
});
|
|
93
91
|
const g = (t) => {
|
|
94
92
|
const e = t, { attribute: s, position: d } = e.detail;
|
|
@@ -97,47 +95,47 @@ const Je = /* @__PURE__ */ ee({
|
|
|
97
95
|
let i = null;
|
|
98
96
|
const v = () => {
|
|
99
97
|
var e;
|
|
100
|
-
const t = document.querySelector(
|
|
98
|
+
const t = document.querySelector(ce);
|
|
101
99
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
102
100
|
}, S = async () => {
|
|
103
101
|
var t;
|
|
104
102
|
try {
|
|
105
103
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
106
|
-
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "",
|
|
107
|
-
|
|
108
|
-
const
|
|
104
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", M = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
105
|
+
E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
106
|
+
const B = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, A = o.isFeatureEnabled("linkTrackingIds");
|
|
109
107
|
let n = {
|
|
110
|
-
html: s && await _(s,
|
|
108
|
+
html: s && await _(s, B),
|
|
111
109
|
css: d
|
|
112
110
|
};
|
|
113
|
-
n.html || (n = await
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
preselectedDynamicContentList:
|
|
111
|
+
n.html || (n = await T(), n.html = await _(n.html, B));
|
|
112
|
+
const X = A ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
113
|
+
R(n.html) && (n.html = await F(n.html)), A && (c.trackIdSessionFloor = Math.max(X, W(n.html)));
|
|
114
|
+
const Y = {
|
|
115
|
+
preselectedDynamicContentList: M,
|
|
118
116
|
onReady: () => {
|
|
119
117
|
console.debug("guido:ready"), r("ready");
|
|
120
118
|
}
|
|
121
119
|
};
|
|
122
|
-
await
|
|
120
|
+
await D(n, y(), Y), f.selectedDynamicContentList = M;
|
|
123
121
|
} catch (e) {
|
|
124
122
|
console.error("Failed to initialize Stripo editor:", e);
|
|
125
123
|
}
|
|
126
124
|
};
|
|
127
|
-
return
|
|
125
|
+
return ee(async () => {
|
|
128
126
|
var e;
|
|
129
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
127
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), O().$reset(), be().$reset(), v();
|
|
130
128
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
131
|
-
if (t && (i = new ResizeObserver(v), i.observe(t)),
|
|
129
|
+
if (t && (i = new ResizeObserver(v), i.observe(t)), k(), a.ready)
|
|
132
130
|
await S();
|
|
133
131
|
else {
|
|
134
|
-
const s =
|
|
132
|
+
const s = U(() => a.ready, (d) => {
|
|
135
133
|
d && (s(), S());
|
|
136
134
|
});
|
|
137
135
|
}
|
|
138
136
|
document.addEventListener("dynamic-content:open", g);
|
|
139
|
-
}),
|
|
140
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g);
|
|
137
|
+
}), te(() => {
|
|
138
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g), h().disposeStrategyPageReturn();
|
|
141
139
|
try {
|
|
142
140
|
window.UIEditor.removeEditor();
|
|
143
141
|
} catch {
|
|
@@ -147,14 +145,14 @@ const Je = /* @__PURE__ */ ee({
|
|
|
147
145
|
}), G({
|
|
148
146
|
dynamicContent: {
|
|
149
147
|
insert: I,
|
|
150
|
-
close:
|
|
148
|
+
close: L
|
|
151
149
|
},
|
|
152
|
-
hasChanges:
|
|
153
|
-
saveSilent:
|
|
154
|
-
setLoading:
|
|
155
|
-
}), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q,
|
|
150
|
+
hasChanges: m,
|
|
151
|
+
saveSilent: w,
|
|
152
|
+
setLoading: C
|
|
153
|
+
}), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, headerWrapperRef: b, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: K, hasChanges: m, isTestPartner: V, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, getDefaultTemplate: T, cloneTimersOnSave: F, hasTimerBlocks: R, noHeader: j, isRrsEnabled: J, hasAssignedStrategy: Q, insertDynamicContent: I, closeDynamicContent: L, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: de, Toaster: me, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ye };
|
|
156
154
|
}
|
|
157
155
|
});
|
|
158
156
|
export {
|
|
159
|
-
|
|
157
|
+
je as default
|
|
160
158
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
5
|
var a = function() {
|
|
6
|
-
var e = this,
|
|
7
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
8
|
-
return [
|
|
9
|
-
|
|
6
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return t.store.assignStrategyDrawerStatus ? r(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
|
|
8
|
+
return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(l) {
|
|
9
|
+
return t.store.openStrategyCreation();
|
|
10
|
+
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
11
|
+
}, proxy: !0 }], null, !1, 1517791821) }) : e._e();
|
|
10
12
|
}, n = [], i = /* @__PURE__ */ o(
|
|
11
|
-
|
|
13
|
+
s,
|
|
12
14
|
a,
|
|
13
15
|
n,
|
|
14
16
|
!1,
|
|
15
17
|
null,
|
|
16
|
-
"
|
|
18
|
+
"0b3e3cba"
|
|
17
19
|
);
|
|
18
20
|
const y = i.exports;
|
|
19
21
|
export {
|
|
@@ -1,73 +1,50 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, defineAsyncComponent as f, ref as S, computed as c, watch as T } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
|
|
3
|
+
import { useToaster as O } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as h } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { DOTTED_DATE_LOCALE as A } from "../../../../enums/date.js";
|
|
6
|
+
import { URLS as B } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
|
+
import { ToasterTypeOptions as y } from "../../../../enums/toaster.js";
|
|
9
8
|
import { useRecommendationExtensionStore as b } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
10
|
-
import
|
|
11
|
-
import { formatShortDate as
|
|
12
|
-
import { asText as
|
|
13
|
-
import { escapeHtml as
|
|
14
|
-
import { InSkeleton as
|
|
15
|
-
const
|
|
9
|
+
import N from "./StrategyInfoBoxContent.vue.js";
|
|
10
|
+
import { formatShortDate as k } from "../../../../utils/dateUtil.js";
|
|
11
|
+
import { asText as _ } from "../../../../utils/genericUtil.js";
|
|
12
|
+
import { escapeHtml as L } from "../../../../utils/htmlEscape.js";
|
|
13
|
+
import { InSkeleton as P } from "@useinsider/design-system-vue";
|
|
14
|
+
const Z = /* @__PURE__ */ I({
|
|
16
15
|
__name: "AssignStrategyDrawer",
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
render: (
|
|
20
|
-
}),
|
|
21
|
-
loader: async () => (await
|
|
22
|
-
loadingComponent:
|
|
16
|
+
setup(R) {
|
|
17
|
+
const g = () => import("@useinsider/design-system-organisms"), d = (t, r) => ({
|
|
18
|
+
render: (s) => s(P, { props: { sizing: { width: t, height: r } } })
|
|
19
|
+
}), D = f({
|
|
20
|
+
loader: async () => (await g()).OrgStrategyDetailModal,
|
|
21
|
+
loadingComponent: d(480, 240),
|
|
23
22
|
delay: 0
|
|
24
|
-
}),
|
|
25
|
-
loader: async () => (await
|
|
26
|
-
loadingComponent:
|
|
23
|
+
}), v = f({
|
|
24
|
+
loader: async () => (await g()).OrgStrategyDropdown,
|
|
25
|
+
loadingComponent: d(240, 42),
|
|
27
26
|
delay: 0
|
|
28
|
-
}),
|
|
29
|
-
|
|
27
|
+
}), i = "guido-edit-strategy-", a = h(), e = b(), { showToaster: l } = O(), o = S(null), n = S(!1), w = c(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: B.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : ""), m = () => {
|
|
28
|
+
e.lastCreatedStrategyId && (o.value = e.lastCreatedStrategyId, n.value = !1, e.lastCreatedStrategyId = null);
|
|
29
|
+
};
|
|
30
|
+
T(() => e.assignStrategyDrawerStatus, (t) => {
|
|
30
31
|
if (!t)
|
|
31
32
|
return;
|
|
32
|
-
const { strategyId:
|
|
33
|
-
o.value =
|
|
34
|
-
|
|
35
|
-
type:
|
|
36
|
-
message:
|
|
33
|
+
const { strategyId: r } = e.recommendationConfigs;
|
|
34
|
+
o.value = r || null, n.value = !1, e.fetchStrategies().then(m).catch(() => {
|
|
35
|
+
l({
|
|
36
|
+
type: y.Error,
|
|
37
|
+
message: a("discovery-strategy.error-description")
|
|
37
38
|
});
|
|
38
39
|
});
|
|
39
|
-
});
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
40
|
+
}), T(() => e.lastCreatedStrategyId, m);
|
|
41
|
+
const p = (t) => {
|
|
42
|
+
const r = _(t.updated_at || t.created_at);
|
|
43
|
+
if (!r)
|
|
43
44
|
return "";
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
text: r("ds-steps.legacy-strategy"),
|
|
48
|
-
value: y,
|
|
49
|
-
infoBoxProps: {
|
|
50
|
-
id: "strategy-info-legacy",
|
|
51
|
-
theme: "light",
|
|
52
|
-
variant: "information",
|
|
53
|
-
className: "assign-strategy-info-box",
|
|
54
|
-
titleText: x(r("ds-steps.legacy-strategy")),
|
|
55
|
-
descriptionStatus: !0,
|
|
56
|
-
descriptionText: r("statistics.legacy-strategy-description"),
|
|
57
|
-
buttonOptions: [{
|
|
58
|
-
id: d,
|
|
59
|
-
type: "primary",
|
|
60
|
-
text: r("ds-steps.update"),
|
|
61
|
-
loadingStatus: e.legacyConversionLoading,
|
|
62
|
-
disabledStatus: e.legacyConversionLoading
|
|
63
|
-
}]
|
|
64
|
-
}
|
|
65
|
-
})), E = async (t) => {
|
|
66
|
-
if ((t == null ? void 0 : t.id) !== d)
|
|
67
|
-
return;
|
|
68
|
-
const a = await u();
|
|
69
|
-
a && (o.value = a);
|
|
70
|
-
}, m = s(() => e.strategies.map((t) => ({
|
|
45
|
+
const s = k(r, A);
|
|
46
|
+
return a("recommendation-strategy.last-updated-on", { value: s });
|
|
47
|
+
}, x = c(() => e.strategies.map((t) => ({
|
|
71
48
|
text: t.name,
|
|
72
49
|
value: t.strategy_id,
|
|
73
50
|
infoBoxProps: {
|
|
@@ -75,57 +52,71 @@ const st = /* @__PURE__ */ h({
|
|
|
75
52
|
theme: "light",
|
|
76
53
|
variant: "information",
|
|
77
54
|
className: "assign-strategy-info-box",
|
|
78
|
-
titleText:
|
|
55
|
+
titleText: L(_(t.name)),
|
|
79
56
|
descriptionStatus: !0,
|
|
80
|
-
descriptionText:
|
|
81
|
-
slot:
|
|
82
|
-
slotProps: { strategy: t }
|
|
57
|
+
descriptionText: p(t),
|
|
58
|
+
slot: N,
|
|
59
|
+
slotProps: { strategy: t },
|
|
60
|
+
// The info box drops the option's value/text, so the id is the only channel
|
|
61
|
+
// that can carry the strategy back to the click handler.
|
|
62
|
+
buttonOptions: [{
|
|
63
|
+
id: `${i}${t.strategy_id}`,
|
|
64
|
+
text: a("eureka.edit-strategy"),
|
|
65
|
+
type: "text",
|
|
66
|
+
// Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
|
|
67
|
+
// silently render blank space instead of failing.
|
|
68
|
+
icon: "line-open-website"
|
|
69
|
+
}]
|
|
83
70
|
}
|
|
84
|
-
}))), C =
|
|
85
|
-
|
|
71
|
+
}))), C = (t) => {
|
|
72
|
+
var s;
|
|
73
|
+
const r = (s = t == null ? void 0 : t.id) != null && s.startsWith(i) ? t.id.slice(i.length) : "";
|
|
74
|
+
r && e.openStrategyEdit(r);
|
|
75
|
+
}, u = c(() => {
|
|
76
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(o.value ?? ""));
|
|
86
77
|
return t ? { ...t, fallback_config: null } : null;
|
|
87
|
-
}),
|
|
78
|
+
}), E = c(() => ({
|
|
88
79
|
primaryButton: {
|
|
89
80
|
styling: "solid",
|
|
90
81
|
type: "primary",
|
|
91
|
-
labelText:
|
|
82
|
+
labelText: a("products.assign-btn")
|
|
92
83
|
},
|
|
93
84
|
cancelOrBackButton: {
|
|
94
85
|
styling: "ghost",
|
|
95
86
|
type: "secondary",
|
|
96
|
-
labelText:
|
|
87
|
+
labelText: a("products.cancel")
|
|
97
88
|
}
|
|
98
89
|
}));
|
|
99
|
-
return { __sfc: !0, loadOrganisms:
|
|
90
|
+
return { __sfc: !0, loadOrganisms: g, skeleton: d, OrgStrategyDetailModal: D, OrgStrategyDropdown: v, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: l, selectedStrategyId: o, showSelectionError: n, drawerDescription: w, consumeLastCreatedStrategy: m, lastUpdatedText: p, strategyOptions: x, onInfoBoxButtonClick: C, selectedStrategy: u, footerButtonGroupOptions: E, closeDrawer: () => {
|
|
100
91
|
e.closeAssignStrategyDrawer();
|
|
101
92
|
}, assignStrategy: async () => {
|
|
102
|
-
const t =
|
|
93
|
+
const t = u.value;
|
|
103
94
|
if (!t) {
|
|
104
|
-
|
|
95
|
+
n.value = !0;
|
|
105
96
|
return;
|
|
106
97
|
}
|
|
107
|
-
let
|
|
98
|
+
let r = "";
|
|
108
99
|
try {
|
|
109
|
-
|
|
110
|
-
} catch (
|
|
111
|
-
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed",
|
|
100
|
+
r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
|
|
101
|
+
} catch (s) {
|
|
102
|
+
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", s);
|
|
112
103
|
}
|
|
113
|
-
if (!
|
|
114
|
-
|
|
115
|
-
type:
|
|
116
|
-
message:
|
|
104
|
+
if (!r) {
|
|
105
|
+
l({
|
|
106
|
+
type: y.Error,
|
|
107
|
+
message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
|
|
117
108
|
});
|
|
118
109
|
return;
|
|
119
110
|
}
|
|
120
|
-
e.assignStrategy(t),
|
|
121
|
-
type:
|
|
122
|
-
message:
|
|
111
|
+
e.assignStrategy(t), l({
|
|
112
|
+
type: y.Success,
|
|
113
|
+
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
123
114
|
}), e.closeAssignStrategyDrawer();
|
|
124
115
|
}, onSelect: (t) => {
|
|
125
|
-
o.value = t.value,
|
|
116
|
+
o.value = t.value, n.value = !1;
|
|
126
117
|
} };
|
|
127
118
|
}
|
|
128
119
|
});
|
|
129
120
|
export {
|
|
130
|
-
|
|
121
|
+
Z as default
|
|
131
122
|
};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
|
|
2
2
|
import u from "./AMPOnboarding.vue.js";
|
|
3
3
|
import v from "./GenericOnboarding.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import S from "./
|
|
7
|
-
import h from "./
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
4
|
+
import y from "./ItemsOnboarding.vue.js";
|
|
5
|
+
import l from "./NewVersionPopup.vue.js";
|
|
6
|
+
import S from "./RecommendationStrategyOnboarding.vue.js";
|
|
7
|
+
import h from "./TextBlockOnboarding.vue.js";
|
|
8
|
+
import w from "./VersionHistoryOnboarding.vue.js";
|
|
9
|
+
import { usePartner as P } from "../../../composables/usePartner.js";
|
|
10
|
+
import { useEditorStore as _ } from "../../../stores/editor.js";
|
|
11
|
+
import { useOnboardingStore as A } from "../../../stores/onboarding.js";
|
|
12
|
+
import { usePreviewStore as H } from "../../../stores/preview.js";
|
|
13
|
+
const N = /* @__PURE__ */ b({
|
|
13
14
|
__name: "OnboardingWrapper",
|
|
14
15
|
emits: ["onboarding-finished"],
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
17
|
-
{ type: "newVersionPopup", component:
|
|
16
|
+
setup(M, { emit: g }) {
|
|
17
|
+
const o = A(), r = _(), s = H(), { isTestPartner: a } = P(), m = e(() => r.isStripoInitialized), p = e(() => a()), d = [
|
|
18
|
+
{ type: "newVersionPopup", component: l },
|
|
18
19
|
{ type: "genericOnboarding", component: v },
|
|
19
|
-
{ type: "textBlockOnboarding", component:
|
|
20
|
-
{ type: "versionHistoryOnboarding", component:
|
|
20
|
+
{ type: "textBlockOnboarding", component: h },
|
|
21
|
+
{ type: "versionHistoryOnboarding", component: w },
|
|
21
22
|
{ type: "ampOnboarding", component: u },
|
|
22
|
-
{ type: "itemsOnboarding", component:
|
|
23
|
-
|
|
23
|
+
{ type: "itemsOnboarding", component: y },
|
|
24
|
+
{ type: "recommendationStrategyOnboarding", component: S }
|
|
25
|
+
], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => d.filter((n) => c(n.type)));
|
|
24
26
|
return O(async () => {
|
|
25
27
|
await o.fetchUserModalState();
|
|
26
28
|
}), t(
|
|
@@ -38,9 +40,9 @@ const G = /* @__PURE__ */ b({
|
|
|
38
40
|
(n) => {
|
|
39
41
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
40
42
|
}
|
|
41
|
-
), { __sfc: !0, emit:
|
|
43
|
+
), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: f };
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
N as default
|
|
46
48
|
};
|
|
@@ -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, a, i;
|
|
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": (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
|
+
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
|
+
"1f4a4044"
|
|
17
|
+
);
|
|
18
|
+
const S = _.exports;
|
|
19
|
+
export {
|
|
20
|
+
S as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
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({
|
|
8
|
+
__name: "RecommendationStrategyOnboarding",
|
|
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 = () => [
|
|
11
|
+
{
|
|
12
|
+
classes: "guido-recommendation-strategy-onboarding",
|
|
13
|
+
// Sits in the gap left of the settings panel and points at the strategy section, which
|
|
14
|
+
// starts 208px down: the panel header and its tab row are fixed chrome above it.
|
|
15
|
+
right: "426px",
|
|
16
|
+
top: i(208),
|
|
17
|
+
position: "Right Top",
|
|
18
|
+
title: n("email-editor.onboarding-recommendation-strategy-title"),
|
|
19
|
+
description: n("email-editor.onboarding-recommendation-strategy-description", {
|
|
20
|
+
academyLink: r
|
|
21
|
+
}),
|
|
22
|
+
imageSource: "",
|
|
23
|
+
backButtonClick: () => {
|
|
24
|
+
},
|
|
25
|
+
nextButtonType: "text",
|
|
26
|
+
nextButtonText: n("action-builder.ok"),
|
|
27
|
+
nextButtonClick: () => {
|
|
28
|
+
t.close(e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
], m = g(() => t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
|
|
32
|
+
var o, s;
|
|
33
|
+
(s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
|
|
34
|
+
};
|
|
35
|
+
return b(
|
|
36
|
+
() => t.isActive(e),
|
|
37
|
+
(o) => {
|
|
38
|
+
o && t.setConfig(e, a());
|
|
39
|
+
},
|
|
40
|
+
{ immediate: !0 }
|
|
41
|
+
), { __sfc: !0, ONBOARDING_TYPE: e, trans: n, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: m, handleNext: d, InOnboard: O };
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
B as default
|
|
46
|
+
};
|