vxe-table 3.15.16 → 3.15.18

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 (85) hide show
  1. package/es/locale/lang/fr-FR.d.ts +2 -0
  2. package/es/locale/lang/hy-AM.d.ts +2 -0
  3. package/es/locale/lang/id-ID.d.ts +2 -0
  4. package/es/locale/lang/it-IT.d.ts +2 -0
  5. package/es/locale/lang/ms-MY.d.ts +2 -0
  6. package/es/locale/lang/ms-MY.js +708 -0
  7. package/es/locale/lang/nb-NO.d.ts +2 -0
  8. package/es/locale/lang/th-TH.d.ts +2 -0
  9. package/es/locale/lang/ug-CN.d.ts +2 -0
  10. package/es/locale/lang/uz-UZ.d.ts +2 -0
  11. package/es/locale/lang/uz-UZ.js +708 -0
  12. package/es/locale/lang/vi-VN.d.ts +2 -0
  13. package/es/style.css +1 -1
  14. package/es/table/module/custom/panel.js +1 -1
  15. package/es/table/module/filter/mixin.js +10 -0
  16. package/es/table/src/methods.js +39 -45
  17. package/es/ui/index.js +1 -1
  18. package/es/ui/src/log.js +1 -1
  19. package/lib/index.umd.js +54 -44
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/locale/lang/ar-EG.d.ts +2 -0
  22. package/lib/locale/lang/ar-EG.min.js +1 -1
  23. package/lib/locale/lang/ar-EG.umd.js +728 -0
  24. package/lib/locale/lang/de-DE.d.ts +2 -0
  25. package/lib/locale/lang/de-DE.min.js +1 -1
  26. package/lib/locale/lang/de-DE.umd.js +728 -0
  27. package/lib/locale/lang/fr-FR.d.ts +2 -0
  28. package/lib/locale/lang/fr-FR.min.js +1 -1
  29. package/lib/locale/lang/fr-FR.umd.js +728 -0
  30. package/lib/locale/lang/hy-AM.d.ts +2 -0
  31. package/lib/locale/lang/hy-AM.min.js +1 -1
  32. package/lib/locale/lang/hy-AM.umd.js +728 -0
  33. package/lib/locale/lang/id-ID.d.ts +2 -0
  34. package/lib/locale/lang/id-ID.min.js +1 -1
  35. package/lib/locale/lang/id-ID.umd.js +728 -0
  36. package/lib/locale/lang/it-IT.d.ts +2 -0
  37. package/lib/locale/lang/it-IT.min.js +1 -1
  38. package/lib/locale/lang/it-IT.umd.js +728 -0
  39. package/lib/locale/lang/ms-MY.d.ts +2 -0
  40. package/lib/locale/lang/ms-MY.js +714 -0
  41. package/lib/locale/lang/ms-MY.min.js +1 -0
  42. package/lib/locale/lang/ms-MY.umd.js +728 -0
  43. package/lib/locale/lang/nb-NO.d.ts +2 -0
  44. package/lib/locale/lang/nb-NO.min.js +1 -1
  45. package/lib/locale/lang/nb-NO.umd.js +728 -0
  46. package/lib/locale/lang/th-TH.d.ts +2 -0
  47. package/lib/locale/lang/th-TH.min.js +1 -1
  48. package/lib/locale/lang/th-TH.umd.js +728 -0
  49. package/lib/locale/lang/ug-CN.d.ts +2 -0
  50. package/lib/locale/lang/ug-CN.min.js +1 -1
  51. package/lib/locale/lang/ug-CN.umd.js +728 -0
  52. package/lib/locale/lang/uz-UZ.d.ts +2 -0
  53. package/lib/locale/lang/uz-UZ.js +714 -0
  54. package/lib/locale/lang/uz-UZ.min.js +1 -0
  55. package/lib/locale/lang/uz-UZ.umd.js +728 -0
  56. package/lib/locale/lang/vi-VN.d.ts +2 -0
  57. package/lib/locale/lang/vi-VN.min.js +1 -1
  58. package/lib/locale/lang/vi-VN.umd.js +728 -0
  59. package/lib/locale/lang/zh-TC.min.js +1 -1
  60. package/lib/style.css +1 -1
  61. package/lib/table/module/custom/panel.js +1 -1
  62. package/lib/table/module/custom/panel.min.js +1 -1
  63. package/lib/table/module/filter/mixin.js +10 -0
  64. package/lib/table/module/filter/mixin.min.js +1 -1
  65. package/lib/table/src/methods.js +41 -41
  66. package/lib/table/src/methods.min.js +1 -1
  67. package/lib/ui/index.js +1 -1
  68. package/lib/ui/index.min.js +1 -1
  69. package/lib/ui/src/log.js +1 -1
  70. package/lib/ui/src/log.min.js +1 -1
  71. package/package.json +1 -1
  72. package/packages/locale/lang/ms-MY.ts +708 -0
  73. package/packages/locale/lang/uz-UZ.ts +708 -0
  74. package/packages/table/module/custom/panel.ts +1 -1
  75. package/packages/table/module/filter/mixin.ts +12 -0
  76. package/packages/table/src/methods.ts +44 -43
  77. package/lib/locale/lang/zh-TC.umd.js +0 -23
  78. /package/es/{iconfont.1745983689751.ttf → iconfont.1746578838891.ttf} +0 -0
  79. /package/es/{iconfont.1745983689751.woff → iconfont.1746578838891.woff} +0 -0
  80. /package/es/{iconfont.1745983689751.woff2 → iconfont.1746578838891.woff2} +0 -0
  81. /package/es/locale/lang/{zh-TC.d.ts → ar-EG.d.ts} +0 -0
  82. /package/{lib/locale/lang/zh-TC.d.ts → es/locale/lang/de-DE.d.ts} +0 -0
  83. /package/lib/{iconfont.1745983689751.ttf → iconfont.1746578838891.ttf} +0 -0
  84. /package/lib/{iconfont.1745983689751.woff → iconfont.1746578838891.woff} +0 -0
  85. /package/lib/{iconfont.1745983689751.woff2 → iconfont.1746578838891.woff2} +0 -0
@@ -854,7 +854,7 @@ export default {
854
854
 
855
855
  const { customOpts } = $xeTable
856
856
  const { mode } = customOpts
857
- if (!VxeUIModalComponent) {
857
+ if (!VxeUIModalComponent && (mode === 'modal')) {
858
858
  errLog('vxe.error.reqComp', ['vxe-modal'])
859
859
  }
860
860
  if (!VxeUIDrawerComponent && (mode === 'drawer')) {
@@ -167,12 +167,24 @@ export default {
167
167
  $xeTable.handleFilterConfirmFilter(null)
168
168
  return $xeTable.$nextTick()
169
169
  },
170
+ _saveFilterPanelByEvent (evnt: Event) {
171
+ const $xeTable = this
172
+
173
+ $xeTable.handleFilterConfirmFilter(evnt)
174
+ return $xeTable.$nextTick()
175
+ },
170
176
  _resetFilterPanel () {
171
177
  const $xeTable = this
172
178
 
173
179
  $xeTable.handleFilterResetFilter(null)
174
180
  return $xeTable.$nextTick()
175
181
  },
182
+ _resetFilterPanelByEvent (evnt: Event) {
183
+ const $xeTable = this
184
+
185
+ $xeTable.handleFilterResetFilter(evnt)
186
+ return $xeTable.$nextTick()
187
+ },
176
188
  _getCheckedFilters () {
177
189
  const { tableFullColumn } = this
178
190
  const filterList: any[] = []
@@ -1,5 +1,5 @@
1
1
  import XEUtils from 'xe-utils'
2
- import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, getOffsetPos, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom'
2
+ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom'
3
3
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
4
4
  import { VxeUI } from '../../ui'
5
5
  import Cell from './cell'
@@ -4548,15 +4548,10 @@ const Methods = {
4548
4548
  rowList = currTableData.filter((row) => XEUtils.get(row, checkField))
4549
4549
  }
4550
4550
  } else {
4551
+ const currMaps = isFull || (treeConfig && !transform) ? fullDataRowIdData : afterFullRowMaps
4551
4552
  XEUtils.each(selectCheckboxMaps, (row, rowid) => {
4552
- if (isFull) {
4553
- if (fullDataRowIdData[rowid]) {
4554
- rowList.push(fullDataRowIdData[rowid].row)
4555
- }
4556
- } else {
4557
- if (afterFullRowMaps[rowid]) {
4558
- rowList.push(afterFullRowMaps[rowid])
4559
- }
4553
+ if (currMaps[rowid]) {
4554
+ rowList.push(fullDataRowIdData[rowid].row)
4560
4555
  }
4561
4556
  })
4562
4557
  }
@@ -5133,8 +5128,9 @@ const Methods = {
5133
5128
  evnt.stopPropagation()
5134
5129
  evnt.preventDefault()
5135
5130
  const { column } = params
5136
- const { overflowX, scrollbarHeight } = reactData
5131
+ const { columnStore, overflowX, scrollbarHeight } = reactData
5137
5132
  const { elemStore, visibleColumn } = internalData
5133
+ const { leftList, rightList } = columnStore
5138
5134
  const resizableOpts = $xeTable.computeResizableOpts
5139
5135
  const osbHeight = overflowX ? scrollbarHeight : 0
5140
5136
  const tableEl = $xeTable.$refs.refElem as HTMLDivElement
@@ -5144,10 +5140,11 @@ const Methods = {
5144
5140
  if (!resizeBarElem) {
5145
5141
  return
5146
5142
  }
5143
+ const isLeftFixed = fixedType === 'left'
5144
+ const isRightFixed = fixedType === 'right'
5147
5145
  const resizeTipElem = resizeBarElem.firstElementChild as HTMLDivElement
5148
5146
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop
5149
5147
  const { clientX: dragClientX } = evnt
5150
- const wrapperElem = $xeTable.$refs.refElem as HTMLDivElement
5151
5148
  const dragBtnElem = evnt.target as HTMLDivElement
5152
5149
  let resizeColumn = column
5153
5150
  if (column.children && column.children.length) {
@@ -5162,30 +5159,34 @@ const Methods = {
5162
5159
  if (!bodyScrollElem) {
5163
5160
  return
5164
5161
  }
5165
- const pos = getOffsetPos(dragBtnElem, wrapperElem)
5162
+ const tableRect = tableEl.getBoundingClientRect()
5163
+ const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null
5164
+ const cellRect = cell.getBoundingClientRect()
5165
+ const dragBtnRect = dragBtnElem.getBoundingClientRect()
5166
+
5166
5167
  const dragBtnWidth = dragBtnElem.clientWidth
5167
5168
  const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2)
5169
+ const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth
5170
+
5168
5171
  const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth // 列之间的最小间距
5169
- let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval
5170
- let dragPosLeft = pos.left + dragBtnOffsetWidth
5171
- const isLeftFixed = fixedType === 'left'
5172
- const isRightFixed = fixedType === 'right'
5172
+ const dragMinLeft = isRightFixed ? 0 : (cellRect.x - tableRect.x + dragBtnWidth + minInterval)
5173
+ const dragMaxLeft = cellRect.x - tableRect.x + cell.clientWidth - minInterval
5173
5174
 
5174
- // 计算左右侧固定列偏移量
5175
- let fixedOffsetWidth = 0
5175
+ let fixedLeftRemainWidth = 0
5176
+ let fixedRightRemainWidth = 0
5176
5177
  if (isLeftFixed || isRightFixed) {
5177
- const siblingProp = isLeftFixed ? 'nextElementSibling' : 'previousElementSibling'
5178
- let tempCellElem = cell[siblingProp] as HTMLTableCellElement
5179
- while (tempCellElem) {
5180
- if (hasClass(tempCellElem, 'fixed--hidden')) {
5181
- break
5182
- } else if (!hasClass(tempCellElem, 'col--group')) {
5183
- fixedOffsetWidth += tempCellElem.offsetWidth
5178
+ let isMach = false
5179
+ const fixedColumn = isLeftFixed ? leftList : rightList
5180
+ for (let i = 0; i < fixedColumn.length; i++) {
5181
+ const item = fixedColumn[i]
5182
+ if (isMach) {
5183
+ fixedLeftRemainWidth += item.renderWidth
5184
+ } else {
5185
+ isMach = item.id === resizeColumn.id
5186
+ if (!isMach) {
5187
+ fixedRightRemainWidth += item.renderWidth
5188
+ }
5184
5189
  }
5185
- tempCellElem = tempCellElem[siblingProp] as HTMLTableCellElement
5186
- }
5187
- if (isRightFixed && rightContainerElem) {
5188
- dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth
5189
5190
  }
5190
5191
  }
5191
5192
 
@@ -5196,27 +5197,27 @@ const Methods = {
5196
5197
  const tableHeight = tableEl.clientHeight
5197
5198
  const offsetX = evnt.clientX - dragClientX
5198
5199
  let left = dragPosLeft + offsetX
5199
- const scrollLeft = fixedType ? 0 : bodyScrollElem.scrollLeft
5200
+
5200
5201
  if (isLeftFixed) {
5201
- // 左固定列(不允许超过右侧固定列、不允许超过右边距)
5202
- left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : bodyScrollElem.clientWidth) - fixedOffsetWidth - minInterval)
5202
+ if (rightContainerRect) {
5203
+ left = Math.min(left, rightContainerRect.x - tableRect.x - fixedLeftRemainWidth - minInterval)
5204
+ }
5203
5205
  } else if (isRightFixed) {
5204
- // 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
5205
- dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval
5206
- left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval)
5207
- } else {
5208
- dragMinLeft = Math.max(bodyScrollElem.scrollLeft, dragMinLeft)
5209
- // left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
5206
+ if (leftContainerElem) {
5207
+ left = Math.max(left, leftContainerElem.clientWidth + fixedRightRemainWidth + minInterval)
5208
+ }
5209
+ left = Math.min(left, dragMaxLeft)
5210
5210
  }
5211
+
5211
5212
  dragLeft = Math.max(left, dragMinLeft)
5212
- const resizeBarLeft = Math.max(1, dragLeft - scrollLeft)
5213
+
5214
+ const resizeBarLeft = Math.max(1, dragLeft)
5213
5215
  resizeBarElem.style.left = `${resizeBarLeft}px`
5214
5216
  resizeBarElem.style.top = `${scrollbarXToTop ? osbHeight : 0}px`
5215
5217
  resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - osbHeight : tableHeight}px`
5216
5218
  if (resizableOpts.showDragTip && resizeTipElem) {
5217
- resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)])
5219
+ resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [Math.floor(resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft))])
5218
5220
  const tableWrapperWidth = tableEl.clientWidth
5219
- const wrapperRect = wrapperElem.getBoundingClientRect()
5220
5221
  const resizeBarWidth = resizeBarElem.clientWidth
5221
5222
  const resizeTipWidth = resizeTipElem.clientWidth
5222
5223
  const resizeTipHeight = resizeTipElem.clientHeight
@@ -5227,7 +5228,7 @@ const Methods = {
5227
5228
  resizeTipLeft += tableWrapperWidth - resizeBarLeft
5228
5229
  }
5229
5230
  resizeTipElem.style.left = `${resizeTipLeft}px`
5230
- resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`
5231
+ resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - tableRect.y - resizeTipHeight / 2))}px`
5231
5232
  }
5232
5233
  reactData.isDragResize = true
5233
5234
  }
@@ -10317,7 +10318,7 @@ const Methods = {
10317
10318
  } as any
10318
10319
 
10319
10320
  // Module methods
10320
- const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',')
10321
+ const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',')
10321
10322
 
10322
10323
  funcs.forEach(name => {
10323
10324
  Methods[name] = function (...args: any[]) {
@@ -1,23 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define("vxe-table-lang.zh-TC", ["exports", "./zh-CHT"], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory(exports, require("./zh-CHT"));
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory(mod.exports, global.zhCHT);
11
- global.vxeTableLangZhTC = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _zhCHT) {
14
- "use strict";
15
-
16
- Object.defineProperty(_exports, "__esModule", {
17
- value: true
18
- });
19
- _exports.default = void 0;
20
- _zhCHT = _interopRequireDefault(_zhCHT);
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
- var _default = _exports.default = _zhCHT.default;
23
- });
File without changes