china-mobile-international-custom-components 0.0.45 → 0.0.46

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.
Files changed (57) hide show
  1. package/es/ApplicationTypeTag.mjs +1 -1
  2. package/es/AvailableRangePreview.mjs +1 -1
  3. package/es/AvailableRangeSetting.mjs +2 -2
  4. package/es/CommonTagsList.mjs +3 -3
  5. package/es/FileUploader.mjs +1 -1
  6. package/es/PageContainer.mjs +28 -31
  7. package/es/ParameterTable.mjs +1 -1
  8. package/es/SourcePublish.mjs +6 -6
  9. package/es/Table.mjs +2 -2
  10. package/es/assets/PageContainer.css +1 -1
  11. package/es/chunks/{BackBar.9Pp2SYB-.js → BackBar.DY42HcZy.js} +1 -1
  12. package/es/chunks/{BackBar.DwhmSL-a.js → BackBar.eaUb1JvV.js} +98 -98
  13. package/es/chunks/{config.DVEvXGIL.js → config.CvOtShOj.js} +2 -2
  14. package/es/chunks/config.CyAT4SUn.js +435 -0
  15. package/es/chunks/config.JrGX09T5.js +435 -0
  16. package/es/chunks/{i18n.DMVLcyDY.js → i18n.Bd7hh14j.js} +2 -2
  17. package/es/chunks/{i18n.BNeBD4gR.js → i18n.CfMhDOdX.js} +6 -6
  18. package/es/chunks/{index.CZTB65ge.js → index.CHlFhI6c.js} +1 -1
  19. package/es/chunks/index.DjDvyGXt.js +313 -0
  20. package/es/chunks/layout.B1qqvrXz.js +639 -0
  21. package/es/index.mjs +4 -4
  22. package/lib/ApplicationTypeTag.js +1 -1
  23. package/lib/AvailableRangePreview.js +1 -1
  24. package/lib/AvailableRangeSetting.js +1 -1
  25. package/lib/CommonTagsList.js +1 -1
  26. package/lib/FileUploader.js +1 -1
  27. package/lib/PageContainer.js +1 -1
  28. package/lib/ParameterTable.js +1 -1
  29. package/lib/SourcePublish.js +1 -1
  30. package/lib/Table.js +1 -1
  31. package/lib/assets/PageContainer.css +1 -1
  32. package/lib/chunks/{BackBar.DFDSVp2a.js → BackBar.By7ouDgL.js} +1 -1
  33. package/lib/chunks/BackBar.CaaASGvb.js +1 -0
  34. package/lib/chunks/config.BInpXFGZ.js +1 -0
  35. package/lib/chunks/config.CL0cmPQ6.js +1 -0
  36. package/lib/chunks/{config.Dwnp4fRZ.js → config.CqfpM51B.js} +1 -1
  37. package/lib/chunks/{i18n.Bzvn6t8H.js → i18n.D3L1FBDI.js} +2 -2
  38. package/lib/chunks/{index.DO3h_zf2.js → index.D-pFPuUr.js} +1 -1
  39. package/lib/chunks/index.zQ1SfvBa.js +1 -0
  40. package/lib/chunks/layout.Cen7E9tF.js +1 -0
  41. package/lib/index.js +1 -1
  42. package/package.json +2 -2
  43. package/es/assets/index3.css +0 -1
  44. package/es/chunks/i18n.DUrvNBQz.js +0 -4028
  45. package/es/chunks/index.BcLVH95_.js +0 -4058
  46. package/es/chunks/index.CSPp4g5C.js +0 -303
  47. package/es/chunks/index.ClqvUq64.js +0 -302
  48. package/es/chunks/index.Dh5IGfxO.js +0 -290
  49. package/es/chunks/index.Doax01RQ.js +0 -254
  50. package/lib/assets/index3.css +0 -1
  51. package/lib/chunks/BackBar.CYThcqhK.js +0 -1
  52. package/lib/chunks/i18n.D-d0yyXi.js +0 -6
  53. package/lib/chunks/index.6X8xsqRJ.js +0 -1
  54. package/lib/chunks/index.Bk55us0s.js +0 -1
  55. package/lib/chunks/index.CP9rhXZ5.js +0 -1
  56. package/lib/chunks/index.CSLWrMRE.js +0 -1
  57. package/lib/chunks/index.CV29Us4A.js +0 -6
@@ -0,0 +1,313 @@
1
+ import { w as k } from "./index.bCzIhWFw.js";
2
+ import { computed as m, createElementBlock as h, createCommentVNode as M, openBlock as i, Fragment as I, createElementVNode as y, toDisplayString as T, normalizeClass as N, createBlock as D, renderList as B, unref as b, withCtx as R, ref as O, watch as V, onMounted as U, createVNode as z, createTextVNode as F, nextTick as $ } from "vue";
3
+ import { ElPopover as H, ElButton as G } from "element-plus";
4
+ import { g as L } from "./i18n.CfMhDOdX.js";
5
+ import { _ as W } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import '../assets/index2.css';const A = {
7
+ ALL: !0,
8
+ PARTIAL: !1
9
+ }, Y = [
10
+ {
11
+ value: A.ALL,
12
+ get label() {
13
+ return L("COMMON_DICT.ENUMS.ALL_MEMBERS");
14
+ }
15
+ },
16
+ {
17
+ value: A.PARTIAL,
18
+ get label() {
19
+ return L("COMMON_DICT.ENUMS.PARTIAL_MEMBERS");
20
+ }
21
+ }
22
+ ], u = {
23
+ MEMBER: 1,
24
+ DEPARTMENT: 2
25
+ }, oe = {
26
+ label: "memberName",
27
+ children: "children",
28
+ value: "memberId"
29
+ }, w = {
30
+ one: 1,
31
+ two: 2
32
+ }, ie = {
33
+ UNPUBLISHED: 0,
34
+ // 未发布
35
+ UNDER_REVIEW: 1,
36
+ // 审核中
37
+ PUBLISHED: 2,
38
+ // 已发布
39
+ REJECTED: 3,
40
+ // 审核不通过
41
+ FAILED: 4
42
+ // 发布失败
43
+ }, q = {
44
+ key: 0,
45
+ class: "pd-l-16 text-dee0e3 pd-r-16"
46
+ }, J = { class: "fz-14 text-646a73 nowrap" }, X = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, j = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, K = {
47
+ __name: "TagList",
48
+ props: {
49
+ // 显示的标签
50
+ label: {
51
+ type: String,
52
+ required: !0
53
+ },
54
+ // 数据项列表
55
+ items: {
56
+ type: Array,
57
+ default: () => []
58
+ },
59
+ // 默认显示的数量
60
+ defaultShowCount: {
61
+ type: Number,
62
+ default: w.one
63
+ },
64
+ // 是否为只读模式
65
+ readonly: {
66
+ type: Boolean,
67
+ default: !1
68
+ }
69
+ },
70
+ setup(e) {
71
+ const l = e, r = m(() => l.readonly ? l.items : l.items.slice(0, l.defaultShowCount)), d = m(() => l.items.length > l.defaultShowCount), f = m(() => l.items.length - l.defaultShowCount), E = m(() => l.items.slice(l.defaultShowCount));
72
+ return (n, o) => e.items.length > 0 ? (i(), h(I, { key: 0 }, [
73
+ e.readonly ? M("", !0) : (i(), h("span", q, "|")),
74
+ y("span", J, T(e.label), 1),
75
+ y("div", {
76
+ class: N(["tag-list", { "flex items-center gap-4": !e.readonly }])
77
+ }, [
78
+ (i(!0), h(I, null, B(r.value, (s) => (i(), h("div", {
79
+ key: s.memberId,
80
+ class: N(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe nowrap", { "mg-r-4 mg-b-4": e.readonly }])
81
+ }, T(s.memberName), 3))), 128)),
82
+ !e.readonly && d.value ? (i(), D(b(H), {
83
+ key: 0,
84
+ placement: "top",
85
+ trigger: "click",
86
+ width: "300",
87
+ "popper-class": "tag-list-popover-wrapper"
88
+ }, {
89
+ reference: R(() => [
90
+ y("span", X, " +" + T(f.value), 1)
91
+ ]),
92
+ default: R(() => [
93
+ y("div", j, [
94
+ (i(!0), h(I, null, B(E.value, (s) => (i(), h("span", {
95
+ key: s.memberId,
96
+ class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
97
+ }, T(s.memberName), 1))), 128))
98
+ ])
99
+ ]),
100
+ _: 1
101
+ })) : M("", !0)
102
+ ], 2)
103
+ ], 64)) : M("", !0);
104
+ }
105
+ }, S = /* @__PURE__ */ W(K, [["__scopeId", "data-v-32a1fa42"]]), x = (e, l) => e?.filter(l) || [], g = (e, l) => x(e, (r) => r.memberType === l), C = (e, l) => {
106
+ if (e.children)
107
+ for (const r of e.children)
108
+ r.memberType === u.MEMBER ? l(r) : r.memberType === u.DEPARTMENT && C(r, l);
109
+ }, P = (e) => {
110
+ const l = [];
111
+ return C(e, (r) => l.push(r.memberId)), l;
112
+ };
113
+ function Q(e, l, r = !1) {
114
+ const d = m(() => {
115
+ if (!e.value) return [];
116
+ const n = [...e.value], o = g(
117
+ n,
118
+ u.DEPARTMENT
119
+ );
120
+ if (o.length > 0 && l.value && l.value.length > 0) {
121
+ const s = /* @__PURE__ */ new Set();
122
+ o.forEach((a) => {
123
+ const c = (p) => {
124
+ for (const v of p) {
125
+ if (v.memberType === u.DEPARTMENT && v.memberId === a.memberId)
126
+ return C(
127
+ v,
128
+ (_) => s.add(_)
129
+ ), !0;
130
+ if (v.children && c(v.children))
131
+ return !0;
132
+ }
133
+ return !1;
134
+ };
135
+ c(l.value);
136
+ });
137
+ const t = new Set(
138
+ g(n, u.MEMBER).map(
139
+ (a) => a.memberId
140
+ )
141
+ );
142
+ s.forEach((a) => {
143
+ t.has(a.memberId) || n.push(a);
144
+ });
145
+ }
146
+ return n;
147
+ }), f = m(() => {
148
+ if (r)
149
+ return g(
150
+ d.value,
151
+ u.MEMBER
152
+ );
153
+ {
154
+ const n = /* @__PURE__ */ new Set();
155
+ return E.value.forEach((o) => {
156
+ P(o).forEach((t) => n.add(t));
157
+ }), x(
158
+ d.value,
159
+ (o) => o.memberType === u.MEMBER && !n.has(o.memberId)
160
+ );
161
+ }
162
+ }), E = m(() => {
163
+ if (r)
164
+ return g(
165
+ d.value,
166
+ u.DEPARTMENT
167
+ );
168
+ {
169
+ const n = [], o = (t) => {
170
+ if (!t.children || t.children.length === 0) return !1;
171
+ const a = P(t);
172
+ return a.length === 0 ? !1 : a.every(
173
+ (c) => d.value.some(
174
+ (p) => p.memberType === u.MEMBER && p.memberId === c
175
+ )
176
+ );
177
+ }, s = (t, a = !1) => {
178
+ if (t.memberType === u.DEPARTMENT) {
179
+ const c = o(t);
180
+ if (c && !a) {
181
+ if (n.push({
182
+ memberId: t.memberId,
183
+ memberName: t.memberName,
184
+ memberType: u.DEPARTMENT,
185
+ children: t.children
186
+ }), t.children)
187
+ for (const p of t.children)
188
+ s(p, !0);
189
+ } else if (!c && t.children)
190
+ for (const p of t.children)
191
+ s(p, !1);
192
+ }
193
+ };
194
+ for (const t of l.value)
195
+ s(t, !1);
196
+ return n;
197
+ }
198
+ });
199
+ return {
200
+ selectedMembers: f,
201
+ selectedDepartments: E
202
+ };
203
+ }
204
+ const Z = { class: "text-1f2329" }, ee = { class: "fz-14 text-1f2329" }, te = {
205
+ __name: "layout",
206
+ props: {
207
+ // 当前选择的范围类型(是否全部可见)
208
+ allVisible: {
209
+ type: Boolean,
210
+ default: A.ALL
211
+ },
212
+ // 选中的项目列表(完整对象数组,由父组件根据ID从树中查找得到)
213
+ modelValue: {
214
+ type: Array,
215
+ default: () => []
216
+ },
217
+ // 完整的树形数据(用于判断部门成员是否全部选中)
218
+ treeList: {
219
+ type: Array,
220
+ default: () => []
221
+ },
222
+ // 是否为只读模式
223
+ readonly: {
224
+ type: Boolean,
225
+ default: !1
226
+ },
227
+ // 默认显示的数量
228
+ defaultShowCount: {
229
+ type: Number,
230
+ default: w.one
231
+ }
232
+ },
233
+ setup(e, { expose: l }) {
234
+ const r = O(null), d = () => {
235
+ r.value && $(() => {
236
+ r.value.scrollIntoView({
237
+ behavior: "smooth",
238
+ block: "center"
239
+ });
240
+ });
241
+ }, f = e, { selectedMembers: E, selectedDepartments: n } = Q(
242
+ m(() => f.modelValue),
243
+ m(() => f.treeList),
244
+ f.readonly
245
+ ), o = m(() => {
246
+ const t = E.value.length > 0, a = n.value.length > 0;
247
+ return t && !a || !t && a ? w.two : w.one;
248
+ }), s = m(() => [...E.value, ...n.value]);
249
+ return V(
250
+ () => [f.allVisible, f.modelValue],
251
+ () => {
252
+ d();
253
+ },
254
+ { immediate: !1, deep: !0 }
255
+ ), U(() => {
256
+ d();
257
+ }), l({
258
+ allSelectedItems: s
259
+ }), (t, a) => (i(), h("div", {
260
+ ref_key: "previewRef",
261
+ ref: r,
262
+ class: N(["available-range-preview w-full overflow-hidden", {
263
+ "flex items-center": !e.readonly
264
+ }])
265
+ }, [
266
+ e.readonly ? M("", !0) : (i(), h(I, { key: 0 }, [
267
+ y("div", Z, T(t.t("COMMON_DICT.ENUMS.AVAILABLE_RANGE")) + ": ", 1),
268
+ y("span", ee, T(b(Y).find((c) => c.value === e.allVisible)?.label), 1),
269
+ z(b(G), {
270
+ class: "mg-l-16",
271
+ type: "primary",
272
+ link: "",
273
+ onClick: a[0] || (a[0] = (c) => t.$emit("edit"))
274
+ }, {
275
+ default: R(() => [
276
+ F(T(t.t("COMMON_BUTTON.EDIT_TEXT")), 1)
277
+ ]),
278
+ _: 1
279
+ })
280
+ ], 64)),
281
+ e.allVisible === b(A).PARTIAL ? (i(), h("div", {
282
+ key: 1,
283
+ class: N(["flex-1 overflow-hidden", { "flex items-center": !e.readonly }])
284
+ }, [
285
+ b(E)?.length ? (i(), D(S, {
286
+ key: 0,
287
+ label: t.t("COMMON_DICT.ENUMS.MEMBER") + ":",
288
+ items: b(E),
289
+ "default-show-count": o.value,
290
+ readonly: e.readonly
291
+ }, null, 8, ["label", "items", "default-show-count", "readonly"])) : M("", !0),
292
+ b(n)?.length ? (i(), D(S, {
293
+ key: 1,
294
+ label: t.t("COMMON_DICT.ENUMS.DEPARTMENT") + ":",
295
+ items: b(n),
296
+ "default-show-count": o.value,
297
+ readonly: e.readonly
298
+ }, null, 8, ["label", "items", "default-show-count", "readonly"])) : M("", !0)
299
+ ], 2)) : M("", !0)
300
+ ], 2));
301
+ }
302
+ }, ue = k(te), me = k(S);
303
+ export {
304
+ ue as A,
305
+ w as D,
306
+ u as M,
307
+ ie as P,
308
+ A as R,
309
+ me as T,
310
+ oe as a,
311
+ Y as r,
312
+ Q as u
313
+ };