@useinsider/guido 3.30.0-beta.a1f329f → 3.30.0-beta.b86be87
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 -1
- package/dist/@types/config/schemas.js +11 -13
- package/dist/components/Guido.vue.js +9 -9
- package/dist/components/Guido.vue2.js +137 -118
- package/dist/components/organisms/dynamic-content/InvalidDynamicContentCard.vue.js +22 -0
- package/dist/components/organisms/dynamic-content/InvalidDynamicContentCard.vue2.js +21 -0
- package/dist/components/organisms/header/EditorActions.vue.js +2 -2
- package/dist/composables/useInvalidDynamicContentMarking.js +113 -0
- package/dist/composables/useSave.js +78 -76
- package/dist/composables/useStripo.js +20 -20
- package/dist/extensions/DynamicContent/dynamic-content.js +28 -26
- package/dist/guido.css +1 -1
- package/dist/package.json.js +2 -2
- package/dist/src/@types/config/schemas.d.ts +0 -4
- 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/useConfig.d.ts +0 -2
- package/dist/src/composables/useInvalidDynamicContentMarking.d.ts +4 -0
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +0 -21
- package/dist/src/stores/dynamic-content.d.ts +42 -1
- package/dist/static/styles/customEditorStyle.css.js +4 -0
- package/dist/stores/dynamic-content.js +19 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,7 +174,6 @@ const config: GuidoConfigInput = {
|
|
|
174
174
|
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
175
175
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
176
176
|
legacyUnsubscribeConversion?: boolean, // Default: false - Convert legacy unsubscribe blocks that have no unsubscribe link into text blocks (on load and on module drop/copy) and show a warning modal.
|
|
177
|
-
readonly?: boolean, // Default: false - Opens the design with Save disabled: no save path persists (toolbar Save, "Save and Continue", autosave, saveSilent() resolves undefined), no save:start / save:complete, and edits never emit on-change, so the host shows no leave-page warning. Read at mount; to change it, remount Guido.
|
|
178
177
|
accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
|
|
179
178
|
itemsPriceFormatting?: boolean, // Default: false - Items block price formatting: thousand/decimal separator + decimal count on the block root, raw price tags in the export (formatted at send time).
|
|
180
179
|
blockUnsubscribeLinks?: boolean, // Default: false - Warn on save when the design carries an Insider unsubscribe link or code ({{ins-*-unsubscribe-link}}, <%asm_*_raw_url%>, <%unsub%>): the legacy save is rejected with a warning toaster; with the validation drawer on it is a warning row that "Save and Continue" can skip. Launch blocking is up to the host. Set true for accounts whose unsubscribes are managed outside Insider (SFMC).
|
|
@@ -236,6 +235,7 @@ one-way. While `ready` is `false` every `features` toggle reads as disabled.
|
|
|
236
235
|
|-------|---------|-------------|
|
|
237
236
|
| `ready` | - | Editor is loaded and ready |
|
|
238
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 |
|
|
239
239
|
| `back` | - | Back button clicked |
|
|
240
240
|
| `save:start` | - | Save process started |
|
|
241
241
|
| `save:complete` | `SavedTemplateDetails` | Save completed successfully (includes `metadata`) |
|
|
@@ -298,6 +298,18 @@ guidoRef.value?.dynamicContent.insert({
|
|
|
298
298
|
// Close dynamic content modal
|
|
299
299
|
guidoRef.value?.dynamicContent.close();
|
|
300
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
|
+
|
|
301
313
|
// Silent save (no UI feedback)
|
|
302
314
|
guidoRef.value?.saveSilent();
|
|
303
315
|
|
|
@@ -576,6 +588,7 @@ import type {
|
|
|
576
588
|
DynamicContent,
|
|
577
589
|
DynamicContentList,
|
|
578
590
|
DynamicContentNode,
|
|
591
|
+
InvalidDynamicContent,
|
|
579
592
|
DefaultBlockType,
|
|
580
593
|
CustomBlockType,
|
|
581
594
|
} from '@useinsider/guido';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
-
import { object as o, number as c, optional as e, string as t, picklist as m, pipe as
|
|
2
|
+
import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as h } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const b = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -14,12 +14,12 @@ const b = {
|
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
15
|
}, A = o({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
|
-
templateId:
|
|
17
|
+
templateId: r(
|
|
18
18
|
t(),
|
|
19
19
|
p(1, "templateId is required")
|
|
20
20
|
),
|
|
21
21
|
/** Unique identifier for the user editing the template */
|
|
22
|
-
userId:
|
|
22
|
+
userId: r(
|
|
23
23
|
t(),
|
|
24
24
|
p(1, "userId is required")
|
|
25
25
|
),
|
|
@@ -40,7 +40,7 @@ const b = {
|
|
|
40
40
|
family: t()
|
|
41
41
|
}), E = o({
|
|
42
42
|
/** Partner/organization name (required) */
|
|
43
|
-
name:
|
|
43
|
+
name: r(
|
|
44
44
|
t(),
|
|
45
45
|
p(1, "partner.name is required")
|
|
46
46
|
),
|
|
@@ -93,23 +93,23 @@ const b = {
|
|
|
93
93
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
94
94
|
decimalCount: e(h([t(), c()])),
|
|
95
95
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
96
|
-
productIds: e(n(
|
|
96
|
+
productIds: e(n(i())),
|
|
97
97
|
/** Whether the block requested live products at send time */
|
|
98
98
|
sendProductRequestFlag: e(a()),
|
|
99
99
|
/** Whether to randomize product order */
|
|
100
100
|
shuffleProducts: e(a()),
|
|
101
101
|
/** Filter rules driving product selection */
|
|
102
|
-
filters: e(n(
|
|
102
|
+
filters: e(n(i())),
|
|
103
103
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
104
104
|
currency: e(t()),
|
|
105
105
|
/** Currency display settings (separators, alignment, decimals) */
|
|
106
|
-
currencySettings: e(
|
|
106
|
+
currencySettings: e(i()),
|
|
107
107
|
/** Locale (e.g. 'nl_NL') */
|
|
108
108
|
language: e(t()),
|
|
109
109
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
110
110
|
strategy: e(t()),
|
|
111
111
|
/** Snapshot of products as rendered by the legacy block */
|
|
112
|
-
recommendedProducts: e(n(
|
|
112
|
+
recommendedProducts: e(n(i())),
|
|
113
113
|
/** Number of product cards per row */
|
|
114
114
|
cardsInRow: e(c()),
|
|
115
115
|
/** Mobile-only padding (right) */
|
|
@@ -174,7 +174,7 @@ const b = {
|
|
|
174
174
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
175
175
|
*/
|
|
176
176
|
trackIdCounter: e(
|
|
177
|
-
|
|
177
|
+
r(
|
|
178
178
|
c(),
|
|
179
179
|
S((s) => Number.isFinite(s) ? Math.max(0, Math.floor(s)) : 0)
|
|
180
180
|
),
|
|
@@ -188,8 +188,8 @@ const b = {
|
|
|
188
188
|
* cannot be undone. Hosts send `[]` for an empty map.
|
|
189
189
|
*/
|
|
190
190
|
recommendationCampaignUrls: e(
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
r(
|
|
192
|
+
i(),
|
|
193
193
|
S((s) => s && typeof s == "object" ? { ...s } : void 0)
|
|
194
194
|
)
|
|
195
195
|
),
|
|
@@ -249,8 +249,6 @@ const b = {
|
|
|
249
249
|
reusableRecommendationStrategy: e(a(), !1),
|
|
250
250
|
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
251
251
|
legacyUnsubscribeConversion: e(a(), !1),
|
|
252
|
-
/** Disable every save path and the unsaved-changes signal; read at mount only. */
|
|
253
|
-
readonly: e(a(), !1),
|
|
254
252
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
255
253
|
itemsPriceFormatting: e(a(), !1),
|
|
256
254
|
/** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
|
|
@@ -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 ? r(e.InvalidDynamicContentCard, { attrs: { entry: e.hoveredInvalidDynamicContent.entry, 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
|
+
"b7cb4d33"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const p = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
p as default
|
|
20
20
|
};
|
|
@@ -1,103 +1,106 @@
|
|
|
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 Fe, defineAsyncComponent as a, ref as L, computed as u, watch as Q, onMounted as Me, onUnmounted as Re } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as Ae } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as Oe } from "../composables/useEditorLock.js";
|
|
4
|
+
import { startEditorOpenMetrics as Ue } from "../composables/useEditorOpenMetrics.js";
|
|
5
|
+
import { provideGuidoActions as _e } from "../composables/useGuidoActions.js";
|
|
6
|
+
import { useGuidoStateBridge as He } from "../composables/useGuidoStateBridge.js";
|
|
7
|
+
import { useInvalidDynamicContentMarking as Ne } from "../composables/useInvalidDynamicContentMarking.js";
|
|
8
|
+
import { usePartner as Pe } from "../composables/usePartner.js";
|
|
9
|
+
import { useSaveValidationRollout as xe } from "../composables/useSaveValidationRollout.js";
|
|
10
|
+
import { useStripo as Be } from "../composables/useStripo.js";
|
|
11
|
+
import { useTimerClone as Ve } from "../composables/useTimerClone.js";
|
|
12
|
+
import { useToaster as We } from "../composables/useToaster.js";
|
|
13
|
+
import { useTranslations as $e } from "../composables/useTranslations.js";
|
|
14
|
+
import { migrate as Ge } from "../config/migrator/index.js";
|
|
15
|
+
import { ModuleFolderDefaults as X } from "../enums/defaults.js";
|
|
16
|
+
import { RIBBON_SELECTOR as ze } from "../enums/onboarding.js";
|
|
17
|
+
import { ToasterTypeOptions as qe } from "../enums/toaster.js";
|
|
18
|
+
import { useRecommendationExtensionStore as Z, disposeStrategyPageReturnListeners as Ke } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
19
|
+
import { disposeUnsubscribeListeners as Ye } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
20
|
+
import { disposeDisplayConditionRequest as je } from "../extensions/DisplayConditions/bridge.js";
|
|
21
|
+
import Je from "./organisms/AutoSaveController.vue.js";
|
|
22
|
+
import Qe from "./organisms/base/AuthErrorModal.vue.js";
|
|
23
|
+
import Xe from "./organisms/base/Toaster.vue.js";
|
|
24
|
+
import Ze from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
25
|
+
import et from "./organisms/header/HeaderWrapper.vue.js";
|
|
26
|
+
import tt from "./organisms/LoadingWrapper.vue.js";
|
|
27
|
+
import ot from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
28
|
+
import nt from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
29
|
+
import it from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
30
|
+
import { useStripoApi as rt } from "../services/stripoApi.js";
|
|
31
|
+
import { useConfigStore as at } from "../stores/config.js";
|
|
32
|
+
import { useDynamicContentStore as st } from "../stores/dynamic-content.js";
|
|
33
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
34
|
+
import { useModuleDynamicContentStore as ee } from "../stores/module-dynamic-content.js";
|
|
35
|
+
import { useOnboardingStore as ct } from "../stores/onboarding.js";
|
|
36
|
+
import { usePreviewStore as dt } from "../stores/preview.js";
|
|
37
|
+
import { useSaveValidationStore as mt } from "../stores/save-validation.js";
|
|
38
|
+
import { useTemplateStore as lt } from "../stores/template.js";
|
|
39
|
+
import { useUnsubscribeStore as ut } from "../stores/unsubscribe.js";
|
|
40
|
+
import { readTrackFloor as te } from "../utils/linkTrackingIds.js";
|
|
41
|
+
const Zt = /* @__PURE__ */ Fe({
|
|
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 c =
|
|
47
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click", "dynamic-content:invalid-action"],
|
|
48
|
+
setup(oe, { expose: ne, emit: i }) {
|
|
49
|
+
const c = oe, r = Ue(), ie = a(
|
|
49
50
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
50
|
-
),
|
|
51
|
+
), re = a(
|
|
51
52
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
52
|
-
),
|
|
53
|
+
), ae = a(
|
|
53
54
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
54
|
-
),
|
|
55
|
+
), se = a(
|
|
55
56
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
56
|
-
),
|
|
57
|
+
), ce = a(
|
|
57
58
|
() => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
|
|
58
|
-
),
|
|
59
|
+
), F = L(), de = a(
|
|
59
60
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
60
|
-
),
|
|
61
|
+
), me = a(
|
|
61
62
|
() => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
|
|
62
|
-
),
|
|
63
|
+
), le = a(
|
|
63
64
|
() => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
|
|
64
|
-
),
|
|
65
|
+
), ue = a(
|
|
66
|
+
() => import("./organisms/dynamic-content/InvalidDynamicContentCard.vue.js")
|
|
67
|
+
), M = 200, S = L(), p = st(), R = ut(), pe = ee(), o = at();
|
|
65
68
|
c.ready && o.init(c.config);
|
|
66
|
-
const d =
|
|
69
|
+
const d = w(), ve = dt(), f = u(() => d.hasChanges), { isTestPartner: ye } = Pe(), { isEnabled: fe, loadRollout: A } = xe(), { showToaster: O } = We(), U = $e(), _ = () => {
|
|
67
70
|
var t;
|
|
68
71
|
if (d.isVersionHistoryOpen) {
|
|
69
|
-
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }),
|
|
70
|
-
type:
|
|
71
|
-
message:
|
|
72
|
+
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), O({
|
|
73
|
+
type: qe.Warning,
|
|
74
|
+
message: U("email-editor.save-blocked-outside-editor")
|
|
72
75
|
});
|
|
73
76
|
return;
|
|
74
77
|
}
|
|
75
|
-
return (t =
|
|
76
|
-
},
|
|
78
|
+
return (t = F.value) == null ? void 0 : t.saveSilent();
|
|
79
|
+
}, H = (t) => {
|
|
77
80
|
d.loadingStatus = t;
|
|
78
81
|
};
|
|
79
|
-
|
|
80
|
-
const
|
|
82
|
+
Ae(), He();
|
|
83
|
+
const N = Ne(), 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) || X.SAVED_MODULES,
|
|
91
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || X.DEFAULT_MODULES
|
|
89
92
|
};
|
|
90
|
-
}, { initPlugin:
|
|
91
|
-
let
|
|
92
|
-
const { getDefaultTemplate:
|
|
93
|
+
}, { initPlugin: P, preloadRuntime: x } = Be(r), { runExclusive: B, beginMount: V, isCurrentMount: C } = Oe();
|
|
94
|
+
let g = 0;
|
|
95
|
+
const { getDefaultTemplate: W } = rt(), { cloneTimersOnSave: $, hasTimerBlocks: G } = Ve(), ge = u(() => {
|
|
93
96
|
var t;
|
|
94
97
|
return !((t = o.ui) != null && t.showHeader);
|
|
95
|
-
}),
|
|
98
|
+
}), be = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Se = u(() => o.externalDisplayConditions), he = u(
|
|
96
99
|
() => o.isFeatureEnabled("legacyUnsubscribeConversion")
|
|
97
|
-
),
|
|
98
|
-
() => !!
|
|
100
|
+
), Ce = u(
|
|
101
|
+
() => !!Z().recommendationConfigs.strategyId
|
|
99
102
|
);
|
|
100
|
-
|
|
103
|
+
_e({
|
|
101
104
|
onBack: () => {
|
|
102
105
|
console.debug("guido:back"), i("back");
|
|
103
106
|
},
|
|
@@ -105,31 +108,46 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
105
108
|
console.debug("guido:save:start"), i("save:start");
|
|
106
109
|
},
|
|
107
110
|
onSaveComplete: (t) => {
|
|
108
|
-
const e = { ...t, metadata:
|
|
111
|
+
const e = { ...t, metadata: h() };
|
|
109
112
|
console.debug("guido:save:complete", e), i("save:complete", e);
|
|
110
113
|
},
|
|
111
114
|
onTestEmailClick: () => {
|
|
112
115
|
console.debug("guido:test-email:click"), i("test-email:click");
|
|
113
116
|
}
|
|
114
117
|
});
|
|
115
|
-
const
|
|
116
|
-
console.debug("dynamic-content:close", t),
|
|
117
|
-
},
|
|
118
|
+
const z = (t) => {
|
|
119
|
+
console.debug("dynamic-content:close", t), p.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
120
|
+
}, q = () => {
|
|
118
121
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
122
|
+
}, K = (t) => {
|
|
123
|
+
p.setInvalidDynamicContent(t);
|
|
124
|
+
}, b = L(null);
|
|
125
|
+
let m = null;
|
|
126
|
+
const v = () => {
|
|
127
|
+
m && (clearTimeout(m), m = null);
|
|
128
|
+
}, E = () => {
|
|
129
|
+
v(), m = setTimeout(() => {
|
|
130
|
+
m = null, b.value = null;
|
|
131
|
+
}, M);
|
|
132
|
+
}, D = (t) => {
|
|
133
|
+
const { detail: e } = t;
|
|
134
|
+
!(e != null && e.entry) || !e.position || (v(), b.value = { entry: e.entry, position: e.position });
|
|
135
|
+
}, Ee = (t) => {
|
|
136
|
+
console.debug("dynamic-content:invalid-action", t), v(), b.value = null, i("dynamic-content:invalid-action", { value: t.value });
|
|
119
137
|
};
|
|
120
|
-
|
|
121
|
-
i("on-change",
|
|
138
|
+
Q(() => f.value, () => {
|
|
139
|
+
i("on-change", f.value);
|
|
122
140
|
});
|
|
123
|
-
const
|
|
124
|
-
const e = t, { attribute: s, position:
|
|
125
|
-
console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s,
|
|
141
|
+
const I = (t) => {
|
|
142
|
+
const e = t, { attribute: s, position: y } = e.detail;
|
|
143
|
+
console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, y);
|
|
126
144
|
};
|
|
127
|
-
let
|
|
128
|
-
const
|
|
145
|
+
let l = null;
|
|
146
|
+
const T = () => {
|
|
129
147
|
var e;
|
|
130
|
-
const t = document.querySelector(
|
|
131
|
-
(e =
|
|
132
|
-
},
|
|
148
|
+
const t = document.querySelector(ze);
|
|
149
|
+
(e = S.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
150
|
+
}, k = async () => {
|
|
133
151
|
var t;
|
|
134
152
|
r.mark("host_ready");
|
|
135
153
|
try {
|
|
@@ -139,77 +157,78 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
139
157
|
templateId: o.templateId,
|
|
140
158
|
variationId: o.variationId
|
|
141
159
|
});
|
|
142
|
-
const e = o.template, s = (e == null ? void 0 : e.html) || "",
|
|
143
|
-
|
|
144
|
-
const
|
|
160
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", y = (e == null ? void 0 : e.css) || "", Y = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
161
|
+
R.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
162
|
+
const De = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, j = o.isFeatureEnabled("linkTrackingIds"), Ie = {
|
|
145
163
|
partnerName: o.partnerName,
|
|
146
164
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
147
165
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
148
|
-
},
|
|
166
|
+
}, Te = {
|
|
149
167
|
itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
|
|
150
|
-
},
|
|
168
|
+
}, J = (we) => r.timed(
|
|
151
169
|
"migration",
|
|
152
|
-
() =>
|
|
170
|
+
() => Ge(we, De, Ie, Te)
|
|
153
171
|
);
|
|
154
172
|
let n = {
|
|
155
|
-
html: s && await
|
|
156
|
-
css:
|
|
173
|
+
html: s && await J(s),
|
|
174
|
+
css: y
|
|
157
175
|
};
|
|
158
|
-
n.html || (n = await r.timed("default_template", () =>
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
preselectedDynamicContentList:
|
|
176
|
+
n.html || (n = await r.timed("default_template", () => W()), n.html = await J(n.html));
|
|
177
|
+
const ke = j ? te(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
178
|
+
G(n.html) && (n.html = await r.timed("timer_clone", () => $(n.html))), j && (d.trackIdSessionFloor = Math.max(ke, te(n.html)));
|
|
179
|
+
const Le = {
|
|
180
|
+
preselectedDynamicContentList: Y,
|
|
163
181
|
onReady: () => {
|
|
164
182
|
console.debug("guido:ready"), i("ready");
|
|
165
183
|
}
|
|
166
184
|
};
|
|
167
|
-
|
|
185
|
+
g = V(), await P(n, h(), Le, n.html !== s), p.selectedDynamicContentList = Y;
|
|
168
186
|
} catch (e) {
|
|
169
187
|
console.error("Failed to initialize Stripo editor:", e), r.markFailed();
|
|
170
188
|
}
|
|
171
189
|
};
|
|
172
|
-
return
|
|
190
|
+
return Me(async () => {
|
|
173
191
|
var e;
|
|
174
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
175
|
-
const t = (e =
|
|
176
|
-
if (t && (
|
|
177
|
-
await
|
|
192
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), Z().$reset(), w().$reset(), lt().$reset(), mt().$reset(), ee().$reset(), p.setInvalidDynamicContent([]), ct().resetOnboarding("recommendationLegacyStrategyOnboarding"), A(), T();
|
|
193
|
+
const t = (e = S.value) == null ? void 0 : e.parentElement;
|
|
194
|
+
if (t && (l = new ResizeObserver(T), l.observe(t)), x(), c.ready)
|
|
195
|
+
await k();
|
|
178
196
|
else {
|
|
179
|
-
const s =
|
|
180
|
-
|
|
197
|
+
const s = Q(() => c.ready, (y) => {
|
|
198
|
+
y && (s(), k());
|
|
181
199
|
});
|
|
182
200
|
}
|
|
183
|
-
document.addEventListener("dynamic-content:open",
|
|
184
|
-
}),
|
|
185
|
-
if (
|
|
186
|
-
|
|
201
|
+
document.addEventListener("dynamic-content:open", I), document.addEventListener("dynamic-content:invalid-hover", D), document.addEventListener("dynamic-content:invalid-leave", E);
|
|
202
|
+
}), Re(() => {
|
|
203
|
+
if (Ye(), Ke(), r.dispose(), N.dispose(), l == null || l.disconnect(), document.removeEventListener("dynamic-content:open", I), document.removeEventListener("dynamic-content:invalid-hover", D), document.removeEventListener("dynamic-content:invalid-leave", E), v(), C(g)) {
|
|
204
|
+
je();
|
|
187
205
|
try {
|
|
188
|
-
const t =
|
|
206
|
+
const t = w();
|
|
189
207
|
t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
|
|
190
208
|
} catch (t) {
|
|
191
209
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
192
210
|
}
|
|
193
211
|
}
|
|
194
|
-
|
|
195
|
-
if (
|
|
212
|
+
B(async () => {
|
|
213
|
+
if (C(g))
|
|
196
214
|
try {
|
|
197
215
|
window.UIEditor.removeEditor();
|
|
198
216
|
} catch {
|
|
199
217
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
200
218
|
}
|
|
201
219
|
}), o.reset();
|
|
202
|
-
}),
|
|
220
|
+
}), ne({
|
|
203
221
|
dynamicContent: {
|
|
204
|
-
insert:
|
|
205
|
-
close:
|
|
222
|
+
insert: z,
|
|
223
|
+
close: q,
|
|
224
|
+
setInvalid: K
|
|
206
225
|
},
|
|
207
|
-
hasChanges:
|
|
208
|
-
saveSilent:
|
|
209
|
-
setLoading:
|
|
210
|
-
}), { __sfc: !0, openMetrics: r, PreviewContainer:
|
|
226
|
+
hasChanges: f,
|
|
227
|
+
saveSilent: _,
|
|
228
|
+
setLoading: H
|
|
229
|
+
}), { __sfc: !0, openMetrics: r, PreviewContainer: ie, OnboardingWrapper: re, AssignStrategyDrawer: ae, RemoveStrategyModal: se, DisplayConditionsHost: ce, autoSaveControllerRef: F, LegacyStrategyUpdatedModal: de, LegacyUnsubscribeConvertedModal: me, AmbiguousDynamicContentModal: le, InvalidDynamicContentCard: ue, INVALID_CARD_HIDE_DELAY: M, wrapperRef: S, dynamicContentStore: p, unsubscribeStore: R, moduleDynamicContentStore: pe, props: c, configStore: o, editorStore: d, previewStore: ve, hasChanges: f, isTestPartner: ye, isSaveValidationEnabled: fe, loadRollout: A, showToaster: O, trans: U, saveSilent: _, setLoading: H, emit: i, invalidDynamicContentMarking: N, buildMetadata: h, initPlugin: P, preloadRuntime: x, runExclusive: B, beginMount: V, isCurrentMount: C, mountGeneration: g, getDefaultTemplate: W, cloneTimersOnSave: $, hasTimerBlocks: G, noHeader: ge, isRrsEnabled: be, isExternalDisplayConditionsEnabled: Se, isLegacyUnsubscribeConversionEnabled: he, hasAssignedStrategy: Ce, insertDynamicContent: z, closeDynamicContent: q, setInvalidDynamicContent: K, hoveredInvalidDynamicContent: b, invalidCardHideTimer: m, cancelInvalidCardHide: v, scheduleInvalidCardHide: E, handleInvalidDynamicContentHover: D, handleInvalidDynamicContentAction: Ee, handleDynamicContentOpen: I, ribbonObserver: l, updateRibbonOffset: T, startEditor: k, AutoSaveController: Je, AuthErrorModal: Qe, Toaster: Xe, FilterSelectionDrawer: Ze, HeaderWrapper: et, LoadingWrapper: tt, SaveAsTemplateDrawer: ot, UnsubscribeWrapper: nt, ValidationErrorDrawer: it };
|
|
211
230
|
}
|
|
212
231
|
});
|
|
213
232
|
export {
|
|
214
|
-
|
|
233
|
+
Zt as default
|
|
215
234
|
};
|
|
@@ -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 o = function() {
|
|
5
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
6
|
+
return n("div", { staticClass: "invalid-dynamic-content-card", style: e.cardStyle, attrs: { id: "guido__invalid-dynamic-content-card", role: "tooltip" }, 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" }, [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 ? 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
|
+
}, r = [], s = /* @__PURE__ */ c(
|
|
12
|
+
a,
|
|
13
|
+
o,
|
|
14
|
+
r,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"007c64e1"
|
|
18
|
+
);
|
|
19
|
+
const v = s.exports;
|
|
20
|
+
export {
|
|
21
|
+
v as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as c, computed as s } from "vue";
|
|
2
|
+
const l = /* @__PURE__ */ c({
|
|
3
|
+
__name: "InvalidDynamicContentCard",
|
|
4
|
+
props: {
|
|
5
|
+
entry: null,
|
|
6
|
+
position: null
|
|
7
|
+
},
|
|
8
|
+
emits: ["dynamic-content:invalid-action", "mouseenter", "mouseleave"],
|
|
9
|
+
setup(e, { emit: t }) {
|
|
10
|
+
const n = e, o = 4, i = s(() => ({
|
|
11
|
+
top: `${n.position.y + (n.position.height ?? 0) + o}px`,
|
|
12
|
+
left: `${n.position.x}px`
|
|
13
|
+
}));
|
|
14
|
+
return { __sfc: !0, CARD_OFFSET: o, props: n, emit: t, cardStyle: i, onAction: () => {
|
|
15
|
+
t("dynamic-content:invalid-action", { value: n.entry.value });
|
|
16
|
+
} };
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
l as default
|
|
21
|
+
};
|
|
@@ -4,7 +4,7 @@ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
4
4
|
var d = function() {
|
|
5
5
|
var o, s;
|
|
6
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, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status":
|
|
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, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(n) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
9
|
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
|
|
10
10
|
return t.executeSave(!1);
|
|
@@ -15,7 +15,7 @@ var d = function() {
|
|
|
15
15
|
l,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"9a028d08"
|
|
19
19
|
);
|
|
20
20
|
const p = c.exports;
|
|
21
21
|
export {
|