@useinsider/guido 3.1.1-beta.a7d73f2 → 3.1.1-beta.b085e4a
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 +10 -8
- package/dist/composables/useHtmlValidator.js +40 -38
- package/dist/config/compiler/recommendationCompilerRules.js +158 -44
- package/dist/config/compiler/unsubscribeCompilerRules.js +37 -37
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +59 -58
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/stores/config.d.ts +18 -0
- package/package.json +1 -1
|
@@ -61,7 +61,7 @@ const m = {
|
|
|
61
61
|
value: t()
|
|
62
62
|
})
|
|
63
63
|
)
|
|
64
|
-
}),
|
|
64
|
+
}), A = o({
|
|
65
65
|
/** Initial HTML content */
|
|
66
66
|
html: e(t(), ""),
|
|
67
67
|
/** Initial CSS content */
|
|
@@ -71,11 +71,13 @@ const m = {
|
|
|
71
71
|
c(f),
|
|
72
72
|
[]
|
|
73
73
|
),
|
|
74
|
+
/** Valid custom field attribute names from the partner's categorized fields */
|
|
75
|
+
customFieldAttributes: e(c(t()), []),
|
|
74
76
|
/** Selected unsubscribe page IDs */
|
|
75
77
|
selectedUnsubscribePages: e(c(p()), []),
|
|
76
78
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
77
79
|
forceRecreate: e(a(), !1)
|
|
78
|
-
}),
|
|
80
|
+
}), R = o({
|
|
79
81
|
/** Sender display name */
|
|
80
82
|
senderName: e(t(), ""),
|
|
81
83
|
/** Email subject line */
|
|
@@ -88,7 +90,7 @@ const m = {
|
|
|
88
90
|
/** Migration date for template compatibility */
|
|
89
91
|
migrationDate: e(p(), 1759696858),
|
|
90
92
|
/** Email header settings */
|
|
91
|
-
emailHeader: e(
|
|
93
|
+
emailHeader: e(R, { senderName: "", subject: "" }),
|
|
92
94
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
93
95
|
savedModulesFolderName: e(t(), b.SAVED_MODULES),
|
|
94
96
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
@@ -205,7 +207,7 @@ const m = {
|
|
|
205
207
|
"externalValidation must be a function"
|
|
206
208
|
)
|
|
207
209
|
)
|
|
208
|
-
}),
|
|
210
|
+
}), F = o({
|
|
209
211
|
// Required sections
|
|
210
212
|
/** Identity configuration (required) */
|
|
211
213
|
identity: h,
|
|
@@ -213,7 +215,7 @@ const m = {
|
|
|
213
215
|
partner: y,
|
|
214
216
|
// Optional sections (with defaults)
|
|
215
217
|
/** Template content and presets */
|
|
216
|
-
template: e(
|
|
218
|
+
template: e(A, {}),
|
|
217
219
|
/** Editor settings */
|
|
218
220
|
editor: e(C, {}),
|
|
219
221
|
/** UI configuration */
|
|
@@ -237,9 +239,9 @@ export {
|
|
|
237
239
|
E as DefaultBlockTypeSchema,
|
|
238
240
|
f as DynamicContentSchema,
|
|
239
241
|
C as EditorSchema,
|
|
240
|
-
|
|
242
|
+
R as EmailHeaderSchema,
|
|
241
243
|
I as FeaturesSchema,
|
|
242
|
-
|
|
244
|
+
F as GuidoConfigSchema,
|
|
243
245
|
h as IdentitySchema,
|
|
244
246
|
m as MessageType,
|
|
245
247
|
y as PartnerSchema,
|
|
@@ -247,6 +249,6 @@ export {
|
|
|
247
249
|
M as RegexRuleSchema,
|
|
248
250
|
N as RemoveRuleSchema,
|
|
249
251
|
L as ReplaceRuleSchema,
|
|
250
|
-
|
|
252
|
+
A as TemplateSchema,
|
|
251
253
|
T as UISchema
|
|
252
254
|
};
|
|
@@ -9,76 +9,76 @@ import { useHttp as j } from "./useHttp.js";
|
|
|
9
9
|
import { useToaster as q } from "./useToaster.js";
|
|
10
10
|
import { useTranslations as z } from "./useTranslations.js";
|
|
11
11
|
const K = /recommendation-id="(\d+)"/g;
|
|
12
|
-
function U(
|
|
13
|
-
return [...
|
|
12
|
+
function U(a) {
|
|
13
|
+
return [...a.matchAll(K)].map((u) => u[1]);
|
|
14
14
|
}
|
|
15
|
-
function Y(
|
|
16
|
-
return u.some((d) =>
|
|
15
|
+
function Y(a, u) {
|
|
16
|
+
return u.some((d) => a.startsWith(`${d}_`));
|
|
17
17
|
}
|
|
18
18
|
const ce = () => {
|
|
19
19
|
var y, h;
|
|
20
|
-
const { showToaster:
|
|
20
|
+
const { showToaster: a } = q(), { post: u } = j(), { config: d } = L(), r = z(), g = $(), p = ((h = (y = d.value) == null ? void 0 : y.partner) == null ? void 0 : h.messageType) === V.transactional, b = async (e) => {
|
|
21
21
|
const t = await u(
|
|
22
22
|
"/newsletter/template-library/check-template-html-body",
|
|
23
23
|
{ html: X(e) }
|
|
24
24
|
), { status: n, message: l } = t.data;
|
|
25
|
-
return n ||
|
|
25
|
+
return n || a({
|
|
26
26
|
type: c.Alert,
|
|
27
27
|
message: n === void 0 ? l : r("newsletter.invalid-url-link-for-toaster")
|
|
28
|
-
}), r(P), l === r(G) &&
|
|
28
|
+
}), r(P), l === r(G) && a({
|
|
29
29
|
type: c.Alert,
|
|
30
30
|
message: r("newsletter.already-in-progress")
|
|
31
31
|
}), n;
|
|
32
|
-
},
|
|
32
|
+
}, w = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), S = (e) => ["if", "endif"].includes(e.toLowerCase()), E = (e, s) => {
|
|
33
33
|
const t = e.match(/({%(.*?)%})/g);
|
|
34
34
|
let n = !0;
|
|
35
35
|
return t !== null && !p && t.forEach((l) => {
|
|
36
36
|
const o = l.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
|
|
37
37
|
if (o && o.length > 0) {
|
|
38
|
-
const [
|
|
39
|
-
|
|
38
|
+
const [i] = o;
|
|
39
|
+
w(i) && !s.includes(i) && (a({
|
|
40
40
|
type: c.Warning,
|
|
41
41
|
message: r("custom-fields.invalid-custom-fields")
|
|
42
42
|
}), n = !1);
|
|
43
43
|
}
|
|
44
44
|
}), n;
|
|
45
45
|
}, A = async (e, s, t) => {
|
|
46
|
-
const n = t ? await
|
|
46
|
+
const n = t ? await b(e) : !0;
|
|
47
47
|
return E(e, s) && n;
|
|
48
|
-
}, I = (e) => e.length > 0 ? !0 : (
|
|
48
|
+
}, I = (e) => e.length > 0 ? !0 : (a({
|
|
49
49
|
type: c.Warning,
|
|
50
50
|
message: r("newsletter.html-content-is-empty")
|
|
51
51
|
}), !1), k = (e) => {
|
|
52
52
|
const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
|
|
53
|
-
return s > t &&
|
|
53
|
+
return s > t && a({
|
|
54
54
|
type: c.Warning,
|
|
55
55
|
message: r("custom-fields.missing-closing-braces")
|
|
56
|
-
}), s < t &&
|
|
56
|
+
}), s < t && a({
|
|
57
57
|
type: c.Warning,
|
|
58
58
|
message: r("custom-fields.missing-opening-braces")
|
|
59
59
|
}), s === t;
|
|
60
60
|
}, x = (e) => {
|
|
61
61
|
const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
|
|
62
|
-
return s ||
|
|
62
|
+
return s || a({
|
|
63
63
|
type: c.Warning,
|
|
64
64
|
message: r("custom-fields.invalid-custom-fields")
|
|
65
65
|
}), s;
|
|
66
66
|
}, T = (e, s) => {
|
|
67
67
|
const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
|
|
68
68
|
if (t && !p) {
|
|
69
|
-
const n = new Set(s.map((
|
|
70
|
-
if (t.forEach((
|
|
71
|
-
const m =
|
|
69
|
+
const n = new Set(s.map((i) => i.toLowerCase())), l = U(e), o = [];
|
|
70
|
+
if (t.forEach((i) => {
|
|
71
|
+
const m = i.slice(2, -2).trim().toLowerCase();
|
|
72
72
|
(!n.has(m) || m === "") && !Y(m, l) && o.push(m);
|
|
73
73
|
}), o.length > 0) {
|
|
74
|
-
const
|
|
74
|
+
const i = `
|
|
75
75
|
<ul>
|
|
76
76
|
${o.map((m) => `<li>${m}</li>`).join("")}
|
|
77
77
|
</ul>
|
|
78
78
|
`;
|
|
79
|
-
return
|
|
79
|
+
return a({
|
|
80
80
|
type: c.Alert,
|
|
81
|
-
message: r("custom-fields.invalid-custom-fields") +
|
|
81
|
+
message: r("custom-fields.invalid-custom-fields") + i
|
|
82
82
|
}), !1;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -87,12 +87,12 @@ const ce = () => {
|
|
|
87
87
|
const s = e.match(/{%(.*?)%}/g), t = [];
|
|
88
88
|
let n = !0;
|
|
89
89
|
if (s && s.forEach((l) => {
|
|
90
|
-
const o = l.match(_),
|
|
91
|
-
(!o || l !== m) && !
|
|
90
|
+
const o = l.match(_), i = l.match(H), m = (o == null ? void 0 : o.join("")) || "";
|
|
91
|
+
(!o || l !== m) && !i && (a({
|
|
92
92
|
type: c.Alert,
|
|
93
93
|
message: r("newsletter.display-conditions-invalid-syntax")
|
|
94
94
|
}), n = !1), o && o.forEach((f) => {
|
|
95
|
-
f.trim() === "=" && (
|
|
95
|
+
f.trim() === "=" && (a({
|
|
96
96
|
type: c.Alert,
|
|
97
97
|
message: r("custom-conditions.wrong-equality-operators")
|
|
98
98
|
}), n = !1);
|
|
@@ -102,8 +102,8 @@ const ce = () => {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
}), t.length) {
|
|
105
|
-
const l = t.filter((
|
|
106
|
-
l.length !== o.length && (
|
|
105
|
+
const l = t.filter((i) => i === "if"), o = t.filter((i) => i === "endif");
|
|
106
|
+
l.length !== o.length && (a({
|
|
107
107
|
type: c.Alert,
|
|
108
108
|
message: r("custom-conditions.missing-if-endif-tag")
|
|
109
109
|
}), n = !1);
|
|
@@ -111,45 +111,47 @@ const ce = () => {
|
|
|
111
111
|
return n;
|
|
112
112
|
}, W = (e) => {
|
|
113
113
|
const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
|
|
114
|
-
return n ||
|
|
114
|
+
return n || a({
|
|
115
115
|
type: c.Warning,
|
|
116
116
|
message: r("custom-conditions.no-space-after-braces")
|
|
117
117
|
}), n;
|
|
118
|
-
}, N = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (
|
|
118
|
+
}, N = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (a({
|
|
119
119
|
type: c.Warning,
|
|
120
120
|
message: r("custom-conditions.no-braces-inside-if-tag")
|
|
121
|
-
}), !1) : !0, O = () => g.recommendationConfigs && Object.values(g.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (
|
|
121
|
+
}), !1) : !0, O = () => g.recommendationConfigs && Object.values(g.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (a({
|
|
122
122
|
type: c.Alert,
|
|
123
123
|
message: r("newsletter.fill-all-necessary-fields")
|
|
124
124
|
}), !1) : !0, B = (e) => {
|
|
125
125
|
const s = /src="[^"]*\.(svg|pst)"/gm;
|
|
126
|
-
return e.match(s) === null ? !0 : (
|
|
126
|
+
return e.match(s) === null ? !0 : (a({
|
|
127
127
|
type: c.Alert,
|
|
128
128
|
message: r("newsletter.invalid-image-type")
|
|
129
129
|
}), !1);
|
|
130
130
|
}, R = (e) => {
|
|
131
131
|
const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
|
|
132
132
|
return Array.from(n).find((o) => {
|
|
133
|
-
var
|
|
134
|
-
return !((
|
|
135
|
-
}) ? (
|
|
133
|
+
var i;
|
|
134
|
+
return !((i = o.id) != null && i.trim());
|
|
135
|
+
}) ? (a({
|
|
136
136
|
type: c.Alert,
|
|
137
137
|
message: r("unsubscribe-templates.select-checkbox-groups")
|
|
138
138
|
}), !1) : !0;
|
|
139
139
|
}, D = (e) => {
|
|
140
140
|
const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".radio-button-v2");
|
|
141
141
|
return Array.from(n).find((o) => {
|
|
142
|
-
var
|
|
143
|
-
return !((
|
|
144
|
-
}) ? (
|
|
142
|
+
var i;
|
|
143
|
+
return !((i = o.id) != null && i.trim());
|
|
144
|
+
}) ? (a({
|
|
145
145
|
type: c.Alert,
|
|
146
146
|
message: r("unsubscribe-templates.select-radio-button-groups")
|
|
147
147
|
}), !1) : !0;
|
|
148
148
|
};
|
|
149
149
|
return { validateHtml: async (e, s, t = !1) => {
|
|
150
|
+
var o, i;
|
|
150
151
|
const n = [
|
|
151
|
-
...s.map((
|
|
152
|
-
...M
|
|
152
|
+
...s.map((m) => m.value),
|
|
153
|
+
...M,
|
|
154
|
+
...((i = (o = d.value) == null ? void 0 : o.template) == null ? void 0 : i.customFieldAttributes) ?? []
|
|
153
155
|
];
|
|
154
156
|
return await A(e, n, t) && I(e) && k(e) && x(e) && T(e, n) && F(e) && W(e) && N(e) && O() && B(e) && R(e) && D(e);
|
|
155
157
|
} };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useRecommendation as
|
|
2
|
-
import { DUMMY_IMAGE_MAPPINGS as
|
|
3
|
-
import { prepareRecommendationBlocks as
|
|
4
|
-
const
|
|
1
|
+
import { useRecommendation as N } from "../../composables/useRecommendation.js";
|
|
2
|
+
import { DUMMY_IMAGE_MAPPINGS as C, REGEX as T, VerticalOrientation as M, CSS as E, ATTRIBUTES as R, CONDITIONS as $, HTML as h } from "../../enums/recommendation.js";
|
|
3
|
+
import { prepareRecommendationBlocks as x } from "./utils/recommendationCompilerUtils.js";
|
|
4
|
+
const w = [
|
|
5
5
|
{
|
|
6
6
|
id: "replace-images-with-variable-names",
|
|
7
7
|
description: "Replacing dummy images with variable names in recommendation module",
|
|
8
8
|
type: "custom",
|
|
9
|
-
processor: (
|
|
10
|
-
let
|
|
11
|
-
return Object.entries(
|
|
12
|
-
Object.entries(
|
|
13
|
-
|
|
9
|
+
processor: (i) => {
|
|
10
|
+
let e = i;
|
|
11
|
+
return Object.entries(C).forEach(([, p]) => {
|
|
12
|
+
Object.entries(p).forEach(([c, n]) => {
|
|
13
|
+
e = e.replaceAll(n, `{{${c}}}`);
|
|
14
14
|
});
|
|
15
|
-
}),
|
|
15
|
+
}), e;
|
|
16
16
|
},
|
|
17
17
|
priority: 50
|
|
18
18
|
},
|
|
@@ -29,21 +29,21 @@ const G = [
|
|
|
29
29
|
id: "add-recommendation-unresponsive-css",
|
|
30
30
|
description: "Adding recommendation unresponsive css",
|
|
31
31
|
type: "custom",
|
|
32
|
-
processor: (
|
|
33
|
-
const { calculateCardWidth:
|
|
34
|
-
let
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
const
|
|
43
|
-
|
|
32
|
+
processor: (i) => {
|
|
33
|
+
const { calculateCardWidth: e, getRecommendationCampaignData: p } = N();
|
|
34
|
+
let c = i;
|
|
35
|
+
const n = c.match(T.ID);
|
|
36
|
+
if (n) {
|
|
37
|
+
const a = [];
|
|
38
|
+
if (n.forEach((s) => {
|
|
39
|
+
const d = /recommendation-id="(.*?)"/i.exec(s), _ = d ? d[1].trim() : "", A = p(_);
|
|
40
|
+
A.textTrimming && A.orientation === M && a.push(e(A));
|
|
41
|
+
}), a.length) {
|
|
42
|
+
const s = `width:${Math.min(...a)}px!important;`;
|
|
43
|
+
c = c.replace(E.REGULAR_NAME_HEIGHT, `${E.TRIMMED_NAME_HEIGHT} ${s} ${E.ELLIPSIS}`).replace(E.REGULAR_NAME_CONTAINER_HEIGHT, E.TRIMMED_NAME_CONTAINER_CSS).replace(E.RESPONSIVE_NAME_SIZE, `${E.RESPONSIVE_NAME_HEIGHT} ${s} ${E.ELLIPSIS}`).replace(E.RESPONSIVE_NAME_CONTAINER_HEIGHT, E.TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return
|
|
46
|
+
return c;
|
|
47
47
|
},
|
|
48
48
|
priority: 52
|
|
49
49
|
},
|
|
@@ -51,39 +51,153 @@ const G = [
|
|
|
51
51
|
id: "prepare-recommendations",
|
|
52
52
|
description: "Replacing product data with template variables in recommendation blocks",
|
|
53
53
|
type: "custom",
|
|
54
|
-
processor: (
|
|
54
|
+
processor: (i) => x(i),
|
|
55
55
|
priority: 48
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
id: "add-discount-conditions",
|
|
59
59
|
description: "Adding discount conditions to the recommendation block",
|
|
60
60
|
type: "custom",
|
|
61
|
-
processor: (
|
|
62
|
-
let
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
61
|
+
processor: (i) => {
|
|
62
|
+
let e = i;
|
|
63
|
+
const p = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: c } = N();
|
|
64
|
+
return p !== null && p.forEach((n) => {
|
|
65
|
+
const a = n.match(T.CUSTOM_FIELD);
|
|
66
|
+
if (!a)
|
|
67
67
|
return;
|
|
68
|
-
const [
|
|
69
|
-
if (!
|
|
68
|
+
const [s] = a, d = s.match(T.CUSTOM_FIELD_INDEXES_PART), _ = s.match(T.CUSTOM_FIELD_NAME_PART), A = n.match(T.ATTRIBUTE_PARAGRAPH_START_TAG);
|
|
69
|
+
if (!d || !_ || !A)
|
|
70
70
|
return;
|
|
71
|
-
const [
|
|
72
|
-
let
|
|
73
|
-
if (
|
|
74
|
-
const
|
|
75
|
-
|
|
71
|
+
const [I] = d, [S] = _, [m] = A, o = S.substring(1, S.length - 2), r = m.match(T.COMPOSITION) !== null;
|
|
72
|
+
let t = s;
|
|
73
|
+
if (r) {
|
|
74
|
+
const b = I.substring(2, I.length - 3), l = c(b);
|
|
75
|
+
o === R.OMNIBUS_PRICE && (l.priceBeforeTextValue && (t = `${l.priceBeforeTextValue}${t}`), l.priceAfterTextValue && (t = `${t}${l.priceAfterTextValue}`)), o === R.OMNIBUS_DISCOUNT && (l.discountBeforeTextValue && (t = `${l.discountBeforeTextValue}${t}`), l.discountAfterTextValue && (t = `${t}${l.discountAfterTextValue}`));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
}),
|
|
77
|
+
const u = I.substring(2);
|
|
78
|
+
let f = "";
|
|
79
|
+
o in $.IF && (f = $.IF[o].replaceAll(`{${R.DISCOUNT}}`, `${u}${R.DISCOUNT}`).replaceAll(`{${R.OMNIBUS_DISCOUNT}}`, `${u}${R.OMNIBUS_DISCOUNT}`).replaceAll(`{${R.OMNIBUS_PRICE}}`, `${u}${R.OMNIBUS_PRICE}`));
|
|
80
|
+
const g = `${m}${t}${h.PARAGRAPH_END_TAG}`, y = `${f}${r ? g : n}${$.ELSE}${m}${h.PARAGRAPH_END_TAG}${$.END_IF}`;
|
|
81
|
+
e = e.replace(n, y);
|
|
82
|
+
}), e;
|
|
83
83
|
},
|
|
84
84
|
priority: 53
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "strip-empty-omnibus-spans",
|
|
88
|
+
description: "Remove empty omnibus text-before and text-after span elements",
|
|
89
|
+
type: "regex",
|
|
90
|
+
pattern: '<span class="omnibus-text-(?:before|after)">\\s*</span>',
|
|
91
|
+
replacement: "",
|
|
92
|
+
flags: "g",
|
|
93
|
+
priority: 54
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "strip-recommendation-editor-attributes",
|
|
97
|
+
description: "Strip editor-only attributes from compiled recommendation output",
|
|
98
|
+
type: "regex",
|
|
99
|
+
// eslint-disable-next-line @stylistic/max-len
|
|
100
|
+
pattern: '\\s+(?:esd-extension-block-id|data-attribute-type|data-visibility|data-text-before|data-text-after|product-attr|composition)="[^"]*"',
|
|
101
|
+
replacement: "",
|
|
102
|
+
flags: "g",
|
|
103
|
+
priority: 55
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "strip-unused-recommendation-classes",
|
|
107
|
+
description: "Remove CSS classes not referenced by any style rule from recommendation elements",
|
|
108
|
+
type: "custom",
|
|
109
|
+
processor: (i) => {
|
|
110
|
+
let e = i.replace(
|
|
111
|
+
/ class="(?:product-card-segment|attribute-cell|recommendation-attribute-row|product-image|product-name|product-price|product-old-price|product-omnibus-price|product-omnibus-discount|product-button|recommendation-product-row|product-card-wrapper)"/g,
|
|
112
|
+
""
|
|
113
|
+
);
|
|
114
|
+
return e = e.replaceAll("es-button buy-button", "es-button"), e = e.replaceAll("ins-recommendation-product-container ", ""), e;
|
|
115
|
+
},
|
|
116
|
+
priority: 56
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "remove-empty-mobile-layout-artifacts",
|
|
120
|
+
description: "Remove empty mobile container rows and unused mobile layout CSS",
|
|
121
|
+
type: "custom",
|
|
122
|
+
processor: (i) => {
|
|
123
|
+
let e = i;
|
|
124
|
+
return e = e.replace(
|
|
125
|
+
/<tr[^>]*class="ins-recommendation-mobile-row"[^>]*><\/tr>/g,
|
|
126
|
+
""
|
|
127
|
+
), /class="[^"]*ins-recommendation-mobile-container/.test(e) || (e = e.replace(
|
|
128
|
+
/\.ins-recommendation-mobile-container\s*\{\s*display\s*:\s*none\s*;?\s*\}/g,
|
|
129
|
+
""
|
|
130
|
+
), e = e.replace(
|
|
131
|
+
/@media[^{]*max-width\s*:\s*480px[^{]*\{((?:[^{}]*\{[^{}]*\})*[^{}]*)\}/g,
|
|
132
|
+
(p, c) => {
|
|
133
|
+
const n = c.match(/[^{}]+\{[^{}]*\}/g) || [], a = /ins-recommendation|product-image-cell|button-cell|product-info-cell/;
|
|
134
|
+
return n.every((d) => a.test(d)) ? "" : p;
|
|
135
|
+
}
|
|
136
|
+
)), e;
|
|
137
|
+
},
|
|
138
|
+
priority: 57
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "deduplicate-inline-styles",
|
|
142
|
+
description: "Replace repeated inline styles with CSS class references within recommendation blocks",
|
|
143
|
+
type: "custom",
|
|
144
|
+
processor: (i) => {
|
|
145
|
+
const e = i.replace(
|
|
146
|
+
/<a\b[^>]*\bes-button\b[^>]*>/g,
|
|
147
|
+
(o) => o.replace(
|
|
148
|
+
/([;"]color:)([^;"]+)/g,
|
|
149
|
+
(r, t, u) => u.includes("!important") ? r : `${t}${u} !important`
|
|
150
|
+
)
|
|
151
|
+
), p = /<!--REC_START-->([\s\S]*?)<!--REC_END-->/g, c = / style="([^"]*)"/g, n = /* @__PURE__ */ new Map();
|
|
152
|
+
let a = p.exec(e);
|
|
153
|
+
for (; a !== null; ) {
|
|
154
|
+
let o = c.exec(a[1]);
|
|
155
|
+
for (; o !== null; ) {
|
|
156
|
+
const [, r] = o;
|
|
157
|
+
n.set(r, (n.get(r) || 0) + 1), o = c.exec(a[1]);
|
|
158
|
+
}
|
|
159
|
+
c.lastIndex = 0, a = p.exec(e);
|
|
160
|
+
}
|
|
161
|
+
const s = /* @__PURE__ */ new Map(), d = [];
|
|
162
|
+
let _ = 0;
|
|
163
|
+
if (n.forEach((o, r) => {
|
|
164
|
+
if (o >= 6) {
|
|
165
|
+
const t = `rc${_++}`;
|
|
166
|
+
s.set(r, t), d.push(`.${t}{${r}}`);
|
|
167
|
+
}
|
|
168
|
+
}), s.size === 0) {
|
|
169
|
+
let o = e;
|
|
170
|
+
return o = o.replaceAll("<!--REC_START-->", ""), o = o.replaceAll("<!--REC_END-->", ""), o;
|
|
171
|
+
}
|
|
172
|
+
const A = (o) => o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), I = (o, r) => `${o.slice(0, -1)} ${r}"`, S = /* @__PURE__ */ new Map();
|
|
173
|
+
s.forEach((o, r) => {
|
|
174
|
+
const t = A(r);
|
|
175
|
+
S.set(r, {
|
|
176
|
+
caseA: new RegExp(`(class="[^"]*")((?:[^>]*?)) style="${t}"`, "g"),
|
|
177
|
+
caseB: new RegExp(` style="${t}"((?:[^>]*?))(class="[^"]*")`, "g")
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
let m = e.replace("</style>", `${d.join("")}</style>`);
|
|
181
|
+
return m = m.replace(
|
|
182
|
+
/<!--REC_START-->([\s\S]*?)<!--REC_END-->/g,
|
|
183
|
+
(o, r) => {
|
|
184
|
+
let t = r;
|
|
185
|
+
return s.forEach((u, f) => {
|
|
186
|
+
const g = S.get(f);
|
|
187
|
+
t = t.replace(
|
|
188
|
+
g.caseA,
|
|
189
|
+
(y, b, l) => I(b, u) + l
|
|
190
|
+
), t = t.replace(
|
|
191
|
+
g.caseB,
|
|
192
|
+
(y, b, l) => b + I(l, u)
|
|
193
|
+
), t = t.replaceAll(` style="${f}"`, ` class="${u}"`);
|
|
194
|
+
}), t;
|
|
195
|
+
}
|
|
196
|
+
), m = m.replaceAll("<!--REC_START-->", ""), m = m.replaceAll("<!--REC_END-->", ""), m;
|
|
197
|
+
},
|
|
198
|
+
priority: 58
|
|
85
199
|
}
|
|
86
200
|
];
|
|
87
201
|
export {
|
|
88
|
-
|
|
202
|
+
w as recommendationCompilerRules
|
|
89
203
|
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as
|
|
3
|
-
import { parsePageList as
|
|
4
|
-
import { useConfigStore as
|
|
5
|
-
import { useDynamicContentStore as
|
|
6
|
-
import { useUnsubscribeStore as
|
|
7
|
-
const
|
|
1
|
+
import { usePartner as y } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as p, LINK_TYPES as S, INSIDER_ID as m, URLS as R } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { parsePageList as I } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
4
|
+
import { useConfigStore as N } from "../../stores/config.js";
|
|
5
|
+
import { useDynamicContentStore as U } from "../../stores/dynamic-content.js";
|
|
6
|
+
import { useUnsubscribeStore as C } from "../../stores/unsubscribe.js";
|
|
7
|
+
const G = [
|
|
8
8
|
{
|
|
9
9
|
id: "add-unsubscribe-link-values",
|
|
10
10
|
description: "Adding unsubscribe link values",
|
|
11
11
|
type: "custom",
|
|
12
12
|
processor: (t) => {
|
|
13
|
-
const { getPartnerName: i } =
|
|
13
|
+
const { getPartnerName: i } = y(), o = N(), s = U(), d = C(), a = o.variationId;
|
|
14
14
|
if (!a)
|
|
15
15
|
return t;
|
|
16
16
|
let e = t;
|
|
17
|
-
const r = `/${i()}/email/${a}?user={{iid}}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const r = `/${i()}/email/${a}?user={{iid}}`, E = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]");
|
|
18
|
+
let c = !1, l = !1;
|
|
19
|
+
return E.forEach((f) => {
|
|
20
|
+
var b;
|
|
21
|
+
const u = f.getAttribute("data-unsubscribe-page-list");
|
|
22
|
+
if (!u)
|
|
22
23
|
return;
|
|
23
|
-
const
|
|
24
|
-
(
|
|
25
|
-
)) ?? []
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}), e;
|
|
24
|
+
const _ = I(u), g = ((b = d.templates) == null ? void 0 : b.filter(
|
|
25
|
+
(n) => _.includes(n.id)
|
|
26
|
+
)) ?? [];
|
|
27
|
+
c = c || g.some((n) => n.type === S.UNSUBSCRIBE_LINK_TYPE), l = l || g.some((n) => n.type === S.PREFERENCES_LINK_TYPE);
|
|
28
|
+
}), (c || l) && (s.selectedDynamicContentList.some((u) => u.value === m) || s.selectedDynamicContentList.push({
|
|
29
|
+
text: m,
|
|
30
|
+
value: m,
|
|
31
|
+
fallback: ""
|
|
32
|
+
})), c && (e = e.replace(
|
|
33
|
+
p.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
34
|
+
R.UNSUBSCRIBE_URL + r
|
|
35
|
+
)), l && (e = e.replace(
|
|
36
|
+
p.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
37
|
+
R.PREFERENCES_URL + r
|
|
38
|
+
)), E.length && (e = e.replace(p.UNSUBSCRIBE_LINK_REGEX, "")), e;
|
|
39
39
|
},
|
|
40
40
|
priority: 60
|
|
41
41
|
},
|
|
@@ -43,7 +43,7 @@ const D = [
|
|
|
43
43
|
id: "remove-data-ogsb-button-styles",
|
|
44
44
|
description: "Removing styles like [data-ogsb] .es-button.es-button-123 { background: red; }",
|
|
45
45
|
type: "regex",
|
|
46
|
-
pattern:
|
|
46
|
+
pattern: p.DATA_OGSB_BUTTON_CSS_REGEX,
|
|
47
47
|
replacement: "",
|
|
48
48
|
flags: "g",
|
|
49
49
|
priority: 61
|
|
@@ -61,16 +61,16 @@ const D = [
|
|
|
61
61
|
type: "custom",
|
|
62
62
|
processor: (t) => {
|
|
63
63
|
let i = t;
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
-
if (
|
|
64
|
+
const o = i.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
65
|
+
return o && o.forEach((s) => {
|
|
66
|
+
if (s.includes("insEmail=1"))
|
|
67
67
|
return;
|
|
68
|
-
if (
|
|
69
|
-
const a =
|
|
68
|
+
if (s.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
69
|
+
const a = s.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
|
|
70
70
|
const r = e.slice(6, e.length - 1).trim();
|
|
71
71
|
return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
|
|
72
72
|
});
|
|
73
|
-
i = i.replace(
|
|
73
|
+
i = i.replace(s, a);
|
|
74
74
|
}
|
|
75
75
|
}), i;
|
|
76
76
|
},
|
|
@@ -78,5 +78,5 @@ const D = [
|
|
|
78
78
|
}
|
|
79
79
|
];
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
G as unsubscribeCompilerRules
|
|
82
82
|
};
|
|
@@ -1,130 +1,131 @@
|
|
|
1
|
-
import { useRecommendation as
|
|
2
|
-
function b(e,
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { useRecommendation as S } from "../../../composables/useRecommendation.js";
|
|
2
|
+
function b(e, n, r, c) {
|
|
3
|
+
const u = `{{${e}_${n}_${r}}}`, t = `{{${e}_${n}_currency}}`;
|
|
4
|
+
return c === "before" ? `${t} ${u}` : `${u} ${t}`;
|
|
5
5
|
}
|
|
6
|
-
function p(e,
|
|
7
|
-
switch (
|
|
6
|
+
function p(e, n, r, c, u) {
|
|
7
|
+
switch (n) {
|
|
8
8
|
case "productImage": {
|
|
9
9
|
const t = e.querySelector("img");
|
|
10
|
-
t && (t.setAttribute("src", `{{${r}_${
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
t && (t.setAttribute("src", `{{${r}_${c}_image_url}}`), t.setAttribute("alt", `{{${r}_${c}_name}}`));
|
|
11
|
+
const o = e.querySelector("a");
|
|
12
|
+
o && o.setAttribute("href", `{{${r}_${c}_url}}`);
|
|
13
13
|
break;
|
|
14
14
|
}
|
|
15
15
|
case "productName": {
|
|
16
16
|
const t = e.querySelector("p");
|
|
17
17
|
if (t) {
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const o = t.querySelector("strong") || t;
|
|
19
|
+
o.textContent = `{{${r}_${c}_name}}`;
|
|
20
20
|
}
|
|
21
21
|
break;
|
|
22
22
|
}
|
|
23
23
|
case "productPrice": {
|
|
24
24
|
const t = e.querySelector("p");
|
|
25
25
|
if (t) {
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const o = t.querySelector("strong") || t;
|
|
27
|
+
o.textContent = b(r, c, "price", u);
|
|
28
28
|
}
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
case "productOldPrice": {
|
|
32
32
|
const t = e.querySelector("p");
|
|
33
33
|
if (t) {
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
const o = t.querySelector("strong") || t;
|
|
35
|
+
o.textContent = b(
|
|
36
36
|
r,
|
|
37
|
-
|
|
37
|
+
c,
|
|
38
38
|
"original_price",
|
|
39
|
-
|
|
39
|
+
u
|
|
40
40
|
), t.setAttribute("product-attr", "discount");
|
|
41
41
|
}
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
case "productButton": {
|
|
45
45
|
const t = e.querySelector("a");
|
|
46
|
-
t && t.setAttribute("href", `{{${r}_${
|
|
46
|
+
t && t.setAttribute("href", `{{${r}_${c}_url}}`);
|
|
47
47
|
break;
|
|
48
48
|
}
|
|
49
49
|
case "productOmnibusPrice": {
|
|
50
50
|
const t = e.querySelector(".omnibus-price-value");
|
|
51
51
|
if (t) {
|
|
52
|
-
t.textContent = `{{${r}_${
|
|
53
|
-
const
|
|
54
|
-
|
|
52
|
+
t.textContent = `{{${r}_${c}_omnibus_price}}`;
|
|
53
|
+
const o = t.closest("p");
|
|
54
|
+
o && (o.setAttribute("product-attr", "omnibus_price"), o.setAttribute("composition", "true"));
|
|
55
55
|
}
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
case "productOmnibusDiscount": {
|
|
59
59
|
const t = e.querySelector(".omnibus-discount-value");
|
|
60
60
|
if (t) {
|
|
61
|
-
t.textContent = `{{${r}_${
|
|
62
|
-
const
|
|
63
|
-
|
|
61
|
+
t.textContent = `{{${r}_${c}_omnibus_discount}}`;
|
|
62
|
+
const o = t.closest("p");
|
|
63
|
+
o && (o.setAttribute("product-attr", "omnibus_discount"), o.setAttribute("composition", "true"));
|
|
64
64
|
}
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
default: {
|
|
68
68
|
const t = e.getAttribute("product-attr") ? e : e.querySelector("[product-attr]");
|
|
69
69
|
if (t) {
|
|
70
|
-
const
|
|
70
|
+
const o = t.getAttribute("product-attr"), s = t.querySelector("p");
|
|
71
71
|
if (s) {
|
|
72
72
|
const i = s.querySelector("strong") || s;
|
|
73
|
-
i.textContent = `{{${r}_${
|
|
73
|
+
i.textContent = `{{${r}_${c}_${o}}}`;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
e.querySelectorAll(".recommendation-product-row").forEach((
|
|
82
|
-
|
|
83
|
-
const i = s.getAttribute("data-attribute-type") || "",
|
|
84
|
-
|
|
85
|
-
p(
|
|
86
|
-
}) : p(s, i,
|
|
80
|
+
function _(e, n, r) {
|
|
81
|
+
e.querySelectorAll(".recommendation-product-row").forEach((u, t) => {
|
|
82
|
+
u.querySelectorAll("[data-attribute-type]").forEach((s) => {
|
|
83
|
+
const i = s.getAttribute("data-attribute-type") || "", a = s.querySelectorAll(".attribute-cell");
|
|
84
|
+
a.length > 0 ? a.forEach((l) => {
|
|
85
|
+
p(l, i, n, t, r);
|
|
86
|
+
}) : p(s, i, n, t, r);
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
90
|
+
function $(e, n, r) {
|
|
91
|
+
const c = e.querySelectorAll(".recommendation-product-row");
|
|
92
|
+
if (!c.length)
|
|
93
93
|
return;
|
|
94
|
-
const [
|
|
95
|
-
|
|
96
|
-
s.querySelectorAll("[data-attribute-type]").forEach((
|
|
97
|
-
const f =
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
p(y, f,
|
|
94
|
+
const [u] = c, t = u.querySelector("[data-attribute-type]"), o = t ? t.querySelectorAll(".attribute-cell").length : 1;
|
|
95
|
+
c.forEach((s, i) => {
|
|
96
|
+
s.querySelectorAll("[data-attribute-type]").forEach((l) => {
|
|
97
|
+
const f = l.getAttribute("data-attribute-type") || "";
|
|
98
|
+
l.querySelectorAll(".attribute-cell").forEach((y, m) => {
|
|
99
|
+
const A = i * o + m;
|
|
100
|
+
p(y, f, n, A, r);
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
e.querySelectorAll(".ins-recommendation-product-container").forEach((
|
|
107
|
-
|
|
105
|
+
function d(e, n, r) {
|
|
106
|
+
e.querySelectorAll(".ins-recommendation-product-container").forEach((u) => {
|
|
107
|
+
$(u, n, r);
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
const r = e.getAttribute("data-layout") || "grid",
|
|
112
|
-
r === "list" ?
|
|
110
|
+
function q(e, n) {
|
|
111
|
+
const r = e.getAttribute("data-layout") || "grid", c = e.getAttribute("currency-alignment") || "after";
|
|
112
|
+
r === "list" ? _(e, n, c) : d(e, n, c);
|
|
113
113
|
}
|
|
114
|
-
function g(e,
|
|
114
|
+
function g(e, n) {
|
|
115
115
|
const r = e.match(/<!DOCTYPE[^>]*>/i);
|
|
116
116
|
return (r ? `${r[0]}
|
|
117
|
-
` : "") +
|
|
117
|
+
` : "") + n.documentElement.outerHTML;
|
|
118
118
|
}
|
|
119
119
|
function E(e) {
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
120
|
+
const n = e.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), r = new DOMParser().parseFromString(n, "text/html"), c = r.querySelectorAll(".recommendation-block-v2");
|
|
121
|
+
if (!c.length)
|
|
122
122
|
return e;
|
|
123
|
-
const { buildCampaignUrl:
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
s
|
|
127
|
-
|
|
123
|
+
const { buildCampaignUrl: u } = S();
|
|
124
|
+
return c.forEach((o) => {
|
|
125
|
+
var i, a;
|
|
126
|
+
const s = o.getAttribute("recommendation-id");
|
|
127
|
+
s && ((i = o.parentNode) == null || i.insertBefore(r.createComment("REC_START"), o), (a = o.parentNode) == null || a.insertBefore(r.createComment("REC_END"), o.nextSibling), u(s), q(o, s));
|
|
128
|
+
}), g(n, r).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
128
129
|
}
|
|
129
130
|
export {
|
|
130
131
|
b as formatPriceVariable,
|
|
@@ -75,7 +75,8 @@ const e = {
|
|
|
75
75
|
"The image with the invalid link cannot be saved to the image gallery": "Enter a valid image link to continue.",
|
|
76
76
|
"The data source link is unavailable. Please, make sure there is an access to the data source.": "Enter an accessible Data Source Link to contiue.",
|
|
77
77
|
"The file should not exceed the maximum resolution of {maxImageResolution}px.": "Upload files up to 1024x512 pixels to continue.",
|
|
78
|
-
"The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor."
|
|
78
|
+
"The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor.",
|
|
79
|
+
"Dropdown with a list of available data services, preliminarily created in the Data section → Services tab of the Account.": "Service for Data Collection lets you enter a form submission URL for the recipients to submit."
|
|
79
80
|
};
|
|
80
81
|
export {
|
|
81
82
|
e as default
|
|
@@ -95,6 +95,8 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
95
95
|
readonly value: v.StringSchema<undefined>;
|
|
96
96
|
}, undefined>, undefined>;
|
|
97
97
|
}, undefined>, undefined>, readonly []>;
|
|
98
|
+
/** Valid custom field attribute names from the partner's categorized fields */
|
|
99
|
+
readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
98
100
|
/** Selected unsubscribe page IDs */
|
|
99
101
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
100
102
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
@@ -422,6 +424,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
422
424
|
readonly value: v.StringSchema<undefined>;
|
|
423
425
|
}, undefined>, undefined>;
|
|
424
426
|
}, undefined>, undefined>, readonly []>;
|
|
427
|
+
/** Valid custom field attribute names from the partner's categorized fields */
|
|
428
|
+
readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
425
429
|
/** Selected unsubscribe page IDs */
|
|
426
430
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
427
431
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
@@ -30,6 +30,7 @@ export declare const useConfig: () => {
|
|
|
30
30
|
value: string;
|
|
31
31
|
} | undefined;
|
|
32
32
|
}[];
|
|
33
|
+
customFieldAttributes: string[];
|
|
33
34
|
selectedUnsubscribePages: number[];
|
|
34
35
|
forceRecreate: boolean;
|
|
35
36
|
};
|
|
@@ -121,6 +122,7 @@ export declare const useConfig: () => {
|
|
|
121
122
|
value: string;
|
|
122
123
|
} | undefined;
|
|
123
124
|
}[];
|
|
125
|
+
customFieldAttributes: string[];
|
|
124
126
|
selectedUnsubscribePages: number[];
|
|
125
127
|
forceRecreate: boolean;
|
|
126
128
|
} | null>;
|
|
@@ -35,6 +35,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
35
35
|
value: string;
|
|
36
36
|
} | undefined;
|
|
37
37
|
}[];
|
|
38
|
+
customFieldAttributes: string[];
|
|
38
39
|
selectedUnsubscribePages: number[];
|
|
39
40
|
forceRecreate: boolean;
|
|
40
41
|
};
|
|
@@ -132,6 +133,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
132
133
|
value: string;
|
|
133
134
|
} | undefined;
|
|
134
135
|
}[];
|
|
136
|
+
customFieldAttributes: string[];
|
|
135
137
|
selectedUnsubscribePages: number[];
|
|
136
138
|
forceRecreate: boolean;
|
|
137
139
|
};
|
|
@@ -229,6 +231,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
229
231
|
value: string;
|
|
230
232
|
} | undefined;
|
|
231
233
|
}[];
|
|
234
|
+
customFieldAttributes: string[];
|
|
232
235
|
selectedUnsubscribePages: number[];
|
|
233
236
|
forceRecreate: boolean;
|
|
234
237
|
};
|
|
@@ -326,6 +329,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
326
329
|
value: string;
|
|
327
330
|
} | undefined;
|
|
328
331
|
}[];
|
|
332
|
+
customFieldAttributes: string[];
|
|
329
333
|
selectedUnsubscribePages: number[];
|
|
330
334
|
forceRecreate: boolean;
|
|
331
335
|
};
|
|
@@ -423,6 +427,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
423
427
|
value: string;
|
|
424
428
|
} | undefined;
|
|
425
429
|
}[];
|
|
430
|
+
customFieldAttributes: string[];
|
|
426
431
|
selectedUnsubscribePages: number[];
|
|
427
432
|
forceRecreate: boolean;
|
|
428
433
|
};
|
|
@@ -520,6 +525,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
520
525
|
value: string;
|
|
521
526
|
} | undefined;
|
|
522
527
|
}[];
|
|
528
|
+
customFieldAttributes: string[];
|
|
523
529
|
selectedUnsubscribePages: number[];
|
|
524
530
|
forceRecreate: boolean;
|
|
525
531
|
};
|
|
@@ -617,6 +623,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
617
623
|
value: string;
|
|
618
624
|
} | undefined;
|
|
619
625
|
}[];
|
|
626
|
+
customFieldAttributes: string[];
|
|
620
627
|
selectedUnsubscribePages: number[];
|
|
621
628
|
forceRecreate: boolean;
|
|
622
629
|
};
|
|
@@ -714,6 +721,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
714
721
|
value: string;
|
|
715
722
|
} | undefined;
|
|
716
723
|
}[];
|
|
724
|
+
customFieldAttributes: string[];
|
|
717
725
|
selectedUnsubscribePages: number[];
|
|
718
726
|
forceRecreate: boolean;
|
|
719
727
|
};
|
|
@@ -811,6 +819,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
811
819
|
value: string;
|
|
812
820
|
} | undefined;
|
|
813
821
|
}[];
|
|
822
|
+
customFieldAttributes: string[];
|
|
814
823
|
selectedUnsubscribePages: number[];
|
|
815
824
|
forceRecreate: boolean;
|
|
816
825
|
};
|
|
@@ -908,6 +917,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
908
917
|
value: string;
|
|
909
918
|
} | undefined;
|
|
910
919
|
}[];
|
|
920
|
+
customFieldAttributes: string[];
|
|
911
921
|
selectedUnsubscribePages: number[];
|
|
912
922
|
forceRecreate: boolean;
|
|
913
923
|
};
|
|
@@ -1005,6 +1015,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1005
1015
|
value: string;
|
|
1006
1016
|
} | undefined;
|
|
1007
1017
|
}[];
|
|
1018
|
+
customFieldAttributes: string[];
|
|
1008
1019
|
selectedUnsubscribePages: number[];
|
|
1009
1020
|
forceRecreate: boolean;
|
|
1010
1021
|
};
|
|
@@ -1102,6 +1113,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1102
1113
|
value: string;
|
|
1103
1114
|
} | undefined;
|
|
1104
1115
|
}[];
|
|
1116
|
+
customFieldAttributes: string[];
|
|
1105
1117
|
selectedUnsubscribePages: number[];
|
|
1106
1118
|
forceRecreate: boolean;
|
|
1107
1119
|
};
|
|
@@ -1199,6 +1211,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1199
1211
|
value: string;
|
|
1200
1212
|
} | undefined;
|
|
1201
1213
|
}[];
|
|
1214
|
+
customFieldAttributes: string[];
|
|
1202
1215
|
selectedUnsubscribePages: number[];
|
|
1203
1216
|
forceRecreate: boolean;
|
|
1204
1217
|
};
|
|
@@ -1296,6 +1309,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1296
1309
|
value: string;
|
|
1297
1310
|
} | undefined;
|
|
1298
1311
|
}[];
|
|
1312
|
+
customFieldAttributes: string[];
|
|
1299
1313
|
selectedUnsubscribePages: number[];
|
|
1300
1314
|
forceRecreate: boolean;
|
|
1301
1315
|
};
|
|
@@ -1393,6 +1407,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1393
1407
|
value: string;
|
|
1394
1408
|
} | undefined;
|
|
1395
1409
|
}[];
|
|
1410
|
+
customFieldAttributes: string[];
|
|
1396
1411
|
selectedUnsubscribePages: number[];
|
|
1397
1412
|
forceRecreate: boolean;
|
|
1398
1413
|
};
|
|
@@ -1490,6 +1505,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1490
1505
|
value: string;
|
|
1491
1506
|
} | undefined;
|
|
1492
1507
|
}[];
|
|
1508
|
+
customFieldAttributes: string[];
|
|
1493
1509
|
selectedUnsubscribePages: number[];
|
|
1494
1510
|
forceRecreate: boolean;
|
|
1495
1511
|
};
|
|
@@ -1587,6 +1603,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1587
1603
|
value: string;
|
|
1588
1604
|
} | undefined;
|
|
1589
1605
|
}[];
|
|
1606
|
+
customFieldAttributes: string[];
|
|
1590
1607
|
selectedUnsubscribePages: number[];
|
|
1591
1608
|
forceRecreate: boolean;
|
|
1592
1609
|
};
|
|
@@ -1684,6 +1701,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1684
1701
|
value: string;
|
|
1685
1702
|
} | undefined;
|
|
1686
1703
|
}[];
|
|
1704
|
+
customFieldAttributes: string[];
|
|
1687
1705
|
selectedUnsubscribePages: number[];
|
|
1688
1706
|
forceRecreate: boolean;
|
|
1689
1707
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.1.1-beta.
|
|
3
|
+
"version": "3.1.1-beta.b085e4a",
|
|
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",
|