@useinsider/guido 1.0.1-beta.0168eae → 1.0.1-beta.61557b9

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;
@@ -4,15 +4,15 @@ import s from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
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(
7
+ }, a = [], d = /* @__PURE__ */ s(
8
8
  i,
9
9
  t,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "49bb5907"
13
+ "cbc48fd7"
14
14
  );
15
- const c = n.exports;
15
+ const c = d.exports;
16
16
  export {
17
17
  c as default
18
18
  };
@@ -1,16 +1,16 @@
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";
1
+ import { defineComponent as _, defineAsyncComponent as L, computed as b, onMounted as k, onUnmounted as A } from "vue";
2
+ import { provideGuidoActions as H } 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 K } from "../services/stripoApi.js";
10
+ import { useDynamicContentStore as R } from "../stores/dynamic-content.js";
11
+ import { useEditorStore as j } from "../stores/editor.js";
12
+ import { usePreviewStore as q } from "../stores/preview.js";
13
+ import J from "../node_modules/lodash-es/merge.js";
14
14
  const ie = /* @__PURE__ */ _({
15
15
  __name: "Guido",
16
16
  props: {
@@ -25,38 +25,38 @@ 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"],
28
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
29
29
  setup(E, { expose: T, emit: t }) {
30
30
  const o = E, G = L(
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 = R(), a = j(), c = b(() => a.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), I = q(), {
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 = J(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(() => {
54
+ preselectedDynamicContentList: r
55
+ }), { getDefaultTemplate: w } = K(), P = b(() => {
56
56
  var e;
57
57
  return !((e = window.GuidoConfig) != null && e.useHeader);
58
58
  });
59
- N({
59
+ H({
60
60
  onBack: () => {
61
61
  console.debug("guido:back"), t("back");
62
62
  },
@@ -67,39 +67,37 @@ const ie = /* @__PURE__ */ _({
67
67
  console.debug("guido:save:complete", e), t("save:complete", e);
68
68
  }
69
69
  });
70
- const h = (e) => {
70
+ const D = (e) => {
71
71
  console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
72
- }, D = () => {
72
+ }, S = () => {
73
73
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
74
74
  };
75
- return k(() => r.value, () => {
76
- t("on-change");
77
- }), A(async () => {
75
+ return k(async () => {
78
76
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
79
77
  try {
80
78
  let e = {
81
- html: g,
82
- css: f,
79
+ html: f,
80
+ css: g,
83
81
  forceRecreate: !0
84
82
  // TODO: It should be false for old templates. We will communicate with Stripo
85
83
  };
86
- e.html || (e = await w()), await v(e), n.selectedDynamicContentList = s;
84
+ e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
87
85
  } catch (e) {
88
86
  console.error("Failed to initialize Stripo editor:", e);
89
87
  }
90
88
  document.addEventListener("dynamic-content:open", (e) => {
91
- const S = e;
92
- console.debug("dynamic-content:open", S.detail), t("dynamic-content:open", S.detail);
89
+ const h = e;
90
+ console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
93
91
  });
94
- }), H(() => {
92
+ }), A(() => {
95
93
  window.UIEditor.removeEditor();
96
94
  }), T({
97
95
  dynamicContent: {
98
- insert: h,
99
- close: D
96
+ insert: D,
97
+ close: S
100
98
  },
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 };
99
+ hasChanges: c
100
+ }), { __sfc: !0, PreviewContainer: G, dynamicContentStore: n, props: o, editorStore: a, hasChanges: c, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, previewStore: I, templateId: l, userId: u, guidoConfig: p, html: f, css: g, partnerName: s, productType: i, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, noHeader: P, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, SaveAsTemplateDrawer: F };
103
101
  }
104
102
  });
105
103
  export {
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-cbc48fd7],.guido-editor__container[data-v-cbc48fd7]{width:100%;height:calc(100vh - 122px)}.guido-editor__no-header[data-v-cbc48fd7]{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.61557b9",
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",