@useinsider/guido 3.26.0 → 3.27.0-beta.0dd857f

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 (124) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +93 -91
  3. package/dist/@types/display-condition.js +25 -0
  4. package/dist/@types/email-be/html-validation.js +28 -0
  5. package/dist/components/Guido.vue.js +5 -5
  6. package/dist/components/Guido.vue2.js +104 -98
  7. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +17 -0
  8. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +41 -0
  9. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +30 -0
  10. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +81 -0
  11. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +17 -0
  12. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +45 -0
  13. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +36 -0
  14. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +63 -0
  15. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +17 -0
  16. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +22 -0
  17. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
  18. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +15 -15
  19. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
  20. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +28 -27
  21. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +3 -3
  22. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +42 -27
  23. package/dist/composables/useBlocksConfig.js +29 -20
  24. package/dist/composables/useCustomInterfaceAppearance.js +50 -50
  25. package/dist/composables/useDisplayConditions.js +116 -0
  26. package/dist/composables/useFullStoryBridge.js +10 -9
  27. package/dist/composables/useSave.js +19 -17
  28. package/dist/composables/useSaveValidation.js +134 -252
  29. package/dist/composables/useTranslations.js +14 -8
  30. package/dist/config/compiler/utils/itemsCompilerUtils.js +43 -42
  31. package/dist/config/compiler/utils/recommendationCompilerUtils.js +67 -64
  32. package/dist/enums/academy.js +1 -0
  33. package/dist/enums/display-condition.js +12 -0
  34. package/dist/enums/email-be.js +27 -0
  35. package/dist/enums/save-validation.js +2 -2
  36. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +14 -14
  37. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -40
  38. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +15 -15
  39. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +17 -15
  40. package/dist/extensions/Blocks/common-control.js +25 -25
  41. package/dist/extensions/DisplayConditions/bridge.js +25 -0
  42. package/dist/extensions/DisplayConditions/constants.js +26 -0
  43. package/dist/extensions/DisplayConditions/control.js +215 -0
  44. package/dist/extensions/DisplayConditions/display-conditions.css.js +226 -0
  45. package/dist/extensions/DisplayConditions/extension.js +28 -0
  46. package/dist/extensions/DisplayConditions/iconsRegistry.js +20 -0
  47. package/dist/extensions/DisplayConditions/library.js +30 -0
  48. package/dist/extensions/DisplayConditions/settingsPanel.js +17 -0
  49. package/dist/extensions/DynamicContent/dynamic-content.js +15 -17
  50. package/dist/guido.css +1 -1
  51. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +93 -92
  52. package/dist/node_modules/valibot/dist/index.js +405 -291
  53. package/dist/package.json.js +2 -2
  54. package/dist/services/displayConditionApi.js +39 -0
  55. package/dist/services/emailBe/errors/ApiError.js +50 -0
  56. package/dist/services/emailBe/errors/handleApiError.js +31 -0
  57. package/dist/services/emailBe/errors/toApiError.js +71 -0
  58. package/dist/services/emailBe/html/HtmlValidationService.js +35 -0
  59. package/dist/services/emailBe/html/index.js +6 -0
  60. package/dist/services/emailBe/http/HttpManager.js +68 -0
  61. package/dist/services/emailBe/http/RetryStack.js +24 -0
  62. package/dist/services/emailBe/http/client.js +61 -0
  63. package/dist/services/emailBe/http/index.js +10 -0
  64. package/dist/services/emailBe/http/transportErrors.js +20 -0
  65. package/dist/src/@types/config/schemas.d.ts +4 -0
  66. package/dist/src/@types/display-condition.d.ts +61 -0
  67. package/dist/src/@types/email-be/html-validation.d.ts +51 -0
  68. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +43 -0
  69. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +2 -0
  70. package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +18 -0
  71. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +2 -0
  72. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +2 -0
  73. package/dist/src/composables/useConfig.d.ts +2 -0
  74. package/dist/src/composables/useDisplayConditions.d.ts +18 -0
  75. package/dist/src/composables/useSaveValidation.d.ts +2 -2
  76. package/dist/src/enums/academy.d.ts +1 -0
  77. package/dist/src/enums/display-condition.d.ts +15 -0
  78. package/dist/src/enums/email-be.d.ts +26 -0
  79. package/dist/src/enums/save-validation.d.ts +3 -15
  80. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
  81. package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
  82. package/dist/src/extensions/DisplayConditions/bridge.d.ts +7 -0
  83. package/dist/src/extensions/DisplayConditions/constants.d.ts +23 -0
  84. package/dist/src/extensions/DisplayConditions/control.d.ts +25 -0
  85. package/dist/src/extensions/{Blocks/_Boilerplate → DisplayConditions}/iconsRegistry.d.ts +1 -1
  86. package/dist/src/extensions/DisplayConditions/library.d.ts +8 -0
  87. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +5 -0
  88. package/dist/src/mock/api/display-conditions.d.ts +2 -0
  89. package/dist/src/services/displayConditionApi.d.ts +8 -0
  90. package/dist/src/services/emailBe/errors/ApiError.d.ts +40 -0
  91. package/dist/src/services/emailBe/errors/handleApiError.d.ts +11 -0
  92. package/dist/src/services/emailBe/errors/toApiError.d.ts +2 -0
  93. package/dist/src/services/emailBe/html/HtmlValidationService.d.ts +8 -0
  94. package/dist/src/services/emailBe/html/index.d.ts +2 -0
  95. package/dist/src/services/emailBe/http/HttpManager.d.ts +13 -0
  96. package/dist/src/services/emailBe/http/RetryStack.d.ts +6 -0
  97. package/dist/src/services/emailBe/http/client.d.ts +3 -0
  98. package/dist/src/services/emailBe/http/index.d.ts +2 -0
  99. package/dist/src/services/emailBe/http/transportErrors.d.ts +15 -0
  100. package/dist/src/services/emailBe/http/types.d.ts +46 -0
  101. package/dist/src/stores/config.d.ts +170 -0
  102. package/dist/src/stores/display-condition.d.ts +86 -0
  103. package/dist/src/stores/onboarding.d.ts +1 -0
  104. package/dist/src/utils/displayCondition.d.ts +11 -0
  105. package/dist/src/utils/editorShadowRoot.d.ts +1 -0
  106. package/dist/src/utils/protectTableText.d.ts +2 -0
  107. package/dist/static/styles/variables.css.js +1 -0
  108. package/dist/stores/config.js +13 -6
  109. package/dist/stores/display-condition.js +29 -0
  110. package/dist/stores/onboarding.js +4 -1
  111. package/dist/utils/displayCondition.js +29 -0
  112. package/dist/utils/editorShadowRoot.js +8 -0
  113. package/dist/utils/pairProductVariables.js +29 -28
  114. package/dist/utils/protectTableText.js +22 -0
  115. package/package.json +10 -2
  116. package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +0 -11
  117. package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +0 -7
  118. package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +0 -10
  119. package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +0 -16
  120. package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
  121. package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -15
  122. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  123. package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
  124. /package/dist/src/extensions/{Blocks/_Boilerplate → DisplayConditions}/extension.d.ts +0 -0
@@ -0,0 +1,63 @@
1
+ import { defineComponent as T, ref as r, watch as I, computed as i } from "vue";
2
+ import O from "../../wrappers/WpDrawer.vue.js";
3
+ import B from "../../wrappers/WpModal.vue.js";
4
+ import { useDisplayConditions as L, DISPLAY_CONDITIONS_TRANS_KEY as s } from "../../../composables/useDisplayConditions.js";
5
+ import { useTranslations as M } from "../../../composables/useTranslations.js";
6
+ import { useDisplayConditionStore as h } from "../../../stores/display-condition.js";
7
+ import { getTooltipOptions as C } from "../../../utils/tooltipUtils.js";
8
+ import { InSkeleton as $, InDropdownMenu as E, InButtonV2 as b, InBasicTextInput as k } from "@useinsider/design-system-vue";
9
+ import w from "./DisplayConditionListState.vue.js";
10
+ const ee = /* @__PURE__ */ T({
11
+ __name: "DisplayConditionSelectDrawer",
12
+ setup(A) {
13
+ const g = [40, 76, 76, 76], l = M(), t = h(), { loadList: c, select: v, deleteSaved: d, cancel: D, describeWithAcademyLink: p } = L(), u = r(""), a = r(null), n = r(null), o = r(!1);
14
+ I(() => t.isSelectOpen, (e) => {
15
+ e && (u.value = "", a.value = null, n.value = null, c());
16
+ }, { immediate: !0 });
17
+ const f = i(() => {
18
+ const e = u.value.trim().toLocaleLowerCase();
19
+ return e ? t.list.filter((m) => `${m.name} ${m.description}`.toLocaleLowerCase().includes(e)) : t.list;
20
+ }), y = i(() => t.listStatus === "error" ? "error" : t.list.length ? f.value.length ? null : "no-result" : "empty"), _ = i(() => p("select-description")), S = i(() => ({
21
+ cancelOrBackButton: {
22
+ styling: "ghost",
23
+ type: "secondary",
24
+ labelText: l(`${s}.back`),
25
+ leftIcon: "line-arrow-left"
26
+ }
27
+ })), x = i(() => ({
28
+ cancelOrBackButton: {
29
+ type: "secondary",
30
+ styling: "ghost",
31
+ labelText: l(`${s}.cancel`),
32
+ disabledStatus: o.value
33
+ },
34
+ primaryButton: {
35
+ type: "danger",
36
+ labelText: l(`${s}.delete`),
37
+ loadingStatus: o.value
38
+ }
39
+ }));
40
+ return { __sfc: !0, SKELETON_HEIGHTS: g, trans: l, store: t, loadList: c, select: v, deleteSaved: d, cancel: D, describeWithAcademyLink: p, search: u, expandedId: a, menuId: n, isDeleting: o, filteredList: f, listState: y, descriptionText: _, footerButtonGroupOptions: S, deleteModalButtons: x, toggleExpanded: (e) => {
41
+ a.value = a.value === e.id ? null : e.id;
42
+ }, toggleMenu: (e) => {
43
+ n.value = n.value === e.id ? null : e.id;
44
+ }, closeMenu: (e) => {
45
+ n.value === e.id && (n.value = null);
46
+ }, expandTooltip: (e) => C(
47
+ `guido__display-condition-expand-tooltip-${e.id}`,
48
+ { staticPosition: "top right" }
49
+ ), menuOptions: (e) => [
50
+ { text: l(`${s}.delete`), value: `guido__display-condition-delete-${e.id}` }
51
+ ], requestDelete: (e) => {
52
+ n.value = null, t.pendingDelete = e;
53
+ }, confirmDelete: async () => {
54
+ !t.pendingDelete || o.value || (o.value = !0, await d(t.pendingDelete), o.value = !1);
55
+ }, closeDeleteModal: () => {
56
+ o.value || (t.pendingDelete = null);
57
+ }, codeOf: (e) => [e.codeBefore, e.codeAfter].filter(Boolean).join(`
58
+ `), WpDrawer: O, WpModal: B, KEY: s, InBasicTextInput: k, InButtonV2: b, InDropdownMenu: E, InSkeleton: $, DisplayConditionListState: w };
59
+ }
60
+ });
61
+ export {
62
+ ee as default
63
+ };
@@ -0,0 +1,17 @@
1
+ import e from "./DisplayConditionsHost.vue2.js";
2
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var s = this, o = s._self._c, t = s._self._setupProxy;
5
+ return o("div", { staticClass: "guido-display-conditions-host" }, [o(t.DisplayConditionCreateDrawer), o(t.DisplayConditionSelectDrawer)], 1);
6
+ }, i = [], a = /* @__PURE__ */ n(
7
+ e,
8
+ r,
9
+ i,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const p = a.exports;
15
+ export {
16
+ p as default
17
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as i, onMounted as s, onBeforeUnmount as m } from "vue";
2
+ import { useDisplayConditions as p } from "../../../composables/useDisplayConditions.js";
3
+ import { DisplayConditionEvent as n } from "../../../enums/display-condition.js";
4
+ import { useDisplayConditionStore as a } from "../../../stores/display-condition.js";
5
+ import d from "./DisplayConditionCreateDrawer.vue.js";
6
+ import f from "./DisplayConditionSelectDrawer.vue.js";
7
+ const E = /* @__PURE__ */ i({
8
+ __name: "DisplayConditionsHost",
9
+ setup(l) {
10
+ const o = a(), { handleOpen: t } = p(), e = (r) => {
11
+ t(r.detail);
12
+ };
13
+ return s(() => {
14
+ o.$reset(), document.addEventListener(n.OPEN, e);
15
+ }), m(() => {
16
+ document.removeEventListener(n.OPEN, e), o.$reset();
17
+ }), { __sfc: !0, store: o, handleOpen: t, onOpen: e, DisplayConditionCreateDrawer: d, DisplayConditionSelectDrawer: f };
18
+ }
19
+ });
20
+ export {
21
+ E as default
22
+ };
@@ -1,19 +1,19 @@
1
- import c from "./GenericOnboarding.vue2.js";
1
+ import d from "./GenericOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var l = function() {
5
5
  var r, n, t, i, a, s;
6
- var o = this, d = o._self._c, e = o._self._setupProxy;
7
- return e.isVisible ? d(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
6
+ var o = this, c = o._self._c, e = o._self._setupProxy;
7
+ return e.isVisible ? c(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
8
8
  return e.onboardingStore.close("genericOnboarding");
9
9
  }, nextButtonClick: e.handleNext } }) : o._e();
10
10
  }, p = [], _ = /* @__PURE__ */ g(
11
- c,
11
+ d,
12
12
  l,
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "f16f20f8"
16
+ "fcba7e99"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -1,17 +1,17 @@
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";
1
+ import { defineComponent as u, computed as r, watch as l } from "vue";
2
+ import { useRibbonOffset as m } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as x } from "../../../composables/useTranslations.js";
4
+ import { SERVICE_HOVER_SELECTORS as f } from "../../../enums/onboarding.js";
5
+ import { useOnboardingStore as k } from "../../../stores/onboarding.js";
6
+ import { findEditorShadowRoot as B } from "../../../utils/editorShadowRoot.js";
6
7
  import { InOnboard as C } from "@useinsider/design-system-vue";
7
- const y = /* @__PURE__ */ l({
8
+ const R = /* @__PURE__ */ u({
8
9
  __name: "GenericOnboarding",
9
10
  setup(T) {
10
- const e = f(), o = B(), { getTopPosition: i } = x(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
11
- const t = document.querySelector("ui-editor");
12
- t != null && t.shadowRoot && k.forEach((n) => {
13
- var g;
14
- const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
11
+ const e = x(), o = k(), { getTopPosition: i } = m(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
12
+ const t = B();
13
+ t && f.forEach((n) => {
14
+ const d = t.querySelector(n);
15
15
  d && d.classList.add("hover");
16
16
  });
17
17
  }, a = r(() => [
@@ -67,18 +67,18 @@ const y = /* @__PURE__ */ l({
67
67
  o.close("genericOnboarding");
68
68
  }
69
69
  }
70
- ]), p = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), u = () => {
70
+ ]), g = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
71
71
  var t, n;
72
72
  (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
73
73
  }, b = () => {
74
74
  var t, n;
75
75
  (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
76
76
  };
77
- return m(() => o.onboardings.genericOnboarding.isActive, (t) => {
77
+ return l(() => o.onboardings.genericOnboarding.isActive, (t) => {
78
78
  t && o.setConfig("genericOnboarding", a.value);
79
- }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: p, handleNext: u, handleBack: b, InOnboard: C };
79
+ }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: g, handleNext: p, handleBack: b, InOnboard: C };
80
80
  }
81
81
  });
82
82
  export {
83
- y as default
83
+ R as default
84
84
  };
@@ -1,21 +1,21 @@
1
1
  import g from "./ItemsOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import m from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var c = function() {
4
+ var l = function() {
5
5
  var e, n, r, i, s, a;
6
6
  var o = this, d = o._self._c, t = o._self._setupProxy;
7
- return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(_) {
7
+ return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(b) {
8
8
  return t.onboardingStore.close("itemsOnboarding");
9
9
  }, nextButtonClick: t.handleNext } }) : o._e();
10
- }, l = [], b = /* @__PURE__ */ m(
10
+ }, c = [], p = /* @__PURE__ */ m(
11
11
  g,
12
- c,
13
12
  l,
13
+ c,
14
14
  !1,
15
15
  null,
16
- "bb3cca55"
16
+ "1a34025a"
17
17
  );
18
- const I = b.exports;
18
+ const I = p.exports;
19
19
  export {
20
20
  I as default
21
21
  };
@@ -1,23 +1,24 @@
1
- import { defineComponent as b, computed as d, watch as m } from "vue";
2
- import { useRibbonOffset as l } from "../../../composables/useRibbonOffset.js";
3
- import { useTranslations as x } from "../../../composables/useTranslations.js";
4
- import { UI_EDITOR_SELECTOR as T, CARD_COMPOSITION_TAB_SELECTOR as O, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
5
- import { useOnboardingStore as k } from "../../../stores/onboarding.js";
1
+ import { defineComponent as b, computed as d, watch as c } from "vue";
2
+ import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as l } from "../../../composables/useTranslations.js";
4
+ import { CARD_COMPOSITION_TAB_SELECTOR as x, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
5
+ import { useOnboardingStore as T } from "../../../stores/onboarding.js";
6
+ import { findEditorShadowRoot as k } from "../../../utils/editorShadowRoot.js";
6
7
  import { InOnboard as B } from "@useinsider/design-system-vue";
7
- const E = /* @__PURE__ */ b({
8
+ const v = /* @__PURE__ */ b({
8
9
  __name: "ItemsOnboarding",
9
10
  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))
11
+ const i = l(), o = T(), { getTopPosition: r } = u(), s = (t) => {
12
+ const n = k();
13
+ if (!n)
13
14
  return;
14
- const { shadowRoot: s } = e, c = s.querySelector(t);
15
- c && c.click();
15
+ const e = n.querySelector(t);
16
+ e && e.click();
16
17
  }, a = d(() => [
17
18
  {
18
19
  classes: "guido-items-onboarding-card-1",
19
20
  right: "426px",
20
- top: n(90),
21
+ top: r(90),
21
22
  position: "Right Top",
22
23
  title: i("email-editor.onboarding-items-title"),
23
24
  description: i("email-editor.onboarding-items-description"),
@@ -33,7 +34,7 @@ const E = /* @__PURE__ */ b({
33
34
  {
34
35
  classes: "guido-items-onboarding-card-2",
35
36
  right: "426px",
36
- top: n(218),
37
+ top: r(218),
37
38
  position: "Right Top",
38
39
  title: i("email-editor.onboarding-items-item-type-title"),
39
40
  description: i("email-editor.onboarding-items-item-type-description"),
@@ -52,7 +53,7 @@ const E = /* @__PURE__ */ b({
52
53
  {
53
54
  classes: "guido-items-onboarding-card-3",
54
55
  right: "426px",
55
- top: n(140),
56
+ top: r(140),
56
57
  position: "Right Top",
57
58
  title: i("email-editor.onboarding-items-composition-title"),
58
59
  description: i("email-editor.onboarding-items-composition-description"),
@@ -68,30 +69,30 @@ const E = /* @__PURE__ */ b({
68
69
  o.close("itemsOnboarding");
69
70
  }
70
71
  }
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);
72
+ ]), m = d(() => o.onboardings.itemsOnboarding.config.length > 0 && o.onboardings.itemsOnboarding.isActive), p = () => {
73
+ var t, n;
74
+ (n = (t = o.getItemsCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
75
+ }, g = () => {
76
+ var t, n;
77
+ (n = (t = o.getItemsCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
77
78
  };
78
- return m(
79
+ return c(
79
80
  () => o.isActive("itemsOnboarding"),
80
81
  (t) => {
81
82
  t && o.setConfig("itemsOnboarding", a.value);
82
83
  },
83
84
  { immediate: !0 }
84
- ), m(
85
+ ), c(
85
86
  () => o.onboardings.itemsOnboarding.cardIndex,
86
- (t, e) => {
87
+ (t, n) => {
87
88
  if (!o.isActive("itemsOnboarding"))
88
89
  return;
89
- const s = `${e}-${t}`;
90
- s === "1-2" && r(O), s === "2-1" && r(f);
90
+ const e = `${n}-${t}`;
91
+ e === "1-2" && s(x), e === "2-1" && s(f);
91
92
  }
92
- ), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition: n, switchTab: r, onboardingCardsConfig: a, isVisible: g, handleNext: p, handleBack: u, InOnboard: B };
93
+ ), { __sfc: !0, trans: i, onboardingStore: o, getTopPosition: r, switchTab: s, onboardingCardsConfig: a, isVisible: m, handleNext: p, handleBack: g, InOnboard: B };
93
94
  }
94
95
  });
95
96
  export {
96
- E as default
97
+ v as default
97
98
  };
@@ -13,9 +13,9 @@ var d = function() {
13
13
  m,
14
14
  !1,
15
15
  null,
16
- "19d8cb42"
16
+ "8fc96a58"
17
17
  );
18
- const f = l.exports;
18
+ const b = l.exports;
19
19
  export {
20
- f as default
20
+ b as default
21
21
  };
@@ -1,46 +1,61 @@
1
- import { defineComponent as d, computed as g, watch as l } from "vue";
2
- import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
3
- import { useTranslations as p } from "../../../composables/useTranslations.js";
4
- import { ACADEMY_LINKS as u } from "../../../enums/academy.js";
5
- import { useOnboardingStore as y } from "../../../stores/onboarding.js";
6
- import { InOnboard as f } from "@useinsider/design-system-vue";
7
- const A = /* @__PURE__ */ d({
1
+ import { defineComponent as E, computed as _, onMounted as L, onBeforeUnmount as O } from "vue";
2
+ import { useRibbonOffset as S } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as C } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as h } from "../../../enums/academy.js";
5
+ import { useOnboardingStore as k } from "../../../stores/onboarding.js";
6
+ import { findEditorShadowRoot as v } from "../../../utils/editorShadowRoot.js";
7
+ import { InOnboard as B } from "@useinsider/design-system-vue";
8
+ const F = /* @__PURE__ */ E({
8
9
  __name: "RecommendationLegacyStrategyOnboarding",
9
- setup(O) {
10
- const n = "recommendationLegacyStrategyOnboarding", o = p(), t = y(), { getTopPosition: i } = b(), r = `<a href="${u.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${o("action-builder.visit-academy")}</a>`, a = () => [
10
+ setup(T) {
11
+ const a = "recommendationLegacyStrategyOnboarding", l = "#guido__btn-update-legacy-strategy", i = C(), t = k(), { getTopPosition: m } = S(), u = `<a href="${h.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${i("action-builder.visit-academy")}</a>`, g = () => [
11
12
  {
12
13
  classes: "guido-recommendation-legacy-strategy-onboarding",
13
14
  right: "40px",
14
- top: i(485),
15
+ top: m(500),
15
16
  position: "Top Right",
16
- title: o("email-editor.onboarding-recommendation-strategy-legacy-title"),
17
- description: o("email-editor.onboarding-recommendation-strategy-legacy-description", {
18
- academyLink: r
17
+ title: i("email-editor.onboarding-recommendation-strategy-legacy-title"),
18
+ description: i("email-editor.onboarding-recommendation-strategy-legacy-description", {
19
+ academyLink: u
19
20
  }),
20
21
  imageSource: "",
21
22
  backButtonClick: () => {
22
23
  },
23
24
  nextButtonType: "text",
24
- nextButtonText: o("action-builder.ok"),
25
+ nextButtonText: i("action-builder.ok"),
25
26
  nextButtonClick: () => {
26
- t.close(n);
27
+ t.close(a);
27
28
  }
28
29
  }
29
- ], s = g(
30
+ ], y = _(
30
31
  () => t.onboardings.recommendationLegacyStrategyOnboarding.config.length > 0 && t.onboardings.recommendationLegacyStrategyOnboarding.isActive
31
- ), m = () => {
32
- var e, c;
33
- (c = (e = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : e.nextButtonClick) == null || c.call(e);
32
+ ), b = () => {
33
+ var n, o;
34
+ (o = (n = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : n.nextButtonClick) == null || o.call(n);
34
35
  };
35
- return l(
36
- () => t.isActive(n),
37
- (e) => {
38
- e && t.setConfig(n, a());
39
- },
40
- { immediate: !0 }
41
- ), { __sfc: !0, ONBOARDING_TYPE: n, trans: o, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: s, handleNext: m, InOnboard: f };
36
+ let e = null;
37
+ const s = ({ target: n }) => {
38
+ n instanceof Element && n.closest("ue-control-panel") && t.closeForSession(a);
39
+ };
40
+ let r = null;
41
+ const d = (n) => {
42
+ var o;
43
+ return !!((o = n.querySelector(l)) != null && o.getClientRects().length);
44
+ }, c = ({ target: n }) => {
45
+ const o = n instanceof Element ? n.closest("ue-control-panel") : null;
46
+ !o || r !== null || (r = requestAnimationFrame(() => {
47
+ r = null, d(o) || t.closeForSession(a);
48
+ }));
49
+ }, p = () => {
50
+ e == null || e.removeEventListener("scroll", s, !0), e == null || e.removeEventListener("click", c, !0), e == null || e.removeEventListener("keyup", c, !0), e = null, r !== null && (cancelAnimationFrame(r), r = null);
51
+ }, f = () => {
52
+ e = v(), e == null || e.addEventListener("scroll", s, !0), e == null || e.addEventListener("click", c, !0), e == null || e.addEventListener("keyup", c, !0);
53
+ };
54
+ return L(() => {
55
+ t.setConfig(a, g()), f();
56
+ }), O(p), { __sfc: !0, ONBOARDING_TYPE: a, UPDATE_BUTTON_SELECTOR: l, trans: i, onboardingStore: t, getTopPosition: m, academyLink: u, buildOnboardingCards: g, isVisible: y, handleNext: b, editorRoot: e, handlePanelScroll: s, pendingCheck: r, isUpdateButtonVisible: d, handlePanelInteraction: c, stopWatchingPanel: p, startWatchingPanel: f, InOnboard: B };
42
57
  }
43
58
  });
44
59
  export {
45
- A as default
60
+ F as default
46
61
  };
@@ -1,6 +1,6 @@
1
- import r from "../extensions/ModulesTabIcons/extension.js";
2
- import { useConfigStore as l } from "../stores/config.js";
3
- const a = {
1
+ import l from "../extensions/ModulesTabIcons/extension.js";
2
+ import { useConfigStore as r } from "../stores/config.js";
3
+ const i = {
4
4
  "amp-accordion": "ampAccordionEnabled",
5
5
  "amp-carousel": "ampCarouselEnabled",
6
6
  "amp-form-controls": "ampFormControlsEnabled",
@@ -14,7 +14,7 @@ const a = {
14
14
  "text-block": "textEnabled",
15
15
  "timer-block": "timerEnabled",
16
16
  "video-block": "videoEnabled"
17
- }, s = {
17
+ }, c = {
18
18
  "dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
19
19
  "checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
20
20
  "radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
@@ -22,40 +22,49 @@ const a = {
22
22
  "unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
23
23
  "coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
24
24
  "items-block": () => import("../extensions/Blocks/Items/extension.js")
25
- }, i = (n) => {
25
+ }, b = (n) => {
26
26
  if (!n || !n.length)
27
27
  return {};
28
28
  const t = {};
29
29
  return n.forEach((o) => {
30
- const e = a[o];
30
+ const e = i[o];
31
31
  e && (t[e] = !1);
32
32
  }), t;
33
- }, b = () => [r], m = async (n) => {
34
- const t = b();
33
+ }, m = async ({ externalDisplayConditions: n }) => {
34
+ const t = [l];
35
+ if (n) {
36
+ const o = await import("../extensions/DisplayConditions/extension.js");
37
+ t.push(o.default);
38
+ }
39
+ return t;
40
+ }, d = async (n, t = { externalDisplayConditions: !1 }) => {
41
+ const o = await m(t);
35
42
  if (!n || !n.length)
36
- return t;
37
- const o = await Promise.all(
38
- n.map(async (e) => {
39
- const c = s[e];
40
- return c ? (await c()).default : null;
43
+ return o;
44
+ const e = await Promise.all(
45
+ n.map(async (a) => {
46
+ const s = c[a];
47
+ return s ? (await s()).default : null;
41
48
  })
42
49
  );
43
50
  return [
44
- ...t,
45
- ...o.filter((e) => e !== null)
51
+ ...o,
52
+ ...e.filter((a) => a !== null)
46
53
  ];
47
- }, E = () => {
48
- const n = l();
54
+ }, k = () => {
55
+ const n = r();
49
56
  return {
50
57
  getStripoBlocksConfig: async () => {
51
58
  const o = n.blocks;
52
59
  return {
53
- baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
54
- extensions: await m(o == null ? void 0 : o.includeCustoms)
60
+ baseBlocks: b(o == null ? void 0 : o.excludeDefaults),
61
+ extensions: await d(o == null ? void 0 : o.includeCustoms, {
62
+ externalDisplayConditions: n.externalDisplayConditions
63
+ })
55
64
  };
56
65
  }
57
66
  };
58
67
  };
59
68
  export {
60
- E as useBlocksConfig
69
+ k as useBlocksConfig
61
70
  };
@@ -1,44 +1,46 @@
1
- import p from "../static/assets/icons/filled-arrow-rising.svg.js";
2
- import s from "../static/assets/icons/line-change.svg.js";
3
- import f from "../static/assets/icons/line-delete.svg.js";
4
- import a from "../static/assets/icons/line-info.svg.js";
5
- import c from "../static/assets/icons/line-plus.svg.js";
6
- import l from "../static/styles/base.css.js";
7
- import C from "../static/styles/components/accessibility.css.js";
8
- import d from "../static/styles/components/alert-message.css.js";
9
- import u from "../static/styles/components/amp-block.css.js";
10
- import h from "../static/styles/components/base-input.css.js";
11
- import I from "../static/styles/components/button-group.css.js";
12
- import g from "../static/styles/components/button.css.js";
13
- import w from "../static/styles/components/combobox.css.js";
14
- import y from "../static/styles/components/counter.css.js";
15
- import A from "../static/styles/components/dropdown-menu.css.js";
16
- import $ from "../static/styles/components/loader.css.js";
17
- import b from "../static/styles/components/narrow-panel.css.js";
18
- import B from "../static/styles/components/popup.css.js";
19
- import D from "../static/styles/components/recommendation-strategy.css.js";
20
- import R from "../static/styles/components/skeleton.css.js";
21
- import P from "../static/styles/components/switcher.css.js";
22
- import T from "../static/styles/components/tabs.css.js";
23
- import x from "../static/styles/components/tools.css.js";
24
- import M from "../static/styles/components/version-history.css.js";
25
- import O from "../static/styles/components/wide-panel.css.js";
26
- import V from "../static/styles/variables.css.js";
1
+ import S from "../static/assets/icons/filled-arrow-rising.svg.js";
2
+ import p from "../static/assets/icons/line-change.svg.js";
3
+ import s from "../static/assets/icons/line-delete.svg.js";
4
+ import f from "../static/assets/icons/line-info.svg.js";
5
+ import a from "../static/assets/icons/line-plus.svg.js";
6
+ import c from "../static/styles/base.css.js";
7
+ import l from "../static/styles/components/accessibility.css.js";
8
+ import C from "../static/styles/components/alert-message.css.js";
9
+ import d from "../static/styles/components/amp-block.css.js";
10
+ import u from "../static/styles/components/base-input.css.js";
11
+ import h from "../static/styles/components/button-group.css.js";
12
+ import I from "../static/styles/components/button.css.js";
13
+ import g from "../static/styles/components/combobox.css.js";
14
+ import w from "../static/styles/components/counter.css.js";
15
+ import y from "../static/styles/components/dropdown-menu.css.js";
16
+ import A from "../static/styles/components/loader.css.js";
17
+ import $ from "../static/styles/components/narrow-panel.css.js";
18
+ import b from "../static/styles/components/popup.css.js";
19
+ import B from "../static/styles/components/recommendation-strategy.css.js";
20
+ import D from "../static/styles/components/skeleton.css.js";
21
+ import R from "../static/styles/components/switcher.css.js";
22
+ import P from "../static/styles/components/tabs.css.js";
23
+ import T from "../static/styles/components/tools.css.js";
24
+ import x from "../static/styles/components/version-history.css.js";
25
+ import E from "../static/styles/components/wide-panel.css.js";
26
+ import M from "../static/styles/variables.css.js";
27
+ import { findEditorShadowRoot as O } from "../utils/editorShadowRoot.js";
27
28
  function o(i, r) {
28
29
  return `--guido-icon-${i}: url("data:image/svg+xml,${encodeURIComponent(r.trim())}");`;
29
30
  }
30
- const W = `:host {
31
- ${o("line-change", s)}
32
- ${o("line-delete", f)}
33
- ${o("filled-arrow-rising", p)}
34
- ${o("line-info", a)}
35
- ${o("line-plus", c)}
36
- }`, _ = [
37
- V,
31
+ const V = `:host {
32
+ ${o("line-change", p)}
33
+ ${o("line-delete", s)}
34
+ ${o("filled-arrow-rising", S)}
35
+ ${o("line-info", f)}
36
+ ${o("line-plus", a)}
37
+ }`, W = [
38
+ M,
38
39
  // Must be on top
39
- W,
40
- l,
40
+ V,
41
+ c,
41
42
  // Must be on top
43
+ C,
42
44
  d,
43
45
  u,
44
46
  h,
@@ -49,34 +51,32 @@ const W = `:host {
49
51
  A,
50
52
  $,
51
53
  b,
52
- B,
54
+ D,
53
55
  R,
54
56
  P,
55
57
  T,
56
58
  x,
57
- M,
58
- O,
59
- D,
60
- C
59
+ E,
60
+ B,
61
+ l
61
62
  ].join(`
62
63
 
63
- `), k = 3e4;
64
+ `), _ = 3e4;
64
65
  let e = null;
65
- function q() {
66
- return e || (e = new CSSStyleSheet(), e.replaceSync(_)), e;
66
+ function k() {
67
+ return e || (e = new CSSStyleSheet(), e.replaceSync(W)), e;
67
68
  }
68
- const fo = () => ({ importCss: () => {
69
- const r = q(), S = Date.now() + k, m = () => {
70
- var n;
71
- const t = (n = document.querySelector("ui-editor")) == null ? void 0 : n.shadowRoot;
69
+ const ao = () => ({ importCss: () => {
70
+ const r = k(), n = Date.now() + _, m = () => {
71
+ const t = O();
72
72
  if (t) {
73
73
  t.adoptedStyleSheets.includes(r) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, r]);
74
74
  return;
75
75
  }
76
- Date.now() < S && requestAnimationFrame(m);
76
+ Date.now() < n && requestAnimationFrame(m);
77
77
  };
78
78
  m();
79
79
  } });
80
80
  export {
81
- fo as useCustomInterfaceAppearance
81
+ ao as useCustomInterfaceAppearance
82
82
  };