vxe-table 4.13.45 → 4.13.46

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 (136) hide show
  1. package/es/locale/lang/ar-EG.js +5 -1
  2. package/es/locale/lang/de-DE.js +5 -1
  3. package/es/locale/lang/en-US.js +5 -1
  4. package/es/locale/lang/es-ES.js +5 -1
  5. package/es/locale/lang/fr-FR.js +5 -1
  6. package/es/locale/lang/hu-HU.js +5 -1
  7. package/es/locale/lang/hy-AM.js +5 -1
  8. package/es/locale/lang/id-ID.js +5 -1
  9. package/es/locale/lang/it-IT.js +5 -1
  10. package/es/locale/lang/ja-JP.js +5 -1
  11. package/es/locale/lang/ko-KR.js +5 -1
  12. package/es/locale/lang/ms-MY.js +5 -1
  13. package/es/locale/lang/nb-NO.js +5 -1
  14. package/es/locale/lang/pt-BR.js +5 -1
  15. package/es/locale/lang/ru-RU.js +5 -1
  16. package/es/locale/lang/th-TH.js +5 -1
  17. package/es/locale/lang/ug-CN.js +5 -1
  18. package/es/locale/lang/uk-UA.js +5 -1
  19. package/es/locale/lang/uz-UZ.js +5 -1
  20. package/es/locale/lang/vi-VN.js +5 -1
  21. package/es/locale/lang/zh-CHT.js +6 -2
  22. package/es/locale/lang/zh-CN.js +5 -1
  23. package/es/style.css +1 -1
  24. package/es/table/module/custom/panel.js +11 -11
  25. package/es/table/src/table.js +25 -4
  26. package/es/ui/index.js +4 -2
  27. package/es/ui/src/log.js +1 -1
  28. package/lib/index.umd.js +25 -19
  29. package/lib/index.umd.min.js +1 -1
  30. package/lib/locale/lang/ar-EG.js +5 -1
  31. package/lib/locale/lang/ar-EG.min.js +1 -1
  32. package/lib/locale/lang/ar-EG.umd.js +5 -1
  33. package/lib/locale/lang/de-DE.js +5 -1
  34. package/lib/locale/lang/de-DE.min.js +1 -1
  35. package/lib/locale/lang/de-DE.umd.js +5 -1
  36. package/lib/locale/lang/en-US.js +5 -1
  37. package/lib/locale/lang/en-US.min.js +1 -1
  38. package/lib/locale/lang/en-US.umd.js +5 -1
  39. package/lib/locale/lang/es-ES.js +5 -1
  40. package/lib/locale/lang/es-ES.min.js +1 -1
  41. package/lib/locale/lang/es-ES.umd.js +5 -1
  42. package/lib/locale/lang/fr-FR.js +5 -1
  43. package/lib/locale/lang/fr-FR.min.js +1 -1
  44. package/lib/locale/lang/fr-FR.umd.js +5 -1
  45. package/lib/locale/lang/hu-HU.js +5 -1
  46. package/lib/locale/lang/hu-HU.min.js +1 -1
  47. package/lib/locale/lang/hu-HU.umd.js +5 -1
  48. package/lib/locale/lang/hy-AM.js +5 -1
  49. package/lib/locale/lang/hy-AM.min.js +1 -1
  50. package/lib/locale/lang/hy-AM.umd.js +5 -1
  51. package/lib/locale/lang/id-ID.js +5 -1
  52. package/lib/locale/lang/id-ID.min.js +1 -1
  53. package/lib/locale/lang/id-ID.umd.js +5 -1
  54. package/lib/locale/lang/it-IT.js +5 -1
  55. package/lib/locale/lang/it-IT.min.js +1 -1
  56. package/lib/locale/lang/it-IT.umd.js +5 -1
  57. package/lib/locale/lang/ja-JP.js +5 -1
  58. package/lib/locale/lang/ja-JP.min.js +1 -1
  59. package/lib/locale/lang/ja-JP.umd.js +5 -1
  60. package/lib/locale/lang/ko-KR.js +5 -1
  61. package/lib/locale/lang/ko-KR.min.js +1 -1
  62. package/lib/locale/lang/ko-KR.umd.js +5 -1
  63. package/lib/locale/lang/ms-MY.js +5 -1
  64. package/lib/locale/lang/ms-MY.min.js +1 -1
  65. package/lib/locale/lang/ms-MY.umd.js +5 -1
  66. package/lib/locale/lang/nb-NO.js +5 -1
  67. package/lib/locale/lang/nb-NO.min.js +1 -1
  68. package/lib/locale/lang/nb-NO.umd.js +5 -1
  69. package/lib/locale/lang/pt-BR.js +5 -1
  70. package/lib/locale/lang/pt-BR.min.js +1 -1
  71. package/lib/locale/lang/pt-BR.umd.js +5 -1
  72. package/lib/locale/lang/ru-RU.js +5 -1
  73. package/lib/locale/lang/ru-RU.min.js +1 -1
  74. package/lib/locale/lang/ru-RU.umd.js +5 -1
  75. package/lib/locale/lang/th-TH.js +5 -1
  76. package/lib/locale/lang/th-TH.min.js +1 -1
  77. package/lib/locale/lang/th-TH.umd.js +5 -1
  78. package/lib/locale/lang/ug-CN.js +5 -1
  79. package/lib/locale/lang/ug-CN.min.js +1 -1
  80. package/lib/locale/lang/ug-CN.umd.js +5 -1
  81. package/lib/locale/lang/uk-UA.js +5 -1
  82. package/lib/locale/lang/uk-UA.min.js +1 -1
  83. package/lib/locale/lang/uk-UA.umd.js +5 -1
  84. package/lib/locale/lang/uz-UZ.js +5 -1
  85. package/lib/locale/lang/uz-UZ.min.js +1 -1
  86. package/lib/locale/lang/uz-UZ.umd.js +5 -1
  87. package/lib/locale/lang/vi-VN.js +5 -1
  88. package/lib/locale/lang/vi-VN.min.js +1 -1
  89. package/lib/locale/lang/vi-VN.umd.js +5 -1
  90. package/lib/locale/lang/zh-CHT.js +6 -2
  91. package/lib/locale/lang/zh-CHT.min.js +1 -1
  92. package/lib/locale/lang/zh-CHT.umd.js +6 -2
  93. package/lib/locale/lang/zh-CN.js +5 -1
  94. package/lib/locale/lang/zh-CN.min.js +1 -1
  95. package/lib/locale/lang/zh-CN.umd.js +5 -1
  96. package/lib/style.css +1 -1
  97. package/lib/table/module/custom/panel.js +12 -12
  98. package/lib/table/module/custom/panel.min.js +1 -1
  99. package/lib/table/src/table.js +3 -3
  100. package/lib/table/src/table.min.js +1 -1
  101. package/lib/ui/index.js +4 -2
  102. package/lib/ui/index.min.js +1 -1
  103. package/lib/ui/src/log.js +1 -1
  104. package/lib/ui/src/log.min.js +1 -1
  105. package/package.json +1 -1
  106. package/packages/locale/lang/ar-EG.ts +5 -1
  107. package/packages/locale/lang/de-DE.ts +5 -1
  108. package/packages/locale/lang/en-US.ts +5 -1
  109. package/packages/locale/lang/es-ES.ts +5 -1
  110. package/packages/locale/lang/fr-FR.ts +5 -1
  111. package/packages/locale/lang/hu-HU.ts +5 -1
  112. package/packages/locale/lang/hy-AM.ts +5 -1
  113. package/packages/locale/lang/id-ID.ts +5 -1
  114. package/packages/locale/lang/it-IT.ts +5 -1
  115. package/packages/locale/lang/ja-JP.ts +5 -1
  116. package/packages/locale/lang/ko-KR.ts +5 -1
  117. package/packages/locale/lang/ms-MY.ts +5 -1
  118. package/packages/locale/lang/nb-NO.ts +5 -1
  119. package/packages/locale/lang/pt-BR.ts +5 -1
  120. package/packages/locale/lang/ru-RU.ts +5 -1
  121. package/packages/locale/lang/th-TH.ts +5 -1
  122. package/packages/locale/lang/ug-CN.ts +5 -1
  123. package/packages/locale/lang/uk-UA.ts +5 -1
  124. package/packages/locale/lang/uz-UZ.ts +5 -1
  125. package/packages/locale/lang/vi-VN.ts +5 -1
  126. package/packages/locale/lang/zh-CHT.ts +6 -2
  127. package/packages/locale/lang/zh-CN.ts +5 -1
  128. package/packages/table/module/custom/panel.ts +11 -11
  129. package/packages/table/src/table.ts +30 -8
  130. package/packages/ui/index.ts +3 -1
  131. /package/es/{iconfont.1750641793236.ttf → iconfont.1750660623154.ttf} +0 -0
  132. /package/es/{iconfont.1750641793236.woff → iconfont.1750660623154.woff} +0 -0
  133. /package/es/{iconfont.1750641793236.woff2 → iconfont.1750660623154.woff2} +0 -0
  134. /package/lib/{iconfont.1750641793236.ttf → iconfont.1750660623154.ttf} +0 -0
  135. /package/lib/{iconfont.1750641793236.woff → iconfont.1750660623154.woff} +0 -0
  136. /package/lib/{iconfont.1750641793236.woff2 → iconfont.1750660623154.woff2} +0 -0
@@ -20,7 +20,7 @@ import TableExportPanelComponent from '../module/export/export-panel'
20
20
  import TableMenuPanelComponent from '../module/menu/panel'
21
21
 
22
22
  import type { VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods, ValueOf, VxeComponentSlotType } from 'vxe-pc-ui'
23
- import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes } from '../../../types'
23
+ import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableEmits, VxeTableProps, VxeColumnPropTypes, VxeTableCustomPanelConstructor } from '../../../types'
24
24
 
25
25
  const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI
26
26
 
@@ -422,7 +422,7 @@ export default defineVxeComponent({
422
422
  const refValidTooltip = ref() as Ref<VxeTooltipInstance>
423
423
  const refTableMenu = ref() as Ref<any>
424
424
  const refTableFilter = ref() as Ref<any>
425
- const refTableCustom = ref() as Ref<ComponentPublicInstance>
425
+ const refTableCustom = ref() as Ref<VxeTableCustomPanelConstructor>
426
426
 
427
427
  const refTableViewportElem = ref<HTMLDivElement>()
428
428
  const refTableHeader = ref() as Ref<ComponentPublicInstance>
@@ -6226,12 +6226,25 @@ export default defineVxeComponent({
6226
6226
  },
6227
6227
  setRowGroups (fieldOrColumns) {
6228
6228
  const { aggregateConfig, rowGroupConfig } = props
6229
+ const { rowGroupList } = reactData
6230
+ const aggregateOpts = computeAggregateOpts.value
6231
+ const { maxGroupSize } = aggregateOpts
6229
6232
  if (!(aggregateConfig || rowGroupConfig)) {
6230
6233
  errLog('vxe.error.reqProp', ['aggregate-config'])
6231
6234
  return nextTick()
6232
6235
  }
6233
- if (fieldOrColumns) {
6234
- handleUpdateRowGroup((XEUtils.isArray(fieldOrColumns) ? fieldOrColumns : [fieldOrColumns]).map(fieldOrColumn => {
6236
+ const confList = fieldOrColumns ? (XEUtils.isArray(fieldOrColumns) ? fieldOrColumns : [fieldOrColumns]) : []
6237
+ if (maxGroupSize && (rowGroupList.length + confList.length > maxGroupSize)) {
6238
+ if (VxeUI.modal) {
6239
+ VxeUI.modal.message({
6240
+ status: 'error',
6241
+ content: getI18n('vxe.table.maxGroupCol', [maxGroupSize])
6242
+ })
6243
+ }
6244
+ return nextTick()
6245
+ }
6246
+ if (confList.length) {
6247
+ handleUpdateRowGroup(confList.map(fieldOrColumn => {
6235
6248
  return XEUtils.isString(fieldOrColumn) ? fieldOrColumn : fieldOrColumn.field
6236
6249
  }))
6237
6250
  return loadTableData(internalData.tableSynchData, true)
@@ -6863,7 +6876,7 @@ export default defineVxeComponent({
6863
6876
  if (tableFilter) {
6864
6877
  if (getEventTargetNode(evnt, el, 'vxe-cell--filter').flag) {
6865
6878
  // 如果点击了筛选按钮
6866
- } else if (getEventTargetNode(evnt, tableFilter.getRefMaps().refElem.value as HTMLDivElement).flag) {
6879
+ } else if (getEventTargetNode(evnt, tableFilter.getRefMaps().refElem.value).flag) {
6867
6880
  // 如果点击筛选容器
6868
6881
  } else {
6869
6882
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
@@ -6875,7 +6888,7 @@ export default defineVxeComponent({
6875
6888
  if (tableCustom) {
6876
6889
  if (customStore.btnEl === evnt.target || getEventTargetNode(evnt, document.body, 'vxe-toolbar-custom-target').flag) {
6877
6890
  // 如果点击了自定义列按钮
6878
- } else if (getEventTargetNode(evnt, tableCustom.$el as HTMLDivElement).flag) {
6891
+ } else if (getEventTargetNode(evnt, tableCustom.getRefMaps().refElem.value).flag) {
6879
6892
  // 如果点击自定义列容器
6880
6893
  } else {
6881
6894
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
@@ -8377,7 +8390,7 @@ export default defineVxeComponent({
8377
8390
  }
8378
8391
 
8379
8392
  childRowList.forEach(vals => {
8380
- const row: string = vals[0]
8393
+ const row = vals[0]
8381
8394
  const rowid: string = vals[1]
8382
8395
  const childList: any[] = vals[2]
8383
8396
  let sLen = 0 // 已选
@@ -8414,8 +8427,17 @@ export default defineVxeComponent({
8414
8427
  vLen++
8415
8428
  }
8416
8429
  )
8417
- const isSelected = selectCheckboxMaps[rowid] || (sLen >= vLen && (vLen >= 1 || hLen >= 1))
8430
+
8431
+ let isSelected = (sLen >= vLen && (vLen >= 1 || hLen >= 1))
8432
+ if (checkMethod) {
8433
+ if (checkMethod({ $table: $xeTable, row })) {
8434
+ isSelected = sLen >= vLen
8435
+ } else {
8436
+ isSelected = selectCheckboxMaps[rowid]
8437
+ }
8438
+ }
8418
8439
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1)
8440
+
8419
8441
  if (checkField) {
8420
8442
  XEUtils.set(row, checkField, isSelected)
8421
8443
  }
@@ -147,7 +147,8 @@ VxeUI.setConfig({
147
147
  childrenField: '_X_ROW_CHILDREN',
148
148
  mapChildrenField: '_X_ROW_CHILD_LIST',
149
149
  indent: 20,
150
- showIcon: true
150
+ showIcon: true,
151
+ maxGroupSize: 4
151
152
  },
152
153
  treeConfig: {
153
154
  padding: true,
@@ -322,6 +323,7 @@ VxeUI.setIcon({
322
323
  TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
323
324
  TABLE_AGGREGATION_GROUPING: iconPrefix + 'grouping',
324
325
  TABLE_AGGREGATION_VALUES: iconPrefix + 'values',
326
+ TABLE_AGGREGATION_SORT: iconPrefix + 'drag-handle',
325
327
  TABLE_AGGREGATION_DELETE: iconPrefix + 'close',
326
328
 
327
329
  // toolbar