@douyinfe/semi-ui 2.50.0-alpha.0 → 2.50.0-beta.0
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/dist/css/semi.css +76 -160
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +582 -418
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.js +1 -5
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +2 -2
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/image/interface.d.ts +3 -3
- package/lib/cjs/image/previewFooter.js +5 -8
- package/lib/cjs/image/previewHeader.d.ts +2 -2
- package/lib/cjs/image/previewHeader.js +9 -8
- package/lib/cjs/image/previewImage.d.ts +1 -12
- package/lib/cjs/image/previewImage.js +23 -83
- package/lib/cjs/image/previewInner.d.ts +11 -2
- package/lib/cjs/image/previewInner.js +60 -42
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +14 -0
- package/lib/cjs/modal/confirm.d.ts +17 -17
- package/lib/cjs/notification/index.d.ts +8 -8
- package/lib/cjs/notification/index.js +6 -5
- package/lib/cjs/notification/notice.d.ts +1 -1
- package/lib/cjs/notification/notice.js +1 -1
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +2 -2
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +3 -3
- package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +2 -2
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/tree/indent.d.ts +9 -0
- package/lib/cjs/tree/indent.js +37 -0
- package/lib/cjs/tree/index.d.ts +2 -0
- package/lib/cjs/tree/index.js +8 -3
- package/lib/cjs/tree/interface.d.ts +2 -0
- package/lib/cjs/tree/treeNode.d.ts +3 -0
- package/lib/cjs/tree/treeNode.js +34 -6
- package/lib/cjs/treeSelect/index.d.ts +4 -3
- package/lib/cjs/treeSelect/index.js +124 -31
- package/lib/cjs/typography/base.d.ts +1 -1
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/paragraph.d.ts +1 -1
- package/lib/cjs/typography/text.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.js +1 -5
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +2 -2
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/image/interface.d.ts +3 -3
- package/lib/es/image/previewFooter.js +5 -8
- package/lib/es/image/previewHeader.d.ts +2 -2
- package/lib/es/image/previewHeader.js +4 -3
- package/lib/es/image/previewImage.d.ts +1 -12
- package/lib/es/image/previewImage.js +23 -83
- package/lib/es/image/previewInner.d.ts +11 -2
- package/lib/es/image/previewInner.js +60 -42
- package/lib/es/index.d.ts +2 -0
- package/lib/es/index.js +2 -0
- package/lib/es/modal/confirm.d.ts +17 -17
- package/lib/es/notification/index.d.ts +8 -8
- package/lib/es/notification/index.js +6 -5
- package/lib/es/notification/notice.d.ts +1 -1
- package/lib/es/notification/notice.js +1 -1
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/select/index.d.ts +2 -2
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +3 -3
- package/lib/es/timePicker/TimeShape.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +2 -2
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/tree/indent.d.ts +9 -0
- package/lib/es/tree/indent.js +27 -0
- package/lib/es/tree/index.d.ts +2 -0
- package/lib/es/tree/index.js +8 -3
- package/lib/es/tree/interface.d.ts +2 -0
- package/lib/es/tree/treeNode.d.ts +3 -0
- package/lib/es/tree/treeNode.js +34 -6
- package/lib/es/treeSelect/index.d.ts +4 -3
- package/lib/es/treeSelect/index.js +125 -32
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
|
@@ -21,14 +21,6 @@ var _previewContext = require("./previewContext");
|
|
|
21
21
|
var _utils = require("../_utils");
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
const prefixCls = _constants.cssClasses.PREFIX;
|
|
24
|
-
let startMouseDown = {
|
|
25
|
-
x: 0,
|
|
26
|
-
y: 0
|
|
27
|
-
};
|
|
28
|
-
let mouseActiveTime = null;
|
|
29
|
-
let stopTiming = false;
|
|
30
|
-
let timer = null;
|
|
31
|
-
// let bodyOverflowValue = document.body.style.overflow;
|
|
32
24
|
class PreviewInner extends _baseComponent.default {
|
|
33
25
|
get adapter() {
|
|
34
26
|
return Object.assign(Object.assign({}, super.adapter), {
|
|
@@ -112,30 +104,22 @@ class PreviewInner extends _baseComponent.default {
|
|
|
112
104
|
unregisterKeyDownListener: () => {
|
|
113
105
|
window && window.removeEventListener("keydown", this.handleKeyDown);
|
|
114
106
|
},
|
|
115
|
-
getMouseActiveTime: () => {
|
|
116
|
-
return mouseActiveTime;
|
|
117
|
-
},
|
|
118
|
-
getStopTiming: () => {
|
|
119
|
-
return stopTiming;
|
|
120
|
-
},
|
|
121
|
-
setStopTiming: value => {
|
|
122
|
-
stopTiming = value;
|
|
123
|
-
},
|
|
124
|
-
getStartMouseDown: () => {
|
|
125
|
-
return startMouseDown;
|
|
126
|
-
},
|
|
127
|
-
setStartMouseDown: (x, y) => {
|
|
128
|
-
startMouseDown = {
|
|
129
|
-
x,
|
|
130
|
-
y
|
|
131
|
-
};
|
|
132
|
-
},
|
|
133
|
-
setMouseActiveTime: time => {
|
|
134
|
-
mouseActiveTime = time;
|
|
135
|
-
},
|
|
136
107
|
getSetDownloadFunc: () => {
|
|
137
108
|
var _a, _b;
|
|
138
109
|
return (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.setDownloadName) !== null && _b !== void 0 ? _b : this.props.setDownloadName;
|
|
110
|
+
},
|
|
111
|
+
isValidTarget: e => {
|
|
112
|
+
const headerDom = this.headerRef && this.headerRef.current;
|
|
113
|
+
const footerDom = this.footerRef && this.footerRef.current;
|
|
114
|
+
const leftIconDom = this.leftIconRef && this.leftIconRef.current;
|
|
115
|
+
const rightIconDom = this.rightIconRef && this.rightIconRef.current;
|
|
116
|
+
const target = e.target;
|
|
117
|
+
if (headerDom && headerDom.contains(target) || footerDom && footerDom.contains(target) || leftIconDom && leftIconDom.contains(target) || rightIconDom && rightIconDom.contains(target)) {
|
|
118
|
+
// Move in the operation area, return false
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
// Move in the preview area except the operation area, return true
|
|
122
|
+
return true;
|
|
139
123
|
}
|
|
140
124
|
});
|
|
141
125
|
}
|
|
@@ -168,9 +152,6 @@ class PreviewInner extends _baseComponent.default {
|
|
|
168
152
|
this.handleMouseMove = e => {
|
|
169
153
|
this.foundation.handleMouseMove(e);
|
|
170
154
|
};
|
|
171
|
-
this.handleMouseEvent = (e, event) => {
|
|
172
|
-
this.foundation.handleMouseMoveEvent(e, event);
|
|
173
|
-
};
|
|
174
155
|
this.handleKeyDown = e => {
|
|
175
156
|
this.foundation.handleKeyDown(e);
|
|
176
157
|
};
|
|
@@ -183,6 +164,31 @@ class PreviewInner extends _baseComponent.default {
|
|
|
183
164
|
this.handleMouseDown = e => {
|
|
184
165
|
this.foundation.handleMouseDown(e);
|
|
185
166
|
};
|
|
167
|
+
this.handleWheel = e => {
|
|
168
|
+
this.foundation.handleWheel(e);
|
|
169
|
+
};
|
|
170
|
+
// 为什么通过 addEventListener 注册 wheel 事件而不是使用 onWheel 事件?
|
|
171
|
+
// 因为 Passive Event Listeners(https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners)
|
|
172
|
+
// Passive Event Listeners 是一种优化技术,用于提高滚动性能。在默认情况下,浏览器会假设事件的监听器不会调用
|
|
173
|
+
// preventDefault() 方法来阻止事件的默认行为,从而允许进行一些优化操作,例如滚动平滑。
|
|
174
|
+
// 对于 Image 而言,如果使用触控板,双指朝不同方向分开放大图片,则需要 preventDefault 防止页面整体放大。
|
|
175
|
+
// Why register wheel event through addEventListener instead of using onWheel event?
|
|
176
|
+
// Because of Passive Event Listeners(an optimization technique used to improve scrolling performance. By default,
|
|
177
|
+
// the browser will assume that event listeners will not call preventDefault() method to prevent the default behavior of the event,
|
|
178
|
+
// allowing some optimization operations such as scroll smoothing.)
|
|
179
|
+
// For Image, if we use the trackpad and spread your fingers in different directions to enlarge the image, we need to preventDefault
|
|
180
|
+
// to prevent the page from being enlarged as a whole.
|
|
181
|
+
this.registryImageWrapRef = ref => {
|
|
182
|
+
if (this.imageWrapRef) {
|
|
183
|
+
this.imageWrapRef.removeEventListener("wheel", this.handleWheel);
|
|
184
|
+
}
|
|
185
|
+
if (ref) {
|
|
186
|
+
ref.addEventListener("wheel", this.handleWheel, {
|
|
187
|
+
passive: false
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
this.imageWrapRef = ref;
|
|
191
|
+
};
|
|
186
192
|
this.state = {
|
|
187
193
|
imgSrc: [],
|
|
188
194
|
imgLoadStatus: new Map(),
|
|
@@ -199,6 +205,11 @@ class PreviewInner extends _baseComponent.default {
|
|
|
199
205
|
this.bodyOverflow = '';
|
|
200
206
|
this.originBodyWidth = '100%';
|
|
201
207
|
this.scrollBarWidth = 0;
|
|
208
|
+
this.imageWrapRef = null;
|
|
209
|
+
this.headerRef = /*#__PURE__*/_react.default.createRef();
|
|
210
|
+
this.footerRef = /*#__PURE__*/_react.default.createRef();
|
|
211
|
+
this.leftIconRef = /*#__PURE__*/_react.default.createRef();
|
|
212
|
+
this.rightIconRef = /*#__PURE__*/_react.default.createRef();
|
|
202
213
|
}
|
|
203
214
|
static getDerivedStateFromProps(props, state) {
|
|
204
215
|
const willUpdateStates = {};
|
|
@@ -214,6 +225,9 @@ class PreviewInner extends _baseComponent.default {
|
|
|
214
225
|
willUpdateStates.visible = props.visible;
|
|
215
226
|
if (props.visible) {
|
|
216
227
|
willUpdateStates.preloadAfterVisibleChange = true;
|
|
228
|
+
willUpdateStates.viewerVisible = true;
|
|
229
|
+
willUpdateStates.rotation = 0;
|
|
230
|
+
willUpdateStates.ratio = 'adaptation';
|
|
217
231
|
}
|
|
218
232
|
}
|
|
219
233
|
if ("currentIndex" in props && props.currentIndex !== state.currentIndex) {
|
|
@@ -232,10 +246,8 @@ class PreviewInner extends _baseComponent.default {
|
|
|
232
246
|
}
|
|
233
247
|
}
|
|
234
248
|
componentDidUpdate(prevProps, prevState) {
|
|
235
|
-
if (
|
|
236
|
-
|
|
237
|
-
timer && clearInterval(timer);
|
|
238
|
-
timer = setInterval(this.viewVisibleChange, 1000);
|
|
249
|
+
if (prevProps.src !== this.props.src) {
|
|
250
|
+
this.foundation.updateTimer();
|
|
239
251
|
}
|
|
240
252
|
// hide => show
|
|
241
253
|
if (!prevProps.visible && this.props.visible) {
|
|
@@ -247,7 +259,7 @@ class PreviewInner extends _baseComponent.default {
|
|
|
247
259
|
}
|
|
248
260
|
}
|
|
249
261
|
componentWillUnmount() {
|
|
250
|
-
|
|
262
|
+
this.foundation.clearTimer();
|
|
251
263
|
}
|
|
252
264
|
isInGroup() {
|
|
253
265
|
return Boolean(this.context && this.context.isGroup);
|
|
@@ -312,10 +324,10 @@ class PreviewInner extends _baseComponent.default {
|
|
|
312
324
|
style: style,
|
|
313
325
|
onMouseDown: this.handleMouseDown,
|
|
314
326
|
onMouseUp: this.handleMouseUp,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
onMouseOut: e => this.handleMouseEvent(e.nativeEvent, "out")
|
|
327
|
+
ref: this.registryImageWrapRef,
|
|
328
|
+
onMouseMove: this.handleMouseMove
|
|
318
329
|
}, /*#__PURE__*/_react.default.createElement(_previewHeader.default, {
|
|
330
|
+
ref: this.headerRef,
|
|
319
331
|
className: (0, _classnames.default)(hideViewerCls),
|
|
320
332
|
onClose: this.handlePreviewClose,
|
|
321
333
|
renderHeader: renderHeader
|
|
@@ -326,7 +338,6 @@ class PreviewInner extends _baseComponent.default {
|
|
|
326
338
|
setRatio: this.handleAdjustRatio,
|
|
327
339
|
zoom: zoom,
|
|
328
340
|
ratio: ratio,
|
|
329
|
-
zoomStep: zoomStep,
|
|
330
341
|
rotation: rotation,
|
|
331
342
|
crossOrigin: crossOrigin,
|
|
332
343
|
onError: this.onImageError,
|
|
@@ -335,6 +346,7 @@ class PreviewInner extends _baseComponent.default {
|
|
|
335
346
|
/*#__PURE__*/
|
|
336
347
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
337
348
|
_react.default.createElement("div", {
|
|
349
|
+
ref: this.leftIconRef,
|
|
338
350
|
className: (0, _classnames.default)(`${previewPrefixCls}-icon`, `${previewPrefixCls}-prev`, hideViewerCls),
|
|
339
351
|
onClick: () => this.handleSwitchImage("prev")
|
|
340
352
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconArrowLeft, {
|
|
@@ -343,11 +355,13 @@ class PreviewInner extends _baseComponent.default {
|
|
|
343
355
|
/*#__PURE__*/
|
|
344
356
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
345
357
|
_react.default.createElement("div", {
|
|
358
|
+
ref: this.rightIconRef,
|
|
346
359
|
className: (0, _classnames.default)(`${previewPrefixCls}-icon`, `${previewPrefixCls}-next`, hideViewerCls),
|
|
347
360
|
onClick: () => this.handleSwitchImage("next")
|
|
348
361
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconArrowRight, {
|
|
349
362
|
size: "large"
|
|
350
363
|
})), /*#__PURE__*/_react.default.createElement(_previewFooter.default, {
|
|
364
|
+
forwardRef: this.footerRef,
|
|
351
365
|
className: hideViewerCls,
|
|
352
366
|
totalNum: total,
|
|
353
367
|
curPage: currentIndex + 1,
|
|
@@ -406,6 +420,8 @@ PreviewInner.propTypes = {
|
|
|
406
420
|
disableDownload: _propTypes.default.bool,
|
|
407
421
|
viewerVisibleDelay: _propTypes.default.number,
|
|
408
422
|
zIndex: _propTypes.default.number,
|
|
423
|
+
maxZoom: _propTypes.default.number,
|
|
424
|
+
minZoom: _propTypes.default.number,
|
|
409
425
|
renderHeader: _propTypes.default.func,
|
|
410
426
|
renderPreviewMenu: _propTypes.default.func,
|
|
411
427
|
getPopupContainer: _propTypes.default.func,
|
|
@@ -430,5 +446,7 @@ PreviewInner.defaultProps = {
|
|
|
430
446
|
preLoadGap: 2,
|
|
431
447
|
zIndex: 1000,
|
|
432
448
|
maskClosable: true,
|
|
433
|
-
viewerVisibleDelay: 10000
|
|
449
|
+
viewerVisibleDelay: 10000,
|
|
450
|
+
maxZoom: 5,
|
|
451
|
+
minZoom: 0.1
|
|
434
452
|
};
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import './_base/base.css';
|
|
2
|
+
export { default as BaseFoundation } from '@douyinfe/semi-foundation/lib/cjs/base/foundation';
|
|
3
|
+
export { default as BaseComponent } from "./_base/baseComponent";
|
|
2
4
|
export { default as Anchor } from './anchor';
|
|
3
5
|
export { default as AutoComplete } from './autoComplete';
|
|
4
6
|
export { default as Avatar } from './avatar';
|
package/lib/cjs/index.js
CHANGED
|
@@ -51,6 +51,18 @@ Object.defineProperty(exports, "Banner", {
|
|
|
51
51
|
return _banner.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "BaseComponent", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _baseComponent.default;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "BaseFoundation", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _foundation.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
54
66
|
Object.defineProperty(exports, "Breadcrumb", {
|
|
55
67
|
enumerable: true,
|
|
56
68
|
get: function () {
|
|
@@ -562,6 +574,8 @@ Object.defineProperty(exports, "withFormState", {
|
|
|
562
574
|
}
|
|
563
575
|
});
|
|
564
576
|
require("./_base/base.css");
|
|
577
|
+
var _foundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/base/foundation"));
|
|
578
|
+
var _baseComponent = _interopRequireDefault(require("./_base/baseComponent"));
|
|
565
579
|
var _anchor = _interopRequireDefault(require("./anchor"));
|
|
566
580
|
var _autoComplete = _interopRequireDefault(require("./autoComplete"));
|
|
567
581
|
var _avatar = _interopRequireDefault(require("./avatar"));
|
|
@@ -146,36 +146,36 @@ export declare function withError(props: ModalReactProps): {
|
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
147
|
className?: string;
|
|
148
148
|
motion?: boolean;
|
|
149
|
+
getPopupContainer?: () => HTMLElement;
|
|
149
150
|
footer?: React.ReactNode;
|
|
150
151
|
header?: React.ReactNode;
|
|
152
|
+
direction?: any;
|
|
151
153
|
mask?: boolean;
|
|
152
154
|
visible?: boolean;
|
|
153
155
|
zIndex?: number;
|
|
154
|
-
getPopupContainer?: () => HTMLElement;
|
|
155
|
-
direction?: any;
|
|
156
156
|
width?: string | number;
|
|
157
157
|
height?: string | number;
|
|
158
158
|
content?: React.ReactNode;
|
|
159
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
160
|
+
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
159
161
|
closeOnEsc?: boolean;
|
|
160
162
|
preventScroll?: boolean;
|
|
161
|
-
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
162
163
|
afterClose?: () => void;
|
|
163
164
|
keepDOM?: boolean;
|
|
164
165
|
cancelText?: string;
|
|
165
166
|
okText?: string;
|
|
166
|
-
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
167
167
|
closeIcon?: React.ReactNode;
|
|
168
|
-
closable?: boolean;
|
|
169
168
|
bodyStyle?: React.CSSProperties;
|
|
169
|
+
closable?: boolean;
|
|
170
170
|
maskClosable?: boolean;
|
|
171
171
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
172
|
-
okType?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").OKType;
|
|
173
|
-
cancelLoading?: boolean;
|
|
174
|
-
confirmLoading?: boolean;
|
|
175
172
|
centered?: boolean;
|
|
173
|
+
confirmLoading?: boolean;
|
|
174
|
+
cancelLoading?: boolean;
|
|
176
175
|
hasCancel?: boolean;
|
|
177
176
|
maskStyle?: React.CSSProperties;
|
|
178
177
|
maskFixed?: boolean;
|
|
178
|
+
okType?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").OKType;
|
|
179
179
|
onOk?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
180
180
|
lazyRender?: boolean;
|
|
181
181
|
fullScreen?: boolean;
|
|
@@ -206,6 +206,8 @@ export declare function withError(props: ModalReactProps): {
|
|
|
206
206
|
value?: string | number | readonly string[];
|
|
207
207
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
208
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
209
211
|
prefix?: string;
|
|
210
212
|
dangerouslySetInnerHTML?: {
|
|
211
213
|
__html: string | TrustedHTML;
|
|
@@ -366,8 +368,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
366
368
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
367
369
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
368
370
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
369
|
-
form?: string;
|
|
370
|
-
slot?: string;
|
|
371
371
|
hidden?: boolean;
|
|
372
372
|
color?: string;
|
|
373
373
|
defaultChecked?: boolean;
|
|
@@ -376,6 +376,12 @@ export declare function withError(props: ModalReactProps): {
|
|
|
376
376
|
suppressHydrationWarning?: boolean;
|
|
377
377
|
accessKey?: string;
|
|
378
378
|
autoFocus?: boolean;
|
|
379
|
+
content?: string;
|
|
380
|
+
formAction?: string;
|
|
381
|
+
formEncType?: string;
|
|
382
|
+
formMethod?: string;
|
|
383
|
+
formNoValidate?: boolean;
|
|
384
|
+
formTarget?: string;
|
|
379
385
|
contextMenu?: string;
|
|
380
386
|
dir?: string;
|
|
381
387
|
draggable?: boolean | "true" | "false";
|
|
@@ -386,7 +392,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
386
392
|
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
387
393
|
nonce?: string;
|
|
388
394
|
tabIndex?: number;
|
|
389
|
-
content?: string;
|
|
390
395
|
'aria-expanded'?: boolean | "true" | "false";
|
|
391
396
|
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false";
|
|
392
397
|
'aria-controls'?: string;
|
|
@@ -423,7 +428,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
423
428
|
'aria-colcount'?: number;
|
|
424
429
|
'aria-colindex'?: number;
|
|
425
430
|
'aria-colspan'?: number;
|
|
426
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "
|
|
431
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "page" | "location" | "step";
|
|
427
432
|
'aria-details'?: string;
|
|
428
433
|
'aria-disabled'?: boolean | "true" | "false";
|
|
429
434
|
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
@@ -458,11 +463,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
458
463
|
'aria-valuemin'?: number;
|
|
459
464
|
'aria-valuenow'?: number;
|
|
460
465
|
'aria-valuetext'?: string;
|
|
461
|
-
formAction?: string;
|
|
462
|
-
formEncType?: string;
|
|
463
|
-
formMethod?: string;
|
|
464
|
-
formNoValidate?: boolean;
|
|
465
|
-
formTarget?: string;
|
|
466
466
|
};
|
|
467
467
|
};
|
|
468
468
|
export declare function withConfirm(props: ModalReactProps): {
|
|
@@ -33,20 +33,20 @@ declare class NotificationList extends BaseComponent<NotificationListProps, Noti
|
|
|
33
33
|
constructor(props: NotificationListProps);
|
|
34
34
|
context: ContextValue;
|
|
35
35
|
get adapter(): NotificationListAdapter;
|
|
36
|
-
static addNotice(notice: NoticeProps): string
|
|
36
|
+
static addNotice(notice: NoticeProps): string;
|
|
37
37
|
static removeNotice(id: string): string;
|
|
38
|
-
static info(opts: NoticeProps): string
|
|
39
|
-
static success(opts: NoticeProps): string
|
|
40
|
-
static error(opts: NoticeProps): string
|
|
41
|
-
static warning(opts: NoticeProps): string
|
|
42
|
-
static open(opts: NoticeProps): string
|
|
38
|
+
static info(opts: NoticeProps): string;
|
|
39
|
+
static success(opts: NoticeProps): string;
|
|
40
|
+
static error(opts: NoticeProps): string;
|
|
41
|
+
static warning(opts: NoticeProps): string;
|
|
42
|
+
static open(opts: NoticeProps): string;
|
|
43
43
|
static close(id: string): string;
|
|
44
44
|
static destroyAll(): void;
|
|
45
45
|
static config(opts: ConfigProps): void;
|
|
46
46
|
add: (noticeOpts: NoticeProps) => any;
|
|
47
47
|
has: (id: string) => any;
|
|
48
|
-
remove: (id: string
|
|
49
|
-
update: (id: string
|
|
48
|
+
remove: (id: string) => void;
|
|
49
|
+
update: (id: string, opts: NoticeProps) => any;
|
|
50
50
|
destroyAll: () => any;
|
|
51
51
|
renderNoticeInPosition: (notices: NoticeInstance[], position: NoticePosition, removedItems?: NoticeInstance[], updatedItems?: NoticeInstance[]) => JSX.Element;
|
|
52
52
|
setPosInStyle(noticeInstance: NoticeInstance): {};
|
|
@@ -117,6 +117,7 @@ class NotificationList extends _baseComponent.default {
|
|
|
117
117
|
}
|
|
118
118
|
static addNotice(notice) {
|
|
119
119
|
var _a;
|
|
120
|
+
notice = Object.assign(Object.assign({}, defaultConfig), notice);
|
|
120
121
|
const id = (_a = notice.id) !== null && _a !== void 0 ? _a : (0, _uuid.default)('notification');
|
|
121
122
|
if (!ref) {
|
|
122
123
|
const {
|
|
@@ -160,27 +161,27 @@ class NotificationList extends _baseComponent.default {
|
|
|
160
161
|
return id;
|
|
161
162
|
}
|
|
162
163
|
static info(opts) {
|
|
163
|
-
return this.addNotice(Object.assign(Object.assign(
|
|
164
|
+
return this.addNotice(Object.assign(Object.assign({}, opts), {
|
|
164
165
|
type: 'info'
|
|
165
166
|
}));
|
|
166
167
|
}
|
|
167
168
|
static success(opts) {
|
|
168
|
-
return this.addNotice(Object.assign(Object.assign(
|
|
169
|
+
return this.addNotice(Object.assign(Object.assign({}, opts), {
|
|
169
170
|
type: 'success'
|
|
170
171
|
}));
|
|
171
172
|
}
|
|
172
173
|
static error(opts) {
|
|
173
|
-
return this.addNotice(Object.assign(Object.assign(
|
|
174
|
+
return this.addNotice(Object.assign(Object.assign({}, opts), {
|
|
174
175
|
type: 'error'
|
|
175
176
|
}));
|
|
176
177
|
}
|
|
177
178
|
static warning(opts) {
|
|
178
|
-
return this.addNotice(Object.assign(Object.assign(
|
|
179
|
+
return this.addNotice(Object.assign(Object.assign({}, opts), {
|
|
179
180
|
type: 'warning'
|
|
180
181
|
}));
|
|
181
182
|
}
|
|
182
183
|
static open(opts) {
|
|
183
|
-
return this.addNotice(Object.assign(Object.assign(
|
|
184
|
+
return this.addNotice(Object.assign(Object.assign({}, opts), {
|
|
184
185
|
type: 'default'
|
|
185
186
|
}));
|
|
186
187
|
}
|
|
@@ -16,7 +16,7 @@ declare class Notice extends BaseComponent<NoticeReactProps, NoticeState> {
|
|
|
16
16
|
static contextType: React.Context<ContextValue>;
|
|
17
17
|
static propTypes: {
|
|
18
18
|
duration: PropTypes.Requireable<number>;
|
|
19
|
-
id: PropTypes.Requireable<
|
|
19
|
+
id: PropTypes.Requireable<string>;
|
|
20
20
|
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
21
21
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
22
|
type: PropTypes.Requireable<string>;
|
|
@@ -168,7 +168,7 @@ class Notice extends _baseComponent.default {
|
|
|
168
168
|
Notice.contextType = _context.default;
|
|
169
169
|
Notice.propTypes = {
|
|
170
170
|
duration: _propTypes.default.number,
|
|
171
|
-
id: _propTypes.default.
|
|
171
|
+
id: _propTypes.default.string,
|
|
172
172
|
title: _propTypes.default.node,
|
|
173
173
|
content: _propTypes.default.node,
|
|
174
174
|
type: _propTypes.default.oneOf(types),
|
|
@@ -58,7 +58,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
58
58
|
visible: PropTypes.Requireable<boolean>;
|
|
59
59
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
60
60
|
motion: PropTypes.Requireable<boolean>;
|
|
61
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
61
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
62
62
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
63
63
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
64
64
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -139,7 +139,7 @@ export type SelectProps = {
|
|
|
139
139
|
onDeselect?: (value: SelectProps['value'], option: Record<string, any>) => void;
|
|
140
140
|
onSelect?: (value: SelectProps['value'], option: Record<string, any>) => void;
|
|
141
141
|
allowCreate?: boolean;
|
|
142
|
-
triggerRender?: (props
|
|
142
|
+
triggerRender?: (props: TriggerRenderProps) => React.ReactNode;
|
|
143
143
|
onClear?: () => void;
|
|
144
144
|
virtualize?: virtualListProps;
|
|
145
145
|
onFocus?: (e: React.FocusEvent) => void;
|
|
@@ -200,7 +200,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
200
200
|
expandRestTagsOnClick: PropTypes.Requireable<boolean>;
|
|
201
201
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
202
202
|
zIndex: PropTypes.Requireable<number>;
|
|
203
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
203
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
204
204
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
205
205
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
206
206
|
dropdownClassName: PropTypes.Requireable<string>;
|
package/lib/cjs/table/Table.d.ts
CHANGED
|
@@ -308,7 +308,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
308
308
|
showSizeChanger?: boolean;
|
|
309
309
|
showQuickJumper?: boolean;
|
|
310
310
|
popoverZIndex?: number;
|
|
311
|
-
popoverPosition?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
311
|
+
popoverPosition?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
312
312
|
hideOnSinglePage?: boolean;
|
|
313
313
|
hoverShowPageSelect?: boolean;
|
|
314
314
|
disabled?: boolean;
|
|
@@ -63,7 +63,7 @@ export type TimePickerProps = {
|
|
|
63
63
|
secondStep?: number;
|
|
64
64
|
showClear?: boolean;
|
|
65
65
|
size?: InputSize;
|
|
66
|
-
stopPropagation
|
|
66
|
+
stopPropagation?: boolean;
|
|
67
67
|
style?: React.CSSProperties;
|
|
68
68
|
timeZone?: string | number;
|
|
69
69
|
triggerRender?: (props?: any) => React.ReactNode;
|
|
@@ -105,11 +105,11 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
105
105
|
borderless: PropTypes.Requireable<boolean>;
|
|
106
106
|
clearText: PropTypes.Requireable<string>;
|
|
107
107
|
clearIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
108
|
-
value: PropTypes.Requireable<NonNullable<string | number | string[] |
|
|
108
|
+
value: PropTypes.Requireable<NonNullable<string | number | string[] | number[] | Date | Date[]>>;
|
|
109
109
|
inputReadOnly: PropTypes.Requireable<boolean>;
|
|
110
110
|
disabled: PropTypes.Requireable<boolean>;
|
|
111
111
|
showClear: PropTypes.Requireable<boolean>;
|
|
112
|
-
defaultValue: PropTypes.Requireable<NonNullable<string | number | string[] |
|
|
112
|
+
defaultValue: PropTypes.Requireable<NonNullable<string | number | string[] | number[] | Date | Date[]>>;
|
|
113
113
|
open: PropTypes.Requireable<boolean>;
|
|
114
114
|
defaultOpen: PropTypes.Requireable<boolean>;
|
|
115
115
|
onOpenChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -6,5 +6,5 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
* - \[12:00:12, 12:21:12]
|
|
7
7
|
* - \[[12:00:12, 12:21:12], [12:11:12, 12:32:12]]
|
|
8
8
|
*/
|
|
9
|
-
declare const TimeShape: PropTypes.Requireable<NonNullable<string | number | string[] |
|
|
9
|
+
declare const TimeShape: PropTypes.Requireable<NonNullable<string | number | string[] | number[] | Date | Date[]>>;
|
|
10
10
|
export { TimeShape };
|
|
@@ -21,11 +21,11 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
|
|
|
21
21
|
borderless: import("prop-types").Requireable<boolean>;
|
|
22
22
|
clearText: import("prop-types").Requireable<string>;
|
|
23
23
|
clearIcon: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
24
|
-
value: import("prop-types").Requireable<NonNullable<string | number | string[] |
|
|
24
|
+
value: import("prop-types").Requireable<NonNullable<string | number | string[] | number[] | Date | Date[]>>;
|
|
25
25
|
inputReadOnly: import("prop-types").Requireable<boolean>;
|
|
26
26
|
disabled: import("prop-types").Requireable<boolean>;
|
|
27
27
|
showClear: import("prop-types").Requireable<boolean>;
|
|
28
|
-
defaultValue: import("prop-types").Requireable<NonNullable<string | number | string[] |
|
|
28
|
+
defaultValue: import("prop-types").Requireable<NonNullable<string | number | string[] | number[] | Date | Date[]>>;
|
|
29
29
|
open: import("prop-types").Requireable<boolean>;
|
|
30
30
|
defaultOpen: import("prop-types").Requireable<boolean>;
|
|
31
31
|
onOpenChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -91,7 +91,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
91
91
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
motion: PropTypes.Requireable<boolean>;
|
|
93
93
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
94
|
-
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "
|
|
94
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
95
95
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
96
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
97
97
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IndentProps {
|
|
3
|
+
prefixcls: string;
|
|
4
|
+
level: number;
|
|
5
|
+
isEnd: boolean[];
|
|
6
|
+
showLine: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ prefixcls, level, isEnd, showLine }: IndentProps) => JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
const Indent = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
prefixcls,
|
|
15
|
+
level,
|
|
16
|
+
isEnd,
|
|
17
|
+
showLine
|
|
18
|
+
} = _ref;
|
|
19
|
+
const baseClassName = `${prefixcls}-indent-unit`;
|
|
20
|
+
const list = [];
|
|
21
|
+
for (let i = 0; i < level; i += 1) {
|
|
22
|
+
list.push( /*#__PURE__*/React.createElement("span", {
|
|
23
|
+
key: i,
|
|
24
|
+
className: (0, _classnames.default)(baseClassName, {
|
|
25
|
+
[`${baseClassName}-end`]: isEnd[i]
|
|
26
|
+
})
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
className: (0, _classnames.default)(`${prefixcls}-indent`, {
|
|
32
|
+
[`${prefixcls}-indent-show-line`]: showLine
|
|
33
|
+
})
|
|
34
|
+
}, list);
|
|
35
|
+
};
|
|
36
|
+
var _default = /*#__PURE__*/React.memo(Indent);
|
|
37
|
+
exports.default = _default;
|
package/lib/cjs/tree/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ declare class Tree extends BaseComponent<TreeProps, TreeState> {
|
|
|
39
39
|
searchStyle: PropTypes.Requireable<object>;
|
|
40
40
|
selectedKey: PropTypes.Requireable<string>;
|
|
41
41
|
showFilteredOnly: PropTypes.Requireable<boolean>;
|
|
42
|
+
showLine: PropTypes.Requireable<boolean>;
|
|
42
43
|
style: PropTypes.Requireable<object>;
|
|
43
44
|
treeData: PropTypes.Requireable<PropTypes.InferProps<{
|
|
44
45
|
key: PropTypes.Requireable<string>;
|
|
@@ -90,6 +91,7 @@ declare class Tree extends BaseComponent<TreeProps, TreeState> {
|
|
|
90
91
|
motion: boolean;
|
|
91
92
|
leafOnly: boolean;
|
|
92
93
|
showFilteredOnly: boolean;
|
|
94
|
+
showLine: boolean;
|
|
93
95
|
expandAction: boolean;
|
|
94
96
|
disableStrictly: boolean;
|
|
95
97
|
draggable: boolean;
|
package/lib/cjs/tree/index.js
CHANGED
|
@@ -172,12 +172,14 @@ class Tree extends _baseComponent.default {
|
|
|
172
172
|
return null;
|
|
173
173
|
}
|
|
174
174
|
const {
|
|
175
|
-
keyMaps
|
|
175
|
+
keyMaps,
|
|
176
|
+
showLine
|
|
176
177
|
} = this.props;
|
|
177
|
-
const props = (0, _pick2.default)(treeNode, ['key', 'label', 'disabled', 'isLeaf', 'icon']);
|
|
178
|
+
const props = (0, _pick2.default)(treeNode, ['key', 'label', 'disabled', 'isLeaf', 'icon', 'isEnd']);
|
|
178
179
|
const children = data[(0, _get2.default)(keyMaps, 'children', 'children')];
|
|
179
180
|
!(0, _isUndefined2.default)(children) && (props.children = children);
|
|
180
181
|
return /*#__PURE__*/_react.default.createElement(_treeNode.default, Object.assign({}, treeNodeProps, data, props, {
|
|
182
|
+
showLine: showLine,
|
|
181
183
|
data: data,
|
|
182
184
|
style: (0, _isEmpty2.default)(style) ? {} : style
|
|
183
185
|
}));
|
|
@@ -611,6 +613,7 @@ class Tree extends _baseComponent.default {
|
|
|
611
613
|
directory,
|
|
612
614
|
multiple,
|
|
613
615
|
showFilteredOnly,
|
|
616
|
+
showLine,
|
|
614
617
|
motion,
|
|
615
618
|
expandAction,
|
|
616
619
|
loadData,
|
|
@@ -621,7 +624,7 @@ class Tree extends _baseComponent.default {
|
|
|
621
624
|
virtualize,
|
|
622
625
|
checkRelation
|
|
623
626
|
} = _a,
|
|
624
|
-
rest = __rest(_a, ["blockNode", "className", "style", "filterTreeNode", "disabled", "icon", "directory", "multiple", "showFilteredOnly", "motion", "expandAction", "loadData", "renderLabel", "draggable", "renderFullLabel", "labelEllipsis", "virtualize", "checkRelation"]);
|
|
627
|
+
rest = __rest(_a, ["blockNode", "className", "style", "filterTreeNode", "disabled", "icon", "directory", "multiple", "showFilteredOnly", "showLine", "motion", "expandAction", "loadData", "renderLabel", "draggable", "renderFullLabel", "labelEllipsis", "virtualize", "checkRelation"]);
|
|
625
628
|
const wrapperCls = (0, _classnames.default)(`${prefixcls}-wrapper`, className);
|
|
626
629
|
const listCls = (0, _classnames.default)(`${prefixcls}-option-list`, {
|
|
627
630
|
[`${prefixcls}-option-list-block`]: blockNode
|
|
@@ -710,6 +713,7 @@ Tree.propTypes = {
|
|
|
710
713
|
searchStyle: _propTypes.default.object,
|
|
711
714
|
selectedKey: _propTypes.default.string,
|
|
712
715
|
showFilteredOnly: _propTypes.default.bool,
|
|
716
|
+
showLine: _propTypes.default.bool,
|
|
713
717
|
style: _propTypes.default.object,
|
|
714
718
|
treeData: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
715
719
|
key: _propTypes.default.string,
|
|
@@ -761,6 +765,7 @@ Tree.defaultProps = {
|
|
|
761
765
|
motion: true,
|
|
762
766
|
leafOnly: false,
|
|
763
767
|
showFilteredOnly: false,
|
|
768
|
+
showLine: false,
|
|
764
769
|
expandAction: false,
|
|
765
770
|
disableStrictly: false,
|
|
766
771
|
draggable: false,
|