@opensumi/ide-components 2.13.0 → 2.13.1

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 (180) hide show
  1. package/dist/index.js +350 -395
  2. package/lib/badge/index.d.ts.map +1 -1
  3. package/lib/badge/index.js +1 -1
  4. package/lib/badge/index.js.map +1 -1
  5. package/lib/button/index.d.ts.map +1 -1
  6. package/lib/button/index.js +6 -6
  7. package/lib/button/index.js.map +1 -1
  8. package/lib/button/style.less +1 -1
  9. package/lib/checkbox/index.d.ts.map +1 -1
  10. package/lib/checkbox/index.js.map +1 -1
  11. package/lib/checkbox/style.less +2 -2
  12. package/lib/click-outside/index.d.ts.map +1 -1
  13. package/lib/click-outside/index.js +1 -1
  14. package/lib/click-outside/index.js.map +1 -1
  15. package/lib/dialog/index.d.ts.map +1 -1
  16. package/lib/dialog/index.js +7 -5
  17. package/lib/dialog/index.js.map +1 -1
  18. package/lib/dropdown/dropdown.d.ts +1 -1
  19. package/lib/dropdown/dropdown.d.ts.map +1 -1
  20. package/lib/dropdown/dropdown.js +1 -1
  21. package/lib/dropdown/dropdown.js.map +1 -1
  22. package/lib/icon/icon.d.ts.map +1 -1
  23. package/lib/icon/icon.js +2 -3
  24. package/lib/icon/icon.js.map +1 -1
  25. package/lib/icon/iconfont/iconfont.html +1 -1
  26. package/lib/icon/iconfont-cn.d.ts.map +1 -1
  27. package/lib/icon/iconfont-cn.js +1 -3
  28. package/lib/icon/iconfont-cn.js.map +1 -1
  29. package/lib/icon/styles.less +22 -12
  30. package/lib/input/HistoryInputBox.d.ts.map +1 -1
  31. package/lib/input/HistoryInputBox.js +4 -10
  32. package/lib/input/HistoryInputBox.js.map +1 -1
  33. package/lib/input/Input.d.ts +1 -1
  34. package/lib/input/Input.d.ts.map +1 -1
  35. package/lib/input/Input.js +7 -9
  36. package/lib/input/Input.js.map +1 -1
  37. package/lib/input/TextArea.d.ts.map +1 -1
  38. package/lib/input/TextArea.js +1 -3
  39. package/lib/input/TextArea.js.map +1 -1
  40. package/lib/input/ValidateInput.d.ts.map +1 -1
  41. package/lib/input/ValidateInput.js +3 -3
  42. package/lib/input/ValidateInput.js.map +1 -1
  43. package/lib/loading/loading.view.d.ts.map +1 -1
  44. package/lib/loading/loading.view.js +1 -3
  45. package/lib/loading/loading.view.js.map +1 -1
  46. package/lib/locale-context-provider.d.ts.map +1 -1
  47. package/lib/locale-context-provider.js +1 -1
  48. package/lib/locale-context-provider.js.map +1 -1
  49. package/lib/menu/MenuItem.d.ts.map +1 -1
  50. package/lib/menu/MenuItem.js.map +1 -1
  51. package/lib/menu/SubMenu.d.ts.map +1 -1
  52. package/lib/menu/SubMenu.js +1 -1
  53. package/lib/menu/SubMenu.js.map +1 -1
  54. package/lib/menu/index.d.ts.map +1 -1
  55. package/lib/menu/index.js +4 -6
  56. package/lib/menu/index.js.map +1 -1
  57. package/lib/menu/style.less +5 -10
  58. package/lib/message/index.d.ts.map +1 -1
  59. package/lib/message/index.js +3 -5
  60. package/lib/message/index.js.map +1 -1
  61. package/lib/message/message.d.ts.map +1 -1
  62. package/lib/message/message.js +1 -2
  63. package/lib/message/message.js.map +1 -1
  64. package/lib/modal/Modal.d.ts.map +1 -1
  65. package/lib/modal/Modal.js.map +1 -1
  66. package/lib/notification/index.d.ts.map +1 -1
  67. package/lib/notification/index.js +1 -1
  68. package/lib/notification/index.js.map +1 -1
  69. package/lib/notification/notification.d.ts.map +1 -1
  70. package/lib/notification/notification.js +1 -1
  71. package/lib/notification/notification.js.map +1 -1
  72. package/lib/notification/notification.less +3 -2
  73. package/lib/overlay/index.d.ts.map +1 -1
  74. package/lib/overlay/index.js +3 -2
  75. package/lib/overlay/index.js.map +1 -1
  76. package/lib/overlay/styles.less +0 -1
  77. package/lib/popover/index.d.ts.map +1 -1
  78. package/lib/popover/index.js +2 -2
  79. package/lib/popover/index.js.map +1 -1
  80. package/lib/popover/styles.less +4 -3
  81. package/lib/recycle-list/RecycleList.d.ts +2 -2
  82. package/lib/recycle-list/RecycleList.d.ts.map +1 -1
  83. package/lib/recycle-list/RecycleList.js +27 -27
  84. package/lib/recycle-list/RecycleList.js.map +1 -1
  85. package/lib/recycle-tree/RecycleTree.d.ts.map +1 -1
  86. package/lib/recycle-tree/RecycleTree.js +32 -43
  87. package/lib/recycle-tree/RecycleTree.js.map +1 -1
  88. package/lib/recycle-tree/TreeNodeRendererWrap.d.ts.map +1 -1
  89. package/lib/recycle-tree/TreeNodeRendererWrap.js.map +1 -1
  90. package/lib/recycle-tree/basic/index.d.ts.map +1 -1
  91. package/lib/recycle-tree/basic/index.js +7 -13
  92. package/lib/recycle-tree/basic/index.js.map +1 -1
  93. package/lib/recycle-tree/basic/menubar-item.d.ts.map +1 -1
  94. package/lib/recycle-tree/basic/menubar-item.js +1 -2
  95. package/lib/recycle-tree/basic/menubar-item.js.map +1 -1
  96. package/lib/recycle-tree/basic/styles.less +12 -12
  97. package/lib/recycle-tree/basic/tree-node.d.ts.map +1 -1
  98. package/lib/recycle-tree/basic/tree-node.define.d.ts.map +1 -1
  99. package/lib/recycle-tree/basic/tree-node.define.js.map +1 -1
  100. package/lib/recycle-tree/basic/tree-node.js +10 -14
  101. package/lib/recycle-tree/basic/tree-node.js.map +1 -1
  102. package/lib/recycle-tree/basic/tree-service.d.ts.map +1 -1
  103. package/lib/recycle-tree/basic/tree-service.js.map +1 -1
  104. package/lib/recycle-tree/basic/types.d.ts +2 -2
  105. package/lib/recycle-tree/basic/types.d.ts.map +1 -1
  106. package/lib/recycle-tree/decorators/Adaptive/index.d.ts.map +1 -1
  107. package/lib/recycle-tree/decorators/Adaptive/index.js +2 -6
  108. package/lib/recycle-tree/decorators/Adaptive/index.js.map +1 -1
  109. package/lib/recycle-tree/decorators/Filter/index.d.ts.map +1 -1
  110. package/lib/recycle-tree/decorators/Filter/index.js +5 -4
  111. package/lib/recycle-tree/decorators/Filter/index.js.map +1 -1
  112. package/lib/recycle-tree/prompt/PromptHandle.d.ts.map +1 -1
  113. package/lib/recycle-tree/prompt/PromptHandle.js.map +1 -1
  114. package/lib/recycle-tree/tree/Tree.d.ts.map +1 -1
  115. package/lib/recycle-tree/tree/Tree.js +2 -6
  116. package/lib/recycle-tree/tree/Tree.js.map +1 -1
  117. package/lib/recycle-tree/tree/TreeNode.d.ts +5 -5
  118. package/lib/recycle-tree/tree/TreeNode.d.ts.map +1 -1
  119. package/lib/recycle-tree/tree/TreeNode.js +41 -37
  120. package/lib/recycle-tree/tree/TreeNode.js.map +1 -1
  121. package/lib/recycle-tree/tree/decoration/CompositeDecoration.d.ts.map +1 -1
  122. package/lib/recycle-tree/tree/decoration/CompositeDecoration.js +19 -8
  123. package/lib/recycle-tree/tree/decoration/CompositeDecoration.js.map +1 -1
  124. package/lib/recycle-tree/tree/decoration/Decoration.d.ts.map +1 -1
  125. package/lib/recycle-tree/tree/decoration/Decoration.js +2 -2
  126. package/lib/recycle-tree/tree/decoration/Decoration.js.map +1 -1
  127. package/lib/recycle-tree/tree/decoration/DecorationManager.d.ts.map +1 -1
  128. package/lib/recycle-tree/tree/decoration/DecorationManager.js +5 -3
  129. package/lib/recycle-tree/tree/decoration/DecorationManager.js.map +1 -1
  130. package/lib/recycle-tree/tree/model/TreeModel.d.ts.map +1 -1
  131. package/lib/recycle-tree/tree/model/TreeModel.js.map +1 -1
  132. package/lib/recycle-tree/tree/model/treeState/TreeStateManager.d.ts.map +1 -1
  133. package/lib/recycle-tree/tree/model/treeState/TreeStateManager.js +4 -6
  134. package/lib/recycle-tree/tree/model/treeState/TreeStateManager.js.map +1 -1
  135. package/lib/recycle-tree/tree/model/treeState/TreeStateWatcher.d.ts.map +1 -1
  136. package/lib/recycle-tree/tree/model/treeState/TreeStateWatcher.js.map +1 -1
  137. package/lib/recycle-tree/types/tree.d.ts.map +1 -1
  138. package/lib/recycle-tree/types/watcher.d.ts.map +1 -1
  139. package/lib/scrollbars/index.d.ts +1 -1
  140. package/lib/scrollbars/index.d.ts.map +1 -1
  141. package/lib/scrollbars/index.js +7 -5
  142. package/lib/scrollbars/index.js.map +1 -1
  143. package/lib/scrollbars/styles.less +2 -7
  144. package/lib/select/index.d.ts.map +1 -1
  145. package/lib/select/index.js +52 -54
  146. package/lib/select/index.js.map +1 -1
  147. package/lib/select/style.less +17 -13
  148. package/lib/style/base.less +0 -1
  149. package/lib/style/mixins.less +1 -1
  150. package/lib/style/variable.less +3 -4
  151. package/lib/tabs/index.d.ts.map +1 -1
  152. package/lib/tabs/index.js +2 -2
  153. package/lib/tabs/index.js.map +1 -1
  154. package/lib/tooltip/index.d.ts.map +1 -1
  155. package/lib/tooltip/index.js +7 -7
  156. package/lib/tooltip/index.js.map +1 -1
  157. package/lib/tooltip/style.less +2 -3
  158. package/lib/utils/disposable.d.ts.map +1 -1
  159. package/lib/utils/disposable.js +0 -2
  160. package/lib/utils/disposable.js.map +1 -1
  161. package/lib/utils/event.d.ts.map +1 -1
  162. package/lib/utils/event.js +34 -43
  163. package/lib/utils/event.js.map +1 -1
  164. package/lib/utils/iterator.js +1 -1
  165. package/lib/utils/linkedList.d.ts.map +1 -1
  166. package/lib/utils/linkedList.js.map +1 -1
  167. package/lib/utils/os.js +3 -3
  168. package/lib/utils/os.js.map +1 -1
  169. package/lib/utils/path.d.ts.map +1 -1
  170. package/lib/utils/path.js +34 -50
  171. package/lib/utils/path.js.map +1 -1
  172. package/lib/utils/process.d.ts.map +1 -1
  173. package/lib/utils/process.js +11 -5
  174. package/lib/utils/process.js.map +1 -1
  175. package/lib/utils/raf.d.ts.map +1 -1
  176. package/lib/utils/raf.js.map +1 -1
  177. package/lib/utils/warning.d.ts.map +1 -1
  178. package/lib/utils/warning.js +0 -1
  179. package/lib/utils/warning.js.map +1 -1
  180. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -973,7 +973,6 @@ module.exports = !__webpack_require__(76)(function () {
973
973
 
974
974
  Object.defineProperty(exports, "__esModule", { value: true });
975
975
  exports.noteOnce = exports.warningOnce = exports.call = exports.resetWarned = exports.note = exports.warning = void 0;
976
- // tslint:disable no-console
977
976
  let warned = {};
978
977
  function warning(valid, message) {
979
978
  // Support uglify
@@ -1495,19 +1494,19 @@ exports.Button = react_1.default.memo((_a) => {
1495
1494
  ['kt-clickable-icon']: !!onClick,
1496
1495
  });
1497
1496
  if (type === 'icon') {
1498
- return react_1.default.createElement(icon_1.Icon, Object.assign({ tooltip: title, disabled: disabled, icon: icon, onClick: (loading || disabled) ? noop : onClick, className: iconClesses, iconClass: iconClass }, otherProps));
1497
+ return (react_1.default.createElement(icon_1.Icon, Object.assign({ tooltip: title, disabled: disabled, icon: icon, onClick: loading || disabled ? noop : onClick, className: iconClesses, iconClass: iconClass }, otherProps)));
1499
1498
  }
1500
1499
  const iconNode = iconClass ? react_1.default.createElement(icon_1.Icon, { iconClass: iconClass, disabled: disabled }) : null;
1501
1500
  if (more) {
1502
1501
  return (react_1.default.createElement(dropdown_1.Dropdown, { className: 'kt-menu', overlay: menu, trigger: ['click'], onVisibleChange: onVisibleChange },
1503
- react_1.default.createElement("button", Object.assign({}, otherProps, { disabled: disabled, className: classes, type: htmlType, onClick: (loading || disabled) ? noop : onClick }),
1504
- (loading && type !== 'link') && react_1.default.createElement(LoadingCircle, null),
1502
+ react_1.default.createElement("button", Object.assign({}, otherProps, { disabled: disabled, className: classes, type: htmlType, onClick: loading || disabled ? noop : onClick }),
1503
+ loading && type !== 'link' && react_1.default.createElement(LoadingCircle, null),
1505
1504
  iconNode && iconNode,
1506
1505
  children,
1507
- more && react_1.default.createElement(icon_1.Icon, { iconClass: moreIconClass ? moreIconClass : (0, icon_1.getKaitianIcon)('down'), className: 'kt-button-secondary-more' }))));
1506
+ more && (react_1.default.createElement(icon_1.Icon, { iconClass: moreIconClass ? moreIconClass : (0, icon_1.getKaitianIcon)('down'), className: 'kt-button-secondary-more' })))));
1508
1507
  }
1509
- return (react_1.default.createElement("button", Object.assign({}, otherProps, { disabled: disabled, className: classes, type: htmlType, onClick: (loading || disabled) ? noop : onClick }),
1510
- (loading && type !== 'link') && react_1.default.createElement(LoadingCircle, null),
1508
+ return (react_1.default.createElement("button", Object.assign({}, otherProps, { disabled: disabled, className: classes, type: htmlType, onClick: loading || disabled ? noop : onClick }),
1509
+ loading && type !== 'link' && react_1.default.createElement(LoadingCircle, null),
1511
1510
  iconNode && iconNode,
1512
1511
  children));
1513
1512
  });
@@ -2314,7 +2313,12 @@ class TreeNode {
2314
2313
  addMetadata(withKey, value) {
2315
2314
  if (!(withKey in this._metadata)) {
2316
2315
  this._metadata[withKey] = value;
2317
- this._watcher.notifyDidChangeMetadata(this, { type: types_1.MetadataChangeType.Added, key: withKey, prevValue: void 0, value });
2316
+ this._watcher.notifyDidChangeMetadata(this, {
2317
+ type: types_1.MetadataChangeType.Added,
2318
+ key: withKey,
2319
+ prevValue: void 0,
2320
+ value,
2321
+ });
2318
2322
  }
2319
2323
  else {
2320
2324
  const prevValue = this._metadata[withKey];
@@ -2326,7 +2330,12 @@ class TreeNode {
2326
2330
  if (withKey in this._metadata) {
2327
2331
  const prevValue = this._metadata[withKey];
2328
2332
  delete this._metadata[withKey];
2329
- this._watcher.notifyDidChangeMetadata(this, { type: types_1.MetadataChangeType.Removed, key: withKey, prevValue, value: void 0 });
2333
+ this._watcher.notifyDidChangeMetadata(this, {
2334
+ type: types_1.MetadataChangeType.Removed,
2335
+ key: withKey,
2336
+ prevValue,
2337
+ value: void 0,
2338
+ });
2330
2339
  }
2331
2340
  }
2332
2341
  /**
@@ -2407,23 +2416,23 @@ class CompositeTreeNode extends TreeNode {
2407
2416
  if (event.type === types_1.WatchEvent.Moved) {
2408
2417
  const { oldPath, newPath } = event;
2409
2418
  if (typeof oldPath !== 'string') {
2410
- throw new TypeError(`Expected oldPath to be a string`);
2419
+ throw new TypeError('Expected oldPath to be a string');
2411
2420
  }
2412
2421
  if (typeof newPath !== 'string') {
2413
- throw new TypeError(`Expected newPath to be a string`);
2422
+ throw new TypeError('Expected newPath to be a string');
2414
2423
  }
2415
2424
  if (utils_1.Path.isRelative(oldPath)) {
2416
- throw new TypeError(`oldPath must be absolute`);
2425
+ throw new TypeError('oldPath must be absolute');
2417
2426
  }
2418
2427
  if (utils_1.Path.isRelative(newPath)) {
2419
- throw new TypeError(`newPath must be absolute`);
2428
+ throw new TypeError('newPath must be absolute');
2420
2429
  }
2421
2430
  this.transferItem(oldPath, newPath);
2422
2431
  }
2423
2432
  else if (event.type === types_1.WatchEvent.Added) {
2424
2433
  const { node } = event;
2425
2434
  if (!TreeNode.is(node)) {
2426
- throw new TypeError(`Expected node to be a TreeNode`);
2435
+ throw new TypeError('Expected node to be a TreeNode');
2427
2436
  }
2428
2437
  this.insertItem(node);
2429
2438
  }
@@ -2443,7 +2452,7 @@ class CompositeTreeNode extends TreeNode {
2443
2452
  // 预存展开目录
2444
2453
  const expandedPaths = this.getAllExpandedNodePath();
2445
2454
  // Changed事件,表示节点有较多的变化时,重新更新当前Tree节点
2446
- if (!!this.children) {
2455
+ if (this.children) {
2447
2456
  for (const child of this.children) {
2448
2457
  child.dispose();
2449
2458
  }
@@ -2460,7 +2469,7 @@ class CompositeTreeNode extends TreeNode {
2460
2469
  }
2461
2470
  this.watcher.notifyDidProcessWatchEvent(this, event);
2462
2471
  });
2463
- this.isExpanded = !!parent ? false : true;
2472
+ this.isExpanded = parent ? false : true;
2464
2473
  this._branchSize = 0;
2465
2474
  if (!parent) {
2466
2475
  this.watchEvents = new Map();
@@ -2473,13 +2482,9 @@ class CompositeTreeNode extends TreeNode {
2473
2482
  }
2474
2483
  static defaultSortComparator(a, b) {
2475
2484
  if (a.constructor === b.constructor) {
2476
- return a.name > b.name ? 1
2477
- : a.name < b.name ? -1
2478
- : 0;
2485
+ return a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
2479
2486
  }
2480
- return CompositeTreeNode.is(a) ? -1
2481
- : CompositeTreeNode.is(b) ? 1
2482
- : 0;
2487
+ return CompositeTreeNode.is(a) ? -1 : CompositeTreeNode.is(b) ? 1 : 0;
2483
2488
  }
2484
2489
  static is(node) {
2485
2490
  return !!node && 'children' in node;
@@ -2657,7 +2662,7 @@ class CompositeTreeNode extends TreeNode {
2657
2662
  // 获取当前节点下所有展开的节点路径
2658
2663
  getAllExpandedNodePath() {
2659
2664
  let paths = [];
2660
- if (!!this.children) {
2665
+ if (this.children) {
2661
2666
  for (const child of this.children) {
2662
2667
  if (child.isExpanded) {
2663
2668
  paths.push(child.path);
@@ -2673,7 +2678,7 @@ class CompositeTreeNode extends TreeNode {
2673
2678
  // 获取当前节点下所有折叠的节点路径
2674
2679
  getAllCollapsedNodePath() {
2675
2680
  let paths = [];
2676
- if (!!this.children) {
2681
+ if (this.children) {
2677
2682
  for (const child of this.children) {
2678
2683
  if (!CompositeTreeNode.is(child)) {
2679
2684
  continue;
@@ -2699,7 +2704,7 @@ class CompositeTreeNode extends TreeNode {
2699
2704
  if (needReload) {
2700
2705
  yield this.hardReloadChildren(true);
2701
2706
  }
2702
- while (forceLoadPath = expandedPaths.shift()) {
2707
+ while ((forceLoadPath = expandedPaths.shift())) {
2703
2708
  const relativePath = new utils_1.Path(this.path).relative(new utils_1.Path(forceLoadPath));
2704
2709
  if (!relativePath) {
2705
2710
  break;
@@ -2763,7 +2768,7 @@ class CompositeTreeNode extends TreeNode {
2763
2768
  }
2764
2769
  else {
2765
2770
  // 仅需处理存在子节点的情况,否则将会影响刷新后的节点长度
2766
- if (!!this.children) {
2771
+ if (this.children) {
2767
2772
  // 清理子节点,等待下次展开时更新
2768
2773
  if (!!this.children && this.parent) {
2769
2774
  for (const child of this.children) {
@@ -2782,9 +2787,7 @@ class CompositeTreeNode extends TreeNode {
2782
2787
  if (!CompositeTreeNode.isRoot(this)) {
2783
2788
  return;
2784
2789
  }
2785
- collapsedPaths = collapsedPaths.sort((a, b) => {
2786
- return utils_1.Path.pathDepth(a) - utils_1.Path.pathDepth(b);
2787
- });
2790
+ collapsedPaths = collapsedPaths.sort((a, b) => utils_1.Path.pathDepth(a) - utils_1.Path.pathDepth(b));
2788
2791
  let path;
2789
2792
  while (collapsedPaths.length > 0) {
2790
2793
  path = collapsedPaths.pop();
@@ -2803,9 +2806,7 @@ class CompositeTreeNode extends TreeNode {
2803
2806
  if (!CompositeTreeNode.isRoot(this)) {
2804
2807
  return;
2805
2808
  }
2806
- expandedPaths = expandedPaths.sort((a, b) => {
2807
- return utils_1.Path.pathDepth(a) - utils_1.Path.pathDepth(b);
2808
- });
2809
+ expandedPaths = expandedPaths.sort((a, b) => utils_1.Path.pathDepth(a) - utils_1.Path.pathDepth(b));
2809
2810
  let path;
2810
2811
  while (expandedPaths.length > 0) {
2811
2812
  path = expandedPaths.pop();
@@ -2868,7 +2869,7 @@ class CompositeTreeNode extends TreeNode {
2868
2869
  }
2869
2870
  }
2870
2871
  }
2871
- const branchSizeIncrease = 1 + ((item instanceof CompositeTreeNode && item.expanded) ? item._branchSize : 0);
2872
+ const branchSizeIncrease = 1 + (item instanceof CompositeTreeNode && item.expanded ? item._branchSize : 0);
2872
2873
  if (this._children) {
2873
2874
  this._children.push(item);
2874
2875
  this._children.sort(this._tree.sortComparator || CompositeTreeNode.defaultSortComparator);
@@ -2890,7 +2891,9 @@ class CompositeTreeNode extends TreeNode {
2890
2891
  const leadingSibling = this._children[relativeInsertionIndex - 1];
2891
2892
  if (leadingSibling) {
2892
2893
  const siblingIdx = master._flattenedBranch.indexOf(leadingSibling.id);
2893
- relativeInsertionIndex = siblingIdx + ((leadingSibling instanceof CompositeTreeNode && leadingSibling.expanded) ? leadingSibling._branchSize : 0);
2894
+ relativeInsertionIndex =
2895
+ siblingIdx +
2896
+ (leadingSibling instanceof CompositeTreeNode && leadingSibling.expanded ? leadingSibling._branchSize : 0);
2894
2897
  }
2895
2898
  else {
2896
2899
  relativeInsertionIndex = master._flattenedBranch.indexOf(this.id);
@@ -2932,7 +2935,7 @@ class CompositeTreeNode extends TreeNode {
2932
2935
  return;
2933
2936
  }
2934
2937
  this._children.splice(idx, 1);
2935
- const branchSizeDecrease = 1 + ((item instanceof CompositeTreeNode && item.expanded) ? item._branchSize : 0);
2938
+ const branchSizeDecrease = 1 + (item instanceof CompositeTreeNode && item.expanded ? item._branchSize : 0);
2936
2939
  this._branchSize -= branchSizeDecrease;
2937
2940
  // 逐级往上查找节点的父节点,并沿途裁剪分支数
2938
2941
  let master = this;
@@ -2971,7 +2974,7 @@ class CompositeTreeNode extends TreeNode {
2971
2974
  const newP = new utils_1.Path(newPath);
2972
2975
  const to = newP.dir.toString();
2973
2976
  const destDir = to === from ? this : TreeNode.getTreeNodeByPath(to);
2974
- if (!(CompositeTreeNode.is(destDir))) {
2977
+ if (!CompositeTreeNode.is(destDir)) {
2975
2978
  this.unlinkItem(item);
2976
2979
  return;
2977
2980
  }
@@ -3068,7 +3071,7 @@ class CompositeTreeNode extends TreeNode {
3068
3071
  if (this.hardReloadPromise) {
3069
3072
  return this.hardReloadPromise;
3070
3073
  }
3071
- this.hardReloadPromise = new Promise((res) => this.hardReloadPResolver = res);
3074
+ this.hardReloadPromise = new Promise((res) => (this.hardReloadPResolver = res));
3072
3075
  this.hardReloadPromise.then(() => {
3073
3076
  this.hardReloadPromise = null;
3074
3077
  this.hardReloadPResolver = null;
@@ -3202,7 +3205,7 @@ class CompositeTreeNode extends TreeNode {
3202
3205
  let preItem;
3203
3206
  let preItemPath = '';
3204
3207
  let name;
3205
- while (name = pathFlag.shift()) {
3208
+ while ((name = pathFlag.shift())) {
3206
3209
  let item = next.find((c) => c.name.indexOf(name) === 0);
3207
3210
  if (item && pathFlag.length === 0) {
3208
3211
  return item;
@@ -3313,11 +3316,11 @@ class CompositeTreeNode extends TreeNode {
3313
3316
  return TreeNode.getTreeNodeById(id);
3314
3317
  }
3315
3318
  /**
3316
- * 根据节点路径获取节点
3317
- * @param {string} path
3318
- * @returns
3319
- * @memberof CompositeTreeNode
3320
- */
3319
+ * 根据节点路径获取节点
3320
+ * @param {string} path
3321
+ * @returns
3322
+ * @memberof CompositeTreeNode
3323
+ */
3321
3324
  getTreeNodeByPath(path) {
3322
3325
  return TreeNode.getTreeNodeByPath(path);
3323
3326
  }
@@ -4275,7 +4278,7 @@ const warning_1 = (0, tslib_1.__importDefault)(__webpack_require__(23));
4275
4278
  const icon_1 = __webpack_require__(24);
4276
4279
  __webpack_require__(347);
4277
4280
  function isUndefined(obj) {
4278
- return typeof (obj) === 'undefined';
4281
+ return typeof obj === 'undefined';
4279
4282
  }
4280
4283
  // copied from https://github.com/ant-design/ant-design/blob/master/components/input/Input.tsx#L33
4281
4284
  // simulate a Form.ChangeEvent in react.js
@@ -4304,8 +4307,8 @@ exports.Input = react_1.default.forwardRef((props, ref) => {
4304
4307
  const inputRef = react_1.default.useRef(null);
4305
4308
  const [isDirty, setIsDirty] = react_1.default.useState(false);
4306
4309
  // handle initial value from `value` or `defaultValue`
4307
- const [inputValue, setInputValue] = react_1.default.useState(() => ((value !== null && value !== void 0 ? value : defaultValue) || ''));
4308
- const [preValue, setPrevValue] = react_1.default.useState(() => ((value !== null && value !== void 0 ? value : defaultValue) || ''));
4310
+ const [inputValue, setInputValue] = react_1.default.useState(() => (value !== null && value !== void 0 ? value : defaultValue) || '');
4311
+ const [preValue, setPrevValue] = react_1.default.useState(() => (value !== null && value !== void 0 ? value : defaultValue) || '');
4309
4312
  // make `ref` to input works
4310
4313
  react_1.default.useImperativeHandle(ref, () => inputRef.current);
4311
4314
  // handle `selection`
@@ -4366,14 +4369,13 @@ exports.Input = react_1.default.forwardRef((props, ref) => {
4366
4369
  onMouseDown: (e) => {
4367
4370
  e.preventDefault();
4368
4371
  },
4369
- } : {};
4372
+ }
4373
+ : {};
4370
4374
  const addonRender = (addonNodes, klassName) => {
4371
4375
  if (!addonNodes) {
4372
4376
  return null;
4373
4377
  }
4374
- return (react_1.default.createElement("div", Object.assign({ className: (0, classnames_1.default)('kt-input-addon', klassName) }, persistFocusProps), react_1.default.Children.map(addonNodes, (child) => react_1.default.isValidElement(child)
4375
- ? react_1.default.cloneElement(child, persistFocusProps)
4376
- : null)));
4378
+ return (react_1.default.createElement("div", Object.assign({ className: (0, classnames_1.default)('kt-input-addon', klassName) }, persistFocusProps), react_1.default.Children.map(addonNodes, (child) => react_1.default.isValidElement(child) ? react_1.default.cloneElement(child, persistFocusProps) : null)));
4377
4379
  };
4378
4380
  const inputClx = (0, classnames_1.default)('kt-input', className, {
4379
4381
  [`kt-input-${size}`]: size,
@@ -4383,8 +4385,7 @@ exports.Input = react_1.default.forwardRef((props, ref) => {
4383
4385
  addonRender(addonBefore, 'kt-input-addon-before'),
4384
4386
  react_1.default.createElement("div", { className: 'kt-input-box' },
4385
4387
  react_1.default.createElement("input", Object.assign({ ref: inputRef, type: 'text', autoCapitalize: 'off', autoCorrect: 'off', autoComplete: 'off', spellCheck: false }, restProps, { value: inputValue, onChange: handleChange, onKeyDown: handleKeyDown })),
4386
- hasClear && inputValue
4387
- && react_1.default.createElement(icon_1.Icon, Object.assign({ className: 'kt-input-clear', icon: 'close-circle-fill', onClick: handleClearIconClick }, persistFocusProps))),
4388
+ hasClear && inputValue && (react_1.default.createElement(icon_1.Icon, Object.assign({ className: 'kt-input-clear', icon: 'close-circle-fill', onClick: handleClearIconClick }, persistFocusProps)))),
4388
4389
  addonRender(addonAfterNode, 'kt-input-addon-after')));
4389
4390
  });
4390
4391
  exports.Input.displayName = 'KTInput';
@@ -4792,10 +4793,10 @@ exports.isLinux = exports.isOSX = exports.isWindows = void 0;
4792
4793
  // Modify from @opensumi/ide-core-common/src/os.ts
4793
4794
  function is(userAgent, platform) {
4794
4795
  if (global.hasOwnProperty('platform')) {
4795
- return (global.platform === platform);
4796
+ return global.platform === platform;
4796
4797
  }
4797
- if ((typeof process !== 'undefined') && process.platform !== 'browser') {
4798
- return (process.platform === platform);
4798
+ if (typeof process !== 'undefined' && process.platform !== 'browser') {
4799
+ return process.platform === platform;
4799
4800
  }
4800
4801
  if (typeof navigator !== 'undefined') {
4801
4802
  if (navigator.userAgent && navigator.userAgent.indexOf(userAgent) >= 0) {
@@ -5071,7 +5072,7 @@ const react_custom_scrollbars_1 = __webpack_require__(509);
5071
5072
  const classnames_1 = (0, tslib_1.__importDefault)(__webpack_require__(7));
5072
5073
  __webpack_require__(528);
5073
5074
  const throttle_1 = (0, tslib_1.__importDefault)(__webpack_require__(238));
5074
- const Scrollbars = ({ onScroll, onUpdate, forwardedRef, style, children, className, onReachBottom }) => {
5075
+ const Scrollbars = ({ onScroll, onUpdate, forwardedRef, style, children, className, onReachBottom, }) => {
5075
5076
  const refSetter = react_1.default.useCallback((scrollbarsRef) => {
5076
5077
  if (scrollbarsRef) {
5077
5078
  forwardedRef && forwardedRef(scrollbarsRef.view);
@@ -5087,14 +5088,14 @@ const Scrollbars = ({ onScroll, onUpdate, forwardedRef, style, children, classNa
5087
5088
  return;
5088
5089
  }
5089
5090
  const pad = 100;
5090
- const t = ((scrollTop + pad) / (scrollHeight - clientHeight));
5091
+ const t = (scrollTop + pad) / (scrollHeight - clientHeight);
5091
5092
  if (t > 1) {
5092
5093
  onReachBottom && onReachBottom();
5093
5094
  }
5094
5095
  }, 100), [onReachBottom]);
5095
5096
  const handleUpdate = (values) => {
5096
5097
  const { scrollTop } = values;
5097
- const shadowTopOpacity = 1 / 20 * Math.min(scrollTop, 20);
5098
+ const shadowTopOpacity = (1 / 20) * Math.min(scrollTop, 20);
5098
5099
  if (shadowTopRef) {
5099
5100
  shadowTopRef.style.opacity = String(shadowTopOpacity);
5100
5101
  }
@@ -5108,11 +5109,13 @@ const Scrollbars = ({ onScroll, onUpdate, forwardedRef, style, children, classNa
5108
5109
  var { style } = _a, props = (0, tslib_1.__rest)(_a, ["style"]);
5109
5110
  return react_1.default.createElement("div", Object.assign({}, props, { className: 'scrollbar-thumb-horizontal' }));
5110
5111
  } },
5111
- react_1.default.createElement("div", { ref: (ref) => { shadowTopRef = ref; }, className: 'scrollbar-decoration' }),
5112
+ react_1.default.createElement("div", { ref: (ref) => {
5113
+ shadowTopRef = ref;
5114
+ }, className: 'scrollbar-decoration' }),
5112
5115
  children));
5113
5116
  };
5114
5117
  exports.Scrollbars = Scrollbars;
5115
- exports.ScrollbarsVirtualList = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(exports.Scrollbars, Object.assign({}, props, { forwardedRef: ref }))));
5118
+ exports.ScrollbarsVirtualList = react_1.default.forwardRef((props, ref) => react_1.default.createElement(exports.Scrollbars, Object.assign({}, props, { forwardedRef: ref })));
5116
5119
 
5117
5120
 
5118
5121
  /***/ }),
@@ -5490,7 +5493,7 @@ class Dropdown extends react_1.default.Component {
5490
5493
  return fixedModeOverlay;
5491
5494
  };
5492
5495
  this.renderDropDown = () => {
5493
- const { prefixCls: customizePrefixCls, children, trigger, disabled, getPopupContainer, } = this.props;
5496
+ const { prefixCls: customizePrefixCls, children, trigger, disabled, getPopupContainer } = this.props;
5494
5497
  const prefixCls = customizePrefixCls || 'kt-dropdown';
5495
5498
  const child = react_1.default.Children.only(children);
5496
5499
  const dropdownTrigger = react_1.default.cloneElement(child, {
@@ -5965,7 +5968,7 @@ exports.IconContext = react_1.default.createContext({
5965
5968
  });
5966
5969
  function IconContextProvider(props) {
5967
5970
  return (react_1.default.createElement(exports.IconContext.Provider, { value: props.value },
5968
- react_1.default.createElement(exports.IconContext.Consumer, null, (value) => props.value === value ? props.children : null)));
5971
+ react_1.default.createElement(exports.IconContext.Consumer, null, (value) => (props.value === value ? props.children : null))));
5969
5972
  }
5970
5973
  exports.IconContextProvider = IconContextProvider;
5971
5974
  /**
@@ -5981,7 +5984,6 @@ exports.IconContextProvider = IconContextProvider;
5981
5984
  * );
5982
5985
  * ```
5983
5986
  */
5984
- // tslint:disable-next-line:only-arrow-functions
5985
5987
  const IconBase = function (props, ref) {
5986
5988
  const { size = 'small', loading, icon, iconClass, className, tooltip, rotate, anim, fill, disabled, onClick, children, resourceOptions } = props, restProps = (0, tslib_1.__rest)(props, ["size", "loading", "icon", "iconClass", "className", "tooltip", "rotate", "anim", "fill", "disabled", "onClick", "children", "resourceOptions"]);
5987
5989
  const iconShapeOptions = { rotate, anim, fill };
@@ -6015,7 +6017,7 @@ const IconBase = function (props, ref) {
6015
6017
  [`kt-icon-${size}`]: !!size,
6016
6018
  'kt-icon-clickable': !!onClick,
6017
6019
  'kt-icon-resource': !!resourceOptions,
6018
- 'expanded': !!resourceOptions && resourceOptions.isOpenedDirectory,
6020
+ expanded: !!resourceOptions && resourceOptions.isOpenedDirectory,
6019
6021
  }) }), children));
6020
6022
  };
6021
6023
  // for ts type usage for iconfont-cn.tsx
@@ -6109,10 +6111,11 @@ const react_1 = (0, tslib_1.__importDefault)(__webpack_require__(0));
6109
6111
  const classnames_1 = (0, tslib_1.__importDefault)(__webpack_require__(7));
6110
6112
  const modal_1 = __webpack_require__(357);
6111
6113
  __webpack_require__(411);
6112
- exports.Overlay = ((_a) => {
6114
+ const Overlay = (_a) => {
6113
6115
  var { maskClosable = false, closable = true, className, onClose, children, footer, title, getContainer } = _a, restProps = (0, tslib_1.__rest)(_a, ["maskClosable", "closable", "className", "onClose", "children", "footer", "title", "getContainer"]);
6114
6116
  return (react_1.default.createElement(modal_1.Modal, Object.assign({ footer: footer ? footer : null, maskClosable: maskClosable, closable: closable, onCancel: onClose, title: title, getContainer: getContainer, className: (0, classnames_1.default)('kt-overlay', className) }, restProps), children));
6115
- });
6117
+ };
6118
+ exports.Overlay = Overlay;
6116
6119
 
6117
6120
 
6118
6121
  /***/ }),
@@ -6714,7 +6717,7 @@ var RenderErrorType;
6714
6717
  })(RenderErrorType = exports.RenderErrorType || (exports.RenderErrorType = {}));
6715
6718
  const InnerElementType = react_1.default.forwardRef((props, ref) => {
6716
6719
  const _a = props, { style } = _a, rest = (0, tslib_1.__rest)(_a, ["style"]);
6717
- return react_1.default.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { height: `${parseFloat(style.height) + RecycleTree.PADDING_BOTTOM_SIZE}px` }) }, rest));
6720
+ return (react_1.default.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { height: `${parseFloat(style.height) + RecycleTree.PADDING_BOTTOM_SIZE}px` }) }, rest)));
6718
6721
  });
6719
6722
  class RecycleTree extends react_1.default.Component {
6720
6723
  constructor() {
@@ -6781,7 +6784,7 @@ class RecycleTree extends react_1.default.Component {
6781
6784
  };
6782
6785
  return () => {
6783
6786
  if (!this.batchUpdatePromise) {
6784
- this.batchUpdatePromise = new Promise((res) => this.batchUpdateResolver = res);
6787
+ this.batchUpdatePromise = new Promise((res) => (this.batchUpdateResolver = res));
6785
6788
  this.batchUpdatePromise.then(() => {
6786
6789
  this.batchUpdatePromise = null;
6787
6790
  this.batchUpdateResolver = null;
@@ -6795,18 +6798,12 @@ class RecycleTree extends react_1.default.Component {
6795
6798
  };
6796
6799
  })();
6797
6800
  // 使用箭头函数绑定当前this
6798
- this.promptNewTreeNode = (pathOrTreeNode) => {
6799
- return this.promptNew(pathOrTreeNode);
6800
- };
6801
- this.promptNewCompositeTreeNode = (pathOrTreeNode) => {
6802
- return this.promptNew(pathOrTreeNode, types_1.TreeNodeType.CompositeTreeNode);
6803
- };
6801
+ this.promptNewTreeNode = (pathOrTreeNode) => this.promptNew(pathOrTreeNode);
6802
+ this.promptNewCompositeTreeNode = (pathOrTreeNode) => this.promptNew(pathOrTreeNode, types_1.TreeNodeType.CompositeTreeNode);
6804
6803
  this.promptRename = (pathOrTreeNode, defaultName) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
6805
6804
  var _a;
6806
6805
  const { root } = this.props.model;
6807
- const node = (typeof pathOrTreeNode === 'string'
6808
- ? yield root.getTreeNodeByPath(pathOrTreeNode)
6809
- : pathOrTreeNode);
6806
+ const node = (typeof pathOrTreeNode === 'string' ? yield root.getTreeNodeByPath(pathOrTreeNode) : pathOrTreeNode);
6810
6807
  if (!tree_1.TreeNode.is(node) || tree_1.CompositeTreeNode.isRoot(node)) {
6811
6808
  throw new TypeError(`Cannot rename object of type ${typeof node}`);
6812
6809
  }
@@ -6825,7 +6822,7 @@ class RecycleTree extends react_1.default.Component {
6825
6822
  this.expandNode = (pathOrCompositeTreeNode) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
6826
6823
  const { root } = this.props.model;
6827
6824
  const directory = typeof pathOrCompositeTreeNode === 'string'
6828
- ? yield root.getTreeNodeByPath(pathOrCompositeTreeNode)
6825
+ ? (yield root.getTreeNodeByPath(pathOrCompositeTreeNode))
6829
6826
  : yield root.getTreeNodeByPath(pathOrCompositeTreeNode.path);
6830
6827
  if (directory && tree_1.CompositeTreeNode.is(directory)) {
6831
6828
  return directory.setExpanded(true);
@@ -6834,7 +6831,7 @@ class RecycleTree extends react_1.default.Component {
6834
6831
  this.collapseNode = (pathOrCompositeTreeNode) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
6835
6832
  const { root } = this.props.model;
6836
6833
  const directory = typeof pathOrCompositeTreeNode === 'string'
6837
- ? yield root.getTreeNodeByPath(pathOrCompositeTreeNode)
6834
+ ? (yield root.getTreeNodeByPath(pathOrCompositeTreeNode))
6838
6835
  : root.getTreeNodeByPath(pathOrCompositeTreeNode.path);
6839
6836
  if (directory && tree_1.CompositeTreeNode.is(directory)) {
6840
6837
  return directory.setCollapsed();
@@ -6848,9 +6845,7 @@ class RecycleTree extends react_1.default.Component {
6848
6845
  }
6849
6846
  this._isEnsuring = true;
6850
6847
  const { root } = this.props.model;
6851
- const node = typeof pathOrTreeNode === 'string'
6852
- ? yield root.forceLoadTreeNodeAtPath(pathOrTreeNode)
6853
- : pathOrTreeNode;
6848
+ const node = typeof pathOrTreeNode === 'string' ? yield root.forceLoadTreeNodeAtPath(pathOrTreeNode) : pathOrTreeNode;
6854
6849
  if (!tree_1.TreeNode.is(node) || tree_1.CompositeTreeNode.isRoot(node)) {
6855
6850
  // 异常
6856
6851
  return;
@@ -6882,7 +6877,8 @@ class RecycleTree extends react_1.default.Component {
6882
6877
  const { root } = this.props.model;
6883
6878
  // 存在新建输入框
6884
6879
  if (promptInsertionIdx > -1 &&
6885
- this.promptHandle && this.promptHandle.constructor === NewPromptHandle_1.NewPromptHandle &&
6880
+ this.promptHandle &&
6881
+ this.promptHandle.constructor === NewPromptHandle_1.NewPromptHandle &&
6886
6882
  !this.promptHandle.destroyed) {
6887
6883
  if (index === promptInsertionIdx) {
6888
6884
  cached = {
@@ -6934,7 +6930,7 @@ class RecycleTree extends react_1.default.Component {
6934
6930
  };
6935
6931
  // 过滤Root节点展示
6936
6932
  this.filterItems = (filter) => {
6937
- const { model: { root }, filterProvider } = this.props;
6933
+ const { model: { root }, filterProvider, } = this.props;
6938
6934
  this.filterWatcherDisposeCollection.dispose();
6939
6935
  this.idToFilterRendererPropsCache.clear();
6940
6936
  if (!filter) {
@@ -6973,14 +6969,12 @@ class RecycleTree extends react_1.default.Component {
6973
6969
  const node = item.original;
6974
6970
  idSets.add(node.id);
6975
6971
  let parent = node.parent;
6976
- idToRenderTemplate.set(node.id, () => {
6977
- return react_1.default.createElement("div", { style: {
6978
- flex: 1,
6979
- overflow: 'hidden',
6980
- textOverflow: 'ellipsis',
6981
- whiteSpace: 'nowrap',
6982
- }, dangerouslySetInnerHTML: { __html: item.string || '' } });
6983
- });
6972
+ idToRenderTemplate.set(node.id, () => (react_1.default.createElement("div", { style: {
6973
+ flex: 1,
6974
+ overflow: 'hidden',
6975
+ textOverflow: 'ellipsis',
6976
+ whiteSpace: 'nowrap',
6977
+ }, dangerouslySetInnerHTML: { __html: item.string || '' } })));
6984
6978
  // 不应包含根节点
6985
6979
  while (parent && !tree_1.CompositeTreeNode.isRoot(parent)) {
6986
6980
  idSets.add(parent.id);
@@ -7085,9 +7079,11 @@ class RecycleTree extends react_1.default.Component {
7085
7079
  }
7086
7080
  return Math.max(size, RecycleTree.DEFAULT_ITEM_HEIGHT);
7087
7081
  };
7088
- const itemStyle = overflow === 'ellipsis' ? style : Object.assign(Object.assign({}, style), { width: 'auto', minWidth: '100%', height: `${calcDynamicHeight()}px` });
7089
- return react_1.default.createElement("div", Object.assign({ ref: wrapRef, style: itemStyle, role: ((_g = item.accessibilityInformation) === null || _g === void 0 ? void 0 : _g.role) || 'treeiem' }, ariaInfo),
7090
- react_1.default.createElement(TreeNodeRendererWrap_1.NodeRendererWrap, { item: item, depth: item.depth, itemType: type, template: template, hasPrompt: !!this.promptHandle && !this.promptHandle.destroyed, expanded: tree_1.CompositeTreeNode.is(item) ? item.expanded : void 0 }, children));
7082
+ const itemStyle = overflow === 'ellipsis'
7083
+ ? style
7084
+ : Object.assign(Object.assign({}, style), { width: 'auto', minWidth: '100%', height: `${calcDynamicHeight()}px` });
7085
+ return (react_1.default.createElement("div", Object.assign({ ref: wrapRef, style: itemStyle, role: ((_g = item.accessibilityInformation) === null || _g === void 0 ? void 0 : _g.role) || 'treeiem' }, ariaInfo),
7086
+ react_1.default.createElement(TreeNodeRendererWrap_1.NodeRendererWrap, { item: item, depth: item.depth, itemType: type, template: template, hasPrompt: !!this.promptHandle && !this.promptHandle.destroyed, expanded: tree_1.CompositeTreeNode.is(item) ? item.expanded : void 0 }, children)));
7091
7087
  };
7092
7088
  this.layoutItem = () => {
7093
7089
  if (!this.props.supportDynamicHeights) {
@@ -7160,9 +7156,7 @@ class RecycleTree extends react_1.default.Component {
7160
7156
  var _a;
7161
7157
  return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
7162
7158
  const { root } = this.props.model;
7163
- let node = typeof pathOrTreeNode === 'string'
7164
- ? yield root.getTreeNodeByPath(pathOrTreeNode)
7165
- : pathOrTreeNode;
7159
+ let node = typeof pathOrTreeNode === 'string' ? yield root.getTreeNodeByPath(pathOrTreeNode) : pathOrTreeNode;
7166
7160
  if (type !== types_1.TreeNodeType.TreeNode && type !== types_1.TreeNodeType.CompositeTreeNode) {
7167
7161
  throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${type}`);
7168
7162
  }
@@ -7179,7 +7173,8 @@ class RecycleTree extends react_1.default.Component {
7179
7173
  const promptHandle = new NewPromptHandle_1.NewPromptHandle(type, node);
7180
7174
  this.promptHandle = promptHandle;
7181
7175
  this.promptTargetID = node.id;
7182
- if (node !== root && (!node.expanded || !root.isItemVisibleAtSurface(node))) {
7176
+ if (node !== root &&
7177
+ (!node.expanded || !root.isItemVisibleAtSurface(node))) {
7183
7178
  // 调用setExpanded即会在之后调用batchUpdate函数
7184
7179
  yield node.setExpanded(true);
7185
7180
  }
@@ -7279,12 +7274,13 @@ class RecycleTree extends react_1.default.Component {
7279
7274
  get adjustedRowCount() {
7280
7275
  const { root } = this.props.model;
7281
7276
  const { filter } = this.props;
7282
- if (!!filter) {
7277
+ if (filter) {
7283
7278
  return this.filterFlattenBranch.length;
7284
7279
  }
7285
- return (this.newPromptInsertionIndex > -1 &&
7286
- this.promptHandle && this.promptHandle.constructor === NewPromptHandle_1.NewPromptHandle &&
7287
- !this.promptHandle.destroyed)
7280
+ return this.newPromptInsertionIndex > -1 &&
7281
+ this.promptHandle &&
7282
+ this.promptHandle.constructor === NewPromptHandle_1.NewPromptHandle &&
7283
+ !this.promptHandle.destroyed
7288
7284
  ? root.branchSize + 1
7289
7285
  : root.branchSize;
7290
7286
  }
@@ -7313,9 +7309,7 @@ class RecycleTree extends react_1.default.Component {
7313
7309
  if (leaveBottomBlank) {
7314
7310
  addonProps.innerElementType = InnerElementType;
7315
7311
  }
7316
- return (supportDynamicHeights
7317
- ? react_1.default.createElement(react_window_1.VariableSizeList, Object.assign({ ref: this.listRef, itemSize: this.getItemSize.bind(this) }, addonProps), this.renderItem)
7318
- : react_1.default.createElement(react_window_1.FixedSizeList, Object.assign({ ref: this.listRef, itemSize: itemHeight }, addonProps), this.renderItem));
7312
+ return supportDynamicHeights ? (react_1.default.createElement(react_window_1.VariableSizeList, Object.assign({ ref: this.listRef, itemSize: this.getItemSize.bind(this) }, addonProps), this.renderItem)) : (react_1.default.createElement(react_window_1.FixedSizeList, Object.assign({ ref: this.listRef, itemSize: itemHeight }, addonProps), this.renderItem));
7319
7313
  }
7320
7314
  }
7321
7315
  exports.RecycleTree = RecycleTree;
@@ -7326,9 +7320,7 @@ RecycleTree.TRY_ENSURE_VISIBLE_MAX_TIMES = 5;
7326
7320
  RecycleTree.FILTER_FUZZY_OPTIONS = {
7327
7321
  pre: '<match>',
7328
7322
  post: '</match>',
7329
- extract: (node) => {
7330
- return (node === null || node === void 0 ? void 0 : node.name) || '';
7331
- },
7323
+ extract: (node) => (node === null || node === void 0 ? void 0 : node.name) || '',
7332
7324
  };
7333
7325
  RecycleTree.DEFAULT_OVER_SCAN_COUNT = 50;
7334
7326
 
@@ -7354,8 +7346,7 @@ var Event;
7354
7346
  return (listener, thisArgs = null, disposables) => {
7355
7347
  // we need this, in case the event fires during the listener call
7356
7348
  let didFire = false;
7357
- let result;
7358
- result = event((e) => {
7349
+ const result = event((e) => {
7359
7350
  if (didFire) {
7360
7351
  return;
7361
7352
  }
@@ -7387,7 +7378,10 @@ var Event;
7387
7378
  * the `each` function per each element.
7388
7379
  */
7389
7380
  function forEach(event, each) {
7390
- return snapshot((listener, thisArgs = null, disposables) => event((i) => { each(i); listener.call(thisArgs, i); }, null, disposables));
7381
+ return snapshot((listener, thisArgs = null, disposables) => event((i) => {
7382
+ each(i);
7383
+ listener.call(thisArgs, i);
7384
+ }, null, disposables));
7391
7385
  }
7392
7386
  Event.forEach = forEach;
7393
7387
  function filter(event, filter) {
@@ -7647,7 +7641,7 @@ class LeakageMonitor {
7647
7641
  this._stacks = new Map();
7648
7642
  }
7649
7643
  const stack = new Error().stack.split('\n').slice(3).join('\n');
7650
- const count = (this._stacks.get(stack) || 0);
7644
+ const count = this._stacks.get(stack) || 0;
7651
7645
  this._stacks.set(stack, count + 1);
7652
7646
  this._warnCountdown -= 1;
7653
7647
  if (this._warnCountdown <= 0) {
@@ -7663,13 +7657,11 @@ class LeakageMonitor {
7663
7657
  topCount = count;
7664
7658
  }
7665
7659
  });
7666
- // tslint:disable-next-line:no-console
7667
7660
  console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`);
7668
- // tslint:disable-next-line:no-console
7669
7661
  console.warn(topStack);
7670
7662
  }
7671
7663
  return () => {
7672
- const count = (this._stacks.get(stack) || 0);
7664
+ const count = this._stacks.get(stack) || 0;
7673
7665
  this._stacks.set(stack, count - 1);
7674
7666
  };
7675
7667
  }
@@ -7678,9 +7670,10 @@ class Emitter {
7678
7670
  constructor(options) {
7679
7671
  this._disposed = false;
7680
7672
  this._options = options;
7681
- this._leakageMon = _globalLeakWarningThreshold > 0
7682
- ? new LeakageMonitor(this._options && this._options.leakWarningThreshold)
7683
- : undefined;
7673
+ this._leakageMon =
7674
+ _globalLeakWarningThreshold > 0
7675
+ ? new LeakageMonitor(this._options && this._options.leakWarningThreshold)
7676
+ : undefined;
7684
7677
  }
7685
7678
  /**
7686
7679
  * For the public to allow to subscribe
@@ -7708,8 +7701,7 @@ class Emitter {
7708
7701
  if (this._leakageMon) {
7709
7702
  removeMonitor = this._leakageMon.check(this._listeners.size);
7710
7703
  }
7711
- let result;
7712
- result = {
7704
+ const result = {
7713
7705
  dispose: () => {
7714
7706
  if (removeMonitor) {
7715
7707
  removeMonitor();
@@ -7718,7 +7710,7 @@ class Emitter {
7718
7710
  if (!this._disposed) {
7719
7711
  remove();
7720
7712
  if (this._options && this._options.onLastListenerRemove) {
7721
- const hasListeners = (this._listeners && !this._listeners.isEmpty());
7713
+ const hasListeners = this._listeners && !this._listeners.isEmpty();
7722
7714
  if (!hasListeners) {
7723
7715
  this._options.onLastListenerRemove(this);
7724
7716
  }
@@ -7751,16 +7743,11 @@ class Emitter {
7751
7743
  }
7752
7744
  while (this._deliveryQueue.size > 0) {
7753
7745
  const [listener, event] = this._deliveryQueue.shift();
7754
- try {
7755
- if (typeof listener === 'function') {
7756
- listener.call(undefined, event);
7757
- }
7758
- else {
7759
- listener[0].call(listener[1], event);
7760
- }
7746
+ if (typeof listener === 'function') {
7747
+ listener.call(undefined, event);
7761
7748
  }
7762
- catch (e) {
7763
- throw (e);
7749
+ else {
7750
+ listener[0].call(listener[1], event);
7764
7751
  }
7765
7752
  }
7766
7753
  }
@@ -7789,31 +7776,26 @@ class Emitter {
7789
7776
  });
7790
7777
  while (this._deliveryQueue.size > 0) {
7791
7778
  const [listener, event] = this._deliveryQueue.shift();
7792
- try {
7793
- const promise = (() => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
7794
- try {
7795
- if (typeof listener === 'function') {
7796
- return {
7797
- result: yield listener.call(undefined, event),
7798
- };
7799
- }
7800
- else {
7801
- return {
7802
- result: yield listener[0].call(listener[1], event),
7803
- };
7804
- }
7779
+ const promise = (() => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
7780
+ try {
7781
+ if (typeof listener === 'function') {
7782
+ return {
7783
+ result: (yield listener.call(undefined, event)),
7784
+ };
7805
7785
  }
7806
- catch (e) {
7786
+ else {
7807
7787
  return {
7808
- err: e,
7788
+ result: (yield listener[0].call(listener[1], event)),
7809
7789
  };
7810
7790
  }
7811
- }))();
7812
- promises.push(Promise.race([timeoutPromise, promise]));
7813
- }
7814
- catch (e) {
7815
- throw (e);
7816
- }
7791
+ }
7792
+ catch (e) {
7793
+ return {
7794
+ err: e,
7795
+ };
7796
+ }
7797
+ }))();
7798
+ promises.push(Promise.race([timeoutPromise, promise]));
7817
7799
  }
7818
7800
  return Promise.all(promises);
7819
7801
  }
@@ -7896,6 +7878,7 @@ var WaitUntilEvent;
7896
7878
  emitter.fire(asyncEvent);
7897
7879
  // Asynchronous calls to `waitUntil` should fail.
7898
7880
  Object.freeze(waitables);
7881
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7899
7882
  // @ts-ignore
7900
7883
  delete asyncEvent['waitUntil'];
7901
7884
  if (!waitables.length) {
@@ -8064,7 +8047,7 @@ exports.LinkedList = LinkedList;
8064
8047
 
8065
8048
  "use strict";
8066
8049
 
8067
- /*---------------------------------------------------------------------------------------------
8050
+ /* ---------------------------------------------------------------------------------------------
8068
8051
  * Copyright (c) Microsoft Corporation. All rights reserved.
8069
8052
  * Licensed under the MIT License. See License.txt in the project root for license information.
8070
8053
  *--------------------------------------------------------------------------------------------*/
@@ -8083,11 +8066,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
8083
8066
  exports.Process = void 0;
8084
8067
  // Modify from @opensumi/ide-core-common/src/process.ts
8085
8068
  const os_1 = __webpack_require__(158);
8086
- const safeProcess = (typeof process === 'undefined') ? {
8087
- cwd() { return '/'; },
8088
- env: Object.create(null),
8089
- get platform() { return os_1.isWindows ? 'win32' : os_1.isOSX ? 'darwin' : 'linux'; },
8090
- } : process;
8069
+ const safeProcess = typeof process === 'undefined'
8070
+ ? {
8071
+ cwd() {
8072
+ return '/';
8073
+ },
8074
+ env: Object.create(null),
8075
+ get platform() {
8076
+ return os_1.isWindows ? 'win32' : os_1.isOSX ? 'darwin' : 'linux';
8077
+ },
8078
+ }
8079
+ : process;
8091
8080
  var Process;
8092
8081
  (function (Process) {
8093
8082
  Process.cwd = safeProcess.cwd;
@@ -8245,7 +8234,7 @@ class Decoration {
8245
8234
  if (existingFlags === flags) {
8246
8235
  return;
8247
8236
  }
8248
- if (!(TreeNode_1.TreeNode.is(target))) {
8237
+ if (!TreeNode_1.TreeNode.is(target)) {
8249
8238
  return;
8250
8239
  }
8251
8240
  this._appliedTargets.set(target, flags);
@@ -8282,7 +8271,7 @@ class Decoration {
8282
8271
  if (existingFlags === flags) {
8283
8272
  return;
8284
8273
  }
8285
- if (!(TreeNode_1.TreeNode.is(target))) {
8274
+ if (!TreeNode_1.TreeNode.is(target)) {
8286
8275
  return;
8287
8276
  }
8288
8277
  this._negatedTargets.set(target, flags);
@@ -8421,8 +8410,10 @@ class CompositeDecoration {
8421
8410
  }
8422
8411
  add(decoration) {
8423
8412
  const applicationMode = decoration.appliedTargets.get(this.target);
8424
- const applicableToSelf = applicationMode && (applicationMode === Decoration_1.TargetMatchMode.Self || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8425
- const applicableToChildren = applicationMode && (applicationMode === Decoration_1.TargetMatchMode.Children || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8413
+ const applicableToSelf = applicationMode &&
8414
+ (applicationMode === Decoration_1.TargetMatchMode.Self || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8415
+ const applicableToChildren = applicationMode &&
8416
+ (applicationMode === Decoration_1.TargetMatchMode.Children || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8426
8417
  if (this.type === CompositeDecorationType.Applicable && !applicableToSelf) {
8427
8418
  return;
8428
8419
  }
@@ -8491,7 +8482,7 @@ class CompositeDecoration {
8491
8482
  }
8492
8483
  selfOwn(reason, decoration) {
8493
8484
  if (this.selfOwned) {
8494
- throw new Error(`CompositeDecoration is already self owned`);
8485
+ throw new Error('CompositeDecoration is already self owned');
8495
8486
  }
8496
8487
  const parent = this.parent;
8497
8488
  this.selfOwned = true;
@@ -8531,14 +8522,16 @@ class CompositeDecoration {
8531
8522
  }
8532
8523
  processCompositeAlteration(reason, decoration) {
8533
8524
  if (!this.selfOwned) {
8534
- throw new Error(`CompositeDecoration is not self owned`);
8525
+ throw new Error('CompositeDecoration is not self owned');
8535
8526
  }
8536
8527
  if (reason === ChangeReason.UnTargetDecoration) {
8537
8528
  const disposable = this.renderedDecorations.get(decoration);
8538
8529
  if (disposable) {
8539
8530
  const applicationMode = decoration.appliedTargets.get(this.target);
8540
- const applicableToSelf = applicationMode && (applicationMode === Decoration_1.TargetMatchMode.Self || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8541
- const applicableToChildren = applicationMode && (applicationMode === Decoration_1.TargetMatchMode.Children || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8531
+ const applicableToSelf = applicationMode &&
8532
+ (applicationMode === Decoration_1.TargetMatchMode.Self || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8533
+ const applicableToChildren = applicationMode &&
8534
+ (applicationMode === Decoration_1.TargetMatchMode.Children || applicationMode === Decoration_1.TargetMatchMode.SelfAndChildren);
8542
8535
  if (applicableToSelf && this.type === CompositeDecorationType.Applicable) {
8543
8536
  return false;
8544
8537
  }
@@ -8598,13 +8591,20 @@ class CompositeDecoration {
8598
8591
  this.notifyClasslistChange(false);
8599
8592
  }
8600
8593
  }
8601
- else if (this.selfOwned && reason === ChangeReason.UnTargetDecoration && decoration && this.renderedDecorations.has(decoration)) {
8594
+ else if (this.selfOwned &&
8595
+ reason === ChangeReason.UnTargetDecoration &&
8596
+ decoration &&
8597
+ this.renderedDecorations.has(decoration)) {
8602
8598
  this.processCompositeAlteration(reason, decoration);
8603
8599
  if (notifyListeners) {
8604
8600
  this.notifyClasslistChange(false);
8605
8601
  }
8606
8602
  }
8607
- else if (this.selfOwned && reason === ChangeReason.TargetDecoration && decoration && this.processCompositeAlteration(reason, decoration) && notifyListeners) {
8603
+ else if (this.selfOwned &&
8604
+ reason === ChangeReason.TargetDecoration &&
8605
+ decoration &&
8606
+ this.processCompositeAlteration(reason, decoration) &&
8607
+ notifyListeners) {
8608
8608
  this.notifyClasslistChange(false);
8609
8609
  }
8610
8610
  else if (!this.selfOwned && notifyListeners) {
@@ -8899,7 +8899,7 @@ exports.LocalizeContext = react_1.default.createContext({
8899
8899
  exports.LocalizeContext.displayName = 'LocalizeContext';
8900
8900
  function LocalizeContextProvider(props) {
8901
8901
  return (react_1.default.createElement(exports.LocalizeContext.Provider, { value: props.value },
8902
- react_1.default.createElement(exports.LocalizeContext.Consumer, null, (value) => props.value === value ? props.children : null)));
8902
+ react_1.default.createElement(exports.LocalizeContext.Consumer, null, (value) => (props.value === value ? props.children : null))));
8903
8903
  }
8904
8904
  exports.LocalizeContextProvider = LocalizeContextProvider;
8905
8905
  function ComponentContextProvider(props) {
@@ -8954,7 +8954,7 @@ const ClickOutside = (_a) => {
8954
8954
  });
8955
8955
  };
8956
8956
  }, [mouseEvents]);
8957
- return react_1.default.createElement("div", Object.assign({}, restProps, { ref: $containerEl }), children);
8957
+ return (react_1.default.createElement("div", Object.assign({}, restProps, { ref: $containerEl }), children));
8958
8958
  };
8959
8959
  exports.ClickOutside = ClickOutside;
8960
8960
 
@@ -16322,9 +16322,7 @@ const util_1 = __webpack_require__(128);
16322
16322
  // source code from '@ant-design/icons'
16323
16323
  const customCache = new Set();
16324
16324
  function isValidCustomScriptUrl(scriptUrl) {
16325
- return Boolean(typeof scriptUrl === 'string'
16326
- && scriptUrl.length
16327
- && !customCache.has(scriptUrl));
16325
+ return Boolean(typeof scriptUrl === 'string' && scriptUrl.length && !customCache.has(scriptUrl));
16328
16326
  }
16329
16327
  function createScriptUrlElements(scriptUrls, index = 0) {
16330
16328
  const currentScriptUrl = scriptUrls[index];
@@ -16404,7 +16402,7 @@ const classnames_1 = (0, tslib_1.__importDefault)(__webpack_require__(7));
16404
16402
  __webpack_require__(345);
16405
16403
  const Badge = (_a) => {
16406
16404
  var { className, children } = _a, restProps = (0, tslib_1.__rest)(_a, ["className", "children"]);
16407
- return react_1.default.createElement("span", Object.assign({ className: (0, classnames_1.default)('kt-badge', className) }, restProps), children);
16405
+ return (react_1.default.createElement("span", Object.assign({ className: (0, classnames_1.default)('kt-badge', className) }, restProps), children));
16408
16406
  };
16409
16407
  exports.Badge = Badge;
16410
16408
 
@@ -16425,9 +16423,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
16425
16423
  exports.TextArea = void 0;
16426
16424
  const tslib_1 = __webpack_require__(3);
16427
16425
  const react_1 = (0, tslib_1.__importDefault)(__webpack_require__(0));
16428
- const TextArea = () => {
16429
- return react_1.default.createElement("textarea", { name: '', id: '', cols: 30, rows: 10 });
16430
- };
16426
+ const TextArea = () => react_1.default.createElement("textarea", { name: '', id: '', cols: 30, rows: 10 });
16431
16427
  exports.TextArea = TextArea;
16432
16428
  exports.TextArea.displayName = 'KTTextArea';
16433
16429
 
@@ -16468,7 +16464,7 @@ exports.ValidateInput = react_1.default.forwardRef((_a, ref) => {
16468
16464
  (0, warning_1.default)(!validateMessage || validateMessage.type !== VALIDATE_TYPE.WRANING, '`VALIDATE_TYPE.WRANING` was a wrong typo, please use `VALIDATE_TYPE.WARNING` instead');
16469
16465
  const validateClx = (0, classnames_1.default)({
16470
16466
  'validate-error': validateMessage && validateMessage.type === VALIDATE_TYPE.ERROR,
16471
- 'validate-warning': validateMessage && ([VALIDATE_TYPE.WRANING, VALIDATE_TYPE.WARNING]).includes(validateMessage.type),
16467
+ 'validate-warning': validateMessage && [VALIDATE_TYPE.WRANING, VALIDATE_TYPE.WARNING].includes(validateMessage.type),
16472
16468
  'validate-info': validateMessage && validateMessage.type === VALIDATE_TYPE.INFO,
16473
16469
  });
16474
16470
  const renderValidateMessage = () => {
@@ -16496,9 +16492,9 @@ exports.ValidateInput = react_1.default.forwardRef((_a, ref) => {
16496
16492
  onValueChange(value);
16497
16493
  }
16498
16494
  };
16499
- return react_1.default.createElement("div", { className: (0, classnames_1.default)('input-box', { popup }) },
16495
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)('input-box', { popup }) },
16500
16496
  react_1.default.createElement(Input_1.Input, Object.assign({ type: 'text', ref: ref, className: (0, classnames_1.default)(className, validateMessage, validateClx), onChange: handleChange }, restProps)),
16501
- renderValidateMessage());
16497
+ renderValidateMessage()));
16502
16498
  });
16503
16499
  exports.ValidateInput.displayName = 'KTValidateInput';
16504
16500
 
@@ -16673,7 +16669,9 @@ function getLabelWithChildrenProps(value, children, equals = (v1, v2) => v1 ===
16673
16669
  }
16674
16670
  return null;
16675
16671
  });
16676
- return currentOption ? (((_a = currentOption.props) === null || _a === void 0 ? void 0 : _a.label) || ((_b = currentOption.props) === null || _b === void 0 ? void 0 : _b.value)) : ((_c = nodes[0].props) === null || _c === void 0 ? void 0 : _c.label) || ((_d = nodes[0].props) === null || _d === void 0 ? void 0 : _d.value);
16672
+ return currentOption
16673
+ ? ((_a = currentOption.props) === null || _a === void 0 ? void 0 : _a.label) || ((_b = currentOption.props) === null || _b === void 0 ? void 0 : _b.value)
16674
+ : ((_c = nodes[0].props) === null || _c === void 0 ? void 0 : _c.label) || ((_d = nodes[0].props) === null || _d === void 0 ? void 0 : _d.value);
16677
16675
  }
16678
16676
  function isDataOptions(options) {
16679
16677
  if (!options) {
@@ -16702,18 +16700,14 @@ function isDataOptionGroup(option) {
16702
16700
  return option.groupName !== undefined && isDataOptions(option.options);
16703
16701
  }
16704
16702
  function defaultOptionRenderer(v) {
16705
- return react_1.default.createElement(react_1.default.Fragment, null,
16706
- v.data.iconClass ?
16707
- react_1.default.createElement("div", { className: (0, classnames_1.default)(v.data.iconClass, 'kt-select-option-icon') })
16708
- : undefined,
16709
- v.data.label);
16703
+ return (react_1.default.createElement(react_1.default.Fragment, null,
16704
+ v.data.iconClass ? react_1.default.createElement("div", { className: (0, classnames_1.default)(v.data.iconClass, 'kt-select-option-icon') }) : undefined,
16705
+ v.data.label));
16710
16706
  }
16711
16707
  function defaultGroupTitleRenderer({ group, index }) {
16712
- return react_1.default.createElement("div", { key: 'header_' + index, className: 'kt-select-group-header' },
16713
- group.iconClass ?
16714
- react_1.default.createElement("div", { className: (0, classnames_1.default)(group.iconClass, 'kt-select-option-icon') })
16715
- : undefined,
16716
- react_1.default.createElement("div", null, group.groupName));
16708
+ return (react_1.default.createElement("div", { key: 'header_' + index, className: 'kt-select-group-header' },
16709
+ group.iconClass ? react_1.default.createElement("div", { className: (0, classnames_1.default)(group.iconClass, 'kt-select-option-icon') }) : undefined,
16710
+ react_1.default.createElement("div", null, group.groupName)));
16717
16711
  }
16718
16712
  function defaultFilterOption(input, option) {
16719
16713
  let strToSearch = option.label;
@@ -16759,17 +16753,19 @@ function Select({ disabled, options, size = 'default', children, value, onChange
16759
16753
  function Wrapper(node, index) {
16760
16754
  var _a;
16761
16755
  if (typeof node === 'string' || typeof node === 'number') {
16762
- node = react_1.default.createElement(exports.Option, { value: node, label: String(node), key: `${node}_${index}` }, node);
16756
+ node = (react_1.default.createElement(exports.Option, { value: node, label: String(node), key: `${node}_${index}` }, node));
16763
16757
  }
16764
16758
  const disabled = ((_a = node.props) === null || _a === void 0 ? void 0 : _a.disabled) || false;
16765
- return react_1.default.createElement("div", { key: `${node.props.value}_${index}`, className: (0, classnames_1.default)({
16759
+ return (react_1.default.createElement("div", { key: `${node.props.value}_${index}`, className: (0, classnames_1.default)({
16766
16760
  ['kt-select-option-select']: value === node.props.value,
16767
- }), onClick: disabled ? noop : () => {
16768
- setOpen(false);
16769
- if (onChange) {
16770
- onChange(getValueWithProps(node, optionLabelProp));
16771
- }
16772
- } }, node);
16761
+ }), onClick: disabled
16762
+ ? noop
16763
+ : () => {
16764
+ setOpen(false);
16765
+ if (onChange) {
16766
+ onChange(getValueWithProps(node, optionLabelProp));
16767
+ }
16768
+ } }, node));
16773
16769
  }
16774
16770
  (0, react_2.useEffect)(() => {
16775
16771
  if (selectRef.current && overlayRef.current) {
@@ -16784,10 +16780,11 @@ function Select({ disabled, options, size = 'default', children, value, onChange
16784
16780
  }
16785
16781
  // 防止戳出下方屏幕
16786
16782
  const toBottom = window.innerHeight - boxRect.bottom;
16787
- if (!maxHeight || (toBottom < parseInt(maxHeight, 10))) {
16783
+ if (!maxHeight || toBottom < parseInt(maxHeight, 10)) {
16788
16784
  overlayRef.current.style.maxHeight = `${toBottom}px`;
16789
16785
  }
16790
- overlayRef.current.style.top = dropdownRenderType === 'fixed' ? `${boxRect.top + boxRect.height}px` : `${boxRect.height}px`;
16786
+ overlayRef.current.style.top =
16787
+ dropdownRenderType === 'fixed' ? `${boxRect.top + boxRect.height}px` : `${boxRect.height}px`;
16791
16788
  overlayRef.current.style.position = dropdownRenderType === 'fixed' ? 'fixed' : 'absolute';
16792
16789
  }
16793
16790
  if (open) {
@@ -16874,33 +16871,30 @@ function Select({ disabled, options, size = 'default', children, value, onChange
16874
16871
  const renderSelected = () => {
16875
16872
  const selected = getSelectedValue();
16876
16873
  const SC = selectedRenderer;
16877
- return react_1.default.createElement(react_1.default.Fragment, null,
16878
- SC ? react_1.default.createElement(SC, { data: selected }) :
16879
- react_1.default.createElement(react_1.default.Fragment, null,
16880
- selected.iconClass ? react_1.default.createElement("span", { className: (0, classnames_1.default)(selected.iconClass, 'kt-select-option-icon') }) : undefined,
16881
- react_1.default.createElement("span", { className: 'kt-select-option' }, selected.label)),
16882
- react_1.default.createElement(icon_1.Icon, { iconClass: (0, icon_1.getKaitianIcon)('down') }));
16883
- };
16884
- const renderSearch = () => {
16885
- return react_1.default.createElement("input", { className: (0, classnames_1.default)('kt-select-search'), onChange: (e) => { setSearchInput(e.target.value); }, value: searchInput, autoFocus: true, placeholder: searchPlaceholder || '' });
16874
+ return (react_1.default.createElement(react_1.default.Fragment, null,
16875
+ SC ? (react_1.default.createElement(SC, { data: selected })) : (react_1.default.createElement(react_1.default.Fragment, null,
16876
+ selected.iconClass ? (react_1.default.createElement("span", { className: (0, classnames_1.default)(selected.iconClass, 'kt-select-option-icon') })) : undefined,
16877
+ react_1.default.createElement("span", { className: 'kt-select-option' }, selected.label))),
16878
+ react_1.default.createElement(icon_1.Icon, { iconClass: (0, icon_1.getKaitianIcon)('down') })));
16886
16879
  };
16880
+ const renderSearch = () => (react_1.default.createElement("input", { className: (0, classnames_1.default)('kt-select-search'), onChange: (e) => {
16881
+ setSearchInput(e.target.value);
16882
+ }, value: searchInput, autoFocus: true, placeholder: searchPlaceholder || '' }));
16887
16883
  return (react_1.default.createElement("div", { className: (0, classnames_1.default)('kt-select-container', className), ref: selectRef },
16888
16884
  react_1.default.createElement("p", { className: selectClasses, onClick: toggleOpen, style: style }, showSearch && open ? renderSearch() : renderSelected()),
16889
- open && ((isDataOptions(options) || isDataOptionGroups(options)) ?
16890
- react_1.default.createElement(exports.SelectOptionsList, { optionRenderer: optionRenderer, options: options, equals: equals, optionStyle: optionStyle, currentValue: value, size: size, onSelect: (value) => {
16885
+ open &&
16886
+ (isDataOptions(options) || isDataOptionGroups(options) ? (react_1.default.createElement(exports.SelectOptionsList, { optionRenderer: optionRenderer, options: options, equals: equals, optionStyle: optionStyle, currentValue: value, size: size, onSelect: (value) => {
16891
16887
  if (onChange) {
16892
16888
  onChange(value);
16893
16889
  }
16894
16890
  setOpen(false);
16895
- }, groupTitleRenderer: groupTitleRenderer, className: optionsContainerClasses, style: { maxHeight: `${maxHeight}px` }, ref: overlayRef, footerComponent: footerComponent, headerComponent: headerComponent, emptyComponent: emptyComponent }) :
16891
+ }, groupTitleRenderer: groupTitleRenderer, className: optionsContainerClasses, style: { maxHeight: `${maxHeight}px` }, ref: overlayRef, footerComponent: footerComponent, headerComponent: headerComponent, emptyComponent: emptyComponent })) : (
16896
16892
  // FIXME: to be deprecated
16897
16893
  // 下面这种使用 children 的方式不够标准化,待废弃
16898
16894
  react_1.default.createElement("div", { className: optionsContainerClasses, style: { maxHeight: `${maxHeight}px` }, ref: overlayRef },
16899
- options && options.map((v, i) => {
16900
- return Wrapper(v, i);
16901
- }),
16895
+ options && options.map((v, i) => Wrapper(v, i)),
16902
16896
  children && flatChildren(children, Wrapper),
16903
- react_1.default.createElement("div", { className: 'kt-select-overlay', onClick: toggleOpen })))));
16897
+ react_1.default.createElement("div", { className: 'kt-select-overlay', onClick: toggleOpen }))))));
16904
16898
  }
16905
16899
  exports.Select = Select;
16906
16900
  exports.SelectOptionsList = react_1.default.forwardRef((props, ref) => {
@@ -16911,23 +16905,24 @@ exports.SelectOptionsList = react_1.default.forwardRef((props, ref) => {
16911
16905
  function renderWithGroup(groups) {
16912
16906
  return groups.map((group, index) => {
16913
16907
  const header = react_1.default.createElement(GT, { group: group, index: index });
16914
- return react_1.default.createElement(react_1.default.Fragment, { key: 'group_' + index },
16908
+ return (react_1.default.createElement(react_1.default.Fragment, { key: 'group_' + index },
16915
16909
  header,
16916
- renderWithoutGroup(group.options));
16910
+ renderWithoutGroup(group.options)));
16917
16911
  });
16918
16912
  }
16919
16913
  function renderWithoutGroup(options) {
16920
- return options && options.map((v, index) => {
16921
- const isCurrent = equals(currentValue, v.value);
16922
- return react_1.default.createElement(exports.Option, { value: index, key: index, className: (0, classnames_1.default)({
16923
- ['kt-select-option-select']: isCurrent,
16924
- ['kt-select-option-default']: true,
16925
- ['kt-option-with-check']: renderCheck,
16926
- }), onClick: () => onSelect(v.value), style: optionStyle },
16927
- renderCheck && equals(currentValue, v.value) ? react_1.default.createElement("div", { className: 'kt-option-check' },
16928
- react_1.default.createElement(icon_1.Icon, { icon: 'check' })) : undefined,
16929
- react_1.default.createElement(OPC, { data: v, isCurrent: isCurrent }));
16930
- });
16914
+ return (options &&
16915
+ options.map((v, index) => {
16916
+ const isCurrent = equals(currentValue, v.value);
16917
+ return (react_1.default.createElement(exports.Option, { value: index, key: index, className: (0, classnames_1.default)({
16918
+ ['kt-select-option-select']: isCurrent,
16919
+ ['kt-select-option-default']: true,
16920
+ ['kt-option-with-check']: renderCheck,
16921
+ }), onClick: () => onSelect(v.value), style: optionStyle },
16922
+ renderCheck && equals(currentValue, v.value) ? (react_1.default.createElement("div", { className: 'kt-option-check' },
16923
+ react_1.default.createElement(icon_1.Icon, { icon: 'check' }))) : undefined,
16924
+ react_1.default.createElement(OPC, { data: v, isCurrent: isCurrent })));
16925
+ }));
16931
16926
  }
16932
16927
  let isEmpty;
16933
16928
  if (isDataOptionGroups(options)) {
@@ -16936,13 +16931,12 @@ exports.SelectOptionsList = react_1.default.forwardRef((props, ref) => {
16936
16931
  else {
16937
16932
  isEmpty = options.length === 0;
16938
16933
  }
16939
- return react_1.default.createElement("div", { className: optionsContainerClasses, style: style, ref: ref, onClick: (event) => {
16934
+ return (react_1.default.createElement("div", { className: optionsContainerClasses, style: style, ref: ref, onClick: (event) => {
16940
16935
  event.stopPropagation();
16941
16936
  } },
16942
16937
  HC ? react_1.default.createElement(HC, null) : null,
16943
- isEmpty && EC ? react_1.default.createElement(EC, null) :
16944
- ((isDataOptionGroups(options)) ? renderWithGroup(options) : renderWithoutGroup(options)) || (EC && react_1.default.createElement(EC, null)),
16945
- FC ? react_1.default.createElement(FC, null) : null);
16938
+ isEmpty && EC ? (react_1.default.createElement(EC, null)) : ((isDataOptionGroups(options) ? renderWithGroup(options) : renderWithoutGroup(options)) || (EC && react_1.default.createElement(EC, null))),
16939
+ FC ? react_1.default.createElement(FC, null) : null));
16946
16940
  });
16947
16941
  // @ts-ignore
16948
16942
  function usePrevious(value) {
@@ -16982,9 +16976,9 @@ const Tabs = (props) => {
16982
16976
  return (react_1.default.createElement("div", Object.assign({}, restProps, { style: style, className: (0, classnames_1.default)('kt-tabs', className, { ['kt-tabs-mini']: mini }) }), tabs.map((tabContent, i) => {
16983
16977
  const selectedClassName = i === value ? 'kt-tab-selected' : '';
16984
16978
  if (typeof tabContent === 'string') {
16985
- return react_1.default.createElement("div", { key: i, className: (0, classnames_1.default)('kt-tab', selectedClassName, { ['kt-mini-tab']: mini }), onClick: onClick.bind(null, i) }, tabContent);
16979
+ return (react_1.default.createElement("div", { key: i, className: (0, classnames_1.default)('kt-tab', selectedClassName, { ['kt-mini-tab']: mini }), onClick: onClick.bind(null, i) }, tabContent));
16986
16980
  }
16987
- return react_1.default.createElement("div", { key: i, className: (0, classnames_1.default)('kt-custom-tab', selectedClassName, { ['kt-mini-tab']: mini }), onClick: onClick.bind(null, i) }, tabContent);
16981
+ return (react_1.default.createElement("div", { key: i, className: (0, classnames_1.default)('kt-custom-tab', selectedClassName, { ['kt-mini-tab']: mini }), onClick: onClick.bind(null, i) }, tabContent));
16988
16982
  })));
16989
16983
  };
16990
16984
  exports.Tabs = Tabs;
@@ -18706,15 +18700,17 @@ const DefaultButtons = ({ onCancel, onOk, cancelText, okText }) => (react_1.defa
18706
18700
  react_1.default.createElement(button_1.Button, { size: 'large', onClick: onOk }, okText || '确定')));
18707
18701
  const Dialog = ({ visible, onClose, closable, afterClose, messageType, icon, message, buttons, type = 'confirm', title, onOk, onCancel, okText, cancelText, getContainer, }) => {
18708
18702
  const { getIcon } = react_1.default.useContext(icon_1.IconContext);
18709
- return (react_1.default.createElement(overlay_1.Overlay, { visible: visible, onClose: onClose, title: type === 'basic' ? title : null, closable: type === 'basic', getContainer: getContainer, footer: type === 'basic' ? buttons || react_1.default.createElement(DefaultButtons, { onCancel: onCancel, onOk: onOk, okText: okText, cancelText: cancelText }) : undefined, afterClose: afterClose },
18703
+ return (react_1.default.createElement(overlay_1.Overlay, { visible: visible, onClose: onClose, title: type === 'basic' ? title : null, closable: type === 'basic', getContainer: getContainer, footer: type === 'basic'
18704
+ ? buttons || react_1.default.createElement(DefaultButtons, { onCancel: onCancel, onOk: onOk, okText: okText, cancelText: cancelText })
18705
+ : undefined, afterClose: afterClose },
18710
18706
  react_1.default.createElement(react_1.default.Fragment, null,
18711
18707
  react_1.default.createElement("div", { className: 'kt-dialog-content' },
18712
- icon && react_1.default.createElement("div", { style: { color: icon.color }, className: (0, classnames_1.default)('kt-dialog-icon', (0, icon_1.getKaitianIcon)(icon.className) || getIcon(icon.className)) }),
18708
+ icon && (react_1.default.createElement("div", { style: { color: icon.color }, className: (0, classnames_1.default)('kt-dialog-icon', (0, icon_1.getKaitianIcon)(icon.className) || getIcon(icon.className)) })),
18713
18709
  react_1.default.createElement("div", { className: 'kt-dialog-content_area' },
18714
18710
  type !== 'basic' && title && react_1.default.createElement("p", { className: 'kt-dialog-content_title' }, title),
18715
- typeof message === 'string' ? (react_1.default.createElement("span", { className: 'kt-dialog-message' }, message)) : message),
18716
- closable && type !== 'basic' && react_1.default.createElement("button", { className: (0, classnames_1.default)('kt-dialog-closex', (0, icon_1.getKaitianIcon)('close')), onClick: onClose })),
18717
- messageType !== common_1.MessageType.Empty && type !== 'basic' && react_1.default.createElement("div", { className: 'kt-dialog-buttonWrap' }, type === 'confirm' ? buttons || react_1.default.createElement(DefaultButtons, { onCancel: onCancel, onOk: onOk, okText: okText, cancelText: cancelText }) : react_1.default.createElement(button_1.Button, { size: 'large', onClick: onClose }, "\u77E5\u9053\u4E86")))));
18711
+ typeof message === 'string' ? react_1.default.createElement("span", { className: 'kt-dialog-message' }, message) : message),
18712
+ closable && type !== 'basic' && (react_1.default.createElement("button", { className: (0, classnames_1.default)('kt-dialog-closex', (0, icon_1.getKaitianIcon)('close')), onClick: onClose }))),
18713
+ messageType !== common_1.MessageType.Empty && type !== 'basic' && (react_1.default.createElement("div", { className: 'kt-dialog-buttonWrap' }, type === 'confirm' ? (buttons || react_1.default.createElement(DefaultButtons, { onCancel: onCancel, onOk: onOk, okText: okText, cancelText: cancelText })) : (react_1.default.createElement(button_1.Button, { size: 'large', onClick: onClose }, "\u77E5\u9053\u4E86")))))));
18718
18714
  };
18719
18715
  exports.Dialog = Dialog;
18720
18716
 
@@ -18759,7 +18755,7 @@ function open(message, type, closable = true, key, buttons, description, duratio
18759
18755
  ['kt-notification-error']: type === common_1.MessageType.Error,
18760
18756
  ['kt-notification-warn']: type === common_1.MessageType.Warning,
18761
18757
  }),
18762
- duration: duration !== undefined ? null : (DURATION[type] / 1000),
18758
+ duration: duration !== undefined ? null : DURATION[type] / 1000,
18763
18759
  onClose: () => {
18764
18760
  onClose && onClose();
18765
18761
  cachedArgs.delete(key);
@@ -18925,7 +18921,7 @@ function notice(args) {
18925
18921
  className: `${prefixCls}-icon ${prefixCls}-icon-${args.type}`,
18926
18922
  });
18927
18923
  }
18928
- const autoMarginTag = !args.description && iconNode ? (react_1.default.createElement("span", { className: `${prefixCls}-message-single-line-auto-margin` })) : null;
18924
+ const autoMarginTag = !args.description && iconNode ? react_1.default.createElement("span", { className: `${prefixCls}-message-single-line-auto-margin` }) : null;
18929
18925
  const { placement, top, bottom, getContainer, closeIcon } = args;
18930
18926
  getNotificationInstance({
18931
18927
  prefixCls: outerPrefixCls,
@@ -20322,9 +20318,9 @@ const Popover = (_a) => {
20322
20318
  }, [display]);
20323
20319
  return (react_1.default.createElement("div", Object.assign({}, Object.assign({}, restProps), { className: (0, classnames_1.default)('kt-popover', insertClass), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }),
20324
20320
  react_1.default.createElement("div", { className: (0, classnames_1.default)(popoverClass || '', 'kt-popover-content', `kt-popover-${position}`), ref: contentEl, id: id },
20325
- title && react_1.default.createElement("p", { className: (0, classnames_1.default)('kt-popover-title', titleClassName) },
20321
+ title && (react_1.default.createElement("p", { className: (0, classnames_1.default)('kt-popover-title', titleClassName) },
20326
20322
  title,
20327
- action && react_1.default.createElement(button_1.Button, { size: 'small', type: 'link', onClick: onClickAction || noop }, action)),
20323
+ action && (react_1.default.createElement(button_1.Button, { size: 'small', type: 'link', onClick: onClickAction || noop }, action)))),
20328
20324
  content || ''),
20329
20325
  react_1.default.createElement("span", { ref: childEl }, children)));
20330
20326
  };
@@ -20349,11 +20345,9 @@ const tslib_1 = __webpack_require__(3);
20349
20345
  const message_1 = (0, tslib_1.__importDefault)(__webpack_require__(473));
20350
20346
  __webpack_require__(489);
20351
20347
  function generateSnackbar(funName) {
20352
- return (content, duration) => {
20353
- return new Promise((resolve) => {
20354
- message_1.default[funName](content, duration, resolve);
20355
- });
20356
- };
20348
+ return (content, duration) => new Promise((resolve) => {
20349
+ message_1.default[funName](content, duration, resolve);
20350
+ });
20357
20351
  }
20358
20352
  exports.message = {
20359
20353
  success: generateSnackbar('success'),
@@ -20447,8 +20441,7 @@ function notice(args) {
20447
20441
  return result;
20448
20442
  }
20449
20443
  function isArgsProps(content) {
20450
- return (Object.prototype.toString.call(content) === '[object Object]' &&
20451
- !!content.content);
20444
+ return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;
20452
20445
  }
20453
20446
  const api = {
20454
20447
  open: notice,
@@ -20867,7 +20860,7 @@ const react_1 = (0, tslib_1.__importDefault)(__webpack_require__(0));
20867
20860
  const react_2 = __webpack_require__(0);
20868
20861
  const classnames_1 = (0, tslib_1.__importDefault)(__webpack_require__(7));
20869
20862
  __webpack_require__(491);
20870
- const Tooltip = ({ title, children, delay, }) => {
20863
+ const Tooltip = ({ title, children, delay }) => {
20871
20864
  const [visible, setVisible] = (0, react_2.useState)(false);
20872
20865
  const targetRef = (0, react_2.useRef)(null);
20873
20866
  const tooltipRef = (0, react_2.useRef)(null);
@@ -20887,17 +20880,17 @@ const Tooltip = ({ title, children, delay, }) => {
20887
20880
  const tooltipRect = tooltipRef.current.getBoundingClientRect();
20888
20881
  if (y < tooltipRect.height) {
20889
20882
  arrowRef.current.className += ' kt-tooltip-reverse-arrow';
20890
- tooltipRef.current.style.top = `${y + height + (tooltipRect.height / 2)}px`;
20883
+ tooltipRef.current.style.top = `${y + height + tooltipRect.height / 2}px`;
20891
20884
  }
20892
20885
  else {
20893
- tooltipRef.current.style.top = `${y - (height / 2) - (tooltipRect.height / 2)}px`;
20886
+ tooltipRef.current.style.top = `${y - height / 2 - tooltipRect.height / 2}px`;
20894
20887
  }
20895
20888
  if (x + tooltipRect.width >= document.body.offsetWidth) {
20896
- arrowRef.current.style.left = `${x + tooltipRect.width - document.body.offsetWidth + (width / 2)}px`;
20889
+ arrowRef.current.style.left = `${x + tooltipRect.width - document.body.offsetWidth + width / 2}px`;
20897
20890
  tooltipRef.current.style.left = `${document.body.offsetWidth - tooltipRect.width}px`;
20898
20891
  }
20899
20892
  else {
20900
- tooltipRef.current.style.left = `${x + (width / 2) - (tooltipRect.width / 2)}px`;
20893
+ tooltipRef.current.style.left = `${x + width / 2 - tooltipRect.width / 2}px`;
20901
20894
  }
20902
20895
  }
20903
20896
  clearTimeout(timer);
@@ -20911,9 +20904,9 @@ const Tooltip = ({ title, children, delay, }) => {
20911
20904
  }
20912
20905
  return (react_1.default.createElement("p", { ref: targetRef, className: 'kt-tooltip-wrapper', onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
20913
20906
  children,
20914
- visible && react_1.default.createElement("span", { ref: tooltipRef, className: (0, classnames_1.default)('kt-tooltip-content') },
20907
+ visible && (react_1.default.createElement("span", { ref: tooltipRef, className: (0, classnames_1.default)('kt-tooltip-content') },
20915
20908
  title,
20916
- react_1.default.createElement("span", { ref: arrowRef, className: 'kt-tooltip-arrow-placeholder' }))));
20909
+ react_1.default.createElement("span", { ref: arrowRef, className: 'kt-tooltip-arrow-placeholder' })))));
20917
20910
  };
20918
20911
  exports.Tooltip = Tooltip;
20919
20912
 
@@ -20978,13 +20971,9 @@ class Tree {
20978
20971
  }
20979
20972
  sortComparator(a, b) {
20980
20973
  if (a.constructor === b.constructor) {
20981
- return a.name > b.name ? 1
20982
- : a.name < b.name ? -1
20983
- : 0;
20974
+ return a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
20984
20975
  }
20985
- return TreeNode_1.CompositeTreeNode.is(a) ? -1
20986
- : TreeNode_1.CompositeTreeNode.is(b) ? 1
20987
- : 0;
20976
+ return TreeNode_1.CompositeTreeNode.is(a) ? -1 : TreeNode_1.CompositeTreeNode.is(b) ? 1 : 0;
20988
20977
  }
20989
20978
  }
20990
20979
  exports.Tree = Tree;
@@ -21135,7 +21124,6 @@ class Disposable {
21135
21124
  this.disposables.pop().dispose();
21136
21125
  }
21137
21126
  catch (e) {
21138
- // tslint:disable-next-line:no-console
21139
21127
  console.error(e);
21140
21128
  }
21141
21129
  }
@@ -21207,7 +21195,6 @@ class DisposableCollection {
21207
21195
  this.disposables.pop().dispose();
21208
21196
  }
21209
21197
  catch (e) {
21210
- // tslint:disable-next-line:no-console
21211
21198
  console.error(e);
21212
21199
  }
21213
21200
  }
@@ -21471,8 +21458,7 @@ function isPosixPathSeparator(code) {
21471
21458
  return code === CHAR_FORWARD_SLASH;
21472
21459
  }
21473
21460
  function isWindowsDeviceRoot(code) {
21474
- return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z ||
21475
- code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z;
21461
+ return ((code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) || (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z));
21476
21462
  }
21477
21463
  // Resolves . and .. elements in a path with directory names
21478
21464
  function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
@@ -21496,7 +21482,8 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
21496
21482
  // NOOP
21497
21483
  }
21498
21484
  else if (lastSlash !== i - 1 && dots === 2) {
21499
- if (res.length < 2 || lastSegmentLength !== 2 ||
21485
+ if (res.length < 2 ||
21486
+ lastSegmentLength !== 2 ||
21500
21487
  res.charCodeAt(res.length - 1) !== CHAR_DOT ||
21501
21488
  res.charCodeAt(res.length - 2) !== CHAR_DOT) {
21502
21489
  if (res.length > 2) {
@@ -21554,8 +21541,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
21554
21541
  }
21555
21542
  function _format(sep, pathObject) {
21556
21543
  const dir = pathObject.dir || pathObject.root;
21557
- const base = pathObject.base ||
21558
- ((pathObject.name || '') + (pathObject.ext || ''));
21544
+ const base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');
21559
21545
  if (!dir) {
21560
21546
  return base;
21561
21547
  }
@@ -21587,9 +21573,7 @@ exports.win32 = {
21587
21573
  path = process_1.Process.env['=' + resolvedDevice] || process_1.Process.cwd();
21588
21574
  // Verify that a cwd was found and that it actually points
21589
21575
  // to our drive. If not, default to the drive's root.
21590
- if (path === undefined ||
21591
- path.slice(0, 3).toLowerCase() !==
21592
- resolvedDevice.toLowerCase() + '\\') {
21576
+ if (path === undefined || path.slice(0, 3).toLowerCase() !== resolvedDevice.toLowerCase() + '\\') {
21593
21577
  path = resolvedDevice + '\\';
21594
21578
  }
21595
21579
  }
@@ -21677,9 +21661,7 @@ exports.win32 = {
21677
21661
  rootEnd = 1;
21678
21662
  isAbsolute = true;
21679
21663
  }
21680
- if (device.length > 0 &&
21681
- resolvedDevice.length > 0 &&
21682
- device.toLowerCase() !== resolvedDevice.toLowerCase()) {
21664
+ if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
21683
21665
  // This path points to another device so it is not applicable
21684
21666
  continue;
21685
21667
  }
@@ -21699,8 +21681,7 @@ exports.win32 = {
21699
21681
  // fails)
21700
21682
  // Normalize the tail path
21701
21683
  resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\', isPathSeparator);
21702
- return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) ||
21703
- '.';
21684
+ return resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail || '.';
21704
21685
  },
21705
21686
  normalize(path) {
21706
21687
  validateString(path, 'path');
@@ -21857,7 +21838,7 @@ exports.win32 = {
21857
21838
  }
21858
21839
  let joined;
21859
21840
  let firstPart;
21860
- // tslint:disable-next-line:prefer-for-of
21841
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
21861
21842
  for (let i = 0; i < paths.length; ++i) {
21862
21843
  const arg = paths[i];
21863
21844
  validateString(arg, 'path');
@@ -21954,7 +21935,7 @@ exports.win32 = {
21954
21935
  break;
21955
21936
  }
21956
21937
  }
21957
- const fromLen = (fromEnd - fromStart);
21938
+ const fromLen = fromEnd - fromStart;
21958
21939
  // Trim any leading backslashes
21959
21940
  let toStart = 0;
21960
21941
  for (; toStart < to.length; ++toStart) {
@@ -21969,9 +21950,9 @@ exports.win32 = {
21969
21950
  break;
21970
21951
  }
21971
21952
  }
21972
- const toLen = (toEnd - toStart);
21953
+ const toLen = toEnd - toStart;
21973
21954
  // Compare paths to find the longest common path from root
21974
- const length = (fromLen < toLen ? fromLen : toLen);
21955
+ const length = fromLen < toLen ? fromLen : toLen;
21975
21956
  let lastCommonSep = -1;
21976
21957
  let i = 0;
21977
21958
  for (; i <= length; ++i) {
@@ -22067,8 +22048,7 @@ exports.win32 = {
22067
22048
  }
22068
22049
  else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) {
22069
22050
  // Possible device root
22070
- if (resolvedPath.charCodeAt(1) === CHAR_COLON &&
22071
- resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
22051
+ if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
22072
22052
  // Matched device root, convert the path to a long UNC path
22073
22053
  return '\\\\?\\' + resolvedPath;
22074
22054
  }
@@ -22278,9 +22258,7 @@ exports.win32 = {
22278
22258
  // Check for a drive letter prefix so as not to mistake the following
22279
22259
  // path separator as an extra separator at the end of the path that can be
22280
22260
  // disregarded
22281
- if (path.length >= 2 &&
22282
- path.charCodeAt(1) === CHAR_COLON &&
22283
- isWindowsDeviceRoot(path.charCodeAt(0))) {
22261
+ if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) {
22284
22262
  start = startPart = 2;
22285
22263
  }
22286
22264
  for (let i = path.length - 1; i >= start; --i) {
@@ -22320,9 +22298,7 @@ exports.win32 = {
22320
22298
  // We saw a non-dot character immediately before the dot
22321
22299
  preDotState === 0 ||
22322
22300
  // The (right-most) trimmed path component is exactly '..'
22323
- (preDotState === 1 &&
22324
- startDot === end - 1 &&
22325
- startDot === startPart + 1)) {
22301
+ (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
22326
22302
  return '';
22327
22303
  }
22328
22304
  return path.slice(startDot, end);
@@ -22466,9 +22442,7 @@ exports.win32 = {
22466
22442
  // We saw a non-dot character immediately before the dot
22467
22443
  preDotState === 0 ||
22468
22444
  // The (right-most) trimmed path component is exactly '..'
22469
- (preDotState === 1 &&
22470
- startDot === end - 1 &&
22471
- startDot === startPart + 1)) {
22445
+ (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
22472
22446
  if (end !== -1) {
22473
22447
  ret.base = ret.name = path.slice(startPart, end);
22474
22448
  }
@@ -22564,6 +22538,7 @@ exports.posix = {
22564
22538
  }
22565
22539
  let joined;
22566
22540
  for (let i = 0; i < paths.length; ++i) {
22541
+ // eslint-disable-next-line prefer-rest-params
22567
22542
  const arg = arguments[i];
22568
22543
  validateString(arg, 'path');
22569
22544
  if (arg.length > 0) {
@@ -22599,7 +22574,7 @@ exports.posix = {
22599
22574
  }
22600
22575
  }
22601
22576
  const fromEnd = from.length;
22602
- const fromLen = (fromEnd - fromStart);
22577
+ const fromLen = fromEnd - fromStart;
22603
22578
  // Trim any leading backslashes
22604
22579
  let toStart = 1;
22605
22580
  for (; toStart < to.length; ++toStart) {
@@ -22608,9 +22583,9 @@ exports.posix = {
22608
22583
  }
22609
22584
  }
22610
22585
  const toEnd = to.length;
22611
- const toLen = (toEnd - toStart);
22586
+ const toLen = toEnd - toStart;
22612
22587
  // Compare paths to find the longest common path from root
22613
- const length = (fromLen < toLen ? fromLen : toLen);
22588
+ const length = fromLen < toLen ? fromLen : toLen;
22614
22589
  let lastCommonSep = -1;
22615
22590
  let i = 0;
22616
22591
  for (; i <= length; ++i) {
@@ -22835,9 +22810,7 @@ exports.posix = {
22835
22810
  // We saw a non-dot character immediately before the dot
22836
22811
  preDotState === 0 ||
22837
22812
  // The (right-most) trimmed path component is exactly '..'
22838
- (preDotState === 1 &&
22839
- startDot === end - 1 &&
22840
- startDot === startPart + 1)) {
22813
+ (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
22841
22814
  return '';
22842
22815
  }
22843
22816
  return path.slice(startDot, end);
@@ -22909,9 +22882,7 @@ exports.posix = {
22909
22882
  // We saw a non-dot character immediately before the dot
22910
22883
  preDotState === 0 ||
22911
22884
  // The (right-most) trimmed path component is exactly '..'
22912
- (preDotState === 1 &&
22913
- startDot === end - 1 &&
22914
- startDot === startPart + 1)) {
22885
+ (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
22915
22886
  if (end !== -1) {
22916
22887
  if (startPart === 0 && isAbsolute) {
22917
22888
  ret.base = ret.name = path.slice(1, end);
@@ -22947,19 +22918,19 @@ exports.posix = {
22947
22918
  };
22948
22919
  exports.posix.win32 = exports.win32.win32 = exports.win32;
22949
22920
  exports.posix.posix = exports.win32.posix = exports.posix;
22950
- exports.normalize = (process_1.Process.platform === 'win32' ? exports.win32.normalize : exports.posix.normalize);
22951
- exports.isAbsolute = (process_1.Process.platform === 'win32' ? exports.win32.isAbsolute : exports.posix.isAbsolute);
22952
- exports.join = (process_1.Process.platform === 'win32' ? exports.win32.join : exports.posix.join);
22953
- exports.resolve = (process_1.Process.platform === 'win32' ? exports.win32.resolve : exports.posix.resolve);
22954
- exports.relative = (process_1.Process.platform === 'win32' ? exports.win32.relative : exports.posix.relative);
22955
- exports.dirname = (process_1.Process.platform === 'win32' ? exports.win32.dirname : exports.posix.dirname);
22956
- exports.basename = (process_1.Process.platform === 'win32' ? exports.win32.basename : exports.posix.basename);
22957
- exports.extname = (process_1.Process.platform === 'win32' ? exports.win32.extname : exports.posix.extname);
22958
- exports.format = (process_1.Process.platform === 'win32' ? exports.win32.format : exports.posix.format);
22959
- exports.parse = (process_1.Process.platform === 'win32' ? exports.win32.parse : exports.posix.parse);
22960
- exports.toNamespacedPath = (process_1.Process.platform === 'win32' ? exports.win32.toNamespacedPath : exports.posix.toNamespacedPath);
22961
- exports.sep = (process_1.Process.platform === 'win32' ? exports.win32.sep : exports.posix.sep);
22962
- exports.delimiter = (process_1.Process.platform === 'win32' ? exports.win32.delimiter : exports.posix.delimiter);
22921
+ exports.normalize = process_1.Process.platform === 'win32' ? exports.win32.normalize : exports.posix.normalize;
22922
+ exports.isAbsolute = process_1.Process.platform === 'win32' ? exports.win32.isAbsolute : exports.posix.isAbsolute;
22923
+ exports.join = process_1.Process.platform === 'win32' ? exports.win32.join : exports.posix.join;
22924
+ exports.resolve = process_1.Process.platform === 'win32' ? exports.win32.resolve : exports.posix.resolve;
22925
+ exports.relative = process_1.Process.platform === 'win32' ? exports.win32.relative : exports.posix.relative;
22926
+ exports.dirname = process_1.Process.platform === 'win32' ? exports.win32.dirname : exports.posix.dirname;
22927
+ exports.basename = process_1.Process.platform === 'win32' ? exports.win32.basename : exports.posix.basename;
22928
+ exports.extname = process_1.Process.platform === 'win32' ? exports.win32.extname : exports.posix.extname;
22929
+ exports.format = process_1.Process.platform === 'win32' ? exports.win32.format : exports.posix.format;
22930
+ exports.parse = process_1.Process.platform === 'win32' ? exports.win32.parse : exports.posix.parse;
22931
+ exports.toNamespacedPath = process_1.Process.platform === 'win32' ? exports.win32.toNamespacedPath : exports.posix.toNamespacedPath;
22932
+ exports.sep = process_1.Process.platform === 'win32' ? exports.win32.sep : exports.posix.sep;
22933
+ exports.delimiter = process_1.Process.platform === 'win32' ? exports.win32.delimiter : exports.posix.delimiter;
22963
22934
 
22964
22935
 
22965
22936
  /***/ }),
@@ -23130,7 +23101,6 @@ class TreeStateManager {
23130
23101
  while (p) {
23131
23102
  if (this.stashKeyframes.has(p.id)) {
23132
23103
  let flags = this.stashKeyframes.get(p.id);
23133
- // tslint:disable-next-line:no-bitwise
23134
23104
  flags = flags | StashKeyFrameFlag.Disabled;
23135
23105
  this.stashKeyframes.set(p.id, flags);
23136
23106
  }
@@ -23143,7 +23113,6 @@ class TreeStateManager {
23143
23113
  while (p) {
23144
23114
  if (this.stashKeyframes.has(p.id)) {
23145
23115
  let flags = this.stashKeyframes.get(p.id);
23146
- // tslint:disable-next-line:no-bitwise
23147
23116
  flags &= ~StashKeyFrameFlag.Disabled;
23148
23117
  this.stashKeyframes.set(p.id, flags);
23149
23118
  }
@@ -23217,7 +23186,10 @@ class TreeStateManager {
23217
23186
  }
23218
23187
  catch (error) { }
23219
23188
  }
23220
- this._scrollOffset = typeof state.scrollPosition === 'number' && state.scrollPosition > -1 ? state.scrollPosition : this._scrollOffset;
23189
+ this._scrollOffset =
23190
+ typeof state.scrollPosition === 'number' && state.scrollPosition > -1
23191
+ ? state.scrollPosition
23192
+ : this._scrollOffset;
23221
23193
  this.onDidLoadStateEmitter.fire();
23222
23194
  }
23223
23195
  });
@@ -23259,17 +23231,14 @@ class TreeStateManager {
23259
23231
  const keyframes = Array.from(this.stashKeyframes);
23260
23232
  this.stashKeyframes = null;
23261
23233
  for (const [targetID, flags] of keyframes) {
23262
- // tslint:disable-next-line:no-bitwise
23263
23234
  const frameDisabled = (flags & StashKeyFrameFlag.Disabled) === StashKeyFrameFlag.Disabled;
23264
23235
  const target = TreeNode_1.TreeNode.getTreeNodeById(targetID);
23265
23236
  // 判断当前操作对象是否有效,无效则做下一步操作
23266
23237
  if (!target || frameDisabled) {
23267
23238
  continue;
23268
23239
  }
23269
- // tslint:disable-next-line:no-bitwise
23270
23240
  if ((flags & StashKeyFrameFlag.Expanded) === StashKeyFrameFlag.Expanded) {
23271
23241
  target.setCollapsed();
23272
- // tslint:disable-next-line:no-bitwise
23273
23242
  }
23274
23243
  else if ((flags & StashKeyFrameFlag.Collapsed) === StashKeyFrameFlag.Collapsed) {
23275
23244
  yield target.setExpanded();
@@ -23495,7 +23464,7 @@ class DecorationsManager {
23495
23464
  }
23496
23465
  addDecoration(decoration) {
23497
23466
  if (this.disposed) {
23498
- throw new Error(`DecorationManager disposed`);
23467
+ throw new Error('DecorationManager disposed');
23499
23468
  }
23500
23469
  if (this.decorations.has(decoration)) {
23501
23470
  return;
@@ -23540,7 +23509,7 @@ class DecorationsManager {
23540
23509
  this.decorations.delete(decoration);
23541
23510
  }
23542
23511
  getDecorations(item) {
23543
- if (!item || (!TreeNode_1.TreeNode.is(item))) {
23512
+ if (!item || !TreeNode_1.TreeNode.is(item)) {
23544
23513
  return;
23545
23514
  }
23546
23515
  const decMeta = this.getDecorationData(item);
@@ -23565,7 +23534,9 @@ class DecorationsManager {
23565
23534
  if (parentMeta) {
23566
23535
  const ownMeta = {
23567
23536
  applicable: new CompositeDecoration_1.CompositeDecoration(item, CompositeDecoration_1.CompositeDecorationType.Applicable, parentMeta.inheritable),
23568
- inheritable: TreeNode_1.CompositeTreeNode.is(item) ? new CompositeDecoration_1.CompositeDecoration(item, CompositeDecoration_1.CompositeDecorationType.Inheritable, parentMeta.inheritable) : undefined,
23537
+ inheritable: TreeNode_1.CompositeTreeNode.is(item)
23538
+ ? new CompositeDecoration_1.CompositeDecoration(item, CompositeDecoration_1.CompositeDecorationType.Inheritable, parentMeta.inheritable)
23539
+ : undefined,
23569
23540
  };
23570
23541
  this.decorationsMeta.set(item, ownMeta);
23571
23542
  return ownMeta;
@@ -25893,10 +25864,11 @@ const RecycleTreeFilterDecorator = (recycleTreeComp) => (props) => {
25893
25864
  handleFilterChange(value);
25894
25865
  };
25895
25866
  const filterTreeReadyHandle = (api) => {
25896
- onReady && onReady(Object.assign(Object.assign({}, api), { clearFilter: () => {
25897
- setFilter('');
25898
- setValue('');
25899
- } }));
25867
+ onReady &&
25868
+ onReady(Object.assign(Object.assign({}, api), { clearFilter: () => {
25869
+ setFilter('');
25870
+ setValue('');
25871
+ } }));
25900
25872
  };
25901
25873
  return (react_1.default.createElement(react_1.default.Fragment, null,
25902
25874
  filterEnabled && (react_1.default.createElement(FilterInput, { afterClear: filterAfterClear, placeholder: filterPlaceholder, value: value, autoFocus: filterAutoFocus, onValueChange: handleFilterInputChange })),
@@ -25961,9 +25933,7 @@ const RecycleTreeAdaptiveDecorator = (recycleTreeComp) => (props) => {
25961
25933
  setCurrentHeight(ref.current.root.branchSize * itemHeight);
25962
25934
  }
25963
25935
  });
25964
- promptHandle.onBlur(() => {
25965
- return destroyWhileBlur.current;
25966
- });
25936
+ promptHandle.onBlur(() => destroyWhileBlur.current);
25967
25937
  return promptHandle;
25968
25938
  }), promptNewCompositeTreeNode: (at) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
25969
25939
  var _b;
@@ -25988,9 +25958,7 @@ const RecycleTreeAdaptiveDecorator = (recycleTreeComp) => (props) => {
25988
25958
  setCurrentHeight(ref.current.root.branchSize * itemHeight);
25989
25959
  }
25990
25960
  });
25991
- promptHandle.onBlur(() => {
25992
- return destroyWhileBlur.current;
25993
- });
25961
+ promptHandle.onBlur(() => destroyWhileBlur.current);
25994
25962
  return promptHandle;
25995
25963
  }) }));
25996
25964
  };
@@ -26043,9 +26011,7 @@ const BasicRecycleTree = ({ width, height, itemHeight = 22, itemClassname, inden
26043
26011
  const treeService = (0, react_1.useRef)(new tree_service_1.BasicTreeService(treeData, resolveChildren, sortComparator));
26044
26012
  const treeHandle = (0, react_1.useRef)();
26045
26013
  const wrapperRef = react_1.default.createRef();
26046
- const renderTreeNode = (0, react_1.useCallback)((props) => {
26047
- return react_1.default.createElement(tree_node_1.BasicTreeNodeRenderer, { item: props.item, itemType: props.itemType, itemHeight: itemHeight, indent: indent, className: itemClassname, inlineMenus: inlineMenus, inlineMenuActuator: inlineMenuActuator, onClick: handleItemClick, onDbClick: handleItemDbClick, onContextMenu: handleContextMenu, onTwistierClick: handleTwistierClick, decorations: treeService.current.decorations.getDecorations(props.item) });
26048
- }, []);
26014
+ const renderTreeNode = (0, react_1.useCallback)((props) => (react_1.default.createElement(tree_node_1.BasicTreeNodeRenderer, { item: props.item, itemType: props.itemType, itemHeight: itemHeight, indent: indent, className: itemClassname, inlineMenus: inlineMenus, inlineMenuActuator: inlineMenuActuator, onClick: handleItemClick, onDbClick: handleItemDbClick, onContextMenu: handleContextMenu, onTwistierClick: handleTwistierClick, decorations: treeService.current.decorations.getDecorations(props.item) })), []);
26049
26015
  (0, react_1.useEffect)(() => {
26050
26016
  var _a;
26051
26017
  ensureLoaded();
@@ -26122,9 +26088,7 @@ const BasicRecycleTree = ({ width, height, itemHeight = 22, itemClassname, inden
26122
26088
  }
26123
26089
  menusMap[menu.group || '-1'].push(menu);
26124
26090
  }
26125
- const sortGroup = Array.from(groups).sort((a, b) => {
26126
- return a.localeCompare(b, 'kn', { numeric: true });
26127
- });
26091
+ const sortGroup = Array.from(groups).sort((a, b) => a.localeCompare(b, 'kn', { numeric: true }));
26128
26092
  let menus = [];
26129
26093
  for (const group of sortGroup) {
26130
26094
  menus = menus.concat(menusMap[group].map((menu) => ({ id: menu.id, label: menu.title, group: menu.group })));
@@ -26171,24 +26135,22 @@ const BasicRecycleTree = ({ width, height, itemHeight = 22, itemClassname, inden
26171
26135
  if (!contextMenus) {
26172
26136
  return null;
26173
26137
  }
26174
- return react_1.default.createElement(react_ctxmenu_trigger_1.default, { popupPlacement: 'bottomLeft', popupVisible: showMenus.show, action: ['contextMenu'], popupAlign: {
26138
+ return (react_1.default.createElement(react_ctxmenu_trigger_1.default, { popupPlacement: 'bottomLeft', popupVisible: showMenus.show, action: ['contextMenu'], popupAlign: {
26175
26139
  overflow: {
26176
26140
  adjustX: 1,
26177
26141
  adjustY: 1,
26178
26142
  },
26179
26143
  offset: [window.scrollX, window.scrollY],
26180
- }, point: showMenus.point || {}, builtinPlacements: placements_1.placements, popup: (react_1.default.createElement(click_outside_1.ClickOutside, { className: 'basic_tree_menubars', mouseEvents: ['click', 'contextmenu'], onOutsideClick: handleMouseLeave }, menubarItems.map(({ id, label, type }) => (react_1.default.createElement(menubar_item_1.BasicMenuItem, { key: id, id: id, label: label, type: type, focusMode: showMenus.show, onClick: (id) => {
26144
+ }, point: showMenus.point || {}, builtinPlacements: placements_1.placements, popup: react_1.default.createElement(click_outside_1.ClickOutside, { className: 'basic_tree_menubars', mouseEvents: ['click', 'contextmenu'], onOutsideClick: handleMouseLeave }, menubarItems.map(({ id, label, type }) => (react_1.default.createElement(menubar_item_1.BasicMenuItem, { key: id, id: id, label: label, type: type, focusMode: showMenus.show, onClick: (id) => {
26181
26145
  if (contextMenuActuator) {
26182
26146
  contextMenuActuator(showMenus.activeNode, id);
26183
26147
  }
26184
26148
  setShowMenus({ show: false });
26185
- } }))))), alignPoint: true });
26149
+ } })))), alignPoint: true }));
26186
26150
  }, [menubarItems, contextMenuActuator, showMenus]);
26187
- return react_1.default.createElement("div", { className: 'basic_tree', tabIndex: -1, ref: wrapperRef, onClick: handleOuterClick, onContextMenu: handleOuterContextMenu },
26151
+ return (react_1.default.createElement("div", { className: 'basic_tree', tabIndex: -1, ref: wrapperRef, onClick: handleOuterClick, onContextMenu: handleOuterContextMenu },
26188
26152
  renderContextMenu(),
26189
- model
26190
- ? react_1.default.createElement(RecycleTree_1.RecycleTree, { height: height, width: width, itemHeight: itemHeight, model: model, onReady: handleTreeReady, className: (0, classnames_1.default)(containerClassname) }, renderTreeNode)
26191
- : null);
26153
+ model ? (react_1.default.createElement(RecycleTree_1.RecycleTree, { height: height, width: width, itemHeight: itemHeight, model: model, onReady: handleTreeReady, className: (0, classnames_1.default)(containerClassname) }, renderTreeNode)) : null));
26192
26154
  };
26193
26155
  exports.BasicRecycleTree = BasicRecycleTree;
26194
26156
 
@@ -26407,15 +26369,9 @@ const BasicTreeNodeRenderer = ({ item, className, itemHeight = 22, indent = 8, o
26407
26369
  lineHeight: `${itemHeight}px`,
26408
26370
  paddingLeft,
26409
26371
  };
26410
- const renderIcon = (0, react_1.useCallback)((node) => {
26411
- return react_1.default.createElement(icon_1.Icon, { icon: node.icon, className: 'icon', style: { height: itemHeight, lineHeight: `${itemHeight}px` } });
26412
- }, []);
26413
- const getName = (0, react_1.useCallback)((node) => {
26414
- return node.displayName.replace(/\n/g, '↵');
26415
- }, []);
26416
- const renderDisplayName = (0, react_1.useCallback)((node) => {
26417
- return (react_1.default.createElement("div", { className: (0, classnames_1.default)('segment', 'display_name') }, getName(node)));
26418
- }, []);
26372
+ const renderIcon = (0, react_1.useCallback)((node) => (react_1.default.createElement(icon_1.Icon, { icon: node.icon, className: 'icon', style: { height: itemHeight, lineHeight: `${itemHeight}px` } })), []);
26373
+ const getName = (0, react_1.useCallback)((node) => node.displayName.replace(/\n/g, ''), []);
26374
+ const renderDisplayName = (0, react_1.useCallback)((node) => (react_1.default.createElement("div", { className: (0, classnames_1.default)('segment', 'display_name') }, getName(node))), []);
26419
26375
  const renderDescription = (0, react_1.useCallback)((node) => {
26420
26376
  if (!node.description) {
26421
26377
  return null;
@@ -26433,7 +26389,9 @@ const BasicTreeNodeRenderer = ({ item, className, itemHeight = 22, indent = 8, o
26433
26389
  const renderNodeTail = () => {
26434
26390
  var _a;
26435
26391
  const isBasicCompositeTreeNode = tree_node_define_1.BasicCompositeTreeNode.is(item);
26436
- const actions = (_a = inlineMenuActions(item)) === null || _a === void 0 ? void 0 : _a.filter((menu) => isBasicCompositeTreeNode ? menu.position === types_1.IBasicInlineMenuPosition.TREE_CONTAINER : menu.position === types_1.IBasicInlineMenuPosition.TREE_NODE);
26392
+ const actions = (_a = inlineMenuActions(item)) === null || _a === void 0 ? void 0 : _a.filter((menu) => isBasicCompositeTreeNode
26393
+ ? menu.position === types_1.IBasicInlineMenuPosition.TREE_CONTAINER
26394
+ : menu.position === types_1.IBasicInlineMenuPosition.TREE_NODE);
26437
26395
  if (!(actions === null || actions === void 0 ? void 0 : actions.length)) {
26438
26396
  return null;
26439
26397
  }
@@ -26441,15 +26399,15 @@ const BasicTreeNodeRenderer = ({ item, className, itemHeight = 22, indent = 8, o
26441
26399
  event.stopPropagation();
26442
26400
  inlineMenuActuator(item, action);
26443
26401
  }, []);
26444
- return react_1.default.createElement("div", { className: (0, classnames_1.default)('segment', 'tail') }, actions.map((action) => {
26445
- return react_1.default.createElement(button_1.Button, { style: { marginRight: '5px' }, type: 'icon', key: `${item.id}-${action.icon}`, icon: action.icon, title: action.title, onClick: (e) => handleActionClick(e, action) });
26446
- }));
26402
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)('segment', 'tail') }, actions.map((action) => (react_1.default.createElement(button_1.Button, { style: { marginRight: '5px' }, type: 'icon', key: `${item.id}-${action.icon}`, icon: action.icon, title: action.title, onClick: (e) => handleActionClick(e, action) })))));
26447
26403
  };
26448
26404
  const renderFolderToggle = (node, clickHandler) => {
26449
26405
  if (decorations && (decorations === null || decorations === void 0 ? void 0 : decorations.classlist.indexOf(types_1.DECORATIONS.LOADING)) > -1) {
26450
26406
  return react_1.default.createElement(loading_1.Loading, null);
26451
26407
  }
26452
- return react_1.default.createElement(icon_1.Icon, { className: (0, classnames_1.default)('segment', 'expansion_toggle', { ['mod_collapsed']: !node.expanded }), onClick: clickHandler, icon: 'arrow-right' });
26408
+ return (react_1.default.createElement(icon_1.Icon, { className: (0, classnames_1.default)('segment', 'expansion_toggle', {
26409
+ ['mod_collapsed']: !node.expanded,
26410
+ }), onClick: clickHandler, icon: 'arrow-right' }));
26453
26411
  };
26454
26412
  const renderTwice = (item) => {
26455
26413
  if (tree_node_define_1.BasicCompositeTreeNode.is(item)) {
@@ -26479,9 +26437,7 @@ exports.Loading = void 0;
26479
26437
  const tslib_1 = __webpack_require__(3);
26480
26438
  const react_1 = (0, tslib_1.__importDefault)(__webpack_require__(0));
26481
26439
  __webpack_require__(549);
26482
- exports.Loading = react_1.default.memo(() => {
26483
- return react_1.default.createElement("div", { className: 'loading_indicator' });
26484
- });
26440
+ exports.Loading = react_1.default.memo(() => react_1.default.createElement("div", { className: 'loading_indicator' }));
26485
26441
  exports.Loading.displayName = 'Loading';
26486
26442
 
26487
26443
 
@@ -26513,8 +26469,7 @@ const BasicMenuItem = ({ id, label, type, focusMode, onClick }) => {
26513
26469
  }
26514
26470
  onClick(id);
26515
26471
  }, [id]);
26516
- const handleMouseOver = react_1.default.useCallback(() => {
26517
- }, [id, focusMode]);
26472
+ const handleMouseOver = react_1.default.useCallback(() => { }, [id, focusMode]);
26518
26473
  if (type === 'divider') {
26519
26474
  return react_1.default.createElement("div", { className: 'basic_menu_item_divider' });
26520
26475
  }
@@ -27983,7 +27938,7 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
27983
27938
  scrollToIndex: (index, position = 'start') => {
27984
27939
  var _a, _b;
27985
27940
  let locationIndex = index;
27986
- if (!!Header) {
27941
+ if (Header) {
27987
27942
  locationIndex++;
27988
27943
  }
27989
27944
  if (typeof itemHeight === 'number') {
@@ -28049,10 +28004,10 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28049
28004
  }, [minHeight, data]);
28050
28005
  const adjustedRowCount = react_1.default.useMemo(() => {
28051
28006
  let count = data.length;
28052
- if (!!Header) {
28007
+ if (Header) {
28053
28008
  count++;
28054
28009
  }
28055
- if (!!Footer) {
28010
+ if (Footer) {
28056
28011
  count++;
28057
28012
  }
28058
28013
  return count;
@@ -28061,17 +28016,17 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28061
28016
  let node;
28062
28017
  if (index === 0) {
28063
28018
  if (Header) {
28064
- return react_1.default.createElement("div", { style: style },
28065
- react_1.default.createElement(Header, null));
28019
+ return (react_1.default.createElement("div", { style: style },
28020
+ react_1.default.createElement(Header, null)));
28066
28021
  }
28067
28022
  }
28068
- if ((index + 1) === adjustedRowCount) {
28069
- if (!!Footer) {
28070
- return react_1.default.createElement("div", { style: style },
28071
- react_1.default.createElement(Footer, null));
28023
+ if (index + 1 === adjustedRowCount) {
28024
+ if (Footer) {
28025
+ return (react_1.default.createElement("div", { style: style },
28026
+ react_1.default.createElement(Footer, null)));
28072
28027
  }
28073
28028
  }
28074
- if (!!Header) {
28029
+ if (Header) {
28075
28030
  node = data[index - 1];
28076
28031
  }
28077
28032
  else {
@@ -28085,8 +28040,8 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28085
28040
  'aria-setsize': adjustedRowCount,
28086
28041
  'aria-posinset': index,
28087
28042
  };
28088
- return react_1.default.createElement("div", Object.assign({ style: style, role: 'listitem' }, ariaInfo),
28089
- react_1.default.createElement(Template, { data: node, index: index }));
28043
+ return (react_1.default.createElement("div", Object.assign({ style: style, role: 'listitem' }, ariaInfo),
28044
+ react_1.default.createElement(Template, { data: node, index: index })));
28090
28045
  };
28091
28046
  const renderDynamicItem = ({ index, style }) => {
28092
28047
  const rowRoot = react_1.default.useRef(null);
@@ -28094,7 +28049,7 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28094
28049
  const setItemSize = () => {
28095
28050
  if (rowRoot.current) {
28096
28051
  let height = 0;
28097
- // tslint:disable-next-line:prefer-for-of
28052
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
28098
28053
  for (let i = 0; i < rowRoot.current.children.length; i++) {
28099
28054
  height += rowRoot.current.children[i].getBoundingClientRect().height;
28100
28055
  }
@@ -28125,17 +28080,17 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28125
28080
  let node;
28126
28081
  if (index === 0) {
28127
28082
  if (Header) {
28128
- return react_1.default.createElement("div", { style: style },
28129
- react_1.default.createElement(Header, null));
28083
+ return (react_1.default.createElement("div", { style: style },
28084
+ react_1.default.createElement(Header, null)));
28130
28085
  }
28131
28086
  }
28132
- if ((index + 1) === adjustedRowCount) {
28133
- if (!!Footer) {
28134
- return react_1.default.createElement("div", { style: style },
28135
- react_1.default.createElement(Footer, null));
28087
+ if (index + 1 === adjustedRowCount) {
28088
+ if (Footer) {
28089
+ return (react_1.default.createElement("div", { style: style },
28090
+ react_1.default.createElement(Footer, null)));
28136
28091
  }
28137
28092
  }
28138
- if (!!Header) {
28093
+ if (Header) {
28139
28094
  node = data[index - 1];
28140
28095
  }
28141
28096
  else {
@@ -28144,8 +28099,8 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28144
28099
  if (!node) {
28145
28100
  return react_1.default.createElement("div", { style: style });
28146
28101
  }
28147
- return react_1.default.createElement("div", { style: style, ref: rowRoot },
28148
- react_1.default.createElement(Template, { data: node, index: index }));
28102
+ return (react_1.default.createElement("div", { style: style, ref: rowRoot },
28103
+ react_1.default.createElement(Template, { data: node, index: index })));
28149
28104
  };
28150
28105
  const getItemKey = (index) => {
28151
28106
  const node = data[index];
@@ -28163,7 +28118,7 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28163
28118
  // 为 List 添加下边距
28164
28119
  const InnerElementType = react_1.default.forwardRef((props, ref) => {
28165
28120
  const _a = props, { style } = _a, rest = (0, tslib_1.__rest)(_a, ["style"]);
28166
- return react_1.default.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { height: `${parseFloat(style.height) + (paddingBottomSize ? paddingBottomSize : 0)}px` }) }, rest));
28121
+ return (react_1.default.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { height: `${parseFloat(style.height) + (paddingBottomSize ? paddingBottomSize : 0)}px` }) }, rest)));
28167
28122
  });
28168
28123
  const render = () => {
28169
28124
  const isDynamicList = typeof itemHeight !== 'number';
@@ -28187,14 +28142,14 @@ const RecycleList = ({ width, height, maxHeight, minHeight, className, style, da
28187
28142
  currentHeight = maxH;
28188
28143
  }
28189
28144
  if (isDynamicList) {
28190
- return react_1.default.createElement(List, { width: width, height: currentHeight,
28145
+ return (react_1.default.createElement(List, { width: width, height: currentHeight,
28191
28146
  // 这里的数据不是必要的,主要用于在每次更新列表
28192
- itemData: [], itemSize: getSize, itemCount: adjustedRowCount, getItemKey: getItemKey, overscanCount: exports.RECYCLE_LIST_OVER_SCAN_COUNT, ref: listRef, style: Object.assign({ transform: 'translate3d(0px, 0px, 0px)' }, style), className: (0, classnames_1.default)(className, 'kt-recycle-list'), innerElementType: InnerElementType, outerElementType: scrollbars_1.ScrollbarsVirtualList, estimatedItemSize: calcEstimatedSize }, renderDynamicItem);
28147
+ itemData: [], itemSize: getSize, itemCount: adjustedRowCount, getItemKey: getItemKey, overscanCount: exports.RECYCLE_LIST_OVER_SCAN_COUNT, ref: listRef, style: Object.assign({ transform: 'translate3d(0px, 0px, 0px)' }, style), className: (0, classnames_1.default)(className, 'kt-recycle-list'), innerElementType: InnerElementType, outerElementType: scrollbars_1.ScrollbarsVirtualList, estimatedItemSize: calcEstimatedSize }, renderDynamicItem));
28193
28148
  }
28194
28149
  else {
28195
- return react_1.default.createElement(List, { width: width, height: currentHeight,
28150
+ return (react_1.default.createElement(List, { width: width, height: currentHeight,
28196
28151
  // 这里的数据不是必要的,主要用于在每次更新列表
28197
- itemData: [], itemSize: itemHeight, itemCount: adjustedRowCount, getItemKey: getItemKey, overscanCount: exports.RECYCLE_LIST_OVER_SCAN_COUNT, ref: listRef, style: Object.assign({ transform: 'translate3d(0px, 0px, 0px)' }, style), className: (0, classnames_1.default)(className, 'kt-recycle-list'), innerElementType: InnerElementType, outerElementType: scrollbars_1.ScrollbarsVirtualList }, renderItem);
28152
+ itemData: [], itemSize: itemHeight, itemCount: adjustedRowCount, getItemKey: getItemKey, overscanCount: exports.RECYCLE_LIST_OVER_SCAN_COUNT, ref: listRef, style: Object.assign({ transform: 'translate3d(0px, 0px, 0px)' }, style), className: (0, classnames_1.default)(className, 'kt-recycle-list'), innerElementType: InnerElementType, outerElementType: scrollbars_1.ScrollbarsVirtualList }, renderItem));
28198
28153
  }
28199
28154
  };
28200
28155
  if (!isAutoSizeList) {