@useinsider/guido 1.0.0-beta.4758e10 → 1.0.0-beta.4f67368
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/dist/@types/generic.d.ts +0 -6
- package/dist/components/Guido.vue.d.ts +6 -5
- package/dist/components/Guido.vue.js +10 -10
- package/dist/components/Guido.vue2.js +54 -59
- package/dist/components/organisms/base/Toaster.vue.js +17 -0
- package/dist/components/organisms/base/Toaster.vue2.js +12 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +12 -12
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +8 -7
- package/dist/components/organisms/header/LeftSlot.vue.js +9 -10
- package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
- package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +28 -25
- package/dist/components/organisms/header/ViewOptions.vue.js +10 -10
- package/dist/components/organisms/header/ViewOptions.vue2.js +15 -14
- package/dist/components/wrappers/WpModal.vue.d.ts +2 -2
- package/dist/composables/useActionsApi.d.ts +1 -2
- package/dist/composables/useActionsApi.js +36 -51
- package/dist/composables/useCustomInterfaceAppearance.js +13 -15
- package/dist/composables/useExport.js +6 -6
- package/dist/composables/useGuidoActions.d.ts +2 -2
- package/dist/composables/useHttp.js +21 -23
- package/dist/composables/usePartner.d.ts +1 -1
- package/dist/composables/usePartner.js +14 -9
- package/dist/composables/usePreviewMode.js +13 -13
- package/dist/composables/useStripo.js +24 -28
- package/dist/composables/useToaster.d.ts +1 -16
- package/dist/composables/useToaster.js +23 -30
- package/dist/composables/useVersionHistoryApi.js +4 -4
- package/dist/enums/defaults.d.ts +1 -4
- package/dist/enums/defaults.js +2 -8
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -2
- package/dist/node_modules/lodash-es/_baseCreate.js +2 -2
- package/dist/node_modules/lodash-es/_defineProperty.js +2 -2
- package/dist/node_modules/lodash-es/_isMasked.js +2 -2
- package/dist/node_modules/lodash-es/_nodeUtil.js +2 -2
- package/dist/node_modules/lodash-es/isArguments.js +2 -2
- package/dist/static/styles/components/wide-panel.css.js +2 -2
- package/dist/stores/editor.d.ts +1 -175
- package/dist/stores/editor.js +4 -21
- package/dist/stores/preview.d.ts +8 -0
- package/dist/stores/preview.js +20 -12
- package/dist/stores/toaster.d.ts +17 -0
- package/dist/stores/toaster.js +25 -0
- package/dist/utils/genericUtil.d.ts +0 -1
- package/dist/utils/genericUtil.js +3 -7
- package/package.json +3 -3
- package/dist/@types/save-as-template.d.ts +0 -29
- package/dist/components/organisms/LoadingWrapper.vue.js +0 -18
- package/dist/components/organisms/LoadingWrapper.vue2.js +0 -12
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -2
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +0 -20
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +0 -63
- package/dist/components/wrappers/WpDrawer.vue.d.ts +0 -63
- package/dist/components/wrappers/WpDrawer.vue.js +0 -25
- package/dist/components/wrappers/WpDrawer.vue2.js +0 -23
- package/dist/composables/useValidation.d.ts +0 -56
- package/dist/composables/useValidation.js +0 -19
- package/dist/composables/validators/saveAsTemplate.d.ts +0 -31
- package/dist/composables/validators/saveAsTemplate.js +0 -24
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/node_modules/@vueuse/shared/index.js +0 -45
- package/dist/node_modules/valibot/dist/index.js +0 -190
- package/dist/node_modules/vue-demi/lib/index.js +0 -7
- package/dist/services/templateLibraryApi.d.ts +0 -7
- package/dist/services/templateLibraryApi.js +0 -87
- package/dist/static/styles/components/loader.css.js +0 -10
- package/dist/stores/save-as-template.d.ts +0 -73
- package/dist/stores/save-as-template.js +0 -48
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/base64.js +0 -7
- package/dist/utils/templatePreparation.d.ts +0 -4
- package/dist/utils/templatePreparation.js +0 -33
- /package/dist/components/organisms/{LoadingWrapper.vue.d.ts → base/Toaster.vue.d.ts} +0 -0
package/dist/@types/generic.d.ts
CHANGED
|
@@ -4,17 +4,11 @@ type Features = {
|
|
|
4
4
|
saveAsTemplate?: boolean;
|
|
5
5
|
versionHistory?: boolean;
|
|
6
6
|
};
|
|
7
|
-
type Partner = {
|
|
8
|
-
partnerName: string;
|
|
9
|
-
productType: number;
|
|
10
|
-
messageType: number;
|
|
11
|
-
};
|
|
12
7
|
export type GuidoConfig = {
|
|
13
8
|
translationsPath: string;
|
|
14
9
|
htmlCompilerRules?: CompilerRule[];
|
|
15
10
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
11
|
emailHeader: EmailHeader;
|
|
17
|
-
partner?: Partner;
|
|
18
12
|
features?: Features;
|
|
19
13
|
};
|
|
20
14
|
export type DynamicContent = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Template } from '@@/Types/stripo';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
5
5
|
userId: string;
|
|
6
|
-
messageType?: number;
|
|
7
6
|
partnerName?: string;
|
|
8
|
-
productType?:
|
|
7
|
+
productType?: string;
|
|
9
8
|
username?: string;
|
|
10
9
|
html?: string;
|
|
11
10
|
css?: string;
|
|
@@ -17,12 +16,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
17
16
|
insert: (data: DynamicContent) => void;
|
|
18
17
|
close: () => void;
|
|
19
18
|
};
|
|
20
|
-
hasChanges: import("vue").ComputedRef<boolean>;
|
|
21
19
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
22
20
|
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
23
21
|
back: () => void;
|
|
24
22
|
"save:start": () => void;
|
|
25
|
-
"save:complete": (data:
|
|
23
|
+
"save:complete": (data: {
|
|
24
|
+
template: Omit<Template, "forceRecreate">;
|
|
25
|
+
dynamicContentList: DynamicContent[];
|
|
26
|
+
}) => void;
|
|
26
27
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
27
28
|
export default _default;
|
|
28
29
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
a,
|
|
4
|
+
var s = function() {
|
|
5
|
+
var i = this, e = i._self._c, r = i._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.previewStore.isPreviewModeOpen ? e(r.PreviewContainer) : i._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster)], 1);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ t(
|
|
8
|
+
o,
|
|
10
9
|
s,
|
|
10
|
+
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"09c28ccc"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const v = n.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
v as default
|
|
18
18
|
};
|
|
@@ -1,22 +1,19 @@
|
|
|
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 {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import q from "../node_modules/lodash-es/merge.js";
|
|
14
|
-
const ie = /* @__PURE__ */ I({
|
|
1
|
+
import { defineComponent as L, defineAsyncComponent as E, onMounted as P } from "vue";
|
|
2
|
+
import { provideGuidoActions as _ } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as G } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as I } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as T, DefaultGuidoConfig as k } from "../enums/defaults.js";
|
|
6
|
+
import A from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import N from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import { useStripoApi as x } from "../services/stripoApi.js";
|
|
9
|
+
import { useDynamicContentStore as W } from "../stores/dynamic-content.js";
|
|
10
|
+
import { usePreviewStore as z } from "../stores/preview.js";
|
|
11
|
+
import B from "../node_modules/lodash-es/merge.js";
|
|
12
|
+
const V = /* @__PURE__ */ L({
|
|
15
13
|
__name: "Guido",
|
|
16
14
|
props: {
|
|
17
15
|
templateId: null,
|
|
18
16
|
userId: null,
|
|
19
|
-
messageType: null,
|
|
20
17
|
partnerName: null,
|
|
21
18
|
productType: null,
|
|
22
19
|
username: null,
|
|
@@ -26,34 +23,29 @@ const ie = /* @__PURE__ */ I({
|
|
|
26
23
|
guidoConfig: null
|
|
27
24
|
},
|
|
28
25
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
29
|
-
setup(
|
|
30
|
-
const o =
|
|
26
|
+
setup(S, { expose: b, emit: t }) {
|
|
27
|
+
const o = S, w = E(
|
|
31
28
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
32
|
-
), n =
|
|
33
|
-
templateId:
|
|
34
|
-
userId:
|
|
35
|
-
guidoConfig:
|
|
36
|
-
html:
|
|
37
|
-
css:
|
|
38
|
-
partnerName:
|
|
39
|
-
productType:
|
|
40
|
-
|
|
41
|
-
username: C = W
|
|
29
|
+
), n = W(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = G(), h = z(), {
|
|
30
|
+
templateId: r,
|
|
31
|
+
userId: a,
|
|
32
|
+
guidoConfig: m,
|
|
33
|
+
html: d = "",
|
|
34
|
+
css: l = "",
|
|
35
|
+
partnerName: u = i(),
|
|
36
|
+
productType: p = s(),
|
|
37
|
+
username: y = T
|
|
42
38
|
} = o;
|
|
43
|
-
window.GuidoConfig =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
productType: s,
|
|
54
|
-
preselectedDynamicContentList: r
|
|
55
|
-
}), { getDefaultTemplate: w } = H();
|
|
56
|
-
A({
|
|
39
|
+
window.GuidoConfig = B(k, m);
|
|
40
|
+
const { initPlugin: f } = I({
|
|
41
|
+
emailId: r,
|
|
42
|
+
userId: a,
|
|
43
|
+
username: y,
|
|
44
|
+
partnerName: u,
|
|
45
|
+
productType: p,
|
|
46
|
+
preselectedDynamicContentList: c
|
|
47
|
+
}), { getDefaultTemplate: g } = x();
|
|
48
|
+
_({
|
|
57
49
|
onBack: () => {
|
|
58
50
|
console.debug("guido:back"), t("back");
|
|
59
51
|
},
|
|
@@ -61,42 +53,45 @@ const ie = /* @__PURE__ */ I({
|
|
|
61
53
|
console.debug("guido:save:start"), t("save:start");
|
|
62
54
|
},
|
|
63
55
|
onSaveComplete: (e) => {
|
|
64
|
-
console.debug("guido:save:complete",
|
|
56
|
+
console.debug("guido:save:complete", {
|
|
57
|
+
template: e,
|
|
58
|
+
dynamicContentList: n.getSelectedDynamicContentList
|
|
59
|
+
}), t("save:complete", {
|
|
60
|
+
template: e,
|
|
61
|
+
dynamicContentList: n.getSelectedDynamicContentList
|
|
62
|
+
});
|
|
65
63
|
}
|
|
66
64
|
});
|
|
67
|
-
const
|
|
65
|
+
const C = (e) => {
|
|
68
66
|
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
69
|
-
},
|
|
67
|
+
}, v = () => {
|
|
70
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
71
69
|
};
|
|
72
|
-
return
|
|
70
|
+
return P(async () => {
|
|
73
71
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
74
72
|
try {
|
|
75
73
|
let e = {
|
|
76
|
-
html:
|
|
77
|
-
css:
|
|
74
|
+
html: d,
|
|
75
|
+
css: l,
|
|
78
76
|
forceRecreate: !0
|
|
79
77
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
80
78
|
};
|
|
81
|
-
e.html || (e = await
|
|
79
|
+
e.html || (e = await g()), await f(e), n.selectedDynamicContentList = c;
|
|
82
80
|
} catch (e) {
|
|
83
81
|
console.error("Failed to initialize Stripo editor:", e);
|
|
84
82
|
}
|
|
85
83
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
86
|
-
const
|
|
87
|
-
console.debug("dynamic-content:open",
|
|
84
|
+
const D = e;
|
|
85
|
+
console.debug("dynamic-content:open", D.detail), t("dynamic-content:open", D.detail);
|
|
88
86
|
});
|
|
89
|
-
}),
|
|
90
|
-
window.UIEditor.removeEditor();
|
|
91
|
-
}), E({
|
|
87
|
+
}), b({
|
|
92
88
|
dynamicContent: {
|
|
93
|
-
insert:
|
|
94
|
-
close:
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
}), { __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: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, HeaderWrapper: z, LoadingWrapper: B, SaveAsTemplateDrawer: F };
|
|
89
|
+
insert: C,
|
|
90
|
+
close: v
|
|
91
|
+
}
|
|
92
|
+
}), { __sfc: !0, PreviewContainer: w, dynamicContentStore: n, props: o, preselectedDynamicContentList: c, getPartnerName: i, getProductType: s, previewStore: h, templateId: r, userId: a, guidoConfig: m, html: d, css: l, partnerName: u, productType: p, username: y, emit: t, initPlugin: f, getDefaultTemplate: g, insertDynamicContent: C, closeDynamicContent: v, Toaster: A, HeaderWrapper: N };
|
|
98
93
|
}
|
|
99
94
|
});
|
|
100
95
|
export {
|
|
101
|
-
|
|
96
|
+
V as default
|
|
102
97
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import r from "./Toaster.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return s("div", [s(t.InToasts, { attrs: { status: t.store.status, text: t.store.text, type: t.store.type } })], 1);
|
|
6
|
+
}, _ = [], a = /* @__PURE__ */ o(
|
|
7
|
+
r,
|
|
8
|
+
n,
|
|
9
|
+
_,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const l = a.exports;
|
|
15
|
+
export {
|
|
16
|
+
l as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { useToasterStore as t } from "../../../stores/toaster.js";
|
|
3
|
+
import { InToasts as r } from "@useinsider/design-system-vue";
|
|
4
|
+
const _ = /* @__PURE__ */ o({
|
|
5
|
+
__name: "Toaster",
|
|
6
|
+
setup(e) {
|
|
7
|
+
return { __sfc: !0, store: t(), InToasts: r };
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
_ as default
|
|
12
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return e
|
|
6
|
-
return
|
|
7
|
-
} } }) :
|
|
8
|
-
},
|
|
9
|
-
s,
|
|
1
|
+
import i from "./PreviewContainer.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var t = function() {
|
|
4
|
+
var s = this, e = s._self._c, r = s._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [e("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r.previewStore.isLoading ? [e("div", { staticClass: "d-f a-i-c j-c-c w-1 h-1 f-g-1" }, [e(r.InLoading, { attrs: { "color-class": "i-c-1", size: "32" } })], 1)] : [e(r.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), e(r.MobilePreview, { staticClass: "f-0 min-w-a" })]], 2), r.previewStore.isAMPErrorModalVisible ? e(r.AmpErrorModal, { on: { close: function(l) {
|
|
6
|
+
return r.previewStore.closeErrorModal();
|
|
7
|
+
} } }) : s._e()], 1);
|
|
8
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
10
9
|
i,
|
|
11
|
-
|
|
10
|
+
t,
|
|
11
|
+
a,
|
|
12
12
|
!1,
|
|
13
13
|
null,
|
|
14
14
|
null
|
|
15
15
|
);
|
|
16
|
-
const
|
|
16
|
+
const d = n.exports;
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
d as default
|
|
19
19
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { defineComponent as r, onMounted as t } from "vue";
|
|
2
2
|
import { usePreviewMode as i } from "../../../composables/usePreviewMode.js";
|
|
3
3
|
import { usePreviewStore as m } from "../../../stores/preview.js";
|
|
4
|
+
import { InLoading as n } from "@useinsider/design-system-vue";
|
|
4
5
|
import p from "./amp/AmpErrorModal.vue.js";
|
|
5
|
-
import
|
|
6
|
+
import f from "./desktop-preview/DesktopPreview.vue.js";
|
|
6
7
|
import s from "./mobile-preview/MobilePreview.vue.js";
|
|
7
|
-
const
|
|
8
|
+
const l = /* @__PURE__ */ r({
|
|
8
9
|
__name: "PreviewContainer",
|
|
9
|
-
setup(
|
|
10
|
-
const { loadPreviewData:
|
|
10
|
+
setup(a) {
|
|
11
|
+
const { loadPreviewData: o } = i(), e = m();
|
|
11
12
|
return t(() => {
|
|
12
|
-
|
|
13
|
-
}), { __sfc: !0, loadPreviewData:
|
|
13
|
+
o();
|
|
14
|
+
}), { __sfc: !0, loadPreviewData: o, previewStore: e, InLoading: n, AmpErrorModal: p, DesktopPreview: f, MobilePreview: s };
|
|
14
15
|
}
|
|
15
16
|
});
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
l as default
|
|
18
19
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var a = function() {
|
|
1
|
+
import n from "./LeftSlot.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
5
4
|
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
5
|
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" }, on: { click: t.handleBack } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
|
|
7
|
-
},
|
|
8
|
-
o,
|
|
9
|
-
a,
|
|
6
|
+
}, a = [], i = /* @__PURE__ */ o(
|
|
10
7
|
n,
|
|
8
|
+
r,
|
|
9
|
+
a,
|
|
11
10
|
!1,
|
|
12
11
|
null,
|
|
13
|
-
|
|
12
|
+
null
|
|
14
13
|
);
|
|
15
|
-
const
|
|
14
|
+
const f = i.exports;
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
f as default
|
|
18
17
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import i from "./MiddleSlot.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
4
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
5
|
+
return t.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(t.VersionHistory), e(t.VersionHistoryViewOptions)], 1) : e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.previewStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), e(t.ViewOptions, { staticClass: "ml-3" }), t.previewStore.isPreviewModeOpen ? e(t.AmpToggle) : o._e()], 1);
|
|
6
|
+
}, r = [], l = /* @__PURE__ */ s(
|
|
7
7
|
i,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
r,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const u = l.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
u as default
|
|
17
17
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePreviewMode as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import
|
|
5
|
-
import { useEditorStore as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import a from "
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
import { defineComponent as m, computed as s } from "vue";
|
|
2
|
+
import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
|
|
3
|
+
import { useTranslations as d } from "../../../composables/useTranslations.js";
|
|
4
|
+
import w from "../email-preview/amp/AmpToggle.vue.js";
|
|
5
|
+
import { useEditorStore as c } from "../../../stores/editor.js";
|
|
6
|
+
import { usePreviewStore as f } from "../../../stores/preview.js";
|
|
7
|
+
import { getTooltipOptions as v } from "../../../utils/tooltipUtils.js";
|
|
8
|
+
import { InButtonV2 as a } from "@useinsider/design-system-vue";
|
|
9
|
+
import u from "./version-history/VersionHistory.vue.js";
|
|
10
|
+
import T from "./version-history/ViewOptions.vue.js";
|
|
11
|
+
import P from "./ViewOptions.vue.js";
|
|
12
|
+
const B = /* @__PURE__ */ m({
|
|
12
13
|
__name: "MiddleSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
return { __sfc: !0, editorStore:
|
|
14
|
+
setup(_) {
|
|
15
|
+
const t = c(), e = d(), o = f(), { openPreviewMode: r, closePreviewMode: i } = l(), n = s(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), p = s(() => t.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
|
|
16
|
+
return { __sfc: !0, editorStore: t, trans: e, previewStore: o, openPreviewMode: r, closePreviewMode: i, previewTooltipText: n, codeEditorTooltipText: p, handlePreviewToggle: () => o.isPreviewModeOpen ? i() : r(), AmpToggle: w, getTooltipOptions: v, InButtonV2: a, VersionHistory: u, VersionHistoryViewOptions: T, ViewOptions: P };
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
B as default
|
|
20
21
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import n from "./RightSlot.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var a = function() {
|
|
4
4
|
var s, i;
|
|
5
5
|
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.
|
|
7
|
-
},
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.exportHtml } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.isSaveButtonDisabled }, on: { click: t.handleSave } })], 1);
|
|
7
|
+
}, l = [], p = /* @__PURE__ */ r(
|
|
8
8
|
n,
|
|
9
|
+
a,
|
|
9
10
|
l,
|
|
10
|
-
r,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
13
|
null
|
|
14
14
|
);
|
|
15
|
-
const c =
|
|
15
|
+
const c = p.exports;
|
|
16
16
|
export {
|
|
17
17
|
c as default
|
|
18
18
|
};
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { defineComponent as y, computed as a } from "vue";
|
|
2
|
+
import { useActionsApi as S } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as H } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as h } from "../../../composables/useExport.js";
|
|
5
|
+
import { useSaveStart as V, useSaveComplete as _ } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useTranslations as g } from "../../../composables/useTranslations.js";
|
|
7
|
+
import { useVersionHistoryApi as w } from "../../../composables/useVersionHistoryApi.js";
|
|
8
|
+
import { useEditorStore as C } from "../../../stores/editor.js";
|
|
9
|
+
import { usePreviewStore as O } from "../../../stores/preview.js";
|
|
9
10
|
import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
|
|
10
|
-
import { InButtonV2 as
|
|
11
|
-
const q = /* @__PURE__ */
|
|
11
|
+
import { InButtonV2 as T } from "@useinsider/design-system-vue";
|
|
12
|
+
const q = /* @__PURE__ */ y({
|
|
12
13
|
__name: "RightSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const { config:
|
|
15
|
-
if (
|
|
16
|
-
|
|
14
|
+
setup(A) {
|
|
15
|
+
const { config: c } = H(), { exportHtml: l } = h(), { getCompiledEmail: r } = S(), s = V(), i = _(), { openVersionHistory: n, closeVersionHistory: m } = w(), o = C(), t = g(), p = O(), f = () => {
|
|
16
|
+
if (o.isVersionHistoryOpen) {
|
|
17
|
+
m();
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
}, f = d(() => t.isVersionHistoryOpen ? e("newsletter.close-version-history") : e("newsletter.version-history"));
|
|
23
|
-
return { __sfc: !0, config: p, exportHtml: m, saveStart: s, saveComplete: n, openVersionHistory: i, closeVersionHistory: a, editorStore: t, trans: e, isSaving: o, handleVersionHistory: l, handleSaveAs: c, versionHistoryTooltipText: f, handleSave: async () => {
|
|
24
|
-
o.value = !0, t.loadingStatus = !0, s();
|
|
20
|
+
n();
|
|
21
|
+
}, u = a(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), v = async () => {
|
|
22
|
+
s();
|
|
25
23
|
try {
|
|
26
|
-
const {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const { html: e } = await r();
|
|
25
|
+
i({
|
|
26
|
+
html: e || "",
|
|
27
|
+
css: ""
|
|
28
|
+
// CSS is embedded in HTML from Stripo
|
|
29
|
+
});
|
|
30
|
+
} catch (e) {
|
|
31
|
+
console.error("Failed to get template data for save:", e);
|
|
30
32
|
}
|
|
31
|
-
},
|
|
33
|
+
}, d = a(() => o.isVersionHistoryOpen || p.isPreviewModeOpen);
|
|
34
|
+
return { __sfc: !0, config: c, exportHtml: l, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: m, editorStore: o, trans: t, previewStore: p, handleVersionHistory: f, versionHistoryTooltipText: u, handleSave: v, isSaveButtonDisabled: d, getTooltipOptions: x, InButtonV2: T };
|
|
32
35
|
}
|
|
33
36
|
});
|
|
34
37
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var t = this,
|
|
6
|
-
return
|
|
7
|
-
}, n = [], _ = /* @__PURE__ */
|
|
8
|
-
o,
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var s = function() {
|
|
5
|
+
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
6
|
+
return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.previewStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
|
|
7
|
+
}, n = [], _ = /* @__PURE__ */ i(
|
|
9
8
|
r,
|
|
9
|
+
s,
|
|
10
10
|
n,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"aad05c54"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
1
|
+
import { defineComponent as p } from "vue";
|
|
2
|
+
import { useTranslations as r } from "../../../composables/useTranslations.js";
|
|
3
3
|
import { useEditorStore as s } from "../../../stores/editor.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { usePreviewStore as m } from "../../../stores/preview.js";
|
|
5
|
+
import { getTooltipOptions as t } from "../../../utils/tooltipUtils.js";
|
|
6
|
+
import { InSegments as l } from "@useinsider/design-system-vue";
|
|
7
|
+
const w = /* @__PURE__ */ p({
|
|
7
8
|
__name: "ViewOptions",
|
|
8
|
-
setup(
|
|
9
|
-
const e = s(),
|
|
9
|
+
setup(a) {
|
|
10
|
+
const e = s(), o = r(), i = [
|
|
10
11
|
{
|
|
11
12
|
text: "",
|
|
12
13
|
icon: "line-desktop",
|
|
13
14
|
value: "desktop",
|
|
14
15
|
position: "bottom",
|
|
15
16
|
align: "center",
|
|
16
|
-
tooltipText:
|
|
17
|
-
tooltipOptions:
|
|
17
|
+
tooltipText: o("newsletter.desktop"),
|
|
18
|
+
tooltipOptions: t("guido__view-option-desktop")
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
text: "",
|
|
@@ -22,13 +23,13 @@ const d = /* @__PURE__ */ n({
|
|
|
22
23
|
value: "mobile",
|
|
23
24
|
position: "bottom",
|
|
24
25
|
align: "center",
|
|
25
|
-
tooltipText:
|
|
26
|
-
tooltipOptions:
|
|
26
|
+
tooltipText: o("newsletter.mobile"),
|
|
27
|
+
tooltipOptions: t("guido__view-option-mobile")
|
|
27
28
|
}
|
|
28
|
-
];
|
|
29
|
-
return { __sfc: !0, editorStore: e, trans:
|
|
29
|
+
], n = m();
|
|
30
|
+
return { __sfc: !0, editorStore: e, trans: o, segmentList: i, previewStore: n, InSegments: l };
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
w as default
|
|
34
35
|
};
|
|
@@ -32,11 +32,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
32
32
|
closeOnOutsideClick: boolean;
|
|
33
33
|
footerStatus: boolean;
|
|
34
34
|
}>>>, {
|
|
35
|
-
description: string;
|
|
36
35
|
size: "small" | "medium" | "large";
|
|
37
|
-
|
|
36
|
+
description: string;
|
|
38
37
|
footerButtonOptions: FooterButtonGroup;
|
|
39
38
|
closeButtonStatus: boolean;
|
|
39
|
+
closeOnOutsideClick: boolean;
|
|
40
40
|
footerStatus: boolean;
|
|
41
41
|
}>;
|
|
42
42
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|