@useinsider/guido 1.0.0-beta.de03990 → 1.0.0-beta.e08abf8
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 +2 -26
- package/dist/@types/generic.d.ts +0 -27
- package/dist/components/Guido.vue.d.ts +1 -5
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +36 -53
- package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
- package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -16
- package/dist/components/organisms/header/RightSlot.vue.js +9 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +22 -26
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +10 -30
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
- package/dist/composables/useActionsApi.d.ts +0 -2
- package/dist/composables/useActionsApi.js +36 -62
- package/dist/composables/useExport.js +6 -6
- package/dist/composables/useHtmlCompiler.js +8 -9
- package/dist/composables/useStripo.js +17 -23
- package/dist/composables/useToaster.d.ts +16 -1
- package/dist/composables/useToaster.js +30 -23
- package/dist/composables/useTranslations.js +2 -3
- package/dist/composables/useVersionHistoryApi.js +4 -4
- package/dist/enums/defaults.js +5 -14
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
- package/dist/guido.css +1 -1
- package/dist/stores/editor.d.ts +0 -1
- package/dist/stores/editor.js +2 -3
- package/package.json +1 -1
- package/dist/components/organisms/base/Toaster.vue.d.ts +0 -2
- package/dist/components/organisms/base/Toaster.vue.js +0 -17
- package/dist/components/organisms/base/Toaster.vue2.js +0 -15
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
- package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
- package/dist/components/wrappers/WpModal.vue.js +0 -27
- package/dist/components/wrappers/WpModal.vue2.js +0 -22
- package/dist/composables/useCodeEditorApi.d.ts +0 -4
- package/dist/composables/useCodeEditorApi.js +0 -11
- package/dist/composables/useConfig.d.ts +0 -4
- package/dist/composables/useConfig.js +0 -7
- package/dist/composables/useDebounce.d.ts +0 -4
- package/dist/composables/useDebounce.js +0 -12
- package/dist/composables/usePreviewMode.d.ts +0 -5
- package/dist/composables/usePreviewMode.js +0 -31
- package/dist/composables/useResponsivePreview.d.ts +0 -5
- package/dist/composables/useResponsivePreview.js +0 -86
- package/dist/enums/preview.d.ts +0 -13
- package/dist/enums/preview.js +0 -23
- package/dist/node_modules/lodash-es/_Stack.js +0 -18
- package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/lodash-es/_apply.js +0 -16
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
- package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
- package/dist/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
- package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
- package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
- package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/lodash-es/_copyArray.js +0 -9
- package/dist/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
- package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
- package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
- package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
- package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_overRest.js +0 -15
- package/dist/node_modules/lodash-es/_safeGet.js +0 -7
- package/dist/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/lodash-es/_shortOut.js +0 -16
- package/dist/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/lodash-es/_stackSet.js +0 -17
- package/dist/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
- package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
- package/dist/stores/dynamic-content.d.ts +0 -27
- package/dist/stores/dynamic-content.js +0 -23
- package/dist/stores/preview.d.ts +0 -46
- package/dist/stores/preview.js +0 -53
- package/dist/stores/toaster.d.ts +0 -25
- package/dist/stores/toaster.js +0 -28
- package/dist/utils/arrayUtil.d.ts +0 -1
- package/dist/utils/arrayUtil.js +0 -10
- package/dist/utils/genericUtil.d.ts +0 -2
- package/dist/utils/genericUtil.js +0 -7
- package/dist/utils/tooltipUtils.d.ts +0 -2
- package/dist/utils/tooltipUtils.js +0 -11
package/README.md
CHANGED
|
@@ -57,11 +57,6 @@ export default {
|
|
|
57
57
|
translationsPath: 'window.trans.en',
|
|
58
58
|
htmlCompilerRules: [],
|
|
59
59
|
ignoreDefaultHtmlCompilerRules: false,
|
|
60
|
-
features: {
|
|
61
|
-
dynamicContent: true,
|
|
62
|
-
saveAsTemplate: true,
|
|
63
|
-
versionHistory: true
|
|
64
|
-
}
|
|
65
60
|
},
|
|
66
61
|
dynamicContentModalVisible: false
|
|
67
62
|
};
|
|
@@ -143,13 +138,8 @@ dynamicContent.close();
|
|
|
143
138
|
```typescript
|
|
144
139
|
interface GuidoConfig {
|
|
145
140
|
translationsPath: string;
|
|
146
|
-
htmlCompilerRules
|
|
147
|
-
ignoreDefaultHtmlCompilerRules
|
|
148
|
-
features: {
|
|
149
|
-
dynamicContent: boolean;
|
|
150
|
-
saveAsTemplate: boolean;
|
|
151
|
-
versionHistory: boolean;
|
|
152
|
-
};
|
|
141
|
+
htmlCompilerRules: CompilerRule[];
|
|
142
|
+
ignoreDefaultHtmlCompilerRules: boolean;
|
|
153
143
|
}
|
|
154
144
|
```
|
|
155
145
|
|
|
@@ -158,10 +148,6 @@ interface GuidoConfig {
|
|
|
158
148
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
159
149
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
160
150
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
161
|
-
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
162
|
-
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
163
|
-
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
|
164
|
-
| `features.versionHistory` | `boolean` | `true` | Enable version history feature |
|
|
165
151
|
|
|
166
152
|
```typescript
|
|
167
153
|
interface DynamicContent {
|
|
@@ -269,11 +255,6 @@ Define complex transformation logic with a custom processor function.
|
|
|
269
255
|
```typescript
|
|
270
256
|
const guidoConfig = {
|
|
271
257
|
translationsPath: 'window.trans.en',
|
|
272
|
-
features: {
|
|
273
|
-
dynamicContent: true,
|
|
274
|
-
saveAsTemplate: true,
|
|
275
|
-
versionHistory: false // Disable version history
|
|
276
|
-
},
|
|
277
258
|
htmlCompilerRules: [
|
|
278
259
|
{
|
|
279
260
|
id: 'replace-domain',
|
|
@@ -302,11 +283,6 @@ const guidoConfig = {
|
|
|
302
283
|
```typescript
|
|
303
284
|
const guidoConfig = {
|
|
304
285
|
translationsPath: 'window.trans.en',
|
|
305
|
-
features: {
|
|
306
|
-
dynamicContent: true,
|
|
307
|
-
saveAsTemplate: true,
|
|
308
|
-
versionHistory: true
|
|
309
|
-
},
|
|
310
286
|
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
311
287
|
htmlCompilerRules: [
|
|
312
288
|
// Only your custom rules will be applied
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
import type { CompilerRule } from './html-compiler';
|
|
2
|
-
type Features = {
|
|
3
|
-
dynamicContent?: boolean;
|
|
4
|
-
saveAsTemplate?: boolean;
|
|
5
|
-
versionHistory?: boolean;
|
|
6
|
-
};
|
|
7
2
|
export type GuidoConfig = {
|
|
8
3
|
translationsPath: string;
|
|
9
4
|
htmlCompilerRules?: CompilerRule[];
|
|
10
5
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
11
|
-
emailHeader: EmailHeader;
|
|
12
|
-
features?: Features;
|
|
13
6
|
};
|
|
14
7
|
export type DynamicContent = {
|
|
15
8
|
value: string;
|
|
16
9
|
text: string;
|
|
17
10
|
fallback?: string;
|
|
18
11
|
};
|
|
19
|
-
export interface EmailHeader {
|
|
20
|
-
senderName: string;
|
|
21
|
-
subject: string;
|
|
22
|
-
}
|
|
23
|
-
export interface TooltipOptions {
|
|
24
|
-
id: string;
|
|
25
|
-
dynamicPosition: boolean;
|
|
26
|
-
staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
|
|
27
|
-
iconStatus: boolean;
|
|
28
|
-
offset?: {
|
|
29
|
-
x: number;
|
|
30
|
-
y: number;
|
|
31
|
-
};
|
|
32
|
-
preventXss?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export type MergeTag = {
|
|
35
|
-
label: string;
|
|
36
|
-
value: string;
|
|
37
|
-
};
|
|
38
|
-
export {};
|
|
@@ -8,7 +8,6 @@ type __VLS_Props = {
|
|
|
8
8
|
username?: string;
|
|
9
9
|
html?: string;
|
|
10
10
|
css?: string;
|
|
11
|
-
preselectedDynamicContentList: DynamicContent[];
|
|
12
11
|
guidoConfig: GuidoConfig;
|
|
13
12
|
};
|
|
14
13
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
@@ -20,10 +19,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
20
19
|
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
21
20
|
back: () => void;
|
|
22
21
|
"save:start": () => void;
|
|
23
|
-
"save:complete": (
|
|
24
|
-
template: Omit<Template, "forceRecreate">;
|
|
25
|
-
dynamicContentList: DynamicContent[];
|
|
26
|
-
}) => void;
|
|
22
|
+
"save:complete": (template: Omit<Template, "forceRecreate">) => void;
|
|
27
23
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
28
24
|
export default _default;
|
|
29
25
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
5
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.HeaderWrapper), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
|
|
7
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
_,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"89bedf08"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,15 +1,11 @@
|
|
|
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
|
-
|
|
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({
|
|
1
|
+
import { defineComponent as h, onMounted as w } from "vue";
|
|
2
|
+
import { provideGuidoActions as D } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as E } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as S } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as _, DefaultGuidoConfig as G } from "../enums/defaults.js";
|
|
6
|
+
import I from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
import { useStripoApi as k } from "../services/stripoApi.js";
|
|
8
|
+
const B = /* @__PURE__ */ h({
|
|
13
9
|
__name: "Guido",
|
|
14
10
|
props: {
|
|
15
11
|
templateId: null,
|
|
@@ -19,33 +15,26 @@ const V = /* @__PURE__ */ L({
|
|
|
19
15
|
username: null,
|
|
20
16
|
html: null,
|
|
21
17
|
css: null,
|
|
22
|
-
preselectedDynamicContentList: null,
|
|
23
18
|
guidoConfig: null
|
|
24
19
|
},
|
|
25
20
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
26
|
-
setup(
|
|
27
|
-
const o =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
guidoConfig: m,
|
|
33
|
-
html: d = "",
|
|
21
|
+
setup(C, { expose: b, emit: t }) {
|
|
22
|
+
const o = C, { getPartnerName: n, getProductType: a } = E(), {
|
|
23
|
+
templateId: c,
|
|
24
|
+
userId: s,
|
|
25
|
+
guidoConfig: i,
|
|
26
|
+
html: r = "",
|
|
34
27
|
css: l = "",
|
|
35
|
-
partnerName:
|
|
36
|
-
productType:
|
|
37
|
-
username:
|
|
28
|
+
partnerName: d = n(),
|
|
29
|
+
productType: u = a(),
|
|
30
|
+
username: m = _
|
|
38
31
|
} = o;
|
|
39
|
-
window.GuidoConfig =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
productType: p,
|
|
46
|
-
preselectedDynamicContentList: c
|
|
47
|
-
}), { getDefaultTemplate: g } = x();
|
|
48
|
-
_({
|
|
32
|
+
window.GuidoConfig = {
|
|
33
|
+
...G,
|
|
34
|
+
...i
|
|
35
|
+
};
|
|
36
|
+
const { initPlugin: p } = S({ emailId: c, userId: s, username: m, partnerName: d, productType: u }), { getDefaultTemplate: g } = k();
|
|
37
|
+
D({
|
|
49
38
|
onBack: () => {
|
|
50
39
|
console.debug("guido:back"), t("back");
|
|
51
40
|
},
|
|
@@ -53,45 +42,39 @@ const V = /* @__PURE__ */ L({
|
|
|
53
42
|
console.debug("guido:save:start"), t("save:start");
|
|
54
43
|
},
|
|
55
44
|
onSaveComplete: (e) => {
|
|
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
|
-
});
|
|
45
|
+
console.debug("guido:save:complete", e), t("save:complete", e);
|
|
63
46
|
}
|
|
64
47
|
});
|
|
65
|
-
const
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
67
|
-
},
|
|
48
|
+
const f = (e) => {
|
|
49
|
+
console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
50
|
+
}, y = () => {
|
|
68
51
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
69
52
|
};
|
|
70
|
-
return
|
|
53
|
+
return w(async () => {
|
|
71
54
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
72
55
|
try {
|
|
73
56
|
let e = {
|
|
74
|
-
html:
|
|
57
|
+
html: r,
|
|
75
58
|
css: l,
|
|
76
59
|
forceRecreate: !0
|
|
77
60
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
78
61
|
};
|
|
79
|
-
e.html || (e = await g()), await
|
|
62
|
+
e.html || (e = await g()), await p(e);
|
|
80
63
|
} catch (e) {
|
|
81
64
|
console.error("Failed to initialize Stripo editor:", e);
|
|
82
65
|
}
|
|
83
66
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
84
|
-
const
|
|
85
|
-
console.debug("dynamic-content:open",
|
|
67
|
+
const v = e;
|
|
68
|
+
console.debug("dynamic-content:open", v.detail), t("dynamic-content:open", v.detail);
|
|
86
69
|
});
|
|
87
70
|
}), b({
|
|
88
71
|
dynamicContent: {
|
|
89
|
-
insert:
|
|
90
|
-
close:
|
|
72
|
+
insert: f,
|
|
73
|
+
close: y
|
|
91
74
|
}
|
|
92
|
-
}), { __sfc: !0,
|
|
75
|
+
}), { __sfc: !0, props: o, getPartnerName: n, getProductType: a, templateId: c, userId: s, guidoConfig: i, html: r, css: l, partnerName: d, productType: u, username: m, emit: t, initPlugin: p, getDefaultTemplate: g, insertDynamicContent: f, closeDynamicContent: y, HeaderWrapper: I };
|
|
93
76
|
}
|
|
94
77
|
});
|
|
95
78
|
export {
|
|
96
|
-
|
|
79
|
+
B as default
|
|
97
80
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import s from "./MiddleSlot.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
7
|
-
|
|
4
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
|
|
6
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
7
|
+
s,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const p = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
p as default
|
|
17
17
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
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({
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
|
+
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
+
import p from "./version-history/ViewOptions.vue.js";
|
|
7
|
+
import f from "./ViewOptions.vue.js";
|
|
8
|
+
const y = /* @__PURE__ */ r({
|
|
13
9
|
__name: "MiddleSlot",
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
return { __sfc: !0, editorStore:
|
|
10
|
+
setup(a) {
|
|
11
|
+
const o = n(), t = s();
|
|
12
|
+
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
13
|
+
id: `${i}-tooltip`,
|
|
14
|
+
dynamicPosition: !1,
|
|
15
|
+
staticPosition: "bottom center",
|
|
16
|
+
iconStatus: !1
|
|
17
|
+
}), InButtonV2: e, VersionHistory: m, VersionHistoryViewOptions: p, ViewOptions: f };
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
y as default
|
|
21
22
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var s,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import o from "./RightSlot.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), 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 }, on: { click: t.exportHtml } }), 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 } }), 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 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleSave } })], 1);
|
|
6
|
+
}, r = [], a = /* @__PURE__ */ i(
|
|
7
|
+
o,
|
|
8
8
|
n,
|
|
9
|
-
|
|
10
|
-
l,
|
|
9
|
+
r,
|
|
11
10
|
!1,
|
|
12
11
|
null,
|
|
13
12
|
null
|
|
14
13
|
);
|
|
15
|
-
const c =
|
|
14
|
+
const c = a.exports;
|
|
16
15
|
export {
|
|
17
16
|
c as default
|
|
18
17
|
};
|
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { usePreviewStore as O } from "../../../stores/preview.js";
|
|
10
|
-
import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
|
|
11
|
-
import { InButtonV2 as T } from "@useinsider/design-system-vue";
|
|
12
|
-
const q = /* @__PURE__ */ y({
|
|
1
|
+
import { defineComponent as m } from "vue";
|
|
2
|
+
import { useActionsApi as p } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useExport as c } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as l, useSaveComplete as f } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
|
|
6
|
+
import { useEditorStore as d } from "../../../stores/editor.js";
|
|
7
|
+
import { InButtonV2 as S } from "@useinsider/design-system-vue";
|
|
8
|
+
const E = /* @__PURE__ */ m({
|
|
13
9
|
__name: "RightSlot",
|
|
14
|
-
setup(
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
setup(h) {
|
|
11
|
+
const { exportHtml: a } = c(), { getCompiledEmail: t } = p(), e = l(), r = f(), { openVersionHistory: s, closeVersionHistory: n } = u(), i = d();
|
|
12
|
+
return { __sfc: !0, exportHtml: a, getCompiledEmail: t, saveStart: e, saveComplete: r, openVersionHistory: s, closeVersionHistory: n, editorStore: i, handleVersionHistory: () => {
|
|
13
|
+
if (i.isVersionHistoryOpen) {
|
|
14
|
+
n();
|
|
18
15
|
return;
|
|
19
16
|
}
|
|
20
|
-
n();
|
|
21
|
-
}, u = a(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), v = async () => {
|
|
22
17
|
s();
|
|
18
|
+
}, handleSave: async () => {
|
|
19
|
+
e();
|
|
23
20
|
try {
|
|
24
|
-
const { html:
|
|
25
|
-
|
|
26
|
-
html:
|
|
21
|
+
const { html: o } = await t();
|
|
22
|
+
r({
|
|
23
|
+
html: o || "",
|
|
27
24
|
css: ""
|
|
28
25
|
// CSS is embedded in HTML from Stripo
|
|
29
26
|
});
|
|
30
|
-
} catch (
|
|
31
|
-
console.error("Failed to get template data for save:",
|
|
27
|
+
} catch (o) {
|
|
28
|
+
console.error("Failed to get template data for save:", o);
|
|
32
29
|
}
|
|
33
|
-
},
|
|
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 };
|
|
30
|
+
}, InButtonV2: S };
|
|
35
31
|
}
|
|
36
32
|
});
|
|
37
33
|
export {
|
|
38
|
-
|
|
34
|
+
E as default
|
|
39
35
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import r from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
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": "",
|
|
7
|
-
},
|
|
6
|
+
return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
|
|
7
|
+
}, i = [], _ = /* @__PURE__ */ s(
|
|
8
8
|
r,
|
|
9
|
-
s,
|
|
10
9
|
n,
|
|
10
|
+
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"0fff376c"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const l = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
l as default
|
|
18
18
|
};
|
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { getTooltipOptions as t } from "../../../utils/tooltipUtils.js";
|
|
6
|
-
import { InSegments as l } from "@useinsider/design-system-vue";
|
|
7
|
-
const w = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
import { useEditorStore as t } from "../../../stores/editor.js";
|
|
3
|
+
import { InSegments as o } from "@useinsider/design-system-vue";
|
|
4
|
+
const u = /* @__PURE__ */ e({
|
|
8
5
|
__name: "ViewOptions",
|
|
9
|
-
setup(
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value: "desktop",
|
|
15
|
-
position: "bottom",
|
|
16
|
-
align: "center",
|
|
17
|
-
tooltipText: o("newsletter.desktop"),
|
|
18
|
-
tooltipOptions: t("guido__view-option-desktop")
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: "",
|
|
22
|
-
icon: "line-menu-mobileapp",
|
|
23
|
-
value: "mobile",
|
|
24
|
-
position: "bottom",
|
|
25
|
-
align: "center",
|
|
26
|
-
tooltipText: o("newsletter.mobile"),
|
|
27
|
-
tooltipOptions: t("guido__view-option-mobile")
|
|
28
|
-
}
|
|
29
|
-
], n = m();
|
|
30
|
-
return { __sfc: !0, editorStore: e, trans: o, segmentList: i, previewStore: n, InSegments: l };
|
|
6
|
+
setup(n) {
|
|
7
|
+
return { __sfc: !0, editorStore: t(), segmentList: [
|
|
8
|
+
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
9
|
+
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
10
|
+
], InSegments: o };
|
|
31
11
|
}
|
|
32
12
|
});
|
|
33
13
|
export {
|
|
34
|
-
|
|
14
|
+
u as default
|
|
35
15
|
};
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { InSegments as c } from "@useinsider/design-system-vue";
|
|
7
|
-
const h = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as s } from "vue";
|
|
2
|
+
import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
+
import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
|
|
4
|
+
import { InSegments as m } from "@useinsider/design-system-vue";
|
|
5
|
+
const d = /* @__PURE__ */ s({
|
|
8
6
|
__name: "ViewOptions",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
tooltipText: o("newsletter.desktop"),
|
|
18
|
-
tooltipOptions: n("guido__version-history-view-option-desktop")
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: "",
|
|
22
|
-
icon: "line-menu-mobileapp",
|
|
23
|
-
value: "mobile",
|
|
24
|
-
position: "bottom",
|
|
25
|
-
align: "center",
|
|
26
|
-
tooltipText: o("newsletter.mobile"),
|
|
27
|
-
tooltipOptions: n("guido__version-history-view-option-mobile")
|
|
28
|
-
}
|
|
29
|
-
];
|
|
30
|
-
return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
|
|
31
|
-
if (t.editorVisualMode = s, s === "mobile") {
|
|
32
|
-
i();
|
|
7
|
+
setup(p) {
|
|
8
|
+
const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
|
|
9
|
+
return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
|
|
10
|
+
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
11
|
+
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
12
|
+
], changeVisualMode: (i) => {
|
|
13
|
+
if (e.editorVisualMode = i, i === "mobile") {
|
|
14
|
+
t();
|
|
33
15
|
return;
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
}, InSegments:
|
|
17
|
+
o();
|
|
18
|
+
}, InSegments: m };
|
|
37
19
|
}
|
|
38
20
|
});
|
|
39
21
|
export {
|
|
40
|
-
|
|
22
|
+
d as default
|
|
41
23
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { CompileEmailOptions } from '@@/Types/actions-api';
|
|
2
1
|
import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
|
|
3
2
|
export declare const useActionsApi: () => {
|
|
4
3
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
5
4
|
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
6
|
-
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
7
5
|
};
|