@huyooo/ui 0.7.26 → 0.8.0

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 (84) hide show
  1. package/dist/{AuthkitAuthModal-C1Kgu1TA.js → AuthkitAuthModal-CX6-EB-D.js} +563 -628
  2. package/dist/{AuthkitSignInPhone-BG7r63dN.js → AuthkitSignInPhone-D3hR0dGZ.js} +100 -100
  3. package/dist/{Clipboard-8rWlOPTZ.js → Clipboard-CI4IUrMw.js} +13 -14
  4. package/dist/{Contact-Bpl7sIjY.js → Contact-mQa-gB4k.js} +3 -3
  5. package/dist/{CustomTable-BCOwLyRJ.js → CustomTable-D8ubfrWL.js} +2 -2
  6. package/dist/{FeedbackItem-DMpvHrOD.js → FeedbackItem-qaxaQ8gu.js} +4 -4
  7. package/dist/{FeedbackModal-DIhSPUPO.js → FeedbackModal-CUSOWVn5.js} +268 -303
  8. package/dist/{LandingPageSectionTabs-DYNXKElT.js → LandingPageSectionTabs-BOX6nVdh.js} +2 -2
  9. package/dist/MessageHandle-WcCeYl7E.js +1147 -0
  10. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BRficqbp.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BwZM2SQn.js} +38 -37
  11. package/dist/{PaySubscriptions-F5sNex0h.js → PaySubscriptions-DO2W3Y5v.js} +131 -171
  12. package/dist/ReferrerReferees-CXVi2pUl.js +106 -0
  13. package/dist/{Upload.vue_vue_type_script_setup_true_lang-D7ZGc2ZS.js → Upload.vue_vue_type_script_setup_true_lang-CY_Pk57x.js} +2 -2
  14. package/dist/{UserAccountMenu-CkUtqNxY.js → UserAccountMenu-CHkdka0u.js} +8 -8
  15. package/dist/{WidthContainer-DSQui1pX.js → WidthContainer-BBoIS50Z.js} +10 -10
  16. package/dist/apiClients-CChPISR0.js +1805 -0
  17. package/dist/authkit.js +6 -6
  18. package/dist/common.js +2 -2
  19. package/dist/components/Authkit/Auth/AuthkitAuthContainer.vue.d.ts +1 -1
  20. package/dist/components/Authkit/Auth/AuthkitAuthorize.vue.d.ts +1 -1
  21. package/dist/components/LandingPage/LandingPageLogo.vue.d.ts +1 -1
  22. package/dist/components/LandingPage/LandingPageStats.vue.d.ts +1 -1
  23. package/dist/components/Logo.vue.d.ts +1 -1
  24. package/dist/components/MenuItem.vue.d.ts +1 -1
  25. package/dist/components/Message/MessageTabs.vue.d.ts +2 -2
  26. package/dist/components/Upload/Upload.vue.d.ts +2 -2
  27. package/dist/components/User/UserBasicInformation.vue.d.ts +1 -1
  28. package/dist/components/User/UserPanel.vue.d.ts +2 -2
  29. package/dist/composables/Authkit/useAuthkitAuth.d.ts +1 -1
  30. package/dist/composables.js +9 -9
  31. package/dist/feedback.js +3 -3
  32. package/dist/{index-Bb-d5pBq.js → index-4_tj9bS1.js} +1 -1
  33. package/dist/index-96pA3ONI.js +30 -0
  34. package/dist/index.js +191 -189
  35. package/dist/landingPage.js +1 -1
  36. package/dist/main.d.ts +1 -2
  37. package/dist/message.js +3 -3
  38. package/dist/pay.js +1 -1
  39. package/dist/privateCom.js +1 -1
  40. package/dist/referrer.js +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/types/api/auth.generated.d.ts +2747 -0
  43. package/dist/types/api/billing.generated.d.ts +1964 -0
  44. package/dist/types/api/ones.generated.d.ts +5567 -0
  45. package/dist/upload.js +2 -2
  46. package/dist/{useAuthkitAppsAuthPageInfo-CtsTqri7.js → useAuthkitAppsAuthPageInfo-gn2zm_NY.js} +13 -27
  47. package/dist/{useAuthkitCreateAndUpdate-BUyZbiBj.js → useAuthkitCreateAndUpdate-yNpIyVXV.js} +2 -2
  48. package/dist/useAuthkitUsersProfile-D32zPSn2.js +174 -0
  49. package/dist/{useDownloads-Cl_-B4sP.js → useDownloads-MF9rK9J_.js} +2 -2
  50. package/dist/useMessageNotifications-CCfM6W6J.js +78 -0
  51. package/dist/{useSEO-C_4yDk7S.js → useSEO-DivOwPWc.js} +2 -2
  52. package/dist/{useTableHandle-6ekhLVbK.js → useTableHandle-DpemWl6Y.js} +2 -2
  53. package/dist/{useUploadCos-dYc8op7M.js → useUploadCos-BVvRc0BW.js} +159 -181
  54. package/dist/user.js +1 -1
  55. package/dist/utils/apiClients.d.ts +6 -0
  56. package/dist/utils/apiMiddlewares.d.ts +16 -0
  57. package/package.json +8 -3
  58. package/dist/MessageHandle-WA95I84_.js +0 -1207
  59. package/dist/MessageNotifications-DmgFNjH7.js +0 -35
  60. package/dist/ReferrerReferees-DMA8Tj5i.js +0 -113
  61. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  62. package/dist/api/Authkit/Users.d.ts +0 -15
  63. package/dist/api/Authkit/apps.d.ts +0 -2
  64. package/dist/api/Authkit/auth.d.ts +0 -50
  65. package/dist/api/Authkit/oauth.d.ts +0 -12
  66. package/dist/api/Authkit/verify.d.ts +0 -25
  67. package/dist/api/Buckets/Files.d.ts +0 -7
  68. package/dist/api/Buckets.d.ts +0 -2
  69. package/dist/api/Invoices.d.ts +0 -32
  70. package/dist/api/Message/ChangelogNotifications.d.ts +0 -17
  71. package/dist/api/Message/EventNotifications.d.ts +0 -16
  72. package/dist/api/Message/MessageNotifications.d.ts +0 -25
  73. package/dist/api/Message/NoticeNotifications.d.ts +0 -37
  74. package/dist/api/Messages.d.ts +0 -2
  75. package/dist/api/Orders.d.ts +0 -9
  76. package/dist/api/Products.d.ts +0 -20
  77. package/dist/api/Quotas.d.ts +0 -21
  78. package/dist/api/Referrer.d.ts +0 -1
  79. package/dist/api/Subscriptions.d.ts +0 -35
  80. package/dist/api/index.d.ts +0 -8
  81. package/dist/request-B4CMspsP.js +0 -196
  82. package/dist/useAuthkitUsersProfile-B7wHZwe-.js +0 -257
  83. package/dist/useMessageNotifications-CP7gi893.js +0 -78
  84. package/dist/utils/request.d.ts +0 -26
@@ -1,1207 +0,0 @@
1
- import { ref as p, defineComponent as x, createBlock as _, openBlock as s, unref as i, withCtx as f, createVNode as A, createCommentVNode as $, createElementBlock as k, normalizeClass as K, createElementVNode as L, renderSlot as B, toDisplayString as T, createTextVNode as N, Fragment as P, renderList as Z, createSlots as ne, mergeProps as F, watch as ie, computed as Q, mergeModels as W, useModel as oe, isRef as le } from "vue";
2
- /* empty css */
3
- /* empty css */
4
- /* empty css */
5
- /* empty css */
6
- /* empty css */
7
- import { Spin as ee, Empty as te, Tag as z, Button as re, Breadcrumb as H, BreadcrumbItem as R, Modal as ue } from "@arco-design/web-vue";
8
- import { c as U, g as O } from "./request-B4CMspsP.js";
9
- import { TiptapEditor as de, TiptapTitle as ce } from "@huyooo/vue-tiptap";
10
- import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { useIntersectionObserver as fe } from "@vueuse/core";
12
- import { m as X, a as pe, b as ge, c as ve } from "./MessageNotifications-DmgFNjH7.js";
13
- import { Icon as me } from "@iconify/vue";
14
- import { u as ye } from "./useAuthkitCreateAndUpdate-BUyZbiBj.js";
15
- import { M as _e } from "./Menu-H-LxepvQ.js";
16
- function he(e) {
17
- return U({
18
- url: `${O.onesPrefixUrl}/messageCenter/changelogNotifications/find`,
19
- method: "post",
20
- data: e
21
- });
22
- }
23
- function be(e) {
24
- return U({
25
- url: `${O.onesPrefixUrl}/messageCenter/changelogNotifications/findOne`,
26
- method: "post",
27
- data: e
28
- });
29
- }
30
- function ae(e, l = {}) {
31
- const {
32
- pageSize: a = 10,
33
- where: d = {}
34
- } = l, r = p(!0), t = p(""), o = p(!1), n = p(!1), u = p([]), c = p({
35
- current: 1,
36
- pageSize: a,
37
- total: 0
38
- });
39
- async function S() {
40
- if (!o.value) {
41
- o.value = !0;
42
- try {
43
- const {
44
- data: M
45
- } = await e({
46
- current: c.value.current,
47
- pageSize: c.value.pageSize,
48
- where: d
49
- });
50
- u.value = M.items, c.value.total = M.count, n.value = M.items.length < c.value.pageSize;
51
- } finally {
52
- o.value = !1;
53
- }
54
- }
55
- }
56
- async function C() {
57
- if (!(o.value || n.value)) {
58
- c.value.current += 1, o.value = !0;
59
- try {
60
- const {
61
- data: M
62
- } = await e({
63
- current: c.value.current,
64
- pageSize: c.value.pageSize,
65
- where: d
66
- });
67
- u.value = [...u.value, ...M.items], c.value.total = M.count, n.value = M.items.length < c.value.pageSize;
68
- } finally {
69
- o.value = !1;
70
- }
71
- }
72
- }
73
- async function y() {
74
- c.value.current = 1, n.value = !1, await S();
75
- }
76
- function h() {
77
- r.value = !0, t.value = "";
78
- }
79
- function D(M) {
80
- t.value = M.id, r.value = !1, V(M.id);
81
- }
82
- function V(M) {
83
- const b = u.value.find((v) => v.id === M);
84
- b && b.read !== void 0 && (b.read = !0);
85
- }
86
- function E(M) {
87
- const b = u.value.find((v) => v.id === M);
88
- b && b.read !== void 0 && (b.read = !1);
89
- }
90
- return S(), {
91
- // 状态
92
- isList: r,
93
- detailId: t,
94
- loading: o,
95
- finished: n,
96
- messageList: u,
97
- pagination: c,
98
- // 方法
99
- loadData: S,
100
- loadMore: C,
101
- refresh: y,
102
- toList: h,
103
- openDetail: D,
104
- markAsRead: V,
105
- markAsUnread: E
106
- };
107
- }
108
- const ke = /* @__PURE__ */ x({
109
- __name: "MessageDetails",
110
- props: {
111
- content: {
112
- type: Object,
113
- default: null
114
- },
115
- title: {
116
- type: String,
117
- required: !0
118
- },
119
- loading: {
120
- type: Boolean,
121
- default: !1
122
- }
123
- },
124
- emits: ["itemClick", "tableOfContentsUpdate", "update:title", "update:content"],
125
- setup(e, {
126
- emit: l
127
- }) {
128
- const a = p([]), d = e, r = p(!1), t = l, o = p();
129
- function n(u) {
130
- a.value = u, t("tableOfContentsUpdate", u);
131
- }
132
- return (u, c) => (s(), _(i(ee), {
133
- loading: d.loading,
134
- tip: "文档加载中...",
135
- class: "Spin",
136
- dot: ""
137
- }, {
138
- default: f(() => [A(i(de), {
139
- ref_key: "TiptapEditorRef",
140
- ref: o,
141
- "model-value": d.content,
142
- editable: r.value,
143
- "tiptap-editor-content-class": "tiptapEditorContentClass",
144
- onTableOfContentsUpdate: n
145
- }, {
146
- title: f(() => [A(i(ce), {
147
- "model-value": d.title,
148
- editable: r.value
149
- }, null, 8, ["model-value", "editable"])]),
150
- _: 1
151
- }, 8, ["model-value", "editable"]), $("", !0)]),
152
- _: 1
153
- }, 8, ["loading"]));
154
- }
155
- }), j = /* @__PURE__ */ I(ke, [["__scopeId", "data-v-8eec0226"]]), Ce = /* @__PURE__ */ x({
156
- __name: "MessageChangelogNotificationsDetails",
157
- props: {
158
- id: {
159
- type: String,
160
- required: !0
161
- }
162
- },
163
- setup(e) {
164
- const l = p(!1), a = p(null), d = p(""), r = e;
165
- async function t() {
166
- l.value = !0;
167
- const {
168
- data: o
169
- } = await be({
170
- id: r.id
171
- });
172
- l.value = !1, o && (a.value = o.content, d.value = o.title);
173
- }
174
- return t(), (o, n) => (s(), _(j, {
175
- content: a.value,
176
- title: d.value,
177
- loading: l.value
178
- }, null, 8, ["content", "title", "loading"]));
179
- }
180
- }), $e = {
181
- key: 0,
182
- class: "loading"
183
- }, Ae = {
184
- key: 1,
185
- class: "none"
186
- }, we = /* @__PURE__ */ x({
187
- __name: "InfiniteLoading",
188
- props: {
189
- loading: {
190
- type: Boolean,
191
- default: !1
192
- },
193
- finished: {
194
- type: Boolean,
195
- default: !1
196
- },
197
- loadingText: {
198
- type: String,
199
- default: "数据加载中..."
200
- },
201
- finishedText: {
202
- type: String,
203
- default: "亲,没有更多了!"
204
- },
205
- showFinishedText: {
206
- type: Boolean,
207
- default: !0
208
- },
209
- threshold: {
210
- type: Number,
211
- default: 0
212
- }
213
- },
214
- emits: ["infinite"],
215
- setup(e, {
216
- emit: l
217
- }) {
218
- const a = e, d = l, r = p(null);
219
- return fe(r, ([{
220
- isIntersecting: t
221
- }]) => {
222
- t && // 当loading和finished的值都为false时,就通知父组件调用方法继续向后台请求数据
223
- !a.loading && !a.finished && d("infinite");
224
- }, {
225
- threshold: a.threshold
226
- }), (t, o) => (s(), k("div", {
227
- ref_key: "container",
228
- ref: r,
229
- class: "infinite-loading"
230
- }, [e.loading ? (s(), k("div", $e, [A(i(ee), {
231
- tip: e.loadingText
232
- }, null, 8, ["tip"])])) : $("", !0), e.finished && e.showFinishedText ? (s(), k("div", Ae, [A(i(te), {
233
- description: e.finishedText
234
- }, null, 8, ["description"])])) : $("", !0)], 512));
235
- }
236
- }), Ne = /* @__PURE__ */ I(we, [["__scopeId", "data-v-b513f798"]]), Se = {
237
- class: "message-item__content"
238
- }, Me = {
239
- class: "message-item__header"
240
- }, xe = {
241
- class: "message-item__title"
242
- }, Le = {
243
- class: "message-item__tags"
244
- }, Te = {
245
- class: "message-item__description"
246
- }, Ie = {
247
- class: "message-item__footer"
248
- }, ze = {
249
- class: "message-item__time"
250
- }, Be = {
251
- class: "message-item__actions"
252
- }, De = /* @__PURE__ */ x({
253
- __name: "MessageItem",
254
- props: {
255
- item: {},
256
- showReadStatus: {
257
- type: Boolean
258
- },
259
- showViewButton: {
260
- type: Boolean
261
- }
262
- },
263
- emits: ["click"],
264
- setup(e) {
265
- return (l, a) => (s(), k("div", {
266
- class: K(["message-item", {
267
- "message-item--unread": e.showReadStatus && !e.item.read
268
- }]),
269
- onClick: a[0] || (a[0] = (d) => l.$emit("click", e.item))
270
- }, [L("div", Se, [L("div", Me, [e.showReadStatus ? (s(), k("span", {
271
- key: 0,
272
- class: K(["message-item__dot", {
273
- "message-item__dot--unread": !e.item.read
274
- }])
275
- }, null, 2)) : $("", !0), B(l.$slots, "prefix", {
276
- item: e.item
277
- }, void 0, !0), L("span", xe, T(e.item.title), 1), L("div", Le, [e.item.pinned ? (s(), _(i(z), {
278
- key: 0,
279
- color: "arcoblue",
280
- size: "small"
281
- }, {
282
- default: f(() => [...a[1] || (a[1] = [N("置顶", -1)])]),
283
- _: 1
284
- })) : $("", !0), B(l.$slots, "tags", {
285
- item: e.item
286
- }, () => [e.item.priority === "urgent" ? (s(), _(i(z), {
287
- key: 0,
288
- color: "red",
289
- size: "small"
290
- }, {
291
- default: f(() => [...a[2] || (a[2] = [N("紧急", -1)])]),
292
- _: 1
293
- })) : e.item.priority === "important" ? (s(), _(i(z), {
294
- key: 1,
295
- color: "orange",
296
- size: "small"
297
- }, {
298
- default: f(() => [...a[3] || (a[3] = [N("重要", -1)])]),
299
- _: 1
300
- })) : e.item.priority === "high" ? (s(), _(i(z), {
301
- key: 2,
302
- color: "orange",
303
- size: "small"
304
- }, {
305
- default: f(() => [...a[4] || (a[4] = [N("高", -1)])]),
306
- _: 1
307
- })) : $("", !0)], !0)])]), L("div", Te, [B(l.$slots, "description", {
308
- item: e.item
309
- }, () => [N(T(e.item.description), 1)], !0)]), L("div", Ie, [L("span", ze, T(e.item.createAt), 1), B(l.$slots, "footer", {
310
- item: e.item
311
- }, void 0, !0)])]), L("div", Be, [B(l.$slots, "actions", {
312
- item: e.item
313
- }, () => [e.showViewButton ? (s(), _(i(re), {
314
- key: 0,
315
- type: "text",
316
- size: "small"
317
- }, {
318
- default: f(() => [...a[5] || (a[5] = [N("查看", -1)])]),
319
- _: 1
320
- })) : $("", !0)], !0)])], 2));
321
- }
322
- }), Re = /* @__PURE__ */ I(De, [["__scopeId", "data-v-1cf5087b"]]), Ue = {
323
- class: "message-list"
324
- }, Oe = {
325
- key: 0,
326
- class: "message-list__empty"
327
- }, Ve = /* @__PURE__ */ x({
328
- __name: "MessageList",
329
- props: {
330
- messageList: {},
331
- loading: {
332
- type: Boolean
333
- },
334
- finished: {
335
- type: Boolean
336
- },
337
- showReadStatus: {
338
- type: Boolean
339
- },
340
- showViewButton: {
341
- type: Boolean
342
- }
343
- },
344
- emits: ["itemClick", "loadMore"],
345
- setup(e, {
346
- emit: l
347
- }) {
348
- const a = e, d = l;
349
- function r(t) {
350
- d("itemClick", t);
351
- }
352
- return (t, o) => (s(), k("div", Ue, [a.messageList.length === 0 && !a.loading ? (s(), k("div", Oe, [A(i(te), {
353
- description: "暂无消息"
354
- })])) : (s(), k(P, {
355
- key: 1
356
- }, [(s(!0), k(P, null, Z(a.messageList, (n) => (s(), _(Re, {
357
- key: n.id,
358
- item: n,
359
- "show-read-status": a.showReadStatus,
360
- "show-view-button": a.showViewButton,
361
- onClick: (u) => r(n)
362
- }, ne({
363
- _: 2
364
- }, [t.$slots.prefix ? {
365
- name: "prefix",
366
- fn: f((u) => [B(t.$slots, "prefix", F({
367
- ref_for: !0
368
- }, u), void 0, !0)]),
369
- key: "0"
370
- } : void 0, t.$slots.tags ? {
371
- name: "tags",
372
- fn: f((u) => [B(t.$slots, "tags", F({
373
- ref_for: !0
374
- }, u), void 0, !0)]),
375
- key: "1"
376
- } : void 0, t.$slots.description ? {
377
- name: "description",
378
- fn: f((u) => [B(t.$slots, "description", F({
379
- ref_for: !0
380
- }, u), void 0, !0)]),
381
- key: "2"
382
- } : void 0, t.$slots.footer ? {
383
- name: "footer",
384
- fn: f((u) => [B(t.$slots, "footer", F({
385
- ref_for: !0
386
- }, u), void 0, !0)]),
387
- key: "3"
388
- } : void 0, t.$slots.actions ? {
389
- name: "actions",
390
- fn: f((u) => [B(t.$slots, "actions", F({
391
- ref_for: !0
392
- }, u), void 0, !0)]),
393
- key: "4"
394
- } : void 0]), 1032, ["item", "show-read-status", "show-view-button", "onClick"]))), 128)), A(Ne, {
395
- loading: a.loading,
396
- finished: a.finished,
397
- onInfinite: o[0] || (o[0] = (n) => t.$emit("loadMore"))
398
- }, null, 8, ["loading", "finished"])], 64))]));
399
- }
400
- }), G = /* @__PURE__ */ I(Ve, [["__scopeId", "data-v-991c4730"]]), Ee = {
401
- class: "message-panel"
402
- }, qe = {
403
- class: "version-prefix"
404
- }, Fe = {
405
- key: 0,
406
- class: "publish-time"
407
- }, Ke = {
408
- key: 2,
409
- class: "message-panel__detail"
410
- }, Pe = /* @__PURE__ */ x({
411
- __name: "MessageChangelogNotifications",
412
- setup(e) {
413
- const {
414
- isList: l,
415
- detailId: a,
416
- loading: d,
417
- finished: r,
418
- messageList: t,
419
- loadMore: o,
420
- toList: n,
421
- openDetail: u
422
- } = ae(he);
423
- function c(C) {
424
- return {
425
- feature: "green",
426
- improvement: "blue",
427
- fix: "orange",
428
- security: "red",
429
- breaking: "magenta"
430
- }[C] || "blue";
431
- }
432
- function S(C) {
433
- return {
434
- feature: "新功能",
435
- improvement: "优化",
436
- fix: "修复",
437
- security: "安全",
438
- breaking: "重大变更"
439
- }[C] || "更新";
440
- }
441
- return (C, y) => (s(), k("div", Ee, [i(l) ? $("", !0) : (s(), _(i(H), {
442
- key: 0,
443
- class: "message-panel__breadcrumb"
444
- }, {
445
- default: f(() => [A(i(R), {
446
- onClick: i(n)
447
- }, {
448
- default: f(() => [...y[0] || (y[0] = [N("更新日志", -1)])]),
449
- _: 1
450
- }, 8, ["onClick"]), A(i(R), null, {
451
- default: f(() => [...y[1] || (y[1] = [N("详情", -1)])]),
452
- _: 1
453
- })]),
454
- _: 1
455
- })), i(l) ? (s(), _(G, {
456
- key: 1,
457
- "message-list": i(t),
458
- loading: i(d),
459
- finished: i(r),
460
- onItemClick: i(u),
461
- onLoadMore: i(o)
462
- }, {
463
- prefix: f(({
464
- item: h
465
- }) => [L("span", qe, T(h.version), 1)]),
466
- tags: f(({
467
- item: h
468
- }) => [A(i(z), {
469
- color: c(h.changeType),
470
- size: "small"
471
- }, {
472
- default: f(() => [N(T(S(h.changeType)), 1)]),
473
- _: 2
474
- }, 1032, ["color"])]),
475
- footer: f(({
476
- item: h
477
- }) => [h.publishedAt ? (s(), k("span", Fe, " 发布于 " + T(h.publishedAt), 1)) : $("", !0)]),
478
- _: 1
479
- }, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (s(), k("div", Ke, [A(Ce, {
480
- id: i(a)
481
- }, null, 8, ["id"])]))]));
482
- }
483
- }), He = /* @__PURE__ */ I(Pe, [["__scopeId", "data-v-b50402cc"]]);
484
- function je(e) {
485
- return U({
486
- url: `${O.onesPrefixUrl}/messageCenter/eventNotifications/find`,
487
- method: "post",
488
- data: e
489
- });
490
- }
491
- function Ge(e) {
492
- return U({
493
- url: `${O.onesPrefixUrl}/messageCenter/eventNotifications/findOne`,
494
- method: "post",
495
- data: e
496
- });
497
- }
498
- const Je = /* @__PURE__ */ x({
499
- __name: "MessageEventNotificationsDetails",
500
- props: {
501
- id: {
502
- type: String,
503
- required: !0
504
- }
505
- },
506
- setup(e) {
507
- const l = p(!1), a = p(null), d = p(""), r = e;
508
- async function t() {
509
- l.value = !0;
510
- const {
511
- data: o
512
- } = await Ge({
513
- id: r.id
514
- });
515
- l.value = !1, o && (a.value = o.content, d.value = o.title);
516
- }
517
- return t(), (o, n) => (s(), _(j, {
518
- content: a.value,
519
- title: d.value,
520
- loading: l.value
521
- }, null, 8, ["content", "title", "loading"]));
522
- }
523
- }), Qe = {
524
- class: "message-panel"
525
- }, We = {
526
- key: 0,
527
- class: "time-range"
528
- }, Xe = {
529
- key: 2,
530
- class: "message-panel__detail"
531
- }, Ye = /* @__PURE__ */ x({
532
- __name: "MessageEventNotifications",
533
- setup(e) {
534
- const {
535
- isList: l,
536
- detailId: a,
537
- loading: d,
538
- finished: r,
539
- messageList: t,
540
- loadMore: o,
541
- toList: n,
542
- openDetail: u
543
- } = ae((C) => je({
544
- ...C,
545
- where: {
546
- status: "published"
547
- }
548
- }));
549
- function c(C) {
550
- return {
551
- upcoming: "blue",
552
- ongoing: "green",
553
- ended: "gray",
554
- published: "arcoblue"
555
- }[C] || "gray";
556
- }
557
- function S(C) {
558
- return {
559
- upcoming: "即将开始",
560
- ongoing: "进行中",
561
- ended: "已结束",
562
- published: "已发布"
563
- }[C] || "未知";
564
- }
565
- return (C, y) => (s(), k("div", Qe, [i(l) ? $("", !0) : (s(), _(i(H), {
566
- key: 0,
567
- class: "message-panel__breadcrumb"
568
- }, {
569
- default: f(() => [A(i(R), {
570
- onClick: i(n)
571
- }, {
572
- default: f(() => [...y[0] || (y[0] = [N("活动通知", -1)])]),
573
- _: 1
574
- }, 8, ["onClick"]), A(i(R), null, {
575
- default: f(() => [...y[1] || (y[1] = [N("详情", -1)])]),
576
- _: 1
577
- })]),
578
- _: 1
579
- })), i(l) ? (s(), _(G, {
580
- key: 1,
581
- "message-list": i(t),
582
- loading: i(d),
583
- finished: i(r),
584
- onItemClick: i(u),
585
- onLoadMore: i(o)
586
- }, {
587
- tags: f(({
588
- item: h
589
- }) => [A(i(z), {
590
- color: c(h.displayStatus),
591
- size: "small"
592
- }, {
593
- default: f(() => [N(T(S(h.displayStatus)), 1)]),
594
- _: 2
595
- }, 1032, ["color"])]),
596
- footer: f(({
597
- item: h
598
- }) => [h.startAt || h.endAt ? (s(), k("span", We, T(h.startAt || "无") + " ~ " + T(h.endAt || "无"), 1)) : $("", !0)]),
599
- _: 1
600
- }, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (s(), k("div", Xe, [A(Je, {
601
- id: i(a)
602
- }, null, 8, ["id"])]))]));
603
- }
604
- }), Ze = /* @__PURE__ */ I(Ye, [["__scopeId", "data-v-ec35e6c3"]]), et = {
605
- style: {
606
- display: "flex",
607
- gap: "16px"
608
- }
609
- }, tt = ["onClick"], at = /* @__PURE__ */ x({
610
- __name: "MessageCustomTabs",
611
- props: {
612
- modelValue: {
613
- type: String,
614
- default: "1"
615
- },
616
- tabs: {
617
- type: Array,
618
- default: () => [{
619
- label: "未读消息",
620
- key: "1"
621
- }, {
622
- label: "已读消息",
623
- key: "2"
624
- }]
625
- }
626
- },
627
- emits: ["update:modelValue", "change"],
628
- setup(e, {
629
- emit: l
630
- }) {
631
- const a = e, d = l;
632
- function r(t) {
633
- t !== a.modelValue && (d("update:modelValue", t), d("change", t));
634
- }
635
- return (t, o) => (s(), k("div", et, [(s(!0), k(P, null, Z(e.tabs, (n) => (s(), k("span", {
636
- key: n.key,
637
- class: K(["custom-tab", [{
638
- active: e.modelValue === n.key
639
- }]]),
640
- onClick: (u) => r(n.key)
641
- }, T(n.label), 11, tt))), 128))]));
642
- }
643
- }), st = /* @__PURE__ */ I(at, [["__scopeId", "data-v-fafcc3ad"]]), nt = {
644
- class: "tabs"
645
- }, it = /* @__PURE__ */ x({
646
- __name: "MessageTabs",
647
- props: {
648
- tabs: {
649
- type: Array,
650
- required: !0
651
- },
652
- messageList: {
653
- type: Array,
654
- required: !0
655
- },
656
- activeTab: {
657
- type: String,
658
- required: !0
659
- }
660
- },
661
- emits: ["update:activeTab", "change", "readAll"],
662
- setup(e, {
663
- emit: l
664
- }) {
665
- const a = e, d = l, r = p(a.activeTab);
666
- ie(() => a.activeTab, (n) => {
667
- r.value = n;
668
- });
669
- function t(n) {
670
- r.value = n, d("update:activeTab", n), d("change", n);
671
- }
672
- function o() {
673
- a.messageList.length !== 0 && d("readAll");
674
- }
675
- return (n, u) => (s(), k("div", nt, [A(st, {
676
- modelValue: r.value,
677
- "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
678
- tabs: e.tabs,
679
- onChange: t
680
- }, null, 8, ["modelValue", "tabs"]), r.value === "unread" ? (s(), k("div", {
681
- key: 0,
682
- class: K(["readAll", {
683
- disabled: e.messageList.length === 0
684
- }]),
685
- onClick: o
686
- }, [A(i(me), {
687
- class: "icon",
688
- icon: "icon-park-outline:clear"
689
- }), u[1] || (u[1] = L("span", null, " 全部已读", -1))], 2)) : $("", !0)]));
690
- }
691
- }), se = /* @__PURE__ */ I(it, [["__scopeId", "data-v-47f7fce5"]]), ot = {
692
- class: "message-panel"
693
- }, lt = {
694
- key: 3,
695
- class: "message-panel__detail"
696
- }, J = "system", rt = /* @__PURE__ */ x({
697
- __name: "MessageNotifications",
698
- setup(e) {
699
- const l = p(!0), a = p(""), d = p(!1), r = p({
700
- title: "",
701
- content: null
702
- }), t = p(!1), o = p(!1), n = p([]), u = p("unread"), c = p({
703
- current: 1,
704
- pageSize: 10,
705
- total: 0
706
- }), S = [{
707
- label: "未读消息",
708
- key: "unread"
709
- }, {
710
- label: "已读消息",
711
- key: "read"
712
- }], C = Q(() => u.value === "read");
713
- async function y() {
714
- t.value = !0;
715
- const {
716
- data: b
717
- } = await X({
718
- current: c.value.current,
719
- pageSize: c.value.pageSize,
720
- where: {
721
- type: J,
722
- read: C.value
723
- }
724
- });
725
- t.value = !1, b && (n.value = b.items.map((v) => ({
726
- id: v.id,
727
- title: v.title,
728
- description: v.description,
729
- createAt: v.createAt,
730
- updateAt: v.updateAt,
731
- type: v.type,
732
- priority: v.priority,
733
- read: v.read ?? !1,
734
- readAt: v.readAt ?? null
735
- })), c.value.total = b.count, o.value = b.items.length < c.value.pageSize);
736
- }
737
- async function h() {
738
- if (t.value || o.value) return;
739
- c.value.current += 1, t.value = !0;
740
- const {
741
- data: b
742
- } = await X({
743
- current: c.value.current,
744
- pageSize: c.value.pageSize,
745
- where: {
746
- type: J,
747
- read: C.value
748
- }
749
- });
750
- if (t.value = !1, b) {
751
- const v = b.items.map((g) => ({
752
- id: g.id,
753
- title: g.title,
754
- description: g.description,
755
- createAt: g.createAt,
756
- updateAt: g.updateAt,
757
- type: g.type,
758
- priority: g.priority,
759
- read: g.read ?? !1,
760
- readAt: g.readAt ?? null
761
- }));
762
- n.value = [...n.value, ...v], o.value = b.items.length < c.value.pageSize;
763
- }
764
- }
765
- function D() {
766
- c.value.current = 1, o.value = !1, y();
767
- }
768
- async function V() {
769
- n.value.length !== 0 && (await pe({
770
- type: J
771
- }), y());
772
- }
773
- function E() {
774
- l.value = !0, a.value = "", r.value = {
775
- title: "",
776
- content: null
777
- };
778
- }
779
- async function M(b) {
780
- d.value = !0;
781
- const {
782
- data: v
783
- } = await ve({
784
- id: b
785
- });
786
- d.value = !1, v && (r.value = {
787
- title: v.title,
788
- content: v.content
789
- });
790
- }
791
- async function q(b) {
792
- a.value = b.id, l.value = !1, b.read || (await ge({
793
- messageId: b.id
794
- }), C.value || (n.value = n.value.filter((v) => v.id !== b.id))), M(b.id);
795
- }
796
- return y(), (b, v) => (s(), k("div", ot, [l.value ? $("", !0) : (s(), _(i(H), {
797
- key: 0,
798
- class: "message-panel__breadcrumb"
799
- }, {
800
- default: f(() => [A(i(R), {
801
- onClick: E
802
- }, {
803
- default: f(() => [...v[1] || (v[1] = [N("消息通知", -1)])]),
804
- _: 1
805
- }), A(i(R), null, {
806
- default: f(() => [...v[2] || (v[2] = [N("详情", -1)])]),
807
- _: 1
808
- })]),
809
- _: 1
810
- })), l.value ? (s(), _(se, {
811
- key: 1,
812
- "active-tab": u.value,
813
- "onUpdate:activeTab": v[0] || (v[0] = (g) => u.value = g),
814
- tabs: S,
815
- "message-list": n.value,
816
- onChange: D,
817
- onReadAll: V
818
- }, null, 8, ["active-tab", "message-list"])) : $("", !0), l.value ? (s(), _(G, {
819
- key: 2,
820
- "message-list": n.value,
821
- loading: t.value,
822
- finished: o.value,
823
- "show-read-status": !0,
824
- "show-view-button": !1,
825
- onItemClick: q,
826
- onLoadMore: h
827
- }, {
828
- tags: f(({
829
- item: g
830
- }) => [g.priority === "urgent" ? (s(), _(i(z), {
831
- key: 0,
832
- color: "red",
833
- size: "small"
834
- }, {
835
- default: f(() => [...v[3] || (v[3] = [N("紧急", -1)])]),
836
- _: 1
837
- })) : g.priority === "high" ? (s(), _(i(z), {
838
- key: 1,
839
- color: "orange",
840
- size: "small"
841
- }, {
842
- default: f(() => [...v[4] || (v[4] = [N("高", -1)])]),
843
- _: 1
844
- })) : $("", !0)]),
845
- _: 1
846
- }, 8, ["message-list", "loading", "finished"])) : (s(), k("div", lt, [A(j, {
847
- title: r.value.title,
848
- content: r.value.content,
849
- loading: d.value
850
- }, null, 8, ["title", "content", "loading"])]))]));
851
- }
852
- }), ut = /* @__PURE__ */ I(rt, [["__scopeId", "data-v-b474436c"]]);
853
- function dt(e) {
854
- return U({
855
- url: `${O.onesPrefixUrl}/messageCenter/noticeNotifications/findOne`,
856
- method: "post",
857
- data: e
858
- });
859
- }
860
- function Y(e) {
861
- return U({
862
- url: `${O.onesPrefixUrl}/messageCenter/noticeNotifications/own`,
863
- method: "post",
864
- data: e
865
- });
866
- }
867
- function ct(e) {
868
- return U({
869
- url: `${O.onesPrefixUrl}/messageCenter/noticeNotifications/read`,
870
- method: "post",
871
- data: e
872
- });
873
- }
874
- function ft() {
875
- return U({
876
- url: `${O.onesPrefixUrl}/messageCenter/noticeNotifications/readAll`,
877
- method: "post",
878
- data: {}
879
- });
880
- }
881
- const pt = {
882
- class: "message-panel"
883
- }, gt = {
884
- key: 0,
885
- class: "expire-time"
886
- }, vt = {
887
- key: 3,
888
- class: "message-panel__detail"
889
- }, mt = /* @__PURE__ */ x({
890
- __name: "MessageNoticeNotifications",
891
- setup(e) {
892
- const l = p(!0), a = p(""), d = p(!1), r = p({
893
- title: "",
894
- content: null
895
- }), t = p(!1), o = p(!1), n = p([]), u = p("unread"), c = p({
896
- current: 1,
897
- pageSize: 10,
898
- total: 0
899
- }), S = [{
900
- label: "未读公告",
901
- key: "unread"
902
- }, {
903
- label: "已读公告",
904
- key: "read"
905
- }], C = Q(() => u.value === "read");
906
- async function y() {
907
- t.value = !0;
908
- const {
909
- data: g
910
- } = await Y({
911
- current: c.value.current,
912
- pageSize: c.value.pageSize,
913
- where: {
914
- read: C.value
915
- }
916
- });
917
- t.value = !1, g && (n.value = g.items.map((m) => ({
918
- id: m.id,
919
- title: m.title,
920
- description: m.description,
921
- createAt: m.createAt,
922
- updateAt: m.updateAt,
923
- pinned: m.pinned,
924
- priority: m.priority,
925
- displayStatus: m.displayStatus,
926
- expireAt: m.expireAt,
927
- requireConfirm: m.requireConfirm,
928
- read: m.read ?? !1,
929
- readAt: m.readAt ?? null
930
- })), c.value.total = g.count, o.value = g.items.length < c.value.pageSize);
931
- }
932
- async function h() {
933
- if (t.value || o.value) return;
934
- c.value.current += 1, t.value = !0;
935
- const {
936
- data: g
937
- } = await Y({
938
- current: c.value.current,
939
- pageSize: c.value.pageSize,
940
- where: {
941
- read: C.value
942
- }
943
- });
944
- if (t.value = !1, g) {
945
- const m = g.items.map((w) => ({
946
- id: w.id,
947
- title: w.title,
948
- description: w.description,
949
- createAt: w.createAt,
950
- updateAt: w.updateAt,
951
- pinned: w.pinned,
952
- priority: w.priority,
953
- displayStatus: w.displayStatus,
954
- expireAt: w.expireAt,
955
- requireConfirm: w.requireConfirm,
956
- read: w.read ?? !1,
957
- readAt: w.readAt ?? null
958
- }));
959
- n.value = [...n.value, ...m], o.value = g.items.length < c.value.pageSize;
960
- }
961
- }
962
- function D() {
963
- c.value.current = 1, o.value = !1, y();
964
- }
965
- async function V() {
966
- n.value.length !== 0 && (await ft(), y());
967
- }
968
- function E() {
969
- l.value = !0, a.value = "", r.value = {
970
- title: "",
971
- content: null
972
- };
973
- }
974
- async function M(g) {
975
- d.value = !0;
976
- const {
977
- data: m
978
- } = await dt({
979
- id: g
980
- });
981
- d.value = !1, m && (r.value = {
982
- title: m.title,
983
- content: m.content
984
- });
985
- }
986
- async function q(g) {
987
- a.value = g.id, l.value = !1, g.read || (await ct({
988
- noticeId: g.id
989
- }), C.value || (n.value = n.value.filter((m) => m.id !== g.id))), M(g.id);
990
- }
991
- function b(g) {
992
- return {
993
- published: "green",
994
- expired: "gray"
995
- }[g] || "gray";
996
- }
997
- function v(g) {
998
- return {
999
- published: "有效",
1000
- expired: "已过期"
1001
- }[g] || "未知";
1002
- }
1003
- return y(), (g, m) => (s(), k("div", pt, [l.value ? $("", !0) : (s(), _(i(H), {
1004
- key: 0,
1005
- class: "message-panel__breadcrumb"
1006
- }, {
1007
- default: f(() => [A(i(R), {
1008
- onClick: E
1009
- }, {
1010
- default: f(() => [...m[1] || (m[1] = [N("公告通知", -1)])]),
1011
- _: 1
1012
- }), A(i(R), null, {
1013
- default: f(() => [...m[2] || (m[2] = [N("详情", -1)])]),
1014
- _: 1
1015
- })]),
1016
- _: 1
1017
- })), l.value ? (s(), _(se, {
1018
- key: 1,
1019
- "active-tab": u.value,
1020
- "onUpdate:activeTab": m[0] || (m[0] = (w) => u.value = w),
1021
- tabs: S,
1022
- "message-list": n.value,
1023
- onChange: D,
1024
- onReadAll: V
1025
- }, null, 8, ["active-tab", "message-list"])) : $("", !0), l.value ? (s(), _(G, {
1026
- key: 2,
1027
- "message-list": n.value,
1028
- loading: t.value,
1029
- finished: o.value,
1030
- "show-read-status": !0,
1031
- "show-view-button": !1,
1032
- onItemClick: q,
1033
- onLoadMore: h
1034
- }, {
1035
- tags: f(({
1036
- item: w
1037
- }) => [w.priority === "urgent" ? (s(), _(i(z), {
1038
- key: 0,
1039
- color: "red",
1040
- size: "small"
1041
- }, {
1042
- default: f(() => [...m[3] || (m[3] = [N("紧急", -1)])]),
1043
- _: 1
1044
- })) : w.priority === "important" ? (s(), _(i(z), {
1045
- key: 1,
1046
- color: "orange",
1047
- size: "small"
1048
- }, {
1049
- default: f(() => [...m[4] || (m[4] = [N("重要", -1)])]),
1050
- _: 1
1051
- })) : $("", !0), A(i(z), {
1052
- color: b(w.displayStatus),
1053
- size: "small"
1054
- }, {
1055
- default: f(() => [N(T(v(w.displayStatus)), 1)]),
1056
- _: 2
1057
- }, 1032, ["color"])]),
1058
- footer: f(({
1059
- item: w
1060
- }) => [w.expireAt ? (s(), k("span", gt, T(w.displayStatus === "expired" ? "已过期" : `过期时间: ${w.expireAt}`), 1)) : $("", !0)]),
1061
- _: 1
1062
- }, 8, ["message-list", "loading", "finished"])) : (s(), k("div", vt, [A(j, {
1063
- title: r.value.title,
1064
- content: r.value.content,
1065
- loading: d.value
1066
- }, null, 8, ["title", "content", "loading"])]))]));
1067
- }
1068
- }), yt = /* @__PURE__ */ I(mt, [["__scopeId", "data-v-83623022"]]), _t = {
1069
- class: "content"
1070
- }, ht = {
1071
- class: "left"
1072
- }, bt = /* @__PURE__ */ x({
1073
- __name: "MessageAppMessage",
1074
- props: /* @__PURE__ */ W({
1075
- menus: {
1076
- type: Array,
1077
- required: !0
1078
- }
1079
- }, {
1080
- selectedKeys: {
1081
- default: ["ChangelogNotifications"]
1082
- },
1083
- selectedKeysModifiers: {}
1084
- }),
1085
- emits: /* @__PURE__ */ W(["cancel", "change"], ["update:selectedKeys"]),
1086
- setup(e, {
1087
- expose: l,
1088
- emit: a
1089
- }) {
1090
- const d = e, r = a, t = oe(e, "selectedKeys"), o = Q(() => t.value.length !== 0 ? t.value[0] : "");
1091
- function n() {
1092
- r("cancel");
1093
- }
1094
- function u(y) {
1095
- const h = y.path;
1096
- t.value = [h], r("change", y);
1097
- }
1098
- const {
1099
- changeType: c,
1100
- show: S
1101
- } = ye(r);
1102
- function C(y) {
1103
- S.value = y, c.value = "编辑";
1104
- }
1105
- return l({
1106
- setData: C
1107
- }), (y, h) => (s(), _(i(ue), {
1108
- visible: i(S),
1109
- "onUpdate:visible": h[1] || (h[1] = (D) => le(S) ? S.value = D : null),
1110
- loading: !1,
1111
- "body-class": "AppMessagebodyClass",
1112
- "mask-closable": !1,
1113
- footer: !1,
1114
- "hide-title": !1,
1115
- width: "880px",
1116
- onCancel: n
1117
- }, {
1118
- default: f(() => [L("div", _t, [L("div", ht, [A(_e, {
1119
- "selected-keys": t.value,
1120
- "onUpdate:selectedKeys": h[0] || (h[0] = (D) => t.value = D),
1121
- menus: d.menus,
1122
- onChange: u
1123
- }, null, 8, ["selected-keys", "menus"])]), i(S) ? (s(), k(P, {
1124
- key: 0
1125
- }, [o.value === "ChangelogNotifications" ? (s(), _(He, {
1126
- key: 0
1127
- })) : $("", !0), o.value === "EventNotifications" ? (s(), _(Ze, {
1128
- key: 1
1129
- })) : $("", !0), o.value === "MessageNotifications" ? (s(), _(ut, {
1130
- key: 2
1131
- })) : $("", !0), o.value === "NoticeNotifications" ? (s(), _(yt, {
1132
- key: 3
1133
- })) : $("", !0)], 64)) : $("", !0)])]),
1134
- _: 1
1135
- }, 8, ["visible"]));
1136
- }
1137
- }), kt = /* @__PURE__ */ I(bt, [["__scopeId", "data-v-24962020"]]), Ct = /* @__PURE__ */ x({
1138
- __name: "MessageHandle",
1139
- setup(e, {
1140
- expose: l
1141
- }) {
1142
- const a = p(["ChangelogNotifications"]), d = p(), r = p(Symbol("key"));
1143
- function t() {
1144
- d.value.setData(!0);
1145
- }
1146
- function o() {
1147
- r.value = Symbol("key");
1148
- }
1149
- function n() {
1150
- r.value = Symbol("key");
1151
- }
1152
- const u = p([{
1153
- name: "功能变更",
1154
- path: "ChangelogNotifications",
1155
- meta: {
1156
- icon: "mingcute:cube-3d-fill"
1157
- }
1158
- }, {
1159
- name: "活动通知",
1160
- path: "EventNotifications",
1161
- meta: {
1162
- icon: "mingcute:receive-money-fill"
1163
- }
1164
- }, {
1165
- name: "消息通知",
1166
- path: "MessageNotifications",
1167
- meta: {
1168
- icon: "mingcute:message-1-fill"
1169
- }
1170
- }, {
1171
- name: "公告",
1172
- path: "NoticeNotifications",
1173
- meta: {
1174
- icon: "mingcute:announcement-fill"
1175
- }
1176
- }]);
1177
- return l({
1178
- openNotification: t
1179
- }), (c, S) => (s(), _(kt, {
1180
- ref_key: "MessageNotificationsRef",
1181
- ref: d,
1182
- key: r.value,
1183
- "selected-keys": a.value,
1184
- "onUpdate:selectedKeys": S[0] || (S[0] = (C) => a.value = C),
1185
- menus: u.value,
1186
- title: "消息中心",
1187
- onConfirm: n,
1188
- onCancel: o
1189
- }, null, 8, ["selected-keys", "menus"]));
1190
- }
1191
- }), Ot = /* @__PURE__ */ I(Ct, [["__scopeId", "data-v-dd5fd3b4"]]);
1192
- export {
1193
- kt as A,
1194
- He as C,
1195
- j as D,
1196
- Ze as E,
1197
- Ne as I,
1198
- Ot as M,
1199
- yt as N,
1200
- Ce as _,
1201
- st as a,
1202
- Je as b,
1203
- G as c,
1204
- ut as d,
1205
- se as e,
1206
- dt as n
1207
- };