@useinsider/guido 2.0.0-beta.2b3ed57 → 2.0.0-beta.31cb960
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 -0
- package/dist/@types/config/schemas.js +55 -39
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +6 -6
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +17 -13
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +6 -6
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
- package/dist/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue2.js +15 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +14 -22
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +12 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
- package/dist/components/organisms/header/EditorActions.vue.js +21 -0
- package/dist/components/organisms/header/EditorActions.vue2.js +41 -0
- package/dist/components/organisms/header/EditorToolbar.vue.js +18 -0
- package/dist/components/organisms/header/EditorToolbar.vue2.js +17 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +11 -11
- package/dist/components/organisms/header/LeftSlot.vue2.js +11 -12
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -15
- package/dist/components/organisms/header/RightSlot.vue.js +11 -14
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -30
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +5 -5
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +15 -15
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +20 -19
- package/dist/composables/useActionsApi.js +33 -30
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +40 -40
- package/dist/enums/academy.js +8 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.js +20 -21
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +6 -7
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +362 -284
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +30 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +4 -0
- package/dist/src/components/organisms/header/EditorToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -0
- package/dist/src/composables/useConfig.d.ts +8 -0
- package/dist/src/enums/academy.d.ts +12 -0
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/enums/unsubscribe.d.ts +0 -1
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/stores/config.d.ts +164 -1
- package/dist/src/stores/editor.d.ts +21 -0
- package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
- package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
- package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +1 -1
- package/dist/stores/config.js +7 -0
- package/dist/stores/editor.js +1 -0
- package/dist/utils/templatePreparation.js +17 -17
- package/package.json +3 -3
- 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/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
package/README.md
CHANGED
|
@@ -110,6 +110,7 @@ const config: GuidoConfigInput = {
|
|
|
110
110
|
css?: string,
|
|
111
111
|
preselectedDynamicContent?: DynamicContent[],
|
|
112
112
|
selectedUnsubscribePages?: number[],
|
|
113
|
+
forceRecreate?: boolean, // Default: false - Force recreate template in Stripo storage
|
|
113
114
|
},
|
|
114
115
|
|
|
115
116
|
// Optional: Editor settings
|
|
@@ -137,6 +138,7 @@ const config: GuidoConfigInput = {
|
|
|
137
138
|
testMessage?: boolean, // Default: true
|
|
138
139
|
displayConditions?: boolean, // Default: true
|
|
139
140
|
unsubscribe?: boolean, // Default: true
|
|
141
|
+
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
140
142
|
},
|
|
141
143
|
|
|
142
144
|
// Optional: Block configuration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { object as o, number as
|
|
2
|
-
const
|
|
1
|
+
import { object as o, number as b, optional as e, string as t, pipe as u, picklist as n, custom as d, boolean as c, array as a, minLength as p, literal as r, variant as S } from "../../node_modules/valibot/dist/index.js";
|
|
2
|
+
const m = {
|
|
3
3
|
/** Promotional/marketing emails */
|
|
4
4
|
PROMOTIONAL: 1,
|
|
5
5
|
/** Transactional/system emails */
|
|
@@ -13,22 +13,22 @@ const i = {
|
|
|
13
13
|
UNSUBSCRIBE_PAGES: 97
|
|
14
14
|
}, h = o({
|
|
15
15
|
/** Unique identifier for the template being edited */
|
|
16
|
-
templateId:
|
|
16
|
+
templateId: u(
|
|
17
17
|
t(),
|
|
18
|
-
|
|
18
|
+
p(1, "templateId is required")
|
|
19
19
|
),
|
|
20
20
|
/** Unique identifier for the user editing the template */
|
|
21
|
-
userId:
|
|
21
|
+
userId: u(
|
|
22
22
|
t(),
|
|
23
|
-
|
|
23
|
+
p(1, "userId is required")
|
|
24
24
|
),
|
|
25
25
|
/** Optional variation ID for A/B testing */
|
|
26
26
|
variationId: e(t())
|
|
27
27
|
}), k = o({
|
|
28
28
|
/** Partner/organization name (required) */
|
|
29
|
-
name:
|
|
29
|
+
name: u(
|
|
30
30
|
t(),
|
|
31
|
-
|
|
31
|
+
p(1, "partner.name is required")
|
|
32
32
|
),
|
|
33
33
|
/** Product type identifier */
|
|
34
34
|
productType: e(
|
|
@@ -41,8 +41,8 @@ const i = {
|
|
|
41
41
|
),
|
|
42
42
|
/** Message type (promotional or transactional) */
|
|
43
43
|
messageType: e(
|
|
44
|
-
n([
|
|
45
|
-
|
|
44
|
+
n([m.PROMOTIONAL, m.TRANSACTIONAL]),
|
|
45
|
+
m.PROMOTIONAL
|
|
46
46
|
),
|
|
47
47
|
/** Display name for the current user */
|
|
48
48
|
username: e(t(), "Guido User")
|
|
@@ -71,27 +71,29 @@ const i = {
|
|
|
71
71
|
[]
|
|
72
72
|
),
|
|
73
73
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(a(
|
|
75
|
-
|
|
74
|
+
selectedUnsubscribePages: e(a(b()), []),
|
|
75
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
76
|
+
forceRecreate: e(c(), !1)
|
|
77
|
+
}), f = o({
|
|
76
78
|
/** Sender display name */
|
|
77
79
|
senderName: e(t(), ""),
|
|
78
80
|
/** Email subject line */
|
|
79
81
|
subject: e(t(), "")
|
|
80
|
-
}),
|
|
82
|
+
}), C = o({
|
|
81
83
|
/** Locale for the editor UI */
|
|
82
84
|
locale: e(t(), "en"),
|
|
83
85
|
/** Path to translations object */
|
|
84
86
|
translationsPath: e(t(), "window.trans.en"),
|
|
85
87
|
/** Migration date for template compatibility */
|
|
86
|
-
migrationDate: e(
|
|
88
|
+
migrationDate: e(b(), 1759696858),
|
|
87
89
|
/** Email header settings */
|
|
88
|
-
emailHeader: e(
|
|
89
|
-
}),
|
|
90
|
+
emailHeader: e(f, { senderName: "", subject: "" })
|
|
91
|
+
}), I = o({
|
|
90
92
|
/** Whether to show the header bar */
|
|
91
93
|
showHeader: e(c(), !0),
|
|
92
94
|
/** Custom label for back button (if shown) */
|
|
93
95
|
backButtonLabel: e(t())
|
|
94
|
-
}),
|
|
96
|
+
}), T = o({
|
|
95
97
|
/** Enable dynamic content insertion */
|
|
96
98
|
dynamicContent: e(c(), !0),
|
|
97
99
|
/** Enable save as template functionality */
|
|
@@ -106,7 +108,7 @@ const i = {
|
|
|
106
108
|
unsubscribe: e(c(), !0),
|
|
107
109
|
/** Disable modules panel in the editor */
|
|
108
110
|
modulesDisabled: e(c(), !1)
|
|
109
|
-
}),
|
|
111
|
+
}), A = n([
|
|
110
112
|
"amp-accordion",
|
|
111
113
|
"amp-carousel",
|
|
112
114
|
"amp-form-controls",
|
|
@@ -131,7 +133,7 @@ const i = {
|
|
|
131
133
|
]), E = o({
|
|
132
134
|
/** Default blocks to exclude from the editor */
|
|
133
135
|
excludeDefaults: e(
|
|
134
|
-
a(
|
|
136
|
+
a(A),
|
|
135
137
|
[]
|
|
136
138
|
),
|
|
137
139
|
/** Custom blocks to include in the editor */
|
|
@@ -145,7 +147,7 @@ const i = {
|
|
|
145
147
|
/** Human-readable description */
|
|
146
148
|
description: e(t()),
|
|
147
149
|
/** Priority for rule ordering (lower = earlier) */
|
|
148
|
-
priority:
|
|
150
|
+
priority: b()
|
|
149
151
|
}), N = o({
|
|
150
152
|
...l.entries,
|
|
151
153
|
type: r("replace"),
|
|
@@ -173,21 +175,32 @@ const i = {
|
|
|
173
175
|
...l.entries,
|
|
174
176
|
type: r("custom"),
|
|
175
177
|
/** Custom processor function */
|
|
176
|
-
processor:
|
|
177
|
-
(
|
|
178
|
+
processor: d(
|
|
179
|
+
(i) => typeof i == "function",
|
|
178
180
|
"processor must be a function"
|
|
179
181
|
)
|
|
180
|
-
}),
|
|
182
|
+
}), x = S("type", [
|
|
181
183
|
N,
|
|
182
184
|
O,
|
|
183
185
|
L,
|
|
184
186
|
v
|
|
185
|
-
]),
|
|
187
|
+
]), B = o({
|
|
186
188
|
/** Custom compiler rules to apply */
|
|
187
|
-
customRules: e(a(
|
|
189
|
+
customRules: e(a(x), []),
|
|
188
190
|
/** Skip default compiler rules */
|
|
189
191
|
ignoreDefaultRules: e(c(), !1)
|
|
190
|
-
}),
|
|
192
|
+
}), P = o({
|
|
193
|
+
/**
|
|
194
|
+
* External validation handler called before save completes.
|
|
195
|
+
* Return false to cancel the save operation.
|
|
196
|
+
*/
|
|
197
|
+
externalValidation: e(
|
|
198
|
+
d(
|
|
199
|
+
(i) => typeof i == "function",
|
|
200
|
+
"externalValidation must be a function"
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
}), D = o({
|
|
191
204
|
// Required sections
|
|
192
205
|
/** Identity configuration (required) */
|
|
193
206
|
identity: h,
|
|
@@ -197,35 +210,38 @@ const i = {
|
|
|
197
210
|
/** Template content and presets */
|
|
198
211
|
template: e(R, {}),
|
|
199
212
|
/** Editor settings */
|
|
200
|
-
editor: e(
|
|
213
|
+
editor: e(C, {}),
|
|
201
214
|
/** UI configuration */
|
|
202
|
-
ui: e(
|
|
215
|
+
ui: e(I, {}),
|
|
203
216
|
/** Feature toggles */
|
|
204
|
-
features: e(
|
|
217
|
+
features: e(T, {}),
|
|
205
218
|
/** Block configuration */
|
|
206
219
|
blocks: e(E, {}),
|
|
207
220
|
/** Compiler configuration */
|
|
208
|
-
compiler: e(
|
|
221
|
+
compiler: e(B, {}),
|
|
222
|
+
/** Callbacks and event handlers */
|
|
223
|
+
callbacks: e(P, {})
|
|
209
224
|
});
|
|
210
225
|
export {
|
|
211
226
|
E as BlocksSchema,
|
|
212
|
-
|
|
213
|
-
|
|
227
|
+
P as CallbacksSchema,
|
|
228
|
+
x as CompilerRuleSchema,
|
|
229
|
+
B as CompilerSchema,
|
|
214
230
|
g as CustomBlockTypeSchema,
|
|
215
231
|
v as CustomRuleSchema,
|
|
216
|
-
|
|
232
|
+
A as DefaultBlockTypeSchema,
|
|
217
233
|
y as DynamicContentSchema,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
234
|
+
C as EditorSchema,
|
|
235
|
+
f as EmailHeaderSchema,
|
|
236
|
+
T as FeaturesSchema,
|
|
237
|
+
D as GuidoConfigSchema,
|
|
222
238
|
h as IdentitySchema,
|
|
223
|
-
|
|
239
|
+
m as MessageType,
|
|
224
240
|
k as PartnerSchema,
|
|
225
241
|
s as ProductType,
|
|
226
242
|
O as RegexRuleSchema,
|
|
227
243
|
L as RemoveRuleSchema,
|
|
228
244
|
N as ReplaceRuleSchema,
|
|
229
245
|
R as TemplateSchema,
|
|
230
|
-
|
|
246
|
+
I as UISchema
|
|
231
247
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, defineAsyncComponent as P, ref as N, computed as U, watch as R, onMounted as z, onUnmounted as K } from "vue";
|
|
2
2
|
import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as j } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as q } from "../composables/useStripo.js";
|
|
@@ -15,8 +15,8 @@ import { useConfigStore as oe } from "../stores/config.js";
|
|
|
15
15
|
import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
|
|
16
16
|
import { useEditorStore as ne } from "../stores/editor.js";
|
|
17
17
|
import { usePreviewStore as re } from "../stores/preview.js";
|
|
18
|
-
import { useUnsubscribeStore as
|
|
19
|
-
const Ee = /* @__PURE__ */
|
|
18
|
+
import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
|
|
19
|
+
const Ee = /* @__PURE__ */ B({
|
|
20
20
|
__name: "Guido",
|
|
21
21
|
props: {
|
|
22
22
|
config: null
|
|
@@ -27,19 +27,19 @@ const Ee = /* @__PURE__ */ x({
|
|
|
27
27
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
28
28
|
), A = P(
|
|
29
29
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
30
|
-
), p =
|
|
30
|
+
), p = N(), c = te(), u = se(), n = oe();
|
|
31
31
|
n.init(l.config);
|
|
32
32
|
const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
|
|
33
33
|
var e;
|
|
34
34
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
35
|
-
}, { templateId: a, userId: y, partnerName: h, productType:
|
|
35
|
+
}, { templateId: a, userId: y, partnerName: h, productType: b, username: f, template: o } = n, s = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
|
|
36
36
|
i.templateId = a;
|
|
37
37
|
const { initPlugin: S } = q({
|
|
38
38
|
emailId: a,
|
|
39
39
|
userId: y,
|
|
40
|
-
username:
|
|
40
|
+
username: f,
|
|
41
41
|
partnerName: h,
|
|
42
|
-
productType:
|
|
42
|
+
productType: b,
|
|
43
43
|
preselectedDynamicContentList: m,
|
|
44
44
|
onReady: () => {
|
|
45
45
|
console.debug("guido:ready"), t("ready");
|
|
@@ -63,28 +63,26 @@ const Ee = /* @__PURE__ */ x({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const E = (e) => {
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
66
|
+
console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
67
67
|
}, k = () => {
|
|
68
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
R(() => r.value, () => {
|
|
71
71
|
t("on-change", r.value);
|
|
72
72
|
});
|
|
73
73
|
const d = (e) => {
|
|
74
|
-
const T = e, { attribute: O, position:
|
|
75
|
-
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O,
|
|
74
|
+
const T = e, { attribute: O, position: x } = T.detail;
|
|
75
|
+
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
|
|
76
76
|
};
|
|
77
77
|
return z(async () => {
|
|
78
78
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
79
|
try {
|
|
80
80
|
u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
81
81
|
let e = {
|
|
82
|
-
html:
|
|
83
|
-
css: g
|
|
84
|
-
forceRecreate: !0
|
|
85
|
-
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
82
|
+
html: s && await W(s),
|
|
83
|
+
css: g
|
|
86
84
|
};
|
|
87
|
-
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e),
|
|
85
|
+
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), c.selectedDynamicContentList = m;
|
|
88
86
|
} catch (e) {
|
|
89
87
|
console.error("Failed to initialize Stripo editor:", e);
|
|
90
88
|
}
|
|
@@ -104,7 +102,7 @@ const Ee = /* @__PURE__ */ x({
|
|
|
104
102
|
},
|
|
105
103
|
hasChanges: r,
|
|
106
104
|
saveSilent: v
|
|
107
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore:
|
|
105
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: c, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: b, username: f, templateConfig: o, html: s, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
|
|
108
106
|
}
|
|
109
107
|
});
|
|
110
108
|
export {
|
|
@@ -2,7 +2,7 @@ import s from "./PreviewContainer.vue2.js";
|
|
|
2
2
|
import t from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var i = function() {
|
|
4
4
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
5
|
-
return e.previewStore.isLoaded ? r("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2
|
|
5
|
+
return e.previewStore.isLoaded ? r("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2" }, [r("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r(e.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), r(e.MobilePreview, { staticClass: "f-0 min-w-a" })], 1), e.previewStore.isAMPErrorModalVisible ? r(e.AmpErrorModal, { on: { close: function(_) {
|
|
6
6
|
return e.previewStore.closeErrorModal();
|
|
7
7
|
} } }) : o._e()], 1) : o._e();
|
|
8
8
|
}, n = [], a = /* @__PURE__ */ t(
|
|
@@ -13,7 +13,7 @@ var i = function() {
|
|
|
13
13
|
null,
|
|
14
14
|
null
|
|
15
15
|
);
|
|
16
|
-
const
|
|
16
|
+
const d = a.exports;
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
d as default
|
|
19
19
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./AmpErrorModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var n = function() {
|
|
5
5
|
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "
|
|
6
|
+
return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "small", description: t.ampValidationDescription, "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
|
|
7
7
|
return t.emit("close");
|
|
8
|
-
}, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13
|
|
9
|
-
return r(t.InOnPageMessage, { key:
|
|
8
|
+
}, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 error-list" }, e._l(t.previewStore.ampErrors, function(o, s) {
|
|
9
|
+
return r(t.InOnPageMessage, { key: s, attrs: { icon: "filled-error-box", size: "small", type: "alert", text: o } });
|
|
10
10
|
}), 1)])]);
|
|
11
11
|
}, l = [], d = /* @__PURE__ */ a(
|
|
12
|
-
|
|
12
|
+
i,
|
|
13
13
|
n,
|
|
14
14
|
l,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"c3fd5d4b"
|
|
18
18
|
);
|
|
19
19
|
const _ = d.exports;
|
|
20
20
|
export {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useCodeEditorApi as
|
|
1
|
+
import { defineComponent as m, ref as c, computed as d } from "vue";
|
|
2
|
+
import l from "../../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useCodeEditorApi as f } from "../../../../composables/useCodeEditorApi.js";
|
|
4
4
|
import { usePreviewMode as u } from "../../../../composables/usePreviewMode.js";
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
5
|
+
import { useTranslations as _ } from "../../../../composables/useTranslations.js";
|
|
6
|
+
import { ACADEMY_LINKS as M } from "../../../../enums/academy.js";
|
|
7
|
+
import { usePreviewStore as y } from "../../../../stores/preview.js";
|
|
8
|
+
import { InOnPageMessage as E } from "@useinsider/design-system-vue";
|
|
9
|
+
const O = /* @__PURE__ */ m({
|
|
9
10
|
__name: "AmpErrorModal",
|
|
10
11
|
emits: ["close"],
|
|
11
|
-
setup(
|
|
12
|
-
const o =
|
|
12
|
+
setup(g, { emit: e }) {
|
|
13
|
+
const o = _(), { closePreviewMode: r } = u(), { openCodeEditor: t } = f(), i = y(), n = c({
|
|
13
14
|
cancelOrBackButton: {
|
|
14
15
|
type: "secondary",
|
|
15
16
|
labelText: o("campaign-builder.cancel"),
|
|
@@ -19,12 +20,15 @@ const P = /* @__PURE__ */ p({
|
|
|
19
20
|
type: "primary",
|
|
20
21
|
labelText: o("email-editor.amp-validation-fix")
|
|
21
22
|
}
|
|
22
|
-
}),
|
|
23
|
+
}), a = () => {
|
|
23
24
|
e("close"), r(), t();
|
|
24
|
-
},
|
|
25
|
-
|
|
25
|
+
}, s = o(
|
|
26
|
+
"email-editor.amp-validation-description",
|
|
27
|
+
{ academyLink: M.AMP_FOR_EMAILS }
|
|
28
|
+
), p = d(() => `${o("products.errors")} (${i.ampErrors.length})`);
|
|
29
|
+
return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: i, footerButtonOptions: n, handleFixInCodeEditor: a, ampValidationDescription: s, errorCountText: p, WpModal: l, InOnPageMessage: E };
|
|
26
30
|
}
|
|
27
31
|
});
|
|
28
32
|
export {
|
|
29
|
-
|
|
33
|
+
O as default
|
|
30
34
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import o from "./AmpToggle.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var i = function() {
|
|
5
5
|
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-
|
|
6
|
+
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "with-icon": "", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__amp-error-button", "left-icon": "filled-amp", type: "danger", "label-text": e.trans("email-editor.check-amp-errors", { count: e.previewStore.ampErrors.length }) }, on: { click: function(m) {
|
|
7
7
|
return e.previewStore.openErrorModal();
|
|
8
8
|
} } }) : r._e()], 1)]);
|
|
9
|
-
}, a = [],
|
|
9
|
+
}, a = [], s = /* @__PURE__ */ n(
|
|
10
10
|
o,
|
|
11
|
-
|
|
11
|
+
i,
|
|
12
12
|
a,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"22226124"
|
|
16
16
|
);
|
|
17
|
-
const d =
|
|
17
|
+
const d = s.exports;
|
|
18
18
|
export {
|
|
19
19
|
d as default
|
|
20
20
|
};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { usePreviewStore as
|
|
1
|
+
import { defineComponent as n, computed as i } from "vue";
|
|
2
|
+
import { useTranslations as m } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { usePreviewStore as r } from "../../../../stores/preview.js";
|
|
4
4
|
import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
|
|
5
|
-
const _ = /* @__PURE__ */
|
|
5
|
+
const _ = /* @__PURE__ */ n({
|
|
6
6
|
__name: "AmpToggle",
|
|
7
7
|
setup(p) {
|
|
8
|
-
const
|
|
8
|
+
const e = r(), t = m(), o = i(() => [
|
|
9
9
|
{
|
|
10
|
-
text:
|
|
11
|
-
value: "html"
|
|
10
|
+
text: t("dynamic-creatives.html"),
|
|
11
|
+
value: "html",
|
|
12
|
+
icon: "line-code"
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
|
-
text:
|
|
15
|
+
text: t("email-editor.amp-html"),
|
|
15
16
|
value: "AMP",
|
|
16
|
-
|
|
17
|
+
icon: "filled-amp",
|
|
18
|
+
tooltipText: e.hasAMP ? "" : t("email-editor.preview-amp-unavailable-tooltip"),
|
|
17
19
|
position: "bottom",
|
|
18
20
|
align: "center",
|
|
19
|
-
disable: !
|
|
21
|
+
disable: !e.hasAMP
|
|
20
22
|
}
|
|
21
23
|
]);
|
|
22
|
-
return { __sfc: !0, previewStore:
|
|
23
|
-
|
|
24
|
+
return { __sfc: !0, previewStore: e, trans: t, segmentList: o, handleFormatChange: (a) => {
|
|
25
|
+
e.setEmailFormat(a);
|
|
24
26
|
}, InSegments: l, InButtonV2: s };
|
|
25
27
|
}
|
|
26
28
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import r from "./DesktopBrowserHeader.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var t = this, e = t._self._c, s = t._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "desktop-browser-header d-f w-1 f-sh-0" }, [e("img", { staticClass: "desktop-browser-header__left f-sh-0", attrs: { alt: "", src: s.desktopMockupLeft } }), e("div", { staticClass: "desktop-browser-header__center f-g-1", style: s.centerBackgroundStyle }), e("img", { staticClass: "desktop-browser-header__right f-sh-0", attrs: { alt: "", src: s.desktopMockupRight } })]);
|
|
7
|
+
}, _ = [], c = /* @__PURE__ */ o(
|
|
8
|
+
r,
|
|
9
|
+
a,
|
|
10
|
+
_,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"d86c5af5"
|
|
14
|
+
);
|
|
15
|
+
const p = c.exports;
|
|
16
|
+
export {
|
|
17
|
+
p as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as e, computed as o } from "vue";
|
|
2
|
+
import t from "../../../../static/assets/desktop/desktop-mockup-center.svg.js";
|
|
3
|
+
import r from "../../../../static/assets/desktop/desktop-mockup-left.svg.js";
|
|
4
|
+
import p from "../../../../static/assets/desktop/desktop-mockup-right.svg.js";
|
|
5
|
+
const k = /* @__PURE__ */ e({
|
|
6
|
+
__name: "DesktopBrowserHeader",
|
|
7
|
+
setup(n) {
|
|
8
|
+
return { __sfc: !0, centerBackgroundStyle: o(() => ({
|
|
9
|
+
backgroundImage: `url("${t}")`
|
|
10
|
+
})), desktopMockupLeft: r, desktopMockupRight: p };
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
k as default
|
|
15
|
+
};
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./DesktopPreview.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
|
|
11
|
-
}, i = [], n = /* @__PURE__ */ a(
|
|
12
|
-
o,
|
|
13
|
-
s,
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "desktop-preview-wrapper" }, [e("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 mb-6 l-s-5" }, [s._v(" " + s._s(t.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e(t.DesktopBrowserHeader), e("div", { staticClass: "desktop-preview__content d-f f-g-1 o-h b-c-5 min-h-0" }, [e("div", { staticClass: "f-g-1 h-1 o-h b-c-4 min-w-0" }, [t.isContainerReady ? e("iframe", { staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: t.previewStore.previewHtml } }) : s._e()])])], 1)]);
|
|
7
|
+
}, i = [], p = /* @__PURE__ */ o(
|
|
8
|
+
r,
|
|
9
|
+
a,
|
|
14
10
|
i,
|
|
15
11
|
!1,
|
|
16
12
|
null,
|
|
17
|
-
"
|
|
13
|
+
"e59b43cb"
|
|
18
14
|
);
|
|
19
|
-
const d =
|
|
15
|
+
const d = p.exports;
|
|
20
16
|
export {
|
|
21
17
|
d as default
|
|
22
18
|
};
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const B = /* @__PURE__ */ d({
|
|
1
|
+
import { defineComponent as f, ref as s, onMounted as c, onBeforeUnmount as m, nextTick as u } from "vue";
|
|
2
|
+
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { usePreviewStore as l } from "../../../../stores/preview.js";
|
|
4
|
+
import _ from "./DesktopBrowserHeader.vue.js";
|
|
5
|
+
const x = /* @__PURE__ */ f({
|
|
7
6
|
__name: "DesktopPreview",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
if (!t.value)
|
|
11
|
-
return;
|
|
12
|
-
const o = t.value.querySelector(".in-container");
|
|
13
|
-
if (!o)
|
|
14
|
-
return;
|
|
15
|
-
const u = o.getBoundingClientRect(), s = o.querySelector(".in-container__header"), f = s ? s.getBoundingClientRect().height : 0, p = u.height - f;
|
|
16
|
-
i.value = `${p}px`;
|
|
17
|
-
};
|
|
7
|
+
setup(v) {
|
|
8
|
+
const a = p(), o = s(), n = s(!1), i = l();
|
|
18
9
|
let e = null;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const t = () => {
|
|
11
|
+
o.value && (e = new ResizeObserver(() => {
|
|
12
|
+
}), e.observe(o.value), u(() => {
|
|
13
|
+
n.value = !0;
|
|
22
14
|
}));
|
|
23
|
-
},
|
|
15
|
+
}, r = () => {
|
|
24
16
|
e == null || e.disconnect();
|
|
25
17
|
};
|
|
26
|
-
return
|
|
18
|
+
return c(t), m(r), { __sfc: !0, trans: a, containerRef: o, isContainerReady: n, previewStore: i, resizeObserver: e, initIframe: t, cleanIframe: r, DesktopBrowserHeader: _ };
|
|
27
19
|
}
|
|
28
20
|
});
|
|
29
21
|
export {
|
|
30
|
-
|
|
22
|
+
x as default
|
|
31
23
|
};
|
|
@@ -2,15 +2,15 @@ import i from "./EmailSizeIndicator.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var o = function() {
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e
|
|
5
|
+
var t = this, s = t._self._c, e = t._self._setupProxy;
|
|
6
|
+
return e.previewStore.previewHtml ? s("div", { staticClass: "d-f a-i-c j-c-c" }, [s(e.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: e.htmlSize, "max-value": e.MAX_EMAIL_SIZE_IN_KB, type: e.progress.type, value: e.progress.value } }), s(e.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: e.trans("email-editor.preview-design-size-tooltip") } })], 1) : t._e();
|
|
7
7
|
}, a = [], n = /* @__PURE__ */ r(
|
|
8
8
|
i,
|
|
9
9
|
o,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"913a3417"
|
|
14
14
|
);
|
|
15
15
|
const m = n.exports;
|
|
16
16
|
export {
|