@useinsider/guido 3.2.0-beta.bbb580a → 3.2.0-beta.bbfbc6f

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.
Files changed (29) hide show
  1. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +10 -8
  2. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +35 -71
  3. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  4. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  5. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  6. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  7. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  8. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  9. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  10. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  11. package/dist/composables/useRibbonOffset.js +21 -0
  12. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  13. package/dist/enums/date.js +3 -3
  14. package/dist/enums/extensions/recommendationBlock.js +27 -28
  15. package/dist/enums/onboarding.js +7 -2
  16. package/dist/enums/unsubscribe.js +34 -27
  17. package/dist/extensions/Blocks/Items/template.js +46 -48
  18. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +5 -6
  19. package/dist/guido.css +1 -1
  20. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -236
  21. package/dist/package.json.js +1 -1
  22. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  23. package/dist/src/enums/date.d.ts +1 -1
  24. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
  25. package/dist/src/enums/onboarding.d.ts +6 -0
  26. package/dist/src/enums/unsubscribe.d.ts +5 -0
  27. package/dist/src/stores/onboarding.d.ts +4 -0
  28. package/dist/stores/onboarding.js +4 -0
  29. package/package.json +3 -3
@@ -1,24 +1,26 @@
1
- import l from "./FilterItem.vue2.js";
1
+ import r from "./FilterItem.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ import l from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var i = function() {
5
5
  var a = this, e = a._self._c, t = a._self._setupProxy;
6
6
  return e("div", { staticClass: "d-f f-d-c w-1 gap-16", attrs: { "data-filter-group": a.filter.filterGroup, "data-filter-number": a.filter.filterNumber } }, [e("div", { staticClass: "d-f a-i-c j-c-s-b pt-4", class: { "bor-t-s-s bor-t-w-1 bor-t-c-50": a.index === 0 } }, [e("p", [a._v(" " + a._s(t.trans("newsletter.filter")) + " " + a._s(a.index + 1) + " ")]), e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: function(s) {
7
7
  return t.emit("delete-filter", t.props.filter);
8
- } } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: t.handleOperatorChange } }), t.isAnyOfOperator ? e(t.InTags, { staticClass: "w-2", attrs: { "allow-bulk-paste": "", validate: "text", "allow-duplicates": !1, invalid: t.invalidFields.has("value"), "invalid-message": t.valueErrorMessage, label: t.trans("condition.value"), placeholder: t.trans("condition.enter-value-placeholder"), value: t.tagValues }, on: { input: t.onTagsInput } }) : t.isDateAttribute ? e(t.InDatePickerV2, { staticClass: "w-2", attrs: { id: "filter-item-input--value", "single-date-picker-status": "", name: "filter-item-input--value", "label-text": t.trans("condition.value"), locale: t.datePickerLocale, "placeholder-text": t.trans("condition.enter-value-placeholder"), state: t.getFieldState("value"), "state-message": t.valueErrorMessage, value: t.datePickerValue }, on: { apply: t.onDatePickerApply } }) : e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
8
+ } } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: function(s) {
9
+ return t.updateFilter({ text: "operator", value: s.value });
10
+ } } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
9
11
  t.updateFilter({ text: "value", value: encodeURIComponent(s) });
10
12
  } } })]], 2), t.props.hasLogicAdapter ? e("div", { staticClass: "w-1 d-f a-i-c j-c-c p-r bor-b-s-s bor-b-w-1 bor-b-c-50 mt-4" }, [e(t.LogicAdapter, { staticClass: "p-a", attrs: { logic: t.props.filter.innerGroupOperator }, on: { change: function(s) {
11
13
  return t.updateFilter({ text: "innerGroupOperator", value: s });
12
14
  } } })], 1) : a._e()]);
13
- }, n = [], o = /* @__PURE__ */ r(
14
- l,
15
+ }, o = [], n = /* @__PURE__ */ l(
16
+ r,
15
17
  i,
16
- n,
18
+ o,
17
19
  !1,
18
20
  null,
19
- "73d5d4a4"
21
+ "3b53a736"
20
22
  );
21
- const f = o.exports;
23
+ const f = n.exports;
22
24
  export {
23
25
  f as default
24
26
  };
@@ -1,13 +1,12 @@
1
- import { defineComponent as R, computed as r } from "vue";
2
- import { useTranslations as U } from "../../../../composables/useTranslations.js";
3
- import { getOperatorOptions as d, OP_ANY_OF as f } from "../../../../enums/extensions/recommendationBlock.js";
4
- import { useRecommendationExtensionStore as N } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { getInvalidFilterFields as E } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
6
- import { locale as j } from "../../../../utils/dateUtil.js";
7
- import { InTags as w, InButtonV2 as M, InSelect as Y, InDatePickerV2 as q, InBasicTextInput as z } from "@useinsider/design-system-vue";
8
- import G from "./LogicAdapter.vue.js";
9
- import { useDebounceFn as H } from "../../../../node_modules/@vueuse/shared/index.js";
10
- const ne = /* @__PURE__ */ R({
1
+ import { defineComponent as _, computed as l } from "vue";
2
+ import { useTranslations as C } from "../../../../composables/useTranslations.js";
3
+ import { getOperatorOptions as p } from "../../../../enums/extensions/recommendationBlock.js";
4
+ import { useRecommendationExtensionStore as V } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { getInvalidFilterFields as A } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
6
+ import { InButtonV2 as L, InSelect as O, InBasicTextInput as S } from "@useinsider/design-system-vue";
7
+ import E from "./LogicAdapter.vue.js";
8
+ import { useDebounceFn as N } from "../../../../node_modules/@vueuse/shared/index.js";
9
+ const K = /* @__PURE__ */ _({
11
10
  __name: "FilterItem",
12
11
  props: {
13
12
  filter: null,
@@ -16,90 +15,55 @@ const ne = /* @__PURE__ */ R({
16
15
  submitted: { type: Boolean }
17
16
  },
18
17
  emits: ["delete-filter"],
19
- setup(g, { emit: I }) {
20
- const t = g, s = U(), n = N(), O = [
18
+ setup(f, { emit: v }) {
19
+ const t = f, n = C(), a = V(), y = [
21
20
  {
22
- text: s("email-editor.standard-filter"),
21
+ text: n("email-editor.standard-filter"),
23
22
  value: "standardFilter"
24
23
  }
25
- ], u = [
24
+ ], i = [
26
25
  { text: "True", value: "true" },
27
26
  { text: "False", value: "false" }
28
- ], m = r(() => t.filter.attribute || ""), i = r(() => n.getFilterList.find((e) => e.value === m.value) || { text: "", value: "", type: "" }), h = r(
27
+ ], d = l(() => t.filter.attribute || ""), r = l(() => a.getFilterList.find((e) => e.value === d.value) || { text: "", value: "", type: "" }), F = l(
29
28
  () => {
30
29
  var e;
31
- return ((e = i.value) == null ? void 0 : e.type) === "Boolean";
30
+ return ((e = r.value) == null ? void 0 : e.type) === "Boolean";
32
31
  }
33
- ), T = r(() => {
32
+ ), b = l(() => {
34
33
  var e;
35
- return d((e = i.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
36
- }), b = r(
37
- () => u.find((e) => e.value === t.filter.value) || u[0]
38
- ), p = r(() => t.submitted ? E(t.filter) : /* @__PURE__ */ new Set()), A = (e) => p.value.has(e) ? "error" : "default", B = r(
39
- () => p.value.has("value") ? s("action-builder.filter-empty-value-error") : ""
40
- ), v = r(
34
+ return p((e = r.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
35
+ }), g = l(
36
+ () => i.find((e) => e.value === t.filter.value) || i[0]
37
+ ), u = l(() => t.submitted ? A(t.filter) : /* @__PURE__ */ new Set()), h = (e) => u.value.has(e) ? "error" : "default", B = l(
38
+ () => u.value.has("value") ? n("action-builder.filter-empty-value-error") : ""
39
+ ), c = l(
41
40
  () => {
42
41
  var e;
43
- return ((e = i.value) == null ? void 0 : e.type) === "Number";
42
+ return ((e = r.value) == null ? void 0 : e.type) === "Number";
44
43
  }
45
- ), x = r(() => v.value ? "number" : "text"), C = r(
46
- () => {
47
- var e;
48
- return ((e = i.value) == null ? void 0 : e.type) === "Date";
49
- }
50
- ), D = r(() => t.filter.operator === f), _ = r(
51
- () => decodeURIComponent(t.filter.value).split(",").filter(Boolean)
52
- ), k = H((e) => {
53
- n.updateFilter({
44
+ ), x = l(() => c.value ? "number" : "text"), T = N((e) => {
45
+ a.updateFilter({
54
46
  ...t.filter,
55
47
  [e.text]: e.value
56
48
  });
57
- }, 500), P = (e) => {
58
- const o = n.getFilterList.find((c) => c.value === e.value), l = (o == null ? void 0 : o.type) === "Boolean", [a] = d(o == null ? void 0 : o.type);
59
- n.updateFilter({
49
+ }, 500);
50
+ return { __sfc: !0, trans: n, store: a, props: t, filterTypeOptions: y, booleanValueOptions: i, attributeType: d, selectedAttributeType: r, isBooleanAttribute: F, selectedOperatorType: b, selectedBooleanValue: g, emit: v, invalidFields: u, getFieldState: h, valueErrorMessage: B, isNumericAttribute: c, valueInputType: x, updateFilter: T, handleAttributeChange: (e) => {
51
+ const o = a.getFilterList.find((I) => I.value === e.value), m = (o == null ? void 0 : o.type) === "Boolean", [s] = p(o == null ? void 0 : o.type);
52
+ a.updateFilter({
60
53
  ...t.filter,
61
54
  attribute: e.value,
62
- operator: l ? "=" : (a == null ? void 0 : a.value) ?? "",
63
- value: l ? "true" : ""
55
+ operator: m ? "=" : (s == null ? void 0 : s.value) ?? "",
56
+ value: m ? "true" : ""
64
57
  });
65
- }, V = (e) => {
66
- n.updateFilter({
58
+ }, handleBooleanValueChange: (e) => {
59
+ a.updateFilter({
67
60
  ...t.filter,
68
61
  operator: "=",
69
62
  value: e.value
70
63
  });
71
- }, S = (e) => {
72
- const o = e.value;
73
- if (o === t.filter.operator)
74
- return;
75
- const c = t.filter.operator === f !== (o === f);
76
- n.updateFilter({
77
- ...t.filter,
78
- operator: o,
79
- value: c ? "" : t.filter.value
80
- });
81
- }, $ = j(), y = (e) => {
82
- const [o, l, a] = e.split("-");
83
- return !o || !l || !a ? "" : `${l}/${a}/${o}`;
84
- }, F = (e) => {
85
- const [o, l, a] = e.split("/");
86
- return !a || !o || !l ? "" : `${a}-${o.padStart(2, "0")}-${l.padStart(2, "0")}`;
87
- }, L = r(
88
- () => y(decodeURIComponent(t.filter.value))
89
- );
90
- return { __sfc: !0, trans: s, store: n, props: t, filterTypeOptions: O, booleanValueOptions: u, attributeType: m, selectedAttributeType: i, isBooleanAttribute: h, selectedOperatorType: T, selectedBooleanValue: b, emit: I, invalidFields: p, getFieldState: A, valueErrorMessage: B, isNumericAttribute: v, valueInputType: x, isDateAttribute: C, isAnyOfOperator: D, tagValues: _, updateFilter: k, handleAttributeChange: P, handleBooleanValueChange: V, handleOperatorChange: S, datePickerLocale: $, isoToPickerDate: y, pickerDateToIso: F, datePickerValue: L, onDatePickerApply: (e) => {
91
- n.updateFilter({
92
- ...t.filter,
93
- value: encodeURIComponent(F(e))
94
- });
95
- }, onTagsInput: (e) => {
96
- n.updateFilter({
97
- ...t.filter,
98
- value: encodeURIComponent(e.join(","))
99
- });
100
- }, getOperatorOptions: d, InBasicTextInput: z, InDatePickerV2: q, InSelect: Y, InButtonV2: M, InTags: w, LogicAdapter: G };
64
+ }, getOperatorOptions: p, InBasicTextInput: S, InSelect: O, InButtonV2: L, LogicAdapter: E };
101
65
  }
102
66
  });
103
67
  export {
104
- ne as default
68
+ K as default
105
69
  };
@@ -1,37 +1,57 @@
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({
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(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);
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 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 };
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
- O as default
56
+ G as default
37
57
  };
@@ -13,7 +13,7 @@ var l = function() {
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "29b9af29"
16
+ "7419ae06"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -1,23 +1,24 @@
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({
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(B) {
9
- const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
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 && m.forEach((n) => {
12
- var d;
13
- const a = (d = t.shadowRoot) == null ? void 0 : d.querySelector(n);
14
- a && a.classList.add("hover");
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
- }, s = i(() => [
17
+ }, a = r(() => [
17
18
  {
18
19
  classes: "guido-onboarding-blocks",
19
20
  left: "90px",
20
- top: "90px",
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: r.value,
55
- top: "90px",
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
- ]), g = i(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
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
- }, u = () => {
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 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 };
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
- S as default
83
+ y as default
83
84
  };
@@ -13,7 +13,7 @@ var l = function() {
13
13
  c,
14
14
  !1,
15
15
  null,
16
- "dd1a237a"
16
+ "796d193b"
17
17
  );
18
18
  const I = p.exports;
19
19
  export {
@@ -1,33 +1,31 @@
1
- import { defineComponent as l, computed as a, watch as u } from "vue";
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 { 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({
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 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))
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 } = i, m = s.querySelector(t);
17
- m && m.click();
18
- }, d = a(() => [
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: e("email-editor.onboarding-items-title"),
25
- description: e("email-editor.onboarding-items-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: e("products.next"),
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: e("email-editor.onboarding-items-item-type-title"),
41
- description: e("email-editor.onboarding-items-item-type-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: e("ds-steps.back"),
42
+ backButtonText: i("ds-steps.back"),
45
43
  backButtonClick: () => {
46
44
  o.previous("itemsOnboarding");
47
45
  },
48
46
  nextButtonType: "text",
49
- nextButtonText: e("products.next"),
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: e("email-editor.onboarding-items-composition-title"),
60
- description: e("email-editor.onboarding-items-composition-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: e("ds-steps.back"),
61
+ backButtonText: i("ds-steps.back"),
64
62
  backButtonClick: () => {
65
63
  o.previous("itemsOnboarding");
66
64
  },
67
65
  nextButtonType: "text",
68
- nextButtonText: e("action-builder.ok"),
66
+ nextButtonText: i("action-builder.ok"),
69
67
  nextButtonClick: () => {
70
68
  o.close("itemsOnboarding");
71
69
  }
72
70
  }
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);
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 u(
78
+ return m(
81
79
  () => o.isActive("itemsOnboarding"),
82
80
  (t) => {
83
- t && o.setConfig("itemsOnboarding", d.value);
81
+ t && o.setConfig("itemsOnboarding", a.value);
84
82
  },
85
83
  { immediate: !0 }
86
- ), u(
84
+ ), m(
87
85
  () => o.onboardings.itemsOnboarding.cardIndex,
88
- (t, i) => {
86
+ (t, e) => {
89
87
  if (!o.isActive("itemsOnboarding"))
90
88
  return;
91
- const s = `${i}-${t}`;
92
- s === "1-2" && r(B), s === "2-1" && r(f);
89
+ const s = `${e}-${t}`;
90
+ s === "1-2" && r(O), s === "2-1" && r(f);
93
91
  }
94
- ), { __sfc: !0, trans: e, onboardingStore: o, ribbonOffset: c, getTopPosition: n, switchTab: r, onboardingCardsConfig: d, isVisible: g, handleNext: p, handleBack: b, InOnboard: k };
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 {
@@ -13,9 +13,9 @@ var g = function() {
13
13
  b,
14
14
  !1,
15
15
  null,
16
- "d073b1dc"
16
+ "cadfc82d"
17
17
  );
18
- const f = p.exports;
18
+ const C = p.exports;
19
19
  export {
20
- f as default
20
+ C as default
21
21
  };
@@ -1,74 +1,63 @@
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({
1
+ import { defineComponent as l, computed as c, watch as g } from "vue";
2
+ import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as x } from "../../../composables/useTranslations.js";
4
+ import { useOnboardingStore as u } from "../../../stores/onboarding.js";
5
+ import { InOnboard as p } from "@useinsider/design-system-vue";
6
+ const O = /* @__PURE__ */ l({
6
7
  __name: "TextBlockOnboarding",
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(() => [
8
+ setup(k) {
9
+ const n = x(), o = u(), { getTopPosition: i } = b(), r = c(() => [
21
10
  {
22
11
  classes: "guido-text-block-onboarding-settings",
23
12
  right: "426px",
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"),
13
+ top: i(90),
14
+ position: "Right Top",
15
+ title: n("email-editor.onboarding-text-block-title"),
16
+ description: n("email-editor.onboarding-text-block-description"),
28
17
  imageSource: "",
29
18
  backButtonClick: () => {
30
19
  },
31
20
  nextButtonType: "text",
32
- nextButtonText: i("products.next"),
21
+ nextButtonText: n("products.next"),
33
22
  nextButtonClick: () => {
34
23
  o.next("textBlockOnboarding");
35
24
  }
36
25
  },
37
26
  {
38
27
  classes: "guido-text-block-onboarding-dynamic",
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"),
28
+ right: "409px",
29
+ top: i(607),
30
+ position: "Right Top",
31
+ title: n("email-editor.onboarding-dynamic-content-title"),
32
+ description: n("email-editor.onboarding-dynamic-content-description"),
44
33
  imageSource: "",
45
34
  backButtonType: "text",
46
- backButtonText: i("ds-steps.back"),
35
+ backButtonText: n("ds-steps.back"),
47
36
  backButtonClick: () => {
48
37
  o.previous("textBlockOnboarding");
49
38
  },
50
39
  nextButtonType: "text",
51
- nextButtonText: i("action-builder.ok"),
40
+ nextButtonText: n("action-builder.ok"),
52
41
  nextButtonClick: () => {
53
42
  o.close("textBlockOnboarding");
54
43
  }
55
44
  }
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);
45
+ ]), a = c(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), s = () => {
46
+ var t, e;
47
+ (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
48
+ }, d = () => {
49
+ var t, e;
50
+ (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
62
51
  };
63
- return b(
52
+ return g(
64
53
  () => o.isActive("textBlockOnboarding"),
65
54
  (t) => {
66
- t && o.setConfig("textBlockOnboarding", c.value);
55
+ t && o.setConfig("textBlockOnboarding", r.value);
67
56
  },
68
57
  { immediate: !0 }
69
- ), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
58
+ ), { __sfc: !0, trans: n, onboardingStore: o, getTopPosition: i, onboardingCardsConfig: r, isVisible: a, handleNext: s, handleBack: d, InOnboard: p };
70
59
  }
71
60
  });
72
61
  export {
73
- y as default
62
+ O as default
74
63
  };