@pisell/materials 1.0.401 → 1.0.402

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.
@@ -123,7 +123,7 @@ var GridViewTable = function GridViewTable(_ref) {
123
123
  }));
124
124
  };
125
125
  var AutoSizerContent = function AutoSizerContent(props) {
126
- var _tableProps$paginatio7, _tableProps$paginatio8, _tableProps$paginatio9, _tableProps$paginatio10;
126
+ var _tableProps$paginatio9, _tableProps$paginatio10, _tableProps$paginatio11, _tableProps$paginatio12;
127
127
  var tableProps = props.tableProps,
128
128
  dataSource = props.dataSource,
129
129
  paginationConfig = props.paginationConfig,
@@ -136,13 +136,13 @@ var AutoSizerContent = function AutoSizerContent(props) {
136
136
  wait: 500
137
137
  });
138
138
  var isShowPagination = useMemo(function () {
139
- var _tableProps$paginatio3, _tableProps$paginatio4, _tableProps$paginatio5, _tableProps$paginatio6;
139
+ var _tableProps$paginatio3, _tableProps$paginatio4, _tableProps$paginatio5, _tableProps$paginatio6, _tableProps$paginatio7, _tableProps$paginatio8;
140
140
  var total = (tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio3 = tableProps.pagination) === null || _tableProps$paginatio3 === void 0 ? void 0 : _tableProps$paginatio3.total) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || 0;
141
141
  if (tableProps !== null && tableProps !== void 0 && (_tableProps$paginatio4 = tableProps.pagination) !== null && _tableProps$paginatio4 !== void 0 && _tableProps$paginatio4.localPagination) {
142
142
  total = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || 0;
143
143
  }
144
- return total > ((tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio5 = tableProps.pagination) === null || _tableProps$paginatio5 === void 0 ? void 0 : (_tableProps$paginatio6 = _tableProps$paginatio5.pageSizeOptions) === null || _tableProps$paginatio6 === void 0 ? void 0 : _tableProps$paginatio6[0]) || 10);
145
- }, [tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio7 = tableProps.pagination) === null || _tableProps$paginatio7 === void 0 ? void 0 : _tableProps$paginatio7.localPagination, tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio8 = tableProps.pagination) === null || _tableProps$paginatio8 === void 0 ? void 0 : _tableProps$paginatio8.total, dataSource.length, tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio9 = tableProps.pagination) === null || _tableProps$paginatio9 === void 0 ? void 0 : (_tableProps$paginatio10 = _tableProps$paginatio9.pageSizeOptions) === null || _tableProps$paginatio10 === void 0 ? void 0 : _tableProps$paginatio10[0]]);
144
+ return total > ((tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio5 = tableProps.pagination) === null || _tableProps$paginatio5 === void 0 ? void 0 : _tableProps$paginatio5.pageSize) || (tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio6 = tableProps.pagination) === null || _tableProps$paginatio6 === void 0 ? void 0 : (_tableProps$paginatio7 = _tableProps$paginatio6.pageSizeOptions) === null || _tableProps$paginatio7 === void 0 ? void 0 : _tableProps$paginatio7[0]) || 10) || (tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio8 = tableProps.pagination) === null || _tableProps$paginatio8 === void 0 ? void 0 : _tableProps$paginatio8.showPagination) && total > 10;
145
+ }, [tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio9 = tableProps.pagination) === null || _tableProps$paginatio9 === void 0 ? void 0 : _tableProps$paginatio9.localPagination, tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio10 = tableProps.pagination) === null || _tableProps$paginatio10 === void 0 ? void 0 : _tableProps$paginatio10.total, dataSource.length, tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio11 = tableProps.pagination) === null || _tableProps$paginatio11 === void 0 ? void 0 : (_tableProps$paginatio12 = _tableProps$paginatio11.pageSizeOptions) === null || _tableProps$paginatio12 === void 0 ? void 0 : _tableProps$paginatio12[0]]);
146
146
  var scroll = useGenScroll({
147
147
  wrapHeight: debouncedHeight || 500,
148
148
  scroll: tableProps.scroll,
@@ -29,4 +29,7 @@
29
29
 
30
30
  .materials-grid-table-wrap {
31
31
  flex: 1;
32
+ // 使用overflow hidden 计算 materials-grid-table-wrap高度时不会动态变更
33
+ overflow: hidden;
34
+ padding-bottom: 24px;
32
35
  }
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
167
167
  sort?: SortType | undefined;
168
168
  mode: "" | "localStorage" | "remote";
169
169
  currentViewMode: ModeType;
170
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
170
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
171
171
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
172
  export declare const stringify: (obj: Record<string, any>) => string;
173
173
  export {};
@@ -155,12 +155,12 @@ var AutoSizerContent = (props) => {
155
155
  const { height } = (0, import_ahooks.useSize)(tableWrapRef) || {};
156
156
  const debouncedHeight = (0, import_ahooks.useDebounce)(height, { wait: 500 });
157
157
  const isShowPagination = (0, import_react.useMemo)(() => {
158
- var _a2, _b2, _c2, _d2;
158
+ var _a2, _b2, _c2, _d2, _e, _f;
159
159
  let total = ((_a2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _a2.total) || (dataSource == null ? void 0 : dataSource.length) || 0;
160
160
  if ((_b2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _b2.localPagination) {
161
161
  total = (dataSource == null ? void 0 : dataSource.length) || 0;
162
162
  }
163
- return total > (((_d2 = (_c2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _c2.pageSizeOptions) == null ? void 0 : _d2[0]) || 10);
163
+ return total > (((_c2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _c2.pageSize) || ((_e = (_d2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _d2.pageSizeOptions) == null ? void 0 : _e[0]) || 10) || ((_f = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _f.showPagination) && total > 10;
164
164
  }, [
165
165
  (_a = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _a.localPagination,
166
166
  (_b = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _b.total,
@@ -29,4 +29,7 @@
29
29
 
30
30
  .materials-grid-table-wrap {
31
31
  flex: 1;
32
+ // 使用overflow hidden 计算 materials-grid-table-wrap高度时不会动态变更
33
+ overflow: hidden;
34
+ padding-bottom: 24px;
32
35
  }
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
167
167
  sort?: SortType | undefined;
168
168
  mode: "" | "localStorage" | "remote";
169
169
  currentViewMode: ModeType;
170
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
170
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
171
171
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
172
  export declare const stringify: (obj: Record<string, any>) => string;
173
173
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.401",
3
+ "version": "1.0.402",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1,9 +0,0 @@
1
- /**
2
- * @title: 格式化导出导入接口地址
3
- * @description:
4
- * @param {string} url
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-09-05 11:39
8
- */
9
- export declare const formatApiUrl: (url: string) => string;
@@ -1,11 +0,0 @@
1
- /**
2
- * @title: 格式化导出导入接口地址
3
- * @description:
4
- * @param {string} url
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-09-05 11:39
8
- */
9
- export var formatApiUrl = function formatApiUrl(url) {
10
- return url || '/shop/form/data';
11
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * @title: 格式化导出导入接口地址
3
- * @description:
4
- * @param {string} url
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-09-05 11:39
8
- */
9
- export declare const formatApiUrl: (url: string) => string;
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/table/Actions/component/ExportImport/utils/index.ts
20
- var utils_exports = {};
21
- __export(utils_exports, {
22
- formatApiUrl: () => formatApiUrl
23
- });
24
- module.exports = __toCommonJS(utils_exports);
25
- var formatApiUrl = (url) => {
26
- return url || "/shop/form/data";
27
- };
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- formatApiUrl
31
- });