@useinsider/guido 3.30.0-beta.60cbdf2 → 3.30.0-beta.60f9fc0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/components/Guido.vue.js +9 -9
- package/dist/components/Guido.vue2.js +153 -130
- package/dist/components/organisms/dynamic-content/InvalidDynamicContentCard.vue.js +22 -0
- package/dist/components/organisms/dynamic-content/InvalidDynamicContentCard.vue2.js +30 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +4 -4
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +28 -28
- package/dist/composables/useAutoSave.js +13 -13
- package/dist/composables/useInvalidDynamicContentMarking.js +105 -0
- package/dist/composables/useStripo.js +39 -43
- package/dist/extensions/DynamicContent/dynamic-content.js +39 -57
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +18 -21
- package/dist/src/@types/generic.d.ts +11 -0
- package/dist/src/components/Guido.vue.d.ts +5 -1
- package/dist/src/components/organisms/dynamic-content/InvalidDynamicContentCard.vue.d.ts +22 -0
- package/dist/src/composables/useInvalidDynamicContentMarking.d.ts +4 -0
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +0 -8
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/dynamic-content.d.ts +42 -1
- package/dist/src/stores/editor.d.ts +0 -6
- package/dist/src/utils/editorCanvas.d.ts +3 -0
- package/dist/static/styles/customEditorStyle.css.js +4 -0
- package/dist/stores/dynamic-content.js +19 -7
- package/dist/stores/editor.js +14 -15
- package/dist/utils/editorCanvas.js +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -235,6 +235,7 @@ one-way. While `ready` is `false` every `features` toggle reads as disabled.
|
|
|
235
235
|
|-------|---------|-------------|
|
|
236
236
|
| `ready` | - | Editor is loaded and ready |
|
|
237
237
|
| `dynamic-content:open` | `DynamicContent \| null` | User wants to insert dynamic content |
|
|
238
|
+
| `dynamic-content:invalid-action` | `{ value: string }` | User clicked the link on an invalid chip's hover card; `value` is the chip's token |
|
|
238
239
|
| `back` | - | Back button clicked |
|
|
239
240
|
| `save:start` | - | Save process started |
|
|
240
241
|
| `save:complete` | `SavedTemplateDetails` | Save completed successfully (includes `metadata`) |
|
|
@@ -297,6 +298,18 @@ guidoRef.value?.dynamicContent.insert({
|
|
|
297
298
|
// Close dynamic content modal
|
|
298
299
|
guidoRef.value?.dynamicContent.close();
|
|
299
300
|
|
|
301
|
+
// Mark chips as invalid (red, with a hover card). Each call replaces the list;
|
|
302
|
+
// an empty list clears every mark. `value` is the token, without braces.
|
|
303
|
+
guidoRef.value?.dynamicContent.setInvalid([
|
|
304
|
+
{
|
|
305
|
+
value: 'zc_profile.i12.city',
|
|
306
|
+
title: 'Dynamic Content Unavailable',
|
|
307
|
+
description: 'Segment name',
|
|
308
|
+
actionLabel: 'Update Segment',
|
|
309
|
+
actionAvailable: true,
|
|
310
|
+
},
|
|
311
|
+
] satisfies InvalidDynamicContent[]);
|
|
312
|
+
|
|
300
313
|
// Silent save (no UI feedback)
|
|
301
314
|
guidoRef.value?.saveSilent();
|
|
302
315
|
|
|
@@ -575,6 +588,7 @@ import type {
|
|
|
575
588
|
DynamicContent,
|
|
576
589
|
DynamicContentList,
|
|
577
590
|
DynamicContentNode,
|
|
591
|
+
InvalidDynamicContent,
|
|
578
592
|
DefaultBlockType,
|
|
579
593
|
CustomBlockType,
|
|
580
594
|
} from '@useinsider/guido';
|
|
@@ -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
|
-
var
|
|
5
|
-
var
|
|
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) :
|
|
4
|
+
var o = function() {
|
|
5
|
+
var n = this, r = n._self._c, e = n._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) : n._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) : n._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : n._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : n._e(), e.isLegacyUnsubscribeConversionEnabled ? r(e.LegacyUnsubscribeConvertedModal) : n._e(), e.moduleDynamicContentStore.queue.length > 0 ? r(e.AmbiguousDynamicContentModal) : n._e(), e.hoveredInvalidDynamicContent && e.hoveredInvalidEntry ? r(e.InvalidDynamicContentCard, { attrs: { entry: e.hoveredInvalidEntry, position: e.hoveredInvalidDynamicContent.position }, on: { "dynamic-content:invalid-action": e.handleInvalidDynamicContentAction, mouseenter: e.cancelInvalidCardHide, mouseleave: e.scheduleInvalidCardHide } }) : n._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : n._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : n._e(), e.isTestPartner() ? n._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, t = [],
|
|
9
|
+
}, t = [], d = /* @__PURE__ */ i(
|
|
10
|
+
a,
|
|
10
11
|
o,
|
|
11
|
-
n,
|
|
12
12
|
t,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"d21be5d5"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const p = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
p as default
|
|
20
20
|
};
|
|
@@ -1,215 +1,238 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { startEditorOpenMetrics as
|
|
5
|
-
import { provideGuidoActions as
|
|
6
|
-
import { useGuidoStateBridge as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
|
|
1
|
+
import { defineComponent as Me, defineAsyncComponent as s, ref as L, computed as d, watch as w, onMounted as Re, onUnmounted as Ae } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as Oe } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as Ue } from "../composables/useEditorLock.js";
|
|
4
|
+
import { startEditorOpenMetrics as _e } from "../composables/useEditorOpenMetrics.js";
|
|
5
|
+
import { provideGuidoActions as He } from "../composables/useGuidoActions.js";
|
|
6
|
+
import { useGuidoStateBridge as Ne } from "../composables/useGuidoStateBridge.js";
|
|
7
|
+
import { useInvalidDynamicContentMarking as Pe } from "../composables/useInvalidDynamicContentMarking.js";
|
|
8
|
+
import { usePartner as xe } from "../composables/usePartner.js";
|
|
9
|
+
import { useSaveValidationRollout as Be } from "../composables/useSaveValidationRollout.js";
|
|
10
|
+
import { useStripo as Ve } from "../composables/useStripo.js";
|
|
11
|
+
import { useTimerClone as We } from "../composables/useTimerClone.js";
|
|
12
|
+
import { useToaster as $e } from "../composables/useToaster.js";
|
|
13
|
+
import { useTranslations as Ge } from "../composables/useTranslations.js";
|
|
14
|
+
import { migrate as ze } from "../config/migrator/index.js";
|
|
15
|
+
import { ModuleFolderDefaults as Z } from "../enums/defaults.js";
|
|
16
|
+
import { RIBBON_SELECTOR as qe } from "../enums/onboarding.js";
|
|
17
|
+
import { ToasterTypeOptions as Ke } from "../enums/toaster.js";
|
|
18
|
+
import { useRecommendationExtensionStore as ee, disposeStrategyPageReturnListeners as Ye } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
19
|
+
import { disposeUnsubscribeListeners as je } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
20
|
+
import { disposeDisplayConditionRequest as Je } from "../extensions/DisplayConditions/bridge.js";
|
|
21
|
+
import Qe from "./organisms/AutoSaveController.vue.js";
|
|
22
|
+
import Xe from "./organisms/base/AuthErrorModal.vue.js";
|
|
23
|
+
import Ze from "./organisms/base/Toaster.vue.js";
|
|
24
|
+
import et from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
25
|
+
import tt from "./organisms/header/HeaderWrapper.vue.js";
|
|
26
|
+
import ot from "./organisms/LoadingWrapper.vue.js";
|
|
27
|
+
import nt from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
28
|
+
import it from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
29
|
+
import rt from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
30
|
+
import { useStripoApi as at } from "../services/stripoApi.js";
|
|
31
|
+
import { useConfigStore as st } from "../stores/config.js";
|
|
32
|
+
import { useDynamicContentStore as ct } from "../stores/dynamic-content.js";
|
|
33
|
+
import { useEditorStore as F } from "../stores/editor.js";
|
|
34
|
+
import { useModuleDynamicContentStore as te } from "../stores/module-dynamic-content.js";
|
|
35
|
+
import { useOnboardingStore as dt } from "../stores/onboarding.js";
|
|
36
|
+
import { usePreviewStore as lt } from "../stores/preview.js";
|
|
37
|
+
import { useSaveValidationStore as mt } from "../stores/save-validation.js";
|
|
38
|
+
import { useTemplateStore as ut } from "../stores/template.js";
|
|
39
|
+
import { useUnsubscribeStore as pt } from "../stores/unsubscribe.js";
|
|
40
|
+
import { readTrackFloor as oe } from "../utils/linkTrackingIds.js";
|
|
41
|
+
const eo = /* @__PURE__ */ Me({
|
|
41
42
|
__name: "Guido",
|
|
42
43
|
props: {
|
|
43
44
|
config: null,
|
|
44
45
|
ready: { type: Boolean, default: !0 }
|
|
45
46
|
},
|
|
46
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
47
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click", "dynamic-content:invalid-action"],
|
|
48
|
+
setup(ne, { expose: ie, emit: r }) {
|
|
49
|
+
const l = ne, a = _e(), re = s(
|
|
49
50
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
50
|
-
),
|
|
51
|
+
), ae = s(
|
|
51
52
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
52
|
-
),
|
|
53
|
+
), se = s(
|
|
53
54
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
54
|
-
),
|
|
55
|
+
), ce = s(
|
|
55
56
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
56
|
-
),
|
|
57
|
+
), de = s(
|
|
57
58
|
() => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
|
|
58
|
-
),
|
|
59
|
+
), M = L(), le = s(
|
|
59
60
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
60
|
-
),
|
|
61
|
+
), me = s(
|
|
61
62
|
() => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
|
|
62
|
-
),
|
|
63
|
+
), ue = s(
|
|
63
64
|
() => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
|
|
64
|
-
),
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
), pe = s(
|
|
66
|
+
() => import("./organisms/dynamic-content/InvalidDynamicContentCard.vue.js")
|
|
67
|
+
), R = 200, S = L(), m = ct(), A = pt(), ve = te(), o = st();
|
|
68
|
+
l.ready && o.init(l.config);
|
|
69
|
+
const u = F(), ye = lt(), g = d(() => u.hasChanges), { isTestPartner: fe } = xe(), { isEnabled: ge, loadRollout: O } = Be(), { showToaster: U } = $e(), _ = Ge(), H = () => {
|
|
67
70
|
var t;
|
|
68
|
-
if (
|
|
69
|
-
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }),
|
|
70
|
-
type:
|
|
71
|
-
message:
|
|
71
|
+
if (u.isVersionHistoryOpen) {
|
|
72
|
+
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), U({
|
|
73
|
+
type: Ke.Warning,
|
|
74
|
+
message: _("email-editor.save-blocked-outside-editor")
|
|
72
75
|
});
|
|
73
76
|
return;
|
|
74
77
|
}
|
|
75
|
-
return (t =
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
+
return (t = M.value) == null ? void 0 : t.saveSilent();
|
|
79
|
+
}, N = (t) => {
|
|
80
|
+
u.loadingStatus = t;
|
|
78
81
|
};
|
|
79
|
-
|
|
80
|
-
const
|
|
82
|
+
Oe(), Ne();
|
|
83
|
+
const P = Pe(), h = () => {
|
|
81
84
|
var t, e;
|
|
82
85
|
return {
|
|
83
86
|
emailId: o.templateId,
|
|
84
87
|
userId: o.userId,
|
|
85
88
|
username: o.username,
|
|
86
89
|
partnerName: o.partnerName,
|
|
87
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
88
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
90
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || Z.SAVED_MODULES,
|
|
91
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || Z.DEFAULT_MODULES
|
|
89
92
|
};
|
|
90
|
-
}, { initPlugin:
|
|
91
|
-
let
|
|
92
|
-
const { getDefaultTemplate:
|
|
93
|
+
}, { initPlugin: x, preloadRuntime: B } = Ve(a), { runExclusive: V, beginMount: W, isCurrentMount: C } = Ue();
|
|
94
|
+
let b = 0;
|
|
95
|
+
const { getDefaultTemplate: $ } = at(), { cloneTimersOnSave: G, hasTimerBlocks: z } = We(), be = d(() => {
|
|
93
96
|
var t;
|
|
94
97
|
return !((t = o.ui) != null && t.showHeader);
|
|
95
|
-
}),
|
|
98
|
+
}), Se = d(() => o.isFeatureEnabled("reusableRecommendationStrategy")), he = d(() => o.externalDisplayConditions), Ce = d(
|
|
96
99
|
() => o.isFeatureEnabled("legacyUnsubscribeConversion")
|
|
97
|
-
),
|
|
98
|
-
() => !!
|
|
100
|
+
), Ee = d(
|
|
101
|
+
() => !!ee().recommendationConfigs.strategyId
|
|
99
102
|
);
|
|
100
|
-
|
|
103
|
+
He({
|
|
101
104
|
onBack: () => {
|
|
102
|
-
console.debug("guido:back"),
|
|
105
|
+
console.debug("guido:back"), r("back");
|
|
103
106
|
},
|
|
104
107
|
onSaveStart: () => {
|
|
105
|
-
console.debug("guido:save:start"),
|
|
108
|
+
console.debug("guido:save:start"), r("save:start");
|
|
106
109
|
},
|
|
107
110
|
onSaveComplete: (t) => {
|
|
108
|
-
const e = { ...t, metadata:
|
|
109
|
-
console.debug("guido:save:complete", e),
|
|
111
|
+
const e = { ...t, metadata: h() };
|
|
112
|
+
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
110
113
|
},
|
|
111
114
|
onTestEmailClick: () => {
|
|
112
|
-
console.debug("guido:test-email:click"),
|
|
115
|
+
console.debug("guido:test-email:click"), r("test-email:click");
|
|
113
116
|
}
|
|
114
117
|
});
|
|
115
|
-
const
|
|
116
|
-
console.debug("dynamic-content:close", t),
|
|
117
|
-
},
|
|
118
|
+
const q = (t) => {
|
|
119
|
+
console.debug("dynamic-content:close", t), m.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
120
|
+
}, K = () => {
|
|
118
121
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
122
|
+
}, Y = (t) => {
|
|
123
|
+
m.setInvalidDynamicContent(t);
|
|
124
|
+
}, c = L(null), j = d(() => c.value ? m.getInvalidDynamicContent(c.value.value) : void 0);
|
|
125
|
+
let p = null;
|
|
126
|
+
const v = () => {
|
|
127
|
+
p && (clearTimeout(p), p = null);
|
|
128
|
+
}, E = () => {
|
|
129
|
+
v(), p = setTimeout(() => {
|
|
130
|
+
p = null, c.value = null;
|
|
131
|
+
}, R);
|
|
132
|
+
}, D = (t) => {
|
|
133
|
+
var n;
|
|
134
|
+
const { detail: e } = t;
|
|
135
|
+
typeof ((n = e == null ? void 0 : e.entry) == null ? void 0 : n.value) != "string" || !e.position || (v(), c.value = { value: e.entry.value, position: e.position });
|
|
119
136
|
};
|
|
120
|
-
|
|
121
|
-
|
|
137
|
+
w(j, (t) => {
|
|
138
|
+
!t && c.value && (v(), c.value = null);
|
|
122
139
|
});
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, u);
|
|
140
|
+
const De = (t) => {
|
|
141
|
+
console.debug("dynamic-content:invalid-action", t), v(), c.value = null, r("dynamic-content:invalid-action", { value: t.value });
|
|
126
142
|
};
|
|
127
|
-
|
|
128
|
-
|
|
143
|
+
w(() => g.value, () => {
|
|
144
|
+
r("on-change", g.value);
|
|
145
|
+
});
|
|
146
|
+
const I = (t) => {
|
|
147
|
+
const e = t, { attribute: n, position: f } = e.detail;
|
|
148
|
+
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", n, f);
|
|
149
|
+
};
|
|
150
|
+
let y = null;
|
|
151
|
+
const T = () => {
|
|
129
152
|
var e;
|
|
130
|
-
const t = document.querySelector(
|
|
131
|
-
(e =
|
|
132
|
-
},
|
|
153
|
+
const t = document.querySelector(qe);
|
|
154
|
+
(e = S.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
155
|
+
}, k = async () => {
|
|
133
156
|
var t;
|
|
134
|
-
|
|
157
|
+
a.mark("host_ready");
|
|
135
158
|
try {
|
|
136
|
-
o.initialized || o.init(
|
|
159
|
+
o.initialized || o.init(l.config), u.templateId = o.templateId, a.setContext({
|
|
137
160
|
partnerName: o.partnerName,
|
|
138
161
|
productType: o.productType,
|
|
139
162
|
templateId: o.templateId,
|
|
140
163
|
variationId: o.variationId
|
|
141
164
|
});
|
|
142
|
-
const e = o.template,
|
|
143
|
-
|
|
144
|
-
const
|
|
165
|
+
const e = o.template, n = (e == null ? void 0 : e.html) || "", f = (e == null ? void 0 : e.css) || "", J = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
166
|
+
A.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
167
|
+
const Ie = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, Q = o.isFeatureEnabled("linkTrackingIds"), Te = {
|
|
145
168
|
partnerName: o.partnerName,
|
|
146
169
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
147
170
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
148
|
-
},
|
|
171
|
+
}, ke = {
|
|
149
172
|
itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
|
|
150
|
-
},
|
|
173
|
+
}, X = (Fe) => a.timed(
|
|
151
174
|
"migration",
|
|
152
|
-
() =>
|
|
175
|
+
() => ze(Fe, Ie, Te, ke)
|
|
153
176
|
);
|
|
154
|
-
let
|
|
155
|
-
html:
|
|
156
|
-
css:
|
|
177
|
+
let i = {
|
|
178
|
+
html: n && await X(n),
|
|
179
|
+
css: f
|
|
157
180
|
};
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
preselectedDynamicContentList:
|
|
181
|
+
i.html || (i = await a.timed("default_template", () => $()), i.html = await X(i.html));
|
|
182
|
+
const Le = Q ? oe(i.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
183
|
+
z(i.html) && (i.html = await a.timed("timer_clone", () => G(i.html))), Q && (u.trackIdSessionFloor = Math.max(Le, oe(i.html)));
|
|
184
|
+
const we = {
|
|
185
|
+
preselectedDynamicContentList: J,
|
|
163
186
|
onReady: () => {
|
|
164
|
-
console.debug("guido:ready"),
|
|
187
|
+
console.debug("guido:ready"), r("ready");
|
|
165
188
|
}
|
|
166
189
|
};
|
|
167
|
-
|
|
190
|
+
b = W(), await x(i, h(), we, i.html !== n), m.selectedDynamicContentList = J;
|
|
168
191
|
} catch (e) {
|
|
169
|
-
console.error("Failed to initialize Stripo editor:", e),
|
|
192
|
+
console.error("Failed to initialize Stripo editor:", e), a.markFailed();
|
|
170
193
|
}
|
|
171
194
|
};
|
|
172
|
-
return
|
|
195
|
+
return Re(async () => {
|
|
173
196
|
var e;
|
|
174
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
175
|
-
const t = (e =
|
|
176
|
-
if (t && (
|
|
177
|
-
await
|
|
197
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ee().$reset(), F().$reset(), ut().$reset(), mt().$reset(), te().$reset(), m.setInvalidDynamicContent([]), dt().resetOnboarding("recommendationLegacyStrategyOnboarding"), O(), T();
|
|
198
|
+
const t = (e = S.value) == null ? void 0 : e.parentElement;
|
|
199
|
+
if (t && (y = new ResizeObserver(T), y.observe(t)), B(), document.addEventListener("dynamic-content:open", I), document.addEventListener("dynamic-content:invalid-hover", D), document.addEventListener("dynamic-content:invalid-leave", E), l.ready)
|
|
200
|
+
await k();
|
|
178
201
|
else {
|
|
179
|
-
const
|
|
180
|
-
|
|
202
|
+
const n = w(() => l.ready, (f) => {
|
|
203
|
+
f && (n(), k());
|
|
181
204
|
});
|
|
182
205
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
xe();
|
|
206
|
+
}), Ae(() => {
|
|
207
|
+
if (je(), Ye(), a.dispose(), P.dispose(), y == null || y.disconnect(), document.removeEventListener("dynamic-content:open", I), document.removeEventListener("dynamic-content:invalid-hover", D), document.removeEventListener("dynamic-content:invalid-leave", E), v(), C(b)) {
|
|
208
|
+
Je();
|
|
187
209
|
try {
|
|
188
|
-
const t =
|
|
210
|
+
const t = F();
|
|
189
211
|
t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
|
|
190
212
|
} catch (t) {
|
|
191
213
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
192
214
|
}
|
|
193
215
|
}
|
|
194
|
-
|
|
195
|
-
if (
|
|
216
|
+
V(async () => {
|
|
217
|
+
if (C(b))
|
|
196
218
|
try {
|
|
197
219
|
window.UIEditor.removeEditor();
|
|
198
220
|
} catch {
|
|
199
221
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
200
222
|
}
|
|
201
223
|
}), o.reset();
|
|
202
|
-
}),
|
|
224
|
+
}), ie({
|
|
203
225
|
dynamicContent: {
|
|
204
|
-
insert:
|
|
205
|
-
close:
|
|
226
|
+
insert: q,
|
|
227
|
+
close: K,
|
|
228
|
+
setInvalid: Y
|
|
206
229
|
},
|
|
207
|
-
hasChanges:
|
|
208
|
-
saveSilent:
|
|
209
|
-
setLoading:
|
|
210
|
-
}), { __sfc: !0, openMetrics:
|
|
230
|
+
hasChanges: g,
|
|
231
|
+
saveSilent: H,
|
|
232
|
+
setLoading: N
|
|
233
|
+
}), { __sfc: !0, openMetrics: a, PreviewContainer: re, OnboardingWrapper: ae, AssignStrategyDrawer: se, RemoveStrategyModal: ce, DisplayConditionsHost: de, autoSaveControllerRef: M, LegacyStrategyUpdatedModal: le, LegacyUnsubscribeConvertedModal: me, AmbiguousDynamicContentModal: ue, InvalidDynamicContentCard: pe, INVALID_CARD_HIDE_DELAY: R, wrapperRef: S, dynamicContentStore: m, unsubscribeStore: A, moduleDynamicContentStore: ve, props: l, configStore: o, editorStore: u, previewStore: ye, hasChanges: g, isTestPartner: fe, isSaveValidationEnabled: ge, loadRollout: O, showToaster: U, trans: _, saveSilent: H, setLoading: N, emit: r, invalidDynamicContentMarking: P, buildMetadata: h, initPlugin: x, preloadRuntime: B, runExclusive: V, beginMount: W, isCurrentMount: C, mountGeneration: b, getDefaultTemplate: $, cloneTimersOnSave: G, hasTimerBlocks: z, noHeader: be, isRrsEnabled: Se, isExternalDisplayConditionsEnabled: he, isLegacyUnsubscribeConversionEnabled: Ce, hasAssignedStrategy: Ee, insertDynamicContent: q, closeDynamicContent: K, setInvalidDynamicContent: Y, hoveredInvalidDynamicContent: c, hoveredInvalidEntry: j, invalidCardHideTimer: p, cancelInvalidCardHide: v, scheduleInvalidCardHide: E, handleInvalidDynamicContentHover: D, handleInvalidDynamicContentAction: De, handleDynamicContentOpen: I, ribbonObserver: y, updateRibbonOffset: T, startEditor: k, AutoSaveController: Qe, AuthErrorModal: Xe, Toaster: Ze, FilterSelectionDrawer: et, HeaderWrapper: tt, LoadingWrapper: ot, SaveAsTemplateDrawer: nt, UnsubscribeWrapper: it, ValidationErrorDrawer: rt };
|
|
211
234
|
}
|
|
212
235
|
});
|
|
213
236
|
export {
|
|
214
|
-
|
|
237
|
+
eo as default
|
|
215
238
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import a from "./InvalidDynamicContentCard.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import c from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
6
|
+
return n("div", { ref: "cardRef", staticClass: "invalid-dynamic-content-card", style: e.cardStyle, attrs: { id: "guido__invalid-dynamic-content-card", "aria-labelledby": "guido__invalid-dynamic-content-card-title", role: "dialog" }, on: { mouseenter: function(i) {
|
|
7
|
+
return e.emit("mouseenter");
|
|
8
|
+
}, mouseleave: function(i) {
|
|
9
|
+
return e.emit("mouseleave");
|
|
10
|
+
} } }, [n("p", { staticClass: "invalid-dynamic-content-card__title", attrs: { id: "guido__invalid-dynamic-content-card-title" } }, [t._v(" " + t._s(t.entry.title) + " ")]), n("p", { staticClass: "invalid-dynamic-content-card__description" }, [t._v(" " + t._s(t.entry.description) + " ")]), t.entry.actionAvailable && t.entry.actionLabel ? n("button", { staticClass: "invalid-dynamic-content-card__action", attrs: { id: "guido__invalid-dynamic-content-card-action", type: "button" }, on: { click: e.onAction } }, [t._v(" " + t._s(t.entry.actionLabel) + " ")]) : t._e()]);
|
|
11
|
+
}, o = [], d = /* @__PURE__ */ c(
|
|
12
|
+
a,
|
|
13
|
+
r,
|
|
14
|
+
o,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"749d0533"
|
|
18
|
+
);
|
|
19
|
+
const v = d.exports;
|
|
20
|
+
export {
|
|
21
|
+
v as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as y, ref as u, onMounted as _, watch as x, nextTick as C, computed as R } from "vue";
|
|
2
|
+
const I = /* @__PURE__ */ y({
|
|
3
|
+
__name: "InvalidDynamicContentCard",
|
|
4
|
+
props: {
|
|
5
|
+
entry: null,
|
|
6
|
+
position: null
|
|
7
|
+
},
|
|
8
|
+
emits: ["dynamic-content:invalid-action", "mouseenter", "mouseleave"],
|
|
9
|
+
setup(m, { emit: s }) {
|
|
10
|
+
const t = m, i = 4, o = 8, r = u(), c = u({ width: 0, height: 0 }), a = () => {
|
|
11
|
+
var e;
|
|
12
|
+
const n = (e = r.value) == null ? void 0 : e.getBoundingClientRect();
|
|
13
|
+
n && (c.value = { width: n.width, height: n.height });
|
|
14
|
+
};
|
|
15
|
+
_(a), x(() => [t.entry, t.position], () => C(a));
|
|
16
|
+
const p = R(() => {
|
|
17
|
+
const { x: n, y: e, height: f = 0 } = t.position, { width: v, height: d } = c.value, h = e + f + i, l = e - i - d, w = h + d > window.innerHeight - o, g = window.innerWidth - v - o;
|
|
18
|
+
return {
|
|
19
|
+
top: `${w && l >= o ? l : h}px`,
|
|
20
|
+
left: `${Math.max(0, Math.min(n, g))}px`
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
return { __sfc: !0, CARD_OFFSET: i, VIEWPORT_MARGIN: o, props: t, emit: s, cardRef: r, cardSize: c, measureCard: a, cardStyle: p, onAction: () => {
|
|
24
|
+
s("dynamic-content:invalid-action", { value: t.entry.value });
|
|
25
|
+
} };
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
I as default
|
|
30
|
+
};
|
|
@@ -2,17 +2,17 @@ import i from "./EditorActionsMenu.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var n = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
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
7
|
t.isOpen = !t.isOpen;
|
|
8
|
-
} } }),
|
|
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
9
|
}, a = [], r = /* @__PURE__ */ s(
|
|
10
10
|
i,
|
|
11
11
|
n,
|
|
12
12
|
a,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"bdb3b37a"
|
|
16
16
|
);
|
|
17
17
|
const _ = r.exports;
|
|
18
18
|
export {
|