@web-utils/component 4.0.9 → 4.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.
Files changed (99) hide show
  1. package/chat/index.mjs +2 -3
  2. package/chunks/{FormTemp.Bu2VCxUh.mjs → FormTemp.BQxO5IQq.mjs} +1 -1
  3. package/chunks/MonacoEditor.D31t4FTy.mjs +327 -0
  4. package/chunks/PhotoSwipe.BunkqqPu.mjs +80 -0
  5. package/chunks/{configComponents.CpKi15WN.mjs → configComponents.DQaqUQFs.mjs} +4 -4
  6. package/chunks/{core.DJEgjQW6.mjs → core.0Exl13Mz.mjs} +3 -3
  7. package/chunks/{dictionary.3O-Io7Vh.mjs → dictionary.C6NmC-bT.mjs} +16 -16
  8. package/confirm-button/index.mjs +9 -14
  9. package/confirmable/index.mjs +8 -13
  10. package/data-display/index.mjs +1 -1
  11. package/data-table-picker/index.mjs +8 -10
  12. package/editable-tree/index.mjs +2 -3
  13. package/element-dialog/index.mjs +2 -3
  14. package/flex-column/index.mjs +5 -6
  15. package/flex-item/index.mjs +5 -6
  16. package/flex-row/index.mjs +2 -3
  17. package/flow/index.mjs +2 -3
  18. package/flow-designer/index.mjs +1 -1
  19. package/flow-node/index.mjs +3 -4
  20. package/flow-viewer/index.mjs +1 -1
  21. package/form-button/index.mjs +1 -1
  22. package/form-cascader/index.mjs +13 -17
  23. package/form-checkbox/index.mjs +7 -12
  24. package/form-checkbox-group/index.mjs +9 -14
  25. package/form-date-picker/index.mjs +5 -10
  26. package/form-holder/index.mjs +4 -5
  27. package/form-input/index.mjs +6 -11
  28. package/form-input-cron-expression/index.mjs +8 -13
  29. package/form-input-email/index.mjs +12 -17
  30. package/form-input-id-card/index.mjs +15 -19
  31. package/form-input-number/index.mjs +16 -23
  32. package/form-input-phone-number/index.mjs +8 -12
  33. package/form-input-tag/index.mjs +7 -12
  34. package/form-input-time/index.mjs +2 -7
  35. package/form-item/index.mjs +2 -6
  36. package/form-radio-group/index.mjs +7 -12
  37. package/form-select/index.mjs +2 -6
  38. package/form-switch/index.mjs +7 -12
  39. package/form-table/index.mjs +22 -28
  40. package/form-table-plus/index.mjs +10 -14
  41. package/form-textarea/index.mjs +6 -11
  42. package/form-tree-select/index.mjs +9 -17
  43. package/form-tree-select-multiple/index.mjs +11 -19
  44. package/form-view/index.mjs +1 -1
  45. package/fy-array/index.mjs +2 -5
  46. package/fy-cascader/index.mjs +13 -17
  47. package/fy-checkbox/index.mjs +19 -23
  48. package/fy-code/index.mjs +9 -10
  49. package/fy-curd/index.mjs +4 -6
  50. package/fy-date/index.mjs +5 -9
  51. package/fy-draggable/index.mjs +2 -3
  52. package/fy-dynamic/index.mjs +11 -14
  53. package/fy-empty/index.mjs +3 -4
  54. package/fy-form/index.mjs +3 -6
  55. package/fy-form-design/index.mjs +13 -14
  56. package/fy-input/index.mjs +10 -14
  57. package/fy-input-color/index.mjs +11 -15
  58. package/fy-input-icon/index.mjs +5 -9
  59. package/fy-input-map/index.mjs +5 -8
  60. package/fy-input-number/index.mjs +12 -16
  61. package/fy-input-table/index.mjs +2 -5
  62. package/fy-input-tree/index.mjs +2 -5
  63. package/fy-radio/index.mjs +9 -13
  64. package/fy-rate/index.mjs +7 -11
  65. package/fy-select/index.mjs +2 -4
  66. package/fy-slider/index.mjs +7 -10
  67. package/fy-switch/index.mjs +5 -9
  68. package/fy-time/index.mjs +3 -6
  69. package/fy-title/index.mjs +12 -16
  70. package/fy-u-editor/index.mjs +2 -3
  71. package/fy-upload/index.mjs +2 -4
  72. package/image-cropper/index.mjs +2 -3
  73. package/index.mjs +369 -545
  74. package/license/index.mjs +2 -3
  75. package/monaco-editor/index.mjs +5 -205
  76. package/package.json +1 -1
  77. package/page-skeleton/index.mjs +3 -3
  78. package/pageable-table/index.mjs +3 -6
  79. package/pageable-view/index.mjs +6 -7
  80. package/photo-swipe/index.mjs +3 -36
  81. package/picker-table-view/index.mjs +23 -24
  82. package/present-view/index.mjs +1 -1
  83. package/record-video/index.mjs +10 -11
  84. package/resize-observer/index.mjs +2 -3
  85. package/search/index.mjs +2 -4
  86. package/sign/index.mjs +2 -3
  87. package/split-pane/index.mjs +1 -1
  88. package/swiper/index.mjs +1 -1
  89. package/table-column/index.mjs +4 -7
  90. package/table-view/index.mjs +4 -5
  91. package/tabs-view/index.mjs +1 -1
  92. package/text-ellipsis/index.mjs +2 -3
  93. package/toolbar/index.mjs +3 -4
  94. package/toolbar-button/index.mjs +3 -4
  95. package/verify/index.mjs +7 -8
  96. package/watermark/index.mjs +14 -15
  97. package/web-types.json +1 -1
  98. package/chunks/index.BmYCjxZQ.mjs +0 -47
  99. package/chunks/json-beautifier.Bp3GslGm.mjs +0 -123
package/toolbar/index.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  import { h as p } from "vue";
2
2
  import { copy as m, NOOP as d } from "@web-utils/core";
3
- import { h as y, b as g } from "../chunks/configComponents.CpKi15WN.mjs";
3
+ import { h as y, g } from "../chunks/configComponents.DQaqUQFs.mjs";
4
4
  import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- import "@web-utils/integrations/lodash";
6
5
  const u = {
7
6
  back: {
8
7
  label: "返回",
@@ -249,7 +248,7 @@ var v = /* @__PURE__ */ B(
249
248
  null,
250
249
  null
251
250
  );
252
- const A = v.exports;
251
+ const O = v.exports;
253
252
  export {
254
- A as default
253
+ O as default
255
254
  };
@@ -1,7 +1,6 @@
1
1
  import { isFunction as n, isArray as r } from "@web-utils/core";
2
- import { h as a } from "../chunks/configComponents.CpKi15WN.mjs";
2
+ import { h as a } from "../chunks/configComponents.DQaqUQFs.mjs";
3
3
  import { n as l } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
- import "@web-utils/integrations/lodash";
5
4
  const s = {
6
5
  name: "ToolbarButton",
7
6
  inject: {
@@ -116,7 +115,7 @@ var c = function() {
116
115
  null,
117
116
  null
118
117
  );
119
- const m = f.exports;
118
+ const g = f.exports;
120
119
  export {
121
- m as default
120
+ g as default
122
121
  };
package/verify/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { s } from "../chunks/util.DqFv_pWg.mjs";
2
- import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
- import "@web-utils/core";
2
+ import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
3
  const o = {
5
4
  name: "Verify",
6
5
  props: {
@@ -47,11 +46,11 @@ const o = {
47
46
  }
48
47
  };
49
48
  var l = function() {
50
- var t = this, r = t._self._c;
51
- return r("div", { staticClass: "avue-verify" }, t._l(t.list, function(n, i) {
52
- return r("span", { key: i, staticClass: "avue-verify__item", style: t.styleName }, [t._v(" " + t._s(n) + " ")]);
49
+ var t = this, n = t._self._c;
50
+ return n("div", { staticClass: "avue-verify" }, t._l(t.list, function(r, a) {
51
+ return n("span", { key: a, staticClass: "avue-verify__item", style: t.styleName }, [t._v(" " + t._s(r) + " ")]);
53
52
  }), 0);
54
- }, m = [], u = /* @__PURE__ */ a(
53
+ }, m = [], u = /* @__PURE__ */ i(
55
54
  o,
56
55
  l,
57
56
  m,
@@ -59,7 +58,7 @@ var l = function() {
59
58
  null,
60
59
  null
61
60
  );
62
- const f = u.exports;
61
+ const _ = u.exports;
63
62
  export {
64
- f as default
63
+ _ as default
65
64
  };
@@ -1,7 +1,6 @@
1
- import { g as p } from "../chunks/index.9OxHjTIE.mjs";
2
- import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
- import "@web-utils/core";
4
- const f = {
1
+ import { g as f } from "../chunks/index.9OxHjTIE.mjs";
2
+ import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
+ const p = {
5
4
  name: "Watermark",
6
5
  functional: !0,
7
6
  props: {
@@ -48,29 +47,29 @@ const f = {
48
47
  default: "rgba(0,0,0,0)"
49
48
  }
50
49
  },
51
- render(n, { props: { width: a, height: l, text: o, backgroundColor: s, rotate: c, color: i }, data: e }) {
52
- const r = document.createElement("canvas");
53
- r.width = a, r.height = l;
54
- const t = r.getContext("2d");
55
- return t.font = "15px Verdana", t.fillStyle = s, t.fillRect(0, 0, a, l), t.translate(a / 2, l / 2), t.rotate(c * Math.PI / 180), t.fillStyle = i, t.textAlign = "center", t.textBaseline = "middle", t.fillText(o, 0, 0), n("div", {
56
- class: p(e.class, `watermark ${e.staticClass || ""}`),
50
+ render(n, { props: { width: l, height: r, text: o, backgroundColor: s, rotate: c, color: u }, data: e }) {
51
+ const a = document.createElement("canvas");
52
+ a.width = l, a.height = r;
53
+ const t = a.getContext("2d");
54
+ return t.font = "15px Verdana", t.fillStyle = s, t.fillRect(0, 0, l, r), t.translate(l / 2, r / 2), t.rotate(c * Math.PI / 180), t.fillStyle = u, t.textAlign = "center", t.textBaseline = "middle", t.fillText(o, 0, 0), n("div", {
55
+ class: f(e.class, `watermark ${e.staticClass || ""}`),
57
56
  style: {
58
57
  ...e.style || {},
59
58
  ...e.staticStyle || {},
60
- background: `url(${r.toDataURL("image/png")}) left top repeat`
59
+ background: `url(${a.toDataURL("image/png")}) left top repeat`
61
60
  }
62
61
  });
63
62
  }
64
63
  }, m = null, d = null;
65
- var g = /* @__PURE__ */ u(
66
- f,
64
+ var g = /* @__PURE__ */ i(
65
+ p,
67
66
  m,
68
67
  d,
69
68
  !1,
70
69
  null,
71
70
  null
72
71
  );
73
- const b = g.exports;
72
+ const x = g.exports;
74
73
  export {
75
- b as default
74
+ x as default
76
75
  };
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": "4.0.9",
5
+ "version": "4.0.10",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",
@@ -1,47 +0,0 @@
1
- import s from "photoswipe";
2
- import "photoswipe/dist/photoswipe.css";
3
- function d(h) {
4
- new s(h).init();
5
- }
6
- async function b(h, n, r = { selector: "chat-image" }) {
7
- const a = h.target;
8
- if (!(!a || a.classList.contains(r.selector) || a.tagName === "IMG"))
9
- return;
10
- const t = n.querySelectorAll(r.selector === "img" ? r.selector : `.${r.selector}`), i = [...t].findIndex((o) => o === a);
11
- i >= 0 && (r.index = i);
12
- const e = await u(t);
13
- await d({ dataSource: e, index: i });
14
- }
15
- async function u(h) {
16
- const n = [];
17
- for (let r = 0, a = h.length; r < a; r++) {
18
- const t = h[r], i = t.getAttribute("data-src") || t.getAttribute("src"), e = {
19
- src: i,
20
- msrc: i,
21
- alt: t.getAttribute("data-title") || t.getAttribute("alt"),
22
- element: t
23
- }, o = t.getAttribute("data-height"), g = t.getAttribute("data-width");
24
- let c = { width: g, height: o };
25
- !o && !g && (c = await w(t), t.setAttribute("data-height", c.height), t.setAttribute("data-width", c.width)), e.w = c.width, e.width = c.width, e.h = c.height, e.height = c.height, n.push(e);
26
- }
27
- return n;
28
- }
29
- function w(h) {
30
- const n = h.getAttribute("data-src") || h.getAttribute("src"), r = h.getAttribute("data-height"), a = h.getAttribute("data-width");
31
- return r && a ? { width: a, height: r } : h.complete ? {
32
- width: h.naturalWidth,
33
- height: h.naturalHeight
34
- } : new Promise((t) => {
35
- const i = new Image();
36
- i.src = n;
37
- const e = {};
38
- i.complete ? (e.width = i.width, e.height = i.height, t(e)) : (i.onload = () => {
39
- e.width = i.width, e.height = i.height, t(e);
40
- }, i.onerror = () => {
41
- e.width = 0, e.height = 0, t(e);
42
- });
43
- });
44
- }
45
- export {
46
- b as p
47
- };
@@ -1,123 +0,0 @@
1
- const g = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, O = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
2
- let s, p;
3
- const d = {
4
- // table of character substitutions
5
- "\b": "\\b",
6
- " ": "\\t",
7
- "\n": "\\n",
8
- "\f": "\\f",
9
- "\r": "\\r",
10
- '"': '\\"',
11
- "'": "\\'",
12
- "\\": "\\\\"
13
- };
14
- let h;
15
- function N(r, i = {}) {
16
- const n = i.space || 2, t = i.dropQuotesOnKeys !== !1, e = i.dropQuotesOnNumbers || !1, l = i.inlineShortArrays || !1, o = i.inlineShortArraysDepth || 1, a = i.quoteType || "single", c = i.minify || !1;
17
- e && S(r);
18
- let u = x(r, null, c ? void 0 : n, t, a);
19
- if (l && !c) {
20
- let f = j(u);
21
- if (o > 1)
22
- for (let m = 1; m < o && (u = f, f = j(u), f !== u); m++)
23
- ;
24
- u = f;
25
- }
26
- return u;
27
- }
28
- function S(r) {
29
- if (!$(r)) return;
30
- const i = Object.keys(r);
31
- i && i.forEach(function(n) {
32
- const t = r[n];
33
- if (typeof t == "string") {
34
- const e = t - 0;
35
- r[n] = isNaN(e) ? t : e;
36
- } else ($(t) || Array.isArray(t)) && S(t);
37
- });
38
- }
39
- function $(r) {
40
- return r && typeof r == "object";
41
- }
42
- function j(r, i) {
43
- if (i || (i = 80), typeof i != "number" || i < 20)
44
- throw Error(`Invalid width '${i}'. Expecting number equal or larger than 20.`);
45
- const n = r.split(`
46
- `);
47
- let t = 0, e = null, l = [];
48
- for (; t < n.length; ) {
49
- const o = !!n[t].match(/\[/), a = !!n[t].match(/\],?/);
50
- if (o && !a)
51
- l = [n[t]], e = t;
52
- else if (a && !o && e) {
53
- l.push((n[t] || "").trim());
54
- const c = l.join(" ");
55
- c.length < i && (n.splice(e, t - e + 1, c), t = e), e = null, l = [];
56
- } else
57
- e && l.push((n[t] || "").trim());
58
- t += 1;
59
- }
60
- return n.join(`
61
- `);
62
- }
63
- function x(r, i, n, t, e) {
64
- let l;
65
- if (s = "", p = "", typeof n == "number")
66
- for (l = 0; l < n; l += 1)
67
- p += " ";
68
- else typeof n == "string" && (p = n);
69
- return h = i, b("", { "": r }, t, e);
70
- }
71
- function b(r, i, n, t) {
72
- let e, l, o, a;
73
- const c = s;
74
- let u, f = i[r];
75
- switch (f && typeof f == "object" && typeof f.toJSON == "function" && (f = f.toJSON(r)), typeof h == "function" && (f = h.call(i, r, f)), typeof f) {
76
- case "function":
77
- return f;
78
- case "string":
79
- return y(f, t);
80
- case "number":
81
- return isFinite(f) ? String(f) : "null";
82
- case "boolean":
83
- case "null":
84
- return String(f);
85
- // If the type is 'object', we might be dealing with an object or an array or
86
- // null.
87
- case "object":
88
- if (!f)
89
- return "null";
90
- if (s += p, u = [], Object.prototype.toString.apply(f) === "[object Array]") {
91
- for (a = f.length, e = 0; e < a; e += 1)
92
- u[e] = b(e, f, n, t) || "null";
93
- return o = u.length === 0 ? "[]" : s ? `[
94
- ${s}${u.join(`,
95
- ${s}`)}
96
- ${c}]` : `[${u.join(",")}]`, s = c, o;
97
- }
98
- if (h && typeof h == "object")
99
- for (a = h.length, e = 0; e < a; e += 1)
100
- typeof h[e] == "string" && (l = h[e], o = b(l, f, n, t), o && u.push((n ? A(l, t) : y(l, t)) + (s ? ": " : ":") + o));
101
- else
102
- for (l in f)
103
- Object.prototype.hasOwnProperty.call(f, l) && (o = b(l, f, n, t), o && u.push((n ? A(l, t) : y(l, t)) + (s ? ": " : ":") + o));
104
- return o = u.length === 0 ? "{}" : s ? `{
105
- ${s}${u.join(`,
106
- ${s}`)}
107
- ${c}}` : `{${u.join(",")}}`, s = c, o;
108
- }
109
- }
110
- function y(r, i) {
111
- g.lastIndex = 0;
112
- let n = '"';
113
- return i === "single" && (n = "'"), g.test(r) ? n + r.replace(g, function(t) {
114
- const e = d[t];
115
- return typeof e == "string" ? e : `\\u${`0000${t.charCodeAt(0).toString(16)}`.slice(-4)}`;
116
- }) + n : n + r + n;
117
- }
118
- function A(r, i) {
119
- return O.test(r) ? r : y(r, i);
120
- }
121
- export {
122
- N as c
123
- };