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