@useinsider/guido 3.19.0-beta.7d287ab → 3.19.0-beta.84c97db
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 +9 -8
- package/dist/components/Guido.vue.js +2 -2
- package/dist/components/Guido.vue2.js +80 -67
- package/dist/components/organisms/AutoSaveController.vue2.js +18 -8
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +37 -52
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +9 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +56 -38
- package/dist/composables/useAccessibilityApi.js +45 -0
- package/dist/composables/useCortexBlueprintBridge.js +122 -54
- package/dist/composables/useCustomInterfaceAppearance.js +42 -41
- package/dist/composables/useEmailTemplateApplier.js +111 -50
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/config/migrator/itemsBlockMigrator.js +236 -248
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/template.js +219 -204
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +189 -226
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +10 -0
- package/dist/src/@types/config/schemas.d.ts +2 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
- package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -8
- package/dist/src/stores/autosave.d.ts +73 -1
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/guido-email-editor.d.ts +20 -10
- package/dist/src/stores/onboarding.d.ts +952 -21
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +5 -0
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/components/version-history.css.js +2 -6
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/autosave.js +12 -7
- package/dist/stores/editor.js +7 -4
- package/dist/stores/guido-email-editor.js +3 -1
- package/dist/stores/onboarding.js +43 -21
- package/dist/utils/pairProductVariables.js +71 -71
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +1 -1
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
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
|
|
1
|
+
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
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 S, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -76,7 +76,7 @@ const p = {
|
|
|
76
76
|
value: t()
|
|
77
77
|
})
|
|
78
78
|
)
|
|
79
|
-
}), f =
|
|
79
|
+
}), f = I(() => C({
|
|
80
80
|
text: e(t()),
|
|
81
81
|
// eslint-disable-next-line camelcase -- backend field name
|
|
82
82
|
tag_text: e(t()),
|
|
@@ -176,7 +176,7 @@ const p = {
|
|
|
176
176
|
trackIdCounter: e(
|
|
177
177
|
i(
|
|
178
178
|
s(),
|
|
179
|
-
|
|
179
|
+
S((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
|
|
180
180
|
),
|
|
181
181
|
0
|
|
182
182
|
),
|
|
@@ -190,7 +190,7 @@ const p = {
|
|
|
190
190
|
recommendationCampaignUrls: e(
|
|
191
191
|
i(
|
|
192
192
|
r(),
|
|
193
|
-
|
|
193
|
+
S((n) => n && typeof n == "object" ? { ...n } : void 0)
|
|
194
194
|
)
|
|
195
195
|
),
|
|
196
196
|
/** Migration-only inputs (legacy block configs) */
|
|
@@ -210,9 +210,9 @@ const p = {
|
|
|
210
210
|
/** Email header settings */
|
|
211
211
|
emailHeader: e(O, { senderName: "", subject: "" }),
|
|
212
212
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
213
|
-
savedModulesFolderName: e(t(),
|
|
213
|
+
savedModulesFolderName: e(t(), y.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(), y.DEFAULT_MODULES)
|
|
216
216
|
}), F = a({
|
|
217
217
|
/** Whether to show the header bar */
|
|
218
218
|
showHeader: e(o(), !0),
|
|
@@ -237,6 +237,7 @@ const p = {
|
|
|
237
237
|
liquidSyntax: e(o(), !1),
|
|
238
238
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
239
239
|
autosave: e(o(), !1),
|
|
240
|
+
accessibilityTesting: e(o(), !1),
|
|
240
241
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
241
242
|
allowlistEnabled: e(o(), !1),
|
|
242
243
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -313,7 +314,7 @@ const p = {
|
|
|
313
314
|
(n) => typeof n == "function",
|
|
314
315
|
"processor must be a function"
|
|
315
316
|
)
|
|
316
|
-
}), V =
|
|
317
|
+
}), V = T("type", [
|
|
317
318
|
H,
|
|
318
319
|
_,
|
|
319
320
|
q,
|
|
@@ -3,7 +3,7 @@ import o from "./Guido.vue2.js";
|
|
|
3
3
|
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var i = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, s = [], n = /* @__PURE__ */ t(
|
|
@@ -12,7 +12,7 @@ var i = function() {
|
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"ecfaf815"
|
|
16
16
|
);
|
|
17
17
|
const f = n.exports;
|
|
18
18
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as se, defineAsyncComponent as m, ref as H, computed as p, watch as W, onMounted as ie, onUnmounted as ae } from "vue";
|
|
2
2
|
import { useCortexBlueprintBridge as ce } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { useEditorLock as de } from "../composables/useEditorLock.js";
|
|
4
4
|
import { provideGuidoActions as me } from "../composables/useGuidoActions.js";
|
|
@@ -7,34 +7,34 @@ import { usePartner as ue } from "../composables/usePartner.js";
|
|
|
7
7
|
import { useStripo as pe } from "../composables/useStripo.js";
|
|
8
8
|
import { useTimerClone as fe } from "../composables/useTimerClone.js";
|
|
9
9
|
import { migrate as G } from "../config/migrator/index.js";
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
10
|
+
import { ModuleFolderDefaults as z } from "../enums/defaults.js";
|
|
11
11
|
import { RIBBON_SELECTOR as ye } from "../enums/onboarding.js";
|
|
12
|
-
import { useRecommendationExtensionStore as
|
|
12
|
+
import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
13
|
import ge from "./organisms/AutoSaveController.vue.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import ve from "./organisms/base/AuthErrorModal.vue.js";
|
|
15
|
+
import Se from "./organisms/base/Toaster.vue.js";
|
|
16
16
|
import be from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
17
17
|
import he from "./organisms/header/HeaderWrapper.vue.js";
|
|
18
18
|
import Ee from "./organisms/LoadingWrapper.vue.js";
|
|
19
19
|
import we from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
20
20
|
import Ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
21
|
-
import { useStripoApi as
|
|
22
|
-
import { useConfigStore as
|
|
23
|
-
import { useDynamicContentStore as
|
|
24
|
-
import { useEditorStore as
|
|
25
|
-
import { usePreviewStore as
|
|
26
|
-
import { useTemplateStore as
|
|
27
|
-
import { useUnsubscribeStore as
|
|
28
|
-
import { readTrackFloor as
|
|
29
|
-
const rt = /* @__PURE__ */
|
|
21
|
+
import { useStripoApi as ke } from "../services/stripoApi.js";
|
|
22
|
+
import { useConfigStore as De } from "../stores/config.js";
|
|
23
|
+
import { useDynamicContentStore as Te } from "../stores/dynamic-content.js";
|
|
24
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
25
|
+
import { usePreviewStore as Fe } from "../stores/preview.js";
|
|
26
|
+
import { useTemplateStore as Me } from "../stores/template.js";
|
|
27
|
+
import { useUnsubscribeStore as Re } from "../stores/unsubscribe.js";
|
|
28
|
+
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
29
|
+
const rt = /* @__PURE__ */ se({
|
|
30
30
|
__name: "Guido",
|
|
31
31
|
props: {
|
|
32
32
|
config: null,
|
|
33
33
|
ready: { type: Boolean, default: !0 }
|
|
34
34
|
},
|
|
35
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
36
|
+
setup(V, { expose: q, emit: r }) {
|
|
37
|
+
const a = V, K = m(
|
|
38
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
39
39
|
), j = m(
|
|
40
40
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
@@ -42,34 +42,41 @@ const rt = /* @__PURE__ */ ae({
|
|
|
42
42
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
43
43
|
), Q = m(
|
|
44
44
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
45
|
-
), X = m(
|
|
45
|
+
), C = H(), X = m(
|
|
46
46
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
47
|
-
),
|
|
48
|
-
|
|
49
|
-
const
|
|
47
|
+
), f = H(), y = Te(), k = Re(), o = De();
|
|
48
|
+
a.ready && o.init(a.config);
|
|
49
|
+
const s = w(), Y = Fe(), l = p(() => s.hasChanges), { isTestPartner: Z } = ue(), D = () => {
|
|
50
50
|
var t;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if (!s.isNormalMode) {
|
|
52
|
+
console.debug("guido:save:silent:blocked", {
|
|
53
|
+
isVersionHistoryOpen: s.isVersionHistoryOpen,
|
|
54
|
+
isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
return (t = C.value) == null ? void 0 : t.saveSilent();
|
|
59
|
+
}, T = (t) => {
|
|
60
|
+
s.loadingStatus = t;
|
|
54
61
|
};
|
|
55
62
|
ce(), le();
|
|
56
|
-
const
|
|
63
|
+
const g = () => {
|
|
57
64
|
var t, e;
|
|
58
65
|
return {
|
|
59
66
|
emailId: o.templateId,
|
|
60
67
|
userId: o.userId,
|
|
61
68
|
username: o.username,
|
|
62
69
|
partnerName: o.partnerName,
|
|
63
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
64
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
70
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || z.SAVED_MODULES,
|
|
71
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || z.DEFAULT_MODULES
|
|
65
72
|
};
|
|
66
|
-
}, { initPlugin:
|
|
67
|
-
let
|
|
68
|
-
const { getDefaultTemplate:
|
|
73
|
+
}, { initPlugin: F, preloadRuntime: M } = pe(), { runExclusive: R, beginMount: I, isCurrentMount: v } = de();
|
|
74
|
+
let u = 0;
|
|
75
|
+
const { getDefaultTemplate: L } = ke(), { cloneTimersOnSave: A, hasTimerBlocks: O } = fe(), ee = p(() => {
|
|
69
76
|
var t;
|
|
70
77
|
return !((t = o.ui) != null && t.showHeader);
|
|
71
|
-
}), te =
|
|
72
|
-
() => !!
|
|
78
|
+
}), te = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), oe = p(
|
|
79
|
+
() => !!E().recommendationConfigs.strategyId
|
|
73
80
|
);
|
|
74
81
|
me({
|
|
75
82
|
onBack: () => {
|
|
@@ -79,89 +86,95 @@ const rt = /* @__PURE__ */ ae({
|
|
|
79
86
|
console.debug("guido:save:start"), r("save:start");
|
|
80
87
|
},
|
|
81
88
|
onSaveComplete: (t) => {
|
|
82
|
-
const e = { ...t, metadata:
|
|
89
|
+
const e = { ...t, metadata: g() };
|
|
83
90
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
84
91
|
},
|
|
85
92
|
onTestEmailClick: () => {
|
|
86
93
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
87
94
|
}
|
|
88
95
|
});
|
|
89
|
-
const
|
|
90
|
-
console.debug("dynamic-content:close", t),
|
|
91
|
-
},
|
|
96
|
+
const U = (t) => {
|
|
97
|
+
console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
98
|
+
}, N = () => {
|
|
92
99
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
93
100
|
};
|
|
94
101
|
W(() => l.value, () => {
|
|
95
102
|
r("on-change", l.value);
|
|
96
103
|
});
|
|
97
104
|
const S = (t) => {
|
|
98
|
-
const e = t, { attribute:
|
|
99
|
-
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open",
|
|
105
|
+
const e = t, { attribute: i, position: d } = e.detail;
|
|
106
|
+
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", i, d);
|
|
100
107
|
};
|
|
101
|
-
let
|
|
102
|
-
const
|
|
108
|
+
let c = null;
|
|
109
|
+
const b = () => {
|
|
103
110
|
var e;
|
|
104
111
|
const t = document.querySelector(ye);
|
|
105
|
-
(e =
|
|
106
|
-
},
|
|
112
|
+
(e = f.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
113
|
+
}, h = async () => {
|
|
107
114
|
var t;
|
|
108
115
|
try {
|
|
109
|
-
o.initialized || o.init(
|
|
110
|
-
const e = o.template,
|
|
111
|
-
|
|
112
|
-
const P = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, _ = o.isFeatureEnabled("linkTrackingIds"),
|
|
116
|
+
o.initialized || o.init(a.config), s.templateId = o.templateId;
|
|
117
|
+
const e = o.template, i = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
118
|
+
k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
119
|
+
const P = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, _ = o.isFeatureEnabled("linkTrackingIds"), x = {
|
|
113
120
|
partnerName: o.partnerName,
|
|
114
121
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
115
122
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
116
123
|
};
|
|
117
124
|
let n = {
|
|
118
|
-
html:
|
|
125
|
+
html: i && await G(i, P, x),
|
|
119
126
|
css: d
|
|
120
127
|
};
|
|
121
|
-
n.html || (n = await
|
|
122
|
-
const ne = _ ?
|
|
123
|
-
|
|
128
|
+
n.html || (n = await L(), n.html = await G(n.html, P, x));
|
|
129
|
+
const ne = _ ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
130
|
+
O(n.html) && (n.html = await A(n.html)), _ && (s.trackIdSessionFloor = Math.max(ne, $(n.html)));
|
|
124
131
|
const re = {
|
|
125
|
-
preselectedDynamicContentList:
|
|
132
|
+
preselectedDynamicContentList: B,
|
|
126
133
|
onReady: () => {
|
|
127
134
|
console.debug("guido:ready"), r("ready");
|
|
128
135
|
}
|
|
129
136
|
};
|
|
130
|
-
|
|
137
|
+
u = I(), await F(n, g(), re), y.selectedDynamicContentList = B;
|
|
131
138
|
} catch (e) {
|
|
132
139
|
console.error("Failed to initialize Stripo editor:", e);
|
|
133
140
|
}
|
|
134
141
|
};
|
|
135
|
-
return
|
|
142
|
+
return ie(async () => {
|
|
136
143
|
var e;
|
|
137
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
138
|
-
const t = (e =
|
|
139
|
-
if (t && (
|
|
140
|
-
await
|
|
144
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), E().$reset(), w().$reset(), Me().$reset(), b();
|
|
145
|
+
const t = (e = f.value) == null ? void 0 : e.parentElement;
|
|
146
|
+
if (t && (c = new ResizeObserver(b), c.observe(t)), M(), a.ready)
|
|
147
|
+
await h();
|
|
141
148
|
else {
|
|
142
|
-
const
|
|
143
|
-
d && (
|
|
149
|
+
const i = W(() => a.ready, (d) => {
|
|
150
|
+
d && (i(), h());
|
|
144
151
|
});
|
|
145
152
|
}
|
|
146
153
|
document.addEventListener("dynamic-content:open", S);
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
|
|
154
|
+
}), ae(() => {
|
|
155
|
+
if (c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", S), E().disposeStrategyPageReturn(), v(u))
|
|
156
|
+
try {
|
|
157
|
+
w().isStripoInitialized = !1;
|
|
158
|
+
} catch (t) {
|
|
159
|
+
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
160
|
+
}
|
|
161
|
+
R(async () => {
|
|
162
|
+
if (v(u))
|
|
150
163
|
try {
|
|
151
164
|
window.UIEditor.removeEditor();
|
|
152
165
|
} catch {
|
|
153
166
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
154
167
|
}
|
|
155
168
|
}), o.reset();
|
|
156
|
-
}),
|
|
169
|
+
}), q({
|
|
157
170
|
dynamicContent: {
|
|
158
|
-
insert:
|
|
159
|
-
close:
|
|
171
|
+
insert: U,
|
|
172
|
+
close: N
|
|
160
173
|
},
|
|
161
174
|
hasChanges: l,
|
|
162
|
-
saveSilent:
|
|
163
|
-
setLoading:
|
|
164
|
-
}), { __sfc: !0, PreviewContainer:
|
|
175
|
+
saveSilent: D,
|
|
176
|
+
setLoading: T
|
|
177
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, autoSaveControllerRef: C, LegacyStrategyUpdatedModal: X, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: k, props: a, configStore: o, editorStore: s, previewStore: Y, hasChanges: l, isTestPartner: Z, saveSilent: D, setLoading: T, emit: r, buildMetadata: g, initPlugin: F, preloadRuntime: M, runExclusive: R, beginMount: I, isCurrentMount: v, mountGeneration: u, getDefaultTemplate: L, cloneTimersOnSave: A, hasTimerBlocks: O, noHeader: ee, isRrsEnabled: te, hasAssignedStrategy: oe, insertDynamicContent: U, closeDynamicContent: N, handleDynamicContentOpen: S, ribbonObserver: c, updateRibbonOffset: b, startEditor: h, AutoSaveController: ge, AuthErrorModal: ve, Toaster: Se, FilterSelectionDrawer: be, HeaderWrapper: he, LoadingWrapper: Ee, SaveAsTemplateDrawer: we, UnsubscribeWrapper: Ce };
|
|
165
178
|
}
|
|
166
179
|
});
|
|
167
180
|
export {
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as n } from "vue";
|
|
2
|
+
import { useAutoSave as u } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as m } from "../../composables/useSave.js";
|
|
4
|
+
import { useToaster as c } from "../../composables/useToaster.js";
|
|
5
|
+
const _ = /* @__PURE__ */ n({
|
|
5
6
|
__name: "AutoSaveController",
|
|
6
|
-
setup(a) {
|
|
7
|
-
const { save: e } =
|
|
8
|
-
|
|
7
|
+
setup(i, { expose: a }) {
|
|
8
|
+
const { save: e } = m(), { handleError: r } = c(), t = () => e(!1, !0);
|
|
9
|
+
u(t);
|
|
10
|
+
const o = async () => {
|
|
11
|
+
try {
|
|
12
|
+
return await e(!0);
|
|
13
|
+
} catch (s) {
|
|
14
|
+
r(s, "Failed to save template");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return a({ saveSilent: o }), { __sfc: !0, save: e, handleError: r, backgroundSave: t, saveSilent: o };
|
|
9
19
|
}
|
|
10
20
|
});
|
|
11
21
|
export {
|
|
12
|
-
|
|
22
|
+
_ as default
|
|
13
23
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "./AutoSaveStatus.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var s = this, e = s._self._c, a = s._self._setupProxy;
|
|
5
|
+
return a.isFeatureEnabled("autosave") ? e("div", { staticClass: "d-f a-i-c auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? e("span", { staticClass: "d-f a-i-c f-s-1" }, [e(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), e("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? e("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel.before)), a.savedLabel.word ? e("span", { staticClass: "f-w-600" }, [s._v(s._s(a.savedLabel.word))]) : s._e(), s._v(s._s(a.savedLabel.after))]) : s._e()]) : s._e();
|
|
6
|
+
}, n = [], o = /* @__PURE__ */ r(
|
|
7
|
+
t,
|
|
8
|
+
_,
|
|
9
|
+
n,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const v = o.exports;
|
|
15
|
+
export {
|
|
16
|
+
v as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as p, computed as S } from "vue";
|
|
2
|
+
import { useConfig as A } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as T } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as v, AUTOSAVE_STATUS as m } from "../../../stores/autosave.js";
|
|
5
|
+
import { autoSaveTimestamp as b } from "../../../utils/timeUtil.js";
|
|
6
|
+
import { InLoading as D } from "@useinsider/design-system-vue";
|
|
7
|
+
const j = /* @__PURE__ */ p({
|
|
8
|
+
__name: "AutoSaveStatus",
|
|
9
|
+
setup(O) {
|
|
10
|
+
const { isFeatureEnabled: u } = A(), a = v(), n = T(), t = "__BOLD_START__", o = "__BOLD_END__", s = (i) => i.split(t).join("").split(o).join(""), _ = S(() => {
|
|
11
|
+
if (a.status !== m.SAVED || !a.lastSavedAt)
|
|
12
|
+
return null;
|
|
13
|
+
const { isToday: i, time: c, date: f } = b(a.lastSavedAt), l = { boldStart: t, boldEnd: o }, e = i ? n("email-editor.autosaved-at-today", { ...l, time: c }) : n("email-editor.autosaved-at-date", { ...l, date: f }), r = e.indexOf(t), d = e.indexOf(o, r + t.length);
|
|
14
|
+
return r === -1 || d === -1 ? { before: s(e), word: "", after: "" } : {
|
|
15
|
+
before: s(e.slice(0, r)),
|
|
16
|
+
word: s(e.slice(r + t.length, d)),
|
|
17
|
+
after: s(e.slice(d + o.length))
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
j as default
|
|
25
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
return e("div", { staticClass: "d-f editor-actions" }, [
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var d = function() {
|
|
5
|
+
var o, s;
|
|
6
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
7
|
+
return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.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 } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(n) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
|
-
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(
|
|
9
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
12
|
+
}, l = [], c = /* @__PURE__ */ r(
|
|
13
|
+
a,
|
|
14
|
+
d,
|
|
13
15
|
l,
|
|
14
|
-
u,
|
|
15
|
-
c,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"23b54db0"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const p = c.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
p as default
|
|
23
23
|
};
|
|
@@ -1,62 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import {
|
|
5
|
-
import { useTestEmailClick as D } from "../../../composables/useGuidoActions.js";
|
|
1
|
+
import { defineComponent as x, computed as A, ref as h } from "vue";
|
|
2
|
+
import { useActionsApi as M } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as q } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTestEmailClick as F } from "../../../composables/useGuidoActions.js";
|
|
6
5
|
import { useHtmlCompiler as L } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
-
import { useSave as
|
|
8
|
-
import { useToaster as
|
|
9
|
-
import { useTranslations as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useEditorStore as
|
|
13
|
-
import { useTemplateStore as
|
|
14
|
-
import { getTooltipOptions as
|
|
15
|
-
import { InButtonV2 as
|
|
16
|
-
import { storeToRefs as
|
|
17
|
-
import
|
|
18
|
-
|
|
6
|
+
import { useSave as V } from "../../../composables/useSave.js";
|
|
7
|
+
import { useToaster as w } from "../../../composables/useToaster.js";
|
|
8
|
+
import { useTranslations as H } from "../../../composables/useTranslations.js";
|
|
9
|
+
import { useLiquidValidator as b } from "../../../composables/validators/useLiquidValidator.js";
|
|
10
|
+
import { useAutosaveStore as k } from "../../../stores/autosave.js";
|
|
11
|
+
import { useEditorStore as O } from "../../../stores/editor.js";
|
|
12
|
+
import { useTemplateStore as R } from "../../../stores/template.js";
|
|
13
|
+
import { getTooltipOptions as z } from "../../../utils/tooltipUtils.js";
|
|
14
|
+
import { InButtonV2 as B } from "@useinsider/design-system-vue";
|
|
15
|
+
import { storeToRefs as D } from "pinia";
|
|
16
|
+
import I from "./EditorActionsMenu.vue.js";
|
|
17
|
+
import j from "./MigrationConfirmModal.vue.js";
|
|
18
|
+
const st = /* @__PURE__ */ x({
|
|
19
19
|
__name: "EditorActions",
|
|
20
|
-
setup(
|
|
21
|
-
const { config:
|
|
22
|
-
|
|
23
|
-
f();
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
u();
|
|
27
|
-
}, C = async () => {
|
|
28
|
-
i.value = !0, await c(), i.value = !1;
|
|
29
|
-
}, A = () => {
|
|
30
|
-
e.isSaveAsTemplateDrawerOpen = !0;
|
|
31
|
-
}, M = x(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = x(
|
|
32
|
-
() => {
|
|
33
|
-
var t, o;
|
|
34
|
-
return ((o = (t = l.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
35
|
-
}
|
|
36
|
-
), V = async (t) => {
|
|
37
|
-
a.value = !0, t || (e.loadingStatus = !0);
|
|
20
|
+
setup(G, { expose: y }) {
|
|
21
|
+
const { config: E, isFeatureEnabled: a } = q(), { save: s } = V(), { getCompiledEmail: n } = M(), { compileHtml: m } = L(), { validateLiquidSyntax: l } = b(), { handleError: r } = w(), e = O(), u = R(), c = k(), { hasMigrations: f } = D(u), C = A(() => a("liquidSyntax") || a("autosave") && c.hasStatusLabel), T = H(), i = h(!1), p = h(), d = F(), v = async (t) => {
|
|
22
|
+
i.value = !0, t || (e.loadingStatus = !0);
|
|
38
23
|
let o;
|
|
39
24
|
try {
|
|
40
|
-
o = await
|
|
41
|
-
} catch (
|
|
42
|
-
r(
|
|
25
|
+
o = await s(t);
|
|
26
|
+
} catch (g) {
|
|
27
|
+
r(g, "Failed to save template");
|
|
43
28
|
} finally {
|
|
44
|
-
|
|
29
|
+
i.value = !1, !t && !o && (e.loadingStatus = !1);
|
|
45
30
|
}
|
|
46
31
|
return o;
|
|
47
|
-
},
|
|
32
|
+
}, S = (t) => {
|
|
48
33
|
var o;
|
|
49
|
-
if (!t &&
|
|
50
|
-
(o =
|
|
34
|
+
if (!t && f.value) {
|
|
35
|
+
(o = p.value) == null || o.open();
|
|
51
36
|
return;
|
|
52
37
|
}
|
|
53
|
-
return
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
38
|
+
return v(t);
|
|
39
|
+
}, _ = async () => {
|
|
40
|
+
if (a("liquidSyntax")) {
|
|
56
41
|
e.loadingStatus = !0;
|
|
57
42
|
try {
|
|
58
|
-
const { html: t } = await
|
|
59
|
-
if (!await
|
|
43
|
+
const { html: t } = await n({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = m(t);
|
|
44
|
+
if (!await l(o))
|
|
60
45
|
return;
|
|
61
46
|
} catch (t) {
|
|
62
47
|
r(t, "Failed to prepare test email");
|
|
@@ -65,13 +50,13 @@ const ft = /* @__PURE__ */ q({
|
|
|
65
50
|
e.loadingStatus = !1;
|
|
66
51
|
}
|
|
67
52
|
}
|
|
68
|
-
|
|
53
|
+
d();
|
|
69
54
|
};
|
|
70
|
-
return
|
|
71
|
-
handleSave:
|
|
72
|
-
}), { __sfc: !0, config:
|
|
55
|
+
return y({
|
|
56
|
+
handleSave: S
|
|
57
|
+
}), { __sfc: !0, config: E, isFeatureEnabled: a, save: s, getCompiledEmail: n, compileHtml: m, validateLiquidSyntax: l, handleError: r, editorStore: e, templateStore: u, autosaveStore: c, hasMigrations: f, hasContentOnTheLeft: C, trans: T, isSaving: i, migrationModalRef: p, testEmailClick: d, executeSave: v, handleSave: S, handleTestEmail: _, getTooltipOptions: z, InButtonV2: B, EditorActionsMenu: I, MigrationConfirmModal: j };
|
|
73
58
|
}
|
|
74
59
|
});
|
|
75
60
|
export {
|
|
76
|
-
|
|
61
|
+
st as default
|
|
77
62
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import i from "./EditorActionsMenu.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return o("div", { staticClass: "editor-actions-menu p-r" }, [o(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.isPanelOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(d) {
|
|
7
|
+
t.isOpen = !t.isOpen;
|
|
8
|
+
} } }), o(t.InDropdownMenu, { staticClass: "editor-actions-menu__dropdown", attrs: { id: "guido__kebab-menu", "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, "max-height": 400, options: t.options, "select-all-option-status": !1, status: t.isPanelOpen }, on: { clickOutside: t.close, optionClick: t.handleOptionClick } })], 1);
|
|
9
|
+
}, a = [], r = /* @__PURE__ */ s(
|
|
10
|
+
i,
|
|
11
|
+
n,
|
|
12
|
+
a,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"d0e6b57a"
|
|
16
|
+
);
|
|
17
|
+
const _ = r.exports;
|
|
18
|
+
export {
|
|
19
|
+
_ as default
|
|
20
|
+
};
|