@web-utils/component 1.0.8 → 1.0.9
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/index.js +252 -474
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,93 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { isPlainObject, isString, isArray } from "@web-utils/core";
|
|
21
|
-
var util = "";
|
|
22
|
-
const version = "1.0.8";
|
|
23
|
-
var render$4 = function() {
|
|
24
|
-
var _vm = this;
|
|
25
|
-
var _h = _vm.$createElement;
|
|
26
|
-
var _c = _vm._self._c || _h;
|
|
27
|
-
return _c("div", {
|
|
1
|
+
var A = Object.defineProperty, H = Object.defineProperties;
|
|
2
|
+
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var m = Object.getOwnPropertySymbols;
|
|
4
|
+
var X = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var x = (e, t, n) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, f = (e, t) => {
|
|
6
|
+
for (var n in t || (t = {}))
|
|
7
|
+
X.call(t, n) && x(e, n, t[n]);
|
|
8
|
+
if (m)
|
|
9
|
+
for (var n of m(t))
|
|
10
|
+
U.call(t, n) && x(e, n, t[n]);
|
|
11
|
+
return e;
|
|
12
|
+
}, c = (e, t) => H(e, V(t));
|
|
13
|
+
import { isPlainObject as k, isString as L, isArray as J } from "@web-utils/core";
|
|
14
|
+
const Y = "1.0.9";
|
|
15
|
+
var q = function() {
|
|
16
|
+
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
17
|
+
return n("div", {
|
|
28
18
|
staticClass: "empty-view",
|
|
29
19
|
style: {
|
|
30
|
-
fontSize:
|
|
31
|
-
height:
|
|
20
|
+
fontSize: e.fontSize,
|
|
21
|
+
height: e.height
|
|
32
22
|
}
|
|
33
|
-
}, [
|
|
34
|
-
return [
|
|
23
|
+
}, [e._t("default", function() {
|
|
24
|
+
return [e._v(e._s(e.emptyTips))];
|
|
35
25
|
})], 2);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
var hook;
|
|
53
|
-
if (moduleIdentifier) {
|
|
54
|
-
hook = function(context) {
|
|
55
|
-
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
56
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
57
|
-
context = __VUE_SSR_CONTEXT__;
|
|
58
|
-
}
|
|
59
|
-
if (injectStyles) {
|
|
60
|
-
injectStyles.call(this, context);
|
|
61
|
-
}
|
|
62
|
-
if (context && context._registeredComponents) {
|
|
63
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
options._ssrRegister = hook;
|
|
67
|
-
} else if (injectStyles) {
|
|
68
|
-
hook = shadowMode ? function() {
|
|
69
|
-
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
70
|
-
} : injectStyles;
|
|
71
|
-
}
|
|
72
|
-
if (hook) {
|
|
73
|
-
if (options.functional) {
|
|
74
|
-
options._injectStyles = hook;
|
|
75
|
-
var originalRender = options.render;
|
|
76
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
77
|
-
hook.call(context);
|
|
78
|
-
return originalRender(h, context);
|
|
26
|
+
}, D = [];
|
|
27
|
+
function a(e, t, n, s, r, u, v, N) {
|
|
28
|
+
var i = typeof e == "function" ? e.options : e;
|
|
29
|
+
t && (i.render = t, i.staticRenderFns = n, i._compiled = !0), s && (i.functional = !0), u && (i._scopeId = "data-v-" + u);
|
|
30
|
+
var l;
|
|
31
|
+
if (v ? (l = function(o) {
|
|
32
|
+
o = o || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !o && typeof __VUE_SSR_CONTEXT__ != "undefined" && (o = __VUE_SSR_CONTEXT__), r && r.call(this, o), o && o._registeredComponents && o._registeredComponents.add(v);
|
|
33
|
+
}, i._ssrRegister = l) : r && (l = N ? function() {
|
|
34
|
+
r.call(this, (i.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
35
|
+
} : r), l)
|
|
36
|
+
if (i.functional) {
|
|
37
|
+
i._injectStyles = l;
|
|
38
|
+
var W = i.render;
|
|
39
|
+
i.render = function(j, d) {
|
|
40
|
+
return l.call(d), W(j, d);
|
|
79
41
|
};
|
|
80
42
|
} else {
|
|
81
|
-
var
|
|
82
|
-
|
|
43
|
+
var p = i.beforeCreate;
|
|
44
|
+
i.beforeCreate = p ? [].concat(p, l) : [l];
|
|
83
45
|
}
|
|
84
|
-
}
|
|
85
46
|
return {
|
|
86
|
-
exports:
|
|
87
|
-
options
|
|
47
|
+
exports: e,
|
|
48
|
+
options: i
|
|
88
49
|
};
|
|
89
50
|
}
|
|
90
|
-
const
|
|
51
|
+
const G = {
|
|
91
52
|
name: "EmptyView",
|
|
92
53
|
props: {
|
|
93
54
|
emptyTips: {
|
|
@@ -103,37 +64,27 @@ const __vue2_script$7 = {
|
|
|
103
64
|
default: "100%"
|
|
104
65
|
}
|
|
105
66
|
}
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this[o] = __cssModules$7[o];
|
|
112
|
-
}
|
|
67
|
+
}, $ = {};
|
|
68
|
+
var K = /* @__PURE__ */ a(G, q, D, !1, Q, null, null, null);
|
|
69
|
+
function Q(e) {
|
|
70
|
+
for (let t in $)
|
|
71
|
+
this[t] = $[t];
|
|
113
72
|
}
|
|
114
|
-
var
|
|
115
|
-
return
|
|
116
|
-
}()
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
var render$3 = function() {
|
|
121
|
-
var _vm = this;
|
|
122
|
-
var _h = _vm.$createElement;
|
|
123
|
-
var _c = _vm._self._c || _h;
|
|
124
|
-
return _c("div", {
|
|
73
|
+
var O = /* @__PURE__ */ function() {
|
|
74
|
+
return K.exports;
|
|
75
|
+
}(), Z = function() {
|
|
76
|
+
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
77
|
+
return n("div", {
|
|
125
78
|
staticClass: "flex-scroller-wrapper"
|
|
126
|
-
}, [
|
|
79
|
+
}, [n("div", {
|
|
127
80
|
class: ["flex-scroller", {
|
|
128
|
-
"flex-column":
|
|
129
|
-
"flex-row":
|
|
130
|
-
"content-scroll":
|
|
131
|
-
},
|
|
132
|
-
}, [
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
var FlexScroller_vue_vue_type_style_index_0_lang = "";
|
|
136
|
-
const __vue2_script$6 = {
|
|
81
|
+
"flex-column": e.flexColumn,
|
|
82
|
+
"flex-row": e.flexRow,
|
|
83
|
+
"content-scroll": e.contentScroll
|
|
84
|
+
}, e.contentClass]
|
|
85
|
+
}, [e._t("default")], 2)]);
|
|
86
|
+
}, ee = [];
|
|
87
|
+
const te = {
|
|
137
88
|
name: "FlexScroller",
|
|
138
89
|
props: {
|
|
139
90
|
flexColumn: Boolean,
|
|
@@ -141,124 +92,82 @@ const __vue2_script$6 = {
|
|
|
141
92
|
contentClass: String,
|
|
142
93
|
contentScroll: {
|
|
143
94
|
type: Boolean,
|
|
144
|
-
default:
|
|
95
|
+
default: !0
|
|
145
96
|
}
|
|
146
97
|
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this[o] = __cssModules$6[o];
|
|
153
|
-
}
|
|
98
|
+
}, g = {};
|
|
99
|
+
var ne = /* @__PURE__ */ a(te, Z, ee, !1, re, null, null, null);
|
|
100
|
+
function re(e) {
|
|
101
|
+
for (let t in g)
|
|
102
|
+
this[t] = g[t];
|
|
154
103
|
}
|
|
155
|
-
var
|
|
156
|
-
return
|
|
157
|
-
}()
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
var
|
|
162
|
-
|
|
163
|
-
var _h = _vm.$createElement;
|
|
164
|
-
_vm._self._c || _h;
|
|
165
|
-
return _vm._m(0);
|
|
166
|
-
};
|
|
167
|
-
var staticRenderFns$2 = [function() {
|
|
168
|
-
var _vm = this;
|
|
169
|
-
var _h = _vm.$createElement;
|
|
170
|
-
var _c = _vm._self._c || _h;
|
|
171
|
-
return _c("div", {
|
|
104
|
+
var R = /* @__PURE__ */ function() {
|
|
105
|
+
return ne.exports;
|
|
106
|
+
}(), se = function() {
|
|
107
|
+
var e = this, t = e.$createElement;
|
|
108
|
+
return e._self._c, e._m(0);
|
|
109
|
+
}, ie = [function() {
|
|
110
|
+
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
111
|
+
return n("div", {
|
|
172
112
|
staticClass: "not-implement"
|
|
173
|
-
}, [
|
|
113
|
+
}, [n("div", [n("i", {
|
|
174
114
|
staticClass: "fa fa-wrench"
|
|
175
|
-
}),
|
|
115
|
+
}), e._v(" \u5EFA\u8BBE\u4E2D... ")])]);
|
|
176
116
|
}];
|
|
177
|
-
|
|
178
|
-
const __vue2_script$5 = {
|
|
117
|
+
const oe = {
|
|
179
118
|
name: "NotImplement"
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this[o] = __cssModules$5[o];
|
|
186
|
-
}
|
|
119
|
+
}, C = {};
|
|
120
|
+
var le = /* @__PURE__ */ a(oe, se, ie, !1, ae, "f91d5e80", null, null);
|
|
121
|
+
function ae(e) {
|
|
122
|
+
for (let t in C)
|
|
123
|
+
this[t] = C[t];
|
|
187
124
|
}
|
|
188
|
-
var
|
|
189
|
-
return
|
|
125
|
+
var b = /* @__PURE__ */ function() {
|
|
126
|
+
return le.exports;
|
|
190
127
|
}();
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if (value === validList[i]) {
|
|
197
|
-
return true;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return false;
|
|
128
|
+
function ue(e, t) {
|
|
129
|
+
for (let n = 0; n < t.length; n++)
|
|
130
|
+
if (e === t[n])
|
|
131
|
+
return !0;
|
|
132
|
+
return !1;
|
|
201
133
|
}
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
}();
|
|
217
|
-
const off = function() {
|
|
218
|
-
if (document.removeEventListener) {
|
|
219
|
-
return function(element, event, handler) {
|
|
220
|
-
if (element && event) {
|
|
221
|
-
element.removeEventListener(event, handler, false);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
} else {
|
|
225
|
-
return function(element, event, handler) {
|
|
226
|
-
if (element && event) {
|
|
227
|
-
element.detachEvent(`on${event}`, handler);
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
}
|
|
134
|
+
const y = function() {
|
|
135
|
+
return document.addEventListener ? function(e, t, n) {
|
|
136
|
+
e && t && n && e.addEventListener(t, n, !1);
|
|
137
|
+
} : function(e, t, n) {
|
|
138
|
+
e && t && n && e.attachEvent(`on${t}`, n);
|
|
139
|
+
};
|
|
140
|
+
}(), z = function() {
|
|
141
|
+
return document.removeEventListener ? function(e, t, n) {
|
|
142
|
+
e && t && e.removeEventListener(t, n, !1);
|
|
143
|
+
} : function(e, t, n) {
|
|
144
|
+
e && t && e.detachEvent(`on${t}`, n);
|
|
145
|
+
};
|
|
231
146
|
}();
|
|
232
|
-
var
|
|
233
|
-
var
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
class:
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
var _c = _vm._self._c || _h;
|
|
246
|
-
return _vm._l(8, function(i) {
|
|
247
|
-
return _c("i", {
|
|
248
|
-
key: `trigger-${i}`,
|
|
249
|
-
class: `${_vm.prefix}-bar`
|
|
147
|
+
var fe = function() {
|
|
148
|
+
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
149
|
+
return n("div", {
|
|
150
|
+
class: e.classes
|
|
151
|
+
}, [e.showIcon ? n("div", {
|
|
152
|
+
class: e.barConClasses
|
|
153
|
+
}, e._m(0), 0) : e._e()]);
|
|
154
|
+
}, ce = [function() {
|
|
155
|
+
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
156
|
+
return e._l(8, function(s) {
|
|
157
|
+
return n("i", {
|
|
158
|
+
key: `trigger-${s}`,
|
|
159
|
+
class: `${e.prefix}-bar`
|
|
250
160
|
});
|
|
251
161
|
});
|
|
252
162
|
}];
|
|
253
|
-
|
|
254
|
-
const __vue2_script$4 = {
|
|
163
|
+
const _e = {
|
|
255
164
|
name: "Trigger",
|
|
256
165
|
props: {
|
|
257
166
|
mode: String,
|
|
258
167
|
showIcon: Boolean,
|
|
259
168
|
line: {
|
|
260
169
|
type: Boolean,
|
|
261
|
-
default:
|
|
170
|
+
default: !0
|
|
262
171
|
}
|
|
263
172
|
},
|
|
264
173
|
data() {
|
|
@@ -284,86 +193,79 @@ const __vue2_script$4 = {
|
|
|
284
193
|
];
|
|
285
194
|
}
|
|
286
195
|
}
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this[o] = __cssModules$4[o];
|
|
293
|
-
}
|
|
196
|
+
}, S = {};
|
|
197
|
+
var he = /* @__PURE__ */ a(_e, fe, ce, !1, ve, null, null, null);
|
|
198
|
+
function ve(e) {
|
|
199
|
+
for (let t in S)
|
|
200
|
+
this[t] = S[t];
|
|
294
201
|
}
|
|
295
|
-
var
|
|
296
|
-
return
|
|
297
|
-
}()
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
var _h = _vm.$createElement;
|
|
301
|
-
var _c = _vm._self._c || _h;
|
|
302
|
-
return _c("div", {
|
|
202
|
+
var pe = /* @__PURE__ */ function() {
|
|
203
|
+
return he.exports;
|
|
204
|
+
}(), de = function() {
|
|
205
|
+
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
206
|
+
return n("div", {
|
|
303
207
|
ref: "outerWrapper",
|
|
304
|
-
class:
|
|
305
|
-
}, [
|
|
306
|
-
class: `${
|
|
307
|
-
}, [
|
|
308
|
-
class: [`${
|
|
208
|
+
class: e.wrapperClasses
|
|
209
|
+
}, [e.isHorizontal ? n("div", {
|
|
210
|
+
class: `${e.prefix}-horizontal`
|
|
211
|
+
}, [n("div", {
|
|
212
|
+
class: [`${e.prefix}-pane`, "left-pane"],
|
|
309
213
|
style: {
|
|
310
|
-
right: `${
|
|
214
|
+
right: `${e.anotherOffset}%`
|
|
311
215
|
}
|
|
312
|
-
}, [
|
|
313
|
-
class: `${
|
|
216
|
+
}, [e._t("left")], 2), n("div", {
|
|
217
|
+
class: `${e.prefix}-trigger-con`,
|
|
314
218
|
style: {
|
|
315
|
-
left: `calc(${
|
|
316
|
-
width: `${
|
|
219
|
+
left: `calc(${e.offset}% + ${e.triggerSize / 2}px)`,
|
|
220
|
+
width: `${e.triggerSize}px`
|
|
317
221
|
},
|
|
318
222
|
on: {
|
|
319
|
-
|
|
223
|
+
mousedown: e.handleMousedown
|
|
320
224
|
}
|
|
321
|
-
}, [
|
|
322
|
-
return [
|
|
225
|
+
}, [e._t("trigger", function() {
|
|
226
|
+
return [n("Trigger", {
|
|
323
227
|
attrs: {
|
|
324
|
-
|
|
228
|
+
mode: "vertical"
|
|
325
229
|
}
|
|
326
230
|
})];
|
|
327
|
-
})], 2),
|
|
328
|
-
class: [`${
|
|
231
|
+
})], 2), n("div", {
|
|
232
|
+
class: [`${e.prefix}-pane`, "right-pane"],
|
|
329
233
|
style: {
|
|
330
|
-
left: `calc(${
|
|
234
|
+
left: `calc(${e.offset}% + ${e.triggerSize}px)`
|
|
331
235
|
}
|
|
332
|
-
}, [
|
|
333
|
-
class: `${
|
|
334
|
-
}, [
|
|
335
|
-
class: [`${
|
|
236
|
+
}, [e._t("right")], 2)]) : n("div", {
|
|
237
|
+
class: `${e.prefix}-vertical`
|
|
238
|
+
}, [n("div", {
|
|
239
|
+
class: [`${e.prefix}-pane`, "top-pane"],
|
|
336
240
|
style: {
|
|
337
|
-
bottom: `${
|
|
241
|
+
bottom: `${e.anotherOffset}%`
|
|
338
242
|
}
|
|
339
|
-
}, [
|
|
340
|
-
class: `${
|
|
243
|
+
}, [e._t("top")], 2), n("div", {
|
|
244
|
+
class: `${e.prefix}-trigger-con`,
|
|
341
245
|
style: {
|
|
342
|
-
top: `calc(${
|
|
343
|
-
height: `${
|
|
246
|
+
top: `calc(${e.offset}% + ${e.triggerSize / 2}px)`,
|
|
247
|
+
height: `${e.triggerSize}px`
|
|
344
248
|
},
|
|
345
249
|
on: {
|
|
346
|
-
|
|
250
|
+
mousedown: e.handleMousedown
|
|
347
251
|
}
|
|
348
|
-
}, [
|
|
349
|
-
return [
|
|
252
|
+
}, [e._t("trigger", function() {
|
|
253
|
+
return [n("Trigger", {
|
|
350
254
|
attrs: {
|
|
351
|
-
|
|
255
|
+
mode: "horizontal"
|
|
352
256
|
}
|
|
353
257
|
})];
|
|
354
|
-
})], 2),
|
|
355
|
-
class: [`${
|
|
258
|
+
})], 2), n("div", {
|
|
259
|
+
class: [`${e.prefix}-pane`, "bottom-pane"],
|
|
356
260
|
style: {
|
|
357
|
-
top: `calc(${
|
|
261
|
+
top: `calc(${e.offset}% + ${e.triggerSize}px)`
|
|
358
262
|
}
|
|
359
|
-
}, [
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
var SplitPane_vue_vue_type_style_index_0_lang = "";
|
|
363
|
-
const __vue2_script$3 = {
|
|
263
|
+
}, [e._t("bottom")], 2)])]);
|
|
264
|
+
}, me = [];
|
|
265
|
+
const xe = {
|
|
364
266
|
name: "SplitPane",
|
|
365
267
|
components: {
|
|
366
|
-
Trigger
|
|
268
|
+
Trigger: pe
|
|
367
269
|
},
|
|
368
270
|
props: {
|
|
369
271
|
value: {
|
|
@@ -371,8 +273,8 @@ const __vue2_script$3 = {
|
|
|
371
273
|
default: 0.5
|
|
372
274
|
},
|
|
373
275
|
mode: {
|
|
374
|
-
validator(
|
|
375
|
-
return
|
|
276
|
+
validator(e) {
|
|
277
|
+
return ue(e, ["horizontal", "vertical"]);
|
|
376
278
|
},
|
|
377
279
|
default: "horizontal"
|
|
378
280
|
},
|
|
@@ -394,7 +296,7 @@ const __vue2_script$3 = {
|
|
|
394
296
|
prefix: "egd-split",
|
|
395
297
|
offset: 0,
|
|
396
298
|
oldOffset: 0,
|
|
397
|
-
isMoving:
|
|
299
|
+
isMoving: !1
|
|
398
300
|
};
|
|
399
301
|
},
|
|
400
302
|
computed: {
|
|
@@ -411,7 +313,7 @@ const __vue2_script$3 = {
|
|
|
411
313
|
return 100 - this.offset;
|
|
412
314
|
},
|
|
413
315
|
valueIsPx() {
|
|
414
|
-
return typeof this.value
|
|
316
|
+
return typeof this.value == "string";
|
|
415
317
|
},
|
|
416
318
|
offsetSize() {
|
|
417
319
|
return this.isHorizontal ? "offsetWidth" : "offsetHeight";
|
|
@@ -434,85 +336,45 @@ const __vue2_script$3 = {
|
|
|
434
336
|
});
|
|
435
337
|
},
|
|
436
338
|
methods: {
|
|
437
|
-
px2percent(
|
|
438
|
-
return parseFloat(
|
|
439
|
-
},
|
|
440
|
-
getComputedThresholdValue(type) {
|
|
441
|
-
const size = this.$refs.outerWrapper[this.offsetSize];
|
|
442
|
-
if (this.valueIsPx) {
|
|
443
|
-
return typeof this[type] === "string" ? this[type] : size * this[type];
|
|
444
|
-
} else {
|
|
445
|
-
return typeof this[type] === "string" ? this.px2percent(this[type], size) : this[type];
|
|
446
|
-
}
|
|
339
|
+
px2percent(e, t) {
|
|
340
|
+
return parseFloat(e) / parseFloat(t);
|
|
447
341
|
},
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
} else {
|
|
452
|
-
return Math.min(value1, value2);
|
|
453
|
-
}
|
|
342
|
+
getComputedThresholdValue(e) {
|
|
343
|
+
const t = this.$refs.outerWrapper[this.offsetSize];
|
|
344
|
+
return this.valueIsPx ? typeof this[e] == "string" ? this[e] : t * this[e] : typeof this[e] == "string" ? this.px2percent(this[e], t) : this[e];
|
|
454
345
|
},
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
return `${Math.max(parseFloat(value1), parseFloat(value2))}px`;
|
|
458
|
-
} else {
|
|
459
|
-
return Math.max(value1, value2);
|
|
460
|
-
}
|
|
346
|
+
getMin(e, t) {
|
|
347
|
+
return this.valueIsPx ? `${Math.min(parseFloat(e), parseFloat(t))}px` : Math.min(e, t);
|
|
461
348
|
},
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
return res;
|
|
349
|
+
getMax(e, t) {
|
|
350
|
+
return this.valueIsPx ? `${Math.max(parseFloat(e), parseFloat(t))}px` : Math.max(e, t);
|
|
351
|
+
},
|
|
352
|
+
getAnotherOffset(e) {
|
|
353
|
+
let t = 0;
|
|
354
|
+
return this.valueIsPx ? t = `${this.$refs.outerWrapper[this.offsetSize] - parseFloat(e)}px` : t = 1 - e, t;
|
|
470
355
|
},
|
|
471
356
|
handleMove(e) {
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
const anotherValue = this.getAnotherOffset(value);
|
|
477
|
-
if (parseFloat(value) <= parseFloat(this.computedMin))
|
|
478
|
-
value = this.getMax(value, this.computedMin);
|
|
479
|
-
if (parseFloat(anotherValue) <= parseFloat(this.computedMax))
|
|
480
|
-
value = this.getAnotherOffset(this.getMax(anotherValue, this.computedMax));
|
|
481
|
-
e.atMin = this.value === this.computedMin;
|
|
482
|
-
e.atMax = this.valueIsPx ? this.getAnotherOffset(this.value) === this.computedMax : this.getAnotherOffset(this.value).toFixed(5) === this.computedMax.toFixed(5);
|
|
483
|
-
this.$emit("input", value);
|
|
484
|
-
this.$emit("on-moving", e);
|
|
357
|
+
const n = (this.isHorizontal ? e.pageX : e.pageY) - this.initOffset, s = this.$refs.outerWrapper[this.offsetSize];
|
|
358
|
+
let r = this.valueIsPx ? `${parseFloat(this.oldOffset) + n}px` : this.px2percent(s * this.oldOffset + n, s);
|
|
359
|
+
const u = this.getAnotherOffset(r);
|
|
360
|
+
parseFloat(r) <= parseFloat(this.computedMin) && (r = this.getMax(r, this.computedMin)), parseFloat(u) <= parseFloat(this.computedMax) && (r = this.getAnotherOffset(this.getMax(u, this.computedMax))), e.atMin = this.value === this.computedMin, e.atMax = this.valueIsPx ? this.getAnotherOffset(this.value) === this.computedMax : this.getAnotherOffset(this.value).toFixed(5) === this.computedMax.toFixed(5), this.$emit("input", r), this.$emit("on-moving", e);
|
|
485
361
|
},
|
|
486
362
|
handleUp() {
|
|
487
|
-
this.isMoving =
|
|
488
|
-
off(window, "mousemove", this.handleMove);
|
|
489
|
-
off(window, "mouseup", this.handleUp);
|
|
490
|
-
this.$emit("on-move-end");
|
|
363
|
+
this.isMoving = !1, z(window, "mousemove", this.handleMove), z(window, "mouseup", this.handleUp), this.$emit("on-move-end");
|
|
491
364
|
},
|
|
492
365
|
handleMousedown(e) {
|
|
493
|
-
this.initOffset = this.isHorizontal ? e.pageX : e.pageY;
|
|
494
|
-
this.oldOffset = this.value;
|
|
495
|
-
this.isMoving = true;
|
|
496
|
-
on(window, "mousemove", this.handleMove);
|
|
497
|
-
on(window, "mouseup", this.handleUp);
|
|
498
|
-
this.$emit("on-move-start");
|
|
366
|
+
this.initOffset = this.isHorizontal ? e.pageX : e.pageY, this.oldOffset = this.value, this.isMoving = !0, y(window, "mousemove", this.handleMove), y(window, "mouseup", this.handleUp), this.$emit("on-move-start");
|
|
499
367
|
}
|
|
500
368
|
}
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
this[o] = __cssModules$3[o];
|
|
507
|
-
}
|
|
369
|
+
}, w = {};
|
|
370
|
+
var $e = /* @__PURE__ */ a(xe, de, me, !1, ge, null, null, null);
|
|
371
|
+
function ge(e) {
|
|
372
|
+
for (let t in w)
|
|
373
|
+
this[t] = w[t];
|
|
508
374
|
}
|
|
509
|
-
var
|
|
510
|
-
return
|
|
511
|
-
}()
|
|
512
|
-
Split.install = function(Vue) {
|
|
513
|
-
Vue.component(Split.name, Split);
|
|
514
|
-
};
|
|
515
|
-
var JSXComponent = {
|
|
375
|
+
var I = /* @__PURE__ */ function() {
|
|
376
|
+
return $e.exports;
|
|
377
|
+
}(), _ = {
|
|
516
378
|
name: "JSXComponent",
|
|
517
379
|
props: {
|
|
518
380
|
msg: {
|
|
@@ -521,218 +383,134 @@ var JSXComponent = {
|
|
|
521
383
|
}
|
|
522
384
|
},
|
|
523
385
|
render() {
|
|
524
|
-
|
|
525
|
-
return h("div", [this.msg]);
|
|
386
|
+
return arguments[0]("div", [this.msg]);
|
|
526
387
|
}
|
|
527
388
|
};
|
|
528
|
-
const
|
|
529
|
-
if (isPlainObject(customClass) || isString(customClass)) {
|
|
530
|
-
return [fixedClass, customClass];
|
|
531
|
-
} else if (isArray(customClass)) {
|
|
532
|
-
return [fixedClass, ...customClass];
|
|
533
|
-
} else {
|
|
534
|
-
return [fixedClass];
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
const __vue2_script$2 = {
|
|
389
|
+
const h = (e, t) => k(e) || L(e) ? [t, e] : J(e) ? [t, ...e] : [t], Ce = {
|
|
538
390
|
name: "FlexColumn",
|
|
539
|
-
functional:
|
|
391
|
+
functional: !0,
|
|
540
392
|
props: {
|
|
541
393
|
verticalCenter: {
|
|
542
394
|
type: Boolean,
|
|
543
|
-
default:
|
|
395
|
+
default: !1
|
|
544
396
|
},
|
|
545
397
|
horizonCenter: {
|
|
546
398
|
type: Boolean,
|
|
547
|
-
default:
|
|
399
|
+
default: !1
|
|
548
400
|
},
|
|
549
401
|
center: {
|
|
550
402
|
type: Boolean,
|
|
551
|
-
default:
|
|
403
|
+
default: !1
|
|
552
404
|
},
|
|
553
405
|
textCenter: {
|
|
554
406
|
type: Boolean,
|
|
555
|
-
default:
|
|
407
|
+
default: !1
|
|
556
408
|
}
|
|
557
409
|
},
|
|
558
|
-
render(
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
viewClass.push("horizon-center");
|
|
562
|
-
viewClass.push("vertical-center");
|
|
563
|
-
} else {
|
|
564
|
-
if (props.horizonCenter) {
|
|
565
|
-
viewClass.push("horizon-center");
|
|
566
|
-
}
|
|
567
|
-
if (props.verticalCenter) {
|
|
568
|
-
viewClass.push("vertical-center");
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
if (props.textCenter) {
|
|
572
|
-
viewClass.push("text-center");
|
|
573
|
-
}
|
|
574
|
-
return createElement("div", __spreadProps(__spreadValues({}, data), { class: viewClass }), children);
|
|
410
|
+
render(e, { data: t, children: n, props: s }) {
|
|
411
|
+
const r = h(t.class, "flex-column");
|
|
412
|
+
return s.center || s.horizonCenter && s.verticalCenter ? (r.push("horizon-center"), r.push("vertical-center")) : (s.horizonCenter && r.push("horizon-center"), s.verticalCenter && r.push("vertical-center")), s.textCenter && r.push("text-center"), e("div", c(f({}, t), { class: r }), n);
|
|
575
413
|
}
|
|
576
414
|
};
|
|
577
|
-
let
|
|
578
|
-
const
|
|
579
|
-
var
|
|
580
|
-
function
|
|
581
|
-
for (let
|
|
582
|
-
this[
|
|
583
|
-
}
|
|
415
|
+
let ye, ze;
|
|
416
|
+
const M = {};
|
|
417
|
+
var Se = /* @__PURE__ */ a(Ce, ye, ze, !1, we, null, null, null);
|
|
418
|
+
function we(e) {
|
|
419
|
+
for (let t in M)
|
|
420
|
+
this[t] = M[t];
|
|
584
421
|
}
|
|
585
|
-
var
|
|
586
|
-
return
|
|
422
|
+
var E = /* @__PURE__ */ function() {
|
|
423
|
+
return Se.exports;
|
|
587
424
|
}();
|
|
588
|
-
const
|
|
425
|
+
const Me = {
|
|
589
426
|
name: "FlexItem",
|
|
590
|
-
functional:
|
|
427
|
+
functional: !0,
|
|
591
428
|
props: {
|
|
592
429
|
flexRow: {
|
|
593
430
|
type: Boolean,
|
|
594
|
-
default:
|
|
431
|
+
default: !1
|
|
595
432
|
},
|
|
596
433
|
flexColumn: {
|
|
597
434
|
type: Boolean,
|
|
598
|
-
default:
|
|
435
|
+
default: !1
|
|
599
436
|
},
|
|
600
437
|
verticalCenter: {
|
|
601
438
|
type: Boolean,
|
|
602
|
-
default:
|
|
439
|
+
default: !1
|
|
603
440
|
},
|
|
604
441
|
horizonCenter: {
|
|
605
442
|
type: Boolean,
|
|
606
|
-
default:
|
|
443
|
+
default: !1
|
|
607
444
|
},
|
|
608
445
|
center: {
|
|
609
446
|
type: Boolean,
|
|
610
|
-
default:
|
|
447
|
+
default: !1
|
|
611
448
|
},
|
|
612
449
|
textCenter: {
|
|
613
450
|
type: Boolean,
|
|
614
|
-
default:
|
|
451
|
+
default: !1
|
|
615
452
|
},
|
|
616
453
|
relative: {
|
|
617
454
|
type: Boolean,
|
|
618
|
-
default:
|
|
455
|
+
default: !1
|
|
619
456
|
},
|
|
620
457
|
absolute: {
|
|
621
458
|
type: Boolean,
|
|
622
|
-
default:
|
|
459
|
+
default: !1
|
|
623
460
|
}
|
|
624
461
|
},
|
|
625
|
-
render(
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
viewClass.push("flex-item-relative");
|
|
629
|
-
}
|
|
630
|
-
if (props.center || props.horizonCenter && props.verticalCenter) {
|
|
631
|
-
viewClass.push("horizon-center");
|
|
632
|
-
viewClass.push("vertical-center");
|
|
633
|
-
} else {
|
|
634
|
-
if (props.horizonCenter) {
|
|
635
|
-
viewClass.push("horizon-center");
|
|
636
|
-
}
|
|
637
|
-
if (props.verticalCenter) {
|
|
638
|
-
viewClass.push("vertical-center");
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
if (props.textCenter) {
|
|
642
|
-
viewClass.push("text-center");
|
|
643
|
-
}
|
|
644
|
-
if (props.flexColumn) {
|
|
645
|
-
viewClass.push("flex-column");
|
|
646
|
-
}
|
|
647
|
-
if (props.flexRow) {
|
|
648
|
-
viewClass.push("flex-row");
|
|
649
|
-
}
|
|
650
|
-
if (props.absolute) {
|
|
651
|
-
return createElement("div", __spreadProps(__spreadValues({}, data), { class: viewClass }), [createElement("div", { class: "absolute", style: "overflow:auto" }, children)]);
|
|
652
|
-
} else {
|
|
653
|
-
return createElement("div", __spreadProps(__spreadValues({}, data), { class: viewClass }), children);
|
|
654
|
-
}
|
|
462
|
+
render(e, { children: t, data: n, props: s }) {
|
|
463
|
+
const r = h(n.class, s.relative ? "flex-item-relative" : "flex-item");
|
|
464
|
+
return s.absolute && !s.relative && r.push("flex-item-relative"), s.center || s.horizonCenter && s.verticalCenter ? (r.push("horizon-center"), r.push("vertical-center")) : (s.horizonCenter && r.push("horizon-center"), s.verticalCenter && r.push("vertical-center")), s.textCenter && r.push("text-center"), s.flexColumn && r.push("flex-column"), s.flexRow && r.push("flex-row"), s.absolute ? e("div", c(f({}, n), { class: r }), [e("div", { class: "absolute", style: "overflow:auto" }, t)]) : e("div", c(f({}, n), { class: r }), t);
|
|
655
465
|
}
|
|
656
466
|
};
|
|
657
|
-
let
|
|
658
|
-
const
|
|
659
|
-
var
|
|
660
|
-
function
|
|
661
|
-
for (let
|
|
662
|
-
this[
|
|
663
|
-
}
|
|
467
|
+
let Fe, Be;
|
|
468
|
+
const F = {};
|
|
469
|
+
var Oe = /* @__PURE__ */ a(Me, Fe, Be, !1, Re, null, null, null);
|
|
470
|
+
function Re(e) {
|
|
471
|
+
for (let t in F)
|
|
472
|
+
this[t] = F[t];
|
|
664
473
|
}
|
|
665
|
-
var
|
|
666
|
-
return
|
|
474
|
+
var T = /* @__PURE__ */ function() {
|
|
475
|
+
return Oe.exports;
|
|
667
476
|
}();
|
|
668
|
-
const
|
|
477
|
+
const be = {
|
|
669
478
|
name: "FlexRow",
|
|
670
|
-
functional:
|
|
479
|
+
functional: !0,
|
|
671
480
|
props: {
|
|
672
481
|
verticalCenter: {
|
|
673
482
|
type: Boolean,
|
|
674
|
-
default:
|
|
483
|
+
default: !1
|
|
675
484
|
},
|
|
676
485
|
horizonCenter: {
|
|
677
486
|
type: Boolean,
|
|
678
|
-
default:
|
|
487
|
+
default: !1
|
|
679
488
|
},
|
|
680
489
|
center: {
|
|
681
490
|
type: Boolean,
|
|
682
|
-
default:
|
|
491
|
+
default: !1
|
|
683
492
|
},
|
|
684
493
|
textCenter: {
|
|
685
494
|
type: Boolean,
|
|
686
|
-
default:
|
|
495
|
+
default: !1
|
|
687
496
|
}
|
|
688
497
|
},
|
|
689
|
-
render(
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
viewClass.push("horizon-center");
|
|
693
|
-
viewClass.push("vertical-center");
|
|
694
|
-
} else {
|
|
695
|
-
if (props.horizonCenter) {
|
|
696
|
-
viewClass.push("horizon-center");
|
|
697
|
-
}
|
|
698
|
-
if (props.verticalCenter) {
|
|
699
|
-
viewClass.push("vertical-center");
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
if (props.textCenter) {
|
|
703
|
-
viewClass.push("text-center");
|
|
704
|
-
}
|
|
705
|
-
return createElement("div", __spreadProps(__spreadValues({}, data), { class: viewClass }), children);
|
|
498
|
+
render(e, { data: t, children: n, props: s }) {
|
|
499
|
+
const r = h(t.class, "flex-row");
|
|
500
|
+
return s.center || s.horizonCenter && s.verticalCenter ? (r.push("horizon-center"), r.push("vertical-center")) : (s.horizonCenter && r.push("horizon-center"), s.verticalCenter && r.push("vertical-center")), s.textCenter && r.push("text-center"), e("div", c(f({}, t), { class: r }), n);
|
|
706
501
|
}
|
|
707
502
|
};
|
|
708
|
-
let
|
|
709
|
-
const
|
|
710
|
-
var
|
|
711
|
-
function
|
|
712
|
-
for (let
|
|
713
|
-
this[
|
|
714
|
-
}
|
|
503
|
+
let Ie, Ee;
|
|
504
|
+
const B = {};
|
|
505
|
+
var Te = /* @__PURE__ */ a(be, Ie, Ee, !1, Pe, null, null, null);
|
|
506
|
+
function Pe(e) {
|
|
507
|
+
for (let t in B)
|
|
508
|
+
this[t] = B[t];
|
|
715
509
|
}
|
|
716
|
-
var
|
|
717
|
-
return
|
|
510
|
+
var P = /* @__PURE__ */ function() {
|
|
511
|
+
return Te.exports;
|
|
718
512
|
}();
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
};
|
|
722
|
-
FlexItem.install = function(Vue) {
|
|
723
|
-
Vue.component(FlexItem.name, FlexItem);
|
|
724
|
-
};
|
|
725
|
-
FlexRow.install = function(Vue) {
|
|
726
|
-
Vue.component(FlexRow.name, FlexRow);
|
|
727
|
-
};
|
|
728
|
-
function install(Vue) {
|
|
729
|
-
Vue.use(EmptyView);
|
|
730
|
-
Vue.use(FlexScroller);
|
|
731
|
-
Vue.use(NotImplement);
|
|
732
|
-
Vue.use(Split);
|
|
733
|
-
Vue.use(FlexColumn);
|
|
734
|
-
Vue.use(FlexItem);
|
|
735
|
-
Vue.use(FlexRow);
|
|
736
|
-
Vue.component(JSXComponent.name, JSXComponent);
|
|
513
|
+
function Ne(e) {
|
|
514
|
+
e.use(O), e.use(R), e.use(b), e.use(I), e.use(E), e.use(T), e.use(P), e.component(_.name, _);
|
|
737
515
|
}
|
|
738
|
-
export { EmptyView, FlexColumn, FlexItem, FlexRow, FlexScroller, JSXComponent, NotImplement,
|
|
516
|
+
export { O as EmptyView, E as FlexColumn, T as FlexItem, P as FlexRow, R as FlexScroller, _ as JSXComponent, b as NotImplement, I as SplitPane, Ne as default, Y as version };
|