@web-utils/component 2.7.22 → 2.7.29
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/chunks/{detail.d47a021c.js → detail.544c52b0.js} +1 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/column-slot/index.js +1 -1
- package/dist/components/data-table-picker/index.js +1 -99
- package/dist/components/dialog-excel/index.js +1 -1
- package/dist/components/{fy-dialog-form → dialog-form}/style.css +0 -0
- package/dist/components/editable-tree/index.js +1 -299
- package/dist/components/element-dialog/index.js +2 -11
- package/dist/components/form-date-picker/index.js +1 -1
- package/dist/components/fy-form/index.js +1 -1
- package/dist/index.es.js +93 -736
- package/package.json +1 -1
- package/web-types.json +1 -1
- package/dist/chunks/dayjs.ed2e1b73.js +0 -247
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import "@web-utils/core";
|
|
2
|
-
var commonjsGlobal = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, dayjs_minExports = {}, dayjs_min = {
|
|
3
|
-
get exports() {
|
|
4
|
-
return dayjs_minExports;
|
|
5
|
-
},
|
|
6
|
-
set exports(v) {
|
|
7
|
-
dayjs_minExports = v;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
(function(module, exports) {
|
|
11
|
-
(function(t, e) {
|
|
12
|
-
module.exports = e();
|
|
13
|
-
})(commonjsGlobal, function() {
|
|
14
|
-
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", f = "month", h = "quarter", c = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
15
|
-
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
16
|
-
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
17
|
-
} }, m = function(t2, e2, n2) {
|
|
18
|
-
var r2 = String(t2);
|
|
19
|
-
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
20
|
-
}, v = { s: m, z: function(t2) {
|
|
21
|
-
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
22
|
-
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
23
|
-
}, m: function t2(e2, n2) {
|
|
24
|
-
if (e2.date() < n2.date())
|
|
25
|
-
return -t2(n2, e2);
|
|
26
|
-
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), f);
|
|
27
|
-
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
28
|
-
}, a: function(t2) {
|
|
29
|
-
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
30
|
-
}, p: function(t2) {
|
|
31
|
-
return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
32
|
-
}, u: function(t2) {
|
|
33
|
-
return t2 === void 0;
|
|
34
|
-
} }, g = "en", D = {};
|
|
35
|
-
D[g] = M;
|
|
36
|
-
var p = function(t2) {
|
|
37
|
-
return t2 instanceof _;
|
|
38
|
-
}, S = function t2(e2, n2, r2) {
|
|
39
|
-
var i2;
|
|
40
|
-
if (!e2)
|
|
41
|
-
return g;
|
|
42
|
-
if (typeof e2 == "string") {
|
|
43
|
-
var s2 = e2.toLowerCase();
|
|
44
|
-
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
45
|
-
var u2 = e2.split("-");
|
|
46
|
-
if (!i2 && u2.length > 1)
|
|
47
|
-
return t2(u2[0]);
|
|
48
|
-
} else {
|
|
49
|
-
var a2 = e2.name;
|
|
50
|
-
D[a2] = e2, i2 = a2;
|
|
51
|
-
}
|
|
52
|
-
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
53
|
-
}, w = function(t2, e2) {
|
|
54
|
-
if (p(t2))
|
|
55
|
-
return t2.clone();
|
|
56
|
-
var n2 = typeof e2 == "object" ? e2 : {};
|
|
57
|
-
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
58
|
-
}, O = v;
|
|
59
|
-
O.l = S, O.i = p, O.w = function(t2, e2) {
|
|
60
|
-
return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
61
|
-
};
|
|
62
|
-
var _ = function() {
|
|
63
|
-
function M2(t2) {
|
|
64
|
-
this.$L = S(t2.locale, null, !0), this.parse(t2);
|
|
65
|
-
}
|
|
66
|
-
var m2 = M2.prototype;
|
|
67
|
-
return m2.parse = function(t2) {
|
|
68
|
-
this.$d = function(t3) {
|
|
69
|
-
var e2 = t3.date, n2 = t3.utc;
|
|
70
|
-
if (e2 === null)
|
|
71
|
-
return new Date(NaN);
|
|
72
|
-
if (O.u(e2))
|
|
73
|
-
return new Date();
|
|
74
|
-
if (e2 instanceof Date)
|
|
75
|
-
return new Date(e2);
|
|
76
|
-
if (typeof e2 == "string" && !/Z$/i.test(e2)) {
|
|
77
|
-
var r2 = e2.match($);
|
|
78
|
-
if (r2) {
|
|
79
|
-
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
80
|
-
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return new Date(e2);
|
|
84
|
-
}(t2), this.$x = t2.x || {}, this.init();
|
|
85
|
-
}, m2.init = function() {
|
|
86
|
-
var t2 = this.$d;
|
|
87
|
-
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
88
|
-
}, m2.$utils = function() {
|
|
89
|
-
return O;
|
|
90
|
-
}, m2.isValid = function() {
|
|
91
|
-
return this.$d.toString() !== l;
|
|
92
|
-
}, m2.isSame = function(t2, e2) {
|
|
93
|
-
var n2 = w(t2);
|
|
94
|
-
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
95
|
-
}, m2.isAfter = function(t2, e2) {
|
|
96
|
-
return w(t2) < this.startOf(e2);
|
|
97
|
-
}, m2.isBefore = function(t2, e2) {
|
|
98
|
-
return this.endOf(e2) < w(t2);
|
|
99
|
-
}, m2.$g = function(t2, e2, n2) {
|
|
100
|
-
return O.u(t2) ? this[e2] : this.set(n2, t2);
|
|
101
|
-
}, m2.unix = function() {
|
|
102
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
103
|
-
}, m2.valueOf = function() {
|
|
104
|
-
return this.$d.getTime();
|
|
105
|
-
}, m2.startOf = function(t2, e2) {
|
|
106
|
-
var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
|
|
107
|
-
var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
108
|
-
return r2 ? i2 : i2.endOf(a);
|
|
109
|
-
}, $2 = function(t3, e3) {
|
|
110
|
-
return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
111
|
-
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
112
|
-
switch (h2) {
|
|
113
|
-
case c:
|
|
114
|
-
return r2 ? l2(1, 0) : l2(31, 11);
|
|
115
|
-
case f:
|
|
116
|
-
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
117
|
-
case o:
|
|
118
|
-
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
119
|
-
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
120
|
-
case a:
|
|
121
|
-
case d:
|
|
122
|
-
return $2(v2 + "Hours", 0);
|
|
123
|
-
case u:
|
|
124
|
-
return $2(v2 + "Minutes", 1);
|
|
125
|
-
case s:
|
|
126
|
-
return $2(v2 + "Seconds", 2);
|
|
127
|
-
case i:
|
|
128
|
-
return $2(v2 + "Milliseconds", 3);
|
|
129
|
-
default:
|
|
130
|
-
return this.clone();
|
|
131
|
-
}
|
|
132
|
-
}, m2.endOf = function(t2) {
|
|
133
|
-
return this.startOf(t2, !1);
|
|
134
|
-
}, m2.$set = function(t2, e2) {
|
|
135
|
-
var n2, o2 = O.p(t2), h2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = h2 + "Date", n2[d] = h2 + "Date", n2[f] = h2 + "Month", n2[c] = h2 + "FullYear", n2[u] = h2 + "Hours", n2[s] = h2 + "Minutes", n2[i] = h2 + "Seconds", n2[r] = h2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
136
|
-
if (o2 === f || o2 === c) {
|
|
137
|
-
var y2 = this.clone().set(d, 1);
|
|
138
|
-
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
139
|
-
} else
|
|
140
|
-
l2 && this.$d[l2]($2);
|
|
141
|
-
return this.init(), this;
|
|
142
|
-
}, m2.set = function(t2, e2) {
|
|
143
|
-
return this.clone().$set(t2, e2);
|
|
144
|
-
}, m2.get = function(t2) {
|
|
145
|
-
return this[O.p(t2)]();
|
|
146
|
-
}, m2.add = function(r2, h2) {
|
|
147
|
-
var d2, l2 = this;
|
|
148
|
-
r2 = Number(r2);
|
|
149
|
-
var $2 = O.p(h2), y2 = function(t2) {
|
|
150
|
-
var e2 = w(l2);
|
|
151
|
-
return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
152
|
-
};
|
|
153
|
-
if ($2 === f)
|
|
154
|
-
return this.set(f, this.$M + r2);
|
|
155
|
-
if ($2 === c)
|
|
156
|
-
return this.set(c, this.$y + r2);
|
|
157
|
-
if ($2 === a)
|
|
158
|
-
return y2(1);
|
|
159
|
-
if ($2 === o)
|
|
160
|
-
return y2(7);
|
|
161
|
-
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
162
|
-
return O.w(m3, this);
|
|
163
|
-
}, m2.subtract = function(t2, e2) {
|
|
164
|
-
return this.add(-1 * t2, e2);
|
|
165
|
-
}, m2.format = function(t2) {
|
|
166
|
-
var e2 = this, n2 = this.$locale();
|
|
167
|
-
if (!this.isValid())
|
|
168
|
-
return n2.invalidDate || l;
|
|
169
|
-
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f2 = n2.months, h2 = function(t3, n3, i3, s3) {
|
|
170
|
-
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
171
|
-
}, c2 = function(t3) {
|
|
172
|
-
return O.s(s2 % 12 || 12, t3, "0");
|
|
173
|
-
}, d2 = n2.meridiem || function(t3, e3, n3) {
|
|
174
|
-
var r3 = t3 < 12 ? "AM" : "PM";
|
|
175
|
-
return n3 ? r3.toLowerCase() : r3;
|
|
176
|
-
}, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h2(n2.monthsShort, a2, f2, 3), MMMM: h2(f2, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n2.weekdaysMin, this.$W, o2, 2), ddd: h2(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s2), HH: O.s(s2, 2, "0"), h: c2(1), hh: c2(2), a: d2(s2, u2, !0), A: d2(s2, u2, !1), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2 };
|
|
177
|
-
return r2.replace(y, function(t3, e3) {
|
|
178
|
-
return e3 || $2[t3] || i2.replace(":", "");
|
|
179
|
-
});
|
|
180
|
-
}, m2.utcOffset = function() {
|
|
181
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
182
|
-
}, m2.diff = function(r2, d2, l2) {
|
|
183
|
-
var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
|
|
184
|
-
return g2 = ($2 = {}, $2[c] = g2 / 12, $2[f] = g2, $2[h] = g2 / 3, $2[o] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n, $2[s] = v2 / e, $2[i] = v2 / t, $2)[y2] || v2, l2 ? g2 : O.a(g2);
|
|
185
|
-
}, m2.daysInMonth = function() {
|
|
186
|
-
return this.endOf(f).$D;
|
|
187
|
-
}, m2.$locale = function() {
|
|
188
|
-
return D[this.$L];
|
|
189
|
-
}, m2.locale = function(t2, e2) {
|
|
190
|
-
if (!t2)
|
|
191
|
-
return this.$L;
|
|
192
|
-
var n2 = this.clone(), r2 = S(t2, e2, !0);
|
|
193
|
-
return r2 && (n2.$L = r2), n2;
|
|
194
|
-
}, m2.clone = function() {
|
|
195
|
-
return O.w(this.$d, this);
|
|
196
|
-
}, m2.toDate = function() {
|
|
197
|
-
return new Date(this.valueOf());
|
|
198
|
-
}, m2.toJSON = function() {
|
|
199
|
-
return this.isValid() ? this.toISOString() : null;
|
|
200
|
-
}, m2.toISOString = function() {
|
|
201
|
-
return this.$d.toISOString();
|
|
202
|
-
}, m2.toString = function() {
|
|
203
|
-
return this.$d.toUTCString();
|
|
204
|
-
}, M2;
|
|
205
|
-
}(), T = _.prototype;
|
|
206
|
-
return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
|
|
207
|
-
T[t2[1]] = function(e2) {
|
|
208
|
-
return this.$g(e2, t2[0], t2[1]);
|
|
209
|
-
};
|
|
210
|
-
}), w.extend = function(t2, e2) {
|
|
211
|
-
return t2.$i || (t2(e2, _, w), t2.$i = !0), w;
|
|
212
|
-
}, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
|
|
213
|
-
return w(1e3 * t2);
|
|
214
|
-
}, w.en = D[g], w.Ls = D, w.p = {}, w;
|
|
215
|
-
});
|
|
216
|
-
})(dayjs_min);
|
|
217
|
-
const dayjs = dayjs_minExports;
|
|
218
|
-
var zhCnExports = {}, zhCn = {
|
|
219
|
-
get exports() {
|
|
220
|
-
return zhCnExports;
|
|
221
|
-
},
|
|
222
|
-
set exports(v) {
|
|
223
|
-
zhCnExports = v;
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
(function(module, exports) {
|
|
227
|
-
(function(e, _) {
|
|
228
|
-
module.exports = _(dayjs_minExports);
|
|
229
|
-
})(commonjsGlobal, function(e) {
|
|
230
|
-
function _(e2) {
|
|
231
|
-
return e2 && typeof e2 == "object" && "default" in e2 ? e2 : { default: e2 };
|
|
232
|
-
}
|
|
233
|
-
var t = _(e), d = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(e2, _2) {
|
|
234
|
-
return _2 === "W" ? e2 + "周" : e2 + "日";
|
|
235
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(e2, _2) {
|
|
236
|
-
var t2 = 100 * e2 + _2;
|
|
237
|
-
return t2 < 600 ? "凌晨" : t2 < 900 ? "早上" : t2 < 1100 ? "上午" : t2 < 1300 ? "中午" : t2 < 1800 ? "下午" : "晚上";
|
|
238
|
-
} };
|
|
239
|
-
return t.default.locale(d, null, !0), d;
|
|
240
|
-
});
|
|
241
|
-
})(zhCn);
|
|
242
|
-
dayjs.locale("zh-cn");
|
|
243
|
-
const toDate = (date) => dayjs(date).toDate(), formatDate = (date, pattern = "YYYY-MM-DD HH:mm:ss") => date ? dayjs(date).format(pattern) : "";
|
|
244
|
-
export {
|
|
245
|
-
formatDate as f,
|
|
246
|
-
toDate as t
|
|
247
|
-
};
|