monto-email-builder 1.2.6 → 1.3.1
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/chunks/{chunk-Ba6ezsDi.js → chunk-kYwVqyDL.js} +66 -54
- package/dist/documents/blocks/Text/TextEditor.d.ts.map +1 -1
- package/dist/documents/blocks/Text/variableCatalog.d.ts +7 -1
- package/dist/documents/blocks/Text/variableCatalog.d.ts.map +1 -1
- package/dist/html-editor.js +1 -1
- package/dist/index.js +3999 -3737
- 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":"
|
|
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;AAkE7F,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,2CAu+BzF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c = {
|
|
2
2
|
newDocument: "New Blank Document",
|
|
3
3
|
useBuiltInTemplates: "Use Built-in Templates",
|
|
4
4
|
emailBuilder: "Monto Email Builder",
|
|
@@ -96,7 +96,7 @@ const s = {
|
|
|
96
96
|
confirmChangeMessage: "Changing the column layout will delete data in some columns. This action cannot be undone. Are you sure you want to continue?",
|
|
97
97
|
cancel: "Cancel",
|
|
98
98
|
confirm: "Confirm"
|
|
99
|
-
},
|
|
99
|
+
}, b = {
|
|
100
100
|
global: "Global",
|
|
101
101
|
backdropColor: "Backdrop color",
|
|
102
102
|
canvasColor: "Canvas color",
|
|
@@ -105,7 +105,7 @@ const s = {
|
|
|
105
105
|
pageWidth: "Page width",
|
|
106
106
|
fontFamily: "Font family",
|
|
107
107
|
textColor: "Text color"
|
|
108
|
-
},
|
|
108
|
+
}, k = {
|
|
109
109
|
title: "Text block",
|
|
110
110
|
name: "Text",
|
|
111
111
|
content: "Content",
|
|
@@ -164,7 +164,13 @@ const s = {
|
|
|
164
164
|
currentYear: "Current year",
|
|
165
165
|
currentMonthName: "Current month name",
|
|
166
166
|
currentWeekday: "Current weekday",
|
|
167
|
-
unsubscribeLink: "Unsubscribe link"
|
|
167
|
+
unsubscribeLink: "Unsubscribe link",
|
|
168
|
+
groupCustom: "Custom",
|
|
169
|
+
addCustomVariable: "Add",
|
|
170
|
+
customVariableName: "Variable name",
|
|
171
|
+
customVariableNameRequired: "Variable name is required",
|
|
172
|
+
customVariableNameInvalid: "Only letters, numbers, and underscores allowed, starting with a letter or underscore",
|
|
173
|
+
customVariableNameDuplicate: "Variable name already exists"
|
|
168
174
|
}
|
|
169
175
|
}, C = {
|
|
170
176
|
title: "Button block",
|
|
@@ -185,12 +191,12 @@ const s = {
|
|
|
185
191
|
stylePill: "Pill",
|
|
186
192
|
textColor: "Text color",
|
|
187
193
|
buttonColor: "Button color"
|
|
188
|
-
},
|
|
194
|
+
}, y = {
|
|
189
195
|
title: "Heading block",
|
|
190
196
|
name: "Heading",
|
|
191
197
|
content: "Content",
|
|
192
198
|
level: "Level"
|
|
193
|
-
},
|
|
199
|
+
}, f = {
|
|
194
200
|
title: "Avatar block",
|
|
195
201
|
size: "Size",
|
|
196
202
|
shape: "Shape",
|
|
@@ -272,19 +278,19 @@ const s = {
|
|
|
272
278
|
desktopView: "Desktop view",
|
|
273
279
|
mobileView: "Mobile view"
|
|
274
280
|
}
|
|
275
|
-
},
|
|
276
|
-
common:
|
|
281
|
+
}, V = {
|
|
282
|
+
common: c,
|
|
277
283
|
samples: d,
|
|
278
284
|
inspector: u,
|
|
279
285
|
tabs: m,
|
|
280
286
|
image: p,
|
|
281
287
|
video: g,
|
|
282
288
|
columns: h,
|
|
283
|
-
emailLayout:
|
|
284
|
-
text:
|
|
289
|
+
emailLayout: b,
|
|
290
|
+
text: k,
|
|
285
291
|
button: C,
|
|
286
|
-
heading:
|
|
287
|
-
avatar:
|
|
292
|
+
heading: y,
|
|
293
|
+
avatar: f,
|
|
288
294
|
divider: v,
|
|
289
295
|
container: S,
|
|
290
296
|
spacer: w,
|
|
@@ -292,7 +298,7 @@ const s = {
|
|
|
292
298
|
socials: L,
|
|
293
299
|
style: R,
|
|
294
300
|
htmlEditor: U
|
|
295
|
-
},
|
|
301
|
+
}, x = {
|
|
296
302
|
newDocument: "新建空白文档",
|
|
297
303
|
useBuiltInTemplates: "使用内置模板",
|
|
298
304
|
emailBuilder: "Monto 邮件编辑器",
|
|
@@ -315,7 +321,7 @@ const s = {
|
|
|
315
321
|
undoTooltip: "撤销 (Ctrl/Cmd + Z)",
|
|
316
322
|
redo: "重做",
|
|
317
323
|
redoTooltip: "重做 (Ctrl/Cmd + Shift + Z)"
|
|
318
|
-
},
|
|
324
|
+
}, B = {
|
|
319
325
|
welcomeEmail: "营销模板",
|
|
320
326
|
oneTimePasscode: "一次性密码 (OTP)",
|
|
321
327
|
resetPassword: "重置密码",
|
|
@@ -325,17 +331,17 @@ const s = {
|
|
|
325
331
|
postMetrics: "指标报告",
|
|
326
332
|
respondToMessage: "回复询问",
|
|
327
333
|
quickStart: "快速开始"
|
|
328
|
-
},
|
|
334
|
+
}, M = {
|
|
329
335
|
styles: "样式",
|
|
330
336
|
inspect: "检查",
|
|
331
337
|
clickBlockToInspect: "点击一个块进行检查。",
|
|
332
338
|
blockNotFound: "未找到 id 为 {{id}} 的块。点击一个块以重置。"
|
|
333
|
-
},
|
|
339
|
+
}, A = {
|
|
334
340
|
edit: "编辑",
|
|
335
341
|
preview: "预览",
|
|
336
342
|
htmlOutput: "HTML 输出",
|
|
337
343
|
jsonOutput: "JSON 输出"
|
|
338
|
-
},
|
|
344
|
+
}, I = {
|
|
339
345
|
title: "图片块",
|
|
340
346
|
name: "图片",
|
|
341
347
|
sourceUrl: "图片地址",
|
|
@@ -351,7 +357,7 @@ const s = {
|
|
|
351
357
|
uploading: "上传中...",
|
|
352
358
|
uploadHandlerNotConfigured: "请配置 imageUploadHandler 以启用本地上传功能",
|
|
353
359
|
placeholder: "添加图片"
|
|
354
|
-
},
|
|
360
|
+
}, N = {
|
|
355
361
|
title: "视频块",
|
|
356
362
|
name: "视频",
|
|
357
363
|
sourceUrl: "视频地址",
|
|
@@ -372,7 +378,7 @@ const s = {
|
|
|
372
378
|
loop: "循环播放",
|
|
373
379
|
muted: "静音",
|
|
374
380
|
controls: "显示控制条"
|
|
375
|
-
},
|
|
381
|
+
}, P = {
|
|
376
382
|
title: "列块",
|
|
377
383
|
name: "列容器",
|
|
378
384
|
layout: "分栏",
|
|
@@ -390,7 +396,7 @@ const s = {
|
|
|
390
396
|
confirmChangeMessage: "切换分栏布局将删除部分列中的数据,此操作不可撤销。确定要继续吗?",
|
|
391
397
|
cancel: "取消",
|
|
392
398
|
confirm: "确定"
|
|
393
|
-
},
|
|
399
|
+
}, z = {
|
|
394
400
|
global: "全局",
|
|
395
401
|
backdropColor: "背景颜色",
|
|
396
402
|
canvasColor: "画布颜色",
|
|
@@ -399,7 +405,7 @@ const s = {
|
|
|
399
405
|
pageWidth: "页面宽度",
|
|
400
406
|
fontFamily: "字体",
|
|
401
407
|
textColor: "文字颜色"
|
|
402
|
-
},
|
|
408
|
+
}, E = {
|
|
403
409
|
title: "文本块",
|
|
404
410
|
name: "文本",
|
|
405
411
|
content: "内容",
|
|
@@ -458,9 +464,15 @@ const s = {
|
|
|
458
464
|
currentYear: "今年(以收件人收到时为准)",
|
|
459
465
|
currentMonthName: "本月(以收件人收到时为准)",
|
|
460
466
|
currentWeekday: "今天星期几(以收件人收到时为准)",
|
|
461
|
-
unsubscribeLink: "取消订阅链接"
|
|
467
|
+
unsubscribeLink: "取消订阅链接",
|
|
468
|
+
groupCustom: "自定义",
|
|
469
|
+
addCustomVariable: "新增",
|
|
470
|
+
customVariableName: "变量名",
|
|
471
|
+
customVariableNameRequired: "变量名不能为空",
|
|
472
|
+
customVariableNameInvalid: "变量名只能包含英文字母、数字和下划线,且以字母或下划线开头",
|
|
473
|
+
customVariableNameDuplicate: "变量名已存在"
|
|
462
474
|
}
|
|
463
|
-
},
|
|
475
|
+
}, H = {
|
|
464
476
|
title: "按钮块",
|
|
465
477
|
name: "按钮",
|
|
466
478
|
text: "文本",
|
|
@@ -479,7 +491,7 @@ const s = {
|
|
|
479
491
|
stylePill: "胶囊",
|
|
480
492
|
textColor: "文字颜色",
|
|
481
493
|
buttonColor: "按钮颜色"
|
|
482
|
-
},
|
|
494
|
+
}, D = {
|
|
483
495
|
title: "标题块",
|
|
484
496
|
name: "标题",
|
|
485
497
|
content: "内容",
|
|
@@ -505,11 +517,11 @@ const s = {
|
|
|
505
517
|
title: "间距块",
|
|
506
518
|
name: "间距",
|
|
507
519
|
height: "高度"
|
|
508
|
-
},
|
|
520
|
+
}, q = {
|
|
509
521
|
title: "HTML块",
|
|
510
522
|
name: "HTML",
|
|
511
523
|
content: "内容"
|
|
512
|
-
},
|
|
524
|
+
}, J = {
|
|
513
525
|
title: "社媒块",
|
|
514
526
|
name: "社媒",
|
|
515
527
|
selectPlatforms: "社媒选择",
|
|
@@ -567,40 +579,40 @@ const s = {
|
|
|
567
579
|
mobileView: "移动视图"
|
|
568
580
|
}
|
|
569
581
|
}, G = {
|
|
570
|
-
common:
|
|
571
|
-
samples:
|
|
572
|
-
inspector:
|
|
573
|
-
tabs:
|
|
574
|
-
image:
|
|
575
|
-
video:
|
|
576
|
-
columns:
|
|
577
|
-
emailLayout:
|
|
578
|
-
text:
|
|
579
|
-
button:
|
|
580
|
-
heading:
|
|
582
|
+
common: x,
|
|
583
|
+
samples: B,
|
|
584
|
+
inspector: M,
|
|
585
|
+
tabs: A,
|
|
586
|
+
image: I,
|
|
587
|
+
video: N,
|
|
588
|
+
columns: P,
|
|
589
|
+
emailLayout: z,
|
|
590
|
+
text: E,
|
|
591
|
+
button: H,
|
|
592
|
+
heading: D,
|
|
581
593
|
avatar: O,
|
|
582
594
|
divider: $,
|
|
583
595
|
container: W,
|
|
584
596
|
spacer: F,
|
|
585
|
-
html:
|
|
586
|
-
socials:
|
|
597
|
+
html: q,
|
|
598
|
+
socials: J,
|
|
587
599
|
style: j,
|
|
588
600
|
htmlEditor: Z
|
|
589
601
|
}, X = {
|
|
590
602
|
zh: G,
|
|
591
|
-
en:
|
|
603
|
+
en: V
|
|
592
604
|
};
|
|
593
|
-
function Q(t, e,
|
|
594
|
-
const
|
|
595
|
-
let o = X[
|
|
596
|
-
for (const
|
|
597
|
-
if (o && typeof o == "object" &&
|
|
598
|
-
o = o[
|
|
605
|
+
function Q(t, e, n) {
|
|
606
|
+
const i = n ?? Y(), r = t.split(".");
|
|
607
|
+
let o = X[i];
|
|
608
|
+
for (const a of r)
|
|
609
|
+
if (o && typeof o == "object" && a in o)
|
|
610
|
+
o = o[a];
|
|
599
611
|
else
|
|
600
612
|
return t;
|
|
601
|
-
return typeof o != "string" ? t : e ? o.replace(/\{\{(\w+)\}\}/g, (
|
|
602
|
-
var
|
|
603
|
-
return ((
|
|
613
|
+
return typeof o != "string" ? t : e ? o.replace(/\{\{(\w+)\}\}/g, (a, s) => {
|
|
614
|
+
var l;
|
|
615
|
+
return ((l = e[s]) == null ? void 0 : l.toString()) ?? a;
|
|
604
616
|
}) : o;
|
|
605
617
|
}
|
|
606
618
|
function Y() {
|
|
@@ -613,11 +625,11 @@ function K(t) {
|
|
|
613
625
|
typeof window < "u" && localStorage.setItem("app-language", t);
|
|
614
626
|
}
|
|
615
627
|
function _(t) {
|
|
616
|
-
let e = t,
|
|
617
|
-
for (; e && typeof e == "object" && "default" in e &&
|
|
618
|
-
const
|
|
619
|
-
if (!
|
|
620
|
-
e =
|
|
628
|
+
let e = t, n = 0;
|
|
629
|
+
for (; e && typeof e == "object" && "default" in e && n < 5; ) {
|
|
630
|
+
const i = e.default;
|
|
631
|
+
if (!i || i === e) break;
|
|
632
|
+
e = i, n += 1;
|
|
621
633
|
}
|
|
622
634
|
return typeof e == "function" || typeof e == "string" || e && typeof e == "object" && "$$typeof" in e ? e : "span";
|
|
623
635
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Text/TextEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,SAAS,EAAuC,MAAM,wBAAwB,CAAC;AA2W9F,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Text/TextEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,SAAS,EAAuC,MAAM,wBAAwB,CAAC;AA2W9F,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,SAAS,2CA0/BlD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type VariableGroupId = 'contacts' | 'email' | 'organization' | 'date' | 'links';
|
|
1
|
+
export type VariableGroupId = 'custom' | 'contacts' | 'email' | 'organization' | 'date' | 'links';
|
|
2
2
|
export type VariableKind = 'user' | 'builtin';
|
|
3
3
|
export type VariableGroup = {
|
|
4
4
|
id: VariableGroupId;
|
|
@@ -8,6 +8,11 @@ export type VariableGroup = {
|
|
|
8
8
|
kind: VariableKind;
|
|
9
9
|
}[];
|
|
10
10
|
};
|
|
11
|
+
export type CustomVariableDefinition = {
|
|
12
|
+
name: string;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const VARIABLE_NAME_RE: RegExp;
|
|
11
16
|
/** 变量目录(基础内置项)。自定义联系人属性会在 UI 层动态追加。 */
|
|
12
17
|
export declare const BASE_VARIABLE_GROUPS: VariableGroup[];
|
|
13
18
|
export declare function buildAllowedVariableNameSets(args: {
|
|
@@ -16,6 +21,7 @@ export declare function buildAllowedVariableNameSets(args: {
|
|
|
16
21
|
AttrField: string;
|
|
17
22
|
Enable?: number | boolean;
|
|
18
23
|
}[] | null;
|
|
24
|
+
customVariables?: CustomVariableDefinition[] | null;
|
|
19
25
|
}): {
|
|
20
26
|
allowedUser: Set<string>;
|
|
21
27
|
allowedBuiltin: Set<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variableCatalog.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Text/variableCatalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;
|
|
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;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,YAAY,CAAA;KAAE,EAAE,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,eAAO,MAAM,gBAAgB,QAA6B,CAAC;AAE3D,uCAAuC;AACvC,eAAO,MAAM,oBAAoB,EAAE,aAAa,EAiD/C,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,IAAI,EAAE;IACjD,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAC7B,iBAAiB,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,EAAE,GAAG,IAAI,CAAC;IAC9E,eAAe,CAAC,EAAE,wBAAwB,EAAE,GAAG,IAAI,CAAC;CACrD;;;EA4BA"}
|
package/dist/html-editor.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as $e from "@mui/icons-material/Visibility";
|
|
|
12
12
|
import * as Xe from "@mui/icons-material/ViewColumn";
|
|
13
13
|
import * as qe from "@mui/icons-material/MonitorOutlined";
|
|
14
14
|
import * as Ke from "@mui/icons-material/PhoneIphoneOutlined";
|
|
15
|
-
import { r as x, t as Ue } from "./chunks/chunk-
|
|
15
|
+
import { r as x, t as Ue } from "./chunks/chunk-kYwVqyDL.js";
|
|
16
16
|
const Je = x(Ge), Qe = x($e), Ze = x(Xe), et = x(qe), tt = x(Ke), C = {
|
|
17
17
|
// 浅色主题
|
|
18
18
|
xcodeLight: je,
|