@useinsider/guido 3.19.0-beta.e11b9a3 → 3.19.0-beta.e424587
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 -1
- package/dist/@types/config/schemas.js +37 -39
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +82 -79
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
- package/dist/components/organisms/header/EditorActions.vue.js +5 -5
- package/dist/components/organisms/header/EditorActions.vue2.js +46 -83
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
- package/dist/components/wrappers/WpDrawer.vue.js +7 -9
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/composables/useAutoSave.js +44 -46
- package/dist/composables/useCortexBlueprintBridge.js +122 -54
- package/dist/composables/useEmailTemplateApplier.js +111 -50
- package/dist/composables/useHtmlCompiler.js +26 -37
- package/dist/composables/useHtmlValidator.js +0 -2
- package/dist/composables/useSave.js +45 -93
- package/dist/composables/validators/useCouponBlockValidator.js +21 -24
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
- package/dist/config/compiler/itemsCompilerRules.js +14 -5
- package/dist/config/compiler/utils/itemsCompilerUtils.js +48 -21
- package/dist/config/migrator/itemsBlockMigrator.js +245 -253
- package/dist/config/migrator/recommendationMigrator.js +28 -21
- package/dist/config/migrator/recommendationPartnerMigrator.js +36 -30
- package/dist/extensions/Blocks/Items/block.js +78 -67
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/constants/cardWidth.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +1 -1
- package/dist/extensions/Blocks/Items/template.js +219 -204
- package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +3 -1
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/components/Guido.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
- package/dist/src/composables/useAutoSave.d.ts +1 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
- package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
- package/dist/src/composables/useGuidoActions.d.ts +2 -0
- package/dist/src/composables/useHtmlValidator.d.ts +0 -21
- package/dist/src/composables/useSave.d.ts +1 -6
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
- package/dist/src/config/compiler/utils/itemsCompilerUtils.d.ts +5 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +5 -0
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/constants/cardWidth.d.ts +12 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
- package/dist/src/mock/cortexChatStore.d.ts +12 -0
- package/dist/src/stores/config.d.ts +0 -32
- package/dist/src/stores/guido-email-editor.d.ts +20 -10
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/stores/recommendation.d.ts +5 -0
- package/dist/src/utils/dateUtil.d.ts +10 -0
- package/dist/src/utils/genericUtil.d.ts +3 -0
- package/dist/src/utils/liquidProtection.d.ts +3 -0
- package/dist/src/utils/templatePreparation.d.ts +0 -30
- package/dist/static/styles/components/version-history.css.js +2 -6
- package/dist/stores/config.js +67 -84
- package/dist/stores/guido-email-editor.js +3 -1
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/liquidProtection.js +5 -0
- package/dist/utils/pairProductVariables.js +71 -71
- package/dist/utils/templatePreparation.js +36 -39
- package/package.json +1 -1
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -50
- package/dist/composables/useSaveValidation.js +0 -284
- package/dist/composables/useSaveValidationRollout.js +0 -20
- package/dist/enums/save-validation.js +0 -4
- package/dist/services/settingsApi.js +0 -11
- package/dist/src/@types/save-validation.d.ts +0 -19
- package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +0 -2
- package/dist/src/composables/useSaveValidation.d.ts +0 -6
- package/dist/src/composables/useSaveValidationRollout.d.ts +0 -4
- package/dist/src/enums/save-validation.d.ts +0 -27
- package/dist/src/services/settingsApi.d.ts +0 -6
- package/dist/src/stores/save-validation.d.ts +0 -22
- package/dist/src/stores/setup-settings.d.ts +0 -4
- package/dist/stores/save-validation.js +0 -30
- package/dist/stores/setup-settings.js +0 -10
package/README.md
CHANGED
|
@@ -164,7 +164,6 @@ const config: GuidoConfigInput = {
|
|
|
164
164
|
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
165
165
|
autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
|
|
166
166
|
allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
|
|
167
|
-
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
168
167
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
169
168
|
},
|
|
170
169
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
1
|
+
import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
|
|
2
2
|
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as c, transform as y, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as I, union as h, lazy as T } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
@@ -38,7 +38,7 @@ const p = {
|
|
|
38
38
|
name: t(),
|
|
39
39
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
40
40
|
family: t()
|
|
41
|
-
}),
|
|
41
|
+
}), M = a({
|
|
42
42
|
/** Partner/organization name (required) */
|
|
43
43
|
name: i(
|
|
44
44
|
t(),
|
|
@@ -62,7 +62,7 @@ const p = {
|
|
|
62
62
|
username: e(t(), "Guido User"),
|
|
63
63
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
64
64
|
fallbackFont: e(L)
|
|
65
|
-
}),
|
|
65
|
+
}), E = a({
|
|
66
66
|
/** Display text for the dynamic content */
|
|
67
67
|
text: t(),
|
|
68
68
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -76,17 +76,17 @@ const p = {
|
|
|
76
76
|
value: t()
|
|
77
77
|
})
|
|
78
78
|
)
|
|
79
|
-
}),
|
|
79
|
+
}), f = T(() => C({
|
|
80
80
|
text: e(t()),
|
|
81
81
|
// eslint-disable-next-line camelcase -- backend field name
|
|
82
82
|
tag_text: e(t()),
|
|
83
83
|
value: e(t()),
|
|
84
|
-
children: e(c(
|
|
84
|
+
children: e(c(f)),
|
|
85
85
|
// eslint-disable-next-line camelcase -- backend field name
|
|
86
|
-
select_items: e(c(
|
|
86
|
+
select_items: e(c(f))
|
|
87
87
|
})), N = g(
|
|
88
88
|
t(),
|
|
89
|
-
R(c(
|
|
89
|
+
R(c(f), [])
|
|
90
90
|
), P = C({
|
|
91
91
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
92
92
|
id: e(s()),
|
|
@@ -132,7 +132,7 @@ const p = {
|
|
|
132
132
|
isPriceMovedToNextLine: e(o()),
|
|
133
133
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
134
134
|
isPriceDeletedForZeroSale: e(o())
|
|
135
|
-
}),
|
|
135
|
+
}), x = a({
|
|
136
136
|
/**
|
|
137
137
|
* Legacy recommendation block configs keyed by block ID.
|
|
138
138
|
* Pass this when loading a template authored with the v1
|
|
@@ -143,14 +143,14 @@ const p = {
|
|
|
143
143
|
g(t(), P),
|
|
144
144
|
{}
|
|
145
145
|
)
|
|
146
|
-
}),
|
|
146
|
+
}), D = a({
|
|
147
147
|
/** Initial HTML content */
|
|
148
148
|
html: e(t(), ""),
|
|
149
149
|
/** Initial CSS content */
|
|
150
150
|
css: e(t(), ""),
|
|
151
151
|
/** Preselected dynamic content items */
|
|
152
152
|
preselectedDynamicContent: e(
|
|
153
|
-
c(
|
|
153
|
+
c(E),
|
|
154
154
|
[]
|
|
155
155
|
),
|
|
156
156
|
/**
|
|
@@ -194,13 +194,13 @@ const p = {
|
|
|
194
194
|
)
|
|
195
195
|
),
|
|
196
196
|
/** Migration-only inputs (legacy block configs) */
|
|
197
|
-
migration: e(
|
|
198
|
-
}),
|
|
197
|
+
migration: e(x, {})
|
|
198
|
+
}), O = a({
|
|
199
199
|
/** Sender display name */
|
|
200
200
|
senderName: e(t(), ""),
|
|
201
201
|
/** Email subject line */
|
|
202
202
|
subject: e(t(), "")
|
|
203
|
-
}),
|
|
203
|
+
}), v = a({
|
|
204
204
|
/** Locale for the editor UI */
|
|
205
205
|
locale: e(t(), "en"),
|
|
206
206
|
/** Path to translations object */
|
|
@@ -208,11 +208,11 @@ const p = {
|
|
|
208
208
|
/** Migration date for template compatibility */
|
|
209
209
|
migrationDate: e(s(), 1759696858),
|
|
210
210
|
/** Email header settings */
|
|
211
|
-
emailHeader: e(
|
|
211
|
+
emailHeader: e(O, { senderName: "", subject: "" }),
|
|
212
212
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
213
|
-
savedModulesFolderName: e(t(),
|
|
213
|
+
savedModulesFolderName: e(t(), S.SAVED_MODULES),
|
|
214
214
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
215
|
-
defaultModulesFolderName: e(t(),
|
|
215
|
+
defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
|
|
216
216
|
}), F = a({
|
|
217
217
|
/** Whether to show the header bar */
|
|
218
218
|
showHeader: e(o(), !0),
|
|
@@ -241,10 +241,8 @@ const p = {
|
|
|
241
241
|
allowlistEnabled: e(o(), !1),
|
|
242
242
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
243
243
|
linkTrackingIds: e(o(), !1),
|
|
244
|
-
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
245
|
-
allowSaveWithErrors: e(o(), !0),
|
|
246
244
|
reusableRecommendationStrategy: e(o(), !1)
|
|
247
|
-
}),
|
|
245
|
+
}), B = m([
|
|
248
246
|
"amp-accordion",
|
|
249
247
|
"amp-carousel",
|
|
250
248
|
"amp-form-controls",
|
|
@@ -258,7 +256,7 @@ const p = {
|
|
|
258
256
|
"text-block",
|
|
259
257
|
"timer-block",
|
|
260
258
|
"video-block"
|
|
261
|
-
]),
|
|
259
|
+
]), w = m([
|
|
262
260
|
"dynamic-content",
|
|
263
261
|
"checkbox-block",
|
|
264
262
|
"radio-button-block",
|
|
@@ -269,12 +267,12 @@ const p = {
|
|
|
269
267
|
]), j = a({
|
|
270
268
|
/** Default blocks to exclude from the editor */
|
|
271
269
|
excludeDefaults: e(
|
|
272
|
-
c(
|
|
270
|
+
c(B),
|
|
273
271
|
[]
|
|
274
272
|
),
|
|
275
273
|
/** Custom blocks to include in the editor */
|
|
276
274
|
includeCustoms: e(
|
|
277
|
-
c(
|
|
275
|
+
c(w),
|
|
278
276
|
[]
|
|
279
277
|
)
|
|
280
278
|
}), d = a({
|
|
@@ -325,7 +323,7 @@ const p = {
|
|
|
325
323
|
customRules: e(c(V), []),
|
|
326
324
|
/** Skip default compiler rules */
|
|
327
325
|
ignoreDefaultRules: e(o(), !1)
|
|
328
|
-
}),
|
|
326
|
+
}), Z = a({
|
|
329
327
|
/**
|
|
330
328
|
* External validation handler called before save completes.
|
|
331
329
|
* Return false to cancel the save operation.
|
|
@@ -336,17 +334,17 @@ const p = {
|
|
|
336
334
|
"externalValidation must be a function"
|
|
337
335
|
)
|
|
338
336
|
)
|
|
339
|
-
}),
|
|
337
|
+
}), Q = a({
|
|
340
338
|
// Required sections
|
|
341
339
|
/** Identity configuration (required) */
|
|
342
340
|
identity: A,
|
|
343
341
|
/** Partner configuration (required) */
|
|
344
|
-
partner:
|
|
342
|
+
partner: M,
|
|
345
343
|
// Optional sections (with defaults)
|
|
346
344
|
/** Template content and presets */
|
|
347
|
-
template: e(
|
|
345
|
+
template: e(D, {}),
|
|
348
346
|
/** Editor settings */
|
|
349
|
-
editor: e(
|
|
347
|
+
editor: e(v, {}),
|
|
350
348
|
/** UI configuration */
|
|
351
349
|
ui: e(F, {}),
|
|
352
350
|
/** Feature toggles */
|
|
@@ -356,33 +354,33 @@ const p = {
|
|
|
356
354
|
/** Compiler configuration */
|
|
357
355
|
compiler: e(z, {}),
|
|
358
356
|
/** Callbacks and event handlers */
|
|
359
|
-
callbacks: e(
|
|
357
|
+
callbacks: e(Z, {})
|
|
360
358
|
});
|
|
361
359
|
export {
|
|
362
360
|
j as BlocksSchema,
|
|
363
|
-
|
|
361
|
+
Z as CallbacksSchema,
|
|
364
362
|
V as CompilerRuleSchema,
|
|
365
363
|
z as CompilerSchema,
|
|
366
|
-
|
|
364
|
+
w as CustomBlockTypeSchema,
|
|
367
365
|
G as CustomRuleSchema,
|
|
368
|
-
|
|
366
|
+
B as DefaultBlockTypeSchema,
|
|
369
367
|
N as DynamicContentListSchema,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
368
|
+
f as DynamicContentNodeSchema,
|
|
369
|
+
E as DynamicContentSchema,
|
|
370
|
+
v as EditorSchema,
|
|
371
|
+
O as EmailHeaderSchema,
|
|
374
372
|
L as FallbackFontSchema,
|
|
375
373
|
U as FeaturesSchema,
|
|
376
|
-
|
|
374
|
+
Q as GuidoConfigSchema,
|
|
377
375
|
A as IdentitySchema,
|
|
378
376
|
P as LegacyRecommendationConfigSchema,
|
|
379
377
|
p as MessageType,
|
|
380
|
-
|
|
378
|
+
M as PartnerSchema,
|
|
381
379
|
l as ProductType,
|
|
382
380
|
_ as RegexRuleSchema,
|
|
383
381
|
q as RemoveRuleSchema,
|
|
384
382
|
H as ReplaceRuleSchema,
|
|
385
|
-
|
|
386
|
-
|
|
383
|
+
x as TemplateMigrationSchema,
|
|
384
|
+
D as TemplateSchema,
|
|
387
385
|
F as UISchema
|
|
388
386
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, s = [], n = /* @__PURE__ */
|
|
9
|
+
}, s = [], n = /* @__PURE__ */ t(
|
|
10
10
|
o,
|
|
11
|
-
|
|
11
|
+
i,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"c404d230"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const g = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
g as default
|
|
20
20
|
};
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { provideGuidoActions as
|
|
5
|
-
import { useGuidoStateBridge as
|
|
6
|
-
import { usePartner as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
import { useUnsubscribeStore as Be } from "../stores/unsubscribe.js";
|
|
31
|
-
import { readTrackFloor as z } from "../utils/linkTrackingIds.js";
|
|
32
|
-
const ut = /* @__PURE__ */ ie({
|
|
1
|
+
import { defineComponent as ae, defineAsyncComponent as m, ref as W, computed as p, watch as G, onMounted as se, onUnmounted as ie } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ce } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as de } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as me } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as le } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as ue } from "../composables/usePartner.js";
|
|
7
|
+
import { useStripo as pe } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as fe } from "../composables/useTimerClone.js";
|
|
9
|
+
import { migrate as z } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as H } from "../enums/defaults.js";
|
|
11
|
+
import { RIBBON_SELECTOR as ye } from "../enums/onboarding.js";
|
|
12
|
+
import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
+
import ge from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import Se from "./organisms/base/AuthErrorModal.vue.js";
|
|
15
|
+
import ve from "./organisms/base/Toaster.vue.js";
|
|
16
|
+
import be from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
17
|
+
import he from "./organisms/header/HeaderWrapper.vue.js";
|
|
18
|
+
import Ee from "./organisms/LoadingWrapper.vue.js";
|
|
19
|
+
import we from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
20
|
+
import Ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
21
|
+
import { useStripoApi as De } from "../services/stripoApi.js";
|
|
22
|
+
import { useConfigStore as ke } from "../stores/config.js";
|
|
23
|
+
import { useDynamicContentStore as Fe } from "../stores/dynamic-content.js";
|
|
24
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
25
|
+
import { usePreviewStore as Me } from "../stores/preview.js";
|
|
26
|
+
import { useTemplateStore as Re } from "../stores/template.js";
|
|
27
|
+
import { useUnsubscribeStore as Te } from "../stores/unsubscribe.js";
|
|
28
|
+
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
29
|
+
const rt = /* @__PURE__ */ ae({
|
|
33
30
|
__name: "Guido",
|
|
34
31
|
props: {
|
|
35
32
|
config: null,
|
|
@@ -37,44 +34,44 @@ const ut = /* @__PURE__ */ ie({
|
|
|
37
34
|
},
|
|
38
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
39
36
|
setup(q, { expose: K, emit: r }) {
|
|
40
|
-
const s = q,
|
|
37
|
+
const s = q, V = m(
|
|
41
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
42
|
-
),
|
|
39
|
+
), j = m(
|
|
43
40
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
44
|
-
),
|
|
41
|
+
), J = m(
|
|
45
42
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
46
|
-
),
|
|
43
|
+
), Q = m(
|
|
47
44
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
48
|
-
),
|
|
45
|
+
), X = m(
|
|
49
46
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
50
|
-
),
|
|
47
|
+
), C = W(), f = W(), y = Fe(), D = Te(), o = ke();
|
|
51
48
|
s.ready && o.init(s.config);
|
|
52
|
-
const c =
|
|
49
|
+
const c = w(), Y = Me(), l = p(() => c.hasChanges), { isTestPartner: Z } = ue(), k = () => {
|
|
53
50
|
var t;
|
|
54
|
-
return (t =
|
|
55
|
-
},
|
|
51
|
+
return (t = C.value) == null ? void 0 : t.handleSave(!0);
|
|
52
|
+
}, F = (t) => {
|
|
56
53
|
c.loadingStatus = t;
|
|
57
54
|
};
|
|
58
|
-
|
|
59
|
-
const
|
|
55
|
+
ce(), le();
|
|
56
|
+
const g = () => {
|
|
60
57
|
var t, e;
|
|
61
58
|
return {
|
|
62
59
|
emailId: o.templateId,
|
|
63
60
|
userId: o.userId,
|
|
64
61
|
username: o.username,
|
|
65
62
|
partnerName: o.partnerName,
|
|
66
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
67
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
63
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || H.SAVED_MODULES,
|
|
64
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || H.DEFAULT_MODULES
|
|
68
65
|
};
|
|
69
|
-
}, { initPlugin:
|
|
70
|
-
let
|
|
71
|
-
const { getDefaultTemplate: L } =
|
|
66
|
+
}, { initPlugin: M, preloadRuntime: R } = pe(), { runExclusive: T, beginMount: I, isCurrentMount: S } = de();
|
|
67
|
+
let u = 0;
|
|
68
|
+
const { getDefaultTemplate: L } = De(), { cloneTimersOnSave: U, hasTimerBlocks: A } = fe(), ee = p(() => {
|
|
72
69
|
var t;
|
|
73
70
|
return !((t = o.ui) != null && t.showHeader);
|
|
74
|
-
}),
|
|
75
|
-
() => !!
|
|
71
|
+
}), te = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), oe = p(
|
|
72
|
+
() => !!E().recommendationConfigs.strategyId
|
|
76
73
|
);
|
|
77
|
-
|
|
74
|
+
me({
|
|
78
75
|
onBack: () => {
|
|
79
76
|
console.debug("guido:back"), r("back");
|
|
80
77
|
},
|
|
@@ -82,7 +79,7 @@ const ut = /* @__PURE__ */ ie({
|
|
|
82
79
|
console.debug("guido:save:start"), r("save:start");
|
|
83
80
|
},
|
|
84
81
|
onSaveComplete: (t) => {
|
|
85
|
-
const e = { ...t, metadata:
|
|
82
|
+
const e = { ...t, metadata: g() };
|
|
86
83
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
87
84
|
},
|
|
88
85
|
onTestEmailClick: () => {
|
|
@@ -90,66 +87,72 @@ const ut = /* @__PURE__ */ ie({
|
|
|
90
87
|
}
|
|
91
88
|
});
|
|
92
89
|
const B = (t) => {
|
|
93
|
-
console.debug("dynamic-content:close", t),
|
|
90
|
+
console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
94
91
|
}, N = () => {
|
|
95
92
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
96
93
|
};
|
|
97
94
|
G(() => l.value, () => {
|
|
98
95
|
r("on-change", l.value);
|
|
99
96
|
});
|
|
100
|
-
const
|
|
97
|
+
const v = (t) => {
|
|
101
98
|
const e = t, { attribute: a, position: d } = e.detail;
|
|
102
99
|
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", a, d);
|
|
103
100
|
};
|
|
104
101
|
let i = null;
|
|
105
|
-
const
|
|
102
|
+
const b = () => {
|
|
106
103
|
var e;
|
|
107
|
-
const t = document.querySelector(
|
|
108
|
-
(e =
|
|
109
|
-
},
|
|
104
|
+
const t = document.querySelector(ye);
|
|
105
|
+
(e = f.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
106
|
+
}, h = async () => {
|
|
110
107
|
var t;
|
|
111
108
|
try {
|
|
112
109
|
o.initialized || o.init(s.config), c.templateId = o.templateId;
|
|
113
110
|
const e = o.template, a = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", P = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
114
|
-
|
|
111
|
+
D.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
115
112
|
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, O = o.isFeatureEnabled("linkTrackingIds"), x = {
|
|
116
113
|
partnerName: o.partnerName,
|
|
117
114
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
118
115
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
119
116
|
};
|
|
120
117
|
let n = {
|
|
121
|
-
html: a && await
|
|
118
|
+
html: a && await z(a, _, x),
|
|
122
119
|
css: d
|
|
123
120
|
};
|
|
124
|
-
n.html || (n = await L(), n.html = await
|
|
125
|
-
const
|
|
126
|
-
A(n.html) && (n.html = await U(n.html)), O && (c.trackIdSessionFloor = Math.max(
|
|
127
|
-
const
|
|
121
|
+
n.html || (n = await L(), n.html = await z(n.html, _, x));
|
|
122
|
+
const ne = O ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
123
|
+
A(n.html) && (n.html = await U(n.html)), O && (c.trackIdSessionFloor = Math.max(ne, $(n.html)));
|
|
124
|
+
const re = {
|
|
128
125
|
preselectedDynamicContentList: P,
|
|
129
126
|
onReady: () => {
|
|
130
127
|
console.debug("guido:ready"), r("ready");
|
|
131
128
|
}
|
|
132
129
|
};
|
|
133
|
-
|
|
130
|
+
u = I(), await M(n, g(), re), y.selectedDynamicContentList = P;
|
|
134
131
|
} catch (e) {
|
|
135
132
|
console.error("Failed to initialize Stripo editor:", e);
|
|
136
133
|
}
|
|
137
134
|
};
|
|
138
|
-
return
|
|
135
|
+
return se(async () => {
|
|
139
136
|
var e;
|
|
140
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
141
|
-
const t = (e =
|
|
142
|
-
if (t && (i = new ResizeObserver(
|
|
143
|
-
await
|
|
137
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), E().$reset(), w().$reset(), Re().$reset(), b();
|
|
138
|
+
const t = (e = f.value) == null ? void 0 : e.parentElement;
|
|
139
|
+
if (t && (i = new ResizeObserver(b), i.observe(t)), R(), s.ready)
|
|
140
|
+
await h();
|
|
144
141
|
else {
|
|
145
142
|
const a = G(() => s.ready, (d) => {
|
|
146
|
-
d && (a(),
|
|
143
|
+
d && (a(), h());
|
|
147
144
|
});
|
|
148
145
|
}
|
|
149
|
-
document.addEventListener("dynamic-content:open",
|
|
150
|
-
}),
|
|
151
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
152
|
-
|
|
146
|
+
document.addEventListener("dynamic-content:open", v);
|
|
147
|
+
}), ie(() => {
|
|
148
|
+
if (i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), E().disposeStrategyPageReturn(), S(u))
|
|
149
|
+
try {
|
|
150
|
+
w().isStripoInitialized = !1;
|
|
151
|
+
} catch (t) {
|
|
152
|
+
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
153
|
+
}
|
|
154
|
+
T(async () => {
|
|
155
|
+
if (S(u))
|
|
153
156
|
try {
|
|
154
157
|
window.UIEditor.removeEditor();
|
|
155
158
|
} catch {
|
|
@@ -162,11 +165,11 @@ const ut = /* @__PURE__ */ ie({
|
|
|
162
165
|
close: N
|
|
163
166
|
},
|
|
164
167
|
hasChanges: l,
|
|
165
|
-
saveSilent:
|
|
166
|
-
setLoading:
|
|
167
|
-
}), { __sfc: !0, PreviewContainer:
|
|
168
|
+
saveSilent: k,
|
|
169
|
+
setLoading: F
|
|
170
|
+
}), { __sfc: !0, PreviewContainer: V, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, LegacyStrategyUpdatedModal: X, headerWrapperRef: C, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: D, props: s, configStore: o, editorStore: c, previewStore: Y, hasChanges: l, isTestPartner: Z, saveSilent: k, setLoading: F, emit: r, buildMetadata: g, initPlugin: M, preloadRuntime: R, runExclusive: T, beginMount: I, isCurrentMount: S, mountGeneration: u, getDefaultTemplate: L, cloneTimersOnSave: U, hasTimerBlocks: A, noHeader: ee, isRrsEnabled: te, hasAssignedStrategy: oe, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: b, startEditor: h, AutoSaveController: ge, AuthErrorModal: Se, Toaster: ve, FilterSelectionDrawer: be, HeaderWrapper: he, LoadingWrapper: Ee, SaveAsTemplateDrawer: we, UnsubscribeWrapper: Ce };
|
|
168
171
|
}
|
|
169
172
|
});
|
|
170
173
|
export {
|
|
171
|
-
|
|
174
|
+
rt as default
|
|
172
175
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
|
|
5
|
-
import { useConfigStore as m } from "../../stores/config.js";
|
|
6
|
-
const d = /* @__PURE__ */ n({
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { useAutoSave as r } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as s } from "../../composables/useSave.js";
|
|
4
|
+
const f = /* @__PURE__ */ t({
|
|
7
5
|
__name: "AutoSaveController",
|
|
8
|
-
setup(
|
|
9
|
-
const { save: e
|
|
10
|
-
return
|
|
6
|
+
setup(a) {
|
|
7
|
+
const { save: e } = s(), o = () => e(!1, !0);
|
|
8
|
+
return r(o), { __sfc: !0, save: e, backgroundSave: o };
|
|
11
9
|
}
|
|
12
10
|
});
|
|
13
11
|
export {
|
|
14
|
-
|
|
12
|
+
f as default
|
|
15
13
|
};
|
|
@@ -4,20 +4,20 @@ import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
4
4
|
var u = function() {
|
|
5
5
|
var s, i, n, a;
|
|
6
6
|
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
7
|
-
return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "
|
|
7
|
+
return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(r) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
9
|
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
12
|
+
}, c = [], p = /* @__PURE__ */ d(
|
|
13
13
|
l,
|
|
14
14
|
u,
|
|
15
|
-
|
|
15
|
+
c,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"c61cc8ea"
|
|
19
19
|
);
|
|
20
|
-
const v =
|
|
20
|
+
const v = p.exports;
|
|
21
21
|
export {
|
|
22
22
|
v as default
|
|
23
23
|
};
|