@qn-pandora/pandora-component 2.2.1 → 2.2.2
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.
- package/es/components/Button/style.css +0 -1
- package/es/components/Button/style.less +0 -1
- package/es/components/Card/index.js +2 -1
- package/es/components/CheckTransformList/Item/index.js +1 -1
- package/es/components/CheckTransformList/style.css +9 -1
- package/es/components/CheckboxList/index.d.ts +1 -0
- package/es/components/CheckboxList/index.js +3 -2
- package/es/components/Collapse/index.js +2 -1
- package/es/components/CollapsiblePanel/index.d.ts +2 -2
- package/es/components/ConfigProvider/index.js +2 -1
- package/es/components/DateTimePicker/Base/index.js +2 -2
- package/es/components/DateTimePicker/index.d.ts +2 -1
- package/es/components/Input/index.js +2 -1
- package/es/components/Menu/index.d.ts +2 -2
- package/es/components/NameLimiter/index.d.ts +3 -13
- package/es/components/NameLimiter/index.js +30 -39
- package/es/components/NameLimiter/style.css +9 -1
- package/es/components/NameLimiter/style.less +10 -1
- package/es/components/OptionList/index.js +2 -1
- package/es/components/RemarkName/index.d.ts +0 -2
- package/es/components/RemarkName/index.js +2 -4
- package/es/components/RemarkName/style.css +9 -5
- package/es/components/RemarkName/style.less +0 -5
- package/es/components/SolidRadioGroup/index.js +7 -4
- package/es/components/SolidRadioGroup/style.css +4 -0
- package/es/components/SolidRadioGroup/style.less +5 -0
- package/es/components/Steps/index.js +2 -1
- package/es/components/Table/index.d.ts +9 -24
- package/es/components/Table/index.js +40 -8
- package/es/components/TagList/Tag/style.css +3 -3
- package/es/components/TagList/Tag/style.less +3 -3
- package/es/components/TagList/index.js +3 -2
- package/es/components/TagList/style.css +3 -3
- package/es/components/TagList/style.less +8 -8
- package/es/index.css +46 -39
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.less +4 -4
- package/es/style/theme.less +5 -4
- package/lib/components/Button/style.css +0 -1
- package/lib/components/Button/style.less +0 -1
- package/lib/components/Card/index.js +1 -1
- package/lib/components/CheckTransformList/Item/index.js +1 -1
- package/lib/components/CheckTransformList/style.css +9 -1
- package/lib/components/CheckboxList/index.d.ts +1 -0
- package/lib/components/CheckboxList/index.js +3 -2
- package/lib/components/Collapse/index.js +1 -1
- package/lib/components/CollapsiblePanel/index.d.ts +2 -2
- package/lib/components/ConfigProvider/index.js +1 -1
- package/lib/components/DateTimePicker/Base/index.js +2 -2
- package/lib/components/DateTimePicker/index.d.ts +2 -1
- package/lib/components/Input/index.js +1 -1
- package/lib/components/Menu/index.d.ts +2 -2
- package/lib/components/NameLimiter/index.d.ts +3 -13
- package/lib/components/NameLimiter/index.js +30 -38
- package/lib/components/NameLimiter/style.css +9 -1
- package/lib/components/NameLimiter/style.less +10 -1
- package/lib/components/OptionList/index.js +1 -1
- package/lib/components/RemarkName/index.d.ts +0 -2
- package/lib/components/RemarkName/index.js +2 -4
- package/lib/components/RemarkName/style.css +9 -5
- package/lib/components/RemarkName/style.less +0 -5
- package/lib/components/SolidRadioGroup/index.js +6 -3
- package/lib/components/SolidRadioGroup/style.css +4 -0
- package/lib/components/SolidRadioGroup/style.less +5 -0
- package/lib/components/Steps/index.js +1 -1
- package/lib/components/Table/index.d.ts +9 -24
- package/lib/components/Table/index.js +39 -7
- package/lib/components/TagList/Tag/style.css +3 -3
- package/lib/components/TagList/Tag/style.less +3 -3
- package/lib/components/TagList/index.js +2 -2
- package/lib/components/TagList/style.css +3 -3
- package/lib/components/TagList/style.less +8 -8
- package/lib/index.css +1724 -1717
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -1
- package/lib/index.less +2 -2
- package/lib/style/theme.less +5 -4
- package/package.json +22 -22
- package/es/components/NameLimiter/transformer.d.ts +0 -6
- package/es/components/NameLimiter/transformer.js +0 -84
- package/lib/components/NameLimiter/transformer.d.ts +0 -6
- package/lib/components/NameLimiter/transformer.js +0 -91
package/lib/index.d.ts
CHANGED
@@ -4,7 +4,7 @@ export { default as Button, IButtonProps } from './components/Button';
|
|
4
4
|
export { default as Card } from './components/Card';
|
5
5
|
export { default as Collapse } from './components/Collapse';
|
6
6
|
export { default as ConfigProvider } from './components/ConfigProvider';
|
7
|
-
export { default as NameLimiter, INameLimiterProps
|
7
|
+
export { default as NameLimiter, INameLimiterProps } from './components/NameLimiter';
|
8
8
|
export { default as Input, TInputProps } from './components/Input';
|
9
9
|
export { default as Selector, ISelectorProps, IGroupOption as ISelectorGroupOption, IOptions as ISelectorOptions, SelectValue as ISelectValue } from './components/Selector';
|
10
10
|
export { default as Table, ITableProps, IOptionItem as ITableOptionItem } from './components/Table';
|
package/lib/index.js
CHANGED
@@ -16,7 +16,6 @@ var ConfigProvider_1 = require("./components/ConfigProvider");
|
|
16
16
|
exports.ConfigProvider = ConfigProvider_1.default;
|
17
17
|
var NameLimiter_1 = require("./components/NameLimiter");
|
18
18
|
exports.NameLimiter = NameLimiter_1.default;
|
19
|
-
exports.SplitType = NameLimiter_1.SplitType;
|
20
19
|
var Input_1 = require("./components/Input");
|
21
20
|
exports.Input = Input_1.default;
|
22
21
|
var Selector_1 = require("./components/Selector");
|
package/lib/index.less
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
@import './components/AutoComplete/style.less';
|
4
4
|
@import './components/Breadcrumb/style.less';
|
5
5
|
@import './components/Button/style.less';
|
6
|
-
@import './components/CheckTransformList/style.less';
|
7
6
|
@import './components/Card/style.less';
|
7
|
+
@import './components/CheckTransformList/style.less';
|
8
8
|
@import './components/Checkbox/style.less';
|
9
9
|
@import './components/CheckboxList/style.less';
|
10
10
|
@import './components/CollapsiblePanel/style.less';
|
@@ -30,8 +30,8 @@
|
|
30
30
|
@import './components/Timeline/style.less';
|
31
31
|
@import './components/Transfer/style.less';
|
32
32
|
@import './components/TreeSelector/style.less';
|
33
|
-
@import './components/Card/SearchInput/style.less';
|
34
33
|
@import './components/Card/RowExtra/style.less';
|
34
|
+
@import './components/Card/SearchInput/style.less';
|
35
35
|
@import './components/Collapse/Panel/style.less';
|
36
36
|
@import './components/Collapse/stories/style.stories.less';
|
37
37
|
@import './components/DateTimePicker/Base/style.less';
|
package/lib/style/theme.less
CHANGED
@@ -123,8 +123,8 @@
|
|
123
123
|
@zindex-popover: 1200; // antd
|
124
124
|
@zindex-tooltip: 1300; // antd
|
125
125
|
// pandora色
|
126
|
-
@zindex-layout-navbar:
|
127
|
-
@zindex-layout-sidebar:
|
126
|
+
@zindex-layout-navbar: 1210; // phoenix
|
127
|
+
@zindex-layout-sidebar: 1200; // phoenix
|
128
128
|
@zindex-toaster: 3000; // app-platform phoenix
|
129
129
|
|
130
130
|
// 组件色变量=========================================================
|
@@ -245,9 +245,10 @@
|
|
245
245
|
@time-absolute-picker-title-div: #939393; // pandora-component
|
246
246
|
|
247
247
|
// sidebar------------------------
|
248
|
-
@layout-sidebar-width:
|
248
|
+
@layout-sidebar-width: 240px; // phoenix
|
249
249
|
@layout-sidebar-collapsed-width: 0px; // phoenix
|
250
|
-
@layout-navbar-height:
|
250
|
+
@layout-navbar-height: 52px; // phoenix
|
251
|
+
@layout-navbar-sub-height: 56px; // phoenix
|
251
252
|
// 深色主题
|
252
253
|
@side-bar-active-color: #6ac73c; // pandora-visualization
|
253
254
|
|
package/package.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "@qn-pandora/pandora-component",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.2",
|
4
4
|
"description": "基础组件",
|
5
5
|
"author": "pandora <pandora@qiniu.com>",
|
6
|
-
"homepage": "https://github.com/qbox/
|
6
|
+
"homepage": "https://github.com/qbox/phoenix#readme",
|
7
7
|
"license": "ISC",
|
8
8
|
"main": "lib/index.js",
|
9
9
|
"module": "es/index.js",
|
@@ -22,28 +22,24 @@
|
|
22
22
|
"**/*.css"
|
23
23
|
],
|
24
24
|
"publishConfig": {
|
25
|
-
"registry": "
|
25
|
+
"registry": "https://registry.npmjs.org/"
|
26
26
|
},
|
27
27
|
"repository": {
|
28
28
|
"type": "git",
|
29
|
-
"url": "git+https://github.com/qbox/
|
29
|
+
"url": "git+https://github.com/qbox/phoenix.git"
|
30
30
|
},
|
31
31
|
"scripts": {
|
32
32
|
"build": "pandora-tools build esm && pandora-tools build cjs",
|
33
33
|
"test": "jest",
|
34
|
-
"storybook": "pandora-tools storybook start --port 9000
|
35
|
-
"storybook:build": "pandora-tools storybook build
|
36
|
-
"prettier": "prettier -l 'src/**/*.{ts,tsx,less,css}'"
|
37
|
-
"lint": "npm run prettier && ../../hack/check-tsc.sh && eslint 'src/**/*.ts*' && tslint './src/**/*.ts*'"
|
34
|
+
"storybook": "pandora-tools storybook start --port 9000",
|
35
|
+
"storybook:build": "pandora-tools storybook build",
|
36
|
+
"prettier": "prettier -l 'src/**/*.{ts,tsx,less,css}'"
|
38
37
|
},
|
39
38
|
"bugs": {
|
40
|
-
"url": "https://github.com/qbox/
|
39
|
+
"url": "https://github.com/qbox/phoenix/issues"
|
41
40
|
},
|
42
41
|
"peerDependencies": {
|
43
|
-
"
|
44
|
-
"@ant-design/icons": "^4.6.2",
|
45
|
-
"@types/react": "^16.14.5",
|
46
|
-
"antd": "^4.16.3",
|
42
|
+
"antd": "4.16.3",
|
47
43
|
"lodash": "^4.17.15",
|
48
44
|
"mobx": "^4.15.4",
|
49
45
|
"mobx-react": "5.4.4",
|
@@ -53,8 +49,11 @@
|
|
53
49
|
"@babel/helper-skip-transparent-expression-wrappers": "^7.11.0",
|
54
50
|
"@babel/plugin-proposal-decorators": "^7.8.3",
|
55
51
|
"@qn-pandora/pandora-tools": "^0.1.0",
|
56
|
-
"@storybook/addon-docs": "^5.3.19",
|
57
52
|
"@svgr/webpack": "^5.4.0",
|
53
|
+
"@types/classnames": "^2.2.7",
|
54
|
+
"@types/react": "^16.14.5",
|
55
|
+
"@types/react-measure": "^2.0.4",
|
56
|
+
"@types/prop-types": "^15.7.1",
|
58
57
|
"@types/css": "^0.0.31",
|
59
58
|
"@types/jest": "^25.2.3",
|
60
59
|
"@types/lodash": "^4.14.152",
|
@@ -62,7 +61,7 @@
|
|
62
61
|
"@typescript-eslint/eslint-plugin": "^4.1.0",
|
63
62
|
"@typescript-eslint/eslint-plugin-tslint": "^4.1.0",
|
64
63
|
"@typescript-eslint/parser": "^4.1.0",
|
65
|
-
"antd": "
|
64
|
+
"antd": "4.16.3",
|
66
65
|
"antd-mobile": "^2.3.3",
|
67
66
|
"babel-loader": "^8.1.0",
|
68
67
|
"copy-webpack-plugin": "^5.1.1",
|
@@ -78,7 +77,7 @@
|
|
78
77
|
"mini-css-extract-plugin": "^0.9.0",
|
79
78
|
"mobx": "^4.15.4",
|
80
79
|
"mobx-react": "5.4.4",
|
81
|
-
"prettier": "
|
80
|
+
"prettier": "2.0.5",
|
82
81
|
"query-string": "^6.12.1",
|
83
82
|
"react": "^16.8.6",
|
84
83
|
"ts-jest": "^26.0.0",
|
@@ -93,13 +92,14 @@
|
|
93
92
|
"webpack-node-externals": "^1.7.2"
|
94
93
|
},
|
95
94
|
"dependencies": {
|
96
|
-
"@ant-design/compatible": "
|
97
|
-
"@ant-design/icons": "
|
95
|
+
"@ant-design/compatible": "1.0.8",
|
96
|
+
"@ant-design/icons": "4.6.2",
|
98
97
|
"@qn-pandora/pandora-component-icons": "^1.2.0",
|
99
|
-
"antd-mobile": "
|
98
|
+
"antd-mobile": "2.3.3",
|
100
99
|
"css": "^2.2.4",
|
100
|
+
"classnames": "^2.2.6",
|
101
101
|
"moment": "^2.29.1",
|
102
|
+
"prop-types": "^15.7.2",
|
102
103
|
"react-measure": "^2.5.2"
|
103
|
-
}
|
104
|
-
|
105
|
-
}
|
104
|
+
}
|
105
|
+
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { SplitType } from './index';
|
2
|
-
export declare function getBytes(value?: string): number;
|
3
|
-
export declare function isChinese(char?: string): boolean;
|
4
|
-
export declare function getPrefixString(value?: string, length?: number): string;
|
5
|
-
export declare function getSuffixString(value?: string, length?: number): string;
|
6
|
-
export declare function getTransformerString(value?: string, length?: number, type?: SplitType): string;
|
@@ -1,84 +0,0 @@
|
|
1
|
-
var __values = (this && this.__values) || function(o) {
|
2
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
3
|
-
if (m) return m.call(o);
|
4
|
-
if (o && typeof o.length === "number") return {
|
5
|
-
next: function () {
|
6
|
-
if (o && i >= o.length) o = void 0;
|
7
|
-
return { value: o && o[i++], done: !o };
|
8
|
-
}
|
9
|
-
};
|
10
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
11
|
-
};
|
12
|
-
import { SplitType } from './index';
|
13
|
-
export function getBytes(value) {
|
14
|
-
if (value === void 0) { value = ''; }
|
15
|
-
return (value.replace(/[^\x00-\xff]/g, '--') || '').length;
|
16
|
-
}
|
17
|
-
export function isChinese(char) {
|
18
|
-
if (char === void 0) { char = ''; }
|
19
|
-
return /[^\x00-\xff]/g.test(char);
|
20
|
-
}
|
21
|
-
export function getPrefixString(value, length) {
|
22
|
-
var e_1, _a;
|
23
|
-
if (value === void 0) { value = ''; }
|
24
|
-
if (length === void 0) { length = 8; }
|
25
|
-
var len = length - 1;
|
26
|
-
var res = '';
|
27
|
-
if (getBytes(value) <= length) {
|
28
|
-
return value;
|
29
|
-
}
|
30
|
-
try {
|
31
|
-
for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {
|
32
|
-
var char = value_1_1.value;
|
33
|
-
if (isChinese(char)) {
|
34
|
-
len -= 2;
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
len -= 1;
|
38
|
-
}
|
39
|
-
res = res.concat(char);
|
40
|
-
if (len <= 0) {
|
41
|
-
return res;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
46
|
-
finally {
|
47
|
-
try {
|
48
|
-
if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);
|
49
|
-
}
|
50
|
-
finally { if (e_1) throw e_1.error; }
|
51
|
-
}
|
52
|
-
return value;
|
53
|
-
}
|
54
|
-
export function getSuffixString(value, length) {
|
55
|
-
if (value === void 0) { value = ''; }
|
56
|
-
if (length === void 0) { length = 8; }
|
57
|
-
var len = length;
|
58
|
-
var res = [];
|
59
|
-
if (getBytes(value) <= length) {
|
60
|
-
return value;
|
61
|
-
}
|
62
|
-
for (var i = value.length - 1; i >= 0; i--) {
|
63
|
-
if (isChinese(value[i])) {
|
64
|
-
len -= 2;
|
65
|
-
}
|
66
|
-
else {
|
67
|
-
len -= 1;
|
68
|
-
}
|
69
|
-
res.unshift(value[i]);
|
70
|
-
if (len <= 0) {
|
71
|
-
return res.join('');
|
72
|
-
}
|
73
|
-
}
|
74
|
-
return value;
|
75
|
-
}
|
76
|
-
export function getTransformerString(value, length, type) {
|
77
|
-
if (value === void 0) { value = ''; }
|
78
|
-
if (length === void 0) { length = 16; }
|
79
|
-
if (type === void 0) { type = SplitType.Between; }
|
80
|
-
if (type === SplitType.End) {
|
81
|
-
return getPrefixString(value, length) + "...";
|
82
|
-
}
|
83
|
-
return getPrefixString(value.slice(0, length / 2), length / 2) + "..." + getSuffixString(value.slice(-length / 2), length / 2);
|
84
|
-
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { SplitType } from './index';
|
2
|
-
export declare function getBytes(value?: string): number;
|
3
|
-
export declare function isChinese(char?: string): boolean;
|
4
|
-
export declare function getPrefixString(value?: string, length?: number): string;
|
5
|
-
export declare function getSuffixString(value?: string, length?: number): string;
|
6
|
-
export declare function getTransformerString(value?: string, length?: number, type?: SplitType): string;
|
@@ -1,91 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __values = (this && this.__values) || function(o) {
|
3
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
4
|
-
if (m) return m.call(o);
|
5
|
-
if (o && typeof o.length === "number") return {
|
6
|
-
next: function () {
|
7
|
-
if (o && i >= o.length) o = void 0;
|
8
|
-
return { value: o && o[i++], done: !o };
|
9
|
-
}
|
10
|
-
};
|
11
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
12
|
-
};
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
-
var index_1 = require("./index");
|
15
|
-
function getBytes(value) {
|
16
|
-
if (value === void 0) { value = ''; }
|
17
|
-
return (value.replace(/[^\x00-\xff]/g, '--') || '').length;
|
18
|
-
}
|
19
|
-
exports.getBytes = getBytes;
|
20
|
-
function isChinese(char) {
|
21
|
-
if (char === void 0) { char = ''; }
|
22
|
-
return /[^\x00-\xff]/g.test(char);
|
23
|
-
}
|
24
|
-
exports.isChinese = isChinese;
|
25
|
-
function getPrefixString(value, length) {
|
26
|
-
var e_1, _a;
|
27
|
-
if (value === void 0) { value = ''; }
|
28
|
-
if (length === void 0) { length = 8; }
|
29
|
-
var len = length - 1;
|
30
|
-
var res = '';
|
31
|
-
if (getBytes(value) <= length) {
|
32
|
-
return value;
|
33
|
-
}
|
34
|
-
try {
|
35
|
-
for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {
|
36
|
-
var char = value_1_1.value;
|
37
|
-
if (isChinese(char)) {
|
38
|
-
len -= 2;
|
39
|
-
}
|
40
|
-
else {
|
41
|
-
len -= 1;
|
42
|
-
}
|
43
|
-
res = res.concat(char);
|
44
|
-
if (len <= 0) {
|
45
|
-
return res;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
50
|
-
finally {
|
51
|
-
try {
|
52
|
-
if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);
|
53
|
-
}
|
54
|
-
finally { if (e_1) throw e_1.error; }
|
55
|
-
}
|
56
|
-
return value;
|
57
|
-
}
|
58
|
-
exports.getPrefixString = getPrefixString;
|
59
|
-
function getSuffixString(value, length) {
|
60
|
-
if (value === void 0) { value = ''; }
|
61
|
-
if (length === void 0) { length = 8; }
|
62
|
-
var len = length;
|
63
|
-
var res = [];
|
64
|
-
if (getBytes(value) <= length) {
|
65
|
-
return value;
|
66
|
-
}
|
67
|
-
for (var i = value.length - 1; i >= 0; i--) {
|
68
|
-
if (isChinese(value[i])) {
|
69
|
-
len -= 2;
|
70
|
-
}
|
71
|
-
else {
|
72
|
-
len -= 1;
|
73
|
-
}
|
74
|
-
res.unshift(value[i]);
|
75
|
-
if (len <= 0) {
|
76
|
-
return res.join('');
|
77
|
-
}
|
78
|
-
}
|
79
|
-
return value;
|
80
|
-
}
|
81
|
-
exports.getSuffixString = getSuffixString;
|
82
|
-
function getTransformerString(value, length, type) {
|
83
|
-
if (value === void 0) { value = ''; }
|
84
|
-
if (length === void 0) { length = 16; }
|
85
|
-
if (type === void 0) { type = index_1.SplitType.Between; }
|
86
|
-
if (type === index_1.SplitType.End) {
|
87
|
-
return getPrefixString(value, length) + "...";
|
88
|
-
}
|
89
|
-
return getPrefixString(value.slice(0, length / 2), length / 2) + "..." + getSuffixString(value.slice(-length / 2), length / 2);
|
90
|
-
}
|
91
|
-
exports.getTransformerString = getTransformerString;
|