@jiaozhiye/qm-design-react 1.7.54 → 1.7.56

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.
@@ -8,7 +8,7 @@ export type IAlign = 'left' | 'center' | 'right';
8
8
  export type InsertMode = 'before' | 'after';
9
9
  export type IFilterType = 'text' | 'textarea' | 'checkbox' | 'radio' | 'number' | 'date' | 'tree';
10
10
  export type ICheckStrategy = 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
11
- export type IEditerType = 'text' | 'textarea' | 'number' | 'select' | 'select-multiple' | 'checkbox' | 'switch' | 'search-helper' | 'search-helper-multiple' | 'tree-helper' | 'tree-helper-multiple' | 'date' | 'datetime' | 'time';
11
+ export type IEditerType = 'text' | 'textarea' | 'number' | 'select' | 'select-multiple' | 'checkbox' | 'switch' | 'search-helper' | 'search-helper-multiple' | 'tree-helper' | 'tree-helper-multiple' | 'date' | 'datetime' | 'time' | 'month' | 'year';
12
12
  export type ISelectionType = 'checkbox' | 'radio';
13
13
  export type IRecord<T = any> = {
14
14
  [key: string]: T;
@@ -26,7 +26,8 @@ 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: string | number) => string;
29
+ export declare const formatNumber: (value: number | string) => string;
30
+ export declare const formatDisplayPrecision: (value: number | string, precision: number) => string | number;
30
31
  export declare const validateNumber: (val: string) => boolean;
31
32
  export declare const stringToNumber: (input: string) => number | '';
32
33
  export declare const getDate: (dateString: string | undefined, format: string) => dayjs.Dayjs | null;
@@ -41,3 +42,4 @@ export declare const deepGetRowkey: (arr: any[], value: IRowKey) => IRowKey[] |
41
42
  export declare const deepFindRecord: (arr: IRecord[], fn: (node: IRecord) => boolean) => Nullable<IRecord>;
42
43
  export declare const deepTreeFilter: (tree: any[], fn: (node: unknown) => boolean) => any[];
43
44
  export declare const flatToTree: (list: any[], id: string, pid: string) => any[];
45
+ export declare const sortableFormatter: <T>(items: T[]) => T[];
@@ -1,94 +1,110 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2020-02-28 22:13:50
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-11-26 20:32:27
6
- */
7
- @prefix-table: ~'@{qm-prefix}-table';
8
-
9
- .@{prefix-table}-column-filter {
10
- display: inline-block;
11
- padding: 5px 0 5px 3px;
12
- line-height: 1;
13
- cursor: pointer;
14
- transition: all 0.3s ease;
15
- .icon {
16
- font-size: 1.05em;
17
- margin-right: 2px;
18
- }
19
- &:hover,
20
- &.selected {
21
- color: @v-primary-color;
22
- }
23
- }
24
-
25
- .column-filter__popper {
26
- padding: 0 !important;
27
- .column-filter--wrap {
28
- padding: 5px @v-module-distance;
29
- min-width: 150px;
30
- max-width: 200px;
31
- overflow-y: auto;
32
- .box-sizing-content();
33
- li.item {
34
- position: relative;
35
- line-height: 1.75;
36
- .text-overflow-cut();
37
- .handle {
38
- padding: 2px;
39
- color: @v-font-secondary-color;
40
- cursor: s-resize;
41
- transform: scale(0.9);
42
- }
43
- .fixed {
44
- position: absolute;
45
- right: 0;
46
- i {
47
- color: @--icon-color;
48
- cursor: pointer;
49
- }
50
- &.disabled {
51
- i {
52
- color: @v-font-disabled-color;
53
- cursor: not-allowed;
54
- }
55
- }
56
- }
57
- }
58
- .reset {
59
- text-align: right;
60
- .ant-btn-text {
61
- padding: 0;
62
- }
63
- }
64
- .left {
65
- ul {
66
- margin: 0;
67
- li {
68
- padding-right: 15px;
69
- }
70
- }
71
- }
72
- .main {
73
- ul {
74
- margin: 0;
75
- li {
76
- padding-right: 30px;
77
- }
78
- }
79
- }
80
- .right {
81
- ul {
82
- margin: 0;
83
- li {
84
- padding-right: 15px;
85
- }
86
- }
87
- }
88
- .divider {
89
- height: 0;
90
- border-top: 1px solid @v-table-border-color;
91
- margin: 4px 0;
92
- }
93
- }
94
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2020-02-28 22:13:50
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-11-26 20:32:27
6
+ */
7
+ @prefix-table: ~'@{qm-prefix}-table';
8
+
9
+ .@{prefix-table}-column-filter {
10
+ display: inline-block;
11
+ padding: 5px 0 5px 3px;
12
+ line-height: 1;
13
+ cursor: pointer;
14
+ transition: all 0.3s ease;
15
+ .icon {
16
+ font-size: 1.05em;
17
+ margin-right: 2px;
18
+ }
19
+ &:hover,
20
+ &.selected {
21
+ color: @v-primary-color;
22
+ }
23
+ }
24
+
25
+ .column-filter__popper {
26
+ padding: 0 !important;
27
+ min-width: 150px;
28
+ max-width: 200px;
29
+ }
30
+
31
+ .column-item__popper {
32
+ padding-right: @v-module-distance !important;
33
+ min-width: 150px;
34
+ max-width: 200px;
35
+ .ant-popover-arrow {
36
+ display: none;
37
+ }
38
+ .ant-popover-inner-content {
39
+ padding: 0;
40
+ }
41
+ }
42
+
43
+ .column-filter__popper,
44
+ .column-item__popper {
45
+ .column-filter--wrap {
46
+ padding: 5px @v-module-distance;
47
+ overflow-y: auto;
48
+ .box-sizing-content();
49
+ li.item {
50
+ position: relative;
51
+ line-height: 1.75;
52
+ .text-overflow-cut();
53
+ .handle {
54
+ padding: 2px;
55
+ color: @v-font-secondary-color;
56
+ cursor: s-resize;
57
+ transform: scale(0.9);
58
+ }
59
+ .fixed {
60
+ position: absolute;
61
+ right: 0;
62
+ i {
63
+ color: @--icon-color;
64
+ cursor: pointer;
65
+ }
66
+ &.disabled {
67
+ i {
68
+ color: @v-font-disabled-color;
69
+ cursor: not-allowed;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ .reset {
75
+ text-align: right;
76
+ .ant-btn-text {
77
+ padding: 0;
78
+ }
79
+ }
80
+ .left {
81
+ ul {
82
+ margin: 0;
83
+ li {
84
+ padding-right: 15px;
85
+ }
86
+ }
87
+ }
88
+ .main {
89
+ ul {
90
+ margin: 0;
91
+ li {
92
+ padding-right: 30px;
93
+ }
94
+ }
95
+ }
96
+ .right {
97
+ ul {
98
+ margin: 0;
99
+ li {
100
+ padding-right: 15px;
101
+ }
102
+ }
103
+ }
104
+ .divider {
105
+ height: 0;
106
+ border-top: 1px solid @v-table-border-color;
107
+ margin: 4px 0;
108
+ }
109
+ }
110
+ }
package/package.json CHANGED
@@ -1,138 +1,138 @@
1
- {
2
- "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.7.54",
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
- },
51
- "dependencies": {
52
- "@rc-component/portal": "^1.1.2",
53
- "@rc-component/trigger": "^1.14.4",
54
- "add-dom-event-listener": "^1.1.0",
55
- "antd": "4.24.14",
56
- "axios": "^0.27.2",
57
- "big.js": "^6.2.1",
58
- "china-area-data": "^5.0.1",
59
- "classnames": "^2.3.2",
60
- "copy-to-clipboard": "^3.3.2",
61
- "cropperjs": "^1.5.12",
62
- "dayjs": "1.x",
63
- "exceljs": "^4.3.0",
64
- "localforage": "^1.10.0",
65
- "lodash-es": "^4.17.21",
66
- "memoize-one": "^6.0.0",
67
- "omit.js": "^2.0.2",
68
- "prop-types": "^15.8.1",
69
- "react-countup": "^6.4.0",
70
- "react-draggable": "^4.4.6",
71
- "react-sortablejs": "^6.1.4",
72
- "resize-observer-polyfill": "^1.5.1",
73
- "scroll-into-view-if-needed": "^2.2.28",
74
- "sortablejs": "^1.15.0"
75
- },
76
- "devDependencies": {
77
- "@babel/cli": "^7.18.6",
78
- "@babel/core": "^7.18.6",
79
- "@babel/plugin-proposal-class-properties": "^7.18.6",
80
- "@babel/plugin-proposal-decorators": "^7.18.6",
81
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
82
- "@babel/plugin-transform-runtime": "^7.18.6",
83
- "@babel/preset-env": "^7.18.6",
84
- "@babel/preset-react": "^7.18.6",
85
- "@babel/preset-typescript": "^7.18.6",
86
- "@rollup/plugin-babel": "^5.3.0",
87
- "@rollup/plugin-commonjs": "^22.0.2",
88
- "@rollup/plugin-json": "^4.1.0",
89
- "@rollup/plugin-node-resolve": "^14.1.0",
90
- "@rollup/plugin-replace": "^4.0.0",
91
- "@rollup/plugin-typescript": "^8.5.0",
92
- "@types/lodash-es": "^4.17.6",
93
- "@types/react": "^17.0.58",
94
- "@types/react-dom": "^17.0.20",
95
- "@typescript-eslint/eslint-plugin": "^5.30.0",
96
- "@typescript-eslint/parser": "^5.30.0",
97
- "autoprefixer": "^10.4.14",
98
- "babel-loader": "^9.1.0",
99
- "core-js": "^3.32.0",
100
- "cp-cli": "^2.0.0",
101
- "cross-env": "^7.0.3",
102
- "css-loader": "^6.7.3",
103
- "eslint": "^8.40.0",
104
- "eslint-plugin-prettier": "^4.2.0",
105
- "eslint-plugin-react": "^7.32.0",
106
- "eslint-plugin-react-hooks": "^4.6.0",
107
- "eslint-webpack-plugin": "^3.2.0",
108
- "gulp": "^4.0.2",
109
- "gulp-autoprefixer": "^8.0.0",
110
- "gulp-clean-css": "^4.3.0",
111
- "gulp-ignore": "^3.0.0",
112
- "gulp-less": "^5.0.0",
113
- "gulp-rename": "^2.0.0",
114
- "gulp-typescript": "^6.0.0-alpha.1",
115
- "html-webpack-plugin": "^5.5.0",
116
- "husky": "^4.3.8",
117
- "less": "^4.2.0",
118
- "less-loader": "^11.1.2",
119
- "lint-staged": "^10.5.4",
120
- "mockjs": "^1.1.0",
121
- "prettier": "^2.8.8",
122
- "react": "17.0.2",
123
- "react-dom": "17.0.2",
124
- "rimraf": "^3.0.2",
125
- "rollup": "^2.79.1",
126
- "rollup-plugin-terser": "^7.0.2",
127
- "style-loader": "^3.3.2",
128
- "ts-loader": "^9.4.4",
129
- "typescript": "^4.9.5",
130
- "webpack": "^5.88.2",
131
- "webpack-cli": "^5.1.4",
132
- "webpack-dev-server": "^4.15.1",
133
- "webpack-node-externals": "^3.0.0"
134
- },
135
- "engines": {
136
- "node": ">= 14"
137
- }
138
- }
1
+ {
2
+ "name": "@jiaozhiye/qm-design-react",
3
+ "version": "1.7.56",
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
+ },
51
+ "dependencies": {
52
+ "@rc-component/portal": "^1.1.2",
53
+ "@rc-component/trigger": "^1.14.4",
54
+ "add-dom-event-listener": "^1.1.0",
55
+ "antd": "4.24.14",
56
+ "axios": "^0.27.2",
57
+ "big.js": "^6.2.1",
58
+ "china-area-data": "^5.0.1",
59
+ "classnames": "^2.3.2",
60
+ "copy-to-clipboard": "^3.3.2",
61
+ "cropperjs": "^1.5.12",
62
+ "dayjs": "1.x",
63
+ "exceljs": "^4.3.0",
64
+ "localforage": "^1.10.0",
65
+ "lodash-es": "^4.17.21",
66
+ "memoize-one": "^6.0.0",
67
+ "omit.js": "^2.0.2",
68
+ "prop-types": "^15.8.1",
69
+ "react-countup": "^6.4.0",
70
+ "react-draggable": "^4.4.6",
71
+ "react-sortablejs": "^6.1.4",
72
+ "resize-observer-polyfill": "^1.5.1",
73
+ "scroll-into-view-if-needed": "^2.2.28",
74
+ "sortablejs": "^1.15.0"
75
+ },
76
+ "devDependencies": {
77
+ "@babel/cli": "^7.18.6",
78
+ "@babel/core": "^7.18.6",
79
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
80
+ "@babel/plugin-proposal-decorators": "^7.18.6",
81
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
82
+ "@babel/plugin-transform-runtime": "^7.18.6",
83
+ "@babel/preset-env": "^7.18.6",
84
+ "@babel/preset-react": "^7.18.6",
85
+ "@babel/preset-typescript": "^7.18.6",
86
+ "@rollup/plugin-babel": "^5.3.0",
87
+ "@rollup/plugin-commonjs": "^22.0.2",
88
+ "@rollup/plugin-json": "^4.1.0",
89
+ "@rollup/plugin-node-resolve": "^14.1.0",
90
+ "@rollup/plugin-replace": "^4.0.0",
91
+ "@rollup/plugin-typescript": "^8.5.0",
92
+ "@types/lodash-es": "^4.17.6",
93
+ "@types/react": "^17.0.58",
94
+ "@types/react-dom": "^17.0.20",
95
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
96
+ "@typescript-eslint/parser": "^5.30.0",
97
+ "autoprefixer": "^10.4.14",
98
+ "babel-loader": "^9.1.0",
99
+ "core-js": "^3.32.0",
100
+ "cp-cli": "^2.0.0",
101
+ "cross-env": "^7.0.3",
102
+ "css-loader": "^6.7.3",
103
+ "eslint": "^8.40.0",
104
+ "eslint-plugin-prettier": "^4.2.0",
105
+ "eslint-plugin-react": "^7.32.0",
106
+ "eslint-plugin-react-hooks": "^4.6.0",
107
+ "eslint-webpack-plugin": "^3.2.0",
108
+ "gulp": "^4.0.2",
109
+ "gulp-autoprefixer": "^8.0.0",
110
+ "gulp-clean-css": "^4.3.0",
111
+ "gulp-ignore": "^3.0.0",
112
+ "gulp-less": "^5.0.0",
113
+ "gulp-rename": "^2.0.0",
114
+ "gulp-typescript": "^6.0.0-alpha.1",
115
+ "html-webpack-plugin": "^5.5.0",
116
+ "husky": "^4.3.8",
117
+ "less": "^4.2.0",
118
+ "less-loader": "^11.1.2",
119
+ "lint-staged": "^10.5.4",
120
+ "mockjs": "^1.1.0",
121
+ "prettier": "^2.8.8",
122
+ "react": "17.0.2",
123
+ "react-dom": "17.0.2",
124
+ "rimraf": "^3.0.2",
125
+ "rollup": "^2.79.1",
126
+ "rollup-plugin-terser": "^7.0.2",
127
+ "style-loader": "^3.3.2",
128
+ "ts-loader": "^9.4.4",
129
+ "typescript": "^4.9.5",
130
+ "webpack": "^5.88.2",
131
+ "webpack-cli": "^5.1.4",
132
+ "webpack-dev-server": "^4.15.1",
133
+ "webpack-node-externals": "^3.0.0"
134
+ },
135
+ "engines": {
136
+ "node": ">= 14"
137
+ }
138
+ }