vxe-pc-ui 4.11.1 → 4.11.3

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 (34) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/tree/src/tree.js +83 -67
  5. package/es/ui/index.js +1 -1
  6. package/es/ui/src/log.js +1 -1
  7. package/lib/icon/style/style.css +1 -1
  8. package/lib/icon/style/style.min.css +1 -1
  9. package/lib/index.umd.js +91 -75
  10. package/lib/index.umd.min.js +1 -1
  11. package/lib/style.css +1 -1
  12. package/lib/style.min.css +1 -1
  13. package/lib/tree/src/tree.js +87 -71
  14. package/lib/tree/src/tree.min.js +1 -1
  15. package/lib/ui/index.js +1 -1
  16. package/lib/ui/index.min.js +1 -1
  17. package/lib/ui/src/log.js +1 -1
  18. package/lib/ui/src/log.min.js +1 -1
  19. package/package.json +1 -1
  20. package/packages/tree/src/tree.ts +88 -73
  21. package/types/components/grid.d.ts +12 -0
  22. package/types/components/table.d.ts +25 -0
  23. /package/es/icon/{iconfont.1765466150452.ttf → iconfont.1765536745982.ttf} +0 -0
  24. /package/es/icon/{iconfont.1765466150452.woff → iconfont.1765536745982.woff} +0 -0
  25. /package/es/icon/{iconfont.1765466150452.woff2 → iconfont.1765536745982.woff2} +0 -0
  26. /package/es/{iconfont.1765466150452.ttf → iconfont.1765536745982.ttf} +0 -0
  27. /package/es/{iconfont.1765466150452.woff → iconfont.1765536745982.woff} +0 -0
  28. /package/es/{iconfont.1765466150452.woff2 → iconfont.1765536745982.woff2} +0 -0
  29. /package/lib/icon/style/{iconfont.1765466150452.ttf → iconfont.1765536745982.ttf} +0 -0
  30. /package/lib/icon/style/{iconfont.1765466150452.woff → iconfont.1765536745982.woff} +0 -0
  31. /package/lib/icon/style/{iconfont.1765466150452.woff2 → iconfont.1765536745982.woff2} +0 -0
  32. /package/lib/{iconfont.1765466150452.ttf → iconfont.1765536745982.ttf} +0 -0
  33. /package/lib/{iconfont.1765466150452.woff → iconfont.1765536745982.woff} +0 -0
  34. /package/lib/{iconfont.1765466150452.woff2 → iconfont.1765536745982.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3599,14 +3599,14 @@ function checkDynamic() {
3599
3599
  }
3600
3600
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
3601
3601
 
3602
- const log_version = `ui v${"4.11.1"}`;
3602
+ const log_version = `ui v${"4.11.3"}`;
3603
3603
  const warnLog = log.create('warn', log_version);
3604
3604
  const errLog = log.create('error', log_version);
3605
3605
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
3606
3606
 
3607
3607
 
3608
3608
 
3609
- const ui_version = "4.11.1";
3609
+ const ui_version = "4.11.3";
3610
3610
  index_esm_VxeUI.uiVersion = ui_version;
3611
3611
  index_esm_VxeUI.dynamicApp = dynamicApp;
3612
3612
  function config(options) {
@@ -41554,80 +41554,55 @@ function tree_createInternalData() {
41554
41554
  dragToChild: !!prevDragToChild,
41555
41555
  offsetIndex: dragOffsetIndex
41556
41556
  };
41557
- const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
41558
- return Promise.resolve(dEndMethod ? dEndMethod(dragParams) : true).then(status => {
41559
- if (!status) {
41560
- return errRest;
41561
- }
41562
- const dragNodeid = getNodeId(dragNode);
41563
- const dragNodeRest = nodeMaps[dragNodeid] || {};
41564
- const _dragNodeIndex = dragNodeRest._index;
41565
- let dragNodeHeight = 0;
41566
- let dragOffsetTop = -1;
41567
- if (animation) {
41568
- const prevItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${prevDragNode}"]`);
41569
- const oldItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${dragNodeid}"]`);
41570
- const targetItemEl = prevItemEl || oldItemEl;
41571
- if (targetItemEl) {
41572
- dragNodeHeight = targetItemEl.offsetHeight;
41573
- }
41574
- if (oldItemEl) {
41575
- dragOffsetTop = oldItemEl.offsetTop;
41576
- }
41577
- }
41578
- let oafIndex = -1;
41579
- let nafIndex = -1;
41580
- if (transform) {
41581
- // 移出源位置
41582
- const oldRest = dragNodeRest;
41583
- const newNodeid = getNodeId(prevDragNode);
41584
- const newRest = nodeMaps[newNodeid];
41585
- if (oldRest && newRest) {
41586
- const {
41587
- level: oldLevel
41588
- } = oldRest;
41589
- const {
41590
- level: newLevel
41591
- } = newRest;
41592
- const oldAllMaps = {};
41593
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([dragNode], item => {
41594
- oldAllMaps[getNodeId(item)] = item;
41595
- }, {
41596
- children: mapChildrenField
41597
- });
41598
- let isSelfToChildStatus = false;
41599
- if (oldLevel && newLevel) {
41600
- // 子到子
41601
- if (isPeerDrag && !isCrossDrag) {
41602
- if (oldRest.item[parentField] !== newRest.item[parentField]) {
41603
- // 非同级
41604
- return errRest;
41605
- }
41606
- } else {
41607
- if (!isCrossDrag) {
41608
- return errRest;
41609
- }
41610
- if (oldAllMaps[newNodeid]) {
41611
- isSelfToChildStatus = true;
41612
- if (!(isCrossDrag && isSelfToChildDrag)) {
41613
- if (index_esm_VxeUI.modal) {
41614
- index_esm_VxeUI.modal.message({
41615
- status: 'error',
41616
- content: getI18n('vxe.error.treeDragChild')
41617
- });
41618
- }
41619
- return errRest;
41620
- }
41621
- }
41622
- }
41623
- } else if (oldLevel) {
41624
- // 子到根
41625
- if (!isCrossDrag) {
41557
+ const dragNodeid = getNodeId(dragNode);
41558
+ const dragNodeRest = nodeMaps[dragNodeid] || {};
41559
+ const _dragNodeIndex = dragNodeRest._index;
41560
+ let dragNodeHeight = 0;
41561
+ let dragOffsetTop = -1;
41562
+ if (animation) {
41563
+ const prevItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${prevDragNode}"]`);
41564
+ const oldItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${dragNodeid}"]`);
41565
+ const targetItemEl = prevItemEl || oldItemEl;
41566
+ if (targetItemEl) {
41567
+ dragNodeHeight = targetItemEl.offsetHeight;
41568
+ }
41569
+ if (oldItemEl) {
41570
+ dragOffsetTop = oldItemEl.offsetTop;
41571
+ }
41572
+ }
41573
+ let oafIndex = -1;
41574
+ let nafIndex = -1;
41575
+ const oldAllMaps = {};
41576
+ let isSelfToChildStatus = false;
41577
+ const oldRest = dragNodeRest;
41578
+ const newNodeid = getNodeId(prevDragNode);
41579
+ const newRest = nodeMaps[newNodeid];
41580
+ if (transform) {
41581
+ if (oldRest && newRest) {
41582
+ const {
41583
+ level: oldLevel
41584
+ } = oldRest;
41585
+ const {
41586
+ level: newLevel
41587
+ } = newRest;
41588
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([dragNode], item => {
41589
+ oldAllMaps[getNodeId(item)] = item;
41590
+ }, {
41591
+ children: mapChildrenField
41592
+ });
41593
+ if (oldLevel && newLevel) {
41594
+ // 子到子
41595
+ if (isPeerDrag && !isCrossDrag) {
41596
+ if (oldRest.item[parentField] !== newRest.item[parentField]) {
41597
+ // 非同级
41598
+ clearNodeDragData();
41599
+ clearCrossTreeDragStatus();
41626
41600
  return errRest;
41627
41601
  }
41628
- } else if (newLevel) {
41629
- // 根到子
41602
+ } else {
41630
41603
  if (!isCrossDrag) {
41604
+ clearNodeDragData();
41605
+ clearCrossTreeDragStatus();
41631
41606
  return errRest;
41632
41607
  }
41633
41608
  if (oldAllMaps[newNodeid]) {
@@ -41639,12 +41614,53 @@ function tree_createInternalData() {
41639
41614
  content: getI18n('vxe.error.treeDragChild')
41640
41615
  });
41641
41616
  }
41617
+ clearNodeDragData();
41618
+ clearCrossTreeDragStatus();
41642
41619
  return errRest;
41643
41620
  }
41644
41621
  }
41645
- } else {
41646
- // 根到根
41647
41622
  }
41623
+ } else if (oldLevel) {
41624
+ // 子到根
41625
+ if (!isCrossDrag) {
41626
+ clearNodeDragData();
41627
+ clearCrossTreeDragStatus();
41628
+ return errRest;
41629
+ }
41630
+ } else if (newLevel) {
41631
+ // 根到子
41632
+ if (!isCrossDrag) {
41633
+ clearNodeDragData();
41634
+ clearCrossTreeDragStatus();
41635
+ return errRest;
41636
+ }
41637
+ if (oldAllMaps[newNodeid]) {
41638
+ isSelfToChildStatus = true;
41639
+ if (!(isCrossDrag && isSelfToChildDrag)) {
41640
+ if (index_esm_VxeUI.modal) {
41641
+ index_esm_VxeUI.modal.message({
41642
+ status: 'error',
41643
+ content: getI18n('vxe.error.treeDragChild')
41644
+ });
41645
+ }
41646
+ clearNodeDragData();
41647
+ clearCrossTreeDragStatus();
41648
+ return errRest;
41649
+ }
41650
+ }
41651
+ } else {
41652
+ // 根到根
41653
+ }
41654
+ }
41655
+ }
41656
+ const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
41657
+ return Promise.resolve(dEndMethod ? dEndMethod(dragParams) : true).then(status => {
41658
+ if (!status) {
41659
+ return errRest;
41660
+ }
41661
+ if (transform) {
41662
+ // 移出源位置
41663
+ if (oldRest && newRest) {
41648
41664
  const fullList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toTreeArray(internalData.afterTreeList, {
41649
41665
  key: keyField,
41650
41666
  parentKey: parentField,