@qsxy/element-plus-react 1.0.0-next.5 → 1.0.0-next.7
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/Cascader/Cascader.js +147 -182
- package/dist/Cascader/CascaderContext.d.ts +4 -10
- package/dist/Cascader/CascaderContext.js +2 -6
- package/dist/Cascader/CascaderDropdown.js +1 -1
- package/dist/Cascader/CascaderMenu.d.ts +0 -7
- package/dist/Cascader/CascaderMenu.js +4 -77
- package/dist/Cascader/Utils.d.ts +0 -2
- package/dist/Cascader/Utils.js +0 -44
- package/dist/Cascader/index.d.ts +1 -1
- package/dist/Cascader/typings.d.ts +2 -18
- package/dist/Cascader/useCascader.d.ts +1 -15
- package/dist/Cascader/useCascader.js +14 -41
- package/dist/DatePicker/DatePicker.js +5 -5
- package/dist/Empty/ImgEmpty.js +1 -1
- package/dist/Tree/DirectoryTree.d.ts +6 -13
- package/dist/Tree/DirectoryTree.js +32 -81
- package/dist/Tree/DropIndicator.d.ts +4 -2
- package/dist/Tree/DropIndicator.js +7 -2
- package/dist/Tree/Indent.d.ts +2 -2
- package/dist/Tree/Indent.js +4 -4
- package/dist/Tree/MotionTreeNode.d.ts +4 -5
- package/dist/Tree/MotionTreeNode.js +69 -52
- package/dist/Tree/NodeList.d.ts +15 -11
- package/dist/Tree/NodeList.js +38 -29
- package/dist/Tree/RCTree.d.ts +77 -75
- package/dist/Tree/RCTree.js +199 -188
- package/dist/Tree/Tree.d.ts +3 -3
- package/dist/Tree/Tree.js +27 -27
- package/dist/Tree/TreeNode.d.ts +5 -90
- package/dist/Tree/TreeNode.js +320 -422
- package/dist/Tree/contextTypes.d.ts +36 -30
- package/dist/Tree/contextTypes.js +17 -4
- package/dist/Tree/index.d.ts +2 -2
- package/dist/Tree/typings.d.ts +60 -19
- package/dist/Tree/typings.js +1 -13
- package/dist/Tree/typings.tsx--bak +245 -0
- package/dist/Tree/useUnmount.d.ts +5 -0
- package/dist/{VirtualList/index.js → Tree/useUnmount.js} +25 -10
- package/dist/Tree/util.d.ts +17 -21
- package/dist/Tree/util.js +21 -52
- package/dist/Tree/utils/conductUtil.d.ts +2 -2
- package/dist/Tree/utils/conductUtil.js +14 -3
- package/dist/Tree/utils/dictUtil.d.ts +7 -3
- package/dist/Tree/utils/dictUtil.js +49 -32
- package/dist/Tree/utils/diffUtil.d.ts +4 -3
- package/dist/Tree/utils/keyUtil.d.ts +2 -0
- package/dist/{VirtualList/utils/isFirefox.js → Tree/utils/keyUtil.js} +8 -7
- package/dist/Tree/utils/motion.js +6 -5
- package/dist/Tree/utils/treeUtil.d.ts +16 -18
- package/dist/Tree/utils/treeUtil.js +35 -14
- package/dist/TreeSelect/Utils.d.ts +1 -1
- package/dist/Util/base.d.ts +1 -1
- package/dist/Util/base.js +14 -2
- package/dist/index.css +6 -4
- package/dist/index.d.ts +3 -5
- package/dist/index.js +0 -5
- package/dist/theme-chalk/calendar/month-table.scss +1 -1
- package/dist/theme-chalk/input/input.scss +5 -3
- package/package.json +2 -1
- package/dist/Tree/utils/KeyCode.d.ts +0 -436
- package/dist/Tree/utils/KeyCode.js +0 -550
- package/dist/VirtualList/Filler.d.ts +0 -16
- package/dist/VirtualList/Filler.js +0 -78
- package/dist/VirtualList/Item.d.ts +0 -7
- package/dist/VirtualList/Item.js +0 -37
- package/dist/VirtualList/ScrollBar.d.ts +0 -43
- package/dist/VirtualList/ScrollBar.js +0 -216
- package/dist/VirtualList/VirtualList.d.ts +0 -36
- package/dist/VirtualList/VirtualList.js +0 -280
- package/dist/VirtualList/hooks/useChildren.d.ts +0 -3
- package/dist/VirtualList/hooks/useChildren.js +0 -46
- package/dist/VirtualList/hooks/useDiffItem.d.ts +0 -2
- package/dist/VirtualList/hooks/useDiffItem.js +0 -39
- package/dist/VirtualList/hooks/useFrameWheel.d.ts +0 -6
- package/dist/VirtualList/hooks/useFrameWheel.js +0 -72
- package/dist/VirtualList/hooks/useHeights.d.ts +0 -3
- package/dist/VirtualList/hooks/useHeights.js +0 -83
- package/dist/VirtualList/hooks/useLayoutEffect.d.ts +0 -6
- package/dist/VirtualList/hooks/useLayoutEffect.js +0 -30
- package/dist/VirtualList/hooks/useMobileTouchMove.d.ts +0 -2
- package/dist/VirtualList/hooks/useMobileTouchMove.js +0 -92
- package/dist/VirtualList/hooks/useOriginScroll.d.ts +0 -2
- package/dist/VirtualList/hooks/useOriginScroll.js +0 -56
- package/dist/VirtualList/hooks/useScrollTo.d.ts +0 -5
- package/dist/VirtualList/hooks/useScrollTo.js +0 -111
- package/dist/VirtualList/index.d.ts +0 -2
- package/dist/VirtualList/interface.d.ts +0 -8
- package/dist/VirtualList/interface.js +0 -17
- package/dist/VirtualList/mock.d.ts +0 -6
- package/dist/VirtualList/mock.js +0 -29
- package/dist/VirtualList/utils/CacheMap.d.ts +0 -7
- package/dist/VirtualList/utils/CacheMap.js +0 -36
- package/dist/VirtualList/utils/algorithmUtil.d.ts +0 -23
- package/dist/VirtualList/utils/algorithmUtil.js +0 -81
- package/dist/VirtualList/utils/findDOMNode.d.ts +0 -5
- package/dist/VirtualList/utils/findDOMNode.js +0 -30
- package/dist/VirtualList/utils/isFirefox.d.ts +0 -2
- package/dist/VirtualList/utils/raf.d.ts +0 -5
- package/dist/VirtualList/utils/raf.js +0 -57
- package/dist/theme-chalk/bak/common/popup.scss +0 -47
- package/dist/theme-chalk/bak/common/transition.scss +0 -118
- package/dist/theme-chalk/bak/common/var.scss +0 -1476
- package/dist/theme-chalk/bak/mixins/_button.scss +0 -224
- package/dist/theme-chalk/bak/mixins/_col.scss +0 -38
- package/dist/theme-chalk/bak/mixins/_var.scss +0 -55
- package/dist/theme-chalk/bak/mixins/config.scss +0 -5
- package/dist/theme-chalk/bak/mixins/function.scss +0 -85
- package/dist/theme-chalk/bak/mixins/mixins.scss +0 -215
- package/dist/theme-chalk/bak/mixins/utils.scss +0 -39
package/dist/Tree/TreeNode.js
CHANGED
|
@@ -29,446 +29,344 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/Tree/TreeNode.tsx
|
|
30
30
|
var TreeNode_exports = {};
|
|
31
31
|
__export(TreeNode_exports, {
|
|
32
|
-
InternalTreeNode: () => InternalTreeNode,
|
|
33
32
|
default: () => TreeNode_default
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(TreeNode_exports);
|
|
36
35
|
var import_classnames = __toESM(require("classnames"));
|
|
37
36
|
var import_react = __toESM(require("react"));
|
|
38
|
-
var import_Checkbox = require("../Checkbox");
|
|
39
|
-
var import_Icon = require("../Icon");
|
|
40
37
|
var import_Indent = __toESM(require("./Indent"));
|
|
41
38
|
var import_contextTypes = require("./contextTypes");
|
|
39
|
+
var import_keyUtil = __toESM(require("./utils/keyUtil"));
|
|
42
40
|
var import_pickAttrs = __toESM(require("./utils/pickAttrs"));
|
|
43
41
|
var import_treeUtil = require("./utils/treeUtil");
|
|
44
42
|
var ICON_OPEN = "open";
|
|
45
43
|
var ICON_CLOSE = "close";
|
|
46
44
|
var defaultTitle = "---";
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
onNodeMouseEnter(e, (0, import_treeUtil.convertNodePropsToEventData)(this.props));
|
|
100
|
-
};
|
|
101
|
-
this.onMouseLeave = (e) => {
|
|
102
|
-
const {
|
|
103
|
-
context: { onNodeMouseLeave }
|
|
104
|
-
} = this.props;
|
|
105
|
-
onNodeMouseLeave(e, (0, import_treeUtil.convertNodePropsToEventData)(this.props));
|
|
106
|
-
};
|
|
107
|
-
this.onContextMenu = (e) => {
|
|
108
|
-
const {
|
|
109
|
-
context: { onNodeContextMenu }
|
|
110
|
-
} = this.props;
|
|
111
|
-
onNodeContextMenu(e, (0, import_treeUtil.convertNodePropsToEventData)(this.props));
|
|
112
|
-
};
|
|
113
|
-
this.onDragStart = (e) => {
|
|
114
|
-
const {
|
|
115
|
-
context: { onNodeDragStart }
|
|
116
|
-
} = this.props;
|
|
117
|
-
e.stopPropagation();
|
|
118
|
-
this.setState({
|
|
119
|
-
dragNodeHighlight: true
|
|
120
|
-
});
|
|
121
|
-
onNodeDragStart(e, this);
|
|
122
|
-
try {
|
|
123
|
-
e.dataTransfer.setData("text/plain", "");
|
|
124
|
-
} catch (error) {
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
this.onDragEnter = (e) => {
|
|
128
|
-
const {
|
|
129
|
-
context: { onNodeDragEnter }
|
|
130
|
-
} = this.props;
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
e.stopPropagation();
|
|
133
|
-
onNodeDragEnter(e, this);
|
|
134
|
-
};
|
|
135
|
-
this.onDragOver = (e) => {
|
|
136
|
-
const {
|
|
137
|
-
context: { onNodeDragOver }
|
|
138
|
-
} = this.props;
|
|
139
|
-
e.preventDefault();
|
|
140
|
-
e.stopPropagation();
|
|
141
|
-
onNodeDragOver(e, this);
|
|
142
|
-
};
|
|
143
|
-
this.onDragLeave = (e) => {
|
|
144
|
-
const {
|
|
145
|
-
context: { onNodeDragLeave }
|
|
146
|
-
} = this.props;
|
|
147
|
-
e.stopPropagation();
|
|
148
|
-
onNodeDragLeave(e, this);
|
|
149
|
-
};
|
|
150
|
-
this.onDragEnd = (e) => {
|
|
151
|
-
const {
|
|
152
|
-
context: { onNodeDragEnd }
|
|
153
|
-
} = this.props;
|
|
154
|
-
e.stopPropagation();
|
|
155
|
-
this.setState({
|
|
156
|
-
dragNodeHighlight: false
|
|
157
|
-
});
|
|
158
|
-
onNodeDragEnd(e, this);
|
|
159
|
-
};
|
|
160
|
-
this.onDrop = (e) => {
|
|
161
|
-
const {
|
|
162
|
-
context: { onNodeDrop }
|
|
163
|
-
} = this.props;
|
|
164
|
-
e.preventDefault();
|
|
165
|
-
e.stopPropagation();
|
|
166
|
-
this.setState({
|
|
167
|
-
dragNodeHighlight: false
|
|
168
|
-
});
|
|
169
|
-
onNodeDrop(e, this);
|
|
170
|
-
};
|
|
171
|
-
// Disabled item still can be switch
|
|
172
|
-
this.onExpand = (e) => {
|
|
173
|
-
const {
|
|
174
|
-
loading,
|
|
175
|
-
context: { onNodeExpand }
|
|
176
|
-
} = this.props;
|
|
177
|
-
if (loading) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
onNodeExpand(e, (0, import_treeUtil.convertNodePropsToEventData)(this.props));
|
|
181
|
-
};
|
|
182
|
-
// Drag usage
|
|
183
|
-
this.setSelectHandle = (node) => {
|
|
184
|
-
this.selectHandle = node;
|
|
185
|
-
};
|
|
186
|
-
this.getNodeState = () => {
|
|
187
|
-
const { expanded } = this.props;
|
|
188
|
-
if (this.isLeaf()) {
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
return expanded ? ICON_OPEN : ICON_CLOSE;
|
|
192
|
-
};
|
|
193
|
-
this.hasChildren = () => {
|
|
194
|
-
const { eventKey } = this.props;
|
|
195
|
-
const {
|
|
196
|
-
context: { keyEntities }
|
|
197
|
-
} = this.props;
|
|
198
|
-
const { children } = keyEntities[eventKey] || {};
|
|
199
|
-
return !!(children || []).length;
|
|
200
|
-
};
|
|
201
|
-
this.isLeaf = () => {
|
|
202
|
-
const { isLeaf, loaded } = this.props;
|
|
203
|
-
const {
|
|
204
|
-
context: { loadData }
|
|
205
|
-
} = this.props;
|
|
206
|
-
const hasChildren = this.hasChildren();
|
|
207
|
-
if (isLeaf === false) {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren;
|
|
211
|
-
};
|
|
212
|
-
this.isDisabled = () => {
|
|
213
|
-
const { disabled } = this.props;
|
|
214
|
-
const {
|
|
215
|
-
context: { disabled: treeDisabled }
|
|
216
|
-
} = this.props;
|
|
217
|
-
return !!(treeDisabled || disabled);
|
|
218
|
-
};
|
|
219
|
-
this.isCheckable = () => {
|
|
220
|
-
const { checkable } = this.props;
|
|
221
|
-
const {
|
|
222
|
-
context: { checkable: treeCheckable }
|
|
223
|
-
} = this.props;
|
|
224
|
-
if (!treeCheckable || checkable === false) {
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
return treeCheckable;
|
|
228
|
-
};
|
|
229
|
-
// Load data to avoid default expanded tree without data
|
|
230
|
-
this.syncLoadData = (props) => {
|
|
231
|
-
const { expanded, loading, loaded } = props;
|
|
232
|
-
const {
|
|
233
|
-
context: { loadData, onNodeLoad }
|
|
234
|
-
} = this.props;
|
|
235
|
-
if (loading) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
if (loadData && expanded && !this.isLeaf()) {
|
|
239
|
-
if (!this.hasChildren() && !loaded) {
|
|
240
|
-
onNodeLoad((0, import_treeUtil.convertNodePropsToEventData)(this.props));
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
this.isDraggable = () => {
|
|
245
|
-
const {
|
|
246
|
-
data,
|
|
247
|
-
context: { draggable }
|
|
248
|
-
} = this.props;
|
|
249
|
-
return !!(draggable && (!draggable.nodeDraggable || draggable.nodeDraggable(data)));
|
|
250
|
-
};
|
|
251
|
-
// ==================== Render: Drag Handler ====================
|
|
252
|
-
this.renderDragHandler = () => {
|
|
253
|
-
const {
|
|
254
|
-
context: { draggable, prefixCls }
|
|
255
|
-
} = this.props;
|
|
256
|
-
return (draggable == null ? void 0 : draggable.icon) ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-draggable-icon` }, draggable.icon) : null;
|
|
257
|
-
};
|
|
258
|
-
// ====================== Render: Switcher ======================
|
|
259
|
-
this.renderSwitcherIconDom = (isLeaf) => {
|
|
260
|
-
const { switcherIcon: switcherIconFromProps } = this.props;
|
|
261
|
-
const {
|
|
262
|
-
context: { switcherIcon: switcherIconFromCtx }
|
|
263
|
-
} = this.props;
|
|
264
|
-
const switcherIcon = switcherIconFromProps || switcherIconFromCtx;
|
|
265
|
-
if (typeof switcherIcon === "function") {
|
|
266
|
-
return switcherIcon({ ...this.props, isLeaf });
|
|
267
|
-
}
|
|
268
|
-
return switcherIcon;
|
|
269
|
-
};
|
|
270
|
-
// Switcher
|
|
271
|
-
this.renderSwitcher = () => {
|
|
272
|
-
const { expanded } = this.props;
|
|
273
|
-
const {
|
|
274
|
-
context: { prefixCls }
|
|
275
|
-
} = this.props;
|
|
276
|
-
if (this.isLeaf()) {
|
|
277
|
-
const switcherIconDom2 = this.renderSwitcherIconDom(true);
|
|
278
|
-
return switcherIconDom2 !== false ? /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${prefixCls}-switcher`, `${prefixCls}-switcher-noop`) }, switcherIconDom2) : null;
|
|
279
|
-
}
|
|
280
|
-
const switcherCls = (0, import_classnames.default)(`${prefixCls}-switcher`, `${prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`);
|
|
281
|
-
const switcherIconDom = this.renderSwitcherIconDom(false);
|
|
282
|
-
return switcherIconDom !== false ? /* @__PURE__ */ import_react.default.createElement("span", { onClick: this.onExpand, className: switcherCls }, switcherIconDom) : null;
|
|
283
|
-
};
|
|
284
|
-
// ====================== Render: Checkbox ======================
|
|
285
|
-
// Checkbox
|
|
286
|
-
this.renderCheckbox = () => {
|
|
287
|
-
const { checked, halfChecked, disableCheckbox } = this.props;
|
|
288
|
-
const disabled = this.isDisabled();
|
|
289
|
-
const checkable = this.isCheckable();
|
|
290
|
-
if (!checkable) {
|
|
291
|
-
return null;
|
|
292
|
-
}
|
|
293
|
-
const $custom = typeof checkable !== "boolean" ? checkable : null;
|
|
294
|
-
return (
|
|
295
|
-
// @ts-ignore
|
|
296
|
-
/* @__PURE__ */ import_react.default.createElement(import_Checkbox.Checkbox, { checked, indeterminate: !checked && halfChecked, disabled: disabled || disableCheckbox, onChange: (_, e) => this.onCheck(e) }, $custom)
|
|
297
|
-
);
|
|
298
|
-
};
|
|
299
|
-
// ==================== Render: Title + Icon ====================
|
|
300
|
-
this.renderIcon = () => {
|
|
301
|
-
const { loading } = this.props;
|
|
302
|
-
const {
|
|
303
|
-
context: { prefixCls }
|
|
304
|
-
} = this.props;
|
|
305
|
-
return /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${prefixCls}-iconEle`, `${prefixCls}-icon__${this.getNodeState() || "docu"}`, loading && `${prefixCls}-icon_loading`) });
|
|
306
|
-
};
|
|
307
|
-
this.renderUserIcon = (currentIcon) => {
|
|
308
|
-
if (typeof currentIcon === "function") {
|
|
309
|
-
return currentIcon(this.props);
|
|
310
|
-
} else if (typeof currentIcon === "string") {
|
|
311
|
-
return /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { name: currentIcon });
|
|
312
|
-
} else {
|
|
313
|
-
return currentIcon;
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
// Icon + Title
|
|
317
|
-
this.renderSelector = () => {
|
|
318
|
-
const { dragNodeHighlight } = this.state;
|
|
319
|
-
const { title = defaultTitle, selected, icon, loading, data } = this.props;
|
|
320
|
-
const {
|
|
321
|
-
context: { prefixCls, showIcon, icon: treeIcon, loadData, titleRender }
|
|
322
|
-
} = this.props;
|
|
323
|
-
const disabled = this.isDisabled();
|
|
324
|
-
const wrapClass = `${prefixCls}-node-content-wrapper`;
|
|
325
|
-
let $icon;
|
|
326
|
-
if (showIcon) {
|
|
327
|
-
const currentIcon = icon || treeIcon;
|
|
328
|
-
$icon = currentIcon ? /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${prefixCls}-iconEle`, `${prefixCls}-icon__customize`) }, this.renderUserIcon(currentIcon)) : this.renderIcon();
|
|
329
|
-
} else if (loadData && loading) {
|
|
330
|
-
$icon = this.renderIcon();
|
|
331
|
-
}
|
|
332
|
-
let titleNode;
|
|
333
|
-
if (typeof title === "function") {
|
|
334
|
-
titleNode = title(data);
|
|
335
|
-
} else if (titleRender) {
|
|
336
|
-
titleNode = titleRender(data);
|
|
337
|
-
} else {
|
|
338
|
-
titleNode = title;
|
|
339
|
-
}
|
|
340
|
-
const $title = /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-title` }, titleNode);
|
|
341
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
342
|
-
"span",
|
|
343
|
-
{
|
|
344
|
-
ref: this.setSelectHandle,
|
|
345
|
-
title: typeof title === "string" ? title : "",
|
|
346
|
-
className: (0, import_classnames.default)(
|
|
347
|
-
`${wrapClass}`,
|
|
348
|
-
`${wrapClass}-${this.getNodeState() || "normal"}`,
|
|
349
|
-
!disabled && (selected || dragNodeHighlight) && `${prefixCls}-node-selected`
|
|
350
|
-
),
|
|
351
|
-
onMouseEnter: this.onMouseEnter,
|
|
352
|
-
onMouseLeave: this.onMouseLeave,
|
|
353
|
-
onContextMenu: this.onContextMenu,
|
|
354
|
-
onClick: this.onSelectorClick,
|
|
355
|
-
onDoubleClick: this.onSelectorDoubleClick
|
|
356
|
-
},
|
|
357
|
-
$icon,
|
|
358
|
-
$title,
|
|
359
|
-
this.renderDropIndicator()
|
|
360
|
-
);
|
|
361
|
-
};
|
|
362
|
-
// =================== Render: Drop Indicator ===================
|
|
363
|
-
this.renderDropIndicator = () => {
|
|
364
|
-
const { disabled, eventKey } = this.props;
|
|
365
|
-
const {
|
|
366
|
-
context: { draggable, dropLevelOffset, dropPosition, prefixCls, indent, dropIndicatorRender, dragOverNodeKey, direction }
|
|
367
|
-
} = this.props;
|
|
368
|
-
const rootDraggable = draggable !== false;
|
|
369
|
-
const showIndicator = !disabled && rootDraggable && dragOverNodeKey === eventKey;
|
|
370
|
-
return showIndicator ? dropIndicatorRender({ dropPosition, dropLevelOffset, indent, prefixCls, direction }) : null;
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
// Isomorphic needn't load data in server side
|
|
374
|
-
componentDidMount() {
|
|
375
|
-
this.syncLoadData(this.props);
|
|
376
|
-
}
|
|
377
|
-
componentDidUpdate() {
|
|
378
|
-
this.syncLoadData(this.props);
|
|
379
|
-
}
|
|
380
|
-
isSelectable() {
|
|
381
|
-
const { selectable } = this.props;
|
|
382
|
-
const {
|
|
383
|
-
context: { selectable: treeSelectable }
|
|
384
|
-
} = this.props;
|
|
45
|
+
var TreeNode = (props) => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
const {
|
|
48
|
+
eventKey,
|
|
49
|
+
className,
|
|
50
|
+
style,
|
|
51
|
+
dragOver,
|
|
52
|
+
dragOverGapTop,
|
|
53
|
+
dragOverGapBottom,
|
|
54
|
+
isLeaf,
|
|
55
|
+
isStart,
|
|
56
|
+
isEnd,
|
|
57
|
+
expanded,
|
|
58
|
+
selected,
|
|
59
|
+
checked,
|
|
60
|
+
halfChecked,
|
|
61
|
+
loading,
|
|
62
|
+
domRef,
|
|
63
|
+
active,
|
|
64
|
+
data,
|
|
65
|
+
onMouseMove,
|
|
66
|
+
selectable,
|
|
67
|
+
...otherProps
|
|
68
|
+
} = props;
|
|
69
|
+
const context = import_react.default.useContext(import_contextTypes.TreeContext);
|
|
70
|
+
const { classNames: treeClassNames, styles } = context || {};
|
|
71
|
+
const unstableContext = import_react.default.useContext(import_contextTypes.UnstableContext);
|
|
72
|
+
const selectHandleRef = import_react.default.useRef(null);
|
|
73
|
+
const [dragNodeHighlight, setDragNodeHighlight] = import_react.default.useState(false);
|
|
74
|
+
const isDisabled = !!(context.disabled || props.disabled || ((_a = unstableContext.nodeDisabled) == null ? void 0 : _a.call(unstableContext, data)));
|
|
75
|
+
const isCheckable = import_react.default.useMemo(() => {
|
|
76
|
+
if (!context.checkable || props.checkable === false) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
return context.checkable;
|
|
80
|
+
}, [context.checkable, props.checkable]);
|
|
81
|
+
const onSelect = (e) => {
|
|
82
|
+
if (isDisabled) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
context.onNodeSelect(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
86
|
+
};
|
|
87
|
+
const onCheck = (e) => {
|
|
88
|
+
if (isDisabled) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (!isCheckable || props.disableCheckbox) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
context.onNodeCheck(e, (0, import_treeUtil.convertNodePropsToEventData)(props), !checked);
|
|
95
|
+
};
|
|
96
|
+
const isSelectable = import_react.default.useMemo(() => {
|
|
385
97
|
if (typeof selectable === "boolean") {
|
|
386
98
|
return selectable;
|
|
387
99
|
}
|
|
388
|
-
return
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
100
|
+
return context.selectable;
|
|
101
|
+
}, [selectable, context.selectable]);
|
|
102
|
+
const onSelectorClick = (e) => {
|
|
103
|
+
context.onNodeClick(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
104
|
+
if (isSelectable) {
|
|
105
|
+
onSelect(e);
|
|
106
|
+
} else {
|
|
107
|
+
onCheck(e);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const onSelectorDoubleClick = (e) => {
|
|
111
|
+
context.onNodeDoubleClick(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
112
|
+
};
|
|
113
|
+
const onMouseEnter = (e) => {
|
|
114
|
+
context.onNodeMouseEnter(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
115
|
+
};
|
|
116
|
+
const onMouseLeave = (e) => {
|
|
117
|
+
context.onNodeMouseLeave(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
118
|
+
};
|
|
119
|
+
const onContextMenu = (e) => {
|
|
120
|
+
context.onNodeContextMenu(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
121
|
+
};
|
|
122
|
+
const isDraggable = import_react.default.useMemo(() => {
|
|
123
|
+
return !!(context.draggable && (!context.draggable.nodeDraggable || context.draggable.nodeDraggable(data)));
|
|
124
|
+
}, [context.draggable, data]);
|
|
125
|
+
const onDragStart = (e) => {
|
|
126
|
+
e.stopPropagation();
|
|
127
|
+
setDragNodeHighlight(true);
|
|
128
|
+
context.onNodeDragStart(e, props);
|
|
129
|
+
try {
|
|
130
|
+
e.dataTransfer.setData("text/plain", "");
|
|
131
|
+
} catch {
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const onDragEnter = (e) => {
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
e.stopPropagation();
|
|
137
|
+
context.onNodeDragEnter(e, props);
|
|
138
|
+
};
|
|
139
|
+
const onDragOver = (e) => {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
e.stopPropagation();
|
|
142
|
+
context.onNodeDragOver(e, props);
|
|
143
|
+
};
|
|
144
|
+
const onDragLeave = (e) => {
|
|
145
|
+
e.stopPropagation();
|
|
146
|
+
context.onNodeDragLeave(e, props);
|
|
147
|
+
};
|
|
148
|
+
const onDragEnd = (e) => {
|
|
149
|
+
e.stopPropagation();
|
|
150
|
+
setDragNodeHighlight(false);
|
|
151
|
+
context.onNodeDragEnd(e, props);
|
|
152
|
+
};
|
|
153
|
+
const onDrop = (e) => {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
e.stopPropagation();
|
|
156
|
+
setDragNodeHighlight(false);
|
|
157
|
+
context.onNodeDrop(e, props);
|
|
158
|
+
};
|
|
159
|
+
const onExpand = (e) => {
|
|
160
|
+
if (loading) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
context.onNodeExpand(e, (0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
164
|
+
};
|
|
165
|
+
const hasChildren = import_react.default.useMemo(() => {
|
|
166
|
+
const { children } = (0, import_keyUtil.default)(context.keyEntities, eventKey) || {};
|
|
167
|
+
return Boolean((children || []).length);
|
|
168
|
+
}, [context.keyEntities, eventKey]);
|
|
169
|
+
const memoizedIsLeaf = import_react.default.useMemo(() => {
|
|
170
|
+
if (isLeaf === false) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
return isLeaf || !context.loadData && !hasChildren || context.loadData && props.loaded && !hasChildren;
|
|
174
|
+
}, [isLeaf, context.loadData, hasChildren, props.loaded]);
|
|
175
|
+
import_react.default.useEffect(() => {
|
|
176
|
+
if (loading) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (typeof context.loadData === "function" && expanded && !memoizedIsLeaf && !props.loaded) {
|
|
180
|
+
context.onNodeLoad((0, import_treeUtil.convertNodePropsToEventData)(props));
|
|
181
|
+
}
|
|
182
|
+
}, [loading, context.loadData, context.onNodeLoad, expanded, memoizedIsLeaf, props]);
|
|
183
|
+
const dragHandlerNode = import_react.default.useMemo(() => {
|
|
184
|
+
var _a2;
|
|
185
|
+
if (!((_a2 = context.draggable) == null ? void 0 : _a2.icon)) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { className: `${context.prefixCls}-draggable-icon` }, context.draggable.icon);
|
|
189
|
+
}, [context.draggable]);
|
|
190
|
+
const renderSwitcherIconDom = (isInternalLeaf) => {
|
|
191
|
+
const switcherIcon = props.switcherIcon || context.switcherIcon;
|
|
192
|
+
if (typeof switcherIcon === "function") {
|
|
193
|
+
return switcherIcon({ ...props, isLeaf: isInternalLeaf });
|
|
194
|
+
}
|
|
195
|
+
return switcherIcon;
|
|
196
|
+
};
|
|
197
|
+
const renderSwitcher = () => {
|
|
198
|
+
if (memoizedIsLeaf) {
|
|
199
|
+
const switcherIconDom2 = renderSwitcherIconDom(true);
|
|
200
|
+
return switcherIconDom2 !== false ? /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher-noop`) }, switcherIconDom2) : null;
|
|
201
|
+
}
|
|
202
|
+
const switcherIconDom = renderSwitcherIconDom(false);
|
|
203
|
+
return switcherIconDom !== false ? /* @__PURE__ */ import_react.default.createElement("span", { onClick: onExpand, className: (0, import_classnames.default)(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`) }, switcherIconDom) : null;
|
|
204
|
+
};
|
|
205
|
+
const checkboxNode = import_react.default.useMemo(() => {
|
|
206
|
+
if (!isCheckable) {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
const $custom = typeof isCheckable !== "boolean" ? isCheckable : null;
|
|
424
210
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
425
|
-
"
|
|
211
|
+
"span",
|
|
426
212
|
{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
[`${prefixCls}-
|
|
430
|
-
[`${prefixCls}-
|
|
431
|
-
[`${prefixCls}-treenode-checkbox-checked`]: checked,
|
|
432
|
-
[`${prefixCls}-treenode-checkbox-indeterminate`]: halfChecked,
|
|
433
|
-
[`${prefixCls}-treenode-selected`]: selected,
|
|
434
|
-
[`${prefixCls}-treenode-loading`]: loading,
|
|
435
|
-
[`${prefixCls}-treenode-active`]: active,
|
|
436
|
-
[`${prefixCls}-treenode-leaf-last`]: isEndNode,
|
|
437
|
-
[`${prefixCls}-treenode-draggable`]: draggableWithoutDisabled,
|
|
438
|
-
dragging,
|
|
439
|
-
"drop-target": dropTargetKey === eventKey,
|
|
440
|
-
"drop-container": dropContainerKey === eventKey,
|
|
441
|
-
"drag-over": !disabled && dragOver,
|
|
442
|
-
"drag-over-gap-top": !disabled && dragOverGapTop,
|
|
443
|
-
"drag-over-gap-bottom": !disabled && dragOverGapBottom,
|
|
444
|
-
"filter-node": filterTreeNode && filterTreeNode((0, import_treeUtil.convertNodePropsToEventData)(this.props))
|
|
213
|
+
className: (0, import_classnames.default)(`${context.prefixCls}-checkbox`, {
|
|
214
|
+
[`${context.prefixCls}-checkbox-checked`]: checked,
|
|
215
|
+
[`${context.prefixCls}-checkbox-indeterminate`]: !checked && halfChecked,
|
|
216
|
+
[`${context.prefixCls}-checkbox-disabled`]: isDisabled || props.disableCheckbox
|
|
445
217
|
}),
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
"aria-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
onDragOver: mergedDraggable ? this.onDragOver : void 0,
|
|
452
|
-
onDragLeave: mergedDraggable ? this.onDragLeave : void 0,
|
|
453
|
-
onDrop: mergedDraggable ? this.onDrop : void 0,
|
|
454
|
-
onDragEnd: mergedDraggable ? this.onDragEnd : void 0,
|
|
455
|
-
onMouseMove,
|
|
456
|
-
...ariaSelected,
|
|
457
|
-
...dataOrAriaAttributeProps
|
|
218
|
+
onClick: onCheck,
|
|
219
|
+
role: "checkbox",
|
|
220
|
+
"aria-checked": halfChecked ? "mixed" : checked,
|
|
221
|
+
"aria-disabled": isDisabled || props.disableCheckbox,
|
|
222
|
+
"aria-label": `Select ${typeof props.title === "string" ? props.title : "tree node"}`
|
|
458
223
|
},
|
|
459
|
-
|
|
460
|
-
this.renderDragHandler(),
|
|
461
|
-
this.renderSwitcher(),
|
|
462
|
-
this.renderCheckbox(),
|
|
463
|
-
this.renderSelector()
|
|
224
|
+
$custom
|
|
464
225
|
);
|
|
465
|
-
}
|
|
226
|
+
}, [isCheckable, checked, halfChecked, isDisabled, props.disableCheckbox, props.title]);
|
|
227
|
+
const nodeState = import_react.default.useMemo(() => {
|
|
228
|
+
if (memoizedIsLeaf) {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
return expanded ? ICON_OPEN : ICON_CLOSE;
|
|
232
|
+
}, [memoizedIsLeaf, expanded]);
|
|
233
|
+
const iconNode = import_react.default.useMemo(() => {
|
|
234
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
235
|
+
"span",
|
|
236
|
+
{
|
|
237
|
+
className: (0, import_classnames.default)(treeClassNames == null ? void 0 : treeClassNames.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__${nodeState || "docu"}`, {
|
|
238
|
+
[`${context.prefixCls}-icon_loading`]: loading
|
|
239
|
+
}),
|
|
240
|
+
style: styles == null ? void 0 : styles.itemIcon
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}, [context.prefixCls, nodeState, loading]);
|
|
244
|
+
const dropIndicatorNode = import_react.default.useMemo(() => {
|
|
245
|
+
const rootDraggable = Boolean(context.draggable);
|
|
246
|
+
const showIndicator = !props.disabled && rootDraggable && context.dragOverNodeKey === eventKey;
|
|
247
|
+
if (!showIndicator) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
return context.dropIndicatorRender({
|
|
251
|
+
dropPosition: context.dropPosition,
|
|
252
|
+
dropLevelOffset: context.dropLevelOffset,
|
|
253
|
+
indent: context.indent,
|
|
254
|
+
prefixCls: context.prefixCls,
|
|
255
|
+
direction: context.direction
|
|
256
|
+
});
|
|
257
|
+
}, [
|
|
258
|
+
context.dropPosition,
|
|
259
|
+
context.dropLevelOffset,
|
|
260
|
+
context.indent,
|
|
261
|
+
context.prefixCls,
|
|
262
|
+
context.direction,
|
|
263
|
+
context.draggable,
|
|
264
|
+
context.dragOverNodeKey,
|
|
265
|
+
context.dropIndicatorRender
|
|
266
|
+
]);
|
|
267
|
+
const selectorNode = import_react.default.useMemo(() => {
|
|
268
|
+
const { title = defaultTitle } = props;
|
|
269
|
+
const wrapClass = `${context.prefixCls}-node-content-wrapper`;
|
|
270
|
+
let $icon;
|
|
271
|
+
if (context.showIcon) {
|
|
272
|
+
const currentIcon = props.icon || context.icon;
|
|
273
|
+
$icon = currentIcon ? /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(treeClassNames == null ? void 0 : treeClassNames.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__customize`), style: styles == null ? void 0 : styles.itemIcon }, typeof currentIcon === "function" ? currentIcon(props) : currentIcon) : iconNode;
|
|
274
|
+
} else if (context.loadData && loading) {
|
|
275
|
+
$icon = iconNode;
|
|
276
|
+
}
|
|
277
|
+
let titleNode;
|
|
278
|
+
if (typeof title === "function") {
|
|
279
|
+
titleNode = title(data);
|
|
280
|
+
} else if (context.titleRender) {
|
|
281
|
+
titleNode = context.titleRender(data);
|
|
282
|
+
} else {
|
|
283
|
+
titleNode = title;
|
|
284
|
+
}
|
|
285
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
286
|
+
"span",
|
|
287
|
+
{
|
|
288
|
+
ref: selectHandleRef,
|
|
289
|
+
title: typeof title === "string" ? title : "",
|
|
290
|
+
className: (0, import_classnames.default)(wrapClass, `${wrapClass}-${nodeState || "normal"}`, {
|
|
291
|
+
[`${context.prefixCls}-node-selected`]: !isDisabled && (selected || dragNodeHighlight)
|
|
292
|
+
}),
|
|
293
|
+
onMouseEnter,
|
|
294
|
+
onMouseLeave,
|
|
295
|
+
onContextMenu,
|
|
296
|
+
onClick: onSelectorClick,
|
|
297
|
+
onDoubleClick: onSelectorDoubleClick
|
|
298
|
+
},
|
|
299
|
+
$icon,
|
|
300
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${context.prefixCls}-title`, treeClassNames == null ? void 0 : treeClassNames.itemTitle), style: styles == null ? void 0 : styles.itemTitle }, titleNode),
|
|
301
|
+
dropIndicatorNode
|
|
302
|
+
);
|
|
303
|
+
}, [
|
|
304
|
+
context.prefixCls,
|
|
305
|
+
context.showIcon,
|
|
306
|
+
props,
|
|
307
|
+
context.icon,
|
|
308
|
+
iconNode,
|
|
309
|
+
context.titleRender,
|
|
310
|
+
data,
|
|
311
|
+
nodeState,
|
|
312
|
+
onMouseEnter,
|
|
313
|
+
onMouseLeave,
|
|
314
|
+
onContextMenu,
|
|
315
|
+
onSelectorClick,
|
|
316
|
+
onSelectorDoubleClick
|
|
317
|
+
]);
|
|
318
|
+
const dataOrAriaAttributeProps = (0, import_pickAttrs.default)(otherProps, { aria: true, data: true });
|
|
319
|
+
const { level } = (0, import_keyUtil.default)(context.keyEntities, eventKey) || {};
|
|
320
|
+
const isEndNode = isEnd[isEnd.length - 1];
|
|
321
|
+
const draggableWithoutDisabled = !isDisabled && isDraggable;
|
|
322
|
+
const dragging = context.draggingNodeKey === eventKey;
|
|
323
|
+
const ariaSelected = selectable !== void 0 ? { "aria-selected": !!selectable } : void 0;
|
|
324
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
325
|
+
"div",
|
|
326
|
+
{
|
|
327
|
+
ref: domRef,
|
|
328
|
+
role: "treeitem",
|
|
329
|
+
"aria-expanded": isLeaf ? void 0 : expanded,
|
|
330
|
+
className: (0, import_classnames.default)(className, `${context.prefixCls}-treenode`, treeClassNames == null ? void 0 : treeClassNames.item, {
|
|
331
|
+
[`${context.prefixCls}-treenode-disabled`]: isDisabled,
|
|
332
|
+
[`${context.prefixCls}-treenode-switcher-${expanded ? "open" : "close"}`]: !isLeaf,
|
|
333
|
+
[`${context.prefixCls}-treenode-checkbox-checked`]: checked,
|
|
334
|
+
[`${context.prefixCls}-treenode-checkbox-indeterminate`]: halfChecked,
|
|
335
|
+
[`${context.prefixCls}-treenode-selected`]: selected,
|
|
336
|
+
[`${context.prefixCls}-treenode-loading`]: loading,
|
|
337
|
+
[`${context.prefixCls}-treenode-active`]: active,
|
|
338
|
+
[`${context.prefixCls}-treenode-leaf-last`]: isEndNode,
|
|
339
|
+
[`${context.prefixCls}-treenode-draggable`]: isDraggable,
|
|
340
|
+
dragging,
|
|
341
|
+
"drop-target": context.dropTargetKey === eventKey,
|
|
342
|
+
"drop-container": context.dropContainerKey === eventKey,
|
|
343
|
+
"drag-over": !isDisabled && dragOver,
|
|
344
|
+
"drag-over-gap-top": !isDisabled && dragOverGapTop,
|
|
345
|
+
"drag-over-gap-bottom": !isDisabled && dragOverGapBottom,
|
|
346
|
+
"filter-node": (_b = context.filterTreeNode) == null ? void 0 : _b.call(context, (0, import_treeUtil.convertNodePropsToEventData)(props)),
|
|
347
|
+
[`${context.prefixCls}-treenode-leaf`]: memoizedIsLeaf
|
|
348
|
+
}),
|
|
349
|
+
style: { ...style, ...styles == null ? void 0 : styles.item },
|
|
350
|
+
draggable: draggableWithoutDisabled,
|
|
351
|
+
onDragStart: draggableWithoutDisabled ? onDragStart : void 0,
|
|
352
|
+
onDragEnter: isDraggable ? onDragEnter : void 0,
|
|
353
|
+
onDragOver: isDraggable ? onDragOver : void 0,
|
|
354
|
+
onDragLeave: isDraggable ? onDragLeave : void 0,
|
|
355
|
+
onDrop: isDraggable ? onDrop : void 0,
|
|
356
|
+
onDragEnd: isDraggable ? onDragEnd : void 0,
|
|
357
|
+
onMouseMove,
|
|
358
|
+
...ariaSelected,
|
|
359
|
+
...dataOrAriaAttributeProps
|
|
360
|
+
},
|
|
361
|
+
/* @__PURE__ */ import_react.default.createElement(import_Indent.default, { prefixCls: context.prefixCls, level, isStart, isEnd }),
|
|
362
|
+
dragHandlerNode,
|
|
363
|
+
renderSwitcher(),
|
|
364
|
+
checkboxNode,
|
|
365
|
+
selectorNode
|
|
366
|
+
);
|
|
466
367
|
};
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
0 && (module.exports = {
|
|
473
|
-
InternalTreeNode
|
|
474
|
-
});
|
|
368
|
+
TreeNode.isTreeNode = 1;
|
|
369
|
+
if (process.env.NODE_ENV !== "production") {
|
|
370
|
+
TreeNode.displayName = "TreeNode";
|
|
371
|
+
}
|
|
372
|
+
var TreeNode_default = TreeNode;
|