@useinsider/guido 3.19.0-beta.022a716 → 3.19.0-beta.0a1f92f
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 +14 -13
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +75 -74
- package/dist/components/organisms/AutoSaveController.vue2.js +10 -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 +36 -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 +54 -36
- package/dist/composables/useAccessibilityApi.js +35 -0
- package/dist/composables/useActionsApi.js +20 -24
- package/dist/composables/useCortexBlueprintBridge.js +54 -120
- package/dist/composables/useCustomInterfaceAppearance.js +29 -28
- package/dist/composables/useEmailTemplateApplier.js +51 -96
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +6 -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 +15 -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 +3 -4
- package/dist/src/composables/useEmailTemplateApplier.d.ts +5 -26
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/guido-email-editor.d.ts +10 -32
- package/dist/src/stores/onboarding.d.ts +717 -2
- 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/variables.css.js +2 -0
- package/dist/stores/editor.js +7 -4
- package/dist/stores/guido-email-editor.js +1 -3
- package/dist/stores/onboarding.js +68 -46
- 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 n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as
|
|
1
|
+
import { ModuleFolderDefaults as S } 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 h, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as y, 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,
|
|
@@ -68,22 +68,22 @@ const p = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}),
|
|
71
|
+
}), f = 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(f)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(
|
|
78
|
+
select_items: e(c(f))
|
|
79
79
|
})), N = k(
|
|
80
80
|
t(),
|
|
81
|
-
R(c(
|
|
81
|
+
R(c(f), [])
|
|
82
82
|
), P = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
85
85
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
86
|
-
decimalCount: e(
|
|
86
|
+
decimalCount: e(y([t(), n()])),
|
|
87
87
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
88
88
|
productIds: e(c(r())),
|
|
89
89
|
/** Whether the block requested live products at send time */
|
|
@@ -117,7 +117,7 @@ const p = {
|
|
|
117
117
|
/** Block type marker used by some legacy variants */
|
|
118
118
|
blockType: e(t()),
|
|
119
119
|
/** Size variant marker (legacy data may use string or number) */
|
|
120
|
-
size: e(
|
|
120
|
+
size: e(y([t(), n()])),
|
|
121
121
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
122
122
|
verticalResponsiveness: e(o()),
|
|
123
123
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
@@ -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(), S.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(), S.DEFAULT_MODULES)
|
|
195
195
|
}), F = a({
|
|
196
196
|
/** Whether to show the header bar */
|
|
197
197
|
showHeader: e(o(), !0),
|
|
@@ -216,6 +216,7 @@ 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
|
+
accessibilityTesting: e(o(), !1),
|
|
219
220
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
220
221
|
allowlistEnabled: e(o(), !1),
|
|
221
222
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -288,7 +289,7 @@ const p = {
|
|
|
288
289
|
...d.entries,
|
|
289
290
|
type: u("custom"),
|
|
290
291
|
/** Custom processor function */
|
|
291
|
-
processor:
|
|
292
|
+
processor: h(
|
|
292
293
|
(s) => typeof s == "function",
|
|
293
294
|
"processor must be a function"
|
|
294
295
|
)
|
|
@@ -308,7 +309,7 @@ const p = {
|
|
|
308
309
|
* Return false to cancel the save operation.
|
|
309
310
|
*/
|
|
310
311
|
externalValidation: e(
|
|
311
|
-
|
|
312
|
+
h(
|
|
312
313
|
(s) => typeof s == "function",
|
|
313
314
|
"externalValidation must be a function"
|
|
314
315
|
)
|
|
@@ -344,7 +345,7 @@ export {
|
|
|
344
345
|
G as CustomRuleSchema,
|
|
345
346
|
B as DefaultBlockTypeSchema,
|
|
346
347
|
N as DynamicContentListSchema,
|
|
347
|
-
|
|
348
|
+
f as DynamicContentNodeSchema,
|
|
348
349
|
E as DynamicContentSchema,
|
|
349
350
|
O as EditorSchema,
|
|
350
351
|
D as EmailHeaderSchema,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
|
-
var
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "
|
|
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), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), 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), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : o._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._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__ */ i(
|
|
10
|
-
|
|
10
|
+
a,
|
|
11
11
|
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"f9694296"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const c = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
c as default
|
|
20
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ne, defineAsyncComponent as
|
|
1
|
+
import { defineComponent as ne, defineAsyncComponent as l, ref as _, computed as u, watch as P, onMounted as re, onUnmounted as se } from "vue";
|
|
2
2
|
import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { useEditorLock as ae } from "../composables/useEditorLock.js";
|
|
4
4
|
import { provideGuidoActions as ce } from "../composables/useGuidoActions.js";
|
|
@@ -6,25 +6,25 @@ import { useGuidoStateBridge as de } from "../composables/useGuidoStateBridge.js
|
|
|
6
6
|
import { usePartner as me } from "../composables/usePartner.js";
|
|
7
7
|
import { useStripo as le } from "../composables/useStripo.js";
|
|
8
8
|
import { useTimerClone as ue } from "../composables/useTimerClone.js";
|
|
9
|
-
import { migrate as
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
9
|
+
import { migrate as x } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as H } from "../enums/defaults.js";
|
|
11
11
|
import { RIBBON_SELECTOR as pe } from "../enums/onboarding.js";
|
|
12
|
-
import { useRecommendationExtensionStore as
|
|
12
|
+
import { useRecommendationExtensionStore as W } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
13
|
import fe from "./organisms/AutoSaveController.vue.js";
|
|
14
14
|
import ye from "./organisms/base/Toaster.vue.js";
|
|
15
15
|
import ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
16
16
|
import ve from "./organisms/header/HeaderWrapper.vue.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
17
|
+
import be from "./organisms/LoadingWrapper.vue.js";
|
|
18
|
+
import Se from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
19
|
+
import he from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
20
20
|
import { useStripoApi as Ee } from "../services/stripoApi.js";
|
|
21
21
|
import { useConfigStore as we } from "../stores/config.js";
|
|
22
22
|
import { useDynamicContentStore as Ce } from "../stores/dynamic-content.js";
|
|
23
|
-
import { useEditorStore as
|
|
24
|
-
import { usePreviewStore as
|
|
25
|
-
import { useTemplateStore as
|
|
26
|
-
import { useUnsubscribeStore as
|
|
27
|
-
import { readTrackFloor as
|
|
23
|
+
import { useEditorStore as G } from "../stores/editor.js";
|
|
24
|
+
import { usePreviewStore as ke } from "../stores/preview.js";
|
|
25
|
+
import { useTemplateStore as De } from "../stores/template.js";
|
|
26
|
+
import { useUnsubscribeStore as Te } from "../stores/unsubscribe.js";
|
|
27
|
+
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
28
28
|
const et = /* @__PURE__ */ ne({
|
|
29
29
|
__name: "Guido",
|
|
30
30
|
props: {
|
|
@@ -32,41 +32,48 @@ const et = /* @__PURE__ */ ne({
|
|
|
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(
|
|
36
|
-
const
|
|
35
|
+
setup(z, { expose: V, emit: r }) {
|
|
36
|
+
const a = z, q = l(
|
|
37
37
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
),
|
|
38
|
+
), K = l(
|
|
39
39
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
|
-
), j =
|
|
40
|
+
), j = l(
|
|
41
41
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
|
-
), J =
|
|
42
|
+
), J = l(
|
|
43
43
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
const
|
|
44
|
+
), h = _(), p = _(), f = Ce(), E = Te(), o = we();
|
|
45
|
+
a.ready && o.init(a.config);
|
|
46
|
+
const s = G(), Q = ke(), m = u(() => s.hasChanges), { isTestPartner: X } = me(), w = () => {
|
|
47
47
|
var t;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
if (!s.isNormalMode) {
|
|
49
|
+
console.debug("guido:save:silent:blocked", {
|
|
50
|
+
isVersionHistoryOpen: s.isVersionHistoryOpen,
|
|
51
|
+
isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
return (t = h.value) == null ? void 0 : t.saveSilent();
|
|
56
|
+
}, C = (t) => {
|
|
57
|
+
s.loadingStatus = t;
|
|
51
58
|
};
|
|
52
59
|
ie(), de();
|
|
53
|
-
const
|
|
60
|
+
const y = () => {
|
|
54
61
|
var t, e;
|
|
55
62
|
return {
|
|
56
63
|
emailId: o.templateId,
|
|
57
64
|
userId: o.userId,
|
|
58
65
|
username: o.username,
|
|
59
66
|
partnerName: o.partnerName,
|
|
60
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
61
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
67
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || H.SAVED_MODULES,
|
|
68
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || H.DEFAULT_MODULES
|
|
62
69
|
};
|
|
63
|
-
}, { initPlugin:
|
|
64
|
-
let
|
|
65
|
-
const { getDefaultTemplate:
|
|
70
|
+
}, { initPlugin: k, preloadRuntime: D } = le(), { runExclusive: T, beginMount: F, isCurrentMount: M } = ae();
|
|
71
|
+
let g = 0;
|
|
72
|
+
const { getDefaultTemplate: I } = Ee(), { cloneTimersOnSave: R, hasTimerBlocks: L } = ue(), Y = u(() => {
|
|
66
73
|
var t;
|
|
67
74
|
return !((t = o.ui) != null && t.showHeader);
|
|
68
|
-
}), Z =
|
|
69
|
-
() => !!
|
|
75
|
+
}), Z = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ee = u(
|
|
76
|
+
() => !!W().recommendationConfigs.strategyId
|
|
70
77
|
);
|
|
71
78
|
ce({
|
|
72
79
|
onBack: () => {
|
|
@@ -76,91 +83,85 @@ const et = /* @__PURE__ */ ne({
|
|
|
76
83
|
console.debug("guido:save:start"), r("save:start");
|
|
77
84
|
},
|
|
78
85
|
onSaveComplete: (t) => {
|
|
79
|
-
const e = { ...t, metadata:
|
|
86
|
+
const e = { ...t, metadata: y() };
|
|
80
87
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
81
88
|
},
|
|
82
89
|
onTestEmailClick: () => {
|
|
83
90
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
84
91
|
}
|
|
85
92
|
});
|
|
86
|
-
const
|
|
87
|
-
console.debug("dynamic-content:close", t),
|
|
88
|
-
},
|
|
93
|
+
const O = (t) => {
|
|
94
|
+
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
95
|
+
}, A = () => {
|
|
89
96
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
90
97
|
};
|
|
91
|
-
|
|
98
|
+
P(() => m.value, () => {
|
|
92
99
|
r("on-change", m.value);
|
|
93
100
|
});
|
|
94
|
-
const
|
|
95
|
-
const e = t, { attribute:
|
|
96
|
-
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open",
|
|
101
|
+
const v = (t) => {
|
|
102
|
+
const e = t, { attribute: i, position: d } = e.detail;
|
|
103
|
+
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", i, d);
|
|
97
104
|
};
|
|
98
|
-
let
|
|
99
|
-
const
|
|
105
|
+
let c = null;
|
|
106
|
+
const b = () => {
|
|
100
107
|
var e;
|
|
101
108
|
const t = document.querySelector(pe);
|
|
102
|
-
(e =
|
|
103
|
-
},
|
|
109
|
+
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
110
|
+
}, S = async () => {
|
|
104
111
|
var t;
|
|
105
112
|
try {
|
|
106
|
-
o.initialized || o.init(
|
|
107
|
-
const e = o.template,
|
|
108
|
-
|
|
109
|
-
const N = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {},
|
|
113
|
+
o.initialized || o.init(a.config), s.templateId = o.templateId;
|
|
114
|
+
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) || [];
|
|
115
|
+
E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
116
|
+
const N = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, U = o.isFeatureEnabled("linkTrackingIds");
|
|
110
117
|
let n = {
|
|
111
|
-
html:
|
|
118
|
+
html: i && await x(i, N),
|
|
112
119
|
css: d
|
|
113
120
|
};
|
|
114
|
-
n.html || (n = await
|
|
115
|
-
const te =
|
|
116
|
-
|
|
121
|
+
n.html || (n = await I(), n.html = await x(n.html, N));
|
|
122
|
+
const te = U ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
123
|
+
L(n.html) && (n.html = await R(n.html)), U && (s.trackIdSessionFloor = Math.max(te, $(n.html)));
|
|
117
124
|
const oe = {
|
|
118
|
-
preselectedDynamicContentList:
|
|
125
|
+
preselectedDynamicContentList: B,
|
|
119
126
|
onReady: () => {
|
|
120
127
|
console.debug("guido:ready"), r("ready");
|
|
121
128
|
}
|
|
122
129
|
};
|
|
123
|
-
|
|
130
|
+
g = F(), await k(n, y(), oe), f.selectedDynamicContentList = B;
|
|
124
131
|
} catch (e) {
|
|
125
132
|
console.error("Failed to initialize Stripo editor:", e);
|
|
126
133
|
}
|
|
127
134
|
};
|
|
128
135
|
return re(async () => {
|
|
129
136
|
var e;
|
|
130
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
131
|
-
const t = (e =
|
|
132
|
-
if (t && (
|
|
133
|
-
await
|
|
137
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), W().$reset(), G().$reset(), De().$reset(), b();
|
|
138
|
+
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
139
|
+
if (t && (c = new ResizeObserver(b), c.observe(t)), D(), a.ready)
|
|
140
|
+
await S();
|
|
134
141
|
else {
|
|
135
|
-
const
|
|
136
|
-
d && (
|
|
142
|
+
const i = P(() => a.ready, (d) => {
|
|
143
|
+
d && (i(), S());
|
|
137
144
|
});
|
|
138
145
|
}
|
|
139
|
-
document.addEventListener("dynamic-content:open",
|
|
146
|
+
document.addEventListener("dynamic-content:open", v);
|
|
140
147
|
}), se(() => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
E().isStripoInitialized = !1;
|
|
144
|
-
} catch (t) {
|
|
145
|
-
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
146
|
-
}
|
|
147
|
-
I(async () => {
|
|
148
|
-
if (v(l))
|
|
148
|
+
c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", v), T(async () => {
|
|
149
|
+
if (M(g))
|
|
149
150
|
try {
|
|
150
151
|
window.UIEditor.removeEditor();
|
|
151
152
|
} catch {
|
|
152
153
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
153
154
|
}
|
|
154
155
|
}), o.reset();
|
|
155
|
-
}),
|
|
156
|
+
}), V({
|
|
156
157
|
dynamicContent: {
|
|
157
|
-
insert:
|
|
158
|
-
close:
|
|
158
|
+
insert: O,
|
|
159
|
+
close: A
|
|
159
160
|
},
|
|
160
161
|
hasChanges: m,
|
|
161
|
-
saveSilent:
|
|
162
|
-
setLoading:
|
|
163
|
-
}), { __sfc: !0, PreviewContainer:
|
|
162
|
+
saveSilent: w,
|
|
163
|
+
setLoading: C
|
|
164
|
+
}), { __sfc: !0, PreviewContainer: q, OnboardingWrapper: K, AssignStrategyDrawer: j, RemoveStrategyModal: J, autoSaveControllerRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: s, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: D, runExclusive: T, beginMount: F, isCurrentMount: M, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: R, hasTimerBlocks: L, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: O, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: c, updateRibbonOffset: b, startEditor: S, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: be, SaveAsTemplateDrawer: Se, UnsubscribeWrapper: he };
|
|
164
165
|
}
|
|
165
166
|
});
|
|
166
167
|
export {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useAutoSave as s } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as a } from "../../composables/useSave.js";
|
|
4
|
+
const p = /* @__PURE__ */ r({
|
|
5
5
|
__name: "AutoSaveController",
|
|
6
|
-
setup(
|
|
7
|
-
const { save: e } =
|
|
8
|
-
return
|
|
6
|
+
setup(n, { expose: t }) {
|
|
7
|
+
const { save: e } = a(), o = () => e(!1, !0);
|
|
8
|
+
return s(o), t({
|
|
9
|
+
saveSilent: () => e(!0)
|
|
10
|
+
}), { __sfc: !0, save: e, backgroundSave: o };
|
|
9
11
|
}
|
|
10
12
|
});
|
|
11
13
|
export {
|
|
12
|
-
|
|
14
|
+
p as default
|
|
13
15
|
};
|
|
@@ -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 r 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" }, [t.
|
|
3
|
+
import a 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 ? i._e() : e("div", { staticClass: "editor-actions__divider" }), (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__ */ a(
|
|
13
|
+
r,
|
|
14
|
+
d,
|
|
13
15
|
l,
|
|
14
|
-
u,
|
|
15
|
-
p,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"4036dff9"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const p = c.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
p as default
|
|
23
23
|
};
|
|
@@ -1,64 +1,48 @@
|
|
|
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
|
-
|
|
18
|
-
const ft = /* @__PURE__ */ q({
|
|
1
|
+
import { defineComponent as C, ref as S } from "vue";
|
|
2
|
+
import { useActionsApi as T } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as M } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTestEmailClick as w } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useHtmlCompiler as x } from "../../../composables/useHtmlCompiler.js";
|
|
6
|
+
import { useSave as A } from "../../../composables/useSave.js";
|
|
7
|
+
import { useToaster as F } from "../../../composables/useToaster.js";
|
|
8
|
+
import { useTranslations as V } from "../../../composables/useTranslations.js";
|
|
9
|
+
import { useLiquidValidator as q } from "../../../composables/validators/useLiquidValidator.js";
|
|
10
|
+
import { useEditorStore as H } from "../../../stores/editor.js";
|
|
11
|
+
import { useTemplateStore as k } from "../../../stores/template.js";
|
|
12
|
+
import { getTooltipOptions as L } from "../../../utils/tooltipUtils.js";
|
|
13
|
+
import { InButtonV2 as R } from "@useinsider/design-system-vue";
|
|
14
|
+
import { storeToRefs as b } from "pinia";
|
|
15
|
+
import z from "./EditorActionsMenu.vue.js";
|
|
16
|
+
import B from "./MigrationConfirmModal.vue.js";
|
|
17
|
+
const ot = /* @__PURE__ */ C({
|
|
19
18
|
__name: "EditorActions",
|
|
20
|
-
setup(
|
|
21
|
-
const { config:
|
|
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) => {
|
|
19
|
+
setup(D, { expose: E }) {
|
|
20
|
+
const { config: h, isFeatureEnabled: s } = M(), { save: n } = A(), { getCompiledEmail: m } = T(), { compileHtml: l } = x(), { validateLiquidSyntax: f } = q(), { handleError: r } = F(), e = H(), u = k(), { hasMigrations: c } = b(u), y = V(), a = S(!1), p = S(), d = w(), g = async (t) => {
|
|
37
21
|
a.value = !0, t || (e.loadingStatus = !0);
|
|
38
22
|
let o;
|
|
39
23
|
try {
|
|
40
|
-
o = await
|
|
41
|
-
} catch (
|
|
24
|
+
o = await n(t);
|
|
25
|
+
} catch (i) {
|
|
42
26
|
if (t)
|
|
43
|
-
throw
|
|
44
|
-
r(
|
|
27
|
+
throw i;
|
|
28
|
+
r(i, "Failed to save template");
|
|
45
29
|
} finally {
|
|
46
30
|
a.value = !1, !t && !o && (e.loadingStatus = !1);
|
|
47
31
|
}
|
|
48
32
|
return o;
|
|
49
|
-
},
|
|
33
|
+
}, v = (t) => {
|
|
50
34
|
var o;
|
|
51
|
-
if (!t &&
|
|
52
|
-
(o =
|
|
35
|
+
if (!t && c.value) {
|
|
36
|
+
(o = p.value) == null || o.open();
|
|
53
37
|
return;
|
|
54
38
|
}
|
|
55
|
-
return
|
|
56
|
-
},
|
|
57
|
-
if (
|
|
39
|
+
return g(t);
|
|
40
|
+
}, _ = async () => {
|
|
41
|
+
if (s("liquidSyntax")) {
|
|
58
42
|
e.loadingStatus = !0;
|
|
59
43
|
try {
|
|
60
|
-
const { html: t } = await
|
|
61
|
-
if (!await
|
|
44
|
+
const { html: t } = await m({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = l(t);
|
|
45
|
+
if (!await f(o))
|
|
62
46
|
return;
|
|
63
47
|
} catch (t) {
|
|
64
48
|
r(t, "Failed to prepare test email");
|
|
@@ -67,13 +51,13 @@ const ft = /* @__PURE__ */ q({
|
|
|
67
51
|
e.loadingStatus = !1;
|
|
68
52
|
}
|
|
69
53
|
}
|
|
70
|
-
|
|
54
|
+
d();
|
|
71
55
|
};
|
|
72
|
-
return
|
|
73
|
-
handleSave:
|
|
74
|
-
}), { __sfc: !0, config:
|
|
56
|
+
return E({
|
|
57
|
+
handleSave: v
|
|
58
|
+
}), { __sfc: !0, config: h, isFeatureEnabled: s, save: n, getCompiledEmail: m, compileHtml: l, validateLiquidSyntax: f, handleError: r, editorStore: e, templateStore: u, hasMigrations: c, trans: y, isSaving: a, migrationModalRef: p, testEmailClick: d, executeSave: g, handleSave: v, handleTestEmail: _, getTooltipOptions: L, InButtonV2: R, EditorActionsMenu: z, MigrationConfirmModal: B };
|
|
75
59
|
}
|
|
76
60
|
});
|
|
77
61
|
export {
|
|
78
|
-
|
|
62
|
+
ot as default
|
|
79
63
|
};
|
|
@@ -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
|
+
};
|