@pisell/materials 1.0.232 → 1.0.234
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/table/Gallery/components/VirtualGrid/index.js +9 -0
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Table/index.js +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/Gallery/components/VirtualGrid/index.js +4 -0
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Table/index.js +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/package.json +3 -3
|
@@ -9,6 +9,7 @@ import { FixedSizeGrid as Grid } from "react-window";
|
|
|
9
9
|
import AutoSizer from "react-virtualized-auto-sizer";
|
|
10
10
|
import useGenGridProps from "./useGenGridProps";
|
|
11
11
|
import useGapSize from "./useGapSize";
|
|
12
|
+
import { Empty } from "antd";
|
|
12
13
|
var Cell = function Cell(props) {
|
|
13
14
|
var columnIndex = props.columnIndex,
|
|
14
15
|
rowIndex = props.rowIndex,
|
|
@@ -92,6 +93,14 @@ var VirtualGrid = function VirtualGrid(props) {
|
|
|
92
93
|
rowHeight = props.rowHeight,
|
|
93
94
|
_props$paddingTop = props.paddingTop,
|
|
94
95
|
paddingTop = _props$paddingTop === void 0 ? 0 : _props$paddingTop;
|
|
96
|
+
if (dataSource.length === 0) {
|
|
97
|
+
return /*#__PURE__*/React.createElement(Empty, {
|
|
98
|
+
style: {
|
|
99
|
+
marginTop: 32
|
|
100
|
+
},
|
|
101
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
102
|
+
});
|
|
103
|
+
}
|
|
95
104
|
return /*#__PURE__*/React.createElement(AutoSizer, null, function (_ref) {
|
|
96
105
|
var height = _ref.height,
|
|
97
106
|
width = _ref.width;
|
|
@@ -113,6 +113,7 @@ var GridViewTable = function GridViewTable(_ref) {
|
|
|
113
113
|
rowKey: tableProps.rowKey,
|
|
114
114
|
onSortChange: tableProps.onSortChange
|
|
115
115
|
}, /*#__PURE__*/React.createElement(BasicTable, _extends({
|
|
116
|
+
key: scroll === null || scroll === void 0 ? void 0 : scroll.y,
|
|
116
117
|
dataSource: dataSource,
|
|
117
118
|
columns: columns,
|
|
118
119
|
className: "grid-view-table",
|
|
@@ -146,6 +146,6 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
146
146
|
sort?: SortType | undefined;
|
|
147
147
|
mode: "" | "localStorage" | "remote";
|
|
148
148
|
currentViewMode: ModeType;
|
|
149
|
-
}) => ("
|
|
149
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
150
150
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
151
151
|
export {};
|
|
@@ -37,6 +37,7 @@ var import_react_window = require("react-window");
|
|
|
37
37
|
var import_react_virtualized_auto_sizer = __toESM(require("react-virtualized-auto-sizer"));
|
|
38
38
|
var import_useGenGridProps = __toESM(require("./useGenGridProps"));
|
|
39
39
|
var import_useGapSize = __toESM(require("./useGapSize"));
|
|
40
|
+
var import_antd = require("antd");
|
|
40
41
|
var Cell = (props) => {
|
|
41
42
|
const { columnIndex, rowIndex, style, isScrolling, data } = props;
|
|
42
43
|
const { renderItem, gap, columnCount, dataSource, paddingTop } = data;
|
|
@@ -117,6 +118,9 @@ var VirtualGrid = (props) => {
|
|
|
117
118
|
rowHeight,
|
|
118
119
|
paddingTop = 0
|
|
119
120
|
} = props;
|
|
121
|
+
if (dataSource.length === 0) {
|
|
122
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, { style: { marginTop: 32 }, image: import_antd.Empty.PRESENTED_IMAGE_SIMPLE });
|
|
123
|
+
}
|
|
120
124
|
return /* @__PURE__ */ import_react.default.createElement(import_react_virtualized_auto_sizer.default, null, ({ height, width }) => /* @__PURE__ */ import_react.default.createElement(
|
|
121
125
|
GridComponent,
|
|
122
126
|
{
|
|
@@ -130,6 +130,7 @@ var GridViewTable = ({ tableProps, filter, setTableSetting }) => {
|
|
|
130
130
|
/* @__PURE__ */ import_react.default.createElement(
|
|
131
131
|
import_BasicTable.default,
|
|
132
132
|
{
|
|
133
|
+
key: scroll == null ? void 0 : scroll.y,
|
|
133
134
|
dataSource,
|
|
134
135
|
columns,
|
|
135
136
|
className: "grid-view-table",
|
|
@@ -146,6 +146,6 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
146
146
|
sort?: SortType | undefined;
|
|
147
147
|
mode: "" | "localStorage" | "remote";
|
|
148
148
|
currentViewMode: ModeType;
|
|
149
|
-
}) => ("
|
|
149
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
150
150
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
151
151
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.234",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"react-window": "^1.8.10",
|
|
63
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
|
-
"@pisell/
|
|
65
|
+
"@pisell/date-picker": "1.0.68",
|
|
66
66
|
"@pisell/icon": "0.0.8",
|
|
67
|
-
"@pisell/
|
|
67
|
+
"@pisell/utils": "1.0.23"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|