@huyooo/ui 0.5.53 → 0.5.54

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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { d as r, U as e, a as n, b as o, c as t, S as U } from "./UserAccountMenu-DF_R2-7D.js";
1
+ import { d as r, U as e, a as n, b as o, c as t, S as U } from "./UserAccountMenu-Dkqy4wJf.js";
2
2
  export {
3
3
  r as UserAccountMenu,
4
4
  e as UserAvatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "0.5.53",
3
+ "version": "0.5.54",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -1,612 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- /* empty css */
4
- /* empty css */
5
- import { defineComponent as b, createElementBlock as v, openBlock as u, normalizeStyle as E, normalizeClass as K, createElementVNode as d, computed as B, createBlock as _, createCommentVNode as P, createVNode as r, unref as n, withCtx as l, createTextVNode as k, toDisplayString as S, mergeModels as D, useModel as T, renderSlot as W, ref as p, Fragment as be } from "vue";
6
- import { Tag as Ce, Button as X, Avatar as Y, Dropdown as $e, Divider as G, Doption as C } from "@arco-design/web-vue";
7
- import { S as we } from "./PaySubscriptions-DlV3SHOV.js";
8
- import { R as Ie } from "./ReferrerReferees-CGyMFl-K.js";
9
- import { a as N, u as he } from "./useAuthkitUsersProfile-KZgGxBAW.js";
10
- import { u as Ue, g as q } from "./auth-CDARHcht.js";
11
- import { c as Ae, A as Me } from "./AuthkitAuthModal-BvKac_TP.js";
12
- import { d as xe } from "./FeedbackModal-Dc9Pd_rr.js";
13
- import { M as Be } from "./MessageHandle-CVjGWgUL.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 U } from "./index-Cr5RQSnA.js";
19
- import { _ as J, g as Q, i as Z } from "./plugin-vue_export-helper-LjDO2Zua.js";
20
- import { Icon as De } from "@iconify/vue";
21
- const Pe = b({
22
- name: "IconExport",
23
- props: {
24
- size: {
25
- type: [Number, String]
26
- },
27
- strokeWidth: {
28
- type: Number,
29
- default: 4
30
- },
31
- strokeLinecap: {
32
- type: String,
33
- default: "butt",
34
- validator: (e) => ["butt", "round", "square"].includes(e)
35
- },
36
- strokeLinejoin: {
37
- type: String,
38
- default: "miter",
39
- validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
40
- },
41
- rotate: Number,
42
- spin: Boolean
43
- },
44
- emits: {
45
- click: (e) => !0
46
- },
47
- setup(e, {
48
- emit: t
49
- }) {
50
- const o = Q("icon"), i = B(() => [o, `${o}-export`, {
51
- [`${o}-spin`]: e.spin
52
- }]), c = B(() => {
53
- const s = {};
54
- return e.size && (s.fontSize = Z(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
55
- });
56
- return {
57
- cls: i,
58
- innerStyle: c,
59
- onClick: (s) => {
60
- t("click", s);
61
- }
62
- };
63
- }
64
- }), Ve = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
65
- function Re(e, t, o, i, c, f) {
66
- return u(), v("svg", {
67
- viewBox: "0 0 48 48",
68
- fill: "none",
69
- xmlns: "http://www.w3.org/2000/svg",
70
- stroke: "currentColor",
71
- class: K(e.cls),
72
- style: E(e.innerStyle),
73
- "stroke-width": e.strokeWidth,
74
- "stroke-linecap": e.strokeLinecap,
75
- "stroke-linejoin": e.strokeLinejoin,
76
- onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
77
- }, t[1] || (t[1] = [d("path", {
78
- d: "M31.928 33.072 41 24.002l-9.072-9.072M16.858 24h24M31 41H7V7h24"
79
- }, null, -1)]), 14, Ve);
80
- }
81
- var R = /* @__PURE__ */ J(Pe, [["render", Re]]);
82
- const ze = Object.assign(R, {
83
- install: (e, t) => {
84
- var o;
85
- const i = (o = t == null ? void 0 : t.iconPrefix) != null ? o : "";
86
- e.component(i + R.name, R);
87
- }
88
- }), Ne = b({
89
- name: "IconLaunch",
90
- props: {
91
- size: {
92
- type: [Number, String]
93
- },
94
- strokeWidth: {
95
- type: Number,
96
- default: 4
97
- },
98
- strokeLinecap: {
99
- type: String,
100
- default: "butt",
101
- validator: (e) => ["butt", "round", "square"].includes(e)
102
- },
103
- strokeLinejoin: {
104
- type: String,
105
- default: "miter",
106
- validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
107
- },
108
- rotate: Number,
109
- spin: Boolean
110
- },
111
- emits: {
112
- click: (e) => !0
113
- },
114
- setup(e, {
115
- emit: t
116
- }) {
117
- const o = Q("icon"), i = B(() => [o, `${o}-launch`, {
118
- [`${o}-spin`]: e.spin
119
- }]), c = B(() => {
120
- const s = {};
121
- return e.size && (s.fontSize = Z(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
122
- });
123
- return {
124
- cls: i,
125
- innerStyle: c,
126
- onClick: (s) => {
127
- t("click", s);
128
- }
129
- };
130
- }
131
- }), Le = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
132
- function Oe(e, t, o, i, c, f) {
133
- return u(), v("svg", {
134
- viewBox: "0 0 48 48",
135
- fill: "none",
136
- stroke: "currentColor",
137
- xmlns: "http://www.w3.org/2000/svg",
138
- class: K(e.cls),
139
- style: E(e.innerStyle),
140
- "stroke-width": e.strokeWidth,
141
- "stroke-linecap": e.strokeLinecap,
142
- "stroke-linejoin": e.strokeLinejoin,
143
- onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
144
- }, t[1] || (t[1] = [d("path", {
145
- 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"
146
- }, null, -1)]), 14, Le);
147
- }
148
- var z = /* @__PURE__ */ J(Ne, [["render", Oe]]);
149
- const je = Object.assign(z, {
150
- install: (e, t) => {
151
- var o;
152
- const i = (o = t == null ? void 0 : t.iconPrefix) != null ? o : "";
153
- e.component(i + z.name, z);
154
- }
155
- }), He = {
156
- class: "pricing"
157
- }, Fe = {
158
- class: "base"
159
- }, qe = {
160
- class: "pricingInfo"
161
- }, Ee = /* @__PURE__ */ b({
162
- __name: "UserSubscriptionBaseInformation",
163
- props: {
164
- currentVersionName: {
165
- type: String,
166
- required: !0
167
- },
168
- expireDate: {
169
- type: String,
170
- required: !0
171
- },
172
- canUpgrade: {
173
- type: Boolean,
174
- required: !0
175
- }
176
- },
177
- emits: ["upgradeHandle"],
178
- setup(e, {
179
- emit: t
180
- }) {
181
- const o = e, i = t;
182
- function c() {
183
- i("upgradeHandle");
184
- }
185
- return (f, s) => (u(), v("div", He, [d("div", Fe, [d("div", qe, [s[0] || (s[0] = d("span", null, "我的订阅:", -1)), r(n(Ce), {
186
- color: "arcoblue",
187
- style: {
188
- "border-radius": "6px"
189
- }
190
- }, {
191
- default: l(() => [k(S(o.currentVersionName), 1)]),
192
- _: 1
193
- })]), o.canUpgrade ? (u(), _(n(X), {
194
- key: 0,
195
- type: "primary",
196
- size: "mini",
197
- class: "updatePricing",
198
- onClick: c
199
- }, {
200
- default: l(() => [...s[1] || (s[1] = [k(" 升级 ", -1)])]),
201
- _: 1
202
- })) : P("", !0)]), d("span", null, "有效期至: " + S(o.expireDate), 1)]));
203
- }
204
- }), Ke = /* @__PURE__ */ I(Ee, [["__scopeId", "data-v-1e32fa72"]]), Te = {
205
- class: "userInfo"
206
- }, We = {
207
- key: 0,
208
- class: "userName"
209
- }, Xe = /* @__PURE__ */ b({
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, i) => (u(), v("div", Te, [t.nickname ? (u(), v("span", We, S(t.nickname), 1)) : P("", !0), r(n(Y), {
224
- "image-url": t.avatar,
225
- size: 32,
226
- "object-fit": "cover"
227
- }, null, 8, ["image-url"])]));
228
- }
229
- }), Ye = /* @__PURE__ */ I(Xe, [["__scopeId", "data-v-36643afe"]]), Ge = {
230
- class: "userInfo"
231
- }, Je = {
232
- class: "extra"
233
- }, Qe = {
234
- class: "userName"
235
- }, Ze = {
236
- class: "email"
237
- }, et = {
238
- key: 0,
239
- class: "referrerId"
240
- }, tt = /* @__PURE__ */ b({
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, i) => (u(), v("div", Ge, [r(n(Y), {
263
- "image-url": t.avatarUrl,
264
- size: 42,
265
- "object-fit": "cover"
266
- }, null, 8, ["image-url"]), d("div", Je, [d("span", Qe, S(t.nickname), 1), d("span", Ze, S(t.email), 1), t.referrerId ? (u(), v("span", et, " 邀请码:" + S(t.referrerId), 1)) : P("", !0)])]));
267
- }
268
- }), ot = /* @__PURE__ */ I(tt, [["__scopeId", "data-v-367449da"]]), nt = {
269
- class: "dropdownContent"
270
- }, st = {
271
- class: "header"
272
- }, rt = /* @__PURE__ */ b({
273
- __name: "UserButton",
274
- props: /* @__PURE__ */ D({
275
- position: {
276
- default: "bl"
277
- },
278
- dropdownOffsetX: {
279
- default: "0"
280
- },
281
- dropdownOffsetY: {
282
- default: "0"
283
- }
284
- }, {
285
- modelValue: {
286
- type: Boolean,
287
- default: !1
288
- },
289
- modelModifiers: {}
290
- }),
291
- emits: /* @__PURE__ */ D(["enterSystem", "toSignIn"], ["update:modelValue"]),
292
- setup(e, {
293
- emit: t
294
- }) {
295
- const o = e, i = t, {
296
- userProfile: c,
297
- isLoggedIn: f
298
- } = N();
299
- function s() {
300
- i("toSignIn");
301
- }
302
- const g = T(e, "modelValue");
303
- return ($, m) => n(f) ? (u(), _(n($e), {
304
- key: 1,
305
- popupVisible: g.value,
306
- "onUpdate:popupVisible": m[0] || (m[0] = (y) => g.value = y),
307
- class: "DropdownUserInfo",
308
- position: o.position,
309
- "popup-style": {
310
- "--dropdown-translate-x": o.dropdownOffsetX ?? "0",
311
- "--dropdown-translate-y": o.dropdownOffsetY ?? "0"
312
- }
313
- }, {
314
- content: l(() => {
315
- var y, A, M, h;
316
- return [d("div", nt, [d("div", st, [r(ot, {
317
- "avatar-url": (y = n(c)) == null ? void 0 : y.avatarUrl,
318
- nickname: (A = n(c)) == null ? void 0 : A.nickname,
319
- email: (M = n(c)) == null ? void 0 : M.email,
320
- "referrer-id": (h = n(c)) == null ? void 0 : h.referrerId
321
- }, null, 8, ["avatar-url", "nickname", "email", "referrer-id"]), r(Ke, {
322
- currentVersionName: "免费版本",
323
- "expire-date": "2025-01-01",
324
- "can-upgrade": !0
325
- })]), r(n(G), {
326
- style: {
327
- margin: "10px 0px"
328
- }
329
- }), W($.$slots, "DoptionList", {}, void 0, !0)])];
330
- }),
331
- default: l(() => {
332
- var y;
333
- return [r(Ye, {
334
- avatar: (y = n(c)) == null ? void 0 : y.avatarUrl
335
- }, null, 8, ["avatar"])];
336
- }),
337
- _: 3
338
- }, 8, ["popupVisible", "position", "popup-style"])) : (u(), _(n(X), {
339
- key: 0,
340
- type: "primary",
341
- class: "handle",
342
- onClick: s
343
- }, {
344
- default: l(() => [...m[1] || (m[1] = [k(" 登陆 ", -1)])]),
345
- _: 1
346
- }));
347
- }
348
- }), it = /* @__PURE__ */ I(rt, [["__scopeId", "data-v-ba98c4bf"]]), at = {
349
- class: "UserPanel"
350
- }, lt = /* @__PURE__ */ b({
351
- __name: "UserPanel",
352
- props: /* @__PURE__ */ D({
353
- position: {
354
- default: "br"
355
- },
356
- dropdownOffsetX: {
357
- default: "0"
358
- },
359
- dropdownOffsetY: {
360
- default: "0"
361
- }
362
- }, {
363
- modelValue: {
364
- type: Boolean,
365
- default: !1
366
- },
367
- modelModifiers: {}
368
- }),
369
- emits: /* @__PURE__ */ D(["toHomePage", "signOut", "signIn"], ["update:modelValue"]),
370
- setup(e, {
371
- emit: t
372
- }) {
373
- const o = e, i = p(), c = p(), f = p(Symbol("key")), s = t, {
374
- fetchUserProfile: g,
375
- clearUserProfile: $,
376
- isLoggedIn: m
377
- } = N(), {
378
- addSignInCallback: y,
379
- initializeAuth: A,
380
- clearAuth: M
381
- } = he();
382
- A() && g();
383
- const h = p(), L = p(Symbol("key")), O = p(), j = p(), ee = p(Symbol("key")), te = p(), oe = p(Symbol("key"));
384
- function ne(F) {
385
- const a = `https://ones.huyooo.com/AboutUsDetails?type=privacyPolicy&appId=${q.appId}`;
386
- window.open(a, "_blank");
387
- }
388
- function se(F) {
389
- const a = `https://ones.huyooo.com/AboutUsDetails?type=userServiceAgreement&appId=${q.appId}`;
390
- window.open(a, "_blank");
391
- }
392
- const {
393
- show: re
394
- } = Ue(), H = T(e, "modelValue");
395
- function ie() {
396
- L.value = Symbol("key");
397
- }
398
- const V = p(), x = p(Symbol("key"));
399
- function ae() {
400
- x.value = Symbol("key");
401
- }
402
- function le() {
403
- x.value = Symbol("key");
404
- }
405
- function w() {
406
- re.value = !0, s("signIn");
407
- }
408
- y(() => {
409
- g();
410
- });
411
- function ue() {
412
- f.value = Symbol("key");
413
- }
414
- function ce() {
415
- c.value.show = !1;
416
- }
417
- function de() {
418
- x.value = Symbol("key");
419
- }
420
- function pe() {
421
- V.value.setData(null, !0);
422
- }
423
- function fe() {
424
- if (!m.value) {
425
- w();
426
- return;
427
- }
428
- V.value.setData(null, !0);
429
- }
430
- function me() {
431
- if (!m.value) {
432
- w();
433
- return;
434
- }
435
- O.value.openNotification();
436
- }
437
- function ke() {
438
- if (!m.value) {
439
- w();
440
- return;
441
- }
442
- j.value.setData(null, !0);
443
- }
444
- function ve() {
445
- if (!m.value) {
446
- w();
447
- return;
448
- }
449
- i.value.setData(!0);
450
- }
451
- function ye() {
452
- if (!m.value) {
453
- w();
454
- return;
455
- }
456
- h.value.setData(!0);
457
- }
458
- function ge() {
459
- s("toHomePage");
460
- }
461
- async function _e() {
462
- $(), M(), s("signOut");
463
- }
464
- return (F, a) => (u(), v("div", at, [r(it, {
465
- modelValue: H.value,
466
- "onUpdate:modelValue": a[0] || (a[0] = (Se) => H.value = Se),
467
- position: o.position,
468
- "dropdown-offset-x": o.dropdownOffsetX,
469
- "dropdown-offset-y": o.dropdownOffsetY,
470
- onToSignIn: w
471
- }, {
472
- DoptionList: l(() => [r(n(C), {
473
- value: "messages",
474
- class: "Doption",
475
- onClick: me
476
- }, {
477
- icon: l(() => [...a[1] || (a[1] = [k("消息中心", -1)])]),
478
- default: l(() => [r(n(U))]),
479
- _: 1
480
- }), r(n(C), {
481
- value: "setting",
482
- class: "Doption",
483
- onClick: fe
484
- }, {
485
- icon: l(() => [...a[2] || (a[2] = [k("系统设置 ", -1)])]),
486
- default: l(() => [r(n(U))]),
487
- _: 1
488
- }), r(n(C), {
489
- value: "subscription",
490
- class: "Doption",
491
- onClick: ke
492
- }, {
493
- icon: l(() => [...a[3] || (a[3] = [k("订阅信息 ", -1)])]),
494
- default: l(() => [r(n(U))]),
495
- _: 1
496
- }), r(n(C), {
497
- value: "feedBack",
498
- class: "Doption",
499
- onClick: ve
500
- }, {
501
- icon: l(() => [...a[4] || (a[4] = [k("系统反馈 ", -1)])]),
502
- default: l(() => [r(n(U))]),
503
- _: 1
504
- }), r(n(C), {
505
- value: "invitations",
506
- class: "Doption",
507
- onClick: ye
508
- }, {
509
- icon: l(() => [...a[5] || (a[5] = [k("邀请 ", -1)])]),
510
- default: l(() => [r(n(U))]),
511
- _: 1
512
- }), r(n(G), {
513
- style: {
514
- margin: "10px 0px"
515
- }
516
- }), r(n(C), {
517
- value: "homePage",
518
- class: "Doption",
519
- onClick: ge
520
- }, {
521
- icon: l(() => [...a[6] || (a[6] = [k("主页 ", -1)])]),
522
- default: l(() => [r(n(je))]),
523
- _: 1
524
- }), r(n(C), {
525
- value: "signOut",
526
- class: "Doption",
527
- onClick: _e
528
- }, {
529
- icon: l(() => [...a[7] || (a[7] = [k("退出登陆 ", -1)])]),
530
- default: l(() => [r(n(ze))]),
531
- _: 1
532
- })]),
533
- _: 1
534
- }, 8, ["modelValue", "position", "dropdown-offset-x", "dropdown-offset-y"]), (u(), _(Ae, {
535
- ref_key: "AuthModalRef",
536
- ref: te,
537
- key: oe.value,
538
- size: "large",
539
- onToPrivacyPolicy: ne,
540
- onToUserServiceAgreement: se
541
- })), n(m) ? (u(), v(be, {
542
- key: 0
543
- }, [(u(), _(Me, {
544
- ref_key: "AppSettingRef",
545
- ref: V,
546
- key: x.value,
547
- onConfirm: pe,
548
- onCancel: de
549
- })), (u(), _(Ie, {
550
- ref_key: "RefereesRef",
551
- ref: h,
552
- key: L.value,
553
- onCancel: ie
554
- })), (u(), _(we, {
555
- ref_key: "SubscriptionsRef",
556
- ref: j,
557
- key: ee.value,
558
- title: "订阅详情",
559
- onConfirm: ae,
560
- onCancel: le
561
- })), r(Be, {
562
- ref_key: "MessageHandleRef",
563
- ref: O
564
- }, null, 512), (u(), _(xe, {
565
- ref_key: "FeedBackModalRef",
566
- ref: i,
567
- key: f.value,
568
- onConfirm: ce,
569
- onCancel: ue
570
- }))], 64)) : P("", !0)]));
571
- }
572
- }), Rt = /* @__PURE__ */ I(lt, [["__scopeId", "data-v-9bfab947"]]), ut = {
573
- class: "UserAccountMenu"
574
- }, ct = {
575
- class: "avatar"
576
- }, dt = {
577
- class: "meta"
578
- }, pt = {
579
- class: "name"
580
- }, ft = {
581
- class: "email"
582
- }, mt = /* @__PURE__ */ b({
583
- __name: "UserAccountMenu",
584
- emits: ["arrowClick"],
585
- setup(e, {
586
- emit: t
587
- }) {
588
- const {
589
- userProfile: o
590
- } = N(), i = t;
591
- function c() {
592
- i("arrowClick");
593
- }
594
- return (f, s) => {
595
- var g, $;
596
- return u(), v("div", ut, [d("div", ct, [W(f.$slots, "avatar", {}, void 0, !0)]), d("div", dt, [d("div", pt, S(((g = n(o)) == null ? void 0 : g.nickname) || ""), 1), d("div", ft, S((($ = n(o)) == null ? void 0 : $.email) || ""), 1)]), d("div", {
597
- class: "arrow",
598
- onClick: c
599
- }, [r(n(De), {
600
- icon: "lucide:chevrons-up-down"
601
- })])]);
602
- };
603
- }
604
- }), zt = /* @__PURE__ */ I(mt, [["__scopeId", "data-v-b801e222"]]);
605
- export {
606
- Ke as S,
607
- Ye as U,
608
- ot as a,
609
- it as b,
610
- Rt as c,
611
- zt as d
612
- };