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