@unicom-cloud/ui 0.8.95 → 0.8.96
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/Message.js +1 -1
- package/Notification.js +1 -1
- package/Switch.js +1 -1
- package/Trigger.js +1 -1
- package/alert/index.js +50 -49
- package/back-top/index.js +8 -8
- package/cascader/panel/List.js +1 -1
- package/collapse/Item.js +1 -1
- package/components/common/hooks/useForceUpdate.js +6 -2
- package/components/common/hooks/useId.js +8 -8
- package/components/common/space/index.js +2 -3
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/details/index.js +32 -31
- package/dist/react-transition-group/src/CSSTransition.js +1 -1
- package/dist/react-transition-group/src/SwitchTransition.js +1 -1
- package/dist/tween/src/tween.js +24 -25
- package/hooks/index.js +50 -52
- package/index.js +674 -680
- package/input-tag/InputTag.js +1 -1
- package/message/index.js +1 -1
- package/notification/index.js +1 -1
- package/package.json +1 -1
- package/rate/index.js +1 -1
- package/slider/index.js +1 -1
- package/slider/util.js +1 -1
- package/statistic/index.js +16 -16
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +16 -16
- package/time-picker/util.js +4 -4
- package/trigger/index.js +1 -1
- package/types/common/utils/math.d.ts +1 -1
- package/types/pc/alert/interface.d.ts +2 -2
- package/types/pc/details/interface.d.ts +2 -2
- package/types/pc/hooks/index.d.ts +0 -1
- package/types/pc/utils/math.d.ts +1 -1
- package/typography/Ellipsis.js +4 -5
- package/upload/list/index.js +1 -1
- package/utils/index.js +173 -177
- package/utils/math.js +7 -11
- package/utils/reactTransitionGroup.js +1 -1
- package/version/index.js +1 -1
- package/components/common/hooks/useComputedState.js +0 -11
- package/hooks/useComputedState.js +0 -4
- package/types/common/hooks/useComputedState.d.ts +0 -4
- package/types/pc/hooks/useComputedState.d.ts +0 -1
- /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
package/switch/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import q from "@unicom-cloud/icons/IconUiLoading";
|
|
|
3
3
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
4
4
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
5
5
|
import A from "../dist/react-transition-group/src/SwitchTransition.js";
|
|
6
|
-
import "../dist/react-transition-group/chunk/
|
|
6
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
7
7
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
8
8
|
import B from "lodash/isArray";
|
|
9
9
|
import { forwardRef as L, useContext as M, useState as O } from "react";
|
package/table/Table.js
CHANGED
|
@@ -74,7 +74,7 @@ function kr(P, ce) {
|
|
|
74
74
|
pagination: N,
|
|
75
75
|
onChange: y,
|
|
76
76
|
pagePosition: w,
|
|
77
|
-
childrenColumnName:
|
|
77
|
+
childrenColumnName: W,
|
|
78
78
|
indentSize: xe,
|
|
79
79
|
rowSelection: D,
|
|
80
80
|
tableLayoutFixed: Se,
|
|
@@ -83,11 +83,11 @@ function kr(P, ce) {
|
|
|
83
83
|
footer: Lt,
|
|
84
84
|
virtualized: z,
|
|
85
85
|
renderPagination: zt,
|
|
86
|
-
summary:
|
|
86
|
+
summary: I,
|
|
87
87
|
rowKey: q
|
|
88
88
|
} = x, Rt = lt(
|
|
89
|
-
() => Dr(d,
|
|
90
|
-
[d,
|
|
89
|
+
() => Dr(d, W),
|
|
90
|
+
[d, W]
|
|
91
91
|
), n = dt == null ? void 0 : dt("table"), pt = x.size || (["default", "middle", "small"].indexOf(Pt) > -1 ? Pt : "default"), R = $(null), p = $(null), mt = $(null), g = $(null), _ = $(null), yt = $(null), U = $(null), G = $(0), gt = $(!1), [Ht, f] = xr(x), { currentFilters: Ce, defaultSorters: we } = He(), [A, ht] = j(1), [Te, $e] = j(
|
|
92
92
|
F.pageSize || F.defaultPageSize || 10
|
|
93
93
|
), [Et, kt] = j(Ce), [Fe, Ne] = j(0), [ve, Pe] = j([]), bt = Fr(f), [De, Ot] = $r(
|
|
@@ -193,9 +193,9 @@ function kr(P, ce) {
|
|
|
193
193
|
action: "filter"
|
|
194
194
|
}
|
|
195
195
|
);
|
|
196
|
-
} else K(e) && !e.length &&
|
|
196
|
+
} else K(e) && !e.length && Wt(t);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Wt({ dataIndex: t }) {
|
|
199
199
|
const e = {
|
|
200
200
|
...B
|
|
201
201
|
};
|
|
@@ -228,9 +228,9 @@ function kr(P, ce) {
|
|
|
228
228
|
)));
|
|
229
229
|
}
|
|
230
230
|
});
|
|
231
|
-
const s = (c) => c.slice().sort(ke(e)).map((l) => K(l[
|
|
231
|
+
const s = (c) => c.slice().sort(ke(e)).map((l) => K(l[W]) ? {
|
|
232
232
|
...l,
|
|
233
|
-
[
|
|
233
|
+
[W]: s(l[W])
|
|
234
234
|
} : l);
|
|
235
235
|
return t.direction && typeof t.sorterFn == "function" || e.length ? s(o) : o;
|
|
236
236
|
}
|
|
@@ -272,14 +272,14 @@ function kr(P, ce) {
|
|
|
272
272
|
const { current: r = 0, pageSize: o = 10 } = e;
|
|
273
273
|
return N === !1 || m(N) && d.length <= o ? t : t.slice((r - 1) * o, r * o);
|
|
274
274
|
}
|
|
275
|
-
const
|
|
275
|
+
const It = cr(_t, 100), T = !!(i && i.y), Y = I == null ? void 0 : I(S(H)), St = I && fr.isValidElement(Y) && Y.props.fixed, We = T && St;
|
|
276
276
|
yr(() => {
|
|
277
|
-
_t(), ct(window, "resize",
|
|
277
|
+
_t(), ct(window, "resize", It);
|
|
278
278
|
const t = R.current, e = p.current, r = g.current;
|
|
279
279
|
e && ct(e, "scroll", O);
|
|
280
280
|
const o = t && t.parentNode;
|
|
281
281
|
return t && o && ct(o, "scroll", O), r && ct(r, "scroll", O), () => {
|
|
282
|
-
at(window, "resize",
|
|
282
|
+
at(window, "resize", It), e && at(e, "scroll", O), o && at(o, "scroll", O), r && at(r, "scroll", O);
|
|
283
283
|
};
|
|
284
284
|
}, [
|
|
285
285
|
Q,
|
|
@@ -312,7 +312,7 @@ function kr(P, ce) {
|
|
|
312
312
|
Ne(s);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
const
|
|
315
|
+
const Ie = mr(
|
|
316
316
|
ar(() => {
|
|
317
317
|
const t = _.current, e = T ? p.current : U.current && U.current.parentNode;
|
|
318
318
|
if (e) {
|
|
@@ -344,7 +344,7 @@ function kr(P, ce) {
|
|
|
344
344
|
), Z && At(
|
|
345
345
|
t.classList,
|
|
346
346
|
`${n}-has-fixed-col-right`
|
|
347
|
-
)),
|
|
347
|
+
)), Ie();
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
function At(t, e) {
|
|
@@ -440,7 +440,7 @@ function kr(P, ce) {
|
|
|
440
440
|
onSort: Ee,
|
|
441
441
|
data: k,
|
|
442
442
|
onHandleFilter: Oe,
|
|
443
|
-
onHandleFilterReset:
|
|
443
|
+
onHandleFilterReset: Wt,
|
|
444
444
|
prefixCls: n,
|
|
445
445
|
allSelectedRowKeys: Ke,
|
|
446
446
|
groupColumns: Ht,
|
|
@@ -474,7 +474,7 @@ function kr(P, ce) {
|
|
|
474
474
|
vr,
|
|
475
475
|
{
|
|
476
476
|
prefixCls: n,
|
|
477
|
-
summary:
|
|
477
|
+
summary: I,
|
|
478
478
|
data: k,
|
|
479
479
|
columns: f,
|
|
480
480
|
stickyOffsets: bt,
|
|
@@ -508,7 +508,7 @@ function kr(P, ce) {
|
|
|
508
508
|
},
|
|
509
509
|
___dangerouslySetInnerHTML___: x.___dangerouslySetInnerHTML___
|
|
510
510
|
}
|
|
511
|
-
), Gt = !z && !
|
|
511
|
+
), Gt = !z && !We ? /* @__PURE__ */ v(vt, { children: [
|
|
512
512
|
Ut,
|
|
513
513
|
qt
|
|
514
514
|
] }) : Ut;
|
package/time-picker/util.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Tween as i } from "../dist/tween/src/tween.js";
|
|
|
2
2
|
import { quartInOut as l } from "../dist/tween/src/easing.js";
|
|
3
3
|
import { isDayjs as m } from "dayjs";
|
|
4
4
|
import { dayjs as f, methods as e } from "../components/common/utils/dayjs.js";
|
|
5
|
-
function
|
|
5
|
+
function y(o) {
|
|
6
6
|
const t = ["H", "h", "m", "s", "a", "A"], s = [];
|
|
7
7
|
let a = !1;
|
|
8
8
|
return t.forEach((r) => {
|
|
@@ -13,7 +13,7 @@ function h(o) {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
const c = /* @__PURE__ */ new Map();
|
|
16
|
-
function
|
|
16
|
+
function h(o, t, s) {
|
|
17
17
|
c.get(o) && cancelAnimationFrame(c.get(o)), s <= 0 && (o.scrollTop = t), c.set(
|
|
18
18
|
o,
|
|
19
19
|
requestAnimationFrame(() => {
|
|
@@ -38,7 +38,7 @@ function g(o) {
|
|
|
38
38
|
return o;
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
y as getColumnsFromFormat,
|
|
42
42
|
g as getFormatTime,
|
|
43
|
-
|
|
43
|
+
h as scrollTo
|
|
44
44
|
};
|
package/trigger/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as D, jsxs as $e } from "react/jsx-runtime";
|
|
|
2
2
|
import ut from "../dist/react-transition-group/src/CSSTransition.js";
|
|
3
3
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
4
4
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
5
|
-
import "../dist/react-transition-group/chunk/
|
|
5
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
6
6
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
7
7
|
import ct from "lodash/isArray";
|
|
8
8
|
import S from "lodash/isFunction";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { default, div, default as math, minus, plus, times, } from '@unicom-cloud/utils/math';
|
|
@@ -29,9 +29,9 @@ export interface AlertProps {
|
|
|
29
29
|
/**
|
|
30
30
|
* @zh 警告的类型
|
|
31
31
|
* @en Type of Alert
|
|
32
|
-
* @defaultValue
|
|
32
|
+
* @defaultValue default
|
|
33
33
|
*/
|
|
34
|
-
type?: 'info' | 'success' | 'warning' | 'error';
|
|
34
|
+
type?: 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
35
35
|
/**
|
|
36
36
|
* @zh 标题
|
|
37
37
|
* @en Alert title
|
|
@@ -8,9 +8,9 @@ export interface DetailsProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* @zh 警告的类型
|
|
10
10
|
* @en Type of Details
|
|
11
|
-
* @defaultValue
|
|
11
|
+
* @defaultValue default
|
|
12
12
|
*/
|
|
13
|
-
type?: 'info' | 'success' | 'warning' | 'error';
|
|
13
|
+
type?: 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
14
14
|
/**
|
|
15
15
|
* @zh 标题
|
|
16
16
|
* @en Details title
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as useVerificationCode } from "./use-verification-code";
|
|
2
2
|
export { default as useWatermark } from "./use-watermark";
|
|
3
|
-
export { default as useComputedState } from "./useComputedState";
|
|
4
3
|
export { default as useCreate } from "./useCreate";
|
|
5
4
|
export { default as useForceUpdate } from "./useForceUpdate";
|
|
6
5
|
export { default as useId } from "./useId";
|
package/types/pc/utils/math.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { default, div, default as math, minus, plus, times, } from '@unicom-cloud/utils/math';
|
package/typography/Ellipsis.js
CHANGED
|
@@ -43,14 +43,14 @@ import "lodash/isPlainObject";
|
|
|
43
43
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
44
44
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
45
45
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
46
|
-
import "../dist/react-transition-group/chunk/
|
|
46
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
47
47
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
48
48
|
import "@unicom-cloud/utils/file/saveAs";
|
|
49
49
|
import "@unicom-cloud/utils/screenfull";
|
|
50
50
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
51
51
|
import { throttleByRaf as Z } from "../components/common/utils/throttleByRaf.js";
|
|
52
52
|
import "@unicom-cloud/utils/tree";
|
|
53
|
-
import "
|
|
53
|
+
import { isPlainObject as j } from "@unicom-cloud/utils/is";
|
|
54
54
|
import "uuid";
|
|
55
55
|
import "../dist/validate/src/index.js";
|
|
56
56
|
import "../affix/index.js";
|
|
@@ -137,7 +137,6 @@ import "../virtual-list/VirtualList.js";
|
|
|
137
137
|
import "../watermark/Watermark.js";
|
|
138
138
|
import { resizeObserverEffect as rt } from "../components/common/utils/resizeObserverEffect.js";
|
|
139
139
|
import ot from "../config-provider/context.js";
|
|
140
|
-
import { isPlainObject as j } from "@unicom-cloud/utils/is";
|
|
141
140
|
const it = {
|
|
142
141
|
rows: 1,
|
|
143
142
|
expandable: !0,
|
|
@@ -280,7 +279,7 @@ const it = {
|
|
|
280
279
|
G(),
|
|
281
280
|
I()
|
|
282
281
|
] });
|
|
283
|
-
},
|
|
282
|
+
}, Lo = J(et);
|
|
284
283
|
export {
|
|
285
|
-
|
|
284
|
+
Lo as default
|
|
286
285
|
};
|
package/upload/list/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as L, Fragment as S } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../dist/react-transition-group/src/CSSTransition.js";
|
|
3
3
|
import "../../dist/react-transition-group/src/ReplaceTransition.js";
|
|
4
4
|
import "../../dist/react-transition-group/src/SwitchTransition.js";
|
|
5
|
-
import "../../dist/react-transition-group/chunk/
|
|
5
|
+
import "../../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
6
6
|
import v from "../../dist/react-transition-group/src/TransitionGroup.js";
|
|
7
7
|
import x from "lodash/isFunction";
|
|
8
8
|
import { useContext as T, useState as g, useEffect as b } from "react";
|