@arim-aisdc/public-components 2.3.94 → 2.3.96

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.
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
6
6
  declare const customSortFns: {
7
- numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
@@ -357,7 +357,8 @@ var ExportComp = function ExportComp(_ref) {
357
357
  var apiFn = pageFetcher.apiFn,
358
358
  extractItems = pageFetcher.extractItems,
359
359
  extractTotalCount = pageFetcher.extractTotalCount,
360
- extraParams = pageFetcher.extraParams;
360
+ extraParams = pageFetcher.extraParams,
361
+ pageSize = pageFetcher.pageSize;
361
362
  return /*#__PURE__*/function () {
362
363
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
363
364
  var _ref4, _ref5;
@@ -619,6 +620,7 @@ var ExportComp = function ExportComp(_ref) {
619
620
  }
620
621
  setProgress(percent);
621
622
  },
623
+ batchSize: pageSize,
622
624
  onBatchComplete: function onBatchComplete(batchIndex, totalBatches) {
623
625
  console.log("\u5DF2\u5B8C\u6210 ".concat(batchIndex, "/").concat(totalBatches, " \u6279\u6570\u636E\u5BFC\u51FA"));
624
626
  }
@@ -65,7 +65,7 @@ var defaultApplyCellLogic = function defaultApplyCellLogic(value, columnId, orig
65
65
  }
66
66
  return value !== null && value !== void 0 ? value : '';
67
67
  };
68
- var EnableExportColumnTypeList = [ColumnType.Selection, ColumnType.Drag, ColumnType.PlaceHolder, ColumnType.Expander];
68
+ var EnableExportColumnTypeList = [ColumnType.Selection, ColumnType.Drag, ColumnType.PlaceHolder, ColumnType.Expander, ColumnType.Index];
69
69
  function fetchWithRetry(_x) {
70
70
  return _fetchWithRetry.apply(this, arguments);
71
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.94",
3
+ "version": "2.3.96",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,48 +0,0 @@
1
- import React from "react";
2
- import { TableMaxColumnType } from "../../type";
3
- export type PageFetcherConfig<T = any> = {
4
- apiFn: (params: {
5
- skipCount: number;
6
- maxResultCount: number;
7
- }) => Promise<any>;
8
- extractItems: (response: any) => T[];
9
- extractTotalCount?: (response: any) => number;
10
- extraParams?: Record<string, any>;
11
- totalCount?: number;
12
- initialPageSize?: number;
13
- maxConcurrent?: number;
14
- pageSize?: number;
15
- retryCount?: number;
16
- };
17
- type ExportProps = {
18
- tableTitle?: string;
19
- canExport: boolean;
20
- columns: TableMaxColumnType[];
21
- datas?: any[];
22
- exportConfig?: {
23
- /**导出文件名称 */
24
- fileName?: string;
25
- /**导出sheet名称 */
26
- sheetName?: string;
27
- /**是否导出合计行 */
28
- isIncludeTotalRow?: boolean;
29
- /**根据接口获取导出数据,函数返回值是需要导出的数据 */
30
- getExportDataList?: (params?: any) => Promise<any[]>;
31
- pageFetcher: PageFetcherConfig;
32
- };
33
- hasTotalRow?: boolean;
34
- totalDatas?: any[];
35
- };
36
- export type ExportOptions = {
37
- /**导出文件名称 */
38
- fileName?: string;
39
- /**导出sheet名称 */
40
- sheetName?: string;
41
- /**是否导出合计行 */
42
- isIncludeTotalRow?: boolean;
43
- /**根据接口获取导出数据,函数返回值是需要导出的数据 */
44
- getExportDataList?: (params?: any) => Promise<any[]>;
45
- pageFetcher: PageFetcherConfig;
46
- };
47
- export declare const ExportTableData: React.NamedExoticComponent<ExportProps>;
48
- export {};