@useinsider/guido 3.26.0-beta.61e9df0 → 3.26.0-beta.8251afd
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/email-be/html-validation.js +24 -0
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +45 -46
- 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 +27 -28
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +27 -42
- package/dist/composables/useCustomInterfaceAppearance.js +50 -50
- package/dist/composables/useFullStoryBridge.js +9 -10
- package/dist/composables/useSave.js +19 -17
- package/dist/composables/useSaveValidation.js +142 -249
- package/dist/composables/useTranslations.js +14 -9
- package/dist/enums/email-be.js +27 -0
- package/dist/enums/save-validation.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +40 -52
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +15 -17
- package/dist/extensions/Blocks/common-control.js +19 -19
- package/dist/extensions/DynamicContent/dynamic-content.js +17 -15
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +184 -122
- package/dist/package.json.js +2 -2
- package/dist/services/emailBe/errors/ApiError.js +50 -0
- package/dist/services/emailBe/errors/handleApiError.js +31 -0
- package/dist/services/emailBe/errors/toApiError.js +71 -0
- package/dist/services/emailBe/html/HtmlValidationService.js +35 -0
- package/dist/services/emailBe/html/index.js +6 -0
- package/dist/services/emailBe/http/HttpManager.js +68 -0
- package/dist/services/emailBe/http/RetryStack.js +23 -0
- package/dist/services/emailBe/http/client.js +61 -0
- package/dist/services/emailBe/http/index.js +10 -0
- package/dist/services/emailBe/http/transportErrors.js +20 -0
- package/dist/src/@types/email-be/html-validation.d.ts +35 -0
- package/dist/src/composables/useSaveValidation.d.ts +2 -2
- package/dist/src/enums/email-be.d.ts +26 -0
- package/dist/src/enums/save-validation.d.ts +3 -14
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -2
- package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +7 -0
- package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +10 -0
- package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +16 -0
- package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +15 -0
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
- package/dist/src/services/emailBe/errors/ApiError.d.ts +40 -0
- package/dist/src/services/emailBe/errors/handleApiError.d.ts +11 -0
- package/dist/src/services/emailBe/errors/toApiError.d.ts +2 -0
- package/dist/src/services/emailBe/html/HtmlValidationService.d.ts +8 -0
- package/dist/src/services/emailBe/html/index.d.ts +2 -0
- package/dist/src/services/emailBe/http/HttpManager.d.ts +13 -0
- package/dist/src/services/emailBe/http/RetryStack.d.ts +6 -0
- package/dist/src/services/emailBe/http/client.d.ts +3 -0
- package/dist/src/services/emailBe/http/index.d.ts +2 -0
- package/dist/src/services/emailBe/http/transportErrors.d.ts +15 -0
- package/dist/src/services/emailBe/http/types.d.ts +46 -0
- package/dist/src/stores/onboarding.d.ts +0 -1
- package/dist/stores/onboarding.js +1 -4
- package/package.json +2 -2
- package/dist/src/utils/editorShadowRoot.d.ts +0 -1
- package/dist/utils/editorShadowRoot.js +0 -8
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { object as r, array as o, boolean as l, string as e, nullable as n, union as a, number as t, record as i, pipe as c, transform as s, tuple as m } from "../../node_modules/valibot/dist/index.js";
|
|
2
|
+
const d = r({
|
|
3
|
+
code: e(),
|
|
4
|
+
trans: r({
|
|
5
|
+
key: e(),
|
|
6
|
+
// PHP serializes an empty associative array as `[]`, so an empty list means "no placeholders".
|
|
7
|
+
replace: a([
|
|
8
|
+
i(e(), a([e(), t()])),
|
|
9
|
+
c(m([]), s(() => ({})))
|
|
10
|
+
])
|
|
11
|
+
}),
|
|
12
|
+
anchor: n(r({
|
|
13
|
+
selector: e(),
|
|
14
|
+
indexes: o(t())
|
|
15
|
+
})),
|
|
16
|
+
details: o(e())
|
|
17
|
+
}), u = r({
|
|
18
|
+
valid: l(),
|
|
19
|
+
errors: o(d)
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
d as HtmlValidationErrorSchema,
|
|
23
|
+
u as HtmlValidationResultSchema
|
|
24
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ge, 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 Me } from "../composables/useTranslations.js";
|
|
13
|
+
import { migrate as Re } 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 Le } from "../enums/onboarding.js";
|
|
16
|
+
import { ToasterTypeOptions as Ue } from "../enums/toaster.js";
|
|
17
|
+
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Oe } 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,20 +30,19 @@ 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 {
|
|
37
|
-
import { useUnsubscribeStore as Ye } from "../stores/unsubscribe.js";
|
|
33
|
+
import { usePreviewStore as je } from "../stores/preview.js";
|
|
34
|
+
import { useSaveValidationStore as Je } from "../stores/save-validation.js";
|
|
35
|
+
import { useTemplateStore as Qe } from "../stores/template.js";
|
|
36
|
+
import { useUnsubscribeStore as Xe } from "../stores/unsubscribe.js";
|
|
38
37
|
import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
|
|
39
|
-
const
|
|
38
|
+
const _t = /* @__PURE__ */ ge({
|
|
40
39
|
__name: "Guido",
|
|
41
40
|
props: {
|
|
42
41
|
config: null,
|
|
43
42
|
ready: { type: Boolean, default: !0 }
|
|
44
43
|
},
|
|
45
44
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
46
|
-
setup(K, { expose: j, emit:
|
|
45
|
+
setup(K, { expose: j, emit: s }) {
|
|
47
46
|
const c = K, r = Ee(), J = a(
|
|
48
47
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
49
48
|
), Q = a(
|
|
@@ -58,19 +57,19 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
58
57
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
59
58
|
), te = a(
|
|
60
59
|
() => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
|
|
61
|
-
),
|
|
60
|
+
), y = W(), g = Ke(), w = Xe(), o = qe();
|
|
62
61
|
c.ready && o.init(c.config);
|
|
63
|
-
const d = C(), oe =
|
|
62
|
+
const d = C(), oe = je(), p = l(() => d.hasChanges), { isTestPartner: ne } = we(), { isEnabled: re, loadRollout: T } = Te(), { showToaster: k } = Ie(), F = Me(), I = () => {
|
|
64
63
|
var t;
|
|
65
64
|
if (d.isVersionHistoryOpen) {
|
|
66
65
|
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), k({
|
|
67
|
-
type:
|
|
66
|
+
type: Ue.Warning,
|
|
68
67
|
message: F("email-editor.save-blocked-outside-editor")
|
|
69
68
|
});
|
|
70
69
|
return;
|
|
71
70
|
}
|
|
72
71
|
return (t = D.value) == null ? void 0 : t.saveSilent();
|
|
73
|
-
},
|
|
72
|
+
}, M = (t) => {
|
|
74
73
|
d.loadingStatus = t;
|
|
75
74
|
};
|
|
76
75
|
Se(), De();
|
|
@@ -84,48 +83,48 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
84
83
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
|
|
85
84
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
|
|
86
85
|
};
|
|
87
|
-
}, { initPlugin:
|
|
86
|
+
}, { initPlugin: R, preloadRuntime: L } = ke(r), { runExclusive: U, beginMount: O, isCurrentMount: v } = he();
|
|
88
87
|
let f = 0;
|
|
89
|
-
const { getDefaultTemplate: N } = ze(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Fe(),
|
|
88
|
+
const { getDefaultTemplate: N } = ze(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Fe(), se = l(() => {
|
|
90
89
|
var t;
|
|
91
90
|
return !((t = o.ui) != null && t.showHeader);
|
|
92
|
-
}),
|
|
91
|
+
}), ie = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ae = l(() => o.externalDisplayConditions), ce = l(
|
|
93
92
|
() => o.isFeatureEnabled("legacyUnsubscribeConversion")
|
|
94
93
|
), de = l(
|
|
95
94
|
() => !!z().recommendationConfigs.strategyId
|
|
96
95
|
);
|
|
97
96
|
Ce({
|
|
98
97
|
onBack: () => {
|
|
99
|
-
console.debug("guido:back"),
|
|
98
|
+
console.debug("guido:back"), s("back");
|
|
100
99
|
},
|
|
101
100
|
onSaveStart: () => {
|
|
102
|
-
console.debug("guido:save:start"),
|
|
101
|
+
console.debug("guido:save:start"), s("save:start");
|
|
103
102
|
},
|
|
104
103
|
onSaveComplete: (t) => {
|
|
105
104
|
const e = { ...t, metadata: b() };
|
|
106
|
-
console.debug("guido:save:complete", e),
|
|
105
|
+
console.debug("guido:save:complete", e), s("save:complete", e);
|
|
107
106
|
},
|
|
108
107
|
onTestEmailClick: () => {
|
|
109
|
-
console.debug("guido:test-email:click"),
|
|
108
|
+
console.debug("guido:test-email:click"), s("test-email:click");
|
|
110
109
|
}
|
|
111
110
|
});
|
|
112
111
|
const P = (t) => {
|
|
113
|
-
console.debug("dynamic-content:close", t),
|
|
112
|
+
console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
114
113
|
}, x = () => {
|
|
115
114
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
116
115
|
};
|
|
117
116
|
G(() => p.value, () => {
|
|
118
|
-
|
|
117
|
+
s("on-change", p.value);
|
|
119
118
|
});
|
|
120
119
|
const S = (t) => {
|
|
121
|
-
const e = t, { attribute:
|
|
122
|
-
console.debug("dynamic-content:open", e.detail),
|
|
120
|
+
const e = t, { attribute: i, position: u } = e.detail;
|
|
121
|
+
console.debug("dynamic-content:open", e.detail), s("dynamic-content:open", i, u);
|
|
123
122
|
};
|
|
124
123
|
let m = null;
|
|
125
124
|
const h = () => {
|
|
126
125
|
var e;
|
|
127
|
-
const t = document.querySelector(
|
|
128
|
-
(e =
|
|
126
|
+
const t = document.querySelector(Le);
|
|
127
|
+
(e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
129
128
|
}, E = async () => {
|
|
130
129
|
var t;
|
|
131
130
|
r.mark("host_ready");
|
|
@@ -136,7 +135,7 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
136
135
|
templateId: o.templateId,
|
|
137
136
|
variationId: o.variationId
|
|
138
137
|
});
|
|
139
|
-
const e = o.template,
|
|
138
|
+
const e = o.template, i = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
140
139
|
w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
141
140
|
const me = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), le = {
|
|
142
141
|
partnerName: o.partnerName,
|
|
@@ -144,12 +143,12 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
144
143
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
145
144
|
}, ue = {
|
|
146
145
|
itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
|
|
147
|
-
}, V = (
|
|
146
|
+
}, V = (ye) => r.timed(
|
|
148
147
|
"migration",
|
|
149
|
-
() =>
|
|
148
|
+
() => Re(ye, me, le, ue)
|
|
150
149
|
);
|
|
151
150
|
let n = {
|
|
152
|
-
html:
|
|
151
|
+
html: i && await V(i),
|
|
153
152
|
css: u
|
|
154
153
|
};
|
|
155
154
|
n.html || (n = await r.timed("default_template", () => N()), n.html = await V(n.html));
|
|
@@ -158,28 +157,28 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
158
157
|
const fe = {
|
|
159
158
|
preselectedDynamicContentList: B,
|
|
160
159
|
onReady: () => {
|
|
161
|
-
console.debug("guido:ready"),
|
|
160
|
+
console.debug("guido:ready"), s("ready");
|
|
162
161
|
}
|
|
163
162
|
};
|
|
164
|
-
f =
|
|
163
|
+
f = O(), await R(n, b(), fe, n.html !== i), g.selectedDynamicContentList = B;
|
|
165
164
|
} catch (e) {
|
|
166
165
|
console.error("Failed to initialize Stripo editor:", e), r.markFailed();
|
|
167
166
|
}
|
|
168
167
|
};
|
|
169
168
|
return be(async () => {
|
|
170
169
|
var e;
|
|
171
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(),
|
|
172
|
-
const t = (e =
|
|
173
|
-
if (t && (m = new ResizeObserver(h), m.observe(t)),
|
|
170
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), Qe().$reset(), Je().$reset(), T(), h();
|
|
171
|
+
const t = (e = y.value) == null ? void 0 : e.parentElement;
|
|
172
|
+
if (t && (m = new ResizeObserver(h), m.observe(t)), L(), c.ready)
|
|
174
173
|
await E();
|
|
175
174
|
else {
|
|
176
|
-
const
|
|
177
|
-
u && (
|
|
175
|
+
const i = G(() => c.ready, (u) => {
|
|
176
|
+
u && (i(), E());
|
|
178
177
|
});
|
|
179
178
|
}
|
|
180
179
|
document.addEventListener("dynamic-content:open", S);
|
|
181
180
|
}), ve(() => {
|
|
182
|
-
if (Ne(),
|
|
181
|
+
if (Ne(), Oe(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
|
|
183
182
|
_e();
|
|
184
183
|
try {
|
|
185
184
|
const t = C();
|
|
@@ -188,7 +187,7 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
188
187
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
|
-
|
|
190
|
+
U(async () => {
|
|
192
191
|
if (v(f))
|
|
193
192
|
try {
|
|
194
193
|
window.UIEditor.removeEditor();
|
|
@@ -203,10 +202,10 @@ const Pt = /* @__PURE__ */ ye({
|
|
|
203
202
|
},
|
|
204
203
|
hasChanges: p,
|
|
205
204
|
saveSilent: I,
|
|
206
|
-
setLoading:
|
|
207
|
-
}), { __sfc: !0, openMetrics: r, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, DisplayConditionsHost: Z, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: ee, LegacyUnsubscribeConvertedModal: te, wrapperRef:
|
|
205
|
+
setLoading: M
|
|
206
|
+
}), { __sfc: !0, openMetrics: r, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, DisplayConditionsHost: Z, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: ee, LegacyUnsubscribeConvertedModal: te, wrapperRef: y, dynamicContentStore: g, 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: M, emit: s, buildMetadata: b, initPlugin: R, preloadRuntime: L, runExclusive: U, beginMount: O, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: se, isRrsEnabled: ie, 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 };
|
|
208
207
|
}
|
|
209
208
|
});
|
|
210
209
|
export {
|
|
211
|
-
|
|
210
|
+
_t as default
|
|
212
211
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import c 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, d = o._self._c, e = o._self._setupProxy;
|
|
7
|
+
return e.isVisible ? d(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
|
+
c,
|
|
12
12
|
l,
|
|
13
13
|
p,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"f16f20f8"
|
|
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
|
|
6
|
-
import { findEditorShadowRoot as B } from "../../../utils/editorShadowRoot.js";
|
|
1
|
+
import { defineComponent as l, computed as r, watch as m } from "vue";
|
|
2
|
+
import { useRibbonOffset as x } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as f } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { SERVICE_HOVER_SELECTORS as k } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as B } from "../../../stores/onboarding.js";
|
|
7
6
|
import { InOnboard as C } from "@useinsider/design-system-vue";
|
|
8
|
-
const
|
|
7
|
+
const y = /* @__PURE__ */ l({
|
|
9
8
|
__name: "GenericOnboarding",
|
|
10
9
|
setup(T) {
|
|
11
|
-
const e =
|
|
12
|
-
const t =
|
|
13
|
-
t &&
|
|
14
|
-
|
|
10
|
+
const e = f(), o = B(), { getTopPosition: i } = x(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
|
|
11
|
+
const t = document.querySelector("ui-editor");
|
|
12
|
+
t != null && t.shadowRoot && k.forEach((n) => {
|
|
13
|
+
var g;
|
|
14
|
+
const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
|
|
15
15
|
d && d.classList.add("hover");
|
|
16
16
|
});
|
|
17
17
|
}, a = r(() => [
|
|
@@ -67,18 +67,18 @@ const R = /* @__PURE__ */ u({
|
|
|
67
67
|
o.close("genericOnboarding");
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
]),
|
|
70
|
+
]), p = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), u = () => {
|
|
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 m(() => 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: p, handleNext: u, handleBack: b, InOnboard: C };
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
y 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 c = 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(_) {
|
|
8
8
|
return t.onboardingStore.close("itemsOnboarding");
|
|
9
9
|
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
10
|
-
},
|
|
10
|
+
}, l = [], b = /* @__PURE__ */ m(
|
|
11
11
|
g,
|
|
12
|
-
l,
|
|
13
12
|
c,
|
|
13
|
+
l,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"bb3cca55"
|
|
17
17
|
);
|
|
18
|
-
const I =
|
|
18
|
+
const I = b.exports;
|
|
19
19
|
export {
|
|
20
20
|
I as default
|
|
21
21
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { defineComponent as b, computed as d, watch as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { CARD_COMPOSITION_TAB_SELECTOR as
|
|
5
|
-
import { useOnboardingStore as
|
|
6
|
-
import { findEditorShadowRoot as k } from "../../../utils/editorShadowRoot.js";
|
|
1
|
+
import { defineComponent as b, computed as d, watch as m } from "vue";
|
|
2
|
+
import { useRibbonOffset as l } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { UI_EDITOR_SELECTOR as T, CARD_COMPOSITION_TAB_SELECTOR as O, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
7
6
|
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
8
|
-
const
|
|
7
|
+
const E = /* @__PURE__ */ b({
|
|
9
8
|
__name: "ItemsOnboarding",
|
|
10
9
|
setup(C) {
|
|
11
|
-
const i =
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
10
|
+
const i = x(), o = k(), { getTopPosition: n } = l(), r = (t) => {
|
|
11
|
+
const e = document.querySelector(T);
|
|
12
|
+
if (!(e != null && e.shadowRoot))
|
|
14
13
|
return;
|
|
15
|
-
const e =
|
|
16
|
-
|
|
14
|
+
const { shadowRoot: s } = e, c = s.querySelector(t);
|
|
15
|
+
c && c.click();
|
|
17
16
|
}, a = d(() => [
|
|
18
17
|
{
|
|
19
18
|
classes: "guido-items-onboarding-card-1",
|
|
20
19
|
right: "426px",
|
|
21
|
-
top:
|
|
20
|
+
top: n(90),
|
|
22
21
|
position: "Right Top",
|
|
23
22
|
title: i("email-editor.onboarding-items-title"),
|
|
24
23
|
description: i("email-editor.onboarding-items-description"),
|
|
@@ -34,7 +33,7 @@ const v = /* @__PURE__ */ b({
|
|
|
34
33
|
{
|
|
35
34
|
classes: "guido-items-onboarding-card-2",
|
|
36
35
|
right: "426px",
|
|
37
|
-
top:
|
|
36
|
+
top: n(218),
|
|
38
37
|
position: "Right Top",
|
|
39
38
|
title: i("email-editor.onboarding-items-item-type-title"),
|
|
40
39
|
description: i("email-editor.onboarding-items-item-type-description"),
|
|
@@ -53,7 +52,7 @@ const v = /* @__PURE__ */ b({
|
|
|
53
52
|
{
|
|
54
53
|
classes: "guido-items-onboarding-card-3",
|
|
55
54
|
right: "426px",
|
|
56
|
-
top:
|
|
55
|
+
top: n(140),
|
|
57
56
|
position: "Right Top",
|
|
58
57
|
title: i("email-editor.onboarding-items-composition-title"),
|
|
59
58
|
description: i("email-editor.onboarding-items-composition-description"),
|
|
@@ -69,30 +68,30 @@ const v = /* @__PURE__ */ b({
|
|
|
69
68
|
o.close("itemsOnboarding");
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
]),
|
|
73
|
-
var t,
|
|
74
|
-
(
|
|
75
|
-
},
|
|
76
|
-
var t,
|
|
77
|
-
(
|
|
71
|
+
]), g = d(() => o.onboardings.itemsOnboarding.config.length > 0 && o.onboardings.itemsOnboarding.isActive), p = () => {
|
|
72
|
+
var t, e;
|
|
73
|
+
(e = (t = o.getItemsCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
|
|
74
|
+
}, u = () => {
|
|
75
|
+
var t, e;
|
|
76
|
+
(e = (t = o.getItemsCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
|
|
78
77
|
};
|
|
79
|
-
return
|
|
78
|
+
return m(
|
|
80
79
|
() => o.isActive("itemsOnboarding"),
|
|
81
80
|
(t) => {
|
|
82
81
|
t && o.setConfig("itemsOnboarding", a.value);
|
|
83
82
|
},
|
|
84
83
|
{ immediate: !0 }
|
|
85
|
-
),
|
|
84
|
+
), m(
|
|
86
85
|
() => o.onboardings.itemsOnboarding.cardIndex,
|
|
87
|
-
(t,
|
|
86
|
+
(t, e) => {
|
|
88
87
|
if (!o.isActive("itemsOnboarding"))
|
|
89
88
|
return;
|
|
90
|
-
const
|
|
91
|
-
|
|
89
|
+
const s = `${e}-${t}`;
|
|
90
|
+
s === "1-2" && r(O), s === "2-1" && r(f);
|
|
92
91
|
}
|
|
93
|
-
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition:
|
|
92
|
+
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition: n, switchTab: r, onboardingCardsConfig: a, isVisible: g, handleNext: p, handleBack: u, InOnboard: B };
|
|
94
93
|
}
|
|
95
94
|
});
|
|
96
95
|
export {
|
|
97
|
-
|
|
96
|
+
E as default
|
|
98
97
|
};
|
|
@@ -1,61 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRibbonOffset as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { ACADEMY_LINKS as
|
|
5
|
-
import { useOnboardingStore as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const F = /* @__PURE__ */ E({
|
|
1
|
+
import { defineComponent as d, computed as g, watch as l } from "vue";
|
|
2
|
+
import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { ACADEMY_LINKS as u } from "../../../enums/academy.js";
|
|
5
|
+
import { useOnboardingStore as y } from "../../../stores/onboarding.js";
|
|
6
|
+
import { InOnboard as f } from "@useinsider/design-system-vue";
|
|
7
|
+
const A = /* @__PURE__ */ d({
|
|
9
8
|
__name: "RecommendationLegacyStrategyOnboarding",
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
9
|
+
setup(O) {
|
|
10
|
+
const n = "recommendationLegacyStrategyOnboarding", o = p(), t = y(), { getTopPosition: i } = b(), r = `<a href="${u.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${o("action-builder.visit-academy")}</a>`, a = () => [
|
|
12
11
|
{
|
|
13
12
|
classes: "guido-recommendation-legacy-strategy-onboarding",
|
|
14
13
|
right: "40px",
|
|
15
|
-
top:
|
|
14
|
+
top: i(485),
|
|
16
15
|
position: "Top Right",
|
|
17
|
-
title:
|
|
18
|
-
description:
|
|
19
|
-
academyLink:
|
|
16
|
+
title: o("email-editor.onboarding-recommendation-strategy-legacy-title"),
|
|
17
|
+
description: o("email-editor.onboarding-recommendation-strategy-legacy-description", {
|
|
18
|
+
academyLink: r
|
|
20
19
|
}),
|
|
21
20
|
imageSource: "",
|
|
22
21
|
backButtonClick: () => {
|
|
23
22
|
},
|
|
24
23
|
nextButtonType: "text",
|
|
25
|
-
nextButtonText:
|
|
24
|
+
nextButtonText: o("action-builder.ok"),
|
|
26
25
|
nextButtonClick: () => {
|
|
27
|
-
t.close(
|
|
26
|
+
t.close(n);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
],
|
|
29
|
+
], s = g(
|
|
31
30
|
() => t.onboardings.recommendationLegacyStrategyOnboarding.config.length > 0 && t.onboardings.recommendationLegacyStrategyOnboarding.isActive
|
|
32
|
-
),
|
|
33
|
-
var
|
|
34
|
-
(
|
|
31
|
+
), m = () => {
|
|
32
|
+
var e, c;
|
|
33
|
+
(c = (e = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : e.nextButtonClick) == null || c.call(e);
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return !!((o = n.querySelector(l)) != null && o.getClientRects().length);
|
|
44
|
-
}, c = ({ target: n }) => {
|
|
45
|
-
const o = n instanceof Element ? n.closest("ue-control-panel") : null;
|
|
46
|
-
!o || r !== null || (r = requestAnimationFrame(() => {
|
|
47
|
-
r = null, d(o) || t.closeForSession(a);
|
|
48
|
-
}));
|
|
49
|
-
}, p = () => {
|
|
50
|
-
e == null || e.removeEventListener("scroll", s, !0), e == null || e.removeEventListener("click", c, !0), e == null || e.removeEventListener("keyup", c, !0), e = null, r !== null && (cancelAnimationFrame(r), r = null);
|
|
51
|
-
}, f = () => {
|
|
52
|
-
e = v(), e == null || e.addEventListener("scroll", s, !0), e == null || e.addEventListener("click", c, !0), e == null || e.addEventListener("keyup", c, !0);
|
|
53
|
-
};
|
|
54
|
-
return L(() => {
|
|
55
|
-
t.setConfig(a, g()), f();
|
|
56
|
-
}), O(p), { __sfc: !0, ONBOARDING_TYPE: a, UPDATE_BUTTON_SELECTOR: l, trans: i, onboardingStore: t, getTopPosition: m, academyLink: u, buildOnboardingCards: g, isVisible: y, handleNext: b, editorRoot: e, handlePanelScroll: s, pendingCheck: r, isUpdateButtonVisible: d, handlePanelInteraction: c, stopWatchingPanel: p, startWatchingPanel: f, InOnboard: B };
|
|
35
|
+
return l(
|
|
36
|
+
() => t.isActive(n),
|
|
37
|
+
(e) => {
|
|
38
|
+
e && t.setConfig(n, a());
|
|
39
|
+
},
|
|
40
|
+
{ immediate: !0 }
|
|
41
|
+
), { __sfc: !0, ONBOARDING_TYPE: n, trans: o, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: s, handleNext: m, InOnboard: f };
|
|
57
42
|
}
|
|
58
43
|
});
|
|
59
44
|
export {
|
|
60
|
-
|
|
45
|
+
A as default
|
|
61
46
|
};
|