@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 CHANGED
@@ -1,18 +1,17 @@
1
1
  var A = Object.defineProperty, H = Object.defineProperties;
2
2
  var V = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
3
+ var S = Object.getOwnPropertySymbols;
4
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) => {
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) && 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]);
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
- const Y = "1.0.9";
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
- }, D = [];
27
- function a(e, t, n, s, r, u, v, N) {
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), u && (i._scopeId = "data-v-" + u);
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 (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);
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, d) {
40
- return l.call(d), W(j, d);
38
+ i.render = function(j, z) {
39
+ return l.call(z), W(j, z);
41
40
  };
42
41
  } else {
43
- var p = i.beforeCreate;
44
- i.beforeCreate = p ? [].concat(p, l) : [l];
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 G = {
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 K = /* @__PURE__ */ a(G, q, D, !1, Q, null, null, null);
69
- function Q(e) {
70
- for (let t in $)
71
- this[t] = $[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 O = /* @__PURE__ */ function() {
74
- return K.exports;
75
- }(), Z = function() {
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
- }, ee = [];
87
- const te = {
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
- }, 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];
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 R = /* @__PURE__ */ function() {
105
- return ne.exports;
106
- }(), se = function() {
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
- }, ie = [function() {
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 oe = {
116
+ const ie = {
118
117
  name: "NotImplement"
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];
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 b = /* @__PURE__ */ function() {
126
- return le.exports;
124
+ var p = /* @__PURE__ */ function() {
125
+ return oe.exports;
127
126
  }();
128
- function ue(e, t) {
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 y = function() {
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
- }(), z = function() {
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
- }, ce = [function() {
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 _e = {
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
- }, 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];
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 he.exports;
204
- }(), de = function() {
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
- }, me = [];
265
- const xe = {
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 ue(e, ["horizontal", "vertical"]);
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 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);
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, z(window, "mousemove", this.handleMove), z(window, "mouseup", this.handleUp), this.$emit("on-move-end");
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, y(window, "mousemove", this.handleMove), y(window, "mouseup", this.handleUp), this.$emit("on-move-start");
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
- }, 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];
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 I = /* @__PURE__ */ function() {
376
- return $e.exports;
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 h = (e, t) => k(e) || L(e) ? [t, e] : J(e) ? [t, ...e] : [t], Ce = {
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 = 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);
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 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];
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 E = /* @__PURE__ */ function() {
423
- return Se.exports;
421
+ var m = /* @__PURE__ */ function() {
422
+ return ze.exports;
424
423
  }();
425
- const Me = {
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 = 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);
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 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];
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 T = /* @__PURE__ */ function() {
475
- return Oe.exports;
473
+ var x = /* @__PURE__ */ function() {
474
+ return Be.exports;
476
475
  }();
477
- const be = {
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 = 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);
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 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];
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 P = /* @__PURE__ */ function() {
511
- return Te.exports;
509
+ var $ = /* @__PURE__ */ function() {
510
+ return Ee.exports;
512
511
  }();
512
+ const Pe = "1.0.10";
513
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, _);
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 { 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 };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
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.2",
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
  }