bkui-vue 2.1.0-dev-beta.10 → 2.1.0-dev-beta.12

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.
@@ -410,10 +410,6 @@ const oppositeSideMap = {
410
410
  bottom: 'top',
411
411
  top: 'bottom'
412
412
  };
413
- const oppositeAlignmentMap = {
414
- start: 'end',
415
- end: 'start'
416
- };
417
413
  function clamp(start, value, end) {
418
414
  return floating_ui_utils_max(start, floating_ui_utils_min(value, end));
419
415
  }
@@ -432,9 +428,9 @@ function floating_ui_utils_getOppositeAxis(axis) {
432
428
  function getAxisLength(axis) {
433
429
  return axis === 'y' ? 'height' : 'width';
434
430
  }
435
- const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
436
431
  function floating_ui_utils_getSideAxis(placement) {
437
- return yAxisSides.has(floating_ui_utils_getSide(placement)) ? 'y' : 'x';
432
+ const firstChar = placement[0];
433
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
438
434
  }
439
435
  function getAlignmentAxis(placement) {
440
436
  return floating_ui_utils_getOppositeAxis(floating_ui_utils_getSideAxis(placement));
@@ -457,7 +453,7 @@ function getExpandedPlacements(placement) {
457
453
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
458
454
  }
459
455
  function getOppositeAlignmentPlacement(placement) {
460
- return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
456
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
461
457
  }
462
458
  const lrPlacement = ['left', 'right'];
463
459
  const rlPlacement = ['right', 'left'];
@@ -488,7 +484,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
488
484
  return list;
489
485
  }
490
486
  function getOppositePlacement(placement) {
491
- return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
487
+ const side = floating_ui_utils_getSide(placement);
488
+ return oppositeSideMap[side] + placement.slice(side.length);
492
489
  }
493
490
  function expandPaddingObject(padding) {
494
491
  return {
@@ -653,6 +650,9 @@ async function detectOverflow(state, options) {
653
650
  };
654
651
  }
655
652
 
653
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
654
+ const MAX_RESET_COUNT = 50;
655
+
656
656
  /**
657
657
  * Computes the `x` and `y` coordinates that will place the floating element
658
658
  * next to a given reference element.
@@ -667,7 +667,10 @@ const computePosition = async (reference, floating, config) => {
667
667
  middleware = [],
668
668
  platform
669
669
  } = config;
670
- const validMiddleware = middleware.filter(Boolean);
670
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
671
+ ...platform,
672
+ detectOverflow
673
+ };
671
674
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
672
675
  let rects = await platform.getElementRects({
673
676
  reference,
@@ -679,14 +682,17 @@ const computePosition = async (reference, floating, config) => {
679
682
  y
680
683
  } = computeCoordsFromPlacement(rects, placement, rtl);
681
684
  let statefulPlacement = placement;
682
- let middlewareData = {};
683
685
  let resetCount = 0;
684
- for (let i = 0; i < validMiddleware.length; i++) {
685
- var _platform$detectOverf;
686
+ const middlewareData = {};
687
+ for (let i = 0; i < middleware.length; i++) {
688
+ const currentMiddleware = middleware[i];
689
+ if (!currentMiddleware) {
690
+ continue;
691
+ }
686
692
  const {
687
693
  name,
688
694
  fn
689
- } = validMiddleware[i];
695
+ } = currentMiddleware;
690
696
  const {
691
697
  x: nextX,
692
698
  y: nextY,
@@ -700,10 +706,7 @@ const computePosition = async (reference, floating, config) => {
700
706
  strategy,
701
707
  middlewareData,
702
708
  rects,
703
- platform: {
704
- ...platform,
705
- detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
706
- },
709
+ platform: platformWithDetectOverflow,
707
710
  elements: {
708
711
  reference,
709
712
  floating
@@ -711,14 +714,11 @@ const computePosition = async (reference, floating, config) => {
711
714
  });
712
715
  x = nextX != null ? nextX : x;
713
716
  y = nextY != null ? nextY : y;
714
- middlewareData = {
715
- ...middlewareData,
716
- [name]: {
717
- ...middlewareData[name],
718
- ...data
719
- }
717
+ middlewareData[name] = {
718
+ ...middlewareData[name],
719
+ ...data
720
720
  };
721
- if (reset && resetCount <= 50) {
721
+ if (reset && resetCount < MAX_RESET_COUNT) {
722
722
  resetCount++;
723
723
  if (typeof reset === 'object') {
724
724
  if (reset.placement) {
@@ -1630,7 +1630,6 @@ function isShadowRoot(value) {
1630
1630
  }
1631
1631
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1632
1632
  }
1633
- const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
1634
1633
  function isOverflowElement(element) {
1635
1634
  const {
1636
1635
  overflow,
@@ -1638,32 +1637,35 @@ function isOverflowElement(element) {
1638
1637
  overflowY,
1639
1638
  display
1640
1639
  } = floating_ui_utils_dom_getComputedStyle(element);
1641
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
1640
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
1642
1641
  }
1643
- const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
1644
1642
  function isTableElement(element) {
1645
- return tableElements.has(getNodeName(element));
1643
+ return /^(table|td|th)$/.test(getNodeName(element));
1646
1644
  }
1647
- const topLayerSelectors = [':popover-open', ':modal'];
1648
1645
  function isTopLayer(element) {
1649
- return topLayerSelectors.some(selector => {
1650
- try {
1651
- return element.matches(selector);
1652
- } catch (_e) {
1653
- return false;
1646
+ try {
1647
+ if (element.matches(':popover-open')) {
1648
+ return true;
1654
1649
  }
1655
- });
1650
+ } catch (_e) {
1651
+ // no-op
1652
+ }
1653
+ try {
1654
+ return element.matches(':modal');
1655
+ } catch (_e) {
1656
+ return false;
1657
+ }
1656
1658
  }
1657
- const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
1658
- const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
1659
- const containValues = ['paint', 'layout', 'strict', 'content'];
1659
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1660
+ const containRe = /paint|layout|strict|content/;
1661
+ const isNotNone = value => !!value && value !== 'none';
1662
+ let isWebKitValue;
1660
1663
  function isContainingBlock(elementOrCss) {
1661
- const webkit = isWebKit();
1662
1664
  const css = isElement(elementOrCss) ? floating_ui_utils_dom_getComputedStyle(elementOrCss) : elementOrCss;
1663
1665
 
1664
1666
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1665
1667
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1666
- return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
1668
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
1667
1669
  }
1668
1670
  function getContainingBlock(element) {
1669
1671
  let currentNode = getParentNode(element);
@@ -1678,12 +1680,13 @@ function getContainingBlock(element) {
1678
1680
  return null;
1679
1681
  }
1680
1682
  function isWebKit() {
1681
- if (typeof CSS === 'undefined' || !CSS.supports) return false;
1682
- return CSS.supports('-webkit-backdrop-filter', 'none');
1683
+ if (isWebKitValue == null) {
1684
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
1685
+ }
1686
+ return isWebKitValue;
1683
1687
  }
1684
- const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
1685
1688
  function isLastTraversableNode(node) {
1686
- return lastTraversableNodeNames.has(getNodeName(node));
1689
+ return /^(html|body|#document)$/.test(getNodeName(node));
1687
1690
  }
1688
1691
  function floating_ui_utils_dom_getComputedStyle(element) {
1689
1692
  return getWindow(element).getComputedStyle(element);
@@ -1739,8 +1742,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
1739
1742
  if (isBody) {
1740
1743
  const frameElement = getFrameElement(win);
1741
1744
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1745
+ } else {
1746
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1742
1747
  }
1743
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1744
1748
  }
1745
1749
  function getFrameElement(win) {
1746
1750
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -1925,7 +1929,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1925
1929
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1926
1930
  scroll = getNodeScroll(offsetParent);
1927
1931
  }
1928
- if (isHTMLElement(offsetParent)) {
1932
+ if (isOffsetParentAnElement) {
1929
1933
  const offsetRect = getBoundingClientRect(offsetParent);
1930
1934
  scale = getScale(offsetParent);
1931
1935
  offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -2013,7 +2017,6 @@ function getViewportRect(element, strategy) {
2013
2017
  };
2014
2018
  }
2015
2019
 
2016
- const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
2017
2020
  // Returns the inner client rect, subtracting scrollbars if present.
2018
2021
  function getInnerBoundingClientRect(element, strategy) {
2019
2022
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -2078,7 +2081,7 @@ function getClippingElementAncestors(element, cache) {
2078
2081
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
2079
2082
  currentContainingBlockComputedStyle = null;
2080
2083
  }
2081
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
2084
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
2082
2085
  if (shouldDropCurrentNode) {
2083
2086
  // Drop non-containing blocks.
2084
2087
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -2103,20 +2106,23 @@ function getClippingRect(_ref) {
2103
2106
  } = _ref;
2104
2107
  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
2105
2108
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
2106
- const firstClippingAncestor = clippingAncestors[0];
2107
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
2108
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
2109
- accRect.top = floating_ui_utils_max(rect.top, accRect.top);
2110
- accRect.right = floating_ui_utils_min(rect.right, accRect.right);
2111
- accRect.bottom = floating_ui_utils_min(rect.bottom, accRect.bottom);
2112
- accRect.left = floating_ui_utils_max(rect.left, accRect.left);
2113
- return accRect;
2114
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
2109
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
2110
+ let top = firstRect.top;
2111
+ let right = firstRect.right;
2112
+ let bottom = firstRect.bottom;
2113
+ let left = firstRect.left;
2114
+ for (let i = 1; i < clippingAncestors.length; i++) {
2115
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
2116
+ top = floating_ui_utils_max(rect.top, top);
2117
+ right = floating_ui_utils_min(rect.right, right);
2118
+ bottom = floating_ui_utils_min(rect.bottom, bottom);
2119
+ left = floating_ui_utils_max(rect.left, left);
2120
+ }
2115
2121
  return {
2116
- width: clippingRect.right - clippingRect.left,
2117
- height: clippingRect.bottom - clippingRect.top,
2118
- x: clippingRect.left,
2119
- y: clippingRect.top
2122
+ width: right - left,
2123
+ height: bottom - top,
2124
+ x: left,
2125
+ y: top
2120
2126
  };
2121
2127
  }
2122
2128
 
@@ -2367,7 +2373,7 @@ function autoUpdate(reference, floating, update, options) {
2367
2373
  animationFrame = false
2368
2374
  } = options;
2369
2375
  const referenceEl = unwrapElement(reference);
2370
- const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
2376
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
2371
2377
  ancestors.forEach(ancestor => {
2372
2378
  ancestorScroll && ancestor.addEventListener('scroll', update, {
2373
2379
  passive: true
@@ -2380,7 +2386,7 @@ function autoUpdate(reference, floating, update, options) {
2380
2386
  if (elementResize) {
2381
2387
  resizeObserver = new ResizeObserver(_ref => {
2382
2388
  let [firstEntry] = _ref;
2383
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
2389
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
2384
2390
  // Prevent update loops when using the `size` middleware.
2385
2391
  // https://github.com/floating-ui/floating-ui/issues/1740
2386
2392
  resizeObserver.unobserve(floating);
@@ -2395,7 +2401,9 @@ function autoUpdate(reference, floating, update, options) {
2395
2401
  if (referenceEl && !animationFrame) {
2396
2402
  resizeObserver.observe(referenceEl);
2397
2403
  }
2398
- resizeObserver.observe(floating);
2404
+ if (floating) {
2405
+ resizeObserver.observe(floating);
2406
+ }
2399
2407
  }
2400
2408
  let frameId;
2401
2409
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -1,7 +1,10 @@
1
1
  export declare enum EVENTS {
2
+ NODE_ASYNC_LOAD = "nodeAsyncLoad",
3
+ NODE_ASYNC_LOAD_ERROR = "nodeAsyncLoadError",
2
4
  NODE_CHECKED = "nodeChecked",
3
5
  NODE_CLICK = "nodeClick",
4
6
  NODE_COLLAPSE = "nodeCollapse",
7
+ NODE_DATA_CHANGE = "nodeDataChange",
5
8
  NODE_DRAG_LEAVE = "nodeDragLeave",
6
9
  NODE_DRAG_OVER = "nodeDragOver",
7
10
  NODE_DRAG_SORT = "nodeDragSort",
@@ -12,10 +15,13 @@ export declare enum EVENTS {
12
15
  NODE_SELECTED = "nodeSelected"
13
16
  }
14
17
  export declare const TreeEmitEventsType: {
18
+ nodeAsyncLoad: (..._args: any[]) => boolean;
19
+ nodeAsyncLoadError: (..._args: any[]) => boolean;
15
20
  nodeClick: (..._args: any[]) => boolean;
16
21
  nodeCollapse: (..._args: any[]) => boolean;
17
22
  nodeExpand: (..._args: any[]) => boolean;
18
23
  nodeChecked: (..._args: any[]) => boolean;
24
+ nodeDataChange: (..._args: any[]) => boolean;
19
25
  nodeDragStart: (..._args: any[]) => boolean;
20
26
  nodeDragOver: (..._args: any[]) => boolean;
21
27
  nodeDragLeave: (..._args: any[]) => boolean;
@@ -38,10 +38,9 @@ declare const BkTree: {
38
38
  prefixIcon: import("vue-types").VueTypeDef<any> & {
39
39
  default: any;
40
40
  };
41
+ onDataChange: import("vue").PropType<import("./props").TreeDataChangeHandler>;
41
42
  async: import("vue-types").VueTypeShape<{
42
- callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
43
- [key: string]: any;
44
- }>>;
43
+ callback: (item: import("./props").TreeNode, cb: (data: import("./props").TreeNode | import("./props").TreeNode[]) => unknown, data?: unknown) => import("./props").TreeNode | import("./props").TreeNode[] | Promise<import("./props").TreeNode | import("./props").TreeNode[]>;
45
44
  cache: boolean;
46
45
  deepAutoOpen?: string;
47
46
  trigger?: string[];
@@ -134,13 +133,21 @@ declare const BkTree: {
134
133
  } & {
135
134
  default: boolean;
136
135
  };
136
+ cascade: import("vue-types").VueTypeValidableDef<boolean> & {
137
+ default: boolean;
138
+ } & {
139
+ default: boolean;
140
+ };
137
141
  intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
138
142
  default: boolean | (() => import("./props").IIntersectionObserver);
139
143
  };
140
144
  }>> & Readonly<{
145
+ onNodeAsyncLoad?: (...args: any[]) => any;
146
+ onNodeAsyncLoadError?: (...args: any[]) => any;
141
147
  onNodeChecked?: (...args: any[]) => any;
142
148
  onNodeClick?: (...args: any[]) => any;
143
149
  onNodeCollapse?: (...args: any[]) => any;
150
+ onNodeDataChange?: (...args: any[]) => any;
144
151
  onNodeDragLeave?: (...args: any[]) => any;
145
152
  onNodeDragOver?: (...args: any[]) => any;
146
153
  onNodeDragSort?: (...args: any[]) => any;
@@ -150,10 +157,13 @@ declare const BkTree: {
150
157
  onNodeExpand?: (...args: any[]) => any;
151
158
  onNodeSelected?: (...args: any[]) => any;
152
159
  }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
160
+ nodeAsyncLoad: (..._args: any[]) => boolean;
161
+ nodeAsyncLoadError: (..._args: any[]) => boolean;
153
162
  nodeClick: (..._args: any[]) => boolean;
154
163
  nodeCollapse: (..._args: any[]) => boolean;
155
164
  nodeExpand: (..._args: any[]) => boolean;
156
165
  nodeChecked: (..._args: any[]) => boolean;
166
+ nodeDataChange: (..._args: any[]) => boolean;
157
167
  nodeDragStart: (..._args: any[]) => boolean;
158
168
  nodeDragOver: (..._args: any[]) => boolean;
159
169
  nodeDragLeave: (..._args: any[]) => boolean;
@@ -192,6 +202,7 @@ declare const BkTree: {
192
202
  nodeContentAction: any;
193
203
  keepSlotData: boolean;
194
204
  checkStrictly: boolean;
205
+ cascade: boolean;
195
206
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
196
207
  P: {};
197
208
  B: {};
@@ -238,10 +249,9 @@ declare const BkTree: {
238
249
  prefixIcon: import("vue-types").VueTypeDef<any> & {
239
250
  default: any;
240
251
  };
252
+ onDataChange: import("vue").PropType<import("./props").TreeDataChangeHandler>;
241
253
  async: import("vue-types").VueTypeShape<{
242
- callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
243
- [key: string]: any;
244
- }>>;
254
+ callback: (item: import("./props").TreeNode, cb: (data: import("./props").TreeNode | import("./props").TreeNode[]) => unknown, data?: unknown) => import("./props").TreeNode | import("./props").TreeNode[] | Promise<import("./props").TreeNode | import("./props").TreeNode[]>;
245
255
  cache: boolean;
246
256
  deepAutoOpen?: string;
247
257
  trigger?: string[];
@@ -334,13 +344,21 @@ declare const BkTree: {
334
344
  } & {
335
345
  default: boolean;
336
346
  };
347
+ cascade: import("vue-types").VueTypeValidableDef<boolean> & {
348
+ default: boolean;
349
+ } & {
350
+ default: boolean;
351
+ };
337
352
  intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
338
353
  default: boolean | (() => import("./props").IIntersectionObserver);
339
354
  };
340
355
  }>> & Readonly<{
356
+ onNodeAsyncLoad?: (...args: any[]) => any;
357
+ onNodeAsyncLoadError?: (...args: any[]) => any;
341
358
  onNodeChecked?: (...args: any[]) => any;
342
359
  onNodeClick?: (...args: any[]) => any;
343
360
  onNodeCollapse?: (...args: any[]) => any;
361
+ onNodeDataChange?: (...args: any[]) => any;
344
362
  onNodeDragLeave?: (...args: any[]) => any;
345
363
  onNodeDragOver?: (...args: any[]) => any;
346
364
  onNodeDragSort?: (...args: any[]) => any;
@@ -380,6 +398,7 @@ declare const BkTree: {
380
398
  nodeContentAction: any;
381
399
  keepSlotData: boolean;
382
400
  checkStrictly: boolean;
401
+ cascade: boolean;
383
402
  }>;
384
403
  __isFragment?: never;
385
404
  __isTeleport?: never;
@@ -423,10 +442,9 @@ declare const BkTree: {
423
442
  prefixIcon: import("vue-types").VueTypeDef<any> & {
424
443
  default: any;
425
444
  };
445
+ onDataChange: import("vue").PropType<import("./props").TreeDataChangeHandler>;
426
446
  async: import("vue-types").VueTypeShape<{
427
- callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
428
- [key: string]: any;
429
- }>>;
447
+ callback: (item: import("./props").TreeNode, cb: (data: import("./props").TreeNode | import("./props").TreeNode[]) => unknown, data?: unknown) => import("./props").TreeNode | import("./props").TreeNode[] | Promise<import("./props").TreeNode | import("./props").TreeNode[]>;
430
448
  cache: boolean;
431
449
  deepAutoOpen?: string;
432
450
  trigger?: string[];
@@ -519,13 +537,21 @@ declare const BkTree: {
519
537
  } & {
520
538
  default: boolean;
521
539
  };
540
+ cascade: import("vue-types").VueTypeValidableDef<boolean> & {
541
+ default: boolean;
542
+ } & {
543
+ default: boolean;
544
+ };
522
545
  intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
523
546
  default: boolean | (() => import("./props").IIntersectionObserver);
524
547
  };
525
548
  }>> & Readonly<{
549
+ onNodeAsyncLoad?: (...args: any[]) => any;
550
+ onNodeAsyncLoadError?: (...args: any[]) => any;
526
551
  onNodeChecked?: (...args: any[]) => any;
527
552
  onNodeClick?: (...args: any[]) => any;
528
553
  onNodeCollapse?: (...args: any[]) => any;
554
+ onNodeDataChange?: (...args: any[]) => any;
529
555
  onNodeDragLeave?: (...args: any[]) => any;
530
556
  onNodeDragOver?: (...args: any[]) => any;
531
557
  onNodeDragSort?: (...args: any[]) => any;
@@ -535,10 +561,13 @@ declare const BkTree: {
535
561
  onNodeExpand?: (...args: any[]) => any;
536
562
  onNodeSelected?: (...args: any[]) => any;
537
563
  }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
564
+ nodeAsyncLoad: (..._args: any[]) => boolean;
565
+ nodeAsyncLoadError: (..._args: any[]) => boolean;
538
566
  nodeClick: (..._args: any[]) => boolean;
539
567
  nodeCollapse: (..._args: any[]) => boolean;
540
568
  nodeExpand: (..._args: any[]) => boolean;
541
569
  nodeChecked: (..._args: any[]) => boolean;
570
+ nodeDataChange: (..._args: any[]) => boolean;
542
571
  nodeDragStart: (..._args: any[]) => boolean;
543
572
  nodeDragOver: (..._args: any[]) => boolean;
544
573
  nodeDragLeave: (..._args: any[]) => boolean;
@@ -577,5 +606,6 @@ declare const BkTree: {
577
606
  nodeContentAction: any;
578
607
  keepSlotData: boolean;
579
608
  checkStrictly: boolean;
609
+ cascade: boolean;
580
610
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[], any[]>;
581
611
  export default BkTree;