@useinsider/guido 3.19.0-beta.f0d5980 → 3.19.0-beta.f4a9ef5
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 +1 -0
- package/dist/@types/config/schemas.js +39 -37
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +56 -53
- package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
- package/dist/components/organisms/header/EditorActions.vue.js +2 -2
- package/dist/components/organisms/header/EditorActions.vue2.js +90 -55
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +49 -0
- package/dist/components/wrappers/WpDrawer.vue.js +9 -7
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/composables/useAutoSave.js +11 -11
- package/dist/composables/useHtmlCompiler.js +37 -26
- package/dist/composables/useHtmlValidator.js +2 -0
- package/dist/composables/useSave.js +90 -45
- package/dist/composables/useSaveValidation.js +282 -0
- package/dist/composables/useSaveValidationRollout.js +9 -0
- package/dist/composables/validators/useCouponBlockValidator.js +24 -21
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
- package/dist/config/migrator/recommendationMigrator.js +28 -21
- package/dist/config/migrator/recommendationPartnerMigrator.js +36 -30
- package/dist/enums/save-validation.js +4 -0
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/@types/save-validation.d.ts +19 -0
- package/dist/src/components/Guido.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
- package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +2 -0
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useGuidoActions.d.ts +2 -0
- package/dist/src/composables/useHtmlValidator.d.ts +21 -0
- package/dist/src/composables/useSave.d.ts +6 -1
- package/dist/src/composables/useSaveValidation.d.ts +6 -0
- package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
- package/dist/src/enums/save-validation.d.ts +27 -0
- package/dist/src/mock/cortexChatStore.d.ts +12 -0
- package/dist/src/stores/config.d.ts +32 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/stores/recommendation.d.ts +5 -0
- package/dist/src/stores/save-validation.d.ts +22 -0
- package/dist/src/utils/dateUtil.d.ts +10 -0
- package/dist/src/utils/genericUtil.d.ts +3 -0
- package/dist/src/utils/templatePreparation.d.ts +30 -0
- package/dist/stores/config.js +84 -67
- package/dist/stores/onboarding.js +4 -0
- package/dist/stores/save-validation.js +30 -0
- package/dist/utils/templatePreparation.js +39 -36
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,6 +164,7 @@ 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).
|
|
167
168
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
168
169
|
},
|
|
169
170
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
1
|
+
import { ModuleFolderDefaults as f } 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
|
+
}), E = 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
|
+
}), M = 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
|
+
}), S = 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(S)),
|
|
85
85
|
// eslint-disable-next-line camelcase -- backend field name
|
|
86
|
-
select_items: e(c(
|
|
86
|
+
select_items: e(c(S))
|
|
87
87
|
})), N = g(
|
|
88
88
|
t(),
|
|
89
|
-
R(c(
|
|
89
|
+
R(c(S), [])
|
|
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
|
+
}), v = 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
|
+
}), x = 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(M),
|
|
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(v, {})
|
|
198
|
+
}), D = a({
|
|
199
199
|
/** Sender display name */
|
|
200
200
|
senderName: e(t(), ""),
|
|
201
201
|
/** Email subject line */
|
|
202
202
|
subject: e(t(), "")
|
|
203
|
-
}),
|
|
203
|
+
}), O = 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(D, { 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(), f.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(), f.DEFAULT_MODULES)
|
|
216
216
|
}), F = a({
|
|
217
217
|
/** Whether to show the header bar */
|
|
218
218
|
showHeader: e(o(), !0),
|
|
@@ -241,8 +241,10 @@ 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),
|
|
244
246
|
reusableRecommendationStrategy: e(o(), !1)
|
|
245
|
-
}),
|
|
247
|
+
}), w = m([
|
|
246
248
|
"amp-accordion",
|
|
247
249
|
"amp-carousel",
|
|
248
250
|
"amp-form-controls",
|
|
@@ -256,7 +258,7 @@ const p = {
|
|
|
256
258
|
"text-block",
|
|
257
259
|
"timer-block",
|
|
258
260
|
"video-block"
|
|
259
|
-
]),
|
|
261
|
+
]), B = m([
|
|
260
262
|
"dynamic-content",
|
|
261
263
|
"checkbox-block",
|
|
262
264
|
"radio-button-block",
|
|
@@ -267,12 +269,12 @@ const p = {
|
|
|
267
269
|
]), j = a({
|
|
268
270
|
/** Default blocks to exclude from the editor */
|
|
269
271
|
excludeDefaults: e(
|
|
270
|
-
c(
|
|
272
|
+
c(w),
|
|
271
273
|
[]
|
|
272
274
|
),
|
|
273
275
|
/** Custom blocks to include in the editor */
|
|
274
276
|
includeCustoms: e(
|
|
275
|
-
c(
|
|
277
|
+
c(B),
|
|
276
278
|
[]
|
|
277
279
|
)
|
|
278
280
|
}), d = a({
|
|
@@ -323,7 +325,7 @@ const p = {
|
|
|
323
325
|
customRules: e(c(V), []),
|
|
324
326
|
/** Skip default compiler rules */
|
|
325
327
|
ignoreDefaultRules: e(o(), !1)
|
|
326
|
-
}),
|
|
328
|
+
}), W = a({
|
|
327
329
|
/**
|
|
328
330
|
* External validation handler called before save completes.
|
|
329
331
|
* Return false to cancel the save operation.
|
|
@@ -334,17 +336,17 @@ const p = {
|
|
|
334
336
|
"externalValidation must be a function"
|
|
335
337
|
)
|
|
336
338
|
)
|
|
337
|
-
}),
|
|
339
|
+
}), K = a({
|
|
338
340
|
// Required sections
|
|
339
341
|
/** Identity configuration (required) */
|
|
340
342
|
identity: A,
|
|
341
343
|
/** Partner configuration (required) */
|
|
342
|
-
partner:
|
|
344
|
+
partner: E,
|
|
343
345
|
// Optional sections (with defaults)
|
|
344
346
|
/** Template content and presets */
|
|
345
|
-
template: e(
|
|
347
|
+
template: e(x, {}),
|
|
346
348
|
/** Editor settings */
|
|
347
|
-
editor: e(
|
|
349
|
+
editor: e(O, {}),
|
|
348
350
|
/** UI configuration */
|
|
349
351
|
ui: e(F, {}),
|
|
350
352
|
/** Feature toggles */
|
|
@@ -354,33 +356,33 @@ const p = {
|
|
|
354
356
|
/** Compiler configuration */
|
|
355
357
|
compiler: e(z, {}),
|
|
356
358
|
/** Callbacks and event handlers */
|
|
357
|
-
callbacks: e(
|
|
359
|
+
callbacks: e(W, {})
|
|
358
360
|
});
|
|
359
361
|
export {
|
|
360
362
|
j as BlocksSchema,
|
|
361
|
-
|
|
363
|
+
W as CallbacksSchema,
|
|
362
364
|
V as CompilerRuleSchema,
|
|
363
365
|
z as CompilerSchema,
|
|
364
|
-
|
|
366
|
+
B as CustomBlockTypeSchema,
|
|
365
367
|
G as CustomRuleSchema,
|
|
366
|
-
|
|
368
|
+
w as DefaultBlockTypeSchema,
|
|
367
369
|
N as DynamicContentListSchema,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
S as DynamicContentNodeSchema,
|
|
371
|
+
M as DynamicContentSchema,
|
|
372
|
+
O as EditorSchema,
|
|
373
|
+
D as EmailHeaderSchema,
|
|
372
374
|
L as FallbackFontSchema,
|
|
373
375
|
U as FeaturesSchema,
|
|
374
|
-
|
|
376
|
+
K as GuidoConfigSchema,
|
|
375
377
|
A as IdentitySchema,
|
|
376
378
|
P as LegacyRecommendationConfigSchema,
|
|
377
379
|
p as MessageType,
|
|
378
|
-
|
|
380
|
+
E as PartnerSchema,
|
|
379
381
|
l as ProductType,
|
|
380
382
|
_ as RegexRuleSchema,
|
|
381
383
|
q as RemoveRuleSchema,
|
|
382
384
|
H as ReplaceRuleSchema,
|
|
383
|
-
|
|
384
|
-
|
|
385
|
+
v as TemplateMigrationSchema,
|
|
386
|
+
x as TemplateSchema,
|
|
385
387
|
F as UISchema
|
|
386
388
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var t = 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.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
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.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), 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__ */ i(
|
|
10
10
|
o,
|
|
11
|
-
|
|
11
|
+
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"1ae93148"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,40 +1,43 @@
|
|
|
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 {
|
|
1
|
+
import { defineComponent as se, defineAsyncComponent as m, ref as x, computed as u, watch as W, onMounted as ie, onUnmounted as ce } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as de } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as me } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as le } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as ue } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as pe } from "../composables/usePartner.js";
|
|
7
|
+
import { useSaveValidationRollout as fe } from "../composables/useSaveValidationRollout.js";
|
|
8
|
+
import { useStripo as ye } from "../composables/useStripo.js";
|
|
9
|
+
import { useTimerClone as ge } from "../composables/useTimerClone.js";
|
|
9
10
|
import { migrate as G } from "../config/migrator/index.js";
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
11
|
-
import { RIBBON_SELECTOR as
|
|
11
|
+
import { ModuleFolderDefaults as V } from "../enums/defaults.js";
|
|
12
|
+
import { RIBBON_SELECTOR as Se } from "../enums/onboarding.js";
|
|
12
13
|
import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
14
|
+
import ve from "./organisms/AutoSaveController.vue.js";
|
|
15
|
+
import be from "./organisms/base/AuthErrorModal.vue.js";
|
|
16
|
+
import he from "./organisms/base/Toaster.vue.js";
|
|
17
|
+
import Ee from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
18
|
+
import we from "./organisms/header/HeaderWrapper.vue.js";
|
|
19
|
+
import De from "./organisms/LoadingWrapper.vue.js";
|
|
20
|
+
import Ce from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
21
|
+
import ke from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
22
|
+
import Re from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
23
|
+
import { useStripoApi as Fe } from "../services/stripoApi.js";
|
|
24
|
+
import { useConfigStore as Me } from "../stores/config.js";
|
|
25
|
+
import { useDynamicContentStore as Te } from "../stores/dynamic-content.js";
|
|
24
26
|
import { useEditorStore as $ } from "../stores/editor.js";
|
|
25
|
-
import { usePreviewStore as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
27
|
+
import { usePreviewStore as Ie } from "../stores/preview.js";
|
|
28
|
+
import { useSaveValidationStore as Le } from "../stores/save-validation.js";
|
|
29
|
+
import { useTemplateStore as Ue } from "../stores/template.js";
|
|
30
|
+
import { useUnsubscribeStore as Ae } from "../stores/unsubscribe.js";
|
|
31
|
+
import { readTrackFloor as H } from "../utils/linkTrackingIds.js";
|
|
32
|
+
const lt = /* @__PURE__ */ se({
|
|
30
33
|
__name: "Guido",
|
|
31
34
|
props: {
|
|
32
35
|
config: null,
|
|
33
36
|
ready: { type: Boolean, default: !0 }
|
|
34
37
|
},
|
|
35
38
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
36
|
-
setup(
|
|
37
|
-
const s =
|
|
39
|
+
setup(z, { expose: q, emit: r }) {
|
|
40
|
+
const s = z, K = m(
|
|
38
41
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
39
42
|
), j = m(
|
|
40
43
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
@@ -44,15 +47,15 @@ const rt = /* @__PURE__ */ ae({
|
|
|
44
47
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
45
48
|
), X = m(
|
|
46
49
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
47
|
-
), E = x(), p = x(), f =
|
|
50
|
+
), E = x(), p = x(), f = Te(), w = Ae(), o = Me();
|
|
48
51
|
s.ready && o.init(s.config);
|
|
49
|
-
const c = $(), Y =
|
|
52
|
+
const c = $(), Y = Ie(), l = u(() => c.hasChanges), { isTestPartner: Z } = pe(), { isEnabled: ee } = fe(), D = () => {
|
|
50
53
|
var t;
|
|
51
54
|
return (t = E.value) == null ? void 0 : t.handleSave(!0);
|
|
52
|
-
},
|
|
55
|
+
}, C = (t) => {
|
|
53
56
|
c.loadingStatus = t;
|
|
54
57
|
};
|
|
55
|
-
|
|
58
|
+
de(), ue();
|
|
56
59
|
const y = () => {
|
|
57
60
|
var t, e;
|
|
58
61
|
return {
|
|
@@ -60,18 +63,18 @@ const rt = /* @__PURE__ */ ae({
|
|
|
60
63
|
userId: o.userId,
|
|
61
64
|
username: o.username,
|
|
62
65
|
partnerName: o.partnerName,
|
|
63
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
64
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
66
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || V.SAVED_MODULES,
|
|
67
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || V.DEFAULT_MODULES
|
|
65
68
|
};
|
|
66
|
-
}, { initPlugin: k, preloadRuntime:
|
|
69
|
+
}, { initPlugin: k, preloadRuntime: R } = ye(), { runExclusive: F, beginMount: M, isCurrentMount: T } = me();
|
|
67
70
|
let g = 0;
|
|
68
|
-
const { getDefaultTemplate: I } =
|
|
71
|
+
const { getDefaultTemplate: I } = Fe(), { cloneTimersOnSave: L, hasTimerBlocks: U } = ge(), te = u(() => {
|
|
69
72
|
var t;
|
|
70
73
|
return !((t = o.ui) != null && t.showHeader);
|
|
71
|
-
}),
|
|
74
|
+
}), oe = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ne = u(
|
|
72
75
|
() => !!h().recommendationConfigs.strategyId
|
|
73
76
|
);
|
|
74
|
-
|
|
77
|
+
le({
|
|
75
78
|
onBack: () => {
|
|
76
79
|
console.debug("guido:back"), r("back");
|
|
77
80
|
},
|
|
@@ -101,7 +104,7 @@ const rt = /* @__PURE__ */ ae({
|
|
|
101
104
|
let i = null;
|
|
102
105
|
const v = () => {
|
|
103
106
|
var e;
|
|
104
|
-
const t = document.querySelector(
|
|
107
|
+
const t = document.querySelector(Se);
|
|
105
108
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
106
109
|
}, b = async () => {
|
|
107
110
|
var t;
|
|
@@ -119,24 +122,24 @@ const rt = /* @__PURE__ */ ae({
|
|
|
119
122
|
css: d
|
|
120
123
|
};
|
|
121
124
|
n.html || (n = await I(), n.html = await G(n.html, P, O));
|
|
122
|
-
const
|
|
123
|
-
U(n.html) && (n.html = await L(n.html)), _ && (c.trackIdSessionFloor = Math.max(
|
|
124
|
-
const
|
|
125
|
+
const re = _ ? H(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
126
|
+
U(n.html) && (n.html = await L(n.html)), _ && (c.trackIdSessionFloor = Math.max(re, H(n.html)));
|
|
127
|
+
const ae = {
|
|
125
128
|
preselectedDynamicContentList: N,
|
|
126
129
|
onReady: () => {
|
|
127
130
|
console.debug("guido:ready"), r("ready");
|
|
128
131
|
}
|
|
129
132
|
};
|
|
130
|
-
g =
|
|
133
|
+
g = M(), await k(n, y(), ae), f.selectedDynamicContentList = N;
|
|
131
134
|
} catch (e) {
|
|
132
135
|
console.error("Failed to initialize Stripo editor:", e);
|
|
133
136
|
}
|
|
134
137
|
};
|
|
135
|
-
return
|
|
138
|
+
return ie(async () => {
|
|
136
139
|
var e;
|
|
137
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), $().$reset(),
|
|
140
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), $().$reset(), Ue().$reset(), Le().$reset(), v();
|
|
138
141
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
139
|
-
if (t && (i = new ResizeObserver(v), i.observe(t)),
|
|
142
|
+
if (t && (i = new ResizeObserver(v), i.observe(t)), R(), s.ready)
|
|
140
143
|
await b();
|
|
141
144
|
else {
|
|
142
145
|
const a = W(() => s.ready, (d) => {
|
|
@@ -144,8 +147,8 @@ const rt = /* @__PURE__ */ ae({
|
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
149
|
document.addEventListener("dynamic-content:open", S);
|
|
147
|
-
}),
|
|
148
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", S), h().disposeStrategyPageReturn(),
|
|
150
|
+
}), ce(() => {
|
|
151
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", S), h().disposeStrategyPageReturn(), F(async () => {
|
|
149
152
|
if (T(g))
|
|
150
153
|
try {
|
|
151
154
|
window.UIEditor.removeEditor();
|
|
@@ -153,17 +156,17 @@ const rt = /* @__PURE__ */ ae({
|
|
|
153
156
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
154
157
|
}
|
|
155
158
|
}), o.reset();
|
|
156
|
-
}),
|
|
159
|
+
}), q({
|
|
157
160
|
dynamicContent: {
|
|
158
161
|
insert: A,
|
|
159
162
|
close: B
|
|
160
163
|
},
|
|
161
164
|
hasChanges: l,
|
|
162
|
-
saveSilent:
|
|
163
|
-
setLoading:
|
|
164
|
-
}), { __sfc: !0, PreviewContainer:
|
|
165
|
+
saveSilent: D,
|
|
166
|
+
setLoading: C
|
|
167
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, LegacyStrategyUpdatedModal: X, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: s, configStore: o, editorStore: c, previewStore: Y, hasChanges: l, isTestPartner: Z, isSaveValidationEnabled: ee, saveSilent: D, setLoading: C, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: R, runExclusive: F, beginMount: M, isCurrentMount: T, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: U, noHeader: te, isRrsEnabled: oe, hasAssignedStrategy: ne, insertDynamicContent: A, closeDynamicContent: B, handleDynamicContentOpen: S, ribbonObserver: i, updateRibbonOffset: v, startEditor: b, AutoSaveController: ve, AuthErrorModal: be, Toaster: he, FilterSelectionDrawer: Ee, HeaderWrapper: we, LoadingWrapper: De, SaveAsTemplateDrawer: Ce, UnsubscribeWrapper: ke, ValidationErrorDrawer: Re };
|
|
165
168
|
}
|
|
166
169
|
});
|
|
167
170
|
export {
|
|
168
|
-
|
|
171
|
+
lt as default
|
|
169
172
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useAutoSave as s } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as n } from "../../composables/useSave.js";
|
|
4
|
+
import { useSaveValidationRollout as u } from "../../composables/useSaveValidationRollout.js";
|
|
5
|
+
const v = /* @__PURE__ */ r({
|
|
5
6
|
__name: "AutoSaveController",
|
|
6
|
-
setup(
|
|
7
|
-
const { save: e } =
|
|
8
|
-
return
|
|
7
|
+
setup(m) {
|
|
8
|
+
const { save: e, saveRawOnly: o } = n(), { isEnabled: t } = u(), a = () => t.value ? o() : e(!1, !0);
|
|
9
|
+
return s(a), { __sfc: !0, save: e, saveRawOnly: o, isEnabled: t, backgroundSave: a };
|
|
9
10
|
}
|
|
10
11
|
});
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
v as default
|
|
13
14
|
};
|
|
@@ -4,7 +4,7 @@ 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", "
|
|
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, "label-text": t.saveLabel, "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);
|
|
@@ -15,7 +15,7 @@ var u = function() {
|
|
|
15
15
|
c,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"2cccbd44"
|
|
19
19
|
);
|
|
20
20
|
const v = p.exports;
|
|
21
21
|
export {
|