@qn-pandora/pandora-component 4.0.2 → 4.0.4

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.
Files changed (71) hide show
  1. package/CHANGELOG.json +43 -0
  2. package/CHANGELOG.md +17 -1
  3. package/es/components/AutoComplete/index.js +21 -1
  4. package/es/components/DateTimePicker/transform.d.ts +4 -1
  5. package/es/components/DateTimePicker/transform.js +2 -2
  6. package/es/components/Drawer/index.d.ts +30 -2
  7. package/es/components/Drawer/index.js +165 -5
  8. package/es/components/Drawer/style.css +18 -1
  9. package/es/components/Drawer/style.less +23 -1
  10. package/es/components/FileResumable/constants.d.ts +33 -0
  11. package/es/components/FileResumable/constants.js +0 -0
  12. package/es/components/FileResumable/index.d.ts +13 -0
  13. package/es/components/FileResumable/index.js +327 -0
  14. package/es/components/FileResumable/style.css +777 -0
  15. package/es/components/FileResumable/style.less +94 -0
  16. package/es/components/FileResumable/utils.d.ts +1 -0
  17. package/es/components/FileResumable/utils.js +17 -0
  18. package/es/components/Selector/SelectorWidthChildren.d.ts +15 -0
  19. package/es/components/Selector/SelectorWidthChildren.js +59 -0
  20. package/es/components/Selector/index.d.ts +2 -0
  21. package/es/components/Selector/index.js +17 -3
  22. package/es/components/TreeSelector/index.js +1 -1
  23. package/es/constants/language/en.js +3 -1
  24. package/es/constants/language/type.d.ts +2 -0
  25. package/es/constants/language/upload/en.d.ts +3 -0
  26. package/es/constants/language/upload/en.js +20 -0
  27. package/es/constants/language/upload/type.d.ts +20 -0
  28. package/es/constants/language/upload/type.js +4 -0
  29. package/es/constants/language/upload/zh.d.ts +3 -0
  30. package/es/constants/language/upload/zh.js +20 -0
  31. package/es/constants/language/zh.js +3 -1
  32. package/es/index.css +1282 -498
  33. package/es/index.d.ts +2 -0
  34. package/es/index.js +2 -0
  35. package/es/index.less +12 -11
  36. package/es/style/theme.less +1 -0
  37. package/lib/components/AutoComplete/index.js +21 -1
  38. package/lib/components/DateTimePicker/transform.d.ts +4 -1
  39. package/lib/components/DateTimePicker/transform.js +2 -0
  40. package/lib/components/Drawer/index.d.ts +30 -2
  41. package/lib/components/Drawer/index.js +164 -12
  42. package/lib/components/Drawer/style.css +18 -1
  43. package/lib/components/Drawer/style.less +23 -1
  44. package/lib/components/FileResumable/constants.d.ts +33 -0
  45. package/lib/components/FileResumable/constants.js +2 -0
  46. package/lib/components/FileResumable/index.d.ts +13 -0
  47. package/lib/components/FileResumable/index.js +340 -0
  48. package/lib/components/FileResumable/style.css +777 -0
  49. package/lib/components/FileResumable/style.less +94 -0
  50. package/lib/components/FileResumable/utils.d.ts +1 -0
  51. package/lib/components/FileResumable/utils.js +19 -0
  52. package/lib/components/Selector/SelectorWidthChildren.d.ts +15 -0
  53. package/lib/components/Selector/SelectorWidthChildren.js +72 -0
  54. package/lib/components/Selector/index.d.ts +2 -0
  55. package/lib/components/Selector/index.js +16 -2
  56. package/lib/components/TreeSelector/index.js +1 -1
  57. package/lib/constants/language/en.js +6 -1
  58. package/lib/constants/language/type.d.ts +2 -0
  59. package/lib/constants/language/upload/en.d.ts +3 -0
  60. package/lib/constants/language/upload/en.js +22 -0
  61. package/lib/constants/language/upload/type.d.ts +20 -0
  62. package/lib/constants/language/upload/type.js +9 -0
  63. package/lib/constants/language/upload/zh.d.ts +3 -0
  64. package/lib/constants/language/upload/zh.js +22 -0
  65. package/lib/constants/language/zh.js +6 -1
  66. package/lib/index.css +977 -193
  67. package/lib/index.d.ts +2 -0
  68. package/lib/index.js +4 -0
  69. package/lib/index.less +9 -8
  70. package/lib/style/theme.less +1 -0
  71. package/package.json +6 -4
package/es/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { default as ConfigProvider } from './components/ConfigProvider';
7
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
+ export { default as SelectorWidthChildren } from './components/Selector/SelectorWidthChildren';
10
11
  export { default as Table, ITableProps, IOptionItem as ITableOptionItem } from './components/Table';
11
12
  export { default as Steps } from './components/Steps';
12
13
  export { default as DateTimePicker, Time, EButtonType, IDateTimePickerProps } from './components/DateTimePicker';
@@ -27,6 +28,7 @@ export { default as AutoComplete, AutoSelectValue } from './components/AutoCompl
27
28
  export { default as Checkbox } from './components/Checkbox';
28
29
  export { default as CheckboxList, ICheckboxListProps, CheckboxValueType, IOptionItem as ICheckOptionItem } from './components/CheckboxList';
29
30
  export { default as Breadcrumb, IBreadcrumbProps } from './components/Breadcrumb';
31
+ export { default as FileResumable } from './components/FileResumable';
30
32
  export { default as Drawer } from './components/Drawer';
31
33
  export { default as KeyValuePair, IKeyValuePairProps } from './components/KeyValuePair';
32
34
  export { default as NameExplainTooltip, INameExplainTooltip } from './components/NameExplainTooltip';
package/es/index.js CHANGED
@@ -7,6 +7,7 @@ export { default as ConfigProvider } from './components/ConfigProvider';
7
7
  export { default as NameLimiter } from './components/NameLimiter';
8
8
  export { default as Input } from './components/Input';
9
9
  export { default as Selector } from './components/Selector';
10
+ export { default as SelectorWidthChildren } from './components/Selector/SelectorWidthChildren';
10
11
  export { default as Table } from './components/Table';
11
12
  export { default as Steps } from './components/Steps';
12
13
  export { default as DateTimePicker, Time, EButtonType } from './components/DateTimePicker';
@@ -27,6 +28,7 @@ export { default as AutoComplete } from './components/AutoComplete';
27
28
  export { default as Checkbox } from './components/Checkbox';
28
29
  export { default as CheckboxList } from './components/CheckboxList';
29
30
  export { default as Breadcrumb } from './components/Breadcrumb';
31
+ export { default as FileResumable } from './components/FileResumable';
30
32
  export { default as Drawer } from './components/Drawer';
31
33
  export { default as KeyValuePair } from './components/KeyValuePair';
32
34
  export { default as NameExplainTooltip } from './components/NameExplainTooltip';
package/es/index.less CHANGED
@@ -1,32 +1,33 @@
1
1
  @import './style\mixin.less';
2
2
  @import './style\theme.less';
3
- @import './components\Breadcrumb\style.less';
4
3
  @import './components\AutoComplete\style.less';
5
4
  @import './components\Card\style.less';
6
5
  @import './components\Button\style.less';
7
- @import './components\Checkbox\style.less';
6
+ @import './components\Breadcrumb\style.less';
8
7
  @import './components\CheckboxList\style.less';
9
8
  @import './components\CheckTransformList\style.less';
10
- @import './components\CollapsiblePanel\style.less';
11
9
  @import './components\Collapse\style.less';
12
- @import './components\Drawer\style.less';
10
+ @import './components\Checkbox\style.less';
11
+ @import './components\CollapsiblePanel\style.less';
13
12
  @import './components\DateTimePicker\style.less';
13
+ @import './components\Drawer\style.less';
14
+ @import './components\FileResumable\style.less';
14
15
  @import './components\Input\style.less';
15
- @import './components\Menu\style.less';
16
16
  @import './components\KeyValuePair\style.less';
17
+ @import './components\Menu\style.less';
17
18
  @import './components\Modal\style.less';
18
- @import './components\NameLimiter\style.less';
19
19
  @import './components\NameExplainTooltip\style.less';
20
+ @import './components\NameLimiter\style.less';
21
+ @import './components\OptionList\style.less';
20
22
  @import './components\RadioGroup\style.less';
21
23
  @import './components\RangeInput\style.less';
22
- @import './components\RemarkName\style.less';
23
24
  @import './components\Selector\style.less';
24
- @import './components\OptionList\style.less';
25
25
  @import './components\Spin\style.less';
26
+ @import './components\RemarkName\style.less';
26
27
  @import './components\Steps\style.less';
27
28
  @import './components\Table\style.less';
28
- @import './components\Tabs\style.less';
29
29
  @import './components\Timeline\style.less';
30
+ @import './components\Tabs\style.less';
30
31
  @import './components\TagList\style.less';
31
32
  @import './components\Transfer\style.less';
32
33
  @import './components\TreeSelector\style.less';
@@ -41,9 +42,9 @@
41
42
  @import './components\Steps\ControlButton\style.less';
42
43
  @import './components\Table\ColumnTag\style.less';
43
44
  @import './components\Timeline\TimelineItem\style.less';
44
- @import './components\TagList\TagSwitch\style.less';
45
- @import './components\TagList\Tag\style.less';
46
45
  @import './components\Transfer\List\style.less';
46
+ @import './components\TagList\Tag\style.less';
47
47
  @import './components\Transfer\ListBody\style.less';
48
+ @import './components\TagList\TagSwitch\style.less';
48
49
  @import './components\DateTimePicker\Collapse\Panel\style.less';
49
50
  @import './components\DateTimePicker\BaseMobile\Absolute\style.less';
@@ -387,3 +387,4 @@
387
387
  @editor-nav-background-color: #f5f5f5;
388
388
  @editor_nav_border_color: #d8d8d8;
389
389
  @editor_nav_line_color: #fcce72;
390
+ @image-operator-hover-bg: rgba(51, 51, 51, 0.7);
@@ -34,13 +34,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  var React = __importStar(require("react"));
36
36
  var classnames_1 = __importDefault(require("classnames"));
37
+ var lodash_1 = require("lodash");
37
38
  var antd_1 = require("antd");
38
39
  var style_1 = require("../../constants/style");
39
40
  var debounce_1 = __importDefault(require("../../hoc/debounce"));
40
41
  function AutoComplete(props) {
41
42
  var _a;
42
43
  var className = props.className, dropdownClassName = props.dropdownClassName, ellipsis = props.ellipsis, other = __rest(props, ["className", "dropdownClassName", "ellipsis"]);
43
- return (React.createElement(antd_1.AutoComplete, __assign({ className: classnames_1.default(className, style_1.SDK_PREFIX + "-auto-complete", style_1.SDK_PREFIX + "-selector"), dropdownClassName: classnames_1.default(style_1.SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[style_1.SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName) }, other)));
44
+ var filterOption = React.useCallback(function (inputValue, option) {
45
+ var prefix = (inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase()) || '';
46
+ var _a = option || {}, value = _a.value, title = _a.title, children = _a.children, label = _a.label;
47
+ return children
48
+ ? lodash_1.isString(children)
49
+ ? lodash_1.includes(children.toLowerCase(), prefix)
50
+ : true
51
+ : label
52
+ ? lodash_1.isString(label)
53
+ ? lodash_1.includes(label.toLowerCase(), prefix)
54
+ : true
55
+ : title
56
+ ? lodash_1.isString(title)
57
+ ? lodash_1.includes(title.toLowerCase(), prefix)
58
+ : true
59
+ : lodash_1.isString(value)
60
+ ? lodash_1.includes(value.toLowerCase(), prefix)
61
+ : true;
62
+ }, []);
63
+ return (React.createElement(antd_1.AutoComplete, __assign({ className: classnames_1.default(className, style_1.SDK_PREFIX + "-auto-complete", style_1.SDK_PREFIX + "-selector"), dropdownClassName: classnames_1.default(style_1.SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[style_1.SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), filterOption: filterOption, showSearch: true }, other)));
44
64
  }
45
65
  exports.AutoComplete = AutoComplete;
46
66
  exports.default = debounce_1.default(AutoComplete);
@@ -1,6 +1,9 @@
1
- import { ITimeRange, ITime } from './constants';
1
+ import moment from 'moment';
2
+ import { ITimeRange, ITime, TimeShiftUnit } from './constants';
2
3
  export declare function transformToTime(time: ITimeRange): ITime;
3
4
  export declare function transformToTimeRange(time: ITime): ITimeRange;
5
+ export declare function getTimeShiftUnit(time: string): TimeShiftUnit.Second | TimeShiftUnit;
6
+ export declare function getRelativeTime(timeShift: string, time: moment.Moment): moment.Moment | undefined;
4
7
  export declare function calcFullTime(time?: ITimeRange): {
5
8
  start: number | undefined;
6
9
  end: number | undefined;
@@ -59,6 +59,7 @@ function getTimeShiftUnit(time) {
59
59
  }
60
60
  return constants_1.TimeShiftUnit.Second;
61
61
  }
62
+ exports.getTimeShiftUnit = getTimeShiftUnit;
62
63
  function getRelativeTime(timeShift, time) {
63
64
  var timeShiftValue = parseFloat(timeShift) || 0;
64
65
  var timeShiftUnit = getTimeShiftUnit(timeShift);
@@ -66,6 +67,7 @@ function getRelativeTime(timeShift, time) {
66
67
  return moment_1.default(time).subtract(timeShiftValue, timeShiftUnit);
67
68
  }
68
69
  }
70
+ exports.getRelativeTime = getRelativeTime;
69
71
  function calcFullTime(time) {
70
72
  if (!time) {
71
73
  return;
@@ -1,4 +1,5 @@
1
- import * as React from 'react';
1
+ /// <reference types="lodash" />
2
+ import React from 'react';
2
3
  import { DrawerProps } from 'antd/es/drawer';
3
4
  import { Overwrite } from '../../models';
4
5
  declare type EventType = React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement | HTMLButtonElement>;
@@ -52,8 +53,28 @@ export declare type IDrawerProps = Overwrite<DrawerProps, {
52
53
  getContainer?: string | HTMLElement | getContainerFunc | false;
53
54
  onClose?: (e: EventType) => void;
54
55
  afterVisibleChange?: (visible: boolean) => void;
56
+ /**
57
+ * 是否允许拖拽
58
+ */
59
+ canDrag?: boolean;
60
+ closeIconPlacement?: 'left' | 'right';
55
61
  }>;
56
- export declare function Drawer(props: React.PropsWithChildren<IDrawerProps>): JSX.Element;
62
+ export declare class Drawer extends React.Component<React.PropsWithChildren<IDrawerProps>, any> {
63
+ isResizing: boolean;
64
+ realWidth: string | number | undefined;
65
+ throttleMouseMove: import("lodash").DebouncedFunc<(e: any) => void>;
66
+ get closable(): boolean | undefined;
67
+ get extra(): {} | null | undefined;
68
+ setIsResizing(isResizing?: boolean): void;
69
+ setRealWidth(realWidth: string | number): void;
70
+ onMouseDown(): void;
71
+ onMouseUp(): void;
72
+ onMouseMove(e: any): void;
73
+ componentDidMount(): void;
74
+ UNSAFE_componentWillUpdate(nextProps: Readonly<React.PropsWithChildren<IDrawerProps>>): void;
75
+ componentWillUnmount(): void;
76
+ render(): JSX.Element;
77
+ }
57
78
  declare const _default: (props: {
58
79
  className?: string | undefined;
59
80
  /**
@@ -103,7 +124,14 @@ declare const _default: (props: {
103
124
  getContainer?: string | false | HTMLElement | getContainerFunc | undefined;
104
125
  onClose?: ((e: EventType) => void) | undefined;
105
126
  afterVisibleChange?: ((visible: boolean) => void) | undefined;
127
+ /**
128
+ * 是否允许拖拽
129
+ */
130
+ canDrag?: boolean | undefined;
131
+ closeIconPlacement?: import("antd/es/collapse/Collapse").ExpandIconPosition;
106
132
  } & Pick<DrawerProps, "style" | "autoFocus" | "size" | "prefixCls" | "footer" | "extra" | "bodyStyle" | "forceRender" | "keyboard" | "destroyOnClose" | "closeIcon" | "drawerStyle" | "headerStyle" | "contentWrapperStyle" | "push" | "handler" | "footerStyle" | "level" | "levelMove"> & {
133
+ children?: React.ReactNode;
134
+ } & {
107
135
  bodyStyle?: React.CSSProperties | undefined;
108
136
  children: React.ReactNode;
109
137
  }) => JSX.Element;
@@ -1,4 +1,17 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
2
15
  var __assign = (this && this.__assign) || function () {
3
16
  __assign = Object.assign || function(t) {
4
17
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -10,6 +23,15 @@ var __assign = (this && this.__assign) || function () {
10
23
  };
11
24
  return __assign.apply(this, arguments);
12
25
  };
26
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
27
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ };
32
+ var __metadata = (this && this.__metadata) || function (k, v) {
33
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
34
+ };
13
35
  var __rest = (this && this.__rest) || function (s, e) {
14
36
  var t = {};
15
37
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -21,25 +43,155 @@ var __rest = (this && this.__rest) || function (s, e) {
21
43
  }
22
44
  return t;
23
45
  };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
28
- result["default"] = mod;
29
- return result;
30
- };
31
46
  var __importDefault = (this && this.__importDefault) || function (mod) {
32
47
  return (mod && mod.__esModule) ? mod : { "default": mod };
33
48
  };
34
49
  Object.defineProperty(exports, "__esModule", { value: true });
35
- var React = __importStar(require("react"));
50
+ var react_1 = __importDefault(require("react"));
36
51
  var classnames_1 = __importDefault(require("classnames"));
52
+ var lodash_1 = require("lodash");
53
+ var mobx_react_1 = require("mobx-react");
54
+ var mobx_1 = require("mobx");
37
55
  var antd_1 = require("antd");
56
+ var icons_1 = require("@ant-design/icons");
38
57
  var style_1 = require("../../constants/style");
39
58
  var popContainer_1 = __importDefault(require("../../hoc/popContainer"));
40
- function Drawer(props) {
41
- var width = props.width, className = props.className, other = __rest(props, ["width", "className"]);
42
- return (React.createElement(antd_1.Drawer, __assign({ className: classnames_1.default(style_1.SDK_PREFIX + "-drawer", className), width: width || 'auto', zIndex: 1200 }, other)));
43
- }
59
+ var bind_1 = __importDefault(require("../../utils/bind"));
60
+ var MAX_WIDTH = 6000;
61
+ var MIN_WIDTH = 300;
62
+ var Drawer = /** @class */ (function (_super) {
63
+ __extends(Drawer, _super);
64
+ function Drawer() {
65
+ var _this = _super !== null && _super.apply(this, arguments) || this;
66
+ _this.isResizing = false;
67
+ _this.realWidth = _this.props.width;
68
+ _this.throttleMouseMove = lodash_1.throttle(function (e) { return _this.onMouseMove(e); }, 100);
69
+ return _this;
70
+ }
71
+ Object.defineProperty(Drawer.prototype, "closable", {
72
+ get: function () {
73
+ if (this.props.closable &&
74
+ this.props.closeIconPlacement &&
75
+ this.props.closeIconPlacement === 'right') {
76
+ return false;
77
+ }
78
+ return this.props.closable;
79
+ },
80
+ enumerable: true,
81
+ configurable: true
82
+ });
83
+ Object.defineProperty(Drawer.prototype, "extra", {
84
+ get: function () {
85
+ if (this.props.closable && this.props.closeIconPlacement === 'right') {
86
+ return (react_1.default.createElement(react_1.default.Fragment, null,
87
+ this.props.extra,
88
+ react_1.default.createElement(icons_1.CloseOutlined, { onClick: this.props.onClose, className: style_1.SDK_PREFIX + "-drawer-right-close-icon" })));
89
+ }
90
+ return this.props.extra;
91
+ },
92
+ enumerable: true,
93
+ configurable: true
94
+ });
95
+ Drawer.prototype.setIsResizing = function (isResizing) {
96
+ if (isResizing === void 0) { isResizing = false; }
97
+ this.isResizing = isResizing;
98
+ };
99
+ Drawer.prototype.setRealWidth = function (realWidth) {
100
+ this.realWidth = realWidth;
101
+ };
102
+ Drawer.prototype.onMouseDown = function () {
103
+ this.setIsResizing(true);
104
+ };
105
+ Drawer.prototype.onMouseUp = function () {
106
+ this.setIsResizing(false);
107
+ };
108
+ Drawer.prototype.onMouseMove = function (e) {
109
+ if (this.isResizing) {
110
+ var offsetRight = document.body.offsetWidth - (e.clientX - document.body.offsetLeft);
111
+ if (offsetRight > MIN_WIDTH && offsetRight < MAX_WIDTH) {
112
+ this.setRealWidth(offsetRight);
113
+ }
114
+ }
115
+ };
116
+ Drawer.prototype.componentDidMount = function () {
117
+ if (this.props.canDrag) {
118
+ document.addEventListener('mousemove', this.throttleMouseMove);
119
+ document.addEventListener('mouseup', this.onMouseUp);
120
+ }
121
+ };
122
+ Drawer.prototype.UNSAFE_componentWillUpdate = function (nextProps) {
123
+ if (nextProps.canDrag && !this.props.canDrag) {
124
+ document.addEventListener('mousemove', this.throttleMouseMove);
125
+ document.addEventListener('mouseup', this.onMouseUp);
126
+ }
127
+ };
128
+ Drawer.prototype.componentWillUnmount = function () {
129
+ document.removeEventListener('mousemove', this.throttleMouseMove);
130
+ document.removeEventListener('mouseup', this.onMouseUp);
131
+ };
132
+ Drawer.prototype.render = function () {
133
+ var _a;
134
+ var _b = this.props, width = _b.width, className = _b.className, children = _b.children, canDrag = _b.canDrag, visible = _b.visible, closable = _b.closable, extra = _b.extra, other = __rest(_b, ["width", "className", "children", "canDrag", "visible", "closable", "extra"]);
135
+ return (react_1.default.createElement(antd_1.Drawer, __assign({ className: classnames_1.default(style_1.SDK_PREFIX + "-drawer", className, (_a = {},
136
+ _a[style_1.SDK_PREFIX + "-drawer-no-mask"] = this.props.mask === false,
137
+ _a)), width: this.realWidth || 'auto', zIndex: 1200, visible: visible, closable: this.closable, extra: this.extra }, other),
138
+ canDrag && (react_1.default.createElement("div", { className: style_1.SDK_PREFIX + "-scroll-handler", onMouseDown: this.onMouseDown })),
139
+ children));
140
+ };
141
+ __decorate([
142
+ mobx_1.observable,
143
+ __metadata("design:type", Object)
144
+ ], Drawer.prototype, "isResizing", void 0);
145
+ __decorate([
146
+ mobx_1.observable,
147
+ __metadata("design:type", Object)
148
+ ], Drawer.prototype, "realWidth", void 0);
149
+ __decorate([
150
+ mobx_1.computed,
151
+ __metadata("design:type", Object),
152
+ __metadata("design:paramtypes", [])
153
+ ], Drawer.prototype, "closable", null);
154
+ __decorate([
155
+ mobx_1.computed,
156
+ __metadata("design:type", Object),
157
+ __metadata("design:paramtypes", [])
158
+ ], Drawer.prototype, "extra", null);
159
+ __decorate([
160
+ bind_1.default,
161
+ mobx_1.action,
162
+ __metadata("design:type", Function),
163
+ __metadata("design:paramtypes", [Object]),
164
+ __metadata("design:returntype", void 0)
165
+ ], Drawer.prototype, "setIsResizing", null);
166
+ __decorate([
167
+ bind_1.default,
168
+ mobx_1.action,
169
+ __metadata("design:type", Function),
170
+ __metadata("design:paramtypes", [Object]),
171
+ __metadata("design:returntype", void 0)
172
+ ], Drawer.prototype, "setRealWidth", null);
173
+ __decorate([
174
+ bind_1.default,
175
+ __metadata("design:type", Function),
176
+ __metadata("design:paramtypes", []),
177
+ __metadata("design:returntype", void 0)
178
+ ], Drawer.prototype, "onMouseDown", null);
179
+ __decorate([
180
+ bind_1.default,
181
+ __metadata("design:type", Function),
182
+ __metadata("design:paramtypes", []),
183
+ __metadata("design:returntype", void 0)
184
+ ], Drawer.prototype, "onMouseUp", null);
185
+ __decorate([
186
+ bind_1.default,
187
+ __metadata("design:type", Function),
188
+ __metadata("design:paramtypes", [Object]),
189
+ __metadata("design:returntype", void 0)
190
+ ], Drawer.prototype, "onMouseMove", null);
191
+ Drawer = __decorate([
192
+ mobx_react_1.observer
193
+ ], Drawer);
194
+ return Drawer;
195
+ }(react_1.default.Component));
44
196
  exports.Drawer = Drawer;
45
197
  exports.default = popContainer_1.default(Drawer);
@@ -259,7 +259,7 @@
259
259
  }
260
260
  .pandora-sdk-drawer .ant-drawer-content-wrapper {
261
261
  width: 50%;
262
- min-width: 600px;
262
+ min-width: 300px;
263
263
  }
264
264
  .pandora-sdk-drawer .ant-drawer-content > div {
265
265
  position: relative;
@@ -269,3 +269,20 @@
269
269
  height: 60px;
270
270
  line-height: 60px;
271
271
  }
272
+ .pandora-sdk-drawer-no-mask .ant-drawer-content-wrapper {
273
+ width: 100%;
274
+ }
275
+ .pandora-sdk-scroll-handler {
276
+ position: absolute;
277
+ width: 5px;
278
+ padding: 4px 0 0;
279
+ top: 0;
280
+ left: 0;
281
+ bottom: 0;
282
+ z-index: 100;
283
+ cursor: ew-resize;
284
+ }
285
+ .pandora-sdk-drawer-right-close-icon {
286
+ margin-left: 8px;
287
+ font-size: 16px;
288
+ }
@@ -4,7 +4,7 @@
4
4
  .@{sdk-prefix}-drawer {
5
5
  .@{ant-prefix}-drawer-content-wrapper {
6
6
  width: 50%;
7
- min-width: 600px;
7
+ min-width: 300px;
8
8
  }
9
9
  .@{ant-prefix}-drawer-content > div {
10
10
  position: relative;
@@ -15,3 +15,25 @@
15
15
  line-height: 60px;
16
16
  }
17
17
  }
18
+
19
+ .@{sdk-prefix}-drawer-no-mask {
20
+ .@{ant-prefix}-drawer-content-wrapper {
21
+ width: 100%;
22
+ }
23
+ }
24
+
25
+ .@{sdk-prefix}-scroll-handler {
26
+ position: absolute;
27
+ width: 5px;
28
+ padding: 4px 0 0;
29
+ top: 0;
30
+ left: 0;
31
+ bottom: 0;
32
+ z-index: 100;
33
+ cursor: ew-resize;
34
+ }
35
+
36
+ .@{sdk-prefix}-drawer-right-close-icon {
37
+ margin-left: 8px;
38
+ font-size: 16px;
39
+ }
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { RcFile, UploadChangeParam } from 'antd/es/upload';
3
+ export interface IFileResumableProps {
4
+ target?: string;
5
+ uploading: boolean;
6
+ accept: string;
7
+ chunkSize?: number;
8
+ forceChunkSize?: boolean;
9
+ simultaneousUploads?: number;
10
+ query?: IKeyValues;
11
+ fileList: UploadChangeParam['fileList'] | [];
12
+ method?: 'multipart' | 'octet';
13
+ testChunks?: boolean;
14
+ maxChunkRetries?: number;
15
+ maxFiles?: number;
16
+ withCredentials?: boolean;
17
+ headers?: IKeyValues;
18
+ onSuccess?: (message: string) => void;
19
+ onChange?: (file: RcFile | null) => void;
20
+ onStop?: () => void;
21
+ minFileSize?: number;
22
+ minFileSizeErrorCallback?: (file: RcFile) => void;
23
+ maxFileSize?: number;
24
+ maxFileSizeErrorCallback?: (file: RcFile) => void;
25
+ onError?: (error: string) => void;
26
+ className?: string;
27
+ showUploadList?: boolean;
28
+ mode?: 'image' | 'file';
29
+ uploadIcon?: React.ReactNode;
30
+ uploadDesc?: string;
31
+ disabled?: boolean;
32
+ defaultImageUrl?: string;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { IFileResumableProps } from './constants';
3
+ export interface IIconItem {
4
+ iconType: any;
5
+ type: string;
6
+ text: string;
7
+ disabled?: boolean;
8
+ ownIcon?: boolean;
9
+ onClick?: () => void;
10
+ }
11
+ export default function FileResumable(props: PropsWithChildren<IFileResumableProps & {
12
+ ref?: any;
13
+ }>): JSX.Element;