@jiaozhiye/qm-design-react 1.7.33 → 2.0.0

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.
@@ -50,10 +50,11 @@ export type ITableContext = {
50
50
  setSorter: (value: ITableState['sorter']) => void;
51
51
  setFilters: (value: ITableState['filters']) => void;
52
52
  setSuperFilters: (options: ITableState['superFilters']) => void;
53
- setSelectionKeys: (rowKeys: IRowKey[]) => void;
54
53
  setHighlightKey: (rowKey: IRowKey) => void;
55
54
  setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
56
55
  setSelectionRows: (records: IRecord[]) => void;
56
+ setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
57
+ setInvalidRowKeys: (rowKeys: IRowKey[]) => void;
57
58
  getSpan: (row: IRecord, column: IColumn, rowIndex: number, columnIndex: number, tableData: IRecord[]) => IRowColSpan;
58
59
  getStickyLeft: (dataIndex: string) => number;
59
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
  };
@@ -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: {
@@ -10,8 +10,7 @@ type IProps = UploadProps & {
10
10
  };
11
11
  type IState = {
12
12
  previewVisible: boolean;
13
- previewImage: string;
14
- previewTitle: string;
13
+ currentIndex: number;
15
14
  };
16
15
  export type UploadImgProps = IProps;
17
16
  declare class QmUploadImg extends Component<IProps, IState> {
@@ -26,7 +25,7 @@ declare class QmUploadImg extends Component<IProps, IState> {
26
25
  state: IState;
27
26
  get showUploadButton(): boolean;
28
27
  beforeUpload: (file: any, fileList: any) => Promise<any>;
29
- handlePreview: (file: any) => Promise<void>;
28
+ handlePreview: (file: any) => void;
30
29
  render(): React.JSX.Element;
31
30
  }
32
31
  export default QmUploadImg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.7.33",
3
+ "version": "2.0.0",
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": {