@useinsider/guido 3.26.0-beta.7d59071 → 3.26.0-beta.a188943
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +46 -45
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +5 -6
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +19 -18
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +15 -15
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +28 -27
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +42 -27
- package/dist/composables/useCustomInterfaceAppearance.js +50 -50
- package/dist/composables/useFullStoryBridge.js +10 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +14 -14
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -40
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +15 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +17 -15
- package/dist/extensions/Blocks/common-control.js +25 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -17
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/stores/onboarding.d.ts +1 -0
- package/dist/src/utils/editorShadowRoot.d.ts +1 -0
- package/dist/stores/onboarding.js +4 -1
- package/dist/utils/editorShadowRoot.js +8 -0
- package/package.json +12 -4
- package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +0 -11
- package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +0 -7
- package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +0 -16
- package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -15
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ye, defineAsyncComponent as a, ref as W, computed as l, watch as G, onMounted as be, onUnmounted as ve } from "vue";
|
|
2
2
|
import { useCortexBlueprintBridge as Se } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { useEditorLock as he } from "../composables/useEditorLock.js";
|
|
4
4
|
import { startEditorOpenMetrics as Ee } from "../composables/useEditorOpenMetrics.js";
|
|
@@ -9,12 +9,12 @@ import { useSaveValidationRollout as Te } from "../composables/useSaveValidation
|
|
|
9
9
|
import { useStripo as ke } from "../composables/useStripo.js";
|
|
10
10
|
import { useTimerClone as Fe } from "../composables/useTimerClone.js";
|
|
11
11
|
import { useToaster as Ie } from "../composables/useToaster.js";
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { migrate as
|
|
12
|
+
import { useTranslations as Le } from "../composables/useTranslations.js";
|
|
13
|
+
import { migrate as Me } from "../config/migrator/index.js";
|
|
14
14
|
import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
|
|
15
|
-
import { RIBBON_SELECTOR as
|
|
16
|
-
import { ToasterTypeOptions as
|
|
17
|
-
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as
|
|
15
|
+
import { RIBBON_SELECTOR as Re } from "../enums/onboarding.js";
|
|
16
|
+
import { ToasterTypeOptions as Oe } from "../enums/toaster.js";
|
|
17
|
+
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Ue } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
18
18
|
import { disposeUnsubscribeListeners as Ne } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
19
19
|
import { disposeDisplayConditionRequest as _e } from "../extensions/DisplayConditions/bridge.js";
|
|
20
20
|
import Ae from "./organisms/AutoSaveController.vue.js";
|
|
@@ -30,19 +30,20 @@ import { useStripoApi as ze } from "../services/stripoApi.js";
|
|
|
30
30
|
import { useConfigStore as qe } from "../stores/config.js";
|
|
31
31
|
import { useDynamicContentStore as Ke } from "../stores/dynamic-content.js";
|
|
32
32
|
import { useEditorStore as C } from "../stores/editor.js";
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
33
|
+
import { useOnboardingStore as je } from "../stores/onboarding.js";
|
|
34
|
+
import { usePreviewStore as Je } from "../stores/preview.js";
|
|
35
|
+
import { useSaveValidationStore as Qe } from "../stores/save-validation.js";
|
|
36
|
+
import { useTemplateStore as Xe } from "../stores/template.js";
|
|
37
|
+
import { useUnsubscribeStore as Ye } from "../stores/unsubscribe.js";
|
|
37
38
|
import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
|
|
38
|
-
const
|
|
39
|
+
const Pt = /* @__PURE__ */ ye({
|
|
39
40
|
__name: "Guido",
|
|
40
41
|
props: {
|
|
41
42
|
config: null,
|
|
42
43
|
ready: { type: Boolean, default: !0 }
|
|
43
44
|
},
|
|
44
45
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
45
|
-
setup(K, { expose: j, emit:
|
|
46
|
+
setup(K, { expose: j, emit: i }) {
|
|
46
47
|
const c = K, r = Ee(), J = a(
|
|
47
48
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
48
49
|
), Q = a(
|
|
@@ -57,19 +58,19 @@ const _t = /* @__PURE__ */ ge({
|
|
|
57
58
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
58
59
|
), te = a(
|
|
59
60
|
() => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
|
|
60
|
-
),
|
|
61
|
+
), g = W(), y = Ke(), w = Ye(), o = qe();
|
|
61
62
|
c.ready && o.init(c.config);
|
|
62
|
-
const d = C(), oe =
|
|
63
|
+
const d = C(), oe = Je(), p = l(() => d.hasChanges), { isTestPartner: ne } = we(), { isEnabled: re, loadRollout: T } = Te(), { showToaster: k } = Ie(), F = Le(), I = () => {
|
|
63
64
|
var t;
|
|
64
65
|
if (d.isVersionHistoryOpen) {
|
|
65
66
|
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), k({
|
|
66
|
-
type:
|
|
67
|
+
type: Oe.Warning,
|
|
67
68
|
message: F("email-editor.save-blocked-outside-editor")
|
|
68
69
|
});
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
72
|
return (t = D.value) == null ? void 0 : t.saveSilent();
|
|
72
|
-
},
|
|
73
|
+
}, L = (t) => {
|
|
73
74
|
d.loadingStatus = t;
|
|
74
75
|
};
|
|
75
76
|
Se(), De();
|
|
@@ -83,48 +84,48 @@ const _t = /* @__PURE__ */ ge({
|
|
|
83
84
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
|
|
84
85
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
|
|
85
86
|
};
|
|
86
|
-
}, { initPlugin:
|
|
87
|
+
}, { initPlugin: M, preloadRuntime: R } = ke(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = he();
|
|
87
88
|
let f = 0;
|
|
88
|
-
const { getDefaultTemplate: N } = ze(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Fe(),
|
|
89
|
+
const { getDefaultTemplate: N } = ze(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Fe(), ie = l(() => {
|
|
89
90
|
var t;
|
|
90
91
|
return !((t = o.ui) != null && t.showHeader);
|
|
91
|
-
}),
|
|
92
|
+
}), se = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ae = l(() => o.externalDisplayConditions), ce = l(
|
|
92
93
|
() => o.isFeatureEnabled("legacyUnsubscribeConversion")
|
|
93
94
|
), de = l(
|
|
94
95
|
() => !!z().recommendationConfigs.strategyId
|
|
95
96
|
);
|
|
96
97
|
Ce({
|
|
97
98
|
onBack: () => {
|
|
98
|
-
console.debug("guido:back"),
|
|
99
|
+
console.debug("guido:back"), i("back");
|
|
99
100
|
},
|
|
100
101
|
onSaveStart: () => {
|
|
101
|
-
console.debug("guido:save:start"),
|
|
102
|
+
console.debug("guido:save:start"), i("save:start");
|
|
102
103
|
},
|
|
103
104
|
onSaveComplete: (t) => {
|
|
104
105
|
const e = { ...t, metadata: b() };
|
|
105
|
-
console.debug("guido:save:complete", e),
|
|
106
|
+
console.debug("guido:save:complete", e), i("save:complete", e);
|
|
106
107
|
},
|
|
107
108
|
onTestEmailClick: () => {
|
|
108
|
-
console.debug("guido:test-email:click"),
|
|
109
|
+
console.debug("guido:test-email:click"), i("test-email:click");
|
|
109
110
|
}
|
|
110
111
|
});
|
|
111
112
|
const P = (t) => {
|
|
112
|
-
console.debug("dynamic-content:close", t),
|
|
113
|
+
console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
113
114
|
}, x = () => {
|
|
114
115
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
115
116
|
};
|
|
116
117
|
G(() => p.value, () => {
|
|
117
|
-
|
|
118
|
+
i("on-change", p.value);
|
|
118
119
|
});
|
|
119
120
|
const S = (t) => {
|
|
120
|
-
const e = t, { attribute:
|
|
121
|
-
console.debug("dynamic-content:open", e.detail),
|
|
121
|
+
const e = t, { attribute: s, position: u } = e.detail;
|
|
122
|
+
console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, u);
|
|
122
123
|
};
|
|
123
124
|
let m = null;
|
|
124
125
|
const h = () => {
|
|
125
126
|
var e;
|
|
126
|
-
const t = document.querySelector(
|
|
127
|
-
(e =
|
|
127
|
+
const t = document.querySelector(Re);
|
|
128
|
+
(e = g.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
128
129
|
}, E = async () => {
|
|
129
130
|
var t;
|
|
130
131
|
r.mark("host_ready");
|
|
@@ -135,7 +136,7 @@ const _t = /* @__PURE__ */ ge({
|
|
|
135
136
|
templateId: o.templateId,
|
|
136
137
|
variationId: o.variationId
|
|
137
138
|
});
|
|
138
|
-
const e = o.template,
|
|
139
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
139
140
|
w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
140
141
|
const me = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), le = {
|
|
141
142
|
partnerName: o.partnerName,
|
|
@@ -143,12 +144,12 @@ const _t = /* @__PURE__ */ ge({
|
|
|
143
144
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
144
145
|
}, ue = {
|
|
145
146
|
itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
|
|
146
|
-
}, V = (
|
|
147
|
+
}, V = (ge) => r.timed(
|
|
147
148
|
"migration",
|
|
148
|
-
() =>
|
|
149
|
+
() => Me(ge, me, le, ue)
|
|
149
150
|
);
|
|
150
151
|
let n = {
|
|
151
|
-
html:
|
|
152
|
+
html: s && await V(s),
|
|
152
153
|
css: u
|
|
153
154
|
};
|
|
154
155
|
n.html || (n = await r.timed("default_template", () => N()), n.html = await V(n.html));
|
|
@@ -157,28 +158,28 @@ const _t = /* @__PURE__ */ ge({
|
|
|
157
158
|
const fe = {
|
|
158
159
|
preselectedDynamicContentList: B,
|
|
159
160
|
onReady: () => {
|
|
160
|
-
console.debug("guido:ready"),
|
|
161
|
+
console.debug("guido:ready"), i("ready");
|
|
161
162
|
}
|
|
162
163
|
};
|
|
163
|
-
f =
|
|
164
|
+
f = U(), await M(n, b(), fe, n.html !== s), y.selectedDynamicContentList = B;
|
|
164
165
|
} catch (e) {
|
|
165
166
|
console.error("Failed to initialize Stripo editor:", e), r.markFailed();
|
|
166
167
|
}
|
|
167
168
|
};
|
|
168
169
|
return be(async () => {
|
|
169
170
|
var e;
|
|
170
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(),
|
|
171
|
-
const t = (e =
|
|
172
|
-
if (t && (m = new ResizeObserver(h), m.observe(t)),
|
|
171
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), Xe().$reset(), Qe().$reset(), je().resetOnboarding("recommendationLegacyStrategyOnboarding"), T(), h();
|
|
172
|
+
const t = (e = g.value) == null ? void 0 : e.parentElement;
|
|
173
|
+
if (t && (m = new ResizeObserver(h), m.observe(t)), R(), c.ready)
|
|
173
174
|
await E();
|
|
174
175
|
else {
|
|
175
|
-
const
|
|
176
|
-
u && (
|
|
176
|
+
const s = G(() => c.ready, (u) => {
|
|
177
|
+
u && (s(), E());
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
180
|
document.addEventListener("dynamic-content:open", S);
|
|
180
181
|
}), ve(() => {
|
|
181
|
-
if (Ne(),
|
|
182
|
+
if (Ne(), Ue(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
|
|
182
183
|
_e();
|
|
183
184
|
try {
|
|
184
185
|
const t = C();
|
|
@@ -187,7 +188,7 @@ const _t = /* @__PURE__ */ ge({
|
|
|
187
188
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
|
-
|
|
191
|
+
O(async () => {
|
|
191
192
|
if (v(f))
|
|
192
193
|
try {
|
|
193
194
|
window.UIEditor.removeEditor();
|
|
@@ -202,10 +203,10 @@ const _t = /* @__PURE__ */ ge({
|
|
|
202
203
|
},
|
|
203
204
|
hasChanges: p,
|
|
204
205
|
saveSilent: I,
|
|
205
|
-
setLoading:
|
|
206
|
-
}), { __sfc: !0, openMetrics: r, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, DisplayConditionsHost: Z, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: ee, LegacyUnsubscribeConvertedModal: te, wrapperRef:
|
|
206
|
+
setLoading: L
|
|
207
|
+
}), { __sfc: !0, openMetrics: r, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, DisplayConditionsHost: Z, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: ee, LegacyUnsubscribeConvertedModal: te, wrapperRef: g, dynamicContentStore: y, unsubscribeStore: w, props: c, configStore: o, editorStore: d, previewStore: oe, hasChanges: p, isTestPartner: ne, isSaveValidationEnabled: re, loadRollout: T, showToaster: k, trans: F, saveSilent: I, setLoading: L, emit: i, buildMetadata: b, initPlugin: M, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: ie, isRrsEnabled: se, isExternalDisplayConditionsEnabled: ae, isLegacyUnsubscribeConversionEnabled: ce, hasAssignedStrategy: de, insertDynamicContent: P, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Ae, AuthErrorModal: Pe, Toaster: xe, FilterSelectionDrawer: Be, HeaderWrapper: He, LoadingWrapper: Ve, SaveAsTemplateDrawer: We, UnsubscribeWrapper: Ge, ValidationErrorDrawer: $e };
|
|
207
208
|
}
|
|
208
209
|
});
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
Pt as default
|
|
211
212
|
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import s from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
3
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
4
|
var a = function() {
|
|
6
5
|
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
7
6
|
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 || 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: { create: function(l) {
|
|
7
|
+
return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select w-23-s", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", 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: { create: function(l) {
|
|
9
8
|
return t.store.openStrategyCreation();
|
|
10
9
|
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
11
|
-
}, proxy: !0 }], null, !1,
|
|
10
|
+
}, proxy: !0 }], null, !1, 2696846898) }) : e._e();
|
|
12
11
|
}, n = [], i = /* @__PURE__ */ o(
|
|
13
12
|
s,
|
|
14
13
|
a,
|
|
15
14
|
n,
|
|
16
15
|
!1,
|
|
17
16
|
null,
|
|
18
|
-
|
|
17
|
+
null
|
|
19
18
|
);
|
|
20
|
-
const
|
|
19
|
+
const u = i.exports;
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
u as default
|
|
23
22
|
};
|
|
@@ -2,8 +2,8 @@ import { defineComponent as B, defineAsyncComponent as T, ref as w, computed as
|
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
3
|
import { useToaster as b } from "../../../../composables/useToaster.js";
|
|
4
4
|
import { useTranslations as L } from "../../../../composables/useTranslations.js";
|
|
5
|
-
import { DOTTED_DATE_LOCALE as
|
|
6
|
-
import { URLS as
|
|
5
|
+
import { DOTTED_DATE_LOCALE as R } from "../../../../enums/date.js";
|
|
6
|
+
import { URLS as N } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
7
|
import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
|
|
8
8
|
import { useRecommendationExtensionStore as P } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
9
|
import { commitStrategyChange as D } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
@@ -12,23 +12,23 @@ import { formatShortDate as M } from "../../../../utils/dateUtil.js";
|
|
|
12
12
|
import { asText as O } from "../../../../utils/genericUtil.js";
|
|
13
13
|
import { escapeHtml as G } from "../../../../utils/htmlEscape.js";
|
|
14
14
|
import { InSkeleton as $ } from "@useinsider/design-system-vue";
|
|
15
|
-
const
|
|
15
|
+
const ot = /* @__PURE__ */ B({
|
|
16
16
|
__name: "AssignStrategyDrawer",
|
|
17
|
-
setup(
|
|
17
|
+
setup(z) {
|
|
18
18
|
const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
|
|
19
|
-
render: (
|
|
19
|
+
render: (s) => s($, { props: { sizing: { width: t, height: r } } })
|
|
20
20
|
}), E = T({
|
|
21
21
|
loader: async () => (await g()).OrgStrategyDetailModal,
|
|
22
22
|
loadingComponent: p(480, 240),
|
|
23
23
|
delay: 0
|
|
24
24
|
}), I = T({
|
|
25
25
|
loader: async () => (await g()).OrgStrategyDropdown
|
|
26
|
-
}), i = "guido-edit-strategy-", a = L(), e = P(), { showToaster: c } = b(),
|
|
26
|
+
}), i = "guido-edit-strategy-", a = L(), e = P(), { showToaster: c } = b(), o = w(null), m = "legacy", l = w(!1), x = n(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: N.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
27
27
|
k(() => e.assignStrategyDrawerStatus, (t) => {
|
|
28
28
|
if (!t)
|
|
29
29
|
return;
|
|
30
30
|
const { strategyId: r } = e.recommendationConfigs;
|
|
31
|
-
|
|
31
|
+
o.value = r || (e.isLegacyStrategyBlock ? m : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
|
|
32
32
|
c({
|
|
33
33
|
type: u.Error,
|
|
34
34
|
message: a("discovery-strategy.error-description")
|
|
@@ -39,8 +39,8 @@ const st = /* @__PURE__ */ B({
|
|
|
39
39
|
const r = O(t.updated_at || t.created_at);
|
|
40
40
|
if (!r)
|
|
41
41
|
return "";
|
|
42
|
-
const
|
|
43
|
-
return a("recommendation-strategy.last-updated-on", { value:
|
|
42
|
+
const s = M(r, R);
|
|
43
|
+
return a("recommendation-strategy.last-updated-on", { value: s });
|
|
44
44
|
}, S = n(() => ({
|
|
45
45
|
text: a("ds-steps.legacy-strategy"),
|
|
46
46
|
value: m,
|
|
@@ -52,7 +52,8 @@ const st = /* @__PURE__ */ B({
|
|
|
52
52
|
id: `strategy-info-${t.strategy_id}`,
|
|
53
53
|
theme: "light",
|
|
54
54
|
variant: "information",
|
|
55
|
-
|
|
55
|
+
size: "small",
|
|
56
|
+
class: "assign-strategy-info-box",
|
|
56
57
|
titleText: G(O(t.name)),
|
|
57
58
|
descriptionStatus: !0,
|
|
58
59
|
descriptionText: f(t),
|
|
@@ -74,10 +75,10 @@ const st = /* @__PURE__ */ B({
|
|
|
74
75
|
const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
|
|
75
76
|
if (!r)
|
|
76
77
|
return;
|
|
77
|
-
const
|
|
78
|
-
e.openStrategyEdit(r) && (String(
|
|
78
|
+
const s = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
|
|
79
|
+
e.openStrategyEdit(r) && (String(o.value ?? "") === r && (o.value = null), y && (e.removeStrategy(), s !== null && D(s, "Removed recommendation strategy")));
|
|
79
80
|
}, v = n(() => {
|
|
80
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(
|
|
81
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(o.value ?? ""));
|
|
81
82
|
return t ? { ...t, fallback_config: null } : null;
|
|
82
83
|
}), C = n(() => ({
|
|
83
84
|
primaryButton: {
|
|
@@ -91,7 +92,7 @@ const st = /* @__PURE__ */ B({
|
|
|
91
92
|
labelText: a("products.cancel")
|
|
92
93
|
}
|
|
93
94
|
}));
|
|
94
|
-
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: E, OrgStrategyDropdown: I, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: c, selectedStrategyId:
|
|
95
|
+
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: E, OrgStrategyDropdown: I, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: c, selectedStrategyId: o, LEGACY_OPTION_VALUE: m, showSelectionError: l, drawerDescription: x, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: d, strategyOptions: A, onInfoBoxButtonClick: h, selectedStrategy: v, footerButtonGroupOptions: C, closeDrawer: () => {
|
|
95
96
|
e.closeAssignStrategyDrawer();
|
|
96
97
|
}, assignStrategy: async () => {
|
|
97
98
|
const t = v.value;
|
|
@@ -112,16 +113,16 @@ const st = /* @__PURE__ */ B({
|
|
|
112
113
|
});
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
const
|
|
116
|
+
const s = e.currentRecommendationId;
|
|
116
117
|
e.assignStrategy(t), c({
|
|
117
118
|
type: u.Success,
|
|
118
119
|
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
119
|
-
}), e.closeAssignStrategyDrawer(),
|
|
120
|
+
}), e.closeAssignStrategyDrawer(), s !== null && await D(s, "Assigned recommendation strategy");
|
|
120
121
|
}, onSelect: (t) => {
|
|
121
|
-
|
|
122
|
+
o.value = t.value, l.value = !1;
|
|
122
123
|
} };
|
|
123
124
|
}
|
|
124
125
|
});
|
|
125
126
|
export {
|
|
126
|
-
|
|
127
|
+
ot as default
|
|
127
128
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import d from "./GenericOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import g from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var l = function() {
|
|
5
5
|
var r, n, t, i, a, s;
|
|
6
|
-
var o = this,
|
|
7
|
-
return e.isVisible ?
|
|
6
|
+
var o = this, c = o._self._c, e = o._self._setupProxy;
|
|
7
|
+
return e.isVisible ? c(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
|
|
8
8
|
return e.onboardingStore.close("genericOnboarding");
|
|
9
9
|
}, nextButtonClick: e.handleNext } }) : o._e();
|
|
10
10
|
}, p = [], _ = /* @__PURE__ */ g(
|
|
11
|
-
|
|
11
|
+
d,
|
|
12
12
|
l,
|
|
13
13
|
p,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"fcba7e99"
|
|
17
17
|
);
|
|
18
18
|
const S = _.exports;
|
|
19
19
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { SERVICE_HOVER_SELECTORS as
|
|
5
|
-
import { useOnboardingStore as
|
|
1
|
+
import { defineComponent as u, computed as r, watch as l } from "vue";
|
|
2
|
+
import { useRibbonOffset as m } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { SERVICE_HOVER_SELECTORS as f } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
6
|
+
import { findEditorShadowRoot as B } from "../../../utils/editorShadowRoot.js";
|
|
6
7
|
import { InOnboard as C } from "@useinsider/design-system-vue";
|
|
7
|
-
const
|
|
8
|
+
const R = /* @__PURE__ */ u({
|
|
8
9
|
__name: "GenericOnboarding",
|
|
9
10
|
setup(T) {
|
|
10
|
-
const e =
|
|
11
|
-
const t =
|
|
12
|
-
t
|
|
13
|
-
|
|
14
|
-
const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
|
|
11
|
+
const e = x(), o = k(), { getTopPosition: i } = m(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
|
|
12
|
+
const t = B();
|
|
13
|
+
t && f.forEach((n) => {
|
|
14
|
+
const d = t.querySelector(n);
|
|
15
15
|
d && d.classList.add("hover");
|
|
16
16
|
});
|
|
17
17
|
}, a = r(() => [
|
|
@@ -67,18 +67,18 @@ const y = /* @__PURE__ */ l({
|
|
|
67
67
|
o.close("genericOnboarding");
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
]),
|
|
70
|
+
]), g = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
|
|
71
71
|
var t, n;
|
|
72
72
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
73
73
|
}, b = () => {
|
|
74
74
|
var t, n;
|
|
75
75
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
76
76
|
};
|
|
77
|
-
return
|
|
77
|
+
return l(() => o.onboardings.genericOnboarding.isActive, (t) => {
|
|
78
78
|
t && o.setConfig("genericOnboarding", a.value);
|
|
79
|
-
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible:
|
|
79
|
+
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: g, handleNext: p, handleBack: b, InOnboard: C };
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
R as default
|
|
84
84
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import g from "./ItemsOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import m from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var l = function() {
|
|
5
5
|
var e, n, r, i, s, a;
|
|
6
6
|
var o = this, d = o._self._c, t = o._self._setupProxy;
|
|
7
|
-
return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(
|
|
7
|
+
return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(b) {
|
|
8
8
|
return t.onboardingStore.close("itemsOnboarding");
|
|
9
9
|
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
10
|
-
},
|
|
10
|
+
}, c = [], p = /* @__PURE__ */ m(
|
|
11
11
|
g,
|
|
12
|
-
c,
|
|
13
12
|
l,
|
|
13
|
+
c,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"1a34025a"
|
|
17
17
|
);
|
|
18
|
-
const I =
|
|
18
|
+
const I = p.exports;
|
|
19
19
|
export {
|
|
20
20
|
I as default
|
|
21
21
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as b, computed as d, watch as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import {
|
|
5
|
-
import { useOnboardingStore as
|
|
1
|
+
import { defineComponent as b, computed as d, watch as c } from "vue";
|
|
2
|
+
import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { CARD_COMPOSITION_TAB_SELECTOR as x, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as T } from "../../../stores/onboarding.js";
|
|
6
|
+
import { findEditorShadowRoot as k } from "../../../utils/editorShadowRoot.js";
|
|
6
7
|
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
7
|
-
const
|
|
8
|
+
const v = /* @__PURE__ */ b({
|
|
8
9
|
__name: "ItemsOnboarding",
|
|
9
10
|
setup(C) {
|
|
10
|
-
const i =
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
11
|
+
const i = l(), o = T(), { getTopPosition: r } = u(), s = (t) => {
|
|
12
|
+
const n = k();
|
|
13
|
+
if (!n)
|
|
13
14
|
return;
|
|
14
|
-
const
|
|
15
|
-
|
|
15
|
+
const e = n.querySelector(t);
|
|
16
|
+
e && e.click();
|
|
16
17
|
}, a = d(() => [
|
|
17
18
|
{
|
|
18
19
|
classes: "guido-items-onboarding-card-1",
|
|
19
20
|
right: "426px",
|
|
20
|
-
top:
|
|
21
|
+
top: r(90),
|
|
21
22
|
position: "Right Top",
|
|
22
23
|
title: i("email-editor.onboarding-items-title"),
|
|
23
24
|
description: i("email-editor.onboarding-items-description"),
|
|
@@ -33,7 +34,7 @@ const E = /* @__PURE__ */ b({
|
|
|
33
34
|
{
|
|
34
35
|
classes: "guido-items-onboarding-card-2",
|
|
35
36
|
right: "426px",
|
|
36
|
-
top:
|
|
37
|
+
top: r(218),
|
|
37
38
|
position: "Right Top",
|
|
38
39
|
title: i("email-editor.onboarding-items-item-type-title"),
|
|
39
40
|
description: i("email-editor.onboarding-items-item-type-description"),
|
|
@@ -52,7 +53,7 @@ const E = /* @__PURE__ */ b({
|
|
|
52
53
|
{
|
|
53
54
|
classes: "guido-items-onboarding-card-3",
|
|
54
55
|
right: "426px",
|
|
55
|
-
top:
|
|
56
|
+
top: r(140),
|
|
56
57
|
position: "Right Top",
|
|
57
58
|
title: i("email-editor.onboarding-items-composition-title"),
|
|
58
59
|
description: i("email-editor.onboarding-items-composition-description"),
|
|
@@ -68,30 +69,30 @@ const E = /* @__PURE__ */ b({
|
|
|
68
69
|
o.close("itemsOnboarding");
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
]),
|
|
72
|
-
var t,
|
|
73
|
-
(
|
|
74
|
-
},
|
|
75
|
-
var t,
|
|
76
|
-
(
|
|
72
|
+
]), m = d(() => o.onboardings.itemsOnboarding.config.length > 0 && o.onboardings.itemsOnboarding.isActive), p = () => {
|
|
73
|
+
var t, n;
|
|
74
|
+
(n = (t = o.getItemsCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
75
|
+
}, g = () => {
|
|
76
|
+
var t, n;
|
|
77
|
+
(n = (t = o.getItemsCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
77
78
|
};
|
|
78
|
-
return
|
|
79
|
+
return c(
|
|
79
80
|
() => o.isActive("itemsOnboarding"),
|
|
80
81
|
(t) => {
|
|
81
82
|
t && o.setConfig("itemsOnboarding", a.value);
|
|
82
83
|
},
|
|
83
84
|
{ immediate: !0 }
|
|
84
|
-
),
|
|
85
|
+
), c(
|
|
85
86
|
() => o.onboardings.itemsOnboarding.cardIndex,
|
|
86
|
-
(t,
|
|
87
|
+
(t, n) => {
|
|
87
88
|
if (!o.isActive("itemsOnboarding"))
|
|
88
89
|
return;
|
|
89
|
-
const
|
|
90
|
-
|
|
90
|
+
const e = `${n}-${t}`;
|
|
91
|
+
e === "1-2" && s(x), e === "2-1" && s(f);
|
|
91
92
|
}
|
|
92
|
-
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition:
|
|
93
|
+
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition: r, switchTab: s, onboardingCardsConfig: a, isVisible: m, handleNext: p, handleBack: g, InOnboard: B };
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
+
v as default
|
|
97
98
|
};
|