@cloudtower/eagle 0.29.8 → 0.29.9
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/cjs/core/Table/TableSkeleton.js +1 -30
- package/dist/cjs/core/Table/index.js +1 -5
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2512 -2511
- package/dist/esm/core/Table/TableSkeleton.js +2 -30
- package/dist/esm/core/Table/index.js +3 -7
- package/dist/esm/index.js +1 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/src/core/Table/TableSkeleton.d.ts +0 -23
- package/dist/src/core/Table/table.type.d.ts +1 -1
- package/dist/src/hooks/useElementsSize.d.ts +3 -0
- package/dist/style.css +2311 -2311
- package/package.json +4 -4
|
@@ -1,39 +1,11 @@
|
|
|
1
1
|
import React__default, { useMemo } from 'react';
|
|
2
|
-
import useElementsSize from '../../hooks/useElementsSize.js';
|
|
3
2
|
|
|
4
|
-
const DynamicTableSkeleton = props => {
|
|
5
|
-
var _a;
|
|
6
|
-
const {
|
|
7
|
-
rowsCount: _rowsCount,
|
|
8
|
-
scrollY = false,
|
|
9
|
-
headerHeight = 48,
|
|
10
|
-
itemHeight: _itemHeight
|
|
11
|
-
} = props;
|
|
12
|
-
const sizes = useElementsSize({
|
|
13
|
-
loading: ".ant-table-container .ant-table-content .ant-table-tbody:not(:has(.ant-empty))",
|
|
14
|
-
scrollYLoading: ".ant-table-container .ant-table-tbody:not(:has(.ant-empty))"
|
|
15
|
-
}, {});
|
|
16
|
-
const containerHeight = (_a = sizes[scrollY ? "scrollYLoading" : "loading"].height) != null ? _a : 0;
|
|
17
|
-
const itemSizes = useElementsSize({
|
|
18
|
-
loading: ".ant-table-container .ant-table-content .ant-table-tbody > tr:not(:first-child):not(:has(.ant-empty))",
|
|
19
|
-
scrollYLoading: ".ant-table-container .ant-table-tbody > tr:not(:first-child):not(:has(.ant-empty))"
|
|
20
|
-
}, {});
|
|
21
|
-
const dynamicItemHeight = itemSizes[scrollY ? "scrollYLoading" : "loading"].height;
|
|
22
|
-
const defaultItemHeight = 40;
|
|
23
|
-
const itemHeight = (_itemHeight != null ? _itemHeight : dynamicItemHeight) || defaultItemHeight;
|
|
24
|
-
const rowsCount = (_rowsCount != null ? _rowsCount : Math.ceil(containerHeight / itemHeight)) || 50;
|
|
25
|
-
return /* @__PURE__ */React__default.createElement(TableSkeleton, {
|
|
26
|
-
rowsCount,
|
|
27
|
-
itemHeight,
|
|
28
|
-
headerHeight
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
3
|
const TableLoadingStyle = "E_t1g36k2w";
|
|
32
4
|
const TableSkeleton = props => {
|
|
33
5
|
const {
|
|
34
6
|
rowsCount = 50,
|
|
35
7
|
headerHeight = 48,
|
|
36
|
-
itemHeight
|
|
8
|
+
itemHeight = 40
|
|
37
9
|
} = props;
|
|
38
10
|
const rows = useMemo(() => Array.from({
|
|
39
11
|
length: rowsCount
|
|
@@ -70,4 +42,4 @@ const TableSkeleton = props => {
|
|
|
70
42
|
}))));
|
|
71
43
|
};
|
|
72
44
|
|
|
73
|
-
export {
|
|
45
|
+
export { TableSkeleton };
|
|
@@ -6,8 +6,7 @@ import { Table as Table$2 } from 'antd';
|
|
|
6
6
|
import cs from 'classnames';
|
|
7
7
|
import { isNil } from 'lodash';
|
|
8
8
|
import React__default, { useRef, useMemo } from 'react';
|
|
9
|
-
import {
|
|
10
|
-
export { TableSkeleton } from './TableSkeleton.js';
|
|
9
|
+
import { TableSkeleton } from './TableSkeleton.js';
|
|
11
10
|
|
|
12
11
|
var __defProp = Object.defineProperty;
|
|
13
12
|
var __defProps = Object.defineProperties;
|
|
@@ -33,7 +32,6 @@ const TableContainerStyle = "E_tc97u5y";
|
|
|
33
32
|
const emptyTableStyle = "E_efzf37v";
|
|
34
33
|
const tableStyleCover = "E_t1fisho6";
|
|
35
34
|
const Table = props => {
|
|
36
|
-
var _a;
|
|
37
35
|
const {
|
|
38
36
|
loading = false,
|
|
39
37
|
error,
|
|
@@ -96,9 +94,7 @@ const Table = props => {
|
|
|
96
94
|
bordered,
|
|
97
95
|
loading: {
|
|
98
96
|
spinning: loading || initLoading,
|
|
99
|
-
indicator: /* @__PURE__ */React__default.createElement(
|
|
100
|
-
scrollY: !!((_a = props.scroll) == null ? void 0 : _a.y)
|
|
101
|
-
}, skeletonProps))
|
|
97
|
+
indicator: /* @__PURE__ */React__default.createElement(TableSkeleton, __spreadValues({}, skeletonProps))
|
|
102
98
|
},
|
|
103
99
|
locale: {
|
|
104
100
|
emptyText
|
|
@@ -129,4 +125,4 @@ const Table = props => {
|
|
|
129
125
|
};
|
|
130
126
|
var Table$1 = Table;
|
|
131
127
|
|
|
132
|
-
export { ColumnTitle,
|
|
128
|
+
export { ColumnTitle, TableSkeleton, Table$1 as default, emptyTableStyle, tableStyleCover, useTableBodyHasScrollBar };
|
package/dist/esm/index.js
CHANGED
|
@@ -97,7 +97,7 @@ export { SidebarMenu } from './core/SidebarMenu/SidebarMenu.js';
|
|
|
97
97
|
export { CircleProgress } from './core/StepProgress/index.js';
|
|
98
98
|
export { CannotOperationInfo, CommonContent, ContentWrapper, Desc, Description, Divider, Dot, ErrorSpan, ExpandArrow, FieldTitle, FormField, FormItemDiv, FormSectionTitle, FormWrapper, FullView, HorizontalWizardModalCompactStyle, HorizontalWizardModalLooseStyle, InfoAlert, InputStyle, KitInputStyle, LeftEndInputStyle, LeftEndSelectStyle, LightDesc, LoadingWrapper, ModalBody, ModalWrapper, NameTag, NormalAlert, NoticeAlert, OperationWraper, RadioDesc, RightEndInputStyle, RightEndSelectStyle, SelectOptionDisabledText, TagSpan, TertiaryText, WarningAlert, WizardBody, radioStyle } from './core/Styled/index.js';
|
|
99
99
|
export { useTableBodyHasScrollBar } from './core/Table/common.js';
|
|
100
|
-
export {
|
|
100
|
+
export { TableSkeleton } from './core/Table/TableSkeleton.js';
|
|
101
101
|
export { ColumnTitle, EmptyRowMenu, KitTableContext, TableLoading } from './core/Table/TableWidget.js';
|
|
102
102
|
export { ValidateTriggerType } from './core/TableForm/types.js';
|
|
103
103
|
export { Typo } from './core/Typo/index.js';
|