@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/CHANGELOG.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@qn-pandora/pandora-component",
3
3
  "entries": [
4
+ {
5
+ "version": "4.0.4",
6
+ "tag": "@qn-pandora/pandora-component_v4.0.4",
7
+ "date": "Wed, 11 Jan 2023 08:25:05 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "2023-01-11 发布"
12
+ }
13
+ ],
14
+ "dependency": [
15
+ {
16
+ "comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.0.6` to `^3.0.7`"
17
+ },
18
+ {
19
+ "comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.0.5` to `^3.0.7`"
20
+ },
21
+ {
22
+ "comment": "Updating dependency \"@qn-pandora/pandora-tools\" from `^2.0.5` to `^2.0.6`"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "version": "4.0.3",
29
+ "tag": "@qn-pandora/pandora-component_v4.0.3",
30
+ "date": "Tue, 10 Jan 2023 03:03:58 GMT",
31
+ "comments": {
32
+ "patch": [
33
+ {
34
+ "comment": "2023-01-10 发布"
35
+ }
36
+ ],
37
+ "dependency": [
38
+ {
39
+ "comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.0.5` to `^3.0.6`"
40
+ },
41
+ {
42
+ "comment": "Updating dependency \"@qn-pandora/pandora-tools\" from `^2.0.4` to `^2.0.5`"
43
+ }
44
+ ]
45
+ }
46
+ },
4
47
  {
5
48
  "version": "4.0.2",
6
49
  "tag": "@qn-pandora/pandora-component_v4.0.2",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  # Change Log - @qn-pandora/pandora-component
2
2
 
3
- This log was last generated on Tue, 29 Nov 2022 03:37:07 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 11 Jan 2023 08:25:05 GMT and should not be manually modified.
4
+
5
+ ## 4.0.4
6
+
7
+ Wed, 11 Jan 2023 08:25:05 GMT
8
+
9
+ ### Patches
10
+
11
+ - 2023-01-11 发布
12
+
13
+ ## 4.0.3
14
+
15
+ Tue, 10 Jan 2023 03:03:58 GMT
16
+
17
+ ### Patches
18
+
19
+ - 2023-01-10 发布
4
20
 
5
21
  ## 4.0.2
6
22
 
@@ -22,12 +22,32 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import * as React from 'react';
24
24
  import classnames from 'classnames';
25
+ import { includes, isString } from 'lodash';
25
26
  import { AutoComplete as BaseAutoComplete } from 'antd';
26
27
  import { SDK_PREFIX } from '../../constants/style';
27
28
  import debounceWrapper from '../../hoc/debounce';
28
29
  export function AutoComplete(props) {
29
30
  var _a;
30
31
  var className = props.className, dropdownClassName = props.dropdownClassName, ellipsis = props.ellipsis, other = __rest(props, ["className", "dropdownClassName", "ellipsis"]);
31
- return (React.createElement(BaseAutoComplete, __assign({ className: classnames(className, SDK_PREFIX + "-auto-complete", SDK_PREFIX + "-selector"), dropdownClassName: classnames(SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName) }, other)));
32
+ var filterOption = React.useCallback(function (inputValue, option) {
33
+ var prefix = (inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase()) || '';
34
+ var _a = option || {}, value = _a.value, title = _a.title, children = _a.children, label = _a.label;
35
+ return children
36
+ ? isString(children)
37
+ ? includes(children.toLowerCase(), prefix)
38
+ : true
39
+ : label
40
+ ? isString(label)
41
+ ? includes(label.toLowerCase(), prefix)
42
+ : true
43
+ : title
44
+ ? isString(title)
45
+ ? includes(title.toLowerCase(), prefix)
46
+ : true
47
+ : isString(value)
48
+ ? includes(value.toLowerCase(), prefix)
49
+ : true;
50
+ }, []);
51
+ return (React.createElement(BaseAutoComplete, __assign({ className: classnames(className, SDK_PREFIX + "-auto-complete", SDK_PREFIX + "-selector"), dropdownClassName: classnames(SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), filterOption: filterOption, showSearch: true }, other)));
32
52
  }
33
53
  export default debounceWrapper(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;
@@ -33,7 +33,7 @@ export function transformToTimeRange(time) {
33
33
  quarterTime: time.quarterTime
34
34
  };
35
35
  }
36
- function getTimeShiftUnit(time) {
36
+ export function getTimeShiftUnit(time) {
37
37
  var e_1, _a;
38
38
  try {
39
39
  for (var TimeShiftUnitOptions_1 = __values(TimeShiftUnitOptions), TimeShiftUnitOptions_1_1 = TimeShiftUnitOptions_1.next(); !TimeShiftUnitOptions_1_1.done; TimeShiftUnitOptions_1_1 = TimeShiftUnitOptions_1.next()) {
@@ -52,7 +52,7 @@ function getTimeShiftUnit(time) {
52
52
  }
53
53
  return TimeShiftUnit.Second;
54
54
  }
55
- function getRelativeTime(timeShift, time) {
55
+ export function getRelativeTime(timeShift, time) {
56
56
  var timeShiftValue = parseFloat(timeShift) || 0;
57
57
  var timeShiftUnit = getTimeShiftUnit(timeShift);
58
58
  if (time) {
@@ -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,3 +1,16 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
1
14
  var __assign = (this && this.__assign) || function () {
2
15
  __assign = Object.assign || function(t) {
3
16
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,6 +22,15 @@ var __assign = (this && this.__assign) || function () {
9
22
  };
10
23
  return __assign.apply(this, arguments);
11
24
  };
25
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
26
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28
+ 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;
29
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30
+ };
31
+ var __metadata = (this && this.__metadata) || function (k, v) {
32
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
33
+ };
12
34
  var __rest = (this && this.__rest) || function (s, e) {
13
35
  var t = {};
14
36
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -20,13 +42,151 @@ var __rest = (this && this.__rest) || function (s, e) {
20
42
  }
21
43
  return t;
22
44
  };
23
- import * as React from 'react';
45
+ import React from 'react';
24
46
  import classnames from 'classnames';
47
+ import { throttle } from 'lodash';
48
+ import { observer } from 'mobx-react';
49
+ import { observable, action, computed } from 'mobx';
25
50
  import { Drawer as BaseDrawer } from 'antd';
51
+ import { CloseOutlined } from '@ant-design/icons';
26
52
  import { SDK_PREFIX } from '../../constants/style';
27
53
  import popContainerWrapper from '../../hoc/popContainer';
28
- export function Drawer(props) {
29
- var width = props.width, className = props.className, other = __rest(props, ["width", "className"]);
30
- return (React.createElement(BaseDrawer, __assign({ className: classnames(SDK_PREFIX + "-drawer", className), width: width || 'auto', zIndex: 1200 }, other)));
31
- }
54
+ import bind from '../../utils/bind';
55
+ var MAX_WIDTH = 6000;
56
+ var MIN_WIDTH = 300;
57
+ var Drawer = /** @class */ (function (_super) {
58
+ __extends(Drawer, _super);
59
+ function Drawer() {
60
+ var _this = _super !== null && _super.apply(this, arguments) || this;
61
+ _this.isResizing = false;
62
+ _this.realWidth = _this.props.width;
63
+ _this.throttleMouseMove = throttle(function (e) { return _this.onMouseMove(e); }, 100);
64
+ return _this;
65
+ }
66
+ Object.defineProperty(Drawer.prototype, "closable", {
67
+ get: function () {
68
+ if (this.props.closable &&
69
+ this.props.closeIconPlacement &&
70
+ this.props.closeIconPlacement === 'right') {
71
+ return false;
72
+ }
73
+ return this.props.closable;
74
+ },
75
+ enumerable: true,
76
+ configurable: true
77
+ });
78
+ Object.defineProperty(Drawer.prototype, "extra", {
79
+ get: function () {
80
+ if (this.props.closable && this.props.closeIconPlacement === 'right') {
81
+ return (React.createElement(React.Fragment, null,
82
+ this.props.extra,
83
+ React.createElement(CloseOutlined, { onClick: this.props.onClose, className: SDK_PREFIX + "-drawer-right-close-icon" })));
84
+ }
85
+ return this.props.extra;
86
+ },
87
+ enumerable: true,
88
+ configurable: true
89
+ });
90
+ Drawer.prototype.setIsResizing = function (isResizing) {
91
+ if (isResizing === void 0) { isResizing = false; }
92
+ this.isResizing = isResizing;
93
+ };
94
+ Drawer.prototype.setRealWidth = function (realWidth) {
95
+ this.realWidth = realWidth;
96
+ };
97
+ Drawer.prototype.onMouseDown = function () {
98
+ this.setIsResizing(true);
99
+ };
100
+ Drawer.prototype.onMouseUp = function () {
101
+ this.setIsResizing(false);
102
+ };
103
+ Drawer.prototype.onMouseMove = function (e) {
104
+ if (this.isResizing) {
105
+ var offsetRight = document.body.offsetWidth - (e.clientX - document.body.offsetLeft);
106
+ if (offsetRight > MIN_WIDTH && offsetRight < MAX_WIDTH) {
107
+ this.setRealWidth(offsetRight);
108
+ }
109
+ }
110
+ };
111
+ Drawer.prototype.componentDidMount = function () {
112
+ if (this.props.canDrag) {
113
+ document.addEventListener('mousemove', this.throttleMouseMove);
114
+ document.addEventListener('mouseup', this.onMouseUp);
115
+ }
116
+ };
117
+ Drawer.prototype.UNSAFE_componentWillUpdate = function (nextProps) {
118
+ if (nextProps.canDrag && !this.props.canDrag) {
119
+ document.addEventListener('mousemove', this.throttleMouseMove);
120
+ document.addEventListener('mouseup', this.onMouseUp);
121
+ }
122
+ };
123
+ Drawer.prototype.componentWillUnmount = function () {
124
+ document.removeEventListener('mousemove', this.throttleMouseMove);
125
+ document.removeEventListener('mouseup', this.onMouseUp);
126
+ };
127
+ Drawer.prototype.render = function () {
128
+ var _a;
129
+ 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"]);
130
+ return (React.createElement(BaseDrawer, __assign({ className: classnames(SDK_PREFIX + "-drawer", className, (_a = {},
131
+ _a[SDK_PREFIX + "-drawer-no-mask"] = this.props.mask === false,
132
+ _a)), width: this.realWidth || 'auto', zIndex: 1200, visible: visible, closable: this.closable, extra: this.extra }, other),
133
+ canDrag && (React.createElement("div", { className: SDK_PREFIX + "-scroll-handler", onMouseDown: this.onMouseDown })),
134
+ children));
135
+ };
136
+ __decorate([
137
+ observable,
138
+ __metadata("design:type", Object)
139
+ ], Drawer.prototype, "isResizing", void 0);
140
+ __decorate([
141
+ observable,
142
+ __metadata("design:type", Object)
143
+ ], Drawer.prototype, "realWidth", void 0);
144
+ __decorate([
145
+ computed,
146
+ __metadata("design:type", Object),
147
+ __metadata("design:paramtypes", [])
148
+ ], Drawer.prototype, "closable", null);
149
+ __decorate([
150
+ computed,
151
+ __metadata("design:type", Object),
152
+ __metadata("design:paramtypes", [])
153
+ ], Drawer.prototype, "extra", null);
154
+ __decorate([
155
+ bind,
156
+ action,
157
+ __metadata("design:type", Function),
158
+ __metadata("design:paramtypes", [Object]),
159
+ __metadata("design:returntype", void 0)
160
+ ], Drawer.prototype, "setIsResizing", null);
161
+ __decorate([
162
+ bind,
163
+ action,
164
+ __metadata("design:type", Function),
165
+ __metadata("design:paramtypes", [Object]),
166
+ __metadata("design:returntype", void 0)
167
+ ], Drawer.prototype, "setRealWidth", null);
168
+ __decorate([
169
+ bind,
170
+ __metadata("design:type", Function),
171
+ __metadata("design:paramtypes", []),
172
+ __metadata("design:returntype", void 0)
173
+ ], Drawer.prototype, "onMouseDown", null);
174
+ __decorate([
175
+ bind,
176
+ __metadata("design:type", Function),
177
+ __metadata("design:paramtypes", []),
178
+ __metadata("design:returntype", void 0)
179
+ ], Drawer.prototype, "onMouseUp", null);
180
+ __decorate([
181
+ bind,
182
+ __metadata("design:type", Function),
183
+ __metadata("design:paramtypes", [Object]),
184
+ __metadata("design:returntype", void 0)
185
+ ], Drawer.prototype, "onMouseMove", null);
186
+ Drawer = __decorate([
187
+ observer
188
+ ], Drawer);
189
+ return Drawer;
190
+ }(React.Component));
191
+ export { Drawer };
32
192
  export default popContainerWrapper(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
+ }
File without changes
@@ -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;