@useinsider/guido 1.0.0-beta.2562d59 → 1.0.0-beta.3012b2b
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 +11 -0
- package/dist/@types/generic.d.ts +1 -0
- package/dist/components/Guido.vue.js +11 -11
- package/dist/components/Guido.vue2.js +22 -23
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -15
- package/dist/components/organisms/header/RightSlot.vue2.js +25 -26
- package/dist/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/composables/usePreviewMode.js +13 -14
- package/dist/composables/useStripo.js +36 -39
- package/dist/enums/defaults.js +5 -4
- package/dist/guido.css +1 -1
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +18 -0
- package/dist/stores/editor.d.ts +0 -1
- package/dist/stores/editor.js +3 -4
- package/dist/stores/preview.js +15 -26
- 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 -39
- 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 -85
- 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 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -20
- 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 -64
- 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 -39
- package/dist/composables/useOnboardingApi.d.ts +0 -4
- package/dist/composables/useOnboardingApi.js +0 -23
- 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/static/assets/onboarding-img.svg.js +0 -4
- package/dist/stores/onboarding.d.ts +0 -1998
- package/dist/stores/onboarding.js +0 -108
package/README.md
CHANGED
|
@@ -145,6 +145,16 @@ interface GuidoConfig {
|
|
|
145
145
|
translationsPath: string;
|
|
146
146
|
htmlCompilerRules?: CompilerRule[];
|
|
147
147
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
148
|
+
useHeader: boolean
|
|
149
|
+
emailHeader: {
|
|
150
|
+
senderName: string;
|
|
151
|
+
subject: string;
|
|
152
|
+
};
|
|
153
|
+
partner: {
|
|
154
|
+
partnerName: string;
|
|
155
|
+
productType: number;
|
|
156
|
+
messageType: number;
|
|
157
|
+
};
|
|
148
158
|
features: {
|
|
149
159
|
dynamicContent: boolean;
|
|
150
160
|
saveAsTemplate: boolean;
|
|
@@ -158,6 +168,7 @@ interface GuidoConfig {
|
|
|
158
168
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
159
169
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
160
170
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
171
|
+
| `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
|
|
161
172
|
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
162
173
|
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
163
174
|
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
s,
|
|
3
|
+
import s from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
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.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
|
+
i,
|
|
10
9
|
a,
|
|
10
|
+
t,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"9fa9554d"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const u = d.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
u as default
|
|
18
18
|
};
|
|
@@ -2,17 +2,16 @@ import { defineComponent as I, defineAsyncComponent as P, computed as _, onMount
|
|
|
2
2
|
import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as N } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as U } from "../composables/useStripo.js";
|
|
5
|
-
import { DefaultUsername as
|
|
5
|
+
import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
|
|
6
6
|
import z from "./organisms/base/Toaster.vue.js";
|
|
7
7
|
import B from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
-
import F from "./organisms/
|
|
9
|
-
import H from "
|
|
10
|
-
import {
|
|
11
|
-
import { useDynamicContentStore as O } from "../stores/dynamic-content.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";
|
|
12
11
|
import { useEditorStore as R } from "../stores/editor.js";
|
|
13
12
|
import { usePreviewStore as j } from "../stores/preview.js";
|
|
14
13
|
import q from "../node_modules/lodash-es/merge.js";
|
|
15
|
-
const
|
|
14
|
+
const se = /* @__PURE__ */ I({
|
|
16
15
|
__name: "Guido",
|
|
17
16
|
props: {
|
|
18
17
|
templateId: null,
|
|
@@ -30,30 +29,30 @@ const ae = /* @__PURE__ */ I({
|
|
|
30
29
|
setup(b, { expose: E, emit: t }) {
|
|
31
30
|
const o = b, T = P(
|
|
32
31
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
), n =
|
|
32
|
+
), n = K(), c = R(), a = _(() => c.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), G = j(), {
|
|
34
33
|
templateId: l,
|
|
35
|
-
userId:
|
|
36
|
-
guidoConfig:
|
|
34
|
+
userId: u,
|
|
35
|
+
guidoConfig: p,
|
|
37
36
|
html: f = "",
|
|
38
37
|
css: g = "",
|
|
39
|
-
partnerName:
|
|
40
|
-
productType:
|
|
41
|
-
messageType: y =
|
|
42
|
-
username: C =
|
|
38
|
+
partnerName: s = m(),
|
|
39
|
+
productType: i = d(),
|
|
40
|
+
messageType: y = M,
|
|
41
|
+
username: C = x
|
|
43
42
|
} = o;
|
|
44
|
-
window.GuidoConfig = q(
|
|
45
|
-
partnerName:
|
|
46
|
-
productType:
|
|
43
|
+
window.GuidoConfig = q(W, p), window.GuidoConfig.partner = {
|
|
44
|
+
partnerName: s,
|
|
45
|
+
productType: i,
|
|
47
46
|
messageType: y
|
|
48
47
|
};
|
|
49
48
|
const { initPlugin: v } = U({
|
|
50
49
|
emailId: l,
|
|
51
|
-
userId:
|
|
50
|
+
userId: u,
|
|
52
51
|
username: C,
|
|
53
|
-
partnerName:
|
|
54
|
-
productType:
|
|
52
|
+
partnerName: s,
|
|
53
|
+
productType: i,
|
|
55
54
|
preselectedDynamicContentList: r
|
|
56
|
-
}), { getDefaultTemplate: w } =
|
|
55
|
+
}), { getDefaultTemplate: w } = H();
|
|
57
56
|
A({
|
|
58
57
|
onBack: () => {
|
|
59
58
|
console.debug("guido:back"), t("back");
|
|
@@ -94,10 +93,10 @@ const ae = /* @__PURE__ */ I({
|
|
|
94
93
|
insert: D,
|
|
95
94
|
close: S
|
|
96
95
|
},
|
|
97
|
-
hasChanges:
|
|
98
|
-
}), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore:
|
|
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 };
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
100
|
export {
|
|
102
|
-
|
|
101
|
+
se as default
|
|
103
102
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const v = /* @__PURE__ */ r({
|
|
1
|
+
import { defineComponent as m, computed as n } from "vue";
|
|
2
|
+
import { useTranslations as r } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { usePreviewStore as i } from "../../../../stores/preview.js";
|
|
4
|
+
import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
|
|
5
|
+
const _ = /* @__PURE__ */ m({
|
|
7
6
|
__name: "AmpToggle",
|
|
8
|
-
setup(
|
|
9
|
-
const t =
|
|
7
|
+
setup(p) {
|
|
8
|
+
const t = i(), e = r(), o = n(() => [
|
|
10
9
|
{
|
|
11
|
-
text:
|
|
10
|
+
text: e("dynamic-creatives.html"),
|
|
12
11
|
value: "html"
|
|
13
12
|
},
|
|
14
13
|
{
|
|
15
|
-
text:
|
|
14
|
+
text: e("email-editor.amp-html"),
|
|
16
15
|
value: "AMP",
|
|
17
|
-
tooltipText: t.hasAMP ? "" :
|
|
16
|
+
tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
|
|
18
17
|
position: "bottom",
|
|
19
18
|
align: "center",
|
|
20
19
|
disable: !t.hasAMP
|
|
21
20
|
}
|
|
22
21
|
]);
|
|
23
|
-
return { __sfc: !0, previewStore: t,
|
|
24
|
-
t.setEmailFormat(
|
|
25
|
-
}, InSegments:
|
|
22
|
+
return { __sfc: !0, previewStore: t, trans: e, segmentList: o, handleFormatChange: (a) => {
|
|
23
|
+
t.setEmailFormat(a);
|
|
24
|
+
}, InSegments: l, InButtonV2: s };
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
_ as default
|
|
30
29
|
};
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useExport as
|
|
4
|
-
import { useSaveStart as
|
|
1
|
+
import { defineComponent as y, computed as p } from "vue";
|
|
2
|
+
import { useConfig as H } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useExport as V } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as _, useSaveComplete as h } from "../../../composables/useGuidoActions.js";
|
|
5
5
|
import { useTranslations as w } from "../../../composables/useTranslations.js";
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useTemplatePreparation as A } from "../../../utils/templatePreparation.js";
|
|
6
|
+
import { useVersionHistoryApi as T } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useEditorStore as O } from "../../../stores/editor.js";
|
|
8
|
+
import { usePreviewStore as g } from "../../../stores/preview.js";
|
|
9
|
+
import { useTemplatePreparation as x } from "../../../utils/templatePreparation.js";
|
|
11
10
|
import { getTooltipOptions as C } from "../../../utils/tooltipUtils.js";
|
|
12
11
|
import { InButtonV2 as D } from "@useinsider/design-system-vue";
|
|
13
|
-
const
|
|
12
|
+
const z = /* @__PURE__ */ y({
|
|
14
13
|
__name: "RightSlot",
|
|
15
|
-
setup(
|
|
16
|
-
const { config:
|
|
17
|
-
if (
|
|
18
|
-
|
|
14
|
+
setup(A) {
|
|
15
|
+
const { config: m } = H(), { exportHtml: c } = V(), r = _(), s = h(), { openVersionHistory: i, closeVersionHistory: n } = T(), e = O(), o = w(), a = g(), l = () => {
|
|
16
|
+
if (e.isVersionHistoryOpen) {
|
|
17
|
+
n();
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
20
|
+
i();
|
|
21
|
+
}, f = () => {
|
|
22
|
+
e.isSaveAsTemplateDrawerOpen = !0;
|
|
23
|
+
}, u = p(() => e.isVersionHistoryOpen ? o("newsletter.close-version-history") : o("newsletter.version-history")), v = async () => {
|
|
24
|
+
r();
|
|
26
25
|
try {
|
|
27
|
-
const { prepareTemplateDetails:
|
|
28
|
-
|
|
29
|
-
} catch (
|
|
30
|
-
console.error("Failed to get template data for save:",
|
|
26
|
+
const { prepareTemplateDetails: t } = x(), d = await t();
|
|
27
|
+
s(d);
|
|
28
|
+
} catch (t) {
|
|
29
|
+
console.error("Failed to get template data for save:", t);
|
|
31
30
|
}
|
|
32
|
-
},
|
|
33
|
-
return { __sfc: !0, config:
|
|
31
|
+
}, S = p(() => e.isVersionHistoryOpen || a.isPreviewModeOpen);
|
|
32
|
+
return { __sfc: !0, config: m, exportHtml: c, saveStart: r, saveComplete: s, openVersionHistory: i, closeVersionHistory: n, editorStore: e, trans: o, previewStore: a, handleVersionHistory: l, handleSaveAs: f, versionHistoryTooltipText: u, handleSave: v, isSaveButtonDisabled: S, getTooltipOptions: C, InButtonV2: D };
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
z as default
|
|
38
37
|
};
|
|
@@ -31,9 +31,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
31
31
|
descriptionStatus: boolean;
|
|
32
32
|
descriptionText: string;
|
|
33
33
|
}>>>, {
|
|
34
|
+
className: string;
|
|
34
35
|
size: string;
|
|
35
36
|
closeOnOutsideClick: boolean;
|
|
36
|
-
className: string;
|
|
37
37
|
descriptionStatus: boolean;
|
|
38
38
|
descriptionText: string;
|
|
39
39
|
}>;
|
|
@@ -34,9 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
34
|
}>>>, {
|
|
35
35
|
description: string;
|
|
36
36
|
size: "small" | "medium" | "large";
|
|
37
|
+
closeOnOutsideClick: boolean;
|
|
37
38
|
footerButtonOptions: FooterButtonGroup;
|
|
38
39
|
closeButtonStatus: boolean;
|
|
39
|
-
closeOnOutsideClick: boolean;
|
|
40
40
|
footerStatus: boolean;
|
|
41
41
|
}>;
|
|
42
42
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { useEditorStore as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
r.isActive("ampOnboarding") && r.close("ampOnboarding"), e.isPreviewModeOpen = !1, e.$reset();
|
|
1
|
+
import { useEditorStore as n } from "../stores/editor.js";
|
|
2
|
+
import { usePreviewStore as m } from "../stores/preview.js";
|
|
3
|
+
import { useActionsApi as p } from "./useActionsApi.js";
|
|
4
|
+
import { useCodeEditorApi as l } from "./useCodeEditorApi.js";
|
|
5
|
+
const E = () => {
|
|
6
|
+
const i = n(), e = m(), { closeCodeEditor: s } = l(), { getPreviewData: a } = p(), r = () => {
|
|
7
|
+
e.isPreviewModeOpen = !1, e.$reset();
|
|
9
8
|
};
|
|
10
9
|
return {
|
|
11
|
-
closePreviewMode:
|
|
10
|
+
closePreviewMode: r,
|
|
12
11
|
openPreviewMode: () => {
|
|
13
|
-
i.isCodeEditorOpen &&
|
|
12
|
+
i.isCodeEditorOpen && s(), e.isPreviewModeOpen = !0;
|
|
14
13
|
},
|
|
15
14
|
loadPreviewData: async () => {
|
|
16
15
|
if (!(e.isLoading || e.isLoaded)) {
|
|
17
16
|
e.isLoading = !0;
|
|
18
17
|
try {
|
|
19
|
-
const { html: o, ampHtml:
|
|
20
|
-
e.templateHtml = o || "", e.
|
|
18
|
+
const { html: o, ampHtml: t, ampErrors: d } = await a();
|
|
19
|
+
e.templateHtml = o || "", e.ampHtml = t || "", e.ampErrors = d || [], e.setEmailFormat(t ? "AMP" : "html"), e.isLoaded = !0;
|
|
21
20
|
} catch (o) {
|
|
22
|
-
console.error("Failed to load preview data:", o),
|
|
21
|
+
console.error("Failed to load preview data:", o), r();
|
|
23
22
|
} finally {
|
|
24
23
|
e.isLoading = !1;
|
|
25
24
|
}
|
|
@@ -28,5 +27,5 @@ const S = () => {
|
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
E as usePreviewMode
|
|
32
31
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useEditorStore as
|
|
9
|
-
import { dynamicContentToMergeTags as
|
|
10
|
-
const
|
|
11
|
-
const { handleError:
|
|
12
|
-
const
|
|
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 = (d) => {
|
|
11
|
+
const { handleError: c } = S(), { getToken: a, getCustomFonts: u } = E(), l = (e, r = []) => {
|
|
12
|
+
const i = w(), { html: o, css: s, forceRecreate: p } = e;
|
|
13
13
|
window.UIEditor.initEditor(
|
|
14
14
|
document.querySelector("#guido-editor"),
|
|
15
15
|
{
|
|
16
16
|
metadata: d,
|
|
17
17
|
html: o,
|
|
18
18
|
css: s,
|
|
19
|
-
forceRecreate:
|
|
19
|
+
forceRecreate: p,
|
|
20
20
|
locale: "en",
|
|
21
21
|
undoButtonSelector: "#guido__undo-button",
|
|
22
22
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -26,78 +26,75 @@ const D = (d) => {
|
|
|
26
26
|
customAppearanceMergetags: !0,
|
|
27
27
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
28
28
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
29
|
-
customViewStyles:
|
|
30
|
-
.esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
|
|
31
|
-
.esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
|
|
32
|
-
`,
|
|
29
|
+
customViewStyles: h,
|
|
33
30
|
conditionsEnabled: !0,
|
|
34
31
|
customConditionsEnabled: !0,
|
|
35
|
-
conditionCategories:
|
|
32
|
+
conditionCategories: C,
|
|
36
33
|
enableXSSSecurity: !0,
|
|
37
34
|
messageSettingsEnabled: !1,
|
|
35
|
+
selectBlockAfterDropFromSettingsPanel: !0,
|
|
38
36
|
editorFonts: {
|
|
39
37
|
showDefaultStandardFonts: !0,
|
|
40
38
|
showDefaultNotStandardFonts: !0,
|
|
41
|
-
customFonts:
|
|
39
|
+
customFonts: r
|
|
42
40
|
},
|
|
43
41
|
mergeTags: [
|
|
44
42
|
{
|
|
45
|
-
entries:
|
|
43
|
+
entries: b(d.preselectedDynamicContentList)
|
|
46
44
|
}
|
|
47
45
|
],
|
|
48
46
|
async onTokenRefreshRequest(t) {
|
|
49
47
|
try {
|
|
50
|
-
const n = await
|
|
48
|
+
const n = await a();
|
|
51
49
|
t(n);
|
|
52
50
|
} catch (n) {
|
|
53
|
-
|
|
51
|
+
c(n, "Failed to refresh token");
|
|
54
52
|
}
|
|
55
53
|
},
|
|
56
54
|
onTemplateLoaded() {
|
|
57
55
|
try {
|
|
58
|
-
const { importCss: t } =
|
|
59
|
-
t(), n()
|
|
56
|
+
const { importCss: t } = f(), { activateCustomViewStyles: n } = g();
|
|
57
|
+
t(), n();
|
|
60
58
|
} catch (t) {
|
|
61
|
-
|
|
59
|
+
c(t, "Failed to load custom interface appearance");
|
|
62
60
|
}
|
|
63
61
|
},
|
|
64
62
|
onCodeEditorVisibilityChanged(t) {
|
|
65
|
-
|
|
63
|
+
i.isCodeEditorOpen = t;
|
|
66
64
|
},
|
|
67
65
|
onEditorVisualModeChanged(t) {
|
|
68
|
-
|
|
66
|
+
i.editorVisualMode = t.toLowerCase();
|
|
69
67
|
},
|
|
70
68
|
onVersionHistoryVisibilityChanged(t) {
|
|
71
|
-
|
|
69
|
+
i.isVersionHistoryOpen = t;
|
|
72
70
|
},
|
|
73
71
|
onDataChanged() {
|
|
74
|
-
|
|
72
|
+
i.hasChanges = !0;
|
|
75
73
|
},
|
|
76
|
-
onEvent: l,
|
|
77
74
|
ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
|
|
78
|
-
extensions: [
|
|
75
|
+
extensions: [y]
|
|
79
76
|
}
|
|
80
77
|
);
|
|
81
|
-
}, m = (
|
|
78
|
+
}, m = (e) => new Promise((r, i) => {
|
|
82
79
|
if (document.getElementById("UiEditorScript")) {
|
|
83
|
-
|
|
80
|
+
e(), r();
|
|
84
81
|
return;
|
|
85
82
|
}
|
|
86
83
|
const o = document.createElement("script");
|
|
87
84
|
o.id = "UiEditorScript", o.type = "module", o.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", o.onload = () => {
|
|
88
|
-
|
|
85
|
+
e(), r();
|
|
89
86
|
}, o.onerror = () => {
|
|
90
87
|
const s = new Error("Failed to load Stripo UIEditor script");
|
|
91
|
-
|
|
88
|
+
i(s);
|
|
92
89
|
}, document.body.appendChild(o);
|
|
93
90
|
});
|
|
94
|
-
return { initPlugin: async (
|
|
91
|
+
return { initPlugin: async (e) => {
|
|
95
92
|
await m(async () => {
|
|
96
|
-
const
|
|
97
|
-
|
|
93
|
+
const r = await u();
|
|
94
|
+
l(e, r);
|
|
98
95
|
});
|
|
99
96
|
} };
|
|
100
97
|
};
|
|
101
98
|
export {
|
|
102
|
-
|
|
99
|
+
P as useStripo
|
|
103
100
|
};
|
package/dist/enums/defaults.js
CHANGED
|
@@ -8,8 +8,9 @@ const e = {
|
|
|
8
8
|
dynamicContent: !0,
|
|
9
9
|
saveAsTemplate: !0,
|
|
10
10
|
versionHistory: !0
|
|
11
|
-
}
|
|
12
|
-
|
|
11
|
+
},
|
|
12
|
+
useHeader: !0
|
|
13
|
+
}, t = "email", s = "Guido User", a = 1, r = 2, n = {
|
|
13
14
|
email: 60,
|
|
14
15
|
architect: 49
|
|
15
16
|
};
|
|
@@ -18,6 +19,6 @@ export {
|
|
|
18
19
|
a as DefaultMessageType,
|
|
19
20
|
t as DefaultProductType,
|
|
20
21
|
s as DefaultUsername,
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
r as EditorType,
|
|
23
|
+
n as ProductIds
|
|
23
24
|
};
|
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}[data-v-
|
|
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}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const n = `.esd-x,
|
|
2
|
+
.esd-merge-tag {
|
|
3
|
+
color: #0a2ecc !important;
|
|
4
|
+
box-shadow: none !important;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.esd-merge-tag {
|
|
8
|
+
border: 1px solid #b5c1f1;
|
|
9
|
+
border-radius: 4px !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ue-preview-control-wrapper ue-icon-component:not([disabled=true]):not(.stripo-static-icon):hover {
|
|
13
|
+
background: none;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
n as default
|
|
18
|
+
};
|
package/dist/stores/editor.d.ts
CHANGED
package/dist/stores/editor.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { defineStore as e } from "pinia";
|
|
2
|
-
const
|
|
2
|
+
const o = e("editor", {
|
|
3
3
|
state: () => ({
|
|
4
4
|
isCodeEditorOpen: !1,
|
|
5
5
|
isSaveAsTemplateDrawerOpen: !1,
|
|
6
6
|
isVersionHistoryOpen: !1,
|
|
7
7
|
isPreviewModeOpen: !1,
|
|
8
8
|
editorVisualMode: "desktop",
|
|
9
|
-
hasChanges: !1
|
|
10
|
-
isStripoInitialized: !1
|
|
9
|
+
hasChanges: !1
|
|
11
10
|
})
|
|
12
11
|
});
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
o as useEditorStore
|
|
15
14
|
};
|
package/dist/stores/preview.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const l = () => ({
|
|
1
|
+
import { defineStore as t } from "pinia";
|
|
2
|
+
const s = () => ({
|
|
4
3
|
emailFormat: "html",
|
|
5
4
|
ampHtml: "",
|
|
6
5
|
ampErrors: [],
|
|
@@ -9,18 +8,18 @@ const l = () => ({
|
|
|
9
8
|
isLoaded: !1,
|
|
10
9
|
isAMPErrorModalVisible: !1,
|
|
11
10
|
isPreviewModeOpen: !1
|
|
12
|
-
}),
|
|
13
|
-
state: () =>
|
|
11
|
+
}), o = t("preview", {
|
|
12
|
+
state: () => s(),
|
|
14
13
|
getters: {
|
|
15
|
-
isAMPModeEnabled: (
|
|
14
|
+
isAMPModeEnabled: (e) => e.emailFormat === "AMP",
|
|
16
15
|
previewHtml() {
|
|
17
16
|
return this.isAMPModeEnabled ? this.ampHtml : this.templateHtml;
|
|
18
17
|
},
|
|
19
|
-
hasAMP: (
|
|
20
|
-
var
|
|
21
|
-
return !!((
|
|
18
|
+
hasAMP: (e) => {
|
|
19
|
+
var r;
|
|
20
|
+
return !!((r = e.ampHtml) != null && r.trim());
|
|
22
21
|
},
|
|
23
|
-
hasAMPErrors: (
|
|
22
|
+
hasAMPErrors: (e) => e.ampErrors.length > 0,
|
|
24
23
|
showAMPErrorButton() {
|
|
25
24
|
return this.isAMPModeEnabled && this.hasAMPErrors;
|
|
26
25
|
},
|
|
@@ -29,18 +28,11 @@ const l = () => ({
|
|
|
29
28
|
}
|
|
30
29
|
},
|
|
31
30
|
actions: {
|
|
32
|
-
updateAMPData(
|
|
33
|
-
|
|
34
|
-
const e = !!((r = this.ampHtml) != null && r.trim());
|
|
35
|
-
this.ampHtml = o.ampHtml ?? "", this.ampErrors = o.ampErrors ?? [];
|
|
36
|
-
const t = o.ampHtml ? "AMP" : "html";
|
|
37
|
-
if (this.emailFormat = t, !e && t === "AMP") {
|
|
38
|
-
const i = s();
|
|
39
|
-
i.shouldShowOnboarding("ampOnboarding") && i.start("ampOnboarding");
|
|
40
|
-
}
|
|
31
|
+
updateAMPData(e) {
|
|
32
|
+
this.ampHtml = e.ampHtml ?? "", this.ampErrors = e.ampErrors ?? [], this.emailFormat = e.ampHtml ? "AMP" : "html";
|
|
41
33
|
},
|
|
42
|
-
setEmailFormat(
|
|
43
|
-
this.emailFormat =
|
|
34
|
+
setEmailFormat(e) {
|
|
35
|
+
this.emailFormat = e;
|
|
44
36
|
},
|
|
45
37
|
closeErrorModal() {
|
|
46
38
|
this.isAMPErrorModalVisible = !1;
|
|
@@ -49,10 +41,7 @@ const l = () => ({
|
|
|
49
41
|
this.isAMPErrorModalVisible = !0;
|
|
50
42
|
},
|
|
51
43
|
openPreviewMode() {
|
|
52
|
-
|
|
53
|
-
const o = s();
|
|
54
|
-
o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
55
|
-
}
|
|
44
|
+
this.isPreviewModeOpen = !0;
|
|
56
45
|
},
|
|
57
46
|
closePreviewMode() {
|
|
58
47
|
this.isPreviewModeOpen = !1;
|
|
@@ -60,5 +49,5 @@ const l = () => ({
|
|
|
60
49
|
}
|
|
61
50
|
});
|
|
62
51
|
export {
|
|
63
|
-
|
|
52
|
+
o as usePreviewStore
|
|
64
53
|
};
|