@useinsider/guido 1.0.2-beta.e4bda14 → 1.0.2-beta.efaabbe

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 (58) hide show
  1. package/README.md +1 -24
  2. package/dist/@types/events.d.ts +0 -6
  3. package/dist/@types/generic.d.ts +0 -4
  4. package/dist/components/Guido.vue.js +5 -5
  5. package/dist/components/Guido.vue2.js +53 -55
  6. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -3
  7. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  8. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  9. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  10. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  11. package/dist/composables/useCustomInterfaceAppearance.js +18 -22
  12. package/dist/composables/usePartner.d.ts +0 -1
  13. package/dist/composables/usePartner.js +9 -16
  14. package/dist/composables/useStripo.js +22 -24
  15. package/dist/enums/defaults.d.ts +0 -1
  16. package/dist/enums/defaults.js +10 -42
  17. package/dist/guido.css +1 -1
  18. package/dist/static/styles/components/alert-message.css.js +2 -32
  19. package/dist/static/styles/components/button.css.js +2 -32
  20. package/dist/static/styles/components/wide-panel.css.js +1 -5
  21. package/dist/static/styles/customEditorStyle.css.js +0 -6
  22. package/dist/static/styles/variables.css.js +0 -10
  23. package/dist/stores/dynamic-content.d.ts +0 -12
  24. package/dist/stores/dynamic-content.js +6 -7
  25. package/dist/stores/editor.d.ts +0 -21
  26. package/dist/stores/editor.js +1 -2
  27. package/dist/utils/genericUtil.js +6 -9
  28. package/package.json +1 -1
  29. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
  30. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
  31. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
  32. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
  33. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
  34. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
  35. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
  36. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
  37. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
  38. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
  39. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
  40. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
  41. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
  42. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
  43. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -74
  44. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
  45. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
  46. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
  47. package/dist/composables/useStripoEventHandler.d.ts +0 -3
  48. package/dist/composables/useStripoEventHandler.js +0 -20
  49. package/dist/enums/onboarding.d.ts +0 -1
  50. package/dist/enums/onboarding.js +0 -8
  51. package/dist/mock/api/user-modal-state.d.ts +0 -2
  52. package/dist/services/onboardingApi.d.ts +0 -4
  53. package/dist/services/onboardingApi.js +0 -23
  54. package/dist/static/assets/onboarding-img.svg.js +0 -4
  55. package/dist/static/styles/components/notification.css.js +0 -55
  56. package/dist/static/styles/components/popup.css.js +0 -68
  57. package/dist/stores/onboarding.d.ts +0 -1068
  58. package/dist/stores/onboarding.js +0 -95
package/README.md CHANGED
@@ -16,30 +16,7 @@ npm install @useinsider/guido
16
16
  ```
17
17
  ### Prerequisites
18
18
  🍍 Your project should have `pinia`
19
- You need to be sure those lines added in your config file:
20
-
21
- â„šī¸ It helps to optimize your dependencies and sharing by Guido. This is why Guido pretty fast and tiny.
22
-
23
- #### For Webpack
24
- `/webpack.config.js` or `/vue.config.js`
25
- ```js
26
- // ... Previous Configs
27
- shared: {
28
- vue: { singleton: true },
29
- pinia: { singleton: true },
30
- },
31
- // ... Upcoming Configs
32
- ```
33
-
34
- ##### For Vite:
35
- `/vite.config.js`
36
- ```js
37
- // ... Previous Configs
38
- resolve: {
39
- dedupe: ['vue', 'pinia'],
40
- },
41
- // ... Upcoming Configs
42
- ```
19
+
43
20
  ---
44
21
  ## 🚀 Usage
45
22
 
@@ -1,7 +1 @@
1
1
  export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
2
- export interface EventHandler {
3
- (params: Record<string, string>): void | Promise<void>;
4
- }
5
- export interface EventHandlers {
6
- [eventType: string]: EventHandler;
7
- }
@@ -22,10 +22,6 @@ export type DynamicContent = {
22
22
  value: string;
23
23
  text: string;
24
24
  fallback?: string;
25
- format?: {
26
- key: string;
27
- value: string;
28
- };
29
25
  };
30
26
  export interface EmailHeader {
31
27
  senderName: string;
@@ -1,16 +1,16 @@
1
1
  import a from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
4
+ var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), !e.isTestPartner() && !e.isDevMode ? r(e.OnboardingWrapper) : o._e(), r(e.LoadingWrapper)], 1);
7
- }, t = [], d = /* @__PURE__ */ i(
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), r(e.LoadingWrapper)], 1);
7
+ }, s = [], d = /* @__PURE__ */ i(
8
8
  a,
9
- s,
10
9
  t,
10
+ s,
11
11
  !1,
12
12
  null,
13
- "cebb8ab0"
13
+ "0defec6a"
14
14
  );
15
15
  const v = d.exports;
16
16
  export {
@@ -1,18 +1,18 @@
1
- import { defineComponent as H, defineAsyncComponent as G, ref as M, computed as c, watch as R, onMounted as U, onUnmounted as x } from "vue";
2
- import { provideGuidoActions as F } from "../composables/useGuidoActions.js";
3
- import { usePartner as z } from "../composables/usePartner.js";
4
- import { useStripo as B } from "../composables/useStripo.js";
5
- import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
6
- import q from "./organisms/base/Toaster.vue.js";
7
- import J from "./organisms/header/HeaderWrapper.vue.js";
8
- import Q from "./organisms/LoadingWrapper.vue.js";
9
- import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
- import { useStripoApi as X } from "../services/stripoApi.js";
11
- import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
12
- import { useEditorStore as Z } from "../stores/editor.js";
13
- import { usePreviewStore as $ } from "../stores/preview.js";
14
- import ee from "../node_modules/lodash-es/merge.js";
15
- const fe = /* @__PURE__ */ H({
1
+ import { defineComponent as k, defineAsyncComponent as A, ref as N, computed as T, watch as W, onMounted as H, onUnmounted as R } from "vue";
2
+ import { provideGuidoActions as U } from "../composables/useGuidoActions.js";
3
+ import { usePartner as x } from "../composables/usePartner.js";
4
+ import { useStripo as F } from "../composables/useStripo.js";
5
+ import { DefaultUsername as M, DefaultMessageType as z, DefaultGuidoConfig as B } from "../enums/defaults.js";
6
+ import K from "./organisms/base/Toaster.vue.js";
7
+ import j from "./organisms/header/HeaderWrapper.vue.js";
8
+ import q from "./organisms/LoadingWrapper.vue.js";
9
+ import J from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
+ import { useStripoApi as O } from "../services/stripoApi.js";
11
+ import { useDynamicContentStore as Q } from "../stores/dynamic-content.js";
12
+ import { useEditorStore as V } from "../stores/editor.js";
13
+ import { usePreviewStore as X } from "../stores/preview.js";
14
+ import Y from "../node_modules/lodash-es/merge.js";
15
+ const ue = /* @__PURE__ */ k({
16
16
  __name: "Guido",
17
17
  props: {
18
18
  templateId: null,
@@ -27,45 +27,43 @@ const fe = /* @__PURE__ */ H({
27
27
  guidoConfig: null
28
28
  },
29
29
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
30
- setup(P, { expose: I, emit: o }) {
31
- const n = P, L = G(
30
+ setup(G, { expose: I, emit: o }) {
31
+ const n = G, L = A(
32
32
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), _ = G(
34
- () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
35
- ), d = M(), r = Y(), m = Z(), W = $(), t = c(() => m.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: k } = z(), A = c(() => !1), p = () => {
33
+ ), c = N(), r = Q(), d = V(), P = X(), t = T(() => d.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: l } = x(), u = () => {
36
34
  var e;
37
- return (e = d.value) == null ? void 0 : e.handleSave(!0);
35
+ return (e = c.value) == null ? void 0 : e.handleSave(!0);
38
36
  }, {
39
- templateId: g,
40
- userId: f,
41
- guidoConfig: y,
42
- html: v = "",
43
- css: C = "",
44
- partnerName: s = l(),
45
- productType: i = u(),
46
- messageType: h = O,
47
- username: w = K
37
+ templateId: p,
38
+ userId: g,
39
+ guidoConfig: f,
40
+ html: y = "",
41
+ css: v = "",
42
+ partnerName: i = m(),
43
+ productType: s = l(),
44
+ messageType: C = z,
45
+ username: h = M
48
46
  } = n;
49
- window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
50
- partnerName: s,
51
- productType: i,
52
- messageType: h
47
+ window.GuidoConfig = Y(B, f), window.GuidoConfig.partner = {
48
+ partnerName: i,
49
+ productType: s,
50
+ messageType: C
53
51
  };
54
- const { initPlugin: S } = B({
55
- emailId: g,
56
- userId: f,
57
- username: w,
58
- partnerName: s,
59
- productType: i,
52
+ const { initPlugin: w } = F({
53
+ emailId: p,
54
+ userId: g,
55
+ username: h,
56
+ partnerName: i,
57
+ productType: s,
60
58
  preselectedDynamicContentList: a,
61
59
  onReady: () => {
62
60
  console.debug("guido:ready"), o("ready");
63
61
  }
64
- }), { getDefaultTemplate: D } = X(), N = c(() => {
62
+ }), { getDefaultTemplate: S } = O(), _ = T(() => {
65
63
  var e;
66
64
  return !((e = window.GuidoConfig) != null && e.useHeader);
67
65
  });
68
- F({
66
+ U({
69
67
  onBack: () => {
70
68
  console.debug("guido:back"), o("back");
71
69
  },
@@ -76,23 +74,23 @@ const fe = /* @__PURE__ */ H({
76
74
  console.debug("guido:save:complete", e), o("save:complete", e);
77
75
  }
78
76
  });
79
- const b = (e) => {
77
+ const D = (e) => {
80
78
  console.debug("dynamic-content:close", e), r.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
81
- }, T = () => {
79
+ }, b = () => {
82
80
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
83
81
  };
84
- return R(() => t.value, () => {
82
+ return W(() => t.value, () => {
85
83
  o("on-change", t.value);
86
- }), U(async () => {
84
+ }), H(async () => {
87
85
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
88
86
  try {
89
87
  let e = {
90
- html: v,
91
- css: C,
88
+ html: y,
89
+ css: v,
92
90
  forceRecreate: !0
93
91
  // TODO: It should be false for old templates. We will communicate with Stripo
94
92
  };
95
- e.html || (e = await D()), await S(e), r.selectedDynamicContentList = a;
93
+ e.html || (e = await S()), await w(e), r.selectedDynamicContentList = a;
96
94
  } catch (e) {
97
95
  console.error("Failed to initialize Stripo editor:", e);
98
96
  }
@@ -100,7 +98,7 @@ const fe = /* @__PURE__ */ H({
100
98
  const E = e;
101
99
  console.debug("dynamic-content:open", E.detail), o("dynamic-content:open", E.detail);
102
100
  });
103
- }), x(() => {
101
+ }), R(() => {
104
102
  try {
105
103
  window.UIEditor.removeEditor();
106
104
  } catch {
@@ -108,14 +106,14 @@ const fe = /* @__PURE__ */ H({
108
106
  }
109
107
  }), I({
110
108
  dynamicContent: {
111
- insert: b,
112
- close: T
109
+ insert: D,
110
+ close: b
113
111
  },
114
112
  hasChanges: t,
115
- saveSilent: p
116
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef: d, dynamicContentStore: r, props: n, editorStore: m, previewStore: W, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: l, getProductType: u, isTestPartner: k, isDevMode: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: v, css: C, partnerName: s, productType: i, messageType: h, username: w, emit: o, initPlugin: S, getDefaultTemplate: D, noHeader: N, insertDynamicContent: b, closeDynamicContent: T, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
113
+ saveSilent: u
114
+ }), { __sfc: !0, PreviewContainer: L, headerWrapperRef: c, dynamicContentStore: r, props: n, editorStore: d, previewStore: P, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: m, getProductType: l, saveSilent: u, templateId: p, userId: g, guidoConfig: f, html: y, css: v, partnerName: i, productType: s, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: _, insertDynamicContent: D, closeDynamicContent: b, Toaster: K, HeaderWrapper: j, LoadingWrapper: q, SaveAsTemplateDrawer: J };
117
115
  }
118
116
  });
119
117
  export {
120
- fe as default
118
+ ue as default
121
119
  };
@@ -1,9 +1,8 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
- /* empty css */
3
2
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
3
  var s = function() {
5
4
  var r = this, t = r._self._c, e = r._self._setupProxy;
6
- return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
5
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(c) {
7
6
  return e.previewStore.openErrorModal();
8
7
  } } }) : r._e()], 1)]);
9
8
  }, a = [], i = /* @__PURE__ */ n(
@@ -12,7 +11,7 @@ var s = function() {
12
11
  a,
13
12
  !1,
14
13
  null,
15
- "b5997368"
14
+ null
16
15
  );
17
16
  const d = i.exports;
18
17
  export {
@@ -1,18 +1,18 @@
1
- import i from "./ViewOptions.vue2.js";
1
+ import o from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.editorStore.isViewOptionsDisabled ? t._e() : s(e.InChips, { staticClass: "new-tag", attrs: { id: "guido__view-options-new-tag", styles: "stroke", value: "chips", "close-button": !1, interactive: !1, text: e.trans("settings.new") } })], 1);
7
- }, r = [], a = /* @__PURE__ */ o(
8
- i,
9
- n,
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, i = t._self._c, e = t._self._setupProxy;
6
+ return i(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ s(
8
+ o,
10
9
  r,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "195ab6d4"
13
+ "ad3cf7cc"
14
14
  );
15
- const c = a.exports;
15
+ const m = _.exports;
16
16
  export {
17
- c as default
17
+ m as default
18
18
  };
@@ -2,10 +2,10 @@ import { defineComponent as n } from "vue";
2
2
  import { useTranslations as p } from "../../../composables/useTranslations.js";
3
3
  import { useEditorStore as s } from "../../../stores/editor.js";
4
4
  import { getTooltipOptions as o } from "../../../utils/tooltipUtils.js";
5
- import { InChips as r, InSegments as m } from "@useinsider/design-system-vue";
6
- const f = /* @__PURE__ */ n({
5
+ import { InSegments as r } from "@useinsider/design-system-vue";
6
+ const d = /* @__PURE__ */ n({
7
7
  __name: "ViewOptions",
8
- setup(l) {
8
+ setup(m) {
9
9
  const e = s(), t = p(), i = [
10
10
  {
11
11
  text: "",
@@ -26,9 +26,9 @@ const f = /* @__PURE__ */ n({
26
26
  tooltipOptions: o("guido__view-option-mobile")
27
27
  }
28
28
  ];
29
- return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: m, InChips: r };
29
+ return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
30
30
  }
31
31
  });
32
32
  export {
33
- f as default
33
+ d as default
34
34
  };
@@ -1,18 +1,18 @@
1
- import i from "./ViewOptions.vue2.js";
1
+ import s from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var s = this, t = s._self._c, e = s._self._setupProxy;
6
- return t("div", { staticClass: "view-options-wrapper" }, [t(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } }), t(e.InChips, { staticClass: "new-tag", attrs: { id: "guido__view-options-new-tag", styles: "stroke", value: "chips", "close-button": !1, interactive: !1, text: e.trans("settings.new") } })], 1);
7
- }, r = [], a = /* @__PURE__ */ o(
8
- i,
9
- n,
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, o = t._self._c, e = t._self._setupProxy;
6
+ return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ i(
8
+ s,
10
9
  r,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "d405ca59"
13
+ "421ffc13"
14
14
  );
15
- const d = a.exports;
15
+ const f = _.exports;
16
16
  export {
17
- d as default
17
+ f as default
18
18
  };
@@ -3,10 +3,10 @@ import { useTranslations as m } from "../../../../composables/useTranslations.js
3
3
  import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
4
  import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
5
  import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
- import { InChips as c, InSegments as u } from "@useinsider/design-system-vue";
7
- const T = /* @__PURE__ */ p({
6
+ import { InSegments as c } from "@useinsider/design-system-vue";
7
+ const h = /* @__PURE__ */ p({
8
8
  __name: "ViewOptions",
9
- setup(_) {
9
+ setup(u) {
10
10
  const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
11
  {
12
12
  text: "",
@@ -33,9 +33,9 @@ const T = /* @__PURE__ */ p({
33
33
  return;
34
34
  }
35
35
  e();
36
- }, InSegments: u, InChips: c };
36
+ }, InSegments: c };
37
37
  }
38
38
  });
39
39
  export {
40
- T as default
40
+ h as default
41
41
  };
@@ -1,34 +1,32 @@
1
1
  import S from "../static/styles/base.css.js";
2
- import m from "../static/styles/components/alert-message.css.js";
3
- import e from "../static/styles/components/amp-block.css.js";
2
+ import e from "../static/styles/components/alert-message.css.js";
3
+ import m from "../static/styles/components/amp-block.css.js";
4
4
  import i from "../static/styles/components/base-input.css.js";
5
5
  import p from "../static/styles/components/button-group.css.js";
6
6
  import n from "../static/styles/components/button.css.js";
7
- import C from "../static/styles/components/combobox.css.js";
8
- import s from "../static/styles/components/counter.css.js";
7
+ import s from "../static/styles/components/combobox.css.js";
8
+ import C from "../static/styles/components/counter.css.js";
9
9
  import f from "../static/styles/components/dropdown-menu.css.js";
10
10
  import a from "../static/styles/components/loader.css.js";
11
11
  import u from "../static/styles/components/narrow-panel.css.js";
12
- import c from "../static/styles/components/notification.css.js";
13
- import d from "../static/styles/components/popup.css.js";
14
- import l from "../static/styles/components/switcher.css.js";
15
- import h from "../static/styles/components/tabs.css.js";
16
- import w from "../static/styles/components/tools.css.js";
17
- import y from "../static/styles/components/version-history.css.js";
18
- import B from "../static/styles/components/wide-panel.css.js";
19
- import b from "../static/styles/variables.css.js";
20
- const A = [
21
- b,
12
+ import c from "../static/styles/components/switcher.css.js";
13
+ import d from "../static/styles/components/tabs.css.js";
14
+ import l from "../static/styles/components/tools.css.js";
15
+ import h from "../static/styles/components/version-history.css.js";
16
+ import w from "../static/styles/components/wide-panel.css.js";
17
+ import y from "../static/styles/variables.css.js";
18
+ const B = [
19
+ y,
22
20
  // Must be on top
23
21
  S,
24
22
  // Must be on top
25
- m,
26
23
  e,
24
+ m,
27
25
  i,
28
26
  p,
29
27
  n,
30
- C,
31
28
  s,
29
+ C,
32
30
  f,
33
31
  a,
34
32
  u,
@@ -36,14 +34,12 @@ const A = [
36
34
  d,
37
35
  l,
38
36
  h,
39
- w,
40
- y,
41
- B
37
+ w
42
38
  ].join(`
43
39
 
44
- `), F = () => ({ importCss: () => {
40
+ `), R = () => ({ importCss: () => {
45
41
  const o = new CSSStyleSheet();
46
- o.replaceSync(A);
42
+ o.replaceSync(B);
47
43
  const r = document.querySelector("ui-editor");
48
44
  if (!r)
49
45
  return;
@@ -51,5 +47,5 @@ const A = [
51
47
  t && (t.adoptedStyleSheets = [o]);
52
48
  } });
53
49
  export {
54
- F as useCustomInterfaceAppearance
50
+ R as useCustomInterfaceAppearance
55
51
  };
@@ -1,5 +1,4 @@
1
1
  export declare const usePartner: () => {
2
2
  getPartnerName: () => string;
3
3
  getProductType: () => number;
4
- isTestPartner: () => boolean;
5
4
  };
@@ -1,18 +1,11 @@
1
- import { TEST_PARTNER_LIST as r, DefaultProductType as o, ProductIds as n } from "../enums/defaults.js";
2
- const i = () => {
3
- const e = () => window.location.hostname.split(".")[0] || "";
4
- return {
5
- getPartnerName: e,
6
- getProductType: () => {
7
- const t = window.location.pathname.split("/").filter(Boolean)[0] || o;
8
- return n[t] || 0;
9
- },
10
- isTestPartner: () => {
11
- const t = e();
12
- return r.includes(t);
13
- }
14
- };
15
- };
1
+ import { DefaultProductType as e, ProductIds as o } from "../enums/defaults.js";
2
+ const c = () => ({
3
+ getPartnerName: () => window.location.hostname.split(".")[0] || "",
4
+ getProductType: () => {
5
+ const t = window.location.pathname.split("/").filter(Boolean)[0] || e;
6
+ return o[t] || 0;
7
+ }
8
+ });
16
9
  export {
17
- i as usePartner
10
+ c as usePartner
18
11
  };
@@ -1,23 +1,22 @@
1
- import { useActionsApi as f } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as S } from "./useCustomInterfaceAppearance.js";
3
- import { useStripoEventHandler as C } from "./useStripoEventHandler.js";
4
- import { useToaster as E } from "./useToaster.js";
5
- import { displayConditions as y } from "../enums/displayConditions.js";
6
- import h from "../extensions/DynamicContent/extension.js";
7
- import { useStripoApi as w } from "../services/stripoApi.js";
8
- import b from "../static/styles/customEditorStyle.css.js";
9
- import { useEditorStore as V } from "../stores/editor.js";
10
- import { dynamicContentToMergeTags as _ } from "../utils/genericUtil.js";
11
- const R = (s) => {
12
- const { handleError: d } = E(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = C(), p = (r, i = []) => {
13
- const e = V(), { html: o, css: a, forceRecreate: g } = r;
1
+ import { useActionsApi as g } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
+ import { useToaster as S } from "./useToaster.js";
4
+ import { displayConditions as C } from "../enums/displayConditions.js";
5
+ import y from "../extensions/DynamicContent/extension.js";
6
+ import { useStripoApi as E } from "../services/stripoApi.js";
7
+ import h from "../static/styles/customEditorStyle.css.js";
8
+ import { useEditorStore as w } from "../stores/editor.js";
9
+ import { dynamicContentToMergeTags as b } from "../utils/genericUtil.js";
10
+ const P = (s) => {
11
+ const { handleError: d } = S(), { getToken: c, getCustomFonts: u } = E(), l = (r, i = []) => {
12
+ const e = w(), { html: o, css: a, forceRecreate: p } = r;
14
13
  window.UIEditor.initEditor(
15
14
  document.querySelector("#guido-editor"),
16
15
  {
17
16
  metadata: s,
18
17
  html: o,
19
18
  css: a,
20
- forceRecreate: g,
19
+ forceRecreate: p,
21
20
  locale: "en",
22
21
  undoButtonSelector: "#guido__undo-button",
23
22
  redoButtonSelector: "#guido__redo-button",
@@ -27,10 +26,10 @@ const R = (s) => {
27
26
  customAppearanceMergetags: !0,
28
27
  customAppearanceMergetagsBorderColor: "#f1f3fe",
29
28
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
30
- customViewStyles: b,
29
+ customViewStyles: h,
31
30
  conditionsEnabled: !0,
32
31
  customConditionsEnabled: !0,
33
- conditionCategories: y,
32
+ conditionCategories: C,
34
33
  enableXSSSecurity: !0,
35
34
  messageSettingsEnabled: !1,
36
35
  selectBlockAfterDropFromSettingsPanel: !0,
@@ -41,7 +40,7 @@ const R = (s) => {
41
40
  },
42
41
  mergeTags: [
43
42
  {
44
- entries: _(s.preselectedDynamicContentList)
43
+ entries: b(s.preselectedDynamicContentList)
45
44
  }
46
45
  ],
47
46
  async onTokenRefreshRequest(t) {
@@ -54,8 +53,8 @@ const R = (s) => {
54
53
  },
55
54
  onTemplateLoaded() {
56
55
  try {
57
- const { importCss: t } = S(), { activateCustomViewStyles: n } = f();
58
- t(), n(), s.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
56
+ const { importCss: t } = f(), { activateCustomViewStyles: n } = g();
57
+ t(), n(), s.onReady(), e.loadingStatus = !1, setTimeout(() => {
59
58
  e.hasChanges = !1;
60
59
  }, 1e3);
61
60
  } catch (t) {
@@ -74,9 +73,8 @@ const R = (s) => {
74
73
  onDataChanged() {
75
74
  e.hasChanges = !0;
76
75
  },
77
- onEvent: l,
78
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
79
- extensions: [h]
76
+ ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
77
+ extensions: [y]
80
78
  }
81
79
  );
82
80
  }, m = (r) => new Promise((i, e) => {
@@ -95,10 +93,10 @@ const R = (s) => {
95
93
  return { initPlugin: async (r) => {
96
94
  await m(async () => {
97
95
  const i = await u();
98
- p(r, i);
96
+ l(r, i);
99
97
  });
100
98
  } };
101
99
  };
102
100
  export {
103
- R as useStripo
101
+ P as useStripo
104
102
  };
@@ -9,4 +9,3 @@ export declare const DefaultUsername = "Guido User";
9
9
  export declare const DefaultMessageType: number;
10
10
  export declare const EditorType: number;
11
11
  export declare const ProductIds: Record<string, number>;
12
- export declare const TEST_PARTNER_LIST: string[];