@cloudtower/eagle 0.29.8 → 0.29.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/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 +2376 -2375
- 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 +2451 -2451
- package/package.json +4 -4
|
@@ -1,45 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var useElementsSize = require('../../hooks/useElementsSize.js');
|
|
5
4
|
|
|
6
5
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
6
|
|
|
8
7
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
9
8
|
|
|
10
|
-
const DynamicTableSkeleton = props => {
|
|
11
|
-
var _a;
|
|
12
|
-
const {
|
|
13
|
-
rowsCount: _rowsCount,
|
|
14
|
-
scrollY = false,
|
|
15
|
-
headerHeight = 48,
|
|
16
|
-
itemHeight: _itemHeight
|
|
17
|
-
} = props;
|
|
18
|
-
const sizes = useElementsSize({
|
|
19
|
-
loading: ".ant-table-container .ant-table-content .ant-table-tbody:not(:has(.ant-empty))",
|
|
20
|
-
scrollYLoading: ".ant-table-container .ant-table-tbody:not(:has(.ant-empty))"
|
|
21
|
-
}, {});
|
|
22
|
-
const containerHeight = (_a = sizes[scrollY ? "scrollYLoading" : "loading"].height) != null ? _a : 0;
|
|
23
|
-
const itemSizes = useElementsSize({
|
|
24
|
-
loading: ".ant-table-container .ant-table-content .ant-table-tbody > tr:not(:first-child):not(:has(.ant-empty))",
|
|
25
|
-
scrollYLoading: ".ant-table-container .ant-table-tbody > tr:not(:first-child):not(:has(.ant-empty))"
|
|
26
|
-
}, {});
|
|
27
|
-
const dynamicItemHeight = itemSizes[scrollY ? "scrollYLoading" : "loading"].height;
|
|
28
|
-
const defaultItemHeight = 40;
|
|
29
|
-
const itemHeight = (_itemHeight != null ? _itemHeight : dynamicItemHeight) || defaultItemHeight;
|
|
30
|
-
const rowsCount = (_rowsCount != null ? _rowsCount : Math.ceil(containerHeight / itemHeight)) || 50;
|
|
31
|
-
return /* @__PURE__ */React__default.default.createElement(TableSkeleton, {
|
|
32
|
-
rowsCount,
|
|
33
|
-
itemHeight,
|
|
34
|
-
headerHeight
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
9
|
const TableLoadingStyle = "E_t1g36k2w";
|
|
38
10
|
const TableSkeleton = props => {
|
|
39
11
|
const {
|
|
40
12
|
rowsCount = 50,
|
|
41
13
|
headerHeight = 48,
|
|
42
|
-
itemHeight
|
|
14
|
+
itemHeight = 40
|
|
43
15
|
} = props;
|
|
44
16
|
const rows = React.useMemo(() => Array.from({
|
|
45
17
|
length: rowsCount
|
|
@@ -76,5 +48,4 @@ const TableSkeleton = props => {
|
|
|
76
48
|
}))));
|
|
77
49
|
};
|
|
78
50
|
|
|
79
|
-
exports.DynamicTableSkeleton = DynamicTableSkeleton;
|
|
80
51
|
exports.TableSkeleton = TableSkeleton;
|
|
@@ -40,7 +40,6 @@ const TableContainerStyle = "E_tc97u5y";
|
|
|
40
40
|
const emptyTableStyle = "E_efzf37v";
|
|
41
41
|
const tableStyleCover = "E_t1fisho6";
|
|
42
42
|
const Table = props => {
|
|
43
|
-
var _a;
|
|
44
43
|
const {
|
|
45
44
|
loading = false,
|
|
46
45
|
error,
|
|
@@ -103,9 +102,7 @@ const Table = props => {
|
|
|
103
102
|
bordered,
|
|
104
103
|
loading: {
|
|
105
104
|
spinning: loading || initLoading,
|
|
106
|
-
indicator: /* @__PURE__ */React__default.default.createElement(TableSkeleton.
|
|
107
|
-
scrollY: !!((_a = props.scroll) == null ? void 0 : _a.y)
|
|
108
|
-
}, skeletonProps))
|
|
105
|
+
indicator: /* @__PURE__ */React__default.default.createElement(TableSkeleton.TableSkeleton, __spreadValues({}, skeletonProps))
|
|
109
106
|
},
|
|
110
107
|
locale: {
|
|
111
108
|
emptyText
|
|
@@ -141,7 +138,6 @@ exports.ColumnTitle = TableWidget.ColumnTitle;
|
|
|
141
138
|
exports.EmptyRowMenu = TableWidget.EmptyRowMenu;
|
|
142
139
|
exports.KitTableContext = TableWidget.KitTableContext;
|
|
143
140
|
exports.TableLoading = TableWidget.TableLoading;
|
|
144
|
-
exports.DynamicTableSkeleton = TableSkeleton.DynamicTableSkeleton;
|
|
145
141
|
exports.TableSkeleton = TableSkeleton.TableSkeleton;
|
|
146
142
|
exports.default = Table$1;
|
|
147
143
|
exports.emptyTableStyle = emptyTableStyle;
|
package/dist/cjs/index.js
CHANGED
|
@@ -471,7 +471,6 @@ exports.WarningAlert = index$1a.WarningAlert;
|
|
|
471
471
|
exports.WizardBody = index$1a.WizardBody;
|
|
472
472
|
exports.radioStyle = index$1a.radioStyle;
|
|
473
473
|
exports.useTableBodyHasScrollBar = common.useTableBodyHasScrollBar;
|
|
474
|
-
exports.DynamicTableSkeleton = TableSkeleton.DynamicTableSkeleton;
|
|
475
474
|
exports.TableSkeleton = TableSkeleton.TableSkeleton;
|
|
476
475
|
exports.ColumnTitle = TableWidget.ColumnTitle;
|
|
477
476
|
exports.EmptyRowMenu = TableWidget.EmptyRowMenu;
|