@lemon-fe/kits 1.4.27 → 1.4.28-alpha.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.
@@ -1,6 +1,8 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { Key, ReactNode } from 'react';
3
3
  import type { ColType, DataGridProps } from '@lemon-fe/components';
4
+ import type { CustomColumnData } from '@lemon-fe/components/src/data-grid/typings';
5
+ import type { SideBarDef } from 'ag-grid-community';
4
6
  declare type Result<ResultType> = Error | ResultType;
5
7
  declare type ProcessStepParams<T> = {
6
8
  data: T;
@@ -36,6 +38,19 @@ interface Props<RecordType extends Record<string, any> = Record<string, any>, Re
36
38
  process?: ProcessStep<RecordType, any>[] | ((parmas?: ParamsType) => ProcessStep<RecordType, any>[]);
37
39
  columns?: ColType<RecordType>[];
38
40
  rowKey: DataGridProps<RecordType>['rowKey'];
41
+ /**
42
+ * @description 表格控制栏 Specifies the side bar components.
43
+ */
44
+ sideBar?: SideBarDef | string | string[] | boolean | null;
45
+ /**
46
+ * @description 自定义列保存
47
+ * suppressFieldValueGetter 自定义列是否计算
48
+ */
49
+ customColumnPanelStorage?: {
50
+ suppressFieldValueGetter?: boolean;
51
+ set: (data: CustomColumnData) => Promise<void> | void;
52
+ get: () => Promise<CustomColumnData | null | undefined> | CustomColumnData | null | undefined;
53
+ };
39
54
  /**
40
55
  * @description modal footer 默认为null
41
56
  */
@@ -556,6 +556,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
556
556
  lockPinned: true,
557
557
  lockVisible: true,
558
558
  resizable: false,
559
+ suppressColumnsToolPanel: true,
559
560
  render: function render(val, record, idx, _ref9) {
560
561
  var context = _ref9.context,
561
562
  node = _ref9.node,
@@ -656,7 +657,9 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
656
657
  _afterClose = _this$props4.afterClose,
657
658
  rowKey = _this$props4.rowKey,
658
659
  _this$props4$footer = _this$props4.footer,
659
- footer = _this$props4$footer === void 0 ? null : _this$props4$footer;
660
+ footer = _this$props4$footer === void 0 ? null : _this$props4$footer,
661
+ sideBar = _this$props4.sideBar,
662
+ customColumnPanelStorage = _this$props4.customColumnPanelStorage;
660
663
  var _this$state = this.state,
661
664
  results = _this$state.results,
662
665
  open = _this$state.open,
@@ -747,7 +750,9 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
747
750
  columns: cols,
748
751
  rowKey: rowKey,
749
752
  localeText: this.props.locale.DataGrid.localeText,
750
- locale: this.props.locale.DataGrid
753
+ locale: this.props.locale.DataGrid,
754
+ sideBar: sideBar,
755
+ customColumnPanelStorage: customColumnPanelStorage
751
756
  })
752
757
  })
753
758
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.4.27",
3
+ "version": "1.4.28-alpha.1",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@ant-design/icons": "^4.7.0",
27
- "@lemon-fe/components": "^1.4.27-alpha.0",
27
+ "@lemon-fe/components": "^1.4.28-alpha.1",
28
28
  "@lemon-fe/hooks": "^1.4.27-alpha.0",
29
29
  "@lemon-fe/utils": "^1.4.15",
30
30
  "ag-grid-community": "29.2.0",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "registry": "https://registry.npmjs.org"
49
49
  },
50
- "gitHead": "b4c509370e16bb41cce315bfdd8810f47b7733c9"
50
+ "gitHead": "a9ee084ded5af328e89b4e490f2b5c7c4c3d7e0d"
51
51
  }