@huyooo/ui 0.4.56 → 0.4.58

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/user.d.ts CHANGED
@@ -3,4 +3,5 @@ export { default as UserAvatar } from './components/User/UserAvatar.vue';
3
3
  export { default as UserBasicInformation } from './components/User/UserBasicInformation.vue';
4
4
  export { default as UserButton } from './components/User/UserButton.vue';
5
5
  export { default as UserPanel } from './components/User/UserPanel.vue';
6
+ export { default as UserAccountMenu } from './components/User/UserAccountMenu.vue';
6
7
  export type * from './types/users';
package/dist/user.js CHANGED
@@ -1,5 +1,7 @@
1
- import { b as r, c as e, a as o, U as n, S as t } from "./UserPanel-BgTodw-_.js";
1
+ import { b as r, c as e, a as o, U as n, S as t } from "./UserPanel-02AaOgsx.js";
2
+ import { U as c } from "./UserAccountMenu-Cc_HoQTG.js";
2
3
  export {
4
+ c as UserAccountMenu,
3
5
  r as UserAvatar,
4
6
  e as UserBasicInformation,
5
7
  o as UserButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "0.4.56",
3
+ "version": "0.4.58",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -75,13 +75,13 @@
75
75
  "prepublishOnly": "npm run build"
76
76
  },
77
77
  "peerDependencies": {
78
- "@arco-design/web-vue": "^2.56.3",
78
+ "@arco-design/web-vue": ">=2.56.3",
79
79
  "@huyooo/api": "*",
80
- "@huyooo/vue-tiptap": "^0.3.25",
81
- "@iconify/vue": "^4.1.2",
82
- "@vueuse/core": "^11.3.0",
83
- "ant-design-x-vue": "^1.2.6",
84
- "vue": "^3.4.37"
80
+ "@huyooo/vue-tiptap": ">=0.3.25",
81
+ "@iconify/vue": ">=4.1.2",
82
+ "@vueuse/core": ">=11.3.0",
83
+ "ant-design-x-vue": ">=1.2.6",
84
+ "vue": ">=3.4.37"
85
85
  },
86
86
  "dependencies": {
87
87
  "cos-js-sdk-v5": "^1.10.1",
@@ -1,530 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- /* empty css */
4
- /* empty css */
5
- import { defineComponent as _, createElementBlock as v, openBlock as l, normalizeStyle as H, normalizeClass as F, createElementVNode as p, computed as D, createBlock as y, createCommentVNode as M, createVNode as i, unref as n, withCtx as a, createTextVNode as k, toDisplayString as C, renderSlot as me, ref as f, Fragment as ke } from "vue";
6
- import { Tag as ve, Button as V, Avatar as O, Dropdown as ye, Divider as q, Doption as g } from "@arco-design/web-vue";
7
- import { S as ge } from "./PaySubscriptions-B42IdT-5.js";
8
- import { R as _e } from "./ReferrerReferees-CvuUodDZ.js";
9
- import { a as E, u as Se } from "./useAuthkitUsersProfile-CT2MN1S5.js";
10
- import { u as Ce } from "./useAuthkitAuthModal-C153ZpNb.js";
11
- import { a as be, b as Ie } from "./AuthkitAppSetting-D7k_8buM.js";
12
- import { d as $e } from "./FeedbackModal-D7tjJLBj.js";
13
- import { M as he } from "./MessageHandle-Dt6rb0rg.js";
14
- /* empty css */
15
- /* empty css */
16
- import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- /* empty css */
18
- import { I as b } from "./index-Cr5RQSnA.js";
19
- import { _ as K, g as T, i as W } from "./plugin-vue_export-helper-LjDO2Zua.js";
20
- const Be = _({
21
- name: "IconExport",
22
- props: {
23
- size: {
24
- type: [Number, String]
25
- },
26
- strokeWidth: {
27
- type: Number,
28
- default: 4
29
- },
30
- strokeLinecap: {
31
- type: String,
32
- default: "butt",
33
- validator: (e) => ["butt", "round", "square"].includes(e)
34
- },
35
- strokeLinejoin: {
36
- type: String,
37
- default: "miter",
38
- validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
39
- },
40
- rotate: Number,
41
- spin: Boolean
42
- },
43
- emits: {
44
- click: (e) => !0
45
- },
46
- setup(e, {
47
- emit: t
48
- }) {
49
- const o = T("icon"), s = D(() => [o, `${o}-export`, {
50
- [`${o}-spin`]: e.spin
51
- }]), u = D(() => {
52
- const r = {};
53
- return e.size && (r.fontSize = W(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
54
- });
55
- return {
56
- cls: s,
57
- innerStyle: u,
58
- onClick: (r) => {
59
- t("click", r);
60
- }
61
- };
62
- }
63
- }), xe = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
64
- function Ue(e, t, o, s, u, m) {
65
- return l(), v("svg", {
66
- viewBox: "0 0 48 48",
67
- fill: "none",
68
- xmlns: "http://www.w3.org/2000/svg",
69
- stroke: "currentColor",
70
- class: F(e.cls),
71
- style: H(e.innerStyle),
72
- "stroke-width": e.strokeWidth,
73
- "stroke-linecap": e.strokeLinecap,
74
- "stroke-linejoin": e.strokeLinejoin,
75
- onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
76
- }, t[1] || (t[1] = [p("path", {
77
- d: "M31.928 33.072 41 24.002l-9.072-9.072M16.858 24h24M31 41H7V7h24"
78
- }, null, -1)]), 14, xe);
79
- }
80
- var w = /* @__PURE__ */ K(Be, [["render", Ue]]);
81
- const De = Object.assign(w, {
82
- install: (e, t) => {
83
- var o;
84
- const s = (o = t == null ? void 0 : t.iconPrefix) != null ? o : "";
85
- e.component(s + w.name, w);
86
- }
87
- }), Me = _({
88
- name: "IconLaunch",
89
- props: {
90
- size: {
91
- type: [Number, String]
92
- },
93
- strokeWidth: {
94
- type: Number,
95
- default: 4
96
- },
97
- strokeLinecap: {
98
- type: String,
99
- default: "butt",
100
- validator: (e) => ["butt", "round", "square"].includes(e)
101
- },
102
- strokeLinejoin: {
103
- type: String,
104
- default: "miter",
105
- validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
106
- },
107
- rotate: Number,
108
- spin: Boolean
109
- },
110
- emits: {
111
- click: (e) => !0
112
- },
113
- setup(e, {
114
- emit: t
115
- }) {
116
- const o = T("icon"), s = D(() => [o, `${o}-launch`, {
117
- [`${o}-spin`]: e.spin
118
- }]), u = D(() => {
119
- const r = {};
120
- return e.size && (r.fontSize = W(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
121
- });
122
- return {
123
- cls: s,
124
- innerStyle: u,
125
- onClick: (r) => {
126
- t("click", r);
127
- }
128
- };
129
- }
130
- }), Pe = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
131
- function we(e, t, o, s, u, m) {
132
- return l(), v("svg", {
133
- viewBox: "0 0 48 48",
134
- fill: "none",
135
- stroke: "currentColor",
136
- xmlns: "http://www.w3.org/2000/svg",
137
- class: F(e.cls),
138
- style: H(e.innerStyle),
139
- "stroke-width": e.strokeWidth,
140
- "stroke-linecap": e.strokeLinecap,
141
- "stroke-linejoin": e.strokeLinejoin,
142
- onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
143
- }, t[1] || (t[1] = [p("path", {
144
- d: "M41 26v14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h14M19.822 28.178 39.899 8.1M41 20V7H28"
145
- }, null, -1)]), 14, Pe);
146
- }
147
- var A = /* @__PURE__ */ K(Me, [["render", we]]);
148
- const Ae = Object.assign(A, {
149
- install: (e, t) => {
150
- var o;
151
- const s = (o = t == null ? void 0 : t.iconPrefix) != null ? o : "";
152
- e.component(s + A.name, A);
153
- }
154
- }), Re = {
155
- class: "pricing"
156
- }, ze = {
157
- class: "base"
158
- }, Ne = {
159
- class: "pricingInfo"
160
- }, Le = /* @__PURE__ */ _({
161
- __name: "UserSubscriptionBaseInformation",
162
- props: {
163
- currentVersionName: {
164
- type: String,
165
- required: !0
166
- },
167
- expireDate: {
168
- type: String,
169
- required: !0
170
- },
171
- canUpgrade: {
172
- type: Boolean,
173
- required: !0
174
- }
175
- },
176
- emits: ["upgradeHandle"],
177
- setup(e, {
178
- emit: t
179
- }) {
180
- const o = e, s = t;
181
- function u() {
182
- s("upgradeHandle");
183
- }
184
- return (m, r) => (l(), v("div", Re, [p("div", ze, [p("div", Ne, [r[0] || (r[0] = p("span", null, "我的订阅:", -1)), i(n(ve), {
185
- color: "arcoblue",
186
- style: {
187
- "border-radius": "6px"
188
- }
189
- }, {
190
- default: a(() => [k(C(o.currentVersionName), 1)]),
191
- _: 1
192
- })]), o.canUpgrade ? (l(), y(n(V), {
193
- key: 0,
194
- type: "primary",
195
- size: "mini",
196
- class: "updatePricing",
197
- onClick: u
198
- }, {
199
- default: a(() => r[1] || (r[1] = [k(" 升级 ")])),
200
- _: 1,
201
- __: [1]
202
- })) : M("", !0)]), p("span", null, "有效期至: " + C(o.expireDate), 1)]));
203
- }
204
- }), je = /* @__PURE__ */ I(Le, [["__scopeId", "data-v-1e32fa72"]]), He = {
205
- class: "userInfo"
206
- }, Fe = {
207
- key: 0,
208
- class: "userName"
209
- }, Ve = /* @__PURE__ */ _({
210
- __name: "UserAvatar",
211
- props: {
212
- nickname: {
213
- type: String,
214
- default: ""
215
- },
216
- avatar: {
217
- type: String,
218
- default: ""
219
- }
220
- },
221
- setup(e) {
222
- const t = e;
223
- return (o, s) => (l(), v("div", He, [t.nickname ? (l(), v("span", Fe, C(t.nickname), 1)) : M("", !0), i(n(O), {
224
- "image-url": t.avatar,
225
- size: 32,
226
- "object-fit": "cover"
227
- }, null, 8, ["image-url"])]));
228
- }
229
- }), Oe = /* @__PURE__ */ I(Ve, [["__scopeId", "data-v-a7a47cc4"]]), qe = {
230
- class: "userInfo"
231
- }, Ee = {
232
- class: "extra"
233
- }, Ke = {
234
- class: "userName"
235
- }, Te = {
236
- class: "email"
237
- }, We = {
238
- key: 0,
239
- class: "referrerId"
240
- }, Ge = /* @__PURE__ */ _({
241
- __name: "UserBasicInformation",
242
- props: {
243
- nickname: {
244
- type: String,
245
- default: ""
246
- },
247
- email: {
248
- type: String,
249
- default: ""
250
- },
251
- avatarUrl: {
252
- type: String,
253
- default: ""
254
- },
255
- referrerId: {
256
- type: String,
257
- default: ""
258
- }
259
- },
260
- setup(e) {
261
- const t = e;
262
- return (o, s) => (l(), v("div", qe, [i(n(O), {
263
- "image-url": t.avatarUrl,
264
- size: 42,
265
- "object-fit": "cover"
266
- }, null, 8, ["image-url"]), p("div", Ee, [p("span", Ke, C(t.nickname), 1), p("span", Te, C(t.email), 1), t.referrerId ? (l(), v("span", We, " 邀请码:" + C(t.referrerId), 1)) : M("", !0)])]));
267
- }
268
- }), Je = /* @__PURE__ */ I(Ge, [["__scopeId", "data-v-367449da"]]), Qe = {
269
- class: "dropdownContent"
270
- }, Xe = {
271
- class: "header"
272
- }, Ye = /* @__PURE__ */ _({
273
- __name: "UserButton",
274
- emits: ["enterSystem", "toSignIn"],
275
- setup(e, {
276
- emit: t
277
- }) {
278
- const o = t, {
279
- userProfile: s,
280
- isLoggedIn: u
281
- } = E();
282
- function m() {
283
- o("toSignIn");
284
- }
285
- return (r, $) => n(u) ? (l(), y(n(ye), {
286
- key: 1,
287
- class: "DropdownUserInfo",
288
- position: "bl"
289
- }, {
290
- content: a(() => {
291
- var d, h, B, x;
292
- return [p("div", Qe, [p("div", Xe, [i(Je, {
293
- "avatar-url": (d = n(s)) == null ? void 0 : d.avatarUrl,
294
- nickname: (h = n(s)) == null ? void 0 : h.nickname,
295
- email: (B = n(s)) == null ? void 0 : B.email,
296
- "referrer-id": (x = n(s)) == null ? void 0 : x.referrerId
297
- }, null, 8, ["avatar-url", "nickname", "email", "referrer-id"]), i(je, {
298
- currentVersionName: "免费版本",
299
- "expire-date": "2025-01-01",
300
- "can-upgrade": !0
301
- })]), i(n(q), {
302
- style: {
303
- margin: "10px 0px"
304
- }
305
- }), me(r.$slots, "DoptionList", {}, void 0, !0)])];
306
- }),
307
- default: a(() => {
308
- var d;
309
- return [i(Oe, {
310
- avatar: (d = n(s)) == null ? void 0 : d.avatarUrl
311
- }, null, 8, ["avatar"])];
312
- }),
313
- _: 3
314
- })) : (l(), y(n(V), {
315
- key: 0,
316
- type: "primary",
317
- class: "handle",
318
- onClick: m
319
- }, {
320
- default: a(() => $[0] || ($[0] = [k(" 登陆 ")])),
321
- _: 1,
322
- __: [0]
323
- }));
324
- }
325
- }), Ze = /* @__PURE__ */ I(Ye, [["__scopeId", "data-v-895035f0"]]), et = {
326
- class: "UserPanel"
327
- }, tt = /* @__PURE__ */ _({
328
- __name: "UserPanel",
329
- emits: ["toHomePage", "signOut", "signIn"],
330
- setup(e, {
331
- emit: t
332
- }) {
333
- const o = f(), s = f(), u = f(Symbol("key")), m = t, {
334
- fetchUserProfile: r,
335
- clearUserProfile: $,
336
- isLoggedIn: d
337
- } = E(), {
338
- addSignInCallback: h,
339
- initializeAuth: B,
340
- clearAuth: x
341
- } = Se();
342
- B() && r();
343
- const R = f(), z = f(Symbol("key")), N = f(), L = f(), G = f(Symbol("key")), J = f(), Q = f(Symbol("key"));
344
- function X(j) {
345
- }
346
- function Y(j) {
347
- }
348
- const {
349
- show: Z
350
- } = Ce();
351
- function ee() {
352
- z.value = Symbol("key");
353
- }
354
- const P = f(), U = f(Symbol("key"));
355
- function te() {
356
- U.value = Symbol("key");
357
- }
358
- function ne() {
359
- U.value = Symbol("key");
360
- }
361
- function S() {
362
- Z.value = !0, m("signIn");
363
- }
364
- h(() => {
365
- r();
366
- });
367
- function oe() {
368
- u.value = Symbol("key");
369
- }
370
- function re() {
371
- s.value.show = !1;
372
- }
373
- function ie() {
374
- U.value = Symbol("key");
375
- }
376
- function se() {
377
- P.value.setData(null, !0);
378
- }
379
- function ae() {
380
- if (!d.value) {
381
- S();
382
- return;
383
- }
384
- P.value.setData(null, !0);
385
- }
386
- function le() {
387
- if (!d.value) {
388
- S();
389
- return;
390
- }
391
- N.value.openNotification();
392
- }
393
- function ce() {
394
- if (!d.value) {
395
- S();
396
- return;
397
- }
398
- L.value.setData(null, !0);
399
- }
400
- function ue() {
401
- if (!d.value) {
402
- S();
403
- return;
404
- }
405
- o.value.setData(!0);
406
- }
407
- function de() {
408
- if (!d.value) {
409
- S();
410
- return;
411
- }
412
- R.value.setData(!0);
413
- }
414
- function fe() {
415
- m("toHomePage");
416
- }
417
- async function pe() {
418
- $(), x(), m("signOut");
419
- }
420
- return (j, c) => (l(), v("div", et, [i(Ze, {
421
- onToSignIn: S
422
- }, {
423
- DoptionList: a(() => [i(n(g), {
424
- value: "messages",
425
- class: "Doption",
426
- onClick: le
427
- }, {
428
- icon: a(() => c[0] || (c[0] = [k("消息中心")])),
429
- default: a(() => [i(n(b))]),
430
- _: 1
431
- }), i(n(g), {
432
- value: "setting",
433
- class: "Doption",
434
- onClick: ae
435
- }, {
436
- icon: a(() => c[1] || (c[1] = [k("系统设置 ")])),
437
- default: a(() => [i(n(b))]),
438
- _: 1
439
- }), i(n(g), {
440
- value: "subscription",
441
- class: "Doption",
442
- onClick: ce
443
- }, {
444
- icon: a(() => c[2] || (c[2] = [k("订阅信息 ")])),
445
- default: a(() => [i(n(b))]),
446
- _: 1
447
- }), i(n(g), {
448
- value: "feedBack",
449
- class: "Doption",
450
- onClick: ue
451
- }, {
452
- icon: a(() => c[3] || (c[3] = [k("系统反馈 ")])),
453
- default: a(() => [i(n(b))]),
454
- _: 1
455
- }), i(n(g), {
456
- value: "invitations",
457
- class: "Doption",
458
- onClick: de
459
- }, {
460
- icon: a(() => c[4] || (c[4] = [k("邀请 ")])),
461
- default: a(() => [i(n(b))]),
462
- _: 1
463
- }), i(n(q), {
464
- style: {
465
- margin: "10px 0px"
466
- }
467
- }), i(n(g), {
468
- value: "homePage",
469
- class: "Doption",
470
- onClick: fe
471
- }, {
472
- icon: a(() => c[5] || (c[5] = [k("主页 ")])),
473
- default: a(() => [i(n(Ae))]),
474
- _: 1
475
- }), i(n(g), {
476
- value: "signOut",
477
- class: "Doption",
478
- onClick: pe
479
- }, {
480
- icon: a(() => c[6] || (c[6] = [k("退出登陆 ")])),
481
- default: a(() => [i(n(De))]),
482
- _: 1
483
- })]),
484
- _: 1
485
- }), (l(), y(be, {
486
- ref_key: "AuthModalRef",
487
- ref: J,
488
- key: Q.value,
489
- size: "large",
490
- onToPrivacyPolicy: X,
491
- onToUserServiceAgreement: Y
492
- })), n(d) ? (l(), v(ke, {
493
- key: 0
494
- }, [(l(), y(Ie, {
495
- ref_key: "AppSettingRef",
496
- ref: P,
497
- key: U.value,
498
- onConfirm: se,
499
- onCancel: ie
500
- })), (l(), y(_e, {
501
- ref_key: "RefereesRef",
502
- ref: R,
503
- key: z.value,
504
- onCancel: ee
505
- })), (l(), y(ge, {
506
- ref_key: "SubscriptionsRef",
507
- ref: L,
508
- key: G.value,
509
- title: "订阅详情",
510
- onConfirm: te,
511
- onCancel: ne
512
- })), i(he, {
513
- ref_key: "MessageHandleRef",
514
- ref: N
515
- }, null, 512), (l(), y($e, {
516
- ref_key: "FeedBackModalRef",
517
- ref: o,
518
- key: u.value,
519
- onConfirm: re,
520
- onCancel: oe
521
- }))], 64)) : M("", !0)]));
522
- }
523
- }), Ct = /* @__PURE__ */ I(tt, [["__scopeId", "data-v-90871a9c"]]);
524
- export {
525
- je as S,
526
- Ct as U,
527
- Ze as a,
528
- Oe as b,
529
- Je as c
530
- };