ebaoferc 2.0.8 → 2.0.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +43 -43
  3. package/dist/components/BlockHeader/style.less +52 -52
  4. package/dist/components/ImageViewTrigger/index.less +25 -25
  5. package/dist/components/MaskInput/index.d.ts +16 -0
  6. package/dist/components/MaskInput/index.js +130 -0
  7. package/dist/components/MaskInput/style.module.less +4 -0
  8. package/dist/components/MaskTxt/index.d.ts +16 -0
  9. package/dist/components/MaskTxt/index.js +121 -0
  10. package/dist/components/MaskTxt/style.module.less +6 -0
  11. package/dist/components/MindGraph/core/graphic/drag.js +15 -15
  12. package/dist/components/MindGraph/core/graphic/index.js +105 -105
  13. package/dist/components/MindGraph/core/helper/depth-first-walk-tree.js +4 -4
  14. package/dist/components/MindGraph/core/helper/descendant.js +3 -3
  15. package/dist/components/MindGraph/core/helper/get-layout-calc-children.js +6 -6
  16. package/dist/components/MindGraph/core/helper/index.d.ts +15 -15
  17. package/dist/components/MindGraph/core/helper/judge-if-all-child-fold.js +4 -4
  18. package/dist/components/MindGraph/core/helper/judge-if-heir-and-fold.js +6 -6
  19. package/dist/components/MindGraph/core/helper/judge-if-visual-leaf.js +3 -3
  20. package/dist/components/MindGraph/core/index.d.ts +6 -2
  21. package/dist/components/MindGraph/core/index.js +26 -26
  22. package/dist/components/MindGraph/core/process/layout/structured/get-node-cross-boundary.js +7 -7
  23. package/dist/components/MindGraph/core/process/layout/type.js +20 -20
  24. package/dist/components/MindGraph/core/process/visible.js +3 -3
  25. package/dist/components/MindGraph/core/render/index.d.ts +12 -12
  26. package/dist/components/MindGraph/react/component/index.module.less +71 -71
  27. package/dist/components/MindGraph/react/hook/use-shadow-state.d.ts +1 -1
  28. package/dist/components/MindGraph/react/scrollbar/axis/index.module.less +47 -47
  29. package/dist/components/QueryProCard/index.less +9 -9
  30. package/dist/components/SectionTitleBar/index.less +31 -31
  31. package/dist/components/SliderVerify/style.module.less +119 -119
  32. package/dist/components/StyledModalForm/index.d.ts +1 -1
  33. package/dist/components/StyledModalForm/index.less +51 -51
  34. package/dist/components/StyledQueryFilter/index.js +11 -9
  35. package/dist/components/StyledQueryFilter/index.less +26 -26
  36. package/dist/components/StyledTable/index.less +18 -18
  37. package/dist/components/ThemeStatusTag/index.less +11 -11
  38. package/dist/components/index.d.ts +3 -0
  39. package/dist/components/index.js +2 -0
  40. package/dist/hooks/usePathname/index.js +2 -2
  41. package/dist/typings.d.ts +20 -20
  42. package/dist/utils/format/index.js +14 -14
  43. package/package.json +102 -102
@@ -28,13 +28,13 @@ export var Drag = /*#__PURE__*/_createClass(function Drag(context) {
28
28
  _defineProperty(this, "temporaryLine", void 0);
29
29
  _defineProperty(this, "container", void 0);
30
30
  _defineProperty(this, "draggableLayout", void 0);
31
- /**
32
- * 获取拖动节点插入到关联节点子代的下标
33
- * @param attachedNodeChildren 关联节点的子代
34
- * @param dropPosition 拖动节点镜像中心位置
35
- * @param dragNode 拖动节点
36
- * @param attachedNode 被关联的节点
37
- * @return 期望插入位置
31
+ /**
32
+ * 获取拖动节点插入到关联节点子代的下标
33
+ * @param attachedNodeChildren 关联节点的子代
34
+ * @param dropPosition 拖动节点镜像中心位置
35
+ * @param dragNode 拖动节点
36
+ * @param attachedNode 被关联的节点
37
+ * @return 期望插入位置
38
38
  */
39
39
  _defineProperty(this, "calcDropIndex", function (attachedNodeChildren, dropPosition, dragNode, attachedNode) {
40
40
  return _this.draggableLayout.calcDropIndex({
@@ -47,12 +47,12 @@ export var Drag = /*#__PURE__*/_createClass(function Drag(context) {
47
47
  root: _this.root
48
48
  });
49
49
  });
50
- /**
51
- * 拖动操作
52
- * - 根节点不可拖拽
53
- * @param position 拖动节点镜像中心位置
54
- * @param canBeAttachedNodes 需要搜索的可关联节点
55
- * @return 链接关联信息
50
+ /**
51
+ * 拖动操作
52
+ * - 根节点不可拖拽
53
+ * @param position 拖动节点镜像中心位置
54
+ * @param canBeAttachedNodes 需要搜索的可关联节点
55
+ * @return 链接关联信息
56
56
  */
57
57
  _defineProperty(this, "drag", function (position, canBeAttachedNodes) {
58
58
  var cache = _this.cacheMap.get(_this.dragNode.id);
@@ -88,8 +88,8 @@ export var Drag = /*#__PURE__*/_createClass(function Drag(context) {
88
88
  return undefined;
89
89
  }
90
90
  });
91
- /**
92
- * 通知控制器拖动操作结束
91
+ /**
92
+ * 通知控制器拖动操作结束
93
93
  */
94
94
  _defineProperty(this, "end", function () {
95
95
  _this.temporaryLine.destroy();
@@ -14,20 +14,20 @@ import { Drag } from "./drag";
14
14
  import { nodeTranslateTo } from "./node-translate-to";
15
15
  import { Zoom } from "./zoom";
16
16
  export var Graphic = /*#__PURE__*/_createClass(
17
- /**
18
- * 脑图管理器
19
- * - `viewport`用作判断可视区域
20
- * - svg连线将会自动注入到`container`中
21
- * - transform 相关信息将会自动注入到`container`中
22
- * @param viewport 视窗
23
- * @param container 容器
24
- * @param options 配置参数
17
+ /**
18
+ * 脑图管理器
19
+ * - `viewport`用作判断可视区域
20
+ * - svg连线将会自动注入到`container`中
21
+ * - transform 相关信息将会自动注入到`container`中
22
+ * @param viewport 视窗
23
+ * @param container 容器
24
+ * @param options 配置参数
25
25
  */
26
26
  function Graphic(viewport, _container, _options) {
27
27
  var _this = this;
28
28
  _classCallCheck(this, Graphic);
29
- /**
30
- * 节点相关信息缓存,树形结构拍平
29
+ /**
30
+ * 节点相关信息缓存,树形结构拍平
31
31
  */
32
32
  _defineProperty(this, "cacheMap", new Map());
33
33
  _defineProperty(this, "options", void 0);
@@ -39,16 +39,16 @@ function Graphic(viewport, _container, _options) {
39
39
  _defineProperty(this, "resizeObserver", void 0);
40
40
  _defineProperty(this, "unbindCache", []);
41
41
  _defineProperty(this, "zoom", void 0);
42
- /**
43
- * 同步 options 中的 zoom extent
42
+ /**
43
+ * 同步 options 中的 zoom extent
44
44
  */
45
45
  _defineProperty(this, "syncZoomExtentOptions", function () {
46
46
  _this.zoom.syncZoomExtentOptions({
47
47
  options: _this.options
48
48
  });
49
49
  });
50
- /**
51
- * 获取当前可见的节点
50
+ /**
51
+ * 获取当前可见的节点
52
52
  */
53
53
  _defineProperty(this, "getVisibleNodes", function () {
54
54
  var nodes = [];
@@ -65,10 +65,10 @@ function Graphic(viewport, _container, _options) {
65
65
  }
66
66
  return nodes;
67
67
  });
68
- /**
69
- * 获取节点定位锚点(左上角)位置,可在节点绘制的时候确定其位置
70
- * - 推荐所有节点使用`position:absolute;left:0;top:0;`并且配合`transform`来定位,避免出现绘制异常
71
- * @param id 节点对应id
68
+ /**
69
+ * 获取节点定位锚点(左上角)位置,可在节点绘制的时候确定其位置
70
+ * - 推荐所有节点使用`position:absolute;left:0;top:0;`并且配合`transform`来定位,避免出现绘制异常
71
+ * @param id 节点对应id
72
72
  */
73
73
  _defineProperty(this, "getNodeAnchorCoordinate", function (id) {
74
74
  var cache = _this.cacheMap.get(id);
@@ -132,9 +132,9 @@ function Graphic(viewport, _container, _options) {
132
132
  // 回调事件,通知外部 transform 改变
133
133
  _this.options.callback.onTransformChange(transform);
134
134
  });
135
- /**
136
- * - 计算节点可见是否改变,如改变,则通知外部
137
- * - 重渲染连线,销毁不必要的连线
135
+ /**
136
+ * - 计算节点可见是否改变,如改变,则通知外部
137
+ * - 重渲染连线,销毁不必要的连线
138
138
  */
139
139
  _defineProperty(this, "refreshVisible", function () {
140
140
  if (_this.cacheMap.size) {
@@ -150,9 +150,9 @@ function Graphic(viewport, _container, _options) {
150
150
  }
151
151
  });
152
152
  _defineProperty(this, "throttleRefreshVisible", throttle(this.refreshVisible, 100));
153
- /**
154
- * 视窗尺寸变化
155
- * @private
153
+ /**
154
+ * 视窗尺寸变化
155
+ * @private
156
156
  */
157
157
  _defineProperty(this, "onViewportResize", function () {
158
158
  _this.zoom.syncZoomExtent({
@@ -162,9 +162,9 @@ function Graphic(viewport, _container, _options) {
162
162
  // 避免频繁的刷新可视区域导致界面卡顿
163
163
  _this.throttleRefreshVisible();
164
164
  });
165
- /**
166
- * 注销事件绑定
167
- * - 请在销毁组件之前调用
165
+ /**
166
+ * 注销事件绑定
167
+ * - 请在销毁组件之前调用
168
168
  */
169
169
  _defineProperty(this, "unbind", function () {
170
170
  _this.unbindCache.forEach(function (dispose) {
@@ -172,9 +172,9 @@ function Graphic(viewport, _container, _options) {
172
172
  });
173
173
  _this.unbindCache = [];
174
174
  });
175
- /**
176
- * 判断节点是否可视
177
- * @param id 节点对应id
175
+ /**
176
+ * 判断节点是否可视
177
+ * @param id 节点对应id
178
178
  */
179
179
  _defineProperty(this, "judgeNodeVisible", function (id) {
180
180
  var cache = _this.cacheMap.get(id);
@@ -184,11 +184,11 @@ function Graphic(viewport, _container, _options) {
184
184
  return false;
185
185
  }
186
186
  });
187
- /**
188
- * 设定 `options`
189
- * - 函数不会自动执行重渲染,如果改变的`options`需要重新计算布局等操作,推荐使用 `setData` 驱动数据重渲染
190
- * @param options 设定选项
191
- * @param isMerge 是否与之前的`options`做合并操作
187
+ /**
188
+ * 设定 `options`
189
+ * - 函数不会自动执行重渲染,如果改变的`options`需要重新计算布局等操作,推荐使用 `setData` 驱动数据重渲染
190
+ * @param options 设定选项
191
+ * @param isMerge 是否与之前的`options`做合并操作
192
192
  */
193
193
  _defineProperty(this, "setOptions", function (options) {
194
194
  var isMerge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
@@ -199,14 +199,14 @@ function Graphic(viewport, _container, _options) {
199
199
  }
200
200
  _this.syncZoomExtentOptions();
201
201
  });
202
- /**
203
- * 生成拖动控制器
204
- * - 根节点不可拖拽
205
- * - 当前暂时只有`Mind.ChildAlignMode.structured`布局算法支持拖拽功能
206
- * @param drag 拖动节点node对象或id
207
- * @return
208
- * - 当root(没有调用`setData`)不存在时,或者`drag`为根节点时,返回`undefined`
209
- * - 正常情况返回 `Drag` 类对象
202
+ /**
203
+ * 生成拖动控制器
204
+ * - 根节点不可拖拽
205
+ * - 当前暂时只有`Mind.ChildAlignMode.structured`布局算法支持拖拽功能
206
+ * @param drag 拖动节点node对象或id
207
+ * @return
208
+ * - 当root(没有调用`setData`)不存在时,或者`drag`为根节点时,返回`undefined`
209
+ * - 正常情况返回 `Drag` 类对象
210
210
  */
211
211
  _defineProperty(this, "dragControllerBuilder", function (drag) {
212
212
  var _this$cacheMap$get;
@@ -223,8 +223,8 @@ function Graphic(viewport, _container, _options) {
223
223
  return undefined;
224
224
  }
225
225
  });
226
- /**
227
- * 获取渲染层尺寸
226
+ /**
227
+ * 获取渲染层尺寸
228
228
  */
229
229
  _defineProperty(this, "getLayoutSize", function () {
230
230
  var _this$root;
@@ -235,70 +235,70 @@ function Graphic(viewport, _container, _options) {
235
235
  return undefined;
236
236
  }
237
237
  });
238
- /**
239
- * 获取`id`对应节点
240
- * @param id 节点`id`
238
+ /**
239
+ * 获取`id`对应节点
240
+ * @param id 节点`id`
241
241
  */
242
242
  _defineProperty(this, "getNode", function (id) {
243
243
  var _this$cacheMap$get2;
244
244
  return (_this$cacheMap$get2 = _this.cacheMap.get(id)) === null || _this$cacheMap$get2 === void 0 ? void 0 : _this$cacheMap$get2.node;
245
245
  });
246
- /**
247
- * 获取`id`对应节点父级
248
- * @param id 节点`id`
246
+ /**
247
+ * 获取`id`对应节点父级
248
+ * @param id 节点`id`
249
249
  */
250
250
  _defineProperty(this, "getParent", function (id) {
251
251
  var _this$cacheMap$get3;
252
252
  return (_this$cacheMap$get3 = _this.cacheMap.get(id)) === null || _this$cacheMap$get3 === void 0 ? void 0 : _this$cacheMap$get3.parent;
253
253
  });
254
- /**
255
- * 获取`id`对应节点渲染方位
256
- * @param id 节点`id`
254
+ /**
255
+ * 获取`id`对应节点渲染方位
256
+ * @param id 节点`id`
257
257
  */
258
258
  _defineProperty(this, "getNodeOrientation", function (id) {
259
259
  var _this$cacheMap$get4;
260
260
  return (_this$cacheMap$get4 = _this.cacheMap.get(id)) === null || _this$cacheMap$get4 === void 0 ? void 0 : _this$cacheMap$get4.orientation;
261
261
  });
262
- /**
263
- * 主动设置位移缩放
264
- * - 会与之前的`transform`做深度合并
265
- * - 请注意:`setTransform` 之后 `onTransformChange` 事件依旧会触发
266
- * - 此方法不受 `zoomExtent.translate`、`zoomExtent.scale` 限制
267
- * @param transform 位移缩放数据
268
- * @param duration 周期,如果配置,则执行变换会附带动画效果
262
+ /**
263
+ * 主动设置位移缩放
264
+ * - 会与之前的`transform`做深度合并
265
+ * - 请注意:`setTransform` 之后 `onTransformChange` 事件依旧会触发
266
+ * - 此方法不受 `zoomExtent.translate`、`zoomExtent.scale` 限制
267
+ * @param transform 位移缩放数据
268
+ * @param duration 周期,如果配置,则执行变换会附带动画效果
269
269
  */
270
270
  _defineProperty(this, "setTransform", function (transform, duration) {
271
271
  _this.transform = merge({}, _this.transform, transform);
272
272
  _this.zoom.setTransform(_this.transform, duration);
273
273
  });
274
- /**
275
- * 设定位移
276
- * - 此方法受到 `zoomExtent.translate` 限制
277
- * @param translate 位移差(屏幕尺度)
278
- * @param duration 周期,如果配置,则执行变换会附带动画效果
274
+ /**
275
+ * 设定位移
276
+ * - 此方法受到 `zoomExtent.translate` 限制
277
+ * @param translate 位移差(屏幕尺度)
278
+ * @param duration 周期,如果配置,则执行变换会附带动画效果
279
279
  */
280
280
  _defineProperty(this, "translate", function (translate, duration) {
281
281
  _this.zoom.translate(translate, duration);
282
282
  });
283
- /**
284
- * 设定缩放
285
- * - 此方法受到 `zoomExtent.translate` 限制
286
- * - 此方法受到 `zoomExtent.scale` 限制
287
- * @param scale 缩放比
288
- * @param point 缩放相对点(如不配置或为`undefined`,则默认相对于`viewport`中心缩放)
289
- * @param duration 动画周期,如配置,则位移会附带动画效果
283
+ /**
284
+ * 设定缩放
285
+ * - 此方法受到 `zoomExtent.translate` 限制
286
+ * - 此方法受到 `zoomExtent.scale` 限制
287
+ * @param scale 缩放比
288
+ * @param point 缩放相对点(如不配置或为`undefined`,则默认相对于`viewport`中心缩放)
289
+ * @param duration 动画周期,如配置,则位移会附带动画效果
290
290
  */
291
291
  _defineProperty(this, "scale", function (scale, point, duration) {
292
292
  _this.zoom.scale(scale, point, duration);
293
293
  });
294
- /**
295
- * 将某一个节点中心从某个相对位置做位移(其尺度为屏幕尺度)操作
296
- * - 此方法不受 `zoomExtent.translate` 限制
297
- * @param config 配置参数
298
- * @param config.id 节点id
299
- * @param config.diff 位移差
300
- * @param config.relative 相对位置
301
- * @param duration 动画周期,如配置,则位移会附带动画效果
294
+ /**
295
+ * 将某一个节点中心从某个相对位置做位移(其尺度为屏幕尺度)操作
296
+ * - 此方法不受 `zoomExtent.translate` 限制
297
+ * @param config 配置参数
298
+ * @param config.id 节点id
299
+ * @param config.diff 位移差
300
+ * @param config.relative 相对位置
301
+ * @param duration 动画周期,如配置,则位移会附带动画效果
302
302
  */
303
303
  _defineProperty(this, "nodeTranslateTo", function (config, duration) {
304
304
  var id = config.id,
@@ -314,24 +314,24 @@ function Graphic(viewport, _container, _options) {
314
314
  zoom: _this.zoom
315
315
  }, duration);
316
316
  });
317
- /**
318
- * 获取位移缩放信息
317
+ /**
318
+ * 获取位移缩放信息
319
319
  */
320
320
  _defineProperty(this, "getTransform", function () {
321
321
  return _objectSpread({}, _this.transform);
322
322
  });
323
- /**
324
- * 设置锚点节点
325
- * @param id 锚定节点id(如不设定,则清空锚点,根节点居中,缩放比归一)
323
+ /**
324
+ * 设置锚点节点
325
+ * @param id 锚定节点id(如不设定,则清空锚点,根节点居中,缩放比归一)
326
326
  */
327
327
  _defineProperty(this, "setAnchor", function (id) {
328
328
  _this.anchor = id;
329
329
  });
330
- /**
331
- * 设置/更新数据,启动重渲染
332
- * - 在重计算定位时,将保持 `anchor` 对应节点在屏幕上的相对位置不变
333
- * - 如果 `anchor` 没有设定,或者找不到对应节点,则,根节点居中,缩放比重置为1
334
- * @param root 根数据
330
+ /**
331
+ * 设置/更新数据,启动重渲染
332
+ * - 在重计算定位时,将保持 `anchor` 对应节点在屏幕上的相对位置不变
333
+ * - 如果 `anchor` 没有设定,或者找不到对应节点,则,根节点居中,缩放比重置为1
334
+ * @param root 根数据
335
335
  */
336
336
  _defineProperty(this, "setData", function (root) {
337
337
  _this.root = root;
@@ -346,17 +346,17 @@ function Graphic(viewport, _container, _options) {
346
346
  // 设定数据后,通知外部可见节点
347
347
  _this.options.callback.onNodeVisibleChange(_this.getVisibleNodes());
348
348
  });
349
- /**
350
- * 刷新
349
+ /**
350
+ * 刷新
351
351
  */
352
352
  _defineProperty(this, "refresh", function () {
353
353
  if (_this.root) {
354
354
  _this.setData(_this.root);
355
355
  }
356
356
  });
357
- /**
358
- * 渲染链接到某个`container`下
359
- * @param container 容器
357
+ /**
358
+ * 渲染链接到某个`container`下
359
+ * @param container 容器
360
360
  */
361
361
  _defineProperty(this, "connectTo", function (container) {
362
362
  Render.connect({
@@ -366,8 +366,8 @@ function Graphic(viewport, _container, _options) {
366
366
  root: _this.root
367
367
  });
368
368
  });
369
- /**
370
- * 同步渲染层尺寸到 container 中
369
+ /**
370
+ * 同步渲染层尺寸到 container 中
371
371
  */
372
372
  _defineProperty(this, "syncLayoutSize", function () {
373
373
  var _this$cacheMap$get5, _this$root2;
@@ -378,15 +378,15 @@ function Graphic(viewport, _container, _options) {
378
378
  _this.container.style.width = "".concat(layoutSize.width, "px");
379
379
  _this.container.style.height = "".concat(layoutSize.height, "px");
380
380
  });
381
- /**
382
- * 链接各个节点
381
+ /**
382
+ * 链接各个节点
383
383
  */
384
384
  _defineProperty(this, "connect", function () {
385
385
  _this.connectTo(_this.container);
386
386
  });
387
- /**
388
- * 计算脑图布局
389
- * - 请保证调用之前 data 已经通过 setData 设置完备
387
+ /**
388
+ * 计算脑图布局
389
+ * - 请保证调用之前 data 已经通过 setData 设置完备
390
390
  */
391
391
  _defineProperty(this, "layout", function () {
392
392
  Render.layout({
@@ -400,8 +400,8 @@ function Graphic(viewport, _container, _options) {
400
400
  zoom: _this.zoom
401
401
  });
402
402
  });
403
- /**
404
- * 计算各节点可见性,以及链接可见性
403
+ /**
404
+ * 计算各节点可见性,以及链接可见性
405
405
  */
406
406
  _defineProperty(this, "calcVisible", function () {
407
407
  return Render.calcVisible({
@@ -1,7 +1,7 @@
1
- /**
2
- * 深度优先遍历
3
- * @param root 根节点
4
- * @param callback before:递归之前(返回 true 代表继续搜索子代,false代表终止),after:子代递归完成返回
1
+ /**
2
+ * 深度优先遍历
3
+ * @param root 根节点
4
+ * @param callback before:递归之前(返回 true 代表继续搜索子代,false代表终止),after:子代递归完成返回
5
5
  */
6
6
  export var depthFirstWalkTree = function depthFirstWalkTree(root, callback) {
7
7
  var recursion = function recursion(now, parent) {
@@ -1,9 +1,9 @@
1
1
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
2
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
3
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
- /**
5
- * 获取某个节点的所有后代
6
- * @param node 节点
4
+ /**
5
+ * 获取某个节点的所有后代
6
+ * @param node 节点
7
7
  */
8
8
  export var descendant = function descendant(node) {
9
9
  var result = [];
@@ -1,12 +1,12 @@
1
1
  import { Mind } from "../index";
2
2
  import { Helper } from "./index";
3
3
 
4
- /**
5
- * 获取用于布局计算的子代
6
- * - 剔除掉被折叠的部分
7
- * @param node
8
- * @param rootId
9
- * @param getRootHeirOrientation
4
+ /**
5
+ * 获取用于布局计算的子代
6
+ * - 剔除掉被折叠的部分
7
+ * @param node
8
+ * @param rootId
9
+ * @param getRootHeirOrientation
10
10
  */
11
11
  export var getLayoutCalcChildren = function getLayoutCalcChildren(node, rootId, getRootHeirOrientation) {
12
12
  // 判断是否所有子代都折叠了
@@ -1,23 +1,23 @@
1
1
  export declare const Helper: {
2
- breadthFirstWalkTree: (node: import("../../../..").Mind.Node, callback: {
3
- before: (node: import("../../../..").Mind.Node) => boolean;
4
- after: (rank: import("../../../..").Mind.Node[]) => void;
2
+ breadthFirstWalkTree: (node: import("..").Mind.Node, callback: {
3
+ before: (node: import("..").Mind.Node) => boolean;
4
+ after: (rank: import("..").Mind.Node[]) => void;
5
5
  }) => void;
6
- depthFirstWalkTree: (root: import("../../../..").Mind.Node, callback: {
7
- before: (node: import("../../../..").Mind.Node, parent?: import("../../../..").Mind.Node | undefined) => boolean;
8
- after: (node: import("../../../..").Mind.Node, parent?: import("../../../..").Mind.Node | undefined) => void;
6
+ depthFirstWalkTree: (root: import("..").Mind.Node, callback: {
7
+ before: (node: import("..").Mind.Node, parent?: import("..").Mind.Node | undefined) => boolean;
8
+ after: (node: import("..").Mind.Node, parent?: import("..").Mind.Node | undefined) => void;
9
9
  }) => void;
10
- descendant: (node: import("../../../..").Mind.Node) => import("../../../..").Mind.Node[];
10
+ descendant: (node: import("..").Mind.Node) => import("..").Mind.Node[];
11
11
  error: (message: string) => Error;
12
- getLayoutCalcChildren: (node: import("../../../..").Mind.Node, rootId: string, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => import("../../../..").Mind.Node[];
12
+ getLayoutCalcChildren: (node: import("..").Mind.Node, rootId: string, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => import("..").Mind.Node[];
13
13
  getSvgPathId: (id: string) => string;
14
- judgeIfAllChildFold: (node: import("../../../..").Mind.Node, rootId: string) => boolean;
15
- judgeIfHeirAndFold: (node: import("../../../..").Mind.Node, parent: import("../../../..").Mind.Node | undefined, root: import("../../../..").Mind.Root, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => boolean;
16
- judgeIfVisualLeaf: (node: import("../../../..").Mind.Node, children?: import("../../../..").Mind.Node[] | undefined) => boolean | boolean[] | undefined;
17
- rootToNodeArray: (root: import("../../../..").Mind.Root, callback: (node: import("../../../..").Mind.Node) => void) => import("../../../..").Mind.Node[];
18
- transformRootToWalkable: (root: import("../../../..").Mind.Root) => {
19
- getRootHeirOrientation: (id: string) => import("../../../..").Mind.Orientation;
20
- shadowNode: import("../../../..").Mind.Node;
14
+ judgeIfAllChildFold: (node: import("..").Mind.Node, rootId: string) => boolean;
15
+ judgeIfHeirAndFold: (node: import("..").Mind.Node, parent: import("..").Mind.Node | undefined, root: import("..").Mind.Root, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => boolean;
16
+ judgeIfVisualLeaf: (node: import("..").Mind.Node, children?: import("..").Mind.Node[] | undefined) => boolean | boolean[] | undefined;
17
+ rootToNodeArray: (root: import("..").Mind.Root, callback: (node: import("..").Mind.Node) => void) => import("..").Mind.Node[];
18
+ transformRootToWalkable: (root: import("..").Mind.Root) => {
19
+ getRootHeirOrientation: (id: string) => import("..").Mind.Orientation;
20
+ shadowNode: import("..").Mind.Node;
21
21
  };
22
22
  withPrefix: (message: string) => string;
23
23
  };
@@ -1,7 +1,7 @@
1
- /**
2
- * 判断节点是否所有子代都需要被折叠
3
- * @param node
4
- * @param rootId
1
+ /**
2
+ * 判断节点是否所有子代都需要被折叠
3
+ * @param node
4
+ * @param rootId
5
5
  */
6
6
  export var judgeIfAllChildFold = function judgeIfAllChildFold(node, rootId) {
7
7
  if (node.id === rootId) {
@@ -1,10 +1,10 @@
1
1
  import { Mind } from "../index";
2
- /**
3
- * 判断节点是否为root直系子代并且已经被折叠了
4
- * @param node
5
- * @param parent
6
- * @param root
7
- * @param getRootHeirOrientation
2
+ /**
3
+ * 判断节点是否为root直系子代并且已经被折叠了
4
+ * @param node
5
+ * @param parent
6
+ * @param root
7
+ * @param getRootHeirOrientation
8
8
  */
9
9
  export var judgeIfHeirAndFold = function judgeIfHeirAndFold(node, parent, root, getRootHeirOrientation) {
10
10
  // 是否为根节点直系子代
@@ -1,6 +1,6 @@
1
- /**
2
- * 判断节点是否为视觉上的叶节点
3
- * - 子代被折叠也算视觉上叶节点
1
+ /**
2
+ * 判断节点是否为视觉上的叶节点
3
+ * - 子代被折叠也算视觉上叶节点
4
4
  */
5
5
  export var judgeIfVisualLeaf = function judgeIfVisualLeaf(node, children) {
6
6
  return !children || children.length === 0 || node.fold;
@@ -361,7 +361,9 @@ export declare namespace Mind {
361
361
  breadthFirstWalkTree: (node: Node, callback: {
362
362
  before: (node: Node) => boolean;
363
363
  after: (rank: Node[]) => void;
364
- }) => void;
364
+ }) => void; /**
365
+ * 直系子代节点中心对齐
366
+ */
365
367
  depthFirstWalkTree: (root: Node, callback: {
366
368
  before: (node: Node, parent?: Node | undefined) => boolean;
367
369
  after: (node: Node, parent?: Node | undefined) => void;
@@ -384,7 +386,9 @@ export declare namespace Mind {
384
386
  export const _WithDefault: {
385
387
  cache: (data?: NodeCache | undefined) => Required<NodeCache>;
386
388
  options: (data?: Options | undefined) => Required<Options>;
387
- transform: (data?: Transform | undefined) => Required<Transform>;
389
+ transform: (data?: Transform | undefined) => Required<Transform>; /**
390
+ * y轴垂直方向渲染
391
+ */
388
392
  };
389
393
  export {};
390
394
  }