@useinsider/guido 1.0.1-beta.0168eae → 1.0.1-beta.94a30a8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -131,7 +131,6 @@ export default {
131
131
  | `back` | - | Fired when user clicks the back button |
132
132
  | `save:start` | - | Fired when the save process begins |
133
133
  | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
134
- | `on-change` | void | It Fires once for managing leave modal etc. |
135
134
 
136
135
  ### Guido Exposed Methods
137
136
  ```typescript
@@ -23,7 +23,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
23
23
  back: () => void;
24
24
  "save:start": () => void;
25
25
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
26
- "on-change": () => void;
27
26
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
28
27
  export default _default;
29
28
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,18 +1,18 @@
1
1
  import i from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import s from "../_virtual/_plugin-vue2_normalizer.js";
4
- var t = function() {
4
+ var a = 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), e.previewStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer)], 1);
7
- }, a = [], n = /* @__PURE__ */ s(
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": !e.guidoConfig.useHeader } }, [r(e.HeaderWrapper), e.previewStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": !e.guidoConfig.useHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer)], 1);
7
+ }, t = [], d = /* @__PURE__ */ s(
8
8
  i,
9
- t,
10
9
  a,
10
+ t,
11
11
  !1,
12
12
  null,
13
- "49bb5907"
13
+ "9fa9554d"
14
14
  );
15
- const c = n.exports;
15
+ const u = d.exports;
16
16
  export {
17
- c as default
17
+ u as default
18
18
  };
@@ -1,17 +1,17 @@
1
- import { defineComponent as _, defineAsyncComponent as L, computed as b, watch as k, onMounted as A, onUnmounted as H } from "vue";
2
- import { provideGuidoActions as N } from "../composables/useGuidoActions.js";
3
- import { usePartner as U } from "../composables/usePartner.js";
4
- import { useStripo as x } from "../composables/useStripo.js";
5
- import { DefaultUsername as M, DefaultMessageType as W, DefaultGuidoConfig as z } from "../enums/defaults.js";
6
- import B from "./organisms/base/Toaster.vue.js";
7
- import F from "./organisms/header/HeaderWrapper.vue.js";
8
- import K from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
9
- import { useStripoApi as R } from "../services/stripoApi.js";
10
- import { useDynamicContentStore as j } from "../stores/dynamic-content.js";
11
- import { useEditorStore as q } from "../stores/editor.js";
12
- import { usePreviewStore as J } from "../stores/preview.js";
13
- import O from "../node_modules/lodash-es/merge.js";
14
- const ie = /* @__PURE__ */ _({
1
+ import { defineComponent as I, defineAsyncComponent as P, computed as _, onMounted as L, onUnmounted as k } from "vue";
2
+ import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
3
+ import { usePartner as N } from "../composables/usePartner.js";
4
+ import { useStripo as U } from "../composables/useStripo.js";
5
+ import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
6
+ import z from "./organisms/base/Toaster.vue.js";
7
+ import B from "./organisms/header/HeaderWrapper.vue.js";
8
+ import F from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
9
+ import { useStripoApi as H } from "../services/stripoApi.js";
10
+ import { useDynamicContentStore as K } from "../stores/dynamic-content.js";
11
+ import { useEditorStore as R } from "../stores/editor.js";
12
+ import { usePreviewStore as j } from "../stores/preview.js";
13
+ import q from "../node_modules/lodash-es/merge.js";
14
+ const se = /* @__PURE__ */ I({
15
15
  __name: "Guido",
16
16
  props: {
17
17
  templateId: null,
@@ -25,38 +25,35 @@ const ie = /* @__PURE__ */ _({
25
25
  preselectedDynamicContentList: null,
26
26
  guidoConfig: null
27
27
  },
28
- emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
29
- setup(E, { expose: T, emit: t }) {
30
- const o = E, G = L(
28
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
29
+ setup(b, { expose: E, emit: t }) {
30
+ const o = b, T = P(
31
31
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
32
- ), n = j(), c = q(), r = b(() => c.hasChanges), s = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), I = J(), {
32
+ ), n = K(), c = R(), a = _(() => c.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), G = j(), {
33
33
  templateId: l,
34
34
  userId: u,
35
35
  guidoConfig: p,
36
- html: g = "",
37
- css: f = "",
38
- partnerName: a = m(),
36
+ html: f = "",
37
+ css: g = "",
38
+ partnerName: s = m(),
39
39
  productType: i = d(),
40
- messageType: y = W,
41
- username: C = M
40
+ messageType: y = M,
41
+ username: C = x
42
42
  } = o;
43
- window.GuidoConfig = O(z, p), window.GuidoConfig.partner = {
44
- partnerName: a,
43
+ window.GuidoConfig = q(W, p), window.GuidoConfig.partner = {
44
+ partnerName: s,
45
45
  productType: i,
46
46
  messageType: y
47
47
  };
48
- const { initPlugin: v } = x({
48
+ const { initPlugin: v } = U({
49
49
  emailId: l,
50
50
  userId: u,
51
51
  username: C,
52
- partnerName: a,
52
+ partnerName: s,
53
53
  productType: i,
54
- preselectedDynamicContentList: s
55
- }), { getDefaultTemplate: w } = R(), P = b(() => {
56
- var e;
57
- return !((e = window.GuidoConfig) != null && e.useHeader);
58
- });
59
- N({
54
+ preselectedDynamicContentList: r
55
+ }), { getDefaultTemplate: w } = H();
56
+ A({
60
57
  onBack: () => {
61
58
  console.debug("guido:back"), t("back");
62
59
  },
@@ -67,41 +64,39 @@ const ie = /* @__PURE__ */ _({
67
64
  console.debug("guido:save:complete", e), t("save:complete", e);
68
65
  }
69
66
  });
70
- const h = (e) => {
67
+ const D = (e) => {
71
68
  console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
72
- }, D = () => {
69
+ }, S = () => {
73
70
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
74
71
  };
75
- return k(() => r.value, () => {
76
- t("on-change");
77
- }), A(async () => {
72
+ return L(async () => {
78
73
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
79
74
  try {
80
75
  let e = {
81
- html: g,
82
- css: f,
76
+ html: f,
77
+ css: g,
83
78
  forceRecreate: !0
84
79
  // TODO: It should be false for old templates. We will communicate with Stripo
85
80
  };
86
- e.html || (e = await w()), await v(e), n.selectedDynamicContentList = s;
81
+ e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
87
82
  } catch (e) {
88
83
  console.error("Failed to initialize Stripo editor:", e);
89
84
  }
90
85
  document.addEventListener("dynamic-content:open", (e) => {
91
- const S = e;
92
- console.debug("dynamic-content:open", S.detail), t("dynamic-content:open", S.detail);
86
+ const h = e;
87
+ console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
93
88
  });
94
- }), H(() => {
89
+ }), k(() => {
95
90
  window.UIEditor.removeEditor();
96
- }), T({
91
+ }), E({
97
92
  dynamicContent: {
98
- insert: h,
99
- close: D
93
+ insert: D,
94
+ close: S
100
95
  },
101
- hasChanges: r
102
- }), { __sfc: !0, PreviewContainer: G, dynamicContentStore: n, props: o, editorStore: c, hasChanges: r, preselectedDynamicContentList: s, getPartnerName: m, getProductType: d, previewStore: I, templateId: l, userId: u, guidoConfig: p, html: g, css: f, partnerName: a, productType: i, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, noHeader: P, insertDynamicContent: h, closeDynamicContent: D, Toaster: B, HeaderWrapper: F, SaveAsTemplateDrawer: K };
96
+ hasChanges: a
97
+ }), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: c, hasChanges: a, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, previewStore: G, templateId: l, userId: u, guidoConfig: p, html: f, css: g, partnerName: s, productType: i, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, SaveAsTemplateDrawer: F };
103
98
  }
104
99
  });
105
100
  export {
106
- ie as default
101
+ se as default
107
102
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}[data-v-aad05c54] .guido__view-option-selection-desktop svg,[data-v-aad05c54] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-aad05c54] .in-segments-wrapper__button_selected,[data-v-aad05c54] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-aad05c54] .in-tooltip-wrapper__icon{cursor:pointer}.guido-editor__wrapper[data-v-49bb5907],.guido-editor__container[data-v-49bb5907]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-49bb5907]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1
+ .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}[data-v-aad05c54] .guido__view-option-selection-desktop svg,[data-v-aad05c54] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-aad05c54] .in-segments-wrapper__button_selected,[data-v-aad05c54] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-aad05c54] .in-tooltip-wrapper__icon{cursor:pointer}.guido-editor__wrapper[data-v-9fa9554d],.guido-editor__container[data-v-9fa9554d]{width:100%;height:calc(100vh - 122px)}.guido-editor__no-header[data-v-9fa9554d]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@@ -6,11 +6,6 @@ ue-main-tabs-panel-component .fixed-panel-header {
6
6
  display: none;
7
7
  }
8
8
 
9
- /* Remove with this writing task DT-28355 */
10
- ue-description a {
11
- display: none;
12
- }
13
-
14
9
  .label {
15
10
  font-size: 13px;
16
11
  color: var(--guido-color-gray-800);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.1-beta.0168eae",
3
+ "version": "1.0.1-beta.94a30a8",
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",