@web-utils/component 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +107 -107
- package/package.json +1 -1
- package/web-types.json +16 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
var A = Object.defineProperty, H = Object.defineProperties;
|
|
2
2
|
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var S = Object.getOwnPropertySymbols;
|
|
4
4
|
var X = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var w = (e, t, n) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, u = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
|
-
X.call(t, n) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
U.call(t, n) &&
|
|
7
|
+
X.call(t, n) && w(e, n, t[n]);
|
|
8
|
+
if (S)
|
|
9
|
+
for (var n of S(t))
|
|
10
|
+
U.call(t, n) && w(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, c = (e, t) => H(e, V(t));
|
|
13
13
|
import { isPlainObject as k, isString as L, isArray as J } from "@web-utils/core";
|
|
14
|
-
|
|
15
|
-
var q = function() {
|
|
14
|
+
var Y = function() {
|
|
16
15
|
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
17
16
|
return n("div", {
|
|
18
17
|
staticClass: "empty-view",
|
|
@@ -23,32 +22,32 @@ var q = function() {
|
|
|
23
22
|
}, [e._t("default", function() {
|
|
24
23
|
return [e._v(e._s(e.emptyTips))];
|
|
25
24
|
})], 2);
|
|
26
|
-
},
|
|
27
|
-
function a(e, t, n, s, r,
|
|
25
|
+
}, q = [];
|
|
26
|
+
function a(e, t, n, s, r, f, C, N) {
|
|
28
27
|
var i = typeof e == "function" ? e.options : e;
|
|
29
|
-
t && (i.render = t, i.staticRenderFns = n, i._compiled = !0), s && (i.functional = !0),
|
|
28
|
+
t && (i.render = t, i.staticRenderFns = n, i._compiled = !0), s && (i.functional = !0), f && (i._scopeId = "data-v-" + f);
|
|
30
29
|
var l;
|
|
31
|
-
if (
|
|
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(
|
|
30
|
+
if (C ? (l = function(o) {
|
|
31
|
+
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);
|
|
33
32
|
}, i._ssrRegister = l) : r && (l = N ? function() {
|
|
34
33
|
r.call(this, (i.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
35
34
|
} : r), l)
|
|
36
35
|
if (i.functional) {
|
|
37
36
|
i._injectStyles = l;
|
|
38
37
|
var W = i.render;
|
|
39
|
-
i.render = function(j,
|
|
40
|
-
return l.call(
|
|
38
|
+
i.render = function(j, z) {
|
|
39
|
+
return l.call(z), W(j, z);
|
|
41
40
|
};
|
|
42
41
|
} else {
|
|
43
|
-
var
|
|
44
|
-
i.beforeCreate =
|
|
42
|
+
var y = i.beforeCreate;
|
|
43
|
+
i.beforeCreate = y ? [].concat(y, l) : [l];
|
|
45
44
|
}
|
|
46
45
|
return {
|
|
47
46
|
exports: e,
|
|
48
47
|
options: i
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
|
-
const
|
|
50
|
+
const D = {
|
|
52
51
|
name: "EmptyView",
|
|
53
52
|
props: {
|
|
54
53
|
emptyTips: {
|
|
@@ -64,15 +63,15 @@ const G = {
|
|
|
64
63
|
default: "100%"
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
},
|
|
68
|
-
var
|
|
69
|
-
function
|
|
70
|
-
for (let t in
|
|
71
|
-
this[t] =
|
|
66
|
+
}, M = {};
|
|
67
|
+
var G = /* @__PURE__ */ a(D, Y, q, !1, K, null, null, null);
|
|
68
|
+
function K(e) {
|
|
69
|
+
for (let t in M)
|
|
70
|
+
this[t] = M[t];
|
|
72
71
|
}
|
|
73
|
-
var
|
|
74
|
-
return
|
|
75
|
-
}(),
|
|
72
|
+
var _ = /* @__PURE__ */ function() {
|
|
73
|
+
return G.exports;
|
|
74
|
+
}(), Q = function() {
|
|
76
75
|
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
77
76
|
return n("div", {
|
|
78
77
|
staticClass: "flex-scroller-wrapper"
|
|
@@ -83,8 +82,8 @@ var O = /* @__PURE__ */ function() {
|
|
|
83
82
|
"content-scroll": e.contentScroll
|
|
84
83
|
}, e.contentClass]
|
|
85
84
|
}, [e._t("default")], 2)]);
|
|
86
|
-
},
|
|
87
|
-
const
|
|
85
|
+
}, Z = [];
|
|
86
|
+
const ee = {
|
|
88
87
|
name: "FlexScroller",
|
|
89
88
|
props: {
|
|
90
89
|
flexColumn: Boolean,
|
|
@@ -95,18 +94,18 @@ const te = {
|
|
|
95
94
|
default: !0
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
|
-
},
|
|
99
|
-
var
|
|
100
|
-
function
|
|
101
|
-
for (let t in
|
|
102
|
-
this[t] =
|
|
97
|
+
}, F = {};
|
|
98
|
+
var te = /* @__PURE__ */ a(ee, Q, Z, !1, ne, null, null, null);
|
|
99
|
+
function ne(e) {
|
|
100
|
+
for (let t in F)
|
|
101
|
+
this[t] = F[t];
|
|
103
102
|
}
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
}(),
|
|
103
|
+
var h = /* @__PURE__ */ function() {
|
|
104
|
+
return te.exports;
|
|
105
|
+
}(), re = function() {
|
|
107
106
|
var e = this, t = e.$createElement;
|
|
108
107
|
return e._self._c, e._m(0);
|
|
109
|
-
},
|
|
108
|
+
}, se = [function() {
|
|
110
109
|
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
111
110
|
return n("div", {
|
|
112
111
|
staticClass: "not-implement"
|
|
@@ -114,30 +113,30 @@ var R = /* @__PURE__ */ function() {
|
|
|
114
113
|
staticClass: "fa fa-wrench"
|
|
115
114
|
}), e._v(" \u5EFA\u8BBE\u4E2D... ")])]);
|
|
116
115
|
}];
|
|
117
|
-
const
|
|
116
|
+
const ie = {
|
|
118
117
|
name: "NotImplement"
|
|
119
|
-
},
|
|
120
|
-
var
|
|
121
|
-
function
|
|
122
|
-
for (let t in
|
|
123
|
-
this[t] =
|
|
118
|
+
}, B = {};
|
|
119
|
+
var oe = /* @__PURE__ */ a(ie, re, se, !1, le, "f91d5e80", null, null);
|
|
120
|
+
function le(e) {
|
|
121
|
+
for (let t in B)
|
|
122
|
+
this[t] = B[t];
|
|
124
123
|
}
|
|
125
|
-
var
|
|
126
|
-
return
|
|
124
|
+
var p = /* @__PURE__ */ function() {
|
|
125
|
+
return oe.exports;
|
|
127
126
|
}();
|
|
128
|
-
function
|
|
127
|
+
function ae(e, t) {
|
|
129
128
|
for (let n = 0; n < t.length; n++)
|
|
130
129
|
if (e === t[n])
|
|
131
130
|
return !0;
|
|
132
131
|
return !1;
|
|
133
132
|
}
|
|
134
|
-
const
|
|
133
|
+
const O = function() {
|
|
135
134
|
return document.addEventListener ? function(e, t, n) {
|
|
136
135
|
e && t && n && e.addEventListener(t, n, !1);
|
|
137
136
|
} : function(e, t, n) {
|
|
138
137
|
e && t && n && e.attachEvent(`on${t}`, n);
|
|
139
138
|
};
|
|
140
|
-
}(),
|
|
139
|
+
}(), R = function() {
|
|
141
140
|
return document.removeEventListener ? function(e, t, n) {
|
|
142
141
|
e && t && e.removeEventListener(t, n, !1);
|
|
143
142
|
} : function(e, t, n) {
|
|
@@ -151,7 +150,7 @@ var fe = function() {
|
|
|
151
150
|
}, [e.showIcon ? n("div", {
|
|
152
151
|
class: e.barConClasses
|
|
153
152
|
}, e._m(0), 0) : e._e()]);
|
|
154
|
-
},
|
|
153
|
+
}, ue = [function() {
|
|
155
154
|
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
156
155
|
return e._l(8, function(s) {
|
|
157
156
|
return n("i", {
|
|
@@ -160,7 +159,7 @@ var fe = function() {
|
|
|
160
159
|
});
|
|
161
160
|
});
|
|
162
161
|
}];
|
|
163
|
-
const
|
|
162
|
+
const ce = {
|
|
164
163
|
name: "Trigger",
|
|
165
164
|
props: {
|
|
166
165
|
mode: String,
|
|
@@ -193,15 +192,15 @@ const _e = {
|
|
|
193
192
|
];
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
|
-
},
|
|
197
|
-
var
|
|
198
|
-
function
|
|
199
|
-
for (let t in
|
|
200
|
-
this[t] =
|
|
195
|
+
}, b = {};
|
|
196
|
+
var _e = /* @__PURE__ */ a(ce, fe, ue, !1, he, null, null, null);
|
|
197
|
+
function he(e) {
|
|
198
|
+
for (let t in b)
|
|
199
|
+
this[t] = b[t];
|
|
201
200
|
}
|
|
202
201
|
var pe = /* @__PURE__ */ function() {
|
|
203
|
-
return
|
|
204
|
-
}(),
|
|
202
|
+
return _e.exports;
|
|
203
|
+
}(), ve = function() {
|
|
205
204
|
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
206
205
|
return n("div", {
|
|
207
206
|
ref: "outerWrapper",
|
|
@@ -261,8 +260,8 @@ var pe = /* @__PURE__ */ function() {
|
|
|
261
260
|
top: `calc(${e.offset}% + ${e.triggerSize}px)`
|
|
262
261
|
}
|
|
263
262
|
}, [e._t("bottom")], 2)])]);
|
|
264
|
-
},
|
|
265
|
-
const
|
|
263
|
+
}, de = [];
|
|
264
|
+
const me = {
|
|
266
265
|
name: "SplitPane",
|
|
267
266
|
components: {
|
|
268
267
|
Trigger: pe
|
|
@@ -274,7 +273,7 @@ const xe = {
|
|
|
274
273
|
},
|
|
275
274
|
mode: {
|
|
276
275
|
validator(e) {
|
|
277
|
-
return
|
|
276
|
+
return ae(e, ["horizontal", "vertical"]);
|
|
278
277
|
},
|
|
279
278
|
default: "horizontal"
|
|
280
279
|
},
|
|
@@ -356,25 +355,25 @@ const xe = {
|
|
|
356
355
|
handleMove(e) {
|
|
357
356
|
const n = (this.isHorizontal ? e.pageX : e.pageY) - this.initOffset, s = this.$refs.outerWrapper[this.offsetSize];
|
|
358
357
|
let r = this.valueIsPx ? `${parseFloat(this.oldOffset) + n}px` : this.px2percent(s * this.oldOffset + n, s);
|
|
359
|
-
const
|
|
360
|
-
parseFloat(r) <= parseFloat(this.computedMin) && (r = this.getMax(r, this.computedMin)), parseFloat(
|
|
358
|
+
const f = this.getAnotherOffset(r);
|
|
359
|
+
parseFloat(r) <= parseFloat(this.computedMin) && (r = this.getMax(r, this.computedMin)), parseFloat(f) <= parseFloat(this.computedMax) && (r = this.getAnotherOffset(this.getMax(f, 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);
|
|
361
360
|
},
|
|
362
361
|
handleUp() {
|
|
363
|
-
this.isMoving = !1,
|
|
362
|
+
this.isMoving = !1, R(window, "mousemove", this.handleMove), R(window, "mouseup", this.handleUp), this.$emit("on-move-end");
|
|
364
363
|
},
|
|
365
364
|
handleMousedown(e) {
|
|
366
|
-
this.initOffset = this.isHorizontal ? e.pageX : e.pageY, this.oldOffset = this.value, this.isMoving = !0,
|
|
365
|
+
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");
|
|
367
366
|
}
|
|
368
367
|
}
|
|
369
|
-
},
|
|
370
|
-
var
|
|
371
|
-
function
|
|
372
|
-
for (let t in
|
|
373
|
-
this[t] =
|
|
368
|
+
}, I = {};
|
|
369
|
+
var xe = /* @__PURE__ */ a(me, ve, de, !1, $e, null, null, null);
|
|
370
|
+
function $e(e) {
|
|
371
|
+
for (let t in I)
|
|
372
|
+
this[t] = I[t];
|
|
374
373
|
}
|
|
375
|
-
var
|
|
376
|
-
return
|
|
377
|
-
}(),
|
|
374
|
+
var v = /* @__PURE__ */ function() {
|
|
375
|
+
return xe.exports;
|
|
376
|
+
}(), d = {
|
|
378
377
|
name: "JSXComponent",
|
|
379
378
|
props: {
|
|
380
379
|
msg: {
|
|
@@ -386,7 +385,7 @@ var I = /* @__PURE__ */ function() {
|
|
|
386
385
|
return arguments[0]("div", [this.msg]);
|
|
387
386
|
}
|
|
388
387
|
};
|
|
389
|
-
const
|
|
388
|
+
const g = (e, t) => k(e) || L(e) ? [t, e] : J(e) ? [t, ...e] : [t], ge = {
|
|
390
389
|
name: "FlexColumn",
|
|
391
390
|
functional: !0,
|
|
392
391
|
props: {
|
|
@@ -408,21 +407,21 @@ const h = (e, t) => k(e) || L(e) ? [t, e] : J(e) ? [t, ...e] : [t], Ce = {
|
|
|
408
407
|
}
|
|
409
408
|
},
|
|
410
409
|
render(e, { data: t, children: n, props: s }) {
|
|
411
|
-
const r =
|
|
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(
|
|
410
|
+
const r = g(t.class, "flex-column");
|
|
411
|
+
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(u({}, t), { class: r }), n);
|
|
413
412
|
}
|
|
414
413
|
};
|
|
415
|
-
let
|
|
416
|
-
const
|
|
417
|
-
var
|
|
418
|
-
function
|
|
419
|
-
for (let t in
|
|
420
|
-
this[t] =
|
|
414
|
+
let Ce, ye;
|
|
415
|
+
const E = {};
|
|
416
|
+
var ze = /* @__PURE__ */ a(ge, Ce, ye, !1, Se, null, null, null);
|
|
417
|
+
function Se(e) {
|
|
418
|
+
for (let t in E)
|
|
419
|
+
this[t] = E[t];
|
|
421
420
|
}
|
|
422
|
-
var
|
|
423
|
-
return
|
|
421
|
+
var m = /* @__PURE__ */ function() {
|
|
422
|
+
return ze.exports;
|
|
424
423
|
}();
|
|
425
|
-
const
|
|
424
|
+
const we = {
|
|
426
425
|
name: "FlexItem",
|
|
427
426
|
functional: !0,
|
|
428
427
|
props: {
|
|
@@ -460,21 +459,21 @@ const Me = {
|
|
|
460
459
|
}
|
|
461
460
|
},
|
|
462
461
|
render(e, { children: t, data: n, props: s }) {
|
|
463
|
-
const r =
|
|
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(
|
|
462
|
+
const r = g(n.class, s.relative ? "flex-item-relative" : "flex-item");
|
|
463
|
+
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(u({}, n), { class: r }), [e("div", { class: "absolute", style: "overflow:auto" }, t)]) : e("div", c(u({}, n), { class: r }), t);
|
|
465
464
|
}
|
|
466
465
|
};
|
|
467
|
-
let
|
|
468
|
-
const
|
|
469
|
-
var
|
|
470
|
-
function
|
|
471
|
-
for (let t in
|
|
472
|
-
this[t] =
|
|
466
|
+
let Me, Fe;
|
|
467
|
+
const T = {};
|
|
468
|
+
var Be = /* @__PURE__ */ a(we, Me, Fe, !1, Oe, null, null, null);
|
|
469
|
+
function Oe(e) {
|
|
470
|
+
for (let t in T)
|
|
471
|
+
this[t] = T[t];
|
|
473
472
|
}
|
|
474
|
-
var
|
|
475
|
-
return
|
|
473
|
+
var x = /* @__PURE__ */ function() {
|
|
474
|
+
return Be.exports;
|
|
476
475
|
}();
|
|
477
|
-
const
|
|
476
|
+
const Re = {
|
|
478
477
|
name: "FlexRow",
|
|
479
478
|
functional: !0,
|
|
480
479
|
props: {
|
|
@@ -496,21 +495,22 @@ const be = {
|
|
|
496
495
|
}
|
|
497
496
|
},
|
|
498
497
|
render(e, { data: t, children: n, props: s }) {
|
|
499
|
-
const r =
|
|
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(
|
|
498
|
+
const r = g(t.class, "flex-row");
|
|
499
|
+
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(u({}, t), { class: r }), n);
|
|
501
500
|
}
|
|
502
501
|
};
|
|
503
|
-
let
|
|
504
|
-
const
|
|
505
|
-
var
|
|
506
|
-
function
|
|
507
|
-
for (let t in
|
|
508
|
-
this[t] =
|
|
502
|
+
let be, Ie;
|
|
503
|
+
const P = {};
|
|
504
|
+
var Ee = /* @__PURE__ */ a(Re, be, Ie, !1, Te, null, null, null);
|
|
505
|
+
function Te(e) {
|
|
506
|
+
for (let t in P)
|
|
507
|
+
this[t] = P[t];
|
|
509
508
|
}
|
|
510
|
-
var
|
|
511
|
-
return
|
|
509
|
+
var $ = /* @__PURE__ */ function() {
|
|
510
|
+
return Ee.exports;
|
|
512
511
|
}();
|
|
512
|
+
const Pe = "1.0.10";
|
|
513
513
|
function Ne(e) {
|
|
514
|
-
e.
|
|
514
|
+
e.component(_.name, _), e.component(h.name, h), e.component(p.name, p), e.component(v.name, v), e.component(m.name, m), e.component(x.name, x), e.component($.name, $), e.component(d.name, d);
|
|
515
515
|
}
|
|
516
|
-
export {
|
|
516
|
+
export { _ as EmptyView, m as FlexColumn, x as FlexItem, $ as FlexRow, h as FlexScroller, d as JSXComponent, p as NotImplement, v as SplitPane, Ne as default, Pe as version };
|
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@web-utils/component",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.9",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -75,6 +75,21 @@
|
|
|
75
75
|
"name": "default"
|
|
76
76
|
}
|
|
77
77
|
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "FlexRow"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "FlexItem"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "NotImplement"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "FlexColumn"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "JSXComponent"
|
|
78
93
|
}
|
|
79
94
|
]
|
|
80
95
|
}
|