monto-email-builder 1.4.2 → 1.4.4
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/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts.map +1 -1
- package/dist/HtmlEditor/index.d.ts.map +1 -1
- package/dist/chunks/{chunk-ZMWDxWGX.js → chunk-CT9uNEVC.js} +60 -54
- package/dist/documents/blocks/Text/variableCatalog.d.ts +2 -0
- package/dist/documents/blocks/Text/variableCatalog.d.ts.map +1 -1
- package/dist/html-editor.js +437 -425
- package/dist/index.js +1601 -1591
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"TextSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;AAyE7F,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACjC,CAAC;AAqHF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,qBAAqB,2CAggCzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/HtmlEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6F,MAAM,OAAO,CAAC;AAmBlH,OAAO,EAaL,OAAO,EA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WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,EAAE,KAAK,IAAI,CAAC;IAClE;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAy+BD,QAAA,MAAM,mBAAmB,uFAevB,CAAC;AAGH,eAAe,mBAAmB,CAAC"}
|
|
@@ -192,12 +192,12 @@ const f = {
|
|
|
192
192
|
stylePill: "Pill",
|
|
193
193
|
textColor: "Text color",
|
|
194
194
|
buttonColor: "Button color"
|
|
195
|
-
},
|
|
195
|
+
}, A = {
|
|
196
196
|
title: "Heading block",
|
|
197
197
|
name: "Heading",
|
|
198
198
|
content: "Content",
|
|
199
199
|
level: "Level"
|
|
200
|
-
},
|
|
200
|
+
}, L = {
|
|
201
201
|
title: "Avatar block",
|
|
202
202
|
size: "Size",
|
|
203
203
|
shape: "Shape",
|
|
@@ -259,7 +259,7 @@ const f = {
|
|
|
259
259
|
both: "Both",
|
|
260
260
|
default: "Default",
|
|
261
261
|
formatGroup: "Style"
|
|
262
|
-
},
|
|
262
|
+
}, V = {
|
|
263
263
|
mode: {
|
|
264
264
|
split: "Split view",
|
|
265
265
|
code: "Code only",
|
|
@@ -293,7 +293,7 @@ const f = {
|
|
|
293
293
|
empty: "No variables yet. Click Save in the code panel to scan, or insert one from the catalog above.",
|
|
294
294
|
systemDefault: "System variables do not need defaults"
|
|
295
295
|
}
|
|
296
|
-
},
|
|
296
|
+
}, P = {
|
|
297
297
|
common: f,
|
|
298
298
|
samples: v,
|
|
299
299
|
inspector: k,
|
|
@@ -304,15 +304,15 @@ const f = {
|
|
|
304
304
|
emailLayout: T,
|
|
305
305
|
text: w,
|
|
306
306
|
button: R,
|
|
307
|
-
heading:
|
|
308
|
-
avatar:
|
|
307
|
+
heading: A,
|
|
308
|
+
avatar: L,
|
|
309
309
|
divider: B,
|
|
310
310
|
container: O,
|
|
311
311
|
spacer: F,
|
|
312
312
|
html: E,
|
|
313
313
|
socials: U,
|
|
314
314
|
style: N,
|
|
315
|
-
htmlEditor:
|
|
315
|
+
htmlEditor: V
|
|
316
316
|
}, W = {
|
|
317
317
|
newDocument: "新建空白文档",
|
|
318
318
|
useBuiltInTemplates: "使用内置模板",
|
|
@@ -336,7 +336,7 @@ const f = {
|
|
|
336
336
|
undoTooltip: "撤销 (Ctrl/Cmd + Z)",
|
|
337
337
|
redo: "重做",
|
|
338
338
|
redoTooltip: "重做 (Ctrl/Cmd + Shift + Z)"
|
|
339
|
-
},
|
|
339
|
+
}, I = {
|
|
340
340
|
welcomeEmail: "营销模板",
|
|
341
341
|
oneTimePasscode: "一次性密码 (OTP)",
|
|
342
342
|
resetPassword: "重置密码",
|
|
@@ -346,7 +346,7 @@ const f = {
|
|
|
346
346
|
postMetrics: "指标报告",
|
|
347
347
|
respondToMessage: "回复询问",
|
|
348
348
|
quickStart: "快速开始"
|
|
349
|
-
},
|
|
349
|
+
}, z = {
|
|
350
350
|
styles: "样式",
|
|
351
351
|
inspect: "检查",
|
|
352
352
|
clickBlockToInspect: "点击一个块进行检查。",
|
|
@@ -609,8 +609,8 @@ const f = {
|
|
|
609
609
|
}
|
|
610
610
|
}, ie = {
|
|
611
611
|
common: W,
|
|
612
|
-
samples:
|
|
613
|
-
inspector:
|
|
612
|
+
samples: I,
|
|
613
|
+
inspector: z,
|
|
614
614
|
tabs: D,
|
|
615
615
|
image: _,
|
|
616
616
|
video: H,
|
|
@@ -629,29 +629,29 @@ const f = {
|
|
|
629
629
|
htmlEditor: oe
|
|
630
630
|
}, ae = {
|
|
631
631
|
zh: ie,
|
|
632
|
-
en:
|
|
632
|
+
en: P
|
|
633
633
|
};
|
|
634
|
-
function
|
|
635
|
-
const l =
|
|
636
|
-
let
|
|
637
|
-
for (const
|
|
638
|
-
if (
|
|
639
|
-
|
|
634
|
+
function ye(o, t, a) {
|
|
635
|
+
const l = a ?? ne(), g = o.split(".");
|
|
636
|
+
let r = ae[l];
|
|
637
|
+
for (const i of g)
|
|
638
|
+
if (r && typeof r == "object" && i in r)
|
|
639
|
+
r = r[i];
|
|
640
640
|
else
|
|
641
|
-
return
|
|
642
|
-
return typeof
|
|
641
|
+
return o;
|
|
642
|
+
return typeof r != "string" ? o : t ? r.replace(/\{\{(\w+)\}\}/g, (i, n) => {
|
|
643
643
|
var c;
|
|
644
|
-
return ((c = t[
|
|
645
|
-
}) :
|
|
644
|
+
return ((c = t[n]) == null ? void 0 : c.toString()) ?? i;
|
|
645
|
+
}) : r;
|
|
646
646
|
}
|
|
647
647
|
function ne() {
|
|
648
648
|
if (typeof window > "u")
|
|
649
649
|
return "en";
|
|
650
|
-
const
|
|
651
|
-
return
|
|
650
|
+
const o = localStorage.getItem("app-language");
|
|
651
|
+
return o && (o === "zh" || o === "en") ? o : navigator.language.toLowerCase().startsWith("zh") ? "zh" : "en";
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
typeof window < "u" && localStorage.setItem("app-language",
|
|
653
|
+
function he(o) {
|
|
654
|
+
typeof window < "u" && localStorage.setItem("app-language", o);
|
|
655
655
|
}
|
|
656
656
|
const re = "#212443", u = "#1E40AF", p = "#1F8466", m = "#E81212", d = "#F6DC9F", le = "#6C0E7C", se = "#CC996C", de = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', ce = 'ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace', e = b({
|
|
657
657
|
palette: {
|
|
@@ -666,7 +666,7 @@ const re = "#212443", u = "#1E40AF", p = "#1F8466", m = "#E81212", d = "#F6DC9F"
|
|
|
666
666
|
typography: {
|
|
667
667
|
fontFamily: de
|
|
668
668
|
}
|
|
669
|
-
}),
|
|
669
|
+
}), be = b(e, {
|
|
670
670
|
palette: {
|
|
671
671
|
brand: {
|
|
672
672
|
navy: re,
|
|
@@ -1166,16 +1166,16 @@ const re = "#212443", u = "#1E40AF", p = "#1F8466", m = "#E81212", d = "#F6DC9F"
|
|
|
1166
1166
|
...Array(20).fill("none")
|
|
1167
1167
|
]
|
|
1168
1168
|
});
|
|
1169
|
-
function
|
|
1170
|
-
let t =
|
|
1171
|
-
for (; t && typeof t == "object" && "default" in t &&
|
|
1169
|
+
function fe(o) {
|
|
1170
|
+
let t = o, a = 0;
|
|
1171
|
+
for (; t && typeof t == "object" && "default" in t && a < 5; ) {
|
|
1172
1172
|
const l = t.default;
|
|
1173
1173
|
if (!l || l === t) break;
|
|
1174
|
-
t = l,
|
|
1174
|
+
t = l, a += 1;
|
|
1175
1175
|
}
|
|
1176
1176
|
return typeof t == "function" || typeof t == "string" || t && typeof t == "object" && "$$typeof" in t ? t : "span";
|
|
1177
1177
|
}
|
|
1178
|
-
const pe = /^[A-Za-z_][A-Za-z0-9_]*$/, ue = [
|
|
1178
|
+
const pe = /^[A-Za-z_][A-Za-z0-9_]*$/, ue = /* @__PURE__ */ new Set(["unsubscribe_link"]), me = [
|
|
1179
1179
|
{
|
|
1180
1180
|
id: "contacts",
|
|
1181
1181
|
items: [
|
|
@@ -1225,32 +1225,38 @@ const pe = /^[A-Za-z_][A-Za-z0-9_]*$/, ue = [
|
|
|
1225
1225
|
items: [{ name: "unsubscribe_link", labelKey: "text.variables.unsubscribeLink", kind: "user" }]
|
|
1226
1226
|
}
|
|
1227
1227
|
];
|
|
1228
|
-
function
|
|
1229
|
-
const t =
|
|
1230
|
-
for (const
|
|
1231
|
-
for (const
|
|
1232
|
-
|
|
1233
|
-
const g = Array.isArray(
|
|
1234
|
-
for (const
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
const c = typeof (
|
|
1238
|
-
c &&
|
|
1228
|
+
function ve(o) {
|
|
1229
|
+
const t = o.baseGroups ?? me, a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
1230
|
+
for (const i of t)
|
|
1231
|
+
for (const n of i.items)
|
|
1232
|
+
n.kind === "user" ? a.add(n.name) : l.add(n.name);
|
|
1233
|
+
const g = Array.isArray(o.contactAttributes) ? o.contactAttributes : [];
|
|
1234
|
+
for (const i of g) {
|
|
1235
|
+
const n = i == null ? void 0 : i.Enable;
|
|
1236
|
+
if (n === 0 || n === !1) continue;
|
|
1237
|
+
const c = typeof (i == null ? void 0 : i.AttrField) == "string" ? i.AttrField.trim() : "";
|
|
1238
|
+
c && a.add(c);
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1241
|
-
for (const
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1240
|
+
const r = Array.isArray(o.customVariables) ? o.customVariables : [];
|
|
1241
|
+
for (const i of r) {
|
|
1242
|
+
const n = typeof (i == null ? void 0 : i.name) == "string" ? i.name.trim() : "";
|
|
1243
|
+
n && pe.test(n) && a.add(n);
|
|
1244
1244
|
}
|
|
1245
|
-
return { allowedUser:
|
|
1245
|
+
return { allowedUser: a, allowedBuiltin: l };
|
|
1246
|
+
}
|
|
1247
|
+
function ke(o, t = "user") {
|
|
1248
|
+
if (t !== "user") return !1;
|
|
1249
|
+
const a = o.trim();
|
|
1250
|
+
return a ? !ue.has(a) : !1;
|
|
1246
1251
|
}
|
|
1247
1252
|
export {
|
|
1248
|
-
|
|
1249
|
-
|
|
1253
|
+
me as B,
|
|
1254
|
+
be as T,
|
|
1250
1255
|
pe as V,
|
|
1251
|
-
|
|
1256
|
+
ke as a,
|
|
1257
|
+
ve as b,
|
|
1252
1258
|
ne as g,
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1259
|
+
fe as r,
|
|
1260
|
+
he as s,
|
|
1261
|
+
ye as t
|
|
1256
1262
|
};
|
|
@@ -13,6 +13,7 @@ export type CustomVariableDefinition = {
|
|
|
13
13
|
label: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const VARIABLE_NAME_RE: RegExp;
|
|
16
|
+
export declare const OPTIONAL_DEFAULT_USER_VARIABLES: Set<string>;
|
|
16
17
|
/** 变量目录(基础内置项)。自定义联系人属性会在 UI 层动态追加。 */
|
|
17
18
|
export declare const BASE_VARIABLE_GROUPS: VariableGroup[];
|
|
18
19
|
export declare function buildAllowedVariableNameSets(args: {
|
|
@@ -26,4 +27,5 @@ export declare function buildAllowedVariableNameSets(args: {
|
|
|
26
27
|
allowedUser: Set<string>;
|
|
27
28
|
allowedBuiltin: Set<string>;
|
|
28
29
|
};
|
|
30
|
+
export declare function requiresVariableDefault(name: string, kind?: VariableKind): boolean;
|
|
29
31
|
//# sourceMappingURL=variableCatalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variableCatalog.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Text/variableCatalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAElG,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,eAAe,CAAC;IACpB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;Q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