@opentiny/tiny-robot 0.2.0-alpha.8 → 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.
- package/dist/close.js +1 -1
- package/dist/dropdown-menu/index.js +49 -51
- package/dist/index.d.ts +16 -16
- package/dist/index2.js +37 -37
- package/dist/index3.js +3717 -129
- package/dist/index4.js +7 -7
- package/dist/index5.js +2011 -931
- package/dist/index6.js +875 -1001
- package/dist/sender/index.js +933 -844
- package/dist/style.css +1 -1
- package/dist/suggestion-popover/index.js +113 -117
- package/package.json +3 -3
package/dist/index5.js
CHANGED
|
@@ -1,89 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { createElementBlock as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
onBeforeUnmount: t,
|
|
11
|
-
watch: n,
|
|
12
|
-
vm: o,
|
|
13
|
-
api: l,
|
|
14
|
-
props: i,
|
|
15
|
-
state: a,
|
|
16
|
-
nextTick: s
|
|
17
|
-
}) => {
|
|
18
|
-
e(() => {
|
|
19
|
-
o._popupId = `popup-${Ne++}`, M.register(o._popupId, o);
|
|
20
|
-
}), t(() => {
|
|
21
|
-
M.deregister(o._popupId), M.closeModal(o._popupId);
|
|
22
|
-
}), n(
|
|
23
|
-
() => i.visible,
|
|
24
|
-
(r) => {
|
|
25
|
-
if (r) {
|
|
26
|
-
if (o._opening)
|
|
27
|
-
return;
|
|
28
|
-
a.rendered ? l.open() : (a.rendered = !0, s(() => {
|
|
29
|
-
l.open();
|
|
30
|
-
}));
|
|
31
|
-
} else
|
|
32
|
-
l.close();
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}, xe = ({ state: e, vm: t }) => (n) => {
|
|
36
|
-
e.rendered || (e.rendered = !0);
|
|
37
|
-
const o = Ie({}, t.$props || t, n);
|
|
38
|
-
t._closeTimer && (clearTimeout(t._closeTimer), t._closeTimer = null), clearTimeout(t._openTimer);
|
|
39
|
-
const l = () => {
|
|
40
|
-
if (le || e.opened)
|
|
41
|
-
return;
|
|
42
|
-
t._opening = !0;
|
|
43
|
-
const a = t.$el, s = o.modal, r = o.zIndex;
|
|
44
|
-
r && (M.zIndex = r), s && (t._closing && (M.closeModal(t._popupId), t._closing = !1), M.openModal(
|
|
45
|
-
t._popupId,
|
|
46
|
-
M.nextZIndex(),
|
|
47
|
-
o.modalAppendToBody ? void 0 : a,
|
|
48
|
-
o.modalClass,
|
|
49
|
-
o.modalFade
|
|
50
|
-
), o.lockScroll && (M.fixBodyBorder(), ye(document.body, M.popLockClass))), getComputedStyle(a).position === "static" && (a.style.position = "absolute"), a.style.zIndex = M.nextZIndex().toString(), e.opened = !0, t._opening = !1;
|
|
51
|
-
}, i = Number(o.openDelay);
|
|
52
|
-
i > 0 ? t._openTimer = setTimeout(() => {
|
|
53
|
-
t._openTimer = null, l();
|
|
54
|
-
}, i) : l();
|
|
55
|
-
}, Fe = ({ state: e, vm: t }) => () => {
|
|
56
|
-
t._openTimer !== null && (clearTimeout(t._openTimer), t._openTimer = null), clearTimeout(t._closeTimer);
|
|
57
|
-
const n = () => {
|
|
58
|
-
t._closing = !0, e.opened = !1, M.closeModal(t._popupId), t._closing = !1;
|
|
59
|
-
}, o = Number(t.closeDelay);
|
|
60
|
-
o > 0 ? t._closeTimer = setTimeout(() => {
|
|
61
|
-
t._closeTimer = null, n();
|
|
62
|
-
}, o) : n();
|
|
63
|
-
}, He = (e) => {
|
|
64
|
-
const { api: t, nextTick: n, onBeforeUnmount: o, onMounted: l, props: i, reactive: a, toRefs: s, vm: r, watch: u } = e, f = a({
|
|
65
|
-
opened: !1,
|
|
66
|
-
rendered: !1
|
|
67
|
-
});
|
|
68
|
-
Pe({ onMounted: l, onBeforeUnmount: o, watch: u, vm: r, api: t, props: i, state: f, nextTick: n });
|
|
69
|
-
const c = xe({ state: f, vm: r }), d = Fe({ state: f, vm: r });
|
|
70
|
-
return { open: c, close: d, PopupManager: M, ...s(f) };
|
|
71
|
-
};
|
|
72
|
-
var We = Object.defineProperty, Ue = Object.defineProperties, Re = Object.getOwnPropertyDescriptors, ue = Object.getOwnPropertySymbols, je = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, de = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, U = (e, t) => {
|
|
73
|
-
for (var n in t || (t = {}))
|
|
74
|
-
je.call(t, n) && de(e, n, t[n]);
|
|
75
|
-
if (ue)
|
|
76
|
-
for (var n of ue(t))
|
|
77
|
-
Ge.call(t, n) && de(e, n, t[n]);
|
|
1
|
+
import { s as oe, o as ot, a as I, b as D, d as nt, c as R, r as J, i as je, t as rt, e as Ue, g as lt, f as U, h as it, j as ce, k as st, l as at, m as pe, $ as j, p as ut, n as pt, q as de, u as Te, v as dt, w as ft, x as Je, B as ct, y as mt } from "./index3.js";
|
|
2
|
+
import * as xe from "vue";
|
|
3
|
+
import { createElementBlock as b, openBlock as h, createElementVNode as _, withDirectives as ue, createVNode as H, vShow as ve, resolveComponent as z, createBlock as k, Transition as we, withCtx as F, withModifiers as Se, normalizeClass as te, createCommentVNode as O, normalizeStyle as ht, renderSlot as L, toDisplayString as x, resolveDirective as yt, mergeProps as me, Fragment as Ce, resolveDynamicComponent as Y, createTextVNode as De, withKeys as gt, renderList as bt } from "vue";
|
|
4
|
+
var vt = Object.defineProperty, wt = Object.defineProperties, St = Object.getOwnPropertyDescriptors, ke = Object.getOwnPropertySymbols, Ct = Object.prototype.hasOwnProperty, Ot = Object.prototype.propertyIsEnumerable, Pe = (e, t, o) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, V = (e, t) => {
|
|
5
|
+
for (var o in t || (t = {}))
|
|
6
|
+
Ct.call(t, o) && Pe(e, o, t[o]);
|
|
7
|
+
if (ke)
|
|
8
|
+
for (var o of ke(t))
|
|
9
|
+
Ot.call(t, o) && Pe(e, o, t[o]);
|
|
78
10
|
return e;
|
|
79
|
-
},
|
|
11
|
+
}, Ge = (e, t) => wt(e, St(t));
|
|
12
|
+
const ie = {
|
|
13
|
+
Escape: 27,
|
|
14
|
+
ArrowUp: 38,
|
|
15
|
+
ArrowDown: 40,
|
|
16
|
+
NumpadEnter: 13
|
|
17
|
+
};
|
|
18
|
+
var _t = {
|
|
19
|
+
viewBox: "0 0 16 16",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
+
}, Mt = /* @__PURE__ */ _(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
d: "M12.49 3.3a.5.5 0 0 1 .05.62L8.58 7.89l3.91 3.88c.21.19.23.48.05.71-.17.19-.49.24-.71.06L7.88 8.58 4 12.49c-.18.17-.5.18-.68.01a.496.496 0 0 1-.08-.67l3.93-3.94L3.29 4a.524.524 0 0 1 .04-.71c.17-.14.42-.16.58-.05l3.97 3.93 3.9-3.87c.18-.22.51-.22.71 0Z",
|
|
25
|
+
"fill-rule": "evenodd"
|
|
26
|
+
},
|
|
27
|
+
null,
|
|
28
|
+
-1
|
|
29
|
+
/* HOISTED */
|
|
30
|
+
), Et = [Mt];
|
|
31
|
+
function Bt(e, t) {
|
|
32
|
+
return h(), b("svg", _t, [].concat(Et));
|
|
33
|
+
}
|
|
34
|
+
var It = {
|
|
35
|
+
render: Bt
|
|
36
|
+
}, Ke = function() {
|
|
37
|
+
return oe({
|
|
38
|
+
name: "IconClose",
|
|
39
|
+
component: It
|
|
40
|
+
})();
|
|
41
|
+
}, Tt = {
|
|
80
42
|
xmlns: "http://www.w3.org/2000/svg",
|
|
81
43
|
viewBox: "0 0 16 16",
|
|
82
44
|
style: {
|
|
83
45
|
"enable-background": "new 0 0 16 16"
|
|
84
46
|
},
|
|
85
47
|
"xml:space": "preserve"
|
|
86
|
-
},
|
|
48
|
+
}, $t = /* @__PURE__ */ _(
|
|
87
49
|
"rect",
|
|
88
50
|
{
|
|
89
51
|
style: {
|
|
@@ -93,7 +55,7 @@ var We = Object.defineProperty, Ue = Object.defineProperties, Re = Object.getOwn
|
|
|
93
55
|
null,
|
|
94
56
|
-1
|
|
95
57
|
/* HOISTED */
|
|
96
|
-
),
|
|
58
|
+
), xt = /* @__PURE__ */ _(
|
|
97
59
|
"path",
|
|
98
60
|
{
|
|
99
61
|
d: "m3.49 5.21.72.72-.23.18c-.16.13-.3.27-.46.4l-.25.23c-.39.39-.75.79-1.05 1.2L2.16 8l-.05.06-.17.24.28.38.19.24c.33.4.7.8 1.1 1.19l.18.16c1.32 1.18 2.78 1.87 4.32 1.87h.23c.61-.02 1.21-.17 1.78-.4l.76.76-.22.1c-.81.35-1.67.55-2.56.55h-.22c-1.81-.06-3.47-.92-4.95-2.29l-.27-.25c-.42-.42-.81-.86-1.15-1.3l-.04-.09-.05-.06-.17-.24-.14-.19-.1-.16-.04-.07a.5.5 0 0 1 0-.38l.04-.08.1-.16.13-.19.17-.24.1-.13.21-.27c.35-.44.76-.87 1.2-1.28.22-.19.44-.39.67-.56zm.27-2.35h.07c.1.01.19.06.28.15l1.12 1.12c.88-.42 1.8-.65 2.77-.65h.23c1.81.06 3.47.92 4.95 2.29l.27.25c.42.42.81.86 1.15 1.3l.05.07.05.06.17.24.13.19.1.16.04.07c.05.12.05.25.01.38l-.05.09-.1.16-.13.19-.17.25-.1.13-.2.27c-.35.44-.76.87-1.2 1.28l-.24.22c-.13.12-.28.24-.42.35l.79.79.05.06c.15.19.13.47-.05.65l-.06.05c-.19.15-.47.13-.65-.05l-.94-.93-.73-.73-1.33-1.33-.21-.22-6-6.01-.05-.06c-.15-.2-.14-.47.05-.66a.52.52 0 0 1 .35-.13zM5.3 7.02l.78.78-.03.12c-.03.13-.04.25-.04.38v.12c.05 1.06.92 1.88 1.99 1.88h.13c.13-.01.25-.04.39-.06l.78.78-.15.06c-.35.15-.74.23-1.14.23h-.14a2.993 2.993 0 0 1-2.86-2.99c-.02-.48.09-.91.29-1.3zM8 4.47h-.22c-.62.03-1.21.16-1.79.4l.73.73c.39-.18.82-.29 1.3-.29h.15c1.59.07 2.86 1.38 2.86 2.99v.17c-.02.4-.12.79-.29 1.13l1.09 1.09c.23-.18.46-.38.69-.59l.24-.23c.39-.39.75-.79 1.05-1.2l.05-.06.05-.06.18-.25-.28-.38-.19-.24c-.33-.4-.7-.8-1.1-1.19l-.18-.16C10.98 5.16 9.54 4.47 8 4.47zM8 6.3h-.13c-.14.02-.26.03-.38.06l2.45 2.45c.05-.17.07-.34.07-.52v-.12A2.02 2.02 0 0 0 8 6.3z"
|
|
@@ -101,25 +63,25 @@ var We = Object.defineProperty, Ue = Object.defineProperties, Re = Object.getOwn
|
|
|
101
63
|
null,
|
|
102
64
|
-1
|
|
103
65
|
/* HOISTED */
|
|
104
|
-
),
|
|
105
|
-
function
|
|
106
|
-
return
|
|
66
|
+
), Dt = [$t, xt];
|
|
67
|
+
function kt(e, t) {
|
|
68
|
+
return h(), b("svg", Tt, [].concat(Dt));
|
|
107
69
|
}
|
|
108
|
-
var
|
|
109
|
-
render:
|
|
110
|
-
},
|
|
111
|
-
return
|
|
70
|
+
var Pt = {
|
|
71
|
+
render: kt
|
|
72
|
+
}, Vt = function() {
|
|
73
|
+
return oe({
|
|
112
74
|
name: "IconEyeclose",
|
|
113
|
-
component:
|
|
75
|
+
component: Pt
|
|
114
76
|
})();
|
|
115
|
-
},
|
|
77
|
+
}, At = {
|
|
116
78
|
xmlns: "http://www.w3.org/2000/svg",
|
|
117
79
|
viewBox: "0 0 16 16",
|
|
118
80
|
style: {
|
|
119
81
|
"enable-background": "new 0 0 16 16"
|
|
120
82
|
},
|
|
121
83
|
"xml:space": "preserve"
|
|
122
|
-
},
|
|
84
|
+
}, Lt = /* @__PURE__ */ _(
|
|
123
85
|
"rect",
|
|
124
86
|
{
|
|
125
87
|
style: {
|
|
@@ -129,7 +91,7 @@ var qe = {
|
|
|
129
91
|
null,
|
|
130
92
|
-1
|
|
131
93
|
/* HOISTED */
|
|
132
|
-
),
|
|
94
|
+
), Nt = /* @__PURE__ */ _(
|
|
133
95
|
"path",
|
|
134
96
|
{
|
|
135
97
|
class: "eyeopen_svg__st1",
|
|
@@ -138,22 +100,22 @@ var qe = {
|
|
|
138
100
|
null,
|
|
139
101
|
-1
|
|
140
102
|
/* HOISTED */
|
|
141
|
-
),
|
|
142
|
-
function
|
|
143
|
-
return
|
|
103
|
+
), Ft = [Lt, Nt];
|
|
104
|
+
function zt(e, t) {
|
|
105
|
+
return h(), b("svg", At, [].concat(Ft));
|
|
144
106
|
}
|
|
145
|
-
var
|
|
146
|
-
render:
|
|
147
|
-
},
|
|
148
|
-
return
|
|
107
|
+
var Ht = {
|
|
108
|
+
render: zt
|
|
109
|
+
}, Wt = function() {
|
|
110
|
+
return oe({
|
|
149
111
|
name: "IconEyeopen",
|
|
150
|
-
component:
|
|
112
|
+
component: Ht
|
|
151
113
|
})();
|
|
152
|
-
},
|
|
114
|
+
}, Rt = {
|
|
153
115
|
xmlns: "http://www.w3.org/2000/svg",
|
|
154
116
|
viewBox: "0 0 24 24",
|
|
155
117
|
"xml:space": "preserve"
|
|
156
|
-
},
|
|
118
|
+
}, jt = /* @__PURE__ */ _(
|
|
157
119
|
"path",
|
|
158
120
|
{
|
|
159
121
|
class: "fullscreen_svg__st0",
|
|
@@ -162,22 +124,22 @@ var it = {
|
|
|
162
124
|
null,
|
|
163
125
|
-1
|
|
164
126
|
/* HOISTED */
|
|
165
|
-
),
|
|
166
|
-
function
|
|
167
|
-
return
|
|
127
|
+
), Ut = [jt];
|
|
128
|
+
function Jt(e, t) {
|
|
129
|
+
return h(), b("svg", Rt, [].concat(Ut));
|
|
168
130
|
}
|
|
169
|
-
var
|
|
170
|
-
render:
|
|
171
|
-
},
|
|
172
|
-
return
|
|
131
|
+
var Gt = {
|
|
132
|
+
render: Jt
|
|
133
|
+
}, Kt = function() {
|
|
134
|
+
return oe({
|
|
173
135
|
name: "IconFullscreen",
|
|
174
|
-
component:
|
|
136
|
+
component: Gt
|
|
175
137
|
})();
|
|
176
|
-
},
|
|
138
|
+
}, Yt = {
|
|
177
139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
178
140
|
viewBox: "0 0 24 24",
|
|
179
141
|
"xml:space": "preserve"
|
|
180
|
-
},
|
|
142
|
+
}, Xt = /* @__PURE__ */ _(
|
|
181
143
|
"path",
|
|
182
144
|
{
|
|
183
145
|
class: "minscreen_svg__st0",
|
|
@@ -186,22 +148,22 @@ var pt = {
|
|
|
186
148
|
null,
|
|
187
149
|
-1
|
|
188
150
|
/* HOISTED */
|
|
189
|
-
),
|
|
190
|
-
function
|
|
191
|
-
return
|
|
151
|
+
), Zt = [Xt];
|
|
152
|
+
function qt(e, t) {
|
|
153
|
+
return h(), b("svg", Yt, [].concat(Zt));
|
|
192
154
|
}
|
|
193
|
-
var
|
|
194
|
-
render:
|
|
195
|
-
},
|
|
196
|
-
return
|
|
155
|
+
var Qt = {
|
|
156
|
+
render: qt
|
|
157
|
+
}, eo = function() {
|
|
158
|
+
return oe({
|
|
197
159
|
name: "IconMinscreen",
|
|
198
|
-
component:
|
|
160
|
+
component: Qt
|
|
199
161
|
})();
|
|
200
162
|
};
|
|
201
|
-
const
|
|
163
|
+
const to = `
|
|
202
164
|
height:0 !important;visibility:hidden !important;overflow:hidden !important;
|
|
203
165
|
position:absolute !important;z-index:-1000 !important;top:0 !important;right:0 !important
|
|
204
|
-
`,
|
|
166
|
+
`, oo = [
|
|
205
167
|
"width",
|
|
206
168
|
"line-height",
|
|
207
169
|
"padding-top",
|
|
@@ -217,7 +179,7 @@ position:absolute !important;z-index:-1000 !important;top:0 !important;right:0 !
|
|
|
217
179
|
"text-rendering",
|
|
218
180
|
"text-transform",
|
|
219
181
|
"text-indent"
|
|
220
|
-
],
|
|
182
|
+
], N = {
|
|
221
183
|
BoxSizing: "box-sizing",
|
|
222
184
|
BorderBox: "border-box",
|
|
223
185
|
ContentBox: "content-box",
|
|
@@ -225,234 +187,234 @@ position:absolute !important;z-index:-1000 !important;top:0 !important;right:0 !
|
|
|
225
187
|
PaddingBottom: "padding-bottom",
|
|
226
188
|
BorderTopWidth: "border-top-width",
|
|
227
189
|
BorderBottomWidth: "border-bottom-width"
|
|
228
|
-
},
|
|
190
|
+
}, no = typeof window > "u", ro = (e) => /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(e), lo = (e) => () => {
|
|
229
191
|
if (e.inputDisabled)
|
|
230
192
|
return !1;
|
|
231
193
|
e.boxVisibility = !0;
|
|
232
|
-
},
|
|
194
|
+
}, io = ({ props: e }) => () => ({
|
|
233
195
|
textAlign: e.textAlign
|
|
234
|
-
}),
|
|
235
|
-
const t = window.getComputedStyle(e),
|
|
236
|
-
return { contextStyle:
|
|
237
|
-
},
|
|
196
|
+
}), so = () => (e) => {
|
|
197
|
+
const t = window.getComputedStyle(e), o = t.getPropertyValue(N.BoxSizing), n = parseFloat(t.getPropertyValue(N.PaddingBottom)) + parseFloat(t.getPropertyValue(N.PaddingTop)), r = parseFloat(t.getPropertyValue(N.BorderBottomWidth)) + parseFloat(t.getPropertyValue(N.BorderTopWidth));
|
|
198
|
+
return { contextStyle: oo.map((l) => `${l}:${t.getPropertyValue(l)}`).join(";"), paddingSize: n, borderSize: r, boxSizing: o };
|
|
199
|
+
}, ao = ({
|
|
238
200
|
api: e,
|
|
239
201
|
hiddenTextarea: t,
|
|
240
|
-
props:
|
|
241
|
-
state:
|
|
242
|
-
mode:
|
|
202
|
+
props: o,
|
|
203
|
+
state: n,
|
|
204
|
+
mode: r,
|
|
243
205
|
constants: i
|
|
244
|
-
}) => (
|
|
245
|
-
if (!
|
|
206
|
+
}) => (l, a = 1, s = null) => {
|
|
207
|
+
if (!l)
|
|
246
208
|
return {
|
|
247
209
|
minHeight: "",
|
|
248
210
|
height: ""
|
|
249
211
|
};
|
|
250
212
|
t || (t = document.createElement("textarea"), document.body.appendChild(t));
|
|
251
|
-
const { paddingSize: u, borderSize: f, boxSizing: c, contextStyle:
|
|
252
|
-
t.setAttribute("style", `${
|
|
253
|
-
let
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
let y =
|
|
259
|
-
c ===
|
|
213
|
+
const { paddingSize: u, borderSize: f, boxSizing: c, contextStyle: p } = e.calculateNodeStyling(l);
|
|
214
|
+
t.setAttribute("style", `${p};${to}`), t.value = l.value || l.placeholder || "";
|
|
215
|
+
let d = t.scrollHeight;
|
|
216
|
+
const m = {};
|
|
217
|
+
r === "mobile" && (d = Math.max(t.scrollHeight, i.TEXTAREA_HEIGHT_MOBILE)), c === N.BorderBox ? d = d + f * 2 + u : c === N.ContentBox && (d = d - u), t.value = "";
|
|
218
|
+
const v = t.scrollHeight - u;
|
|
219
|
+
if (a !== null) {
|
|
220
|
+
let y = v * a;
|
|
221
|
+
c === N.BorderBox && (y = y + u + f), o.size && (y = o.size === "mini" ? y * 0.67 : o.size === "small" ? y : y * 1.17), o.height && (y = o.height), n.isDisplayOnly ? m.minHeight = "0px" : (d = Math.max(y, d), m.minHeight = `${y}px`);
|
|
260
222
|
}
|
|
261
|
-
if (
|
|
262
|
-
let y =
|
|
263
|
-
c ===
|
|
223
|
+
if (s !== null) {
|
|
224
|
+
let y = v * s;
|
|
225
|
+
c === N.BorderBox && (y += f + u), d = Math.min(y, d);
|
|
264
226
|
}
|
|
265
|
-
return
|
|
266
|
-
},
|
|
227
|
+
return m.height = `${d}px`, t.parentNode && t.parentNode.removeChild(t), t = null, m;
|
|
228
|
+
}, uo = (e) => () => e.$refs.input || e.$refs.textarea, po = (e) => () => e.getInput().blur(), fo = (e) => () => e.getInput().focus(), co = (e) => () => e.getInput().select(), mo = ({
|
|
267
229
|
api: e,
|
|
268
230
|
componentName: t,
|
|
269
|
-
eventName:
|
|
270
|
-
emit:
|
|
271
|
-
props:
|
|
231
|
+
eventName: o,
|
|
232
|
+
emit: n,
|
|
233
|
+
props: r,
|
|
272
234
|
state: i,
|
|
273
|
-
vm:
|
|
274
|
-
}) => (
|
|
275
|
-
i.focused = !1,
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
},
|
|
281
|
-
if (
|
|
235
|
+
vm: l
|
|
236
|
+
}) => (a) => {
|
|
237
|
+
i.focused = !1, n("blur", a), e.isMemoryStorage.value = !1, r.validateEvent && e.dispatch(t, o, [r.modelValue]), r.hoverExpand && (l.$refs.textarea.scrollTop = 0);
|
|
238
|
+
}, ho = ({ api: e, emit: t, state: o }) => (n) => {
|
|
239
|
+
o.focused = !0, t("focus", n), e.searchMemory(n.target.value);
|
|
240
|
+
}, yo = ({ api: e, emit: t, nextTick: o, state: n }) => (r) => {
|
|
241
|
+
n.isComposing || r.target.value !== n.nativeInputValue && (t("update:modelValue", r.target.value), t("input", r), e.searchMemory(r.target.value), o(e.setNativeInputValue));
|
|
242
|
+
}, go = (e) => (t) => e("change", t.target.value), bo = ({ api: e, parent: t, vm: o, state: n, props: r }) => () => {
|
|
243
|
+
if (no)
|
|
282
244
|
return;
|
|
283
|
-
const { autosize: i, type:
|
|
284
|
-
if (
|
|
245
|
+
const { autosize: i, type: l } = t;
|
|
246
|
+
if (l !== "textarea" || !o.$refs.textarea)
|
|
285
247
|
return;
|
|
286
|
-
if (
|
|
287
|
-
|
|
288
|
-
minHeight:
|
|
289
|
-
height:
|
|
248
|
+
if (r.hoverExpand && !n.enteredTextarea) {
|
|
249
|
+
n.textareaCalcStyle = {
|
|
250
|
+
minHeight: n.textareaHeight,
|
|
251
|
+
height: n.textareaHeight
|
|
290
252
|
};
|
|
291
253
|
return;
|
|
292
254
|
}
|
|
293
|
-
if (!i ||
|
|
294
|
-
|
|
295
|
-
minHeight: e.calcTextareaHeight(
|
|
255
|
+
if (!i || n.isDisplayOnly) {
|
|
256
|
+
n.textareaCalcStyle = {
|
|
257
|
+
minHeight: e.calcTextareaHeight(o.$refs.textarea).minHeight
|
|
296
258
|
};
|
|
297
259
|
return;
|
|
298
260
|
}
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
const
|
|
306
|
-
e.isComposing = !
|
|
307
|
-
},
|
|
308
|
-
t.isComposing && (t.isComposing = !1, e.handleInput(
|
|
309
|
-
},
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
261
|
+
const a = i.minRows, s = i.maxRows;
|
|
262
|
+
n.textareaCalcStyle = e.calcTextareaHeight(o.$refs.textarea, a, s);
|
|
263
|
+
}, vo = ({ api: e, state: t }) => () => {
|
|
264
|
+
const o = e.getInput();
|
|
265
|
+
o && o.value !== t.nativeInputValue && (o.value = t.nativeInputValue);
|
|
266
|
+
}, wo = (e) => () => e.isComposing = !0, So = (e) => (t) => {
|
|
267
|
+
const o = t.target.value, n = o[o.length - 1] || "";
|
|
268
|
+
e.isComposing = !ro(n);
|
|
269
|
+
}, Co = ({ api: e, state: t }) => (o) => {
|
|
270
|
+
t.isComposing && (t.isComposing = !1, e.handleInput(o));
|
|
271
|
+
}, Oo = ({ vm: e, parent: t }) => (o) => {
|
|
272
|
+
const n = e.$refs[o] ? [e.$refs[o]] : [];
|
|
273
|
+
if (!n.length)
|
|
312
274
|
return;
|
|
313
|
-
let
|
|
314
|
-
for (let
|
|
315
|
-
if (
|
|
316
|
-
|
|
275
|
+
let r = null;
|
|
276
|
+
for (let a = 0, s = n.length; a < s; a++)
|
|
277
|
+
if (n[a].parentNode === t.$el) {
|
|
278
|
+
r = n[a];
|
|
317
279
|
break;
|
|
318
280
|
}
|
|
319
|
-
if (!
|
|
281
|
+
if (!r)
|
|
320
282
|
return;
|
|
321
|
-
const
|
|
322
|
-
if (t.$slots[
|
|
323
|
-
const
|
|
324
|
-
let
|
|
325
|
-
|
|
283
|
+
const l = { suffix: "append", prefix: "prepend" }[o];
|
|
284
|
+
if (t.$slots[l]) {
|
|
285
|
+
const a = e.$refs[l];
|
|
286
|
+
let s;
|
|
287
|
+
o === "suffix" ? s = `translateX(-${a.offsetWidth}px) translateY(-50%)` : o === "prefix" && (s = `translate(${a.offsetWidth}px, -50%)`), r.style.transform = s;
|
|
326
288
|
} else
|
|
327
|
-
|
|
328
|
-
},
|
|
289
|
+
r.removeAttribute("style");
|
|
290
|
+
}, _o = (e) => () => {
|
|
329
291
|
e.calcIconOffset("prefix"), e.calcIconOffset("suffix");
|
|
330
|
-
},
|
|
292
|
+
}, Mo = (e) => () => {
|
|
331
293
|
e("update:modelValue", ""), e("change", ""), e("clear");
|
|
332
|
-
},
|
|
333
|
-
|
|
334
|
-
},
|
|
294
|
+
}, Eo = ({ api: e, nextTick: t, state: o }) => () => {
|
|
295
|
+
o.passwordVisible = !o.passwordVisible, t(e.focus);
|
|
296
|
+
}, Bo = ({ parent: e, props: t, state: o }) => () => e.$slots.suffix || t.suffixIcon || o.showClear || t.showPassword || o.isWordLimitVisible || o.validateState && o.needStatusIcon || t.mask && o.inputDisabled, Io = (e) => typeof e == "number" ? String(e).length : (e || "").length, To = ({ emit: e, props: t, state: o }) => (n) => {
|
|
335
297
|
if (t.isSelect) {
|
|
336
|
-
e("update:modelValue",
|
|
337
|
-
const
|
|
338
|
-
|
|
298
|
+
e("update:modelValue", n), e("change", n);
|
|
299
|
+
const r = t.selectMenu.length && t.selectMenu.filter((i) => i.id === n).shift();
|
|
300
|
+
o.checkedLabel = r ? r.label : "";
|
|
339
301
|
}
|
|
340
|
-
},
|
|
302
|
+
}, $o = (e) => () => {
|
|
341
303
|
const t = e.getInput();
|
|
342
304
|
return t && t.selectionStart !== t.selectionEnd;
|
|
343
|
-
},
|
|
344
|
-
if (
|
|
305
|
+
}, xo = ({ state: e, props: t }) => (o, n) => {
|
|
306
|
+
if (n === "textarea" && t.popupMore)
|
|
345
307
|
return;
|
|
346
|
-
const
|
|
347
|
-
if (e.displayOnlyTooltip = "", !
|
|
308
|
+
const r = n === "textarea" ? o.target.querySelector(".text-box") : o.target;
|
|
309
|
+
if (e.displayOnlyTooltip = "", !r)
|
|
348
310
|
return;
|
|
349
|
-
if (
|
|
311
|
+
if (r.scrollWidth > r.offsetWidth || n === "textarea" && r.scrollHeight > r.offsetHeight)
|
|
350
312
|
e.displayOnlyTooltip = t.displayOnlyContent || e.nativeInputValue;
|
|
351
313
|
else {
|
|
352
|
-
let
|
|
314
|
+
let l = !1;
|
|
353
315
|
if (t.mask && e.maskValueVisible) {
|
|
354
|
-
const
|
|
355
|
-
|
|
316
|
+
const a = r.textContent, s = window.getComputedStyle(r).font, u = r.getBoundingClientRect(), f = 31, c = (a == null ? void 0 : a.trim()) || "";
|
|
317
|
+
l = ot(c, s, u.width - f).o;
|
|
356
318
|
}
|
|
357
|
-
|
|
319
|
+
l && (e.displayOnlyTooltip = t.displayOnlyContent || e.nativeInputValue);
|
|
358
320
|
}
|
|
359
|
-
},
|
|
360
|
-
let
|
|
361
|
-
const
|
|
362
|
-
for (let
|
|
363
|
-
|
|
364
|
-
return
|
|
365
|
-
},
|
|
366
|
-
|
|
367
|
-
const i =
|
|
368
|
-
t.mask && e.nativeInputValue && i && (i.value = e.maskValueVisible || !e.inputDisabled ? e.nativeInputValue : e.maskSymbol),
|
|
321
|
+
}, Do = ({ state: e, props: t }) => () => {
|
|
322
|
+
let o = "";
|
|
323
|
+
const n = t.displayOnlyContent || e.nativeInputValue;
|
|
324
|
+
for (let r = 0; r < n.length; r++)
|
|
325
|
+
o += "*";
|
|
326
|
+
return o;
|
|
327
|
+
}, ko = ({ state: e }) => () => e.maskValueVisible ? e.nativeInputValue : e.nativeInputValue && e.maskSymbol, Po = ({ state: e, props: t, nextTick: o, vm: n }) => (r) => {
|
|
328
|
+
o(() => {
|
|
329
|
+
const i = n.$refs.input;
|
|
330
|
+
t.mask && e.nativeInputValue && i && (i.value = e.maskValueVisible || !e.inputDisabled ? e.nativeInputValue : e.maskSymbol), r === "mask" && !t.mask && i && (i.value = e.nativeInputValue);
|
|
369
331
|
});
|
|
370
|
-
},
|
|
371
|
-
t.isDragging ||
|
|
372
|
-
},
|
|
373
|
-
t.isDragging ||
|
|
374
|
-
e.resizeTextarea(),
|
|
332
|
+
}, Vo = ({ api: e, state: t, props: o, nextTick: n }) => () => {
|
|
333
|
+
t.isDragging || o.hoverExpand && !t.isDisplayOnly && (t.enteredTextarea = !0, n(e.resizeTextarea));
|
|
334
|
+
}, Ao = ({ api: e, state: t, props: o, nextTick: n, vm: r }) => () => {
|
|
335
|
+
t.isDragging || o.hoverExpand && !t.isDisplayOnly && (t.enteredTextarea = !1, n(() => {
|
|
336
|
+
e.resizeTextarea(), r.$refs.textarea.scrollTop = 0;
|
|
375
337
|
}));
|
|
376
|
-
},
|
|
377
|
-
const
|
|
378
|
-
return (typeof
|
|
379
|
-
},
|
|
338
|
+
}, Lo = ({ parent: e, state: t, props: o }) => () => {
|
|
339
|
+
const n = o.displayOnlyContent || t.nativeInputValue;
|
|
340
|
+
return (typeof o.showEmptyValue == "boolean" ? o.showEmptyValue : (e.tinyForm || {}).showEmptyValue) ? n : n || "-";
|
|
341
|
+
}, No = ({ state: e, vm: t }) => (o) => {
|
|
380
342
|
e.timer && clearTimeout(e.timer), e.timer = setTimeout(() => {
|
|
381
|
-
const
|
|
382
|
-
if (
|
|
383
|
-
if (
|
|
384
|
-
let
|
|
385
|
-
|
|
386
|
-
} else
|
|
343
|
+
const n = t.$refs && t.$refs.textBox;
|
|
344
|
+
if (n)
|
|
345
|
+
if (o && n.offsetHeight === 0) {
|
|
346
|
+
let r = n.cloneNode(!0);
|
|
347
|
+
r.style.visibility = "hidden", r.style.position = "absolute", r.style.left = "-9999px", document.body.appendChild(r), r.scrollHeight > r.offsetHeight && (e.showMoreBtn = !0), document.body.removeChild(r), r = null;
|
|
348
|
+
} else n.scrollHeight > n.offsetHeight ? e.showMoreBtn = !0 : e.showMoreBtn = !1;
|
|
387
349
|
}, 100);
|
|
388
|
-
},
|
|
389
|
-
e.isDragging = !1,
|
|
390
|
-
},
|
|
391
|
-
t.hoverValue = "", e("selected",
|
|
392
|
-
},
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
return
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
const
|
|
401
|
-
let
|
|
402
|
-
for (let i = 0,
|
|
350
|
+
}, Fo = ({ state: e }) => () => e.isDragging = !0, zo = ({ state: e, api: t }) => (o) => {
|
|
351
|
+
e.isDragging = !1, o && t.handleLeaveTextarea();
|
|
352
|
+
}, Ho = (e) => (e && e.preventDefault ? e.preventDefault() : window.event.returnValue = !1, !1), Wo = ({ emit: e, state: t }) => (o) => {
|
|
353
|
+
t.hoverValue = "", e("selected", o);
|
|
354
|
+
}, Ro = ({ emit: e, props: t, state: o }) => () => {
|
|
355
|
+
const n = window.event.keyCode, r = t.localstorageData.indexOf(o.hoverValue), i = t.localstorageData.length - 1;
|
|
356
|
+
if (n === ie.ArrowUp && t.isMemoryStorage)
|
|
357
|
+
return r > 0 && r <= i ? o.hoverValue = t.localstorageData[r - 1] : o.hoverValue = t.localstorageData[i], !1;
|
|
358
|
+
if (n === ie.ArrowDown && t.isMemoryStorage)
|
|
359
|
+
return r >= 0 && r < i ? o.hoverValue = t.localstorageData[r + 1] : o.hoverValue = t.localstorageData[0], !1;
|
|
360
|
+
n === ie.NumpadEnter && t.isMemoryStorage && o.hoverValue && o.hoverValue.length > 0 && e("selected", o.hoverValue);
|
|
361
|
+
}, jo = (e, t = 5) => {
|
|
362
|
+
const o = e.length;
|
|
363
|
+
let n = [], r = {};
|
|
364
|
+
for (let i = 0, l = 1; l <= t && !(i < 0 || i >= o || (r[e[i]] ? l = l - 1 : (r[e[i]] = !0, n.push(e[i])), l === o)); l++)
|
|
403
365
|
i++;
|
|
404
|
-
return
|
|
405
|
-
},
|
|
366
|
+
return n;
|
|
367
|
+
}, Ye = (e, t) => {
|
|
406
368
|
if (typeof e == "string")
|
|
407
369
|
try {
|
|
408
|
-
const
|
|
409
|
-
return !!(typeof
|
|
370
|
+
const o = JSON.parse(e);
|
|
371
|
+
return !!(typeof o == "object" && o && (!t || o.constructor === t));
|
|
410
372
|
} catch {
|
|
411
373
|
return !1;
|
|
412
374
|
}
|
|
413
|
-
},
|
|
375
|
+
}, Uo = (e, t, o = 5) => {
|
|
414
376
|
if (typeof t == "string") {
|
|
415
|
-
const
|
|
377
|
+
const n = localStorage.getItem(e), r = Ye(n, Array);
|
|
416
378
|
let i = "";
|
|
417
|
-
if (
|
|
418
|
-
let
|
|
419
|
-
|
|
420
|
-
} else
|
|
379
|
+
if (n && r) {
|
|
380
|
+
let l = JSON.parse(localStorage.getItem(e));
|
|
381
|
+
l.unshift(t), l = jo(l, o), i = JSON.stringify(l);
|
|
382
|
+
} else n === null || n === t ? i = JSON.stringify([t]) : i = JSON.stringify([t, n]);
|
|
421
383
|
localStorage.setItem(e, i);
|
|
422
384
|
}
|
|
423
|
-
},
|
|
424
|
-
e.name && (t != null && t.trim()) &&
|
|
425
|
-
},
|
|
385
|
+
}, Jo = (e) => (t) => {
|
|
386
|
+
e.name && (t != null && t.trim()) && Uo(e.name, t, e.memorySpace);
|
|
387
|
+
}, Go = ({ props: e, state: t }) => (o) => {
|
|
426
388
|
if (!e.name)
|
|
427
389
|
return;
|
|
428
|
-
const
|
|
429
|
-
let
|
|
430
|
-
if (
|
|
431
|
-
const
|
|
432
|
-
if (!
|
|
433
|
-
|
|
390
|
+
const n = localStorage.getItem(e.name);
|
|
391
|
+
let r = [], i = !0;
|
|
392
|
+
if (Ye(n)) {
|
|
393
|
+
const l = JSON.parse(n);
|
|
394
|
+
if (!o)
|
|
395
|
+
r = JSON.parse(n);
|
|
434
396
|
else
|
|
435
|
-
for (let
|
|
436
|
-
a
|
|
437
|
-
|
|
397
|
+
for (let a = 0, s = l.length; a < s; a++)
|
|
398
|
+
l[a].includes(o) && r.push(l[a]);
|
|
399
|
+
r.length === 0 && (i = !1);
|
|
438
400
|
} else
|
|
439
|
-
|
|
440
|
-
t.storageData =
|
|
441
|
-
},
|
|
442
|
-
e.getInput().value =
|
|
401
|
+
n === null ? i = !1 : r.push(n);
|
|
402
|
+
t.storageData = r, t.isMemoryStorage = i;
|
|
403
|
+
}, Ko = ({ api: e, state: t }) => (o) => {
|
|
404
|
+
e.getInput().value = o, e.handleInput({ target: { value: o } }), e.handleChange({ target: { value: o } }), t.isMemoryStorage = !1;
|
|
443
405
|
};
|
|
444
|
-
var
|
|
445
|
-
const
|
|
406
|
+
var Yo = ({ api: e, props: t, reactive: o, toRefs: n }) => {
|
|
407
|
+
const r = o({
|
|
446
408
|
storageData: [],
|
|
447
409
|
isMemoryStorage: !1
|
|
448
410
|
});
|
|
449
|
-
return
|
|
450
|
-
addMemory:
|
|
451
|
-
searchMemory:
|
|
452
|
-
selectedMemory:
|
|
411
|
+
return Ge(V({}, n(r)), {
|
|
412
|
+
addMemory: Jo(t),
|
|
413
|
+
searchMemory: Go({ props: t, state: r }),
|
|
414
|
+
selectedMemory: Ko({ api: e, state: r })
|
|
453
415
|
});
|
|
454
416
|
};
|
|
455
|
-
const
|
|
417
|
+
const Xo = [
|
|
456
418
|
"blur",
|
|
457
419
|
"showBox",
|
|
458
420
|
"clear",
|
|
@@ -488,19 +450,19 @@ const cn = [
|
|
|
488
450
|
"handleLeaveTextarea",
|
|
489
451
|
"handleTextareaMouseDown",
|
|
490
452
|
"handleTextareaMouseUp"
|
|
491
|
-
],
|
|
453
|
+
], Zo = ({
|
|
492
454
|
reactive: e,
|
|
493
455
|
computed: t,
|
|
494
|
-
mode:
|
|
495
|
-
props:
|
|
496
|
-
parent:
|
|
456
|
+
mode: o,
|
|
457
|
+
props: n,
|
|
458
|
+
parent: r,
|
|
497
459
|
constants: i,
|
|
498
|
-
api:
|
|
499
|
-
vm:
|
|
500
|
-
designConfig:
|
|
460
|
+
api: l,
|
|
461
|
+
vm: a,
|
|
462
|
+
designConfig: s
|
|
501
463
|
}) => {
|
|
502
464
|
const u = e({
|
|
503
|
-
mode:
|
|
465
|
+
mode: o,
|
|
504
466
|
maskSymbol: i.MASKSYMBOL,
|
|
505
467
|
focused: !1,
|
|
506
468
|
hovering: !1,
|
|
@@ -511,380 +473,1496 @@ const cn = [
|
|
|
511
473
|
textareaCalcStyle: {},
|
|
512
474
|
checkedLabel: "",
|
|
513
475
|
enteredTextarea: !1,
|
|
514
|
-
sheetvalue:
|
|
515
|
-
inputSize: t(() =>
|
|
516
|
-
inputSizeMf: t(() =>
|
|
476
|
+
sheetvalue: n.modelValue,
|
|
477
|
+
inputSize: t(() => n.size || u.formItemSize || (r.tinyForm || {}).size),
|
|
478
|
+
inputSizeMf: t(() => n.size || u.formItemSize || (r.tinyForm || {}).size),
|
|
517
479
|
showClear: t(
|
|
518
480
|
() => {
|
|
519
481
|
var f;
|
|
520
|
-
return
|
|
482
|
+
return n.clearable && !u.inputDisabled && !n.readonly && u.nativeInputValue && (!((f = s == null ? void 0 : s.options) != null && f.isCloseIconHide) || u.focused || u.hovering);
|
|
521
483
|
}
|
|
522
484
|
),
|
|
523
|
-
textareaHeight:
|
|
524
|
-
upperLimit: t(() =>
|
|
525
|
-
textLength: t(() =>
|
|
485
|
+
textareaHeight: a.theme === "saas" ? "28px" : "30px",
|
|
486
|
+
upperLimit: t(() => r.$attrs.maxlength),
|
|
487
|
+
textLength: t(() => Io(n.modelValue)),
|
|
526
488
|
inputExceed: t(() => u.isWordLimitVisible && u.textLength > u.upperLimit),
|
|
527
|
-
formItemSize: t(() => (
|
|
489
|
+
formItemSize: t(() => (r.formItem || {}).formItemSize),
|
|
528
490
|
validateIcon: t(() => i.VALIDATE_ICON[u.validateState]),
|
|
529
|
-
showWordLimit: t(() =>
|
|
491
|
+
showWordLimit: t(() => n.showWordLimit && r.$attrs.maxlength),
|
|
530
492
|
inputDisabled: t(
|
|
531
|
-
() =>
|
|
493
|
+
() => n.disabled || (r.tinyForm || {}).disabled || u.isDisplayOnly || (r.tinyForm || {}).displayOnly
|
|
532
494
|
),
|
|
533
|
-
validateState: t(() =>
|
|
534
|
-
inputStyle: t(() =>
|
|
535
|
-
textareaStyle: t(() =>
|
|
536
|
-
resize:
|
|
537
|
-
textAlign:
|
|
495
|
+
validateState: t(() => r.formItem ? r.formItem.validateState : ""),
|
|
496
|
+
inputStyle: t(() => l.inputStyle()),
|
|
497
|
+
textareaStyle: t(() => Ge(V({}, u.textareaCalcStyle), {
|
|
498
|
+
resize: n.resize,
|
|
499
|
+
textAlign: n.textAlign
|
|
538
500
|
})),
|
|
539
|
-
needStatusIcon: t(() =>
|
|
501
|
+
needStatusIcon: t(() => r.tinyForm ? r.tinyForm.statusIcon : !1),
|
|
540
502
|
showPwdVisible: t(
|
|
541
|
-
() =>
|
|
503
|
+
() => n.showPassword && !u.inputDisabled && !n.readonly && (!!u.nativeInputValue || u.focused)
|
|
542
504
|
),
|
|
543
505
|
nativeInputValue: t(
|
|
544
|
-
() =>
|
|
506
|
+
() => n.modelValue === null || n.modelValue === void 0 ? "" : String(n.modelValue)
|
|
545
507
|
),
|
|
546
|
-
tooltipConfig: t(() =>
|
|
508
|
+
tooltipConfig: t(() => r.tinyForm ? r.tinyForm.tooltipConfig : {}),
|
|
547
509
|
isWordLimitVisible: t(
|
|
548
|
-
() => (
|
|
510
|
+
() => (n.showWordLimit && r.$attrs.maxlength || n.counter) && (r.type === "text" || r.type === "textarea") && !u.inputDisabled && !n.readonly && !n.showPassword
|
|
549
511
|
),
|
|
550
512
|
isDisplayOnly: t(
|
|
551
|
-
() => (
|
|
513
|
+
() => (n.displayOnly || (r.tinyForm || {}).displayOnly) && ["text", "textarea", "password", "number"].includes(n.type)
|
|
552
514
|
),
|
|
553
515
|
displayOnlyTooltip: "",
|
|
554
516
|
showMoreBtn: !1,
|
|
555
517
|
showDisplayOnlyBox: !1,
|
|
556
518
|
timer: null,
|
|
557
|
-
hiddenPassword: t(() =>
|
|
558
|
-
displayedMaskValue: t(() =>
|
|
559
|
-
displayOnlyText: t(() =>
|
|
519
|
+
hiddenPassword: t(() => l.hiddenPassword()),
|
|
520
|
+
displayedMaskValue: t(() => l.getDisplayedMaskValue()),
|
|
521
|
+
displayOnlyText: t(() => l.getDisplayOnlyText()),
|
|
560
522
|
isDragging: !1
|
|
561
523
|
});
|
|
562
524
|
return u;
|
|
563
|
-
},
|
|
525
|
+
}, qo = ({
|
|
564
526
|
api: e,
|
|
565
527
|
state: t,
|
|
566
|
-
dispatch:
|
|
567
|
-
broadcast:
|
|
568
|
-
emit:
|
|
528
|
+
dispatch: o,
|
|
529
|
+
broadcast: n,
|
|
530
|
+
emit: r,
|
|
569
531
|
vm: i,
|
|
570
|
-
props:
|
|
571
|
-
parent:
|
|
572
|
-
nextTick:
|
|
532
|
+
props: l,
|
|
533
|
+
parent: a,
|
|
534
|
+
nextTick: s
|
|
573
535
|
}) => {
|
|
574
536
|
Object.assign(e, {
|
|
575
537
|
state: t,
|
|
576
|
-
dispatch:
|
|
577
|
-
broadcast:
|
|
578
|
-
showBox:
|
|
579
|
-
clear:
|
|
580
|
-
getInput:
|
|
581
|
-
setShowMoreBtn:
|
|
582
|
-
handleChange:
|
|
583
|
-
watchFormSelect:
|
|
584
|
-
calcIconOffset:
|
|
585
|
-
getSuffixVisible:
|
|
586
|
-
calculateNodeStyling:
|
|
587
|
-
handleCompositionStart:
|
|
588
|
-
handleCompositionUpdate:
|
|
589
|
-
setInputDomValue:
|
|
590
|
-
getDisplayOnlyText:
|
|
591
|
-
handleEnterTextarea:
|
|
592
|
-
handleLeaveTextarea:
|
|
593
|
-
inputStyle:
|
|
594
|
-
handleTextareaMouseDown:
|
|
595
|
-
handleTextareaMouseUp:
|
|
538
|
+
dispatch: o,
|
|
539
|
+
broadcast: n,
|
|
540
|
+
showBox: lo(t),
|
|
541
|
+
clear: Mo(r),
|
|
542
|
+
getInput: uo(i),
|
|
543
|
+
setShowMoreBtn: No({ state: t, vm: i }),
|
|
544
|
+
handleChange: go(r),
|
|
545
|
+
watchFormSelect: To({ emit: r, props: l, state: t }),
|
|
546
|
+
calcIconOffset: Oo({ vm: i, parent: a }),
|
|
547
|
+
getSuffixVisible: Bo({ parent: a, props: l, state: t }),
|
|
548
|
+
calculateNodeStyling: so(),
|
|
549
|
+
handleCompositionStart: wo(t),
|
|
550
|
+
handleCompositionUpdate: So(t),
|
|
551
|
+
setInputDomValue: Po({ state: t, props: l, nextTick: s, vm: i }),
|
|
552
|
+
getDisplayOnlyText: Lo({ parent: a, props: l, state: t }),
|
|
553
|
+
handleEnterTextarea: Vo({ api: e, state: t, props: l, nextTick: s }),
|
|
554
|
+
handleLeaveTextarea: Ao({ api: e, state: t, props: l, nextTick: s, vm: i }),
|
|
555
|
+
inputStyle: io({ props: l }),
|
|
556
|
+
handleTextareaMouseDown: Fo({ state: t }),
|
|
557
|
+
handleTextareaMouseUp: zo({ state: t, api: e })
|
|
596
558
|
});
|
|
597
|
-
},
|
|
559
|
+
}, Qo = ({
|
|
598
560
|
storages: e,
|
|
599
561
|
api: t,
|
|
600
|
-
componentName:
|
|
601
|
-
props:
|
|
602
|
-
emit:
|
|
562
|
+
componentName: o,
|
|
563
|
+
props: n,
|
|
564
|
+
emit: r,
|
|
603
565
|
eventName: i,
|
|
604
|
-
nextTick:
|
|
605
|
-
parent:
|
|
606
|
-
state:
|
|
566
|
+
nextTick: l,
|
|
567
|
+
parent: a,
|
|
568
|
+
state: s,
|
|
607
569
|
vm: u,
|
|
608
570
|
mode: f,
|
|
609
571
|
constants: c
|
|
610
572
|
}) => {
|
|
611
|
-
const { storageData:
|
|
573
|
+
const { storageData: p, isMemoryStorage: d, addMemory: m, searchMemory: v, selectedMemory: y } = e;
|
|
612
574
|
return Object.assign(t, {
|
|
613
|
-
addMemory:
|
|
614
|
-
storageData:
|
|
615
|
-
searchMemory:
|
|
575
|
+
addMemory: m,
|
|
576
|
+
storageData: p,
|
|
577
|
+
searchMemory: v,
|
|
616
578
|
selectedMemory: y,
|
|
617
|
-
isMemoryStorage:
|
|
618
|
-
blur:
|
|
619
|
-
focus:
|
|
620
|
-
select:
|
|
621
|
-
handleBlur:
|
|
579
|
+
isMemoryStorage: d,
|
|
580
|
+
blur: po(t),
|
|
581
|
+
focus: fo(t),
|
|
582
|
+
select: co(t),
|
|
583
|
+
handleBlur: mo({
|
|
622
584
|
api: t,
|
|
623
|
-
componentName:
|
|
624
|
-
emit:
|
|
585
|
+
componentName: o,
|
|
586
|
+
emit: r,
|
|
625
587
|
eventName: i.blur,
|
|
626
|
-
props:
|
|
627
|
-
state:
|
|
588
|
+
props: n,
|
|
589
|
+
state: s,
|
|
628
590
|
vm: u
|
|
629
591
|
}),
|
|
630
|
-
handleFocus:
|
|
631
|
-
handleInput:
|
|
632
|
-
resizeTextarea:
|
|
633
|
-
updateIconOffset:
|
|
634
|
-
calcTextareaHeight:
|
|
592
|
+
handleFocus: ho({ api: t, emit: r, state: s }),
|
|
593
|
+
handleInput: yo({ api: t, emit: r, nextTick: l, state: s }),
|
|
594
|
+
resizeTextarea: bo({ api: t, parent: a, vm: u, state: s, props: n }),
|
|
595
|
+
updateIconOffset: _o(t),
|
|
596
|
+
calcTextareaHeight: ao({
|
|
635
597
|
api: t,
|
|
636
598
|
hiddenTextarea: null,
|
|
637
|
-
props:
|
|
638
|
-
state:
|
|
599
|
+
props: n,
|
|
600
|
+
state: s,
|
|
639
601
|
mode: f,
|
|
640
602
|
constants: c
|
|
641
603
|
}),
|
|
642
|
-
setNativeInputValue:
|
|
643
|
-
handleCompositionEnd:
|
|
644
|
-
handlePasswordVisible:
|
|
645
|
-
hasSelection:
|
|
646
|
-
handleEnterDisplayOnlyContent:
|
|
647
|
-
hiddenPassword:
|
|
648
|
-
getDisplayedMaskValue:
|
|
604
|
+
setNativeInputValue: vo({ api: t, state: s }),
|
|
605
|
+
handleCompositionEnd: Co({ api: t, state: s }),
|
|
606
|
+
handlePasswordVisible: Eo({ api: t, nextTick: l, state: s }),
|
|
607
|
+
hasSelection: $o(t),
|
|
608
|
+
handleEnterDisplayOnlyContent: xo({ state: s, props: n }),
|
|
609
|
+
hiddenPassword: Do({ state: s, props: n }),
|
|
610
|
+
getDisplayedMaskValue: ko({ state: s })
|
|
649
611
|
});
|
|
650
|
-
},
|
|
612
|
+
}, en = ({
|
|
651
613
|
watch: e,
|
|
652
614
|
state: t,
|
|
653
|
-
api:
|
|
654
|
-
props:
|
|
655
|
-
nextTick:
|
|
615
|
+
api: o,
|
|
616
|
+
props: n,
|
|
617
|
+
nextTick: r,
|
|
656
618
|
emit: i,
|
|
657
|
-
componentName:
|
|
658
|
-
eventName:
|
|
619
|
+
componentName: l,
|
|
620
|
+
eventName: a
|
|
659
621
|
}) => {
|
|
660
622
|
e(
|
|
661
|
-
() =>
|
|
662
|
-
(
|
|
663
|
-
t.mode === "mobile" && (t.sheetvalue =
|
|
623
|
+
() => n.modelValue,
|
|
624
|
+
(s) => {
|
|
625
|
+
t.mode === "mobile" && (t.sheetvalue = s, i("update:modelValue", s)), r(o.resizeTextarea), n.validateEvent && o.dispatch(l, a.change, [s]), n.type === "textarea" && n.popupMore && t.isDisplayOnly && o.setShowMoreBtn(), o.setInputDomValue();
|
|
664
626
|
}
|
|
665
|
-
), e(() => t.maskValueVisible,
|
|
666
|
-
() =>
|
|
627
|
+
), e(() => t.maskValueVisible, o.setInputDomValue), e(() => t.inputDisabled, o.setInputDomValue), e(
|
|
628
|
+
() => n.mask,
|
|
667
629
|
() => {
|
|
668
|
-
|
|
630
|
+
o.setInputDomValue("mask");
|
|
669
631
|
}
|
|
670
632
|
), e(
|
|
671
|
-
() =>
|
|
672
|
-
() =>
|
|
633
|
+
() => n.size,
|
|
634
|
+
() => r(o.resizeTextarea),
|
|
673
635
|
{ immediate: !0 }
|
|
674
636
|
), e(
|
|
675
637
|
() => t.nativeInputValue,
|
|
676
638
|
() => {
|
|
677
|
-
|
|
639
|
+
o.setNativeInputValue();
|
|
678
640
|
}
|
|
679
641
|
), e(
|
|
680
|
-
() =>
|
|
642
|
+
() => n.type,
|
|
681
643
|
() => {
|
|
682
|
-
|
|
683
|
-
|
|
644
|
+
r(() => {
|
|
645
|
+
o.setNativeInputValue(), o.resizeTextarea(), o.updateIconOffset();
|
|
684
646
|
});
|
|
685
647
|
}
|
|
686
648
|
), e(
|
|
687
649
|
() => t.isDisplayOnly,
|
|
688
650
|
() => {
|
|
689
|
-
|
|
690
|
-
|
|
651
|
+
r(() => {
|
|
652
|
+
o.setNativeInputValue(), o.resizeTextarea(), o.updateIconOffset();
|
|
691
653
|
});
|
|
692
654
|
}
|
|
693
655
|
), e(
|
|
694
656
|
() => t.sheetvalue,
|
|
695
|
-
(
|
|
657
|
+
(s) => o.watchFormSelect(s),
|
|
696
658
|
{ immediate: !0 }
|
|
697
659
|
);
|
|
698
|
-
},
|
|
699
|
-
const
|
|
700
|
-
|
|
701
|
-
const
|
|
702
|
-
return c.tinyForm = c.tinyForm ||
|
|
703
|
-
|
|
704
|
-
}),
|
|
705
|
-
e.type === "textarea" && e.popupMore &&
|
|
706
|
-
}),
|
|
707
|
-
|
|
708
|
-
}),
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
return t[
|
|
717
|
-
});
|
|
718
|
-
}), F(document, "mouseup", function(e) {
|
|
719
|
-
E.filter(function(t) {
|
|
720
|
-
return !t[w].mousedownTrigger;
|
|
721
|
-
}).forEach(function(t) {
|
|
722
|
-
var n;
|
|
723
|
-
return t[w].documentHandler(e, (n = t[w]) != null && n.mouseupTrigger ? e : A);
|
|
724
|
-
}), A = null;
|
|
660
|
+
}, tn = (e, { computed: t, onMounted: o, onBeforeUnmount: n, onUpdated: r, reactive: i, toRefs: l, watch: a, inject: s }, { vm: u, refs: f, parent: c, emit: p, constants: d, nextTick: m, broadcast: v, dispatch: y, mode: w, designConfig: B }) => {
|
|
661
|
+
const g = {}, P = d.COMPONENT_NAME.FormItem, C = { change: "form.change", blur: "form.blur" }, S = Zo({ reactive: i, computed: t, mode: w, props: e, parent: c, constants: d, api: g, vm: u, designConfig: B });
|
|
662
|
+
qo({ api: g, state: S, dispatch: y, broadcast: v, emit: p, props: e, parent: c, vm: u, nextTick: m });
|
|
663
|
+
const A = Yo({ api: g, props: e, reactive: i, toRefs: l });
|
|
664
|
+
return c.tinyForm = c.tinyForm || s("form", null), Qo({ api: g, storages: A, componentName: P, emit: p, eventName: C, props: e, state: S, nextTick: m, parent: c, vm: u, mode: w, constants: d }), en({ watch: a, state: S, api: g, props: e, nextTick: m, emit: p, componentName: P, eventName: C }), o(() => {
|
|
665
|
+
g.setNativeInputValue(), g.resizeTextarea(), g.updateIconOffset(), g.setInputDomValue(), y("Select", "input-mounted", u.$el), y("Tooltip", "tooltip-update", u.$el), e.type === "textarea" && e.popupMore && S.isDisplayOnly && (g.setShowMoreBtn(!0), I(window, "resize", g.setShowMoreBtn)), u.$attrs.autofocus && g.focus();
|
|
666
|
+
}), n(() => {
|
|
667
|
+
e.type === "textarea" && e.popupMore && S.isDisplayOnly && D(window, "resize", g.setShowMoreBtn);
|
|
668
|
+
}), r(() => {
|
|
669
|
+
m(g.updateIconOffset);
|
|
670
|
+
}), g;
|
|
671
|
+
}, on = typeof window > "u", W = [], E = "@@clickoutsideContext";
|
|
672
|
+
let G, nn = 0;
|
|
673
|
+
on || (I(document, "mousedown", (e) => {
|
|
674
|
+
G = e, W.filter((t) => t[E].mousedownTrigger).forEach((t) => t[E].documentHandler(e, G));
|
|
675
|
+
}), I(document, "mouseup", (e) => {
|
|
676
|
+
W.filter((t) => !t[E].mousedownTrigger).forEach((t) => {
|
|
677
|
+
var o;
|
|
678
|
+
return t[E].documentHandler(e, (o = t[E]) != null && o.mouseupTrigger ? e : G);
|
|
679
|
+
}), G = null;
|
|
725
680
|
}));
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
},
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
bindingFn: s,
|
|
742
|
-
mousedownTrigger: f,
|
|
743
|
-
mouseupTrigger: d
|
|
681
|
+
const Ve = (e, t, o) => function(n = {}, r = {}) {
|
|
682
|
+
let i = o.context.popperElm || o.context.state && o.context.state.popperElm;
|
|
683
|
+
!(n != null && n.target) || !(r != null && r.target) || e.contains(n.target) || e.contains(r.target) || e === n.target || i && (i.contains(n.target) || i.contains(r.target)) || (t.expression && e[E].methodName && o.context[e[E].methodName] ? o.context[e[E].methodName]() : e[E].bindingFn && e[E].bindingFn());
|
|
684
|
+
};
|
|
685
|
+
var rn = {
|
|
686
|
+
bind: (e, t, o) => {
|
|
687
|
+
W.push(e);
|
|
688
|
+
const n = nn++, { modifiers: r, expression: i, value: l } = t, { mousedown: a = !1, mouseup: s = !1 } = r || {};
|
|
689
|
+
e[E] = {
|
|
690
|
+
id: n,
|
|
691
|
+
documentHandler: Ve(e, t, o),
|
|
692
|
+
methodName: i,
|
|
693
|
+
bindingFn: l,
|
|
694
|
+
mousedownTrigger: a,
|
|
695
|
+
mouseupTrigger: s
|
|
744
696
|
};
|
|
745
697
|
},
|
|
746
|
-
update:
|
|
747
|
-
|
|
748
|
-
|
|
698
|
+
update: (e, t, o) => {
|
|
699
|
+
const { modifiers: n, expression: r, value: i } = t, { mousedown: l = !1, mouseup: a = !1 } = n || {};
|
|
700
|
+
e[E].documentHandler = Ve(e, t, o), e[E].methodName = r, e[E].bindingFn = i, e[E].mousedownTrigger = l, e[E].mouseupTrigger = a;
|
|
749
701
|
},
|
|
750
|
-
unbind:
|
|
751
|
-
if (
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
702
|
+
unbind: (e) => {
|
|
703
|
+
if (e.nodeType !== Node.ELEMENT_NODE)
|
|
704
|
+
return;
|
|
705
|
+
let t = W.length;
|
|
706
|
+
for (let o = 0; o < t; o++)
|
|
707
|
+
if (W[o][E].id === e[E].id) {
|
|
708
|
+
W.splice(o, 1);
|
|
709
|
+
break;
|
|
710
|
+
}
|
|
711
|
+
W.length === 0 && G && (G = null), delete e[E];
|
|
759
712
|
}
|
|
760
713
|
};
|
|
761
|
-
const
|
|
762
|
-
const i =
|
|
714
|
+
const ln = ["state", "mousedown", "selectItem"], sn = (e, { onUnmounted: t, reactive: o, watch: n }, { emit: r }) => {
|
|
715
|
+
const i = o({
|
|
763
716
|
hoverValue: ""
|
|
764
|
-
}),
|
|
717
|
+
}), l = {
|
|
765
718
|
state: i,
|
|
766
|
-
mousedown:
|
|
767
|
-
selectItem:
|
|
768
|
-
keydown:
|
|
719
|
+
mousedown: Ho,
|
|
720
|
+
selectItem: Wo({ emit: r, state: i }),
|
|
721
|
+
keydown: Ro({ emit: r, props: e, state: i })
|
|
769
722
|
};
|
|
770
|
-
return
|
|
723
|
+
return n(
|
|
771
724
|
() => e.isMemoryStorage,
|
|
772
|
-
(
|
|
725
|
+
(a) => !a && (i.hoverValue = ""),
|
|
773
726
|
{ immediate: !0 }
|
|
774
727
|
), t(() => {
|
|
775
|
-
i.hoverValue = "",
|
|
776
|
-
}),
|
|
777
|
-
},
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
728
|
+
i.hoverValue = "", D(document, "keydown", l.keydown);
|
|
729
|
+
}), I(document, "keydown", l.keydown), l;
|
|
730
|
+
}, an = ({ api: e, state: t, props: o }) => (n) => {
|
|
731
|
+
const i = n && n.type === "mouseenter" ? 200 : 0;
|
|
732
|
+
if (o.visible === "auto") {
|
|
733
|
+
const { clientWidth: l, scrollWidth: a } = t.referenceElm;
|
|
734
|
+
if (a <= l)
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
e.setExpectedState(!0), e.handleShowPopper(i);
|
|
738
|
+
}, un = (e) => () => {
|
|
739
|
+
e.setExpectedState(!1), e.debounceClose();
|
|
740
|
+
}, pn = ({ api: e, state: t }) => () => {
|
|
741
|
+
t.focusing = !0, e.show();
|
|
742
|
+
}, dn = ({ api: e, state: t }) => () => {
|
|
743
|
+
t.focusing = !1, e.hide();
|
|
744
|
+
}, fn = ({ api: e, state: t }) => () => {
|
|
745
|
+
t.focusing = !1, e.show();
|
|
746
|
+
}, cn = ({ props: e, state: t }) => (o) => {
|
|
747
|
+
!t.expectedState || e.manual || (clearTimeout(t.timeout), t.timeout = window.setTimeout(() => {
|
|
748
|
+
t.showPopper = !0;
|
|
749
|
+
}, e.openDelay || o), e.hideAfter > 0 && (t.timeoutPending = window.setTimeout(() => {
|
|
750
|
+
t.showPopper = !1;
|
|
751
|
+
}, e.hideAfter)));
|
|
752
|
+
}, mn = ({ api: e, props: t, state: o }) => () => {
|
|
753
|
+
t.enterable && o.expectedState || t.manual || (clearTimeout(o.timeout), o.timeoutPending && clearTimeout(o.timeoutPending), o.showPopper = !1, t.disabled && e.doDestroy());
|
|
754
|
+
}, hn = ({ props: e, api: t, state: o, popperVmRef: n }) => (r) => {
|
|
755
|
+
if (e.manual)
|
|
756
|
+
return;
|
|
757
|
+
const i = o.referenceElm, l = n.popper;
|
|
758
|
+
!l || !i || l.contains(r.target) || i.contains(r.target) || o.showPopper && (t.setExpectedState(!1), t.debounceClose());
|
|
759
|
+
}, yn = ({ state: e }) => (t) => {
|
|
760
|
+
e.expectedState === !1 && clearTimeout(e.timeoutPending), e.expectedState = t;
|
|
761
|
+
}, gn = ({ state: e, api: t, vm: o }) => () => {
|
|
762
|
+
const n = e.referenceElm;
|
|
763
|
+
e.showPopper = !1, n && n.nodeType === 1 && (D(document, "click", t.handleDocumentClick), D(n, "mouseenter", t.show), D(n, "mouseleave", t.hide), D(n, "focus", t.focusHandler), D(n, "blur", t.handleBlur), D(n, "click", t.removeFocusing)), o.popperVM && (typeof o.popperVM.$destroy == "function" && o.popperVM.$destroy(), o.popperVM = null);
|
|
764
|
+
}, bn = ({ api: e, props: t }) => nt(t.closeDelay, () => {
|
|
765
|
+
e.handleClosePopper();
|
|
766
|
+
}), vn = (e) => (t) => {
|
|
767
|
+
t ? R(e.referenceElm, "focusing") : J(e.referenceElm, "focusing");
|
|
768
|
+
}, wn = ({ slots: e, api: t }) => () => {
|
|
769
|
+
if (!e.default || !e.default().length) {
|
|
770
|
+
t.handleFocus();
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
let o = e.default()[0];
|
|
774
|
+
o = o.elm || o.el, o && o.focus ? o.focus() : t.handleFocus();
|
|
775
|
+
}, Sn = ({ api: e, state: t, vm: o }) => (n) => {
|
|
776
|
+
let r = null;
|
|
777
|
+
o.$el.nodeType === 8 ? r = n : o.$el.nodeType === 1 && (r = o.$el), !(!r || r.nodeType === 8 || t.referenceElm) && (t.referenceElm = r, r.setAttribute("aria-describedby", t.tooltipId), r.setAttribute("tabindex", t.tabindex.toString()), I(document, "click", e.handleDocumentClick), I(r, "mouseenter", e.show), I(r, "mouseleave", e.hide), I(r, "focus", e.focusHandler), I(r, "blur", e.handleBlur), I(r, "click", e.removeFocusing));
|
|
778
|
+
}, Cn = ({ state: e, popperVmRef: t }) => (o) => {
|
|
779
|
+
for (let n of o)
|
|
780
|
+
n.type === "attributes" && n.attributeName === "x-placement" && (e.xPlacement = t.popper.getAttribute("x-placement") || "bottom");
|
|
781
|
+
}, On = ({ vm: e, nextTick: t, popperVmRef: o }) => (n) => {
|
|
782
|
+
t(() => e.bindEvent(n));
|
|
783
|
+
let r = e.popperVM;
|
|
784
|
+
e.$refs.popper ? o.popper = e.$refs.popper : o.popper = r.$el, t(() => {
|
|
785
|
+
e.modelValue && e.updatePopper();
|
|
786
|
+
});
|
|
787
|
+
}, $e = typeof window > "u", ne = {}, X = {
|
|
788
|
+
leave: "v-modal-leave",
|
|
789
|
+
enter: "v-modal-enter",
|
|
790
|
+
modal: "v-modal"
|
|
791
|
+
}, _n = (e, t) => {
|
|
792
|
+
for (let o = e.length - 1; o >= 0; o--)
|
|
793
|
+
if (e[o].id === t) {
|
|
794
|
+
e.splice(o, 1);
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
let Oe;
|
|
799
|
+
const $ = {
|
|
800
|
+
step: 2,
|
|
801
|
+
zIndex: 2e3,
|
|
802
|
+
globalScroll: !1,
|
|
803
|
+
// 是否打开全局滚动监听
|
|
804
|
+
modalFade: !0,
|
|
805
|
+
modalStack: [],
|
|
806
|
+
modalDom: null,
|
|
807
|
+
// 当前model挂载的div.
|
|
808
|
+
hasModal: !1,
|
|
809
|
+
// 当前是否有Modal
|
|
810
|
+
popLockClass: "popup-parent--hidden",
|
|
811
|
+
oldBodyBorder: "",
|
|
812
|
+
viewportWindow: null,
|
|
813
|
+
fixBodyBorder() {
|
|
814
|
+
const e = window.innerWidth - document.documentElement.clientWidth;
|
|
815
|
+
e && (this.oldBodyBorder = document.documentElement.style.borderRight, document.body.style.borderRight = `${e}px solid transparent`);
|
|
816
|
+
},
|
|
817
|
+
resetBodyBorder() {
|
|
818
|
+
document.body.style.borderRight = this.oldBodyBorder, this.oldBodyBorder = "";
|
|
819
|
+
},
|
|
820
|
+
/** 全局反注册 */
|
|
821
|
+
deregister: (e) => {
|
|
822
|
+
e && (ne[e] = null, delete ne[e]);
|
|
823
|
+
},
|
|
824
|
+
/** 返回全局实例 */
|
|
825
|
+
getInstance: (e) => ne[e],
|
|
826
|
+
/** 全局注册 仅vue-popup.ts中使用,instance就是vm, 把vm注册到 vm._popupId 这个键值上 */
|
|
827
|
+
register: (e, t) => {
|
|
828
|
+
e && t && (ne[e] = t);
|
|
829
|
+
},
|
|
830
|
+
nextZIndex: () => {
|
|
831
|
+
const e = $.zIndex;
|
|
832
|
+
return $.zIndex += $.step, e;
|
|
833
|
+
},
|
|
834
|
+
/** 打开遮罩层, 仅vue-popup.ts中使用。 dom = vm.$el 或者 undefined (appendtoBody时) */
|
|
835
|
+
openModal(e, t, o, n, r) {
|
|
836
|
+
if ($e || !e || t === void 0)
|
|
837
|
+
return;
|
|
838
|
+
this.modalFade = r;
|
|
839
|
+
for (let a = 0, s = this.modalStack.length; a < s; a++)
|
|
840
|
+
if (this.modalStack[a].id === e)
|
|
841
|
+
return;
|
|
842
|
+
const i = Oe();
|
|
843
|
+
R(i, X.modal), this.modalFade && !$.hasModal && R(i, X.enter), n && n.trim().split(/\s+/).forEach((s) => R(i, s)), setTimeout(() => {
|
|
844
|
+
J(i, X.enter);
|
|
845
|
+
}, 200), t && (i.style.zIndex = t.toString()), i.style.display = "", i.tabIndex = 0;
|
|
846
|
+
let l;
|
|
847
|
+
o && o.parentNode && o.parentNode.nodeType !== 11 ? l = o.parentNode : l = document.body, l.appendChild(i), this.modalStack.push({ id: e, zIndex: t, modalClass: n });
|
|
848
|
+
},
|
|
849
|
+
/** 点击背景遮罩层时,调用栈顶的popup,调用它的close() */
|
|
850
|
+
doOnModalClick: () => {
|
|
851
|
+
const e = $.modalStack, t = e[e.length - 1];
|
|
852
|
+
if (!t)
|
|
853
|
+
return;
|
|
854
|
+
const o = $.getInstance(t.id);
|
|
855
|
+
o && o.closeOnClickModal && typeof o.close == "function" && o.close();
|
|
856
|
+
},
|
|
857
|
+
closeModal(e) {
|
|
858
|
+
const t = this.modalStack, o = Oe();
|
|
859
|
+
if (t.length > 0) {
|
|
860
|
+
const n = t[t.length - 1];
|
|
861
|
+
if (n.id === e) {
|
|
862
|
+
n.modalClass && n.modalClass.trim().split(/\s+/).forEach((l) => J(o, l)), t.pop();
|
|
863
|
+
const r = t.length;
|
|
864
|
+
r > 0 && (o.style.zIndex = t[r - 1].zIndex.toString());
|
|
865
|
+
} else
|
|
866
|
+
_n(t, e);
|
|
867
|
+
}
|
|
868
|
+
t.length === 0 && (this.modalFade && R(o, X.leave), J(document.body, this.popLockClass), this.resetBodyBorder(), setTimeout(() => {
|
|
869
|
+
t.length === 0 && (o.parentNode && o.parentNode.removeChild(o), o.style.display = "none", $.modalDom = null), J(o, X.leave);
|
|
870
|
+
}, 200));
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
Oe = () => {
|
|
874
|
+
if ($e)
|
|
875
|
+
return null;
|
|
876
|
+
let e = $.modalDom;
|
|
877
|
+
return e ? $.hasModal = !0 : ($.hasModal = !1, e = document.createElement("div"), $.modalDom = e, e.addEventListener(
|
|
878
|
+
"touchmove",
|
|
879
|
+
(t) => {
|
|
880
|
+
t.preventDefault(), t.stopPropagation();
|
|
881
|
+
},
|
|
882
|
+
{ passive: !0 }
|
|
883
|
+
), I(e, "click", () => {
|
|
884
|
+
$.doOnModalClick();
|
|
885
|
+
})), e;
|
|
886
|
+
};
|
|
887
|
+
$e || I(window, "keydown", (e) => {
|
|
888
|
+
if (e.keyCode === ie.Escape) {
|
|
889
|
+
const t = $.modalStack;
|
|
890
|
+
if (t.length > 0) {
|
|
891
|
+
const o = t[t.length - 1];
|
|
892
|
+
if (!o)
|
|
893
|
+
return;
|
|
894
|
+
const n = $.getInstance(o.id);
|
|
895
|
+
n && n.closeOnPressEscape && (n.handleClose ? n.handleClose("esc") : n.handleAction ? n.handleAction("cancel") : n.close());
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
var T = $;
|
|
900
|
+
const Mn = ["left", "right", "top", "bottom"], Xe = ["shift", "offset", "preventOverflow", "keepTogether", "arrow", "flip", "applyStyle"], En = {
|
|
901
|
+
arrowOffset: 0,
|
|
902
|
+
arrowElement: "[x-arrow]",
|
|
903
|
+
boundariesElement: "viewport",
|
|
904
|
+
boundariesPadding: 5,
|
|
905
|
+
flipBehavior: "flip",
|
|
906
|
+
// 全局没有修改过它,所以它一直是flip
|
|
907
|
+
forceAbsolute: !1,
|
|
908
|
+
gpuAcceleration: !0,
|
|
909
|
+
offset: 0,
|
|
910
|
+
placement: "bottom",
|
|
911
|
+
preventOverflowOrder: Mn,
|
|
912
|
+
modifiers: Xe,
|
|
913
|
+
// 此处是string数组, 构造函数调用之后转为函数数组
|
|
914
|
+
updateHiddenPopperOnScroll: !1
|
|
915
|
+
// 滚动过程中是否更新隐藏的弹出层位置
|
|
916
|
+
}, se = (e, t) => {
|
|
917
|
+
const o = (n) => n !== "" && !isNaN(parseFloat(n)) && isFinite(n);
|
|
918
|
+
Object.keys(t).forEach((n) => {
|
|
919
|
+
let r = "";
|
|
920
|
+
~["width", "height", "top", "right", "bottom", "left"].indexOf(n) && o(t[n]) && (r = "px"), e.style[n] = t[n] + r;
|
|
921
|
+
});
|
|
922
|
+
}, he = (e) => {
|
|
923
|
+
let t = e.offsetParent;
|
|
924
|
+
return t === window.document.body || !t ? window.document.documentElement : t;
|
|
925
|
+
}, q = (e, t) => !e || e.nodeType !== 1 ? void 0 : window.getComputedStyle(e, null)[t], Ze = (e) => e === window.document.body ? !1 : q(e, "position") === "fixed" ? !0 : (e.host && (e = e.host), e.parentNode ? Ze(e.parentNode) : !1), _e = (e) => {
|
|
926
|
+
let t = e.getBoundingClientRect();
|
|
927
|
+
return {
|
|
928
|
+
left: t.left,
|
|
929
|
+
top: t.top,
|
|
930
|
+
right: t.right,
|
|
931
|
+
bottom: t.bottom,
|
|
932
|
+
width: t.right - t.left,
|
|
933
|
+
height: t.bottom - t.top
|
|
934
|
+
};
|
|
935
|
+
}, qe = (e) => {
|
|
936
|
+
const t = ["scroll", "auto"];
|
|
937
|
+
return t.includes(q(e, "overflow")) || t.includes(q(e, "overflow-x")) || t.includes(q(e, "overflow-y"));
|
|
938
|
+
}, Bn = (e) => {
|
|
939
|
+
const t = document.createElement("div");
|
|
940
|
+
se(t, {
|
|
941
|
+
opacity: 0,
|
|
942
|
+
position: "fixed",
|
|
943
|
+
width: 1,
|
|
944
|
+
height: 1,
|
|
945
|
+
top: 0,
|
|
946
|
+
left: 0,
|
|
947
|
+
"z-index": "-99"
|
|
948
|
+
}), e.appendChild(t);
|
|
949
|
+
const o = _e(t);
|
|
950
|
+
return e.removeChild(t), o;
|
|
951
|
+
}, ae = (e) => {
|
|
952
|
+
let t = e.parentNode;
|
|
953
|
+
return t ? t === window.document ? window.document.body.scrollTop || window.document.body.scrollLeft ? window.document.body : window.document.documentElement : qe(t) ? t : ae(t) : e;
|
|
954
|
+
}, In = (e, t, o, n) => {
|
|
955
|
+
let { top: r, left: i, width: l, height: a } = _e(e);
|
|
956
|
+
if (o) {
|
|
957
|
+
if (n.parentElement) {
|
|
958
|
+
const { top: f, left: c } = Bn(n.parentElement);
|
|
959
|
+
r -= f, i -= c;
|
|
960
|
+
}
|
|
961
|
+
return {
|
|
962
|
+
top: r,
|
|
963
|
+
left: i,
|
|
964
|
+
bottom: r + a,
|
|
965
|
+
right: i + l,
|
|
966
|
+
width: l,
|
|
967
|
+
height: a
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
let s = _e(t);
|
|
971
|
+
return {
|
|
972
|
+
top: r - s.top,
|
|
973
|
+
left: i - s.left,
|
|
974
|
+
bottom: r - s.top + a,
|
|
975
|
+
right: i - s.left + l,
|
|
976
|
+
width: l,
|
|
977
|
+
height: a
|
|
978
|
+
};
|
|
979
|
+
}, Tn = (e) => e === document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : e.scrollTop, $n = (e) => e === document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : e.scrollLeft, xn = (e, t) => {
|
|
980
|
+
const o = Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight);
|
|
981
|
+
return { width: Math.max(e.scrollWidth, e.offsetWidth, t.clientWidth, t.scrollWidth, t.offsetWidth), height: o };
|
|
982
|
+
}, ye = (e) => {
|
|
983
|
+
let t = e.style.display, o = e.style.visibility;
|
|
984
|
+
e.style.display = "block", e.style.visibility = "hidden";
|
|
985
|
+
let n = window.getComputedStyle(e), r = parseFloat(n.marginTop) + parseFloat(n.marginBottom), i = parseFloat(n.marginLeft) + parseFloat(n.marginRight), l = { width: e.offsetWidth + i, height: e.offsetHeight + r };
|
|
986
|
+
return e.style.display = t, e.style.visibility = o, l;
|
|
987
|
+
}, Ae = (e) => {
|
|
988
|
+
let t = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
989
|
+
return e.replace(/left|right|bottom|top/g, (o) => t[o]);
|
|
990
|
+
}, Z = (e) => {
|
|
991
|
+
let t = V({}, e);
|
|
992
|
+
return t.right = t.left + t.width, t.bottom = t.top + t.height, t;
|
|
993
|
+
}, Qe = (e, t = []) => {
|
|
994
|
+
const o = e.parentNode;
|
|
995
|
+
return o ? (qe(o) && t.push(o), q(o, "position") === "fixed" ? t : Qe(o, t)) : t;
|
|
996
|
+
}, Le = (e) => {
|
|
997
|
+
const t = {
|
|
998
|
+
width: e.offsetWidth,
|
|
999
|
+
height: e.offsetHeight,
|
|
1000
|
+
left: e.offsetLeft,
|
|
1001
|
+
top: e.offsetTop,
|
|
1002
|
+
right: 0,
|
|
1003
|
+
bottom: 0
|
|
1004
|
+
};
|
|
1005
|
+
return t.right = t.left + t.width, t.bottom = t.top + t.height, t;
|
|
1006
|
+
}, Ne = (e) => {
|
|
1007
|
+
e.stopPropagation();
|
|
1008
|
+
}, Fe = je && typeof ResizeObserver == "function" ? new ResizeObserver((e) => {
|
|
1009
|
+
e.forEach((t) => {
|
|
1010
|
+
t.target.popperVm && t.contentRect.height > 50 && t.target.popperVm.update();
|
|
1011
|
+
});
|
|
1012
|
+
}) : null;
|
|
1013
|
+
class Dn {
|
|
1014
|
+
constructor(t, o, n) {
|
|
1015
|
+
this.modifiers = {}, this.popperOuterSize = null, this._reference = t, this._popper = o, this.state = {}, this._options = V(V({}, En), n), this._options.modifierFns = Xe.map((r) => this[r]), je && (this._popper.setAttribute("x-placement", this._options.placement), this.state.position = this._getPopperPositionByRefernce(this._reference), se(this._popper, { position: this.state.position, top: 0 }), this._popper && (this._popper.popperVm = this, Fe && Fe.observe(this._popper)), this.update(), this._setupEventListeners());
|
|
1016
|
+
}
|
|
1017
|
+
destroy() {
|
|
1018
|
+
return this._popper.removeAttribute("x-placement"), this._popper.style.display = "none", this._removeEventListeners(), this._options.removeOnDestroy && this._popper.remove(), this;
|
|
1019
|
+
}
|
|
1020
|
+
onUpdate(t) {
|
|
1021
|
+
return this.state.updateCallback = t, this;
|
|
1022
|
+
}
|
|
1023
|
+
update() {
|
|
1024
|
+
let t = { instance: this, styles: {} };
|
|
1025
|
+
this.stopEventBubble(), this.popperOuterSize = null, t.placement = t._originalPlacement = this._options.placement, t.offsets = this._getRefPopOffsets(this._popper, this._reference, t.placement), t.boundaries = this._getBoundaries(t, this._options.boundariesPadding, this._options.boundariesElement), t = this.runModifiers(t, this._options.modifierFns), typeof this.state.updateCallback == "function" && this.state.updateCallback(t);
|
|
1026
|
+
}
|
|
1027
|
+
// 阻止popper的mousewheel等事件冒泡。 通过 onxxx 绑定,是为了避免重复绑定事件
|
|
1028
|
+
stopEventBubble() {
|
|
1029
|
+
this._popper && (this._popper.onmousewheel || (this._popper.onmousewheel = Ne), this._popper.onwheel || (this._popper.onwheel = Ne));
|
|
1030
|
+
}
|
|
1031
|
+
/** 按顺序执行Modifiers, 如果传入终点modifier,则执行到指定位置 */
|
|
1032
|
+
runModifiers(t, o, n) {
|
|
1033
|
+
let r = o.slice();
|
|
1034
|
+
const i = this._options;
|
|
1035
|
+
return n !== void 0 && (r = this._options.modifierFns.slice(
|
|
1036
|
+
0,
|
|
1037
|
+
i.modifierFns.findIndex((l) => l === n)
|
|
1038
|
+
)), r.forEach((l) => {
|
|
1039
|
+
rt(l) === "function" && (t = l.call(this, t));
|
|
1040
|
+
}), t;
|
|
1041
|
+
}
|
|
1042
|
+
// 此时才把offsets.popper 赋值给popper dom, offsets.array赋值给array dom
|
|
1043
|
+
applyStyle(t) {
|
|
1044
|
+
let o = { position: t.offsets.popper.position }, n = Math.round(t.offsets.popper.left), r = Math.round(t.offsets.popper.top);
|
|
1045
|
+
return this._options.gpuAcceleration ? (o.transform = `translate3d(${n}px, ${r}px, 0)`, Object.assign(o, { top: 0, left: 0 })) : Object.assign(o, { top: r, left: n }), Object.assign(o, t.styles), se(this._popper, o), this._popper.setAttribute("x-placement", t.placement), t.offsets.arrow && se(t.arrowElement, t.offsets.arrow), t;
|
|
1046
|
+
}
|
|
1047
|
+
// 判断 placement是不是2段式的,是则处理一下偏移。 修改data.offsets.popper的值
|
|
1048
|
+
shift(t) {
|
|
1049
|
+
let o = t.placement, n = o.split("-")[0], r = o.split("-")[1];
|
|
1050
|
+
if (r) {
|
|
1051
|
+
let { top: i, left: l, height: a, width: s } = t.offsets.reference, u = Z(t.offsets.popper), f = {
|
|
1052
|
+
y: {
|
|
1053
|
+
start: { top: i },
|
|
1054
|
+
end: { top: i + a - u.height }
|
|
1055
|
+
},
|
|
1056
|
+
x: {
|
|
1057
|
+
start: { left: l },
|
|
1058
|
+
end: { left: l + s - u.width }
|
|
1059
|
+
}
|
|
1060
|
+
}, c = ~["bottom", "top"].indexOf(n) ? "x" : "y";
|
|
1061
|
+
t.offsets.popper = Object.assign(u, f[c][r]);
|
|
1062
|
+
}
|
|
1063
|
+
return t;
|
|
1064
|
+
}
|
|
1065
|
+
// 校正popper的位置在boundaries 的内部
|
|
1066
|
+
preventOverflow(t) {
|
|
1067
|
+
if (this._options.ignoreBoundaries)
|
|
1068
|
+
return t;
|
|
1069
|
+
let o = this._options.preventOverflowOrder, n = Z(t.offsets.popper), r = {
|
|
1070
|
+
top: () => {
|
|
1071
|
+
let { top: i } = n;
|
|
1072
|
+
return i < t.boundaries.top && (i = Math.max(i, t.boundaries.top)), { top: i };
|
|
1073
|
+
},
|
|
1074
|
+
right: () => {
|
|
1075
|
+
let { left: i } = n;
|
|
1076
|
+
return n.right > t.boundaries.right && (i = Math.min(i, t.boundaries.right - n.width)), { left: i };
|
|
1077
|
+
},
|
|
1078
|
+
bottom: () => {
|
|
1079
|
+
let { top: i } = n;
|
|
1080
|
+
return n.bottom > t.boundaries.bottom && (i = Math.min(i, t.boundaries.bottom - n.height)), { top: i };
|
|
1081
|
+
},
|
|
1082
|
+
left: () => {
|
|
1083
|
+
let { left: i } = n;
|
|
1084
|
+
return n.left < t.boundaries.left && (i = Math.max(i, t.boundaries.left)), { left: i };
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
return o.forEach((i) => {
|
|
1088
|
+
t.offsets.popper = Object.assign(n, r[i]());
|
|
1089
|
+
}), t;
|
|
1090
|
+
}
|
|
1091
|
+
// 校正popper的位置在reference的边上。 如果2个分离了,重新调整popper的位置。 可能是担心 modifiers.offset 带来的副作用吧
|
|
1092
|
+
keepTogether(t) {
|
|
1093
|
+
let o = Z(t.offsets.popper), n = t.offsets.reference;
|
|
1094
|
+
return o.right < Math.floor(n.left) && (t.offsets.popper.left = Math.floor(n.left) - o.width), o.left > Math.floor(n.right) && (t.offsets.popper.left = Math.floor(n.right)), o.bottom < Math.floor(n.top) && (t.offsets.popper.top = Math.floor(n.top) - o.height), o.top > Math.floor(n.bottom) && (t.offsets.popper.top = Math.floor(n.bottom)), t;
|
|
1095
|
+
}
|
|
1096
|
+
// 根据flip的策略,计算当前应该显示的位置。 空间不够要计算出flip的位置。 可能是担心preventOverflow 时,造成pop, reference会重叠。 重叠了就要flip一下
|
|
1097
|
+
flip(t) {
|
|
1098
|
+
if (t.flipped && t.placement === t._originalPlacement)
|
|
1099
|
+
return t;
|
|
1100
|
+
const o = t.placement.split("-");
|
|
1101
|
+
let n = o[0], r = Ae(n), i = o[1] || "", l = [n, r];
|
|
1102
|
+
return l.forEach((a, s) => {
|
|
1103
|
+
if (n !== a || l.length === s + 1)
|
|
1104
|
+
return;
|
|
1105
|
+
n = t.placement.split("-")[0], r = Ae(n);
|
|
1106
|
+
let u = Z(t.offsets.popper), f = ~["right", "bottom"].indexOf(n), c = Math.floor(t.offsets.reference[n]), p = Math.floor(u[r]);
|
|
1107
|
+
(f && c > p || !f && c < p) && (t.flipped = !0, t.placement = l[s + 1], i && (t.placement += `-${i}`), t.offsets.popper = this._getRefPopOffsets(this._popper, this._reference, t.placement).popper, t = this.runModifiers(t, this._options.modifierFns, this.flip));
|
|
1108
|
+
}), t;
|
|
1109
|
+
}
|
|
1110
|
+
// 根据入参option上的offset, 给data.offset.popper进行校正
|
|
1111
|
+
offset(t) {
|
|
1112
|
+
let o = this._options.offset, n = t.offsets.popper;
|
|
1113
|
+
return ~t.placement.indexOf("left") ? n.top -= o : ~t.placement.indexOf("right") ? n.top += o : ~t.placement.indexOf("top") ? n.left -= o : ~t.placement.indexOf("bottom") && (n.left += o), t;
|
|
1114
|
+
}
|
|
1115
|
+
// 计算arrow的位置,保存在data.offsets.arrow ={top,left}
|
|
1116
|
+
arrow(t) {
|
|
1117
|
+
let o = this._options.arrowElement, n = this._options.arrowOffset;
|
|
1118
|
+
if (typeof o == "string" && (o = this._popper.querySelector(o)), !o || !this._popper.contains(o))
|
|
1119
|
+
return t;
|
|
1120
|
+
let r = {}, i = t.placement.split("-")[0], l = Z(t.offsets.popper), a = t.offsets.reference, s = ~["left", "right"].indexOf(i), u = s ? "height" : "width", f = s ? "bottom" : "right", c = s ? "left" : "top", p = s ? "top" : "left", d = this.popperOuterSize ? this.popperOuterSize : this.popperOuterSize = ye(this._popper), m = ye(o), v = m[u];
|
|
1121
|
+
a[f] - v < l[p] && (t.offsets.popper[p] -= l[p] - (a[f] - v)), a[p] + v > l[f] && (t.offsets.popper[p] += a[p] + v - l[f]);
|
|
1122
|
+
let w = a[p] + (n || a[u] / 2 - v / 2) - l[p];
|
|
1123
|
+
w = Math.max(Math.min(l[u] - v - 8, w), 8), r[p] = w, r[c] = "";
|
|
1124
|
+
const B = this._options.placement.split("-");
|
|
1125
|
+
return this._options.adjustArrow && ~["top", "bottom"].indexOf(B[0]) && p === "left" && (B[1] === "start" ? r.left = 8 : B[1] || (r.left = (d.width - m.width) / 2)), t.offsets.arrow = r, t.arrowElement = o, t;
|
|
1126
|
+
}
|
|
1127
|
+
/** 判断 reference 的 offsetParent 元素是fix还是abs, 这个值会赋值给popper 的dom */
|
|
1128
|
+
_getPopperPositionByRefernce(t) {
|
|
1129
|
+
return this._options.forceAbsolute ? "absolute" : Ze(t) ? "fixed" : "absolute";
|
|
1130
|
+
}
|
|
1131
|
+
/** 实时计算一下popper, reference的 位置信息, 用于 */
|
|
1132
|
+
_getRefPopOffsets(t, o, n) {
|
|
1133
|
+
n = n.split("-")[0];
|
|
1134
|
+
let r = { position: this.state.position }, i = r.position === "fixed", l = In(
|
|
1135
|
+
o,
|
|
1136
|
+
he(t),
|
|
1137
|
+
i,
|
|
1138
|
+
t
|
|
1139
|
+
);
|
|
1140
|
+
const { width: a, height: s } = this.popperOuterSize ? this.popperOuterSize : this.popperOuterSize = ye(t);
|
|
1141
|
+
return ~["right", "left"].indexOf(n) ? (r.top = l.top + l.height / 2 - s / 2, n === "left" ? r.left = l.left - a : r.left = l.right) : (r.left = l.left + l.width / 2 - a / 2, n === "top" ? r.top = l.top - s : r.top = l.bottom), r.width = a, r.height = s, {
|
|
1142
|
+
popper: r,
|
|
1143
|
+
reference: l
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
_setupEventListeners() {
|
|
1147
|
+
var t, o;
|
|
1148
|
+
if (this.state.updateBoundFn = this.update.bind(this), this.state.scrollUpdate = () => {
|
|
1149
|
+
if (this._options.updateHiddenPopperOnScroll)
|
|
1150
|
+
this.state.updateBoundFn();
|
|
1151
|
+
else {
|
|
1152
|
+
if (Ue(this._reference))
|
|
1153
|
+
return;
|
|
1154
|
+
this.state.updateBoundFn();
|
|
1155
|
+
}
|
|
1156
|
+
}, I(window, "resize", this.state.updateBoundFn), this._options.boundariesElement !== "window") {
|
|
1157
|
+
let n = this._options.scrollParent || ae(this._reference);
|
|
1158
|
+
const r = [];
|
|
1159
|
+
if ((o = (t = n == null ? void 0 : n.dataset) == null ? void 0 : t.tag) != null && o.includes("-form")) {
|
|
1160
|
+
r.push(n);
|
|
1161
|
+
let i = ae(n);
|
|
1162
|
+
(i === window.document.body || i === window.document.documentElement) && (i = window), r.push(i);
|
|
1163
|
+
}
|
|
1164
|
+
if ((n === window.document.body || n === window.document.documentElement) && (n = window), this.state.scrollTarget = n, this._options.bubbling || T.globalScroll) {
|
|
1165
|
+
let i = Qe(this._reference);
|
|
1166
|
+
this.state.scrollTargets = i || [], i.forEach((l) => {
|
|
1167
|
+
I(l, "scroll", this.state.scrollUpdate);
|
|
1168
|
+
});
|
|
1169
|
+
} else
|
|
1170
|
+
r.length ? (this.state.scrollTargets = r, r.forEach((i) => {
|
|
1171
|
+
I(i, "scroll", this.state.scrollUpdate);
|
|
1172
|
+
})) : I(n, "scroll", this.state.scrollUpdate);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
_removeEventListeners() {
|
|
1176
|
+
D(window, "resize", this.state.updateBoundFn), this._options.boundariesElement !== "window" && this.state.scrollTarget && (D(this.state.scrollTarget, "scroll", this.state.scrollUpdate), this.state.scrollTarget = null, (this._options.bubbling || T.globalScroll) && ((this.state.scrollTargets || []).forEach((o) => {
|
|
1177
|
+
D(o, "scroll", this.state.scrollUpdate);
|
|
1178
|
+
}), this.state.scrollTargets = null)), this.state.updateBoundFn = null, this.state.scrollUpdate = null;
|
|
1179
|
+
}
|
|
1180
|
+
/** 实时计算一下Boundary的位置 */
|
|
1181
|
+
_getBoundaries(t, o, n) {
|
|
1182
|
+
let r = { right: 0, left: 0, top: 0, bottom: 0 };
|
|
1183
|
+
if (n === "window" || n === "body") {
|
|
1184
|
+
let i = window.document.body, l = window.document.documentElement, { width: a, height: s } = xn(i, l);
|
|
1185
|
+
r = { top: 0, right: a, bottom: s, left: 0 };
|
|
1186
|
+
} else if (n === "viewport") {
|
|
1187
|
+
let i = he(this._popper), l = ae(this._popper), a = Le(i);
|
|
1188
|
+
const u = t.offsets.popper.position === "fixed" || !this._options.appendToBody && ["right", "left"].includes(this._options.placement);
|
|
1189
|
+
let f = u ? 0 : Tn(l), c = u ? 0 : $n(l);
|
|
1190
|
+
const p = T.viewportWindow || window;
|
|
1191
|
+
r = {
|
|
1192
|
+
top: 0 - (a.top - f),
|
|
1193
|
+
right: p.document.documentElement.clientWidth - (a.left - c),
|
|
1194
|
+
bottom: p.document.documentElement.clientHeight - (a.top - f),
|
|
1195
|
+
left: 0 - (a.left - c)
|
|
1196
|
+
};
|
|
1197
|
+
} else if (he(this._popper) === n) {
|
|
1198
|
+
const { clientWidth: i, clientHeight: l } = n;
|
|
1199
|
+
r = {
|
|
1200
|
+
right: i,
|
|
1201
|
+
bottom: l,
|
|
1202
|
+
top: 0,
|
|
1203
|
+
left: 0
|
|
1204
|
+
};
|
|
1205
|
+
} else
|
|
1206
|
+
r = Le(n);
|
|
1207
|
+
return r.right -= o, r.left += o, r.bottom = r.bottom - o, r.top = r.top + o, r;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
var kn = Dn;
|
|
1211
|
+
const ze = (e) => e.stopPropagation(), Pn = typeof window > "u", He = ({ state: e, props: t, vm: o, slots: n }) => {
|
|
1212
|
+
let r = e.referenceElm || t.reference || o.$refs.reference && o.$refs.reference.$el || o.$refs.reference;
|
|
1213
|
+
return !r && n.reference && n.reference()[0] && (e.referenceElm = n.reference()[0].elm || n.reference()[0].el, r = e.referenceElm), r;
|
|
1214
|
+
}, Vn = (e) => {
|
|
1215
|
+
if (!e || !e.nodeType)
|
|
1216
|
+
return;
|
|
1217
|
+
let t = (r) => parseInt(window.getComputedStyle(r).zIndex, 10) || 0, o = t(e), n;
|
|
1218
|
+
do {
|
|
1219
|
+
if (e = e.parentNode, e && e instanceof ShadowRoot && e.host && (e = e.host), e)
|
|
1220
|
+
n = t(e);
|
|
1221
|
+
else
|
|
1222
|
+
break;
|
|
1223
|
+
o = n > o ? n : o;
|
|
1224
|
+
} while (e !== document.body);
|
|
1225
|
+
return o + 1 + "";
|
|
1226
|
+
};
|
|
1227
|
+
var An = (e) => {
|
|
1228
|
+
const {
|
|
1229
|
+
parent: t,
|
|
1230
|
+
emit: o,
|
|
1231
|
+
nextTick: n,
|
|
1232
|
+
onBeforeUnmount: r,
|
|
1233
|
+
onDeactivated: i,
|
|
1234
|
+
props: l,
|
|
1235
|
+
watch: a,
|
|
1236
|
+
reactive: s,
|
|
1237
|
+
vm: u,
|
|
1238
|
+
slots: f,
|
|
1239
|
+
toRefs: c,
|
|
1240
|
+
popperVmRef: p
|
|
1241
|
+
} = e, d = s({
|
|
1242
|
+
popperJS: null,
|
|
1243
|
+
appended: !1,
|
|
1244
|
+
// arrow 是否添加
|
|
1245
|
+
popperElm: null,
|
|
1246
|
+
showPopper: l.manual ? !!l.modelValue : !1,
|
|
1247
|
+
referenceElm: null,
|
|
1248
|
+
currentPlacement: ""
|
|
1249
|
+
}), m = (C) => {
|
|
1250
|
+
if (d.appended)
|
|
1251
|
+
return;
|
|
1252
|
+
d.appended = !0;
|
|
1253
|
+
const S = document.createElement("div");
|
|
1254
|
+
S.setAttribute("x-arrow", ""), S.className = "popper__arrow", C.appendChild(S);
|
|
1255
|
+
}, v = (C) => {
|
|
1256
|
+
const { followReferenceHide: S = !0 } = (l == null ? void 0 : l.popperOptions) || {}, { _popper: A, _reference: M } = C;
|
|
1257
|
+
S && Ue(M) && (A.style.display = "none");
|
|
1258
|
+
}, y = (C) => l.zIndex === "relative" ? Vn(C) : T.nextZIndex(), w = (C) => {
|
|
1259
|
+
if (Pn || (d.currentPlacement = d.currentPlacement || l.placement, !/^(top|bottom|left|right)(-start|-end)?$/g.test(d.currentPlacement)))
|
|
1260
|
+
return;
|
|
1261
|
+
const S = l.popperOptions || { gpuAcceleration: !1 };
|
|
1262
|
+
d.popperElm = d.popperElm || l.popper || u.$refs.popper || p.popper || C;
|
|
1263
|
+
const A = d.popperElm;
|
|
1264
|
+
let M = He({ state: d, props: l, vm: u, slots: f });
|
|
1265
|
+
!A || !M || M.nodeType !== Node.ELEMENT_NODE || (l.visibleArrow && m(A), l.appendToBody || l.popperAppendToBody ? document.body.appendChild(d.popperElm) : (t && t.$el && t.$el.appendChild(d.popperElm), S.forceAbsolute = !0), S.placement = d.currentPlacement, S.offset = l.offset || 0, S.arrowOffset = l.arrowOffset || 0, S.adjustArrow = l.adjustArrow || !1, S.appendToBody = l.appendToBody || l.popperAppendToBody, d.popperJS = new kn(M, A, S), o("created", d), typeof S.onUpdate == "function" && d.popperJS.onUpdate(S.onUpdate), d.popperJS._popper.style.zIndex = y(d.popperJS._reference), v(d.popperJS), I(d.popperElm, "click", ze));
|
|
1266
|
+
}, B = (C) => {
|
|
1267
|
+
C && C !== !0 && (d.popperElm = C);
|
|
1268
|
+
const S = d.popperJS;
|
|
1269
|
+
S ? (S._reference = He({ state: d, props: l, vm: u, slots: f }), S.update(), S._popper && C !== !0 && (S._popper.style.zIndex = y(S._reference), v(d.popperJS))) : w(C && C !== !0 ? C : void 0);
|
|
1270
|
+
}, g = (C) => {
|
|
1271
|
+
!d.popperJS || d.showPopper && !C || (d.popperJS.destroy(), d.popperJS = null);
|
|
1272
|
+
}, P = (C) => {
|
|
1273
|
+
C && d.popperElm && d.popperElm.parentNode === document.body && (D(d.popperElm, "click", ze), d.popperElm.remove());
|
|
1274
|
+
};
|
|
1275
|
+
return a(
|
|
1276
|
+
() => d.showPopper,
|
|
1277
|
+
(C) => {
|
|
1278
|
+
l.disabled || (C && n(B), l.trigger === "manual" && o("update:modelValue", C));
|
|
1279
|
+
}
|
|
1280
|
+
), r(() => {
|
|
1281
|
+
n(() => {
|
|
1282
|
+
g(!0), (l.appendToBody || l.popperAppendToBody) && P("remove");
|
|
1283
|
+
});
|
|
1284
|
+
}), i(() => {
|
|
1285
|
+
g(!0), (l.appendToBody || l.popperAppendToBody) && P("remove");
|
|
1286
|
+
}), V({ updatePopper: B, destroyPopper: P, doDestroy: g }, c(d));
|
|
1287
|
+
};
|
|
1288
|
+
const Ln = [
|
|
1289
|
+
"state",
|
|
1290
|
+
"bindEvent",
|
|
1291
|
+
"hide",
|
|
1292
|
+
"show",
|
|
1293
|
+
"doDestroy",
|
|
1294
|
+
"handleFocus",
|
|
1295
|
+
"debounceClose",
|
|
1296
|
+
"handleShowPopper",
|
|
1297
|
+
"handleClosePopper",
|
|
1298
|
+
"setExpectedState",
|
|
1299
|
+
"updatePopper",
|
|
1300
|
+
"focusHandler"
|
|
1301
|
+
], Nn = ({ reactive: e, showPopper: t, popperElm: o, referenceElm: n, props: r, inject: i, popperJS: l, currentPlacement: a }) => e({
|
|
1302
|
+
popperJS: l,
|
|
1303
|
+
showPopper: t,
|
|
1304
|
+
popperElm: o,
|
|
1305
|
+
referenceElm: n,
|
|
1306
|
+
currentPlacement: a,
|
|
1307
|
+
timeout: null,
|
|
1308
|
+
focusing: !1,
|
|
1309
|
+
expectedState: void 0,
|
|
1310
|
+
tooltipId: lt("tiny-tooltip-", 4),
|
|
1311
|
+
tabindex: r.tabindex,
|
|
1312
|
+
xPlacement: "bottom",
|
|
1313
|
+
showContent: i("showContent", null),
|
|
1314
|
+
tipsMaxWidth: i("tips-max-width", null)
|
|
1315
|
+
}), Fn = (e, {
|
|
1316
|
+
watch: t,
|
|
1317
|
+
toRefs: o,
|
|
1318
|
+
reactive: n,
|
|
1319
|
+
onBeforeUnmount: r,
|
|
1320
|
+
onDeactivated: i,
|
|
1321
|
+
onMounted: l,
|
|
1322
|
+
onUnmounted: a,
|
|
1323
|
+
inject: s
|
|
1324
|
+
}, { vm: u, emit: f, slots: c, nextTick: p, parent: d }) => {
|
|
1325
|
+
const m = {}, v = {}, y = { emit: f, props: e, nextTick: p, toRefs: o, reactive: n, parent: d.$parent, vm: u, popperVmRef: v };
|
|
1326
|
+
Object.assign(y, { slots: c, onBeforeUnmount: r, onDeactivated: i, watch: t });
|
|
1327
|
+
const { showPopper: w, updatePopper: B, popperElm: g, referenceElm: P, doDestroy: C, popperJS: S, currentPlacement: A } = An(
|
|
1328
|
+
y
|
|
1329
|
+
), M = Nn({
|
|
1330
|
+
reactive: n,
|
|
1331
|
+
showPopper: w,
|
|
1332
|
+
popperElm: g,
|
|
1333
|
+
referenceElm: P,
|
|
1334
|
+
props: e,
|
|
1335
|
+
inject: s,
|
|
1336
|
+
popperJS: S,
|
|
1337
|
+
currentPlacement: A
|
|
1338
|
+
});
|
|
1339
|
+
return Object.assign(m, {
|
|
1340
|
+
state: M,
|
|
1341
|
+
doDestroy: C,
|
|
1342
|
+
updatePopper: B,
|
|
1343
|
+
show: an({ api: m, state: M, props: e }),
|
|
1344
|
+
hide: un(m),
|
|
1345
|
+
destroyed: gn({ state: M, api: m, vm: u }),
|
|
1346
|
+
bindPopper: On({ vm: u, nextTick: p, popperVmRef: v }),
|
|
1347
|
+
watchFocusing: vn(M),
|
|
1348
|
+
removeFocusing: fn({ api: m, state: M }),
|
|
1349
|
+
handleBlur: dn({ api: m, state: M }),
|
|
1350
|
+
handleFocus: pn({ api: m, state: M }),
|
|
1351
|
+
debounceClose: bn({ api: m, props: e }),
|
|
1352
|
+
setExpectedState: yn({ state: M }),
|
|
1353
|
+
handleShowPopper: cn({ props: e, state: M }),
|
|
1354
|
+
handleClosePopper: mn({ api: m, props: e, state: M }),
|
|
1355
|
+
bindEvent: Sn({ api: m, state: M, vm: u }),
|
|
1356
|
+
focusHandler: wn({ slots: c, api: m }),
|
|
1357
|
+
handleDocumentClick: hn({ props: e, api: m, state: M, popperVmRef: v }),
|
|
1358
|
+
observeCallback: Cn({ state: M, popperVmRef: v })
|
|
1359
|
+
}), t(() => M.focusing, m.watchFocusing), t(
|
|
1360
|
+
() => e.modelValue,
|
|
1361
|
+
(fe) => p(() => e.manual && (M.showPopper = fe))
|
|
1362
|
+
), l(() => {
|
|
1363
|
+
if (m.bindPopper(), e.genArrowByHtml) {
|
|
1364
|
+
const fe = { attributes: !0, childList: !1, subtree: !1 };
|
|
1365
|
+
m.observer = new MutationObserver(m.observeCallback), m.observer.observe(v.popper, fe);
|
|
1366
|
+
}
|
|
1367
|
+
}), u.$on("tooltip-update", m.bindPopper), a(() => {
|
|
1368
|
+
m.destroyed(), m.observer && m.observer.disconnect(), u.$off("tooltip-update");
|
|
1369
|
+
}), m;
|
|
1370
|
+
};
|
|
1371
|
+
function Me() {
|
|
1372
|
+
return Me = Object.assign ? Object.assign.bind() : function(e) {
|
|
1373
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1374
|
+
var o = arguments[t];
|
|
1375
|
+
for (var n in o) ({}).hasOwnProperty.call(o, n) && (e[n] = o[n]);
|
|
1376
|
+
}
|
|
1377
|
+
return e;
|
|
1378
|
+
}, Me.apply(null, arguments);
|
|
1379
|
+
}
|
|
1380
|
+
var ge = /* @__PURE__ */ U({
|
|
1381
|
+
name: j + "Tooltip",
|
|
1382
|
+
componentName: "Tooltip",
|
|
1383
|
+
props: Me({}, de, {
|
|
1384
|
+
visible: {
|
|
1385
|
+
type: String,
|
|
1386
|
+
default: function() {
|
|
1387
|
+
return "always";
|
|
1388
|
+
},
|
|
1389
|
+
validator: function(t) {
|
|
1390
|
+
return ["always", "auto"].includes(t);
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
adjustArrow: {
|
|
1394
|
+
type: Boolean,
|
|
1395
|
+
default: function() {
|
|
1396
|
+
return !1;
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
appendToBody: {
|
|
1400
|
+
type: Boolean,
|
|
1401
|
+
default: function() {
|
|
1402
|
+
return !0;
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
arrowOffset: {
|
|
1406
|
+
type: Number,
|
|
1407
|
+
default: function() {
|
|
1408
|
+
return 0;
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
boundariesPadding: {
|
|
1412
|
+
type: Number,
|
|
1413
|
+
default: function() {
|
|
1414
|
+
return 5;
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1417
|
+
closeDelay: {
|
|
1418
|
+
type: Number,
|
|
1419
|
+
default: function() {
|
|
1420
|
+
return 300;
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
content: {
|
|
1424
|
+
type: [String, Object]
|
|
1425
|
+
},
|
|
1426
|
+
disabled: {
|
|
1427
|
+
type: Boolean
|
|
1428
|
+
},
|
|
1429
|
+
effect: {
|
|
1430
|
+
type: String,
|
|
1431
|
+
default: function() {
|
|
1432
|
+
return "dark";
|
|
1433
|
+
}
|
|
1434
|
+
},
|
|
1435
|
+
enterable: {
|
|
1436
|
+
type: Boolean,
|
|
1437
|
+
default: function() {
|
|
1438
|
+
return !0;
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
hideAfter: {
|
|
1442
|
+
type: Number,
|
|
1443
|
+
default: function() {
|
|
1444
|
+
return 0;
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
manual: {
|
|
1448
|
+
type: Boolean
|
|
1449
|
+
},
|
|
1450
|
+
modelValue: {
|
|
1451
|
+
type: Boolean
|
|
1452
|
+
},
|
|
1453
|
+
offset: {
|
|
1454
|
+
default: function() {
|
|
1455
|
+
return 0;
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
openDelay: {
|
|
1459
|
+
type: Number,
|
|
1460
|
+
default: function() {
|
|
1461
|
+
return 0;
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
placement: {
|
|
1465
|
+
type: String,
|
|
1466
|
+
default: function() {
|
|
1467
|
+
return "bottom";
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
popper: {},
|
|
1471
|
+
popperClass: {
|
|
1472
|
+
type: String
|
|
1473
|
+
},
|
|
1474
|
+
popperOptions: {
|
|
1475
|
+
default: function() {
|
|
1476
|
+
return {
|
|
1477
|
+
gpuAcceleration: !1,
|
|
1478
|
+
boundariesPadding: 10
|
|
1479
|
+
};
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
pre: {
|
|
1483
|
+
type: Boolean
|
|
1484
|
+
},
|
|
1485
|
+
reference: {},
|
|
1486
|
+
renderContent: {
|
|
1487
|
+
type: Function
|
|
1488
|
+
},
|
|
1489
|
+
tabindex: {
|
|
1490
|
+
type: Number,
|
|
1491
|
+
default: function() {
|
|
1492
|
+
return 0;
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
transition: {
|
|
1496
|
+
type: String,
|
|
1497
|
+
default: function() {
|
|
1498
|
+
return "tiny-fade-in-linear";
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
type: {
|
|
1502
|
+
type: String,
|
|
1503
|
+
validator: function(t) {
|
|
1504
|
+
return !!~["normal", "warning", "error", "info", "success"].indexOf(t);
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
visibleArrow: {
|
|
1508
|
+
type: Boolean,
|
|
1509
|
+
default: function() {
|
|
1510
|
+
return !0;
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
zIndex: {
|
|
1514
|
+
type: String,
|
|
1515
|
+
default: function() {
|
|
1516
|
+
return "next";
|
|
1517
|
+
}
|
|
1518
|
+
},
|
|
1519
|
+
contentMaxHeight: {
|
|
1520
|
+
type: String
|
|
1521
|
+
}
|
|
1522
|
+
}),
|
|
1523
|
+
setup: function(t, o) {
|
|
1524
|
+
return pe({
|
|
1525
|
+
props: t,
|
|
1526
|
+
context: o,
|
|
1527
|
+
renderless: Fn,
|
|
1528
|
+
api: Ln
|
|
1529
|
+
});
|
|
1530
|
+
},
|
|
1531
|
+
render: function() {
|
|
1532
|
+
var t = this, o = function(s) {
|
|
1533
|
+
var u = s.slots.content && s.slots.content();
|
|
1534
|
+
if (u && (!xe.Comment || u[0].type !== xe.Comment))
|
|
1535
|
+
return u;
|
|
1536
|
+
var f;
|
|
1537
|
+
return s.renderContent ? f = s.renderContent(ce, s.content) : s.pre ? f = s.content ? ce("pre", s.content) : null : f = s.content, f;
|
|
1538
|
+
};
|
|
1539
|
+
if (!Object.prototype.hasOwnProperty.call(this, "popperVM")) {
|
|
1540
|
+
var n = {
|
|
1541
|
+
value: null
|
|
1542
|
+
};
|
|
1543
|
+
this.d({
|
|
1544
|
+
popperVM: {
|
|
1545
|
+
get: function() {
|
|
1546
|
+
return n.value || (n.value = it({
|
|
1547
|
+
el: document.createElement("div"),
|
|
1548
|
+
propsData: null,
|
|
1549
|
+
component: {
|
|
1550
|
+
render: function() {
|
|
1551
|
+
var u = o(t), f = typeof u == "string", c = {
|
|
1552
|
+
attrs: {
|
|
1553
|
+
name: t.transition
|
|
1554
|
+
},
|
|
1555
|
+
on: {
|
|
1556
|
+
"after-leave": t.doDestroy
|
|
1557
|
+
}
|
|
1558
|
+
}, p = "is-" + (t.type || t.effect || "dark"), d = function() {
|
|
1559
|
+
return t.setExpectedState(!0);
|
|
1560
|
+
}, m = function() {
|
|
1561
|
+
t.setExpectedState(!1), t.debounceClose();
|
|
1562
|
+
};
|
|
1563
|
+
return t.$nextTick(function() {
|
|
1564
|
+
!t.disabled && t.state.showPopper && u && t.updatePopper();
|
|
1565
|
+
}), ce("transition", c, [ue(H("div", {
|
|
1566
|
+
ref: "popper",
|
|
1567
|
+
id: t.state.tooltipId,
|
|
1568
|
+
class: ["tiny-tooltip", "tiny-tooltip__popper", p, t.popperClass, {
|
|
1569
|
+
"tiny-tooltip__show-tips": t.state.showContent
|
|
1570
|
+
}],
|
|
1571
|
+
style: "max-width:" + t.state.tipsMaxWidth + "px",
|
|
1572
|
+
role: "tooltip",
|
|
1573
|
+
"aria-hidden": t.disabled || !t.state.showPopper ? "true" : "false",
|
|
1574
|
+
onMouseenter: function() {
|
|
1575
|
+
return d();
|
|
1576
|
+
},
|
|
1577
|
+
onMouseleave: function() {
|
|
1578
|
+
return m();
|
|
1579
|
+
}
|
|
1580
|
+
}, [f ? H("div", {
|
|
1581
|
+
class: "tiny-tooltip__content-wrapper",
|
|
1582
|
+
style: "max-height:" + t.contentMaxHeight
|
|
1583
|
+
}, [u]) : u]), [[ve, !t.disabled && t.state.showPopper && u]])]);
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
})), n.value;
|
|
1587
|
+
},
|
|
1588
|
+
set: function(s) {
|
|
1589
|
+
return n.value = s;
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
var r = function() {
|
|
1595
|
+
var s = t.slots.default && t.slots.default();
|
|
1596
|
+
if (!Array.isArray(s)) return null;
|
|
1597
|
+
for (var u = null, f = 0; f < s.length; f++) {
|
|
1598
|
+
var c = ut(s[f]);
|
|
1599
|
+
if (!pt(c)) {
|
|
1600
|
+
u = c;
|
|
1601
|
+
break;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
return u;
|
|
1605
|
+
}, i = r();
|
|
1606
|
+
if (!i) return null;
|
|
1607
|
+
var l = i.data || i.props || (i.props = {});
|
|
1608
|
+
return l.class = st("tiny-tooltip " + at(l.class)), i;
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
function Ee() {
|
|
1612
|
+
return Ee = Object.assign ? Object.assign.bind() : function(e) {
|
|
1613
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1614
|
+
var o = arguments[t];
|
|
1615
|
+
for (var n in o) ({}).hasOwnProperty.call(o, n) && (e[n] = o[n]);
|
|
1616
|
+
}
|
|
1617
|
+
return e;
|
|
1618
|
+
}, Ee.apply(null, arguments);
|
|
1619
|
+
}
|
|
1620
|
+
var zn = function(t) {
|
|
1621
|
+
var o, n = typeof process == "object" ? (o = process.env) == null ? void 0 : o.TINY_MODE : null;
|
|
1622
|
+
return ge;
|
|
1623
|
+
}, Hn = Ee({}, de, {
|
|
1624
|
+
visible: {
|
|
1625
|
+
type: String,
|
|
1626
|
+
default: function() {
|
|
1627
|
+
return "always";
|
|
1628
|
+
},
|
|
1629
|
+
validator: function(t) {
|
|
1630
|
+
return ["always", "auto"].includes(t);
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
adjustArrow: {
|
|
1634
|
+
type: Boolean,
|
|
1635
|
+
default: function() {
|
|
1636
|
+
return !1;
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
appendToBody: {
|
|
1640
|
+
type: Boolean,
|
|
1641
|
+
default: function() {
|
|
1642
|
+
return !0;
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
arrowOffset: {
|
|
1646
|
+
type: Number,
|
|
1647
|
+
default: function() {
|
|
1648
|
+
return 0;
|
|
1649
|
+
}
|
|
1650
|
+
},
|
|
1651
|
+
content: {
|
|
1652
|
+
type: [String, Object]
|
|
1653
|
+
},
|
|
1654
|
+
disabled: {
|
|
1655
|
+
type: Boolean
|
|
1656
|
+
},
|
|
1657
|
+
enterable: {
|
|
1658
|
+
type: Boolean,
|
|
1659
|
+
default: function() {
|
|
1660
|
+
return !0;
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
hideAfter: {
|
|
1664
|
+
type: Number,
|
|
1665
|
+
default: function() {
|
|
1666
|
+
return 0;
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
manual: {
|
|
1670
|
+
type: Boolean
|
|
1671
|
+
},
|
|
1672
|
+
modelValue: {
|
|
1673
|
+
type: Boolean
|
|
1674
|
+
},
|
|
1675
|
+
offset: {
|
|
1676
|
+
default: function() {
|
|
1677
|
+
return 0;
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
effect: {
|
|
1681
|
+
type: String,
|
|
1682
|
+
default: function() {
|
|
1683
|
+
return "";
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
openDelay: {
|
|
1687
|
+
type: Number,
|
|
1688
|
+
default: function() {
|
|
1689
|
+
return 0;
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
closeDelay: {
|
|
1693
|
+
type: Number,
|
|
1694
|
+
default: function() {
|
|
1695
|
+
return 100;
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
placement: {
|
|
1699
|
+
type: String,
|
|
1700
|
+
default: function() {
|
|
1701
|
+
return "bottom";
|
|
1702
|
+
}
|
|
1703
|
+
},
|
|
1704
|
+
popper: {},
|
|
1705
|
+
popperClass: {
|
|
1706
|
+
type: String
|
|
1707
|
+
},
|
|
1708
|
+
popperOptions: {
|
|
1709
|
+
default: function() {
|
|
1710
|
+
return {};
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
pre: {
|
|
1714
|
+
type: Boolean
|
|
1715
|
+
},
|
|
1716
|
+
reference: {},
|
|
1717
|
+
renderContent: {
|
|
1718
|
+
type: Function
|
|
1719
|
+
},
|
|
1720
|
+
tabindex: {
|
|
1721
|
+
type: Number,
|
|
1722
|
+
default: function() {
|
|
1723
|
+
return 0;
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1726
|
+
transition: {
|
|
1727
|
+
type: String,
|
|
1728
|
+
default: function() {
|
|
1729
|
+
return "tiny-fade-in-linear";
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
type: {
|
|
1733
|
+
type: String,
|
|
1734
|
+
validator: function(t) {
|
|
1735
|
+
return !!~["normal", "warning", "error", "info", "success"].indexOf(t);
|
|
1736
|
+
}
|
|
1737
|
+
},
|
|
1738
|
+
visibleArrow: {
|
|
1739
|
+
type: Boolean,
|
|
1740
|
+
default: function() {
|
|
1741
|
+
return !0;
|
|
1742
|
+
}
|
|
1743
|
+
},
|
|
1744
|
+
genArrowByHtml: {
|
|
1745
|
+
type: Boolean,
|
|
1746
|
+
default: function() {
|
|
1747
|
+
return !0;
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
zIndex: {
|
|
1751
|
+
type: String,
|
|
1752
|
+
default: function() {
|
|
1753
|
+
return "next";
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
contentMaxHeight: {
|
|
1757
|
+
type: String
|
|
1758
|
+
}
|
|
1759
|
+
}), K = U({
|
|
1760
|
+
name: j + "Tooltip",
|
|
1761
|
+
componentName: "Tooltip",
|
|
1762
|
+
props: Hn,
|
|
1763
|
+
setup: function(t, o) {
|
|
1764
|
+
return Te({
|
|
1765
|
+
props: t,
|
|
1766
|
+
context: o,
|
|
1767
|
+
template: zn
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
}), Wn = "3.21.0";
|
|
1771
|
+
K.model = {
|
|
1772
|
+
prop: "modelValue",
|
|
1773
|
+
event: "update:modelValue"
|
|
1774
|
+
};
|
|
1775
|
+
K.install = function(e) {
|
|
1776
|
+
e.component(K.name, K);
|
|
1777
|
+
};
|
|
1778
|
+
K.version = Wn;
|
|
1779
|
+
const Rn = (e, t, ...o) => {
|
|
1780
|
+
let n = !1;
|
|
1781
|
+
if (typeof e == "function") {
|
|
1782
|
+
const r = document.createEvent("HTMLEvents");
|
|
1783
|
+
r.initEvent(t, !1, !0), r.preventDefault = () => {
|
|
1784
|
+
n = !0;
|
|
1785
|
+
}, o.unshift(r), o.unshift(t), e.apply(null, o);
|
|
1786
|
+
}
|
|
1787
|
+
return !n;
|
|
1788
|
+
}, jn = ({ constants: e, props: t }) => () => t.rightSlide ? e.DIALOG_SLIDER_RIGHT : e.DIALOG_FADE, be = (e) => isNaN(Number(e)) ? e : e + "px", Un = ({ props: e, state: t, designConfig: o }) => () => {
|
|
1789
|
+
var n;
|
|
1790
|
+
let r = {}, { width: i, top: l, rightSlide: a, maxHeight: s } = e;
|
|
1791
|
+
return l === void 0 && (l = a ? "0" : (n = o == null ? void 0 : o.state) != null && n.top ? "" : "15vh"), i = be(i), l = be(l), s = be(s), t.isFull || (r.width = i, r.top = t.top || l, r.maxHeight = s, a ? (r.right = 0, r.height = "calc(100vh - " + r.top + ")") : r.left = t.left || "calc((100vw - " + i + ") / 2)"), t.dragStyle && (r = V(V({}, r), t.dragStyle), t.isFull && (r = { left: "0px", top: "0px" })), e.customStyle && (r = Object.assign(r, e.customStyle)), r;
|
|
1792
|
+
}, Jn = ({
|
|
782
1793
|
api: e,
|
|
783
1794
|
constants: t,
|
|
784
|
-
emit:
|
|
785
|
-
nextTick:
|
|
786
|
-
parent:
|
|
1795
|
+
emit: o,
|
|
1796
|
+
nextTick: n,
|
|
1797
|
+
parent: r,
|
|
787
1798
|
props: i,
|
|
788
|
-
vm:
|
|
789
|
-
state:
|
|
790
|
-
}) => (
|
|
791
|
-
const u =
|
|
792
|
-
if (i.lockScroll && (
|
|
793
|
-
|
|
794
|
-
|
|
1799
|
+
vm: l,
|
|
1800
|
+
state: a
|
|
1801
|
+
}) => (s) => {
|
|
1802
|
+
const u = r.$el;
|
|
1803
|
+
if (i.lockScroll && (s ? e.showScrollbar() : e.hideScrollbar()), a.move = !1, a.isFull = i.fullscreen, o("update:visible", s), s)
|
|
1804
|
+
a.closed = !1, o("open"), I(u, "scroll", e.updatePopper), n(() => {
|
|
1805
|
+
l.$refs.dialog.scrollTop = 0;
|
|
795
1806
|
}), i.appendToBody && document.body.appendChild(u);
|
|
796
|
-
else if (
|
|
1807
|
+
else if (D(u, "scroll", e.updatePopper), a.closed || (a.emitter.emit("boxclose", i.isFormReset), o("close")), i.destroyOnClose && n(() => a.key++), i.rightSlide && a.current !== "default") {
|
|
797
1808
|
const f = `[data-tag=${t.DIALOG_BOX_DATA_TAG}]`;
|
|
798
1809
|
i.rightSlide && (u.querySelector(f).style.left = "");
|
|
799
1810
|
}
|
|
800
|
-
},
|
|
801
|
-
if (
|
|
802
|
-
const
|
|
803
|
-
e.open(),
|
|
1811
|
+
}, Gn = ({ api: e, parent: t, props: o }) => () => {
|
|
1812
|
+
if (o.lockScroll && o.visible && e.showScrollbar(), o.visible) {
|
|
1813
|
+
const n = t.$el;
|
|
1814
|
+
e.open(), o.appendToBody && document.body.appendChild(n);
|
|
804
1815
|
}
|
|
805
|
-
},
|
|
806
|
-
const
|
|
807
|
-
e.hideScrollbar(),
|
|
808
|
-
},
|
|
1816
|
+
}, Kn = ({ api: e, parent: t, props: o }) => () => {
|
|
1817
|
+
const n = t.$el;
|
|
1818
|
+
e.hideScrollbar(), o.appendToBody && n && n.parentNode && n.parentNode.removeChild(n);
|
|
1819
|
+
}, Yn = ({ state: e }) => (t) => {
|
|
809
1820
|
e.mouseDownWrapperFlag = !1, /tiny-dialog-box__wrapper/.test(t.target.className) && t.type === "mousedown" && (e.mouseDownWrapperFlag = !0);
|
|
810
|
-
},
|
|
1821
|
+
}, Xn = ({ state: e }) => (t) => {
|
|
811
1822
|
e.mouseUpWrapperFlag = !1, /tiny-dialog-box__wrapper/.test(t.target.className) && t.type === "mouseup" && (e.mouseUpWrapperFlag = !0);
|
|
812
|
-
},
|
|
813
|
-
t.closeOnClickModal &&
|
|
814
|
-
},
|
|
1823
|
+
}, Zn = ({ api: e, props: t, state: o }) => () => {
|
|
1824
|
+
t.closeOnClickModal && o.mouseDownWrapperFlag && o.mouseUpWrapperFlag && e.handleClose("mask");
|
|
1825
|
+
}, qn = ({
|
|
815
1826
|
api: e,
|
|
816
1827
|
constants: t,
|
|
817
|
-
emit:
|
|
818
|
-
parent:
|
|
819
|
-
props:
|
|
1828
|
+
emit: o,
|
|
1829
|
+
parent: n,
|
|
1830
|
+
props: r
|
|
820
1831
|
}) => (i = "close") => {
|
|
821
|
-
if (typeof
|
|
1832
|
+
if (typeof r.beforeClose == "function" && r.beforeClose(i) === !1)
|
|
822
1833
|
return;
|
|
823
|
-
const
|
|
824
|
-
if (
|
|
825
|
-
const
|
|
826
|
-
|
|
1834
|
+
const l = n.$el;
|
|
1835
|
+
if (r.rightSlide) {
|
|
1836
|
+
const a = l.querySelector(t.DIALOG_BOX_CLASS) || l;
|
|
1837
|
+
a.style.left = "";
|
|
827
1838
|
}
|
|
828
|
-
|
|
829
|
-
},
|
|
830
|
-
|
|
831
|
-
},
|
|
1839
|
+
Rn(o, "before-close", e.hide) && e.hide(i);
|
|
1840
|
+
}, Qn = ({ api: e, emit: t, state: o, props: n }) => (r) => {
|
|
1841
|
+
r !== !1 && (o.emitter.emit("boxclose", n.isFormReset), t("update:visible", !1), t("change", !1), t("close", r), o.closed = !0, e.hideScrollbar());
|
|
1842
|
+
}, er = ({ api: e, emit: t }) => () => {
|
|
832
1843
|
t("confirm"), e.handleClose("confirm");
|
|
833
|
-
},
|
|
1844
|
+
}, tr = ({ api: e, emit: t }) => () => {
|
|
834
1845
|
t("cancel"), e.handleClose("cancel");
|
|
835
|
-
},
|
|
1846
|
+
}, or = ({ api: e, constants: t }) => () => {
|
|
836
1847
|
e.broadcast(t.SELECT_DROPDOWN, "updatePopper"), e.broadcast(t.DROPDOWN_MENU, "updatePopper");
|
|
837
|
-
},
|
|
1848
|
+
}, nr = (e) => () => {
|
|
838
1849
|
e("opened");
|
|
839
|
-
},
|
|
1850
|
+
}, rr = (e) => () => {
|
|
840
1851
|
e("closed");
|
|
841
|
-
},
|
|
1852
|
+
}, et = ({
|
|
842
1853
|
vm: e,
|
|
843
1854
|
componentList: t
|
|
844
1855
|
}) => {
|
|
845
|
-
const
|
|
846
|
-
return !
|
|
847
|
-
|
|
1856
|
+
const o = e.$children;
|
|
1857
|
+
return !o || o.length === 0 ? [] : (o.forEach((n) => {
|
|
1858
|
+
n.$options.componentName === "Select" && t.push(n), et({ vm: n, componentList: t });
|
|
848
1859
|
}), t);
|
|
849
|
-
},
|
|
850
|
-
|
|
1860
|
+
}, lr = (e) => {
|
|
1861
|
+
et({ vm: e, componentList: [] }).forEach((t) => {
|
|
851
1862
|
t.state.visible = !1;
|
|
852
1863
|
});
|
|
853
|
-
},
|
|
1864
|
+
}, ir = ({
|
|
854
1865
|
parent: e,
|
|
855
1866
|
props: t,
|
|
856
|
-
state:
|
|
857
|
-
emit:
|
|
858
|
-
vm:
|
|
1867
|
+
state: o,
|
|
1868
|
+
emit: n,
|
|
1869
|
+
vm: r
|
|
859
1870
|
}) => (i) => {
|
|
860
|
-
if (!t.draggable ||
|
|
1871
|
+
if (!t.draggable || o.isFull)
|
|
861
1872
|
return;
|
|
862
|
-
let
|
|
1873
|
+
let l = r.$refs.dialog;
|
|
863
1874
|
i.preventDefault();
|
|
864
|
-
let
|
|
865
|
-
document.onmousemove = (
|
|
866
|
-
|
|
867
|
-
let
|
|
1875
|
+
let a = document.onmousemove, s = document.onmouseup, u = i.clientX - l.offsetLeft, f = i.clientY - l.offsetTop, { visibleHeight: c, visibleWidth: p } = dt();
|
|
1876
|
+
document.onmousemove = (d) => {
|
|
1877
|
+
d.preventDefault(), o.move || (n("drag-start", d), lr(e), o.move = !0);
|
|
1878
|
+
let m = l.offsetWidth, v = l.offsetHeight, y, w;
|
|
868
1879
|
if (t.dragOutsideWindow) {
|
|
869
|
-
let
|
|
870
|
-
y =
|
|
1880
|
+
let B = p - 10, g = c - 10;
|
|
1881
|
+
y = d.clientX - u, w = d.clientY - f, y = d.clientX < 0 ? -u : y > B ? B : y, w = d.clientY < 0 ? -f : w > g ? g : w;
|
|
871
1882
|
} else {
|
|
872
|
-
let
|
|
873
|
-
y =
|
|
1883
|
+
let B = Math.max(p - m, 0), g = Math.max(c - v, 0);
|
|
1884
|
+
y = d.clientX - u, w = d.clientY - f, y = y < 0 ? 0 : y > B ? B : y, w = w < 0 ? 0 : w > g ? g : w;
|
|
874
1885
|
}
|
|
875
|
-
|
|
1886
|
+
o.isFull || (o.dragStyle = { left: `${y}px`, top: `${w}px` }), o.left = `${y}px`, o.top = `${w}px`, o.emitter.emit("boxdrag"), n("drag-move", d);
|
|
876
1887
|
}, document.onmouseup = () => {
|
|
877
|
-
document.onmousemove =
|
|
1888
|
+
document.onmousemove = a, document.onmouseup = s, t.draggable && o.move && n("drag-end", i), o.move = !1;
|
|
878
1889
|
};
|
|
879
|
-
},
|
|
880
|
-
|
|
881
|
-
},
|
|
882
|
-
|
|
883
|
-
},
|
|
884
|
-
e.isFull =
|
|
885
|
-
t("resize", { fullscreen:
|
|
1890
|
+
}, sr = (e) => () => {
|
|
1891
|
+
R(document.body, e);
|
|
1892
|
+
}, ar = (e) => () => {
|
|
1893
|
+
J(document.body, e);
|
|
1894
|
+
}, ur = ({ state: e, emit: t, nextTick: o, vm: n }) => (r) => {
|
|
1895
|
+
e.isFull = r, o(() => {
|
|
1896
|
+
t("resize", { fullscreen: r, dialog: n.$refs.dialog });
|
|
1897
|
+
});
|
|
1898
|
+
};
|
|
1899
|
+
let pr = 1;
|
|
1900
|
+
const dr = typeof window > "u", fr = ({
|
|
1901
|
+
onMounted: e,
|
|
1902
|
+
onBeforeUnmount: t,
|
|
1903
|
+
watch: o,
|
|
1904
|
+
vm: n,
|
|
1905
|
+
api: r,
|
|
1906
|
+
props: i,
|
|
1907
|
+
state: l,
|
|
1908
|
+
nextTick: a
|
|
1909
|
+
}) => {
|
|
1910
|
+
e(() => {
|
|
1911
|
+
n._popupId = `popup-${pr++}`, T.register(n._popupId, n);
|
|
1912
|
+
}), t(() => {
|
|
1913
|
+
T.deregister(n._popupId), T.closeModal(n._popupId);
|
|
1914
|
+
}), o(
|
|
1915
|
+
() => i.visible,
|
|
1916
|
+
(s) => {
|
|
1917
|
+
if (s) {
|
|
1918
|
+
if (n._opening)
|
|
1919
|
+
return;
|
|
1920
|
+
l.rendered ? r.open() : (l.rendered = !0, a(() => {
|
|
1921
|
+
r.open();
|
|
1922
|
+
}));
|
|
1923
|
+
} else
|
|
1924
|
+
r.close();
|
|
1925
|
+
}
|
|
1926
|
+
);
|
|
1927
|
+
}, cr = ({ state: e, vm: t }) => (o) => {
|
|
1928
|
+
e.rendered || (e.rendered = !0);
|
|
1929
|
+
const n = ft({}, t.$props || t, o);
|
|
1930
|
+
t._closeTimer && (clearTimeout(t._closeTimer), t._closeTimer = null), clearTimeout(t._openTimer);
|
|
1931
|
+
const r = () => {
|
|
1932
|
+
if (dr || e.opened)
|
|
1933
|
+
return;
|
|
1934
|
+
t._opening = !0;
|
|
1935
|
+
const l = t.$el, a = n.modal, s = n.zIndex;
|
|
1936
|
+
s && (T.zIndex = s), a && (t._closing && (T.closeModal(t._popupId), t._closing = !1), T.openModal(
|
|
1937
|
+
t._popupId,
|
|
1938
|
+
T.nextZIndex(),
|
|
1939
|
+
n.modalAppendToBody ? void 0 : l,
|
|
1940
|
+
n.modalClass,
|
|
1941
|
+
n.modalFade
|
|
1942
|
+
), n.lockScroll && (T.fixBodyBorder(), R(document.body, T.popLockClass))), getComputedStyle(l).position === "static" && (l.style.position = "absolute"), l.style.zIndex = T.nextZIndex().toString(), e.opened = !0, t._opening = !1;
|
|
1943
|
+
}, i = Number(n.openDelay);
|
|
1944
|
+
i > 0 ? t._openTimer = setTimeout(() => {
|
|
1945
|
+
t._openTimer = null, r();
|
|
1946
|
+
}, i) : r();
|
|
1947
|
+
}, mr = ({ state: e, vm: t }) => () => {
|
|
1948
|
+
t._openTimer !== null && (clearTimeout(t._openTimer), t._openTimer = null), clearTimeout(t._closeTimer);
|
|
1949
|
+
const o = () => {
|
|
1950
|
+
t._closing = !0, e.opened = !1, T.closeModal(t._popupId), t._closing = !1;
|
|
1951
|
+
}, n = Number(t.closeDelay);
|
|
1952
|
+
n > 0 ? t._closeTimer = setTimeout(() => {
|
|
1953
|
+
t._closeTimer = null, o();
|
|
1954
|
+
}, n) : o();
|
|
1955
|
+
};
|
|
1956
|
+
var hr = (e) => {
|
|
1957
|
+
const { api: t, nextTick: o, onBeforeUnmount: n, onMounted: r, props: i, reactive: l, toRefs: a, vm: s, watch: u } = e, f = l({
|
|
1958
|
+
opened: !1,
|
|
1959
|
+
rendered: !1
|
|
886
1960
|
});
|
|
887
|
-
|
|
1961
|
+
fr({ onMounted: r, onBeforeUnmount: n, watch: u, vm: s, api: t, props: i, state: f, nextTick: o });
|
|
1962
|
+
const c = cr({ state: f, vm: s }), p = mr({ state: f, vm: s });
|
|
1963
|
+
return V({ open: c, close: p, PopupManager: T }, a(f));
|
|
1964
|
+
};
|
|
1965
|
+
const yr = [
|
|
888
1966
|
"afterEnter",
|
|
889
1967
|
"afterLeave",
|
|
890
1968
|
"handleClose",
|
|
@@ -896,17 +1974,17 @@ const wn = ["state", "mousedown", "selectItem"], Cn = (e, { onUnmounted: t, reac
|
|
|
896
1974
|
"handleDrag",
|
|
897
1975
|
"toggleFullScreen",
|
|
898
1976
|
"state"
|
|
899
|
-
],
|
|
1977
|
+
], gr = ({
|
|
900
1978
|
reactive: e,
|
|
901
1979
|
computed: t,
|
|
902
|
-
api:
|
|
903
|
-
emitter:
|
|
904
|
-
props:
|
|
1980
|
+
api: o,
|
|
1981
|
+
emitter: n,
|
|
1982
|
+
props: r,
|
|
905
1983
|
useBreakpoint: i
|
|
906
1984
|
}) => {
|
|
907
|
-
const { current:
|
|
1985
|
+
const { current: l } = i();
|
|
908
1986
|
return e({
|
|
909
|
-
emitter:
|
|
1987
|
+
emitter: n(),
|
|
910
1988
|
key: 0,
|
|
911
1989
|
x: null,
|
|
912
1990
|
y: null,
|
|
@@ -916,151 +1994,151 @@ const wn = ["state", "mousedown", "selectItem"], Cn = (e, { onUnmounted: t, reac
|
|
|
916
1994
|
move: !1,
|
|
917
1995
|
closed: !1,
|
|
918
1996
|
dragable: !1,
|
|
919
|
-
isFull:
|
|
920
|
-
style: t(() =>
|
|
921
|
-
animationName: t(() =>
|
|
922
|
-
current:
|
|
1997
|
+
isFull: r.fullscreen,
|
|
1998
|
+
style: t(() => o.computedStyle()),
|
|
1999
|
+
animationName: t(() => o.computedAnimationName()),
|
|
2000
|
+
current: l,
|
|
923
2001
|
dragStyle: null
|
|
924
2002
|
});
|
|
925
|
-
},
|
|
926
|
-
const { opened:
|
|
927
|
-
return e(
|
|
928
|
-
opened:
|
|
2003
|
+
}, br = ({ reactive: e, state: t, toRefs: o, usePopups: n }) => {
|
|
2004
|
+
const { opened: r, rendered: i } = n;
|
|
2005
|
+
return e(V({
|
|
2006
|
+
opened: r,
|
|
929
2007
|
rendered: i
|
|
930
|
-
},
|
|
931
|
-
},
|
|
2008
|
+
}, o(t)));
|
|
2009
|
+
}, vr = ({
|
|
932
2010
|
emit: e,
|
|
933
2011
|
api: t,
|
|
934
|
-
state:
|
|
935
|
-
parent:
|
|
936
|
-
props:
|
|
2012
|
+
state: o,
|
|
2013
|
+
parent: n,
|
|
2014
|
+
props: r,
|
|
937
2015
|
lockScrollClass: i,
|
|
938
|
-
constants:
|
|
939
|
-
usePopups:
|
|
940
|
-
nextTick:
|
|
2016
|
+
constants: l,
|
|
2017
|
+
usePopups: a,
|
|
2018
|
+
nextTick: s,
|
|
941
2019
|
broadcast: u,
|
|
942
2020
|
designConfig: f,
|
|
943
2021
|
vm: c
|
|
944
2022
|
}) => {
|
|
945
|
-
const { open:
|
|
2023
|
+
const { open: p, close: d } = a;
|
|
946
2024
|
Object.assign(t, {
|
|
947
|
-
state:
|
|
948
|
-
open:
|
|
949
|
-
close:
|
|
2025
|
+
state: o,
|
|
2026
|
+
open: p,
|
|
2027
|
+
close: d,
|
|
950
2028
|
broadcast: u,
|
|
951
|
-
handleCancel:
|
|
952
|
-
handleConfirm:
|
|
953
|
-
updatePopper:
|
|
954
|
-
handleWrapperClick:
|
|
955
|
-
useMouseEventDown:
|
|
956
|
-
useMouseEventUp:
|
|
957
|
-
hide:
|
|
958
|
-
handleClose:
|
|
959
|
-
watchVisible:
|
|
2029
|
+
handleCancel: tr({ api: t, emit: e }),
|
|
2030
|
+
handleConfirm: er({ api: t, emit: e }),
|
|
2031
|
+
updatePopper: or({ api: t, constants: l }),
|
|
2032
|
+
handleWrapperClick: Zn({ api: t, props: r, state: o }),
|
|
2033
|
+
useMouseEventDown: Yn({ state: o }),
|
|
2034
|
+
useMouseEventUp: Xn({ state: o }),
|
|
2035
|
+
hide: Qn({ api: t, emit: e, state: o, props: r }),
|
|
2036
|
+
handleClose: qn({ api: t, constants: l, emit: e, parent: n, props: r }),
|
|
2037
|
+
watchVisible: Jn({
|
|
960
2038
|
api: t,
|
|
961
|
-
constants:
|
|
2039
|
+
constants: l,
|
|
962
2040
|
emit: e,
|
|
963
|
-
nextTick:
|
|
964
|
-
parent:
|
|
965
|
-
props:
|
|
2041
|
+
nextTick: s,
|
|
2042
|
+
parent: n,
|
|
2043
|
+
props: r,
|
|
966
2044
|
vm: c,
|
|
967
|
-
state:
|
|
2045
|
+
state: o
|
|
968
2046
|
}),
|
|
969
|
-
computedStyle:
|
|
970
|
-
mounted:
|
|
971
|
-
unMounted:
|
|
972
|
-
computedAnimationName:
|
|
973
|
-
afterEnter:
|
|
974
|
-
afterLeave:
|
|
975
|
-
hideScrollbar:
|
|
976
|
-
showScrollbar:
|
|
977
|
-
handleDrag:
|
|
2047
|
+
computedStyle: Un({ state: o, props: r, designConfig: f }),
|
|
2048
|
+
mounted: Gn({ api: t, parent: n, props: r }),
|
|
2049
|
+
unMounted: Kn({ api: t, parent: n, props: r }),
|
|
2050
|
+
computedAnimationName: jn({ constants: l, props: r }),
|
|
2051
|
+
afterEnter: nr(e),
|
|
2052
|
+
afterLeave: rr(e),
|
|
2053
|
+
hideScrollbar: ar(i),
|
|
2054
|
+
showScrollbar: sr(i),
|
|
2055
|
+
handleDrag: ir({ parent: n, props: r, state: o, emit: e, vm: c }),
|
|
978
2056
|
// tiny 新增
|
|
979
|
-
toggleFullScreen:
|
|
2057
|
+
toggleFullScreen: ur({ state: o, emit: e, nextTick: s, vm: c })
|
|
980
2058
|
});
|
|
981
|
-
},
|
|
982
|
-
e(() =>
|
|
983
|
-
() =>
|
|
984
|
-
(
|
|
985
|
-
t.isFull =
|
|
2059
|
+
}, wr = ({ watch: e, state: t, api: o, props: n }) => {
|
|
2060
|
+
e(() => n.visible, o.watchVisible), e(
|
|
2061
|
+
() => n.fullscreen,
|
|
2062
|
+
(r) => {
|
|
2063
|
+
t.isFull = r;
|
|
986
2064
|
}
|
|
987
2065
|
);
|
|
988
|
-
},
|
|
989
|
-
vm:
|
|
990
|
-
emitter:
|
|
2066
|
+
}, Sr = (e, { computed: t, onBeforeUnmount: o, onMounted: n, toRefs: r, reactive: i, watch: l }, {
|
|
2067
|
+
vm: a,
|
|
2068
|
+
emitter: s,
|
|
991
2069
|
parent: u,
|
|
992
2070
|
emit: f,
|
|
993
2071
|
constants: c,
|
|
994
|
-
nextTick:
|
|
995
|
-
mode:
|
|
996
|
-
broadcast:
|
|
997
|
-
designConfig:
|
|
2072
|
+
nextTick: p,
|
|
2073
|
+
mode: d,
|
|
2074
|
+
broadcast: m,
|
|
2075
|
+
designConfig: v,
|
|
998
2076
|
useBreakpoint: y
|
|
999
2077
|
}) => {
|
|
1000
|
-
const
|
|
1001
|
-
let
|
|
1002
|
-
const
|
|
1003
|
-
api:
|
|
1004
|
-
nextTick:
|
|
1005
|
-
onBeforeUnmount:
|
|
1006
|
-
onMounted:
|
|
2078
|
+
const w = {}, B = c.SCROLL_LOCK_CLASS(d);
|
|
2079
|
+
let g = gr({ reactive: i, computed: t, api: w, emitter: s, props: e, useBreakpoint: y });
|
|
2080
|
+
const P = hr({
|
|
2081
|
+
api: w,
|
|
2082
|
+
nextTick: p,
|
|
2083
|
+
onBeforeUnmount: o,
|
|
2084
|
+
onMounted: n,
|
|
1007
2085
|
props: e,
|
|
1008
2086
|
reactive: i,
|
|
1009
|
-
toRefs:
|
|
1010
|
-
vm:
|
|
1011
|
-
watch:
|
|
2087
|
+
toRefs: r,
|
|
2088
|
+
vm: a,
|
|
2089
|
+
watch: l
|
|
1012
2090
|
});
|
|
1013
|
-
return
|
|
1014
|
-
api:
|
|
1015
|
-
state:
|
|
2091
|
+
return vr({
|
|
2092
|
+
api: w,
|
|
2093
|
+
state: g,
|
|
1016
2094
|
parent: u,
|
|
1017
2095
|
props: e,
|
|
1018
2096
|
emit: f,
|
|
1019
2097
|
constants: c,
|
|
1020
|
-
usePopups:
|
|
1021
|
-
lockScrollClass:
|
|
1022
|
-
nextTick:
|
|
1023
|
-
vm:
|
|
1024
|
-
broadcast:
|
|
1025
|
-
designConfig:
|
|
1026
|
-
}),
|
|
2098
|
+
usePopups: P,
|
|
2099
|
+
lockScrollClass: B,
|
|
2100
|
+
nextTick: p,
|
|
2101
|
+
vm: a,
|
|
2102
|
+
broadcast: m,
|
|
2103
|
+
designConfig: v
|
|
2104
|
+
}), g = br({ reactive: i, state: g, toRefs: r, usePopups: P }), wr({ watch: l, state: g, api: w, props: e }), n(w.mounted), o(w.unMounted), w;
|
|
1027
2105
|
};
|
|
1028
|
-
function
|
|
1029
|
-
var
|
|
1030
|
-
if (
|
|
1031
|
-
if (Array.isArray(e) || (
|
|
1032
|
-
|
|
1033
|
-
var
|
|
2106
|
+
function Cr(e, t) {
|
|
2107
|
+
var o = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2108
|
+
if (o) return (o = o.call(e)).next.bind(o);
|
|
2109
|
+
if (Array.isArray(e) || (o = Or(e)) || t) {
|
|
2110
|
+
o && (e = o);
|
|
2111
|
+
var n = 0;
|
|
1034
2112
|
return function() {
|
|
1035
|
-
return
|
|
2113
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1036
2114
|
};
|
|
1037
2115
|
}
|
|
1038
2116
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1039
2117
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1040
2118
|
}
|
|
1041
|
-
function
|
|
2119
|
+
function Or(e, t) {
|
|
1042
2120
|
if (e) {
|
|
1043
|
-
if (typeof e == "string") return
|
|
1044
|
-
var
|
|
1045
|
-
return
|
|
2121
|
+
if (typeof e == "string") return We(e, t);
|
|
2122
|
+
var o = {}.toString.call(e).slice(8, -1);
|
|
2123
|
+
return o === "Object" && e.constructor && (o = e.constructor.name), o === "Map" || o === "Set" ? Array.from(e) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? We(e, t) : void 0;
|
|
1046
2124
|
}
|
|
1047
2125
|
}
|
|
1048
|
-
function
|
|
2126
|
+
function We(e, t) {
|
|
1049
2127
|
(t == null || t > e.length) && (t = e.length);
|
|
1050
|
-
for (var
|
|
1051
|
-
return
|
|
2128
|
+
for (var o = 0, n = Array(t); o < t; o++) n[o] = e[o];
|
|
2129
|
+
return n;
|
|
1052
2130
|
}
|
|
1053
|
-
var
|
|
1054
|
-
for (var
|
|
1055
|
-
var
|
|
1056
|
-
|
|
2131
|
+
var _r = function(t, o) {
|
|
2132
|
+
for (var n = t.__vccOpts || t, r = Cr(o), i; !(i = r()).done; ) {
|
|
2133
|
+
var l = i.value, a = l[0], s = l[1];
|
|
2134
|
+
n[a] = s;
|
|
1057
2135
|
}
|
|
1058
|
-
return
|
|
1059
|
-
},
|
|
2136
|
+
return n;
|
|
2137
|
+
}, Mr = U({
|
|
1060
2138
|
components: {
|
|
1061
|
-
IconClose:
|
|
1062
|
-
IconFullscreen:
|
|
1063
|
-
IconMinscreen:
|
|
2139
|
+
IconClose: Ke(),
|
|
2140
|
+
IconFullscreen: Kt(),
|
|
2141
|
+
IconMinscreen: eo()
|
|
1064
2142
|
},
|
|
1065
2143
|
emits: [
|
|
1066
2144
|
"update:visible",
|
|
@@ -1078,7 +2156,7 @@ var Zn = function(t, n) {
|
|
|
1078
2156
|
// tiny 新增
|
|
1079
2157
|
"resize"
|
|
1080
2158
|
],
|
|
1081
|
-
props: [].concat(
|
|
2159
|
+
props: [].concat(Je, ["resize", "isFormReset", "visible", "title", "modal", "modalAppendToBody", "appendToBody", "lockScroll", "closeOnClickModal", "closeOnPressEscape", "showClose", "width", "fullscreen", "top", "center", "draggable", "dragOutsideWindow", "showHeader", "rightSlide", "destroyOnClose", "dialogClass", "beforeClose", "maxHeight", "dialogTransition", "customStyle", "noAnimation"]),
|
|
1082
2160
|
model: {
|
|
1083
2161
|
prop: "visible",
|
|
1084
2162
|
event: "update:visible"
|
|
@@ -1088,40 +2166,40 @@ var Zn = function(t, n) {
|
|
|
1088
2166
|
dialog: this
|
|
1089
2167
|
};
|
|
1090
2168
|
},
|
|
1091
|
-
setup: function(t,
|
|
1092
|
-
return
|
|
2169
|
+
setup: function(t, o) {
|
|
2170
|
+
return pe({
|
|
1093
2171
|
props: t,
|
|
1094
|
-
context:
|
|
1095
|
-
renderless:
|
|
1096
|
-
api:
|
|
2172
|
+
context: o,
|
|
2173
|
+
renderless: Sr,
|
|
2174
|
+
api: yr
|
|
1097
2175
|
});
|
|
1098
2176
|
}
|
|
1099
|
-
}),
|
|
2177
|
+
}), Er = ["data-dialog-box-draggable"], Br = {
|
|
1100
2178
|
class: "tiny-dialog-box__title"
|
|
1101
|
-
},
|
|
2179
|
+
}, Ir = {
|
|
1102
2180
|
class: "tiny-dialog-box__btn-tools"
|
|
1103
|
-
},
|
|
2181
|
+
}, Tr = {
|
|
1104
2182
|
class: "tiny-dialog-box__body"
|
|
1105
|
-
},
|
|
2183
|
+
}, $r = {
|
|
1106
2184
|
key: 1,
|
|
1107
2185
|
ref: "footer",
|
|
1108
2186
|
class: "tiny-dialog-box__footer"
|
|
1109
2187
|
};
|
|
1110
|
-
function
|
|
1111
|
-
var
|
|
1112
|
-
return
|
|
2188
|
+
function xr(e, t, o, n, r, i) {
|
|
2189
|
+
var l = z("icon-fullscreen"), a = z("icon-minscreen"), s = z("icon-close");
|
|
2190
|
+
return h(), k(we, {
|
|
1113
2191
|
duration: e.noAnimation ? 0 : void 0,
|
|
1114
2192
|
name: e.state.animationName,
|
|
1115
2193
|
onAfterEnter: e.afterEnter,
|
|
1116
2194
|
onAfterLeave: e.afterLeave,
|
|
1117
2195
|
persisted: ""
|
|
1118
2196
|
}, {
|
|
1119
|
-
default:
|
|
1120
|
-
return [
|
|
2197
|
+
default: F(function() {
|
|
2198
|
+
return [ue(_(
|
|
1121
2199
|
"div",
|
|
1122
2200
|
{
|
|
1123
|
-
class:
|
|
1124
|
-
onClick: t[4] || (t[4] =
|
|
2201
|
+
class: te(["tiny-dialog-box__wrapper", e.dialogClass]),
|
|
2202
|
+
onClick: t[4] || (t[4] = Se(function() {
|
|
1125
2203
|
return e.handleWrapperClick && e.handleWrapperClick.apply(e, arguments);
|
|
1126
2204
|
}, ["self"])),
|
|
1127
2205
|
onMouseup: t[5] || (t[5] = function() {
|
|
@@ -1131,22 +2209,22 @@ function lo(e, t, n, o, l, i) {
|
|
|
1131
2209
|
return e.useMouseEventDown && e.useMouseEventDown.apply(e, arguments);
|
|
1132
2210
|
})
|
|
1133
2211
|
},
|
|
1134
|
-
[
|
|
2212
|
+
[H(we, {
|
|
1135
2213
|
name: e.dialogTransition
|
|
1136
2214
|
}, {
|
|
1137
|
-
default:
|
|
1138
|
-
return [!e.destroyOnClose || e.visible ?
|
|
2215
|
+
default: F(function() {
|
|
2216
|
+
return [!e.destroyOnClose || e.visible ? ue((h(), b("div", {
|
|
1139
2217
|
ref: "dialog",
|
|
1140
|
-
class:
|
|
2218
|
+
class: te([[{
|
|
1141
2219
|
"is-fullscreen": e.state.isFull,
|
|
1142
2220
|
"is-center": e.center,
|
|
1143
2221
|
"is-right-slide": e.rightSlide
|
|
1144
2222
|
}], "tiny-dialog-box"]),
|
|
1145
|
-
style:
|
|
2223
|
+
style: ht(e.state.style),
|
|
1146
2224
|
"data-tag": "tiny-dialog-box",
|
|
1147
2225
|
"data-dialog-box-draggable": e.draggable,
|
|
1148
2226
|
key: e.state.key
|
|
1149
|
-
}, [e.showHeader ? (
|
|
2227
|
+
}, [e.showHeader ? (h(), b(
|
|
1150
2228
|
"div",
|
|
1151
2229
|
{
|
|
1152
2230
|
key: 0,
|
|
@@ -1156,15 +2234,15 @@ function lo(e, t, n, o, l, i) {
|
|
|
1156
2234
|
return e.handleDrag && e.handleDrag.apply(e, arguments);
|
|
1157
2235
|
})
|
|
1158
2236
|
},
|
|
1159
|
-
[
|
|
1160
|
-
return [
|
|
2237
|
+
[L(e.$slots, "title", {}, function() {
|
|
2238
|
+
return [_(
|
|
1161
2239
|
"span",
|
|
1162
|
-
|
|
1163
|
-
|
|
2240
|
+
Br,
|
|
2241
|
+
x(e.title),
|
|
1164
2242
|
1
|
|
1165
2243
|
/* TEXT */
|
|
1166
2244
|
)];
|
|
1167
|
-
}),
|
|
2245
|
+
}), _("div", Ir, [e.resize && !e.state.isFull ? (h(), b("button", {
|
|
1168
2246
|
key: 0,
|
|
1169
2247
|
type: "button",
|
|
1170
2248
|
class: "tiny-dialog-box__headerbtn",
|
|
@@ -1172,9 +2250,9 @@ function lo(e, t, n, o, l, i) {
|
|
|
1172
2250
|
onClick: t[0] || (t[0] = function(u) {
|
|
1173
2251
|
return e.toggleFullScreen(!0);
|
|
1174
2252
|
})
|
|
1175
|
-
}, [
|
|
2253
|
+
}, [H(l, {
|
|
1176
2254
|
class: "tiny-svg-size tiny-dialog-box__resize"
|
|
1177
|
-
})])) :
|
|
2255
|
+
})])) : O("v-if", !0), e.resize && e.state.isFull ? (h(), b("button", {
|
|
1178
2256
|
key: 1,
|
|
1179
2257
|
type: "button",
|
|
1180
2258
|
class: "tiny-dialog-box__headerbtn",
|
|
@@ -1182,9 +2260,9 @@ function lo(e, t, n, o, l, i) {
|
|
|
1182
2260
|
onClick: t[1] || (t[1] = function(u) {
|
|
1183
2261
|
return e.toggleFullScreen(!1);
|
|
1184
2262
|
})
|
|
1185
|
-
}, [
|
|
2263
|
+
}, [H(a, {
|
|
1186
2264
|
class: "tiny-svg-size tiny-dialog-box__resize"
|
|
1187
|
-
})])) :
|
|
2265
|
+
})])) : O("v-if", !0), e.showClose ? (h(), b("button", {
|
|
1188
2266
|
key: 2,
|
|
1189
2267
|
type: "button",
|
|
1190
2268
|
class: "tiny-dialog-box__headerbtn",
|
|
@@ -1192,50 +2270,50 @@ function lo(e, t, n, o, l, i) {
|
|
|
1192
2270
|
onClick: t[2] || (t[2] = function(u) {
|
|
1193
2271
|
return e.handleClose("close", u);
|
|
1194
2272
|
})
|
|
1195
|
-
}, [
|
|
2273
|
+
}, [H(s, {
|
|
1196
2274
|
class: "tiny-svg-size tiny-dialog-box__close"
|
|
1197
|
-
})])) :
|
|
2275
|
+
})])) : O("v-if", !0)])],
|
|
1198
2276
|
544
|
|
1199
2277
|
/* NEED_HYDRATION, NEED_PATCH */
|
|
1200
|
-
)) :
|
|
2278
|
+
)) : O("v-if", !0), _("div", Tr, [L(e.$slots, "default")]), e.slots.footer ? (h(), b(
|
|
1201
2279
|
"div",
|
|
1202
|
-
|
|
1203
|
-
[
|
|
2280
|
+
$r,
|
|
2281
|
+
[L(e.$slots, "footer", {
|
|
1204
2282
|
beforeClose: e.beforeClose
|
|
1205
2283
|
})],
|
|
1206
2284
|
512
|
|
1207
2285
|
/* NEED_PATCH */
|
|
1208
|
-
)) :
|
|
2286
|
+
)) : O("v-if", !0)], 14, Er)), [[ve, e.visible]]) : O("v-if", !0)];
|
|
1209
2287
|
}),
|
|
1210
2288
|
_: 3
|
|
1211
2289
|
/* FORWARDED */
|
|
1212
2290
|
}, 8, ["name"])],
|
|
1213
2291
|
34
|
|
1214
2292
|
/* CLASS, NEED_HYDRATION */
|
|
1215
|
-
), [[
|
|
2293
|
+
), [[ve, e.visible]])];
|
|
1216
2294
|
}),
|
|
1217
2295
|
_: 3
|
|
1218
2296
|
/* FORWARDED */
|
|
1219
2297
|
}, 8, ["duration", "name", "onAfterEnter", "onAfterLeave"]);
|
|
1220
2298
|
}
|
|
1221
|
-
var
|
|
1222
|
-
function
|
|
1223
|
-
return
|
|
2299
|
+
var re = /* @__PURE__ */ _r(Mr, [["render", xr]]);
|
|
2300
|
+
function Be() {
|
|
2301
|
+
return Be = Object.assign ? Object.assign.bind() : function(e) {
|
|
1224
2302
|
for (var t = 1; t < arguments.length; t++) {
|
|
1225
|
-
var
|
|
1226
|
-
for (var
|
|
2303
|
+
var o = arguments[t];
|
|
2304
|
+
for (var n in o) ({}).hasOwnProperty.call(o, n) && (e[n] = o[n]);
|
|
1227
2305
|
}
|
|
1228
2306
|
return e;
|
|
1229
|
-
},
|
|
2307
|
+
}, Be.apply(null, arguments);
|
|
1230
2308
|
}
|
|
1231
|
-
var
|
|
1232
|
-
var
|
|
1233
|
-
return
|
|
1234
|
-
},
|
|
2309
|
+
var Dr = function(t) {
|
|
2310
|
+
var o, n = typeof process == "object" ? (o = process.env) == null ? void 0 : o.TINY_MODE : null;
|
|
2311
|
+
return re;
|
|
2312
|
+
}, kr = {
|
|
1235
2313
|
DIALOG_SLIDER_RIGHT: "dialog-slideRight",
|
|
1236
2314
|
DIALOG_FADE: "dialog-fade",
|
|
1237
|
-
SELECT_DROPDOWN:
|
|
1238
|
-
DROPDOWN_MENU:
|
|
2315
|
+
SELECT_DROPDOWN: j + "SelectDropdown",
|
|
2316
|
+
DROPDOWN_MENU: j + "DropdownMenu",
|
|
1239
2317
|
DIALOG_BOX_CLASS: "div.tiny-dialog-box",
|
|
1240
2318
|
PC_SCROLL_LOCK_CLASS: "dialog-box__scroll-lock",
|
|
1241
2319
|
MOBILE_SCROLL_LOCK_CLASS: "mobile-dialog-box__scroll-lock",
|
|
@@ -1244,11 +2322,11 @@ var io = function(t) {
|
|
|
1244
2322
|
SCROLL_LOCK_CLASS: function(t) {
|
|
1245
2323
|
return t === this.Mode ? this.PC_SCROLL_LOCK_CLASS : this.MOBILE_SCROLL_LOCK_CLASS;
|
|
1246
2324
|
}
|
|
1247
|
-
},
|
|
2325
|
+
}, Pr = Be({}, de, {
|
|
1248
2326
|
_constants: {
|
|
1249
2327
|
type: Object,
|
|
1250
2328
|
default: function() {
|
|
1251
|
-
return
|
|
2329
|
+
return kr;
|
|
1252
2330
|
}
|
|
1253
2331
|
},
|
|
1254
2332
|
appendToBody: {
|
|
@@ -1393,76 +2471,76 @@ var io = function(t) {
|
|
|
1393
2471
|
return {};
|
|
1394
2472
|
}
|
|
1395
2473
|
}
|
|
1396
|
-
}),
|
|
1397
|
-
name:
|
|
2474
|
+
}), Q = U({
|
|
2475
|
+
name: j + "DialogBox",
|
|
1398
2476
|
model: {
|
|
1399
2477
|
prop: "visible",
|
|
1400
2478
|
event: "update:visible"
|
|
1401
2479
|
},
|
|
1402
|
-
props:
|
|
1403
|
-
setup: function(t,
|
|
1404
|
-
return
|
|
2480
|
+
props: Pr,
|
|
2481
|
+
setup: function(t, o) {
|
|
2482
|
+
return Te({
|
|
1405
2483
|
props: t,
|
|
1406
|
-
context:
|
|
1407
|
-
template:
|
|
2484
|
+
context: o,
|
|
2485
|
+
template: Dr
|
|
1408
2486
|
});
|
|
1409
2487
|
}
|
|
1410
|
-
}),
|
|
1411
|
-
|
|
1412
|
-
e.component(
|
|
2488
|
+
}), Vr = "3.21.0";
|
|
2489
|
+
Q.install = function(e) {
|
|
2490
|
+
e.component(Q.name, Q);
|
|
1413
2491
|
};
|
|
1414
|
-
|
|
1415
|
-
function
|
|
1416
|
-
var
|
|
1417
|
-
if (
|
|
1418
|
-
if (Array.isArray(e) || (
|
|
1419
|
-
|
|
1420
|
-
var
|
|
2492
|
+
Q.version = Vr;
|
|
2493
|
+
function Ar(e, t) {
|
|
2494
|
+
var o = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2495
|
+
if (o) return (o = o.call(e)).next.bind(o);
|
|
2496
|
+
if (Array.isArray(e) || (o = Lr(e)) || t) {
|
|
2497
|
+
o && (e = o);
|
|
2498
|
+
var n = 0;
|
|
1421
2499
|
return function() {
|
|
1422
|
-
return
|
|
2500
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1423
2501
|
};
|
|
1424
2502
|
}
|
|
1425
2503
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1426
2504
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1427
2505
|
}
|
|
1428
|
-
function
|
|
2506
|
+
function Lr(e, t) {
|
|
1429
2507
|
if (e) {
|
|
1430
|
-
if (typeof e == "string") return
|
|
1431
|
-
var
|
|
1432
|
-
return
|
|
2508
|
+
if (typeof e == "string") return Re(e, t);
|
|
2509
|
+
var o = {}.toString.call(e).slice(8, -1);
|
|
2510
|
+
return o === "Object" && e.constructor && (o = e.constructor.name), o === "Map" || o === "Set" ? Array.from(e) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? Re(e, t) : void 0;
|
|
1433
2511
|
}
|
|
1434
2512
|
}
|
|
1435
|
-
function
|
|
2513
|
+
function Re(e, t) {
|
|
1436
2514
|
(t == null || t > e.length) && (t = e.length);
|
|
1437
|
-
for (var
|
|
1438
|
-
return
|
|
2515
|
+
for (var o = 0, n = Array(t); o < t; o++) n[o] = e[o];
|
|
2516
|
+
return n;
|
|
1439
2517
|
}
|
|
1440
|
-
var
|
|
1441
|
-
for (var
|
|
1442
|
-
var
|
|
1443
|
-
|
|
2518
|
+
var tt = function(t, o) {
|
|
2519
|
+
for (var n = t.__vccOpts || t, r = Ar(o), i; !(i = r()).done; ) {
|
|
2520
|
+
var l = i.value, a = l[0], s = l[1];
|
|
2521
|
+
n[a] = s;
|
|
1444
2522
|
}
|
|
1445
|
-
return
|
|
1446
|
-
},
|
|
1447
|
-
name:
|
|
2523
|
+
return n;
|
|
2524
|
+
}, Nr = U({
|
|
2525
|
+
name: j + "TallStorage",
|
|
1448
2526
|
inheritAttrs: !1,
|
|
1449
2527
|
props: {
|
|
1450
2528
|
isMemoryStorage: Boolean,
|
|
1451
2529
|
localstorageData: Array
|
|
1452
2530
|
},
|
|
1453
|
-
setup: function(t,
|
|
1454
|
-
return
|
|
2531
|
+
setup: function(t, o) {
|
|
2532
|
+
return pe({
|
|
1455
2533
|
props: t,
|
|
1456
|
-
context:
|
|
1457
|
-
renderless:
|
|
1458
|
-
api:
|
|
2534
|
+
context: o,
|
|
2535
|
+
renderless: sn,
|
|
2536
|
+
api: ln
|
|
1459
2537
|
});
|
|
1460
2538
|
}
|
|
1461
|
-
}),
|
|
2539
|
+
}), Fr = {
|
|
1462
2540
|
class: "tiny-storage-list-style"
|
|
1463
|
-
},
|
|
1464
|
-
function
|
|
1465
|
-
return
|
|
2541
|
+
}, zr = ["onClick"];
|
|
2542
|
+
function Hr(e, t, o, n, r, i) {
|
|
2543
|
+
return h(), b(
|
|
1466
2544
|
"div",
|
|
1467
2545
|
{
|
|
1468
2546
|
class: "tiny-tall-storage",
|
|
@@ -1470,25 +2548,25 @@ function mo(e, t, n, o, l, i) {
|
|
|
1470
2548
|
return e.mousedown && e.mousedown.apply(e, arguments);
|
|
1471
2549
|
})
|
|
1472
2550
|
},
|
|
1473
|
-
[
|
|
2551
|
+
[_("div", Fr, [_(
|
|
1474
2552
|
"ul",
|
|
1475
2553
|
{
|
|
1476
|
-
onKeydown: t[0] || (t[0] =
|
|
2554
|
+
onKeydown: t[0] || (t[0] = gt(function() {
|
|
1477
2555
|
return e.keydownEvent && e.keydownEvent.apply(e, arguments);
|
|
1478
2556
|
}, ["enter"])),
|
|
1479
2557
|
class: "tiny-storage-list"
|
|
1480
2558
|
},
|
|
1481
|
-
[(
|
|
1482
|
-
|
|
2559
|
+
[(h(!0), b(
|
|
2560
|
+
Ce,
|
|
1483
2561
|
null,
|
|
1484
|
-
|
|
1485
|
-
return
|
|
1486
|
-
key:
|
|
1487
|
-
class:
|
|
1488
|
-
onClick: function(
|
|
1489
|
-
return e.selectItem(
|
|
2562
|
+
bt(e.localstorageData, function(l) {
|
|
2563
|
+
return h(), b("li", {
|
|
2564
|
+
key: l,
|
|
2565
|
+
class: te(["tiny-storage-item", [e.state.hoverValue === l ? "item-hover" : ""]]),
|
|
2566
|
+
onClick: function(s) {
|
|
2567
|
+
return e.selectItem(l);
|
|
1490
2568
|
}
|
|
1491
|
-
},
|
|
2569
|
+
}, x(l), 11, zr);
|
|
1492
2570
|
}),
|
|
1493
2571
|
128
|
|
1494
2572
|
/* KEYED_FRAGMENT */
|
|
@@ -1500,95 +2578,95 @@ function mo(e, t, n, o, l, i) {
|
|
|
1500
2578
|
/* NEED_HYDRATION */
|
|
1501
2579
|
);
|
|
1502
2580
|
}
|
|
1503
|
-
var
|
|
2581
|
+
var Wr = /* @__PURE__ */ tt(Nr, [["render", Hr]]), Rr = U({
|
|
1504
2582
|
inheritAttrs: !1,
|
|
1505
2583
|
// 勿删,兼容灵雀特殊场景,MR#1861
|
|
1506
2584
|
emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "click", "input"],
|
|
1507
|
-
directives:
|
|
1508
|
-
Clickoutside:
|
|
2585
|
+
directives: mt({
|
|
2586
|
+
Clickoutside: rn
|
|
1509
2587
|
}),
|
|
1510
2588
|
components: {
|
|
1511
|
-
IconClose:
|
|
1512
|
-
IconEyeopen:
|
|
1513
|
-
IconEyeclose:
|
|
1514
|
-
TinyTallStorage:
|
|
1515
|
-
TinyTooltip:
|
|
1516
|
-
TinyButton:
|
|
1517
|
-
TinyDialogBox:
|
|
1518
|
-
},
|
|
1519
|
-
props: [].concat(
|
|
1520
|
-
setup: function(t,
|
|
1521
|
-
return
|
|
2589
|
+
IconClose: Ke(),
|
|
2590
|
+
IconEyeopen: Wt(),
|
|
2591
|
+
IconEyeclose: Vt(),
|
|
2592
|
+
TinyTallStorage: Wr,
|
|
2593
|
+
TinyTooltip: K,
|
|
2594
|
+
TinyButton: ct,
|
|
2595
|
+
TinyDialogBox: Q
|
|
2596
|
+
},
|
|
2597
|
+
props: [].concat(Je, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "memorySpace", "validateEvent", "showWordLimit", "displayOnly", "displayOnlyContent", "frontClearIcon", "showEmptyValue", "hoverExpand", "popupMore", "showTooltip", "inputBoxType"]),
|
|
2598
|
+
setup: function(t, o) {
|
|
2599
|
+
return pe({
|
|
1522
2600
|
props: t,
|
|
1523
|
-
context:
|
|
1524
|
-
renderless:
|
|
1525
|
-
api:
|
|
2601
|
+
context: o,
|
|
2602
|
+
renderless: tn,
|
|
2603
|
+
api: Xo
|
|
1526
2604
|
});
|
|
1527
2605
|
}
|
|
1528
|
-
}),
|
|
2606
|
+
}), jr = {
|
|
1529
2607
|
key: 0,
|
|
1530
2608
|
class: "tiny-input-group__prepend",
|
|
1531
2609
|
ref: "prepend"
|
|
1532
|
-
},
|
|
2610
|
+
}, Ur = {
|
|
1533
2611
|
class: "tiny-input-display-only"
|
|
1534
|
-
},
|
|
2612
|
+
}, Jr = {
|
|
1535
2613
|
key: 0,
|
|
1536
2614
|
class: "tiny-input-display-only__content"
|
|
1537
|
-
},
|
|
2615
|
+
}, Gr = {
|
|
1538
2616
|
key: 1,
|
|
1539
2617
|
class: "tiny-input-display-only__mask"
|
|
1540
|
-
},
|
|
2618
|
+
}, Kr = {
|
|
1541
2619
|
class: "tiny-input-display-only__mask-text"
|
|
1542
|
-
},
|
|
2620
|
+
}, Yr = {
|
|
1543
2621
|
key: 2,
|
|
1544
2622
|
class: "tiny-input-display-only__content"
|
|
1545
|
-
},
|
|
2623
|
+
}, Xr = ["name", "tabindex", "type", "disabled", "readonly", "unselectable", "autocomplete", "aria-label"], Zr = {
|
|
1546
2624
|
key: 2,
|
|
1547
2625
|
class: "tiny-input__prefix",
|
|
1548
2626
|
ref: "prefix"
|
|
1549
|
-
},
|
|
2627
|
+
}, qr = {
|
|
1550
2628
|
key: 0,
|
|
1551
2629
|
class: "tiny-input__suffix",
|
|
1552
2630
|
ref: "suffix"
|
|
1553
|
-
},
|
|
2631
|
+
}, Qr = {
|
|
1554
2632
|
class: "tiny-input__suffix-inner"
|
|
1555
|
-
},
|
|
2633
|
+
}, el = {
|
|
1556
2634
|
key: 5,
|
|
1557
2635
|
class: "tiny-input__count"
|
|
1558
|
-
},
|
|
2636
|
+
}, tl = {
|
|
1559
2637
|
class: "tiny-input__count-inner"
|
|
1560
|
-
},
|
|
2638
|
+
}, ol = {
|
|
1561
2639
|
class: "tiny-input__count-text-length"
|
|
1562
|
-
},
|
|
2640
|
+
}, nl = {
|
|
1563
2641
|
class: "tiny-input__count-upper-limit"
|
|
1564
|
-
},
|
|
2642
|
+
}, rl = {
|
|
1565
2643
|
key: 3,
|
|
1566
2644
|
class: "tiny-input-group__append",
|
|
1567
2645
|
ref: "append"
|
|
1568
|
-
},
|
|
2646
|
+
}, ll = {
|
|
1569
2647
|
key: 4,
|
|
1570
2648
|
class: "tiny-input-group__panel",
|
|
1571
2649
|
ref: "panel"
|
|
1572
|
-
},
|
|
2650
|
+
}, il = {
|
|
1573
2651
|
class: "tiny-textarea-display-only__wrap"
|
|
1574
|
-
},
|
|
2652
|
+
}, sl = {
|
|
1575
2653
|
ref: "textBox",
|
|
1576
2654
|
class: "tiny-textarea-display-only__content text-box"
|
|
1577
|
-
},
|
|
2655
|
+
}, al = ["tabindex", "disabled", "readonly", "unselectable", "autocomplete", "aria-label"], ul = {
|
|
1578
2656
|
key: 2,
|
|
1579
2657
|
class: "tiny-input__count"
|
|
1580
|
-
},
|
|
2658
|
+
}, pl = {
|
|
1581
2659
|
class: "tiny-input__count-inner"
|
|
1582
|
-
},
|
|
2660
|
+
}, dl = {
|
|
1583
2661
|
class: "tiny-input__count-text-length"
|
|
1584
|
-
},
|
|
2662
|
+
}, fl = {
|
|
1585
2663
|
class: "tiny-input__count-upper-limit"
|
|
1586
2664
|
};
|
|
1587
|
-
function
|
|
1588
|
-
var
|
|
1589
|
-
return
|
|
2665
|
+
function cl(e, t, o, n, r, i) {
|
|
2666
|
+
var l = z("tiny-tooltip"), a = z("tiny-tall-storage"), s = z("icon-close"), u = z("tiny-button"), f = z("tiny-dialog-box"), c = yt("clickoutside");
|
|
2667
|
+
return h(), b(
|
|
1590
2668
|
"div",
|
|
1591
|
-
|
|
2669
|
+
me(e.a(e.$attrs, ["class"]), {
|
|
1592
2670
|
class: [e.$attrs.class, e.type === "textarea" ? "tiny-textarea" : "tiny-input", e.state.inputSize ? "tiny-input-" + e.state.inputSize : "", {
|
|
1593
2671
|
"is-disabled": e.state.inputDisabled,
|
|
1594
2672
|
"is-exceed": e.state.inputExceed,
|
|
@@ -1601,28 +2679,28 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1601
2679
|
"is-display-only": e.state.isDisplayOnly,
|
|
1602
2680
|
"tiny-input-underline": e.inputBoxType === "underline"
|
|
1603
2681
|
}],
|
|
1604
|
-
onMouseenter: t[32] || (t[32] = function(
|
|
1605
|
-
e.state.hovering = !0, e.$emit("mouseenter",
|
|
2682
|
+
onMouseenter: t[32] || (t[32] = function(p) {
|
|
2683
|
+
e.state.hovering = !0, e.$emit("mouseenter", p);
|
|
1606
2684
|
}),
|
|
1607
|
-
onMouseleave: t[33] || (t[33] = function(
|
|
1608
|
-
e.state.hovering = !1, e.$emit("mouseleave",
|
|
2685
|
+
onMouseleave: t[33] || (t[33] = function(p) {
|
|
2686
|
+
e.state.hovering = !1, e.$emit("mouseleave", p);
|
|
1609
2687
|
}),
|
|
1610
|
-
onClick: t[34] || (t[34] = function(
|
|
1611
|
-
return e.$emit("click",
|
|
2688
|
+
onClick: t[34] || (t[34] = function(p) {
|
|
2689
|
+
return e.$emit("click", p);
|
|
1612
2690
|
})
|
|
1613
2691
|
}),
|
|
1614
|
-
[e.type !== "textarea" ? (
|
|
1615
|
-
|
|
2692
|
+
[e.type !== "textarea" ? (h(), b(
|
|
2693
|
+
Ce,
|
|
1616
2694
|
{
|
|
1617
2695
|
key: 0
|
|
1618
2696
|
},
|
|
1619
|
-
[e.slots.prepend
|
|
2697
|
+
[e.slots.prepend ? (h(), b(
|
|
1620
2698
|
"div",
|
|
1621
|
-
|
|
1622
|
-
[
|
|
2699
|
+
jr,
|
|
2700
|
+
[L(e.$slots, "prepend")],
|
|
1623
2701
|
512
|
|
1624
2702
|
/* NEED_PATCH */
|
|
1625
|
-
)) :
|
|
2703
|
+
)) : O("v-if", !0), _("span", Ur, [e.state.isDisplayOnly ? (h(), k(l, {
|
|
1626
2704
|
key: 0,
|
|
1627
2705
|
disabled: !e.showTooltip,
|
|
1628
2706
|
effect: "light",
|
|
@@ -1631,34 +2709,34 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1631
2709
|
"popper-class": e.state.tooltipConfig.popperClass || "",
|
|
1632
2710
|
onMouseenter: e.handleEnterDisplayOnlyContent
|
|
1633
2711
|
}, {
|
|
1634
|
-
default:
|
|
1635
|
-
return [e.type === "password" ? (
|
|
2712
|
+
default: F(function() {
|
|
2713
|
+
return [e.type === "password" ? (h(), b(
|
|
1636
2714
|
"span",
|
|
1637
|
-
|
|
1638
|
-
|
|
2715
|
+
Jr,
|
|
2716
|
+
x(e.state.hiddenPassword),
|
|
1639
2717
|
1
|
|
1640
2718
|
/* TEXT */
|
|
1641
|
-
)) : e.mask ? (
|
|
2719
|
+
)) : e.mask ? (h(), b("span", Gr, [_(
|
|
1642
2720
|
"span",
|
|
1643
|
-
|
|
1644
|
-
|
|
2721
|
+
Kr,
|
|
2722
|
+
x(e.state.displayedMaskValue),
|
|
1645
2723
|
1
|
|
1646
2724
|
/* TEXT */
|
|
1647
|
-
), (
|
|
1648
|
-
onClick: t[0] || (t[0] = function(
|
|
2725
|
+
), (h(), k(Y(e.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose"), {
|
|
2726
|
+
onClick: t[0] || (t[0] = function(p) {
|
|
1649
2727
|
return e.state.maskValueVisible = !e.state.maskValueVisible;
|
|
1650
2728
|
})
|
|
1651
|
-
}))])) : (
|
|
2729
|
+
}))])) : (h(), b(
|
|
1652
2730
|
"span",
|
|
1653
|
-
|
|
1654
|
-
|
|
2731
|
+
Yr,
|
|
2732
|
+
x(e.state.displayOnlyText),
|
|
1655
2733
|
1
|
|
1656
2734
|
/* TEXT */
|
|
1657
2735
|
))];
|
|
1658
2736
|
}),
|
|
1659
2737
|
_: 1
|
|
1660
2738
|
/* STABLE */
|
|
1661
|
-
}, 8, ["disabled", "content", "popper-class", "onMouseenter"])) :
|
|
2739
|
+
}, 8, ["disabled", "content", "popper-class", "onMouseenter"])) : O("v-if", !0), e.type !== "textarea" ? (h(), b("input", me({
|
|
1662
2740
|
key: 1,
|
|
1663
2741
|
ref: "input",
|
|
1664
2742
|
name: e.name,
|
|
@@ -1693,120 +2771,120 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1693
2771
|
return e.handleChange && e.handleChange.apply(e, arguments);
|
|
1694
2772
|
}),
|
|
1695
2773
|
"aria-label": e.label,
|
|
1696
|
-
onKeyup: t[8] || (t[8] = function(
|
|
1697
|
-
return e.$emit("keyup",
|
|
2774
|
+
onKeyup: t[8] || (t[8] = function(p) {
|
|
2775
|
+
return e.$emit("keyup", p);
|
|
1698
2776
|
}),
|
|
1699
|
-
onKeydown: t[9] || (t[9] = function(
|
|
1700
|
-
return e.$emit("keydown",
|
|
2777
|
+
onKeydown: t[9] || (t[9] = function(p) {
|
|
2778
|
+
return e.$emit("keydown", p);
|
|
1701
2779
|
}),
|
|
1702
|
-
onPaste: t[10] || (t[10] = function(
|
|
1703
|
-
return e.$emit("paste",
|
|
2780
|
+
onPaste: t[10] || (t[10] = function(p) {
|
|
2781
|
+
return e.$emit("paste", p);
|
|
1704
2782
|
})
|
|
1705
|
-
}), null, 16,
|
|
2783
|
+
}), null, 16, Xr)) : O("v-if", !0)]), e.isMemoryStorage ? (h(), k(a, {
|
|
1706
2784
|
key: 1,
|
|
1707
2785
|
name: e.name,
|
|
1708
2786
|
"localstorage-data": e.storageData,
|
|
1709
2787
|
"is-memory-storage": e.isMemoryStorage,
|
|
1710
2788
|
onSelected: e.selectedMemory
|
|
1711
|
-
}, null, 8, ["name", "localstorage-data", "is-memory-storage", "onSelected"])) :
|
|
2789
|
+
}, null, 8, ["name", "localstorage-data", "is-memory-storage", "onSelected"])) : O("v-if", !0), !e.state.isDisplayOnly && (e.slots.prefix || e.prefixIcon) ? (h(), b(
|
|
1712
2790
|
"span",
|
|
1713
|
-
|
|
1714
|
-
[
|
|
2791
|
+
Zr,
|
|
2792
|
+
[L(e.$slots, "prefix"), e.prefixIcon ? (h(), k(Y(e.prefixIcon), {
|
|
1715
2793
|
key: 0,
|
|
1716
2794
|
class: "tiny-svg-size tiny-input__icon"
|
|
1717
|
-
})) :
|
|
2795
|
+
})) : O("v-if", !0)],
|
|
1718
2796
|
512
|
|
1719
2797
|
/* NEED_PATCH */
|
|
1720
|
-
)) :
|
|
2798
|
+
)) : O("v-if", !0), _("div", null, [H(we, {
|
|
1721
2799
|
name: "tiny-transition-icon-out-in"
|
|
1722
2800
|
}, {
|
|
1723
|
-
default:
|
|
1724
|
-
return [!e.state.isDisplayOnly && e.getSuffixVisible() ? (
|
|
2801
|
+
default: F(function() {
|
|
2802
|
+
return [!e.state.isDisplayOnly && e.getSuffixVisible() ? (h(), b(
|
|
1725
2803
|
"span",
|
|
1726
|
-
|
|
1727
|
-
[
|
|
2804
|
+
qr,
|
|
2805
|
+
[_("span", Qr, [e.frontClearIcon && e.state.showClear ? (h(), k(s, {
|
|
1728
2806
|
key: 0,
|
|
1729
2807
|
class: "tiny-svg-size tiny-input__icon tiny-input__clear",
|
|
1730
|
-
onMousedown: t[11] || (t[11] =
|
|
2808
|
+
onMousedown: t[11] || (t[11] = Se(function() {
|
|
1731
2809
|
}, ["prevent"])),
|
|
1732
2810
|
onClick: e.clear
|
|
1733
|
-
}, null, 8, ["onClick"])) :
|
|
1734
|
-
|
|
2811
|
+
}, null, 8, ["onClick"])) : O("v-if", !0), !e.state.showClear || !e.state.showPwdVisible || !e.state.isWordLimitVisible ? (h(), b(
|
|
2812
|
+
Ce,
|
|
1735
2813
|
{
|
|
1736
2814
|
key: 1
|
|
1737
2815
|
},
|
|
1738
|
-
[
|
|
2816
|
+
[L(e.$slots, "suffix"), e.suffixIcon ? (h(), k(Y(e.suffixIcon), {
|
|
1739
2817
|
key: 0,
|
|
1740
2818
|
class: "tiny-svg-size tiny-input__icon"
|
|
1741
|
-
})) :
|
|
2819
|
+
})) : O("v-if", !0)],
|
|
1742
2820
|
64
|
|
1743
2821
|
/* STABLE_FRAGMENT */
|
|
1744
|
-
)) :
|
|
2822
|
+
)) : O("v-if", !0), !e.frontClearIcon && e.state.showClear ? (h(), k(s, {
|
|
1745
2823
|
key: 2,
|
|
1746
2824
|
class: "tiny-svg-size tiny-input__icon tiny-input__clear",
|
|
1747
|
-
onMousedown: t[12] || (t[12] =
|
|
2825
|
+
onMousedown: t[12] || (t[12] = Se(function() {
|
|
1748
2826
|
}, ["prevent"])),
|
|
1749
2827
|
onClick: e.clear
|
|
1750
|
-
}, null, 8, ["onClick"])) :
|
|
2828
|
+
}, null, 8, ["onClick"])) : O("v-if", !0), e.showPassword ? (h(), k(Y(e.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose"), {
|
|
1751
2829
|
key: 3,
|
|
1752
2830
|
class: "tiny-svg-size tiny-input__icon",
|
|
1753
2831
|
onClick: e.handlePasswordVisible
|
|
1754
|
-
}, null, 8, ["onClick"])) :
|
|
2832
|
+
}, null, 8, ["onClick"])) : O("v-if", !0), e.mask && e.state.inputDisabled ? (h(), k(Y(e.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose"), {
|
|
1755
2833
|
key: 4,
|
|
1756
2834
|
class: "tiny-svg-size tiny-input__icon",
|
|
1757
|
-
onClick: t[13] || (t[13] = function(
|
|
2835
|
+
onClick: t[13] || (t[13] = function(p) {
|
|
1758
2836
|
return e.state.maskValueVisible = !e.state.maskValueVisible;
|
|
1759
2837
|
})
|
|
1760
|
-
})) :
|
|
2838
|
+
})) : O("v-if", !0), e.state.isWordLimitVisible ? (h(), b("span", el, [_("span", tl, [_(
|
|
1761
2839
|
"span",
|
|
1762
|
-
|
|
1763
|
-
|
|
2840
|
+
ol,
|
|
2841
|
+
x(e.state.showWordLimit ? "" + e.state.textLength : ""),
|
|
1764
2842
|
1
|
|
1765
2843
|
/* TEXT */
|
|
1766
|
-
),
|
|
2844
|
+
), _(
|
|
1767
2845
|
"span",
|
|
1768
|
-
|
|
1769
|
-
|
|
2846
|
+
nl,
|
|
2847
|
+
x(e.state.showWordLimit ? "/" + e.state.upperLimit : e.state.textLength),
|
|
1770
2848
|
1
|
|
1771
2849
|
/* TEXT */
|
|
1772
|
-
)])])) :
|
|
2850
|
+
)])])) : O("v-if", !0)]), e.state.validateState ? (h(), b(
|
|
1773
2851
|
"i",
|
|
1774
2852
|
{
|
|
1775
2853
|
key: 0,
|
|
1776
|
-
class:
|
|
2854
|
+
class: te(["tiny-input__icon", ["tiny-input__validateIcon", e.validateIcon]])
|
|
1777
2855
|
},
|
|
1778
2856
|
null,
|
|
1779
2857
|
2
|
|
1780
2858
|
/* CLASS */
|
|
1781
|
-
)) :
|
|
2859
|
+
)) : O("v-if", !0)],
|
|
1782
2860
|
512
|
|
1783
2861
|
/* NEED_PATCH */
|
|
1784
|
-
)) :
|
|
2862
|
+
)) : O("v-if", !0)];
|
|
1785
2863
|
}),
|
|
1786
2864
|
_: 3
|
|
1787
2865
|
/* FORWARDED */
|
|
1788
|
-
})]), e.slots.append
|
|
2866
|
+
})]), e.slots.append ? (h(), b(
|
|
1789
2867
|
"div",
|
|
1790
|
-
|
|
1791
|
-
[
|
|
2868
|
+
rl,
|
|
2869
|
+
[L(e.$slots, "append")],
|
|
1792
2870
|
512
|
|
1793
2871
|
/* NEED_PATCH */
|
|
1794
|
-
)) :
|
|
2872
|
+
)) : O("v-if", !0), e.slots.panel ? (h(), b(
|
|
1795
2873
|
"div",
|
|
1796
|
-
|
|
1797
|
-
[
|
|
2874
|
+
ll,
|
|
2875
|
+
[L(e.$slots, "panel")],
|
|
1798
2876
|
512
|
|
1799
2877
|
/* NEED_PATCH */
|
|
1800
|
-
)) :
|
|
2878
|
+
)) : O("v-if", !0)],
|
|
1801
2879
|
64
|
|
1802
2880
|
/* STABLE_FRAGMENT */
|
|
1803
|
-
)) : (
|
|
2881
|
+
)) : (h(), b(
|
|
1804
2882
|
"span",
|
|
1805
2883
|
{
|
|
1806
2884
|
key: 1,
|
|
1807
|
-
class:
|
|
2885
|
+
class: te(["tiny-textarea-display-only", e.hoverExpand && "tiny-textarea__inner-con"])
|
|
1808
2886
|
},
|
|
1809
|
-
[e.state.isDisplayOnly ? (
|
|
2887
|
+
[e.state.isDisplayOnly ? (h(), k(l, {
|
|
1810
2888
|
key: 0,
|
|
1811
2889
|
disabled: !e.showTooltip,
|
|
1812
2890
|
pre: "",
|
|
@@ -1814,28 +2892,30 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1814
2892
|
content: e.state.displayOnlyTooltip,
|
|
1815
2893
|
placement: "top",
|
|
1816
2894
|
"popper-class": e.state.tooltipConfig.popperClass || "",
|
|
1817
|
-
onMouseenter: t[15] || (t[15] = function(
|
|
1818
|
-
return e.handleEnterDisplayOnlyContent(
|
|
2895
|
+
onMouseenter: t[15] || (t[15] = function(p) {
|
|
2896
|
+
return e.handleEnterDisplayOnlyContent(p, "textarea");
|
|
1819
2897
|
})
|
|
1820
2898
|
}, {
|
|
1821
|
-
default:
|
|
1822
|
-
return [
|
|
2899
|
+
default: F(function() {
|
|
2900
|
+
return [_("div", il, [_(
|
|
1823
2901
|
"span",
|
|
1824
|
-
|
|
1825
|
-
[e.state.showMoreBtn ? (
|
|
2902
|
+
sl,
|
|
2903
|
+
[e.state.showMoreBtn ? (h(), b(
|
|
1826
2904
|
"span",
|
|
1827
2905
|
{
|
|
1828
2906
|
key: 0,
|
|
1829
|
-
onClick: t[14] || (t[14] = function(
|
|
2907
|
+
onClick: t[14] || (t[14] = function(p) {
|
|
1830
2908
|
return e.state.showDisplayOnlyBox = !0;
|
|
1831
2909
|
}),
|
|
1832
2910
|
class: "more-btn"
|
|
1833
2911
|
},
|
|
1834
|
-
|
|
2912
|
+
x(e.t("ui.input.more")) + ">",
|
|
1835
2913
|
1
|
|
1836
2914
|
/* TEXT */
|
|
1837
|
-
)) :
|
|
1838
|
-
|
|
2915
|
+
)) : O("v-if", !0), _(
|
|
2916
|
+
"span",
|
|
2917
|
+
null,
|
|
2918
|
+
x(e.state.displayOnlyText),
|
|
1839
2919
|
1
|
|
1840
2920
|
/* TEXT */
|
|
1841
2921
|
)],
|
|
@@ -1845,24 +2925,24 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1845
2925
|
}),
|
|
1846
2926
|
_: 1
|
|
1847
2927
|
/* STABLE */
|
|
1848
|
-
}, 8, ["disabled", "content", "popper-class"])) :
|
|
2928
|
+
}, 8, ["disabled", "content", "popper-class"])) : O("v-if", !0), e.state.isDisplayOnly && e.popupMore ? (h(), k(f, {
|
|
1849
2929
|
key: 1,
|
|
1850
2930
|
title: e.t("ui.input.detail"),
|
|
1851
2931
|
visible: e.state.showDisplayOnlyBox,
|
|
1852
2932
|
"append-to-body": !0,
|
|
1853
|
-
"onUpdate:visible": t[17] || (t[17] = function(
|
|
1854
|
-
return e.state.showDisplayOnlyBox =
|
|
2933
|
+
"onUpdate:visible": t[17] || (t[17] = function(p) {
|
|
2934
|
+
return e.state.showDisplayOnlyBox = p;
|
|
1855
2935
|
})
|
|
1856
2936
|
}, {
|
|
1857
|
-
footer:
|
|
1858
|
-
return [
|
|
1859
|
-
onClick: t[16] || (t[16] = function(
|
|
2937
|
+
footer: F(function() {
|
|
2938
|
+
return [H(u, {
|
|
2939
|
+
onClick: t[16] || (t[16] = function(p) {
|
|
1860
2940
|
return e.state.showDisplayOnlyBox = !1;
|
|
1861
2941
|
})
|
|
1862
2942
|
}, {
|
|
1863
|
-
default:
|
|
1864
|
-
return [
|
|
1865
|
-
|
|
2943
|
+
default: F(function() {
|
|
2944
|
+
return [De(
|
|
2945
|
+
x(e.t("ui.input.close")),
|
|
1866
2946
|
1
|
|
1867
2947
|
/* TEXT */
|
|
1868
2948
|
)];
|
|
@@ -1871,18 +2951,18 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1871
2951
|
/* STABLE */
|
|
1872
2952
|
})];
|
|
1873
2953
|
}),
|
|
1874
|
-
default:
|
|
1875
|
-
return [
|
|
1876
|
-
"
|
|
2954
|
+
default: F(function() {
|
|
2955
|
+
return [_(
|
|
2956
|
+
"div",
|
|
1877
2957
|
null,
|
|
1878
|
-
|
|
2958
|
+
x(e.state.displayOnlyText),
|
|
1879
2959
|
1
|
|
1880
2960
|
/* TEXT */
|
|
1881
2961
|
)];
|
|
1882
2962
|
}),
|
|
1883
2963
|
_: 1
|
|
1884
2964
|
/* STABLE */
|
|
1885
|
-
}, 8, ["title", "visible"])) :
|
|
2965
|
+
}, 8, ["title", "visible"])) : O("v-if", !0), ue((h(), b("textarea", me({
|
|
1886
2966
|
ref: "textarea"
|
|
1887
2967
|
}, e.a(e.$attrs, ["type", "class", "style", "id"]), {
|
|
1888
2968
|
tabindex: e.tabindex,
|
|
@@ -1913,67 +2993,67 @@ function Ho(e, t, n, o, l, i) {
|
|
|
1913
2993
|
onChange: t[24] || (t[24] = function() {
|
|
1914
2994
|
return e.handleChange && e.handleChange.apply(e, arguments);
|
|
1915
2995
|
}),
|
|
1916
|
-
onMouseenter: t[25] || (t[25] = function(
|
|
1917
|
-
return e.handleEnterTextarea(
|
|
2996
|
+
onMouseenter: t[25] || (t[25] = function(p) {
|
|
2997
|
+
return e.handleEnterTextarea(p);
|
|
1918
2998
|
}),
|
|
1919
|
-
onMouseleave: t[26] || (t[26] = function(
|
|
1920
|
-
return e.handleLeaveTextarea(
|
|
2999
|
+
onMouseleave: t[26] || (t[26] = function(p) {
|
|
3000
|
+
return e.handleLeaveTextarea(p);
|
|
1921
3001
|
}),
|
|
1922
|
-
onMousedown: t[27] || (t[27] = function(
|
|
3002
|
+
onMousedown: t[27] || (t[27] = function(p) {
|
|
1923
3003
|
return e.handleTextareaMouseDown();
|
|
1924
3004
|
}),
|
|
1925
|
-
onMouseup: t[28] || (t[28] = function(
|
|
3005
|
+
onMouseup: t[28] || (t[28] = function(p) {
|
|
1926
3006
|
return e.handleTextareaMouseUp();
|
|
1927
3007
|
}),
|
|
1928
3008
|
"aria-label": e.label,
|
|
1929
|
-
onKeyup: t[29] || (t[29] = function(
|
|
1930
|
-
return e.$emit("keyup",
|
|
3009
|
+
onKeyup: t[29] || (t[29] = function(p) {
|
|
3010
|
+
return e.$emit("keyup", p);
|
|
1931
3011
|
}),
|
|
1932
|
-
onKeydown: t[30] || (t[30] = function(
|
|
1933
|
-
return e.$emit("keydown",
|
|
3012
|
+
onKeydown: t[30] || (t[30] = function(p) {
|
|
3013
|
+
return e.$emit("keydown", p);
|
|
1934
3014
|
}),
|
|
1935
|
-
onPaste: t[31] || (t[31] = function(
|
|
1936
|
-
return e.$emit("paste",
|
|
3015
|
+
onPaste: t[31] || (t[31] = function(p) {
|
|
3016
|
+
return e.$emit("paste", p);
|
|
1937
3017
|
})
|
|
1938
|
-
}), [
|
|
1939
|
-
`)], 16,
|
|
3018
|
+
}), [De(`
|
|
3019
|
+
`)], 16, al)), [[c, function() {
|
|
1940
3020
|
return e.handleTextareaMouseUp(!0);
|
|
1941
3021
|
}, void 0, {
|
|
1942
3022
|
mouseup: !0
|
|
1943
3023
|
}]])],
|
|
1944
3024
|
2
|
|
1945
3025
|
/* CLASS */
|
|
1946
|
-
)), e.state.isWordLimitVisible && e.type === "textarea" ? (
|
|
3026
|
+
)), e.state.isWordLimitVisible && e.type === "textarea" ? (h(), b("span", ul, [_("span", pl, [_(
|
|
1947
3027
|
"span",
|
|
1948
|
-
|
|
1949
|
-
|
|
3028
|
+
dl,
|
|
3029
|
+
x(e.state.showWordLimit ? "" + e.state.textLength : ""),
|
|
1950
3030
|
1
|
|
1951
3031
|
/* TEXT */
|
|
1952
|
-
),
|
|
3032
|
+
), _(
|
|
1953
3033
|
"span",
|
|
1954
|
-
|
|
1955
|
-
|
|
3034
|
+
fl,
|
|
3035
|
+
x(e.state.showWordLimit ? "/" + e.state.upperLimit : e.state.textLength),
|
|
1956
3036
|
1
|
|
1957
3037
|
/* TEXT */
|
|
1958
|
-
)])])) :
|
|
3038
|
+
)])])) : O("v-if", !0), L(e.$slots, "default")],
|
|
1959
3039
|
16
|
|
1960
3040
|
/* FULL_PROPS */
|
|
1961
3041
|
);
|
|
1962
3042
|
}
|
|
1963
|
-
var
|
|
1964
|
-
function
|
|
1965
|
-
return
|
|
3043
|
+
var le = /* @__PURE__ */ tt(Rr, [["render", cl]]);
|
|
3044
|
+
function Ie() {
|
|
3045
|
+
return Ie = Object.assign ? Object.assign.bind() : function(e) {
|
|
1966
3046
|
for (var t = 1; t < arguments.length; t++) {
|
|
1967
|
-
var
|
|
1968
|
-
for (var
|
|
3047
|
+
var o = arguments[t];
|
|
3048
|
+
for (var n in o) ({}).hasOwnProperty.call(o, n) && (e[n] = o[n]);
|
|
1969
3049
|
}
|
|
1970
3050
|
return e;
|
|
1971
|
-
},
|
|
3051
|
+
}, Ie.apply(null, arguments);
|
|
1972
3052
|
}
|
|
1973
|
-
var
|
|
1974
|
-
var
|
|
1975
|
-
return
|
|
1976
|
-
},
|
|
3053
|
+
var ml = function(t) {
|
|
3054
|
+
var o, n = typeof process == "object" ? (o = process.env) == null ? void 0 : o.TINY_MODE : null;
|
|
3055
|
+
return le;
|
|
3056
|
+
}, hl = {
|
|
1977
3057
|
INPUT_PC: "tiny-input__",
|
|
1978
3058
|
INPUTGROUP_PC: "tiny-input-group__",
|
|
1979
3059
|
INPUT_MOBILE: "tiny-mobile-input__",
|
|
@@ -1995,11 +3075,11 @@ var Wo = function(t) {
|
|
|
1995
3075
|
},
|
|
1996
3076
|
MASKSYMBOL: "******",
|
|
1997
3077
|
TEXTAREA_HEIGHT_MOBILE: 108
|
|
1998
|
-
},
|
|
3078
|
+
}, yl = Ie({}, de, {
|
|
1999
3079
|
_constants: {
|
|
2000
3080
|
type: Object,
|
|
2001
3081
|
default: function() {
|
|
2002
|
-
return
|
|
3082
|
+
return hl;
|
|
2003
3083
|
}
|
|
2004
3084
|
},
|
|
2005
3085
|
name: String,
|
|
@@ -2132,26 +3212,26 @@ var Wo = function(t) {
|
|
|
2132
3212
|
return ["normal", "underline"].includes(t);
|
|
2133
3213
|
}
|
|
2134
3214
|
}
|
|
2135
|
-
}),
|
|
2136
|
-
name:
|
|
3215
|
+
}), ee = U({
|
|
3216
|
+
name: j + "Input",
|
|
2137
3217
|
inheritAttrs: !1,
|
|
2138
|
-
props:
|
|
2139
|
-
setup: function(t,
|
|
2140
|
-
return
|
|
3218
|
+
props: yl,
|
|
3219
|
+
setup: function(t, o) {
|
|
3220
|
+
return Te({
|
|
2141
3221
|
props: t,
|
|
2142
|
-
context:
|
|
2143
|
-
template:
|
|
3222
|
+
context: o,
|
|
3223
|
+
template: ml
|
|
2144
3224
|
});
|
|
2145
3225
|
}
|
|
2146
|
-
}),
|
|
2147
|
-
|
|
3226
|
+
}), gl = "3.21.0";
|
|
3227
|
+
ee.model = {
|
|
2148
3228
|
prop: "modelValue",
|
|
2149
3229
|
event: "update:modelValue"
|
|
2150
3230
|
};
|
|
2151
|
-
|
|
2152
|
-
e.component(
|
|
3231
|
+
ee.install = function(e) {
|
|
3232
|
+
e.component(ee.name, ee);
|
|
2153
3233
|
};
|
|
2154
|
-
|
|
3234
|
+
ee.version = gl;
|
|
2155
3235
|
export {
|
|
2156
|
-
|
|
3236
|
+
ee as I
|
|
2157
3237
|
};
|