@useinsider/guido 3.12.0-beta.b73c720 → 3.12.0-beta.bec0e55
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 +8 -13
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +49 -50
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
- package/dist/composables/usePreviewInteractionGuard.js +36 -11
- package/dist/composables/useRecommendation.js +51 -82
- package/dist/composables/useRecommendationPreview.js +61 -60
- package/dist/config/migrator/recommendationMigrator.js +4 -7
- package/dist/enums/date.js +3 -4
- package/dist/enums/extensions/recommendationBlock.js +22 -28
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -12
- package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +109 -123
- package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +1 -1
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +102 -256
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -24
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
- package/dist/extensions/Blocks/controlFactories.js +125 -75
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +27 -65
- package/dist/src/@types/config/schemas.d.ts +0 -10
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
- package/dist/src/composables/useRecommendation.d.ts +0 -2
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +1 -3
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -606
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +1 -3
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
- package/dist/src/services/recommendationApi.d.ts +1 -7
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/src/utils/genericUtil.d.ts +0 -9
- package/dist/src/utils/urlSchemes.d.ts +6 -0
- package/dist/static/styles/base.css.js +0 -15
- package/dist/utils/dateUtil.js +10 -23
- package/dist/utils/genericUtil.js +1 -10
- package/dist/utils/templatePreparation.js +58 -62
- package/dist/utils/urlSchemes.js +4 -0
- package/package.json +1 -1
- package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +0 -36
- package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +0 -244
- package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +0 -42
- package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +0 -18
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +0 -60
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +0 -19
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +0 -19
- package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +0 -22
- package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +0 -29
- package/dist/composables/useStrategyFilters.js +0 -16
- package/dist/enums/extensions/filteringV2.js +0 -8
- package/dist/enums/extensions/strategyDetail.js +0 -148
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -146
- package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +0 -97
- package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +0 -10
- package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +0 -43
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +0 -29
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +0 -40
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +0 -38
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +0 -51
- package/dist/src/composables/useStrategyFilters.d.ts +0 -24
- package/dist/src/enums/extensions/filteringV2.d.ts +0 -72
- package/dist/src/enums/extensions/strategyDetail.d.ts +0 -90
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -61
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +0 -50
- package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +0 -34
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
-
import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as
|
|
2
|
+
import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as f, boolean as o, array as c, record as k, fallback as C, literal as i, looseObject as g, variant as R, union as h, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const d = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -78,12 +78,12 @@ const d = {
|
|
|
78
78
|
select_items: e(c(S))
|
|
79
79
|
})), P = k(
|
|
80
80
|
t(),
|
|
81
|
-
|
|
81
|
+
C(c(S), [])
|
|
82
82
|
), D = 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(h([t(), n()])),
|
|
87
87
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
88
88
|
productIds: e(c(s())),
|
|
89
89
|
/** Whether the block requested live products at send time */
|
|
@@ -117,7 +117,7 @@ const d = {
|
|
|
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(h([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) */
|
|
@@ -201,12 +201,7 @@ const d = {
|
|
|
201
201
|
/** Enable Liquid template syntax */
|
|
202
202
|
liquidSyntax: e(o(), !1),
|
|
203
203
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
204
|
-
autosave: e(o(), !1)
|
|
205
|
-
/**
|
|
206
|
-
* Select a Reusable Recommendation Strategy (RRS) instead of a per-block algorithm.
|
|
207
|
-
* Replaces the algorithm dropdown with a strategy dropdown fed from Smart Recommender.
|
|
208
|
-
*/
|
|
209
|
-
reusableRecommendationStrategy: e(o(), !1)
|
|
204
|
+
autosave: e(o(), !1)
|
|
210
205
|
}), U = l([
|
|
211
206
|
"amp-accordion",
|
|
212
207
|
"amp-carousel",
|
|
@@ -274,11 +269,11 @@ const d = {
|
|
|
274
269
|
...m.entries,
|
|
275
270
|
type: i("custom"),
|
|
276
271
|
/** Custom processor function */
|
|
277
|
-
processor:
|
|
272
|
+
processor: f(
|
|
278
273
|
(u) => typeof u == "function",
|
|
279
274
|
"processor must be a function"
|
|
280
275
|
)
|
|
281
|
-
}), G =
|
|
276
|
+
}), G = R("type", [
|
|
282
277
|
H,
|
|
283
278
|
_,
|
|
284
279
|
j,
|
|
@@ -294,7 +289,7 @@ const d = {
|
|
|
294
289
|
* Return false to cancel the save operation.
|
|
295
290
|
*/
|
|
296
291
|
externalValidation: e(
|
|
297
|
-
|
|
292
|
+
f(
|
|
298
293
|
(u) => typeof u == "function",
|
|
299
294
|
"externalValidation must be a function"
|
|
300
295
|
)
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
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, { ref: "headerWrapperRef" }), r(e.AutoSaveController), 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), r(e.
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : 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), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, n = [], s = /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
}, n = [], s = /* @__PURE__ */ a(
|
|
10
|
+
i,
|
|
11
11
|
t,
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"50dac6de"
|
|
16
16
|
);
|
|
17
17
|
const l = s.exports;
|
|
18
18
|
export {
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { defineComponent as X, defineAsyncComponent as I, ref as W, computed as x, watch as Y, onMounted as Z, onUnmounted as ee } from "vue";
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { provideGuidoActions as
|
|
2
|
+
import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as te } from "../composables/useGuidoActions.js";
|
|
4
4
|
import { useGuidoStateBridge as ne } from "../composables/useGuidoStateBridge.js";
|
|
5
5
|
import { usePartner as re } from "../composables/usePartner.js";
|
|
6
6
|
import { useStripo as se } from "../composables/useStripo.js";
|
|
7
7
|
import { useTimerClone as ae } from "../composables/useTimerClone.js";
|
|
8
8
|
import { migrate as G } from "../config/migrator/index.js";
|
|
9
9
|
import { ModuleFolderDefaults as H } from "../enums/defaults.js";
|
|
10
|
-
import { RIBBON_SELECTOR as
|
|
11
|
-
import { useRecommendationExtensionStore as
|
|
10
|
+
import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
12
|
import me from "./organisms/AutoSaveController.vue.js";
|
|
13
13
|
import de from "./organisms/base/Toaster.vue.js";
|
|
14
14
|
import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
-
import ue from "./organisms/
|
|
16
|
-
import pe from "./organisms/
|
|
17
|
-
import fe from "./organisms/
|
|
18
|
-
import ve from "./organisms/
|
|
19
|
-
import Se from "
|
|
20
|
-
import {
|
|
21
|
-
import { useConfigStore as ge } from "../stores/config.js";
|
|
15
|
+
import ue from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import pe from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as Se } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as ye } from "../stores/config.js";
|
|
22
21
|
import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
|
|
23
22
|
import { useEditorStore as $ } from "../stores/editor.js";
|
|
24
|
-
import { usePreviewStore as
|
|
25
|
-
import { useTemplateStore as
|
|
26
|
-
import { useUnsubscribeStore as
|
|
27
|
-
const
|
|
23
|
+
import { usePreviewStore as ge } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as be } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
|
|
26
|
+
const Ve = /* @__PURE__ */ X({
|
|
28
27
|
__name: "Guido",
|
|
29
28
|
props: {
|
|
30
29
|
config: null
|
|
@@ -35,11 +34,11 @@ const Je = /* @__PURE__ */ X({
|
|
|
35
34
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
36
35
|
), V = I(
|
|
37
36
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
38
|
-
),
|
|
39
|
-
|
|
40
|
-
const m = $(), j =
|
|
37
|
+
), E = W(), p = W(), f = he(), w = Ee(), i = ye();
|
|
38
|
+
i.init(b.config);
|
|
39
|
+
const m = $(), j = ge(), d = x(() => m.hasChanges), { isTestPartner: J } = re(), D = () => {
|
|
41
40
|
var e;
|
|
42
|
-
return (e =
|
|
41
|
+
return (e = E.value) == null ? void 0 : e.handleSave(!0);
|
|
43
42
|
}, C = (e) => {
|
|
44
43
|
m.loadingStatus = e;
|
|
45
44
|
}, {
|
|
@@ -47,10 +46,10 @@ const Je = /* @__PURE__ */ X({
|
|
|
47
46
|
userId: T,
|
|
48
47
|
partnerName: L,
|
|
49
48
|
username: k,
|
|
50
|
-
template:
|
|
49
|
+
template: o,
|
|
51
50
|
editor: s
|
|
52
|
-
} =
|
|
53
|
-
|
|
51
|
+
} = i, l = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", S = (o == null ? void 0 : o.preselectedDynamicContent) || [], U = (s == null ? void 0 : s.savedModulesFolderName) || H.SAVED_MODULES, _ = (s == null ? void 0 : s.defaultModulesFolderName) || H.DEFAULT_MODULES;
|
|
52
|
+
oe(), ne();
|
|
54
53
|
const y = {
|
|
55
54
|
emailId: v,
|
|
56
55
|
userId: T,
|
|
@@ -63,11 +62,11 @@ const Je = /* @__PURE__ */ X({
|
|
|
63
62
|
onReady: () => {
|
|
64
63
|
console.debug("guido:ready"), n("ready");
|
|
65
64
|
}
|
|
66
|
-
}, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } =
|
|
65
|
+
}, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } = Se(), { cloneTimersOnSave: R, hasTimerBlocks: A } = ae(), Q = x(() => {
|
|
67
66
|
var e;
|
|
68
|
-
return !((e =
|
|
67
|
+
return !((e = i.ui) != null && e.showHeader);
|
|
69
68
|
});
|
|
70
|
-
|
|
69
|
+
te({
|
|
71
70
|
onBack: () => {
|
|
72
71
|
console.debug("guido:back"), n("back");
|
|
73
72
|
},
|
|
@@ -75,8 +74,8 @@ const Je = /* @__PURE__ */ X({
|
|
|
75
74
|
console.debug("guido:save:start"), n("save:start");
|
|
76
75
|
},
|
|
77
76
|
onSaveComplete: (e) => {
|
|
78
|
-
const
|
|
79
|
-
console.debug("guido:save:complete",
|
|
77
|
+
const t = { ...e, metadata: y };
|
|
78
|
+
console.debug("guido:save:complete", t), n("save:complete", t);
|
|
80
79
|
},
|
|
81
80
|
onTestEmailClick: () => {
|
|
82
81
|
console.debug("guido:test-email:click"), n("test-email:click");
|
|
@@ -90,52 +89,52 @@ const Je = /* @__PURE__ */ X({
|
|
|
90
89
|
Y(() => d.value, () => {
|
|
91
90
|
n("on-change", d.value);
|
|
92
91
|
});
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
console.debug("dynamic-content:open",
|
|
92
|
+
const h = (e) => {
|
|
93
|
+
const t = e, { attribute: u, position: c } = t.detail;
|
|
94
|
+
console.debug("dynamic-content:open", t.detail), n("dynamic-content:open", u, c);
|
|
96
95
|
};
|
|
97
96
|
let a = null;
|
|
98
|
-
const
|
|
99
|
-
var
|
|
100
|
-
const e = document.querySelector(
|
|
101
|
-
(
|
|
97
|
+
const g = () => {
|
|
98
|
+
var t;
|
|
99
|
+
const e = document.querySelector(ce);
|
|
100
|
+
(t = p.value) == null || t.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
102
101
|
};
|
|
103
102
|
return Z(async () => {
|
|
104
|
-
var
|
|
105
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
106
|
-
const e = (
|
|
107
|
-
e && (a = new ResizeObserver(
|
|
103
|
+
var t, u;
|
|
104
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ie().$reset(), $().$reset(), m.templateId = v, be().$reset(), g();
|
|
105
|
+
const e = (t = p.value) == null ? void 0 : t.parentElement;
|
|
106
|
+
e && (a = new ResizeObserver(g), a.observe(e));
|
|
108
107
|
try {
|
|
109
|
-
|
|
110
|
-
const
|
|
108
|
+
w.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
109
|
+
const c = ((u = o == null ? void 0 : o.migration) == null ? void 0 : u.recommendationConfigs) ?? {};
|
|
111
110
|
let r = {
|
|
112
|
-
html: l && await G(l,
|
|
111
|
+
html: l && await G(l, c),
|
|
113
112
|
css: F
|
|
114
113
|
};
|
|
115
|
-
r.html || (r = await P(), r.html = await G(r.html,
|
|
116
|
-
} catch (
|
|
117
|
-
console.error("Failed to initialize Stripo editor:",
|
|
114
|
+
r.html || (r = await P(), r.html = await G(r.html, c)), A(r.html) && (r.html = await R(r.html)), await O(r), f.selectedDynamicContentList = S;
|
|
115
|
+
} catch (c) {
|
|
116
|
+
console.error("Failed to initialize Stripo editor:", c);
|
|
118
117
|
}
|
|
119
|
-
document.addEventListener("dynamic-content:open",
|
|
118
|
+
document.addEventListener("dynamic-content:open", h);
|
|
120
119
|
}), ee(() => {
|
|
121
|
-
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
120
|
+
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", h);
|
|
122
121
|
try {
|
|
123
122
|
window.UIEditor.removeEditor();
|
|
124
123
|
} catch {
|
|
125
124
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
126
125
|
}
|
|
127
|
-
|
|
126
|
+
i.reset();
|
|
128
127
|
}), q({
|
|
129
128
|
dynamicContent: {
|
|
130
129
|
insert: B,
|
|
131
130
|
close: N
|
|
132
131
|
},
|
|
133
132
|
hasChanges: d,
|
|
134
|
-
saveSilent:
|
|
133
|
+
saveSilent: D,
|
|
135
134
|
setLoading: C
|
|
136
|
-
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef:
|
|
135
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: b, configStore: i, editorStore: m, previewStore: j, hasChanges: d, isTestPartner: J, saveSilent: D, setLoading: C, templateId: v, userId: T, partnerName: L, username: k, templateConfig: o, editorConfig: s, html: l, css: F, preselectedDynamicContentList: S, savedModulesFolderName: U, defaultModulesFolderName: _, emit: n, metadata: y, options: M, initPlugin: O, getDefaultTemplate: P, cloneTimersOnSave: R, hasTimerBlocks: A, noHeader: Q, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: h, ribbonObserver: a, updateRibbonOffset: g, AutoSaveController: me, Toaster: de, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ve };
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
export {
|
|
140
|
-
|
|
139
|
+
Ve as default
|
|
141
140
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as u, ref as a, onMounted as p, onBeforeUnmount as l, nextTick as
|
|
2
|
-
import { usePreviewInteractionGuard as
|
|
1
|
+
import { defineComponent as u, ref as a, onMounted as p, onBeforeUnmount as l, nextTick as d } from "vue";
|
|
2
|
+
import { usePreviewInteractionGuard as v } from "../../../../composables/usePreviewInteractionGuard.js";
|
|
3
3
|
import { useTranslations as _ } from "../../../../composables/useTranslations.js";
|
|
4
4
|
import { usePreviewStore as w } from "../../../../stores/preview.js";
|
|
5
5
|
import I from "./DesktopBrowserHeader.vue.js";
|
|
6
6
|
const C = /* @__PURE__ */ u({
|
|
7
7
|
__name: "DesktopPreview",
|
|
8
|
-
setup(
|
|
9
|
-
const i = _(), {
|
|
8
|
+
setup(P) {
|
|
9
|
+
const i = _(), { guardPreviewInteractions: t } = v(), o = a(), r = a(!1), c = w();
|
|
10
10
|
let e = null;
|
|
11
11
|
const f = (m) => {
|
|
12
12
|
t(m.target);
|
|
13
|
-
},
|
|
13
|
+
}, n = () => {
|
|
14
14
|
o.value && (e = new ResizeObserver(() => {
|
|
15
|
-
}), e.observe(o.value),
|
|
16
|
-
|
|
15
|
+
}), e.observe(o.value), d(() => {
|
|
16
|
+
r.value = !0;
|
|
17
17
|
}));
|
|
18
18
|
}, s = () => {
|
|
19
19
|
e == null || e.disconnect();
|
|
20
20
|
};
|
|
21
|
-
return p(
|
|
21
|
+
return p(n), l(s), { __sfc: !0, trans: i, guardPreviewInteractions: t, containerRef: o, isContainerReady: r, previewStore: c, resizeObserver: e, onIframeLoad: f, initIframe: n, cleanIframe: s, DesktopBrowserHeader: I };
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import e from "./ContentView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var o = function() {
|
|
5
5
|
var t = this, s = t._self._c, a = t._self._setupProxy;
|
|
6
6
|
return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
|
|
7
7
|
return t.$emit("back-to-inbox");
|
|
8
8
|
} } }, [s(a.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [t._v(t._s(a.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(a.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(a.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { ref: "iframeRef", staticClass: "iframe-scaled d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: a.previewStore.previewHtml }, on: { load: a.onLoad } })])]);
|
|
9
|
-
},
|
|
9
|
+
}, i = [], r = /* @__PURE__ */ n(
|
|
10
10
|
e,
|
|
11
|
-
c,
|
|
12
11
|
o,
|
|
12
|
+
i,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"f255b2bb"
|
|
16
16
|
);
|
|
17
|
-
const d =
|
|
17
|
+
const d = r.exports;
|
|
18
18
|
export {
|
|
19
19
|
d as default
|
|
20
20
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, ref as a } from "vue";
|
|
2
2
|
import { usePreviewInteractionGuard as f } from "../../../../composables/usePreviewInteractionGuard.js";
|
|
3
3
|
import { useResponsivePreview as p } from "../../../../composables/useResponsivePreview.js";
|
|
4
4
|
import { useTranslations as u } from "../../../../composables/useTranslations.js";
|
|
5
5
|
import { usePreviewStore as v } from "../../../../stores/preview.js";
|
|
6
|
-
import { InIcons as
|
|
7
|
-
const
|
|
6
|
+
import { InIcons as d } from "@useinsider/design-system-vue";
|
|
7
|
+
const b = /* @__PURE__ */ c({
|
|
8
8
|
__name: "ContentView",
|
|
9
9
|
emits: ["back-to-inbox"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
10
|
+
setup(P) {
|
|
11
|
+
const m = u(), r = v(), t = a(), { setupResponsivePreview: n } = p(), { guardPreviewInteractions: s } = f(), i = (e) => {
|
|
12
12
|
["transform", "transform-origin", "height"].forEach((o) => {
|
|
13
13
|
e.documentElement.style.removeProperty(o);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
return { __sfc: !0, trans:
|
|
17
|
-
const e =
|
|
18
|
-
o && (n(e), s(e),
|
|
19
|
-
}, InIcons:
|
|
16
|
+
return { __sfc: !0, trans: m, previewStore: r, iframeRef: t, setupResponsivePreview: n, guardPreviewInteractions: s, clearAMPTransforms: i, onLoad: () => {
|
|
17
|
+
const e = t.value, o = e == null ? void 0 : e.contentDocument;
|
|
18
|
+
o && (n(e), s(e), r.isAMPResponsive && i(o));
|
|
19
|
+
}, InIcons: d };
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
b as default
|
|
24
24
|
};
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { URLS as o, MERGE_TAGS as a } from "../enums/unsubscribe.js";
|
|
2
|
+
import { UNSUBSCRIBE_LINK_SELECTOR as i } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
3
|
+
import { BASE_SAFE_URL_SCHEMES as u } from "../utils/urlSchemes.js";
|
|
4
|
+
const E = ["click", "auxclick"], d = [
|
|
5
|
+
...Object.values(a),
|
|
6
|
+
o.UNSUBSCRIBE_URL,
|
|
7
|
+
o.PREFERENCES_URL
|
|
8
|
+
], l = (e) => {
|
|
9
|
+
if (e.matches(i))
|
|
10
|
+
return !0;
|
|
11
|
+
const r = e.getAttribute("href") ?? "";
|
|
12
|
+
return d.some((t) => r.includes(t));
|
|
13
|
+
}, S = [...u, "tel:", "sms:"], f = (e) => {
|
|
14
|
+
const r = (e.getAttribute("href") ?? "").trim();
|
|
15
|
+
return r === "" || r.startsWith("#") || r.startsWith("{{") ? !1 : S.includes(e.protocol);
|
|
16
|
+
}, m = (e) => {
|
|
17
|
+
var t, n;
|
|
18
|
+
const r = (n = (t = e.target) == null ? void 0 : t.closest) == null ? void 0 : n.call(t, "a");
|
|
19
|
+
if (r) {
|
|
20
|
+
if (l(r) || !f(r)) {
|
|
21
|
+
e.preventDefault(), e.stopPropagation();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
r.setAttribute("target", "_blank"), r.setAttribute("rel", "noopener noreferrer");
|
|
25
|
+
}
|
|
26
|
+
}, R = (e) => {
|
|
27
|
+
e.preventDefault(), e.stopPropagation();
|
|
28
|
+
}, s = /* @__PURE__ */ new WeakSet(), c = "guidoPreviewGuarded", g = () => ({ guardPreviewInteractions: (r) => {
|
|
4
29
|
try {
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
30
|
+
const t = r.contentDocument;
|
|
31
|
+
if (!t || s.has(t))
|
|
7
32
|
return;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
} catch (
|
|
12
|
-
console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:",
|
|
33
|
+
delete t.documentElement.dataset[c], E.forEach((n) => {
|
|
34
|
+
t.addEventListener(n, m, !0);
|
|
35
|
+
}), t.addEventListener("submit", R, !0), s.add(t), t.documentElement.dataset[c] = "true";
|
|
36
|
+
} catch (t) {
|
|
37
|
+
console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:", t);
|
|
13
38
|
}
|
|
14
39
|
} });
|
|
15
40
|
export {
|
|
16
|
-
|
|
41
|
+
g as usePreviewInteractionGuard
|
|
17
42
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { getRecommendationFeedSourceMaps as
|
|
2
|
-
import { MinDeviceViewport as
|
|
3
|
-
import { useRecommendationExtensionStore as
|
|
4
|
-
import { generateCompleteFilterQuery as
|
|
5
|
-
import { getPartnerRecommendationParams as
|
|
6
|
-
import { useConfigStore as
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { getRecommendationFeedSourceMaps as I, URLS as R } from "../enums/extensions/recommendationBlock.js";
|
|
2
|
+
import { MinDeviceViewport as C, DefaultPadding as b } from "../enums/recommendation.js";
|
|
3
|
+
import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
+
import { generateCompleteFilterQuery as h } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
|
|
5
|
+
import { getPartnerRecommendationParams as y } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
|
|
6
|
+
import { useConfigStore as x } from "../stores/config.js";
|
|
7
|
+
const k = () => ({
|
|
8
|
+
calculateCardWidth: ({
|
|
9
9
|
mobileLeftPadding: a,
|
|
10
|
-
mobileRightPadding:
|
|
11
|
-
cardsInRow:
|
|
12
|
-
unresponsive:
|
|
10
|
+
mobileRightPadding: s,
|
|
11
|
+
cardsInRow: c,
|
|
12
|
+
unresponsive: o
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return (
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const r = o ? c : 1, e = a + s + (r - 1) * b;
|
|
15
|
+
return (C - e) / r;
|
|
16
|
+
},
|
|
17
|
+
getRecommendationCampaignData: (a) => {
|
|
18
|
+
const s = l(), c = Number(a), o = s.blockStates[c];
|
|
19
|
+
if (!o)
|
|
19
20
|
return {
|
|
20
21
|
textTrimming: !1,
|
|
21
22
|
orientation: "vertical",
|
|
@@ -28,81 +29,49 @@ const M = () => {
|
|
|
28
29
|
discountBeforeTextValue: "",
|
|
29
30
|
discountAfterTextValue: ""
|
|
30
31
|
};
|
|
31
|
-
const { recommendationConfigs:
|
|
32
|
+
const { recommendationConfigs: r } = o, e = r.orientation === "grid" ? "vertical" : "horizontal";
|
|
32
33
|
return {
|
|
33
|
-
textTrimming:
|
|
34
|
+
textTrimming: r.textTrimming,
|
|
34
35
|
orientation: e,
|
|
35
36
|
mobileLeftPadding: 0,
|
|
36
37
|
mobileRightPadding: 0,
|
|
37
|
-
cardsInRow:
|
|
38
|
-
unresponsive:
|
|
38
|
+
cardsInRow: r.cardsInRow,
|
|
39
|
+
unresponsive: r.unresponsive,
|
|
39
40
|
priceBeforeTextValue: "",
|
|
40
41
|
priceAfterTextValue: "",
|
|
41
42
|
discountBeforeTextValue: "",
|
|
42
43
|
discountAfterTextValue: ""
|
|
43
44
|
};
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
let e;
|
|
66
|
-
if (c)
|
|
67
|
-
e = c;
|
|
68
|
-
else {
|
|
69
|
-
const o = s.blockStates[n];
|
|
70
|
-
if (!o)
|
|
71
|
-
return "";
|
|
72
|
-
const { recommendationConfigs: i } = o;
|
|
73
|
-
e = {
|
|
74
|
-
strategy: i.strategy,
|
|
75
|
-
strategyId: i.strategyId,
|
|
76
|
-
language: i.language,
|
|
77
|
-
currencyCode: i.currencySettings.value,
|
|
78
|
-
size: i.size,
|
|
79
|
-
productIds: i.productIds,
|
|
80
|
-
filters: i.filters,
|
|
81
|
-
shuffleProducts: i.shuffleProducts
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
const d = e.strategyId ? s.strategyUrlTemplates[e.strategyId] : "";
|
|
85
|
-
if (d) {
|
|
86
|
-
const o = y(d, {
|
|
87
|
-
LOCALE: e.language,
|
|
88
|
-
CURRENCY: e.currencyCode,
|
|
89
|
-
CAMPAIGN_ID: r.variationId,
|
|
90
|
-
STRATEGY_ID: e.strategyId,
|
|
91
|
-
CLIENT_ID: "6KcLM9TwheVB1mgK",
|
|
92
|
-
USER_ID: "{user_id}",
|
|
93
|
-
ITEM_ID: "{itemId}"
|
|
94
|
-
});
|
|
95
|
-
return s.recommendationCampaignUrls[a] = o, o;
|
|
96
|
-
}
|
|
97
|
-
const C = ((m = E().find((o) => o.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
|
|
98
|
-
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", r.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", r.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
|
|
99
|
-
const R = e.filters.filter((o) => o.isValid), l = _(R);
|
|
100
|
-
l && t.set("filter", l), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(b(r.partnerName, e.strategy)).forEach(([o, i]) => t.set(o, i));
|
|
101
|
-
const T = decodeURIComponent(t.toString()), u = `${S.RECOMMENDATION_API_URL}/v2/${C}?${T}`;
|
|
102
|
-
return s.recommendationCampaignUrls[a] = u, u;
|
|
45
|
+
},
|
|
46
|
+
buildCampaignUrl: (a, s) => {
|
|
47
|
+
var m;
|
|
48
|
+
const c = l(), o = x(), r = Number(a);
|
|
49
|
+
let e;
|
|
50
|
+
if (s)
|
|
51
|
+
e = s;
|
|
52
|
+
else {
|
|
53
|
+
const i = c.blockStates[r];
|
|
54
|
+
if (!i)
|
|
55
|
+
return "";
|
|
56
|
+
const { recommendationConfigs: n } = i;
|
|
57
|
+
e = {
|
|
58
|
+
strategy: n.strategy,
|
|
59
|
+
language: n.language,
|
|
60
|
+
currencyCode: n.currencySettings.value,
|
|
61
|
+
size: n.size,
|
|
62
|
+
productIds: n.productIds,
|
|
63
|
+
filters: n.filters,
|
|
64
|
+
shuffleProducts: n.shuffleProducts
|
|
65
|
+
};
|
|
103
66
|
}
|
|
104
|
-
|
|
105
|
-
};
|
|
67
|
+
const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
|
|
68
|
+
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
|
|
69
|
+
const g = e.filters.filter((i) => i.isValid), d = h(g);
|
|
70
|
+
d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(y(o.partnerName, e.strategy)).forEach(([i, n]) => t.set(i, n));
|
|
71
|
+
const p = decodeURIComponent(t.toString()), u = `${R.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
|
|
72
|
+
return c.recommendationCampaignUrls[a] = u, u;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
106
75
|
export {
|
|
107
|
-
|
|
76
|
+
k as useRecommendation
|
|
108
77
|
};
|