@useinsider/guido 3.2.0-beta.066130b → 3.2.0-beta.1a14d2a
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/organisms/onboarding/AMPOnboarding.vue2.js +31 -51
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +22 -23
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +39 -37
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +41 -30
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +14 -15
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +33 -30
- package/dist/config/migrator/recommendationMigrator.js +1 -1
- package/dist/enums/onboarding.js +2 -7
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +6 -6
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +29 -25
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +324 -218
- package/dist/package.json.js +1 -1
- package/dist/src/enums/onboarding.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
- package/dist/src/stores/onboarding.d.ts +0 -4
- package/dist/static/styles/components/button.css.js +16 -9
- package/dist/static/styles/components/loader.css.js +4 -0
- package/dist/static/styles/components/narrow-panel.css.js +52 -0
- package/dist/stores/onboarding.js +0 -4
- package/package.json +3 -3
- package/dist/composables/useRibbonOffset.js +0 -21
- package/dist/src/composables/useRibbonOffset.d.ts +0 -4
|
@@ -1,57 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const G = /* @__PURE__ */ u({
|
|
1
|
+
import { defineComponent as p, computed as e, watch as m } from "vue";
|
|
2
|
+
import { useTranslations as g } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as u } from "../../../stores/onboarding.js";
|
|
4
|
+
import { InOnboard as b } from "@useinsider/design-system-vue";
|
|
5
|
+
const O = /* @__PURE__ */ p({
|
|
7
6
|
__name: "AMPOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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);
|
|
7
|
+
setup(l) {
|
|
8
|
+
const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 110}px`), a = e(() => [
|
|
9
|
+
{
|
|
10
|
+
classes: "guido-amp-onboarding",
|
|
11
|
+
left: r.value,
|
|
12
|
+
top: "70px",
|
|
13
|
+
position: "Top Center",
|
|
14
|
+
title: i("email-editor.onboarding-amp-title"),
|
|
15
|
+
description: i("email-editor.onboarding-amp-description"),
|
|
16
|
+
imageSource: "",
|
|
17
|
+
backButtonClick: () => {
|
|
18
|
+
},
|
|
19
|
+
nextButtonType: "text",
|
|
20
|
+
nextButtonText: i("action-builder.ok"),
|
|
21
|
+
nextButtonClick: () => void o.close("ampOnboarding")
|
|
22
|
+
}
|
|
23
|
+
]), d = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), s = () => {
|
|
24
|
+
var n, t;
|
|
25
|
+
(t = (n = o.getAmpCurrentCard) == null ? void 0 : n.nextButtonClick) == null || t.call(n);
|
|
26
|
+
}, c = () => {
|
|
27
|
+
var n, t;
|
|
28
|
+
(t = (n = o.getAmpCurrentCard) == null ? void 0 : n.backButtonClick) == null || t.call(n);
|
|
45
29
|
};
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
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 };
|
|
30
|
+
return m(() => o.onboardings.ampOnboarding.isActive, (n) => {
|
|
31
|
+
n && o.setConfig("ampOnboarding", a.value);
|
|
32
|
+
}, { immediate: !0 }), { __sfc: !0, trans: i, onboardingStore: o, centerLeft: r, onboardingCardsConfig: a, isVisible: d, handleNext: s, handleBack: c, InOnboard: b };
|
|
53
33
|
}
|
|
54
34
|
});
|
|
55
35
|
export {
|
|
56
|
-
|
|
36
|
+
O as default
|
|
57
37
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { defineComponent as l, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const y = /* @__PURE__ */ l({
|
|
1
|
+
import { defineComponent as l, computed as i, watch as b } from "vue";
|
|
2
|
+
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { SERVICE_HOVER_SELECTORS as m } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as f } from "@useinsider/design-system-vue";
|
|
6
|
+
const S = /* @__PURE__ */ l({
|
|
8
7
|
__name: "GenericOnboarding",
|
|
9
|
-
setup(
|
|
10
|
-
const e =
|
|
8
|
+
setup(B) {
|
|
9
|
+
const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
|
|
11
10
|
const t = document.querySelector("ui-editor");
|
|
12
|
-
t != null && t.shadowRoot &&
|
|
13
|
-
var
|
|
14
|
-
const
|
|
15
|
-
|
|
11
|
+
t != null && t.shadowRoot && m.forEach((n) => {
|
|
12
|
+
var d;
|
|
13
|
+
const a = (d = t.shadowRoot) == null ? void 0 : d.querySelector(n);
|
|
14
|
+
a && a.classList.add("hover");
|
|
16
15
|
});
|
|
17
|
-
},
|
|
16
|
+
}, s = i(() => [
|
|
18
17
|
{
|
|
19
18
|
classes: "guido-onboarding-blocks",
|
|
20
19
|
left: "90px",
|
|
21
|
-
top:
|
|
20
|
+
top: "90px",
|
|
22
21
|
position: "Left Top",
|
|
23
22
|
title: e("email-editor.onboarding-blocks-title"),
|
|
24
23
|
description: e("email-editor.onboarding-blocks-description"),
|
|
@@ -52,8 +51,8 @@ const y = /* @__PURE__ */ l({
|
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
classes: "guido-onboarding-preview",
|
|
55
|
-
left:
|
|
56
|
-
top:
|
|
54
|
+
left: r.value,
|
|
55
|
+
top: "90px",
|
|
57
56
|
position: "Top Center",
|
|
58
57
|
title: e("email-editor.onboarding-preview-title"),
|
|
59
58
|
description: e("email-editor.onboarding-preview-description"),
|
|
@@ -67,18 +66,18 @@ const y = /* @__PURE__ */ l({
|
|
|
67
66
|
o.close("genericOnboarding");
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
|
-
]),
|
|
69
|
+
]), g = i(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
|
|
71
70
|
var t, n;
|
|
72
71
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
73
|
-
},
|
|
72
|
+
}, u = () => {
|
|
74
73
|
var t, n;
|
|
75
74
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
76
75
|
};
|
|
77
|
-
return
|
|
78
|
-
t && o.setConfig("genericOnboarding",
|
|
79
|
-
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o,
|
|
76
|
+
return b(() => o.onboardings.genericOnboarding.isActive, (t) => {
|
|
77
|
+
t && o.setConfig("genericOnboarding", s.value);
|
|
78
|
+
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: r, addHoverToServiceElements: c, onboardingCardsConfig: s, isVisible: g, handleNext: p, handleBack: u, InOnboard: f };
|
|
80
79
|
}
|
|
81
80
|
});
|
|
82
81
|
export {
|
|
83
|
-
|
|
82
|
+
S as default
|
|
84
83
|
};
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRibbonOffset as l } from "../../../composables/useRibbonOffset.js";
|
|
1
|
+
import { defineComponent as l, computed as a, watch as u } from "vue";
|
|
3
2
|
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useOnboardingStore as
|
|
6
|
-
import { InOnboard as
|
|
7
|
-
const E = /* @__PURE__ */
|
|
3
|
+
import { RIBBON_SELECTOR as T, UI_EDITOR_SELECTOR as O, CARD_COMPOSITION_TAB_SELECTOR as B, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as C } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as k } from "@useinsider/design-system-vue";
|
|
6
|
+
const E = /* @__PURE__ */ l({
|
|
8
7
|
__name: "ItemsOnboarding",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
8
|
+
setup(_) {
|
|
9
|
+
const e = x(), o = C(), c = a(() => {
|
|
10
|
+
const t = document.querySelector(T);
|
|
11
|
+
return (t == null ? void 0 : t.offsetHeight) ?? 0;
|
|
12
|
+
}), n = (t) => `${t + c.value}px`, r = (t) => {
|
|
13
|
+
const i = document.querySelector(O);
|
|
14
|
+
if (!(i != null && i.shadowRoot))
|
|
13
15
|
return;
|
|
14
|
-
const { shadowRoot: s } =
|
|
15
|
-
|
|
16
|
-
},
|
|
16
|
+
const { shadowRoot: s } = i, m = s.querySelector(t);
|
|
17
|
+
m && m.click();
|
|
18
|
+
}, d = a(() => [
|
|
17
19
|
{
|
|
18
20
|
classes: "guido-items-onboarding-card-1",
|
|
19
21
|
right: "426px",
|
|
20
22
|
top: n(90),
|
|
21
23
|
position: "Right Top",
|
|
22
|
-
title:
|
|
23
|
-
description:
|
|
24
|
+
title: e("email-editor.onboarding-items-title"),
|
|
25
|
+
description: e("email-editor.onboarding-items-description"),
|
|
24
26
|
imageSource: "",
|
|
25
27
|
backButtonClick: () => {
|
|
26
28
|
},
|
|
27
29
|
nextButtonType: "text",
|
|
28
|
-
nextButtonText:
|
|
30
|
+
nextButtonText: e("products.next"),
|
|
29
31
|
nextButtonClick: () => {
|
|
30
32
|
o.next("itemsOnboarding");
|
|
31
33
|
}
|
|
@@ -35,16 +37,16 @@ const E = /* @__PURE__ */ b({
|
|
|
35
37
|
right: "426px",
|
|
36
38
|
top: n(218),
|
|
37
39
|
position: "Right Top",
|
|
38
|
-
title:
|
|
39
|
-
description:
|
|
40
|
+
title: e("email-editor.onboarding-items-item-type-title"),
|
|
41
|
+
description: e("email-editor.onboarding-items-item-type-description"),
|
|
40
42
|
imageSource: "",
|
|
41
43
|
backButtonType: "text",
|
|
42
|
-
backButtonText:
|
|
44
|
+
backButtonText: e("ds-steps.back"),
|
|
43
45
|
backButtonClick: () => {
|
|
44
46
|
o.previous("itemsOnboarding");
|
|
45
47
|
},
|
|
46
48
|
nextButtonType: "text",
|
|
47
|
-
nextButtonText:
|
|
49
|
+
nextButtonText: e("products.next"),
|
|
48
50
|
nextButtonClick: () => {
|
|
49
51
|
o.next("itemsOnboarding");
|
|
50
52
|
}
|
|
@@ -54,42 +56,42 @@ const E = /* @__PURE__ */ b({
|
|
|
54
56
|
right: "426px",
|
|
55
57
|
top: n(140),
|
|
56
58
|
position: "Right Top",
|
|
57
|
-
title:
|
|
58
|
-
description:
|
|
59
|
+
title: e("email-editor.onboarding-items-composition-title"),
|
|
60
|
+
description: e("email-editor.onboarding-items-composition-description"),
|
|
59
61
|
imageSource: "",
|
|
60
62
|
backButtonType: "text",
|
|
61
|
-
backButtonText:
|
|
63
|
+
backButtonText: e("ds-steps.back"),
|
|
62
64
|
backButtonClick: () => {
|
|
63
65
|
o.previous("itemsOnboarding");
|
|
64
66
|
},
|
|
65
67
|
nextButtonType: "text",
|
|
66
|
-
nextButtonText:
|
|
68
|
+
nextButtonText: e("action-builder.ok"),
|
|
67
69
|
nextButtonClick: () => {
|
|
68
70
|
o.close("itemsOnboarding");
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
]), g =
|
|
72
|
-
var t,
|
|
73
|
-
(
|
|
74
|
-
},
|
|
75
|
-
var t,
|
|
76
|
-
(
|
|
73
|
+
]), g = a(() => o.onboardings.itemsOnboarding.config.length > 0 && o.onboardings.itemsOnboarding.isActive), p = () => {
|
|
74
|
+
var t, i;
|
|
75
|
+
(i = (t = o.getItemsCurrentCard) == null ? void 0 : t.nextButtonClick) == null || i.call(t);
|
|
76
|
+
}, b = () => {
|
|
77
|
+
var t, i;
|
|
78
|
+
(i = (t = o.getItemsCurrentCard) == null ? void 0 : t.backButtonClick) == null || i.call(t);
|
|
77
79
|
};
|
|
78
|
-
return
|
|
80
|
+
return u(
|
|
79
81
|
() => o.isActive("itemsOnboarding"),
|
|
80
82
|
(t) => {
|
|
81
|
-
t && o.setConfig("itemsOnboarding",
|
|
83
|
+
t && o.setConfig("itemsOnboarding", d.value);
|
|
82
84
|
},
|
|
83
85
|
{ immediate: !0 }
|
|
84
|
-
),
|
|
86
|
+
), u(
|
|
85
87
|
() => o.onboardings.itemsOnboarding.cardIndex,
|
|
86
|
-
(t,
|
|
88
|
+
(t, i) => {
|
|
87
89
|
if (!o.isActive("itemsOnboarding"))
|
|
88
90
|
return;
|
|
89
|
-
const s = `${
|
|
90
|
-
s === "1-2" && r(
|
|
91
|
+
const s = `${i}-${t}`;
|
|
92
|
+
s === "1-2" && r(B), s === "2-1" && r(f);
|
|
91
93
|
}
|
|
92
|
-
), { __sfc: !0, trans:
|
|
94
|
+
), { __sfc: !0, trans: e, onboardingStore: o, ribbonOffset: c, getTopPosition: n, switchTab: r, onboardingCardsConfig: d, isVisible: g, handleNext: p, handleBack: b, InOnboard: k };
|
|
93
95
|
}
|
|
94
96
|
});
|
|
95
97
|
export {
|
|
@@ -1,63 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const O = /* @__PURE__ */ l({
|
|
1
|
+
import { defineComponent as u, computed as a, watch as b } from "vue";
|
|
2
|
+
import { useTranslations as m } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
4
|
+
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
5
|
+
const y = /* @__PURE__ */ u({
|
|
7
6
|
__name: "TextBlockOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
7
|
+
setup(h) {
|
|
8
|
+
const i = m(), o = k(), e = a(() => {
|
|
9
|
+
const n = window.innerHeight - 128, r = Math.max(90, n * 0.15), s = Math.max(490, n * 0.71), d = 200, g = 40;
|
|
10
|
+
return {
|
|
11
|
+
settings: {
|
|
12
|
+
top: `${r}px`,
|
|
13
|
+
position: r + d + g > n ? "Right Bottom" : "Right Top"
|
|
14
|
+
},
|
|
15
|
+
dynamic: {
|
|
16
|
+
top: `${s}px`,
|
|
17
|
+
position: s + d + g > n ? "Right Bottom" : "Right Top"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}), c = a(() => [
|
|
10
21
|
{
|
|
11
22
|
classes: "guido-text-block-onboarding-settings",
|
|
12
23
|
right: "426px",
|
|
13
|
-
top:
|
|
14
|
-
position:
|
|
15
|
-
title:
|
|
16
|
-
description:
|
|
24
|
+
top: e.value.settings.top,
|
|
25
|
+
position: e.value.settings.position,
|
|
26
|
+
title: i("email-editor.onboarding-text-block-title"),
|
|
27
|
+
description: i("email-editor.onboarding-text-block-description"),
|
|
17
28
|
imageSource: "",
|
|
18
29
|
backButtonClick: () => {
|
|
19
30
|
},
|
|
20
31
|
nextButtonType: "text",
|
|
21
|
-
nextButtonText:
|
|
32
|
+
nextButtonText: i("products.next"),
|
|
22
33
|
nextButtonClick: () => {
|
|
23
34
|
o.next("textBlockOnboarding");
|
|
24
35
|
}
|
|
25
36
|
},
|
|
26
37
|
{
|
|
27
38
|
classes: "guido-text-block-onboarding-dynamic",
|
|
28
|
-
right: "
|
|
29
|
-
top:
|
|
30
|
-
position:
|
|
31
|
-
title:
|
|
32
|
-
description:
|
|
39
|
+
right: "426px",
|
|
40
|
+
top: e.value.dynamic.top,
|
|
41
|
+
position: e.value.dynamic.position,
|
|
42
|
+
title: i("email-editor.onboarding-dynamic-content-title"),
|
|
43
|
+
description: i("email-editor.onboarding-dynamic-content-description"),
|
|
33
44
|
imageSource: "",
|
|
34
45
|
backButtonType: "text",
|
|
35
|
-
backButtonText:
|
|
46
|
+
backButtonText: i("ds-steps.back"),
|
|
36
47
|
backButtonClick: () => {
|
|
37
48
|
o.previous("textBlockOnboarding");
|
|
38
49
|
},
|
|
39
50
|
nextButtonType: "text",
|
|
40
|
-
nextButtonText:
|
|
51
|
+
nextButtonText: i("action-builder.ok"),
|
|
41
52
|
nextButtonClick: () => {
|
|
42
53
|
o.close("textBlockOnboarding");
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
|
-
]),
|
|
46
|
-
var t,
|
|
47
|
-
(
|
|
48
|
-
},
|
|
49
|
-
var t,
|
|
50
|
-
(
|
|
56
|
+
]), l = a(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), p = () => {
|
|
57
|
+
var t, n;
|
|
58
|
+
(n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
59
|
+
}, x = () => {
|
|
60
|
+
var t, n;
|
|
61
|
+
(n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
51
62
|
};
|
|
52
|
-
return
|
|
63
|
+
return b(
|
|
53
64
|
() => o.isActive("textBlockOnboarding"),
|
|
54
65
|
(t) => {
|
|
55
|
-
t && o.setConfig("textBlockOnboarding",
|
|
66
|
+
t && o.setConfig("textBlockOnboarding", c.value);
|
|
56
67
|
},
|
|
57
68
|
{ immediate: !0 }
|
|
58
|
-
), { __sfc: !0, trans:
|
|
69
|
+
), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
|
|
59
70
|
}
|
|
60
71
|
});
|
|
61
72
|
export {
|
|
62
|
-
|
|
73
|
+
y as default
|
|
63
74
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const k = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as c, computed as e, watch as g } from "vue";
|
|
2
|
+
import { useTranslations as b } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as u } from "../../../stores/onboarding.js";
|
|
4
|
+
import { InOnboard as l } from "@useinsider/design-system-vue";
|
|
5
|
+
const C = /* @__PURE__ */ c({
|
|
7
6
|
__name: "VersionHistoryOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const t =
|
|
7
|
+
setup(p) {
|
|
8
|
+
const t = b(), n = u(), r = e(() => [
|
|
10
9
|
{
|
|
11
10
|
classes: "guido-version-history-onboarding",
|
|
12
11
|
left: "409px",
|
|
13
|
-
top:
|
|
12
|
+
top: "192px",
|
|
14
13
|
position: "Left Top",
|
|
15
14
|
title: t("email-editor.onboarding-version-history-title"),
|
|
16
15
|
description: t("email-editor.onboarding-version-history-description"),
|
|
@@ -21,18 +20,18 @@ const k = /* @__PURE__ */ g({
|
|
|
21
20
|
nextButtonText: t("action-builder.ok"),
|
|
22
21
|
nextButtonClick: () => void n.close("versionHistoryOnboarding")
|
|
23
22
|
}
|
|
24
|
-
]),
|
|
23
|
+
]), s = e(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), a = () => {
|
|
25
24
|
var o, i;
|
|
26
25
|
(i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.nextButtonClick) == null || i.call(o);
|
|
27
|
-
},
|
|
26
|
+
}, d = () => {
|
|
28
27
|
var o, i;
|
|
29
28
|
(i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.backButtonClick) == null || i.call(o);
|
|
30
29
|
};
|
|
31
|
-
return
|
|
32
|
-
o && n.setConfig("versionHistoryOnboarding",
|
|
33
|
-
}, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n,
|
|
30
|
+
return g(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
|
|
31
|
+
o && n.setConfig("versionHistoryOnboarding", r.value);
|
|
32
|
+
}, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, onboardingCardsConfig: r, isVisible: s, handleNext: a, handleBack: d, InOnboard: l };
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
C as default
|
|
38
37
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRecommendation as
|
|
2
|
-
import { DUMMY_IMAGE_MAPPINGS as
|
|
1
|
+
import { useRecommendation as N } from "../../composables/useRecommendation.js";
|
|
2
|
+
import { DUMMY_IMAGE_MAPPINGS as y, REGEX as T, VerticalOrientation as M, CSS as E, ATTRIBUTES as A, CONDITIONS as g, HTML as h } from "../../enums/recommendation.js";
|
|
3
3
|
import { prepareRecommendationBlocks as x } from "./utils/recommendationCompilerUtils.js";
|
|
4
4
|
const w = [
|
|
5
5
|
{
|
|
@@ -8,7 +8,7 @@ const w = [
|
|
|
8
8
|
type: "custom",
|
|
9
9
|
processor: (c) => {
|
|
10
10
|
let e = c;
|
|
11
|
-
return Object.entries(
|
|
11
|
+
return Object.entries(y).forEach(([, l]) => {
|
|
12
12
|
Object.entries(l).forEach(([n, s]) => {
|
|
13
13
|
e = e.replaceAll(s, `{{${n}}}`);
|
|
14
14
|
});
|
|
@@ -30,13 +30,13 @@ const w = [
|
|
|
30
30
|
description: "Adding recommendation unresponsive css",
|
|
31
31
|
type: "custom",
|
|
32
32
|
processor: (c) => {
|
|
33
|
-
const { calculateCardWidth: e, getRecommendationCampaignData: l } =
|
|
33
|
+
const { calculateCardWidth: e, getRecommendationCampaignData: l } = N();
|
|
34
34
|
let n = c;
|
|
35
35
|
const s = n.match(T.ID);
|
|
36
36
|
if (s) {
|
|
37
37
|
const a = [];
|
|
38
38
|
if (s.forEach((i) => {
|
|
39
|
-
const
|
|
39
|
+
const u = /recommendation-id="(.*?)"/i.exec(i), _ = u ? u[1].trim() : "", R = l(_);
|
|
40
40
|
R.textTrimming && R.orientation === M && a.push(e(R));
|
|
41
41
|
}), a.length) {
|
|
42
42
|
const i = `width:${Math.min(...a)}px!important;`;
|
|
@@ -60,25 +60,25 @@ const w = [
|
|
|
60
60
|
type: "custom",
|
|
61
61
|
processor: (c) => {
|
|
62
62
|
let e = c;
|
|
63
|
-
const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } =
|
|
63
|
+
const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = N();
|
|
64
64
|
return l !== null && l.forEach((s) => {
|
|
65
65
|
const a = s.match(T.CUSTOM_FIELD);
|
|
66
66
|
if (!a)
|
|
67
67
|
return;
|
|
68
|
-
const [i] = a,
|
|
69
|
-
if (!
|
|
68
|
+
const [i] = a, u = i.match(T.CUSTOM_FIELD_INDEXES_PART), _ = i.match(T.CUSTOM_FIELD_NAME_PART), R = s.match(T.ATTRIBUTE_PARAGRAPH_START_TAG);
|
|
69
|
+
if (!u || !_ || !R)
|
|
70
70
|
return;
|
|
71
|
-
const [S] =
|
|
71
|
+
const [S] = u, [b] = _, [d] = R, o = b.substring(1, b.length - 2), r = d.match(T.COMPOSITION) !== null;
|
|
72
72
|
let t = i;
|
|
73
73
|
if (r) {
|
|
74
|
-
const I = S.substring(2, S.length - 3),
|
|
75
|
-
o === A.OMNIBUS_PRICE && (
|
|
74
|
+
const I = S.substring(2, S.length - 3), m = n(I);
|
|
75
|
+
o === A.OMNIBUS_PRICE && (m.priceBeforeTextValue && (t = `${m.priceBeforeTextValue}${t}`), m.priceAfterTextValue && (t = `${t}${m.priceAfterTextValue}`)), o === A.OMNIBUS_DISCOUNT && (m.discountBeforeTextValue && (t = `${m.discountBeforeTextValue}${t}`), m.discountAfterTextValue && (t = `${t}${m.discountAfterTextValue}`));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const p = S.substring(2);
|
|
78
78
|
let f = "";
|
|
79
|
-
o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${
|
|
80
|
-
const $ = `${
|
|
81
|
-
e = e.replace(s,
|
|
79
|
+
o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${p}${A.DISCOUNT}`).replaceAll(`{${A.OMNIBUS_DISCOUNT}}`, `${p}${A.OMNIBUS_DISCOUNT}`).replaceAll(`{${A.OMNIBUS_PRICE}}`, `${p}${A.OMNIBUS_PRICE}`));
|
|
80
|
+
const $ = `${d}${t}${h.PARAGRAPH_END_TAG}`, C = `${f}${r ? $ : s}${g.ELSE}${d}${h.PARAGRAPH_END_TAG}${g.END_IF}`;
|
|
81
|
+
e = e.replace(s, C);
|
|
82
82
|
}), e;
|
|
83
83
|
},
|
|
84
84
|
priority: 53
|
|
@@ -136,7 +136,7 @@ const w = [
|
|
|
136
136
|
/@media[^{]*max-width\s*:\s*480px[^{]*\{((?:[^{}]*\{[^{}]*\})*[^{}]*)\}/g,
|
|
137
137
|
(l, n) => {
|
|
138
138
|
const s = n.match(/[^{}]+\{[^{}]*\}/g) || [], a = /ins-recommendation|product-image-cell|button-cell|product-info-cell/;
|
|
139
|
-
return s.every((
|
|
139
|
+
return s.every((u) => a.test(u)) ? "" : l;
|
|
140
140
|
}
|
|
141
141
|
)), e;
|
|
142
142
|
},
|
|
@@ -151,7 +151,7 @@ const w = [
|
|
|
151
151
|
/<a\b[^>]*\bes-button\b[^>]*>/g,
|
|
152
152
|
(o) => o.replace(
|
|
153
153
|
/([;"]color:)([^;"]+)/g,
|
|
154
|
-
(r, t,
|
|
154
|
+
(r, t, p) => p.includes("!important") ? r : `${t}${p} !important`
|
|
155
155
|
)
|
|
156
156
|
), l = /<!--REC_START-->([\s\S]*?)<!--REC_END-->/g, n = / style="([^"]*)"/g, s = /* @__PURE__ */ new Map();
|
|
157
157
|
let a = l.exec(e);
|
|
@@ -163,12 +163,12 @@ const w = [
|
|
|
163
163
|
}
|
|
164
164
|
n.lastIndex = 0, a = l.exec(e);
|
|
165
165
|
}
|
|
166
|
-
const i = /* @__PURE__ */ new Map(),
|
|
166
|
+
const i = /* @__PURE__ */ new Map(), u = [];
|
|
167
167
|
let _ = 0;
|
|
168
168
|
if (s.forEach((o, r) => {
|
|
169
169
|
if (o >= 6) {
|
|
170
|
-
const t = `rc${_++}
|
|
171
|
-
i.set(r, t),
|
|
170
|
+
const t = `rc${_++}`, p = r.endsWith(";") ? r : `${r};`;
|
|
171
|
+
i.set(r, t), u.push(`.${t}{${p}}`);
|
|
172
172
|
}
|
|
173
173
|
}), i.size === 0) {
|
|
174
174
|
let o = e;
|
|
@@ -182,23 +182,23 @@ const w = [
|
|
|
182
182
|
caseB: new RegExp(` style="${t}"((?:[^>]*?))(class="[^"]*")`, "g")
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
|
-
let
|
|
186
|
-
return
|
|
185
|
+
let d = e.replace("</style>", `${u.join("")}</style>`);
|
|
186
|
+
return d = d.replace(
|
|
187
187
|
/<!--REC_START-->([\s\S]*?)<!--REC_END-->/g,
|
|
188
188
|
(o, r) => {
|
|
189
189
|
let t = r;
|
|
190
|
-
return i.forEach((
|
|
190
|
+
return i.forEach((p, f) => {
|
|
191
191
|
const $ = b.get(f);
|
|
192
192
|
t = t.replace(
|
|
193
193
|
$.caseA,
|
|
194
|
-
(
|
|
194
|
+
(C, I, m) => S(I, p) + m
|
|
195
195
|
), t = t.replace(
|
|
196
196
|
$.caseB,
|
|
197
|
-
(
|
|
198
|
-
), t = t.replaceAll(` style="${f}"`, ` class="${
|
|
197
|
+
(C, I, m) => I + S(m, p)
|
|
198
|
+
), t = t.replaceAll(` style="${f}"`, ` class="${p}"`);
|
|
199
199
|
}), t;
|
|
200
200
|
}
|
|
201
|
-
),
|
|
201
|
+
), d = d.replaceAll("<!--REC_START-->", ""), d = d.replaceAll("<!--REC_END-->", ""), d;
|
|
202
202
|
},
|
|
203
203
|
priority: 58
|
|
204
204
|
}
|