@useinsider/guido 2.0.0-beta.a3f32aa → 2.0.0-beta.a716078
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 +35 -45
- package/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +59 -59
- package/dist/components/organisms/base/Toaster.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +27 -29
- package/dist/composables/useSave.js +11 -13
- package/dist/composables/useStripo.js +57 -56
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/controlFactories.js +122 -111
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +57 -52
- 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 +8 -26
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/composables/useConfig.d.ts +4 -6
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +35 -145
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/stores/config.js +0 -7
- package/package.json +1 -1
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 p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as b, variant as S } from "../../node_modules/valibot/dist/index.js";
|
|
2
|
+
const i = {
|
|
3
3
|
/** Promotional/marketing emails */
|
|
4
4
|
PROMOTIONAL: 1,
|
|
5
5
|
/** Transactional/system emails */
|
|
@@ -13,22 +13,22 @@ const m = {
|
|
|
13
13
|
UNSUBSCRIBE_PAGES: 97
|
|
14
14
|
}, h = o({
|
|
15
15
|
/** Unique identifier for the template being edited */
|
|
16
|
-
templateId:
|
|
16
|
+
templateId: m(
|
|
17
17
|
t(),
|
|
18
|
-
|
|
18
|
+
u(1, "templateId is required")
|
|
19
19
|
),
|
|
20
20
|
/** Unique identifier for the user editing the template */
|
|
21
|
-
userId:
|
|
21
|
+
userId: m(
|
|
22
22
|
t(),
|
|
23
|
-
|
|
23
|
+
u(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: m(
|
|
30
30
|
t(),
|
|
31
|
-
|
|
31
|
+
u(1, "partner.name is required")
|
|
32
32
|
),
|
|
33
33
|
/** Product type identifier */
|
|
34
34
|
productType: e(
|
|
@@ -41,8 +41,8 @@ const m = {
|
|
|
41
41
|
),
|
|
42
42
|
/** Message type (promotional or transactional) */
|
|
43
43
|
messageType: e(
|
|
44
|
-
n([
|
|
45
|
-
|
|
44
|
+
n([i.PROMOTIONAL, i.TRANSACTIONAL]),
|
|
45
|
+
i.PROMOTIONAL
|
|
46
46
|
),
|
|
47
47
|
/** Display name for the current user */
|
|
48
48
|
username: e(t(), "Guido User")
|
|
@@ -60,7 +60,7 @@ const m = {
|
|
|
60
60
|
value: t()
|
|
61
61
|
})
|
|
62
62
|
)
|
|
63
|
-
}),
|
|
63
|
+
}), R = o({
|
|
64
64
|
/** Initial HTML content */
|
|
65
65
|
html: e(t(), ""),
|
|
66
66
|
/** Initial CSS content */
|
|
@@ -71,8 +71,10 @@ const m = {
|
|
|
71
71
|
[]
|
|
72
72
|
),
|
|
73
73
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(a(
|
|
75
|
-
|
|
74
|
+
selectedUnsubscribePages: e(a(p()), []),
|
|
75
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
76
|
+
forceRecreate: e(c(), !1)
|
|
77
|
+
}), C = o({
|
|
76
78
|
/** Sender display name */
|
|
77
79
|
senderName: e(t(), ""),
|
|
78
80
|
/** Email subject line */
|
|
@@ -83,9 +85,9 @@ const m = {
|
|
|
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(p(), 1759696858),
|
|
87
89
|
/** Email header settings */
|
|
88
|
-
emailHeader: e(
|
|
90
|
+
emailHeader: e(C, { senderName: "", subject: "" })
|
|
89
91
|
}), T = o({
|
|
90
92
|
/** Whether to show the header bar */
|
|
91
93
|
showHeader: e(c(), !0),
|
|
@@ -103,7 +105,9 @@ const m = {
|
|
|
103
105
|
/** Enable display conditions */
|
|
104
106
|
displayConditions: e(c(), !0),
|
|
105
107
|
/** Enable unsubscribe block */
|
|
106
|
-
unsubscribe: e(c(), !0)
|
|
108
|
+
unsubscribe: e(c(), !0),
|
|
109
|
+
/** Disable modules panel in the editor */
|
|
110
|
+
modulesDisabled: e(c(), !1)
|
|
107
111
|
}), f = n([
|
|
108
112
|
"amp-accordion",
|
|
109
113
|
"amp-carousel",
|
|
@@ -143,7 +147,7 @@ const m = {
|
|
|
143
147
|
/** Human-readable description */
|
|
144
148
|
description: e(t()),
|
|
145
149
|
/** Priority for rule ordering (lower = earlier) */
|
|
146
|
-
priority:
|
|
150
|
+
priority: p()
|
|
147
151
|
}), N = o({
|
|
148
152
|
...l.entries,
|
|
149
153
|
type: r("replace"),
|
|
@@ -171,32 +175,21 @@ const m = {
|
|
|
171
175
|
...l.entries,
|
|
172
176
|
type: r("custom"),
|
|
173
177
|
/** Custom processor function */
|
|
174
|
-
processor:
|
|
175
|
-
(
|
|
178
|
+
processor: b(
|
|
179
|
+
(d) => typeof d == "function",
|
|
176
180
|
"processor must be a function"
|
|
177
181
|
)
|
|
178
|
-
}),
|
|
182
|
+
}), B = S("type", [
|
|
179
183
|
N,
|
|
180
184
|
O,
|
|
181
185
|
L,
|
|
182
186
|
v
|
|
183
|
-
]),
|
|
187
|
+
]), P = o({
|
|
184
188
|
/** Custom compiler rules to apply */
|
|
185
|
-
customRules: e(a(
|
|
189
|
+
customRules: e(a(B), []),
|
|
186
190
|
/** Skip default compiler rules */
|
|
187
191
|
ignoreDefaultRules: e(c(), !1)
|
|
188
|
-
}),
|
|
189
|
-
/**
|
|
190
|
-
* External validation handler called before save completes.
|
|
191
|
-
* Return false to cancel the save operation.
|
|
192
|
-
*/
|
|
193
|
-
externalValidation: e(
|
|
194
|
-
d(
|
|
195
|
-
(i) => typeof i == "function",
|
|
196
|
-
"externalValidation must be a function"
|
|
197
|
-
)
|
|
198
|
-
)
|
|
199
|
-
}), U = o({
|
|
192
|
+
}), x = o({
|
|
200
193
|
// Required sections
|
|
201
194
|
/** Identity configuration (required) */
|
|
202
195
|
identity: h,
|
|
@@ -204,7 +197,7 @@ const m = {
|
|
|
204
197
|
partner: k,
|
|
205
198
|
// Optional sections (with defaults)
|
|
206
199
|
/** Template content and presets */
|
|
207
|
-
template: e(
|
|
200
|
+
template: e(R, {}),
|
|
208
201
|
/** Editor settings */
|
|
209
202
|
editor: e(I, {}),
|
|
210
203
|
/** UI configuration */
|
|
@@ -214,30 +207,27 @@ const m = {
|
|
|
214
207
|
/** Block configuration */
|
|
215
208
|
blocks: e(E, {}),
|
|
216
209
|
/** Compiler configuration */
|
|
217
|
-
compiler: e(
|
|
218
|
-
/** Callbacks and event handlers */
|
|
219
|
-
callbacks: e(P, {})
|
|
210
|
+
compiler: e(P, {})
|
|
220
211
|
});
|
|
221
212
|
export {
|
|
222
213
|
E as BlocksSchema,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
B as CompilerSchema,
|
|
214
|
+
B as CompilerRuleSchema,
|
|
215
|
+
P as CompilerSchema,
|
|
226
216
|
g as CustomBlockTypeSchema,
|
|
227
217
|
v as CustomRuleSchema,
|
|
228
218
|
f as DefaultBlockTypeSchema,
|
|
229
219
|
y as DynamicContentSchema,
|
|
230
220
|
I as EditorSchema,
|
|
231
|
-
|
|
221
|
+
C as EmailHeaderSchema,
|
|
232
222
|
A as FeaturesSchema,
|
|
233
|
-
|
|
223
|
+
x as GuidoConfigSchema,
|
|
234
224
|
h as IdentitySchema,
|
|
235
|
-
|
|
225
|
+
i as MessageType,
|
|
236
226
|
k as PartnerSchema,
|
|
237
227
|
s as ProductType,
|
|
238
228
|
O as RegexRuleSchema,
|
|
239
229
|
L as RemoveRuleSchema,
|
|
240
230
|
N as ReplaceRuleSchema,
|
|
241
|
-
|
|
231
|
+
R as TemplateSchema,
|
|
242
232
|
T as UISchema
|
|
243
233
|
};
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { useTimerClone as
|
|
6
|
-
import { migrate as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useStripoApi as
|
|
14
|
-
import { useConfigStore as
|
|
15
|
-
import { useDynamicContentStore as
|
|
16
|
-
import { useEditorStore as
|
|
17
|
-
import { usePreviewStore as
|
|
18
|
-
import {
|
|
19
|
-
|
|
1
|
+
import { defineComponent as q, defineAsyncComponent as U, ref as W, computed as I, watch as z, onMounted as K, onUnmounted as M } from "vue";
|
|
2
|
+
import { provideGuidoActions as j } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as J } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as Q } from "../composables/useStripo.js";
|
|
5
|
+
import { useTimerClone as V } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as L } from "../config/migrator/index.js";
|
|
7
|
+
import X from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import Y from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
9
|
+
import Z from "./organisms/header/HeaderWrapper.vue.js";
|
|
10
|
+
import $ from "./organisms/LoadingWrapper.vue.js";
|
|
11
|
+
import ee from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
12
|
+
import oe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
13
|
+
import { useStripoApi as te } from "../services/stripoApi.js";
|
|
14
|
+
import { useConfigStore as ne } from "../stores/config.js";
|
|
15
|
+
import { useDynamicContentStore as re } from "../stores/dynamic-content.js";
|
|
16
|
+
import { useEditorStore as se } from "../stores/editor.js";
|
|
17
|
+
import { usePreviewStore as ce } from "../stores/preview.js";
|
|
18
|
+
import { useToasterStore as ie } from "../stores/toaster.js";
|
|
19
|
+
import { useUnsubscribeStore as ae } from "../stores/unsubscribe.js";
|
|
20
|
+
const Pe = /* @__PURE__ */ q({
|
|
20
21
|
__name: "Guido",
|
|
21
22
|
props: {
|
|
22
23
|
config: null
|
|
23
24
|
},
|
|
24
25
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
26
|
+
setup(A, { expose: F, emit: t }) {
|
|
27
|
+
const u = A, G = U(
|
|
27
28
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
28
|
-
),
|
|
29
|
+
), H = U(
|
|
29
30
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
30
|
-
), p =
|
|
31
|
-
n.init(
|
|
32
|
-
const
|
|
31
|
+
), p = W(), i = re(), v = ae(), y = ie(), n = ne();
|
|
32
|
+
n.init(u.config);
|
|
33
|
+
const a = se(), O = ce(), r = I(() => a.hasChanges), { isTestPartner: R } = J(), f = () => {
|
|
33
34
|
var e;
|
|
34
35
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
35
|
-
}, { templateId:
|
|
36
|
-
|
|
37
|
-
const { initPlugin:
|
|
38
|
-
emailId:
|
|
39
|
-
userId:
|
|
40
|
-
username:
|
|
41
|
-
partnerName:
|
|
42
|
-
productType:
|
|
43
|
-
preselectedDynamicContentList:
|
|
36
|
+
}, { templateId: m, userId: h, partnerName: b, productType: g, username: S, template: o } = n, s = (o == null ? void 0 : o.html) || "", w = (o == null ? void 0 : o.css) || "", d = (o == null ? void 0 : o.preselectedDynamicContent) || [];
|
|
37
|
+
a.templateId = m;
|
|
38
|
+
const c = W(!1), { initPlugin: C } = Q({
|
|
39
|
+
emailId: m,
|
|
40
|
+
userId: h,
|
|
41
|
+
username: S,
|
|
42
|
+
partnerName: b,
|
|
43
|
+
productType: g,
|
|
44
|
+
preselectedDynamicContentList: d,
|
|
44
45
|
onReady: () => {
|
|
45
46
|
console.debug("guido:ready"), t("ready");
|
|
46
47
|
}
|
|
47
|
-
}), { getDefaultTemplate:
|
|
48
|
+
}), { getDefaultTemplate: D } = te(), { cloneTimersOnSave: E, hasTimerBlocks: T } = V(), x = I(() => {
|
|
48
49
|
var e;
|
|
49
50
|
return !((e = n.ui) != null && e.showHeader);
|
|
50
51
|
});
|
|
51
|
-
|
|
52
|
+
j({
|
|
52
53
|
onBack: () => {
|
|
53
54
|
console.debug("guido:back"), t("back");
|
|
54
55
|
},
|
|
@@ -62,51 +63,50 @@ const Ee = /* @__PURE__ */ x({
|
|
|
62
63
|
console.debug("guido:test-email:click"), t("test-email:click");
|
|
63
64
|
}
|
|
64
65
|
});
|
|
65
|
-
const
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
67
|
-
},
|
|
66
|
+
const k = (e) => {
|
|
67
|
+
console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
68
|
+
}, _ = () => {
|
|
68
69
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
69
70
|
};
|
|
70
|
-
|
|
71
|
+
z(() => r.value, () => {
|
|
71
72
|
t("on-change", r.value);
|
|
72
73
|
});
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
console.debug("dynamic-content:open",
|
|
74
|
+
const l = (e) => {
|
|
75
|
+
const P = e, { attribute: B, position: N } = P.detail;
|
|
76
|
+
console.debug("dynamic-content:open", P.detail), t("dynamic-content:open", B, N);
|
|
76
77
|
};
|
|
77
|
-
return
|
|
78
|
+
return K(async () => {
|
|
78
79
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
80
|
try {
|
|
80
|
-
|
|
81
|
+
v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
81
82
|
let e = {
|
|
82
|
-
html:
|
|
83
|
-
css:
|
|
84
|
-
forceRecreate: !0
|
|
85
|
-
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
83
|
+
html: s && await L(s),
|
|
84
|
+
css: w
|
|
86
85
|
};
|
|
87
|
-
e.html || (e = await
|
|
86
|
+
e.html || (e = await D(), e.html = await L(e.html)), T(e.html) && (e.html = await E(e.html)), await C(e), i.selectedDynamicContentList = d;
|
|
88
87
|
} catch (e) {
|
|
89
88
|
console.error("Failed to initialize Stripo editor:", e);
|
|
90
89
|
}
|
|
91
|
-
document.addEventListener("dynamic-content:open",
|
|
92
|
-
}),
|
|
93
|
-
|
|
90
|
+
document.addEventListener("dynamic-content:open", l), c.value = !0;
|
|
91
|
+
}), M(() => {
|
|
92
|
+
var e;
|
|
93
|
+
c.value && (y.hideToaster(), (e = document.querySelector("#guido__toaster")) == null || e.remove()), c.value = !1, document.removeEventListener("dynamic-content:open", l);
|
|
94
94
|
try {
|
|
95
95
|
window.UIEditor.removeEditor();
|
|
96
96
|
} catch {
|
|
97
97
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
98
98
|
}
|
|
99
99
|
n.reset();
|
|
100
|
-
}),
|
|
100
|
+
}), F({
|
|
101
101
|
dynamicContent: {
|
|
102
|
-
insert:
|
|
103
|
-
close:
|
|
102
|
+
insert: k,
|
|
103
|
+
close: _
|
|
104
104
|
},
|
|
105
105
|
hasChanges: r,
|
|
106
|
-
saveSilent:
|
|
107
|
-
}), { __sfc: !0, PreviewContainer:
|
|
106
|
+
saveSilent: f
|
|
107
|
+
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: v, toasterStore: y, props: u, configStore: n, editorStore: a, previewStore: O, hasChanges: r, isTestPartner: R, saveSilent: f, templateId: m, userId: h, partnerName: b, productType: g, username: S, templateConfig: o, html: s, css: w, preselectedDynamicContentList: d, editorReady: c, emit: t, initPlugin: C, getDefaultTemplate: D, cloneTimersOnSave: E, hasTimerBlocks: T, noHeader: x, insertDynamicContent: k, closeDynamicContent: _, handleDynamicContentOpen: l, Toaster: X, FilterSelectionDrawer: Y, HeaderWrapper: Z, LoadingWrapper: $, SaveAsTemplateDrawer: ee, UnsubscribeWrapper: oe };
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
export {
|
|
111
|
-
|
|
111
|
+
Pe as default
|
|
112
112
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./Toaster.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var r = function() {
|
|
4
|
-
var o = this,
|
|
5
|
-
return
|
|
4
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
5
|
+
return e(t.InToasts, { attrs: { id: "guido__toaster", "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
6
6
|
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
|
-
|
|
7
|
+
n,
|
|
8
8
|
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const f = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as default
|
|
17
17
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import i from "./EmailSizeIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.
|
|
7
|
-
}, a = [], n = /* @__PURE__ */
|
|
6
|
+
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
8
8
|
i,
|
|
9
|
-
|
|
9
|
+
r,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"eb2f9f20"
|
|
14
14
|
);
|
|
15
15
|
const m = n.exports;
|
|
16
16
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
|
|
2
2
|
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
3
3
|
import { usePreviewStore as _ } from "../../../../stores/preview.js";
|
|
4
|
-
import {
|
|
4
|
+
import { InTooltipV2 as v, InProgress as f } from "@useinsider/design-system-vue";
|
|
5
5
|
const S = /* @__PURE__ */ c({
|
|
6
6
|
__name: "EmailSizeIndicator",
|
|
7
7
|
setup(w) {
|
|
@@ -17,7 +17,7 @@ const S = /* @__PURE__ */ c({
|
|
|
17
17
|
}, i = p();
|
|
18
18
|
return u(() => t.previewHtml, () => {
|
|
19
19
|
r();
|
|
20
|
-
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f,
|
|
20
|
+
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltipV2: v };
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { defineComponent as H, ref as m, computed as _ } from "vue";
|
|
2
2
|
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useExport as V } from "../../../composables/useExport.js";
|
|
4
4
|
import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
|
|
@@ -10,25 +10,25 @@ import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
|
|
|
10
10
|
import { InButtonV2 as A } from "@useinsider/design-system-vue";
|
|
11
11
|
const J = /* @__PURE__ */ H({
|
|
12
12
|
__name: "RightSlot",
|
|
13
|
-
setup(k, { expose:
|
|
14
|
-
const { config:
|
|
13
|
+
setup(k, { expose: c }) {
|
|
14
|
+
const { config: u } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = C(), t = T(), e = m(!1), s = m(!1), f = x(), v = () => {
|
|
15
15
|
if (o.isVersionHistoryOpen) {
|
|
16
16
|
a();
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
i();
|
|
20
|
-
},
|
|
20
|
+
}, d = async () => {
|
|
21
21
|
e.value = !0, await r(), e.value = !1;
|
|
22
|
-
},
|
|
22
|
+
}, y = () => {
|
|
23
23
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
24
|
-
},
|
|
24
|
+
}, S = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
|
|
25
25
|
s.value = !0, o.loadingStatus = !0;
|
|
26
|
-
const
|
|
27
|
-
return s.value = !1,
|
|
26
|
+
const g = await n(p);
|
|
27
|
+
return s.value = !1, p && (o.loadingStatus = !1), g;
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return c({
|
|
30
30
|
handleSave: l
|
|
31
|
-
}), { __sfc: !0, config:
|
|
31
|
+
}), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, testEmailClick: f, handleVersionHistory: v, handleExport: d, handleSaveAs: y, versionHistoryTooltipText: S, handleSave: l, getTooltipOptions: O, InButtonV2: A };
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { useConfigStore as
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
const
|
|
4
|
-
const e =
|
|
1
|
+
import { useConfigStore as F } from "../stores/config.js";
|
|
2
|
+
import { storeToRefs as I } from "pinia";
|
|
3
|
+
const k = () => {
|
|
4
|
+
const e = F(), {
|
|
5
5
|
config: t,
|
|
6
6
|
initialized: o,
|
|
7
7
|
identity: r,
|
|
8
8
|
partner: i,
|
|
9
|
-
template:
|
|
10
|
-
editor:
|
|
9
|
+
template: n,
|
|
10
|
+
editor: a,
|
|
11
11
|
ui: s,
|
|
12
|
-
features:
|
|
13
|
-
blocks:
|
|
14
|
-
compiler:
|
|
15
|
-
|
|
16
|
-
templateId: p,
|
|
12
|
+
features: u,
|
|
13
|
+
blocks: d,
|
|
14
|
+
compiler: p,
|
|
15
|
+
templateId: c,
|
|
17
16
|
userId: f,
|
|
18
17
|
variationId: m,
|
|
19
18
|
partnerName: g,
|
|
20
|
-
productType:
|
|
21
|
-
messageType:
|
|
22
|
-
username:
|
|
23
|
-
showHeader:
|
|
24
|
-
} =
|
|
19
|
+
productType: l,
|
|
20
|
+
messageType: b,
|
|
21
|
+
username: C,
|
|
22
|
+
showHeader: y
|
|
23
|
+
} = I(e);
|
|
25
24
|
return {
|
|
26
25
|
// State refs
|
|
27
26
|
config: t,
|
|
@@ -29,27 +28,26 @@ const w = () => {
|
|
|
29
28
|
// Section refs
|
|
30
29
|
identity: r,
|
|
31
30
|
partner: i,
|
|
32
|
-
template:
|
|
33
|
-
editor:
|
|
31
|
+
template: n,
|
|
32
|
+
editor: a,
|
|
34
33
|
ui: s,
|
|
35
|
-
features:
|
|
36
|
-
blocks:
|
|
37
|
-
compiler:
|
|
38
|
-
callbacks: l,
|
|
34
|
+
features: u,
|
|
35
|
+
blocks: d,
|
|
36
|
+
compiler: p,
|
|
39
37
|
// Convenience refs
|
|
40
|
-
templateId:
|
|
38
|
+
templateId: c,
|
|
41
39
|
userId: f,
|
|
42
40
|
variationId: m,
|
|
43
41
|
partnerName: g,
|
|
44
|
-
productType:
|
|
45
|
-
messageType:
|
|
46
|
-
username:
|
|
47
|
-
showHeader:
|
|
42
|
+
productType: l,
|
|
43
|
+
messageType: b,
|
|
44
|
+
username: C,
|
|
45
|
+
showHeader: y,
|
|
48
46
|
// Methods
|
|
49
47
|
getConfig: () => t.value,
|
|
50
|
-
isFeatureEnabled: (
|
|
48
|
+
isFeatureEnabled: (E) => e.isFeatureEnabled(E)
|
|
51
49
|
};
|
|
52
50
|
};
|
|
53
51
|
export {
|
|
54
|
-
|
|
52
|
+
k as useConfig
|
|
55
53
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (await o(t.compiledHtml, t.dynamicContentList, !0) && !((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)))
|
|
12
|
-
return r || s(t), t;
|
|
1
|
+
import { useSaveStart as i, useSaveComplete as m } from "./useGuidoActions.js";
|
|
2
|
+
import { useTemplatePreparation as n } from "../utils/templatePreparation.js";
|
|
3
|
+
import { useHtmlValidator as l } from "./useHtmlValidator.js";
|
|
4
|
+
const f = () => {
|
|
5
|
+
const e = i(), a = m(), { validateHtml: s } = l();
|
|
6
|
+
return { save: async (o = !1) => {
|
|
7
|
+
e();
|
|
8
|
+
const { prepareTemplateDetails: r } = n(), t = await r();
|
|
9
|
+
if (await s(t.compiledHtml, t.dynamicContentList, !0))
|
|
10
|
+
return o || a(t), t;
|
|
13
11
|
} };
|
|
14
12
|
};
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
f as useSave
|
|
17
15
|
};
|