@ftlab/one-vue3 0.1.6 → 0.2.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.
@@ -1,804 +0,0 @@
1
- var Fe = Object.defineProperty, Oe = Object.defineProperties;
2
- var Ve = Object.getOwnPropertyDescriptors;
3
- var fe = Object.getOwnPropertySymbols;
4
- var Re = Object.prototype.hasOwnProperty, ze = Object.prototype.propertyIsEnumerable;
5
- var pe = (e, t, o) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, W = (e, t) => {
6
- for (var o in t || (t = {}))
7
- Re.call(t, o) && pe(e, o, t[o]);
8
- if (fe)
9
- for (var o of fe(t))
10
- ze.call(t, o) && pe(e, o, t[o]);
11
- return e;
12
- }, X = (e, t) => Oe(e, Ve(t));
13
- var me = (e, t, o) => new Promise((s, l) => {
14
- var r = (a) => {
15
- try {
16
- i(o.next(a));
17
- } catch (f) {
18
- l(f);
19
- }
20
- }, c = (a) => {
21
- try {
22
- i(o.throw(a));
23
- } catch (f) {
24
- l(f);
25
- }
26
- }, i = (a) => a.done ? s(a.value) : Promise.resolve(a.value).then(r, c);
27
- i((o = o.apply(e, t)).next());
28
- });
29
- import { i as ce, a as ae, b as Ue, N as J, c as xe, d as He, e as Ee, t as Ye, u as te, h as ve, g as We, f as Xe, r as je, j as oe, k as Q, P as se, l as qe, m as Ke, F as Ge, E as Je, _ as ue, C as Ze, n as Qe, U as De, o as et, p as tt, q as ye, s as ot, v as nt, w as he, x as ge, y as st, z as Se, A as lt, B as at, D as it, G as rt, H as ct, I as ut, J as dt, K as ft } from "./index-919d1465.js";
30
- import { onMounted as Te, watchEffect as pt, onBeforeUnmount as mt, isRef as Me, watch as ie, onScopeDispose as vt, defineComponent as O, createVNode as N, renderSlot as S, h as yt, inject as ee, computed as $, openBlock as k, createElementBlock as H, unref as n, normalizeClass as D, normalizeStyle as de, createElementVNode as x, toDisplayString as j, withCtx as g, createBlock as Y, resolveDynamicComponent as ht, createCommentVNode as K, getCurrentInstance as gt, ref as T, nextTick as _t, useSlots as bt, provide as wt, Teleport as Ct, Transition as kt, withDirectives as Be, mergeProps as Et, createSlots as Dt, vShow as St, Fragment as Tt, renderList as Mt, createTextVNode as le } from "vue";
31
- import "pinia";
32
- let G;
33
- const Bt = (e) => {
34
- var t;
35
- if (!ce)
36
- return 0;
37
- if (G !== void 0)
38
- return G;
39
- const o = document.createElement("div");
40
- o.className = `${e}-scrollbar__wrap`, o.style.visibility = "hidden", o.style.width = "100px", o.style.position = "absolute", o.style.top = "-9999px", document.body.appendChild(o);
41
- const s = o.offsetWidth;
42
- o.style.overflow = "scroll";
43
- const l = document.createElement("div");
44
- l.style.width = "100%", o.appendChild(l);
45
- const r = l.offsetWidth;
46
- return (t = o.parentNode) == null || t.removeChild(o), G = s - r, G;
47
- }, Nt = (e, t, o) => {
48
- let s = {
49
- offsetX: 0,
50
- offsetY: 0
51
- };
52
- const l = (i) => {
53
- const a = i.clientX, f = i.clientY, { offsetX: m, offsetY: h } = s, u = e.value.getBoundingClientRect(), v = u.left, y = u.top, p = u.width, V = u.height, I = document.documentElement.clientWidth, A = document.documentElement.clientHeight, R = -v + m, L = -y + h, M = I - v - p + m, B = A - y - V + h, _ = (P) => {
54
- const d = Math.min(Math.max(m + P.clientX - a, R), M), E = Math.min(Math.max(h + P.clientY - f, L), B);
55
- s = {
56
- offsetX: d,
57
- offsetY: E
58
- }, e.value.style.transform = `translate(${ae(d)}, ${ae(E)})`;
59
- }, w = () => {
60
- document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", w);
61
- };
62
- document.addEventListener("mousemove", _), document.addEventListener("mouseup", w);
63
- }, r = () => {
64
- t.value && e.value && t.value.addEventListener("mousedown", l);
65
- }, c = () => {
66
- t.value && e.value && t.value.removeEventListener("mousedown", l);
67
- };
68
- Te(() => {
69
- pt(() => {
70
- o.value ? r() : c();
71
- });
72
- }), mt(() => {
73
- c();
74
- });
75
- };
76
- let $t;
77
- function It(e, t = $t) {
78
- t && t.active && t.effects.push(e);
79
- }
80
- const _e = (e) => {
81
- const t = new Set(e);
82
- return t.w = 0, t.n = 0, t;
83
- }, Ne = (e) => (e.w & F) > 0, $e = (e) => (e.n & F) > 0, At = ({ deps: e }) => {
84
- if (e.length)
85
- for (let t = 0; t < e.length; t++)
86
- e[t].w |= F;
87
- }, Lt = (e) => {
88
- const { deps: t } = e;
89
- if (t.length) {
90
- let o = 0;
91
- for (let s = 0; s < t.length; s++) {
92
- const l = t[s];
93
- Ne(l) && !$e(l) ? l.delete(e) : t[o++] = l, l.w &= ~F, l.n &= ~F;
94
- }
95
- t.length = o;
96
- }
97
- };
98
- let q = 0, F = 1;
99
- const re = 30;
100
- let b;
101
- Symbol(process.env.NODE_ENV !== "production" ? "iterate" : "");
102
- Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : "");
103
- class Pt {
104
- constructor(t, o = null, s) {
105
- this.fn = t, this.scheduler = o, this.active = !0, this.deps = [], this.parent = void 0, It(this, s);
106
- }
107
- run() {
108
- if (!this.active)
109
- return this.fn();
110
- let t = b, o = Z;
111
- for (; t; ) {
112
- if (t === this)
113
- return;
114
- t = t.parent;
115
- }
116
- try {
117
- return this.parent = b, b = this, Z = !0, F = 1 << ++q, q <= re ? At(this) : be(this), this.fn();
118
- } finally {
119
- q <= re && Lt(this), F = 1 << --q, b = this.parent, Z = o, this.parent = void 0, this.deferStop && this.stop();
120
- }
121
- }
122
- stop() {
123
- b === this ? this.deferStop = !0 : this.active && (be(this), this.onStop && this.onStop(), this.active = !1);
124
- }
125
- }
126
- function be(e) {
127
- const { deps: t } = e;
128
- if (t.length) {
129
- for (let o = 0; o < t.length; o++)
130
- t[o].delete(e);
131
- t.length = 0;
132
- }
133
- }
134
- let Z = !0;
135
- function we(e, t) {
136
- let o = !1;
137
- q <= re ? $e(e) || (e.n |= F, o = !Ne(e)) : o = !e.has(b), o && (e.add(b), b.deps.push(e), process.env.NODE_ENV !== "production" && b.onTrack && b.onTrack(
138
- Ee(
139
- {
140
- effect: b
141
- },
142
- t
143
- )
144
- ));
145
- }
146
- function Ce(e, t) {
147
- const o = He(e) ? e : [...e];
148
- for (const s of o)
149
- s.computed && ke(s, t);
150
- for (const s of o)
151
- s.computed || ke(s, t);
152
- }
153
- function ke(e, t) {
154
- (e !== b || e.allowRecurse) && (process.env.NODE_ENV !== "production" && e.onTrigger && e.onTrigger(Ee({ effect: e }, t)), e.scheduler ? e.scheduler() : e.run());
155
- }
156
- new Set(
157
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Ue)
158
- );
159
- function ne(e) {
160
- const t = e && e.__v_raw;
161
- return t ? ne(t) : e;
162
- }
163
- function Ft(e) {
164
- Z && b && (e = ne(e), process.env.NODE_ENV !== "production" ? we(e.dep || (e.dep = _e()), {
165
- target: e,
166
- type: "get",
167
- key: "value"
168
- }) : we(e.dep || (e.dep = _e())));
169
- }
170
- function Ot(e, t) {
171
- e = ne(e);
172
- const o = e.dep;
173
- o && (process.env.NODE_ENV !== "production" ? Ce(o, {
174
- target: e,
175
- type: "set",
176
- key: "value",
177
- newValue: t
178
- }) : Ce(o));
179
- }
180
- class Vt {
181
- constructor(t, o, s, l) {
182
- this._setter = o, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new Pt(t, () => {
183
- this._dirty || (this._dirty = !0, Ot(this));
184
- }), this.effect.computed = this, this.effect.active = this._cacheable = !l, this.__v_isReadonly = s;
185
- }
186
- get value() {
187
- const t = ne(this);
188
- return Ft(t), (t._dirty || !t._cacheable) && (t._dirty = !1, t._value = t.effect.run()), t._value;
189
- }
190
- set value(t) {
191
- this._setter(t);
192
- }
193
- }
194
- function Rt(e, t, o = !1) {
195
- let s, l;
196
- const r = xe(e);
197
- r ? (s = e, l = process.env.NODE_ENV !== "production" ? () => {
198
- console.warn("Write operation failed: computed value is readonly");
199
- } : J) : (s = e.get, l = e.set);
200
- const c = new Vt(s, l, r || !l, o);
201
- return process.env.NODE_ENV !== "production" && t && !o && (c.effect.onTrack = t.onTrack, c.effect.onTrigger = t.onTrigger), c;
202
- }
203
- const zt = (e, t = {}) => {
204
- Me(e) || Ye("[useLockscreen]", "You need to pass a ref param to this function");
205
- const o = t.ns || te("popup"), s = Rt(() => o.bm("parent", "hidden"));
206
- if (!ce || ve(document.body, s.value))
207
- return;
208
- let l = 0, r = !1, c = "0";
209
- const i = () => {
210
- setTimeout(() => {
211
- je(document == null ? void 0 : document.body, s.value), r && document && (document.body.style.width = c);
212
- }, 200);
213
- };
214
- ie(e, (a) => {
215
- if (!a) {
216
- i();
217
- return;
218
- }
219
- r = !ve(document.body, s.value), r && (c = document.body.style.width), l = Bt(o.namespace.value);
220
- const f = document.documentElement.clientHeight < document.body.scrollHeight, m = We(document.body, "overflowY");
221
- l > 0 && (f || m === "scroll") && r && (document.body.style.width = `calc(100% - ${l}px)`), Xe(document.body, s.value);
222
- }), vt(() => i());
223
- }, Ie = (e) => {
224
- if (!e)
225
- return { onClick: J, onMousedown: J, onMouseup: J };
226
- let t = !1, o = !1;
227
- return { onClick: (c) => {
228
- t && o && e(c), t = o = !1;
229
- }, onMousedown: (c) => {
230
- t = c.target === c.currentTarget;
231
- }, onMouseup: (c) => {
232
- o = c.target === c.currentTarget;
233
- } };
234
- }, Ut = oe({
235
- mask: {
236
- type: Boolean,
237
- default: !0
238
- },
239
- customMaskEvent: {
240
- type: Boolean,
241
- default: !1
242
- },
243
- overlayClass: {
244
- type: Q([
245
- String,
246
- Array,
247
- Object
248
- ])
249
- },
250
- zIndex: {
251
- type: Q([String, Number])
252
- }
253
- }), xt = {
254
- click: (e) => e instanceof MouseEvent
255
- }, Ht = "overlay";
256
- var Yt = O({
257
- name: "ElOverlay",
258
- props: Ut,
259
- emits: xt,
260
- setup(e, { slots: t, emit: o }) {
261
- const s = te(Ht), l = (a) => {
262
- o("click", a);
263
- }, { onClick: r, onMousedown: c, onMouseup: i } = Ie(e.customMaskEvent ? void 0 : l);
264
- return () => e.mask ? N("div", {
265
- class: [s.b(), e.overlayClass],
266
- style: {
267
- zIndex: e.zIndex
268
- },
269
- onClick: r,
270
- onMousedown: c,
271
- onMouseup: i
272
- }, [S(t, "default")], se.STYLE | se.CLASS | se.PROPS, ["onClick", "onMouseup", "onMousedown"]) : yt("div", {
273
- class: e.overlayClass,
274
- style: {
275
- zIndex: e.zIndex,
276
- position: "fixed",
277
- top: "0px",
278
- right: "0px",
279
- bottom: "0px",
280
- left: "0px"
281
- }
282
- }, [S(t, "default")]);
283
- }
284
- });
285
- const Wt = Yt, Ae = Symbol("dialogInjectionKey"), Le = oe({
286
- center: {
287
- type: Boolean,
288
- default: !1
289
- },
290
- alignCenter: {
291
- type: Boolean,
292
- default: !1
293
- },
294
- closeIcon: {
295
- type: qe
296
- },
297
- customClass: {
298
- type: String,
299
- default: ""
300
- },
301
- draggable: {
302
- type: Boolean,
303
- default: !1
304
- },
305
- fullscreen: {
306
- type: Boolean,
307
- default: !1
308
- },
309
- showClose: {
310
- type: Boolean,
311
- default: !0
312
- },
313
- title: {
314
- type: String,
315
- default: ""
316
- }
317
- }), Xt = {
318
- close: () => !0
319
- }, jt = ["aria-label"], qt = ["id"], Kt = O({ name: "ElDialogContent" }), Gt = /* @__PURE__ */ O(X(W({}, Kt), {
320
- props: Le,
321
- emits: Xt,
322
- setup(e) {
323
- const t = e, { t: o } = Ke(), { Close: s } = Ze, { dialogRef: l, headerRef: r, bodyId: c, ns: i, style: a } = ee(Ae), { focusTrapRef: f } = ee(Ge), m = Qe(f, l), h = $(() => t.draggable);
324
- return Nt(l, r, h), (u, v) => (k(), H("div", {
325
- ref: n(m),
326
- class: D([
327
- n(i).b(),
328
- n(i).is("fullscreen", u.fullscreen),
329
- n(i).is("draggable", n(h)),
330
- n(i).is("align-center", u.alignCenter),
331
- { [n(i).m("center")]: u.center },
332
- u.customClass
333
- ]),
334
- style: de(n(a)),
335
- tabindex: "-1"
336
- }, [
337
- x("header", {
338
- ref_key: "headerRef",
339
- ref: r,
340
- class: D(n(i).e("header"))
341
- }, [
342
- S(u.$slots, "header", {}, () => [
343
- x("span", {
344
- role: "heading",
345
- class: D(n(i).e("title"))
346
- }, j(u.title), 3)
347
- ]),
348
- u.showClose ? (k(), H("button", {
349
- key: 0,
350
- "aria-label": n(o)("el.dialog.close"),
351
- class: D(n(i).e("headerbtn")),
352
- type: "button",
353
- onClick: v[0] || (v[0] = (y) => u.$emit("close"))
354
- }, [
355
- N(n(Je), {
356
- class: D(n(i).e("close"))
357
- }, {
358
- default: g(() => [
359
- (k(), Y(ht(u.closeIcon || n(s))))
360
- ]),
361
- _: 1
362
- }, 8, ["class"])
363
- ], 10, jt)) : K("v-if", !0)
364
- ], 2),
365
- x("div", {
366
- id: n(c),
367
- class: D(n(i).e("body"))
368
- }, [
369
- S(u.$slots, "default")
370
- ], 10, qt),
371
- u.$slots.footer ? (k(), H("footer", {
372
- key: 0,
373
- class: D(n(i).e("footer"))
374
- }, [
375
- S(u.$slots, "footer")
376
- ], 2)) : K("v-if", !0)
377
- ], 6));
378
- }
379
- }));
380
- var Jt = /* @__PURE__ */ ue(Gt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);
381
- const Zt = oe(X(W({}, Le), {
382
- appendToBody: {
383
- type: Boolean,
384
- default: !1
385
- },
386
- beforeClose: {
387
- type: Q(Function)
388
- },
389
- destroyOnClose: {
390
- type: Boolean,
391
- default: !1
392
- },
393
- closeOnClickModal: {
394
- type: Boolean,
395
- default: !0
396
- },
397
- closeOnPressEscape: {
398
- type: Boolean,
399
- default: !0
400
- },
401
- lockScroll: {
402
- type: Boolean,
403
- default: !0
404
- },
405
- modal: {
406
- type: Boolean,
407
- default: !0
408
- },
409
- openDelay: {
410
- type: Number,
411
- default: 0
412
- },
413
- closeDelay: {
414
- type: Number,
415
- default: 0
416
- },
417
- top: {
418
- type: String
419
- },
420
- modelValue: {
421
- type: Boolean,
422
- default: !1
423
- },
424
- modalClass: String,
425
- width: {
426
- type: [String, Number]
427
- },
428
- zIndex: {
429
- type: Number
430
- },
431
- trapFocus: {
432
- type: Boolean,
433
- default: !1
434
- }
435
- })), Qt = {
436
- open: () => !0,
437
- opened: () => !0,
438
- close: () => !0,
439
- closed: () => !0,
440
- [De]: (e) => et(e),
441
- openAutoFocus: () => !0,
442
- closeAutoFocus: () => !0
443
- }, eo = (e, t) => {
444
- const s = gt().emit, { nextZIndex: l } = tt();
445
- let r = "";
446
- const c = ye(), i = ye(), a = T(!1), f = T(!1), m = T(!1), h = T(e.zIndex || l());
447
- let u, v;
448
- const y = ot("namespace", nt), p = $(() => {
449
- const C = {}, U = `--${y.value}-dialog`;
450
- return e.fullscreen || (e.top && (C[`${U}-margin-top`] = e.top), e.width && (C[`${U}-width`] = ae(e.width))), C;
451
- }), V = $(() => e.alignCenter ? { display: "flex" } : {});
452
- function I() {
453
- s("opened");
454
- }
455
- function A() {
456
- s("closed"), s(De, !1), e.destroyOnClose && (m.value = !1);
457
- }
458
- function R() {
459
- s("close");
460
- }
461
- function L() {
462
- v == null || v(), u == null || u(), e.openDelay && e.openDelay > 0 ? { stop: u } = he(() => w(), e.openDelay) : w();
463
- }
464
- function M() {
465
- u == null || u(), v == null || v(), e.closeDelay && e.closeDelay > 0 ? { stop: v } = he(() => P(), e.closeDelay) : P();
466
- }
467
- function B() {
468
- function C(U) {
469
- U || (f.value = !0, a.value = !1);
470
- }
471
- e.beforeClose ? e.beforeClose(C) : M();
472
- }
473
- function _() {
474
- e.closeOnClickModal && B();
475
- }
476
- function w() {
477
- ce && (a.value = !0);
478
- }
479
- function P() {
480
- a.value = !1;
481
- }
482
- function d() {
483
- s("openAutoFocus");
484
- }
485
- function E() {
486
- s("closeAutoFocus");
487
- }
488
- function z(C) {
489
- var U;
490
- ((U = C.detail) == null ? void 0 : U.focusReason) === "pointer" && C.preventDefault();
491
- }
492
- e.lockScroll && zt(a);
493
- function Pe() {
494
- e.closeOnPressEscape && B();
495
- }
496
- return ie(() => e.modelValue, (C) => {
497
- C ? (f.value = !1, L(), m.value = !0, h.value = e.zIndex ? h.value++ : l(), _t(() => {
498
- s("open"), t.value && (t.value.scrollTop = 0);
499
- })) : a.value && M();
500
- }), ie(() => e.fullscreen, (C) => {
501
- t.value && (C ? (r = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = r);
502
- }), Te(() => {
503
- e.modelValue && (a.value = !0, m.value = !0, L());
504
- }), {
505
- afterEnter: I,
506
- afterLeave: A,
507
- beforeLeave: R,
508
- handleClose: B,
509
- onModalClick: _,
510
- close: M,
511
- doClose: P,
512
- onOpenAutoFocus: d,
513
- onCloseAutoFocus: E,
514
- onCloseRequested: Pe,
515
- onFocusoutPrevented: z,
516
- titleId: c,
517
- bodyId: i,
518
- closed: f,
519
- style: p,
520
- overlayDialogStyle: V,
521
- rendered: m,
522
- visible: a,
523
- zIndex: h
524
- };
525
- }, to = ["aria-label", "aria-labelledby", "aria-describedby"], oo = O({
526
- name: "ElDialog",
527
- inheritAttrs: !1
528
- }), no = /* @__PURE__ */ O(X(W({}, oo), {
529
- props: Zt,
530
- emits: Qt,
531
- setup(e, { expose: t }) {
532
- const o = e, s = bt();
533
- ge({
534
- scope: "el-dialog",
535
- from: "the title slot",
536
- replacement: "the header slot",
537
- version: "3.0.0",
538
- ref: "https://element-plus.org/en-US/component/dialog.html#slots"
539
- }, $(() => !!s.title)), ge({
540
- scope: "el-dialog",
541
- from: "custom-class",
542
- replacement: "class",
543
- version: "2.3.0",
544
- ref: "https://element-plus.org/en-US/component/dialog.html#attributes",
545
- type: "Attribute"
546
- }, $(() => !!o.customClass));
547
- const l = te("dialog"), r = T(), c = T(), i = T(), {
548
- visible: a,
549
- titleId: f,
550
- bodyId: m,
551
- style: h,
552
- overlayDialogStyle: u,
553
- rendered: v,
554
- zIndex: y,
555
- afterEnter: p,
556
- afterLeave: V,
557
- beforeLeave: I,
558
- handleClose: A,
559
- onModalClick: R,
560
- onOpenAutoFocus: L,
561
- onCloseAutoFocus: M,
562
- onCloseRequested: B,
563
- onFocusoutPrevented: _
564
- } = eo(o, r);
565
- wt(Ae, {
566
- dialogRef: r,
567
- headerRef: c,
568
- bodyId: m,
569
- ns: l,
570
- rendered: v,
571
- style: h
572
- });
573
- const w = Ie(R), P = $(() => o.draggable && !o.fullscreen);
574
- return t({
575
- visible: a,
576
- dialogContentRef: i
577
- }), (d, E) => (k(), Y(Ct, {
578
- to: "body",
579
- disabled: !d.appendToBody
580
- }, [
581
- N(kt, {
582
- name: "dialog-fade",
583
- onAfterEnter: n(p),
584
- onAfterLeave: n(V),
585
- onBeforeLeave: n(I),
586
- persisted: ""
587
- }, {
588
- default: g(() => [
589
- Be(N(n(Wt), {
590
- "custom-mask-event": "",
591
- mask: d.modal,
592
- "overlay-class": d.modalClass,
593
- "z-index": n(y)
594
- }, {
595
- default: g(() => [
596
- x("div", {
597
- role: "dialog",
598
- "aria-modal": "true",
599
- "aria-label": d.title || void 0,
600
- "aria-labelledby": d.title ? void 0 : n(f),
601
- "aria-describedby": n(m),
602
- class: D(`${n(l).namespace.value}-overlay-dialog`),
603
- style: de(n(u)),
604
- onClick: E[0] || (E[0] = (...z) => n(w).onClick && n(w).onClick(...z)),
605
- onMousedown: E[1] || (E[1] = (...z) => n(w).onMousedown && n(w).onMousedown(...z)),
606
- onMouseup: E[2] || (E[2] = (...z) => n(w).onMouseup && n(w).onMouseup(...z))
607
- }, [
608
- N(n(st), {
609
- loop: "",
610
- trapped: n(a),
611
- "focus-start-el": "container",
612
- onFocusAfterTrapped: n(L),
613
- onFocusAfterReleased: n(M),
614
- onFocusoutPrevented: n(_),
615
- onReleaseRequested: n(B)
616
- }, {
617
- default: g(() => [
618
- n(v) ? (k(), Y(Jt, Et({
619
- key: 0,
620
- ref_key: "dialogContentRef",
621
- ref: i
622
- }, d.$attrs, {
623
- "custom-class": d.customClass,
624
- center: d.center,
625
- "align-center": d.alignCenter,
626
- "close-icon": d.closeIcon,
627
- draggable: n(P),
628
- fullscreen: d.fullscreen,
629
- "show-close": d.showClose,
630
- title: d.title,
631
- onClose: n(A)
632
- }), Dt({
633
- header: g(() => [
634
- d.$slots.title ? S(d.$slots, "title", { key: 1 }) : S(d.$slots, "header", {
635
- key: 0,
636
- close: n(A),
637
- titleId: n(f),
638
- titleClass: n(l).e("title")
639
- })
640
- ]),
641
- default: g(() => [
642
- S(d.$slots, "default")
643
- ]),
644
- _: 2
645
- }, [
646
- d.$slots.footer ? {
647
- name: "footer",
648
- fn: g(() => [
649
- S(d.$slots, "footer")
650
- ])
651
- } : void 0
652
- ]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "onClose"])) : K("v-if", !0)
653
- ]),
654
- _: 3
655
- }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
656
- ], 46, to)
657
- ]),
658
- _: 3
659
- }, 8, ["mask", "overlay-class", "z-index"]), [
660
- [St, n(a)]
661
- ])
662
- ]),
663
- _: 3
664
- }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
665
- ], 8, ["disabled"]));
666
- }
667
- }));
668
- var so = /* @__PURE__ */ ue(no, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);
669
- const lo = Se(so), ao = oe({
670
- direction: {
671
- type: String,
672
- values: ["horizontal", "vertical"],
673
- default: "horizontal"
674
- },
675
- contentPosition: {
676
- type: String,
677
- values: ["left", "center", "right"],
678
- default: "center"
679
- },
680
- borderStyle: {
681
- type: Q(String),
682
- default: "solid"
683
- }
684
- }), io = O({
685
- name: "ElDivider"
686
- }), ro = /* @__PURE__ */ O(X(W({}, io), {
687
- props: ao,
688
- setup(e) {
689
- const t = e, o = te("divider"), s = $(() => o.cssVar({
690
- "border-style": t.borderStyle
691
- }));
692
- return (l, r) => (k(), H("div", {
693
- class: D([n(o).b(), n(o).m(l.direction)]),
694
- style: de(n(s)),
695
- role: "separator"
696
- }, [
697
- l.$slots.default && l.direction !== "vertical" ? (k(), H("div", {
698
- key: 0,
699
- class: D([n(o).e("text"), n(o).is(l.contentPosition)])
700
- }, [
701
- S(l.$slots, "default")
702
- ], 2)) : K("v-if", !0)
703
- ], 6));
704
- }
705
- }));
706
- var co = /* @__PURE__ */ ue(ro, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);
707
- const uo = Se(co);
708
- const fo = { class: "dialog__title" }, po = ["innerHTML"], mo = /* @__PURE__ */ O({
709
- __name: "CheckMessageDialog",
710
- emits: ["preventHiddenDropdown"],
711
- setup(e, { expose: t, emit: o }) {
712
- const s = T(!1), l = ee("authBaseUrl"), r = ee("dialogI18n"), c = localStorage.getItem("token") || "", i = T(!1), a = T({}), f = {
713
- Authorization: `Bearer ${c}`
714
- }, m = $(
715
- () => `${l || lt.authBaseUrl || "https://gateway-staging.ftlapp.io"}/api/xpush/imm/userMessage/getUserMsgInfo`
716
- ), h = (y) => me(this, null, function* () {
717
- try {
718
- i.value = !0;
719
- const p = yield at.get(m.value, { headers: f, params: { msgId: y } });
720
- p && p.data && (a.value = p.data);
721
- } catch (p) {
722
- console.log(p);
723
- } finally {
724
- i.value = !1;
725
- }
726
- }), u = $(
727
- () => a.value.immAttachments && a.value.immAttachments.length !== 0
728
- ), v = (y) => {
729
- y && window.open(y, "_blank");
730
- };
731
- return t({
732
- open: (y) => {
733
- h(y), s.value = !0;
734
- }
735
- }), (y, p) => {
736
- const V = uo, I = it, A = rt, R = ct, L = ut, M = lo, B = dt;
737
- return k(), Y(M, {
738
- center: "",
739
- title: n(r).dialogTitleText,
740
- modelValue: n(s),
741
- "onUpdate:modelValue": p[1] || (p[1] = (_) => Me(s) ? s.value = _ : null),
742
- "append-to-body": "",
743
- model: !1,
744
- onClosed: p[2] || (p[2] = () => {
745
- y.$emit("preventHiddenDropdown");
746
- })
747
- }, {
748
- default: g(() => [
749
- x("header", fo, j(n(a).title), 1),
750
- N(V),
751
- Be(x("div", {
752
- innerHTML: n(a).content
753
- }, null, 8, po), [
754
- [B, n(i)]
755
- ]),
756
- x("footer", {
757
- class: D(["mt15", [n(u) ? "f-s-c" : "f-c-e"]])
758
- }, [
759
- n(u) ? (k(), Y(L, { key: 0 }, {
760
- dropdown: g(() => [
761
- N(R, null, {
762
- default: g(() => [
763
- (k(!0), H(Tt, null, Mt(n(a).immAttachments, (_) => (k(), Y(A, {
764
- key: _.fileDownloadUrl,
765
- onClick: () => v(_.fileDownloadUrl)
766
- }, {
767
- default: g(() => [
768
- le(j(_.fileName), 1)
769
- ]),
770
- _: 2
771
- }, 1032, ["onClick"]))), 128))
772
- ]),
773
- _: 1
774
- })
775
- ]),
776
- default: g(() => [
777
- N(I, null, {
778
- default: g(() => [
779
- le(j(n(r).downloadText), 1)
780
- ]),
781
- _: 1
782
- })
783
- ]),
784
- _: 1
785
- })) : K("", !0),
786
- N(I, {
787
- onClick: p[0] || (p[0] = (_) => s.value = !1)
788
- }, {
789
- default: g(() => [
790
- le(j(n(r).cancelButtonText), 1)
791
- ]),
792
- _: 1
793
- })
794
- ], 2)
795
- ]),
796
- _: 1
797
- }, 8, ["title", "modelValue"]);
798
- };
799
- }
800
- });
801
- const _o = /* @__PURE__ */ ft(mo, [["__scopeId", "data-v-b6d5935c"]]);
802
- export {
803
- _o as default
804
- };