vxe-table 4.18.13 → 4.19.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 (57) hide show
  1. package/README.md +2 -2
  2. package/es/grid/src/grid.js +1 -1
  3. package/es/index.css +1 -1
  4. package/es/index.min.css +1 -1
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/table/module/edit/hook.js +36 -12
  8. package/es/table/module/keyboard/hook.js +2 -2
  9. package/es/table/src/emits.js +2 -0
  10. package/es/table/src/props.js +2 -2
  11. package/es/table/src/table.js +325 -141
  12. package/es/table/src/util.js +12 -3
  13. package/es/ui/index.js +3 -3
  14. package/es/ui/src/dom.js +4 -0
  15. package/es/ui/src/log.js +1 -1
  16. package/lib/grid/src/grid.js +1 -1
  17. package/lib/grid/src/grid.min.js +1 -1
  18. package/lib/index.css +1 -1
  19. package/lib/index.min.css +1 -1
  20. package/lib/index.umd.js +108 -55
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/table/module/edit/hook.js +42 -12
  25. package/lib/table/module/edit/hook.min.js +1 -1
  26. package/lib/table/module/keyboard/hook.js +2 -2
  27. package/lib/table/module/keyboard/hook.min.js +1 -1
  28. package/lib/table/src/emits.js +1 -1
  29. package/lib/table/src/emits.min.js +1 -1
  30. package/lib/table/src/props.js +2 -2
  31. package/lib/table/src/props.min.js +1 -1
  32. package/lib/table/src/table.js +39 -30
  33. package/lib/table/src/table.min.js +1 -1
  34. package/lib/table/src/util.js +12 -3
  35. package/lib/table/src/util.min.js +1 -1
  36. package/lib/ui/index.js +3 -3
  37. package/lib/ui/index.min.js +1 -1
  38. package/lib/ui/src/dom.js +5 -0
  39. package/lib/ui/src/dom.min.js +1 -1
  40. package/lib/ui/src/log.js +1 -1
  41. package/lib/ui/src/log.min.js +1 -1
  42. package/package.json +3 -3
  43. package/packages/grid/src/grid.ts +1 -1
  44. package/packages/table/module/edit/hook.ts +44 -12
  45. package/packages/table/module/keyboard/hook.ts +2 -2
  46. package/packages/table/src/emits.ts +2 -0
  47. package/packages/table/src/props.ts +2 -2
  48. package/packages/table/src/table.ts +320 -136
  49. package/packages/table/src/util.ts +15 -5
  50. package/packages/ui/index.ts +2 -2
  51. package/packages/ui/src/dom.ts +5 -0
  52. /package/es/{iconfont.1776926463538.ttf → iconfont.1777796358891.ttf} +0 -0
  53. /package/es/{iconfont.1776926463538.woff → iconfont.1777796358891.woff} +0 -0
  54. /package/es/{iconfont.1776926463538.woff2 → iconfont.1777796358891.woff2} +0 -0
  55. /package/lib/{iconfont.1776926463538.ttf → iconfont.1777796358891.ttf} +0 -0
  56. /package/lib/{iconfont.1776926463538.woff → iconfont.1777796358891.woff} +0 -0
  57. /package/lib/{iconfont.1776926463538.woff2 → iconfont.1777796358891.woff2} +0 -0
@@ -143,6 +143,11 @@ export function createInternalData (): TableInternalData {
143
143
  // 表尾高度
144
144
  tFooterHeight: 0,
145
145
 
146
+ stackHistoryStore: {
147
+ undoStacks: [],
148
+ redoStacks: []
149
+ },
150
+
146
151
  teleportToWrapperElem: null,
147
152
  popupToWrapperElem: null,
148
153
  customPopupToElem: null,
@@ -301,7 +306,7 @@ export function createReactData (): TableReactData {
301
306
  tooltipStore: {
302
307
  row: null,
303
308
  column: null,
304
- content: null,
309
+ content: '',
305
310
  visible: false,
306
311
  type: null,
307
312
  currOpts: {}
@@ -711,12 +716,17 @@ export function toTreePathSeq (path: any[]) {
711
716
  return path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('')
712
717
  }
713
718
 
714
- export function getCellValue (row: any, column: VxeTableDefines.ColumnInfo) {
715
- return XEUtils.get(row, column.field)
719
+ export function getCellValue (row: any, column: VxeTableDefines.ColumnInfo | null) {
720
+ if (column) {
721
+ return XEUtils.get(row, column.field)
722
+ }
723
+ return null
716
724
  }
717
725
 
718
- export function setCellValue (row: any, column: VxeTableDefines.ColumnInfo, value: any) {
719
- return XEUtils.set(row, column.field, value)
726
+ export function setCellValue (row: any, column: VxeTableDefines.ColumnInfo | null, value: any) {
727
+ if (column) {
728
+ XEUtils.set(row, column.field, value)
729
+ }
720
730
  }
721
731
 
722
732
  export function getRefElem (refEl: any) {
@@ -270,8 +270,8 @@ VxeUI.setConfig({
270
270
  visible: true
271
271
  }
272
272
  },
273
- undoHistoryConfig: {
274
- isEditRow: true
273
+ undoRedoHistoryConfig: {
274
+ stackSize: 20
275
275
  }
276
276
  },
277
277
  grid: {
@@ -190,6 +190,11 @@ export function getAbsolutePos (elem: any) {
190
190
  return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth }
191
191
  }
192
192
 
193
+ export function hasEventInputTarget (target: EventTarget | Element | null) {
194
+ const tagName = target ? (target as Element).tagName : ''
195
+ return tagName && ['input', 'textarea'].includes((tagName.toLowerCase()))
196
+ }
197
+
193
198
  const scrollIntoViewIfNeeded = 'scrollIntoViewIfNeeded'
194
199
  const scrollIntoView = 'scrollIntoView'
195
200