@useinsider/guido 2.0.0-beta.4f6e85f → 2.0.0-beta.522e9d9
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 +0 -2
- package/dist/@types/config/schemas.js +39 -55
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +17 -15
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +8 -8
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +17 -13
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -8
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +18 -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 +12 -11
- 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/LeftSlot.vue.js +9 -9
- package/dist/components/organisms/header/LeftSlot.vue2.js +13 -14
- package/dist/components/organisms/header/MiddleSlot.vue.js +5 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -13
- package/dist/components/organisms/header/RightSlot.vue.js +12 -12
- package/dist/components/organisms/header/RightSlot.vue2.js +26 -20
- 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/useConfig.js +27 -29
- package/dist/composables/useSave.js +11 -13
- package/dist/composables/useStripo.js +40 -40
- package/dist/config/migrator/index.js +8 -9
- 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/Items/block.js +40 -39
- package/dist/extensions/Blocks/Items/controls/button/link.js +29 -22
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +46 -66
- package/dist/extensions/Blocks/Items/controls/image/link.js +30 -23
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +17 -19
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +29 -31
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +36 -36
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +19 -21
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +27 -29
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +143 -152
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -43
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +3 -4
- package/dist/extensions/Blocks/Items/extension.js +6 -7
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +49 -58
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +59 -48
- package/dist/extensions/Blocks/Items/settingsPanel.js +26 -27
- package/dist/extensions/Blocks/Items/store/items-block.js +7 -11
- package/dist/extensions/Blocks/Items/template.js +129 -366
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +17 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +28 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +76 -0
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +46 -0
- 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 +30 -29
- package/dist/extensions/Blocks/controlFactories.js +45 -55
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +285 -364
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +10 -6
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +0 -30
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +0 -8
- 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/Items/controls/button/link.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -9
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +4 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +26 -24
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -22
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +23 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +32 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +50 -0
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +8 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +10 -9
- package/dist/src/stores/config.d.ts +1 -164
- 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/stores/config.js +0 -7
- package/dist/utils/pairProductVariables.js +58 -61
- 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/config/migrator/itemsBlockMigrator.js +0 -342
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +0 -93
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +0 -184
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +0 -6
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +0 -18
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -73
- 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,7 +110,6 @@ 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
|
|
114
113
|
},
|
|
115
114
|
|
|
116
115
|
// Optional: Editor settings
|
|
@@ -138,7 +137,6 @@ const config: GuidoConfigInput = {
|
|
|
138
137
|
testMessage?: boolean, // Default: true
|
|
139
138
|
displayConditions?: boolean, // Default: true
|
|
140
139
|
unsubscribe?: boolean, // Default: true
|
|
141
|
-
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
142
140
|
},
|
|
143
141
|
|
|
144
142
|
// 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")
|
|
@@ -71,29 +71,27 @@ const m = {
|
|
|
71
71
|
[]
|
|
72
72
|
),
|
|
73
73
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(a(
|
|
75
|
-
|
|
76
|
-
forceRecreate: e(c(), !1)
|
|
77
|
-
}), f = o({
|
|
74
|
+
selectedUnsubscribePages: e(a(p()), [])
|
|
75
|
+
}), C = o({
|
|
78
76
|
/** Sender display name */
|
|
79
77
|
senderName: e(t(), ""),
|
|
80
78
|
/** Email subject line */
|
|
81
79
|
subject: e(t(), "")
|
|
82
|
-
}),
|
|
80
|
+
}), I = o({
|
|
83
81
|
/** Locale for the editor UI */
|
|
84
82
|
locale: e(t(), "en"),
|
|
85
83
|
/** Path to translations object */
|
|
86
84
|
translationsPath: e(t(), "window.trans.en"),
|
|
87
85
|
/** Migration date for template compatibility */
|
|
88
|
-
migrationDate: e(
|
|
86
|
+
migrationDate: e(p(), 1759696858),
|
|
89
87
|
/** Email header settings */
|
|
90
|
-
emailHeader: e(
|
|
91
|
-
}),
|
|
88
|
+
emailHeader: e(C, { senderName: "", subject: "" })
|
|
89
|
+
}), T = o({
|
|
92
90
|
/** Whether to show the header bar */
|
|
93
91
|
showHeader: e(c(), !0),
|
|
94
92
|
/** Custom label for back button (if shown) */
|
|
95
93
|
backButtonLabel: e(t())
|
|
96
|
-
}),
|
|
94
|
+
}), A = o({
|
|
97
95
|
/** Enable dynamic content insertion */
|
|
98
96
|
dynamicContent: e(c(), !0),
|
|
99
97
|
/** Enable save as template functionality */
|
|
@@ -108,7 +106,7 @@ const m = {
|
|
|
108
106
|
unsubscribe: e(c(), !0),
|
|
109
107
|
/** Disable modules panel in the editor */
|
|
110
108
|
modulesDisabled: e(c(), !1)
|
|
111
|
-
}),
|
|
109
|
+
}), f = n([
|
|
112
110
|
"amp-accordion",
|
|
113
111
|
"amp-carousel",
|
|
114
112
|
"amp-form-controls",
|
|
@@ -133,7 +131,7 @@ const m = {
|
|
|
133
131
|
]), E = o({
|
|
134
132
|
/** Default blocks to exclude from the editor */
|
|
135
133
|
excludeDefaults: e(
|
|
136
|
-
a(
|
|
134
|
+
a(f),
|
|
137
135
|
[]
|
|
138
136
|
),
|
|
139
137
|
/** Custom blocks to include in the editor */
|
|
@@ -147,7 +145,7 @@ const m = {
|
|
|
147
145
|
/** Human-readable description */
|
|
148
146
|
description: e(t()),
|
|
149
147
|
/** Priority for rule ordering (lower = earlier) */
|
|
150
|
-
priority:
|
|
148
|
+
priority: p()
|
|
151
149
|
}), N = o({
|
|
152
150
|
...l.entries,
|
|
153
151
|
type: r("replace"),
|
|
@@ -175,32 +173,21 @@ const m = {
|
|
|
175
173
|
...l.entries,
|
|
176
174
|
type: r("custom"),
|
|
177
175
|
/** Custom processor function */
|
|
178
|
-
processor:
|
|
179
|
-
(
|
|
176
|
+
processor: b(
|
|
177
|
+
(d) => typeof d == "function",
|
|
180
178
|
"processor must be a function"
|
|
181
179
|
)
|
|
182
|
-
}),
|
|
180
|
+
}), B = S("type", [
|
|
183
181
|
N,
|
|
184
182
|
O,
|
|
185
183
|
L,
|
|
186
184
|
v
|
|
187
|
-
]),
|
|
185
|
+
]), P = o({
|
|
188
186
|
/** Custom compiler rules to apply */
|
|
189
|
-
customRules: e(a(
|
|
187
|
+
customRules: e(a(B), []),
|
|
190
188
|
/** Skip default compiler rules */
|
|
191
189
|
ignoreDefaultRules: e(c(), !1)
|
|
192
|
-
}),
|
|
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({
|
|
190
|
+
}), x = o({
|
|
204
191
|
// Required sections
|
|
205
192
|
/** Identity configuration (required) */
|
|
206
193
|
identity: h,
|
|
@@ -210,38 +197,35 @@ const m = {
|
|
|
210
197
|
/** Template content and presets */
|
|
211
198
|
template: e(R, {}),
|
|
212
199
|
/** Editor settings */
|
|
213
|
-
editor: e(
|
|
200
|
+
editor: e(I, {}),
|
|
214
201
|
/** UI configuration */
|
|
215
|
-
ui: e(
|
|
202
|
+
ui: e(T, {}),
|
|
216
203
|
/** Feature toggles */
|
|
217
|
-
features: e(
|
|
204
|
+
features: e(A, {}),
|
|
218
205
|
/** Block configuration */
|
|
219
206
|
blocks: e(E, {}),
|
|
220
207
|
/** Compiler configuration */
|
|
221
|
-
compiler: e(
|
|
222
|
-
/** Callbacks and event handlers */
|
|
223
|
-
callbacks: e(P, {})
|
|
208
|
+
compiler: e(P, {})
|
|
224
209
|
});
|
|
225
210
|
export {
|
|
226
211
|
E as BlocksSchema,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
B as CompilerSchema,
|
|
212
|
+
B as CompilerRuleSchema,
|
|
213
|
+
P as CompilerSchema,
|
|
230
214
|
g as CustomBlockTypeSchema,
|
|
231
215
|
v as CustomRuleSchema,
|
|
232
|
-
|
|
216
|
+
f as DefaultBlockTypeSchema,
|
|
233
217
|
y as DynamicContentSchema,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
218
|
+
I as EditorSchema,
|
|
219
|
+
C as EmailHeaderSchema,
|
|
220
|
+
A as FeaturesSchema,
|
|
221
|
+
x as GuidoConfigSchema,
|
|
238
222
|
h as IdentitySchema,
|
|
239
|
-
|
|
223
|
+
i as MessageType,
|
|
240
224
|
k as PartnerSchema,
|
|
241
225
|
s as ProductType,
|
|
242
226
|
O as RegexRuleSchema,
|
|
243
227
|
L as RemoveRuleSchema,
|
|
244
228
|
N as ReplaceRuleSchema,
|
|
245
229
|
R as TemplateSchema,
|
|
246
|
-
|
|
230
|
+
T as UISchema
|
|
247
231
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as x, defineAsyncComponent as P, ref as B, computed as U, watch as N, 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 ce } from "../stores/unsubscribe.js";
|
|
19
|
+
const Ee = /* @__PURE__ */ x({
|
|
20
20
|
__name: "Guido",
|
|
21
21
|
props: {
|
|
22
22
|
config: null
|
|
@@ -27,19 +27,19 @@ const Ee = /* @__PURE__ */ B({
|
|
|
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 = B(), s = te(), u = ce(), 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: f, username: b, template: o } = n, c = (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: b,
|
|
41
41
|
partnerName: h,
|
|
42
|
-
productType:
|
|
42
|
+
productType: f,
|
|
43
43
|
preselectedDynamicContentList: m,
|
|
44
44
|
onReady: () => {
|
|
45
45
|
console.debug("guido:ready"), t("ready");
|
|
@@ -63,26 +63,28 @@ const Ee = /* @__PURE__ */ B({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const E = (e) => {
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
66
|
+
console.debug("dynamic-content:close", e), s.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
|
+
N(() => 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: R } = T.detail;
|
|
75
|
+
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, R);
|
|
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
|
|
82
|
+
html: c && await W(c),
|
|
83
|
+
css: g,
|
|
84
|
+
forceRecreate: !0
|
|
85
|
+
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
84
86
|
};
|
|
85
|
-
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e),
|
|
87
|
+
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), s.selectedDynamicContentList = m;
|
|
86
88
|
} catch (e) {
|
|
87
89
|
console.error("Failed to initialize Stripo editor:", e);
|
|
88
90
|
}
|
|
@@ -102,7 +104,7 @@ const Ee = /* @__PURE__ */ B({
|
|
|
102
104
|
},
|
|
103
105
|
hasChanges: r,
|
|
104
106
|
saveSilent: v
|
|
105
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore:
|
|
107
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: s, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: f, username: b, templateConfig: o, html: c, 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: $ };
|
|
106
108
|
}
|
|
107
109
|
});
|
|
108
110
|
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,22 +1,22 @@
|
|
|
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
|
-
}, l = [],
|
|
12
|
-
|
|
11
|
+
}, l = [], c = /* @__PURE__ */ a(
|
|
12
|
+
i,
|
|
13
13
|
n,
|
|
14
14
|
l,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"a00b5f5f"
|
|
18
18
|
);
|
|
19
|
-
const _ =
|
|
19
|
+
const _ = c.exports;
|
|
20
20
|
export {
|
|
21
21
|
_ as default
|
|
22
22
|
};
|
|
@@ -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,19 @@
|
|
|
1
1
|
import o from "./AmpToggle.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
2
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
3
|
+
var a = function() {
|
|
5
4
|
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
6
|
-
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2
|
|
5
|
+
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-2", 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
6
|
return e.previewStore.openErrorModal();
|
|
8
7
|
} } }) : r._e()], 1)]);
|
|
9
|
-
},
|
|
8
|
+
}, i = [], s = /* @__PURE__ */ n(
|
|
10
9
|
o,
|
|
11
|
-
s,
|
|
12
10
|
a,
|
|
11
|
+
i,
|
|
13
12
|
!1,
|
|
14
13
|
null,
|
|
15
|
-
|
|
14
|
+
null
|
|
16
15
|
);
|
|
17
|
-
const
|
|
16
|
+
const p = s.exports;
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
p as default
|
|
20
19
|
};
|
|
@@ -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
|
});
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./DesktopPreview.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
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 allow-popups-to-escape-sandbox", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
|
|
11
|
-
}, i = [], n = /* @__PURE__ */ a(
|
|
12
|
-
o,
|
|
13
|
-
s,
|
|
4
|
+
var i = function() {
|
|
5
|
+
var t = this, e = t._self._c, s = t._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" }, [t._v(" " + t._s(s.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e("div", { staticClass: "desktop-preview__browser-header d-f w-1 f-sh-0" }, [e("img", { staticClass: "desktop-preview__browser-header-left f-sh-0", attrs: { alt: "", src: s.desktopMockupLeft } }), e("div", { staticClass: "desktop-preview__browser-header-center f-g-1", style: s.centerBackgroundStyle }), e("img", { staticClass: "desktop-preview__browser-header-right f-sh-0", attrs: { alt: "", src: s.desktopMockupRight } })]), 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" }, [s.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: s.previewStore.previewHtml } }) : t._e()])])])]);
|
|
7
|
+
}, o = [], p = /* @__PURE__ */ a(
|
|
8
|
+
r,
|
|
14
9
|
i,
|
|
10
|
+
o,
|
|
15
11
|
!1,
|
|
16
12
|
null,
|
|
17
|
-
"
|
|
13
|
+
"82218604"
|
|
18
14
|
);
|
|
19
|
-
const
|
|
15
|
+
const n = p.exports;
|
|
20
16
|
export {
|
|
21
|
-
|
|
17
|
+
n as default
|
|
22
18
|
};
|
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as m, ref as s, computed as p, onMounted as u, onBeforeUnmount as f, nextTick as l } from "vue";
|
|
2
|
+
import { useTranslations as d } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import k from "../../../../static/assets/desktop/desktop-mockup-center.svg.js";
|
|
4
|
+
import _ from "../../../../static/assets/desktop/desktop-mockup-left.svg.js";
|
|
5
|
+
import v from "../../../../static/assets/desktop/desktop-mockup-right.svg.js";
|
|
6
|
+
import { usePreviewStore as g } from "../../../../stores/preview.js";
|
|
7
|
+
const x = /* @__PURE__ */ m({
|
|
7
8
|
__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
|
-
};
|
|
9
|
+
setup(w) {
|
|
10
|
+
const c = d(), o = s(), t = s(!1), i = g();
|
|
18
11
|
let e = null;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
const a = p(() => ({
|
|
13
|
+
backgroundImage: `url("${k}")`
|
|
14
|
+
})), n = () => {
|
|
15
|
+
o.value && (e = new ResizeObserver(() => {
|
|
16
|
+
}), e.observe(o.value), l(() => {
|
|
17
|
+
t.value = !0;
|
|
22
18
|
}));
|
|
23
|
-
},
|
|
19
|
+
}, r = () => {
|
|
24
20
|
e == null || e.disconnect();
|
|
25
21
|
};
|
|
26
|
-
return
|
|
22
|
+
return u(n), f(r), { __sfc: !0, trans: c, containerRef: o, isContainerReady: t, previewStore: i, resizeObserver: e, centerBackgroundStyle: a, initIframe: n, cleanIframe: r, desktopMockupLeft: _, desktopMockupRight: v };
|
|
27
23
|
}
|
|
28
24
|
});
|
|
29
25
|
export {
|
|
30
|
-
|
|
26
|
+
x as default
|
|
31
27
|
};
|
|
@@ -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 {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import e from "./ContentView.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
4
5
|
var a = this, s = a._self._c, t = a._self._setupProxy;
|
|
5
6
|
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
7
|
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: "
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
} } }, [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("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { ref: "iframeRef", staticClass: "iframe-scaled 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 } })])]);
|
|
9
|
+
}, r = [], c = /* @__PURE__ */ n(
|
|
10
|
+
e,
|
|
11
|
+
i,
|
|
12
|
+
r,
|
|
12
13
|
!1,
|
|
13
14
|
null,
|
|
14
|
-
|
|
15
|
+
"283eeb6b"
|
|
15
16
|
);
|
|
16
|
-
const
|
|
17
|
+
const p = c.exports;
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
p as default
|
|
19
20
|
};
|