@next-bricks/presentational-bricks 1.337.0 → 1.337.1

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,7 +2,7 @@ import React from "react";
2
2
  import { TableProps } from "antd/lib/table";
3
3
  import { ExpandableConfig } from "antd/lib/table/interface";
4
4
  import { UseBrickConf } from "@next-core/brick-types";
5
- import { CustomColumn } from "./index";
5
+ import { BrickTableFields, CustomColumn } from "./index";
6
6
  import { MenuIcon } from "@next-core/brick-types";
7
7
  export interface TableDragInfo {
8
8
  order: "asc" | "desc";
@@ -11,6 +11,12 @@ export interface TableDragInfo {
11
11
  }
12
12
  export interface BrickTableProps<RecordType = Record<string, unknown>> extends Pick<TableProps<RecordType>, "dataSource" | "expandRowByClick" | "defaultExpandAllRows" | "onExpand" | "onExpandedRowsChange" | "expandedRowKeys" | "scroll" | "showHeader"> {
13
13
  columns: CustomColumn[];
14
+ fields?: BrickTableFields;
15
+ sort?: string;
16
+ order?: string | number;
17
+ filters?: Record<string, string[]>;
18
+ hiddenColumns?: Array<string | number>;
19
+ sortable?: boolean;
14
20
  configProps?: TableProps<RecordType>;
15
21
  error?: any;
16
22
  deleteEnabled?: boolean;
@@ -1,4 +1,6 @@
1
- import { CellStatusProps } from "./index";
1
+ import { BrickTableFields, CellStatusProps, CustomColumn } from "./index";
2
+ export declare const initColumnsSorterAndFilters: (columns: CustomColumn[], fields?: BrickTableFields, sort?: string, order?: string | number, filters?: Record<string, string[]>) => CustomColumn[];
3
+ export declare const getModifiedColumns: (columns: CustomColumn[], hiddenColumns?: Array<string | number>, sortable?: boolean) => CustomColumn[];
2
4
  export declare const compareFunMap: Record<string, any>;
3
5
  export declare function getCellStyle(cellStatus: CellStatusProps, item: Record<string, any>, value?: any): Record<string, string>;
4
6
  export declare const getKeysOfData: (data: Record<string, any>[], rowKey: string, childrenColumnName: string, keys: string[]) => void;
@@ -141,6 +141,15 @@ export interface CellStatusProps {
141
141
  value: any;
142
142
  }>;
143
143
  }
144
+ export interface BrickTableFields {
145
+ dataSource?: string;
146
+ total?: string;
147
+ rowKey?: string;
148
+ page?: string;
149
+ pageSize?: string;
150
+ ascend?: string | number;
151
+ descend?: string | number;
152
+ }
144
153
  /**
145
154
  * @id presentational-bricks.brick-table
146
155
  * @name presentational-bricks.brick-table
@@ -813,7 +822,6 @@ export declare class BrickTableElement extends UpdatingElement implements BrickT
813
822
  * @description 展开所有行
814
823
  */
815
824
  expandAll(): void;
816
- getModifyColumns(): CustomColumn[];
817
825
  protected _render(): void;
818
826
  private _getAllRows;
819
827
  private _handleDefaultSelectAll;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/presentational-bricks",
3
- "version": "1.337.0",
3
+ "version": "1.337.1",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/easyops-cn/next-basics/tree/master/bricks/presentational-bricks",
6
6
  "license": "GPL-3.0",
@@ -77,5 +77,5 @@
77
77
  "@next-dll/ace": "*",
78
78
  "@next-dll/react-dnd": "*"
79
79
  },
80
- "gitHead": "48b399a3349fe808c0ce9fe6f536ff9c4f400d3f"
80
+ "gitHead": "1578560423eb0e1e49713efef3a4fdc38cf49866"
81
81
  }