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