@useinsider/guido 2.0.0-beta.ac3cd4d → 2.0.0-beta.afc5689
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 +38 -50
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +2 -2
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
- 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 +40 -40
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/itemsBlockMigrator.js +283 -0
- package/dist/extensions/Blocks/Items/block.js +39 -40
- package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +46 -49
- package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +13 -15
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +1 -1
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +1 -1
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +15 -17
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +15 -15
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +145 -136
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +2 -2
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -48
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -58
- package/dist/extensions/Blocks/Items/settingsPanel.js +4 -4
- package/dist/extensions/Blocks/Items/store/items-block.js +2 -2
- package/dist/extensions/Blocks/Items/template.js +312 -125
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +172 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +17 -44
- package/dist/extensions/Blocks/Recommendation/control.js +1 -1
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +64 -53
- package/dist/extensions/Blocks/controlFactories.js +55 -45
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +364 -285
- 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 +4 -26
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/composables/useConfig.d.ts +2 -6
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/template.d.ts +20 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +71 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +13 -8
- package/dist/src/stores/config.d.ts +18 -146
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/stores/config.js +0 -7
- package/package.json +3 -3
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,15 +85,15 @@ 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),
|
|
92
94
|
/** Custom label for back button (if shown) */
|
|
93
95
|
backButtonLabel: e(t())
|
|
94
|
-
}),
|
|
96
|
+
}), A = 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 m = {
|
|
|
106
108
|
unsubscribe: e(c(), !0),
|
|
107
109
|
/** Disable modules panel in the editor */
|
|
108
110
|
modulesDisabled: e(c(), !1)
|
|
109
|
-
}),
|
|
111
|
+
}), f = n([
|
|
110
112
|
"amp-accordion",
|
|
111
113
|
"amp-carousel",
|
|
112
114
|
"amp-form-controls",
|
|
@@ -131,7 +133,7 @@ const m = {
|
|
|
131
133
|
]), E = o({
|
|
132
134
|
/** Default blocks to exclude from the editor */
|
|
133
135
|
excludeDefaults: e(
|
|
134
|
-
a(
|
|
136
|
+
a(f),
|
|
135
137
|
[]
|
|
136
138
|
),
|
|
137
139
|
/** Custom blocks to include in the editor */
|
|
@@ -145,7 +147,7 @@ const m = {
|
|
|
145
147
|
/** Human-readable description */
|
|
146
148
|
description: e(t()),
|
|
147
149
|
/** Priority for rule ordering (lower = earlier) */
|
|
148
|
-
priority:
|
|
150
|
+
priority: p()
|
|
149
151
|
}), N = o({
|
|
150
152
|
...l.entries,
|
|
151
153
|
type: r("replace"),
|
|
@@ -173,32 +175,21 @@ const m = {
|
|
|
173
175
|
...l.entries,
|
|
174
176
|
type: r("custom"),
|
|
175
177
|
/** Custom processor function */
|
|
176
|
-
processor:
|
|
177
|
-
(
|
|
178
|
+
processor: b(
|
|
179
|
+
(d) => typeof d == "function",
|
|
178
180
|
"processor must be a function"
|
|
179
181
|
)
|
|
180
|
-
}),
|
|
182
|
+
}), B = S("type", [
|
|
181
183
|
N,
|
|
182
184
|
O,
|
|
183
185
|
L,
|
|
184
186
|
v
|
|
185
|
-
]),
|
|
187
|
+
]), P = o({
|
|
186
188
|
/** Custom compiler rules to apply */
|
|
187
|
-
customRules: e(a(
|
|
189
|
+
customRules: e(a(B), []),
|
|
188
190
|
/** Skip default compiler rules */
|
|
189
191
|
ignoreDefaultRules: e(c(), !1)
|
|
190
|
-
}),
|
|
191
|
-
/**
|
|
192
|
-
* External validation handler called before save completes.
|
|
193
|
-
* Return false to cancel the save operation.
|
|
194
|
-
*/
|
|
195
|
-
externalValidation: e(
|
|
196
|
-
d(
|
|
197
|
-
(i) => typeof i == "function",
|
|
198
|
-
"externalValidation must be a function"
|
|
199
|
-
)
|
|
200
|
-
)
|
|
201
|
-
}), D = o({
|
|
192
|
+
}), x = o({
|
|
202
193
|
// Required sections
|
|
203
194
|
/** Identity configuration (required) */
|
|
204
195
|
identity: h,
|
|
@@ -206,40 +197,37 @@ const m = {
|
|
|
206
197
|
partner: k,
|
|
207
198
|
// Optional sections (with defaults)
|
|
208
199
|
/** Template content and presets */
|
|
209
|
-
template: e(
|
|
200
|
+
template: e(R, {}),
|
|
210
201
|
/** Editor settings */
|
|
211
202
|
editor: e(I, {}),
|
|
212
203
|
/** UI configuration */
|
|
213
204
|
ui: e(T, {}),
|
|
214
205
|
/** Feature toggles */
|
|
215
|
-
features: e(
|
|
206
|
+
features: e(A, {}),
|
|
216
207
|
/** Block configuration */
|
|
217
208
|
blocks: e(E, {}),
|
|
218
209
|
/** Compiler configuration */
|
|
219
|
-
compiler: e(
|
|
220
|
-
/** Callbacks and event handlers */
|
|
221
|
-
callbacks: e(P, {})
|
|
210
|
+
compiler: e(P, {})
|
|
222
211
|
});
|
|
223
212
|
export {
|
|
224
213
|
E as BlocksSchema,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
B as CompilerSchema,
|
|
214
|
+
B as CompilerRuleSchema,
|
|
215
|
+
P as CompilerSchema,
|
|
228
216
|
g as CustomBlockTypeSchema,
|
|
229
217
|
v as CustomRuleSchema,
|
|
230
|
-
|
|
218
|
+
f as DefaultBlockTypeSchema,
|
|
231
219
|
y as DynamicContentSchema,
|
|
232
220
|
I as EditorSchema,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
221
|
+
C as EmailHeaderSchema,
|
|
222
|
+
A as FeaturesSchema,
|
|
223
|
+
x as GuidoConfigSchema,
|
|
236
224
|
h as IdentitySchema,
|
|
237
|
-
|
|
225
|
+
i as MessageType,
|
|
238
226
|
k as PartnerSchema,
|
|
239
227
|
s as ProductType,
|
|
240
228
|
O as RegexRuleSchema,
|
|
241
229
|
L as RemoveRuleSchema,
|
|
242
230
|
N as ReplaceRuleSchema,
|
|
243
|
-
|
|
231
|
+
R as TemplateSchema,
|
|
244
232
|
T as UISchema
|
|
245
233
|
};
|
|
@@ -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 {
|
|
@@ -7,14 +7,14 @@ var s = function() {
|
|
|
7
7
|
return [t(e.EmailHeaderInfo)];
|
|
8
8
|
}, proxy: !0 }, { key: "headerRightSlot", fn: function() {
|
|
9
9
|
return [t(e.EmailSizeIndicator)];
|
|
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);
|
|
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 allow-popups-to-escape-sandbox", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
|
|
11
11
|
}, i = [], n = /* @__PURE__ */ a(
|
|
12
12
|
o,
|
|
13
13
|
s,
|
|
14
14
|
i,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"b37f3f6d"
|
|
18
18
|
);
|
|
19
19
|
const d = n.exports;
|
|
20
20
|
export {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import n from "./ContentView.vue2.js";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var o = function() {
|
|
4
4
|
var a = this, s = a._self._c, t = a._self._setupProxy;
|
|
5
5
|
return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
|
|
6
6
|
return a.$emit("back-to-inbox");
|
|
7
|
-
} } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
|
|
8
|
-
},
|
|
7
|
+
} } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
|
|
8
|
+
}, c = [], i = /* @__PURE__ */ e(
|
|
9
9
|
n,
|
|
10
|
+
o,
|
|
10
11
|
c,
|
|
11
|
-
i,
|
|
12
12
|
!1,
|
|
13
13
|
null,
|
|
14
14
|
null
|
|
15
15
|
);
|
|
16
|
-
const d =
|
|
16
|
+
const d = i.exports;
|
|
17
17
|
export {
|
|
18
18
|
d as default
|
|
19
19
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var e = this,
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
|
|
7
|
+
}, i = [], a = /* @__PURE__ */ n(
|
|
8
|
+
o,
|
|
9
|
+
r,
|
|
10
|
+
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"3bf5c743"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const d = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
d as default
|
|
18
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as m } from "vue";
|
|
2
2
|
import { useConfig as f } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useBack as p } from "../../../composables/useGuidoActions.js";
|
|
4
4
|
import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
|
|
@@ -7,14 +7,14 @@ import { useVersionHistoryApi as k } from "../../../composables/useVersionHistor
|
|
|
7
7
|
import { useEditorStore as B } from "../../../stores/editor.js";
|
|
8
8
|
import { InButtonV2 as b } from "@useinsider/design-system-vue";
|
|
9
9
|
import _ from "./version-history/RestoreButton.vue.js";
|
|
10
|
-
const
|
|
10
|
+
const S = /* @__PURE__ */ c({
|
|
11
11
|
__name: "LeftSlot",
|
|
12
12
|
setup(v) {
|
|
13
|
-
const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(),
|
|
13
|
+
const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(), u = m(() => {
|
|
14
14
|
var s, a;
|
|
15
15
|
return o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : (a = (s = t.value) == null ? void 0 : s.ui) != null && a.backButtonLabel ? t.value.ui.backButtonLabel : e("email-editor.back-to-design");
|
|
16
16
|
});
|
|
17
|
-
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel:
|
|
17
|
+
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: u, handleBackClick: () => {
|
|
18
18
|
if (o.isVersionHistoryOpen) {
|
|
19
19
|
i();
|
|
20
20
|
return;
|
|
@@ -23,10 +23,10 @@ const h = /* @__PURE__ */ u({
|
|
|
23
23
|
n();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
r();
|
|
26
|
+
o.loadingStatus = !0, r();
|
|
27
27
|
}, InButtonV2: b, RestoreButton: _ };
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
S as default
|
|
32
32
|
};
|
|
@@ -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
|
};
|