@useinsider/guido 3.18.1-beta.74a13e4 → 3.18.1-beta.8d3bf29
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 +3 -1
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +55 -53
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +82 -57
- 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/onboarding/OnboardingWrapper.vue2.js +28 -24
- 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 +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +46 -0
- package/dist/composables/useCustomInterfaceAppearance.js +46 -42
- package/dist/composables/useLegacyStrategyConversion.js +54 -0
- package/dist/config/migrator/itemsBlockMigrator.js +137 -197
- package/dist/enums/extensions/recommendationBlock.js +2 -1
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +17 -18
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +105 -114
- package/dist/extensions/Blocks/Items/enums/productEnums.js +9 -14
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +9 -11
- package/dist/extensions/Blocks/Items/template.js +215 -224
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +70 -69
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +67 -28
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +98 -56
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +58 -0
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +61 -52
- package/dist/src/@types/config/schemas.d.ts +4 -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/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -3
- package/dist/src/extensions/Blocks/Items/template.d.ts +0 -19
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +54 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +39 -0
- package/dist/src/services/recommendationApi.d.ts +2 -1
- package/dist/src/stores/config.d.ts +160 -0
- package/dist/src/stores/onboarding.d.ts +808 -10
- 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 +70 -5
- package/dist/stores/config.js +66 -59
- package/dist/stores/onboarding.js +46 -36
- package/dist/utils/pairProductVariables.js +71 -71
- package/package.json +1 -1
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +0 -20
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +0 -44
|
@@ -24,7 +24,9 @@ const p = {
|
|
|
24
24
|
b(1, "userId is required")
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
|
-
variationId: e(t())
|
|
27
|
+
variationId: e(t()),
|
|
28
|
+
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
29
|
+
campaignId: e(t())
|
|
28
30
|
}), L = a({
|
|
29
31
|
/** Fallback font name (e.g., "Georgia") */
|
|
30
32
|
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(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
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(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : 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
|
+
"17b3c665"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const g = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
g as default
|
|
20
20
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { provideGuidoActions as
|
|
5
|
-
import { useGuidoStateBridge as
|
|
6
|
-
import { usePartner as
|
|
7
|
-
import { useStripo as
|
|
8
|
-
import { useTimerClone as
|
|
1
|
+
import { defineComponent as re, defineAsyncComponent as m, ref as O, computed as u, watch as P, onMounted as se, onUnmounted as ae } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as ce } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as le } from "../composables/usePartner.js";
|
|
7
|
+
import { useStripo as ue } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as pe } from "../composables/useTimerClone.js";
|
|
9
9
|
import { migrate as x } from "../config/migrator/index.js";
|
|
10
10
|
import { ModuleFolderDefaults as W } from "../enums/defaults.js";
|
|
11
|
-
import { RIBBON_SELECTOR as
|
|
11
|
+
import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
|
|
12
12
|
import { useRecommendationExtensionStore as G } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { useStripoApi as
|
|
21
|
-
import { useConfigStore as
|
|
22
|
-
import { useDynamicContentStore as
|
|
13
|
+
import ye from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import ge from "./organisms/base/Toaster.vue.js";
|
|
15
|
+
import ve from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
16
|
+
import Se from "./organisms/header/HeaderWrapper.vue.js";
|
|
17
|
+
import be from "./organisms/LoadingWrapper.vue.js";
|
|
18
|
+
import he from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
19
|
+
import Ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
20
|
+
import { useStripoApi as we } from "../services/stripoApi.js";
|
|
21
|
+
import { useConfigStore as Ce } from "../stores/config.js";
|
|
22
|
+
import { useDynamicContentStore as De } from "../stores/dynamic-content.js";
|
|
23
23
|
import { useEditorStore as H } from "../stores/editor.js";
|
|
24
|
-
import { usePreviewStore as
|
|
25
|
-
import { useTemplateStore as
|
|
26
|
-
import { useUnsubscribeStore as
|
|
24
|
+
import { usePreviewStore as ke } from "../stores/preview.js";
|
|
25
|
+
import { useTemplateStore as Te } from "../stores/template.js";
|
|
26
|
+
import { useUnsubscribeStore as Fe } from "../stores/unsubscribe.js";
|
|
27
27
|
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
28
|
-
const
|
|
28
|
+
const tt = /* @__PURE__ */ re({
|
|
29
29
|
__name: "Guido",
|
|
30
30
|
props: {
|
|
31
31
|
config: null,
|
|
@@ -33,23 +33,25 @@ const et = /* @__PURE__ */ ne({
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
35
|
setup(z, { expose: q, emit: r }) {
|
|
36
|
-
const a = z, K =
|
|
36
|
+
const a = z, K = m(
|
|
37
37
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
), V =
|
|
38
|
+
), V = m(
|
|
39
39
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
|
-
), j =
|
|
40
|
+
), j = m(
|
|
41
41
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
|
-
), J =
|
|
42
|
+
), J = m(
|
|
43
43
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
),
|
|
44
|
+
), Q = m(
|
|
45
|
+
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
46
|
+
), h = O(), p = O(), f = De(), E = Fe(), o = Ce();
|
|
45
47
|
a.ready && o.init(a.config);
|
|
46
|
-
const c = H(),
|
|
48
|
+
const c = H(), X = ke(), l = u(() => c.hasChanges), { isTestPartner: Y } = le(), w = () => {
|
|
47
49
|
var t;
|
|
48
50
|
return (t = h.value) == null ? void 0 : t.handleSave(!0);
|
|
49
51
|
}, C = (t) => {
|
|
50
52
|
c.loadingStatus = t;
|
|
51
53
|
};
|
|
52
|
-
|
|
54
|
+
ie(), me();
|
|
53
55
|
const y = () => {
|
|
54
56
|
var t, e;
|
|
55
57
|
return {
|
|
@@ -60,15 +62,15 @@ const et = /* @__PURE__ */ ne({
|
|
|
60
62
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || W.SAVED_MODULES,
|
|
61
63
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || W.DEFAULT_MODULES
|
|
62
64
|
};
|
|
63
|
-
}, { initPlugin: D, preloadRuntime: k } =
|
|
65
|
+
}, { initPlugin: D, preloadRuntime: k } = ue(), { runExclusive: T, beginMount: F, isCurrentMount: M } = ce();
|
|
64
66
|
let g = 0;
|
|
65
|
-
const { getDefaultTemplate:
|
|
67
|
+
const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks: R } = pe(), Z = u(() => {
|
|
66
68
|
var t;
|
|
67
69
|
return !((t = o.ui) != null && t.showHeader);
|
|
68
|
-
}),
|
|
70
|
+
}), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
|
|
69
71
|
() => !!G().recommendationConfigs.strategyId
|
|
70
72
|
);
|
|
71
|
-
|
|
73
|
+
de({
|
|
72
74
|
onBack: () => {
|
|
73
75
|
console.debug("guido:back"), r("back");
|
|
74
76
|
},
|
|
@@ -85,11 +87,11 @@ const et = /* @__PURE__ */ ne({
|
|
|
85
87
|
});
|
|
86
88
|
const B = (t) => {
|
|
87
89
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
88
|
-
},
|
|
90
|
+
}, U = () => {
|
|
89
91
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
90
92
|
};
|
|
91
|
-
P(() =>
|
|
92
|
-
r("on-change",
|
|
93
|
+
P(() => l.value, () => {
|
|
94
|
+
r("on-change", l.value);
|
|
93
95
|
});
|
|
94
96
|
const v = (t) => {
|
|
95
97
|
const e = t, { attribute: s, position: d } = e.detail;
|
|
@@ -98,36 +100,36 @@ const et = /* @__PURE__ */ ne({
|
|
|
98
100
|
let i = null;
|
|
99
101
|
const S = () => {
|
|
100
102
|
var e;
|
|
101
|
-
const t = document.querySelector(
|
|
103
|
+
const t = document.querySelector(fe);
|
|
102
104
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
103
105
|
}, b = async () => {
|
|
104
106
|
var t;
|
|
105
107
|
try {
|
|
106
108
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
107
|
-
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "",
|
|
109
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", A = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
108
110
|
E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
109
111
|
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
|
|
110
112
|
let n = {
|
|
111
113
|
html: s && await x(s, _),
|
|
112
114
|
css: d
|
|
113
115
|
};
|
|
114
|
-
n.html || (n = await
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
preselectedDynamicContentList:
|
|
116
|
+
n.html || (n = await I(), n.html = await x(n.html, _));
|
|
117
|
+
const oe = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
118
|
+
R(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, $(n.html)));
|
|
119
|
+
const ne = {
|
|
120
|
+
preselectedDynamicContentList: A,
|
|
119
121
|
onReady: () => {
|
|
120
122
|
console.debug("guido:ready"), r("ready");
|
|
121
123
|
}
|
|
122
124
|
};
|
|
123
|
-
g = F(), await D(n, y(),
|
|
125
|
+
g = F(), await D(n, y(), ne), f.selectedDynamicContentList = A;
|
|
124
126
|
} catch (e) {
|
|
125
127
|
console.error("Failed to initialize Stripo editor:", e);
|
|
126
128
|
}
|
|
127
129
|
};
|
|
128
|
-
return
|
|
130
|
+
return se(async () => {
|
|
129
131
|
var e;
|
|
130
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), G().$reset(), H().$reset(),
|
|
132
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), G().$reset(), H().$reset(), Te().$reset(), S();
|
|
131
133
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
132
134
|
if (t && (i = new ResizeObserver(S), i.observe(t)), k(), a.ready)
|
|
133
135
|
await b();
|
|
@@ -137,9 +139,9 @@ const et = /* @__PURE__ */ ne({
|
|
|
137
139
|
});
|
|
138
140
|
}
|
|
139
141
|
document.addEventListener("dynamic-content:open", v);
|
|
140
|
-
}),
|
|
142
|
+
}), ae(() => {
|
|
141
143
|
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), T(async () => {
|
|
142
|
-
if (
|
|
144
|
+
if (M(g))
|
|
143
145
|
try {
|
|
144
146
|
window.UIEditor.removeEditor();
|
|
145
147
|
} catch {
|
|
@@ -149,14 +151,14 @@ const et = /* @__PURE__ */ ne({
|
|
|
149
151
|
}), q({
|
|
150
152
|
dynamicContent: {
|
|
151
153
|
insert: B,
|
|
152
|
-
close:
|
|
154
|
+
close: U
|
|
153
155
|
},
|
|
154
|
-
hasChanges:
|
|
156
|
+
hasChanges: l,
|
|
155
157
|
saveSilent: w,
|
|
156
158
|
setLoading: C
|
|
157
|
-
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore:
|
|
159
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, runExclusive: T, beginMount: F, isCurrentMount: M, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: R, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: B, closeDynamicContent: U, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: be, SaveAsTemplateDrawer: he, UnsubscribeWrapper: Ee };
|
|
158
160
|
}
|
|
159
161
|
});
|
|
160
162
|
export {
|
|
161
|
-
|
|
163
|
+
tt as default
|
|
162
164
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import r from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
var
|
|
4
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
|
+
var a = function() {
|
|
6
6
|
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
7
7
|
return t.store.assignStrategyDrawerStatus ? s(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 [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, 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: { select: t.onSelect } })], 1)];
|
|
9
|
-
}, proxy: !0 }], null, !1,
|
|
10
|
-
}, n = [], i = /* @__PURE__ */
|
|
8
|
+
return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, loading: t.store.strategiesLoading || t.store.legacyConversionLoading, "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: { infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
9
|
+
}, proxy: !0 }], null, !1, 239334473) }) : e._e();
|
|
10
|
+
}, n = [], i = /* @__PURE__ */ o(
|
|
11
11
|
r,
|
|
12
|
-
|
|
12
|
+
a,
|
|
13
13
|
n,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"4019dc4d"
|
|
17
17
|
);
|
|
18
18
|
const y = i.exports;
|
|
19
19
|
export {
|
|
@@ -1,48 +1,73 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, defineAsyncComponent as T, ref as _, computed as s, watch as B } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
3
|
+
import { useLegacyStrategyConversion as I } from "../../../../composables/useLegacyStrategyConversion.js";
|
|
4
|
+
import { useToaster as N } from "../../../../composables/useToaster.js";
|
|
5
|
+
import { useTranslations as k } from "../../../../composables/useTranslations.js";
|
|
6
|
+
import { DOTTED_DATE_LOCALE as P } from "../../../../enums/date.js";
|
|
7
|
+
import { URLS as U } from "../../../../enums/extensions/recommendationBlock.js";
|
|
8
|
+
import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
|
|
9
|
+
import { useRecommendationExtensionStore as b } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
10
|
+
import G from "./StrategyInfoBoxContent.vue.js";
|
|
11
|
+
import { formatShortDate as M } from "../../../../utils/dateUtil.js";
|
|
12
|
+
import { asText as D } from "../../../../utils/genericUtil.js";
|
|
13
|
+
import { escapeHtml as x } from "../../../../utils/htmlEscape.js";
|
|
14
|
+
import { InSkeleton as R } from "@useinsider/design-system-vue";
|
|
15
|
+
const st = /* @__PURE__ */ h({
|
|
15
16
|
__name: "AssignStrategyDrawer",
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
render: (
|
|
19
|
-
}),
|
|
20
|
-
loader: async () => (await
|
|
17
|
+
setup(H) {
|
|
18
|
+
const l = () => import("@useinsider/design-system-organisms"), g = (t, a) => ({
|
|
19
|
+
render: (n) => n(R, { props: { sizing: { width: t, height: a } } })
|
|
20
|
+
}), O = T({
|
|
21
|
+
loader: async () => (await l()).OrgStrategyDetailModal,
|
|
21
22
|
loadingComponent: g(480, 240),
|
|
22
23
|
delay: 0
|
|
23
|
-
}),
|
|
24
|
-
loader: async () => (await
|
|
24
|
+
}), w = T({
|
|
25
|
+
loader: async () => (await l()).OrgStrategyDropdown,
|
|
25
26
|
loadingComponent: g(240, 42),
|
|
26
27
|
delay: 0
|
|
27
|
-
}),
|
|
28
|
-
|
|
28
|
+
}), r = k(), e = b(), { showToaster: i } = N(), { convertLegacyStrategy: u } = I(), o = _(null), y = "legacy", d = "guido__btn-update-legacy-strategy", c = _(!1), A = s(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: U.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
29
|
+
B(() => e.assignStrategyDrawerStatus, (t) => {
|
|
29
30
|
if (!t)
|
|
30
31
|
return;
|
|
31
|
-
const { strategyId:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type:
|
|
35
|
-
message:
|
|
32
|
+
const { strategyId: a } = e.recommendationConfigs;
|
|
33
|
+
o.value = a || (e.isLegacyStrategyBlock ? y : null), c.value = !1, e.fetchStrategies().catch(() => {
|
|
34
|
+
i({
|
|
35
|
+
type: p.Error,
|
|
36
|
+
message: r("discovery-strategy.error-description")
|
|
36
37
|
});
|
|
37
38
|
});
|
|
38
39
|
});
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
40
|
+
const f = (t) => {
|
|
41
|
+
const a = D(t.updated_at || t.created_at);
|
|
42
|
+
if (!a)
|
|
42
43
|
return "";
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
},
|
|
44
|
+
const n = M(a, P);
|
|
45
|
+
return r("recommendation-strategy.last-updated-on", { value: n });
|
|
46
|
+
}, S = s(() => ({
|
|
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) => ({
|
|
46
71
|
text: t.name,
|
|
47
72
|
value: t.strategy_id,
|
|
48
73
|
infoBoxProps: {
|
|
@@ -50,57 +75,57 @@ const W = /* @__PURE__ */ v({
|
|
|
50
75
|
theme: "light",
|
|
51
76
|
variant: "information",
|
|
52
77
|
className: "assign-strategy-info-box",
|
|
53
|
-
titleText:
|
|
78
|
+
titleText: x(D(t.name)),
|
|
54
79
|
descriptionStatus: !0,
|
|
55
|
-
descriptionText:
|
|
56
|
-
slot:
|
|
80
|
+
descriptionText: f(t),
|
|
81
|
+
slot: G,
|
|
57
82
|
slotProps: { strategy: t }
|
|
58
83
|
}
|
|
59
|
-
}))),
|
|
60
|
-
const t = e.strategies.find((
|
|
84
|
+
}))), C = s(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), v = s(() => {
|
|
85
|
+
const t = e.strategies.find((a) => String(a.strategy_id) === String(o.value ?? ""));
|
|
61
86
|
return t ? { ...t, fallback_config: null } : null;
|
|
62
|
-
}),
|
|
87
|
+
}), L = s(() => ({
|
|
63
88
|
primaryButton: {
|
|
64
89
|
styling: "solid",
|
|
65
90
|
type: "primary",
|
|
66
|
-
labelText:
|
|
91
|
+
labelText: r("products.assign-btn")
|
|
67
92
|
},
|
|
68
93
|
cancelOrBackButton: {
|
|
69
94
|
styling: "ghost",
|
|
70
95
|
type: "secondary",
|
|
71
|
-
labelText:
|
|
96
|
+
labelText: r("products.cancel")
|
|
72
97
|
}
|
|
73
98
|
}));
|
|
74
|
-
return { __sfc: !0, loadOrganisms:
|
|
99
|
+
return { __sfc: !0, loadOrganisms: l, skeleton: g, OrgStrategyDetailModal: O, OrgStrategyDropdown: w, trans: r, store: e, showToaster: i, convertLegacyStrategy: u, selectedStrategyId: o, LEGACY_OPTION_VALUE: y, LEGACY_UPDATE_BUTTON_ID: d, showSelectionError: c, drawerDescription: A, lastUpdatedText: f, legacyStrategyOption: S, onInfoBoxButtonClick: E, remoteStrategyOptions: m, strategyOptions: C, selectedStrategy: v, footerButtonGroupOptions: L, closeDrawer: () => {
|
|
75
100
|
e.closeAssignStrategyDrawer();
|
|
76
101
|
}, assignStrategy: async () => {
|
|
77
|
-
const t =
|
|
102
|
+
const t = v.value;
|
|
78
103
|
if (!t) {
|
|
79
|
-
|
|
104
|
+
c.value = !0;
|
|
80
105
|
return;
|
|
81
106
|
}
|
|
82
|
-
let
|
|
107
|
+
let a = "";
|
|
83
108
|
try {
|
|
84
|
-
|
|
85
|
-
} catch (
|
|
86
|
-
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed",
|
|
109
|
+
a = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
|
|
110
|
+
} catch (n) {
|
|
111
|
+
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
|
|
87
112
|
}
|
|
88
|
-
if (!
|
|
89
|
-
|
|
90
|
-
type:
|
|
91
|
-
message:
|
|
113
|
+
if (!a) {
|
|
114
|
+
i({
|
|
115
|
+
type: p.Error,
|
|
116
|
+
message: r("email-editor.strategy-assign-failed", { strategyName: t.name })
|
|
92
117
|
});
|
|
93
118
|
return;
|
|
94
119
|
}
|
|
95
|
-
e.assignStrategy(t),
|
|
96
|
-
type:
|
|
97
|
-
message:
|
|
120
|
+
e.assignStrategy(t), i({
|
|
121
|
+
type: p.Success,
|
|
122
|
+
message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
98
123
|
}), e.closeAssignStrategyDrawer();
|
|
99
124
|
}, onSelect: (t) => {
|
|
100
|
-
|
|
125
|
+
o.value = t.value, c.value = !1;
|
|
101
126
|
} };
|
|
102
127
|
}
|
|
103
128
|
});
|
|
104
129
|
export {
|
|
105
|
-
|
|
130
|
+
st as default
|
|
106
131
|
};
|
|
@@ -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,26 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import h from "./
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
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({
|
|
13
15
|
__name: "OnboardingWrapper",
|
|
14
16
|
emits: ["onboarding-finished"],
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
17
|
-
{ type: "newVersionPopup", component:
|
|
18
|
-
{ type: "genericOnboarding", component:
|
|
19
|
-
{ type: "textBlockOnboarding", component:
|
|
20
|
-
{ type: "versionHistoryOnboarding", component:
|
|
21
|
-
{ type: "ampOnboarding", component:
|
|
22
|
-
{ type: "itemsOnboarding", component:
|
|
23
|
-
|
|
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)));
|
|
24
28
|
return O(async () => {
|
|
25
29
|
await o.fetchUserModalState();
|
|
26
30
|
}), t(
|
|
@@ -29,7 +33,7 @@ const G = /* @__PURE__ */ b({
|
|
|
29
33
|
n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
|
|
30
34
|
}
|
|
31
35
|
), t(
|
|
32
|
-
() =>
|
|
36
|
+
() => a.emailFormat,
|
|
33
37
|
(n, i) => {
|
|
34
38
|
i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
35
39
|
}
|
|
@@ -38,9 +42,9 @@ const G = /* @__PURE__ */ b({
|
|
|
38
42
|
(n) => {
|
|
39
43
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
40
44
|
}
|
|
41
|
-
), { __sfc: !0, emit:
|
|
45
|
+
), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
|
|
42
46
|
}
|
|
43
47
|
});
|
|
44
48
|
export {
|
|
45
|
-
|
|
49
|
+
U as default
|
|
46
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
|
+
};
|