@useinsider/guido 3.4.1-beta.6ed05e2 → 3.4.1-beta.b69af42
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/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +35 -34
- package/dist/extensions/Blocks/Recommendation/block.js +47 -66
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +13 -41
- package/dist/guido.css +1 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -14
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -8
- package/dist/utils/templatePreparation.js +52 -65
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as J, defineAsyncComponent as
|
|
1
|
+
import { defineComponent as J, defineAsyncComponent as N, ref as I, computed as W, watch as Q, onMounted as X, onUnmounted as Y } from "vue";
|
|
2
2
|
import { useCortexBlueprintBridge as Z } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { provideGuidoActions as ee } from "../composables/useGuidoActions.js";
|
|
4
4
|
import { useGuidoStateBridge as oe } from "../composables/useGuidoStateBridge.js";
|
|
@@ -8,35 +8,36 @@ import { useTimerClone as re } from "../composables/useTimerClone.js";
|
|
|
8
8
|
import { migrate as x } from "../config/migrator/index.js";
|
|
9
9
|
import { ModuleFolderDefaults as G } from "../enums/defaults.js";
|
|
10
10
|
import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
|
|
11
|
-
import ce from "
|
|
12
|
-
import ae from "./organisms/
|
|
13
|
-
import ie from "./organisms/
|
|
14
|
-
import me from "./organisms/
|
|
15
|
-
import de from "./organisms/
|
|
16
|
-
import le from "./organisms/
|
|
17
|
-
import ue from "./organisms/
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
11
|
+
import { useRecommendationExtensionStore as ce } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import ae from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import ie from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import me from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import de from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import le from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as fe } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as ve } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
|
|
22
|
+
import { useEditorStore as Se } from "../stores/editor.js";
|
|
22
23
|
import { usePreviewStore as he } from "../stores/preview.js";
|
|
23
|
-
import { useUnsubscribeStore as
|
|
24
|
-
const
|
|
24
|
+
import { useUnsubscribeStore as be } from "../stores/unsubscribe.js";
|
|
25
|
+
const $e = /* @__PURE__ */ J({
|
|
25
26
|
__name: "Guido",
|
|
26
27
|
props: {
|
|
27
28
|
config: null
|
|
28
29
|
},
|
|
29
30
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
30
31
|
setup(H, { expose: z, emit: n }) {
|
|
31
|
-
const g = H,
|
|
32
|
+
const g = H, $ = N(
|
|
32
33
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
),
|
|
34
|
+
), q = N(
|
|
34
35
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
35
|
-
),
|
|
36
|
+
), E = I(), u = I(), p = ye(), w = be(), i = ve();
|
|
36
37
|
i.init(g.config);
|
|
37
|
-
const f =
|
|
38
|
+
const f = Se(), K = he(), m = W(() => f.hasChanges), { isTestPartner: V } = te(), D = () => {
|
|
38
39
|
var e;
|
|
39
|
-
return (e =
|
|
40
|
+
return (e = E.value) == null ? void 0 : e.handleSave(!0);
|
|
40
41
|
}, {
|
|
41
42
|
templateId: v,
|
|
42
43
|
userId: C,
|
|
@@ -46,7 +47,7 @@ const He = /* @__PURE__ */ J({
|
|
|
46
47
|
editor: s
|
|
47
48
|
} = i, d = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", y = (o == null ? void 0 : o.preselectedDynamicContent) || [], L = (s == null ? void 0 : s.savedModulesFolderName) || G.SAVED_MODULES, U = (s == null ? void 0 : s.defaultModulesFolderName) || G.DEFAULT_MODULES;
|
|
48
49
|
f.templateId = v, Z(), oe();
|
|
49
|
-
const
|
|
50
|
+
const S = {
|
|
50
51
|
emailId: v,
|
|
51
52
|
userId: C,
|
|
52
53
|
username: k,
|
|
@@ -58,7 +59,7 @@ const He = /* @__PURE__ */ J({
|
|
|
58
59
|
onReady: () => {
|
|
59
60
|
console.debug("guido:ready"), n("ready");
|
|
60
61
|
}
|
|
61
|
-
}, { initPlugin: M } = ne(
|
|
62
|
+
}, { initPlugin: M } = ne(S, _), { getDefaultTemplate: O } = fe(), { cloneTimersOnSave: P, hasTimerBlocks: R } = re(), j = W(() => {
|
|
62
63
|
var e;
|
|
63
64
|
return !((e = i.ui) != null && e.showHeader);
|
|
64
65
|
});
|
|
@@ -70,22 +71,22 @@ const He = /* @__PURE__ */ J({
|
|
|
70
71
|
console.debug("guido:save:start"), n("save:start");
|
|
71
72
|
},
|
|
72
73
|
onSaveComplete: (e) => {
|
|
73
|
-
const t = { ...e, metadata:
|
|
74
|
+
const t = { ...e, metadata: S };
|
|
74
75
|
console.debug("guido:save:complete", t), n("save:complete", t);
|
|
75
76
|
},
|
|
76
77
|
onTestEmailClick: () => {
|
|
77
78
|
console.debug("guido:test-email:click"), n("test-email:click");
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
|
-
const
|
|
81
|
+
const A = (e) => {
|
|
81
82
|
console.debug("dynamic-content:close", e), p.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
82
|
-
},
|
|
83
|
+
}, B = () => {
|
|
83
84
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
84
85
|
};
|
|
85
86
|
Q(() => m.value, () => {
|
|
86
87
|
n("on-change", m.value);
|
|
87
88
|
});
|
|
88
|
-
const
|
|
89
|
+
const h = (e) => {
|
|
89
90
|
const t = e, { attribute: l, position: a } = t.detail;
|
|
90
91
|
console.debug("dynamic-content:open", t.detail), n("dynamic-content:open", l, a);
|
|
91
92
|
};
|
|
@@ -97,23 +98,23 @@ const He = /* @__PURE__ */ J({
|
|
|
97
98
|
};
|
|
98
99
|
return X(async () => {
|
|
99
100
|
var t, l;
|
|
100
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), b();
|
|
101
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ce().$reset(), b();
|
|
101
102
|
const e = (t = u.value) == null ? void 0 : t.parentElement;
|
|
102
103
|
e && (c = new ResizeObserver(b), c.observe(e));
|
|
103
104
|
try {
|
|
104
|
-
|
|
105
|
+
w.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
105
106
|
const a = ((l = o == null ? void 0 : o.migration) == null ? void 0 : l.recommendationConfigs) ?? {};
|
|
106
107
|
let r = {
|
|
107
108
|
html: d && await x(d, a),
|
|
108
109
|
css: F
|
|
109
110
|
};
|
|
110
|
-
r.html || (r = await O(), r.html = await x(r.html, a)),
|
|
111
|
+
r.html || (r = await O(), r.html = await x(r.html, a)), R(r.html) && (r.html = await P(r.html)), await M(r), p.selectedDynamicContentList = y;
|
|
111
112
|
} catch (a) {
|
|
112
113
|
console.error("Failed to initialize Stripo editor:", a);
|
|
113
114
|
}
|
|
114
|
-
document.addEventListener("dynamic-content:open",
|
|
115
|
+
document.addEventListener("dynamic-content:open", h);
|
|
115
116
|
}), Y(() => {
|
|
116
|
-
c == null || c.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
117
|
+
c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", h);
|
|
117
118
|
try {
|
|
118
119
|
window.UIEditor.removeEditor();
|
|
119
120
|
} catch {
|
|
@@ -122,14 +123,14 @@ const He = /* @__PURE__ */ J({
|
|
|
122
123
|
i.reset();
|
|
123
124
|
}), z({
|
|
124
125
|
dynamicContent: {
|
|
125
|
-
insert:
|
|
126
|
-
close:
|
|
126
|
+
insert: A,
|
|
127
|
+
close: B
|
|
127
128
|
},
|
|
128
129
|
hasChanges: m,
|
|
129
130
|
saveSilent: D
|
|
130
|
-
}), { __sfc: !0, PreviewContainer:
|
|
131
|
+
}), { __sfc: !0, PreviewContainer: $, OnboardingWrapper: q, headerWrapperRef: E, wrapperRef: u, dynamicContentStore: p, unsubscribeStore: w, props: g, configStore: i, editorStore: f, previewStore: K, hasChanges: m, isTestPartner: V, saveSilent: D, templateId: v, userId: C, partnerName: T, username: k, templateConfig: o, editorConfig: s, html: d, css: F, preselectedDynamicContentList: y, savedModulesFolderName: L, defaultModulesFolderName: U, emit: n, metadata: S, options: _, initPlugin: M, getDefaultTemplate: O, cloneTimersOnSave: P, hasTimerBlocks: R, noHeader: j, insertDynamicContent: A, closeDynamicContent: B, handleDynamicContentOpen: h, ribbonObserver: c, updateRibbonOffset: b, AutoSaveController: ae, Toaster: ie, FilterSelectionDrawer: me, HeaderWrapper: de, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe };
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
134
|
export {
|
|
134
|
-
|
|
135
|
+
$e as default
|
|
135
136
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var k = Object.defineProperty;
|
|
2
|
-
var B = (
|
|
3
|
-
var
|
|
2
|
+
var B = (r, n, t) => n in r ? k(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
|
|
3
|
+
var g = (r, n, t) => B(r, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import { BlockId as _ } from "../../../enums/block.js";
|
|
5
|
-
import { getMigrationBannerHtml as
|
|
6
|
-
import { Block as
|
|
5
|
+
import { getMigrationBannerHtml as b } from "../../../utils/migrationBannerHtml.js";
|
|
6
|
+
import { Block as R, BlockCompositionType as y, ModificationDescription as C } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
7
|
import { regenerateMobileProductRows as A } from "./controls/main/utils.js";
|
|
8
|
-
import { ensureMobileCssRulesExist as
|
|
9
|
-
import { RecommendationConfigService as
|
|
10
|
-
import { useRecommendationExtensionStore as
|
|
11
|
-
import { getDefaultTemplate as
|
|
12
|
-
const h = _.Recommendation,
|
|
8
|
+
import { ensureMobileCssRulesExist as d, setMobileLayoutOptOut as p, hasMobileLayoutOptOut as D } from "./controls/mobileLayout/cssRules.js";
|
|
9
|
+
import { RecommendationConfigService as s } from "./services/configService.js";
|
|
10
|
+
import { useRecommendationExtensionStore as f } from "./store/recommendation.js";
|
|
11
|
+
import { getDefaultTemplate as E } from "./templates/grid/template.js";
|
|
12
|
+
const h = _.Recommendation, l = "recommendation-block-v2", m = "recommendation-id";
|
|
13
13
|
let I = !1;
|
|
14
|
-
class q extends
|
|
14
|
+
class q extends R {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
/**
|
|
18
18
|
* Stores the ID generated in getTemplate() so onCreated() can reuse it.
|
|
19
19
|
* This avoids generating a new (different) ID in onCreated().
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
g(this, "_pendingBlockId", null);
|
|
22
22
|
}
|
|
23
23
|
getId() {
|
|
24
24
|
return h;
|
|
@@ -27,7 +27,7 @@ class q extends b {
|
|
|
27
27
|
return "recommendation-icon";
|
|
28
28
|
}
|
|
29
29
|
getBlockCompositionType() {
|
|
30
|
-
return
|
|
30
|
+
return y.CONTAINER;
|
|
31
31
|
}
|
|
32
32
|
getName() {
|
|
33
33
|
return this.api.translate("Recommendation Block");
|
|
@@ -38,7 +38,7 @@ class q extends b {
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
getSettingsPanelTitleHtml() {
|
|
41
|
-
return
|
|
41
|
+
return b(
|
|
42
42
|
h,
|
|
43
43
|
this.api.translate("Recommendation Block"),
|
|
44
44
|
this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
|
|
@@ -59,7 +59,7 @@ class q extends b {
|
|
|
59
59
|
*/
|
|
60
60
|
getTemplate() {
|
|
61
61
|
const t = this._generateNextId();
|
|
62
|
-
return this._pendingBlockId = t,
|
|
62
|
+
return this._pendingBlockId = t, E(t);
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Called when a new block is dropped into the template
|
|
@@ -72,22 +72,22 @@ class q extends b {
|
|
|
72
72
|
const e = this._getRecommendationId(t);
|
|
73
73
|
if (e !== null && e > 0)
|
|
74
74
|
return;
|
|
75
|
-
const
|
|
76
|
-
this._pendingBlockId = null, this._assignRecommendationId(t,
|
|
77
|
-
const { config:
|
|
75
|
+
const i = this._pendingBlockId ?? this._generateNextId();
|
|
76
|
+
this._pendingBlockId = null, this._assignRecommendationId(t, i);
|
|
77
|
+
const { config: o, wasFreshDrop: c } = s.initializeConfig(
|
|
78
78
|
this.api,
|
|
79
79
|
t,
|
|
80
|
-
{ recommendationId:
|
|
81
|
-
),
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
80
|
+
{ recommendationId: i }
|
|
81
|
+
), a = f();
|
|
82
|
+
if (a.setCurrentBlock(i), c) {
|
|
83
|
+
d(this.api);
|
|
84
|
+
const u = this._getBlockElement(t);
|
|
85
|
+
u && (p(this.api, u, !0), A({
|
|
86
86
|
currentNode: t,
|
|
87
87
|
documentModifier: this.api.getDocumentModifier()
|
|
88
88
|
}));
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
a.patchCurrentBlockConfig({ language: o.language }, { triggerRefetch: !1 });
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Called when the document changes or template is loaded
|
|
@@ -100,20 +100,20 @@ class q extends b {
|
|
|
100
100
|
if (!(!t || !("getNodeConfig" in t))) {
|
|
101
101
|
if (!this._getRecommendationId(t)) {
|
|
102
102
|
const e = this._generateNextId();
|
|
103
|
-
this._assignRecommendationId(t, e),
|
|
103
|
+
this._assignRecommendationId(t, e), s.hasConfig(t) && s.updateConfig(
|
|
104
104
|
this.api,
|
|
105
105
|
t,
|
|
106
106
|
{ recommendationId: e },
|
|
107
107
|
"Assign recommendation ID to legacy block"
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
s.needsMigration(t) && this._migrateFromLegacy(t);
|
|
111
111
|
try {
|
|
112
|
-
I || (
|
|
113
|
-
const e =
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
|
|
112
|
+
I || (d(this.api), I = !0);
|
|
113
|
+
const e = s.getConfig(t), i = this._getBlockElement(t);
|
|
114
|
+
if (i) {
|
|
115
|
+
const o = !e.mobileLayoutEnabled;
|
|
116
|
+
D(i) !== o && p(this.api, i, o);
|
|
117
117
|
}
|
|
118
118
|
} catch {
|
|
119
119
|
}
|
|
@@ -127,26 +127,7 @@ class q extends b {
|
|
|
127
127
|
*/
|
|
128
128
|
onDelete(t) {
|
|
129
129
|
const e = this._getRecommendationId(t);
|
|
130
|
-
e &&
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Lifecycle hook fired when Stripo's UI Duplicate button copies a block.
|
|
134
|
-
* Stripo passes an `HtmlNodeModifier` already targeting the cloned node;
|
|
135
|
-
* its mutations are committed when this method returns. We stamp a fresh
|
|
136
|
-
* `recommendation-id` on the clone and seed its blockStates entry from
|
|
137
|
-
* the source so the duplicate enters the DOM as a fully independent block
|
|
138
|
-
* — no shared id, no shared store, no API refetch flash.
|
|
139
|
-
*
|
|
140
|
-
* Stripo does NOT fire `onCreated` for blocks created via duplicate
|
|
141
|
-
* (per Block.d.ts:54-69 — `onCreated` is drag-and-drop only), so this
|
|
142
|
-
* hook is the sole production path for clone id assignment.
|
|
143
|
-
*/
|
|
144
|
-
onCopy(t) {
|
|
145
|
-
const e = t.getTargetNode(), o = this._getRecommendationId(e), n = this._generateNextId(), s = c.getConfig(e);
|
|
146
|
-
if (t.setAttribute(l, n.toString()).setNodeConfig({ ...s, recommendationId: n }), o !== null && o > 0) {
|
|
147
|
-
const r = m();
|
|
148
|
-
r.cloneBlockState(o, n), r.setCurrentBlock(n);
|
|
149
|
-
}
|
|
130
|
+
e && f().removeBlockState(e);
|
|
150
131
|
}
|
|
151
132
|
/**
|
|
152
133
|
* Generates the next unique recommendation ID by scanning all existing blocks
|
|
@@ -156,10 +137,10 @@ class q extends b {
|
|
|
156
137
|
let t = 0;
|
|
157
138
|
try {
|
|
158
139
|
const e = this.api.getDocumentRoot();
|
|
159
|
-
e && "querySelectorAll" in e && e.querySelectorAll(`.${
|
|
160
|
-
if ("getAttribute" in
|
|
161
|
-
const
|
|
162
|
-
|
|
140
|
+
e && "querySelectorAll" in e && e.querySelectorAll(`.${l}`).forEach((o) => {
|
|
141
|
+
if ("getAttribute" in o) {
|
|
142
|
+
const c = o.getAttribute(m), a = c ? parseInt(c) : 0;
|
|
143
|
+
a > t && (t = a);
|
|
163
144
|
}
|
|
164
145
|
});
|
|
165
146
|
} catch {
|
|
@@ -173,11 +154,11 @@ class q extends b {
|
|
|
173
154
|
* added classes via setAttribute.
|
|
174
155
|
*/
|
|
175
156
|
_assignRecommendationId(t, e) {
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
157
|
+
const i = this._getBlockElement(t);
|
|
158
|
+
if (!i)
|
|
178
159
|
return;
|
|
179
|
-
const
|
|
180
|
-
|
|
160
|
+
const o = this.api.getDocumentModifier();
|
|
161
|
+
o.modifyHtml(i).setAttribute(m, e.toString()), o.apply(new C(`Assign recommendation ID ${e}`));
|
|
181
162
|
}
|
|
182
163
|
/**
|
|
183
164
|
* Gets the recommendation-id from a block node
|
|
@@ -186,11 +167,11 @@ class q extends b {
|
|
|
186
167
|
const e = this._getBlockElement(t);
|
|
187
168
|
if (!e || !("getAttribute" in e))
|
|
188
169
|
return null;
|
|
189
|
-
const
|
|
190
|
-
if (!
|
|
170
|
+
const i = e.getAttribute(m);
|
|
171
|
+
if (!i)
|
|
191
172
|
return null;
|
|
192
|
-
const
|
|
193
|
-
return Number.isNaN(
|
|
173
|
+
const o = parseInt(i);
|
|
174
|
+
return Number.isNaN(o) ? null : o;
|
|
194
175
|
}
|
|
195
176
|
/**
|
|
196
177
|
* Gets the block element (the element with BLOCK_CLASS)
|
|
@@ -198,16 +179,16 @@ class q extends b {
|
|
|
198
179
|
_getBlockElement(t) {
|
|
199
180
|
if ("getAttribute" in t) {
|
|
200
181
|
const e = t.getAttribute("class");
|
|
201
|
-
if (e && e.includes(
|
|
182
|
+
if (e && e.includes(l))
|
|
202
183
|
return t;
|
|
203
184
|
}
|
|
204
|
-
return "querySelector" in t ? t.querySelector(`.${
|
|
185
|
+
return "querySelector" in t ? t.querySelector(`.${l}`) ?? null : null;
|
|
205
186
|
}
|
|
206
187
|
/**
|
|
207
188
|
* Migrate configuration from legacy format
|
|
208
189
|
*/
|
|
209
190
|
_migrateFromLegacy(t) {
|
|
210
|
-
|
|
191
|
+
s.migrateFromDataAttributes(this.api, t);
|
|
211
192
|
}
|
|
212
193
|
}
|
|
213
194
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { getRecommendationFeedSourceMaps as
|
|
2
|
-
import { useRecommendationApi as
|
|
1
|
+
import { getRecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as y } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
|
+
import { useRecommendationApi as C } from "../../../../services/recommendationApi.js";
|
|
3
3
|
import { useConfigStore as G } from "../../../../stores/config.js";
|
|
4
4
|
import { defineStore as P } from "pinia";
|
|
5
|
-
import { DEFAULT_CARDS_IN_ROW as
|
|
6
|
-
import { EXCLUDED_ALGORITHM_IDS as
|
|
7
|
-
import { getDefaultProducts as
|
|
5
|
+
import { DEFAULT_CARDS_IN_ROW as F } from "../constants/layout.js";
|
|
6
|
+
import { EXCLUDED_ALGORITHM_IDS as D } from "../constants/defaultConfig.js";
|
|
7
|
+
import { getDefaultProducts as S } from "../templates/utils.js";
|
|
8
8
|
import { generateCompleteFilterQuery as b } from "../utils/filterUtil.js";
|
|
9
9
|
import { isFilterValid as w } from "../validation/filterSchema.js";
|
|
10
10
|
import { isConfigValid as v } from "../validation/requiredFields.js";
|
|
11
|
-
const h =
|
|
11
|
+
const h = C();
|
|
12
12
|
let m = null, u = null, d = null;
|
|
13
13
|
function k() {
|
|
14
14
|
return {
|
|
15
|
-
cardsInRow:
|
|
15
|
+
cardsInRow: F,
|
|
16
16
|
currencySettings: {
|
|
17
17
|
name: "USD",
|
|
18
18
|
value: "USD",
|
|
@@ -114,8 +114,8 @@ const N = () => ({
|
|
|
114
114
|
return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
|
|
115
115
|
},
|
|
116
116
|
getActivePredictiveAlgorithms: (t) => {
|
|
117
|
-
const e =
|
|
118
|
-
return t.activePredictiveAlgorithms.filter((n) => !
|
|
117
|
+
const e = g(), r = [];
|
|
118
|
+
return t.activePredictiveAlgorithms.filter((n) => !D.includes(n)).forEach((n) => {
|
|
119
119
|
r.push(...e.filter((c) => c.id === n));
|
|
120
120
|
}), r.map((n) => ({
|
|
121
121
|
text: n.name,
|
|
@@ -133,7 +133,7 @@ const N = () => ({
|
|
|
133
133
|
getFilterList() {
|
|
134
134
|
return Object.values(this.filterList).map((t) => {
|
|
135
135
|
let e;
|
|
136
|
-
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` :
|
|
136
|
+
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : y.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
137
137
|
text: t.displayName,
|
|
138
138
|
value: e,
|
|
139
139
|
type: t.attributeType
|
|
@@ -174,34 +174,6 @@ const N = () => ({
|
|
|
174
174
|
this.currentRecommendationId = n.length > 0 ? n[0] : null;
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
/**
|
|
178
|
-
* Copies blockStates[fromId] into a new blockStates[toId] entry so a
|
|
179
|
-
* duplicated block immediately renders the source's products/filters
|
|
180
|
-
* without re-fetching from the API (SD-142352). No-op when the source
|
|
181
|
-
* was never selected (no entry in blockStates) — the caller falls back
|
|
182
|
-
* to setCurrentBlock's default initialization.
|
|
183
|
-
*/
|
|
184
|
-
cloneBlockState(t, e) {
|
|
185
|
-
const r = this.blockStates[t];
|
|
186
|
-
!r || this.blockStates[e] || (this.blockStates = {
|
|
187
|
-
...this.blockStates,
|
|
188
|
-
[e]: {
|
|
189
|
-
...r,
|
|
190
|
-
recommendationProducts: [...r.recommendationProducts],
|
|
191
|
-
recommendationConfigs: {
|
|
192
|
-
...r.recommendationConfigs,
|
|
193
|
-
id: e,
|
|
194
|
-
filters: r.recommendationConfigs.filters.map((n) => ({ ...n })),
|
|
195
|
-
productIds: [...r.recommendationConfigs.productIds],
|
|
196
|
-
customAttributes: [...r.recommendationConfigs.customAttributes],
|
|
197
|
-
recommendedProducts: [...r.recommendationConfigs.recommendedProducts],
|
|
198
|
-
currencySettings: { ...r.recommendationConfigs.currencySettings }
|
|
199
|
-
},
|
|
200
|
-
filterSnapshot: null,
|
|
201
|
-
filterSelectionDrawerStatus: !1
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
},
|
|
205
177
|
/**
|
|
206
178
|
* Marks a block as initialized (initial API data has been fetched).
|
|
207
179
|
* Automatically cleaned up when removeBlockState deletes the block entry.
|
|
@@ -454,7 +426,7 @@ const N = () => ({
|
|
|
454
426
|
},
|
|
455
427
|
async _doFetchProducts() {
|
|
456
428
|
var p;
|
|
457
|
-
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = r.filters.filter((l) => l.isValid), c = b(n), i = ((p =
|
|
429
|
+
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = r.filters.filter((l) => l.isValid), c = b(n), i = ((p = g().find((l) => l.key === r.strategy)) == null ? void 0 : p.path) || "", o = G(), s = parseInt(r.size) || 6, a = {
|
|
458
430
|
locale: r.language,
|
|
459
431
|
currency: r.currencySettings.value,
|
|
460
432
|
partnerName: o.partnerName,
|
|
@@ -470,10 +442,10 @@ const N = () => ({
|
|
|
470
442
|
f = [];
|
|
471
443
|
}
|
|
472
444
|
if (this.blockStates[t]) {
|
|
473
|
-
const l = f.length > 0 ? f :
|
|
445
|
+
const l = f.length > 0 ? f : S(s);
|
|
474
446
|
l.length < s ? this.blockStates[t].recommendationProducts = [
|
|
475
447
|
...l,
|
|
476
|
-
...
|
|
448
|
+
...S(s - l.length)
|
|
477
449
|
] : l.length > s ? this.blockStates[t].recommendationProducts = l.slice(0, s) : this.blockStates[t].recommendationProducts = l;
|
|
478
450
|
}
|
|
479
451
|
}
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-8053a037],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-8053a037],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-dee2e207]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-dee2e207]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-dee2e207]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Supports multiple block instances with unique recommendation-id attributes.
|
|
7
7
|
*/
|
|
8
8
|
import type { BlockId } from '@@/Types/extensions/block';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
10
10
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
11
11
|
export declare const BLOCK_ID: BlockId;
|
|
12
12
|
export declare class RecommendationBlock extends Block {
|
|
@@ -55,19 +55,6 @@ export declare class RecommendationBlock extends Block {
|
|
|
55
55
|
* @param node - The block node being deleted
|
|
56
56
|
*/
|
|
57
57
|
onDelete(node: ImmutableHtmlNode): void;
|
|
58
|
-
/**
|
|
59
|
-
* Lifecycle hook fired when Stripo's UI Duplicate button copies a block.
|
|
60
|
-
* Stripo passes an `HtmlNodeModifier` already targeting the cloned node;
|
|
61
|
-
* its mutations are committed when this method returns. We stamp a fresh
|
|
62
|
-
* `recommendation-id` on the clone and seed its blockStates entry from
|
|
63
|
-
* the source so the duplicate enters the DOM as a fully independent block
|
|
64
|
-
* — no shared id, no shared store, no API refetch flash.
|
|
65
|
-
*
|
|
66
|
-
* Stripo does NOT fire `onCreated` for blocks created via duplicate
|
|
67
|
-
* (per Block.d.ts:54-69 — `onCreated` is drag-and-drop only), so this
|
|
68
|
-
* hook is the sole production path for clone id assignment.
|
|
69
|
-
*/
|
|
70
|
-
onCopy(modifier: HtmlNodeModifier): void;
|
|
71
58
|
/**
|
|
72
59
|
* Generates the next unique recommendation ID by scanning all existing blocks
|
|
73
60
|
* in the document and finding the maximum existing ID + 1.
|
|
@@ -216,14 +216,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
216
216
|
* Resets currentRecommendationId if it was the deleted block.
|
|
217
217
|
*/
|
|
218
218
|
removeBlockState(id: number): void;
|
|
219
|
-
/**
|
|
220
|
-
* Copies blockStates[fromId] into a new blockStates[toId] entry so a
|
|
221
|
-
* duplicated block immediately renders the source's products/filters
|
|
222
|
-
* without re-fetching from the API (SD-142352). No-op when the source
|
|
223
|
-
* was never selected (no entry in blockStates) — the caller falls back
|
|
224
|
-
* to setCurrentBlock's default initialization.
|
|
225
|
-
*/
|
|
226
|
-
cloneBlockState(fromId: number, toId: number): void;
|
|
227
219
|
/**
|
|
228
220
|
* Marks a block as initialized (initial API data has been fetched).
|
|
229
221
|
* Automatically cleaned up when removeBlockState deletes the block entry.
|
|
@@ -1,40 +1,29 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useHtmlCompiler as
|
|
3
|
-
import { DEFAULT_CURRENCY as
|
|
4
|
-
import { BLOCK_ROOT_SELECTOR as R, CONTAINER_SELECTOR as N } from "../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
1
|
+
import { useActionsApi as T } from "../composables/useActionsApi.js";
|
|
2
|
+
import { useHtmlCompiler as C } from "../composables/useHtmlCompiler.js";
|
|
3
|
+
import { DEFAULT_CURRENCY as l, DEFAULT_NODE_CONFIG as a } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
|
|
5
4
|
import { useRecommendationExtensionStore as b } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
6
5
|
import { DATA_ATTRIBUTES as y } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
7
|
-
import { parsePageList as
|
|
8
|
-
import { useDynamicContentStore as
|
|
9
|
-
import { useUnsubscribeStore as
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
const o =
|
|
14
|
-
o && c.push(...
|
|
15
|
-
}),
|
|
6
|
+
import { parsePageList as P } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
7
|
+
import { useDynamicContentStore as D } from "../stores/dynamic-content.js";
|
|
8
|
+
import { useUnsubscribeStore as E } from "../stores/unsubscribe.js";
|
|
9
|
+
function U(i, r) {
|
|
10
|
+
const s = new DOMParser().parseFromString(i, "text/html").querySelectorAll(`[${y.PAGE_LIST}]`), c = [];
|
|
11
|
+
return s.forEach((t) => {
|
|
12
|
+
const o = t.getAttribute(y.PAGE_LIST);
|
|
13
|
+
o && c.push(...P(o));
|
|
14
|
+
}), r.filter((t) => c.includes(t));
|
|
16
15
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return m.querySelectorAll(R).forEach((o) => {
|
|
21
|
-
if (!o.querySelector(N))
|
|
22
|
-
return;
|
|
23
|
-
const e = Number(o.getAttribute("recommendation-id"));
|
|
24
|
-
Number.isFinite(e) && e > 0 && n.add(e);
|
|
25
|
-
}), n;
|
|
26
|
-
}
|
|
27
|
-
function x(s) {
|
|
28
|
-
const a = new DOMParser().parseFromString(s, "text/html").querySelectorAll(".recommendation-block-v2");
|
|
29
|
-
if (a.length === 0)
|
|
16
|
+
function F(i) {
|
|
17
|
+
const m = new DOMParser().parseFromString(i, "text/html").querySelectorAll(".recommendation-block-v2");
|
|
18
|
+
if (m.length === 0)
|
|
30
19
|
return;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
const c =
|
|
35
|
-
if (!Number.isFinite(
|
|
20
|
+
const d = b();
|
|
21
|
+
m.forEach((s) => {
|
|
22
|
+
var g, f, u, n, S;
|
|
23
|
+
const c = s.getAttribute("recommendation-id"), t = c ? Number(c) : NaN;
|
|
24
|
+
if (!Number.isFinite(t))
|
|
36
25
|
return;
|
|
37
|
-
const o =
|
|
26
|
+
const o = s.getAttribute("esd-ext-config");
|
|
38
27
|
if (!o)
|
|
39
28
|
return;
|
|
40
29
|
let e;
|
|
@@ -45,62 +34,60 @@ function x(s) {
|
|
|
45
34
|
}
|
|
46
35
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
47
36
|
return;
|
|
48
|
-
const
|
|
49
|
-
strategy: e.strategy ??
|
|
50
|
-
language: e.language ??
|
|
51
|
-
size: e.size ??
|
|
37
|
+
const p = {
|
|
38
|
+
strategy: e.strategy ?? a.strategy,
|
|
39
|
+
language: e.language ?? a.language,
|
|
40
|
+
size: e.size ?? a.size,
|
|
52
41
|
// Spread the default arrays so each block gets a fresh reference
|
|
53
42
|
// instead of sharing the singleton in DEFAULT_NODE_CONFIG.
|
|
54
|
-
productIds: e.productIds ?? [...
|
|
55
|
-
filters: e.filters ?? [...
|
|
56
|
-
shuffleProducts: e.shuffleProducts ??
|
|
57
|
-
currencyCode: ((
|
|
58
|
-
currencyAlignment: ((
|
|
59
|
-
currencyDecimalCount: ((
|
|
60
|
-
currencyDecimalSeparator: ((
|
|
61
|
-
currencyThousandSeparator: ((S = e.currency) == null ? void 0 : S.thousandSeparator) ??
|
|
43
|
+
productIds: e.productIds ?? [...a.productIds],
|
|
44
|
+
filters: e.filters ?? [...a.filters],
|
|
45
|
+
shuffleProducts: e.shuffleProducts ?? a.shuffleProducts,
|
|
46
|
+
currencyCode: ((g = e.currency) == null ? void 0 : g.code) ?? l.code,
|
|
47
|
+
currencyAlignment: ((f = e.currency) == null ? void 0 : f.alignment) ?? l.alignment,
|
|
48
|
+
currencyDecimalCount: ((u = e.currency) == null ? void 0 : u.decimalCount) ?? l.decimalCount,
|
|
49
|
+
currencyDecimalSeparator: ((n = e.currency) == null ? void 0 : n.decimalSeparator) ?? l.decimalSeparator,
|
|
50
|
+
currencyThousandSeparator: ((S = e.currency) == null ? void 0 : S.thousandSeparator) ?? l.thousandSeparator
|
|
62
51
|
};
|
|
63
|
-
|
|
52
|
+
d.seedBlockUrlConfig(t, p);
|
|
64
53
|
});
|
|
65
54
|
}
|
|
66
|
-
const
|
|
67
|
-
const
|
|
55
|
+
const _ = () => {
|
|
56
|
+
const i = D(), r = E(), { getCompiledEmail: m, getTemplateData: d } = T(), { compileHtml: s } = C();
|
|
68
57
|
return {
|
|
69
58
|
prepareTemplateDetails: async () => {
|
|
70
|
-
const { html:
|
|
59
|
+
const { html: t, ampHtml: o = "", ampErrors: e = [] } = await m({
|
|
71
60
|
minimize: !0,
|
|
72
61
|
resetDataSavedFlag: !1
|
|
73
|
-
}), { html:
|
|
74
|
-
|
|
75
|
-
const { compiledHtml:
|
|
76
|
-
Object.entries(A.recommendationCampaignUrls).filter(([D]) => T.has(Number(D)))
|
|
77
|
-
);
|
|
62
|
+
}), { html: p, css: g, syncModulesIds: f = [] } = await d();
|
|
63
|
+
r.selectedUnsubscribePages.length && await r.fetchTemplates(), F(p);
|
|
64
|
+
const { compiledHtml: u, stats: n, appliedRules: S } = s(t), h = i.getSelectedDynamicContentList, A = b();
|
|
78
65
|
return console.debug("HTML Compilation Stats:", {
|
|
79
|
-
originalSize:
|
|
80
|
-
compiledSize:
|
|
81
|
-
reduction: `${
|
|
66
|
+
originalSize: n.originalSize,
|
|
67
|
+
compiledSize: n.compiledSize,
|
|
68
|
+
reduction: `${n.reductionPercentage.toFixed(2)}%`,
|
|
82
69
|
appliedRules: S,
|
|
83
|
-
executionTime: `${
|
|
70
|
+
executionTime: `${n.executionTime.toFixed(2)}ms`
|
|
84
71
|
}), {
|
|
85
72
|
dynamicContentList: h,
|
|
86
|
-
compiledHtml:
|
|
87
|
-
rawHtml:
|
|
88
|
-
css:
|
|
73
|
+
compiledHtml: u,
|
|
74
|
+
rawHtml: p,
|
|
75
|
+
css: g,
|
|
89
76
|
ampHtml: o,
|
|
90
77
|
ampErrors: e,
|
|
91
|
-
modules:
|
|
78
|
+
modules: f.map(Number),
|
|
92
79
|
recommendation: {
|
|
93
|
-
campaignUrls:
|
|
80
|
+
campaignUrls: A.recommendationCampaignUrls,
|
|
94
81
|
configs: {}
|
|
95
82
|
},
|
|
96
83
|
unsubscribe: {
|
|
97
|
-
status:
|
|
98
|
-
config:
|
|
84
|
+
status: r.unsubscribePagesStatus,
|
|
85
|
+
config: U(u, r.selectedUnsubscribePages)
|
|
99
86
|
}
|
|
100
87
|
};
|
|
101
88
|
}
|
|
102
89
|
};
|
|
103
90
|
};
|
|
104
91
|
export {
|
|
105
|
-
|
|
92
|
+
_ as useTemplatePreparation
|
|
106
93
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.4.1-beta.
|
|
3
|
+
"version": "3.4.1-beta.b69af42",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|