vxe-table 3.13.14 → 3.14.0-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 (131) hide show
  1. package/es/grid/src/grid.js +41 -31
  2. package/es/locale/lang/ar-EG.js +1 -0
  3. package/es/locale/lang/de-DE.js +1 -0
  4. package/es/locale/lang/en-US.js +3 -2
  5. package/es/locale/lang/es-ES.js +1 -0
  6. package/es/locale/lang/fr-FR.js +1 -0
  7. package/es/locale/lang/hu-HU.js +1 -0
  8. package/es/locale/lang/hy-AM.js +1 -0
  9. package/es/locale/lang/id-ID.js +1 -0
  10. package/es/locale/lang/it-IT.js +1 -0
  11. package/es/locale/lang/ja-JP.js +1 -0
  12. package/es/locale/lang/ko-KR.js +1 -0
  13. package/es/locale/lang/nb-NO.js +1 -0
  14. package/es/locale/lang/pt-BR.js +1 -0
  15. package/es/locale/lang/ru-RU.js +1 -0
  16. package/es/locale/lang/th-TH.js +1 -0
  17. package/es/locale/lang/ug-CN.js +1 -0
  18. package/es/locale/lang/uk-UA.js +1 -0
  19. package/es/locale/lang/vi-VN.js +1 -0
  20. package/es/locale/lang/zh-CHT.js +1 -0
  21. package/es/locale/lang/zh-CN.js +1 -0
  22. package/es/style.css +1 -1
  23. package/es/table/module/custom/panel.js +18 -16
  24. package/es/table/module/edit/mixin.js +3 -1
  25. package/es/table/src/cell.js +2 -1
  26. package/es/table/src/methods.js +297 -178
  27. package/es/table/src/table.js +170 -165
  28. package/es/ui/index.js +1 -1
  29. package/es/ui/src/log.js +1 -1
  30. package/lib/grid/src/grid.js +41 -32
  31. package/lib/grid/src/grid.min.js +1 -1
  32. package/lib/index.umd.js +1743 -2683
  33. package/lib/index.umd.min.js +1 -1
  34. package/lib/locale/lang/ar-EG.js +1 -0
  35. package/lib/locale/lang/ar-EG.min.js +1 -1
  36. package/lib/locale/lang/de-DE.js +1 -0
  37. package/lib/locale/lang/de-DE.min.js +1 -1
  38. package/lib/locale/lang/en-US.js +3 -2
  39. package/lib/locale/lang/en-US.min.js +1 -1
  40. package/lib/locale/lang/en-US.umd.js +3 -2
  41. package/lib/locale/lang/es-ES.js +1 -0
  42. package/lib/locale/lang/es-ES.min.js +1 -1
  43. package/lib/locale/lang/es-ES.umd.js +1 -0
  44. package/lib/locale/lang/fr-FR.js +1 -0
  45. package/lib/locale/lang/fr-FR.min.js +1 -1
  46. package/lib/locale/lang/hu-HU.js +1 -0
  47. package/lib/locale/lang/hu-HU.min.js +1 -1
  48. package/lib/locale/lang/hu-HU.umd.js +1 -0
  49. package/lib/locale/lang/hy-AM.js +1 -0
  50. package/lib/locale/lang/hy-AM.min.js +1 -1
  51. package/lib/locale/lang/id-ID.js +1 -0
  52. package/lib/locale/lang/id-ID.min.js +1 -1
  53. package/lib/locale/lang/it-IT.js +1 -0
  54. package/lib/locale/lang/it-IT.min.js +1 -1
  55. package/lib/locale/lang/ja-JP.js +1 -0
  56. package/lib/locale/lang/ja-JP.min.js +1 -1
  57. package/lib/locale/lang/ja-JP.umd.js +1 -0
  58. package/lib/locale/lang/ko-KR.js +1 -0
  59. package/lib/locale/lang/ko-KR.min.js +1 -1
  60. package/lib/locale/lang/ko-KR.umd.js +1 -0
  61. package/lib/locale/lang/nb-NO.js +1 -0
  62. package/lib/locale/lang/nb-NO.min.js +1 -1
  63. package/lib/locale/lang/pt-BR.js +1 -0
  64. package/lib/locale/lang/pt-BR.min.js +1 -1
  65. package/lib/locale/lang/pt-BR.umd.js +1 -0
  66. package/lib/locale/lang/ru-RU.js +1 -0
  67. package/lib/locale/lang/ru-RU.min.js +1 -1
  68. package/lib/locale/lang/ru-RU.umd.js +1 -0
  69. package/lib/locale/lang/th-TH.js +1 -0
  70. package/lib/locale/lang/th-TH.min.js +1 -1
  71. package/lib/locale/lang/ug-CN.js +1 -0
  72. package/lib/locale/lang/ug-CN.min.js +1 -1
  73. package/lib/locale/lang/uk-UA.js +1 -0
  74. package/lib/locale/lang/uk-UA.min.js +1 -1
  75. package/lib/locale/lang/uk-UA.umd.js +1 -0
  76. package/lib/locale/lang/vi-VN.js +1 -0
  77. package/lib/locale/lang/vi-VN.min.js +1 -1
  78. package/lib/locale/lang/zh-CHT.js +1 -0
  79. package/lib/locale/lang/zh-CHT.min.js +1 -1
  80. package/lib/locale/lang/zh-CHT.umd.js +1 -0
  81. package/lib/locale/lang/zh-CN.js +1 -0
  82. package/lib/locale/lang/zh-CN.min.js +1 -1
  83. package/lib/locale/lang/zh-CN.umd.js +1 -0
  84. package/lib/style.css +1 -1
  85. package/lib/table/module/custom/panel.js +18 -16
  86. package/lib/table/module/custom/panel.min.js +1 -1
  87. package/lib/table/module/edit/mixin.js +3 -1
  88. package/lib/table/module/edit/mixin.min.js +1 -1
  89. package/lib/table/src/cell.js +2 -1
  90. package/lib/table/src/cell.min.js +1 -1
  91. package/lib/table/src/methods.js +312 -184
  92. package/lib/table/src/methods.min.js +1 -1
  93. package/lib/table/src/table.js +179 -180
  94. package/lib/table/src/table.min.js +1 -1
  95. package/lib/ui/index.js +1 -1
  96. package/lib/ui/index.min.js +1 -1
  97. package/lib/ui/src/log.js +1 -1
  98. package/lib/ui/src/log.min.js +1 -1
  99. package/package.json +2 -2
  100. package/packages/grid/src/grid.ts +41 -31
  101. package/packages/locale/lang/ar-EG.ts +1 -0
  102. package/packages/locale/lang/de-DE.ts +1 -0
  103. package/packages/locale/lang/en-US.ts +3 -2
  104. package/packages/locale/lang/es-ES.ts +1 -0
  105. package/packages/locale/lang/fr-FR.ts +1 -0
  106. package/packages/locale/lang/hu-HU.ts +1 -0
  107. package/packages/locale/lang/hy-AM.ts +1 -0
  108. package/packages/locale/lang/id-ID.ts +1 -0
  109. package/packages/locale/lang/it-IT.ts +1 -0
  110. package/packages/locale/lang/ja-JP.ts +1 -0
  111. package/packages/locale/lang/ko-KR.ts +1 -0
  112. package/packages/locale/lang/nb-NO.ts +1 -0
  113. package/packages/locale/lang/pt-BR.ts +1 -0
  114. package/packages/locale/lang/ru-RU.ts +1 -0
  115. package/packages/locale/lang/th-TH.ts +1 -0
  116. package/packages/locale/lang/ug-CN.ts +1 -0
  117. package/packages/locale/lang/uk-UA.ts +1 -0
  118. package/packages/locale/lang/vi-VN.ts +1 -0
  119. package/packages/locale/lang/zh-CHT.ts +1 -0
  120. package/packages/locale/lang/zh-CN.ts +1 -0
  121. package/packages/table/module/custom/panel.ts +22 -20
  122. package/packages/table/module/edit/mixin.ts +3 -1
  123. package/packages/table/src/cell.ts +2 -1
  124. package/packages/table/src/methods.ts +308 -182
  125. package/packages/table/src/table.ts +172 -165
  126. /package/es/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
  127. /package/es/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
  128. /package/es/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
  129. /package/lib/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
  130. /package/lib/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
  131. /package/lib/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
@@ -1067,12 +1067,13 @@ export default {
1067
1067
  if (prevDragCol && dragCol) {
1068
1068
  // 判断是否有拖动
1069
1069
  if (prevDragCol !== dragCol) {
1070
- const oldColumn = dragCol;
1070
+ const dragColumn = dragCol;
1071
1071
  const newColumn = prevDragCol;
1072
1072
  Promise.resolve(dragEndMethod
1073
1073
  ? dragEndMethod({
1074
- oldColumn,
1074
+ oldColumn: dragColumn,
1075
1075
  newColumn,
1076
+ dragColumn,
1076
1077
  dragPos: prevDragPos,
1077
1078
  dragToChild: !!prevDragToChild,
1078
1079
  offsetIndex: dragOffsetIndex
@@ -1084,13 +1085,13 @@ export default {
1084
1085
  let oafIndex = -1;
1085
1086
  let nafIndex = -1;
1086
1087
  const oldAllMaps = {};
1087
- XEUtils.eachTree([oldColumn], column => {
1088
+ XEUtils.eachTree([dragColumn], column => {
1088
1089
  oldAllMaps[column.id] = column;
1089
1090
  });
1090
1091
  let isSelfToChildStatus = false;
1091
1092
  // 只有实时拖拽支持跨层级
1092
1093
  if (immediate) {
1093
- if (oldColumn.parentId && newColumn.parentId) {
1094
+ if (dragColumn.parentId && newColumn.parentId) {
1094
1095
  // 子到子
1095
1096
  if (!isCrossDrag) {
1096
1097
  return;
@@ -1108,7 +1109,7 @@ export default {
1108
1109
  }
1109
1110
  }
1110
1111
  }
1111
- else if (oldColumn.parentId) {
1112
+ else if (dragColumn.parentId) {
1112
1113
  // 子到根
1113
1114
  if (!isCrossDrag) {
1114
1115
  return;
@@ -1135,17 +1136,17 @@ export default {
1135
1136
  else {
1136
1137
  // 根到根
1137
1138
  }
1138
- const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id === oldColumn.id);
1139
+ const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id === dragColumn.id);
1139
1140
  // 改变层级
1140
1141
  if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
1141
1142
  if (oldewMatchRest) {
1142
1143
  const { items: oCols, index: oIndex } = oldewMatchRest;
1143
- const childList = oldColumn.children || [];
1144
+ const childList = dragColumn.children || [];
1144
1145
  childList.forEach(column => {
1145
- column.parentId = oldColumn.parentId;
1146
+ column.parentId = dragColumn.parentId;
1146
1147
  });
1147
1148
  oCols.splice(oIndex, 1, ...childList);
1148
- oldColumn.children = [];
1149
+ dragColumn.children = [];
1149
1150
  }
1150
1151
  }
1151
1152
  else {
@@ -1162,12 +1163,12 @@ export default {
1162
1163
  const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
1163
1164
  // 转子级
1164
1165
  if ((isCrossDrag && isToChildDrag) && prevDragToChild) {
1165
- oldColumn.parentId = newColumn.id;
1166
- newColumn.children = (newColumn.children || []).concat([oldColumn]);
1166
+ dragColumn.parentId = newColumn.id;
1167
+ newColumn.children = (newColumn.children || []).concat([dragColumn]);
1167
1168
  }
1168
1169
  else {
1169
- oldColumn.parentId = newColumn.parentId;
1170
- nCols.splice(nIndex + dragOffsetIndex, 0, oldColumn);
1170
+ dragColumn.parentId = newColumn.parentId;
1171
+ nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
1171
1172
  }
1172
1173
  if (!nParent) {
1173
1174
  nafIndex = nIndex;
@@ -1181,10 +1182,10 @@ export default {
1181
1182
  });
1182
1183
  }
1183
1184
  else {
1184
- oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === oldColumn.id);
1185
+ oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === dragColumn.id);
1185
1186
  customColumnList.splice(oafIndex, 1);
1186
1187
  nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
1187
- customColumnList.splice(nafIndex + dragOffsetIndex, 0, oldColumn);
1188
+ customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
1188
1189
  }
1189
1190
  reactData.isDragColMove = true;
1190
1191
  if (mouseConfig) {
@@ -1197,8 +1198,9 @@ export default {
1197
1198
  }
1198
1199
  }
1199
1200
  $xeTable.dispatchEvent('column-dragend', {
1200
- oldColumn,
1201
+ oldColumn: dragColumn,
1201
1202
  newColumn,
1203
+ dragColumn,
1202
1204
  dragPos: prevDragPos,
1203
1205
  offsetIndex: dragOffsetIndex,
1204
1206
  _index: {
@@ -854,7 +854,9 @@ export default {
854
854
  let isPos = false;
855
855
  if (fieldOrColumn) {
856
856
  isPos = true;
857
- column = XEUtils.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn;
857
+ if (fieldOrColumn !== true) {
858
+ column = XEUtils.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn;
859
+ }
858
860
  }
859
861
  return handleEditCell($xeTable, row, column, isPos);
860
862
  },
@@ -81,12 +81,13 @@ function renderCellBaseVNs(h, params, content) {
81
81
  const { treeConfig, dragConfig } = tableProps;
82
82
  const rowOpts = $table.computeRowOpts;
83
83
  const rowDragOpts = $table.computeRowDragOpts;
84
+ const treeOpts = $table.computeTreeOpts;
84
85
  const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts;
85
86
  const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
86
87
  const vns = XEUtils.isArray(content) ? content : [content];
87
88
  if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
88
89
  if (treeConfig) {
89
- if (isPeerDrag || isCrossDrag || !level) {
90
+ if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
90
91
  vns.unshift(renderCellDragIcon(h, params));
91
92
  }
92
93
  }