@opentiny/tiny-robot 0.3.0-alpha.8 → 0.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index6.js DELETED
@@ -1,2352 +0,0 @@
1
- import { x as V, az as je, S as ce, b as Te, s as X, aA as Re, m as Y, Z as H, n as ye, O as Ge, j as Ke, _ as Xe, aa as Ye, a0 as Je, c as qe, a2 as Ze, d as R, f as me, p as De, $ as Ee, g as W, h as Be, i as Qe } from "./index7.js";
2
- import { T as Le } from "./index2.js";
3
- import * as et from "vue";
4
- import { createElementBlock as g, openBlock as p, createElementVNode as b, resolveComponent as E, createBlock as M, Transition as ae, withCtx as D, withDirectives as ie, withModifiers as le, normalizeClass as U, createVNode as L, createCommentVNode as v, normalizeStyle as tt, renderSlot as k, toDisplayString as O, vShow as he, resolveDirective as nt, mergeProps as J, Fragment as re, resolveDynamicComponent as N, createTextVNode as q, withKeys as ot, renderList as at } from "vue";
5
- import { i as _e } from "./close.js";
6
- import { B as it } from "./index5.js";
7
- let lt = 1;
8
- const rt = ({
9
- onMounted: e,
10
- onBeforeUnmount: t,
11
- watch: n,
12
- vm: o,
13
- api: a,
14
- props: i,
15
- state: l,
16
- nextTick: s
17
- }) => {
18
- e(() => {
19
- o._popupId = `popup-${lt++}`, V.register(o._popupId, o);
20
- }), t(() => {
21
- V.deregister(o._popupId), V.closeModal(o._popupId);
22
- }), n(
23
- () => i.visible,
24
- (r) => {
25
- if (r) {
26
- if (o._opening)
27
- return;
28
- l.rendered ? a.open() : (l.rendered = !0, s(() => {
29
- a.open();
30
- }));
31
- } else
32
- a.close();
33
- }
34
- );
35
- }, st = ({ state: e, vm: t }) => (n) => {
36
- e.rendered || (e.rendered = !0);
37
- const o = je({}, t.$props || t, n);
38
- t._closeTimer && (clearTimeout(t._closeTimer), t._closeTimer = null), clearTimeout(t._openTimer);
39
- const a = () => {
40
- if (ce || e.opened)
41
- return;
42
- t._opening = !0;
43
- const l = t.$el, s = o.modal, r = o.zIndex;
44
- r && (V.zIndex = r), s && (t._closing && (V.closeModal(t._popupId), t._closing = !1), V.openModal(
45
- t._popupId,
46
- V.nextZIndex(),
47
- o.modalAppendToBody ? void 0 : l,
48
- o.modalClass,
49
- o.modalFade
50
- ), o.lockScroll && (V.fixBodyBorder(), Te(document.body, V.popLockClass))), getComputedStyle(l).position === "static" && (l.style.position = "absolute"), l.style.zIndex = V.nextZIndex().toString(), e.opened = !0, t._opening = !1;
51
- }, i = Number(o.openDelay);
52
- i > 0 ? t._openTimer = setTimeout(() => {
53
- t._openTimer = null, a();
54
- }, i) : a();
55
- }, ut = ({ state: e, vm: t }) => () => {
56
- t._openTimer !== null && (clearTimeout(t._openTimer), t._openTimer = null), clearTimeout(t._closeTimer);
57
- const n = () => {
58
- t._closing = !0, e.opened = !1, V.closeModal(t._popupId), t._closing = !1;
59
- }, o = Number(t.closeDelay);
60
- o > 0 ? t._closeTimer = setTimeout(() => {
61
- t._closeTimer = null, n();
62
- }, o) : n();
63
- }, dt = (e) => {
64
- const { api: t, nextTick: n, onBeforeUnmount: o, onMounted: a, props: i, reactive: l, toRefs: s, vm: r, watch: u } = e, f = l({
65
- opened: !1,
66
- rendered: !1
67
- });
68
- rt({ onMounted: a, onBeforeUnmount: o, watch: u, vm: r, api: t, props: i, state: f, nextTick: n });
69
- const c = st({ state: f, vm: r }), d = ut({ state: f, vm: r });
70
- return { open: c, close: d, PopupManager: V, ...s(f) };
71
- };
72
- var pt = Object.defineProperty, ft = Object.defineProperties, ct = Object.getOwnPropertyDescriptors, be = Object.getOwnPropertySymbols, yt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable, Se = (e, t, n) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t) => {
73
- for (var n in t || (t = {}))
74
- yt.call(t, n) && Se(e, n, t[n]);
75
- if (be)
76
- for (var n of be(t))
77
- mt.call(t, n) && Se(e, n, t[n]);
78
- return e;
79
- }, Ae = (e, t) => ft(e, ct(t)), gt = {
80
- xmlns: "http://www.w3.org/2000/svg",
81
- viewBox: "0 0 16 16",
82
- style: {
83
- "enable-background": "new 0 0 16 16"
84
- },
85
- "xml:space": "preserve"
86
- }, vt = /* @__PURE__ */ b(
87
- "rect",
88
- {
89
- style: {
90
- fill: "none"
91
- }
92
- },
93
- null,
94
- -1
95
- /* HOISTED */
96
- ), ht = /* @__PURE__ */ b(
97
- "path",
98
- {
99
- d: "m3.49 5.21.72.72-.23.18c-.16.13-.3.27-.46.4l-.25.23c-.39.39-.75.79-1.05 1.2L2.16 8l-.05.06-.17.24.28.38.19.24c.33.4.7.8 1.1 1.19l.18.16c1.32 1.18 2.78 1.87 4.32 1.87h.23c.61-.02 1.21-.17 1.78-.4l.76.76-.22.1c-.81.35-1.67.55-2.56.55h-.22c-1.81-.06-3.47-.92-4.95-2.29l-.27-.25c-.42-.42-.81-.86-1.15-1.3l-.04-.09-.05-.06-.17-.24-.14-.19-.1-.16-.04-.07a.5.5 0 0 1 0-.38l.04-.08.1-.16.13-.19.17-.24.1-.13.21-.27c.35-.44.76-.87 1.2-1.28.22-.19.44-.39.67-.56zm.27-2.35h.07c.1.01.19.06.28.15l1.12 1.12c.88-.42 1.8-.65 2.77-.65h.23c1.81.06 3.47.92 4.95 2.29l.27.25c.42.42.81.86 1.15 1.3l.05.07.05.06.17.24.13.19.1.16.04.07c.05.12.05.25.01.38l-.05.09-.1.16-.13.19-.17.25-.1.13-.2.27c-.35.44-.76.87-1.2 1.28l-.24.22c-.13.12-.28.24-.42.35l.79.79.05.06c.15.19.13.47-.05.65l-.06.05c-.19.15-.47.13-.65-.05l-.94-.93-.73-.73-1.33-1.33-.21-.22-6-6.01-.05-.06c-.15-.2-.14-.47.05-.66a.52.52 0 0 1 .35-.13zM5.3 7.02l.78.78-.03.12c-.03.13-.04.25-.04.38v.12c.05 1.06.92 1.88 1.99 1.88h.13c.13-.01.25-.04.39-.06l.78.78-.15.06c-.35.15-.74.23-1.14.23h-.14a2.993 2.993 0 0 1-2.86-2.99c-.02-.48.09-.91.29-1.3zM8 4.47h-.22c-.62.03-1.21.16-1.79.4l.73.73c.39-.18.82-.29 1.3-.29h.15c1.59.07 2.86 1.38 2.86 2.99v.17c-.02.4-.12.79-.29 1.13l1.09 1.09c.23-.18.46-.38.69-.59l.24-.23c.39-.39.75-.79 1.05-1.2l.05-.06.05-.06.18-.25-.28-.38-.19-.24c-.33-.4-.7-.8-1.1-1.19l-.18-.16C10.98 5.16 9.54 4.47 8 4.47zM8 6.3h-.13c-.14.02-.26.03-.38.06l2.45 2.45c.05-.17.07-.34.07-.52v-.12A2.02 2.02 0 0 0 8 6.3z"
100
- },
101
- null,
102
- -1
103
- /* HOISTED */
104
- ), bt = [vt, ht];
105
- function St(e, t) {
106
- return p(), g("svg", gt, [].concat(bt));
107
- }
108
- var wt = {
109
- render: St
110
- }, Ct = function() {
111
- return X({
112
- name: "IconEyeclose",
113
- component: wt
114
- })();
115
- }, Ot = {
116
- xmlns: "http://www.w3.org/2000/svg",
117
- viewBox: "0 0 16 16",
118
- style: {
119
- "enable-background": "new 0 0 16 16"
120
- },
121
- "xml:space": "preserve"
122
- }, It = /* @__PURE__ */ b(
123
- "rect",
124
- {
125
- style: {
126
- fill: "none"
127
- }
128
- },
129
- null,
130
- -1
131
- /* HOISTED */
132
- ), Mt = /* @__PURE__ */ b(
133
- "path",
134
- {
135
- class: "eyeopen_svg__st1",
136
- 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"
137
- },
138
- null,
139
- -1
140
- /* HOISTED */
141
- ), Vt = [It, Mt];
142
- function $t(e, t) {
143
- return p(), g("svg", Ot, [].concat(Vt));
144
- }
145
- var kt = {
146
- render: $t
147
- }, Tt = function() {
148
- return X({
149
- name: "IconEyeopen",
150
- component: kt
151
- })();
152
- }, Dt = {
153
- xmlns: "http://www.w3.org/2000/svg",
154
- viewBox: "0 0 24 24",
155
- "xml:space": "preserve"
156
- }, Et = /* @__PURE__ */ b(
157
- "path",
158
- {
159
- class: "fullscreen_svg__st0",
160
- 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"
161
- },
162
- null,
163
- -1
164
- /* HOISTED */
165
- ), Bt = [Et];
166
- function Lt(e, t) {
167
- return p(), g("svg", Dt, [].concat(Bt));
168
- }
169
- var _t = {
170
- render: Lt
171
- }, At = function() {
172
- return X({
173
- name: "IconFullscreen",
174
- component: _t
175
- })();
176
- }, xt = {
177
- xmlns: "http://www.w3.org/2000/svg",
178
- viewBox: "0 0 24 24",
179
- "xml:space": "preserve"
180
- }, Pt = /* @__PURE__ */ b(
181
- "path",
182
- {
183
- class: "minscreen_svg__st0",
184
- 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"
185
- },
186
- null,
187
- -1
188
- /* HOISTED */
189
- ), Nt = [Pt];
190
- function zt(e, t) {
191
- return p(), g("svg", xt, [].concat(Nt));
192
- }
193
- var Ft = {
194
- render: zt
195
- }, Ht = function() {
196
- return X({
197
- name: "IconMinscreen",
198
- component: Ft
199
- })();
200
- };
201
- const Wt = `
202
- height:0 !important;visibility:hidden !important;overflow:hidden !important;
203
- position:absolute !important;z-index:-1000 !important;top:0 !important;right:0 !important
204
- `, Ut = [
205
- "width",
206
- "line-height",
207
- "padding-top",
208
- "padding-bottom",
209
- "padding-left",
210
- "padding-right",
211
- "border-width",
212
- "box-sizing",
213
- "letter-spacing",
214
- "font-family",
215
- "font-weight",
216
- "font-size",
217
- "text-rendering",
218
- "text-transform",
219
- "text-indent"
220
- ], T = {
221
- BoxSizing: "box-sizing",
222
- BorderBox: "border-box",
223
- ContentBox: "content-box",
224
- PaddingTop: "padding-top",
225
- PaddingBottom: "padding-bottom",
226
- BorderTopWidth: "border-top-width",
227
- BorderBottomWidth: "border-bottom-width"
228
- }, jt = (e) => /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(e), Rt = (e) => () => {
229
- if (e.inputDisabled)
230
- return !1;
231
- e.boxVisibility = !0;
232
- }, Gt = ({ props: e }) => () => ({
233
- textAlign: e.textAlign
234
- }), Kt = () => (e) => {
235
- const t = window.getComputedStyle(e), n = t.getPropertyValue(T.BoxSizing), o = parseFloat(t.getPropertyValue(T.PaddingBottom)) + parseFloat(t.getPropertyValue(T.PaddingTop)), a = parseFloat(t.getPropertyValue(T.BorderBottomWidth)) + parseFloat(t.getPropertyValue(T.BorderTopWidth));
236
- return { contextStyle: Ut.map((l) => `${l}:${t.getPropertyValue(l)}`).join(";"), paddingSize: o, borderSize: a, boxSizing: n };
237
- }, Xt = ({
238
- api: e,
239
- hiddenTextarea: t,
240
- props: n,
241
- state: o,
242
- mode: a,
243
- constants: i
244
- }) => (l, s = 1, r = null) => {
245
- if (!l)
246
- return {
247
- minHeight: "",
248
- height: ""
249
- };
250
- t || (t = document.createElement("textarea"), document.body.appendChild(t));
251
- const { paddingSize: u, borderSize: f, boxSizing: c, contextStyle: d } = e.calculateNodeStyling(l);
252
- t.setAttribute("style", `${d};${Wt}`), t.value = l.value || l.placeholder || "";
253
- let m = t.scrollHeight;
254
- const C = {};
255
- a === "mobile" && (m = Math.max(t.scrollHeight, i.TEXTAREA_HEIGHT_MOBILE)), c === T.BorderBox ? m = m + f * 2 + u : c === T.ContentBox && (m = m - u), t.value = "";
256
- const I = t.scrollHeight - u;
257
- if (s !== null) {
258
- let y = I * s;
259
- c === T.BorderBox && (y = y + u + f), (n.size || s === 1) && (y = n.size === "mini" ? y * 0.67 : n.size === "small" ? y : y * 1.17), n.height && (y = n.height), o.isDisplayOnly ? C.minHeight = "0px" : (m = Math.max(y, m), C.minHeight = `${Math.floor(y)}px`);
260
- }
261
- if (r !== null) {
262
- let y = I * r;
263
- c === T.BorderBox && (y += f + u), m = Math.min(y, m);
264
- }
265
- return C.height = `${m}px`, t.parentNode && t.parentNode.removeChild(t), t = null, C;
266
- }, Yt = (e) => () => e.$refs.input || e.$refs.textarea, Jt = (e) => () => e.getInput().blur(), qt = (e) => () => e.getInput().focus(), Zt = (e) => () => e.getInput().select(), Qt = ({
267
- api: e,
268
- componentName: t,
269
- eventName: n,
270
- emit: o,
271
- props: a,
272
- state: i,
273
- vm: l
274
- }) => (s) => {
275
- i.focused = !1, o("blur", s), e.isMemoryStorage.value = !1, a.validateEvent && e.dispatch(t, n, [a.modelValue]), a.hoverExpand && (l.$refs.textarea.scrollTop = 0);
276
- }, en = ({ api: e, emit: t, state: n }) => (o) => {
277
- n.focused = !0, t("focus", o), e.searchMemory(o.target.value);
278
- }, tn = ({ api: e, emit: t, nextTick: n, state: o }) => (a) => {
279
- o.isComposing || a.target.value !== o.nativeInputValue && (t("update:modelValue", a.target.value), t("input", a), e.searchMemory(a.target.value), n(e.setNativeInputValue));
280
- }, nn = (e) => (t) => e("change", t.target.value), on = ({ api: e, parent: t, vm: n, state: o, props: a }) => () => {
281
- if (ce)
282
- return;
283
- const { autosize: i, type: l } = t;
284
- if (l !== "textarea" || !n.$refs.textarea)
285
- return;
286
- if (a.hoverExpand && !o.enteredTextarea) {
287
- o.textareaCalcStyle = {
288
- minHeight: o.textareaHeight,
289
- height: o.textareaHeight
290
- };
291
- return;
292
- }
293
- if (!i || o.isDisplayOnly) {
294
- o.textareaCalcStyle = {
295
- minHeight: e.calcTextareaHeight(n.$refs.textarea).minHeight
296
- };
297
- return;
298
- }
299
- const s = i.minRows, r = i.maxRows;
300
- o.textareaCalcStyle = e.calcTextareaHeight(n.$refs.textarea, s, r);
301
- }, an = ({ api: e, state: t }) => () => {
302
- const n = e.getInput();
303
- n && n.value !== t.nativeInputValue && (n.value = t.nativeInputValue);
304
- }, ln = (e) => () => e.isComposing = !0, rn = (e) => (t) => {
305
- const n = t.target.value, o = n[n.length - 1] || "";
306
- e.isComposing = !jt(o);
307
- }, sn = ({ api: e, state: t }) => (n) => {
308
- t.isComposing && (t.isComposing = !1, e.handleInput(n));
309
- }, un = ({ vm: e, parent: t }) => (n) => {
310
- const o = e.$refs[n] ? [e.$refs[n]] : [];
311
- if (!o.length)
312
- return;
313
- let a = null;
314
- for (let s = 0, r = o.length; s < r; s++)
315
- if (o[s].parentNode === t.$el) {
316
- a = o[s];
317
- break;
318
- }
319
- if (!a)
320
- return;
321
- const l = { suffix: "append", prefix: "prepend" }[n];
322
- if (t.$slots[l]) {
323
- const s = e.$refs[l];
324
- let r;
325
- n === "suffix" ? r = `translateX(-${s.offsetWidth}px) translateY(-50%)` : n === "prefix" && (r = `translate(${s.offsetWidth}px, -50%)`), a.style.transform = r;
326
- } else
327
- a.removeAttribute("style");
328
- }, dn = (e) => () => {
329
- e.calcIconOffset("prefix"), e.calcIconOffset("suffix");
330
- }, pn = (e) => () => {
331
- e("update:modelValue", ""), e("change", ""), e("clear");
332
- }, fn = ({ api: e, nextTick: t, state: n }) => () => {
333
- n.passwordVisible = !n.passwordVisible, t(e.focus);
334
- }, cn = ({ parent: e, props: t, state: n }) => () => e.$slots.suffix || t.suffixIcon || n.showClear || t.showPassword || n.isWordLimitVisible || n.validateState && n.needStatusIcon || t.mask && n.inputDisabled, yn = (e) => typeof e == "number" ? String(e).length : (e || "").length, mn = ({ emit: e, props: t, state: n }) => (o) => {
335
- if (t.isSelect) {
336
- e("update:modelValue", o), e("change", o);
337
- const a = t.selectMenu.length && t.selectMenu.filter((i) => i.id === o).shift();
338
- n.checkedLabel = a ? a.label : "";
339
- }
340
- }, gn = (e) => () => {
341
- const t = e.getInput();
342
- return t && t.selectionStart !== t.selectionEnd;
343
- }, vn = ({ state: e, props: t }) => (n, o) => {
344
- if (o === "textarea" && t.popupMore)
345
- return;
346
- const a = o === "textarea" ? n.target.querySelector(".text-box") : n.target;
347
- if (e.displayOnlyTooltip = "", !a)
348
- return;
349
- if (a.scrollWidth > a.offsetWidth || o === "textarea" && a.scrollHeight > a.offsetHeight)
350
- e.displayOnlyTooltip = t.displayOnlyContent || e.nativeInputValue;
351
- else {
352
- let l = !1;
353
- if (t.mask && e.maskValueVisible) {
354
- const s = a.textContent, r = window.getComputedStyle(a).font, u = a.getBoundingClientRect(), f = 31, c = (s == null ? void 0 : s.trim()) || "";
355
- l = Re(c, r, u.width - f).o;
356
- }
357
- l && (e.displayOnlyTooltip = t.displayOnlyContent || e.nativeInputValue);
358
- }
359
- }, hn = ({ state: e, props: t }) => () => {
360
- let n = "";
361
- const o = t.displayOnlyContent || e.nativeInputValue;
362
- for (let a = 0; a < o.length; a++)
363
- n += "*";
364
- return n;
365
- }, bn = ({ state: e }) => () => e.maskValueVisible ? e.nativeInputValue : e.nativeInputValue && e.maskSymbol, Sn = ({ state: e, props: t, nextTick: n, vm: o }) => (a) => {
366
- n(() => {
367
- const i = o.$refs.input;
368
- t.mask && e.nativeInputValue && i && (i.value = e.maskValueVisible || !e.inputDisabled ? e.nativeInputValue : e.maskSymbol), a === "mask" && !t.mask && i && (i.value = e.nativeInputValue);
369
- });
370
- }, wn = ({ api: e, state: t, props: n, nextTick: o }) => () => {
371
- t.isDragging || n.hoverExpand && !t.isDisplayOnly && (t.enteredTextarea = !0, o(e.resizeTextarea));
372
- }, Cn = ({ api: e, state: t, props: n, nextTick: o, vm: a }) => () => {
373
- t.isDragging || n.hoverExpand && !t.isDisplayOnly && (t.enteredTextarea = !1, o(() => {
374
- e.resizeTextarea(), a.$refs.textarea.scrollTop = 0;
375
- }));
376
- }, On = ({ parent: e, state: t, props: n }) => () => {
377
- const o = n.displayOnlyContent || t.nativeInputValue;
378
- return (typeof n.showEmptyValue == "boolean" ? n.showEmptyValue : (e.tinyForm || {}).showEmptyValue) ? o : o || "-";
379
- }, In = ({ state: e, vm: t }) => (n) => {
380
- e.timer && clearTimeout(e.timer), e.timer = setTimeout(() => {
381
- const o = t.$refs && t.$refs.textBox;
382
- if (o)
383
- if (n && o.offsetHeight === 0) {
384
- let a = o.cloneNode(!0);
385
- a.style.visibility = "hidden", a.style.position = "absolute", a.style.left = "-9999px", document.body.appendChild(a), a.scrollHeight > a.offsetHeight && (e.showMoreBtn = !0), document.body.removeChild(a), a = null;
386
- } else o.scrollHeight > o.offsetHeight ? e.showMoreBtn = !0 : e.showMoreBtn = !1;
387
- }, 100);
388
- }, Mn = ({ state: e }) => () => e.isDragging = !0, Vn = ({ state: e, api: t }) => (n) => {
389
- e.isDragging = !1, n && t.handleLeaveTextarea();
390
- }, $n = (e) => (e && e.preventDefault ? e.preventDefault() : window.event.returnValue = !1, !1), kn = ({ emit: e, state: t }) => (n) => {
391
- t.hoverValue = "", e("selected", n);
392
- }, Tn = ({ emit: e, props: t, state: n }) => () => {
393
- const o = window.event.keyCode, a = t.localstorageData.indexOf(n.hoverValue), i = t.localstorageData.length - 1;
394
- if (o === Y.ArrowUp && t.isMemoryStorage)
395
- return a > 0 && a <= i ? n.hoverValue = t.localstorageData[a - 1] : n.hoverValue = t.localstorageData[i], !1;
396
- if (o === Y.ArrowDown && t.isMemoryStorage)
397
- return a >= 0 && a < i ? n.hoverValue = t.localstorageData[a + 1] : n.hoverValue = t.localstorageData[0], !1;
398
- o === Y.NumpadEnter && t.isMemoryStorage && n.hoverValue && n.hoverValue.length > 0 && e("selected", n.hoverValue);
399
- }, Dn = (e, t = 5) => {
400
- const n = e.length;
401
- let o = [], a = {};
402
- for (let i = 0, l = 1; l <= t && !(i < 0 || i >= n || (a[e[i]] ? l = l - 1 : (a[e[i]] = !0, o.push(e[i])), l === n)); l++)
403
- i++;
404
- return o;
405
- }, xe = (e, t) => {
406
- if (typeof e == "string")
407
- try {
408
- const n = JSON.parse(e);
409
- return !!(typeof n == "object" && n && (!t || n.constructor === t));
410
- } catch {
411
- return !1;
412
- }
413
- }, En = (e, t, n = 5) => {
414
- if (typeof t == "string") {
415
- const o = localStorage.getItem(e), a = xe(o, Array);
416
- let i = "";
417
- if (o && a) {
418
- let l = JSON.parse(localStorage.getItem(e));
419
- l.unshift(t), l = Dn(l, n), i = JSON.stringify(l);
420
- } else o === null || o === t ? i = JSON.stringify([t]) : i = JSON.stringify([t, o]);
421
- localStorage.setItem(e, i);
422
- }
423
- }, Bn = (e) => (t) => {
424
- e.name && (t != null && t.trim()) && En(e.name, t, e.memorySpace);
425
- }, Ln = ({ props: e, state: t }) => (n) => {
426
- if (!e.name)
427
- return;
428
- const o = localStorage.getItem(e.name);
429
- let a = [], i = !0;
430
- if (xe(o)) {
431
- const l = JSON.parse(o);
432
- if (!n)
433
- a = JSON.parse(o);
434
- else
435
- for (let s = 0, r = l.length; s < r; s++)
436
- l[s].includes(n) && a.push(l[s]);
437
- a.length === 0 && (i = !1);
438
- } else
439
- o === null ? i = !1 : a.push(o);
440
- t.storageData = a, t.isMemoryStorage = i;
441
- }, _n = ({ api: e, state: t }) => (n) => {
442
- e.getInput().value = n, e.handleInput({ target: { value: n } }), e.handleChange({ target: { value: n } }), t.isMemoryStorage = !1;
443
- };
444
- var An = ({ api: e, props: t, reactive: n, toRefs: o }) => {
445
- const a = n({
446
- storageData: [],
447
- isMemoryStorage: !1
448
- });
449
- return Ae(j({}, o(a)), {
450
- addMemory: Bn(t),
451
- searchMemory: Ln({ props: t, state: a }),
452
- selectedMemory: _n({ api: e, state: a })
453
- });
454
- };
455
- const xn = [
456
- "blur",
457
- "showBox",
458
- "clear",
459
- "focus",
460
- "state",
461
- "select",
462
- "getInput",
463
- "handleBlur",
464
- "handleInput",
465
- "handleFocus",
466
- "handleChange",
467
- "calcIconOffset",
468
- "resizeTextarea",
469
- "getSuffixVisible",
470
- "updateIconOffset",
471
- "calcTextareaHeight",
472
- "setNativeInputValue",
473
- "calculateNodeStyling",
474
- "handleCompositionEnd",
475
- "handlePasswordVisible",
476
- "handleCompositionStart",
477
- "handleCompositionUpdate",
478
- "addMemory",
479
- "searchMemory",
480
- "selectedMemory",
481
- "storageData",
482
- "isMemoryStorage",
483
- "hasSelection",
484
- "handleEnterDisplayOnlyContent",
485
- "hiddenPassword",
486
- "inputStyle",
487
- "handleEnterTextarea",
488
- "handleLeaveTextarea",
489
- "handleTextareaMouseDown",
490
- "handleTextareaMouseUp"
491
- ], Pn = ({
492
- reactive: e,
493
- computed: t,
494
- mode: n,
495
- props: o,
496
- parent: a,
497
- constants: i,
498
- api: l,
499
- vm: s,
500
- designConfig: r
501
- }) => {
502
- const u = e({
503
- mode: n,
504
- maskSymbol: i.MASKSYMBOL,
505
- focused: !1,
506
- hovering: !1,
507
- isComposing: !1,
508
- passwordVisible: !1,
509
- maskValueVisible: !1,
510
- boxVisibility: !1,
511
- textareaCalcStyle: {},
512
- checkedLabel: "",
513
- enteredTextarea: !1,
514
- sheetvalue: o.modelValue,
515
- inputSize: t(() => o.size || u.formItemSize || (a.tinyForm || {}).size),
516
- inputSizeMf: t(() => o.size || u.formItemSize || (a.tinyForm || {}).size),
517
- showClear: t(
518
- () => {
519
- var f;
520
- return o.clearable && !u.inputDisabled && !o.readonly && u.nativeInputValue && (!((f = r == null ? void 0 : r.options) != null && f.isCloseIconHide) || u.focused || u.hovering);
521
- }
522
- ),
523
- textareaHeight: s.theme === "saas" ? "28px" : "30px",
524
- upperLimit: t(() => a.$attrs.maxlength),
525
- textLength: t(() => yn(o.modelValue)),
526
- inputExceed: t(() => u.isWordLimitVisible && u.textLength > u.upperLimit),
527
- formItemSize: t(() => (a.formItem || {}).formItemSize),
528
- validateIcon: t(() => i.VALIDATE_ICON[u.validateState]),
529
- showWordLimit: t(() => o.showWordLimit && a.$attrs.maxlength),
530
- inputDisabled: t(
531
- () => o.disabled || (a.tinyForm || {}).disabled || u.isDisplayOnly || (a.tinyForm || {}).displayOnly
532
- ),
533
- validateState: t(() => a.formItem ? a.formItem.validateState : ""),
534
- inputStyle: t(() => l.inputStyle()),
535
- textareaStyle: t(() => Ae(j({}, u.textareaCalcStyle), {
536
- resize: o.resize,
537
- textAlign: o.textAlign
538
- })),
539
- needStatusIcon: t(() => a.tinyForm ? a.tinyForm.statusIcon : !1),
540
- showPwdVisible: t(
541
- () => o.showPassword && !u.inputDisabled && !o.readonly && (!!u.nativeInputValue || u.focused)
542
- ),
543
- nativeInputValue: t(
544
- () => o.modelValue === null || o.modelValue === void 0 ? "" : String(o.modelValue)
545
- ),
546
- tooltipConfig: t(() => a.tinyForm ? a.tinyForm.tooltipConfig : {}),
547
- isWordLimitVisible: t(
548
- () => (o.showWordLimit && a.$attrs.maxlength || o.counter) && (a.type === "text" || a.type === "textarea") && !u.inputDisabled && !o.readonly && !o.showPassword
549
- ),
550
- isDisplayOnly: t(
551
- () => (o.displayOnly || (a.tinyForm || {}).displayOnly) && ["text", "textarea", "password", "number"].includes(o.type)
552
- ),
553
- displayOnlyTooltip: "",
554
- showMoreBtn: !1,
555
- showDisplayOnlyBox: !1,
556
- timer: null,
557
- hiddenPassword: t(() => l.hiddenPassword()),
558
- displayedMaskValue: t(() => l.getDisplayedMaskValue()),
559
- displayOnlyText: t(() => l.getDisplayOnlyText()),
560
- isDragging: !1
561
- });
562
- return u;
563
- }, Nn = ({
564
- api: e,
565
- state: t,
566
- dispatch: n,
567
- broadcast: o,
568
- emit: a,
569
- vm: i,
570
- props: l,
571
- parent: s,
572
- nextTick: r
573
- }) => {
574
- Object.assign(e, {
575
- state: t,
576
- dispatch: n,
577
- broadcast: o,
578
- showBox: Rt(t),
579
- clear: pn(a),
580
- getInput: Yt(i),
581
- setShowMoreBtn: In({ state: t, vm: i }),
582
- handleChange: nn(a),
583
- watchFormSelect: mn({ emit: a, props: l, state: t }),
584
- calcIconOffset: un({ vm: i, parent: s }),
585
- getSuffixVisible: cn({ parent: s, props: l, state: t }),
586
- calculateNodeStyling: Kt(),
587
- handleCompositionStart: ln(t),
588
- handleCompositionUpdate: rn(t),
589
- setInputDomValue: Sn({ state: t, props: l, nextTick: r, vm: i }),
590
- getDisplayOnlyText: On({ parent: s, props: l, state: t }),
591
- handleEnterTextarea: wn({ api: e, state: t, props: l, nextTick: r }),
592
- handleLeaveTextarea: Cn({ api: e, state: t, props: l, nextTick: r, vm: i }),
593
- inputStyle: Gt({ props: l }),
594
- handleTextareaMouseDown: Mn({ state: t }),
595
- handleTextareaMouseUp: Vn({ state: t, api: e })
596
- });
597
- }, zn = ({
598
- storages: e,
599
- api: t,
600
- componentName: n,
601
- props: o,
602
- emit: a,
603
- eventName: i,
604
- nextTick: l,
605
- parent: s,
606
- state: r,
607
- vm: u,
608
- mode: f,
609
- constants: c
610
- }) => {
611
- const { storageData: d, isMemoryStorage: m, addMemory: C, searchMemory: I, selectedMemory: y } = e;
612
- return Object.assign(t, {
613
- addMemory: C,
614
- storageData: d,
615
- searchMemory: I,
616
- selectedMemory: y,
617
- isMemoryStorage: m,
618
- blur: Jt(t),
619
- focus: qt(t),
620
- select: Zt(t),
621
- handleBlur: Qt({
622
- api: t,
623
- componentName: n,
624
- emit: a,
625
- eventName: i.blur,
626
- props: o,
627
- state: r,
628
- vm: u
629
- }),
630
- handleFocus: en({ api: t, emit: a, state: r }),
631
- handleInput: tn({ api: t, emit: a, nextTick: l, state: r }),
632
- resizeTextarea: on({ api: t, parent: s, vm: u, state: r, props: o }),
633
- updateIconOffset: dn(t),
634
- calcTextareaHeight: Xt({
635
- api: t,
636
- hiddenTextarea: null,
637
- props: o,
638
- state: r,
639
- mode: f,
640
- constants: c
641
- }),
642
- setNativeInputValue: an({ api: t, state: r }),
643
- handleCompositionEnd: sn({ api: t, state: r }),
644
- handlePasswordVisible: fn({ api: t, nextTick: l, state: r }),
645
- hasSelection: gn(t),
646
- handleEnterDisplayOnlyContent: vn({ state: r, props: o }),
647
- hiddenPassword: hn({ state: r, props: o }),
648
- getDisplayedMaskValue: bn({ state: r })
649
- });
650
- }, Fn = ({
651
- watch: e,
652
- state: t,
653
- api: n,
654
- props: o,
655
- nextTick: a,
656
- emit: i,
657
- componentName: l,
658
- eventName: s
659
- }) => {
660
- e(
661
- () => o.modelValue,
662
- (r) => {
663
- t.mode === "mobile" && (t.sheetvalue = r, i("update:modelValue", r)), a(n.resizeTextarea), o.validateEvent && n.dispatch(l, s.change, [r]), o.type === "textarea" && o.popupMore && t.isDisplayOnly && n.setShowMoreBtn(), n.setInputDomValue();
664
- }
665
- ), e(() => t.maskValueVisible, n.setInputDomValue), e(() => t.inputDisabled, n.setInputDomValue), e(
666
- () => o.mask,
667
- () => {
668
- n.setInputDomValue("mask");
669
- }
670
- ), e(
671
- () => o.size,
672
- () => a(n.resizeTextarea)
673
- ), e(
674
- () => t.nativeInputValue,
675
- () => {
676
- n.setNativeInputValue();
677
- }
678
- ), e(
679
- () => o.type,
680
- () => {
681
- a(() => {
682
- n.setNativeInputValue(), n.resizeTextarea(), n.updateIconOffset();
683
- });
684
- }
685
- ), e(
686
- () => t.isDisplayOnly,
687
- () => {
688
- a(() => {
689
- n.setNativeInputValue(), n.resizeTextarea(), n.updateIconOffset();
690
- });
691
- }
692
- ), e(
693
- () => t.sheetvalue,
694
- (r) => n.watchFormSelect(r),
695
- { immediate: !0 }
696
- );
697
- }, Hn = (e, { computed: t, onMounted: n, onBeforeUnmount: o, onUpdated: a, reactive: i, toRefs: l, watch: s, inject: r }, { vm: u, refs: f, parent: c, emit: d, constants: m, nextTick: C, broadcast: I, dispatch: y, mode: S, designConfig: $ }) => {
698
- const h = {}, x = m.COMPONENT_NAME.FormItem, ve = { change: "form.change", blur: "form.blur" }, P = Pn({ reactive: i, computed: t, mode: S, props: e, parent: c, constants: m, api: h, vm: u, designConfig: $ });
699
- Nn({ api: h, state: P, dispatch: y, broadcast: I, emit: d, props: e, parent: c, vm: u, nextTick: C });
700
- const Ue = An({ api: h, props: e, reactive: i, toRefs: l });
701
- return c.tinyForm = c.tinyForm || r("form", null), zn({ api: h, storages: Ue, componentName: x, emit: d, eventName: ve, props: e, state: P, nextTick: C, parent: c, vm: u, mode: S, constants: m }), Fn({ watch: s, state: P, api: h, props: e, nextTick: C, emit: d, componentName: x, eventName: ve }), n(() => {
702
- h.setNativeInputValue(), h.resizeTextarea(), h.updateIconOffset(), h.setInputDomValue(), y("Select", "input-mounted", u.$el), y("Tooltip", "tooltip-update", u.$el), e.type === "textarea" && e.popupMore && P.isDisplayOnly && (h.setShowMoreBtn(!0), H(window, "resize", h.setShowMoreBtn)), u.$attrs.autofocus && h.focus();
703
- }), o(() => {
704
- e.type === "textarea" && e.popupMore && P.isDisplayOnly && ye(window, "resize", h.setShowMoreBtn);
705
- }), a(() => {
706
- C(h.updateIconOffset);
707
- }), h;
708
- };
709
- var Wn = 2, A = {
710
- value: null
711
- }, Z = et.ref(""), Un = function(t) {
712
- return (t == null ? void 0 : t.textContent) && (t.scrollWidth > t.clientWidth || t.scrollHeight - t.clientHeight > Wn);
713
- }, jn = function(t) {
714
- var n;
715
- return !!(!(t == null || (n = t.boundingValue) == null) && n.always);
716
- }, Q = function(t) {
717
- var n;
718
- return (t == null || (n = t.boundingValue) == null ? void 0 : n.effect) === "dark";
719
- }, ee = function(t) {
720
- var n;
721
- return ((n = t.boundingValue) == null ? void 0 : n.placement) || "top";
722
- }, Pe = function(t) {
723
- var n = t.currentTarget;
724
- if (n.boundingValue && (jn(n) || Un(n))) {
725
- var o, a;
726
- if (!A.value) {
727
- var i;
728
- Z.value = ((i = n.boundingValue) == null ? void 0 : i.content) || n.textContent, A.value = Ge({
729
- el: document.createElement("div"),
730
- propsData: {
731
- renderContent: function() {
732
- return Ke("span", {
733
- class: "tiny-directive-tip__content"
734
- }, Z.value);
735
- },
736
- placement: ee(n),
737
- effect: Q(n) ? "dark" : "light"
738
- },
739
- component: Le
740
- });
741
- }
742
- var l = A.value, s = l.state.popperElm;
743
- Z.value = ((o = n.boundingValue) == null ? void 0 : o.content) || n.textContent, l.state.referenceElm = n, l.state.currentPlacement = ee(n), s && s.classList.replace("is-" + (Q(n) ? "light" : "dark"), "is-" + (Q(n) ? "dark" : "light")), l.show(), (a = l.state.popperJS) != null && a._options && (l.state.popperJS._options.placement = ee(n)), l.updatePopper();
744
- }
745
- }, Ne = function() {
746
- A.value && A.value.hide();
747
- }, G = function(t, n) {
748
- var o, a = n.value, i = a === void 0 ? {} : a;
749
- t.boundingValue = i, i && !((o = t.boundingValue) != null && o.listened) && (t.addEventListener("mouseenter", Pe), t.addEventListener("mouseleave", Ne), t.boundingValue.listened = !0);
750
- }, we = function(t) {
751
- var n;
752
- if ((n = t.boundingValue) != null && n.listened) {
753
- var o = A.value;
754
- o && t === o.state.referenceElm && o.state.showPopper && o.hide(), t.removeEventListener("mouseenter", Pe), t.removeEventListener("mouseleave", Ne);
755
- }
756
- }, ka = {
757
- bind: G,
758
- unbind: we,
759
- update: G,
760
- beforeMount: G,
761
- unmounted: we,
762
- updated: G
763
- }, B = [], w = "@@clickoutsideContext", _, Rn = 0;
764
- ce || (H(document, "mousedown", function(e) {
765
- _ = e, B.filter(function(t) {
766
- return t[w].mousedownTrigger;
767
- }).forEach(function(t) {
768
- return t[w].documentHandler(e, _);
769
- });
770
- }), H(document, "mouseup", function(e) {
771
- B.filter(function(t) {
772
- return !t[w].mousedownTrigger;
773
- }).forEach(function(t) {
774
- var n;
775
- return t[w].documentHandler(e, (n = t[w]) != null && n.mouseupTrigger ? e : _);
776
- }), _ = null;
777
- }));
778
- var Ce = function(t, n, o) {
779
- return function(a, i) {
780
- var l, s, r, u, f, c;
781
- a === void 0 && (a = {}), i === void 0 && (i = {});
782
- var d = o.context.popperElm || o.context.state && o.context.state.popperElm, m = ((l = i) == null || l.composedPath == null ? void 0 : l.composedPath()) || [(s = i) == null ? void 0 : s.target], C = ((r = a) == null || r.composedPath == null ? void 0 : r.composedPath()) || [(u = a) == null ? void 0 : u.target], I = m.includes(t) || C.includes(t), y = d && (m.includes(d) || C.includes(d));
783
- !((f = i) != null && f.target) || !((c = a) != null && c.target) || I || y || (n.expression && t[w].methodName && o.context[t[w].methodName] ? o.context[t[w].methodName]() : t[w].bindingFn && t[w].bindingFn());
784
- };
785
- }, Gn = {
786
- bind: function(t, n, o) {
787
- B.push(t);
788
- var a = Rn++, i = n.modifiers, l = n.expression, s = n.value, r = i || {}, u = r.mousedown, f = u === void 0 ? !1 : u, c = r.mouseup, d = c === void 0 ? !1 : c;
789
- t[w] = {
790
- id: a,
791
- documentHandler: Ce(t, n, o),
792
- methodName: l,
793
- bindingFn: s,
794
- mousedownTrigger: f,
795
- mouseupTrigger: d
796
- };
797
- },
798
- update: function(t, n, o) {
799
- var a = n.modifiers, i = n.expression, l = n.value, s = a || {}, r = s.mousedown, u = r === void 0 ? !1 : r, f = s.mouseup, c = f === void 0 ? !1 : f;
800
- t[w].documentHandler = Ce(t, n, o), t[w].methodName = i, t[w].bindingFn = l, t[w].mousedownTrigger = u, t[w].mouseupTrigger = c;
801
- },
802
- unbind: function(t) {
803
- if (t.nodeType === Node.ELEMENT_NODE) {
804
- for (var n = B.length, o = 0; o < n; o++)
805
- if (B[o][w].id === t[w].id) {
806
- B.splice(o, 1);
807
- break;
808
- }
809
- B.length === 0 && _ && (_ = null), delete t[w];
810
- }
811
- }
812
- };
813
- function ze(e, t) {
814
- for (var n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), o = []; n.nextNode(); ) {
815
- var a = n.currentNode;
816
- t(a) && o.push(a);
817
- }
818
- return o;
819
- }
820
- function Kn(e, t, n) {
821
- t.forEach(function(o) {
822
- var a = o.textContent, i = a.indexOf(n), l = a.substring(0, i), s = a.substring(i + n.length);
823
- o.textContent = l;
824
- var r = document.createElement("span");
825
- r.classList.add("tiny-hl-query-node"), r.textContent = n;
826
- var u = document.createTextNode(s);
827
- o.after(r, u);
828
- }), t.length && ge(e, n);
829
- }
830
- function Xn(e) {
831
- var t = /* @__PURE__ */ new Set();
832
- e.forEach(function(n) {
833
- var o;
834
- return t.add((o = n.parentElement) == null ? void 0 : o.parentElement);
835
- }), t.forEach(function(n) {
836
- n.innerText = n.textContent;
837
- });
838
- }
839
- function ge(e, t) {
840
- if (t) {
841
- var n = ze(e, function(o) {
842
- if (o.parentElement.classList.contains("tiny-hl-query-node"))
843
- return !1;
844
- var a = o.textContent || "";
845
- return a.includes(t);
846
- });
847
- Kn(e, n, t);
848
- }
849
- }
850
- function Yn(e) {
851
- var t = ze(e, function(n) {
852
- return n.parentElement.classList.contains("tiny-hl-query-node");
853
- });
854
- Xn(t);
855
- }
856
- var Oe = function(t, n) {
857
- t.classList.toggle("tiny-hl-query", !0);
858
- var o = n.value;
859
- ge(t, o);
860
- }, Ie = function(t) {
861
- Yn(t);
862
- }, Me = function(t, n) {
863
- var o = n.value;
864
- ge(t, o);
865
- }, Ta = {
866
- mounted: Oe,
867
- beforeUpdate: Ie,
868
- updated: Me,
869
- // vue2周期
870
- inserted: Oe,
871
- update: Ie,
872
- componentUpdated: Me
873
- }, K = "@@observevisibilityContext", Jn = function(t) {
874
- var n;
875
- return typeof t == "function" ? n = {
876
- callback: t
877
- } : n = t, n;
878
- }, Fe = function(t) {
879
- var n = t.options, o = t.instance, a = t.state;
880
- a.observer && se(a), !a.frozen && (a.options = Jn(n), a.callback = function(i, l) {
881
- a.options.callback(i, l), i && a.options.once && (a.frozen = !0, se(a));
882
- }, a.callback && a.options.throttle && (a.callback = Ye(a.options.throttleDelay || 20, a.callback)), a.observer = new IntersectionObserver(function(i) {
883
- var l = i[0];
884
- if (i.length > 1) {
885
- var s = i.find(function(r) {
886
- return r.isIntersecting;
887
- });
888
- s && (l = s);
889
- }
890
- a.callback && a.callback(l.isIntersecting, l);
891
- }, a.options.intersection), o.$nextTick(function() {
892
- a.observer && a.observer.observe(a.el);
893
- }));
894
- }, se = function(t) {
895
- t.observer && (t.observer.disconnect(), t.observer = null), t.callback && (t.callback = null);
896
- }, qn = function(t) {
897
- var n = t.el, o = t.options, a = t.instance, i = {
898
- el: n,
899
- observer: null,
900
- frozen: !1
901
- };
902
- return Fe({
903
- options: o,
904
- instance: a,
905
- state: i
906
- }), i;
907
- }, ue = function(t, n, o) {
908
- var a = n.value, i = n.instance, l = o.context;
909
- if (a) {
910
- if (typeof IntersectionObserver > "u")
911
- throw new TypeError("[TINY Error][ObserveVisibility] IntersectionObserver API is not available in your browser");
912
- i = i || l, t[K] = qn({
913
- el: t,
914
- options: a,
915
- instance: i
916
- });
917
- }
918
- }, Ve = function(t, n, o) {
919
- var a = n.value, i = n.oldValue, l = n.instance, s = o.context;
920
- if (!Xe(a, i)) {
921
- var r = t[K];
922
- if (!a) {
923
- de(t);
924
- return;
925
- }
926
- l = l || s, r ? Fe({
927
- options: a,
928
- instance: l,
929
- state: r
930
- }) : ue(t, {
931
- value: a,
932
- instance: l
933
- }, {
934
- context: s
935
- });
936
- }
937
- }, de = function(t) {
938
- var n = t[K];
939
- n && (se(n), delete t[K]);
940
- }, Da = {
941
- bind: ue,
942
- update: Ve,
943
- unbind: de,
944
- beforeMount: ue,
945
- updated: Ve,
946
- unmounted: de
947
- };
948
- const Zn = ["state", "mousedown", "selectItem"], Qn = (e, { onUnmounted: t, reactive: n, watch: o }, { emit: a }) => {
949
- const i = n({
950
- hoverValue: ""
951
- }), l = {
952
- state: i,
953
- mousedown: $n,
954
- selectItem: kn({ emit: a, state: i }),
955
- keydown: Tn({ emit: a, props: e, state: i })
956
- };
957
- return o(
958
- () => e.isMemoryStorage,
959
- (s) => !s && (i.hoverValue = ""),
960
- { immediate: !0 }
961
- ), t(() => {
962
- i.hoverValue = "", ye(document, "keydown", l.keydown);
963
- }), H(document, "keydown", l.keydown), l;
964
- }, eo = ({ constants: e, props: t }) => () => t.rightSlide ? e.DIALOG_SLIDER_RIGHT : e.DIALOG_FADE, te = (e) => isNaN(Number(e)) ? e : e + "px", to = ({ props: e, state: t, designConfig: n }) => () => {
965
- var o;
966
- let a = {}, { width: i, top: l, rightSlide: s, maxHeight: r } = e;
967
- return l === void 0 && (l = s ? "0" : (o = n == null ? void 0 : n.state) != null && o.top ? "" : "15vh"), i = te(i), l = te(l), r = te(r), t.isFull || (a.width = i, a.top = t.top || l, a.maxHeight = r, s ? (a.right = 0, a.height = "calc(100vh - " + a.top + ")") : a.left = t.left || "calc((100vw - " + i + ") / 2)"), t.dragStyle && (a = j(j({}, a), t.dragStyle), t.isFull && (a = { left: "0px", top: "0px" })), e.customStyle && (a = Object.assign(a, e.customStyle)), a;
968
- }, no = ({
969
- api: e,
970
- constants: t,
971
- emit: n,
972
- nextTick: o,
973
- parent: a,
974
- props: i,
975
- vm: l,
976
- state: s
977
- }) => (r) => {
978
- const u = a.$el;
979
- if (i.lockScroll && (r ? e.showScrollbar() : e.hideScrollbar()), s.move = !1, s.isFull = i.fullscreen, n("update:visible", r), r)
980
- s.closed = !1, n("open"), H(u, "scroll", e.updatePopper), o(() => {
981
- l.$refs.dialog.scrollTop = 0;
982
- }), i.appendToBody && document.body.appendChild(u);
983
- else if (ye(u, "scroll", e.updatePopper), s.closed || (s.emitter.emit("boxclose", i.isFormReset), n("close")), i.destroyOnClose && o(() => s.key++), i.rightSlide && s.current !== "default") {
984
- const f = `[data-tag=${t.DIALOG_BOX_DATA_TAG}]`;
985
- i.rightSlide && (u.querySelector(f).style.left = "");
986
- }
987
- }, oo = ({ api: e, parent: t, props: n }) => () => {
988
- if (n.lockScroll && n.visible && e.showScrollbar(), n.visible) {
989
- const o = t.$el;
990
- e.open(), n.appendToBody && document.body.appendChild(o);
991
- }
992
- }, ao = ({ api: e, parent: t, props: n }) => () => {
993
- const o = t.$el;
994
- e.hideScrollbar(), n.appendToBody && o && o.parentNode && o.parentNode.removeChild(o);
995
- }, io = ({ state: e }) => (t) => {
996
- e.mouseDownWrapperFlag = !1, /tiny-dialog-box__wrapper/.test(t.target.className) && t.type === "mousedown" && (e.mouseDownWrapperFlag = !0);
997
- }, lo = ({ state: e }) => (t) => {
998
- e.mouseUpWrapperFlag = !1, /tiny-dialog-box__wrapper/.test(t.target.className) && t.type === "mouseup" && (e.mouseUpWrapperFlag = !0);
999
- }, ro = ({ api: e, props: t, state: n }) => () => {
1000
- t.closeOnClickModal && n.mouseDownWrapperFlag && n.mouseUpWrapperFlag && e.handleClose("mask");
1001
- }, so = ({
1002
- api: e,
1003
- constants: t,
1004
- emit: n,
1005
- parent: o,
1006
- props: a
1007
- }) => (i = "close") => {
1008
- if (typeof a.beforeClose == "function" && a.beforeClose(i) === !1)
1009
- return;
1010
- const l = o.$el;
1011
- if (a.rightSlide) {
1012
- const s = l.querySelector(t.DIALOG_BOX_CLASS) || l;
1013
- s.style.left = "";
1014
- }
1015
- Ze(n, "before-close", e.hide) && e.hide(i);
1016
- }, uo = ({ api: e, emit: t, state: n, props: o }) => (a) => {
1017
- a !== !1 && (n.emitter.emit("boxclose", o.isFormReset), t("update:visible", !1), t("change", !1), t("close", a), n.closed = !0, e.hideScrollbar());
1018
- }, po = ({ api: e, emit: t }) => () => {
1019
- t("confirm"), e.handleClose("confirm");
1020
- }, fo = ({ api: e, emit: t }) => () => {
1021
- t("cancel"), e.handleClose("cancel");
1022
- }, co = ({ api: e, constants: t }) => () => {
1023
- e.broadcast(t.SELECT_DROPDOWN, "updatePopper"), e.broadcast(t.DROPDOWN_MENU, "updatePopper");
1024
- }, yo = (e) => () => {
1025
- e("opened");
1026
- }, mo = (e) => () => {
1027
- e("closed");
1028
- }, He = ({
1029
- vm: e,
1030
- componentList: t
1031
- }) => {
1032
- const n = e.$children;
1033
- return !n || n.length === 0 ? [] : (n.forEach((o) => {
1034
- o.$options.componentName === "Select" && t.push(o), He({ vm: o, componentList: t });
1035
- }), t);
1036
- }, go = (e) => {
1037
- He({ vm: e, componentList: [] }).forEach((t) => {
1038
- t.state.visible = !1;
1039
- });
1040
- }, vo = ({
1041
- parent: e,
1042
- props: t,
1043
- state: n,
1044
- emit: o,
1045
- vm: a
1046
- }) => (i) => {
1047
- if (!t.draggable || n.isFull)
1048
- return;
1049
- let l = a.$refs.dialog;
1050
- i.preventDefault();
1051
- let s = document.onmousemove, r = document.onmouseup, u = i.clientX - l.offsetLeft, f = i.clientY - l.offsetTop, { visibleHeight: c, visibleWidth: d } = Je();
1052
- document.onmousemove = (m) => {
1053
- m.preventDefault(), n.move || (o("drag-start", m), go(e), n.move = !0);
1054
- let C = l.offsetWidth, I = l.offsetHeight, y, S;
1055
- if (t.dragOutsideWindow) {
1056
- let $ = d - 10, h = c - 10;
1057
- y = m.clientX - u, S = m.clientY - f, y = m.clientX < 0 ? -u : y > $ ? $ : y, S = m.clientY < 0 ? -f : S > h ? h : S;
1058
- } else {
1059
- let $ = Math.max(d - C, 0), h = Math.max(c - I, 0);
1060
- y = m.clientX - u, S = m.clientY - f, y = y < 0 ? 0 : y > $ ? $ : y, S = S < 0 ? 0 : S > h ? h : S;
1061
- }
1062
- n.isFull || (n.dragStyle = { left: `${y}px`, top: `${S}px` }), n.left = `${y}px`, n.top = `${S}px`, n.emitter.emit("boxdrag"), o("drag-move", m);
1063
- }, document.onmouseup = () => {
1064
- document.onmousemove = s, document.onmouseup = r, t.draggable && n.move && o("drag-end", i), n.move = !1;
1065
- };
1066
- }, ho = (e) => () => {
1067
- Te(document.body, e);
1068
- }, bo = (e) => () => {
1069
- qe(document.body, e);
1070
- }, So = ({ state: e, emit: t, nextTick: n, vm: o }) => (a) => {
1071
- e.isFull = a, n(() => {
1072
- t("resize", { fullscreen: a, dialog: o.$refs.dialog });
1073
- });
1074
- }, wo = [
1075
- "afterEnter",
1076
- "afterLeave",
1077
- "handleClose",
1078
- "handleWrapperClick",
1079
- "useMouseEventDown",
1080
- "useMouseEventUp",
1081
- "handleCancel",
1082
- "handleConfirm",
1083
- "handleDrag",
1084
- "toggleFullScreen",
1085
- "state"
1086
- ], Co = ({
1087
- reactive: e,
1088
- computed: t,
1089
- api: n,
1090
- emitter: o,
1091
- props: a,
1092
- useBreakpoint: i
1093
- }) => {
1094
- const { current: l } = i();
1095
- return e({
1096
- emitter: o(),
1097
- key: 0,
1098
- x: null,
1099
- y: null,
1100
- top: null,
1101
- left: null,
1102
- max: null,
1103
- move: !1,
1104
- closed: !1,
1105
- dragable: !1,
1106
- isFull: a.fullscreen,
1107
- style: t(() => n.computedStyle()),
1108
- animationName: t(() => n.computedAnimationName()),
1109
- current: l,
1110
- dragStyle: null
1111
- });
1112
- }, Oo = ({ reactive: e, state: t, toRefs: n, usePopups: o }) => {
1113
- const { opened: a, rendered: i } = o;
1114
- return e(j({
1115
- opened: a,
1116
- rendered: i
1117
- }, n(t)));
1118
- }, Io = ({
1119
- emit: e,
1120
- api: t,
1121
- state: n,
1122
- parent: o,
1123
- props: a,
1124
- lockScrollClass: i,
1125
- constants: l,
1126
- usePopups: s,
1127
- nextTick: r,
1128
- broadcast: u,
1129
- designConfig: f,
1130
- vm: c
1131
- }) => {
1132
- const { open: d, close: m } = s;
1133
- Object.assign(t, {
1134
- state: n,
1135
- open: d,
1136
- close: m,
1137
- broadcast: u,
1138
- handleCancel: fo({ api: t, emit: e }),
1139
- handleConfirm: po({ api: t, emit: e }),
1140
- updatePopper: co({ api: t, constants: l }),
1141
- handleWrapperClick: ro({ api: t, props: a, state: n }),
1142
- useMouseEventDown: io({ state: n }),
1143
- useMouseEventUp: lo({ state: n }),
1144
- hide: uo({ api: t, emit: e, state: n, props: a }),
1145
- handleClose: so({ api: t, constants: l, emit: e, parent: o, props: a }),
1146
- watchVisible: no({
1147
- api: t,
1148
- constants: l,
1149
- emit: e,
1150
- nextTick: r,
1151
- parent: o,
1152
- props: a,
1153
- vm: c,
1154
- state: n
1155
- }),
1156
- computedStyle: to({ state: n, props: a, designConfig: f }),
1157
- mounted: oo({ api: t, parent: o, props: a }),
1158
- unMounted: ao({ api: t, parent: o, props: a }),
1159
- computedAnimationName: eo({ constants: l, props: a }),
1160
- afterEnter: yo(e),
1161
- afterLeave: mo(e),
1162
- hideScrollbar: bo(i),
1163
- showScrollbar: ho(i),
1164
- handleDrag: vo({ parent: o, props: a, state: n, emit: e, vm: c }),
1165
- // tiny 新增
1166
- toggleFullScreen: So({ state: n, emit: e, nextTick: r, vm: c })
1167
- });
1168
- }, Mo = ({ watch: e, state: t, api: n, props: o }) => {
1169
- e(() => o.visible, n.watchVisible), e(
1170
- () => o.fullscreen,
1171
- (a) => {
1172
- t.isFull = a;
1173
- }
1174
- );
1175
- }, Vo = (e, { computed: t, onBeforeUnmount: n, onMounted: o, toRefs: a, reactive: i, watch: l }, {
1176
- vm: s,
1177
- emitter: r,
1178
- parent: u,
1179
- emit: f,
1180
- constants: c,
1181
- nextTick: d,
1182
- mode: m,
1183
- broadcast: C,
1184
- designConfig: I,
1185
- useBreakpoint: y
1186
- }) => {
1187
- const S = {}, $ = c.SCROLL_LOCK_CLASS(m);
1188
- let h = Co({ reactive: i, computed: t, api: S, emitter: r, props: e, useBreakpoint: y });
1189
- const x = dt({
1190
- api: S,
1191
- nextTick: d,
1192
- onBeforeUnmount: n,
1193
- onMounted: o,
1194
- props: e,
1195
- reactive: i,
1196
- toRefs: a,
1197
- vm: s,
1198
- watch: l
1199
- });
1200
- return Io({
1201
- api: S,
1202
- state: h,
1203
- parent: u,
1204
- props: e,
1205
- emit: f,
1206
- constants: c,
1207
- usePopups: x,
1208
- lockScrollClass: $,
1209
- nextTick: d,
1210
- vm: s,
1211
- broadcast: C,
1212
- designConfig: I
1213
- }), h = Oo({ reactive: i, state: h, toRefs: a, usePopups: x }), Mo({ watch: l, state: h, api: S, props: e }), o(S.mounted), n(S.unMounted), S;
1214
- };
1215
- function $o(e, t) {
1216
- var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1217
- if (n) return (n = n.call(e)).next.bind(n);
1218
- if (Array.isArray(e) || (n = ko(e)) || t) {
1219
- n && (e = n);
1220
- var o = 0;
1221
- return function() {
1222
- return o >= e.length ? { done: !0 } : { done: !1, value: e[o++] };
1223
- };
1224
- }
1225
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1226
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1227
- }
1228
- function ko(e, t) {
1229
- if (e) {
1230
- if (typeof e == "string") return $e(e, t);
1231
- var n = {}.toString.call(e).slice(8, -1);
1232
- 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) ? $e(e, t) : void 0;
1233
- }
1234
- }
1235
- function $e(e, t) {
1236
- (t == null || t > e.length) && (t = e.length);
1237
- for (var n = 0, o = Array(t); n < t; n++) o[n] = e[n];
1238
- return o;
1239
- }
1240
- var To = function(t, n) {
1241
- for (var o = t.__vccOpts || t, a = $o(n), i; !(i = a()).done; ) {
1242
- var l = i.value, s = l[0], r = l[1];
1243
- o[s] = r;
1244
- }
1245
- return o;
1246
- }, Do = R({
1247
- components: {
1248
- IconClose: _e(),
1249
- IconFullscreen: At(),
1250
- IconMinscreen: Ht()
1251
- },
1252
- emits: [
1253
- "update:visible",
1254
- "change",
1255
- "before-close",
1256
- "open",
1257
- "close",
1258
- "opened",
1259
- "confirm",
1260
- "cancel",
1261
- "closed",
1262
- "drag-start",
1263
- "drag-move",
1264
- "drag-end",
1265
- // tiny 新增
1266
- "resize"
1267
- ],
1268
- props: [].concat(De, ["resize", "isFormReset", "visible", "title", "modal", "modalAppendToBody", "appendToBody", "lockScroll", "closeOnClickModal", "closeOnPressEscape", "showClose", "width", "fullscreen", "top", "center", "draggable", "dragOutsideWindow", "showHeader", "rightSlide", "destroyOnClose", "dialogClass", "beforeClose", "maxHeight", "dialogTransition", "customStyle", "noAnimation"]),
1269
- model: {
1270
- prop: "visible",
1271
- event: "update:visible"
1272
- },
1273
- provide: function() {
1274
- return {
1275
- dialog: this
1276
- };
1277
- },
1278
- setup: function(t, n) {
1279
- return me({
1280
- props: t,
1281
- context: n,
1282
- renderless: Vo,
1283
- api: wo
1284
- });
1285
- }
1286
- }), Eo = ["data-dialog-box-draggable"], Bo = {
1287
- class: "tiny-dialog-box__title"
1288
- }, Lo = {
1289
- class: "tiny-dialog-box__btn-tools"
1290
- }, _o = {
1291
- class: "tiny-dialog-box__body"
1292
- }, Ao = {
1293
- key: 1,
1294
- ref: "footer",
1295
- class: "tiny-dialog-box__footer"
1296
- };
1297
- function xo(e, t, n, o, a, i) {
1298
- var l = E("icon-fullscreen"), s = E("icon-minscreen"), r = E("icon-close");
1299
- return p(), M(ae, {
1300
- duration: e.noAnimation ? 0 : void 0,
1301
- name: e.state.animationName,
1302
- onAfterEnter: e.afterEnter,
1303
- onAfterLeave: e.afterLeave,
1304
- persisted: ""
1305
- }, {
1306
- default: D(function() {
1307
- return [ie(b(
1308
- "div",
1309
- {
1310
- class: U(["tiny-dialog-box__wrapper", e.dialogClass]),
1311
- onClick: t[4] || (t[4] = le(function() {
1312
- return e.handleWrapperClick && e.handleWrapperClick.apply(e, arguments);
1313
- }, ["self"])),
1314
- onMouseup: t[5] || (t[5] = function() {
1315
- return e.useMouseEventUp && e.useMouseEventUp.apply(e, arguments);
1316
- }),
1317
- onMousedown: t[6] || (t[6] = function() {
1318
- return e.useMouseEventDown && e.useMouseEventDown.apply(e, arguments);
1319
- })
1320
- },
1321
- [L(ae, {
1322
- name: e.dialogTransition
1323
- }, {
1324
- default: D(function() {
1325
- return [!e.destroyOnClose || e.visible ? ie((p(), g("div", {
1326
- ref: "dialog",
1327
- class: U([[{
1328
- "is-fullscreen": e.state.isFull,
1329
- "is-center": e.center,
1330
- "is-right-slide": e.rightSlide
1331
- }], "tiny-dialog-box"]),
1332
- style: tt(e.state.style),
1333
- "data-tag": "tiny-dialog-box",
1334
- "data-dialog-box-draggable": e.draggable,
1335
- key: e.state.key
1336
- }, [e.showHeader ? (p(), g(
1337
- "div",
1338
- {
1339
- key: 0,
1340
- ref: "header",
1341
- class: "tiny-dialog-box__header",
1342
- onMousedown: t[3] || (t[3] = function() {
1343
- return e.handleDrag && e.handleDrag.apply(e, arguments);
1344
- })
1345
- },
1346
- [k(e.$slots, "title", {}, function() {
1347
- return [b(
1348
- "span",
1349
- Bo,
1350
- O(e.title),
1351
- 1
1352
- /* TEXT */
1353
- )];
1354
- }), b("div", Lo, [e.resize && !e.state.isFull ? (p(), g("button", {
1355
- key: 0,
1356
- type: "button",
1357
- class: "tiny-dialog-box__headerbtn",
1358
- "aria-label": "Resize",
1359
- onClick: t[0] || (t[0] = function(u) {
1360
- return e.toggleFullScreen(!0);
1361
- })
1362
- }, [L(l, {
1363
- class: "tiny-svg-size tiny-dialog-box__resize"
1364
- })])) : v("v-if", !0), e.resize && e.state.isFull ? (p(), g("button", {
1365
- key: 1,
1366
- type: "button",
1367
- class: "tiny-dialog-box__headerbtn",
1368
- "aria-label": "Resize",
1369
- onClick: t[1] || (t[1] = function(u) {
1370
- return e.toggleFullScreen(!1);
1371
- })
1372
- }, [L(s, {
1373
- class: "tiny-svg-size tiny-dialog-box__resize"
1374
- })])) : v("v-if", !0), e.showClose ? (p(), g("button", {
1375
- key: 2,
1376
- type: "button",
1377
- class: "tiny-dialog-box__headerbtn",
1378
- "aria-label": "Close",
1379
- onClick: t[2] || (t[2] = function(u) {
1380
- return e.handleClose("close", u);
1381
- })
1382
- }, [L(r, {
1383
- class: "tiny-svg-size tiny-dialog-box__close"
1384
- })])) : v("v-if", !0)])],
1385
- 544
1386
- /* NEED_HYDRATION, NEED_PATCH */
1387
- )) : v("v-if", !0), b("div", _o, [k(e.$slots, "default")]), e.slots.footer ? (p(), g(
1388
- "div",
1389
- Ao,
1390
- [k(e.$slots, "footer", {
1391
- beforeClose: e.beforeClose
1392
- })],
1393
- 512
1394
- /* NEED_PATCH */
1395
- )) : v("v-if", !0)], 14, Eo)), [[he, e.visible]]) : v("v-if", !0)];
1396
- }),
1397
- _: 3
1398
- /* FORWARDED */
1399
- }, 8, ["name"])],
1400
- 34
1401
- /* CLASS, NEED_HYDRATION */
1402
- ), [[he, e.visible]])];
1403
- }),
1404
- _: 3
1405
- /* FORWARDED */
1406
- }, 8, ["duration", "name", "onAfterEnter", "onAfterLeave"]);
1407
- }
1408
- var ne = /* @__PURE__ */ To(Do, [["render", xo]]);
1409
- function pe() {
1410
- return pe = Object.assign ? Object.assign.bind() : function(e) {
1411
- for (var t = 1; t < arguments.length; t++) {
1412
- var n = arguments[t];
1413
- for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
1414
- }
1415
- return e;
1416
- }, pe.apply(null, arguments);
1417
- }
1418
- var Po = function(t) {
1419
- var n, o = typeof process == "object" ? (n = process.env) == null ? void 0 : n.TINY_MODE : null;
1420
- return ne;
1421
- }, No = {
1422
- DIALOG_SLIDER_RIGHT: "dialog-slideRight",
1423
- DIALOG_FADE: "dialog-fade",
1424
- SELECT_DROPDOWN: W + "SelectDropdown",
1425
- DROPDOWN_MENU: W + "DropdownMenu",
1426
- DIALOG_BOX_CLASS: "div.tiny-dialog-box",
1427
- PC_SCROLL_LOCK_CLASS: "dialog-box__scroll-lock",
1428
- MOBILE_SCROLL_LOCK_CLASS: "mobile-dialog-box__scroll-lock",
1429
- DIALOG_BOX_DATA_TAG: "tiny-dialog-box",
1430
- Mode: "pc",
1431
- SCROLL_LOCK_CLASS: function(t) {
1432
- return t === this.Mode ? this.PC_SCROLL_LOCK_CLASS : this.MOBILE_SCROLL_LOCK_CLASS;
1433
- }
1434
- }, zo = pe({}, Be, {
1435
- _constants: {
1436
- type: Object,
1437
- default: function() {
1438
- return No;
1439
- }
1440
- },
1441
- appendToBody: {
1442
- type: Boolean,
1443
- default: function() {
1444
- return !1;
1445
- }
1446
- },
1447
- beforeClose: Function,
1448
- center: {
1449
- type: Boolean,
1450
- default: function() {
1451
- return !1;
1452
- }
1453
- },
1454
- closeOnClickModal: {
1455
- type: Boolean,
1456
- default: function() {
1457
- return !0;
1458
- }
1459
- },
1460
- closeOnPressEscape: {
1461
- type: Boolean,
1462
- default: function() {
1463
- return !0;
1464
- }
1465
- },
1466
- destroyOnClose: {
1467
- type: Boolean,
1468
- default: function() {
1469
- return !1;
1470
- }
1471
- },
1472
- dialogClass: {
1473
- type: String,
1474
- default: function() {
1475
- return "";
1476
- }
1477
- },
1478
- draggable: {
1479
- type: Boolean,
1480
- default: function() {
1481
- return !1;
1482
- }
1483
- },
1484
- dragOutsideWindow: {
1485
- type: Boolean,
1486
- default: function() {
1487
- return !1;
1488
- }
1489
- },
1490
- fullscreen: {
1491
- type: Boolean,
1492
- default: function() {
1493
- return !1;
1494
- }
1495
- },
1496
- isFormReset: {
1497
- type: Boolean,
1498
- default: function() {
1499
- return !0;
1500
- }
1501
- },
1502
- lockScroll: {
1503
- type: Boolean,
1504
- default: function() {
1505
- return !0;
1506
- }
1507
- },
1508
- modal: {
1509
- type: Boolean,
1510
- default: function() {
1511
- return !0;
1512
- }
1513
- },
1514
- modalAppendToBody: {
1515
- type: Boolean,
1516
- default: function() {
1517
- return !0;
1518
- }
1519
- },
1520
- resize: {
1521
- type: Boolean,
1522
- default: function() {
1523
- return !1;
1524
- }
1525
- },
1526
- rightSlide: {
1527
- type: Boolean,
1528
- default: function() {
1529
- return !1;
1530
- }
1531
- },
1532
- showClose: {
1533
- type: Boolean,
1534
- default: function() {
1535
- return !0;
1536
- }
1537
- },
1538
- showHeader: {
1539
- type: Boolean,
1540
- default: function() {
1541
- return !0;
1542
- }
1543
- },
1544
- title: {
1545
- type: String,
1546
- default: function() {
1547
- return "";
1548
- }
1549
- },
1550
- top: String,
1551
- visible: {
1552
- type: Boolean,
1553
- default: function() {
1554
- return !1;
1555
- }
1556
- },
1557
- width: {
1558
- type: String,
1559
- default: function() {
1560
- return "500px";
1561
- }
1562
- },
1563
- maxHeight: {
1564
- type: String,
1565
- default: function() {
1566
- return "";
1567
- }
1568
- },
1569
- dialogTransition: {
1570
- type: String,
1571
- default: ""
1572
- },
1573
- noAnimation: {
1574
- type: Boolean,
1575
- default: !1
1576
- },
1577
- customStyle: {
1578
- type: Object,
1579
- default: function() {
1580
- return {};
1581
- }
1582
- }
1583
- }), z = R({
1584
- name: W + "DialogBox",
1585
- model: {
1586
- prop: "visible",
1587
- event: "update:visible"
1588
- },
1589
- props: zo,
1590
- setup: function(t, n) {
1591
- return Ee({
1592
- props: t,
1593
- context: n,
1594
- template: Po
1595
- });
1596
- }
1597
- }), Fo = "3.undefined";
1598
- z.install = function(e) {
1599
- e.component(z.name, z);
1600
- };
1601
- z.version = Fo;
1602
- function Ho(e, t) {
1603
- var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1604
- if (n) return (n = n.call(e)).next.bind(n);
1605
- if (Array.isArray(e) || (n = Wo(e)) || t) {
1606
- n && (e = n);
1607
- var o = 0;
1608
- return function() {
1609
- return o >= e.length ? { done: !0 } : { done: !1, value: e[o++] };
1610
- };
1611
- }
1612
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1613
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1614
- }
1615
- function Wo(e, t) {
1616
- if (e) {
1617
- if (typeof e == "string") return ke(e, t);
1618
- var n = {}.toString.call(e).slice(8, -1);
1619
- 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) ? ke(e, t) : void 0;
1620
- }
1621
- }
1622
- function ke(e, t) {
1623
- (t == null || t > e.length) && (t = e.length);
1624
- for (var n = 0, o = Array(t); n < t; n++) o[n] = e[n];
1625
- return o;
1626
- }
1627
- var We = function(t, n) {
1628
- for (var o = t.__vccOpts || t, a = Ho(n), i; !(i = a()).done; ) {
1629
- var l = i.value, s = l[0], r = l[1];
1630
- o[s] = r;
1631
- }
1632
- return o;
1633
- }, Uo = R({
1634
- name: W + "TallStorage",
1635
- inheritAttrs: !1,
1636
- props: {
1637
- isMemoryStorage: Boolean,
1638
- localstorageData: Array
1639
- },
1640
- setup: function(t, n) {
1641
- return me({
1642
- props: t,
1643
- context: n,
1644
- renderless: Qn,
1645
- api: Zn
1646
- });
1647
- }
1648
- }), jo = {
1649
- class: "tiny-storage-list-style"
1650
- }, Ro = ["onClick"];
1651
- function Go(e, t, n, o, a, i) {
1652
- return p(), g(
1653
- "div",
1654
- {
1655
- class: "tiny-tall-storage",
1656
- onMousedown: t[1] || (t[1] = function() {
1657
- return e.mousedown && e.mousedown.apply(e, arguments);
1658
- })
1659
- },
1660
- [b("div", jo, [b(
1661
- "ul",
1662
- {
1663
- onKeydown: t[0] || (t[0] = ot(function() {
1664
- return e.keydownEvent && e.keydownEvent.apply(e, arguments);
1665
- }, ["enter"])),
1666
- class: "tiny-storage-list"
1667
- },
1668
- [(p(!0), g(
1669
- re,
1670
- null,
1671
- at(e.localstorageData, function(l) {
1672
- return p(), g("li", {
1673
- key: l,
1674
- class: U(["tiny-storage-item", [e.state.hoverValue === l ? "item-hover" : ""]]),
1675
- onClick: function(r) {
1676
- return e.selectItem(l);
1677
- }
1678
- }, O(l), 11, Ro);
1679
- }),
1680
- 128
1681
- /* KEYED_FRAGMENT */
1682
- ))],
1683
- 32
1684
- /* NEED_HYDRATION */
1685
- )])],
1686
- 32
1687
- /* NEED_HYDRATION */
1688
- );
1689
- }
1690
- var Ko = /* @__PURE__ */ We(Uo, [["render", Go]]), Xo = R({
1691
- inheritAttrs: !1,
1692
- // 勿删,兼容灵雀特殊场景,MR#1861
1693
- emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "click", "input"],
1694
- directives: Qe({
1695
- Clickoutside: Gn
1696
- }),
1697
- components: {
1698
- IconClose: _e(),
1699
- IconEyeopen: Tt(),
1700
- IconEyeclose: Ct(),
1701
- TinyTallStorage: Ko,
1702
- TinyTooltip: Le,
1703
- TinyButton: it,
1704
- TinyDialogBox: z
1705
- },
1706
- props: [].concat(De, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "memorySpace", "validateEvent", "showWordLimit", "displayOnly", "displayOnlyContent", "frontClearIcon", "showEmptyValue", "hoverExpand", "popupMore", "showTooltip", "inputBoxType"]),
1707
- setup: function(t, n) {
1708
- return me({
1709
- props: t,
1710
- context: n,
1711
- renderless: Hn,
1712
- api: xn
1713
- });
1714
- }
1715
- }), Yo = {
1716
- key: 0,
1717
- class: "tiny-input-group__prepend",
1718
- ref: "prepend"
1719
- }, Jo = {
1720
- class: "tiny-input-display-only"
1721
- }, qo = {
1722
- key: 0,
1723
- class: "tiny-input-display-only__content"
1724
- }, Zo = {
1725
- key: 1,
1726
- class: "tiny-input-display-only__mask"
1727
- }, Qo = {
1728
- class: "tiny-input-display-only__mask-text"
1729
- }, ea = {
1730
- key: 2,
1731
- class: "tiny-input-display-only__content"
1732
- }, ta = ["name", "tabindex", "type", "disabled", "readonly", "unselectable", "autocomplete", "aria-label"], na = {
1733
- key: 2,
1734
- class: "tiny-input__prefix",
1735
- ref: "prefix"
1736
- }, oa = {
1737
- key: 0,
1738
- class: "tiny-input__suffix",
1739
- ref: "suffix"
1740
- }, aa = {
1741
- class: "tiny-input__suffix-inner"
1742
- }, ia = {
1743
- key: 5,
1744
- class: "tiny-input__count"
1745
- }, la = {
1746
- class: "tiny-input__count-inner"
1747
- }, ra = {
1748
- class: "tiny-input__count-text-length"
1749
- }, sa = {
1750
- class: "tiny-input__count-upper-limit"
1751
- }, ua = {
1752
- key: 3,
1753
- class: "tiny-input-group__append",
1754
- ref: "append"
1755
- }, da = {
1756
- key: 4,
1757
- class: "tiny-input-group__panel",
1758
- ref: "panel"
1759
- }, pa = {
1760
- class: "tiny-textarea-display-only__wrap"
1761
- }, fa = {
1762
- ref: "textBox",
1763
- class: "tiny-textarea-display-only__content text-box"
1764
- }, ca = ["tabindex", "disabled", "readonly", "unselectable", "autocomplete", "aria-label"], ya = {
1765
- key: 2,
1766
- class: "tiny-input__count"
1767
- }, ma = {
1768
- class: "tiny-input__count-inner"
1769
- }, ga = {
1770
- class: "tiny-input__count-text-length"
1771
- }, va = {
1772
- class: "tiny-input__count-upper-limit"
1773
- };
1774
- function ha(e, t, n, o, a, i) {
1775
- var l = E("tiny-tooltip"), s = E("tiny-tall-storage"), r = E("icon-close"), u = E("tiny-button"), f = E("tiny-dialog-box"), c = nt("clickoutside");
1776
- return p(), g(
1777
- "div",
1778
- J(e.a(e.$attrs, ["class"]), {
1779
- class: [e.$attrs.class, e.type === "textarea" ? "tiny-textarea" : "tiny-input", e.state.inputSize ? "tiny-input-" + e.state.inputSize : "", {
1780
- "is-disabled": e.state.inputDisabled,
1781
- "is-exceed": e.state.inputExceed,
1782
- "tiny-input-group": e.slots.prepend || e.slots.append,
1783
- "tiny-input-group-append": e.slots.append,
1784
- "tiny-input-group-prepend": e.slots.prepend,
1785
- "tiny-input-prefix": e.slots.prefix || e.prefixIcon,
1786
- "tiny-input-suffix": e.slots.suffix || e.suffixIcon || e.clearable || e.showPassword || e.mask && e.state.inputDisabled,
1787
- "tiny-input-word-limit": e.state.isWordLimitVisible,
1788
- "is-display-only": e.state.isDisplayOnly,
1789
- "tiny-input-underline": e.inputBoxType === "underline"
1790
- }],
1791
- onMouseenter: t[32] || (t[32] = function(d) {
1792
- e.state.hovering = !0, e.$emit("mouseenter", d);
1793
- }),
1794
- onMouseleave: t[33] || (t[33] = function(d) {
1795
- e.state.hovering = !1, e.$emit("mouseleave", d);
1796
- }),
1797
- onClick: t[34] || (t[34] = function(d) {
1798
- return e.$emit("click", d);
1799
- })
1800
- }),
1801
- [e.type !== "textarea" ? (p(), g(
1802
- re,
1803
- {
1804
- key: 0
1805
- },
1806
- [e.slots.prepend && !e.state.isDisplayOnly ? (p(), g(
1807
- "div",
1808
- Yo,
1809
- [k(e.$slots, "prepend")],
1810
- 512
1811
- /* NEED_PATCH */
1812
- )) : v("v-if", !0), b("span", Jo, [e.state.isDisplayOnly ? (p(), M(l, {
1813
- key: 0,
1814
- disabled: !e.showTooltip,
1815
- effect: "light",
1816
- content: e.state.displayOnlyTooltip,
1817
- placement: "top",
1818
- "popper-class": e.state.tooltipConfig.popperClass || "",
1819
- onMouseenter: e.handleEnterDisplayOnlyContent
1820
- }, {
1821
- default: D(function() {
1822
- return [e.type === "password" ? (p(), g(
1823
- "span",
1824
- qo,
1825
- O(e.state.hiddenPassword),
1826
- 1
1827
- /* TEXT */
1828
- )) : e.mask ? (p(), g("span", Zo, [b(
1829
- "span",
1830
- Qo,
1831
- O(e.state.displayedMaskValue),
1832
- 1
1833
- /* TEXT */
1834
- ), (p(), M(N(e.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose"), {
1835
- onClick: t[0] || (t[0] = function(d) {
1836
- return e.state.maskValueVisible = !e.state.maskValueVisible;
1837
- })
1838
- }))])) : (p(), g(
1839
- "span",
1840
- ea,
1841
- O(e.state.displayOnlyText),
1842
- 1
1843
- /* TEXT */
1844
- ))];
1845
- }),
1846
- _: 1
1847
- /* STABLE */
1848
- }, 8, ["disabled", "content", "popper-class", "onMouseenter"])) : v("v-if", !0), e.type !== "textarea" ? (p(), g("input", J({
1849
- key: 1,
1850
- ref: "input",
1851
- name: e.name,
1852
- "data-tag": "tiny-input-inner"
1853
- }, e.a(e.$attrs, ["type", "class", "style", "^on[A-Z]", "id"]), {
1854
- class: ["tiny-input__inner", e.mask && e.state.inputDisabled && !e.state.maskValueVisible && "tiny-input__mask"],
1855
- tabindex: e.tabindex,
1856
- type: e.showPassword ? e.state.passwordVisible ? "text" : "password" : e.type,
1857
- disabled: e.state.inputDisabled,
1858
- readonly: e.readonly,
1859
- unselectable: e.readonly ? "on" : "off",
1860
- autocomplete: e.autocomplete,
1861
- onCompositionend: t[1] || (t[1] = function() {
1862
- return e.handleCompositionEnd && e.handleCompositionEnd.apply(e, arguments);
1863
- }),
1864
- onCompositionupdate: t[2] || (t[2] = function() {
1865
- return e.handleCompositionUpdate && e.handleCompositionUpdate.apply(e, arguments);
1866
- }),
1867
- onCompositionstart: t[3] || (t[3] = function() {
1868
- return e.handleCompositionStart && e.handleCompositionStart.apply(e, arguments);
1869
- }),
1870
- onBlur: t[4] || (t[4] = function() {
1871
- return e.handleBlur && e.handleBlur.apply(e, arguments);
1872
- }),
1873
- onFocus: t[5] || (t[5] = function() {
1874
- return e.handleFocus && e.handleFocus.apply(e, arguments);
1875
- }),
1876
- onInput: t[6] || (t[6] = function() {
1877
- return e.handleInput && e.handleInput.apply(e, arguments);
1878
- }),
1879
- onChange: t[7] || (t[7] = function() {
1880
- return e.handleChange && e.handleChange.apply(e, arguments);
1881
- }),
1882
- "aria-label": e.label,
1883
- onKeyup: t[8] || (t[8] = function(d) {
1884
- return e.$emit("keyup", d);
1885
- }),
1886
- onKeydown: t[9] || (t[9] = function(d) {
1887
- return e.$emit("keydown", d);
1888
- }),
1889
- onPaste: t[10] || (t[10] = function(d) {
1890
- return e.$emit("paste", d);
1891
- })
1892
- }), null, 16, ta)) : v("v-if", !0)]), e.isMemoryStorage ? (p(), M(s, {
1893
- key: 1,
1894
- name: e.name,
1895
- "localstorage-data": e.storageData,
1896
- "is-memory-storage": e.isMemoryStorage,
1897
- onSelected: e.selectedMemory
1898
- }, null, 8, ["name", "localstorage-data", "is-memory-storage", "onSelected"])) : v("v-if", !0), !e.state.isDisplayOnly && (e.slots.prefix || e.prefixIcon) ? (p(), g(
1899
- "span",
1900
- na,
1901
- [k(e.$slots, "prefix"), e.prefixIcon ? (p(), M(N(e.prefixIcon), {
1902
- key: 0,
1903
- class: "tiny-svg-size tiny-input__icon"
1904
- })) : v("v-if", !0)],
1905
- 512
1906
- /* NEED_PATCH */
1907
- )) : v("v-if", !0), b("div", null, [L(ae, {
1908
- name: "tiny-transition-icon-out-in"
1909
- }, {
1910
- default: D(function() {
1911
- return [!e.state.isDisplayOnly && e.getSuffixVisible() ? (p(), g(
1912
- "span",
1913
- oa,
1914
- [b("span", aa, [e.frontClearIcon && e.state.showClear ? (p(), M(r, {
1915
- key: 0,
1916
- class: "tiny-svg-size tiny-input__icon tiny-input__clear",
1917
- onMousedown: t[11] || (t[11] = le(function() {
1918
- }, ["prevent"])),
1919
- onClick: e.clear
1920
- }, null, 8, ["onClick"])) : v("v-if", !0), !e.state.showClear || !e.state.showPwdVisible || !e.state.isWordLimitVisible ? (p(), g(
1921
- re,
1922
- {
1923
- key: 1
1924
- },
1925
- [k(e.$slots, "suffix"), e.suffixIcon ? (p(), M(N(e.suffixIcon), {
1926
- key: 0,
1927
- class: "tiny-svg-size tiny-input__icon"
1928
- })) : v("v-if", !0)],
1929
- 64
1930
- /* STABLE_FRAGMENT */
1931
- )) : v("v-if", !0), !e.frontClearIcon && e.state.showClear ? (p(), M(r, {
1932
- key: 2,
1933
- class: "tiny-svg-size tiny-input__icon tiny-input__clear",
1934
- onMousedown: t[12] || (t[12] = le(function() {
1935
- }, ["prevent"])),
1936
- onClick: e.clear
1937
- }, null, 8, ["onClick"])) : v("v-if", !0), e.showPassword ? (p(), M(N(e.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose"), {
1938
- key: 3,
1939
- class: "tiny-svg-size tiny-input__icon",
1940
- onClick: e.handlePasswordVisible
1941
- }, null, 8, ["onClick"])) : v("v-if", !0), e.mask && e.state.inputDisabled ? (p(), M(N(e.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose"), {
1942
- key: 4,
1943
- class: "tiny-svg-size tiny-input__icon",
1944
- onClick: t[13] || (t[13] = function(d) {
1945
- return e.state.maskValueVisible = !e.state.maskValueVisible;
1946
- })
1947
- })) : v("v-if", !0), e.state.isWordLimitVisible ? (p(), g("span", ia, [b("span", la, [b(
1948
- "span",
1949
- ra,
1950
- O(e.state.showWordLimit ? "" + e.state.textLength : ""),
1951
- 1
1952
- /* TEXT */
1953
- ), b(
1954
- "span",
1955
- sa,
1956
- O(e.state.showWordLimit ? "/" + e.state.upperLimit : e.state.textLength),
1957
- 1
1958
- /* TEXT */
1959
- )])])) : v("v-if", !0)]), e.state.validateState ? (p(), g(
1960
- "i",
1961
- {
1962
- key: 0,
1963
- class: U(["tiny-input__icon", ["tiny-input__validateIcon", e.validateIcon]])
1964
- },
1965
- null,
1966
- 2
1967
- /* CLASS */
1968
- )) : v("v-if", !0)],
1969
- 512
1970
- /* NEED_PATCH */
1971
- )) : v("v-if", !0)];
1972
- }),
1973
- _: 3
1974
- /* FORWARDED */
1975
- })]), e.slots.append && !e.state.isDisplayOnly ? (p(), g(
1976
- "div",
1977
- ua,
1978
- [k(e.$slots, "append")],
1979
- 512
1980
- /* NEED_PATCH */
1981
- )) : v("v-if", !0), e.slots.panel && !e.state.isDisplayOnly ? (p(), g(
1982
- "div",
1983
- da,
1984
- [k(e.$slots, "panel")],
1985
- 512
1986
- /* NEED_PATCH */
1987
- )) : v("v-if", !0)],
1988
- 64
1989
- /* STABLE_FRAGMENT */
1990
- )) : (p(), g(
1991
- "span",
1992
- {
1993
- key: 1,
1994
- class: U(["tiny-textarea-display-only", e.hoverExpand && "tiny-textarea__inner-con"])
1995
- },
1996
- [e.state.isDisplayOnly ? (p(), M(l, {
1997
- key: 0,
1998
- disabled: !e.showTooltip,
1999
- pre: "",
2000
- effect: "light",
2001
- content: e.state.displayOnlyTooltip,
2002
- placement: "top",
2003
- "popper-class": e.state.tooltipConfig.popperClass || "",
2004
- onMouseenter: t[15] || (t[15] = function(d) {
2005
- return e.handleEnterDisplayOnlyContent(d, "textarea");
2006
- })
2007
- }, {
2008
- default: D(function() {
2009
- return [b("div", pa, [b(
2010
- "span",
2011
- fa,
2012
- [e.state.showMoreBtn ? (p(), g(
2013
- "span",
2014
- {
2015
- key: 0,
2016
- onClick: t[14] || (t[14] = function(d) {
2017
- return e.state.showDisplayOnlyBox = !0;
2018
- }),
2019
- class: "more-btn"
2020
- },
2021
- O(e.t("ui.input.more")) + ">",
2022
- 1
2023
- /* TEXT */
2024
- )) : v("v-if", !0), q(
2025
- O(e.state.displayOnlyText),
2026
- 1
2027
- /* TEXT */
2028
- )],
2029
- 512
2030
- /* NEED_PATCH */
2031
- )])];
2032
- }),
2033
- _: 1
2034
- /* STABLE */
2035
- }, 8, ["disabled", "content", "popper-class"])) : v("v-if", !0), e.state.isDisplayOnly && e.popupMore ? (p(), M(f, {
2036
- key: 1,
2037
- title: e.t("ui.input.detail"),
2038
- visible: e.state.showDisplayOnlyBox,
2039
- "append-to-body": !0,
2040
- "onUpdate:visible": t[17] || (t[17] = function(d) {
2041
- return e.state.showDisplayOnlyBox = d;
2042
- })
2043
- }, {
2044
- footer: D(function() {
2045
- return [L(u, {
2046
- onClick: t[16] || (t[16] = function(d) {
2047
- return e.state.showDisplayOnlyBox = !1;
2048
- })
2049
- }, {
2050
- default: D(function() {
2051
- return [q(
2052
- O(e.t("ui.input.close")),
2053
- 1
2054
- /* TEXT */
2055
- )];
2056
- }),
2057
- _: 1
2058
- /* STABLE */
2059
- })];
2060
- }),
2061
- default: D(function() {
2062
- return [b(
2063
- "pre",
2064
- null,
2065
- O(e.state.displayOnlyText),
2066
- 1
2067
- /* TEXT */
2068
- )];
2069
- }),
2070
- _: 1
2071
- /* STABLE */
2072
- }, 8, ["title", "visible"])) : v("v-if", !0), ie((p(), g("textarea", J({
2073
- ref: "textarea"
2074
- }, e.a(e.$attrs, ["type", "class", "style", "id"]), {
2075
- tabindex: e.tabindex,
2076
- class: ["tiny-textarea__inner", e.hoverExpand && !e.state.enteredTextarea && "tiny-textarea__fix-height"],
2077
- onCompositionstart: t[18] || (t[18] = function() {
2078
- return e.handleCompositionStart && e.handleCompositionStart.apply(e, arguments);
2079
- }),
2080
- onCompositionupdate: t[19] || (t[19] = function() {
2081
- return e.handleCompositionUpdate && e.handleCompositionUpdate.apply(e, arguments);
2082
- }),
2083
- onCompositionend: t[20] || (t[20] = function() {
2084
- return e.handleCompositionEnd && e.handleCompositionEnd.apply(e, arguments);
2085
- }),
2086
- onInput: t[21] || (t[21] = function() {
2087
- return e.handleInput && e.handleInput.apply(e, arguments);
2088
- }),
2089
- disabled: e.state.inputDisabled,
2090
- readonly: e.readonly,
2091
- unselectable: e.readonly ? "on" : "off",
2092
- autocomplete: e.autocomplete,
2093
- style: e.state.textareaStyle,
2094
- onFocus: t[22] || (t[22] = function() {
2095
- return e.handleFocus && e.handleFocus.apply(e, arguments);
2096
- }),
2097
- onBlur: t[23] || (t[23] = function() {
2098
- return e.handleBlur && e.handleBlur.apply(e, arguments);
2099
- }),
2100
- onChange: t[24] || (t[24] = function() {
2101
- return e.handleChange && e.handleChange.apply(e, arguments);
2102
- }),
2103
- onMouseenter: t[25] || (t[25] = function(d) {
2104
- return e.handleEnterTextarea(d);
2105
- }),
2106
- onMouseleave: t[26] || (t[26] = function(d) {
2107
- return e.handleLeaveTextarea(d);
2108
- }),
2109
- onMousedown: t[27] || (t[27] = function(d) {
2110
- return e.handleTextareaMouseDown();
2111
- }),
2112
- onMouseup: t[28] || (t[28] = function(d) {
2113
- return e.handleTextareaMouseUp();
2114
- }),
2115
- "aria-label": e.label,
2116
- onKeyup: t[29] || (t[29] = function(d) {
2117
- return e.$emit("keyup", d);
2118
- }),
2119
- onKeydown: t[30] || (t[30] = function(d) {
2120
- return e.$emit("keydown", d);
2121
- }),
2122
- onPaste: t[31] || (t[31] = function(d) {
2123
- return e.$emit("paste", d);
2124
- })
2125
- }), [q(`
2126
- `)], 16, ca)), [[c, function() {
2127
- return e.handleTextareaMouseUp(!0);
2128
- }, void 0, {
2129
- mouseup: !0
2130
- }]])],
2131
- 2
2132
- /* CLASS */
2133
- )), e.state.isWordLimitVisible && e.type === "textarea" ? (p(), g("span", ya, [b("span", ma, [b(
2134
- "span",
2135
- ga,
2136
- O(e.state.showWordLimit ? "" + e.state.textLength : ""),
2137
- 1
2138
- /* TEXT */
2139
- ), b(
2140
- "span",
2141
- va,
2142
- O(e.state.showWordLimit ? "/" + e.state.upperLimit : e.state.textLength),
2143
- 1
2144
- /* TEXT */
2145
- )])])) : v("v-if", !0), k(e.$slots, "default")],
2146
- 16
2147
- /* FULL_PROPS */
2148
- );
2149
- }
2150
- var oe = /* @__PURE__ */ We(Xo, [["render", ha]]);
2151
- function fe() {
2152
- return fe = Object.assign ? Object.assign.bind() : function(e) {
2153
- for (var t = 1; t < arguments.length; t++) {
2154
- var n = arguments[t];
2155
- for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
2156
- }
2157
- return e;
2158
- }, fe.apply(null, arguments);
2159
- }
2160
- var ba = function(t) {
2161
- var n, o = typeof process == "object" ? (n = process.env) == null ? void 0 : n.TINY_MODE : null;
2162
- return oe;
2163
- }, Sa = {
2164
- INPUT_PC: "tiny-input__",
2165
- INPUTGROUP_PC: "tiny-input-group__",
2166
- INPUT_MOBILE: "tiny-mobile-input__",
2167
- INPUTGROUP_MOBILE: "tiny-mobile-input-group__",
2168
- Mode: "pc",
2169
- inputMode: function(t) {
2170
- return t === this.Mode ? this.INPUT_PC : this.INPUT_MOBILE;
2171
- },
2172
- inputGroupMode: function(t) {
2173
- return t === this.Mode ? this.INPUTGROUP_PC : this.INPUTGROUP_MOBILE;
2174
- },
2175
- VALIDATE_ICON: {
2176
- Validating: "tiny-icon-loading",
2177
- Success: "tiny-icon-circle-check",
2178
- Error: "tiny-icon-circle-close"
2179
- },
2180
- COMPONENT_NAME: {
2181
- FormItem: "FormItem"
2182
- },
2183
- MASKSYMBOL: "******",
2184
- TEXTAREA_HEIGHT_MOBILE: 108
2185
- }, wa = fe({}, Be, {
2186
- _constants: {
2187
- type: Object,
2188
- default: function() {
2189
- return Sa;
2190
- }
2191
- },
2192
- name: String,
2193
- size: String,
2194
- form: String,
2195
- label: String,
2196
- height: Number,
2197
- resize: String,
2198
- tabindex: {
2199
- type: String,
2200
- default: "1"
2201
- },
2202
- disabled: Boolean,
2203
- readonly: Boolean,
2204
- hoverExpand: Boolean,
2205
- mask: Boolean,
2206
- suffixIcon: [Object, String],
2207
- prefixIcon: [Object, String],
2208
- modelValue: [String, Number],
2209
- type: {
2210
- type: String,
2211
- default: "text"
2212
- },
2213
- memorySpace: {
2214
- type: Number,
2215
- default: 5
2216
- },
2217
- vertical: {
2218
- type: Boolean,
2219
- default: !1
2220
- },
2221
- selectMenu: {
2222
- type: Array,
2223
- default: function() {
2224
- return [];
2225
- }
2226
- },
2227
- ellipsis: {
2228
- type: Boolean,
2229
- default: !1
2230
- },
2231
- contentStyle: {
2232
- type: Object,
2233
- default: function() {
2234
- return {};
2235
- }
2236
- },
2237
- isSelect: {
2238
- type: Boolean,
2239
- default: !1
2240
- },
2241
- tips: String,
2242
- counter: {
2243
- type: Boolean,
2244
- default: !1
2245
- },
2246
- autosize: {
2247
- type: [Boolean, Object],
2248
- default: !1
2249
- },
2250
- clearable: {
2251
- type: Boolean,
2252
- default: !1
2253
- },
2254
- autocomplete: {
2255
- type: String,
2256
- default: "off"
2257
- },
2258
- showPassword: {
2259
- type: Boolean,
2260
- default: !1
2261
- },
2262
- showWordLimit: {
2263
- type: Boolean,
2264
- default: !1
2265
- },
2266
- showTitle: {
2267
- type: Boolean,
2268
- default: !1
2269
- },
2270
- validateEvent: {
2271
- type: Boolean,
2272
- default: !0
2273
- },
2274
- popupMore: {
2275
- type: Boolean,
2276
- default: !1
2277
- },
2278
- // mobile特有属性
2279
- textareaTitle: {
2280
- type: String,
2281
- default: ""
2282
- },
2283
- displayOnly: {
2284
- type: Boolean,
2285
- default: !1
2286
- },
2287
- displayOnlyContent: {
2288
- type: String,
2289
- default: ""
2290
- },
2291
- customClass: {
2292
- type: String,
2293
- default: ""
2294
- },
2295
- frontClearIcon: {
2296
- type: Boolean,
2297
- default: !1
2298
- },
2299
- showEmptyValue: {
2300
- type: Boolean,
2301
- default: void 0
2302
- },
2303
- textAlign: {
2304
- type: String,
2305
- default: "left"
2306
- },
2307
- width: {
2308
- type: [String, Number]
2309
- },
2310
- showTooltip: {
2311
- type: Boolean,
2312
- default: !0
2313
- },
2314
- /** 输入框的边框模式,当值为underline时,只显示一条底部直线 */
2315
- inputBoxType: {
2316
- type: String,
2317
- default: "normal",
2318
- validator: function(t) {
2319
- return ["normal", "underline"].includes(t);
2320
- }
2321
- }
2322
- }), F = R({
2323
- name: W + "Input",
2324
- inheritAttrs: !1,
2325
- props: wa,
2326
- setup: function(t, n) {
2327
- return Ee({
2328
- props: t,
2329
- context: n,
2330
- template: ba
2331
- });
2332
- }
2333
- }), Ca = "3.undefined";
2334
- F.model = {
2335
- prop: "modelValue",
2336
- event: "update:modelValue"
2337
- };
2338
- F.install = function(e) {
2339
- e.component(F.name, F);
2340
- };
2341
- F.version = Ca;
2342
- export {
2343
- F as I,
2344
- Da as O,
2345
- j as _,
2346
- ka as a,
2347
- Ae as b,
2348
- Gn as c,
2349
- Ht as d,
2350
- Ta as h,
2351
- At as i
2352
- };