@aloudata/aloudata-design 2.0.4 → 2.0.5

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.
@@ -2,9 +2,9 @@ import classNames from 'classnames';
2
2
  import React, { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
3
3
  import Progress from "../Progress";
4
4
  import ScrollArea from "../ScrollArea";
5
+ import Spin from "../Spin";
5
6
  import Body from "./components/Body";
6
7
  import Error from "./components/Body/Error";
7
- import SkeletonBody from "./components/Body/SkeletonBody";
8
8
  import Header from "./components/Header";
9
9
  import { CELL_HEIGHT, HEADER_HEIGHT } from "./constant";
10
10
  import useDirection from "./hooks/useDirection";
@@ -103,13 +103,9 @@ var DataPreviewTable = /*#__PURE__*/forwardRef(function (props, ref) {
103
103
  columnLayout: columnLayout,
104
104
  setWidth: setColumnsWidth,
105
105
  columnRange: columnRange
106
- }), dataStatus === 'pending' && /*#__PURE__*/React.createElement(SkeletonBody, {
107
- columns: tableColumns,
108
- columnRange: columnRange,
109
- columnLayout: columnLayout,
110
- rowRange: rowRange,
111
- rows: skeletonRows
112
- }), dataStatus === 'success' && /*#__PURE__*/React.createElement(Body, {
106
+ }), dataStatus === 'pending' && /*#__PURE__*/React.createElement("div", {
107
+ className: "ald-data-preview-loading"
108
+ }, /*#__PURE__*/React.createElement(Spin, null)), dataStatus === 'success' && /*#__PURE__*/React.createElement(Body, {
113
109
  columns: tableColumns,
114
110
  columnRange: columnRange,
115
111
  columnLayout: columnLayout,
@@ -1,8 +1,8 @@
1
1
  @import '../../style/index.less';
2
2
  @import '../../ScrollArea/style/index.less';
3
3
  @import '../../Progress/style/index.less';
4
- @import '../../Skeleton/style/index.less';
5
4
  @import '../../Result/style/index.less';
5
+ @import '../../Spin/style/index.less';
6
6
 
7
7
  .ald-data-preview-table {
8
8
  border: 1px solid var(--alias-colors-border-default, #e5e7eb);
@@ -137,3 +137,11 @@
137
137
  padding: 30px;
138
138
  position: fixed;
139
139
  }
140
+
141
+ .ald-data-preview-loading {
142
+ width: 100%;
143
+ display: flex;
144
+ justify-content: center;
145
+ align-items: center;
146
+ height: 200px;
147
+ }