@huyooo/ui 0.11.2 → 0.11.6

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 (100) hide show
  1. package/dist/AuthkitAppSetting-CjQiWZab.js +1914 -0
  2. package/dist/{Clipboard---tG2Zxz.js → Clipboard-ChMNfcO5.js} +1 -1
  3. package/dist/{Contact-BEUbBGiB.js → Contact-Yqmjh47e.js} +8 -7
  4. package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-BUkwlbzN.js} +3 -2
  5. package/dist/{FeedbackItem-CN041vTm.js → FeedbackItem-DHp_C0pN.js} +3 -3
  6. package/dist/FeedbackModal-Dzl0Alp7.js +1050 -0
  7. package/dist/LandingPageFAQ-CZJXvor9.js +80 -0
  8. package/dist/LandingPageLinkGroup-DDNRivMt.js +521 -0
  9. package/dist/LandingPageSectionHeader-D_74W4My.js +69 -0
  10. package/dist/{LandingPageSectionTabs-B6ZVxR47.js → LandingPageSectionTabs-Ce3_Rc2L.js} +354 -426
  11. package/dist/MessageHandle-BcRjYeVi.js +924 -0
  12. package/dist/MessageList-Bo6YCfRO.js +233 -0
  13. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-F6neJUg3.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BOtgTje-.js} +2 -2
  14. package/dist/PaySubscriptions-BsU0XmXf.js +515 -0
  15. package/dist/PricingPlans-BfVy4xU0.js +210 -0
  16. package/dist/ReferrerReferees-CHSoGrE1.js +106 -0
  17. package/dist/{Upload.vue_vue_type_script_setup_true_lang-D_-oMTOo.js → Upload.vue_vue_type_script_setup_true_lang-CDWyo3RL.js} +1 -1
  18. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-B4tD8pIE.js +508 -0
  19. package/dist/WidthContainer-BzS-A143.js +693 -0
  20. package/dist/{apiClients-9b4zNZ2S.js → apiClients-KFp-rs-C.js} +79 -73
  21. package/dist/authkit.d.ts +7 -0
  22. package/dist/authkit.js +52 -45
  23. package/dist/common/globalConfig.d.ts +4 -2
  24. package/dist/common/userMenuModal.d.ts +1 -0
  25. package/dist/common.js +2 -2
  26. package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +31 -0
  27. package/dist/components/Authkit/AppSetting/AuthkitPhoneBinding.vue.d.ts +14 -0
  28. package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +66 -0
  29. package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +27 -0
  30. package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +11 -1
  31. package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
  32. package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +1 -1
  33. package/dist/components/Authkit/Auth/AuthkitPasswordAuth.vue.d.ts +11 -1
  34. package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +68 -0
  35. package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +68 -0
  36. package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +15 -3
  37. package/dist/components/Authkit/AuthkitOAuthCallbackProvider.vue.d.ts +11 -0
  38. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +45 -0
  39. package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +9 -0
  40. package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +11 -6
  41. package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
  42. package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -1
  43. package/dist/components/Pay/PricingFAQ.vue.d.ts +17 -0
  44. package/dist/components/Pay/PricingPlans.vue.d.ts +12 -0
  45. package/dist/components/UserMenu/UserMenuModals.vue.d.ts +2 -2
  46. package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +8 -0
  47. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +26 -0
  48. package/dist/composables/Authkit/useAuthkitAuth.d.ts +21 -9
  49. package/dist/composables/Authkit/useEnsureAuthenticated.d.ts +26 -0
  50. package/dist/composables/Authkit/useOauth.d.ts +4 -1
  51. package/dist/composables/Billing/useBillingPlans.d.ts +201 -0
  52. package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +280 -0
  53. package/dist/composables/Billing/useSubscriptionCheckout.d.ts +12 -0
  54. package/dist/composables/UserMenu/useUserMenu.d.ts +5 -1
  55. package/dist/composables.d.ts +2 -0
  56. package/dist/composables.js +25 -22
  57. package/dist/feedback.js +3 -3
  58. package/dist/index-D3Kp6R4z.js +4 -0
  59. package/dist/landingPage.js +42 -40
  60. package/dist/main.d.ts +1 -0
  61. package/dist/main.js +677 -631
  62. package/dist/message.js +19 -18
  63. package/dist/pay.d.ts +5 -0
  64. package/dist/pay.js +9 -2
  65. package/dist/privateCom.js +1 -1
  66. package/dist/referrer.js +1 -1
  67. package/dist/style.css +1 -1
  68. package/dist/types/api/auth.generated.d.ts +103 -39
  69. package/dist/types/api/billing.generated.d.ts +61 -28
  70. package/dist/types/api.d.ts +1 -1
  71. package/dist/types/app.d.ts +14 -0
  72. package/dist/upload.js +2 -2
  73. package/dist/{useAuthkitAppsAuthPageInfo-494yLvsu.js → useAuthkitAppsAuthPageInfo-B9_VzVkQ.js} +20 -7
  74. package/dist/{useAuthkitCreateAndUpdate-DyRtFxZS.js → useAuthkitCreateAndUpdate-DomftQMK.js} +1 -1
  75. package/dist/useAuthkitUsersProfile-D4h6OOdR.js +201 -0
  76. package/dist/{useDownloads-DaeIY0E9.js → useDownloads-CzC3gLUV.js} +1 -1
  77. package/dist/useEnsureAuthenticated-C_Ss0e9n.js +2247 -0
  78. package/dist/{useLegalLinks-CPbWqlu6.js → useLegalLinks-OGVbqXVy.js} +2 -2
  79. package/dist/{useMessageNotifications-Dg5q-C_o.js → useMessageNotifications-DeHFJFcX.js} +1 -1
  80. package/dist/{useSEO-CXX9dcBx.js → useSEO--jTDDkXk.js} +2 -2
  81. package/dist/useSubscriptionCheckout-CQ6wHuLI.js +345 -0
  82. package/dist/{useTableHandle-Cjq4gcC0.js → useTableHandle-jw0P7-2a.js} +1 -1
  83. package/dist/{useUploadCos-DiJmmbRf.js → useUploadCos-keDKcs0j.js} +501 -515
  84. package/dist/useUserMenu-ClPBlvaM.js +44 -0
  85. package/dist/user.js +12 -13
  86. package/dist/utils/apiMiddlewares.d.ts +6 -0
  87. package/dist/utils/legacyApi.d.ts +18 -0
  88. package/package.json +1 -1
  89. package/dist/AuthkitAppSetting-BCrLMpLg.js +0 -1322
  90. package/dist/AuthkitSignInPhone-DmCQ2fWs.js +0 -1721
  91. package/dist/FeedbackModal-aI28o-w5.js +0 -1053
  92. package/dist/LandingPageSectionHeader-Cs1x8i3q.js +0 -584
  93. package/dist/MessageHandle-BV1nKlxs.js +0 -1147
  94. package/dist/PaySubscriptions-B3gI1Eme.js +0 -408
  95. package/dist/ReferrerReferees-DJzPo7X5.js +0 -106
  96. package/dist/UserAccountMenu-CJ9KKVYa.js +0 -371
  97. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ClAXNSgl.js +0 -81
  98. package/dist/WidthContainer-BG10rumn.js +0 -669
  99. package/dist/useAuthkitUsersProfile-lGlQP54m.js +0 -186
  100. package/dist/useUserMenu-B3HKZKJ4.js +0 -43
@@ -1,1053 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- /* empty css */
4
- import { defineComponent as V, computed as A, openBlock as o, createElementBlock as h, normalizeStyle as W, normalizeClass as ce, createElementVNode as B, createBlock as g, unref as a, withCtx as n, createVNode as d, createCommentVNode as L, Fragment as q, createTextVNode as C, toDisplayString as U, ref as y, onUnmounted as Re, h as ae, renderList as Q, nextTick as j } from "vue";
5
- import { Space as pe, Image as fe, Avatar as me, Descriptions as $e, DescriptionsItem as H, Tag as E, Spin as Fe, Button as X, Form as Be, FormItem as T, Input as Le, Select as le, Option as ne, Textarea as Ue, Message as Ve, Breadcrumb as ze, BreadcrumbItem as se, Modal as qe } from "@arco-design/web-vue";
6
- import { M as Ne } from "./Menu-Cy2ZPeaz.js";
7
- /* empty css */
8
- /* empty css */
9
- /* empty css */
10
- /* empty css */
11
- import { o as P, g as Pe } from "./apiClients-9b4zNZ2S.js";
12
- /* empty css */
13
- /* empty css */
14
- /* empty css */
15
- import { u as De } from "./useUploadCos-DiJmmbRf.js";
16
- import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- /* empty css */
18
- import { f as O } from "./index-D56hUMeD.js";
19
- import { C as je } from "./CustomTable-CVZ4mFzi.js";
20
- import { Bubble as ve, Prompts as Ee, Sender as Oe } from "ant-design-x-vue";
21
- import { C as ye } from "./Clipboard---tG2Zxz.js";
22
- import { Icon as Ae } from "@iconify/vue";
23
- import { _ as ge, g as be, i as ke } from "./plugin-vue_export-helper-LjDO2Zua.js";
24
- const Me = V({
25
- name: "IconExclamationCircle",
26
- props: {
27
- size: {
28
- type: [Number, String]
29
- },
30
- strokeWidth: {
31
- type: Number,
32
- default: 4
33
- },
34
- strokeLinecap: {
35
- type: String,
36
- default: "butt",
37
- validator: (e) => ["butt", "round", "square"].includes(e)
38
- },
39
- strokeLinejoin: {
40
- type: String,
41
- default: "miter",
42
- validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
43
- },
44
- rotate: Number,
45
- spin: Boolean
46
- },
47
- emits: {
48
- click: (e) => !0
49
- },
50
- setup(e, {
51
- emit: l
52
- }) {
53
- const t = be("icon"), r = A(() => [t, `${t}-exclamation-circle`, {
54
- [`${t}-spin`]: e.spin
55
- }]), i = A(() => {
56
- const s = {};
57
- return e.size && (s.fontSize = ke(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
58
- });
59
- return {
60
- cls: r,
61
- innerStyle: i,
62
- onClick: (s) => {
63
- l("click", s);
64
- }
65
- };
66
- }
67
- }), Te = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
68
- function We(e, l, t, r, i, p) {
69
- return o(), h("svg", {
70
- viewBox: "0 0 48 48",
71
- fill: "none",
72
- xmlns: "http://www.w3.org/2000/svg",
73
- stroke: "currentColor",
74
- class: ce(e.cls),
75
- style: W(e.innerStyle),
76
- "stroke-width": e.strokeWidth,
77
- "stroke-linecap": e.strokeLinecap,
78
- "stroke-linejoin": e.strokeLinejoin,
79
- onClick: l[0] || (l[0] = (...s) => e.onClick && e.onClick(...s))
80
- }, l[1] || (l[1] = [B("path", {
81
- d: "M24 28V14m0 16v4M6 24c0-9.941 8.059-18 18-18s18 8.059 18 18-8.059 18-18 18S6 33.941 6 24Z"
82
- }, null, -1)]), 14, Te);
83
- }
84
- var Z = /* @__PURE__ */ ge(Me, [["render", We]]);
85
- const re = Object.assign(Z, {
86
- install: (e, l) => {
87
- var t;
88
- const r = (t = l == null ? void 0 : l.iconPrefix) != null ? t : "";
89
- e.component(r + Z.name, Z);
90
- }
91
- }), Ke = V({
92
- name: "IconLink",
93
- props: {
94
- size: {
95
- type: [Number, String]
96
- },
97
- strokeWidth: {
98
- type: Number,
99
- default: 4
100
- },
101
- strokeLinecap: {
102
- type: String,
103
- default: "butt",
104
- validator: (e) => ["butt", "round", "square"].includes(e)
105
- },
106
- strokeLinejoin: {
107
- type: String,
108
- default: "miter",
109
- validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
110
- },
111
- rotate: Number,
112
- spin: Boolean
113
- },
114
- emits: {
115
- click: (e) => !0
116
- },
117
- setup(e, {
118
- emit: l
119
- }) {
120
- const t = be("icon"), r = A(() => [t, `${t}-link`, {
121
- [`${t}-spin`]: e.spin
122
- }]), i = A(() => {
123
- const s = {};
124
- return e.size && (s.fontSize = ke(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
125
- });
126
- return {
127
- cls: r,
128
- innerStyle: i,
129
- onClick: (s) => {
130
- l("click", s);
131
- }
132
- };
133
- }
134
- }), He = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
135
- function Ze(e, l, t, r, i, p) {
136
- return o(), h("svg", {
137
- viewBox: "0 0 48 48",
138
- fill: "none",
139
- xmlns: "http://www.w3.org/2000/svg",
140
- stroke: "currentColor",
141
- class: ce(e.cls),
142
- style: W(e.innerStyle),
143
- "stroke-width": e.strokeWidth,
144
- "stroke-linecap": e.strokeLinecap,
145
- "stroke-linejoin": e.strokeLinejoin,
146
- onClick: l[0] || (l[0] = (...s) => e.onClick && e.onClick(...s))
147
- }, l[1] || (l[1] = [B("path", {
148
- d: "m14.1 25.414-4.95 4.95a6 6 0 0 0 8.486 8.485l8.485-8.485a6 6 0 0 0 0-8.485m7.779.707 4.95-4.95a6 6 0 1 0-8.486-8.485l-8.485 8.485a6 6 0 0 0 0 8.485"
149
- }, null, -1)]), 14, He);
150
- }
151
- var G = /* @__PURE__ */ ge(Ke, [["render", Ze]]);
152
- const Ge = Object.assign(G, {
153
- install: (e, l) => {
154
- var t;
155
- const r = (t = l == null ? void 0 : l.iconPrefix) != null ? t : "";
156
- e.component(r + G.name, G);
157
- }
158
- }), Je = /* @__PURE__ */ V({
159
- __name: "FeedbackRefresh",
160
- setup(e) {
161
- return (l, t) => (o(), g(a(Ae), {
162
- class: "icon",
163
- icon: "mingcute:refresh-2-line"
164
- }));
165
- }
166
- }), Qe = /* @__PURE__ */ D(Je, [["__scopeId", "data-v-64bb6fc2"]]), Xe = ["src"], Ye = /* @__PURE__ */ V({
167
- __name: "FeedbackBubbleEnd",
168
- props: {
169
- value: {
170
- type: String,
171
- required: !1,
172
- default: ""
173
- },
174
- type: {
175
- type: String,
176
- default: "text",
177
- validator: (e) => ["text", "image"].includes(e)
178
- },
179
- avatarUrl: {
180
- type: String,
181
- default: "A"
182
- },
183
- bubbleStyle: {
184
- type: Object,
185
- default: () => ({
186
- paddingLeft: "52px"
187
- })
188
- },
189
- showRefresh: {
190
- type: Boolean,
191
- default: !1
192
- },
193
- showClipboard: {
194
- type: Boolean,
195
- default: !1
196
- }
197
- },
198
- emits: ["refresh"],
199
- setup(e, {
200
- emit: l
201
- }) {
202
- const t = e, r = l;
203
- function i() {
204
- r("refresh");
205
- }
206
- return (p, s) => (o(), g(a(ve), {
207
- placement: "end",
208
- style: W(t.bubbleStyle),
209
- styles: {
210
- content: {
211
- padding: t.type === "image" ? "0px" : void 0
212
- }
213
- }
214
- }, {
215
- avatar: n(() => [d(a(me), null, {
216
- default: n(() => [B("img", {
217
- alt: "avatar",
218
- src: t.avatarUrl
219
- }, null, 8, Xe)]),
220
- _: 1
221
- })]),
222
- message: n(() => [t.type === "text" ? (o(), h(q, {
223
- key: 0
224
- }, [C(U(t.value), 1)], 64)) : t.type === "image" ? (o(), g(a(fe), {
225
- key: 1,
226
- width: "100",
227
- src: t.value,
228
- "show-loader": ""
229
- }, null, 8, ["src"])) : L("", !0)]),
230
- footer: n(() => [d(a(pe), null, {
231
- default: n(() => [t.showClipboard && t.type === "text" ? (o(), g(ye, {
232
- key: 0,
233
- value: e.value
234
- }, null, 8, ["value"])) : L("", !0), t.showRefresh ? (o(), g(Qe, {
235
- key: 1,
236
- onClick: i
237
- })) : L("", !0)]),
238
- _: 1
239
- })]),
240
- _: 1
241
- }, 8, ["style", "styles"]));
242
- }
243
- }), oe = /* @__PURE__ */ D(Ye, [["__scopeId", "data-v-2e1b7acf"]]), et = ["src"], tt = /* @__PURE__ */ V({
244
- __name: "FeedbackBubbleStart",
245
- props: {
246
- value: {
247
- type: String,
248
- required: !1,
249
- default: ""
250
- },
251
- type: {
252
- type: String,
253
- default: "text",
254
- validator: (e) => ["text", "image"].includes(e)
255
- },
256
- avatarUrl: {
257
- type: String,
258
- default: "A"
259
- },
260
- bubbleStyle: {
261
- type: Object,
262
- default: () => ({
263
- paddingRight: "52px"
264
- })
265
- },
266
- showClipboard: {
267
- type: Boolean,
268
- default: !1
269
- }
270
- },
271
- emits: ["footer-click"],
272
- setup(e, {
273
- emit: l
274
- }) {
275
- const t = e;
276
- return (r, i) => (o(), g(a(ve), {
277
- placement: "start",
278
- style: W(t.bubbleStyle),
279
- styles: {
280
- content: {
281
- padding: t.type === "image" ? "0px" : void 0
282
- }
283
- }
284
- }, {
285
- avatar: n(() => [d(a(me), null, {
286
- default: n(() => [B("img", {
287
- alt: "avatar",
288
- src: t.avatarUrl
289
- }, null, 8, et)]),
290
- _: 1
291
- })]),
292
- message: n(() => [t.type === "text" ? (o(), h(q, {
293
- key: 0
294
- }, [C(U(t.value), 1)], 64)) : t.type === "image" ? (o(), g(a(fe), {
295
- key: 1,
296
- width: "100",
297
- src: t.value,
298
- "show-loader": ""
299
- }, null, 8, ["src"])) : L("", !0)]),
300
- footer: n(() => [d(a(pe), null, {
301
- default: n(() => [t.showClipboard && t.type === "text" ? (o(), g(ye, {
302
- key: 0,
303
- value: t.value
304
- }, null, 8, ["value"])) : L("", !0)]),
305
- _: 1
306
- })]),
307
- _: 1
308
- }, 8, ["style", "styles"]));
309
- }
310
- }), ie = /* @__PURE__ */ D(tt, [["__scopeId", "data-v-37150f19"]]), k = [];
311
- for (let e = 0; e < 256; ++e)
312
- k.push((e + 256).toString(16).slice(1));
313
- function at(e, l = 0) {
314
- return (k[e[l + 0]] + k[e[l + 1]] + k[e[l + 2]] + k[e[l + 3]] + "-" + k[e[l + 4]] + k[e[l + 5]] + "-" + k[e[l + 6]] + k[e[l + 7]] + "-" + k[e[l + 8]] + k[e[l + 9]] + "-" + k[e[l + 10]] + k[e[l + 11]] + k[e[l + 12]] + k[e[l + 13]] + k[e[l + 14]] + k[e[l + 15]]).toLowerCase();
315
- }
316
- let J;
317
- const lt = new Uint8Array(16);
318
- function nt() {
319
- if (!J) {
320
- if (typeof crypto > "u" || !crypto.getRandomValues)
321
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
322
- J = crypto.getRandomValues.bind(crypto);
323
- }
324
- return J(lt);
325
- }
326
- const st = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
327
- randomUUID: st
328
- };
329
- function de(e, l, t) {
330
- var i;
331
- if (ue.randomUUID && !e)
332
- return ue.randomUUID();
333
- e = e || {};
334
- const r = e.random ?? ((i = e.rng) == null ? void 0 : i.call(e)) ?? nt();
335
- if (r.length < 16)
336
- throw new Error("Random bytes length must be >= 16");
337
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, at(r);
338
- }
339
- function rt(e, l = {}) {
340
- const {
341
- interval: t = 2e3,
342
- immediate: r = !1,
343
- autoStart: i = !1
344
- } = l, p = y(!1);
345
- let s = null;
346
- async function w() {
347
- try {
348
- await e();
349
- } catch ($) {
350
- console.error("轮询回调执行失败:", $);
351
- }
352
- }
353
- function m() {
354
- if (p.value) {
355
- console.warn("轮询已在运行中");
356
- return;
357
- }
358
- p.value = !0, r && w(), s = setInterval(w, t);
359
- }
360
- function u() {
361
- s && (clearInterval(s), s = null), p.value = !1;
362
- }
363
- function R() {
364
- u(), m();
365
- }
366
- return i && m(), Re(() => {
367
- u();
368
- }), {
369
- isPolling: p,
370
- start: m,
371
- stop: u,
372
- restart: R
373
- };
374
- }
375
- const Y = [{
376
- key: "bugReports",
377
- label: "问题报告"
378
- }, {
379
- key: "featureSuggestions",
380
- label: "功能建议"
381
- }, {
382
- key: "technicalSupportRequests",
383
- label: "技术支持请求"
384
- }, {
385
- key: "generalOpinions",
386
- label: "一般意见"
387
- }], _e = [{
388
- key: "urgent",
389
- label: "紧急"
390
- }, {
391
- key: "high",
392
- label: "高"
393
- }, {
394
- key: "normal",
395
- label: "普通"
396
- }, {
397
- key: "low",
398
- label: "低"
399
- }], he = [{
400
- key: "newFeedback",
401
- label: "新反馈"
402
- }, {
403
- key: "inProgress",
404
- label: "处理中"
405
- }, {
406
- key: "pending",
407
- label: "待处理"
408
- }, {
409
- key: "resolved",
410
- label: "已解决"
411
- }, {
412
- key: "closed",
413
- label: "已关闭"
414
- }], ot = {
415
- class: "FeedBackDetails"
416
- }, it = {
417
- class: "content"
418
- }, ut = {
419
- key: 1,
420
- class: "Bubbles"
421
- }, dt = {
422
- class: "sender-container"
423
- }, ct = /* @__PURE__ */ V({
424
- __name: "FeedbackDetails",
425
- props: {
426
- id: {
427
- type: String,
428
- required: !0,
429
- default: () => ""
430
- },
431
- senderRole: {
432
- type: String,
433
- required: !0,
434
- validator: (e) => ["user", "support"].includes(e)
435
- }
436
- },
437
- setup(e) {
438
- const l = {
439
- color: "var(--huyooo-accent-primary)"
440
- };
441
- function t(c) {
442
- return c === "inProgress" ? "orangered" : c === "pending" ? "gold" : c === "resolved" ? "green" : c === "closed" ? "gray" : "arcoblue";
443
- }
444
- const r = y(""), i = y(!1), p = [{
445
- key: "1",
446
- label: "如何补充更多信息",
447
- description: "请详细描述您的问题或需求,以便我们更好地为您服务。",
448
- disabled: !0,
449
- icon: ae(re, {
450
- style: l
451
- })
452
- }, {
453
- key: "3",
454
- label: "如何补充附件",
455
- description: "如有相关附件(如日志、截图等),请一并上传以便加快处理速度。",
456
- disabled: !0,
457
- icon: ae(re, {
458
- style: l
459
- })
460
- }], s = y(null), w = y(null), m = () => {
461
- var c;
462
- (c = s.value) == null || c.focus({
463
- cursor: "end"
464
- }), j(() => {
465
- w.value && (w.value.scrollTop = w.value.scrollHeight);
466
- });
467
- }, u = e;
468
- function R() {
469
- }
470
- const $ = y(!1), _ = y([]), x = y(void 0), S = y({
471
- id: void 0,
472
- title: "",
473
- description: "",
474
- type: "bugReports",
475
- status: "newFeedback",
476
- reply: "",
477
- createAt: ""
478
- }), v = () => {
479
- const {
480
- uploadFile: c
481
- } = De(), b = document.createElement("input");
482
- b.type = "file", b.accept = "image/*", b.style.display = "none", document.body.append(b), b.addEventListener("change", async (f) => {
483
- var te;
484
- const ee = (te = f.target.files) == null ? void 0 : te[0];
485
- if (ee) {
486
- i.value = !0;
487
- try {
488
- c({
489
- bucketId: Pe.feedbackBucketId,
490
- file: ee,
491
- onFileFinish(xe, xt, Se) {
492
- const K = {
493
- messageId: de(),
494
- senderRole: u.senderRole,
495
- type: "image",
496
- key: Se.Key
497
- }, Ie = {
498
- id: u.id,
499
- message: {
500
- type: K.type,
501
- key: K.key,
502
- senderRole: K.senderRole
503
- }
504
- };
505
- (async () => {
506
- const {
507
- data: M
508
- } = await P.feedbackCenter.update.messages.post(Ie);
509
- M ? (_.value.push(M.message), typeof M.message.seq == "number" && (x.value = M.message.seq), j(() => {
510
- m();
511
- }), i.value = !1, u.senderRole === "support" && S.value.status === "newFeedback" && I()) : i.value = !1;
512
- })();
513
- },
514
- onError(xe) {
515
- i.value = !1;
516
- }
517
- });
518
- } catch {
519
- i.value = !1;
520
- }
521
- }
522
- b.remove();
523
- }), b.click();
524
- };
525
- async function z(c) {
526
- i.value = !0, de();
527
- const b = {
528
- senderRole: u.senderRole,
529
- type: "text",
530
- content: c
531
- }, f = {
532
- id: u.id,
533
- message: {
534
- type: b.type,
535
- content: b.content,
536
- senderRole: b.senderRole
537
- }
538
- }, {
539
- data: N
540
- } = await P.feedbackCenter.update.messages.post(f);
541
- i.value = !1, N && (_.value.push(N.message), typeof N.message.seq == "number" && (x.value = N.message.seq), j(() => {
542
- m();
543
- }), r.value = "", u.senderRole === "support" && S.value.status === "newFeedback" && I());
544
- }
545
- function F() {
546
- z(r.value);
547
- }
548
- async function I() {
549
- $.value = !0;
550
- const {
551
- data: c
552
- } = await P.feedbackCenter.findOne.post({
553
- id: u.id
554
- });
555
- $.value = !1, c && (S.value = c, c.messages && c.messages.length > 0 && (_.value = c.messages, x.value = c.messages.at(-1).seq));
556
- }
557
- async function Ce() {
558
- const {
559
- data: c
560
- } = await P.messages.list.incremental.post({
561
- id: u.id,
562
- lastSeq: x.value
563
- });
564
- c && c.messages && c.messages.length > 0 && (_.value.push(...c.messages), x.value = c.messages.at(-1).seq, j(() => {
565
- m();
566
- }));
567
- }
568
- async function we() {
569
- $.value = !0;
570
- const {
571
- data: c
572
- } = await P.messages.list.post({
573
- id: u.id
574
- });
575
- $.value = !1, c && c.messages && c.messages.length > 0 && (_.value.push(...c.messages), x.value = c.messages.at(-1).seq, j(() => {
576
- m();
577
- }));
578
- }
579
- return rt(Ce, {
580
- interval: 2e3,
581
- autoStart: !0
582
- }), I(), we(), (c, b) => (o(), h("div", ot, [B("div", {
583
- ref_key: "scrollableContentRef",
584
- ref: w,
585
- class: "scrollable-content"
586
- }, [d(a($e), {
587
- title: "基本信息"
588
- }, {
589
- title: n(() => [...b[1] || (b[1] = [B("div", {
590
- class: "title"
591
- }, "基本信息", -1)])]),
592
- default: n(() => [d(a(H), {
593
- label: "标题:",
594
- span: 3
595
- }, {
596
- default: n(() => [C(U(S.value.title), 1)]),
597
- _: 1
598
- }), d(a(H), {
599
- label: "反馈类型:",
600
- span: 1
601
- }, {
602
- default: n(() => [d(a(E), {
603
- color: "arcoblue"
604
- }, {
605
- default: n(() => {
606
- var f;
607
- return [C(U((f = a(O)(a(Y), S.value.type)) == null ? void 0 : f.label), 1)];
608
- }),
609
- _: 1
610
- })]),
611
- _: 1
612
- }), d(a(H), {
613
- label: "状态:",
614
- span: 1
615
- }, {
616
- default: n(() => [d(a(E), {
617
- color: t(S.value.status)
618
- }, {
619
- default: n(() => {
620
- var f;
621
- return [C(U((f = a(O)(a(he), S.value.status)) == null ? void 0 : f.label), 1)];
622
- }),
623
- _: 1
624
- }, 8, ["color"])]),
625
- _: 1
626
- })]),
627
- _: 1
628
- }), B("div", it, [b[2] || (b[2] = B("div", {
629
- class: "title"
630
- }, "沟通记录", -1)), d(a(Fe), {
631
- class: "messageContent",
632
- loading: $.value
633
- }, {
634
- default: n(() => [_.value.length == 0 ? (o(), g(a(Ee), {
635
- key: 0,
636
- title: "☕️ 温馨提示!",
637
- items: p,
638
- wrap: "",
639
- vertical: !1,
640
- onOnItemClick: R
641
- })) : (o(), h("div", ut, [(o(!0), h(q, null, Q(_.value, (f, N) => (o(), h(q, {
642
- key: N
643
- }, [f.type === "text" ? (o(), h(q, {
644
- key: 0
645
- }, [f.senderRole !== u.senderRole ? (o(), g(ie, {
646
- key: 0,
647
- value: f.content,
648
- type: f.type,
649
- "avatar-url": f.senderInfo.avatarUrl
650
- }, null, 8, ["value", "type", "avatar-url"])) : (o(), g(oe, {
651
- key: 1,
652
- value: f.content,
653
- "avatar-url": f.senderInfo.avatarUrl,
654
- type: f.type
655
- }, null, 8, ["value", "avatar-url", "type"]))], 64)) : (o(), h(q, {
656
- key: 1
657
- }, [f.senderRole !== u.senderRole ? (o(), g(ie, {
658
- key: 0,
659
- type: f.type,
660
- value: f.url,
661
- "avatar-text": "S",
662
- "avatar-url": f.senderInfo.avatarUrl
663
- }, null, 8, ["type", "value", "avatar-url"])) : (o(), g(oe, {
664
- key: 1,
665
- type: f.type,
666
- value: f.url,
667
- "avatar-url": f.senderInfo.avatarUrl
668
- }, null, 8, ["type", "value", "avatar-url"]))], 64))], 64))), 128))]))]),
669
- _: 1
670
- }, 8, ["loading"])])], 512), B("div", dt, [d(a(Oe), {
671
- ref_key: "senderRef",
672
- ref: s,
673
- value: r.value,
674
- "onUpdate:value": b[0] || (b[0] = (f) => r.value = f),
675
- placeholder: "请输入你要咨询的问题?",
676
- loading: i.value,
677
- "allow-speech": !1,
678
- "read-only": i.value,
679
- onSubmit: F
680
- }, {
681
- prefix: n(() => [d(a(X), {
682
- type: "text",
683
- class: "IconLink",
684
- onClick: v
685
- }, {
686
- icon: n(() => [d(a(Ge))]),
687
- _: 1
688
- })]),
689
- _: 1
690
- }, 8, ["value", "loading", "read-only"])])]));
691
- }
692
- }), pt = /* @__PURE__ */ D(ct, [["__scopeId", "data-v-de790d44"]]), ft = {
693
- class: "FeedBackFrom"
694
- }, mt = /* @__PURE__ */ V({
695
- __name: "FeedbackForm",
696
- emits: ["confirm"],
697
- setup(e, {
698
- emit: l
699
- }) {
700
- const t = l, r = y(), i = y(!1), p = y({
701
- id: void 0,
702
- title: "",
703
- type: "bugReports",
704
- priority: "normal",
705
- description: "",
706
- screenshots: []
707
- });
708
- y([]);
709
- async function s() {
710
- if (!await r.value.validate()) {
711
- i.value = !0;
712
- const {
713
- error: m
714
- } = await P.feedbackCenter.create.post({
715
- title: p.value.title,
716
- type: p.value.type,
717
- priority: p.value.priority,
718
- description: p.value.description
719
- // screenshots 字段暂不支持,后续可能需要通过消息发送
720
- });
721
- i.value = !1, m || (Ve.success("新建反馈成功"), t("confirm"));
722
- }
723
- }
724
- return (w, m) => (o(), h("div", ft, [d(a(Be), {
725
- ref_key: "formRef",
726
- ref: r,
727
- model: p.value,
728
- "auto-label-width": "",
729
- layout: "vertical"
730
- }, {
731
- default: n(() => [d(a(T), {
732
- field: "title",
733
- label: "标题",
734
- rules: [{
735
- required: !0,
736
- message: "请输入标题"
737
- }]
738
- }, {
739
- default: n(() => [d(a(Le), {
740
- modelValue: p.value.title,
741
- "onUpdate:modelValue": m[0] || (m[0] = (u) => p.value.title = u),
742
- placeholder: "请输入标题"
743
- }, null, 8, ["modelValue"])]),
744
- _: 1
745
- }), d(a(T), {
746
- field: "type",
747
- label: "反馈类型",
748
- rules: [{
749
- required: !0,
750
- message: "请选择反馈类型"
751
- }]
752
- }, {
753
- default: n(() => [d(a(le), {
754
- modelValue: p.value.type,
755
- "onUpdate:modelValue": m[1] || (m[1] = (u) => p.value.type = u),
756
- placeholder: "请选择反馈类型"
757
- }, {
758
- default: n(() => [(o(!0), h(q, null, Q(a(Y), (u, R) => (o(), g(a(ne), {
759
- key: R,
760
- value: u.key
761
- }, {
762
- default: n(() => [C(U(u.label), 1)]),
763
- _: 2
764
- }, 1032, ["value"]))), 128))]),
765
- _: 1
766
- }, 8, ["modelValue"])]),
767
- _: 1
768
- }), d(a(T), {
769
- field: "priority",
770
- label: "优先级",
771
- rules: [{
772
- required: !0,
773
- message: "请选择优先级"
774
- }]
775
- }, {
776
- default: n(() => [d(a(le), {
777
- modelValue: p.value.priority,
778
- "onUpdate:modelValue": m[2] || (m[2] = (u) => p.value.priority = u),
779
- placeholder: "请选择优先级"
780
- }, {
781
- default: n(() => [(o(!0), h(q, null, Q(a(_e), (u, R) => (o(), g(a(ne), {
782
- key: R,
783
- value: u.key
784
- }, {
785
- default: n(() => [C(U(u.label), 1)]),
786
- _: 2
787
- }, 1032, ["value"]))), 128))]),
788
- _: 1
789
- }, 8, ["modelValue"])]),
790
- _: 1
791
- }), d(a(T), {
792
- field: "description",
793
- label: "问题描述",
794
- rules: [{
795
- required: !0,
796
- message: "请输入问题描述"
797
- }]
798
- }, {
799
- default: n(() => [d(a(Ue), {
800
- modelValue: p.value.description,
801
- "onUpdate:modelValue": m[3] || (m[3] = (u) => p.value.description = u),
802
- placeholder: "请输入问题描述",
803
- "allow-clear": "",
804
- "auto-size": {
805
- minRows: 5
806
- }
807
- }, null, 8, ["modelValue"])]),
808
- _: 1
809
- }), L("", !0), d(a(X), {
810
- loading: i.value,
811
- type: "primary",
812
- onClick: s
813
- }, {
814
- default: n(() => [...m[4] || (m[4] = [C(" 提交 ", -1)])]),
815
- _: 1
816
- }, 8, ["loading"])]),
817
- _: 1
818
- }, 8, ["model"])]));
819
- }
820
- }), vt = /* @__PURE__ */ D(mt, [["__scopeId", "data-v-bf24e737"]]), yt = {
821
- class: "messages"
822
- }, gt = {
823
- key: 1,
824
- class: "list"
825
- }, bt = /* @__PURE__ */ V({
826
- __name: "FeedbackList",
827
- emits: ["toDetail"],
828
- setup(e, {
829
- emit: l
830
- }) {
831
- const t = y(!0), r = y([]), i = y(!1), p = y(""), s = y({
832
- total: 0,
833
- current: 1,
834
- pageSize: 10
835
- });
836
- function w() {
837
- t.value = !0;
838
- }
839
- function m(v) {
840
- p.value = v.id, t.value = !1;
841
- }
842
- const u = [{
843
- dataIndex: "title",
844
- title: "标题",
845
- minWidth: 120,
846
- ellipsis: !0,
847
- tooltip: !0
848
- }, {
849
- dataIndex: "type",
850
- slotName: "type",
851
- title: "类型",
852
- width: 100
853
- }, {
854
- dataIndex: "priority",
855
- slotName: "priority",
856
- title: "优先级",
857
- width: 80
858
- }, {
859
- dataIndex: "status",
860
- slotName: "status",
861
- title: "状态",
862
- width: 90
863
- }, {
864
- dataIndex: "createAt",
865
- title: "创建日期",
866
- width: 160
867
- }, {
868
- dataIndex: "actions",
869
- slotName: "actions",
870
- title: "操作",
871
- fixed: "right",
872
- width: 80
873
- }];
874
- function R(v) {
875
- return v === "inProgress" ? "orangered" : v === "pending" ? "gold" : v === "resolved" ? "green" : v === "closed" ? "gray" : "arcoblue";
876
- }
877
- function $(v) {
878
- return v === "urgent" ? "red" : v === "high" ? "orangered" : v === "low" ? "gray" : "blue";
879
- }
880
- async function _() {
881
- i.value = !0;
882
- const {
883
- data: v
884
- } = await P.feedbackCenter.own.post({
885
- current: s.value.current,
886
- pageSize: s.value.pageSize
887
- });
888
- i.value = !1, v && (r.value = v.items, s.value.total = v.count);
889
- }
890
- const x = (v) => {
891
- s.value.current = v, _();
892
- }, S = (v) => {
893
- s.value.current = 1, s.value.pageSize = v, _();
894
- };
895
- return _(), (v, z) => (o(), h("div", yt, [t.value ? L("", !0) : (o(), g(a(ze), {
896
- key: 0,
897
- style: {
898
- "margin-bottom": "10px",
899
- cursor: "pointer"
900
- }
901
- }, {
902
- default: n(() => [d(a(se), {
903
- style: {
904
- padding: "0px"
905
- },
906
- onClick: w
907
- }, {
908
- default: n(() => [...z[0] || (z[0] = [C("我的反馈", -1)])]),
909
- _: 1
910
- }), d(a(se), {
911
- style: {
912
- padding: "0px"
913
- }
914
- }, {
915
- default: n(() => [...z[1] || (z[1] = [C("反馈详情", -1)])]),
916
- _: 1
917
- })]),
918
- _: 1
919
- })), t.value ? (o(), h("div", gt, [d(je, {
920
- columns: u,
921
- data: r.value,
922
- loading: i.value,
923
- pagination: s.value,
924
- onPageChange: x,
925
- onPageSizeChange: S
926
- }, {
927
- type: n(({
928
- record: F
929
- }) => [d(a(E), {
930
- color: "arcoblue"
931
- }, {
932
- default: n(() => {
933
- var I;
934
- return [C(U((I = a(O)(a(Y), F.type)) == null ? void 0 : I.label), 1)];
935
- }),
936
- _: 2
937
- }, 1024)]),
938
- priority: n(({
939
- record: F
940
- }) => [d(a(E), {
941
- color: $(F.priority)
942
- }, {
943
- default: n(() => {
944
- var I;
945
- return [C(U(((I = a(O)(a(_e), F.priority)) == null ? void 0 : I.label) || "普通"), 1)];
946
- }),
947
- _: 2
948
- }, 1032, ["color"])]),
949
- status: n(({
950
- record: F
951
- }) => [d(a(E), {
952
- color: R(F.status)
953
- }, {
954
- default: n(() => {
955
- var I;
956
- return [C(U((I = a(O)(a(he), F.status)) == null ? void 0 : I.label), 1)];
957
- }),
958
- _: 2
959
- }, 1032, ["color"])]),
960
- actions: n(({
961
- record: F
962
- }) => [d(a(X), {
963
- type: "text",
964
- onClick: (I) => m(F)
965
- }, {
966
- default: n(() => [...z[2] || (z[2] = [C("查看", -1)])]),
967
- _: 1
968
- }, 8, ["onClick"])]),
969
- _: 1
970
- }, 8, ["data", "loading", "pagination"])])) : (o(), g(pt, {
971
- key: 2,
972
- id: p.value,
973
- "sender-role": "user"
974
- }, null, 8, ["id"]))]));
975
- }
976
- }), kt = /* @__PURE__ */ D(bt, [["__scopeId", "data-v-5fb9e85f"]]), _t = {
977
- key: 0,
978
- class: "content"
979
- }, ht = {
980
- class: "left"
981
- }, Ct = {
982
- class: "right"
983
- }, wt = /* @__PURE__ */ V({
984
- __name: "FeedbackModal",
985
- emits: ["confirm", "cancel"],
986
- setup(e, {
987
- expose: l,
988
- emit: t
989
- }) {
990
- const r = y(!1), i = t;
991
- function p() {
992
- i("cancel");
993
- }
994
- const s = y(["FeedbackList"]), w = y([{
995
- name: "我的反馈",
996
- path: "FeedbackList",
997
- meta: {
998
- icon: "mingcute:cube-3d-fill"
999
- }
1000
- }, {
1001
- name: "新建反馈",
1002
- path: "CreateFeedback",
1003
- meta: {
1004
- icon: "mingcute:cube-3d-fill"
1005
- }
1006
- }]), m = A(() => s.value.length !== 0 ? s.value[0] : "");
1007
- function u() {
1008
- s.value = ["FeedbackList"];
1009
- }
1010
- function R(_) {
1011
- s.value = [_.path];
1012
- }
1013
- function $(_) {
1014
- r.value = _;
1015
- }
1016
- return l({
1017
- setData: $
1018
- }), (_, x) => (o(), g(a(qe), {
1019
- visible: r.value,
1020
- "onUpdate:visible": x[1] || (x[1] = (S) => r.value = S),
1021
- loading: !1,
1022
- "body-class": "AppMessagebodyClass",
1023
- "mask-closable": !1,
1024
- footer: !1,
1025
- width: "auto",
1026
- title: "用户反馈",
1027
- "hide-title": !1,
1028
- onCancel: p
1029
- }, {
1030
- default: n(() => [r.value ? (o(), h("div", _t, [B("div", ht, [d(Ne, {
1031
- "selected-keys": s.value,
1032
- "onUpdate:selectedKeys": x[0] || (x[0] = (S) => s.value = S),
1033
- menus: w.value,
1034
- onChange: R
1035
- }, null, 8, ["selected-keys", "menus"])]), B("div", Ct, [m.value === "FeedbackList" ? (o(), g(kt, {
1036
- key: 0
1037
- })) : L("", !0), m.value === "CreateFeedback" ? (o(), g(vt, {
1038
- key: 1,
1039
- onConfirm: u
1040
- })) : L("", !0)])])) : L("", !0)]),
1041
- _: 1
1042
- }, 8, ["visible"]));
1043
- }
1044
- }), Gt = /* @__PURE__ */ D(wt, [["__scopeId", "data-v-7ca0cfbf"]]);
1045
- export {
1046
- oe as B,
1047
- pt as F,
1048
- Qe as R,
1049
- ie as a,
1050
- vt as b,
1051
- kt as c,
1052
- Gt as d
1053
- };