@huyooo/ui 0.5.17 → 0.5.19

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.
@@ -1,579 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- /* empty css */
4
- /* empty css */
5
- import { defineComponent as S, createElementBlock as v, openBlock as u, normalizeStyle as q, normalizeClass as E, createElementVNode as f, computed as M, createBlock as g, createCommentVNode as D, createVNode as i, unref as n, withCtx as a, createTextVNode as m, toDisplayString as C, mergeModels as A, useModel as K, renderSlot as Se, ref as d, Fragment as be } from "vue";
6
- import { Tag as Ce, Button as T, Avatar as W, Dropdown as Ie, Divider as X, Doption as _ } from "@arco-design/web-vue";
7
- import { S as we } from "./PaySubscriptions-CnPLduJz.js";
8
- import { R as $e } from "./ReferrerReferees-B3Ek3gAn.js";
9
- import { a as Y, u as he } from "./useAuthkitUsersProfile-zbKT0W_h.js";
10
- import { u as Ue } from "./useAuthkitAuthModal-BpOmabWi.js";
11
- import { g as F } from "./globalConfig-C1YOJcxa.js";
12
- import { c as xe, A as Be } from "./AuthkitAuthModal-CPyOF0SH.js";
13
- import { d as Me } from "./FeedbackModal-5C17AhkV.js";
14
- import { M as Ae } from "./MessageHandle-thVNUp0p.js";
15
- /* empty css */
16
- /* empty css */
17
- import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- /* empty css */
19
- import { I as $ } from "./index-Cr5RQSnA.js";
20
- import { _ as G, g as J, i as Q } from "./plugin-vue_export-helper-LjDO2Zua.js";
21
- const De = S({
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 = J("icon"), l = M(() => [o, `${o}-export`, {
51
- [`${o}-spin`]: e.spin
52
- }]), c = M(() => {
53
- const r = {};
54
- return e.size && (r.fontSize = Q(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
55
- });
56
- return {
57
- cls: l,
58
- innerStyle: c,
59
- onClick: (r) => {
60
- t("click", r);
61
- }
62
- };
63
- }
64
- }), Pe = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
65
- function Ve(e, t, o, l, c, k) {
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: E(e.cls),
72
- style: q(e.innerStyle),
73
- "stroke-width": e.strokeWidth,
74
- "stroke-linecap": e.strokeLinecap,
75
- "stroke-linejoin": e.strokeLinejoin,
76
- onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
77
- }, t[1] || (t[1] = [f("path", {
78
- d: "M31.928 33.072 41 24.002l-9.072-9.072M16.858 24h24M31 41H7V7h24"
79
- }, null, -1)]), 14, Pe);
80
- }
81
- var R = /* @__PURE__ */ G(De, [["render", Ve]]);
82
- const Re = Object.assign(R, {
83
- install: (e, t) => {
84
- var o;
85
- const l = (o = t == null ? void 0 : t.iconPrefix) != null ? o : "";
86
- e.component(l + R.name, R);
87
- }
88
- }), ze = S({
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 = J("icon"), l = M(() => [o, `${o}-launch`, {
118
- [`${o}-spin`]: e.spin
119
- }]), c = M(() => {
120
- const r = {};
121
- return e.size && (r.fontSize = Q(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
122
- });
123
- return {
124
- cls: l,
125
- innerStyle: c,
126
- onClick: (r) => {
127
- t("click", r);
128
- }
129
- };
130
- }
131
- }), Ne = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
132
- function Le(e, t, o, l, c, k) {
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: E(e.cls),
139
- style: q(e.innerStyle),
140
- "stroke-width": e.strokeWidth,
141
- "stroke-linecap": e.strokeLinecap,
142
- "stroke-linejoin": e.strokeLinejoin,
143
- onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
144
- }, t[1] || (t[1] = [f("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, Ne);
147
- }
148
- var z = /* @__PURE__ */ G(ze, [["render", Le]]);
149
- const Oe = Object.assign(z, {
150
- install: (e, t) => {
151
- var o;
152
- const l = (o = t == null ? void 0 : t.iconPrefix) != null ? o : "";
153
- e.component(l + z.name, z);
154
- }
155
- }), je = {
156
- class: "pricing"
157
- }, He = {
158
- class: "base"
159
- }, Fe = {
160
- class: "pricingInfo"
161
- }, qe = /* @__PURE__ */ S({
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, l = t;
182
- function c() {
183
- l("upgradeHandle");
184
- }
185
- return (k, r) => (u(), v("div", je, [f("div", He, [f("div", Fe, [r[0] || (r[0] = f("span", null, "我的订阅:", -1)), i(n(Ce), {
186
- color: "arcoblue",
187
- style: {
188
- "border-radius": "6px"
189
- }
190
- }, {
191
- default: a(() => [m(C(o.currentVersionName), 1)]),
192
- _: 1
193
- })]), o.canUpgrade ? (u(), g(n(T), {
194
- key: 0,
195
- type: "primary",
196
- size: "mini",
197
- class: "updatePricing",
198
- onClick: c
199
- }, {
200
- default: a(() => [...r[1] || (r[1] = [m(" 升级 ", -1)])]),
201
- _: 1
202
- })) : D("", !0)]), f("span", null, "有效期至: " + C(o.expireDate), 1)]));
203
- }
204
- }), Ee = /* @__PURE__ */ h(qe, [["__scopeId", "data-v-1e32fa72"]]), Ke = {
205
- class: "userInfo"
206
- }, Te = {
207
- key: 0,
208
- class: "userName"
209
- }, We = /* @__PURE__ */ S({
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, l) => (u(), v("div", Ke, [t.nickname ? (u(), v("span", Te, C(t.nickname), 1)) : D("", !0), i(n(W), {
224
- "image-url": t.avatar,
225
- size: 32,
226
- "object-fit": "cover"
227
- }, null, 8, ["image-url"])]));
228
- }
229
- }), Xe = /* @__PURE__ */ h(We, [["__scopeId", "data-v-36643afe"]]), Ye = {
230
- class: "userInfo"
231
- }, Ge = {
232
- class: "extra"
233
- }, Je = {
234
- class: "userName"
235
- }, Qe = {
236
- class: "email"
237
- }, Ze = {
238
- key: 0,
239
- class: "referrerId"
240
- }, et = /* @__PURE__ */ S({
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, l) => (u(), v("div", Ye, [i(n(W), {
263
- "image-url": t.avatarUrl,
264
- size: 42,
265
- "object-fit": "cover"
266
- }, null, 8, ["image-url"]), f("div", Ge, [f("span", Je, C(t.nickname), 1), f("span", Qe, C(t.email), 1), t.referrerId ? (u(), v("span", Ze, " 邀请码:" + C(t.referrerId), 1)) : D("", !0)])]));
267
- }
268
- }), tt = /* @__PURE__ */ h(et, [["__scopeId", "data-v-367449da"]]), ot = {
269
- class: "dropdownContent"
270
- }, nt = {
271
- class: "header"
272
- }, rt = /* @__PURE__ */ S({
273
- __name: "UserButton",
274
- props: /* @__PURE__ */ A({
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__ */ A(["enterSystem", "toSignIn"], ["update:modelValue"]),
292
- setup(e, {
293
- emit: t
294
- }) {
295
- const o = e, l = t, {
296
- userProfile: c,
297
- isLoggedIn: k
298
- } = Y();
299
- function r() {
300
- l("toSignIn");
301
- }
302
- const I = K(e, "modelValue");
303
- return (P, p) => n(k) ? (u(), g(n(Ie), {
304
- key: 1,
305
- popupVisible: I.value,
306
- "onUpdate:popupVisible": p[0] || (p[0] = (y) => I.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: a(() => {
315
- var y, U, x, w;
316
- return [f("div", ot, [f("div", nt, [i(tt, {
317
- "avatar-url": (y = n(c)) == null ? void 0 : y.avatarUrl,
318
- nickname: (U = n(c)) == null ? void 0 : U.nickname,
319
- email: (x = n(c)) == null ? void 0 : x.email,
320
- "referrer-id": (w = n(c)) == null ? void 0 : w.referrerId
321
- }, null, 8, ["avatar-url", "nickname", "email", "referrer-id"]), i(Ee, {
322
- currentVersionName: "免费版本",
323
- "expire-date": "2025-01-01",
324
- "can-upgrade": !0
325
- })]), i(n(X), {
326
- style: {
327
- margin: "10px 0px"
328
- }
329
- }), Se(P.$slots, "DoptionList", {}, void 0, !0)])];
330
- }),
331
- default: a(() => {
332
- var y;
333
- return [i(Xe, {
334
- avatar: (y = n(c)) == null ? void 0 : y.avatarUrl
335
- }, null, 8, ["avatar"])];
336
- }),
337
- _: 3
338
- }, 8, ["popupVisible", "position", "popup-style"])) : (u(), g(n(T), {
339
- key: 0,
340
- type: "primary",
341
- class: "handle",
342
- onClick: r
343
- }, {
344
- default: a(() => [...p[1] || (p[1] = [m(" 登陆 ", -1)])]),
345
- _: 1
346
- }));
347
- }
348
- }), it = /* @__PURE__ */ h(rt, [["__scopeId", "data-v-ba98c4bf"]]), st = {
349
- class: "UserPanel"
350
- }, at = /* @__PURE__ */ S({
351
- __name: "UserPanel",
352
- props: /* @__PURE__ */ A({
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__ */ A(["toHomePage", "signOut", "signIn"], ["update:modelValue"]),
370
- setup(e, {
371
- emit: t
372
- }) {
373
- const o = e, l = d(), c = d(), k = d(Symbol("key")), r = t, {
374
- fetchUserProfile: I,
375
- clearUserProfile: P,
376
- isLoggedIn: p
377
- } = Y(), {
378
- addSignInCallback: y,
379
- initializeAuth: U,
380
- clearAuth: x
381
- } = he();
382
- U() && I();
383
- const w = d(), N = d(Symbol("key")), L = d(), O = d(), Z = d(Symbol("key")), ee = d(), te = d(Symbol("key"));
384
- function oe(H) {
385
- const s = `https://ones.huyooo.com/AboutUsDetails?type=privacyPolicy&appId=${F.appId}`;
386
- window.open(s, "_blank");
387
- }
388
- function ne(H) {
389
- const s = `https://ones.huyooo.com/AboutUsDetails?type=userServiceAgreement&appId=${F.appId}`;
390
- window.open(s, "_blank");
391
- }
392
- const {
393
- show: re
394
- } = Ue(), j = K(e, "modelValue");
395
- function ie() {
396
- N.value = Symbol("key");
397
- }
398
- const V = d(), B = d(Symbol("key"));
399
- function se() {
400
- B.value = Symbol("key");
401
- }
402
- function ae() {
403
- B.value = Symbol("key");
404
- }
405
- function b() {
406
- re.value = !0, r("signIn");
407
- }
408
- y(() => {
409
- I();
410
- });
411
- function le() {
412
- k.value = Symbol("key");
413
- }
414
- function ue() {
415
- c.value.show = !1;
416
- }
417
- function ce() {
418
- B.value = Symbol("key");
419
- }
420
- function de() {
421
- V.value.setData(null, !0);
422
- }
423
- function pe() {
424
- if (!p.value) {
425
- b();
426
- return;
427
- }
428
- V.value.setData(null, !0);
429
- }
430
- function fe() {
431
- if (!p.value) {
432
- b();
433
- return;
434
- }
435
- L.value.openNotification();
436
- }
437
- function me() {
438
- if (!p.value) {
439
- b();
440
- return;
441
- }
442
- O.value.setData(null, !0);
443
- }
444
- function ke() {
445
- if (!p.value) {
446
- b();
447
- return;
448
- }
449
- l.value.setData(!0);
450
- }
451
- function ye() {
452
- if (!p.value) {
453
- b();
454
- return;
455
- }
456
- w.value.setData(!0);
457
- }
458
- function ve() {
459
- r("toHomePage");
460
- }
461
- async function ge() {
462
- P(), x(), r("signOut");
463
- }
464
- return (H, s) => (u(), v("div", st, [i(it, {
465
- modelValue: j.value,
466
- "onUpdate:modelValue": s[0] || (s[0] = (_e) => j.value = _e),
467
- position: o.position,
468
- "dropdown-offset-x": o.dropdownOffsetX,
469
- "dropdown-offset-y": o.dropdownOffsetY,
470
- onToSignIn: b
471
- }, {
472
- DoptionList: a(() => [i(n(_), {
473
- value: "messages",
474
- class: "Doption",
475
- onClick: fe
476
- }, {
477
- icon: a(() => [...s[1] || (s[1] = [m("消息中心", -1)])]),
478
- default: a(() => [i(n($))]),
479
- _: 1
480
- }), i(n(_), {
481
- value: "setting",
482
- class: "Doption",
483
- onClick: pe
484
- }, {
485
- icon: a(() => [...s[2] || (s[2] = [m("系统设置 ", -1)])]),
486
- default: a(() => [i(n($))]),
487
- _: 1
488
- }), i(n(_), {
489
- value: "subscription",
490
- class: "Doption",
491
- onClick: me
492
- }, {
493
- icon: a(() => [...s[3] || (s[3] = [m("订阅信息 ", -1)])]),
494
- default: a(() => [i(n($))]),
495
- _: 1
496
- }), i(n(_), {
497
- value: "feedBack",
498
- class: "Doption",
499
- onClick: ke
500
- }, {
501
- icon: a(() => [...s[4] || (s[4] = [m("系统反馈 ", -1)])]),
502
- default: a(() => [i(n($))]),
503
- _: 1
504
- }), i(n(_), {
505
- value: "invitations",
506
- class: "Doption",
507
- onClick: ye
508
- }, {
509
- icon: a(() => [...s[5] || (s[5] = [m("邀请 ", -1)])]),
510
- default: a(() => [i(n($))]),
511
- _: 1
512
- }), i(n(X), {
513
- style: {
514
- margin: "10px 0px"
515
- }
516
- }), i(n(_), {
517
- value: "homePage",
518
- class: "Doption",
519
- onClick: ve
520
- }, {
521
- icon: a(() => [...s[6] || (s[6] = [m("主页 ", -1)])]),
522
- default: a(() => [i(n(Oe))]),
523
- _: 1
524
- }), i(n(_), {
525
- value: "signOut",
526
- class: "Doption",
527
- onClick: ge
528
- }, {
529
- icon: a(() => [...s[7] || (s[7] = [m("退出登陆 ", -1)])]),
530
- default: a(() => [i(n(Re))]),
531
- _: 1
532
- })]),
533
- _: 1
534
- }, 8, ["modelValue", "position", "dropdown-offset-x", "dropdown-offset-y"]), (u(), g(xe, {
535
- ref_key: "AuthModalRef",
536
- ref: ee,
537
- key: te.value,
538
- size: "large",
539
- onToPrivacyPolicy: oe,
540
- onToUserServiceAgreement: ne
541
- })), n(p) ? (u(), v(be, {
542
- key: 0
543
- }, [(u(), g(Be, {
544
- ref_key: "AppSettingRef",
545
- ref: V,
546
- key: B.value,
547
- onConfirm: de,
548
- onCancel: ce
549
- })), (u(), g($e, {
550
- ref_key: "RefereesRef",
551
- ref: w,
552
- key: N.value,
553
- onCancel: ie
554
- })), (u(), g(we, {
555
- ref_key: "SubscriptionsRef",
556
- ref: O,
557
- key: Z.value,
558
- title: "订阅详情",
559
- onConfirm: se,
560
- onCancel: ae
561
- })), i(Ae, {
562
- ref_key: "MessageHandleRef",
563
- ref: L
564
- }, null, 512), (u(), g(Me, {
565
- ref_key: "FeedBackModalRef",
566
- ref: l,
567
- key: k.value,
568
- onConfirm: ue,
569
- onCancel: le
570
- }))], 64)) : D("", !0)]));
571
- }
572
- }), xt = /* @__PURE__ */ h(at, [["__scopeId", "data-v-9bfab947"]]);
573
- export {
574
- Ee as S,
575
- Xe as U,
576
- tt as a,
577
- it as b,
578
- xt as c
579
- };