@useinsider/guido 3.2.0-beta.c3bc14c → 3.2.0-beta.caa22bf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -0
- package/dist/@types/config/schemas.js +150 -94
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +88 -87
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useRecommendation.js +46 -26
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useStripo.js +14 -16
- package/dist/composables/validators/useCouponBlockValidator.js +6 -6
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/migrator/index.js +9 -9
- package/dist/config/migrator/radioButtonMigrator.js +64 -44
- package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
- package/dist/config/migrator/recommendation/extractors.js +27 -0
- package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
- package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
- package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
- package/dist/config/migrator/recommendation/themeMapper.js +93 -0
- package/dist/config/migrator/recommendationMigrator.js +74 -290
- package/dist/enums/extensions/recommendationBlock.js +2 -1
- package/dist/enums/onboarding.js +7 -2
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/block.js +35 -32
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +25 -24
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +228 -181
- package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +130 -90
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +8 -8
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +1 -1
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
- package/dist/node_modules/valibot/dist/index.js +450 -235
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/@types/config/defaults.d.ts +5 -1
- package/dist/src/@types/config/index.d.ts +3 -3
- package/dist/src/@types/config/schemas.d.ts +213 -0
- package/dist/src/@types/config/types.d.ts +9 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +56 -0
- package/dist/src/composables/useRecommendation.d.ts +10 -1
- package/dist/src/composables/useRecommendation.test.d.ts +1 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
- package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
- package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
- package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
- package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +504 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/utils/htmlEscape.d.ts +5 -0
- package/dist/src/utils/htmlEscape.test.d.ts +1 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/htmlEscape.js +13 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/dist/utils/templatePreparation.js +72 -32
- package/package.json +7 -3
- package/dist/enums/displayConditions.js +0 -80
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
- package/dist/src/enums/displayConditions.d.ts +0 -2
|
@@ -1,131 +1,132 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
1
|
+
import { defineComponent as J, defineAsyncComponent as I, ref as W, computed as B, watch as Q, onMounted as X, onUnmounted as Y } from "vue";
|
|
2
|
+
import { provideGuidoActions as Z } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as ee } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as oe } from "../composables/useStripo.js";
|
|
5
5
|
import { useTimerClone as te } from "../composables/useTimerClone.js";
|
|
6
|
-
import { migrate as
|
|
7
|
-
import { ModuleFolderDefaults as
|
|
8
|
-
import { RIBBON_SELECTOR as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useStripoApi as
|
|
16
|
-
import { useConfigStore as
|
|
17
|
-
import { useDynamicContentStore as
|
|
18
|
-
import { useEditorStore as
|
|
19
|
-
import { usePreviewStore as
|
|
20
|
-
import { useUnsubscribeStore as
|
|
21
|
-
const
|
|
6
|
+
import { migrate as H } from "../config/migrator/index.js";
|
|
7
|
+
import { ModuleFolderDefaults as x } from "../enums/defaults.js";
|
|
8
|
+
import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
|
|
9
|
+
import se from "./organisms/base/Toaster.vue.js";
|
|
10
|
+
import re from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
11
|
+
import ce from "./organisms/header/HeaderWrapper.vue.js";
|
|
12
|
+
import ae from "./organisms/LoadingWrapper.vue.js";
|
|
13
|
+
import ie from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
14
|
+
import me from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
15
|
+
import { useStripoApi as de } from "../services/stripoApi.js";
|
|
16
|
+
import { useConfigStore as le } from "../stores/config.js";
|
|
17
|
+
import { useDynamicContentStore as ue } from "../stores/dynamic-content.js";
|
|
18
|
+
import { useEditorStore as pe } from "../stores/editor.js";
|
|
19
|
+
import { usePreviewStore as fe } from "../stores/preview.js";
|
|
20
|
+
import { useUnsubscribeStore as ve } from "../stores/unsubscribe.js";
|
|
21
|
+
const Ae = /* @__PURE__ */ J({
|
|
22
22
|
__name: "Guido",
|
|
23
23
|
props: {
|
|
24
24
|
config: null
|
|
25
25
|
},
|
|
26
26
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
27
|
+
setup(G, { expose: z, emit: n }) {
|
|
28
|
+
const g = G, q = I(
|
|
29
29
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
30
|
-
),
|
|
30
|
+
), K = I(
|
|
31
31
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
const
|
|
32
|
+
), w = W(), u = W(), p = ue(), E = ve(), i = le();
|
|
33
|
+
i.init(g.config);
|
|
34
|
+
const f = pe(), V = fe(), m = B(() => f.hasChanges), { isTestPartner: $ } = ee(), D = () => {
|
|
35
35
|
var e;
|
|
36
|
-
return (e =
|
|
36
|
+
return (e = w.value) == null ? void 0 : e.handleSave(!0);
|
|
37
37
|
}, {
|
|
38
|
-
templateId:
|
|
39
|
-
userId:
|
|
40
|
-
partnerName:
|
|
41
|
-
username:
|
|
42
|
-
template:
|
|
38
|
+
templateId: v,
|
|
39
|
+
userId: C,
|
|
40
|
+
partnerName: T,
|
|
41
|
+
username: k,
|
|
42
|
+
template: o,
|
|
43
43
|
editor: r
|
|
44
|
-
} =
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
emailId:
|
|
48
|
-
userId:
|
|
49
|
-
username:
|
|
50
|
-
partnerName:
|
|
51
|
-
savedModulesFolderName:
|
|
52
|
-
defaultModulesFolderName:
|
|
53
|
-
},
|
|
54
|
-
preselectedDynamicContentList:
|
|
44
|
+
} = i, d = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", y = (o == null ? void 0 : o.preselectedDynamicContent) || [], L = (r == null ? void 0 : r.savedModulesFolderName) || x.SAVED_MODULES, U = (r == null ? void 0 : r.defaultModulesFolderName) || x.DEFAULT_MODULES;
|
|
45
|
+
f.templateId = v;
|
|
46
|
+
const h = {
|
|
47
|
+
emailId: v,
|
|
48
|
+
userId: C,
|
|
49
|
+
username: k,
|
|
50
|
+
partnerName: T,
|
|
51
|
+
savedModulesFolderName: L,
|
|
52
|
+
defaultModulesFolderName: U
|
|
53
|
+
}, _ = {
|
|
54
|
+
preselectedDynamicContentList: y,
|
|
55
55
|
onReady: () => {
|
|
56
|
-
console.debug("guido:ready"),
|
|
56
|
+
console.debug("guido:ready"), n("ready");
|
|
57
57
|
}
|
|
58
|
-
}, { initPlugin:
|
|
58
|
+
}, { initPlugin: M } = oe(h, _), { getDefaultTemplate: O } = de(), { cloneTimersOnSave: P, hasTimerBlocks: N } = te(), j = B(() => {
|
|
59
59
|
var e;
|
|
60
|
-
return !((e =
|
|
60
|
+
return !((e = i.ui) != null && e.showHeader);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
Z({
|
|
63
63
|
onBack: () => {
|
|
64
|
-
console.debug("guido:back"),
|
|
64
|
+
console.debug("guido:back"), n("back");
|
|
65
65
|
},
|
|
66
66
|
onSaveStart: () => {
|
|
67
|
-
console.debug("guido:save:start"),
|
|
67
|
+
console.debug("guido:save:start"), n("save:start");
|
|
68
68
|
},
|
|
69
69
|
onSaveComplete: (e) => {
|
|
70
|
-
const
|
|
71
|
-
console.debug("guido:save:complete",
|
|
70
|
+
const t = { ...e, metadata: h };
|
|
71
|
+
console.debug("guido:save:complete", t), n("save:complete", t);
|
|
72
72
|
},
|
|
73
73
|
onTestEmailClick: () => {
|
|
74
|
-
console.debug("guido:test-email:click"),
|
|
74
|
+
console.debug("guido:test-email:click"), n("test-email:click");
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
const
|
|
78
|
-
console.debug("dynamic-content:close", e),
|
|
79
|
-
},
|
|
77
|
+
const R = (e) => {
|
|
78
|
+
console.debug("dynamic-content:close", e), p.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
79
|
+
}, A = () => {
|
|
80
80
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
Q(() => m.value, () => {
|
|
83
|
+
n("on-change", m.value);
|
|
84
84
|
});
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
console.debug("dynamic-content:open",
|
|
85
|
+
const b = (e) => {
|
|
86
|
+
const t = e, { attribute: l, position: a } = t.detail;
|
|
87
|
+
console.debug("dynamic-content:open", t.detail), n("dynamic-content:open", l, a);
|
|
88
88
|
};
|
|
89
89
|
let c = null;
|
|
90
|
-
const
|
|
91
|
-
var
|
|
92
|
-
const e = document.querySelector(
|
|
93
|
-
(
|
|
90
|
+
const S = () => {
|
|
91
|
+
var t;
|
|
92
|
+
const e = document.querySelector(ne);
|
|
93
|
+
(t = u.value) == null || t.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
94
94
|
};
|
|
95
|
-
return
|
|
96
|
-
var
|
|
97
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
98
|
-
const e = (
|
|
99
|
-
e && (c = new ResizeObserver(
|
|
95
|
+
return X(async () => {
|
|
96
|
+
var t, l;
|
|
97
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), S();
|
|
98
|
+
const e = (t = u.value) == null ? void 0 : t.parentElement;
|
|
99
|
+
e && (c = new ResizeObserver(S), c.observe(e));
|
|
100
100
|
try {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
E.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
102
|
+
const a = ((l = o == null ? void 0 : o.migration) == null ? void 0 : l.recommendationConfigs) ?? {};
|
|
103
|
+
let s = {
|
|
104
|
+
html: d && await H(d, a),
|
|
105
|
+
css: F
|
|
105
106
|
};
|
|
106
|
-
|
|
107
|
-
} catch (
|
|
108
|
-
console.error("Failed to initialize Stripo editor:",
|
|
107
|
+
s.html || (s = await O(), s.html = await H(s.html, a)), N(s.html) && (s.html = await P(s.html)), await M(s), p.selectedDynamicContentList = y;
|
|
108
|
+
} catch (a) {
|
|
109
|
+
console.error("Failed to initialize Stripo editor:", a);
|
|
109
110
|
}
|
|
110
|
-
document.addEventListener("dynamic-content:open",
|
|
111
|
-
}),
|
|
112
|
-
c == null || c.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
111
|
+
document.addEventListener("dynamic-content:open", b);
|
|
112
|
+
}), Y(() => {
|
|
113
|
+
c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", b);
|
|
113
114
|
try {
|
|
114
115
|
window.UIEditor.removeEditor();
|
|
115
116
|
} catch {
|
|
116
117
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
-
}),
|
|
119
|
+
i.reset();
|
|
120
|
+
}), z({
|
|
120
121
|
dynamicContent: {
|
|
121
|
-
insert:
|
|
122
|
-
close:
|
|
122
|
+
insert: R,
|
|
123
|
+
close: A
|
|
123
124
|
},
|
|
124
|
-
hasChanges:
|
|
125
|
-
saveSilent:
|
|
126
|
-
}), { __sfc: !0, PreviewContainer:
|
|
125
|
+
hasChanges: m,
|
|
126
|
+
saveSilent: D
|
|
127
|
+
}), { __sfc: !0, PreviewContainer: q, OnboardingWrapper: K, headerWrapperRef: w, wrapperRef: u, dynamicContentStore: p, unsubscribeStore: E, props: g, configStore: i, editorStore: f, previewStore: V, hasChanges: m, isTestPartner: $, saveSilent: D, templateId: v, userId: C, partnerName: T, username: k, templateConfig: o, editorConfig: r, html: d, css: F, preselectedDynamicContentList: y, savedModulesFolderName: L, defaultModulesFolderName: U, emit: n, metadata: h, options: _, initPlugin: M, getDefaultTemplate: O, cloneTimersOnSave: P, hasTimerBlocks: N, noHeader: j, insertDynamicContent: R, closeDynamicContent: A, handleDynamicContentOpen: b, ribbonObserver: c, updateRibbonOffset: S, Toaster: se, FilterSelectionDrawer: re, HeaderWrapper: ce, LoadingWrapper: ae, SaveAsTemplateDrawer: ie, UnsubscribeWrapper: me };
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
Ae as default
|
|
131
132
|
};
|
|
@@ -1,37 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as u, computed as d, watch as b, nextTick as f } from "vue";
|
|
2
|
+
import { useTranslations as C } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { HEADER_SELECTOR as O, AMP_TOGGLE_BUTTON_SELECTOR as _, AMP_TOGGLE_WRAPPER_SELECTOR as T, POPOVER_LEFT_OFFSET as g, POPOVER_TOP_GAP as E } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as x } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as P } from "@useinsider/design-system-vue";
|
|
6
|
+
const G = /* @__PURE__ */ u({
|
|
6
7
|
__name: "AMPOnboarding",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
setup(R) {
|
|
9
|
+
const e = C(), o = x(), r = () => {
|
|
10
|
+
const t = document.querySelector(O), n = document.querySelector(_), c = n == null ? void 0 : n.closest(T);
|
|
11
|
+
if (!c || !t)
|
|
12
|
+
return {
|
|
13
|
+
left: `${((t == null ? void 0 : t.offsetWidth) ?? window.innerWidth) / 2 - g}px`,
|
|
14
|
+
top: "68px"
|
|
15
|
+
};
|
|
16
|
+
const s = t.getBoundingClientRect(), i = c.getBoundingClientRect();
|
|
17
|
+
return {
|
|
18
|
+
left: `${i.left - s.left + i.width / 2 - g}px`,
|
|
19
|
+
top: `${i.bottom - s.top + E}px`
|
|
20
|
+
};
|
|
21
|
+
}, a = d(() => {
|
|
22
|
+
const { left: t, top: n } = r();
|
|
23
|
+
return [
|
|
24
|
+
{
|
|
25
|
+
classes: "guido-amp-onboarding",
|
|
26
|
+
left: t,
|
|
27
|
+
top: n,
|
|
28
|
+
position: "Top Center",
|
|
29
|
+
title: e("email-editor.onboarding-amp-title"),
|
|
30
|
+
description: e("email-editor.onboarding-amp-description"),
|
|
31
|
+
imageSource: "",
|
|
32
|
+
backButtonClick: () => {
|
|
33
|
+
},
|
|
34
|
+
nextButtonType: "text",
|
|
35
|
+
nextButtonText: e("action-builder.ok"),
|
|
36
|
+
nextButtonClick: () => void o.close("ampOnboarding")
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
}), l = d(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), p = () => {
|
|
40
|
+
var t, n;
|
|
41
|
+
(n = (t = o.getAmpCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
42
|
+
}, m = () => {
|
|
43
|
+
var t, n;
|
|
44
|
+
(n = (t = o.getAmpCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
29
45
|
};
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
return b(
|
|
47
|
+
() => o.onboardings.ampOnboarding.isActive,
|
|
48
|
+
async (t) => {
|
|
49
|
+
t && (await f(), o.setConfig("ampOnboarding", a.value));
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0 }
|
|
52
|
+
), { __sfc: !0, trans: e, onboardingStore: o, getTogglePosition: r, onboardingCardsConfig: a, isVisible: l, handleNext: p, handleBack: m, InOnboard: P };
|
|
33
53
|
}
|
|
34
54
|
});
|
|
35
55
|
export {
|
|
36
|
-
|
|
56
|
+
G as default
|
|
37
57
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as l, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
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";
|
|
6
|
+
import { InOnboard as C } from "@useinsider/design-system-vue";
|
|
7
|
+
const y = /* @__PURE__ */ l({
|
|
7
8
|
__name: "GenericOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const e =
|
|
9
|
+
setup(T) {
|
|
10
|
+
const e = f(), o = B(), { getTopPosition: i } = x(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
|
|
10
11
|
const t = document.querySelector("ui-editor");
|
|
11
|
-
t != null && t.shadowRoot &&
|
|
12
|
-
var
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
t != null && t.shadowRoot && k.forEach((n) => {
|
|
13
|
+
var g;
|
|
14
|
+
const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
|
|
15
|
+
d && d.classList.add("hover");
|
|
15
16
|
});
|
|
16
|
-
},
|
|
17
|
+
}, a = r(() => [
|
|
17
18
|
{
|
|
18
19
|
classes: "guido-onboarding-blocks",
|
|
19
20
|
left: "90px",
|
|
20
|
-
top:
|
|
21
|
+
top: i(90),
|
|
21
22
|
position: "Left Top",
|
|
22
23
|
title: e("email-editor.onboarding-blocks-title"),
|
|
23
24
|
description: e("email-editor.onboarding-blocks-description"),
|
|
@@ -51,8 +52,8 @@ const S = /* @__PURE__ */ l({
|
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
classes: "guido-onboarding-preview",
|
|
54
|
-
left:
|
|
55
|
-
top:
|
|
55
|
+
left: s.value,
|
|
56
|
+
top: i(68),
|
|
56
57
|
position: "Top Center",
|
|
57
58
|
title: e("email-editor.onboarding-preview-title"),
|
|
58
59
|
description: e("email-editor.onboarding-preview-description"),
|
|
@@ -66,18 +67,18 @@ const S = /* @__PURE__ */ l({
|
|
|
66
67
|
o.close("genericOnboarding");
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
]),
|
|
70
|
+
]), p = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), u = () => {
|
|
70
71
|
var t, n;
|
|
71
72
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
72
|
-
},
|
|
73
|
+
}, b = () => {
|
|
73
74
|
var t, n;
|
|
74
75
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
75
76
|
};
|
|
76
|
-
return
|
|
77
|
-
t && o.setConfig("genericOnboarding",
|
|
78
|
-
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft:
|
|
77
|
+
return m(() => o.onboardings.genericOnboarding.isActive, (t) => {
|
|
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: p, handleNext: u, handleBack: b, InOnboard: C };
|
|
79
80
|
}
|
|
80
81
|
});
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
y as default
|
|
83
84
|
};
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, computed as d, watch as m } from "vue";
|
|
2
|
+
import { useRibbonOffset as l } from "../../../composables/useRibbonOffset.js";
|
|
2
3
|
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
3
|
-
import {
|
|
4
|
-
import { useOnboardingStore as
|
|
5
|
-
import { InOnboard as
|
|
6
|
-
const E = /* @__PURE__ */
|
|
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";
|
|
6
|
+
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
7
|
+
const E = /* @__PURE__ */ b({
|
|
7
8
|
__name: "ItemsOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}), n = (t) => `${t + c.value}px`, r = (t) => {
|
|
13
|
-
const i = document.querySelector(O);
|
|
14
|
-
if (!(i != null && i.shadowRoot))
|
|
9
|
+
setup(C) {
|
|
10
|
+
const i = x(), o = k(), { getTopPosition: n } = l(), r = (t) => {
|
|
11
|
+
const e = document.querySelector(T);
|
|
12
|
+
if (!(e != null && e.shadowRoot))
|
|
15
13
|
return;
|
|
16
|
-
const { shadowRoot: s } =
|
|
17
|
-
|
|
18
|
-
},
|
|
14
|
+
const { shadowRoot: s } = e, c = s.querySelector(t);
|
|
15
|
+
c && c.click();
|
|
16
|
+
}, a = d(() => [
|
|
19
17
|
{
|
|
20
18
|
classes: "guido-items-onboarding-card-1",
|
|
21
19
|
right: "426px",
|
|
22
20
|
top: n(90),
|
|
23
21
|
position: "Right Top",
|
|
24
|
-
title:
|
|
25
|
-
description:
|
|
22
|
+
title: i("email-editor.onboarding-items-title"),
|
|
23
|
+
description: i("email-editor.onboarding-items-description"),
|
|
26
24
|
imageSource: "",
|
|
27
25
|
backButtonClick: () => {
|
|
28
26
|
},
|
|
29
27
|
nextButtonType: "text",
|
|
30
|
-
nextButtonText:
|
|
28
|
+
nextButtonText: i("products.next"),
|
|
31
29
|
nextButtonClick: () => {
|
|
32
30
|
o.next("itemsOnboarding");
|
|
33
31
|
}
|
|
@@ -37,16 +35,16 @@ const E = /* @__PURE__ */ l({
|
|
|
37
35
|
right: "426px",
|
|
38
36
|
top: n(218),
|
|
39
37
|
position: "Right Top",
|
|
40
|
-
title:
|
|
41
|
-
description:
|
|
38
|
+
title: i("email-editor.onboarding-items-item-type-title"),
|
|
39
|
+
description: i("email-editor.onboarding-items-item-type-description"),
|
|
42
40
|
imageSource: "",
|
|
43
41
|
backButtonType: "text",
|
|
44
|
-
backButtonText:
|
|
42
|
+
backButtonText: i("ds-steps.back"),
|
|
45
43
|
backButtonClick: () => {
|
|
46
44
|
o.previous("itemsOnboarding");
|
|
47
45
|
},
|
|
48
46
|
nextButtonType: "text",
|
|
49
|
-
nextButtonText:
|
|
47
|
+
nextButtonText: i("products.next"),
|
|
50
48
|
nextButtonClick: () => {
|
|
51
49
|
o.next("itemsOnboarding");
|
|
52
50
|
}
|
|
@@ -56,42 +54,42 @@ const E = /* @__PURE__ */ l({
|
|
|
56
54
|
right: "426px",
|
|
57
55
|
top: n(140),
|
|
58
56
|
position: "Right Top",
|
|
59
|
-
title:
|
|
60
|
-
description:
|
|
57
|
+
title: i("email-editor.onboarding-items-composition-title"),
|
|
58
|
+
description: i("email-editor.onboarding-items-composition-description"),
|
|
61
59
|
imageSource: "",
|
|
62
60
|
backButtonType: "text",
|
|
63
|
-
backButtonText:
|
|
61
|
+
backButtonText: i("ds-steps.back"),
|
|
64
62
|
backButtonClick: () => {
|
|
65
63
|
o.previous("itemsOnboarding");
|
|
66
64
|
},
|
|
67
65
|
nextButtonType: "text",
|
|
68
|
-
nextButtonText:
|
|
66
|
+
nextButtonText: i("action-builder.ok"),
|
|
69
67
|
nextButtonClick: () => {
|
|
70
68
|
o.close("itemsOnboarding");
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
]), g =
|
|
74
|
-
var t,
|
|
75
|
-
(
|
|
76
|
-
},
|
|
77
|
-
var t,
|
|
78
|
-
(
|
|
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);
|
|
79
77
|
};
|
|
80
|
-
return
|
|
78
|
+
return m(
|
|
81
79
|
() => o.isActive("itemsOnboarding"),
|
|
82
80
|
(t) => {
|
|
83
|
-
t && o.setConfig("itemsOnboarding",
|
|
81
|
+
t && o.setConfig("itemsOnboarding", a.value);
|
|
84
82
|
},
|
|
85
83
|
{ immediate: !0 }
|
|
86
|
-
),
|
|
84
|
+
), m(
|
|
87
85
|
() => o.onboardings.itemsOnboarding.cardIndex,
|
|
88
|
-
(t,
|
|
86
|
+
(t, e) => {
|
|
89
87
|
if (!o.isActive("itemsOnboarding"))
|
|
90
88
|
return;
|
|
91
|
-
const s = `${
|
|
92
|
-
s === "1-2" && r(
|
|
89
|
+
const s = `${e}-${t}`;
|
|
90
|
+
s === "1-2" && r(O), s === "2-1" && r(f);
|
|
93
91
|
}
|
|
94
|
-
), { __sfc: !0, trans:
|
|
92
|
+
), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition: n, switchTab: r, onboardingCardsConfig: a, isVisible: g, handleNext: p, handleBack: u, InOnboard: B };
|
|
95
93
|
}
|
|
96
94
|
});
|
|
97
95
|
export {
|