@useinsider/guido 1.0.2-beta.73c3522 â 1.0.2-beta.78d0643
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 +1 -31
- package/dist/@types/events.d.ts +0 -6
- package/dist/@types/generic.d.ts +0 -4
- package/dist/components/Guido.vue.d.ts +1 -3
- package/dist/components/Guido.vue.js +2 -2
- package/dist/components/Guido.vue2.js +55 -66
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/components/organisms/header/RightSlot.vue.js +3 -5
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -25
- package/dist/components/organisms/header/ViewOptions.vue.js +4 -4
- package/dist/components/organisms/header/ViewOptions.vue2.js +14 -14
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +13 -13
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +23 -21
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -12
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +26 -24
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +1 -1
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -36
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +15 -15
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +18 -16
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +14 -14
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
- package/dist/composables/useHtmlCompiler.js +9 -17
- package/dist/composables/usePreviewMode.js +15 -14
- package/dist/composables/useStripo.js +25 -27
- package/dist/composables/useStripoEventHandler.js +8 -8
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
- package/dist/enums/defaults.d.ts +1 -5
- package/dist/enums/defaults.js +10 -14
- package/dist/guido.css +1 -1
- package/dist/services/onboardingApi.d.ts +2 -2
- package/dist/services/onboardingApi.js +9 -9
- package/dist/stores/dynamic-content.d.ts +0 -12
- package/dist/stores/dynamic-content.js +6 -7
- package/dist/stores/onboarding.d.ts +592 -133
- package/dist/stores/onboarding.js +57 -40
- package/dist/stores/preview.js +14 -6
- package/dist/utils/genericUtil.js +6 -9
- package/dist/utils/templatePreparation.js +14 -21
- package/package.json +2 -4
- package/dist/composables/useHtmlValidator.d.ts +0 -3
- package/dist/composables/useHtmlValidator.js +0 -120
- package/dist/composables/useRecommendation.d.ts +0 -19
- package/dist/composables/useRecommendation.js +0 -27
- package/dist/composables/useSave.d.ts +0 -4
- package/dist/composables/useSave.js +0 -15
- package/dist/config/compiler/outlookCompilerRules.js +0 -36
- package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
- package/dist/config/compiler/recommendationCompilerRules.js +0 -83
- package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
- package/dist/config/compiler/socialCompilerRules.js +0 -21
- package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
- package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
- package/dist/enums/html-validator.d.ts +0 -6
- package/dist/enums/html-validator.js +0 -7
- package/dist/enums/recommendation.d.ts +0 -54
- package/dist/enums/recommendation.js +0 -56
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/enums/unsubscribe.js +0 -17
- package/dist/mock/api/validator.d.ts +0 -2
- package/dist/stores/recommendation.d.ts +0 -10
- package/dist/stores/recommendation.js +0 -9
- package/dist/stores/unsubscribe.d.ts +0 -8
- package/dist/stores/unsubscribe.js +0 -9
package/README.md
CHANGED
|
@@ -16,30 +16,7 @@ npm install @useinsider/guido
|
|
|
16
16
|
```
|
|
17
17
|
### Prerequisites
|
|
18
18
|
đ Your project should have `pinia`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
âšī¸ It helps to optimize your dependencies and sharing by Guido. This is why Guido pretty fast and tiny.
|
|
22
|
-
|
|
23
|
-
#### For Webpack
|
|
24
|
-
`/webpack.config.js` or `/vue.config.js`
|
|
25
|
-
```js
|
|
26
|
-
// ... Previous Configs
|
|
27
|
-
shared: {
|
|
28
|
-
vue: { singleton: true },
|
|
29
|
-
pinia: { singleton: true },
|
|
30
|
-
},
|
|
31
|
-
// ... Upcoming Configs
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
##### For Vite:
|
|
35
|
-
`/vite.config.js`
|
|
36
|
-
```js
|
|
37
|
-
// ... Previous Configs
|
|
38
|
-
resolve: {
|
|
39
|
-
dedupe: ['vue', 'pinia'],
|
|
40
|
-
},
|
|
41
|
-
// ... Upcoming Configs
|
|
42
|
-
```
|
|
19
|
+
|
|
43
20
|
---
|
|
44
21
|
## đ Usage
|
|
45
22
|
|
|
@@ -125,11 +102,6 @@ export default {
|
|
|
125
102
|
// â ī¸ It's mandatory. There is no way to understand if user closes the modal without selection.
|
|
126
103
|
handleDynamicContentClose() {
|
|
127
104
|
this.$refs.guidoEditor?.dynamicContent.close();
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// If you need to trigger save manually like leave modal cases, you can use this method.
|
|
131
|
-
save () {
|
|
132
|
-
this.$refs.guidoEditor?.saveSilent();
|
|
133
105
|
}
|
|
134
106
|
}
|
|
135
107
|
};
|
|
@@ -160,13 +132,11 @@ export default {
|
|
|
160
132
|
| `save:start` | - | Fired when the save process begins |
|
|
161
133
|
| `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
|
|
162
134
|
| `on-change` | void | It Fires once for managing leave modal etc. |
|
|
163
|
-
| `ready` | void | Fired when the editor is ready and template is loaded |
|
|
164
135
|
|
|
165
136
|
### Guido Exposed Methods
|
|
166
137
|
```typescript
|
|
167
138
|
dynamicContent.insert(DynamicContent);
|
|
168
139
|
dynamicContent.close();
|
|
169
|
-
saveSilent();
|
|
170
140
|
```
|
|
171
141
|
|
|
172
142
|
### Guido Interfaces
|
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
|
@@ -18,14 +18,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
18
18
|
close: () => void;
|
|
19
19
|
};
|
|
20
20
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
21
|
-
saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
|
|
22
21
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
23
22
|
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
24
23
|
back: () => void;
|
|
25
24
|
"save:start": () => void;
|
|
26
25
|
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
27
|
-
"on-change": (
|
|
28
|
-
ready: () => void;
|
|
26
|
+
"on-change": () => void;
|
|
29
27
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
30
28
|
export default _default;
|
|
31
29
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -3,14 +3,14 @@ import a from "./Guido.vue2.js";
|
|
|
3
3
|
import i 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
|
-
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), r(e.OnboardingWrapper), r(e.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
|
+
"b74952a6"
|
|
14
14
|
);
|
|
15
15
|
const v = d.exports;
|
|
16
16
|
export {
|
|
@@ -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 k, defineAsyncComponent as b, computed as E, watch as A, onMounted as W, 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 z, DefaultGuidoConfig as B } from "../enums/defaults.js";
|
|
6
|
+
import F from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import K from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import O from "./organisms/LoadingWrapper.vue.js";
|
|
9
|
+
import R from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
10
|
+
import { useStripoApi as j } from "../services/stripoApi.js";
|
|
11
|
+
import { useDynamicContentStore as q } 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 V from "../node_modules/lodash-es/merge.js";
|
|
15
|
+
const de = /* @__PURE__ */ k({
|
|
16
16
|
__name: "Guido",
|
|
17
17
|
props: {
|
|
18
18
|
templateId: null,
|
|
@@ -26,46 +26,40 @@ const ge = /* @__PURE__ */ N({
|
|
|
26
26
|
preselectedDynamicContentList: null,
|
|
27
27
|
guidoConfig: null
|
|
28
28
|
},
|
|
29
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
29
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
|
|
30
|
+
setup(T, { expose: G, emit: o }) {
|
|
31
|
+
const t = T, I = b(
|
|
32
32
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
),
|
|
33
|
+
), L = b(
|
|
34
34
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
35
|
-
),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
guidoConfig: f,
|
|
42
|
-
html: y = "",
|
|
43
|
-
css: v = "",
|
|
35
|
+
), n = q(), c = J(), P = Q(), r = E(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), {
|
|
36
|
+
templateId: l,
|
|
37
|
+
userId: p,
|
|
38
|
+
guidoConfig: u,
|
|
39
|
+
html: g = "",
|
|
40
|
+
css: f = "",
|
|
44
41
|
partnerName: i = m(),
|
|
45
|
-
productType: s =
|
|
46
|
-
messageType:
|
|
47
|
-
username:
|
|
48
|
-
} =
|
|
49
|
-
window.GuidoConfig =
|
|
42
|
+
productType: s = d(),
|
|
43
|
+
messageType: y = z,
|
|
44
|
+
username: C = M
|
|
45
|
+
} = t;
|
|
46
|
+
window.GuidoConfig = V(B, u), window.GuidoConfig.partner = {
|
|
50
47
|
partnerName: i,
|
|
51
48
|
productType: s,
|
|
52
|
-
messageType:
|
|
49
|
+
messageType: y
|
|
53
50
|
};
|
|
54
|
-
const { initPlugin:
|
|
55
|
-
emailId:
|
|
56
|
-
userId:
|
|
57
|
-
username:
|
|
51
|
+
const { initPlugin: v } = x({
|
|
52
|
+
emailId: l,
|
|
53
|
+
userId: p,
|
|
54
|
+
username: C,
|
|
58
55
|
partnerName: i,
|
|
59
56
|
productType: s,
|
|
60
|
-
preselectedDynamicContentList: a
|
|
61
|
-
|
|
62
|
-
console.debug("guido:ready"), o("ready");
|
|
63
|
-
}
|
|
64
|
-
}), { getDefaultTemplate: S } = V(), A = G(() => {
|
|
57
|
+
preselectedDynamicContentList: a
|
|
58
|
+
}), { getDefaultTemplate: w } = j(), _ = E(() => {
|
|
65
59
|
var e;
|
|
66
60
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
67
61
|
});
|
|
68
|
-
|
|
62
|
+
N({
|
|
69
63
|
onBack: () => {
|
|
70
64
|
console.debug("guido:back"), o("back");
|
|
71
65
|
},
|
|
@@ -76,46 +70,41 @@ const ge = /* @__PURE__ */ N({
|
|
|
76
70
|
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
77
71
|
}
|
|
78
72
|
});
|
|
79
|
-
const
|
|
80
|
-
console.debug("dynamic-content:close", e),
|
|
73
|
+
const h = (e) => {
|
|
74
|
+
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
81
75
|
}, D = () => {
|
|
82
76
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
83
77
|
};
|
|
84
|
-
return
|
|
85
|
-
o("on-change"
|
|
86
|
-
}),
|
|
78
|
+
return A(() => r.value, () => {
|
|
79
|
+
o("on-change");
|
|
80
|
+
}), W(async () => {
|
|
87
81
|
console.debug("Guido says happy coding đ"), console.debug("đ Ka-Chow");
|
|
88
82
|
try {
|
|
89
83
|
let e = {
|
|
90
|
-
html:
|
|
91
|
-
css:
|
|
84
|
+
html: g,
|
|
85
|
+
css: f,
|
|
92
86
|
forceRecreate: !0
|
|
93
87
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
94
88
|
};
|
|
95
|
-
e.html || (e = await
|
|
89
|
+
e.html || (e = await w()), await v(e), n.selectedDynamicContentList = a;
|
|
96
90
|
} catch (e) {
|
|
97
91
|
console.error("Failed to initialize Stripo editor:", e);
|
|
98
92
|
}
|
|
99
93
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
100
|
-
const
|
|
101
|
-
console.debug("dynamic-content:open",
|
|
94
|
+
const S = e;
|
|
95
|
+
console.debug("dynamic-content:open", S.detail), o("dynamic-content:open", S.detail);
|
|
102
96
|
});
|
|
103
|
-
}),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} catch {
|
|
107
|
-
console.debug("Failed to remove Stripo editor: No editor found");
|
|
108
|
-
}
|
|
109
|
-
}), I({
|
|
97
|
+
}), H(() => {
|
|
98
|
+
window.UIEditor.removeEditor();
|
|
99
|
+
}), G({
|
|
110
100
|
dynamicContent: {
|
|
111
|
-
insert:
|
|
101
|
+
insert: h,
|
|
112
102
|
close: D
|
|
113
103
|
},
|
|
114
|
-
hasChanges:
|
|
115
|
-
|
|
116
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef: c, dynamicContentStore: r, props: n, editorStore: d, previewStore: W, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: m, getProductType: l, isTestPartner: k, saveSilent: u, templateId: p, userId: g, guidoConfig: f, html: y, css: v, partnerName: i, productType: s, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: A, insertDynamicContent: b, closeDynamicContent: D, Toaster: j, HeaderWrapper: q, LoadingWrapper: J, SaveAsTemplateDrawer: Q };
|
|
104
|
+
hasChanges: r
|
|
105
|
+
}), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: L, dynamicContentStore: n, props: t, editorStore: c, previewStore: P, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: m, getProductType: d, templateId: l, userId: p, guidoConfig: u, html: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: o, initPlugin: v, getDefaultTemplate: w, noHeader: _, insertDynamicContent: h, closeDynamicContent: D, Toaster: F, HeaderWrapper: K, LoadingWrapper: O, SaveAsTemplateDrawer: R };
|
|
117
106
|
}
|
|
118
107
|
});
|
|
119
108
|
export {
|
|
120
|
-
|
|
109
|
+
de as default
|
|
121
110
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as r, computed as i } from "vue";
|
|
2
|
+
import { useTranslations as m } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as s } from "../../../../stores/onboarding.js";
|
|
4
|
+
import { usePreviewStore as p } from "../../../../stores/preview.js";
|
|
5
|
+
import { InButtonV2 as l, InSegments as d } from "@useinsider/design-system-vue";
|
|
6
|
+
const v = /* @__PURE__ */ r({
|
|
6
7
|
__name: "AmpToggle",
|
|
7
|
-
setup(
|
|
8
|
-
const t =
|
|
8
|
+
setup(u) {
|
|
9
|
+
const t = p(), e = s(), o = m(), a = i(() => [
|
|
9
10
|
{
|
|
10
|
-
text:
|
|
11
|
+
text: o("dynamic-creatives.html"),
|
|
11
12
|
value: "html"
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
|
-
text:
|
|
15
|
+
text: o("email-editor.amp-html"),
|
|
15
16
|
value: "AMP",
|
|
16
|
-
tooltipText: t.hasAMP ? "" :
|
|
17
|
+
tooltipText: t.hasAMP ? "" : o("email-editor.preview-amp-unavailable-tooltip"),
|
|
17
18
|
position: "bottom",
|
|
18
19
|
align: "center",
|
|
19
20
|
disable: !t.hasAMP
|
|
20
21
|
}
|
|
21
22
|
]);
|
|
22
|
-
return { __sfc: !0, previewStore: t,
|
|
23
|
-
t.setEmailFormat(
|
|
24
|
-
}, InSegments:
|
|
23
|
+
return { __sfc: !0, previewStore: t, onboardingStore: e, trans: o, segmentList: a, handleFormatChange: (n) => {
|
|
24
|
+
t.setEmailFormat(n), n === "AMP" && e.shouldShowOnboarding("ampOnboarding") && e.start("ampOnboarding");
|
|
25
|
+
}, InSegments: d, InButtonV2: l };
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
v as default
|
|
29
30
|
};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
2
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./HeaderWrapper.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot
|
|
4
|
+
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
5
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
|
|
6
6
|
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
|
-
|
|
7
|
+
t,
|
|
8
8
|
n,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const d = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
d as default
|
|
17
17
|
};
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InContainer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { InContainer as r } from "@useinsider/design-system-vue";
|
|
3
|
+
import t from "./LeftSlot.vue.js";
|
|
4
|
+
import e from "./MiddleSlot.vue.js";
|
|
5
|
+
import m from "./RightSlot.vue.js";
|
|
6
|
+
const s = /* @__PURE__ */ o({
|
|
7
7
|
__name: "HeaderWrapper",
|
|
8
|
-
setup(
|
|
9
|
-
|
|
10
|
-
return r({
|
|
11
|
-
handleSave: (t) => {
|
|
12
|
-
var o;
|
|
13
|
-
return (o = e.value) == null ? void 0 : o.handleSave(t);
|
|
14
|
-
}
|
|
15
|
-
}), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot: f, MiddleSlot: p, RightSlot: i };
|
|
8
|
+
setup(p) {
|
|
9
|
+
return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
|
|
16
10
|
}
|
|
17
11
|
});
|
|
18
12
|
export {
|
|
19
|
-
|
|
13
|
+
s as default
|
|
20
14
|
};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo").SavedTemplateDetails | undefined>;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
2
|
export default _default;
|
|
@@ -3,9 +3,7 @@ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
3
3
|
var l = 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.editorStore.isVersionHistoryButtonDisabled, "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.isExportButtonDisabled, "label-text-status": !1, "
|
|
7
|
-
return t.handleSave(!1);
|
|
8
|
-
} } })], 1);
|
|
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.editorStore.isVersionHistoryButtonDisabled, "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.isExportButtonDisabled, "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.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "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.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: t.handleSave } })], 1);
|
|
9
7
|
}, r = [], d = /* @__PURE__ */ a(
|
|
10
8
|
n,
|
|
11
9
|
l,
|
|
@@ -14,7 +12,7 @@ var l = function() {
|
|
|
14
12
|
null,
|
|
15
13
|
null
|
|
16
14
|
);
|
|
17
|
-
const
|
|
15
|
+
const c = d.exports;
|
|
18
16
|
export {
|
|
19
|
-
|
|
17
|
+
c as default
|
|
20
18
|
};
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useExport as
|
|
4
|
-
import {
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useVersionHistoryApi as
|
|
1
|
+
import { defineComponent as v, ref as S, computed as g } from "vue";
|
|
2
|
+
import { useConfig as y } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useExport as H } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as h, useSaveComplete as O } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useTranslations as _ } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as b } from "../../../composables/useVersionHistoryApi.js";
|
|
7
7
|
import { useEditorStore as T } from "../../../stores/editor.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
8
|
+
import { useOnboardingStore as V } from "../../../stores/onboarding.js";
|
|
9
|
+
import { useTemplatePreparation as w } from "../../../utils/templatePreparation.js";
|
|
10
|
+
import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
|
|
11
|
+
import { InButtonV2 as A } from "@useinsider/design-system-vue";
|
|
12
|
+
const J = /* @__PURE__ */ v({
|
|
11
13
|
__name: "RightSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const { config:
|
|
14
|
+
setup(C) {
|
|
15
|
+
const { config: m } = y(), { exportHtml: l } = H(), n = h(), i = O(), { openVersionHistory: a, closeVersionHistory: p } = b(), o = T(), t = V(), e = _(), r = S(!1), c = () => {
|
|
14
16
|
if (o.isVersionHistoryOpen) {
|
|
15
|
-
|
|
17
|
+
p(), t.isActive("versionHistoryOnboarding") && t.close("versionHistoryOnboarding");
|
|
16
18
|
return;
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
}, f =
|
|
20
|
-
e.value = !0, await r(), e.value = !1;
|
|
21
|
-
}, v = () => {
|
|
20
|
+
a(), t.shouldShowOnboarding("versionHistoryOnboarding") && t.start("versionHistoryOnboarding");
|
|
21
|
+
}, f = () => {
|
|
22
22
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
}, u = g(() => o.isVersionHistoryOpen ? e("newsletter.close-version-history") : e("newsletter.version-history"));
|
|
24
|
+
return { __sfc: !0, config: m, exportHtml: l, saveStart: n, saveComplete: i, openVersionHistory: a, closeVersionHistory: p, editorStore: o, onboardingStore: t, trans: e, isSaving: r, handleVersionHistory: c, handleSaveAs: f, versionHistoryTooltipText: u, handleSave: async () => {
|
|
25
|
+
r.value = !0, o.loadingStatus = !0, n();
|
|
26
|
+
try {
|
|
27
|
+
const { prepareTemplateDetails: s } = w(), d = await s();
|
|
28
|
+
i(d), r.value = !1, o.loadingStatus = !1;
|
|
29
|
+
} catch (s) {
|
|
30
|
+
console.error("Failed to get template data for save:", s);
|
|
31
|
+
}
|
|
32
|
+
}, getTooltipOptions: x, InButtonV2: A };
|
|
31
33
|
}
|
|
32
34
|
});
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
J as default
|
|
35
37
|
};
|
|
@@ -3,16 +3,16 @@ import i from "./ViewOptions.vue2.js";
|
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var n = function() {
|
|
5
5
|
var t = this, s = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.
|
|
6
|
+
return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.showNewTag ? s("div", { staticClass: "new-tag" }, [t._v(" " + t._s(e.trans("settings.new")) + " ")]) : t._e()], 1);
|
|
7
7
|
}, r = [], a = /* @__PURE__ */ o(
|
|
8
8
|
i,
|
|
9
9
|
n,
|
|
10
10
|
r,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"35d10bcf"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { useEditorStore as
|
|
4
|
-
import { getTooltipOptions as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as s, computed as p } from "vue";
|
|
2
|
+
import { useTranslations as r } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useEditorStore as m } from "../../../stores/editor.js";
|
|
4
|
+
import { getTooltipOptions as e } from "../../../utils/tooltipUtils.js";
|
|
5
|
+
import { InSegments as l } from "@useinsider/design-system-vue";
|
|
6
|
+
const g = /* @__PURE__ */ s({
|
|
7
7
|
__name: "ViewOptions",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
8
|
+
setup(a) {
|
|
9
|
+
const t = m(), o = r(), i = p(() => !t.isViewOptionsDisabled), n = [
|
|
10
10
|
{
|
|
11
11
|
text: "",
|
|
12
12
|
icon: "line-desktop",
|
|
13
13
|
value: "desktop",
|
|
14
14
|
position: "bottom",
|
|
15
15
|
align: "center",
|
|
16
|
-
tooltipText:
|
|
17
|
-
tooltipOptions:
|
|
16
|
+
tooltipText: o("newsletter.desktop"),
|
|
17
|
+
tooltipOptions: e("guido__view-option-desktop")
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
text: "",
|
|
@@ -22,13 +22,13 @@ const f = /* @__PURE__ */ n({
|
|
|
22
22
|
value: "mobile",
|
|
23
23
|
position: "bottom",
|
|
24
24
|
align: "center",
|
|
25
|
-
tooltipText:
|
|
26
|
-
tooltipOptions:
|
|
25
|
+
tooltipText: o("newsletter.mobile"),
|
|
26
|
+
tooltipOptions: e("guido__view-option-mobile")
|
|
27
27
|
}
|
|
28
28
|
];
|
|
29
|
-
return { __sfc: !0, editorStore:
|
|
29
|
+
return { __sfc: !0, editorStore: t, trans: o, showNewTag: i, segmentList: n, InSegments: l };
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
g as default
|
|
34
34
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
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
|
};
|