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