@jiaozhiye/qm-design-react 1.7.32 → 1.7.34

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 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-06-19 08:46:00
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-07-25 16:48:40
5
+ * @Last Modified time: 2023-09-11 14:48:15
6
6
  */
7
7
  export default {
8
8
  name: 'en',
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-06-19 08:45:54
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-07-25 16:48:08
5
+ * @Last Modified time: 2023-09-11 14:47:16
6
6
  */
7
7
  export default {
8
8
  name: 'zh-cn',
@@ -16,7 +16,7 @@ type IProps = {
16
16
  children?: React.ReactNode;
17
17
  onScroll?: (event: IEvent) => void;
18
18
  };
19
- type ScrollbarRef = {
19
+ export type ScrollbarRef = {
20
20
  SET_SCROLL_TOP: (value: number) => void;
21
21
  SET_SCROLL_LEFT: (value: number) => void;
22
22
  };
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-07-23 18:23:59
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-07-29 23:41:31
5
+ * @Last Modified time: 2023-08-14 20:01:16
6
6
  */
7
7
  /*
8
8
  * @Author: 焦质晔
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-07-23 18:23:59
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-07-29 23:41:31
5
+ * @Last Modified time: 2023-08-14 20:01:16
6
6
  */
7
7
  @import '../antd/index.less';
8
8
  @import './var.less';
@@ -46,13 +46,15 @@ export type ITableContext = {
46
46
  getTableData: () => Promise<void>;
47
47
  setElementStore: (key: string, value: HTMLElement) => void;
48
48
  createTableFullData: (records: IRecord[]) => void;
49
+ updateTableData: () => void;
49
50
  setSorter: (value: ITableState['sorter']) => void;
50
51
  setFilters: (value: ITableState['filters']) => void;
51
52
  setSuperFilters: (options: ITableState['superFilters']) => void;
52
- setSelectionKeys: (rowKeys: IRowKey[]) => void;
53
53
  setHighlightKey: (rowKey: IRowKey) => void;
54
54
  setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
55
55
  setSelectionRows: (records: IRecord[]) => void;
56
+ setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
57
+ setInvalidRowKeys: (rowKeys: IRowKey[]) => void;
56
58
  getSpan: (row: IRecord, column: IColumn, rowIndex: number, columnIndex: number, tableData: IRecord[]) => IRowColSpan;
57
59
  getStickyLeft: (dataIndex: string) => number;
58
60
  getStickyRight: (dataIndex: string) => number;
@@ -25,7 +25,7 @@ type IExtra = {
25
25
  doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string) => void;
26
26
  setHandleState: (option: ITableRef['handleState']) => void;
27
27
  forceUpdate: () => void;
28
- setSelectionKeys: (rowKeys: IRowKey[]) => void;
28
+ setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
29
29
  setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
30
30
  setHighlightKey: (rowKey: IRowKey) => void;
31
31
  setSelectionRows: (records: IRecord[]) => void;
@@ -62,8 +62,8 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
62
62
  createTableData: (list: IRecord[]) => void;
63
63
  createGroupData: (list: IRecord[]) => IRecord<any>[];
64
64
  createSelectionKeys: (rowKeys?: IRowKey[]) => (string | number)[];
65
- createSelectionRows: (selectedKeys: IRowKey[]) => IRecord<any>[];
66
65
  createRowExpandedKeys: (rowKeys?: IRowKey[]) => (string | number)[];
66
+ setSelectionKeysEffect: (selectedKeys: IRowKey[]) => void;
67
67
  findParentRowKeys: (deriveRowKeyList: IDerivedRowKey[], key: IRowKey) => (string | number)[];
68
68
  getAllChildRowKeys: (deriveRowKeyList: IDerivedRowKey[]) => (string | number)[];
69
69
  doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string) => void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ITableRef } from './useTableRef';
3
- import type { TableBodyRef, IColumn, IPagination, IRecord, IRowKey, ITableProps, IMergeCell } from '../table/types';
3
+ import type { TableBodyRef, IColumn, IPagination, IRowKey, ITableProps, IMergeCell } from '../table/types';
4
4
  import type { ComponentSize } from '../../../_utils/types';
5
5
  type IExtra = {
6
6
  tableRef: React.MutableRefObject<ITableRef>;
@@ -15,7 +15,6 @@ type IExtra = {
15
15
  rowExpandedKeys: IRowKey[];
16
16
  highlightKey: IRowKey;
17
17
  summationRows: Record<string, number | string>[];
18
- summationColumns: IColumn[];
19
18
  showSummary: boolean;
20
19
  isWebPagination: boolean;
21
20
  isScrollPagination: boolean;
@@ -26,8 +25,7 @@ type IExtra = {
26
25
  setHandleState: (option: ITableRef['handleState']) => void;
27
26
  scrollYToRecord: (rowKey: IRowKey, index?: number) => void;
28
27
  setOriginColumns: (columns: IColumn[]) => void;
29
- setSelectionKeys: (rowKeys: IRowKey[]) => void;
30
- setSelectionRows: (records: IRecord[]) => void;
28
+ setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
31
29
  setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
32
30
  setHighlightKey: (rowKey: IRowKey) => void;
33
31
  setResizeState: (option: ITableRef['resizeState']) => void;
@@ -37,11 +35,9 @@ type IExtra = {
37
35
  setHandleChange: (value: boolean) => void;
38
36
  calcTableHeight: () => void;
39
37
  createSelectionKeys: (rowKeys?: IRowKey[]) => IRowKey[];
40
- createSelectionRows: (rowKeys: IRowKey[]) => IRecord[];
41
38
  createRowExpandedKeys: (rowKeys?: IRowKey[]) => IRowKey[];
42
39
  createElementStore: (option: Record<string, HTMLElement>) => void;
43
40
  triggerScrollYEvent: (st: number) => void;
44
- forceUpdate: () => void;
45
41
  initialTable: () => void;
46
42
  destroy: () => void;
47
43
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ITableProps, IColumn, IRecord, getRowKeyType, IFetchParams, ISorter, IFilter, IPagination, ISuperFilter } from '../table/types';
2
+ import type { ITableProps, IColumn, IRowKey, IRecord, getRowKeyType, IFetchParams, ISorter, IFilter, IPagination, ISuperFilter } from '../table/types';
3
3
  import type { ITableRef } from './useTableRef';
4
4
  type IExtra = {
5
5
  getRowKey: getRowKeyType;
@@ -9,6 +9,7 @@ type IExtra = {
9
9
  sorter: ISorter;
10
10
  filters: IFilter;
11
11
  superFilters: ISuperFilter[];
12
+ selectionKeys: IRowKey[];
12
13
  pagination: IPagination;
13
14
  };
14
15
  declare const useTableMemo: <T extends ITableProps>(props: T, extra: IExtra) => {
@@ -12,6 +12,7 @@ export type ITableRef = {
12
12
  allRowKeys: IRowKey[];
13
13
  deriveRowKeys: IDerivedRowKey[];
14
14
  flattenRowKeys: IRowKey[];
15
+ invalidRowKeys: IRowKey[];
15
16
  fieldAuth: Record<string, IFieldAuthItem>;
16
17
  mergeCells: IMergeCell[];
17
18
  scrollYStore: {
@@ -52,6 +53,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
52
53
  setTableOriginData: (records: IRecord[]) => void;
53
54
  setAllTableData: (records: IRecord[]) => void;
54
55
  setDeriveRowKeys: (records: IRecord[]) => void;
56
+ setInvalidRowKeys: (rowKeys: IRowKey[]) => void;
55
57
  setFieldAuth: (key: string, value: IFieldAuthItem) => void;
56
58
  setMergeCells: (values: IMergeCell[]) => void;
57
59
  setScrollYStore: (option: ITableRef['scrollYStore']) => void;
@@ -75,6 +77,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
75
77
  allRowKeys: IRowKey[];
76
78
  deriveRowKeys: IDerivedRowKey[];
77
79
  flattenRowKeys: IRowKey[];
80
+ invalidRowKeys: IRowKey[];
78
81
  fieldAuth: Record<string, IFieldAuthItem>;
79
82
  mergeCells: IMergeCell[];
80
83
  scrollYStore: {
@@ -93,5 +93,6 @@ declare const useTableState: <T extends ITableProps>(props: T) => {
93
93
  setPingRight: React.Dispatch<React.SetStateAction<boolean>>;
94
94
  isFullScreen: boolean;
95
95
  setFullScreen: React.Dispatch<React.SetStateAction<boolean>>;
96
+ updateTableData: () => void;
96
97
  };
97
98
  export default useTableState;
@@ -26,7 +26,7 @@ export declare const getCellValue: (record: IRecord, dataIndex: string) => any;
26
26
  export declare const setCellValue: (record: IRecord, dataIndex: string, val: unknown, precision?: number) => void;
27
27
  export declare const getSplitValue: (record: IRecord, key: string) => string;
28
28
  export declare const setSplitValue: (record: IRecord, key: string, val: string, precision?: number) => void;
29
- export declare const formatNumber: (value: number | string) => string;
29
+ export declare const formatNumber: (value: string | number) => string;
30
30
  export declare const validateNumber: (val: string) => boolean;
31
31
  export declare const stringToNumber: (input: string) => number | '';
32
32
  export declare const getDate: (dateString: string | undefined, format: string) => dayjs.Dayjs | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.7.32",
3
+ "version": "1.7.34",
4
4
  "description": "A Component Library for React",
5
5
  "keywords": [
6
6
  "React",
@@ -96,11 +96,11 @@
96
96
  "@typescript-eslint/parser": "^5.30.0",
97
97
  "autoprefixer": "^10.4.14",
98
98
  "babel-loader": "^9.1.0",
99
- "core-js": "^3.30.0",
99
+ "core-js": "^3.32.0",
100
100
  "cp-cli": "^2.0.0",
101
101
  "cross-env": "^7.0.3",
102
102
  "css-loader": "^6.7.3",
103
- "eslint": "^8.30.0",
103
+ "eslint": "^8.40.0",
104
104
  "eslint-plugin-prettier": "^4.2.0",
105
105
  "eslint-plugin-react": "^7.32.0",
106
106
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -114,8 +114,8 @@
114
114
  "gulp-typescript": "^6.0.0-alpha.1",
115
115
  "html-webpack-plugin": "^5.5.0",
116
116
  "husky": "^4.3.8",
117
- "less": "^4.1.3",
118
- "less-loader": "^11.1.0",
117
+ "less": "^4.2.0",
118
+ "less-loader": "^11.1.2",
119
119
  "lint-staged": "^10.5.4",
120
120
  "mockjs": "^1.1.0",
121
121
  "prettier": "^2.8.8",
@@ -125,11 +125,11 @@
125
125
  "rollup": "^2.79.1",
126
126
  "rollup-plugin-terser": "^7.0.2",
127
127
  "style-loader": "^3.3.2",
128
- "ts-loader": "^9.4.2",
128
+ "ts-loader": "^9.4.4",
129
129
  "typescript": "^4.9.5",
130
- "webpack": "^5.88.0",
130
+ "webpack": "^5.88.2",
131
131
  "webpack-cli": "^5.1.4",
132
- "webpack-dev-server": "^4.15.0",
132
+ "webpack-dev-server": "^4.15.1",
133
133
  "webpack-node-externals": "^3.0.0"
134
134
  },
135
135
  "engines": {