@web-utils/component 2.8.14 → 2.8.15

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.
@@ -16,8 +16,10 @@ var c = (t, e, o) => new Promise((r, s) => {
16
16
  });
17
17
  import { hasOwn as d, toStringArray as b, animate as v, isInContainer as _ } from "@web-utils/core";
18
18
  import { merge as g } from "@web-utils/integrations/lodash";
19
- import { n as y } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
20
- var w = function() {
19
+ import y from "@web-utils/component/resize-observer";
20
+ import "@web-utils/component/resize-observer/style.css";
21
+ import { n as w } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
22
+ var x = function() {
21
23
  var t = this, e = t.$createElement, o = t._self._c || e;
22
24
  return o("div", {
23
25
  class: ["form-view", t.className]
@@ -203,16 +205,19 @@ var w = function() {
203
205
  "font-size": "16px"
204
206
  }
205
207
  }) : t._e()], 1);
206
- }, x = [];
207
- const p = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], $ = p.map((t) => `${t}-down`), S = ["back", "withdraw", "edit"], m = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], u = (t, e) => {
208
+ }, $ = [];
209
+ const p = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], S = p.map((t) => `${t}-down`), F = ["back", "withdraw", "edit"], m = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], u = (t, e) => {
208
210
  if (t.classList.contains(e))
209
211
  return t;
210
212
  let o = t.parentNode;
211
213
  for (; o && !o.classList.contains(e); )
212
214
  o = o.parentNode;
213
215
  return o.classList.contains(e) ? o : null;
214
- }, F = {
216
+ }, k = {
215
217
  name: "FormView",
218
+ components: {
219
+ ResizeObserver: y
220
+ },
216
221
  inject: {
217
222
  flowContext: {
218
223
  default: {}
@@ -273,7 +278,7 @@ const p = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
273
278
  return this.toolbarProps.buttons.filter((t) => !m.includes(t) && t.indexOf(":down") < 0).map((t) => t.replace(":up", ""));
274
279
  },
275
280
  footerBarButtons() {
276
- let t = this.toolbarProps.buttons.filter((e) => !S.includes(e) && (m.includes(e) || e.indexOf(":down") > -1)).map((e) => e.replace(":down", ""));
281
+ let t = this.toolbarProps.buttons.filter((e) => !F.includes(e) && (m.includes(e) || e.indexOf(":down") > -1)).map((e) => e.replace(":down", ""));
277
282
  return t = t || [], this.$parent.isEnabled && !t.includes("cancel") && t.push("cancel"), t;
278
283
  }
279
284
  },
@@ -306,7 +311,7 @@ const p = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
306
311
  return Object.keys(this.$scopedSlots).filter((t) => p.includes(t));
307
312
  },
308
313
  getFooterSlotKeys() {
309
- return Object.keys(this.$scopedSlots).filter((t) => $.includes(t));
314
+ return Object.keys(this.$scopedSlots).filter((t) => S.includes(t));
310
315
  },
311
316
  getFooterSlotKey(t) {
312
317
  return t.replace("-down", "");
@@ -344,23 +349,23 @@ const p = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
344
349
  }
345
350
  }
346
351
  }, h = {};
347
- var k = /* @__PURE__ */ y(
348
- F,
349
- w,
352
+ var B = /* @__PURE__ */ w(
353
+ k,
350
354
  x,
355
+ $,
351
356
  !1,
352
- B,
357
+ C,
353
358
  null,
354
359
  null,
355
360
  null
356
361
  );
357
- function B(t) {
362
+ function C(t) {
358
363
  for (let e in h)
359
364
  this[e] = h[e];
360
365
  }
361
- const T = /* @__PURE__ */ function() {
362
- return k.exports;
366
+ const z = /* @__PURE__ */ function() {
367
+ return B.exports;
363
368
  }();
364
369
  export {
365
- T as default
370
+ z as default
366
371
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "2.8.14",
4
+ "version": "2.8.15",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -1,5 +1,11 @@
1
- import { n as o } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
- var a = function() {
1
+ import l from "@web-utils/component/page";
2
+ import "@web-utils/component/page/style.css";
3
+ import r from "@web-utils/component/nav-bar";
4
+ import "@web-utils/component/nav-bar/style.css";
5
+ import a from "@web-utils/component/page-header";
6
+ import "@web-utils/component/page-header/style.css";
7
+ import { n as s } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
8
+ var c = function() {
3
9
  var e = this, t = e.$createElement, n = e._self._c || t;
4
10
  return n("Page", {
5
11
  staticClass: "page-skeleton"
@@ -16,9 +22,14 @@ var a = function() {
16
22
  "content-scroll": e.contentScroll
17
23
  }, e.contentClass]
18
24
  }, [e._t("default")], 2)], 2);
19
- }, r = [];
20
- const s = {
25
+ }, i = [];
26
+ const _ = {
21
27
  name: "PageSkeleton",
28
+ components: {
29
+ Page: l,
30
+ NavBar: r,
31
+ PageHeader: a
32
+ },
22
33
  props: {
23
34
  title: String,
24
35
  flexColumn: Boolean,
@@ -33,24 +44,24 @@ const s = {
33
44
  default: !0
34
45
  }
35
46
  }
36
- }, l = {};
37
- var c = /* @__PURE__ */ o(
38
- s,
39
- a,
40
- r,
41
- !1,
47
+ }, o = {};
48
+ var u = /* @__PURE__ */ s(
42
49
  _,
50
+ c,
51
+ i,
52
+ !1,
53
+ f,
43
54
  null,
44
55
  null,
45
56
  null
46
57
  );
47
- function _(e) {
48
- for (let t in l)
49
- this[t] = l[t];
58
+ function f(e) {
59
+ for (let t in o)
60
+ this[t] = o[t];
50
61
  }
51
- const i = /* @__PURE__ */ function() {
52
- return c.exports;
62
+ const P = /* @__PURE__ */ function() {
63
+ return u.exports;
53
64
  }();
54
65
  export {
55
- i as default
66
+ P as default
56
67
  };
@@ -16,8 +16,10 @@ var c = (t, e, o) => new Promise((r, s) => {
16
16
  });
17
17
  import { hasOwn as d, toStringArray as p, delay as v, isInContainer as _ } from "@web-utils/core";
18
18
  import { merge as w } from "@web-utils/integrations/lodash";
19
- import { n as y } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
20
- var g = function() {
19
+ import y from "@web-utils/component/resize-observer";
20
+ import "@web-utils/component/resize-observer/style.css";
21
+ import { n as g } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
22
+ var x = function() {
21
23
  var t = this, e = t.$createElement, o = t._self._c || e;
22
24
  return o("div", {
23
25
  class: ["form-view", t.className]
@@ -208,16 +210,19 @@ var g = function() {
208
210
  "font-size": "16px"
209
211
  }
210
212
  }) : t._e()], 1);
211
- }, x = [];
212
- const b = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], $ = b.map((t) => `${t}-down`), S = ["back", "withdraw", "edit"], h = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], u = (t, e) => {
213
+ }, $ = [];
214
+ const b = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], S = b.map((t) => `${t}-down`), F = ["back", "withdraw", "edit"], m = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], u = (t, e) => {
213
215
  if (t.classList.contains(e))
214
216
  return t;
215
217
  let o = t.parentNode;
216
218
  for (; o && !o.classList.contains(e); )
217
219
  o = o.parentNode;
218
220
  return o.classList.contains(e) ? o : null;
219
- }, F = {
221
+ }, k = {
220
222
  name: "PresentView",
223
+ components: {
224
+ ResizeObserver: y
225
+ },
221
226
  inject: {
222
227
  flowContext: {
223
228
  default: {}
@@ -296,7 +301,7 @@ const b = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
296
301
  return Object.keys(this.$scopedSlots).filter((t) => b.includes(t));
297
302
  },
298
303
  getFooterSlotKeys() {
299
- return Object.keys(this.$scopedSlots).filter((t) => $.includes(t));
304
+ return Object.keys(this.$scopedSlots).filter((t) => S.includes(t));
300
305
  },
301
306
  getFooterSlotKey(t) {
302
307
  return t.replace("-down", "");
@@ -330,31 +335,31 @@ const b = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "a
330
335
  t && (this.$refs.formScroller.scrollTop = t), e && (this.$refs.formScroller.scrollLeft = e);
331
336
  },
332
337
  getToolbarButtons(t) {
333
- return t.filter((e) => !h.includes(e) && e.indexOf(":down") < 0).map((e) => e.replace(":up", ""));
338
+ return t.filter((e) => !m.includes(e) && e.indexOf(":down") < 0).map((e) => e.replace(":up", ""));
334
339
  },
335
340
  getFooterBarButtons(t) {
336
- let e = t.filter((o) => !S.includes(o) && (h.includes(o) || o.indexOf(":down") > -1)).map((o) => o.replace(":down", ""));
341
+ let e = t.filter((o) => !F.includes(o) && (m.includes(o) || o.indexOf(":down") > -1)).map((o) => o.replace(":down", ""));
337
342
  return e = e || [], this.$parent.isEnabled && !e.includes("cancel") && e.push("cancel"), e;
338
343
  }
339
344
  }
340
- }, m = {};
341
- var k = /* @__PURE__ */ y(
342
- F,
343
- g,
345
+ }, h = {};
346
+ var B = /* @__PURE__ */ g(
347
+ k,
344
348
  x,
349
+ $,
345
350
  !1,
346
- B,
351
+ L,
347
352
  null,
348
353
  null,
349
354
  null
350
355
  );
351
- function B(t) {
352
- for (let e in m)
353
- this[e] = m[e];
356
+ function L(t) {
357
+ for (let e in h)
358
+ this[e] = h[e];
354
359
  }
355
- const I = /* @__PURE__ */ function() {
356
- return k.exports;
360
+ const j = /* @__PURE__ */ function() {
361
+ return B.exports;
357
362
  }();
358
363
  export {
359
- I as default
364
+ j as default
360
365
  };
@@ -1,5 +1,5 @@
1
- var f = (t, e, s) => new Promise((n, i) => {
2
- var o = (r) => {
1
+ var f = (t, e, s) => new Promise((o, i) => {
2
+ var n = (r) => {
3
3
  try {
4
4
  a(s.next(r));
5
5
  } catch (l) {
@@ -11,11 +11,13 @@ var f = (t, e, s) => new Promise((n, i) => {
11
11
  } catch (l) {
12
12
  i(l);
13
13
  }
14
- }, a = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(o, g);
14
+ }, a = (r) => r.done ? o(r.value) : Promise.resolve(r.value).then(n, g);
15
15
  a((s = s.apply(t, e)).next());
16
16
  });
17
17
  import { n as d } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
18
- function v(t, e) {
18
+ import v from "@web-utils/component/resize-observer";
19
+ import "@web-utils/component/resize-observer/style.css";
20
+ function m(t, e) {
19
21
  for (let s = 0; s < e.length; s++)
20
22
  if (t === e[s])
21
23
  return !0;
@@ -27,30 +29,30 @@ const h = function() {
27
29
  } : function(t, e, s) {
28
30
  t && e && s && t.attachEvent(`on${e}`, s);
29
31
  };
30
- }(), u = function() {
32
+ }(), p = function() {
31
33
  return document.removeEventListener ? function(t, e, s) {
32
34
  t && e && t.removeEventListener(e, s, !1);
33
35
  } : function(t, e, s) {
34
36
  t && e && t.detachEvent(`on${e}`, s);
35
37
  };
36
38
  }();
37
- var m = function() {
39
+ var x = function() {
38
40
  var t = this, e = t.$createElement, s = t._self._c || e;
39
41
  return s("div", {
40
42
  class: t.classes
41
43
  }, [t.showIcon ? s("div", {
42
44
  class: t.barConClasses
43
45
  }, t._m(0), 0) : t._e()]);
44
- }, x = [function() {
46
+ }, _ = [function() {
45
47
  var t = this, e = t.$createElement, s = t._self._c || e;
46
- return t._l(8, function(n) {
48
+ return t._l(8, function(o) {
47
49
  return s("i", {
48
- key: `trigger-${n}`,
50
+ key: `trigger-${o}`,
49
51
  class: `${t.prefix}-bar`
50
52
  });
51
53
  });
52
54
  }];
53
- const _ = {
55
+ const $ = {
54
56
  name: "Trigger",
55
57
  props: {
56
58
  mode: String,
@@ -83,25 +85,25 @@ const _ = {
83
85
  ];
84
86
  }
85
87
  }
86
- }, p = {};
87
- var $ = /* @__PURE__ */ d(
88
- _,
89
- m,
88
+ }, u = {};
89
+ var M = /* @__PURE__ */ d(
90
+ $,
90
91
  x,
92
+ _,
91
93
  !1,
92
- M,
94
+ z,
93
95
  null,
94
96
  null,
95
97
  null
96
98
  );
97
- function M(t) {
98
- for (let e in p)
99
- this[e] = p[e];
99
+ function z(t) {
100
+ for (let e in u)
101
+ this[e] = u[e];
100
102
  }
101
- const z = /* @__PURE__ */ function() {
102
- return $.exports;
103
+ const O = /* @__PURE__ */ function() {
104
+ return M.exports;
103
105
  }();
104
- var O = function() {
106
+ var S = function() {
105
107
  var t = this, e = t.$createElement, s = t._self._c || e;
106
108
  return s("div", {
107
109
  ref: "outerWrapper",
@@ -170,11 +172,12 @@ var O = function() {
170
172
  notify: t.resetOffset
171
173
  }
172
174
  })], 1);
173
- }, S = [];
174
- const w = {
175
+ }, w = [];
176
+ const y = {
175
177
  name: "SplitPane",
176
178
  components: {
177
- Trigger: z
179
+ Trigger: O,
180
+ ResizeObserver: v
178
181
  },
179
182
  props: {
180
183
  value: {
@@ -183,7 +186,7 @@ const w = {
183
186
  },
184
187
  mode: {
185
188
  validator(t) {
186
- return v(t, ["horizontal", "vertical"]);
189
+ return m(t, ["horizontal", "vertical"]);
187
190
  },
188
191
  default: "horizontal"
189
192
  },
@@ -268,36 +271,36 @@ const w = {
268
271
  return this.valueIsPx ? e = `${this.$refs.outerWrapper[this.offsetSize] - parseFloat(t)}px` : e = 1 - t, e;
269
272
  },
270
273
  handleMove(t) {
271
- const s = (this.isHorizontal ? t.pageX : t.pageY) - this.initOffset, n = this.$refs.outerWrapper[this.offsetSize];
272
- let i = this.valueIsPx ? `${parseFloat(this.oldOffset) + s}px` : this.px2percent(n * this.oldOffset + s, n);
273
- const o = this.getAnotherOffset(i);
274
- parseFloat(i) <= parseFloat(this.computedMin) && (i = this.getMax(i, this.computedMin)), parseFloat(o) <= parseFloat(this.computedMax) && (i = this.getAnotherOffset(this.getMax(o, this.computedMax))), t.atMin = this.value === this.computedMin, t.atMax = this.valueIsPx ? this.getAnotherOffset(this.value) === this.computedMax : this.getAnotherOffset(this.value).toFixed(5) === this.computedMax.toFixed(5), this.$emit("input", i), this.$emit("on-moving", t);
274
+ const s = (this.isHorizontal ? t.pageX : t.pageY) - this.initOffset, o = this.$refs.outerWrapper[this.offsetSize];
275
+ let i = this.valueIsPx ? `${parseFloat(this.oldOffset) + s}px` : this.px2percent(o * this.oldOffset + s, o);
276
+ const n = this.getAnotherOffset(i);
277
+ parseFloat(i) <= parseFloat(this.computedMin) && (i = this.getMax(i, this.computedMin)), parseFloat(n) <= parseFloat(this.computedMax) && (i = this.getAnotherOffset(this.getMax(n, this.computedMax))), t.atMin = this.value === this.computedMin, t.atMax = this.valueIsPx ? this.getAnotherOffset(this.value) === this.computedMax : this.getAnotherOffset(this.value).toFixed(5) === this.computedMax.toFixed(5), this.$emit("input", i), this.$emit("on-moving", t);
275
278
  },
276
279
  handleUp() {
277
- this.isMoving = !1, u(window, "mousemove", this.handleMove), u(window, "mouseup", this.handleUp), this.$emit("on-move-end");
280
+ this.isMoving = !1, p(window, "mousemove", this.handleMove), p(window, "mouseup", this.handleUp), this.$emit("on-move-end");
278
281
  },
279
282
  handleMousedown(t) {
280
283
  this.initOffset = this.isHorizontal ? t.pageX : t.pageY, this.oldOffset = this.value, this.isMoving = !0, h(window, "mousemove", this.handleMove), h(window, "mouseup", this.handleUp), this.$emit("on-move-start");
281
284
  }
282
285
  }
283
286
  }, c = {};
284
- var y = /* @__PURE__ */ d(
285
- w,
286
- O,
287
+ var F = /* @__PURE__ */ d(
288
+ y,
287
289
  S,
290
+ w,
288
291
  !1,
289
- F,
292
+ b,
290
293
  null,
291
294
  null,
292
295
  null
293
296
  );
294
- function F(t) {
297
+ function b(t) {
295
298
  for (let e in c)
296
299
  this[e] = c[e];
297
300
  }
298
- const C = /* @__PURE__ */ function() {
299
- return y.exports;
301
+ const T = /* @__PURE__ */ function() {
302
+ return F.exports;
300
303
  }();
301
304
  export {
302
- C as default
305
+ T as default
303
306
  };
package/swiper/index.mjs CHANGED
@@ -15,8 +15,10 @@ var h = (t, e, s) => new Promise((i, r) => {
15
15
  a((s = s.apply(t, e)).next());
16
16
  });
17
17
  import { getEleWidth as u } from "@web-utils/core";
18
- import { n as p } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
19
- var f = function() {
18
+ import p from "@web-utils/component/resize-observer";
19
+ import "@web-utils/component/resize-observer/style.css";
20
+ import { n as f } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
21
+ var w = function() {
20
22
  var t = this, e = t.$createElement, s = t._self._c || e;
21
23
  return s("div", {
22
24
  staticClass: "egd-swiper"
@@ -55,9 +57,12 @@ var f = function() {
55
57
  notify: t.resize
56
58
  }
57
59
  })], 1);
58
- }, w = [];
59
- const m = {
60
+ }, m = [];
61
+ const v = {
60
62
  name: "Swiper",
63
+ components: {
64
+ ResizeObserver: p
65
+ },
61
66
  data() {
62
67
  return {
63
68
  mouseDown: !1,
@@ -156,23 +161,23 @@ const m = {
156
161
  }
157
162
  }
158
163
  }, l = {};
159
- var _ = /* @__PURE__ */ p(
160
- m,
161
- f,
164
+ var _ = /* @__PURE__ */ f(
165
+ v,
162
166
  w,
167
+ m,
163
168
  !1,
164
- v,
169
+ X,
165
170
  null,
166
171
  null,
167
172
  null
168
173
  );
169
- function v(t) {
174
+ function X(t) {
170
175
  for (let e in l)
171
176
  this[e] = l[e];
172
177
  }
173
- const x = /* @__PURE__ */ function() {
178
+ const L = /* @__PURE__ */ function() {
174
179
  return _.exports;
175
180
  }();
176
181
  export {
177
- x as default
182
+ L as default
178
183
  };
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": "2.8.14",
5
+ "version": "2.8.15",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",