@hkyhy/marsun-components-core 0.1.141 → 0.1.143
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/Tools/Inbox/InboxBell/InboxBell.d.ts +2 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.d.ts +7 -0
- package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.js +60 -45
- package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/index.d.ts +1 -1
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +80 -80
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +134 -142
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -1
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.d.ts +6 -5
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.js +233 -194
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.js.map +1 -1
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +1 -1
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +24 -3
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -1
- package/dist/components/Tools/MessageCenter/index.d.ts +1 -1
- package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.d.ts +11 -5
- package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.js +15 -26
- package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.js.map +1 -1
- package/dist/components/Tools/index.d.ts +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_bellWrap_qtsee_2", e = "_drawer_qtsee_10", s = "_listPane_qtsee_23", o = "_listScroll_qtsee_30", _ = "_listViewport_qtsee_36", i = "_listFooter_qtsee_40", a = "_bellBtn_qtsee_49", c = "_typeTabs_qtsee_68", n = "_filterRow_qtsee_75", r = "_clearUnreadBtn_qtsee_82", l = "_toastPrefs_qtsee_89", m = "_toastPrefsTitle_qtsee_97", q = "_toastPrefsHint_qtsee_104", d = "_error_qtsee_112", T = "_list_qtsee_23", y = "_item_qtsee_127", H = "_itemStatic_qtsee_142", f = "_itemUnread_qtsee_148", B = "_accentAlert_qtsee_158", p = "_accentAction_qtsee_162", A = "_accentRemind_qtsee_166", P = "_itemHeader_qtsee_170", b = "_itemHeaderLeft_qtsee_179", w = "_itemTitle_qtsee_187", S = "_itemTime_qtsee_198", g = "_itemBody_qtsee_207", F = "_itemSummary_qtsee_211", R = "_itemBodyHtml_qtsee_224", U = "_typeTag_qtsee_244", u = "_itemMeta_qtsee_249", C = "_itemFooterTags_qtsee_257", D = "_itemActions_qtsee_265", L = "_toastHost_qtsee_272", M = "_toastNotice_qtsee_280", N = "_toastClose_qtsee_307", V = "_toastHead_qtsee_327", W = "_toastTitle_qtsee_335", x = "_toastBody_qtsee_342", h = "_toastDesc_qtsee_346", j = "_toastActions_qtsee_358", k = {
|
|
2
2
|
bellWrap: t,
|
|
3
|
-
drawer:
|
|
4
|
-
listPane:
|
|
5
|
-
listScroll:
|
|
6
|
-
listViewport:
|
|
7
|
-
listFooter:
|
|
8
|
-
bellBtn:
|
|
9
|
-
typeTabs:
|
|
10
|
-
filterRow:
|
|
11
|
-
clearUnreadBtn:
|
|
12
|
-
toastPrefs:
|
|
13
|
-
toastPrefsTitle:
|
|
14
|
-
toastPrefsHint:
|
|
15
|
-
error:
|
|
16
|
-
list:
|
|
17
|
-
item:
|
|
18
|
-
itemStatic:
|
|
19
|
-
itemUnread:
|
|
20
|
-
accentAlert:
|
|
21
|
-
accentAction:
|
|
22
|
-
accentRemind:
|
|
23
|
-
itemHeader:
|
|
24
|
-
itemHeaderLeft:
|
|
25
|
-
itemTitle:
|
|
26
|
-
itemTime:
|
|
27
|
-
itemBody:
|
|
28
|
-
itemSummary:
|
|
29
|
-
itemBodyHtml:
|
|
30
|
-
typeTag:
|
|
31
|
-
itemMeta:
|
|
32
|
-
itemFooterTags:
|
|
33
|
-
itemActions:
|
|
34
|
-
toastHost:
|
|
35
|
-
toastNotice:
|
|
36
|
-
toastClose:
|
|
37
|
-
toastHead:
|
|
38
|
-
toastTitle:
|
|
39
|
-
toastBody:
|
|
40
|
-
toastDesc:
|
|
41
|
-
toastActions:
|
|
3
|
+
drawer: e,
|
|
4
|
+
listPane: s,
|
|
5
|
+
listScroll: o,
|
|
6
|
+
listViewport: _,
|
|
7
|
+
listFooter: i,
|
|
8
|
+
bellBtn: a,
|
|
9
|
+
typeTabs: c,
|
|
10
|
+
filterRow: n,
|
|
11
|
+
clearUnreadBtn: r,
|
|
12
|
+
toastPrefs: l,
|
|
13
|
+
toastPrefsTitle: m,
|
|
14
|
+
toastPrefsHint: q,
|
|
15
|
+
error: d,
|
|
16
|
+
list: T,
|
|
17
|
+
item: y,
|
|
18
|
+
itemStatic: H,
|
|
19
|
+
itemUnread: f,
|
|
20
|
+
accentAlert: B,
|
|
21
|
+
accentAction: p,
|
|
22
|
+
accentRemind: A,
|
|
23
|
+
itemHeader: P,
|
|
24
|
+
itemHeaderLeft: b,
|
|
25
|
+
itemTitle: w,
|
|
26
|
+
itemTime: S,
|
|
27
|
+
itemBody: g,
|
|
28
|
+
itemSummary: F,
|
|
29
|
+
itemBodyHtml: R,
|
|
30
|
+
typeTag: U,
|
|
31
|
+
itemMeta: u,
|
|
32
|
+
itemFooterTags: C,
|
|
33
|
+
itemActions: D,
|
|
34
|
+
toastHost: L,
|
|
35
|
+
toastNotice: M,
|
|
36
|
+
toastClose: N,
|
|
37
|
+
toastHead: V,
|
|
38
|
+
toastTitle: W,
|
|
39
|
+
toastBody: x,
|
|
40
|
+
toastDesc: h,
|
|
41
|
+
toastActions: j
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
p as accentAction,
|
|
45
|
+
B as accentAlert,
|
|
46
|
+
A as accentRemind,
|
|
47
|
+
a as bellBtn,
|
|
48
48
|
t as bellWrap,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
49
|
+
r as clearUnreadBtn,
|
|
50
|
+
k as default,
|
|
51
|
+
e as drawer,
|
|
52
|
+
d as error,
|
|
53
|
+
n as filterRow,
|
|
54
|
+
y as item,
|
|
55
|
+
D as itemActions,
|
|
56
|
+
g as itemBody,
|
|
57
|
+
R as itemBodyHtml,
|
|
58
|
+
C as itemFooterTags,
|
|
59
|
+
P as itemHeader,
|
|
60
|
+
b as itemHeaderLeft,
|
|
61
|
+
u as itemMeta,
|
|
62
|
+
H as itemStatic,
|
|
63
|
+
F as itemSummary,
|
|
64
|
+
S as itemTime,
|
|
65
|
+
w as itemTitle,
|
|
66
|
+
f as itemUnread,
|
|
67
|
+
T as list,
|
|
68
|
+
i as listFooter,
|
|
69
|
+
s as listPane,
|
|
70
|
+
o as listScroll,
|
|
71
|
+
_ as listViewport,
|
|
72
|
+
j as toastActions,
|
|
73
|
+
x as toastBody,
|
|
74
|
+
N as toastClose,
|
|
75
|
+
h as toastDesc,
|
|
76
|
+
V as toastHead,
|
|
77
|
+
L as toastHost,
|
|
78
|
+
M as toastNotice,
|
|
79
|
+
l as toastPrefs,
|
|
80
|
+
q as toastPrefsHint,
|
|
81
|
+
m as toastPrefsTitle,
|
|
82
|
+
W as toastTitle,
|
|
83
|
+
c as typeTabs,
|
|
84
|
+
U as typeTag
|
|
85
85
|
};
|
|
86
86
|
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -1,114 +1,106 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as Y, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { message as p } from "antd";
|
|
3
|
-
import { useMemo as c, useState as a, useCallback as
|
|
4
|
-
import { generateTemplateCode as
|
|
5
|
-
import { buildTemplateColumns as
|
|
6
|
-
import { TemplateFormModal as
|
|
7
|
-
import { PushRulesPanel as
|
|
8
|
-
import { VariablesPanel as
|
|
9
|
-
import { resolveMessageAdminPermissions as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
function
|
|
3
|
+
import { useMemo as c, useState as a, useCallback as Z, useEffect as Ke } from "react";
|
|
4
|
+
import { generateTemplateCode as Re } from "../utils/templateCode.js";
|
|
5
|
+
import { buildTemplateColumns as ze } from "./List/columns.js";
|
|
6
|
+
import { TemplateFormModal as Fe } from "./Modal/TemplateFormModal.js";
|
|
7
|
+
import { PushRulesPanel as Oe } from "./PushRulesPanel/index.js";
|
|
8
|
+
import { VariablesPanel as $e } from "./VariablesPanel/index.js";
|
|
9
|
+
import { resolveMessageAdminPermissions as je, previewVarsFromVariables as xe, variablesFromCatalog as De } from "./types.js";
|
|
10
|
+
import P from "./style.module.scss.js";
|
|
11
|
+
import V from "../../../Alert/Alert.js";
|
|
12
|
+
import Le from "../../../Layout/PageSpin/index.js";
|
|
13
|
+
import ee from "../../../Empty/Empty.js";
|
|
14
|
+
import Ue from "../../../Table/Table.js";
|
|
15
|
+
import Qe from "../../../StateBar/StateBar.js";
|
|
16
|
+
import _e from "../../../InteractiveBlock/InteractiveBlock.js";
|
|
17
|
+
function qe(s) {
|
|
18
18
|
return s ? Array.isArray(s) ? { events: s, variables: [] } : {
|
|
19
19
|
events: Array.isArray(s.events) ? s.events : [],
|
|
20
|
-
variables:
|
|
20
|
+
variables: De(s)
|
|
21
21
|
} : { events: [], variables: [] };
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const ir = ({
|
|
24
24
|
fetchTemplates: s,
|
|
25
|
-
saveTemplate:
|
|
25
|
+
saveTemplate: A,
|
|
26
26
|
fetchEventCatalog: v,
|
|
27
|
-
setTemplateEnabled:
|
|
27
|
+
setTemplateEnabled: N,
|
|
28
28
|
fetchAudienceRoles: f,
|
|
29
|
-
|
|
29
|
+
fetchAudienceUsersPage: re,
|
|
30
|
+
fetchAudienceUsersByIds: te,
|
|
30
31
|
templateVariables: m,
|
|
31
|
-
previewVars:
|
|
32
|
-
canWrite:
|
|
33
|
-
permissions:
|
|
32
|
+
previewVars: B,
|
|
33
|
+
canWrite: I = !1,
|
|
34
|
+
permissions: M,
|
|
34
35
|
renderAudienceField: ae,
|
|
35
36
|
pushRulesSlot: oe,
|
|
36
|
-
fetchPushRules:
|
|
37
|
-
savePushRule:
|
|
37
|
+
fetchPushRules: K,
|
|
38
|
+
savePushRule: R,
|
|
38
39
|
setPushRuleEnabled: ne,
|
|
39
40
|
deletePushRule: se,
|
|
40
41
|
levelOptions: le,
|
|
41
42
|
defaultLevels: ie,
|
|
42
43
|
levelFieldTips: ce,
|
|
43
|
-
fetchVariables:
|
|
44
|
-
saveVariable:
|
|
44
|
+
fetchVariables: z,
|
|
45
|
+
saveVariable: F,
|
|
45
46
|
deleteVariable: me,
|
|
46
47
|
emptyText: ue = "暂无消息模板",
|
|
47
|
-
className:
|
|
48
|
-
codePrefix:
|
|
48
|
+
className: O,
|
|
49
|
+
codePrefix: $ = "MEQ"
|
|
49
50
|
}) => {
|
|
50
|
-
const
|
|
51
|
-
() =>
|
|
52
|
-
[
|
|
53
|
-
),
|
|
54
|
-
() =>
|
|
55
|
-
[
|
|
56
|
-
), g =
|
|
57
|
-
|
|
51
|
+
const y = c(
|
|
52
|
+
() => je(M, I),
|
|
53
|
+
[M, I]
|
|
54
|
+
), r = y.template, h = y.push, C = y.variable, [E, j] = a([]), [i, x] = a([]), [w, D] = a([]), [L, pe] = a([]), [de, ge] = a(""), [U, Q] = a(!1), [_, q] = a(""), [k, G] = a(""), [H, d] = a(null), [J, W] = a(!1), [u, be] = a("template"), [ve, fe] = a(0), [ye, he] = a(0), S = c(() => w.length ? w : m != null && m.length ? m : [], [w, m]), Ce = c(
|
|
55
|
+
() => B || xe(S),
|
|
56
|
+
[B, S]
|
|
57
|
+
), g = Z(async () => {
|
|
58
|
+
Q(!0), q(""), G("");
|
|
58
59
|
try {
|
|
59
|
-
const [e, o, l
|
|
60
|
+
const [e, o, l] = await Promise.all([
|
|
60
61
|
s(),
|
|
61
|
-
v ? v().then((
|
|
62
|
+
v ? v().then((t) => ({ ok: !0, raw: t })).catch((t) => ({
|
|
62
63
|
ok: !1,
|
|
63
|
-
error:
|
|
64
|
+
error: t instanceof Error ? t.message : String(t)
|
|
64
65
|
})) : Promise.resolve({ ok: !0, raw: { events: [], variables: [] } }),
|
|
65
|
-
f ? f().then((
|
|
66
|
+
f ? f().then((t) => ({ ok: !0, raw: t, error: "" })).catch((t) => ({
|
|
66
67
|
ok: !1,
|
|
67
68
|
raw: [],
|
|
68
|
-
error:
|
|
69
|
-
})) : Promise.resolve({
|
|
70
|
-
ok: !0,
|
|
71
|
-
raw: [],
|
|
72
|
-
error: ""
|
|
73
|
-
}),
|
|
74
|
-
y ? y().then((r) => ({ ok: !0, raw: r, error: "" })).catch((r) => ({
|
|
75
|
-
ok: !1,
|
|
76
|
-
raw: [],
|
|
77
|
-
error: r instanceof Error ? r.message : String(r)
|
|
69
|
+
error: t instanceof Error ? t.message : String(t)
|
|
78
70
|
})) : Promise.resolve({
|
|
79
71
|
ok: !0,
|
|
80
72
|
raw: [],
|
|
81
73
|
error: ""
|
|
82
74
|
})
|
|
83
75
|
]);
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
76
|
+
if (j(Array.isArray(e) ? e : []), o.ok) {
|
|
77
|
+
const t = qe(
|
|
86
78
|
o.raw
|
|
87
79
|
);
|
|
88
|
-
|
|
80
|
+
x(t.events), D(t.variables);
|
|
89
81
|
} else
|
|
90
|
-
|
|
91
|
-
pe(l.raw),
|
|
82
|
+
x([]), D([]), G(o.error);
|
|
83
|
+
pe(l.raw), ge(l.ok ? "" : l.error);
|
|
92
84
|
} catch (e) {
|
|
93
|
-
|
|
85
|
+
q(e instanceof Error ? e.message : String(e)), j([]);
|
|
94
86
|
} finally {
|
|
95
|
-
|
|
87
|
+
Q(!1);
|
|
96
88
|
}
|
|
97
|
-
}, [s, v, f
|
|
98
|
-
|
|
89
|
+
}, [s, v, f]);
|
|
90
|
+
Ke(() => {
|
|
99
91
|
g();
|
|
100
92
|
}, [g]);
|
|
101
|
-
const
|
|
93
|
+
const X = Z(
|
|
102
94
|
(e) => {
|
|
103
95
|
var o;
|
|
104
96
|
return ((o = i.find((l) => l.eventKey === e)) == null ? void 0 : o.label) || e || "—";
|
|
105
97
|
},
|
|
106
98
|
[i]
|
|
107
|
-
),
|
|
108
|
-
if (!
|
|
99
|
+
), Ee = () => {
|
|
100
|
+
if (!r.create) return;
|
|
109
101
|
const e = i[0];
|
|
110
|
-
|
|
111
|
-
code:
|
|
102
|
+
W(!0), d({
|
|
103
|
+
code: Re($),
|
|
112
104
|
eventKey: e == null ? void 0 : e.eventKey,
|
|
113
105
|
scenario: e == null ? void 0 : e.label,
|
|
114
106
|
label: e == null ? void 0 : e.label,
|
|
@@ -119,93 +111,93 @@ const pr = ({
|
|
|
119
111
|
enabled: !1,
|
|
120
112
|
channel: "in_app"
|
|
121
113
|
});
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
if (!
|
|
114
|
+
}, we = (e) => {
|
|
115
|
+
r.update && (W(!1), d({ ...e }));
|
|
116
|
+
}, ke = async (e) => {
|
|
117
|
+
if (!A) {
|
|
126
118
|
p.warning("未配置保存接口");
|
|
127
119
|
return;
|
|
128
120
|
}
|
|
129
|
-
await
|
|
130
|
-
},
|
|
131
|
-
if (!
|
|
121
|
+
await A(e), p.success("已保存"), d(null), await g();
|
|
122
|
+
}, Se = async (e, o) => {
|
|
123
|
+
if (!N) {
|
|
132
124
|
p.warning("未配置启用接口");
|
|
133
125
|
return;
|
|
134
126
|
}
|
|
135
127
|
try {
|
|
136
|
-
await
|
|
128
|
+
await N(e, o), p.success(o ? "已启用" : "已停用"), await g();
|
|
137
129
|
} catch (l) {
|
|
138
130
|
p.error(l instanceof Error ? l.message : String(l));
|
|
139
131
|
}
|
|
140
|
-
},
|
|
141
|
-
() =>
|
|
142
|
-
canUpdate:
|
|
143
|
-
eventLabel:
|
|
144
|
-
onEdit:
|
|
145
|
-
onToggleEnabled: (e, o) => void
|
|
132
|
+
}, Te = c(
|
|
133
|
+
() => ze({
|
|
134
|
+
canUpdate: r.update,
|
|
135
|
+
eventLabel: X,
|
|
136
|
+
onEdit: we,
|
|
137
|
+
onToggleEnabled: (e, o) => void Se(e, o)
|
|
146
138
|
}),
|
|
147
|
-
[
|
|
148
|
-
), T = !!(
|
|
149
|
-
|
|
139
|
+
[r.update, X]
|
|
140
|
+
), T = !!(K && R), b = !!(z && F), Pe = T ? /* @__PURE__ */ n(
|
|
141
|
+
Oe,
|
|
150
142
|
{
|
|
151
143
|
crud: h,
|
|
152
144
|
catalog: i,
|
|
153
|
-
templates:
|
|
154
|
-
roleOptions:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
145
|
+
templates: E,
|
|
146
|
+
roleOptions: L,
|
|
147
|
+
audienceRolesError: de,
|
|
148
|
+
fetchAudienceUsersPage: re,
|
|
149
|
+
fetchAudienceUsersByIds: te,
|
|
158
150
|
levelOptions: le,
|
|
159
151
|
defaultLevels: ie,
|
|
160
152
|
levelFieldTips: ce,
|
|
161
|
-
fetchPushRules:
|
|
162
|
-
savePushRule:
|
|
153
|
+
fetchPushRules: K,
|
|
154
|
+
savePushRule: R,
|
|
163
155
|
setPushRuleEnabled: ne,
|
|
164
156
|
deletePushRule: se,
|
|
165
|
-
createNonce:
|
|
157
|
+
createNonce: ve
|
|
166
158
|
}
|
|
167
159
|
) : oe ?? /* @__PURE__ */ n(
|
|
168
|
-
|
|
160
|
+
_e,
|
|
169
161
|
{
|
|
170
162
|
title: "消息推送",
|
|
171
163
|
info: [{ label: "说明", value: "未接线 fetchPushRules:请业务注入推送规则 API。" }],
|
|
172
164
|
description: "推送规则 CRUD 须由业务 DI 提供。",
|
|
173
165
|
surface: "inset"
|
|
174
166
|
}
|
|
175
|
-
),
|
|
176
|
-
|
|
167
|
+
), Ae = b ? /* @__PURE__ */ n(
|
|
168
|
+
$e,
|
|
177
169
|
{
|
|
178
|
-
crud:
|
|
179
|
-
fetchVariables:
|
|
180
|
-
saveVariable:
|
|
170
|
+
crud: C,
|
|
171
|
+
fetchVariables: z,
|
|
172
|
+
saveVariable: F,
|
|
181
173
|
deleteVariable: me,
|
|
182
|
-
createNonce:
|
|
174
|
+
createNonce: ye
|
|
183
175
|
}
|
|
184
|
-
) : null,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
176
|
+
) : null, Ne = /* @__PURE__ */ Y("div", { className: P.pane, children: [
|
|
177
|
+
_ ? /* @__PURE__ */ n(V, { type: "error", showIcon: !0, message: _, style: { marginBottom: 12 } }) : null,
|
|
178
|
+
k ? /* @__PURE__ */ n(
|
|
179
|
+
V,
|
|
188
180
|
{
|
|
189
181
|
type: "warning",
|
|
190
182
|
showIcon: !0,
|
|
191
|
-
message: `事件目录加载失败:${
|
|
183
|
+
message: `事件目录加载失败:${k}`,
|
|
192
184
|
style: { marginBottom: 12 }
|
|
193
185
|
}
|
|
194
186
|
) : null,
|
|
195
|
-
/* @__PURE__ */ n(
|
|
196
|
-
|
|
187
|
+
/* @__PURE__ */ n(Le, { spinning: U, children: r.read ? E.length === 0 && !U ? /* @__PURE__ */ n(ee, { description: ue }) : /* @__PURE__ */ n(
|
|
188
|
+
Ue,
|
|
197
189
|
{
|
|
198
190
|
rowKey: (e) => e.id || e.code || String(e.eventKey),
|
|
199
191
|
tableName: "msg-center-message-templates",
|
|
200
192
|
columnConfigEnabled: !1,
|
|
201
193
|
columnResizeEnabled: !1,
|
|
202
|
-
columns:
|
|
203
|
-
dataSource:
|
|
194
|
+
columns: Te,
|
|
195
|
+
dataSource: E,
|
|
204
196
|
pagination: !1,
|
|
205
197
|
size: "small"
|
|
206
198
|
}
|
|
207
|
-
) : /* @__PURE__ */ n(
|
|
208
|
-
] }),
|
|
199
|
+
) : /* @__PURE__ */ n(ee, { description: "无消息模板读取权限" }) })
|
|
200
|
+
] }), Be = c(
|
|
209
201
|
() => [
|
|
210
202
|
{
|
|
211
203
|
label: "编号",
|
|
@@ -219,88 +211,88 @@ const pr = ({
|
|
|
219
211
|
label: "变量",
|
|
220
212
|
value: "点「插入变量」从 catalog 选择(中文+code)。标题为明文可手改;正文为原子色块(不可改字、整颗删)。禁止 FE 平行变量表。"
|
|
221
213
|
},
|
|
222
|
-
...!
|
|
223
|
-
...
|
|
214
|
+
...!r.create && !r.update ? [{ label: "权限", value: "当前只读:无新建/编辑权限。" }] : [],
|
|
215
|
+
...r.read ? [] : [{ label: "读取", value: "无消息模板读取权限。" }]
|
|
224
216
|
],
|
|
225
|
-
[
|
|
226
|
-
),
|
|
217
|
+
[r.create, r.update, r.read]
|
|
218
|
+
), Ie = c(() => u === "push" && T ? {
|
|
227
219
|
variant: "button",
|
|
228
220
|
buttonType: "primary",
|
|
229
221
|
label: "新建推送规则",
|
|
230
222
|
disabled: !h.create,
|
|
231
|
-
onClick: () =>
|
|
223
|
+
onClick: () => fe((e) => e + 1)
|
|
232
224
|
} : u === "variables" && b ? {
|
|
233
225
|
variant: "button",
|
|
234
226
|
buttonType: "primary",
|
|
235
227
|
label: "新建变量",
|
|
236
|
-
disabled: !
|
|
237
|
-
onClick: () =>
|
|
228
|
+
disabled: !C.create,
|
|
229
|
+
onClick: () => he((e) => e + 1)
|
|
238
230
|
} : {
|
|
239
231
|
variant: "button",
|
|
240
232
|
buttonType: "primary",
|
|
241
233
|
label: "新建模板",
|
|
242
|
-
disabled: !
|
|
243
|
-
onClick: () =>
|
|
234
|
+
disabled: !r.create || u !== "template",
|
|
235
|
+
onClick: () => Ee()
|
|
244
236
|
}, [
|
|
245
237
|
u,
|
|
246
238
|
T,
|
|
247
239
|
b,
|
|
248
240
|
h.create,
|
|
249
|
-
|
|
250
|
-
|
|
241
|
+
C.create,
|
|
242
|
+
r.create,
|
|
251
243
|
i,
|
|
252
|
-
|
|
253
|
-
]),
|
|
244
|
+
$
|
|
245
|
+
]), Me = [
|
|
254
246
|
{
|
|
255
247
|
key: "template",
|
|
256
248
|
label: "消息模板",
|
|
257
|
-
info:
|
|
258
|
-
children:
|
|
249
|
+
info: Be,
|
|
250
|
+
children: Ne
|
|
259
251
|
},
|
|
260
252
|
{
|
|
261
253
|
key: "push",
|
|
262
254
|
label: "消息推送",
|
|
263
|
-
children:
|
|
255
|
+
children: Pe
|
|
264
256
|
},
|
|
265
257
|
...b ? [
|
|
266
258
|
{
|
|
267
259
|
key: "variables",
|
|
268
260
|
label: "变量",
|
|
269
|
-
children:
|
|
261
|
+
children: Ae
|
|
270
262
|
}
|
|
271
263
|
] : []
|
|
272
264
|
];
|
|
273
|
-
return /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ Y("div", { className: O ? `${P.root} ${O}` : P.root, children: [
|
|
274
266
|
/* @__PURE__ */ n(
|
|
275
|
-
|
|
267
|
+
Qe,
|
|
276
268
|
{
|
|
277
269
|
type: "tab",
|
|
278
270
|
activeKey: u,
|
|
279
|
-
onChange: (e) =>
|
|
280
|
-
actions: [
|
|
281
|
-
stateOption:
|
|
271
|
+
onChange: (e) => be(String(e)),
|
|
272
|
+
actions: [Ie],
|
|
273
|
+
stateOption: Me
|
|
282
274
|
}
|
|
283
275
|
),
|
|
284
276
|
/* @__PURE__ */ n(
|
|
285
|
-
|
|
277
|
+
Fe,
|
|
286
278
|
{
|
|
287
|
-
open: !!
|
|
288
|
-
isCreate:
|
|
289
|
-
initial:
|
|
279
|
+
open: !!H,
|
|
280
|
+
isCreate: J,
|
|
281
|
+
initial: H,
|
|
290
282
|
catalog: i,
|
|
291
|
-
roleOptions:
|
|
292
|
-
variables:
|
|
293
|
-
catalogError:
|
|
294
|
-
previewVars:
|
|
295
|
-
canWrite:
|
|
283
|
+
roleOptions: L,
|
|
284
|
+
variables: S,
|
|
285
|
+
catalogError: k,
|
|
286
|
+
previewVars: Ce,
|
|
287
|
+
canWrite: J ? r.create : r.update,
|
|
296
288
|
onCancel: () => d(null),
|
|
297
|
-
onSubmit:
|
|
289
|
+
onSubmit: ke,
|
|
298
290
|
renderAudienceField: ae
|
|
299
291
|
}
|
|
300
292
|
)
|
|
301
293
|
] });
|
|
302
294
|
};
|
|
303
295
|
export {
|
|
304
|
-
|
|
296
|
+
ir as MessageTemplateAdmin
|
|
305
297
|
};
|
|
306
298
|
//# sourceMappingURL=MessageTemplateAdmin.js.map
|