@qn-pandora/pandora-component 4.3.1 → 4.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +37 -0
- package/CHANGELOG.md +15 -1
- package/es/components/FileResumable/constants.d.ts +1 -0
- package/es/components/FileResumable/index.js +4 -2
- package/es/components/NameLimiter/index.d.ts +7 -4
- package/es/components/NameLimiter/index.js +2 -2
- package/es/index.css +18 -18
- package/es/index.less +2 -2
- package/es/style/theme.less +3 -1
- package/lib/components/FileResumable/constants.d.ts +1 -0
- package/lib/components/FileResumable/index.js +4 -2
- package/lib/components/NameLimiter/index.d.ts +7 -4
- package/lib/components/NameLimiter/index.js +2 -2
- package/lib/index.css +2098 -2098
- package/lib/index.less +8 -8
- package/lib/style/theme.less +3 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
@@ -1,6 +1,43 @@
|
|
1
1
|
{
|
2
2
|
"name": "@qn-pandora/pandora-component",
|
3
3
|
"entries": [
|
4
|
+
{
|
5
|
+
"version": "4.3.3",
|
6
|
+
"tag": "@qn-pandora/pandora-component_v4.3.3",
|
7
|
+
"date": "Tue, 28 Nov 2023 12:13:32 GMT",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"comment": "2023-11-28发包"
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"dependency": [
|
15
|
+
{
|
16
|
+
"comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.3.1` to `^3.3.2`"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.3.2` to `^3.3.3`"
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"version": "4.3.2",
|
26
|
+
"tag": "@qn-pandora/pandora-component_v4.3.2",
|
27
|
+
"date": "Thu, 16 Nov 2023 11:14:33 GMT",
|
28
|
+
"comments": {
|
29
|
+
"patch": [
|
30
|
+
{
|
31
|
+
"comment": "2023-11-16发包"
|
32
|
+
}
|
33
|
+
],
|
34
|
+
"dependency": [
|
35
|
+
{
|
36
|
+
"comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.3.1` to `^3.3.2`"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
40
|
+
},
|
4
41
|
{
|
5
42
|
"version": "4.3.1",
|
6
43
|
"tag": "@qn-pandora/pandora-component_v4.3.1",
|
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Change Log - @qn-pandora/pandora-component
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 28 Nov 2023 12:13:32 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 4.3.3
|
6
|
+
Tue, 28 Nov 2023 12:13:32 GMT
|
7
|
+
|
8
|
+
### Patches
|
9
|
+
|
10
|
+
- 2023-11-28发包
|
11
|
+
|
12
|
+
## 4.3.2
|
13
|
+
Thu, 16 Nov 2023 11:14:33 GMT
|
14
|
+
|
15
|
+
### Patches
|
16
|
+
|
17
|
+
- 2023-11-16发包
|
4
18
|
|
5
19
|
## 4.3.1
|
6
20
|
Mon, 30 Oct 2023 08:56:57 GMT
|
@@ -261,7 +261,7 @@ export default function FileResumable(props) {
|
|
261
261
|
onError
|
262
262
|
]);
|
263
263
|
var handleStart = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
264
|
-
var params, realFile_1, reader;
|
264
|
+
var params, realFile_1, reader, extension_1;
|
265
265
|
var _this = this;
|
266
266
|
return __generator(this, function (_a) {
|
267
267
|
params = __assign({}, query);
|
@@ -271,6 +271,7 @@ export default function FileResumable(props) {
|
|
271
271
|
reader.readAsText(realFile_1.size > 50 * 1024 * 1024
|
272
272
|
? realFile_1.slice(0, 2 * 1024 * 1024)
|
273
273
|
: realFile_1);
|
274
|
+
extension_1 = realFile_1.name.split('.').pop().toLowerCase();
|
274
275
|
reader.onloadend = function (e) { return __awaiter(_this, void 0, void 0, function () {
|
275
276
|
var md5Str, id, fileId, error_1;
|
276
277
|
var _a, _b, _c;
|
@@ -286,7 +287,7 @@ export default function FileResumable(props) {
|
|
286
287
|
return [4 /*yield*/, fileIsExit({
|
287
288
|
resumableModifyTime: realFile_1.lastModified,
|
288
289
|
resumableFilename: realFile_1.name,
|
289
|
-
resumableType: realFile_1.type,
|
290
|
+
resumableType: realFile_1.type || "application/" + extension_1,
|
290
291
|
resumableFileMd5: md5Str,
|
291
292
|
resumableTotalSize: realFile_1.size
|
292
293
|
})];
|
@@ -303,6 +304,7 @@ export default function FileResumable(props) {
|
|
303
304
|
params.resumableFileMd5 = md5Str;
|
304
305
|
params.resumableModifyTime = realFile_1.lastModified;
|
305
306
|
params.resumableIdentifier = uuid();
|
307
|
+
params.resumableType = realFile_1.type || "application/" + extension_1;
|
306
308
|
(_a = resumable.current) === null || _a === void 0 ? void 0 : _a.updateQuery(params);
|
307
309
|
(_b = resumable.current) === null || _b === void 0 ? void 0 : _b.upload();
|
308
310
|
}
|
@@ -1,11 +1,14 @@
|
|
1
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import type { TooltipPlacement } from 'antd/es/tooltip';
|
2
3
|
/**
|
3
4
|
* 对于超出容器宽度的名称进行省略,使用Tooltip展示。
|
4
5
|
*/
|
5
6
|
export interface INameLimiterProps {
|
6
7
|
/** 资源名称 */
|
7
|
-
name:
|
8
|
+
name: React.ReactNode;
|
8
9
|
/** 用于显示Tooltip的title */
|
9
|
-
title?:
|
10
|
+
title?: React.ReactNode;
|
11
|
+
placement?: TooltipPlacement;
|
12
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
10
13
|
}
|
11
|
-
export default function NameLimiter({ name, title }: INameLimiterProps): JSX.Element;
|
14
|
+
export default function NameLimiter({ name, title, placement, getPopupContainer }: INameLimiterProps): JSX.Element;
|
@@ -18,7 +18,7 @@ import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
18
18
|
import { Tooltip } from 'antd';
|
19
19
|
import { SDK_PREFIX } from '../../constants/style';
|
20
20
|
export default function NameLimiter(_a) {
|
21
|
-
var name = _a.name, title = _a.title;
|
21
|
+
var name = _a.name, title = _a.title, placement = _a.placement, getPopupContainer = _a.getPopupContainer;
|
22
22
|
var _b = __read(useState(false), 2), ellipsis = _b[0], setEllipsis = _b[1];
|
23
23
|
var _c = __read(useState(false), 2), visible = _c[0], setVisible = _c[1];
|
24
24
|
var ref = useRef(null);
|
@@ -29,6 +29,6 @@ export default function NameLimiter(_a) {
|
|
29
29
|
}
|
30
30
|
setEllipsis(ref.current.clientWidth < ref.current.scrollWidth);
|
31
31
|
});
|
32
|
-
return (React.createElement(Tooltip, { overlayClassName: SDK_PREFIX + "-name-limit-tooltip", placement:
|
32
|
+
return (React.createElement(Tooltip, { getPopupContainer: getPopupContainer, overlayClassName: SDK_PREFIX + "-name-limit-tooltip", placement: placement || 'top', title: title || name, visible: (!!title || ellipsis) && visible, onVisibleChange: setVisible },
|
33
33
|
React.createElement("span", { className: SDK_PREFIX + "-name-limit", ref: ref }, name)));
|
34
34
|
}
|
package/es/index.css
CHANGED
@@ -13202,12 +13202,6 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
13202
13202
|
.pandora-sdk-tree-select-dropdown .ant-empty {
|
13203
13203
|
text-align: center;
|
13204
13204
|
}
|
13205
|
-
.pandora-sdk-card-search-input {
|
13206
|
-
min-width: 200px;
|
13207
|
-
}
|
13208
|
-
.pandora-sdk-card-search-input i {
|
13209
|
-
color: #bfbfbf;
|
13210
|
-
}
|
13211
13205
|
.ant-row {
|
13212
13206
|
display: -webkit-box;
|
13213
13207
|
display: -ms-flexbox;
|
@@ -19097,6 +19091,12 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
19097
19091
|
.pandora-sdk-card-row-extra button {
|
19098
19092
|
min-width: 80px;
|
19099
19093
|
}
|
19094
|
+
.pandora-sdk-card-search-input {
|
19095
|
+
min-width: 200px;
|
19096
|
+
}
|
19097
|
+
.pandora-sdk-card-search-input i {
|
19098
|
+
color: #bfbfbf;
|
19099
|
+
}
|
19100
19100
|
.ant-picker {
|
19101
19101
|
-webkit-box-sizing: border-box;
|
19102
19102
|
box-sizing: border-box;
|
@@ -20413,18 +20413,6 @@ _:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-ce
|
|
20413
20413
|
.pandora-sdk-modal-close-icon:hover {
|
20414
20414
|
background: #f4f5f6;
|
20415
20415
|
}
|
20416
|
-
.pandora-sdk-popover-inline-list {
|
20417
|
-
display: inline-block;
|
20418
|
-
vertical-align: middle;
|
20419
|
-
}
|
20420
|
-
.pandora-sdk-popover-inline-list .pandora-sdk-popover-inline-item {
|
20421
|
-
display: inline-block;
|
20422
|
-
height: 100%;
|
20423
|
-
margin-right: 12px;
|
20424
|
-
}
|
20425
|
-
.pandora-sdk-popover-inline-list .pandora-sdk-popover-inline-item i {
|
20426
|
-
color: #2c6dd2;
|
20427
|
-
}
|
20428
20416
|
.pandora-sdk-item {
|
20429
20417
|
color: #2c6dd2;
|
20430
20418
|
cursor: pointer;
|
@@ -20447,6 +20435,18 @@ _:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-ce
|
|
20447
20435
|
color: inherit;
|
20448
20436
|
cursor: inherit;
|
20449
20437
|
}
|
20438
|
+
.pandora-sdk-popover-inline-list {
|
20439
|
+
display: inline-block;
|
20440
|
+
vertical-align: middle;
|
20441
|
+
}
|
20442
|
+
.pandora-sdk-popover-inline-list .pandora-sdk-popover-inline-item {
|
20443
|
+
display: inline-block;
|
20444
|
+
height: 100%;
|
20445
|
+
margin-right: 12px;
|
20446
|
+
}
|
20447
|
+
.pandora-sdk-popover-inline-list .pandora-sdk-popover-inline-item i {
|
20448
|
+
color: #2c6dd2;
|
20449
|
+
}
|
20450
20450
|
.pandora-sdk-popover-item {
|
20451
20451
|
display: inline-block;
|
20452
20452
|
line-height: 18px;
|
package/es/index.less
CHANGED
@@ -32,14 +32,14 @@
|
|
32
32
|
@import './components/Timeline/style.less';
|
33
33
|
@import './components/Transfer/style.less';
|
34
34
|
@import './components/TreeSelector/style.less';
|
35
|
-
@import './components/Card/SearchInput/style.less';
|
36
35
|
@import './components/Card/RowExtra/style.less';
|
36
|
+
@import './components/Card/SearchInput/style.less';
|
37
37
|
@import './components/DateTimePicker/Base/style.less';
|
38
38
|
@import './components/DateTimePicker/BaseMobile/style.less';
|
39
39
|
@import './components/DateTimePicker/DisplayInput/style.less';
|
40
40
|
@import './components/Drawer/CloseIcon/style.less';
|
41
|
-
@import './components/OptionList/InlineOptionList/style.less';
|
42
41
|
@import './components/OptionList/OptionItem/style.less';
|
42
|
+
@import './components/OptionList/InlineOptionList/style.less';
|
43
43
|
@import './components/OptionList/PopoverOptionList/style.less';
|
44
44
|
@import './components/Steps/ControlButton/style.less';
|
45
45
|
@import './components/Table/ColumnSetting/style.less';
|
package/es/style/theme.less
CHANGED
@@ -390,7 +390,9 @@
|
|
390
390
|
@agent-session-title-color: #595959;
|
391
391
|
@close-icon-hover-color: #f4f5f6;
|
392
392
|
|
393
|
-
@
|
393
|
+
@scroll-bar-color: #c9cdd4;
|
394
|
+
@scroll-bar-hover-color: #86909c;
|
395
|
+
|
394
396
|
@agent-scene-icon-color: #c9cdd4;
|
395
397
|
@agent-markdown-header-background-color: rgb(52, 53, 65);
|
396
398
|
@agent-box-shadow-color: rgba(53, 53, 53, 0.07);
|
@@ -273,7 +273,7 @@ function FileResumable(props) {
|
|
273
273
|
onError
|
274
274
|
]);
|
275
275
|
var handleStart = react_1.useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
276
|
-
var params, realFile_1, reader;
|
276
|
+
var params, realFile_1, reader, extension_1;
|
277
277
|
var _this = this;
|
278
278
|
return __generator(this, function (_a) {
|
279
279
|
params = __assign({}, query);
|
@@ -283,6 +283,7 @@ function FileResumable(props) {
|
|
283
283
|
reader.readAsText(realFile_1.size > 50 * 1024 * 1024
|
284
284
|
? realFile_1.slice(0, 2 * 1024 * 1024)
|
285
285
|
: realFile_1);
|
286
|
+
extension_1 = realFile_1.name.split('.').pop().toLowerCase();
|
286
287
|
reader.onloadend = function (e) { return __awaiter(_this, void 0, void 0, function () {
|
287
288
|
var md5Str, id, fileId, error_1;
|
288
289
|
var _a, _b, _c;
|
@@ -298,7 +299,7 @@ function FileResumable(props) {
|
|
298
299
|
return [4 /*yield*/, app_sdk_1.fileIsExit({
|
299
300
|
resumableModifyTime: realFile_1.lastModified,
|
300
301
|
resumableFilename: realFile_1.name,
|
301
|
-
resumableType: realFile_1.type,
|
302
|
+
resumableType: realFile_1.type || "application/" + extension_1,
|
302
303
|
resumableFileMd5: md5Str,
|
303
304
|
resumableTotalSize: realFile_1.size
|
304
305
|
})];
|
@@ -315,6 +316,7 @@ function FileResumable(props) {
|
|
315
316
|
params.resumableFileMd5 = md5Str;
|
316
317
|
params.resumableModifyTime = realFile_1.lastModified;
|
317
318
|
params.resumableIdentifier = uuid_1.default();
|
319
|
+
params.resumableType = realFile_1.type || "application/" + extension_1;
|
318
320
|
(_a = resumable.current) === null || _a === void 0 ? void 0 : _a.updateQuery(params);
|
319
321
|
(_b = resumable.current) === null || _b === void 0 ? void 0 : _b.upload();
|
320
322
|
}
|
@@ -1,11 +1,14 @@
|
|
1
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import type { TooltipPlacement } from 'antd/es/tooltip';
|
2
3
|
/**
|
3
4
|
* 对于超出容器宽度的名称进行省略,使用Tooltip展示。
|
4
5
|
*/
|
5
6
|
export interface INameLimiterProps {
|
6
7
|
/** 资源名称 */
|
7
|
-
name:
|
8
|
+
name: React.ReactNode;
|
8
9
|
/** 用于显示Tooltip的title */
|
9
|
-
title?:
|
10
|
+
title?: React.ReactNode;
|
11
|
+
placement?: TooltipPlacement;
|
12
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
10
13
|
}
|
11
|
-
export default function NameLimiter({ name, title }: INameLimiterProps): JSX.Element;
|
14
|
+
export default function NameLimiter({ name, title, placement, getPopupContainer }: INameLimiterProps): JSX.Element;
|
@@ -27,7 +27,7 @@ var react_1 = __importStar(require("react"));
|
|
27
27
|
var antd_1 = require("antd");
|
28
28
|
var style_1 = require("../../constants/style");
|
29
29
|
function NameLimiter(_a) {
|
30
|
-
var name = _a.name, title = _a.title;
|
30
|
+
var name = _a.name, title = _a.title, placement = _a.placement, getPopupContainer = _a.getPopupContainer;
|
31
31
|
var _b = __read(react_1.useState(false), 2), ellipsis = _b[0], setEllipsis = _b[1];
|
32
32
|
var _c = __read(react_1.useState(false), 2), visible = _c[0], setVisible = _c[1];
|
33
33
|
var ref = react_1.useRef(null);
|
@@ -38,7 +38,7 @@ function NameLimiter(_a) {
|
|
38
38
|
}
|
39
39
|
setEllipsis(ref.current.clientWidth < ref.current.scrollWidth);
|
40
40
|
});
|
41
|
-
return (react_1.default.createElement(antd_1.Tooltip, { overlayClassName: style_1.SDK_PREFIX + "-name-limit-tooltip", placement:
|
41
|
+
return (react_1.default.createElement(antd_1.Tooltip, { getPopupContainer: getPopupContainer, overlayClassName: style_1.SDK_PREFIX + "-name-limit-tooltip", placement: placement || 'top', title: title || name, visible: (!!title || ellipsis) && visible, onVisibleChange: setVisible },
|
42
42
|
react_1.default.createElement("span", { className: style_1.SDK_PREFIX + "-name-limit", ref: ref }, name)));
|
43
43
|
}
|
44
44
|
exports.default = NameLimiter;
|