@visactor/vtable 1.18.4-alpha.1 → 1.18.5-alpha.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 (113) hide show
  1. package/cjs/ListTable.d.ts +1 -1
  2. package/cjs/PivotChart.js.map +1 -1
  3. package/cjs/body-helper/body-helper.js +1 -1
  4. package/cjs/body-helper/style.js +2 -1
  5. package/cjs/core/BaseTable.js +8 -7
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  8. package/cjs/core/TABLE_EVENT_TYPE.js +2 -1
  9. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  10. package/cjs/core/record-helper.d.ts +1 -1
  11. package/cjs/core/record-helper.js +6 -4
  12. package/cjs/core/record-helper.js.map +1 -1
  13. package/cjs/data/CachedDataSource.js +5 -5
  14. package/cjs/data/CachedDataSource.js.map +1 -1
  15. package/cjs/dataset/dataset-pivot-table.js +2 -1
  16. package/cjs/dataset/flatDataToObject.js +1 -2
  17. package/cjs/event/event.js +2 -2
  18. package/cjs/event/event.js.map +1 -1
  19. package/cjs/event/listener/container-dom.js +33 -7
  20. package/cjs/event/listener/container-dom.js.map +1 -1
  21. package/cjs/event/self-event-listener/list-table/checkbox.d.ts +2 -0
  22. package/cjs/event/self-event-listener/list-table/checkbox.js +47 -34
  23. package/cjs/event/self-event-listener/list-table/checkbox.js.map +1 -1
  24. package/cjs/index.d.ts +1 -1
  25. package/cjs/index.js +1 -1
  26. package/cjs/index.js.map +1 -1
  27. package/cjs/layout/index.js +2 -1
  28. package/cjs/layout/pivot-header-layout.js +0 -1
  29. package/cjs/layout/simple-header-layout.js +1 -1
  30. package/cjs/layout/simple-header-layout.js.map +1 -1
  31. package/cjs/plugins/index.js +1 -1
  32. package/cjs/plugins/interface.js +1 -1
  33. package/cjs/scenegraph/component/checkbox-content.d.ts +34 -0
  34. package/cjs/scenegraph/component/checkbox-content.js +97 -0
  35. package/cjs/scenegraph/component/checkbox-content.js.map +1 -0
  36. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +3 -4
  37. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  38. package/cjs/scenegraph/group-creater/cell-helper.js +4 -2
  39. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  40. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +2 -2
  41. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +54 -15
  42. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  43. package/cjs/scenegraph/scenegraph.js +12 -4
  44. package/cjs/scenegraph/scenegraph.js.map +1 -1
  45. package/cjs/state/checkbox/checkbox.js +2 -1
  46. package/cjs/state/checkbox/checkbox.js.map +1 -1
  47. package/cjs/ts-types/base-table.d.ts +3 -0
  48. package/cjs/ts-types/base-table.js.map +1 -1
  49. package/cjs/ts-types/events.d.ts +7 -0
  50. package/cjs/ts-types/events.js.map +1 -1
  51. package/cjs/ts-types/list-table/define/checkbox-define.d.ts +1 -0
  52. package/cjs/ts-types/list-table/define/checkbox-define.js.map +1 -1
  53. package/cjs/ts-types/table-engine.d.ts +2 -1
  54. package/cjs/ts-types/table-engine.js.map +1 -1
  55. package/cjs/vrender.js.map +1 -1
  56. package/dist/vtable.js +441 -57
  57. package/dist/vtable.min.js +2 -2
  58. package/es/ListTable.d.ts +1 -1
  59. package/es/PivotChart.js.map +1 -1
  60. package/es/body-helper/body-helper.js +1 -1
  61. package/es/body-helper/style.js +2 -1
  62. package/es/core/BaseTable.js +8 -7
  63. package/es/core/BaseTable.js.map +1 -1
  64. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  65. package/es/core/TABLE_EVENT_TYPE.js +2 -1
  66. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  67. package/es/core/record-helper.d.ts +1 -1
  68. package/es/core/record-helper.js +6 -4
  69. package/es/core/record-helper.js.map +1 -1
  70. package/es/data/CachedDataSource.js +5 -5
  71. package/es/data/CachedDataSource.js.map +1 -1
  72. package/es/dataset/dataset-pivot-table.js +2 -1
  73. package/es/dataset/flatDataToObject.js +1 -2
  74. package/es/event/event.js +3 -3
  75. package/es/event/event.js.map +1 -1
  76. package/es/event/listener/container-dom.js +33 -7
  77. package/es/event/listener/container-dom.js.map +1 -1
  78. package/es/event/self-event-listener/list-table/checkbox.d.ts +2 -0
  79. package/es/event/self-event-listener/list-table/checkbox.js +43 -29
  80. package/es/event/self-event-listener/list-table/checkbox.js.map +1 -1
  81. package/es/index.d.ts +1 -1
  82. package/es/index.js +1 -1
  83. package/es/index.js.map +1 -1
  84. package/es/layout/index.js +2 -1
  85. package/es/layout/pivot-header-layout.js +1 -2
  86. package/es/layout/simple-header-layout.js +1 -1
  87. package/es/layout/simple-header-layout.js.map +1 -1
  88. package/es/plugins/index.js +1 -1
  89. package/es/plugins/interface.js +1 -1
  90. package/es/scenegraph/component/checkbox-content.d.ts +34 -0
  91. package/es/scenegraph/component/checkbox-content.js +91 -0
  92. package/es/scenegraph/component/checkbox-content.js.map +1 -0
  93. package/es/scenegraph/graphic/contributions/chart-render-helper.js +3 -4
  94. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  95. package/es/scenegraph/group-creater/cell-helper.js +4 -2
  96. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  97. package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +2 -2
  98. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +60 -15
  99. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  100. package/es/scenegraph/scenegraph.js +12 -4
  101. package/es/scenegraph/scenegraph.js.map +1 -1
  102. package/es/state/checkbox/checkbox.js +2 -1
  103. package/es/state/checkbox/checkbox.js.map +1 -1
  104. package/es/ts-types/base-table.d.ts +3 -0
  105. package/es/ts-types/base-table.js.map +1 -1
  106. package/es/ts-types/events.d.ts +7 -0
  107. package/es/ts-types/events.js.map +1 -1
  108. package/es/ts-types/list-table/define/checkbox-define.d.ts +1 -0
  109. package/es/ts-types/list-table/define/checkbox-define.js.map +1 -1
  110. package/es/ts-types/table-engine.d.ts +2 -1
  111. package/es/ts-types/table-engine.js.map +1 -1
  112. package/es/vrender.js.map +1 -1
  113. package/package.json +4 -4
package/dist/vtable.js CHANGED
@@ -30695,7 +30695,8 @@
30695
30695
  EMPTY_TIP_CLICK: 'empty_tip_click',
30696
30696
  EMPTY_TIP_DBLCLICK: 'empty_tip_dblclick',
30697
30697
  BUTTON_CLICK: 'button_click',
30698
- BEFORE_CACHE_CHART_IMAGE: 'before_cache_chart_image'
30698
+ BEFORE_CACHE_CHART_IMAGE: 'before_cache_chart_image',
30699
+ PASTED_DATA: 'pasted_data'
30699
30700
  };
30700
30701
 
30701
30702
  const judgeType = (value) => {
@@ -35300,8 +35301,9 @@
35300
35301
  this.dataSourceObj.records.splice(recordIndex, 0, ...recordArr);
35301
35302
  }
35302
35303
  else {
35303
- const index = recordIndex.pop();
35304
- const parentRecord = this.getOriginalRecord(recordIndex);
35304
+ const recordIndex_copy = [...recordIndex];
35305
+ const index = recordIndex_copy.pop();
35306
+ const parentRecord = this.getOriginalRecord(recordIndex_copy);
35305
35307
  if (parentRecord.children) {
35306
35308
  parentRecord.children.splice(index, 0, ...recordArr);
35307
35309
  }
@@ -35327,8 +35329,9 @@
35327
35329
  this.dataSourceObj.records.splice(recordIndex, 1);
35328
35330
  }
35329
35331
  else {
35330
- const index = recordIndex.pop();
35331
- const parentRecord = this.getOriginalRecord(recordIndex);
35332
+ const recordIndex_copy = [...recordIndex];
35333
+ const index = recordIndex_copy.pop();
35334
+ const parentRecord = this.getOriginalRecord(recordIndex_copy);
35332
35335
  parentRecord.children.splice(index, 1);
35333
35336
  }
35334
35337
  this.adjustBeforeChangedRecordsMap(recordIndex, 1, 'delete');
@@ -35348,8 +35351,9 @@
35348
35351
  this.dataSourceObj.records.splice(recordIndex, 1, record);
35349
35352
  }
35350
35353
  else {
35351
- const index = recordIndex.pop();
35352
- const parentRecord = this.getOriginalRecord(recordIndex);
35354
+ const recordIndex_copy = [...recordIndex];
35355
+ const index = recordIndex_copy.pop();
35356
+ const parentRecord = this.getOriginalRecord(recordIndex_copy);
35353
35357
  parentRecord.children.splice(index, 1, record);
35354
35358
  }
35355
35359
  }
@@ -39143,7 +39147,11 @@
39143
39147
  value = table.getCellValue(col, row);
39144
39148
  isAsync = true;
39145
39149
  }
39146
- if (type === 'text' || type === 'link' || customResult) {
39150
+ if (type === 'checkbox' && define.tree) {
39151
+ const createCheckboxCellGroup = Factory.getFunction('createCheckboxCellGroup');
39152
+ cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, true);
39153
+ }
39154
+ else if (type === 'text' || type === 'link' || customResult) {
39147
39155
  if (type === 'link') {
39148
39156
  const cellValue = value;
39149
39157
  const cellOriginValue = table.getCellOriginValue(col, row);
@@ -39239,7 +39247,7 @@
39239
39247
  }
39240
39248
  else {
39241
39249
  const createCheckboxCellGroup = Factory.getFunction('createCheckboxCellGroup');
39242
- cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
39250
+ cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, false);
39243
39251
  }
39244
39252
  }
39245
39253
  else if (type === 'radio') {
@@ -43203,10 +43211,7 @@
43203
43211
  if (stage.releaseStatus === 'released') {
43204
43212
  return null;
43205
43213
  }
43206
- const matrix = stage.window.getViewBoxTransform();
43207
43214
  const window = renderToNewWindow(stage, fullImage, viewBox);
43208
- window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, 0, 0);
43209
- stage.renderTo(window);
43210
43215
  const c = window.getNativeHandler();
43211
43216
  if (c.nativeCanvas) {
43212
43217
  return c.nativeCanvas;
@@ -43244,6 +43249,7 @@
43244
43249
  title: ''
43245
43250
  });
43246
43251
  }
43252
+ window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, 0, 0);
43247
43253
  stage.renderTo(window);
43248
43254
  return window;
43249
43255
  }
@@ -50704,6 +50710,16 @@
50704
50710
  node.setAttribute('checked', checked);
50705
50711
  }
50706
50712
  }
50713
+ if (node.name === 'checkbox-content') {
50714
+ if (checked === 'indeterminate') {
50715
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', true);
50716
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', undefined);
50717
+ }
50718
+ else {
50719
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', undefined);
50720
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', checked);
50721
+ }
50722
+ }
50707
50723
  });
50708
50724
  });
50709
50725
  }
@@ -50721,6 +50737,16 @@
50721
50737
  node.setAttribute('checked', checked);
50722
50738
  }
50723
50739
  }
50740
+ if (node.name === 'checkbox-content') {
50741
+ if (checked === 'indeterminate') {
50742
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', true);
50743
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', undefined);
50744
+ }
50745
+ else {
50746
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', undefined);
50747
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', checked);
50748
+ }
50749
+ }
50724
50750
  });
50725
50751
  });
50726
50752
  }
@@ -50742,6 +50768,16 @@
50742
50768
  node.setAttribute('checked', checked);
50743
50769
  }
50744
50770
  }
50771
+ if (node.name === 'checkbox-content') {
50772
+ if (checked === 'indeterminate') {
50773
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', true);
50774
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', undefined);
50775
+ }
50776
+ else {
50777
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', undefined);
50778
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', checked);
50779
+ }
50780
+ }
50745
50781
  });
50746
50782
  });
50747
50783
  }
@@ -50759,6 +50795,16 @@
50759
50795
  node.setAttribute('checked', checked);
50760
50796
  }
50761
50797
  }
50798
+ if (node.name === 'checkbox-content') {
50799
+ if (checked === 'indeterminate') {
50800
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', true);
50801
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', undefined);
50802
+ }
50803
+ else {
50804
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('indeterminate', undefined);
50805
+ node._checkboxGroup.getChildByName('checkbox').setAttribute('checked', checked);
50806
+ }
50807
+ }
50762
50808
  });
50763
50809
  });
50764
50810
  }
@@ -53442,7 +53488,8 @@
53442
53488
  }
53443
53489
  function setCellCheckboxStateByAttribute(col, row, checked, table) {
53444
53490
  const cellGroup = table.scenegraph.getCell(col, row);
53445
- const checkbox = cellGroup?.getChildByName('checkbox');
53491
+ const checkbox = cellGroup?.getChildByName('checkbox') ||
53492
+ cellGroup?.getChildByName('checkbox-content')?._checkboxGroup?.getChildByName('checkbox');
53446
53493
  if (checkbox) {
53447
53494
  if (checked === 'indeterminate') {
53448
53495
  checkbox.setAttribute('indeterminate', true);
@@ -56547,7 +56594,15 @@
56547
56594
  rowValues.push(cell);
56548
56595
  });
56549
56596
  });
56550
- table.changeCellValues(col, row, values);
56597
+ const changedCellResults = table.changeCellValues(col, row, values);
56598
+ if (table.hasListeners(TABLE_EVENT_TYPE.PASTED_DATA)) {
56599
+ table.fireListeners(TABLE_EVENT_TYPE.PASTED_DATA, {
56600
+ col,
56601
+ row,
56602
+ pasteData: values,
56603
+ changedCellResults
56604
+ });
56605
+ }
56551
56606
  }
56552
56607
  }
56553
56608
  }
@@ -56613,7 +56668,15 @@
56613
56668
  }
56614
56669
  pasteValuesRowCount = values.length ?? 0;
56615
56670
  values = handlePasteValues(values, pasteValuesRowCount, pasteValuesColCount, maxRow - row + 1, maxCol - col + 1);
56616
- table.changeCellValues(col, row, values, true);
56671
+ const changedCellResults = table.changeCellValues(col, row, values, true);
56672
+ if (table.hasListeners(TABLE_EVENT_TYPE.PASTED_DATA)) {
56673
+ table.fireListeners(TABLE_EVENT_TYPE.PASTED_DATA, {
56674
+ col,
56675
+ row,
56676
+ pasteData: values,
56677
+ changedCellResults
56678
+ });
56679
+ }
56617
56680
  }
56618
56681
  else {
56619
56682
  navigator.clipboard.read().then(clipboardItems => {
@@ -56654,7 +56717,15 @@
56654
56717
  });
56655
56718
  pasteValuesRowCount = values.length ?? 0;
56656
56719
  values = handlePasteValues(values, pasteValuesRowCount, pasteValuesColCount, maxRow - row + 1, maxCol - col + 1);
56657
- table.changeCellValues(col, row, values, true);
56720
+ const changedCellResults = table.changeCellValues(col, row, values, true);
56721
+ if (table.hasListeners(TABLE_EVENT_TYPE.PASTED_DATA)) {
56722
+ table.fireListeners(TABLE_EVENT_TYPE.PASTED_DATA, {
56723
+ col,
56724
+ row,
56725
+ pasteData: values,
56726
+ changedCellResults
56727
+ });
56728
+ }
56658
56729
  }
56659
56730
  function pasteTextToTable(item) {
56660
56731
  const ranges = table.stateManager.select.ranges;
@@ -56688,7 +56759,15 @@
56688
56759
  });
56689
56760
  pasteValuesRowCount = values.length ?? 0;
56690
56761
  values = handlePasteValues(values, pasteValuesRowCount, pasteValuesColCount, maxRow - row + 1, maxCol - col + 1);
56691
- table.changeCellValues(col, row, values, true);
56762
+ const changedCellResults = table.changeCellValues(col, row, values, true);
56763
+ if (table.hasListeners(TABLE_EVENT_TYPE.PASTED_DATA)) {
56764
+ table.fireListeners(TABLE_EVENT_TYPE.PASTED_DATA, {
56765
+ col,
56766
+ row,
56767
+ pasteData: values,
56768
+ changedCellResults
56769
+ });
56770
+ }
56692
56771
  });
56693
56772
  });
56694
56773
  }
@@ -56810,6 +56889,7 @@
56810
56889
  });
56811
56890
  }
56812
56891
  }
56892
+ stateManager.updateInteractionState(InteractionState.default);
56813
56893
  };
56814
56894
  eventManager.globalEventListeners.push({
56815
56895
  name: 'pointerup',
@@ -57213,7 +57293,8 @@
57213
57293
  function bindGroupTitleCheckboxChange(table) {
57214
57294
  table.on('checkbox_state_change', args => {
57215
57295
  const { col, row, checked, field } = args;
57216
- if (field !== '_vtable_rowSeries_number' || table.internalProps.rowSeriesNumber?.enableTreeCheckbox !== true) {
57296
+ if (!table.internalProps.layoutMap.isSeriesNumber(col, row) ||
57297
+ table.internalProps.rowSeriesNumber?.enableTreeCheckbox !== true) {
57217
57298
  return;
57218
57299
  }
57219
57300
  if (table.isHeader(col, row)) {
@@ -57229,21 +57310,21 @@
57229
57310
  if (record.vtableMerge || record.children?.length) {
57230
57311
  if (checked) {
57231
57312
  if (getHierarchyState(table, col, row) === HierarchyState.collapse) {
57232
- updateChildrenCheckboxState(true, titleIndex, table);
57313
+ updateChildrenCheckboxState(true, titleIndex, table, field);
57233
57314
  }
57234
57315
  else {
57235
- setAllChildrenCheckboxState(true, titleShowIndex, titleIndex, indexedData, table);
57316
+ setAllChildrenCheckboxState(true, titleShowIndex, titleIndex, indexedData, table, col);
57236
57317
  }
57237
- updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
57318
+ updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);
57238
57319
  }
57239
57320
  else {
57240
57321
  if (getHierarchyState(table, col, row) === HierarchyState.collapse) {
57241
- updateChildrenCheckboxState(false, titleIndex, table);
57322
+ updateChildrenCheckboxState(false, titleIndex, table, field);
57242
57323
  }
57243
57324
  else {
57244
- setAllChildrenCheckboxState(false, titleShowIndex, titleIndex, indexedData, table);
57325
+ setAllChildrenCheckboxState(false, titleShowIndex, titleIndex, indexedData, table, col);
57245
57326
  }
57246
- updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
57327
+ updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);
57247
57328
  const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number;
57248
57329
  const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState('_vtable_rowSeries_number', col, row);
57249
57330
  if (oldHeaderCheckedState !== newHeaderCheckedState) {
@@ -57252,20 +57333,69 @@
57252
57333
  }
57253
57334
  }
57254
57335
  else {
57255
- updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
57336
+ updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);
57256
57337
  }
57257
57338
  });
57258
57339
  }
57259
- function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table) {
57340
+ function bindGroupCheckboxTreeChange(table) {
57341
+ table.on('checkbox_state_change', args => {
57342
+ const { col, row, checked, field } = args;
57343
+ const isCheckboxAndTree = table.internalProps.columns.some(column => column.tree);
57344
+ table.internalProps.enableCheckboxCascade && field !== '_vtable_rowSeries_number';
57345
+ if (!isCheckboxAndTree) {
57346
+ return;
57347
+ }
57348
+ if (table.isHeader(col, row)) {
57349
+ return;
57350
+ }
57351
+ const record = table.getCellOriginRecord(col, row);
57352
+ const indexedData = table.dataSource.currentPagerIndexedData;
57353
+ const titleShowIndex = table.getRecordShowIndexByCell(col, row);
57354
+ let titleIndex = indexedData[titleShowIndex];
57355
+ if (isNumber$4(titleIndex)) {
57356
+ titleIndex = [titleIndex];
57357
+ }
57358
+ if (record.vtableMerge || record.children?.length) {
57359
+ if (checked) {
57360
+ if (getHierarchyState(table, col, row) === HierarchyState.collapse) {
57361
+ updateChildrenCheckboxState(true, titleIndex, table, field);
57362
+ }
57363
+ else {
57364
+ setAllChildrenCheckboxState(true, titleShowIndex, titleIndex, indexedData, table, col, field);
57365
+ }
57366
+ updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col, field);
57367
+ }
57368
+ else {
57369
+ if (getHierarchyState(table, col, row) === HierarchyState.collapse) {
57370
+ updateChildrenCheckboxState(false, titleIndex, table, field);
57371
+ }
57372
+ else {
57373
+ setAllChildrenCheckboxState(false, titleShowIndex, titleIndex, indexedData, table, col, field);
57374
+ }
57375
+ updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col, field);
57376
+ const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number;
57377
+ const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(field, col, row);
57378
+ if (oldHeaderCheckedState !== newHeaderCheckedState) {
57379
+ table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
57380
+ }
57381
+ }
57382
+ }
57383
+ else {
57384
+ updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col, field);
57385
+ }
57386
+ });
57387
+ }
57388
+ function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table, col, field) {
57389
+ const fieldName = field || '_vtable_rowSeries_number';
57260
57390
  let i = titleShowIndex + 1;
57261
57391
  while (isArray$7(indexedData[i]) && indexedData[i]?.length > titleIndex.length) {
57262
57392
  const row = table.columnHeaderLevelCount + i;
57263
- table.stateManager.setCheckedState(0, row, '_vtable_rowSeries_number', state);
57264
- setCellCheckboxStateByAttribute(0, row, state, table);
57393
+ table.stateManager.setCheckedState(col, row, fieldName, state);
57394
+ setCellCheckboxStateByAttribute(col, row, state, table);
57265
57395
  i++;
57266
57396
  }
57267
57397
  }
57268
- function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table) {
57398
+ function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col, field) {
57269
57399
  let parentLength = titleIndex.length - 1;
57270
57400
  if (parentLength > 0) {
57271
57401
  let i = titleShowIndex - 1;
@@ -57273,17 +57403,18 @@
57273
57403
  if ((isArray$7(indexedData[i]) && indexedData[i]?.length === parentLength) ||
57274
57404
  (parentLength === 1 && isNumber$4(indexedData[i]))) {
57275
57405
  const row = table.columnHeaderLevelCount + i;
57276
- updateParentCheckboxState(0, row, indexedData[i], table);
57406
+ updateParentCheckboxState(col, row, indexedData[i], table, field);
57277
57407
  parentLength--;
57278
57408
  }
57279
57409
  i--;
57280
57410
  }
57281
57411
  }
57282
57412
  }
57283
- function updateParentCheckboxState(col, row, currentIndex, table) {
57413
+ function updateParentCheckboxState(col, row, currentIndex, table, field) {
57284
57414
  const { checkedState } = table.stateManager;
57285
57415
  const key = currentIndex.toString();
57286
- const currentIndexLength = isArray$7(currentIndex) ? currentIndex.length : 1;
57416
+ const fieldName = field || '_vtable_rowSeries_number';
57417
+ isArray$7(currentIndex) ? currentIndex.length : 1;
57287
57418
  let start = false;
57288
57419
  const result = [];
57289
57420
  const keys = Array.from(checkedState.keys()).sort((a, b) => {
@@ -57300,16 +57431,17 @@
57300
57431
  return 0;
57301
57432
  });
57302
57433
  const stateArr = keys.map(key => checkedState.get(key));
57434
+ const childOfCurrentIndex = keys.filter(item => item.startsWith(key + ',') && item !== key);
57303
57435
  stateArr.forEach((state, i) => {
57304
57436
  const index = keys[i];
57305
57437
  const value = state;
57438
+ const isChildOfCurrentIndex = childOfCurrentIndex.includes(index);
57306
57439
  if (start) {
57307
- const indexData = index.split(',');
57308
- if (indexData.length === currentIndexLength) {
57440
+ if (!isChildOfCurrentIndex) {
57309
57441
  start = false;
57310
57442
  }
57311
57443
  else {
57312
- result.push(value._vtable_rowSeries_number);
57444
+ result.push(value[fieldName]);
57313
57445
  }
57314
57446
  }
57315
57447
  if (index === key) {
@@ -57322,22 +57454,22 @@
57322
57454
  const allChecked = result.every(item => !!item);
57323
57455
  const allUnChecked = result.every(item => !item);
57324
57456
  if (allChecked) {
57325
- table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', true);
57457
+ table.stateManager.setCheckedState(col, row, fieldName, true);
57326
57458
  setCellCheckboxStateByAttribute(col, row, true, table);
57327
57459
  }
57328
57460
  else if (allUnChecked) {
57329
- table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', false);
57461
+ table.stateManager.setCheckedState(col, row, fieldName, false);
57330
57462
  setCellCheckboxStateByAttribute(col, row, false, table);
57331
57463
  }
57332
57464
  else {
57333
- table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', 'indeterminate');
57465
+ table.stateManager.setCheckedState(col, row, fieldName, 'indeterminate');
57334
57466
  setCellCheckboxStateByAttribute(col, row, 'indeterminate', table);
57335
57467
  }
57336
57468
  }
57337
- function updateChildrenCheckboxState(parentState, currentIndex, table) {
57469
+ function updateChildrenCheckboxState(parentState, currentIndex, table, field) {
57338
57470
  const { checkedState } = table.stateManager;
57339
57471
  const key = currentIndex.toString();
57340
- const currentIndexLength = isArray$7(currentIndex) ? currentIndex.length : 1;
57472
+ isArray$7(currentIndex) ? currentIndex.length : 1;
57341
57473
  let start = false;
57342
57474
  const keys = Array.from(checkedState.keys()).sort((a, b) => {
57343
57475
  const aArr = a.split(',');
@@ -57352,17 +57484,18 @@
57352
57484
  }
57353
57485
  return 0;
57354
57486
  });
57487
+ const childrenOfKey = keys.filter(item => item.startsWith(key + ',') && item !== key);
57355
57488
  const stateArr = keys.map(key => checkedState.get(key));
57356
57489
  stateArr.forEach((state, i) => {
57357
57490
  const index = keys[i];
57358
57491
  const value = state;
57492
+ const shouldSelectChildren = childrenOfKey.length !== 0 && childrenOfKey.includes(index);
57359
57493
  if (start) {
57360
- const indexData = index.split(',');
57361
- if (indexData.length === currentIndexLength) {
57494
+ if (!shouldSelectChildren) {
57362
57495
  start = false;
57363
57496
  }
57364
57497
  else {
57365
- value._vtable_rowSeries_number = parentState;
57498
+ value[field] = parentState;
57366
57499
  }
57367
57500
  }
57368
57501
  if (index === key) {
@@ -57575,6 +57708,7 @@
57575
57708
  bindAxisClickEvent(this.table);
57576
57709
  bindAxisHoverEvent(this.table);
57577
57710
  bindGroupTitleCheckboxChange(this.table);
57711
+ bindGroupCheckboxTreeChange(this.table);
57578
57712
  bindHeaderCheckboxChange(this.table);
57579
57713
  bindButtonClickEvent(this.table);
57580
57714
  rightButtonClickEvent(this.table);
@@ -62501,7 +62635,7 @@
62501
62635
  return TABLE_EVENT_TYPE;
62502
62636
  }
62503
62637
  options;
62504
- version = "1.18.4-alpha.1";
62638
+ version = "1.18.5-alpha.0";
62505
62639
  pagination;
62506
62640
  id = `VTable${Date.now()}`;
62507
62641
  headerStyleCache;
@@ -62541,7 +62675,7 @@
62541
62675
  if (options.customConfig?.imageAnonymous === false) {
62542
62676
  vglobal.isImageAnonymous = false;
62543
62677
  }
62544
- const { frozenColCount = 0, unfreezeAllOnExceedsMaxWidth, frozenRowCount, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', resize, dragHeaderMode, dragOrder, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight, clearDOM = true } = options;
62678
+ const { frozenColCount = 0, unfreezeAllOnExceedsMaxWidth, frozenRowCount, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, enableCheckboxCascade, columnResizeMode, rowResizeMode = 'none', resize, dragHeaderMode, dragOrder, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight, clearDOM = true } = options;
62545
62679
  this.container = container;
62546
62680
  this.options = options;
62547
62681
  this._widthMode = widthMode;
@@ -62613,6 +62747,7 @@
62613
62747
  internalProps.keyboardOptions = keyboardOptions;
62614
62748
  internalProps.eventOptions = eventOptions;
62615
62749
  internalProps.rowSeriesNumber = rowSeriesNumber;
62750
+ internalProps.enableCheckboxCascade = enableCheckboxCascade;
62616
62751
  internalProps.columnResizeMode = resize?.columnResizeMode ?? columnResizeMode;
62617
62752
  internalProps.rowResizeMode = resize?.rowResizeMode ?? rowResizeMode;
62618
62753
  internalProps.dragHeaderMode = dragOrder?.dragHeaderMode ?? dragHeaderMode ?? 'none';
@@ -63933,7 +64068,7 @@
63933
64068
  this.editorManager?.cancelEdit();
63934
64069
  this.options = options;
63935
64070
  this._hasAutoImageColumn = undefined;
63936
- const { frozenColCount = 0, unfreezeAllOnExceedsMaxWidth, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', resize, dragHeaderMode, dragOrder, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
64071
+ const { frozenColCount = 0, unfreezeAllOnExceedsMaxWidth, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, enableCheckboxCascade, columnResizeMode, rowResizeMode = 'none', resize, dragHeaderMode, dragOrder, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
63937
64072
  if (pixelRatio && pixelRatio !== this.internalProps.pixelRatio) {
63938
64073
  this.internalProps.pixelRatio = pixelRatio;
63939
64074
  }
@@ -63978,6 +64113,7 @@
63978
64113
  internalProps.keyboardOptions = keyboardOptions;
63979
64114
  internalProps.eventOptions = eventOptions;
63980
64115
  internalProps.rowSeriesNumber = rowSeriesNumber;
64116
+ internalProps.enableCheckboxCascade = enableCheckboxCascade;
63981
64117
  internalProps.columnResizeMode = resize?.columnResizeMode ?? columnResizeMode;
63982
64118
  internalProps.rowResizeMode = resize?.rowResizeMode ?? rowResizeMode;
63983
64119
  internalProps.dragHeaderMode = dragOrder?.dragHeaderMode ?? dragHeaderMode ?? 'none';
@@ -67453,7 +67589,7 @@
67453
67589
  style: rowSeriesNumber.style,
67454
67590
  width: rowSeriesNumber.width,
67455
67591
  format: rowSeriesNumber.format,
67456
- field: '_vtable_rowSeries_number',
67592
+ field: rowSeriesNumber.field,
67457
67593
  icon: rowSeriesNumber.icon,
67458
67594
  headerIcon: rowSeriesNumber.headerIcon,
67459
67595
  isChildNode: false
@@ -68864,6 +69000,7 @@
68864
69000
  }
68865
69001
  }
68866
69002
  function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
69003
+ const changedCellResults = [];
68867
69004
  let pasteColEnd = startCol;
68868
69005
  let pasteRowEnd = startRow;
68869
69006
  const beforeChangeValues = [];
@@ -68893,6 +69030,7 @@
68893
69030
  if (startRow + i > table.rowCount - 1) {
68894
69031
  break;
68895
69032
  }
69033
+ changedCellResults[i] = [];
68896
69034
  pasteRowEnd = startRow + i;
68897
69035
  const rowValues = values[i];
68898
69036
  let thisRowPasteColEnd = startCol;
@@ -68923,6 +69061,7 @@
68923
69061
  }
68924
69062
  }
68925
69063
  if (isCanChange) {
69064
+ changedCellResults[i][j] = true;
68926
69065
  const value = rowValues[j];
68927
69066
  const recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i);
68928
69067
  const { field } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i);
@@ -68945,6 +69084,9 @@
68945
69084
  });
68946
69085
  }
68947
69086
  }
69087
+ else {
69088
+ changedCellResults[i][j] = false;
69089
+ }
68948
69090
  }
68949
69091
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
68950
69092
  }
@@ -68977,7 +69119,7 @@
68977
69119
  table.internalProps.layoutMap.clearCellRangeMap();
68978
69120
  table.scenegraph.clearCells();
68979
69121
  table.scenegraph.createSceneGraph();
68980
- return;
69122
+ return changedCellResults;
68981
69123
  }
68982
69124
  for (let sCol = startRange.start.col; sCol <= range.end.col; sCol++) {
68983
69125
  for (let sRow = startRange.start.row; sRow <= range.end.row; sRow++) {
@@ -69018,6 +69160,7 @@
69018
69160
  table.scenegraph.updateRowsHeight(rows, deltaYs);
69019
69161
  }
69020
69162
  table.scenegraph.updateNextFrame();
69163
+ return changedCellResults;
69021
69164
  }
69022
69165
  function getCellUpdateType(col, row, table, oldCellUpdateType) {
69023
69166
  if (oldCellUpdateType === 'group') {
@@ -74712,7 +74855,155 @@
74712
74855
  return cellGroup;
74713
74856
  }
74714
74857
 
74715
- function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync) {
74858
+ class CheckboxContent extends Group$1 {
74859
+ _leftGroup;
74860
+ _rightGroup;
74861
+ _checkboxGroup;
74862
+ _autoWidth = false;
74863
+ _autoHeight = false;
74864
+ _cellWidth;
74865
+ _originCellWidth;
74866
+ _cellHeight;
74867
+ _align;
74868
+ _baseline;
74869
+ constructor(params) {
74870
+ super(params);
74871
+ this._leftGroup = new Group$1({
74872
+ pickable: false,
74873
+ fill: false,
74874
+ stroke: false
74875
+ });
74876
+ this._leftGroup.role = 'content-left';
74877
+ this._rightGroup = new Group$1({
74878
+ pickable: false,
74879
+ fill: false,
74880
+ stroke: false
74881
+ });
74882
+ this._rightGroup.role = 'content-right';
74883
+ this._checkboxGroup = new Group$1({
74884
+ pickable: false,
74885
+ fill: false,
74886
+ stroke: false
74887
+ });
74888
+ this._checkboxGroup.role = 'content-center';
74889
+ this.appendChild(this._leftGroup);
74890
+ this.appendChild(this._rightGroup);
74891
+ this.appendChild(this._checkboxGroup);
74892
+ }
74893
+ addLeftOccupyingIcon(icon) {
74894
+ icon.setAttribute('x', this._leftGroup.width + (icon.attribute.marginLeft ?? 0));
74895
+ this._leftGroup.appendChild(icon);
74896
+ this._leftGroup.setDeltaWidth((icon.attribute.marginLeft ?? 0) + (icon.attribute.marginRight ?? 0) + icon.attribute.width);
74897
+ }
74898
+ addRightOccupyingIcon(icon) {
74899
+ icon.setAttribute('x', this._rightGroup.width + (icon.attribute.marginLeft ?? 0));
74900
+ this._rightGroup.appendChild(icon);
74901
+ this._rightGroup.setDeltaWidth((icon.attribute.marginLeft ?? 0) + (icon.attribute.marginRight ?? 0) + icon.attribute.width);
74902
+ }
74903
+ addCheckbox(checkbox) {
74904
+ this._checkboxGroup.appendChild(checkbox);
74905
+ }
74906
+ setCheckboxContentOption(option) {
74907
+ this._autoWidth = option.autoWidth;
74908
+ this._autoHeight = option.autoHeight;
74909
+ this._cellWidth = option.cellWidth;
74910
+ this._originCellWidth = option.cellWidth;
74911
+ this._cellHeight = option.cellHeight;
74912
+ this._align = option.align;
74913
+ this._baseline = option.baseline;
74914
+ }
74915
+ layout() {
74916
+ let leftOccupyingWidth = this._leftGroup.width;
74917
+ if (leftOccupyingWidth === Infinity) {
74918
+ leftOccupyingWidth = 0;
74919
+ }
74920
+ let rightOccupyingWidth = this._rightGroup.width;
74921
+ if (rightOccupyingWidth === -Infinity) {
74922
+ rightOccupyingWidth = 0;
74923
+ }
74924
+ if (this._autoWidth) {
74925
+ const checkboxWidth = this._checkboxGroup.width;
74926
+ this._cellWidth = leftOccupyingWidth + rightOccupyingWidth + checkboxWidth;
74927
+ this.setAttribute('width', this._cellWidth);
74928
+ }
74929
+ else {
74930
+ const contentWidth = this._cellWidth - leftOccupyingWidth - rightOccupyingWidth;
74931
+ this.updateCenterLayout(contentWidth);
74932
+ const centerWidth = this._checkboxGroup.width;
74933
+ this._cellWidth = leftOccupyingWidth + rightOccupyingWidth + centerWidth;
74934
+ this.setAttribute('width', this._cellWidth);
74935
+ }
74936
+ this.updateHorizontalPos();
74937
+ const leftOccupyingHeight = this._leftGroup.height;
74938
+ const rightOccupyingHeight = this._rightGroup.height;
74939
+ const centerHeight = this._checkboxGroup.height;
74940
+ this._cellHeight = Math.max(leftOccupyingHeight, rightOccupyingHeight, centerHeight);
74941
+ this.setAttribute('height', this._cellHeight);
74942
+ this.updateVerticalPos();
74943
+ }
74944
+ updateCenterLayout(contentWidth) {
74945
+ let checkboxWidth = contentWidth;
74946
+ this._checkboxGroup.forEachChildren(child => {
74947
+ if (child instanceof CheckBox) {
74948
+ checkboxWidth -= child.AABBBounds.width();
74949
+ }
74950
+ });
74951
+ const checkbox = this._checkboxGroup.getChildByName('checkbox-content');
74952
+ if (checkbox instanceof CheckBox) {
74953
+ checkbox.setAttribute('width', checkboxWidth);
74954
+ }
74955
+ let x = 0;
74956
+ this._checkboxGroup.forEachChildren((child) => {
74957
+ child.setAttribute('x', x);
74958
+ x += child.AABBBounds.width();
74959
+ });
74960
+ }
74961
+ updateHorizontalPos() {
74962
+ this._leftGroup.setAttribute('x', 0);
74963
+ this._rightGroup.setAttribute('x', this._cellWidth - this._rightGroup.width);
74964
+ this._checkboxGroup.setAttribute('x', 4);
74965
+ if (this._align === 'left' || this._align === 'start') {
74966
+ this.setAttribute('dx', 0);
74967
+ }
74968
+ else if (this._align === 'center') {
74969
+ this.setAttribute('dx', -this.attribute.width / 2);
74970
+ }
74971
+ else if (this._align === 'right' || this._align === 'end') {
74972
+ this.setAttribute('dx', -this.attribute.width);
74973
+ }
74974
+ }
74975
+ updateVerticalPos() {
74976
+ if (this._baseline === 'top') {
74977
+ this._leftGroup.setAttribute('y', 0);
74978
+ this._rightGroup.setAttribute('y', 0);
74979
+ this._checkboxGroup.setAttribute('y', 0);
74980
+ }
74981
+ else if (this._baseline === 'middle') {
74982
+ this._leftGroup.forEachChildren((icon) => {
74983
+ icon.setAttribute('y', (this._leftGroup.height - icon.AABBBounds.height()) / 2);
74984
+ });
74985
+ this._rightGroup.forEachChildren((icon) => {
74986
+ icon.setAttribute('y', (this._rightGroup.height - icon.AABBBounds.height()) / 2);
74987
+ });
74988
+ this._leftGroup.setAttribute('y', this._cellHeight / 2 - this._leftGroup.height / 2);
74989
+ this._rightGroup.setAttribute('y', this._cellHeight / 2 - this._rightGroup.height / 2);
74990
+ this._checkboxGroup.setAttribute('y', this._cellHeight / 2 - this._checkboxGroup.height / 2);
74991
+ }
74992
+ else if (this._baseline === 'bottom') {
74993
+ this._leftGroup.forEachChildren((icon) => {
74994
+ icon.setAttribute('y', this._leftGroup.height - icon.AABBBounds.height());
74995
+ });
74996
+ this._rightGroup.forEachChildren((icon) => {
74997
+ icon.setAttribute('y', this._rightGroup.height - icon.AABBBounds.height());
74998
+ });
74999
+ this._leftGroup.setAttribute('y', this._cellHeight - this._leftGroup.height);
75000
+ this._rightGroup.setAttribute('y', this._cellHeight - this._rightGroup.height);
75001
+ this._checkboxGroup.setAttribute('y', this._cellHeight - this._checkboxGroup.height);
75002
+ }
75003
+ }
75004
+ }
75005
+
75006
+ function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, isCheckboxTree) {
74716
75007
  if (!cellGroup) {
74717
75008
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
74718
75009
  if (isAsync) {
@@ -74771,10 +75062,16 @@
74771
75062
  }
74772
75063
  let iconWidth = 0;
74773
75064
  let cellLeftIconWidth = 0;
75065
+ let cellRightIconWidth = 0;
75066
+ let cellabsoluteRightIconWidth = 0;
75067
+ let cellContentLeftIcons = [];
74774
75068
  if (Array.isArray(icons) && icons.length !== 0) {
74775
- const { leftIconWidth, rightIconWidth, absoluteLeftIconWidth, absoluteRightIconWidth } = dealWithIconLayout(icons, cellGroup, range, table);
75069
+ const { leftIconWidth, rightIconWidth, contentLeftIcons, contentRightIcons, absoluteLeftIconWidth, absoluteRightIconWidth } = dealWithIconLayout(icons, cellGroup, range, table);
74776
75070
  iconWidth = leftIconWidth + rightIconWidth;
74777
75071
  cellLeftIconWidth = leftIconWidth;
75072
+ cellRightIconWidth = rightIconWidth;
75073
+ cellContentLeftIcons = contentLeftIcons;
75074
+ cellabsoluteRightIconWidth = absoluteRightIconWidth;
74778
75075
  cellGroup.forEachChildren((child) => {
74779
75076
  if (child.role === 'icon-left') {
74780
75077
  child.setAttribute('x', child.attribute.x + padding[3]);
@@ -74798,11 +75095,89 @@
74798
75095
  }
74799
75096
  });
74800
75097
  }
74801
- const checkboxComponent = createCheckbox(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table);
74802
- if (checkboxComponent) {
74803
- cellGroup.appendChild(checkboxComponent);
75098
+ const checkboxComponent = createCheckbox(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, isCheckboxTree);
75099
+ if (cellContentLeftIcons.length === 1 &&
75100
+ (cellContentLeftIcons[0].name === InternalIconName.expandIconName ||
75101
+ cellContentLeftIcons[0].name === InternalIconName.collapseIconName)) {
75102
+ const checkContent = new CheckboxContent({
75103
+ x: 0,
75104
+ y: 0,
75105
+ fill: false,
75106
+ stroke: false,
75107
+ pickable: false
75108
+ });
75109
+ checkContent.name = 'checkbox-content';
75110
+ checkContent.setCheckboxContentOption({
75111
+ autoWidth: false,
75112
+ autoHeight: false,
75113
+ cellWidth: width - (padding[1] + padding[3]),
75114
+ cellHeight: height - padding[0] - padding[2],
75115
+ align: textAlign,
75116
+ baseline: textBaseline
75117
+ });
75118
+ const dealWithIconComputeVar = {
75119
+ addedHierarchyOffset: 0
75120
+ };
75121
+ cellContentLeftIcons.forEach(icon => {
75122
+ const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, range, table, dealWithIconComputeVar);
75123
+ iconMark.role = 'icon-content-left';
75124
+ iconMark.name = icon.name;
75125
+ checkContent.addLeftOccupyingIcon(iconMark);
75126
+ });
75127
+ if (checkboxComponent) {
75128
+ checkContent.addCheckbox(checkboxComponent);
75129
+ }
75130
+ cellGroup.appendChild(checkContent);
75131
+ checkContent.layout();
75132
+ checkContent.AABBBounds.width();
75133
+ checkContent.AABBBounds.height();
75134
+ const Awidth = width - (padding[1] + padding[3]);
75135
+ const Aheight = height - (padding[0] + padding[2]);
75136
+ cellGroup.forEachChildren((child) => {
75137
+ if (child.role === 'icon-left') {
75138
+ child.setAttribute('x', child.attribute.x + padding[3]);
75139
+ }
75140
+ else if (child.role === 'icon-right') {
75141
+ child.setAttribute('x', child.attribute.x + Awidth - cellRightIconWidth + padding[3]);
75142
+ }
75143
+ else if (child.role === 'icon-absolute-right') {
75144
+ child.setAttribute('x', child.attribute.x + Awidth - cellabsoluteRightIconWidth + padding[3] + padding[1]);
75145
+ }
75146
+ else if (child.name === 'content' || child.name === 'checkbox-content') {
75147
+ if (textAlign === 'center' && child.type !== 'richtext') {
75148
+ child.setAttribute('x', padding[3] + cellLeftIconWidth + (Awidth - cellLeftIconWidth - cellRightIconWidth) / 2);
75149
+ }
75150
+ else if (textAlign === 'right' && child.type !== 'richtext') {
75151
+ child.setAttribute('x', padding[3] + Awidth - cellRightIconWidth);
75152
+ }
75153
+ else {
75154
+ child.setAttribute('x', padding[3] + cellLeftIconWidth);
75155
+ }
75156
+ }
75157
+ });
75158
+ cellGroup.forEachChildren((child) => {
75159
+ if (child.name === CUSTOM_CONTAINER_NAME) {
75160
+ return;
75161
+ }
75162
+ if (textBaseline === 'middle') {
75163
+ if (child?._checkboxGroup) {
75164
+ child._leftGroup.setAttribute('y', padding[0] + (Aheight - child._checkboxGroup.AABBBounds.height()) / 2);
75165
+ }
75166
+ }
75167
+ else if (textBaseline === 'bottom') {
75168
+ child.setAttribute('y', padding[0] + Aheight - child.AABBBounds.height());
75169
+ }
75170
+ else {
75171
+ child.setAttribute('y', padding[0]);
75172
+ }
75173
+ });
75174
+ }
75175
+ else {
75176
+ if (checkboxComponent) {
75177
+ cellGroup.appendChild(checkboxComponent);
75178
+ }
75179
+ checkboxComponent.render();
74804
75180
  }
74805
- checkboxComponent.render();
74806
75181
  width -= padding[1] + padding[3] + iconWidth;
74807
75182
  height -= padding[0] + padding[2];
74808
75183
  if (textAlign === 'center') {
@@ -74825,7 +75200,7 @@
74825
75200
  }
74826
75201
  return cellGroup;
74827
75202
  }
74828
- function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table) {
75203
+ function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree) {
74829
75204
  const style = table._getCellStyle(col, row);
74830
75205
  const size = getProp('size', style, col, row, table);
74831
75206
  const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', style, col, row, table);
@@ -74852,6 +75227,14 @@
74852
75227
  isChecked = value;
74853
75228
  text = '';
74854
75229
  }
75230
+ if (table.internalProps.layoutMap.isSeriesNumber(col, row)) {
75231
+ const checkboxSeriesNumberStyle = table.getFieldData(define.field, col, row);
75232
+ if (checkboxSeriesNumberStyle) {
75233
+ isChecked = checkboxSeriesNumberStyle.checked;
75234
+ isDisabled = checkboxSeriesNumberStyle.disable;
75235
+ text = checkboxSeriesNumberStyle.text ?? '';
75236
+ }
75237
+ }
74855
75238
  isChecked = table.stateManager.syncCheckedState(col, row, define.field, isChecked);
74856
75239
  const hierarchyOffset = getHierarchyOffset(col, row, table);
74857
75240
  const cellStyle = table._getCellStyle(col, row);
@@ -74891,7 +75274,7 @@
74891
75274
  wordBreak: 'break-word',
74892
75275
  heightLimit: autoRowHeight ? -1 : cellHeight - Math.floor(padding[0] + padding[2]),
74893
75276
  pickable: false,
74894
- dx: hierarchyOffset,
75277
+ dx: isCheckboxTree ? 0 : hierarchyOffset,
74895
75278
  whiteSpace: text.length === 1 && !autoWrapText ? 'no-wrap' : 'normal'
74896
75279
  };
74897
75280
  const testAttribute = cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute;
@@ -74907,6 +75290,7 @@
74907
75290
  width: size,
74908
75291
  height: size
74909
75292
  },
75293
+ dx: isCheckboxTree ? hierarchyOffset : 0,
74910
75294
  spaceBetweenTextAndIcon,
74911
75295
  disabled: isDisabled ?? globalDisable ?? false
74912
75296
  };
@@ -85402,7 +85786,7 @@
85402
85786
  }
85403
85787
 
85404
85788
  registerForVrender();
85405
- const version = "1.18.4-alpha.1";
85789
+ const version = "1.18.5-alpha.0";
85406
85790
  function getIcons() {
85407
85791
  return get$2();
85408
85792
  }