@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.
- package/chat/index.mjs +2 -3
- package/chunks/{FormTemp.Bu2VCxUh.mjs → FormTemp.BQxO5IQq.mjs} +1 -1
- package/chunks/MonacoEditor.D31t4FTy.mjs +327 -0
- package/chunks/PhotoSwipe.BunkqqPu.mjs +80 -0
- package/chunks/{configComponents.CpKi15WN.mjs → configComponents.DQaqUQFs.mjs} +4 -4
- package/chunks/{core.DJEgjQW6.mjs → core.0Exl13Mz.mjs} +3 -3
- package/chunks/{dictionary.3O-Io7Vh.mjs → dictionary.C6NmC-bT.mjs} +16 -16
- package/confirm-button/index.mjs +9 -14
- package/confirmable/index.mjs +8 -13
- package/data-display/index.mjs +1 -1
- package/data-table-picker/index.mjs +8 -10
- package/editable-tree/index.mjs +2 -3
- package/element-dialog/index.mjs +2 -3
- package/flex-column/index.mjs +5 -6
- package/flex-item/index.mjs +5 -6
- package/flex-row/index.mjs +2 -3
- package/flow/index.mjs +2 -3
- package/flow-designer/index.mjs +1 -1
- package/flow-node/index.mjs +3 -4
- package/flow-viewer/index.mjs +1 -1
- package/form-button/index.mjs +1 -1
- package/form-cascader/index.mjs +13 -17
- package/form-checkbox/index.mjs +7 -12
- package/form-checkbox-group/index.mjs +9 -14
- package/form-date-picker/index.mjs +5 -10
- package/form-holder/index.mjs +4 -5
- package/form-input/index.mjs +6 -11
- package/form-input-cron-expression/index.mjs +8 -13
- package/form-input-email/index.mjs +12 -17
- package/form-input-id-card/index.mjs +15 -19
- package/form-input-number/index.mjs +16 -23
- package/form-input-phone-number/index.mjs +8 -12
- package/form-input-tag/index.mjs +7 -12
- package/form-input-time/index.mjs +2 -7
- package/form-item/index.mjs +2 -6
- package/form-radio-group/index.mjs +7 -12
- package/form-select/index.mjs +2 -6
- package/form-switch/index.mjs +7 -12
- package/form-table/index.mjs +22 -28
- package/form-table-plus/index.mjs +10 -14
- package/form-textarea/index.mjs +6 -11
- package/form-tree-select/index.mjs +9 -17
- package/form-tree-select-multiple/index.mjs +11 -19
- package/form-view/index.mjs +1 -1
- package/fy-array/index.mjs +2 -5
- package/fy-cascader/index.mjs +13 -17
- package/fy-checkbox/index.mjs +19 -23
- package/fy-code/index.mjs +9 -10
- package/fy-curd/index.mjs +4 -6
- package/fy-date/index.mjs +5 -9
- package/fy-draggable/index.mjs +2 -3
- package/fy-dynamic/index.mjs +11 -14
- package/fy-empty/index.mjs +3 -4
- package/fy-form/index.mjs +3 -6
- package/fy-form-design/index.mjs +13 -14
- package/fy-input/index.mjs +10 -14
- package/fy-input-color/index.mjs +11 -15
- package/fy-input-icon/index.mjs +5 -9
- package/fy-input-map/index.mjs +5 -8
- package/fy-input-number/index.mjs +12 -16
- package/fy-input-table/index.mjs +2 -5
- package/fy-input-tree/index.mjs +2 -5
- package/fy-radio/index.mjs +9 -13
- package/fy-rate/index.mjs +7 -11
- package/fy-select/index.mjs +2 -4
- package/fy-slider/index.mjs +7 -10
- package/fy-switch/index.mjs +5 -9
- package/fy-time/index.mjs +3 -6
- package/fy-title/index.mjs +12 -16
- package/fy-u-editor/index.mjs +2 -3
- package/fy-upload/index.mjs +2 -4
- package/image-cropper/index.mjs +2 -3
- package/index.mjs +369 -545
- package/license/index.mjs +2 -3
- package/monaco-editor/index.mjs +5 -205
- package/package.json +1 -1
- package/page-skeleton/index.mjs +3 -3
- package/pageable-table/index.mjs +3 -6
- package/pageable-view/index.mjs +6 -7
- package/photo-swipe/index.mjs +3 -36
- package/picker-table-view/index.mjs +23 -24
- package/present-view/index.mjs +1 -1
- package/record-video/index.mjs +10 -11
- package/resize-observer/index.mjs +2 -3
- package/search/index.mjs +2 -4
- package/sign/index.mjs +2 -3
- package/split-pane/index.mjs +1 -1
- package/swiper/index.mjs +1 -1
- package/table-column/index.mjs +4 -7
- package/table-view/index.mjs +4 -5
- package/tabs-view/index.mjs +1 -1
- package/text-ellipsis/index.mjs +2 -3
- package/toolbar/index.mjs +3 -4
- package/toolbar-button/index.mjs +3 -4
- package/verify/index.mjs +7 -8
- package/watermark/index.mjs +14 -15
- package/web-types.json +1 -1
- package/chunks/index.BmYCjxZQ.mjs +0 -47
- 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,
|
|
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
|
|
251
|
+
const O = v.exports;
|
|
253
252
|
export {
|
|
254
|
-
|
|
253
|
+
O as default
|
|
255
254
|
};
|
package/toolbar-button/index.mjs
CHANGED
|
@@ -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.
|
|
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
|
|
118
|
+
const g = f.exports;
|
|
120
119
|
export {
|
|
121
|
-
|
|
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
|
|
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,
|
|
51
|
-
return
|
|
52
|
-
return
|
|
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__ */
|
|
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
|
|
61
|
+
const _ = u.exports;
|
|
63
62
|
export {
|
|
64
|
-
|
|
63
|
+
_ as default
|
|
65
64
|
};
|
package/watermark/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
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:
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const t =
|
|
55
|
-
return t.font = "15px Verdana", t.fillStyle = s, t.fillRect(0, 0,
|
|
56
|
-
class:
|
|
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(${
|
|
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__ */
|
|
66
|
-
|
|
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
|
|
72
|
+
const x = g.exports;
|
|
74
73
|
export {
|
|
75
|
-
|
|
74
|
+
x as default
|
|
76
75
|
};
|
package/web-types.json
CHANGED
|
@@ -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
|
-
};
|