@jiaozhiye/qm-design-react 1.11.19 → 1.11.21

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,5 +2,8 @@ import React from 'react';
2
2
  export type AreaSelectRef = {
3
3
  blur: () => void;
4
4
  };
5
- declare const AreaSelect: React.ForwardRefExoticComponent<React.RefAttributes<AreaSelectRef>>;
5
+ type IProps = {
6
+ rowVirtualize: any;
7
+ };
8
+ declare const AreaSelect: React.ForwardRefExoticComponent<IProps & React.RefAttributes<AreaSelectRef>>;
6
9
  export default AreaSelect;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { TableBodyRef, IColumn, IDerivedRowKey, IFetchParams, IPagination, IRecord, IRowColSpan, IRowKey, IRule, IMergeCellItem, IMergedCell } from '../table/types';
2
+ import type { TableBodyRef, IColumn, IFetchParams, IPagination, IRecord, IRowColSpan, IRowKey, IRule, IMergeCellItem, IMergedCell } from '../table/types';
3
3
  import type { ITableRef } from '../hooks/useTableRef';
4
4
  import type { ITableState } from '../hooks/useTableState';
5
5
  import type { ComponentSize } from '../../../_utils/types';
@@ -72,8 +72,6 @@ export type ITableContext = {
72
72
  doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string, columnTitle: string) => void;
73
73
  createTableData: (list: IRecord[]) => void;
74
74
  createGroupData: (records: IRecord[]) => IRecord[];
75
- findParentRowKeys: (deriveRowKeys: IDerivedRowKey[], key: IRowKey) => IRowKey[];
76
- getAllChildRowKeys: (deriveRowKeys: IDerivedRowKey[]) => IRowKey[];
77
75
  scrollBottomDebouncer: (event: React.MouseEvent<HTMLDivElement>) => void;
78
76
  resetTableScroll: () => void;
79
77
  clearTableSorter: () => void;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { ITableRef } from './useTableRef';
3
3
  import type { ITableState } from './useTableState';
4
- import type { getRowKeyType, IColumn, IDerivedRowKey, IFetchParams, IFieldAuthItem, IFilter, IPagination, IRecord, IRowKey, IRule, ISorter, ISuperFilter, ITableProps, IValidItem, TableBodyRef } from '../table/types';
4
+ import type { getRowKeyType, IColumn, IFetchParams, IFieldAuthItem, IFilter, IPagination, IRecord, IRowKey, IRule, ISorter, ISuperFilter, ITableProps, IValidItem, TableBodyRef } from '../table/types';
5
5
  import type { ComponentSize } from '../../../_utils/types';
6
6
  type IExtra = {
7
7
  getRowKey: getRowKeyType;
@@ -64,8 +64,6 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
64
64
  createTableData: (list: IRecord[]) => void;
65
65
  createGroupData: (list: IRecord[]) => IRecord<any>[];
66
66
  setSelectionKeysEffect: (selectedKeys: IRowKey[]) => void;
67
- findParentRowKeys: (deriveRowKeyList: IDerivedRowKey[], key: IRowKey) => (string | number)[];
68
- getAllChildRowKeys: (deriveRowKeyList: IDerivedRowKey[]) => (string | number)[];
69
67
  doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string, columnTitle: string) => void;
70
68
  getTableLog: () => {
71
69
  required: IValidItem[];
@@ -140,6 +140,7 @@ export type IEditerReturn = {
140
140
  columns?: IColumn[];
141
141
  rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
142
142
  webPagination?: boolean;
143
+ topBarExtra?: React.ReactNode;
143
144
  };
144
145
  tree?: {
145
146
  fetch?: IFetch & {
@@ -45,6 +45,8 @@ export declare const groupByProps: (array?: IRecord[], props?: string[]) => any[
45
45
  export declare const deepGetColumn: (arr: IColumn[], value: string) => IColumn[] | undefined;
46
46
  export declare const deepGetRowkey: (arr: IRecord[], value: IRowKey) => IRowKey[] | undefined;
47
47
  export declare const deepFindRecord: (arr: IRecord[], fn: (node: IRecord) => boolean) => Nullable<IRecord>;
48
+ export declare const findParentRowKeys: (deriveRowKeyList: IDerivedRowKey[], key: IRowKey) => (string | number)[];
49
+ export declare const getAllChildRowKeys: (deriveRowKeyList: IDerivedRowKey[]) => (string | number)[];
48
50
  export declare const deepTreeFilter: (tree: any[], fn: (node: unknown) => boolean) => any[];
49
51
  export declare const flatToTree: (list: any[], id: string, pid: string) => any[];
50
52
  export declare const sortableFormatter: <T>(items: T[]) => T[];
@@ -8,6 +8,7 @@ type ITableConfig = {
8
8
  rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
9
9
  webPagination?: boolean;
10
10
  paginationConfig?: IPaginationConfig;
11
+ topBarExtra?: React.ReactNode;
11
12
  };
12
13
  type IProps = {
13
14
  size?: ComponentSize;
@@ -110,16 +110,25 @@ export declare class Virtualizer<TScrollElement extends Element | Window, TItemE
110
110
  private getFurthestMeasurement;
111
111
  private getMeasurementOptions;
112
112
  private getMeasurements;
113
- calculateRange: () => {
114
- startIndex: number;
115
- endIndex: number;
116
- } | null;
117
- getVirtualIndexes: () => number[];
113
+ calculateRange: {
114
+ (): {
115
+ startIndex: number;
116
+ endIndex: number;
117
+ } | null;
118
+ updateDeps(newDeps: [VirtualItem[], number, number]): void;
119
+ };
120
+ getVirtualIndexes: {
121
+ (): number[];
122
+ updateDeps(newDeps: [(range: Range) => number[], number, number, number | null, number | null]): void;
123
+ };
118
124
  indexFromElement: (node: TItemElement) => number;
119
125
  private _measureElement;
120
126
  resizeItem: (index: number, size: number) => void;
121
127
  measureElement: (node: TItemElement | null | undefined) => void;
122
- getVirtualItems: () => VirtualItem[];
128
+ getVirtualItems: {
129
+ (): VirtualItem[];
130
+ updateDeps(newDeps: [number[], VirtualItem[]]): void;
131
+ };
123
132
  getVirtualItemForOffset: (offset: number) => VirtualItem | undefined;
124
133
  getOffsetForAlignment: (toOffset: number, align: ScrollAlignment) => number;
125
134
  getOffsetForIndex: (index: number, align?: ScrollAlignment) => readonly [number, "auto"] | readonly [number, "center"] | readonly [number, "end"] | readonly [number, "start"] | undefined;
@@ -7,7 +7,10 @@ export declare function memo<TDeps extends ReadonlyArray<any>, TResult>(getDeps:
7
7
  debug?: () => boolean;
8
8
  onChange?: (result: TResult) => void;
9
9
  initialDeps?: TDeps;
10
- }): () => TResult;
10
+ }): {
11
+ (): TResult;
12
+ updateDeps(newDeps: [...TDeps]): void;
13
+ };
11
14
  export declare function notUndefined<T>(value: T | undefined, msg?: string): T;
12
15
  export declare const approxEqual: (a: number, b: number) => boolean;
13
16
  export declare const debounce: (targetWindow: Window & typeof globalThis, fn: AnyFunction<any>, ms: number) => (this: any, ...args: Array<any>) => void;
package/package.json CHANGED
@@ -1,140 +1,140 @@
1
- {
2
- "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.11.19",
4
- "description": "A Component Library for React",
5
- "keywords": [
6
- "React",
7
- "components",
8
- "typescript"
9
- ],
10
- "author": "jiaozhiye",
11
- "license": "MIT",
12
- "scripts": {
13
- "dev": "cross-env NODE_ENV=development BABEL_ENV=web webpack serve --progress --config build/webpack.src.conf.js",
14
- "build:lib": "yarn clean:lib && yarn build:umd && yarn build:esm && yarn build:type && yarn build:locale && yarn build:theme",
15
- "build:umd": "cross-env NODE_ENV=production BABEL_ENV=lib webpack --config ./build/webpack.build.conf.js",
16
- "build:esm": "cross-env BABEL_ENV=lib rollup --config ./build/build-esm.rollup.js",
17
- "build:type": "gulp build --gulpfile ./build/build-type.gulp.js && cp-cli lib/packages lib && rimraf lib/packages",
18
- "build:locale": "cross-env BABEL_ENV=lib babel packages/locale --extensions .ts --out-dir lib/locale",
19
- "build:theme": "gulp build --gulpfile ./build/build-style.gulp.js",
20
- "clean:lib": "rimraf lib",
21
- "lint": "eslint ./packages --ext .js,.ts,.jsx,.tsx",
22
- "lint-fix": "eslint --fix ./packages --ext .js,.ts,.jsx,.tsx",
23
- "format": "prettier --write \"./packages/**/*.{js,ts,jsx,tsx}\""
24
- },
25
- "husky": {
26
- "hooks": {
27
- "pre-commit": "lint-staged"
28
- }
29
- },
30
- "lint-staged": {
31
- "packages/**/*.{js,ts,jsx,tsx}": [
32
- "npm run lint-fix",
33
- "git add"
34
- ],
35
- "packages/**/*.{less}": "prettier --write"
36
- },
37
- "publishConfig": {
38
- "registry": "https://registry.npmjs.org/"
39
- },
40
- "files": [
41
- "lib"
42
- ],
43
- "main": "lib/index.js",
44
- "module": "lib/index.esm.js",
45
- "unpkg": "lib/index.full.js",
46
- "types": "lib/index.d.ts",
47
- "style": "lib/style/index.css",
48
- "peerDependencies": {
49
- "react": ">=16.14.0",
50
- "react-dom": ">=16.14.0"
51
- },
52
- "dependencies": {
53
- "@rc-component/color-picker": "^2.0.1",
54
- "@rc-component/portal": "^1.1.2",
55
- "@rc-component/trigger": "^2.2.0",
56
- "add-dom-event-listener": "^1.1.0",
57
- "antd": "4.24.16",
58
- "big.js": "^6.2.1",
59
- "china-area-data": "^5.0.1",
60
- "classnames": "^2.3.2",
61
- "copy-to-clipboard": "^3.3.2",
62
- "cropperjs": "^1.5.12",
63
- "dayjs": "1.x",
64
- "exceljs": "^4.4.0",
65
- "html2canvas": "^1.4.1",
66
- "localforage": "^1.10.0",
67
- "lodash-es": "^4.17.21",
68
- "memoize-one": "^6.0.0",
69
- "prop-types": "^15.8.1",
70
- "react-countup": "^6.4.0",
71
- "react-draggable": "^4.4.6",
72
- "react-sortablejs": "^6.1.4",
73
- "resize-observer-polyfill": "^1.5.1",
74
- "scroll-into-view-if-needed": "^2.2.31",
75
- "sortablejs": "^1.15.2"
76
- },
77
- "devDependencies": {
78
- "@babel/cli": "^7.24.7",
79
- "@babel/core": "^7.24.7",
80
- "@babel/plugin-proposal-decorators": "^7.24.7",
81
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
82
- "@babel/plugin-transform-class-properties": "^7.24.7",
83
- "@babel/plugin-transform-runtime": "^7.24.7",
84
- "@babel/preset-env": "^7.24.7",
85
- "@babel/preset-react": "^7.24.7",
86
- "@babel/preset-typescript": "^7.24.7",
87
- "@rollup/plugin-babel": "^5.3.0",
88
- "@rollup/plugin-commonjs": "^22.0.2",
89
- "@rollup/plugin-json": "^4.1.0",
90
- "@rollup/plugin-node-resolve": "^14.1.0",
91
- "@rollup/plugin-replace": "^4.0.0",
92
- "@rollup/plugin-terser": "^0.4.4",
93
- "@rollup/plugin-typescript": "^8.5.0",
94
- "@types/lodash-es": "^4.17.6",
95
- "@types/react": "^18.3.0",
96
- "@types/react-dom": "^18.3.0",
97
- "@typescript-eslint/eslint-plugin": "^5.30.0",
98
- "@typescript-eslint/parser": "^5.30.0",
99
- "autoprefixer": "^10.4.14",
100
- "axios": "^0.27.2",
101
- "babel-loader": "^9.1.3",
102
- "core-js": "^3.32.0",
103
- "cp-cli": "^2.0.0",
104
- "cross-env": "^7.0.3",
105
- "css-loader": "^6.11.0",
106
- "eslint": "^8.40.0",
107
- "eslint-plugin-prettier": "^4.2.0",
108
- "eslint-plugin-react": "^7.32.0",
109
- "eslint-plugin-react-hooks": "^4.6.0",
110
- "eslint-webpack-plugin": "^3.2.0",
111
- "gulp": "^4.0.2",
112
- "gulp-autoprefixer": "^8.0.0",
113
- "gulp-clean-css": "^4.3.0",
114
- "gulp-ignore": "^3.0.0",
115
- "gulp-less": "^5.0.0",
116
- "gulp-rename": "^2.0.0",
117
- "gulp-typescript": "^6.0.0-alpha.1",
118
- "html-webpack-plugin": "^5.6.0",
119
- "husky": "^4.3.8",
120
- "less": "^4.2.0",
121
- "less-loader": "^11.1.4",
122
- "lint-staged": "^10.5.4",
123
- "mockjs": "^1.1.0",
124
- "prettier": "^2.8.8",
125
- "react": "^17.0.2",
126
- "react-dom": "^17.0.2",
127
- "rimraf": "^3.0.2",
128
- "rollup": "^2.79.1",
129
- "style-loader": "^3.3.4",
130
- "ts-loader": "^9.4.4",
131
- "typescript": "^4.9.5",
132
- "webpack": "^5.98.0",
133
- "webpack-cli": "^5.1.4",
134
- "webpack-dev-server": "^4.15.2",
135
- "webpack-node-externals": "^3.0.0"
136
- },
137
- "engines": {
138
- "node": ">= 14"
139
- }
140
- }
1
+ {
2
+ "name": "@jiaozhiye/qm-design-react",
3
+ "version": "1.11.21",
4
+ "description": "A Component Library for React",
5
+ "keywords": [
6
+ "React",
7
+ "components",
8
+ "typescript"
9
+ ],
10
+ "author": "jiaozhiye",
11
+ "license": "MIT",
12
+ "scripts": {
13
+ "dev": "cross-env NODE_ENV=development BABEL_ENV=web webpack serve --progress --config build/webpack.src.conf.js",
14
+ "build:lib": "yarn clean:lib && yarn build:umd && yarn build:esm && yarn build:type && yarn build:locale && yarn build:theme",
15
+ "build:umd": "cross-env NODE_ENV=production BABEL_ENV=lib webpack --config ./build/webpack.build.conf.js",
16
+ "build:esm": "cross-env BABEL_ENV=lib rollup --config ./build/build-esm.rollup.js",
17
+ "build:type": "gulp build --gulpfile ./build/build-type.gulp.js && cp-cli lib/packages lib && rimraf lib/packages",
18
+ "build:locale": "cross-env BABEL_ENV=lib babel packages/locale --extensions .ts --out-dir lib/locale",
19
+ "build:theme": "gulp build --gulpfile ./build/build-style.gulp.js",
20
+ "clean:lib": "rimraf lib",
21
+ "lint": "eslint ./packages --ext .js,.ts,.jsx,.tsx",
22
+ "lint-fix": "eslint --fix ./packages --ext .js,.ts,.jsx,.tsx",
23
+ "format": "prettier --write \"./packages/**/*.{js,ts,jsx,tsx}\""
24
+ },
25
+ "husky": {
26
+ "hooks": {
27
+ "pre-commit": "lint-staged"
28
+ }
29
+ },
30
+ "lint-staged": {
31
+ "packages/**/*.{js,ts,jsx,tsx}": [
32
+ "npm run lint-fix",
33
+ "git add"
34
+ ],
35
+ "packages/**/*.{less}": "prettier --write"
36
+ },
37
+ "publishConfig": {
38
+ "registry": "https://registry.npmjs.org/"
39
+ },
40
+ "files": [
41
+ "lib"
42
+ ],
43
+ "main": "lib/index.js",
44
+ "module": "lib/index.esm.js",
45
+ "unpkg": "lib/index.full.js",
46
+ "types": "lib/index.d.ts",
47
+ "style": "lib/style/index.css",
48
+ "peerDependencies": {
49
+ "react": ">=16.14.0",
50
+ "react-dom": ">=16.14.0"
51
+ },
52
+ "dependencies": {
53
+ "@rc-component/color-picker": "^2.0.1",
54
+ "@rc-component/portal": "^1.1.2",
55
+ "@rc-component/trigger": "^2.2.0",
56
+ "add-dom-event-listener": "^1.1.0",
57
+ "antd": "4.24.16",
58
+ "big.js": "^6.2.1",
59
+ "china-area-data": "^5.0.1",
60
+ "classnames": "^2.3.2",
61
+ "copy-to-clipboard": "^3.3.2",
62
+ "cropperjs": "^1.5.12",
63
+ "dayjs": "1.x",
64
+ "exceljs": "^4.4.0",
65
+ "html2canvas": "^1.4.1",
66
+ "localforage": "^1.10.0",
67
+ "lodash-es": "^4.17.21",
68
+ "memoize-one": "^6.0.0",
69
+ "prop-types": "^15.8.1",
70
+ "react-countup": "^6.4.0",
71
+ "react-draggable": "^4.4.6",
72
+ "react-sortablejs": "^6.1.4",
73
+ "resize-observer-polyfill": "^1.5.1",
74
+ "scroll-into-view-if-needed": "^2.2.31",
75
+ "sortablejs": "^1.15.2"
76
+ },
77
+ "devDependencies": {
78
+ "@babel/cli": "^7.24.7",
79
+ "@babel/core": "^7.24.7",
80
+ "@babel/plugin-proposal-decorators": "^7.24.7",
81
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
82
+ "@babel/plugin-transform-class-properties": "^7.24.7",
83
+ "@babel/plugin-transform-runtime": "^7.24.7",
84
+ "@babel/preset-env": "^7.24.7",
85
+ "@babel/preset-react": "^7.24.7",
86
+ "@babel/preset-typescript": "^7.24.7",
87
+ "@rollup/plugin-babel": "^5.3.0",
88
+ "@rollup/plugin-commonjs": "^22.0.2",
89
+ "@rollup/plugin-json": "^4.1.0",
90
+ "@rollup/plugin-node-resolve": "^14.1.0",
91
+ "@rollup/plugin-replace": "^4.0.0",
92
+ "@rollup/plugin-terser": "^0.4.4",
93
+ "@rollup/plugin-typescript": "^8.5.0",
94
+ "@types/lodash-es": "^4.17.6",
95
+ "@types/react": "^18.3.0",
96
+ "@types/react-dom": "^18.3.0",
97
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
98
+ "@typescript-eslint/parser": "^5.30.0",
99
+ "autoprefixer": "^10.4.14",
100
+ "axios": "^0.27.2",
101
+ "babel-loader": "^9.1.3",
102
+ "core-js": "^3.32.0",
103
+ "cp-cli": "^2.0.0",
104
+ "cross-env": "^7.0.3",
105
+ "css-loader": "^6.11.0",
106
+ "eslint": "^8.40.0",
107
+ "eslint-plugin-prettier": "^4.2.0",
108
+ "eslint-plugin-react": "^7.32.0",
109
+ "eslint-plugin-react-hooks": "^4.6.0",
110
+ "eslint-webpack-plugin": "^3.2.0",
111
+ "gulp": "^4.0.2",
112
+ "gulp-autoprefixer": "^8.0.0",
113
+ "gulp-clean-css": "^4.3.0",
114
+ "gulp-ignore": "^3.0.0",
115
+ "gulp-less": "^5.0.0",
116
+ "gulp-rename": "^2.0.0",
117
+ "gulp-typescript": "^6.0.0-alpha.1",
118
+ "html-webpack-plugin": "^5.6.0",
119
+ "husky": "^4.3.8",
120
+ "less": "^4.2.0",
121
+ "less-loader": "^11.1.4",
122
+ "lint-staged": "^10.5.4",
123
+ "mockjs": "^1.1.0",
124
+ "prettier": "^2.8.8",
125
+ "react": "^18.2.0",
126
+ "react-dom": "^18.2.0",
127
+ "rimraf": "^3.0.2",
128
+ "rollup": "^2.79.1",
129
+ "style-loader": "^3.3.4",
130
+ "ts-loader": "^9.4.4",
131
+ "typescript": "^4.9.5",
132
+ "webpack": "^5.98.0",
133
+ "webpack-cli": "^5.1.4",
134
+ "webpack-dev-server": "^4.15.2",
135
+ "webpack-node-externals": "^3.0.0"
136
+ },
137
+ "engines": {
138
+ "node": ">= 14"
139
+ }
140
+ }