@useinsider/guido 3.19.0-beta.c604f7d → 3.19.0-beta.c8d2be8
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 +20 -21
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +47 -54
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
- 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 +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +52 -36
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -32
- 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 +8 -9
- package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -56
- package/dist/composables/useCustomInterfaceAppearance.js +41 -42
- package/dist/composables/useHttp.js +55 -44
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +0 -6
- package/dist/src/@types/config/schemas.d.ts +0 -2
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/stores/config.d.ts +0 -20
- package/dist/src/stores/editor.d.ts +0 -109
- package/dist/src/stores/onboarding.d.ts +21 -952
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +0 -5
- package/dist/static/styles/variables.css.js +0 -2
- package/dist/stores/editor.js +4 -7
- package/dist/stores/onboarding.js +21 -43
- 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 -25
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
- 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 -22
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
- package/dist/composables/useAccessibilityApi.js +0 -35
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +0 -2
- 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/static/styles/components/accessibility.css.js +0 -234
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as o, number as n, optional as e, string as t, picklist as
|
|
1
|
+
import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
|
|
2
|
+
import { object as o, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as h, boolean as a, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as I, union as y, unknown as r, lazy as T } 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 */
|
|
@@ -46,16 +46,16 @@ const p = {
|
|
|
46
46
|
),
|
|
47
47
|
/** Product type identifier */
|
|
48
48
|
productType: e(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
i([
|
|
50
|
+
l.EMAIL,
|
|
51
|
+
l.ARCHITECT,
|
|
52
|
+
l.UNSUBSCRIBE_PAGES
|
|
53
53
|
]),
|
|
54
|
-
|
|
54
|
+
l.EMAIL
|
|
55
55
|
),
|
|
56
56
|
/** Message type (promotional or transactional) */
|
|
57
57
|
messageType: e(
|
|
58
|
-
|
|
58
|
+
i([p.PROMOTIONAL, p.TRANSACTIONAL]),
|
|
59
59
|
p.PROMOTIONAL
|
|
60
60
|
),
|
|
61
61
|
/** Display name for the current user */
|
|
@@ -76,17 +76,17 @@ const p = {
|
|
|
76
76
|
value: t()
|
|
77
77
|
})
|
|
78
78
|
)
|
|
79
|
-
}),
|
|
79
|
+
}), S = T(() => g({
|
|
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 = k(
|
|
88
88
|
t(),
|
|
89
|
-
R(c(
|
|
89
|
+
R(c(S), [])
|
|
90
90
|
), P = g({
|
|
91
91
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
92
92
|
id: e(n()),
|
|
@@ -197,9 +197,9 @@ const p = {
|
|
|
197
197
|
/** Email header settings */
|
|
198
198
|
emailHeader: e(D, { senderName: "", subject: "" }),
|
|
199
199
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
200
|
-
savedModulesFolderName: e(t(),
|
|
200
|
+
savedModulesFolderName: e(t(), f.SAVED_MODULES),
|
|
201
201
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
202
|
-
defaultModulesFolderName: e(t(),
|
|
202
|
+
defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
|
|
203
203
|
}), F = o({
|
|
204
204
|
/** Whether to show the header bar */
|
|
205
205
|
showHeader: e(a(), !0),
|
|
@@ -224,13 +224,12 @@ const p = {
|
|
|
224
224
|
liquidSyntax: e(a(), !1),
|
|
225
225
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
226
226
|
autosave: e(a(), !1),
|
|
227
|
-
accessibilityTesting: e(a(), !1),
|
|
228
227
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
229
228
|
allowlistEnabled: e(a(), !1),
|
|
230
229
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
231
230
|
linkTrackingIds: e(a(), !1),
|
|
232
231
|
reusableRecommendationStrategy: e(a(), !1)
|
|
233
|
-
}), B =
|
|
232
|
+
}), B = i([
|
|
234
233
|
"amp-accordion",
|
|
235
234
|
"amp-carousel",
|
|
236
235
|
"amp-form-controls",
|
|
@@ -244,7 +243,7 @@ const p = {
|
|
|
244
243
|
"text-block",
|
|
245
244
|
"timer-block",
|
|
246
245
|
"video-block"
|
|
247
|
-
]), w =
|
|
246
|
+
]), w = i([
|
|
248
247
|
"dynamic-content",
|
|
249
248
|
"checkbox-block",
|
|
250
249
|
"radio-button-block",
|
|
@@ -301,7 +300,7 @@ const p = {
|
|
|
301
300
|
(s) => typeof s == "function",
|
|
302
301
|
"processor must be a function"
|
|
303
302
|
)
|
|
304
|
-
}), V =
|
|
303
|
+
}), V = I("type", [
|
|
305
304
|
_,
|
|
306
305
|
j,
|
|
307
306
|
q,
|
|
@@ -353,7 +352,7 @@ export {
|
|
|
353
352
|
G as CustomRuleSchema,
|
|
354
353
|
B as DefaultBlockTypeSchema,
|
|
355
354
|
N as DynamicContentListSchema,
|
|
356
|
-
|
|
355
|
+
S as DynamicContentNodeSchema,
|
|
357
356
|
E as DynamicContentSchema,
|
|
358
357
|
O as EditorSchema,
|
|
359
358
|
D as EmailHeaderSchema,
|
|
@@ -364,7 +363,7 @@ export {
|
|
|
364
363
|
P as LegacyRecommendationConfigSchema,
|
|
365
364
|
p as MessageType,
|
|
366
365
|
M as PartnerSchema,
|
|
367
|
-
|
|
366
|
+
l as ProductType,
|
|
368
367
|
j as RegexRuleSchema,
|
|
369
368
|
q as RemoveRuleSchema,
|
|
370
369
|
_ as ReplaceRuleSchema,
|
|
@@ -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
|
|
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.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__ */ i(
|
|
10
10
|
o,
|
|
11
|
-
|
|
11
|
+
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"36867e2e"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const g = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
g as default
|
|
20
20
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as re, defineAsyncComponent as m, ref as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
1
|
+
import { defineComponent as re, defineAsyncComponent as m, ref as O, computed as u, watch as x, onMounted as se, onUnmounted as ae } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { useEditorLock as ce } from "../composables/useEditorLock.js";
|
|
4
4
|
import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
|
|
5
5
|
import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
|
|
6
6
|
import { usePartner as le } from "../composables/usePartner.js";
|
|
7
7
|
import { useStripo as ue } from "../composables/useStripo.js";
|
|
8
8
|
import { useTimerClone as pe } from "../composables/useTimerClone.js";
|
|
9
|
-
import { migrate as
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
9
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as G } from "../enums/defaults.js";
|
|
11
11
|
import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
|
|
12
12
|
import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
13
|
import ye from "./organisms/AutoSaveController.vue.js";
|
|
@@ -19,11 +19,11 @@ import he from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
|
19
19
|
import Ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
20
20
|
import { useStripoApi as we } from "../services/stripoApi.js";
|
|
21
21
|
import { useConfigStore as Ce } from "../stores/config.js";
|
|
22
|
-
import { useDynamicContentStore as
|
|
23
|
-
import { useEditorStore as
|
|
24
|
-
import { usePreviewStore as
|
|
22
|
+
import { useDynamicContentStore as De } from "../stores/dynamic-content.js";
|
|
23
|
+
import { useEditorStore as H } from "../stores/editor.js";
|
|
24
|
+
import { usePreviewStore as ke } from "../stores/preview.js";
|
|
25
25
|
import { useTemplateStore as Te } from "../stores/template.js";
|
|
26
|
-
import { useUnsubscribeStore as
|
|
26
|
+
import { useUnsubscribeStore as Fe } from "../stores/unsubscribe.js";
|
|
27
27
|
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
28
28
|
const tt = /* @__PURE__ */ re({
|
|
29
29
|
__name: "Guido",
|
|
@@ -32,33 +32,26 @@ const tt = /* @__PURE__ */ re({
|
|
|
32
32
|
ready: { type: Boolean, default: !0 }
|
|
33
33
|
},
|
|
34
34
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
|
-
setup(z, { expose:
|
|
36
|
-
const a = z,
|
|
35
|
+
setup(z, { expose: q, emit: r }) {
|
|
36
|
+
const a = z, K = m(
|
|
37
37
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
),
|
|
38
|
+
), V = m(
|
|
39
39
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
40
|
), j = m(
|
|
41
41
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
42
|
), J = m(
|
|
43
43
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
),
|
|
44
|
+
), Q = m(
|
|
45
45
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
46
|
-
), p =
|
|
46
|
+
), E = O(), p = O(), f = De(), w = Fe(), o = Ce();
|
|
47
47
|
a.ready && o.init(a.config);
|
|
48
|
-
const
|
|
48
|
+
const c = H(), X = ke(), l = u(() => c.hasChanges), { isTestPartner: Y } = le(), C = () => {
|
|
49
49
|
var t;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
|
|
54
|
-
});
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
return (t = E.value) == null ? void 0 : t.saveSilent();
|
|
58
|
-
}, k = (t) => {
|
|
59
|
-
s.loadingStatus = t;
|
|
50
|
+
return (t = E.value) == null ? void 0 : t.handleSave(!0);
|
|
51
|
+
}, D = (t) => {
|
|
52
|
+
c.loadingStatus = t;
|
|
60
53
|
};
|
|
61
|
-
|
|
54
|
+
ie(), me();
|
|
62
55
|
const y = () => {
|
|
63
56
|
var t, e;
|
|
64
57
|
return {
|
|
@@ -66,12 +59,12 @@ const tt = /* @__PURE__ */ re({
|
|
|
66
59
|
userId: o.userId,
|
|
67
60
|
username: o.username,
|
|
68
61
|
partnerName: o.partnerName,
|
|
69
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
70
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
62
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
|
|
63
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
|
|
71
64
|
};
|
|
72
|
-
}, { initPlugin:
|
|
65
|
+
}, { initPlugin: k, preloadRuntime: T } = ue(), { runExclusive: F, beginMount: M, isCurrentMount: R } = ce();
|
|
73
66
|
let g = 0;
|
|
74
|
-
const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks:
|
|
67
|
+
const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks: B } = pe(), Z = u(() => {
|
|
75
68
|
var t;
|
|
76
69
|
return !((t = o.ui) != null && t.showHeader);
|
|
77
70
|
}), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
|
|
@@ -92,19 +85,19 @@ const tt = /* @__PURE__ */ re({
|
|
|
92
85
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
93
86
|
}
|
|
94
87
|
});
|
|
95
|
-
const
|
|
88
|
+
const U = (t) => {
|
|
96
89
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
97
|
-
},
|
|
90
|
+
}, A = () => {
|
|
98
91
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
99
92
|
};
|
|
100
93
|
x(() => l.value, () => {
|
|
101
94
|
r("on-change", l.value);
|
|
102
95
|
});
|
|
103
96
|
const v = (t) => {
|
|
104
|
-
const e = t, { attribute:
|
|
105
|
-
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open",
|
|
97
|
+
const e = t, { attribute: s, position: d } = e.detail;
|
|
98
|
+
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
|
|
106
99
|
};
|
|
107
|
-
let
|
|
100
|
+
let i = null;
|
|
108
101
|
const S = () => {
|
|
109
102
|
var e;
|
|
110
103
|
const t = document.querySelector(fe);
|
|
@@ -112,42 +105,42 @@ const tt = /* @__PURE__ */ re({
|
|
|
112
105
|
}, b = async () => {
|
|
113
106
|
var t;
|
|
114
107
|
try {
|
|
115
|
-
o.initialized || o.init(a.config),
|
|
116
|
-
const e = o.template,
|
|
108
|
+
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
109
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", P = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
117
110
|
w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
118
|
-
const
|
|
111
|
+
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
|
|
119
112
|
let n = {
|
|
120
|
-
html:
|
|
113
|
+
html: s && await W(s, _),
|
|
121
114
|
css: d
|
|
122
115
|
};
|
|
123
|
-
n.html || (n = await I(), n.html = await
|
|
124
|
-
const oe =
|
|
125
|
-
|
|
116
|
+
n.html || (n = await I(), n.html = await W(n.html, _));
|
|
117
|
+
const oe = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
118
|
+
B(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, $(n.html)));
|
|
126
119
|
const ne = {
|
|
127
|
-
preselectedDynamicContentList:
|
|
120
|
+
preselectedDynamicContentList: P,
|
|
128
121
|
onReady: () => {
|
|
129
122
|
console.debug("guido:ready"), r("ready");
|
|
130
123
|
}
|
|
131
124
|
};
|
|
132
|
-
g =
|
|
125
|
+
g = M(), await k(n, y(), ne), f.selectedDynamicContentList = P;
|
|
133
126
|
} catch (e) {
|
|
134
127
|
console.error("Failed to initialize Stripo editor:", e);
|
|
135
128
|
}
|
|
136
129
|
};
|
|
137
130
|
return se(async () => {
|
|
138
131
|
var e;
|
|
139
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(),
|
|
132
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), H().$reset(), Te().$reset(), S();
|
|
140
133
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
141
|
-
if (t && (
|
|
134
|
+
if (t && (i = new ResizeObserver(S), i.observe(t)), T(), a.ready)
|
|
142
135
|
await b();
|
|
143
136
|
else {
|
|
144
|
-
const
|
|
145
|
-
d && (
|
|
137
|
+
const s = x(() => a.ready, (d) => {
|
|
138
|
+
d && (s(), b());
|
|
146
139
|
});
|
|
147
140
|
}
|
|
148
141
|
document.addEventListener("dynamic-content:open", v);
|
|
149
|
-
}),
|
|
150
|
-
|
|
142
|
+
}), ae(() => {
|
|
143
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), F(async () => {
|
|
151
144
|
if (R(g))
|
|
152
145
|
try {
|
|
153
146
|
window.UIEditor.removeEditor();
|
|
@@ -155,15 +148,15 @@ const tt = /* @__PURE__ */ re({
|
|
|
155
148
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
156
149
|
}
|
|
157
150
|
}), o.reset();
|
|
158
|
-
}),
|
|
151
|
+
}), q({
|
|
159
152
|
dynamicContent: {
|
|
160
|
-
insert:
|
|
161
|
-
close:
|
|
153
|
+
insert: U,
|
|
154
|
+
close: A
|
|
162
155
|
},
|
|
163
156
|
hasChanges: l,
|
|
164
157
|
saveSilent: C,
|
|
165
|
-
setLoading:
|
|
166
|
-
}), { __sfc: !0, PreviewContainer:
|
|
158
|
+
setLoading: D
|
|
159
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: T, runExclusive: F, beginMount: M, isCurrentMount: R, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: B, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: U, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: be, SaveAsTemplateDrawer: he, UnsubscribeWrapper: Ee };
|
|
167
160
|
}
|
|
168
161
|
});
|
|
169
162
|
export {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
const
|
|
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({
|
|
5
5
|
__name: "AutoSaveController",
|
|
6
|
-
setup(
|
|
7
|
-
const { save: e } =
|
|
8
|
-
return
|
|
9
|
-
saveSilent: () => e(!0)
|
|
10
|
-
}), { __sfc: !0, save: e, backgroundSave: o };
|
|
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
|
};
|
|
@@ -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,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
return e("div", { staticClass: "d-f
|
|
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", "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
|
-
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(
|
|
9
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
13
|
-
r,
|
|
14
|
-
d,
|
|
12
|
+
}, p = [], c = /* @__PURE__ */ d(
|
|
15
13
|
l,
|
|
14
|
+
u,
|
|
15
|
+
p,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"1ca6baf0"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const v = c.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
v as default
|
|
23
23
|
};
|
|
@@ -1,48 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
1
|
+
import { defineComponent as q, ref as l, computed as w } from "vue";
|
|
2
|
+
import { useActionsApi as b } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as k } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as B } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTestEmailClick as D } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useHtmlCompiler as L } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as R } from "../../../composables/useSave.js";
|
|
8
|
+
import { useToaster as z } from "../../../composables/useToaster.js";
|
|
9
|
+
import { useTranslations as I } from "../../../composables/useTranslations.js";
|
|
10
|
+
import { useVersionHistoryApi as P } from "../../../composables/useVersionHistoryApi.js";
|
|
11
|
+
import { useLiquidValidator as j } from "../../../composables/validators/useLiquidValidator.js";
|
|
12
|
+
import { useEditorStore as G } from "../../../stores/editor.js";
|
|
13
|
+
import { useTemplateStore as J } from "../../../stores/template.js";
|
|
14
|
+
import { getTooltipOptions as K } from "../../../utils/tooltipUtils.js";
|
|
15
|
+
import { InButtonV2 as N } from "@useinsider/design-system-vue";
|
|
16
|
+
import { storeToRefs as Q } from "pinia";
|
|
17
|
+
import U from "./MigrationConfirmModal.vue.js";
|
|
18
|
+
const ft = /* @__PURE__ */ q({
|
|
18
19
|
__name: "EditorActions",
|
|
19
|
-
setup(
|
|
20
|
-
const { config:
|
|
20
|
+
setup(W, { expose: x }) {
|
|
21
|
+
const { config: m, isFeatureEnabled: c } = k(), { exportHtml: p } = B(), { save: u } = R(), { openVersionHistory: f, closeVersionHistory: d } = P(), { getCompiledEmail: v } = b(), { compileHtml: y } = L(), { validateLiquidSyntax: g } = j(), { handleError: r } = z(), e = G(), h = J(), { hasMigrations: H } = Q(h), s = I(), i = l(!1), a = l(!1), S = l(), V = D(), _ = () => {
|
|
22
|
+
if (e.isVersionHistoryOpen) {
|
|
23
|
+
d();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
f();
|
|
27
|
+
}, C = async () => {
|
|
28
|
+
i.value = !0, await p(), i.value = !1;
|
|
29
|
+
}, A = () => {
|
|
30
|
+
e.isSaveAsTemplateDrawerOpen = !0;
|
|
31
|
+
}, M = w(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = w(
|
|
32
|
+
() => {
|
|
33
|
+
var t, o;
|
|
34
|
+
return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
35
|
+
}
|
|
36
|
+
), E = async (t) => {
|
|
21
37
|
a.value = !0, t || (e.loadingStatus = !0);
|
|
22
38
|
let o;
|
|
23
39
|
try {
|
|
24
|
-
o = await
|
|
25
|
-
} catch (
|
|
40
|
+
o = await u(t);
|
|
41
|
+
} catch (n) {
|
|
26
42
|
if (t)
|
|
27
|
-
throw
|
|
28
|
-
r(
|
|
43
|
+
throw n;
|
|
44
|
+
r(n, "Failed to save template");
|
|
29
45
|
} finally {
|
|
30
46
|
a.value = !1, !t && !o && (e.loadingStatus = !1);
|
|
31
47
|
}
|
|
32
48
|
return o;
|
|
33
|
-
},
|
|
49
|
+
}, T = (t) => {
|
|
34
50
|
var o;
|
|
35
|
-
if (!t &&
|
|
36
|
-
(o =
|
|
51
|
+
if (!t && H.value) {
|
|
52
|
+
(o = S.value) == null || o.open();
|
|
37
53
|
return;
|
|
38
54
|
}
|
|
39
|
-
return
|
|
40
|
-
},
|
|
41
|
-
if (
|
|
55
|
+
return E(t);
|
|
56
|
+
}, F = async () => {
|
|
57
|
+
if (c("liquidSyntax")) {
|
|
42
58
|
e.loadingStatus = !0;
|
|
43
59
|
try {
|
|
44
|
-
const { html: t } = await
|
|
45
|
-
if (!await
|
|
60
|
+
const { html: t } = await v({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = y(t);
|
|
61
|
+
if (!await g(o))
|
|
46
62
|
return;
|
|
47
63
|
} catch (t) {
|
|
48
64
|
r(t, "Failed to prepare test email");
|
|
@@ -51,13 +67,13 @@ const ot = /* @__PURE__ */ C({
|
|
|
51
67
|
e.loadingStatus = !1;
|
|
52
68
|
}
|
|
53
69
|
}
|
|
54
|
-
|
|
70
|
+
V();
|
|
55
71
|
};
|
|
56
|
-
return
|
|
57
|
-
handleSave:
|
|
58
|
-
}), { __sfc: !0, config:
|
|
72
|
+
return x({
|
|
73
|
+
handleSave: T
|
|
74
|
+
}), { __sfc: !0, config: m, isFeatureEnabled: c, exportHtml: p, save: u, openVersionHistory: f, closeVersionHistory: d, getCompiledEmail: v, compileHtml: y, validateLiquidSyntax: g, handleError: r, editorStore: e, templateStore: h, hasMigrations: H, trans: s, isExporting: i, isSaving: a, migrationModalRef: S, testEmailClick: V, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: E, handleSave: T, handleTestEmail: F, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
|
|
59
75
|
}
|
|
60
76
|
});
|
|
61
77
|
export {
|
|
62
|
-
|
|
78
|
+
ft as default
|
|
63
79
|
};
|
|
@@ -3,16 +3,16 @@ import o from "./HeaderWrapper.vue2.js";
|
|
|
3
3
|
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
5
|
var t = this, r = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
|
|
7
|
-
},
|
|
6
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
|
|
7
|
+
}, d = [], i = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
d,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"d11dd577"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = i.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|