@unicom-cloud/ui 0.8.89 → 0.8.90
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/Anchor.js +4 -2
- package/AutoComplete.js +4 -2
- package/Avatar.js +4 -3
- package/Badge.js +6 -5
- package/Breadcrumb.js +4 -3
- package/Calendar.js +7 -5
- package/Card.js +6 -4
- package/Cascader.js +1 -1
- package/Checkbox.js +4 -4
- package/Collapse.js +3 -2
- package/ColorPicker.js +13 -2
- package/DatePicker.js +8 -8
- package/Form.js +3 -3
- package/Grid.js +10 -8
- package/List.js +1 -1
- package/Mentions.js +1 -1
- package/Pagination.js +1 -1
- package/Radio.js +5 -5
- package/Select.js +1 -1
- package/Table.js +3 -3
- package/TimePicker.js +2 -2
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +3 -3
- package/Typography.js +1 -1
- package/anchor/Anchor.js +30 -29
- package/anchor/index.js +2 -0
- package/auto-complete/index.js +4 -2
- package/avatar/index.js +4 -3
- package/badge/index.js +39 -43
- package/breadcrumb/index.js +18 -17
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +2 -2
- package/calendar/index.js +7 -5
- package/card/index.js +31 -29
- package/cascader/Cascader.js +1 -1
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +6 -6
- package/checkbox/Group.js +1 -1
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +4 -4
- package/chunk/B3LeSidy.js +192 -0
- package/chunk/{CgyNQvYg.js → BbQEqpOn.js} +388 -381
- package/chunk/{BP4igg_F.js → BcCuJQY8.js} +41 -40
- package/chunk/{Doi4-DdV.js → C8Kcc_9d.js} +99 -92
- package/chunk/D-Hw4x_H.js +88 -0
- package/chunk/{BC2OXILt.js → Dc-uXGtN.js} +1 -1
- package/collapse/Collapse.js +255 -13
- package/collapse/Item.js +2 -2
- package/collapse/index.js +4 -2
- package/color-picker/Panel.js +1 -1
- package/color-picker/index.js +13 -2
- package/date-picker/Picker.js +142 -138
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +22 -22
- package/date-picker/util.js +1 -1
- package/form/Form.js +1 -1
- package/form/index.js +32 -32
- package/grid/index.js +13 -12
- package/image/Image.js +26 -25
- package/index.js +600 -571
- package/list/index.js +1 -1
- package/mentions/index.js +1 -1
- package/package.json +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/pagination/index.js +1 -1
- package/radio/Group.js +1 -1
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +4 -4
- package/radio/index.js +4 -4
- package/select/Option.js +1 -1
- package/select/Select.js +1 -1
- package/select/index.js +2 -2
- package/select/util.js +2 -2
- package/space/index.js +56 -54
- package/statistic/Countdown.js +1 -1
- package/steps/index.js +50 -49
- package/style.css +1 -1
- package/table/Table.js +2 -2
- package/table/index.js +3 -3
- package/time-picker/Picker.js +17 -17
- package/time-picker/RangePicker.js +7 -7
- package/time-picker/TimePicker.js +2 -2
- package/time-picker/index.js +2 -2
- package/time-picker/util.js +1 -1
- package/transfer/Item.js +1 -1
- package/transfer/List.js +1 -1
- package/transfer/index.js +2 -2
- package/tree/Animation.js +1 -1
- package/tree/Node.js +1 -1
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +3 -3
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +1 -1
- package/tree-select/index.js +2 -2
- package/types/common/space/interface.d.ts +4 -0
- package/types/common/utils/dayjs.d.ts +2 -2
- package/types/pc/anchor/Anchor.d.ts +1 -0
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/auto-complete/index.d.ts +6 -0
- package/types/pc/avatar/index.d.ts +1 -0
- package/types/pc/badge/index.d.ts +5 -3
- package/types/pc/breadcrumb/index.d.ts +1 -0
- package/types/pc/calendar/index.d.ts +3 -0
- package/types/pc/card/index.d.ts +1 -0
- package/types/pc/cascader/Cascader.d.ts +1 -1
- package/types/pc/collapse/Collapse.d.ts +1 -0
- package/types/pc/collapse/index.d.ts +2 -1
- package/types/pc/color-picker/index.d.ts +7 -0
- package/types/pc/date-picker/index.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +2 -2
- package/types/pc/date-picker/panel/Body.d.ts +1 -1
- package/types/pc/form/hook/useForm.d.ts +1 -1
- package/types/pc/form/index.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -4
- package/types/pc/index.d.ts +15 -14
- package/types/pc/menu/Indent.d.ts +1 -1
- package/types/pc/space/index.d.ts +2 -2
- package/types/pc/steps/index.d.ts +1 -0
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/utils/constant.d.ts +2 -2
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +396 -85
- package/typography/Ellipsis.js +5 -4
- package/typography/index.js +1 -1
- package/utils/constant.js +6 -6
- package/utils/dayjs.js +1 -1
- package/utils/index.js +202 -200
- package/utils/names.js +294 -86
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +117 -116
- package/chunk/C7bohPVD.js +0 -185
- package/chunk/DYmI9fFY.js +0 -257
- /package/grid/{grid.js → Grid.js} +0 -0
- /package/grid/{grid-item.js → GridItem.js} +0 -0
- /package/types/pc/grid/{grid.d.ts → Grid.d.ts} +0 -0
- /package/types/pc/grid/{grid-item.d.ts → GridItem.d.ts} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import a, { isDayjs as l } from "dayjs";
|
|
2
|
+
import M from "dayjs/plugin/advancedFormat";
|
|
3
|
+
import $ from "dayjs/plugin/customParseFormat";
|
|
4
|
+
import v from "dayjs/plugin/isBetween";
|
|
5
|
+
import F from "dayjs/plugin/quarterOfYear";
|
|
6
|
+
import Y from "dayjs/plugin/timezone";
|
|
7
|
+
import A from "dayjs/plugin/utc";
|
|
8
|
+
import W from "dayjs/plugin/weekOfYear";
|
|
9
|
+
import U from "dayjs/plugin/weekYear";
|
|
10
|
+
import d from "lodash/isArray";
|
|
11
|
+
import O from "lodash/isUndefined";
|
|
12
|
+
const u = a()._isAMomentObject;
|
|
13
|
+
u && (a.extend = () => {
|
|
14
|
+
});
|
|
15
|
+
const C = (t, e, n) => {
|
|
16
|
+
n = function(o, c) {
|
|
17
|
+
if (l(o))
|
|
18
|
+
return o.clone();
|
|
19
|
+
const i = typeof c == "object" ? c : {};
|
|
20
|
+
return i.date = o, i.args = arguments, new e(i);
|
|
21
|
+
};
|
|
22
|
+
const r = e.prototype, s = r.$utils;
|
|
23
|
+
r.$utils = function() {
|
|
24
|
+
const o = s();
|
|
25
|
+
return o.i = l, o;
|
|
26
|
+
}, n.isDayjs = l;
|
|
27
|
+
};
|
|
28
|
+
a.extend(C);
|
|
29
|
+
a.extend($);
|
|
30
|
+
a.extend(v);
|
|
31
|
+
a.extend(W);
|
|
32
|
+
a.extend(M);
|
|
33
|
+
a.extend(U);
|
|
34
|
+
a.extend(F);
|
|
35
|
+
a.extend(A);
|
|
36
|
+
a.extend(Y);
|
|
37
|
+
const f = a;
|
|
38
|
+
function T(t, e) {
|
|
39
|
+
const n = (t.day() - e + 7) % 7;
|
|
40
|
+
return t.clone().startOf("day").subtract(n, "day").valueOf();
|
|
41
|
+
}
|
|
42
|
+
function H(t, e, n) {
|
|
43
|
+
return T(t, n) === T(e, n);
|
|
44
|
+
}
|
|
45
|
+
const h = {
|
|
46
|
+
add(t, e, n) {
|
|
47
|
+
return u ? t.clone().add(e, n) : t.add(e, n);
|
|
48
|
+
},
|
|
49
|
+
subtract(t, e, n) {
|
|
50
|
+
return u ? t.clone().subtract(e, n) : t.subtract(e, n);
|
|
51
|
+
},
|
|
52
|
+
startOf(t, e) {
|
|
53
|
+
return u ? t.clone().startOf(e) : t.startOf(e);
|
|
54
|
+
},
|
|
55
|
+
endOf(t, e) {
|
|
56
|
+
return u ? t.clone().endOf(e) : t.endOf(e);
|
|
57
|
+
},
|
|
58
|
+
set(t, e, n) {
|
|
59
|
+
return u ? t.clone().set(e, n) : t.set(e, n);
|
|
60
|
+
},
|
|
61
|
+
isSameWeek(t, e, n, r) {
|
|
62
|
+
return u ? H(t, e, n) : t.locale({ ...f.Ls[r], weekStart: n }).isSame(e, "week");
|
|
63
|
+
}
|
|
64
|
+
}, P = {
|
|
65
|
+
year: 0,
|
|
66
|
+
month: 1,
|
|
67
|
+
day: 2,
|
|
68
|
+
hour: 3,
|
|
69
|
+
minute: 4,
|
|
70
|
+
second: 5
|
|
71
|
+
}, j = {}, S = (t, e) => {
|
|
72
|
+
const n = `${t}|short`;
|
|
73
|
+
let r = j[n];
|
|
74
|
+
return r || (r = new Intl.DateTimeFormat("en-US", {
|
|
75
|
+
hour12: !1,
|
|
76
|
+
timeZone: t,
|
|
77
|
+
year: "numeric",
|
|
78
|
+
month: "2-digit",
|
|
79
|
+
day: "2-digit",
|
|
80
|
+
hour: "2-digit",
|
|
81
|
+
minute: "2-digit",
|
|
82
|
+
second: "2-digit"
|
|
83
|
+
}), j[n] = r), r;
|
|
84
|
+
}, I = (t, e) => {
|
|
85
|
+
const n = new Date(t);
|
|
86
|
+
return S(e).formatToParts(n);
|
|
87
|
+
}, x = (t, e) => {
|
|
88
|
+
const n = I(t, e), r = [];
|
|
89
|
+
for (let m = 0; m < n.length; m += 1) {
|
|
90
|
+
const { type: g, value: b } = n[m], D = P[g];
|
|
91
|
+
D >= 0 && (r[D] = parseInt(b, 10));
|
|
92
|
+
}
|
|
93
|
+
const s = r[3], o = s === 24 ? 0 : s, c = Date.UTC(
|
|
94
|
+
r[0],
|
|
95
|
+
r[1] - 1,
|
|
96
|
+
r[2],
|
|
97
|
+
o,
|
|
98
|
+
r[4],
|
|
99
|
+
r[5],
|
|
100
|
+
0
|
|
101
|
+
);
|
|
102
|
+
let i = +t;
|
|
103
|
+
const y = i % 1e3;
|
|
104
|
+
return i -= y, (c - i) / (60 * 1e3);
|
|
105
|
+
}, _ = (t, e, n) => {
|
|
106
|
+
let r = t - e * 60 * 1e3;
|
|
107
|
+
const s = x(r, n);
|
|
108
|
+
if (e === s)
|
|
109
|
+
return [r, e];
|
|
110
|
+
r -= (s - e) * 60 * 1e3;
|
|
111
|
+
const o = x(r, n);
|
|
112
|
+
return s === o ? [r, s] : [t - Math.min(s, o) * 60 * 1e3, Math.max(s, o)];
|
|
113
|
+
};
|
|
114
|
+
function k(t, e) {
|
|
115
|
+
const n = x(t, e);
|
|
116
|
+
return _(t, n, e)[1];
|
|
117
|
+
}
|
|
118
|
+
function z(t, e) {
|
|
119
|
+
return O(t) && !e ? f() : p(f(), t, e);
|
|
120
|
+
}
|
|
121
|
+
function p(t, e, n, r) {
|
|
122
|
+
if (!t || O(e) && !n)
|
|
123
|
+
return t;
|
|
124
|
+
const s = -t.toDate().getTimezoneOffset(), o = O(e) ? n ? k(t.valueOf(), n) : s : e, c = Math.abs(o) <= 16 ? o * 60 : o, i = r ? s - c : c - s, y = n ? k(f(t).valueOf() + i * 60 * 1e3, n) : o, m = i - (o - y), g = r || !O(e) ? i : m;
|
|
125
|
+
return f(f(t).valueOf() + g * 60 * 1e3);
|
|
126
|
+
}
|
|
127
|
+
function V(t, e, n) {
|
|
128
|
+
return p(t, e, n, !0);
|
|
129
|
+
}
|
|
130
|
+
function tt(t) {
|
|
131
|
+
const e = ["H", "h", "m", "s", "A", "a"];
|
|
132
|
+
let n = "";
|
|
133
|
+
return e.some((r) => t.indexOf(r) !== -1 ? (n = `${r}${t.split(` ${r}`)[1]}`, !0) : !1), n || "HH:mm:ss";
|
|
134
|
+
}
|
|
135
|
+
function L(t, e) {
|
|
136
|
+
if (l(t))
|
|
137
|
+
return f(t.valueOf());
|
|
138
|
+
if (typeof t == "string") {
|
|
139
|
+
const n = f(t, e);
|
|
140
|
+
return n.isValid() ? n : f(t, "YYYY-MM-DD");
|
|
141
|
+
}
|
|
142
|
+
return f(t);
|
|
143
|
+
}
|
|
144
|
+
function w(t, e, n, r) {
|
|
145
|
+
let s = L(t, e);
|
|
146
|
+
return (n !== void 0 || r) && (s = p(s, n, r)), s;
|
|
147
|
+
}
|
|
148
|
+
function et(t, e, n, r) {
|
|
149
|
+
if (!t) return;
|
|
150
|
+
const s = d(e) ? e : [e];
|
|
151
|
+
return d(t) ? t.map((o, c, i) => {
|
|
152
|
+
if (o)
|
|
153
|
+
return w(o, s[c], n, r);
|
|
154
|
+
}) : w(t, s[0], n, r);
|
|
155
|
+
}
|
|
156
|
+
function nt(t, e) {
|
|
157
|
+
const n = t.year(), r = t.month(), s = t.date();
|
|
158
|
+
if (e) {
|
|
159
|
+
let o = e;
|
|
160
|
+
return o = h.set(o, "year", n), o = h.set(o, "month", r), o = h.set(o, "date", s), o;
|
|
161
|
+
}
|
|
162
|
+
return t;
|
|
163
|
+
}
|
|
164
|
+
function rt(t) {
|
|
165
|
+
if (!d(t) || !(t[0] && t[1]) || !(t[0].valueOf() > t[1].valueOf())) return t;
|
|
166
|
+
const e = [...t];
|
|
167
|
+
return e.sort((n, r) => n.valueOf() - r.valueOf()), e;
|
|
168
|
+
}
|
|
169
|
+
function ot(t, e) {
|
|
170
|
+
return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || f(e).valueOf() !== f(t).valueOf();
|
|
171
|
+
}
|
|
172
|
+
function st(t, e) {
|
|
173
|
+
return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || d(e) && d(t) && f(e[0]).valueOf() !== f(t[0]).valueOf() || f(e[1]).valueOf() !== f(t[1]).valueOf();
|
|
174
|
+
}
|
|
175
|
+
function ft(t, e, n) {
|
|
176
|
+
return typeof t == "string" && f(t, e).format(d(e) ? e[n] : e) === t;
|
|
177
|
+
}
|
|
178
|
+
export {
|
|
179
|
+
z as a,
|
|
180
|
+
rt as b,
|
|
181
|
+
tt as c,
|
|
182
|
+
f as d,
|
|
183
|
+
nt as e,
|
|
184
|
+
ot as f,
|
|
185
|
+
et as g,
|
|
186
|
+
ft as h,
|
|
187
|
+
st as i,
|
|
188
|
+
V as j,
|
|
189
|
+
p as k,
|
|
190
|
+
h as m,
|
|
191
|
+
k as t
|
|
192
|
+
};
|