@useinsider/guido 1.0.2-beta.08270cc → 1.0.2-beta.0c6406b
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 -43
- package/dist/@types/events.d.ts +0 -6
- package/dist/@types/generic.d.ts +0 -5
- package/dist/components/Guido.vue.d.ts +0 -3
- package/dist/components/Guido.vue.js +11 -11
- package/dist/components/Guido.vue2.js +61 -80
- 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/email-preview/amp/AmpToggle.vue.js +2 -3
- 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/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.d.ts +1 -3
- package/dist/components/organisms/header/RightSlot.vue.js +4 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +28 -26
- package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/ViewOptions.vue2.js +15 -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/composables/useCustomInterfaceAppearance.js +19 -25
- package/dist/composables/useHtmlCompiler.js +9 -17
- package/dist/composables/usePartner.d.ts +0 -1
- package/dist/composables/usePartner.js +9 -16
- package/dist/composables/usePreviewMode.js +13 -13
- package/dist/composables/useStripo.js +51 -54
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
- package/dist/enums/defaults.d.ts +1 -6
- package/dist/enums/defaults.js +10 -47
- package/dist/guido.css +1 -1
- package/dist/static/styles/components/alert-message.css.js +2 -32
- package/dist/static/styles/components/button.css.js +2 -32
- package/dist/static/styles/components/wide-panel.css.js +2 -15
- package/dist/static/styles/variables.css.js +0 -10
- package/dist/stores/dynamic-content.d.ts +0 -12
- package/dist/stores/dynamic-content.js +6 -7
- package/dist/stores/editor.d.ts +1 -194
- package/dist/stores/editor.js +2 -18
- package/dist/stores/preview.d.ts +8 -0
- package/dist/stores/preview.js +20 -12
- package/dist/utils/genericUtil.js +6 -9
- package/dist/utils/templatePreparation.js +14 -21
- package/package.json +2 -4
- package/dist/components/organisms/LoadingWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/LoadingWrapper.vue.js +0 -18
- package/dist/components/organisms/LoadingWrapper.vue2.js +0 -12
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -74
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
- package/dist/composables/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/composables/useStripoEventHandler.d.ts +0 -3
- package/dist/composables/useStripoEventHandler.js +0 -20
- 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/onboarding.d.ts +0 -1
- package/dist/enums/onboarding.js +0 -8
- 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/user-modal-state.d.ts +0 -2
- package/dist/mock/api/validator.d.ts +0 -2
- package/dist/services/onboardingApi.d.ts +0 -4
- package/dist/services/onboardingApi.js +0 -23
- package/dist/static/assets/onboarding-img.svg.js +0 -4
- package/dist/static/styles/components/loader.css.js +0 -10
- package/dist/static/styles/components/notification.css.js +0 -55
- package/dist/static/styles/components/popup.css.js +0 -68
- package/dist/static/styles/customEditorStyle.css.js +0 -24
- package/dist/stores/onboarding.d.ts +0 -1068
- package/dist/stores/onboarding.js +0 -95
- 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
|
};
|
|
@@ -159,14 +131,11 @@ export default {
|
|
|
159
131
|
| `back` | - | Fired when user clicks the back button |
|
|
160
132
|
| `save:start` | - | Fired when the save process begins |
|
|
161
133
|
| `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
|
|
162
|
-
| `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
134
|
|
|
165
135
|
### Guido Exposed Methods
|
|
166
136
|
```typescript
|
|
167
137
|
dynamicContent.insert(DynamicContent);
|
|
168
138
|
dynamicContent.close();
|
|
169
|
-
saveSilent();
|
|
170
139
|
```
|
|
171
140
|
|
|
172
141
|
### Guido Interfaces
|
|
@@ -176,16 +145,6 @@ interface GuidoConfig {
|
|
|
176
145
|
translationsPath: string;
|
|
177
146
|
htmlCompilerRules?: CompilerRule[];
|
|
178
147
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
179
|
-
useHeader: boolean
|
|
180
|
-
emailHeader: {
|
|
181
|
-
senderName: string;
|
|
182
|
-
subject: string;
|
|
183
|
-
};
|
|
184
|
-
partner: {
|
|
185
|
-
partnerName: string;
|
|
186
|
-
productType: number;
|
|
187
|
-
messageType: number;
|
|
188
|
-
};
|
|
189
148
|
features: {
|
|
190
149
|
dynamicContent: boolean;
|
|
191
150
|
saveAsTemplate: boolean;
|
|
@@ -199,7 +158,6 @@ interface GuidoConfig {
|
|
|
199
158
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
200
159
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
201
160
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
202
|
-
| `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
|
|
203
161
|
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
204
162
|
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
205
163
|
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
package/dist/@types/events.d.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
1
|
export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
|
|
2
|
-
export interface EventHandler {
|
|
3
|
-
(params: Record<string, string>): void | Promise<void>;
|
|
4
|
-
}
|
|
5
|
-
export interface EventHandlers {
|
|
6
|
-
[eventType: string]: EventHandler;
|
|
7
|
-
}
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export type GuidoConfig = {
|
|
|
13
13
|
translationsPath: string;
|
|
14
14
|
htmlCompilerRules?: CompilerRule[];
|
|
15
15
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
|
-
useHeader?: boolean;
|
|
17
16
|
emailHeader: EmailHeader;
|
|
18
17
|
partner?: Partner;
|
|
19
18
|
features?: Features;
|
|
@@ -22,10 +21,6 @@ export type DynamicContent = {
|
|
|
22
21
|
value: string;
|
|
23
22
|
text: string;
|
|
24
23
|
fallback?: string;
|
|
25
|
-
format?: {
|
|
26
|
-
key: string;
|
|
27
|
-
value: string;
|
|
28
|
-
};
|
|
29
24
|
};
|
|
30
25
|
export interface EmailHeader {
|
|
31
26
|
senderName: string;
|
|
@@ -18,14 +18,11 @@ 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": (hasChanges: boolean) => void;
|
|
28
|
-
ready: () => void;
|
|
29
26
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
30
27
|
export default _default;
|
|
31
28
|
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
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
t,
|
|
3
|
+
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
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), e(r.SaveAsTemplateDrawer)], 1);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ t(
|
|
8
|
+
o,
|
|
10
9
|
s,
|
|
10
|
+
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"84c43576"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = n.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
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
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
const ge = /* @__PURE__ */ N({
|
|
1
|
+
import { defineComponent as I, defineAsyncComponent as P, computed as _, onMounted as L, onUnmounted as k } from "vue";
|
|
2
|
+
import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as N } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as U } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
|
|
6
|
+
import z from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import B from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import F from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
9
|
+
import { useStripoApi as H } from "../services/stripoApi.js";
|
|
10
|
+
import { useDynamicContentStore as K } from "../stores/dynamic-content.js";
|
|
11
|
+
import { useEditorStore as R } from "../stores/editor.js";
|
|
12
|
+
import { usePreviewStore as j } from "../stores/preview.js";
|
|
13
|
+
import q from "../node_modules/lodash-es/merge.js";
|
|
14
|
+
const se = /* @__PURE__ */ I({
|
|
16
15
|
__name: "Guido",
|
|
17
16
|
props: {
|
|
18
17
|
templateId: null,
|
|
@@ -26,96 +25,78 @@ const ge = /* @__PURE__ */ N({
|
|
|
26
25
|
preselectedDynamicContentList: null,
|
|
27
26
|
guidoConfig: null
|
|
28
27
|
},
|
|
29
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete"
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
28
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
29
|
+
setup(b, { expose: E, emit: t }) {
|
|
30
|
+
const o = b, T = P(
|
|
32
31
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
), _ =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = n;
|
|
49
|
-
window.GuidoConfig = $(O, f), window.GuidoConfig.partner = {
|
|
50
|
-
partnerName: i,
|
|
51
|
-
productType: s,
|
|
52
|
-
messageType: C
|
|
32
|
+
), n = K(), c = R(), a = _(() => c.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), G = j(), {
|
|
33
|
+
templateId: l,
|
|
34
|
+
userId: u,
|
|
35
|
+
guidoConfig: p,
|
|
36
|
+
html: f = "",
|
|
37
|
+
css: g = "",
|
|
38
|
+
partnerName: s = m(),
|
|
39
|
+
productType: i = d(),
|
|
40
|
+
messageType: y = M,
|
|
41
|
+
username: C = x
|
|
42
|
+
} = o;
|
|
43
|
+
window.GuidoConfig = q(W, p), window.GuidoConfig.partner = {
|
|
44
|
+
partnerName: s,
|
|
45
|
+
productType: i,
|
|
46
|
+
messageType: y
|
|
53
47
|
};
|
|
54
|
-
const { initPlugin:
|
|
55
|
-
emailId:
|
|
56
|
-
userId:
|
|
57
|
-
username:
|
|
58
|
-
partnerName:
|
|
59
|
-
productType:
|
|
60
|
-
preselectedDynamicContentList:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
}), { getDefaultTemplate: S } = V(), A = G(() => {
|
|
65
|
-
var e;
|
|
66
|
-
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
67
|
-
});
|
|
68
|
-
F({
|
|
48
|
+
const { initPlugin: v } = U({
|
|
49
|
+
emailId: l,
|
|
50
|
+
userId: u,
|
|
51
|
+
username: C,
|
|
52
|
+
partnerName: s,
|
|
53
|
+
productType: i,
|
|
54
|
+
preselectedDynamicContentList: r
|
|
55
|
+
}), { getDefaultTemplate: w } = H();
|
|
56
|
+
A({
|
|
69
57
|
onBack: () => {
|
|
70
|
-
console.debug("guido:back"),
|
|
58
|
+
console.debug("guido:back"), t("back");
|
|
71
59
|
},
|
|
72
60
|
onSaveStart: () => {
|
|
73
|
-
console.debug("guido:save:start"),
|
|
61
|
+
console.debug("guido:save:start"), t("save:start");
|
|
74
62
|
},
|
|
75
63
|
onSaveComplete: (e) => {
|
|
76
|
-
console.debug("guido:save:complete", e),
|
|
64
|
+
console.debug("guido:save:complete", e), t("save:complete", e);
|
|
77
65
|
}
|
|
78
66
|
});
|
|
79
|
-
const
|
|
80
|
-
console.debug("dynamic-content:close", e),
|
|
81
|
-
},
|
|
67
|
+
const D = (e) => {
|
|
68
|
+
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
69
|
+
}, S = () => {
|
|
82
70
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
83
71
|
};
|
|
84
|
-
return
|
|
85
|
-
o("on-change", t.value);
|
|
86
|
-
}), U(async () => {
|
|
72
|
+
return L(async () => {
|
|
87
73
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
88
74
|
try {
|
|
89
75
|
let e = {
|
|
90
|
-
html:
|
|
91
|
-
css:
|
|
76
|
+
html: f,
|
|
77
|
+
css: g,
|
|
92
78
|
forceRecreate: !0
|
|
93
79
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
94
80
|
};
|
|
95
|
-
e.html || (e = await
|
|
81
|
+
e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
|
|
96
82
|
} catch (e) {
|
|
97
83
|
console.error("Failed to initialize Stripo editor:", e);
|
|
98
84
|
}
|
|
99
85
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
100
|
-
const
|
|
101
|
-
console.debug("dynamic-content:open",
|
|
86
|
+
const h = e;
|
|
87
|
+
console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
|
|
102
88
|
});
|
|
103
|
-
}),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} catch {
|
|
107
|
-
console.debug("Failed to remove Stripo editor: No editor found");
|
|
108
|
-
}
|
|
109
|
-
}), I({
|
|
89
|
+
}), k(() => {
|
|
90
|
+
window.UIEditor.removeEditor();
|
|
91
|
+
}), E({
|
|
110
92
|
dynamicContent: {
|
|
111
|
-
insert:
|
|
112
|
-
close:
|
|
93
|
+
insert: D,
|
|
94
|
+
close: S
|
|
113
95
|
},
|
|
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 };
|
|
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 };
|
|
117
98
|
}
|
|
118
99
|
});
|
|
119
100
|
export {
|
|
120
|
-
|
|
101
|
+
se as default
|
|
121
102
|
};
|
|
@@ -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,9 +1,8 @@
|
|
|
1
1
|
import o from "./AmpToggle.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
2
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
3
|
var s = function() {
|
|
5
4
|
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
6
|
-
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(
|
|
5
|
+
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(c) {
|
|
7
6
|
return e.previewStore.openErrorModal();
|
|
8
7
|
} } }) : r._e()], 1)]);
|
|
9
8
|
}, a = [], i = /* @__PURE__ */ n(
|
|
@@ -12,7 +11,7 @@ var s = function() {
|
|
|
12
11
|
a,
|
|
13
12
|
!1,
|
|
14
13
|
null,
|
|
15
|
-
|
|
14
|
+
null
|
|
16
15
|
);
|
|
17
16
|
const d = i.exports;
|
|
18
17
|
export {
|
|
@@ -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,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,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,10 +3,8 @@ 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.
|
|
7
|
-
|
|
8
|
-
} } })], 1);
|
|
9
|
-
}, r = [], d = /* @__PURE__ */ a(
|
|
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") }, 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.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
|
+
}, r = [], p = /* @__PURE__ */ a(
|
|
10
8
|
n,
|
|
11
9
|
l,
|
|
12
10
|
r,
|
|
@@ -14,7 +12,7 @@ var l = function() {
|
|
|
14
12
|
null,
|
|
15
13
|
null
|
|
16
14
|
);
|
|
17
|
-
const
|
|
15
|
+
const c = p.exports;
|
|
18
16
|
export {
|
|
19
|
-
|
|
17
|
+
c as default
|
|
20
18
|
};
|