@useinsider/guido 3.2.0-beta.b7196b2 → 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.
@@ -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
  };
@@ -1,15 +1,16 @@
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({
1
+ import { defineComponent as g, computed as s, watch as b } from "vue";
2
+ import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as l } from "../../../composables/useTranslations.js";
4
+ import { useOnboardingStore as m } from "../../../stores/onboarding.js";
5
+ import { InOnboard as p } from "@useinsider/design-system-vue";
6
+ const k = /* @__PURE__ */ g({
6
7
  __name: "VersionHistoryOnboarding",
7
- setup(p) {
8
- const t = b(), n = u(), r = e(() => [
8
+ setup(f) {
9
+ const t = l(), n = m(), { getTopPosition: r } = u(), e = s(() => [
9
10
  {
10
11
  classes: "guido-version-history-onboarding",
11
12
  left: "409px",
12
- top: "192px",
13
+ top: r(192),
13
14
  position: "Left Top",
14
15
  title: t("email-editor.onboarding-version-history-title"),
15
16
  description: t("email-editor.onboarding-version-history-description"),
@@ -20,18 +21,18 @@ const C = /* @__PURE__ */ c({
20
21
  nextButtonText: t("action-builder.ok"),
21
22
  nextButtonClick: () => void n.close("versionHistoryOnboarding")
22
23
  }
23
- ]), s = e(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), a = () => {
24
+ ]), a = s(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), d = () => {
24
25
  var o, i;
25
26
  (i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.nextButtonClick) == null || i.call(o);
26
- }, d = () => {
27
+ }, c = () => {
27
28
  var o, i;
28
29
  (i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.backButtonClick) == null || i.call(o);
29
30
  };
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 };
31
+ return b(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
32
+ o && n.setConfig("versionHistoryOnboarding", e.value);
33
+ }, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, getTopPosition: r, onboardingCardsConfig: e, isVisible: a, handleNext: d, handleBack: c, InOnboard: p };
33
34
  }
34
35
  });
35
36
  export {
36
- C as default
37
+ k as default
37
38
  };
@@ -0,0 +1,21 @@
1
+ import { RIBBON_SELECTOR as r } from "../enums/onboarding.js";
2
+ import { ref as f, onMounted as c, onBeforeUnmount as i } from "vue";
3
+ const m = () => {
4
+ const o = f(0);
5
+ let e = null;
6
+ const n = () => {
7
+ const t = document.querySelector(r), s = (t == null ? void 0 : t.offsetHeight) ?? 0;
8
+ o.value !== s && (o.value = s);
9
+ }, u = (t) => `${t + o.value}px`;
10
+ return c(() => {
11
+ n(), e = new MutationObserver(n), e.observe(document.body, {
12
+ childList: !0,
13
+ subtree: !0
14
+ });
15
+ }), i(() => {
16
+ e == null || e.disconnect();
17
+ }), { ribbonOffset: o, getTopPosition: u };
18
+ };
19
+ export {
20
+ m as useRibbonOffset
21
+ };
@@ -1,32 +1,29 @@
1
- import { useActionsApi as V } from "./useActionsApi.js";
2
- import { useConfig as x } from "./useConfig.js";
3
- import { useSaveStart as y, useSaveComplete as w } from "./useGuidoActions.js";
4
- import { useSyncModuleExtractor as C } from "./useSyncModuleExtractor.js";
5
- import { useStripoApi as H } from "../services/stripoApi.js";
6
- import { useTemplatePreparation as b } from "../utils/templatePreparation.js";
7
- import { useHtmlValidator as q } from "./useHtmlValidator.js";
8
- import { useCouponBlockValidator as L } from "./validators/useCouponBlockValidator.js";
9
- import { useLiquidValidator as P } from "./validators/useLiquidValidator.js";
10
- const h = () => {
11
- const o = y(), s = w(), { validateHtml: r } = q(), { validateLiquidSyntax: l } = P(), { validateCouponBlockTags: n } = L(), { callbacks: a, isFeatureEnabled: d } = x(), { extractSyncModuleData: u } = C(), { setSyncModuleUnsubscriptionPages: c } = H(), { editorSave: m } = V();
12
- return { save: async (p = !1) => {
1
+ import { useActionsApi as S } from "./useActionsApi.js";
2
+ import { useConfig as V } from "./useConfig.js";
3
+ import { useSaveStart as x, useSaveComplete as y } from "./useGuidoActions.js";
4
+ import { useSyncModuleExtractor as w } from "./useSyncModuleExtractor.js";
5
+ import { useStripoApi as b } from "../services/stripoApi.js";
6
+ import { useTemplatePreparation as q } from "../utils/templatePreparation.js";
7
+ import { useHtmlValidator as H } from "./useHtmlValidator.js";
8
+ import { useLiquidValidator as L } from "./validators/useLiquidValidator.js";
9
+ const F = () => {
10
+ const o = x(), s = y(), { validateHtml: r } = H(), { validateLiquidSyntax: n } = L(), { callbacks: a, isFeatureEnabled: l } = V(), { extractSyncModuleData: d } = w(), { setSyncModuleUnsubscriptionPages: u } = b(), { editorSave: c } = S();
11
+ return { save: async (m = !1) => {
13
12
  var i;
14
13
  o();
15
- const { prepareTemplateDetails: f } = b(), t = await f();
16
- if (!n(t.compiledHtml))
17
- return;
18
- if (d("liquidSyntax")) {
19
- if (!await l(t.compiledHtml))
14
+ const { prepareTemplateDetails: p } = q(), t = await p();
15
+ if (l("liquidSyntax")) {
16
+ if (!await n(t.compiledHtml))
20
17
  return;
21
18
  } else if (!await r(t.compiledHtml, t.dynamicContentList, !0))
22
19
  return;
23
20
  if ((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(t))
24
21
  return;
25
- await m();
26
- const { unsubscribePayload: v, stripoModules: S } = u(t.rawHtml);
27
- return await c(v), t.modules = S, p || s(t), t;
22
+ await c();
23
+ const { unsubscribePayload: f, stripoModules: v } = d(t.rawHtml);
24
+ return await u(f), t.modules = v, m || s(t), t;
28
25
  } };
29
26
  };
30
27
  export {
31
- h as useSave
28
+ F as useSave
32
29
  };
@@ -2,10 +2,15 @@ const e = [
2
2
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
3
3
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
4
4
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
5
- ], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', o = ".in-ribbons-wrapper";
5
+ ], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', E = ".in-ribbons-wrapper", o = ".guido__amp-toggle-html", a = ".in-segments-wrapper", O = '[data-testid="guido-header"]', _ = 158, i = 10;
6
6
  export {
7
+ o as AMP_TOGGLE_BUTTON_SELECTOR,
8
+ a as AMP_TOGGLE_WRAPPER_SELECTOR,
7
9
  n as CARD_COMPOSITION_TAB_SELECTOR,
8
- o as RIBBON_SELECTOR,
10
+ O as HEADER_SELECTOR,
11
+ _ as POPOVER_LEFT_OFFSET,
12
+ i as POPOVER_TOP_GAP,
13
+ E as RIBBON_SELECTOR,
9
14
  e as SERVICE_HOVER_SELECTORS,
10
15
  s as SETTINGS_TAB_SELECTOR,
11
16
  t as UI_EDITOR_SELECTOR
@@ -1,19 +1,19 @@
1
- import { BlockType as b, BlockAttr as N } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
1
+ import { BlockType as b, BlockAttr as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { ItemsBlockId as O } from "./enums/controlEnums.js";
3
- import { productPairs as A, templateFirstLine as C } from "./enums/productEnums.js";
4
- import { ItemInCartOptions as Y, SETTINGS_ENUMS as x, DefaultConfigValues as D } from "./enums/settingsEnums.js";
3
+ import { productPairs as P, templateFirstLine as C } from "./enums/productEnums.js";
4
+ import { ItemInCartOptions as Y, SETTINGS_ENUMS as x, DefaultConfigValues as F } from "./enums/settingsEnums.js";
5
5
  import j from "./layouts/horizontal.html.js";
6
6
  import q from "./layouts/vertical.html.js";
7
7
  import { escapeReplacement as V } from "./utils/nodeConfigUtils.js";
8
- let [g] = A.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [L] = A.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [m] = A.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [S] = A.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [M] = A.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
9
- const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), F = (s) => U(s, "text-align"), w = (s, e) => {
8
+ let [M] = P.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [D] = P.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [N] = P.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [m] = P.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [U] = P.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
9
+ const g = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), L = (s) => g(s, "text-align"), A = (s, e) => {
10
10
  const r = new RegExp(`${e}\\s*:\\s*([^;]+)`, "i"), a = s.match(r);
11
11
  return a ? a[1].trim() : null;
12
12
  }, v = (s, e, r) => new RegExp(`(${e}\\s*:\\s*)[^;]+`, "gi").test(s) ? s.replace(
13
13
  new RegExp(`(${e}\\s*:\\s*)[^;]+`, "gi"),
14
14
  `$1${r}`
15
15
  ) : s, Z = (s, e, r, a) => {
16
- const i = r || D.productImageHeight, n = (a == null ? void 0 : a.imageVisible) === !1 ? "display: none; " : "";
16
+ const i = r || F.productImageHeight, n = (a == null ? void 0 : a.imageVisible) === !1 ? "display: none; " : "";
17
17
  return `
18
18
  <td class="esd-block-image document-node-component default-block-component selectable ng-star-inserted"
19
19
  align="center"
@@ -28,8 +28,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
28
28
  href="#!">
29
29
  <img class="adapt-img document-node-component ng-star-inserted"
30
30
  style="object-fit: contain;"
31
- src="${g}"
32
- alt="${L}"
31
+ src="${M}"
33
32
  width="${i}"
34
33
  height="${i}">
35
34
  </a>
@@ -37,11 +36,10 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
37
36
  `;
38
37
  }, J = (s, e) => `
39
38
  <${b.BLOCK_IMAGE}
40
- ${N.BLOCK_IMAGE.src}="${g}"
41
- ${N.BLOCK_IMAGE.alt}="${L}"
42
- ${N.BLOCK_IMAGE.href}="#!"
43
- ${N.BLOCK_IMAGE.width}="${D.productImageWidth}"
44
- ${N.BLOCK_IMAGE.height}="${D.productImageWidth}"
39
+ ${S.BLOCK_IMAGE.src}="${M}"
40
+ ${S.BLOCK_IMAGE.href}="#!"
41
+ ${S.BLOCK_IMAGE.width}="${F.productImageWidth}"
42
+ ${S.BLOCK_IMAGE.height}="${F.productImageWidth}"
45
43
  esd-extension-block-id="${O.IMAGE}"
46
44
  data-slot-1
47
45
  product-attr="imageSrc"
@@ -64,7 +62,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
64
62
  text-overflow: ellipsis;
65
63
  `;
66
64
  if (e) {
67
- const c = w(a || "", "text-align") || "center", l = F(a || o), $ = w(l, "color"), t = w(l, "font-size"), E = w(l, "font-family"), _ = w(l, "font-weight"), u = w(l, "font-style"), P = _ === "bold" || _ === "700", p = u === "italic", R = [
65
+ const c = A(a || "", "text-align") || "center", l = L(a || o), $ = A(l, "color"), t = A(l, "font-size"), E = A(l, "font-family"), _ = A(l, "font-weight"), u = A(l, "font-style"), w = _ === "bold" || _ === "700", p = u === "italic", R = [
68
66
  $ ? `color: ${$}` : "",
69
67
  t ? `font-size: ${t}` : "",
70
68
  E ? `font-family: ${E}` : ""
@@ -74,17 +72,17 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
74
72
  "font-size",
75
73
  "inherit"
76
74
  );
77
- d = U(d, "font-weight"), d = U(d, "font-style");
75
+ d = g(d, "font-weight"), d = g(d, "font-style");
78
76
  const T = (i == null ? void 0 : i.nameVisible) === !1 ? "display: none;" : "display: table-cell;";
79
- let h = `<a
77
+ let I = `<a
80
78
  href="#!"
81
79
  style="${d}"
82
80
  product-attr="name"
83
81
  data-slot-2
84
82
  width="100%">
85
- ${L}
83
+ ${D}
86
84
  </a>`;
87
- return P && (h = `<strong>${h}</strong>`), p && (h = `<em>${h}</em>`), `
85
+ return w && (I = `<strong>${I}</strong>`), p && (I = `<em>${I}</em>`), `
88
86
  <td class="esd-block-text es-p10"
89
87
  align="${c}"
90
88
  width="100%"
@@ -92,7 +90,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
92
90
  esd-extension-block-id="${O.NAME}"
93
91
  style="${T}">
94
92
  <p contenteditable="false" path="1"${R ? ` style="${R}"` : ""}>
95
- ${h}
93
+ ${I}
96
94
  </p>
97
95
  </td>
98
96
  `;
@@ -124,26 +122,26 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
124
122
  product-attr="name"
125
123
  data-slot-2
126
124
  width="100%">
127
- ${L}
125
+ ${D}
128
126
  </a>
129
127
  </p>
130
128
  </${b.BLOCK_TEXT}>
131
129
  `;
132
130
  }, et = (s, e, r, a, i, n, o, c, l, $) => {
133
- let t = m;
131
+ let t = N;
134
132
  if (a && a.trim()) {
135
133
  const T = `${a.trim()}`;
136
- t = (i || "0") === "1" ? `${m}&nbsp;${T}` : `${T}&nbsp;${m}`;
134
+ t = (i || "0") === "1" ? `${N}&nbsp;${T}` : `${T}&nbsp;${N}`;
137
135
  }
138
- const E = i === "1" ? "after" : "before", _ = `data-formated="${r ? "true" : "false"}"`, u = `data-curency="${E}"`, P = a ? `data-currency_symbol="${a}"` : "", p = `data-single_price="${c ? "true" : "false"}"`, d = l === x.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
136
+ const E = i === "1" ? "after" : "before", _ = `data-formated="${r ? "true" : "false"}"`, u = `data-curency="${E}"`, w = a ? `data-currency_symbol="${a}"` : "", p = `data-single_price="${c ? "true" : "false"}"`, d = l === x.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
139
137
  if (n) {
140
- const I = F(o || "color: #060606; white-space: nowrap; font-size: 20px;"), h = $ ? "" : ' style="display: none;"';
138
+ const h = L(o || "color: #060606; white-space: nowrap; font-size: 20px;"), I = $ ? "" : ' style="display: none;"';
141
139
  return `
142
140
  <td class="esd-block-text items-block-price${d}"
143
141
  align="center"
144
142
  esd-extension-block-id="${O.PRICE}"
145
143
  width="100%"
146
- ${h}>
144
+ ${I}>
147
145
  <p product-attr="price"
148
146
  contenteditable="false"
149
147
  data-slot-4
@@ -151,9 +149,9 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
151
149
  data-number="${e}"
152
150
  ${_}
153
151
  ${u}
154
- ${P}
152
+ ${w}
155
153
  ${p}
156
- style="${I}">
154
+ style="${h}">
157
155
  ${t}
158
156
  </p>
159
157
  </td>`;
@@ -181,19 +179,19 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
181
179
  </${b.BLOCK_TEXT}>
182
180
  `;
183
181
  }, at = (s, e, r, a, i, n, o = !0, c, l, $) => {
184
- let t = S;
182
+ let t = m;
185
183
  if (a && a.trim()) {
186
184
  const T = `${a.trim()}`;
187
- t = (i || "0") === "1" ? `${S}&nbsp;${T}` : `${T}&nbsp;${S}`;
185
+ t = (i || "0") === "1" ? `${m}&nbsp;${T}` : `${T}&nbsp;${m}`;
188
186
  }
189
- const E = i === "1" ? "after" : "before", _ = `data-formated="${r ? "true" : "false"}"`, u = `data-curency="${E}"`, P = o ? "" : ' style="display: none;"', p = `data-single_price="${l ? "true" : "false"}"`, d = $ === x.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
187
+ const E = i === "1" ? "after" : "before", _ = `data-formated="${r ? "true" : "false"}"`, u = `data-curency="${E}"`, w = o ? "" : ' style="display: none;"', p = `data-single_price="${l ? "true" : "false"}"`, d = $ === x.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
190
188
  if (n) {
191
- const I = F(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
189
+ const h = L(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
192
190
  return `
193
191
  <td class="esd-block-text items-block-price${d}"
194
192
  esd-extension-block-id="${O.ORIGINAL_PRICE}"
195
193
  width="100%"
196
- align="center"${P}>
194
+ align="center"${w}>
197
195
  <p
198
196
  product-attr="originalPrice"
199
197
  contenteditable="false"
@@ -204,7 +202,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
204
202
  ${u}
205
203
  ${a ? `data-currency_symbol="${a}"` : ""}
206
204
  ${p}
207
- style="${I}">
205
+ style="${h}">
208
206
  <s>${t}</s>
209
207
  </p>
210
208
  </td>
@@ -237,7 +235,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
237
235
  }, st = (s = !0, e, r) => {
238
236
  const a = s ? "" : 'style="display: none;"';
239
237
  if (e) {
240
- const i = "font-size: 14px;", n = w(r || "", "text-align") || "center", o = F(r || i);
238
+ const i = "font-size: 14px;", n = A(r || "", "text-align") || "center", o = L(r || i);
241
239
  return `
242
240
  <td class="esd-block-text es-p10 document-node-component default-block-component selectable"
243
241
  width="100%" align="${n}"
@@ -249,7 +247,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
249
247
  width="100%"
250
248
  path="1"
251
249
  style="${o}">
252
- ${M}
250
+ ${U}
253
251
  </p>
254
252
  </td>`;
255
253
  }
@@ -266,13 +264,13 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
266
264
  data-slot-3
267
265
  contenteditable="false"
268
266
  width="100%">
269
- ${M}
267
+ ${U}
270
268
  </p>
271
269
  </${b.BLOCK_TEXT}>
272
270
  `;
273
271
  }, lt = (s, e, r = "Buy", a, i, n = !0, o = !0) => {
274
272
  if (a) {
275
- const c = w(i || "", "background") || w(i || "", "background-color"), l = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", $ = n ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
273
+ const c = A(i || "", "background") || A(i || "", "background-color"), l = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", $ = n ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
276
274
  return `
277
275
  <td class="esd-block-button ins-button default-block-component selectable"
278
276
  align="center" width="100%" name="buy-button" caption="${r}"
@@ -328,10 +326,10 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
328
326
  }, it = (s) => s ? `<td align="center"
329
327
  esd-extension-block-id="items-block" width="560"
330
328
  data-number="4"
331
- class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : C, z = (s, e, r, a, i, n, o, c, l, $, t, E, _, u = "horizontal", P, p, R, d) => {
332
- const h = `${`data-type="${e}" data-number="${r}"`} data-orientation="${a}"`, y = s.replace(
329
+ class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : C, z = (s, e, r, a, i, n, o, c, l, $, t, E, _, u = "horizontal", w, p, R, d) => {
330
+ const I = `${`data-type="${e}" data-number="${r}"`} data-orientation="${a}"`, y = s.replace(
333
331
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
334
- `<td$1 ${h}>`
332
+ `<td$1 ${I}>`
335
333
  ), X = l == null ? void 0 : l["data-product_image_control_image-height"], G = n ? Z(e, r, X, t) : J(e, r), K = (t == null ? void 0 : t.buttonLabel) || "Buy", B = (t == null ? void 0 : t.buttonFullWidth) !== void 0 ? t.buttonFullWidth : !0, W = e === x.ITEMS_TYPE.BROWSED_ITEMS ? !1 : t == null ? void 0 : t.quantityControlEnabled, Q = (t == null ? void 0 : t.buttonVisible) !== void 0 ? t.buttonVisible : (l == null ? void 0 : l["data-product_button_control_enabled"]) !== "false", k = (t == null ? void 0 : t.priceVisible) !== void 0 ? t.priceVisible : (l == null ? void 0 : l["data-product_price_control_enabled"]) !== "false", f = (t == null ? void 0 : t.originalPriceVisible) !== void 0 ? t.originalPriceVisible : (l == null ? void 0 : l["data-product_original_price_control_enabled"]) !== "false", H = y.replace("{-{-TEMPLATE_FIRST_LINE-}-}", it(n)).replace("{-{-PRODUCT_IMAGE-}-}", G).replace("{-{-PRODUCT_NAME-}-}", tt(e, n, a, E, t)).replaceAll(
336
334
  "{-{-PRODUCT_PRICE-}-}",
337
335
  V(et(
@@ -341,7 +339,7 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
341
339
  o,
342
340
  c,
343
341
  n,
344
- P,
342
+ w,
345
343
  d,
346
344
  a,
347
345
  k
@@ -387,7 +385,7 @@ function Tt({
387
385
  priceStyles: E,
388
386
  originalPriceStyles: _,
389
387
  quantityStyles: u,
390
- priceOrientation: P
388
+ priceOrientation: w
391
389
  }) {
392
390
  const p = Y[e].findIndex((y) => y.value === r);
393
391
  let R = "1";
@@ -398,10 +396,10 @@ function Tt({
398
396
  y && y[1] && ([, R] = y);
399
397
  }
400
398
  const d = (l == null ? void 0 : l.priceSinglePrice) ?? (c == null ? void 0 : c["data-product_price_control_single_price"]) === "1" ?? !1;
401
- g = A.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[p >= 0 ? p : 0], L = A.PAIRS_FOR_EXTENSION.name[e].DEFAULT[p >= 0 ? p : 0];
402
- const T = A.PAIRS_FOR_EXTENSION.price[e], I = A.PAIRS_FOR_EXTENSION.originalPrice[e];
403
- d ? (m = o ? T.DEFAULT_SINGLE_PRICE_FORMATTED : T.DEFAULT_SINGLE_PRICE, S = o ? I.DEFAULT_SINGLE_PRICE_FORMATTED : I.DEFAULT_SINGLE_PRICE) : (m = o ? T.DEFAULT_PRICE_FORMATTED : T.DEFAULT_PRICE, S = o ? I.DEFAULT_PRICE_FORMATTED : I.DEFAULT_PRICE), M = A.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
404
- const h = P || (l == null ? void 0 : l.priceOrientation) || "horizontal";
399
+ M = P.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[p >= 0 ? p : 0], D = P.PAIRS_FOR_EXTENSION.name[e].DEFAULT[p >= 0 ? p : 0];
400
+ const T = P.PAIRS_FOR_EXTENSION.price[e], h = P.PAIRS_FOR_EXTENSION.originalPrice[e];
401
+ d ? (N = o ? T.DEFAULT_SINGLE_PRICE_FORMATTED : T.DEFAULT_SINGLE_PRICE, m = o ? h.DEFAULT_SINGLE_PRICE_FORMATTED : h.DEFAULT_SINGLE_PRICE) : (N = o ? T.DEFAULT_PRICE_FORMATTED : T.DEFAULT_PRICE, m = o ? h.DEFAULT_PRICE_FORMATTED : h.DEFAULT_PRICE), U = P.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
402
+ const I = w || (l == null ? void 0 : l.priceOrientation) || "horizontal";
405
403
  return s === x.ORIENTATION.VERTICAL ? z(
406
404
  q,
407
405
  e,
@@ -417,7 +415,7 @@ function Tt({
417
415
  l,
418
416
  $,
419
417
  t,
420
- h,
418
+ I,
421
419
  E,
422
420
  _,
423
421
  u,
@@ -437,7 +435,7 @@ function Tt({
437
435
  l,
438
436
  $,
439
437
  t,
440
- h,
438
+ I,
441
439
  E,
442
440
  _,
443
441
  u,
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-25780af6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-25780af6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-25780af6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
1
+ .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-25780af6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-25780af6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-25780af6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
@@ -333,7 +333,6 @@ var qe = class {
333
333
  q.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
334
334
  var j = {
335
335
  src: "src",
336
- alt: "alt",
337
336
  href: "href",
338
337
  width: "width",
339
338
  height: "height"
@@ -0,0 +1,4 @@
1
+ export declare const useRibbonOffset: () => {
2
+ ribbonOffset: import("vue").Ref<number>;
3
+ getTopPosition: (baseTop: number) => string;
4
+ };
@@ -3,3 +3,9 @@ export declare const UI_EDITOR_SELECTOR = "ui-editor";
3
3
  export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
4
4
  export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
5
5
  export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
6
+ export declare const DYNAMIC_CONTENT_BUTTON_SELECTOR = "#guido__btn-add-dynamic-content";
7
+ export declare const AMP_TOGGLE_BUTTON_SELECTOR = ".guido__amp-toggle-html";
8
+ export declare const AMP_TOGGLE_WRAPPER_SELECTOR = ".in-segments-wrapper";
9
+ export declare const HEADER_SELECTOR = "[data-testid=\"guido-header\"]";
10
+ export declare const POPOVER_LEFT_OFFSET = 158;
11
+ export declare const POPOVER_TOP_GAP = 10;
@@ -1392,6 +1392,10 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
1392
1392
  close(type: OnboardingType): Promise<void>;
1393
1393
  next(type: OnboardingType): void;
1394
1394
  previous(type: OnboardingType): void;
1395
+ updateCardPosition(type: OnboardingType, cardIndex: number, position: {
1396
+ top: string;
1397
+ position: string;
1398
+ }): void;
1395
1399
  setConfig(type: OnboardingType, config: OnboardingCardConfig[]): void;
1396
1400
  onDiscoverNowClicked(): Promise<void>;
1397
1401
  onRemindMeLater(): void;
@@ -71,6 +71,10 @@ const t = () => ({
71
71
  previous(n) {
72
72
  this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
73
73
  },
74
+ updateCardPosition(n, i, o) {
75
+ const s = this.onboardings[n].config[i];
76
+ s && (s.top = o.top, s.position = o.position);
77
+ },
74
78
  setConfig(n, i) {
75
79
  this.onboardings[n].config = i ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
76
80
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.2.0-beta.b7196b2",
3
+ "version": "3.2.0-beta.bbfbc6f",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,24 +0,0 @@
1
- import { ToasterTypeOptions as c } from "../../enums/toaster.js";
2
- import { COUPON_PLACEHOLDER_DEFAULT as i, COUPON_PLACEHOLDER_LIQUID as l } from "../../extensions/Blocks/CouponBlock/template.js";
3
- import { useToaster as m } from "../useToaster.js";
4
- import { useTranslations as p } from "../useTranslations.js";
5
- const u = /* @__PURE__ */ new Set([
6
- i,
7
- l
8
- ]), A = () => {
9
- const { showToaster: t } = m(), r = p();
10
- return { validateCouponBlockTags: (e) => {
11
- const n = new DOMParser().parseFromString(e, "text/html");
12
- return Array.from(n.querySelectorAll(".coupon-block")).find((s) => {
13
- var o;
14
- const a = ((o = s.textContent) == null ? void 0 : o.trim()) ?? "";
15
- return !u.has(a);
16
- }) ? (t({
17
- type: c.Warning,
18
- message: r("newsletter.coupon-tag-modified")
19
- }), !1) : !0;
20
- } };
21
- };
22
- export {
23
- A as useCouponBlockValidator
24
- };
@@ -1,3 +0,0 @@
1
- export declare const useCouponBlockValidator: () => {
2
- validateCouponBlockTags: (html: string) => boolean;
3
- };