@useinsider/guido 3.16.0-beta.20cd2fe → 3.16.0-beta.8645953
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/dist/@types/config/schemas.js +23 -25
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +78 -76
- package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/EditorActions.vue.js +11 -11
- package/dist/components/organisms/header/EditorActions.vue2.js +81 -34
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +42 -25
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
- package/dist/components/organisms/header/RightSlot.vue.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +15 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +34 -43
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +61 -0
- package/dist/components/wrappers/WpDrawer.vue.js +9 -7
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/composables/useHtmlValidator.js +1 -0
- package/dist/composables/useSave.js +84 -41
- package/dist/composables/useSaveValidation.js +276 -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/i18n/en/labels.json.js +4 -28
- package/dist/enums/save-validation.js +4 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +31 -24
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/shared/index.js +28 -40
- package/dist/src/@types/config/schemas.d.ts +0 -4
- 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/wrappers/WpDrawer.vue.d.ts +4 -3
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useHtmlValidator.d.ts +14 -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/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
- package/dist/src/stores/config.d.ts +5 -18
- package/dist/src/stores/editor.d.ts +0 -107
- package/dist/src/stores/onboarding.d.ts +0 -377
- package/dist/src/stores/save-validation.d.ts +22 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/templatePreparation.d.ts +30 -0
- package/dist/src/utils/timeUtil.d.ts +0 -10
- package/dist/stores/config.js +13 -6
- package/dist/stores/editor.js +1 -5
- package/dist/stores/onboarding.js +11 -16
- package/dist/stores/save-validation.js +30 -0
- package/dist/utils/templatePreparation.js +28 -25
- package/dist/utils/timeUtil.js +17 -6
- package/package.json +1 -1
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -21
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -39
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -24
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -18
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -74
- package/dist/composables/useAccessibilityApi.js +0 -31
- package/dist/node_modules/@vueuse/core/index.js +0 -102
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
- /package/dist/src/components/organisms/{header/EditorActionsMenu.vue.d.ts → validation/ValidationErrorDrawer.vue.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as n, optional as e, string as t, picklist as
|
|
1
|
+
import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as k, boolean as o, array as c, transform as C, record as y, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
6
6
|
/** Transactional/system emails */
|
|
7
7
|
TRANSACTIONAL: 2
|
|
8
|
-
},
|
|
8
|
+
}, l = {
|
|
9
9
|
/** Standard email campaigns */
|
|
10
10
|
EMAIL: 60,
|
|
11
11
|
/** Architect journey builder */
|
|
@@ -38,16 +38,16 @@ const p = {
|
|
|
38
38
|
),
|
|
39
39
|
/** Product type identifier */
|
|
40
40
|
productType: e(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
i([
|
|
42
|
+
l.EMAIL,
|
|
43
|
+
l.ARCHITECT,
|
|
44
|
+
l.UNSUBSCRIBE_PAGES
|
|
45
45
|
]),
|
|
46
|
-
|
|
46
|
+
l.EMAIL
|
|
47
47
|
),
|
|
48
48
|
/** Message type (promotional or transactional) */
|
|
49
49
|
messageType: e(
|
|
50
|
-
|
|
50
|
+
i([p.PROMOTIONAL, p.TRANSACTIONAL]),
|
|
51
51
|
p.PROMOTIONAL
|
|
52
52
|
),
|
|
53
53
|
/** Display name for the current user */
|
|
@@ -68,17 +68,17 @@ const p = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}),
|
|
71
|
+
}), S = I(() => g({
|
|
72
72
|
text: e(t()),
|
|
73
73
|
// eslint-disable-next-line camelcase -- backend field name
|
|
74
74
|
tag_text: e(t()),
|
|
75
75
|
value: e(t()),
|
|
76
|
-
children: e(c(
|
|
76
|
+
children: e(c(S)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(
|
|
79
|
-
})), N =
|
|
78
|
+
select_items: e(c(S))
|
|
79
|
+
})), N = y(
|
|
80
80
|
t(),
|
|
81
|
-
R(c(
|
|
81
|
+
R(c(S), [])
|
|
82
82
|
), P = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
@@ -132,7 +132,7 @@ const p = {
|
|
|
132
132
|
* strategy, currency, locale, and layout data.
|
|
133
133
|
*/
|
|
134
134
|
recommendationConfigs: e(
|
|
135
|
-
|
|
135
|
+
y(t(), P),
|
|
136
136
|
{}
|
|
137
137
|
)
|
|
138
138
|
}), x = a({
|
|
@@ -189,9 +189,9 @@ const p = {
|
|
|
189
189
|
/** Email header settings */
|
|
190
190
|
emailHeader: e(D, { senderName: "", subject: "" }),
|
|
191
191
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
192
|
-
savedModulesFolderName: e(t(),
|
|
192
|
+
savedModulesFolderName: e(t(), f.SAVED_MODULES),
|
|
193
193
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
194
|
-
defaultModulesFolderName: e(t(),
|
|
194
|
+
defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
|
|
195
195
|
}), F = a({
|
|
196
196
|
/** Whether to show the header bar */
|
|
197
197
|
showHeader: e(o(), !0),
|
|
@@ -216,13 +216,11 @@ const p = {
|
|
|
216
216
|
liquidSyntax: e(o(), !1),
|
|
217
217
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
218
218
|
autosave: e(o(), !1),
|
|
219
|
-
/** Enable the Stripo Accessibility Checker control in the editor toolbar. */
|
|
220
|
-
accessibilityTesting: e(o(), !1),
|
|
221
219
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
222
220
|
allowlistEnabled: e(o(), !1),
|
|
223
221
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
224
222
|
linkTrackingIds: e(o(), !1)
|
|
225
|
-
}), B =
|
|
223
|
+
}), B = i([
|
|
226
224
|
"amp-accordion",
|
|
227
225
|
"amp-carousel",
|
|
228
226
|
"amp-form-controls",
|
|
@@ -236,7 +234,7 @@ const p = {
|
|
|
236
234
|
"text-block",
|
|
237
235
|
"timer-block",
|
|
238
236
|
"video-block"
|
|
239
|
-
]), w =
|
|
237
|
+
]), w = i([
|
|
240
238
|
"dynamic-content",
|
|
241
239
|
"checkbox-block",
|
|
242
240
|
"radio-button-block",
|
|
@@ -289,7 +287,7 @@ const p = {
|
|
|
289
287
|
...d.entries,
|
|
290
288
|
type: u("custom"),
|
|
291
289
|
/** Custom processor function */
|
|
292
|
-
processor:
|
|
290
|
+
processor: k(
|
|
293
291
|
(s) => typeof s == "function",
|
|
294
292
|
"processor must be a function"
|
|
295
293
|
)
|
|
@@ -309,7 +307,7 @@ const p = {
|
|
|
309
307
|
* Return false to cancel the save operation.
|
|
310
308
|
*/
|
|
311
309
|
externalValidation: e(
|
|
312
|
-
|
|
310
|
+
k(
|
|
313
311
|
(s) => typeof s == "function",
|
|
314
312
|
"externalValidation must be a function"
|
|
315
313
|
)
|
|
@@ -345,7 +343,7 @@ export {
|
|
|
345
343
|
G as CustomRuleSchema,
|
|
346
344
|
B as DefaultBlockTypeSchema,
|
|
347
345
|
N as DynamicContentListSchema,
|
|
348
|
-
|
|
346
|
+
S as DynamicContentNodeSchema,
|
|
349
347
|
E as DynamicContentSchema,
|
|
350
348
|
O as EditorSchema,
|
|
351
349
|
D as EmailHeaderSchema,
|
|
@@ -356,7 +354,7 @@ export {
|
|
|
356
354
|
P as LegacyRecommendationConfigSchema,
|
|
357
355
|
p as MessageType,
|
|
358
356
|
M as PartnerSchema,
|
|
359
|
-
|
|
357
|
+
l as ProductType,
|
|
360
358
|
j as RegexRuleSchema,
|
|
361
359
|
q as RemoveRuleSchema,
|
|
362
360
|
_ as ReplaceRuleSchema,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var o = this, r = o._self._c, e = o._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) : o._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.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
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) : o._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.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : o._e(), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, n = [],
|
|
10
|
-
|
|
9
|
+
}, n = [], d = /* @__PURE__ */ i(
|
|
10
|
+
a,
|
|
11
11
|
t,
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"f02fdde0"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const c = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
c as default
|
|
20
20
|
};
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { provideGuidoActions as
|
|
4
|
-
import { useGuidoStateBridge as
|
|
5
|
-
import { usePartner as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { defineComponent as J, defineAsyncComponent as M, ref as B, computed as U, watch as _, onMounted as Q, onUnmounted as X } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as Y } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as Z } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as ee } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as oe } from "../composables/usePartner.js";
|
|
6
|
+
import { useSaveValidationRollout as te } from "../composables/useSaveValidationRollout.js";
|
|
7
|
+
import { useStripo as ne } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as re } from "../composables/useTimerClone.js";
|
|
8
9
|
import { migrate as N } from "../config/migrator/index.js";
|
|
9
10
|
import { ModuleFolderDefaults as O } from "../enums/defaults.js";
|
|
10
|
-
import { RIBBON_SELECTOR as
|
|
11
|
-
import { useRecommendationExtensionStore as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
11
|
+
import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
|
|
12
|
+
import { useRecommendationExtensionStore as ae } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
+
import ie from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import ce from "./organisms/base/Toaster.vue.js";
|
|
15
|
+
import de from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
16
|
+
import me from "./organisms/header/HeaderWrapper.vue.js";
|
|
17
|
+
import le from "./organisms/LoadingWrapper.vue.js";
|
|
18
|
+
import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
19
|
+
import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
20
|
+
import fe from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
21
|
+
import { useStripoApi as ve } from "../services/stripoApi.js";
|
|
22
|
+
import { useConfigStore as ye } from "../stores/config.js";
|
|
23
|
+
import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
|
|
22
24
|
import { useEditorStore as P } from "../stores/editor.js";
|
|
23
|
-
import { usePreviewStore as
|
|
24
|
-
import { useTemplateStore as
|
|
25
|
-
import { useUnsubscribeStore as
|
|
25
|
+
import { usePreviewStore as he } from "../stores/preview.js";
|
|
26
|
+
import { useTemplateStore as be } from "../stores/template.js";
|
|
27
|
+
import { useUnsubscribeStore as ge } from "../stores/unsubscribe.js";
|
|
26
28
|
import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
|
|
27
|
-
const
|
|
29
|
+
const Je = /* @__PURE__ */ J({
|
|
28
30
|
__name: "Guido",
|
|
29
31
|
props: {
|
|
30
32
|
config: null,
|
|
@@ -32,121 +34,121 @@ const ze = /* @__PURE__ */ j({
|
|
|
32
34
|
},
|
|
33
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
34
36
|
setup(W, { expose: x, emit: r }) {
|
|
35
|
-
const a = W, G =
|
|
37
|
+
const a = W, G = M(
|
|
36
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
37
|
-
), H =
|
|
39
|
+
), H = M(
|
|
38
40
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
39
|
-
),
|
|
40
|
-
a.ready &&
|
|
41
|
-
const c = P(),
|
|
42
|
-
var
|
|
43
|
-
return (
|
|
44
|
-
},
|
|
45
|
-
c.loadingStatus =
|
|
41
|
+
), S = B(), l = B(), u = Se(), h = ge(), t = ye();
|
|
42
|
+
a.ready && t.init(a.config);
|
|
43
|
+
const c = P(), V = he(), m = U(() => c.hasChanges), { isTestPartner: $ } = oe(), { isEnabled: z } = te(), b = () => {
|
|
44
|
+
var o;
|
|
45
|
+
return (o = S.value) == null ? void 0 : o.handleSave(!0);
|
|
46
|
+
}, g = (o) => {
|
|
47
|
+
c.loadingStatus = o;
|
|
46
48
|
};
|
|
47
|
-
|
|
49
|
+
Y(), ee();
|
|
48
50
|
const p = () => {
|
|
49
|
-
var
|
|
51
|
+
var o, e;
|
|
50
52
|
return {
|
|
51
|
-
emailId:
|
|
52
|
-
userId:
|
|
53
|
-
username:
|
|
54
|
-
partnerName:
|
|
55
|
-
savedModulesFolderName: ((
|
|
56
|
-
defaultModulesFolderName: ((e =
|
|
53
|
+
emailId: t.templateId,
|
|
54
|
+
userId: t.userId,
|
|
55
|
+
username: t.username,
|
|
56
|
+
partnerName: t.partnerName,
|
|
57
|
+
savedModulesFolderName: ((o = t.editor) == null ? void 0 : o.savedModulesFolderName) || O.SAVED_MODULES,
|
|
58
|
+
defaultModulesFolderName: ((e = t.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
|
|
57
59
|
};
|
|
58
|
-
}, { initPlugin: E, preloadRuntime: w } =
|
|
59
|
-
var
|
|
60
|
-
return !((
|
|
60
|
+
}, { initPlugin: E, preloadRuntime: w } = ne(), { getDefaultTemplate: D } = ve(), { cloneTimersOnSave: C, hasTimerBlocks: k } = re(), q = U(() => {
|
|
61
|
+
var o;
|
|
62
|
+
return !((o = t.ui) != null && o.showHeader);
|
|
61
63
|
});
|
|
62
|
-
|
|
64
|
+
Z({
|
|
63
65
|
onBack: () => {
|
|
64
66
|
console.debug("guido:back"), r("back");
|
|
65
67
|
},
|
|
66
68
|
onSaveStart: () => {
|
|
67
69
|
console.debug("guido:save:start"), r("save:start");
|
|
68
70
|
},
|
|
69
|
-
onSaveComplete: (
|
|
70
|
-
const e = { ...
|
|
71
|
+
onSaveComplete: (o) => {
|
|
72
|
+
const e = { ...o, metadata: p() };
|
|
71
73
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
72
74
|
},
|
|
73
75
|
onTestEmailClick: () => {
|
|
74
76
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
75
77
|
}
|
|
76
78
|
});
|
|
77
|
-
const T = (
|
|
78
|
-
console.debug("dynamic-content:close",
|
|
79
|
+
const T = (o) => {
|
|
80
|
+
console.debug("dynamic-content:close", o), u.setSelectedDynamicContent(o), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: o }));
|
|
79
81
|
}, F = () => {
|
|
80
82
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
81
83
|
};
|
|
82
84
|
_(() => m.value, () => {
|
|
83
85
|
r("on-change", m.value);
|
|
84
86
|
});
|
|
85
|
-
const f = (
|
|
86
|
-
const e =
|
|
87
|
+
const f = (o) => {
|
|
88
|
+
const e = o, { attribute: s, position: d } = e.detail;
|
|
87
89
|
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
|
|
88
90
|
};
|
|
89
91
|
let i = null;
|
|
90
|
-
const
|
|
92
|
+
const v = () => {
|
|
91
93
|
var e;
|
|
92
|
-
const
|
|
93
|
-
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(
|
|
94
|
-
},
|
|
95
|
-
var
|
|
94
|
+
const o = document.querySelector(se);
|
|
95
|
+
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(o == null ? void 0 : o.offsetHeight) ?? 0}px`);
|
|
96
|
+
}, y = async () => {
|
|
97
|
+
var o;
|
|
96
98
|
try {
|
|
97
|
-
|
|
98
|
-
const e =
|
|
99
|
-
|
|
100
|
-
const L = ((
|
|
99
|
+
t.initialized || t.init(a.config), c.templateId = t.templateId;
|
|
100
|
+
const e = t.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
101
|
+
h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
102
|
+
const L = ((o = e == null ? void 0 : e.migration) == null ? void 0 : o.recommendationConfigs) ?? {}, R = t.isFeatureEnabled("linkTrackingIds");
|
|
101
103
|
let n = {
|
|
102
104
|
html: s && await N(s, L),
|
|
103
105
|
css: d
|
|
104
106
|
};
|
|
105
|
-
n.html || (n = await
|
|
106
|
-
const K =
|
|
107
|
-
k(n.html) && (n.html = await
|
|
108
|
-
const
|
|
107
|
+
n.html || (n = await D(), n.html = await N(n.html, L));
|
|
108
|
+
const K = R ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
109
|
+
k(n.html) && (n.html = await C(n.html)), R && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
|
|
110
|
+
const j = {
|
|
109
111
|
preselectedDynamicContentList: I,
|
|
110
112
|
onReady: () => {
|
|
111
113
|
console.debug("guido:ready"), r("ready");
|
|
112
114
|
}
|
|
113
115
|
};
|
|
114
|
-
await E(n, p(),
|
|
116
|
+
await E(n, p(), j), u.selectedDynamicContentList = I;
|
|
115
117
|
} catch (e) {
|
|
116
118
|
console.error("Failed to initialize Stripo editor:", e);
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
|
-
return
|
|
121
|
+
return Q(async () => {
|
|
120
122
|
var e;
|
|
121
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
await
|
|
123
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ae().$reset(), P().$reset(), be().$reset(), v();
|
|
124
|
+
const o = (e = l.value) == null ? void 0 : e.parentElement;
|
|
125
|
+
if (o && (i = new ResizeObserver(v), i.observe(o)), w(), a.ready)
|
|
126
|
+
await y();
|
|
125
127
|
else {
|
|
126
128
|
const s = _(() => a.ready, (d) => {
|
|
127
|
-
d && (s(),
|
|
129
|
+
d && (s(), y());
|
|
128
130
|
});
|
|
129
131
|
}
|
|
130
132
|
document.addEventListener("dynamic-content:open", f);
|
|
131
|
-
}),
|
|
133
|
+
}), X(() => {
|
|
132
134
|
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
|
|
133
135
|
try {
|
|
134
136
|
window.UIEditor.removeEditor();
|
|
135
137
|
} catch {
|
|
136
138
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
137
139
|
}
|
|
138
|
-
|
|
140
|
+
t.reset();
|
|
139
141
|
}), x({
|
|
140
142
|
dynamicContent: {
|
|
141
143
|
insert: T,
|
|
142
144
|
close: F
|
|
143
145
|
},
|
|
144
146
|
hasChanges: m,
|
|
145
|
-
saveSilent:
|
|
146
|
-
setLoading:
|
|
147
|
-
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef:
|
|
147
|
+
saveSilent: b,
|
|
148
|
+
setLoading: g
|
|
149
|
+
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: S, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: t, editorStore: c, previewStore: V, hasChanges: m, isTestPartner: $, isSaveValidationEnabled: z, saveSilent: b, setLoading: g, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: D, cloneTimersOnSave: C, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: v, startEditor: y, AutoSaveController: ie, Toaster: ce, FilterSelectionDrawer: de, HeaderWrapper: me, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe, ValidationErrorDrawer: fe };
|
|
148
150
|
}
|
|
149
151
|
});
|
|
150
152
|
export {
|
|
151
|
-
|
|
153
|
+
Je as default
|
|
152
154
|
};
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o from "./AutoSaveToggle.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, a = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
|
|
7
|
+
t.isHovered = !0;
|
|
8
|
+
}, mouseleave: function(s) {
|
|
9
|
+
t.isHovered = !1;
|
|
10
|
+
} } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === t.AUTOSAVE_STATUS.SAVING ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
|
|
11
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
12
|
+
o,
|
|
13
|
+
n,
|
|
14
|
+
l,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"2c964af4"
|
|
18
|
+
);
|
|
19
|
+
const d = r.exports;
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as i, ref as f, computed as u } from "vue";
|
|
2
|
+
import { useConfig as l } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as c, AUTOSAVE_STATUS as t } from "../../../stores/autosave.js";
|
|
5
|
+
import { useEditorStore as S } from "../../../stores/editor.js";
|
|
6
|
+
import { formatLocalTime as d } from "../../../utils/timeUtil.js";
|
|
7
|
+
import { InToggle as g, InLoading as _, InInfoBox as A } from "@useinsider/design-system-vue";
|
|
8
|
+
const U = /* @__PURE__ */ i({
|
|
9
|
+
__name: "AutoSaveToggle",
|
|
10
|
+
setup(v) {
|
|
11
|
+
const { isFeatureEnabled: e } = l(), r = S(), o = c(), s = p(), n = f(!1), a = u(() => o.status !== t.SAVED || !o.lastSavedAt ? "" : d(o.lastSavedAt));
|
|
12
|
+
return { __sfc: !0, isFeatureEnabled: e, editorStore: r, autosaveStore: o, trans: s, isHovered: n, lastSavedLabel: a, toggle: (m) => {
|
|
13
|
+
o.isOn = m;
|
|
14
|
+
}, AUTOSAVE_STATUS: t, InInfoBox: A, InLoading: _, InToggle: g };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
U as default
|
|
19
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var i,
|
|
6
|
-
var
|
|
7
|
-
return
|
|
3
|
+
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var u = function() {
|
|
5
|
+
var s, i, n, a;
|
|
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, "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);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
13
|
-
r,
|
|
12
|
+
}, p = [], c = /* @__PURE__ */ d(
|
|
14
13
|
l,
|
|
15
|
-
|
|
14
|
+
u,
|
|
15
|
+
p,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"44d8e7c8"
|
|
19
19
|
);
|
|
20
20
|
const v = c.exports;
|
|
21
21
|
export {
|