@useinsider/guido 1.0.2-beta.80ac5e8 → 1.0.2-beta.80c1297
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 +0 -12
- package/dist/@types/events.d.ts +0 -6
- package/dist/@types/generic.d.ts +0 -1
- package/dist/components/Guido.vue.d.ts +0 -1
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +47 -54
- package/dist/components/organisms/header/ViewOptions.vue.js +9 -9
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- package/dist/composables/usePartner.d.ts +0 -1
- package/dist/composables/usePartner.js +9 -16
- package/dist/composables/usePreviewMode.js +13 -13
- package/dist/composables/useStripo.js +43 -44
- package/dist/enums/defaults.d.ts +0 -1
- package/dist/enums/defaults.js +9 -42
- package/dist/guido.css +1 -1
- package/dist/static/styles/components/wide-panel.css.js +0 -9
- package/dist/stores/editor.d.ts +0 -21
- package/dist/stores/editor.js +1 -2
- package/package.json +1 -1
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -62
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
- package/dist/composables/useStripoEventHandler.d.ts +0 -3
- package/dist/composables/useStripoEventHandler.js +0 -20
- package/dist/enums/onboarding.d.ts +0 -1
- package/dist/enums/onboarding.js +0 -8
- package/dist/mock/api/user-modal-state.d.ts +0 -2
- package/dist/services/onboardingApi.d.ts +0 -4
- package/dist/services/onboardingApi.js +0 -23
- package/dist/static/assets/onboarding-img.svg.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +0 -18
- package/dist/stores/onboarding.d.ts +0 -1004
- package/dist/stores/onboarding.js +0 -95
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
|
|
@@ -146,16 +145,6 @@ interface GuidoConfig {
|
|
|
146
145
|
translationsPath: string;
|
|
147
146
|
htmlCompilerRules?: CompilerRule[];
|
|
148
147
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
149
|
-
useHeader: boolean
|
|
150
|
-
emailHeader: {
|
|
151
|
-
senderName: string;
|
|
152
|
-
subject: string;
|
|
153
|
-
};
|
|
154
|
-
partner: {
|
|
155
|
-
partnerName: string;
|
|
156
|
-
productType: number;
|
|
157
|
-
messageType: number;
|
|
158
|
-
};
|
|
159
148
|
features: {
|
|
160
149
|
dynamicContent: boolean;
|
|
161
150
|
saveAsTemplate: boolean;
|
|
@@ -169,7 +158,6 @@ interface GuidoConfig {
|
|
|
169
158
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
170
159
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
171
160
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
172
|
-
| `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
|
|
173
161
|
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
174
162
|
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
175
163
|
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
package/dist/@types/events.d.ts
CHANGED
|
@@ -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
|
-
}
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -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;
|
|
@@ -2,17 +2,17 @@ import a from "./Guido.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
|
-
var o = this,
|
|
6
|
-
return
|
|
5
|
+
var o = this, e = o._self._c, r = o._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.editorStore.isPreviewModeOpen ? e(r.PreviewContainer) : o._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster), e(r.SaveAsTemplateDrawer), e(r.LoadingWrapper)], 1);
|
|
7
7
|
}, s = [], d = /* @__PURE__ */ i(
|
|
8
8
|
a,
|
|
9
9
|
t,
|
|
10
10
|
s,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"f78aa5ad"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = d.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useStripoApi as
|
|
11
|
-
import { useDynamicContentStore as
|
|
12
|
-
import { useEditorStore as
|
|
13
|
-
import { usePreviewStore as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
1
|
+
import { defineComponent as I, defineAsyncComponent as L, computed as P, onMounted as _, 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 W, DefaultMessageType as x, DefaultGuidoConfig as M } 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/LoadingWrapper.vue.js";
|
|
9
|
+
import H from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
10
|
+
import { useStripoApi as K } from "../services/stripoApi.js";
|
|
11
|
+
import { useDynamicContentStore as R } from "../stores/dynamic-content.js";
|
|
12
|
+
import { useEditorStore as j } from "../stores/editor.js";
|
|
13
|
+
import { usePreviewStore as q } from "../stores/preview.js";
|
|
14
|
+
import J from "../node_modules/lodash-es/merge.js";
|
|
15
|
+
const ae = /* @__PURE__ */ I({
|
|
16
16
|
__name: "Guido",
|
|
17
17
|
props: {
|
|
18
18
|
templateId: null,
|
|
@@ -26,85 +26,78 @@ const de = /* @__PURE__ */ k({
|
|
|
26
26
|
preselectedDynamicContentList: null,
|
|
27
27
|
guidoConfig: null
|
|
28
28
|
},
|
|
29
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete"
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
29
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
30
|
+
setup(b, { expose: E, emit: t }) {
|
|
31
|
+
const o = b, T = L(
|
|
32
32
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
),
|
|
34
|
-
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
35
|
-
), n = q(), c = J(), P = Q(), r = E(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), {
|
|
33
|
+
), n = R(), a = j(), G = q(), c = P(() => a.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), {
|
|
36
34
|
templateId: l,
|
|
37
35
|
userId: p,
|
|
38
36
|
guidoConfig: u,
|
|
39
|
-
html:
|
|
40
|
-
css:
|
|
37
|
+
html: f = "",
|
|
38
|
+
css: g = "",
|
|
41
39
|
partnerName: i = m(),
|
|
42
40
|
productType: s = d(),
|
|
43
|
-
messageType: y =
|
|
44
|
-
username: C =
|
|
45
|
-
} =
|
|
46
|
-
window.GuidoConfig =
|
|
41
|
+
messageType: y = x,
|
|
42
|
+
username: C = W
|
|
43
|
+
} = o;
|
|
44
|
+
window.GuidoConfig = J(M, u), window.GuidoConfig.partner = {
|
|
47
45
|
partnerName: i,
|
|
48
46
|
productType: s,
|
|
49
47
|
messageType: y
|
|
50
48
|
};
|
|
51
|
-
const { initPlugin: v } =
|
|
49
|
+
const { initPlugin: v } = U({
|
|
52
50
|
emailId: l,
|
|
53
51
|
userId: p,
|
|
54
52
|
username: C,
|
|
55
53
|
partnerName: i,
|
|
56
54
|
productType: s,
|
|
57
|
-
preselectedDynamicContentList:
|
|
58
|
-
}), { getDefaultTemplate: w } =
|
|
59
|
-
|
|
60
|
-
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
61
|
-
});
|
|
62
|
-
N({
|
|
55
|
+
preselectedDynamicContentList: r
|
|
56
|
+
}), { getDefaultTemplate: w } = K();
|
|
57
|
+
A({
|
|
63
58
|
onBack: () => {
|
|
64
|
-
console.debug("guido:back"),
|
|
59
|
+
console.debug("guido:back"), t("back");
|
|
65
60
|
},
|
|
66
61
|
onSaveStart: () => {
|
|
67
|
-
console.debug("guido:save:start"),
|
|
62
|
+
console.debug("guido:save:start"), t("save:start");
|
|
68
63
|
},
|
|
69
64
|
onSaveComplete: (e) => {
|
|
70
|
-
console.debug("guido:save:complete", e),
|
|
65
|
+
console.debug("guido:save:complete", e), t("save:complete", e);
|
|
71
66
|
}
|
|
72
67
|
});
|
|
73
|
-
const
|
|
68
|
+
const D = (e) => {
|
|
74
69
|
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
75
|
-
},
|
|
70
|
+
}, S = () => {
|
|
76
71
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
77
72
|
};
|
|
78
|
-
return
|
|
79
|
-
o("on-change");
|
|
80
|
-
}), W(async () => {
|
|
73
|
+
return _(async () => {
|
|
81
74
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
82
75
|
try {
|
|
83
76
|
let e = {
|
|
84
|
-
html:
|
|
85
|
-
css:
|
|
77
|
+
html: f,
|
|
78
|
+
css: g,
|
|
86
79
|
forceRecreate: !0
|
|
87
80
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
88
81
|
};
|
|
89
|
-
e.html || (e = await w()), await v(e), n.selectedDynamicContentList =
|
|
82
|
+
e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
|
|
90
83
|
} catch (e) {
|
|
91
84
|
console.error("Failed to initialize Stripo editor:", e);
|
|
92
85
|
}
|
|
93
86
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
94
|
-
const
|
|
95
|
-
console.debug("dynamic-content:open",
|
|
87
|
+
const h = e;
|
|
88
|
+
console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
|
|
96
89
|
});
|
|
97
|
-
}),
|
|
90
|
+
}), k(() => {
|
|
98
91
|
window.UIEditor.removeEditor();
|
|
99
|
-
}),
|
|
92
|
+
}), E({
|
|
100
93
|
dynamicContent: {
|
|
101
|
-
insert:
|
|
102
|
-
close:
|
|
94
|
+
insert: D,
|
|
95
|
+
close: S
|
|
103
96
|
},
|
|
104
|
-
hasChanges:
|
|
105
|
-
}), { __sfc: !0, PreviewContainer:
|
|
97
|
+
hasChanges: c
|
|
98
|
+
}), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: a, previewStore: G, hasChanges: c, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, templateId: l, userId: p, guidoConfig: u, html: f, css: g, partnerName: i, productType: s, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, LoadingWrapper: F, SaveAsTemplateDrawer: H };
|
|
106
99
|
}
|
|
107
100
|
});
|
|
108
101
|
export {
|
|
109
|
-
|
|
102
|
+
ae as default
|
|
110
103
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var r = function() {
|
|
5
|
-
var t = this,
|
|
6
|
-
return
|
|
7
|
-
}, n = [],
|
|
8
|
-
|
|
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,
|
|
9
9
|
r,
|
|
10
10
|
n,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"ad3cf7cc"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const m = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
m as default
|
|
18
18
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var t = this,
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
|
|
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
|
-
"
|
|
13
|
+
"421ffc13"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
10
|
+
c as usePartner
|
|
18
11
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { useEditorStore as n } from "../stores/editor.js";
|
|
2
|
-
import { usePreviewStore as
|
|
3
|
-
import { useActionsApi as
|
|
4
|
-
import { useCodeEditorApi as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
2
|
+
import { usePreviewStore as l } from "../stores/preview.js";
|
|
3
|
+
import { useActionsApi as m } from "./useActionsApi.js";
|
|
4
|
+
import { useCodeEditorApi as p } from "./useCodeEditorApi.js";
|
|
5
|
+
const E = () => {
|
|
6
|
+
const o = n(), e = l(), { closeCodeEditor: a } = p(), { getPreviewData: s } = m(), r = () => {
|
|
7
|
+
o.isPreviewModeOpen = !1, e.$reset();
|
|
8
8
|
};
|
|
9
9
|
return {
|
|
10
10
|
closePreviewMode: r,
|
|
11
11
|
openPreviewMode: () => {
|
|
12
|
-
|
|
12
|
+
o.isCodeEditorOpen && a(), o.isPreviewModeOpen = !0;
|
|
13
13
|
},
|
|
14
14
|
loadPreviewData: async () => {
|
|
15
|
-
if (!(
|
|
16
|
-
|
|
15
|
+
if (!(o.loadingStatus || e.isLoaded)) {
|
|
16
|
+
o.loadingStatus = !0;
|
|
17
17
|
try {
|
|
18
|
-
const { html: t, ampHtml:
|
|
19
|
-
|
|
18
|
+
const { html: t, ampHtml: i, ampErrors: d } = await s();
|
|
19
|
+
e.templateHtml = t || "", e.ampHtml = i || "", e.ampErrors = d || [], e.setEmailFormat(i ? "AMP" : "html"), e.isLoaded = !0;
|
|
20
20
|
} catch (t) {
|
|
21
21
|
console.error("Failed to load preview data:", t), r();
|
|
22
22
|
} finally {
|
|
23
|
-
|
|
23
|
+
o.loadingStatus = !1;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
E as usePreviewMode
|
|
31
31
|
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
1
|
+
import { useActionsApi as g } from "./useActionsApi.js";
|
|
2
2
|
import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = E(), p = (r, i = []) => {
|
|
13
|
-
const o = V(), { html: e, css: s, forceRecreate: g } = r;
|
|
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 { useEditorStore as h } from "../stores/editor.js";
|
|
8
|
+
import { dynamicContentToMergeTags as w } from "../utils/genericUtil.js";
|
|
9
|
+
const M = (d) => {
|
|
10
|
+
const { handleError: a } = S(), { getToken: c, getCustomFonts: u } = E(), l = (r, i = []) => {
|
|
11
|
+
const e = h(), { html: t, css: s, forceRecreate: p } = r;
|
|
14
12
|
window.UIEditor.initEditor(
|
|
15
13
|
document.querySelector("#guido-editor"),
|
|
16
14
|
{
|
|
17
|
-
metadata:
|
|
18
|
-
html:
|
|
15
|
+
metadata: d,
|
|
16
|
+
html: t,
|
|
19
17
|
css: s,
|
|
20
|
-
forceRecreate:
|
|
18
|
+
forceRecreate: p,
|
|
21
19
|
locale: "en",
|
|
22
20
|
undoButtonSelector: "#guido__undo-button",
|
|
23
21
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -27,13 +25,15 @@ const x = (a) => {
|
|
|
27
25
|
customAppearanceMergetags: !0,
|
|
28
26
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
29
27
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
30
|
-
customViewStyles:
|
|
28
|
+
customViewStyles: `
|
|
29
|
+
.esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
|
|
30
|
+
.esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
|
|
31
|
+
`,
|
|
31
32
|
conditionsEnabled: !0,
|
|
32
33
|
customConditionsEnabled: !0,
|
|
33
|
-
conditionCategories:
|
|
34
|
+
conditionCategories: C,
|
|
34
35
|
enableXSSSecurity: !0,
|
|
35
36
|
messageSettingsEnabled: !1,
|
|
36
|
-
selectBlockAfterDropFromSettingsPanel: !0,
|
|
37
37
|
editorFonts: {
|
|
38
38
|
showDefaultStandardFonts: !0,
|
|
39
39
|
showDefaultNotStandardFonts: !0,
|
|
@@ -41,62 +41,61 @@ const x = (a) => {
|
|
|
41
41
|
},
|
|
42
42
|
mergeTags: [
|
|
43
43
|
{
|
|
44
|
-
entries:
|
|
44
|
+
entries: w(d.preselectedDynamicContentList)
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
|
-
async onTokenRefreshRequest(
|
|
47
|
+
async onTokenRefreshRequest(o) {
|
|
48
48
|
try {
|
|
49
49
|
const n = await c();
|
|
50
|
-
|
|
50
|
+
o(n);
|
|
51
51
|
} catch (n) {
|
|
52
|
-
|
|
52
|
+
a(n, "Failed to refresh token");
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
onTemplateLoaded() {
|
|
56
56
|
try {
|
|
57
|
-
const { importCss:
|
|
58
|
-
|
|
59
|
-
} catch (
|
|
60
|
-
|
|
57
|
+
const { importCss: o } = f(), { activateCustomViewStyles: n } = g();
|
|
58
|
+
o(), n(), e.loadingStatus = !1;
|
|
59
|
+
} catch (o) {
|
|
60
|
+
a(o, "Failed to load custom interface appearance");
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
onCodeEditorVisibilityChanged(
|
|
64
|
-
|
|
63
|
+
onCodeEditorVisibilityChanged(o) {
|
|
64
|
+
e.isCodeEditorOpen = o;
|
|
65
65
|
},
|
|
66
|
-
onEditorVisualModeChanged(
|
|
67
|
-
|
|
66
|
+
onEditorVisualModeChanged(o) {
|
|
67
|
+
e.editorVisualMode = o.toLowerCase();
|
|
68
68
|
},
|
|
69
|
-
onVersionHistoryVisibilityChanged(
|
|
70
|
-
|
|
69
|
+
onVersionHistoryVisibilityChanged(o) {
|
|
70
|
+
e.isVersionHistoryOpen = o;
|
|
71
71
|
},
|
|
72
72
|
onDataChanged() {
|
|
73
|
-
|
|
73
|
+
e.hasChanges = !0;
|
|
74
74
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
extensions: [h]
|
|
75
|
+
ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
|
|
76
|
+
extensions: [y]
|
|
78
77
|
}
|
|
79
78
|
);
|
|
80
|
-
}, m = (r) => new Promise((i,
|
|
79
|
+
}, m = (r) => new Promise((i, e) => {
|
|
81
80
|
if (document.getElementById("UiEditorScript")) {
|
|
82
81
|
r(), i();
|
|
83
82
|
return;
|
|
84
83
|
}
|
|
85
|
-
const
|
|
86
|
-
|
|
84
|
+
const t = document.createElement("script");
|
|
85
|
+
t.id = "UiEditorScript", t.type = "module", t.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", t.onload = () => {
|
|
87
86
|
r(), i();
|
|
88
|
-
},
|
|
87
|
+
}, t.onerror = () => {
|
|
89
88
|
const s = new Error("Failed to load Stripo UIEditor script");
|
|
90
|
-
|
|
91
|
-
}, document.body.appendChild(
|
|
89
|
+
e(s);
|
|
90
|
+
}, document.body.appendChild(t);
|
|
92
91
|
});
|
|
93
92
|
return { initPlugin: async (r) => {
|
|
94
93
|
await m(async () => {
|
|
95
94
|
const i = await u();
|
|
96
|
-
|
|
95
|
+
l(r, i);
|
|
97
96
|
});
|
|
98
97
|
} };
|
|
99
98
|
};
|
|
100
99
|
export {
|
|
101
|
-
|
|
100
|
+
M as useStripo
|
|
102
101
|
};
|
package/dist/enums/defaults.d.ts
CHANGED
package/dist/enums/defaults.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
translationsPath: "window.trans.en",
|
|
3
3
|
emailHeader: {
|
|
4
4
|
senderName: "",
|
|
@@ -8,49 +8,16 @@ const t = {
|
|
|
8
8
|
dynamicContent: !0,
|
|
9
9
|
saveAsTemplate: !0,
|
|
10
10
|
versionHistory: !0
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}, a = "email", e = "Guido User", o = 1, n = 2, i = {
|
|
11
|
+
}
|
|
12
|
+
}, t = "email", s = "Guido User", a = 1, n = 2, o = {
|
|
14
13
|
email: 60,
|
|
15
14
|
architect: 49
|
|
16
|
-
}
|
|
17
|
-
"alfredtesting",
|
|
18
|
-
"electio",
|
|
19
|
-
"eurekatest",
|
|
20
|
-
"gachapontestpart",
|
|
21
|
-
"gluautomation1",
|
|
22
|
-
"gluautomation2",
|
|
23
|
-
"gluautomation3",
|
|
24
|
-
"gluautomation4",
|
|
25
|
-
"inone",
|
|
26
|
-
"inshoppingcart",
|
|
27
|
-
"krakentest",
|
|
28
|
-
"leeroy",
|
|
29
|
-
"newsletteruat",
|
|
30
|
-
"ozaspava",
|
|
31
|
-
"piratesquad",
|
|
32
|
-
"qaautomation1",
|
|
33
|
-
"qaautomation2",
|
|
34
|
-
"qaautomation3",
|
|
35
|
-
"qaautomation4",
|
|
36
|
-
"roiautomation",
|
|
37
|
-
"seleniumautomation",
|
|
38
|
-
"seleniumautomation1",
|
|
39
|
-
"seleniumautomation2",
|
|
40
|
-
"seleniumautomation3",
|
|
41
|
-
"shopbagg",
|
|
42
|
-
"shopifytest",
|
|
43
|
-
"singlepageqa",
|
|
44
|
-
"testqa",
|
|
45
|
-
"vikingsankara",
|
|
46
|
-
"stripoeditorlivetest"
|
|
47
|
-
];
|
|
15
|
+
};
|
|
48
16
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
17
|
+
e as DefaultGuidoConfig,
|
|
18
|
+
a as DefaultMessageType,
|
|
19
|
+
t as DefaultProductType,
|
|
20
|
+
s as DefaultUsername,
|
|
53
21
|
n as EditorType,
|
|
54
|
-
|
|
55
|
-
s as TEST_PARTNER_LIST
|
|
22
|
+
o as ProductIds
|
|
56
23
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}
|
|
1
|
+
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.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-ad3cf7cc] .guido__view-option-selection-desktop svg,[data-v-ad3cf7cc] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-ad3cf7cc] .in-segments-wrapper__button_selected,[data-v-ad3cf7cc] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-ad3cf7cc] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-f78aa5ad],.guido-editor__container[data-v-f78aa5ad]{width:100%;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,20 +6,11 @@ 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);
|
|
17
12
|
}
|
|
18
13
|
|
|
19
|
-
.stacked-panel {
|
|
20
|
-
overflow: scroll;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
14
|
.stacked-panel-title {
|
|
24
15
|
padding: 16px;
|
|
25
16
|
font-size: 16px;
|