@visactor/vtable 1.5.3-alpha.1 → 1.5.3

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 (147) hide show
  1. package/cjs/ListTable.d.ts +1 -2
  2. package/cjs/ListTable.js +194 -26
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotTable.d.ts +1 -1
  5. package/cjs/PivotTable.js +3 -3
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/core/BaseTable.d.ts +3 -5
  8. package/cjs/core/BaseTable.js +79 -8
  9. package/cjs/core/BaseTable.js.map +1 -1
  10. package/cjs/core/tableHelper.d.ts +2 -0
  11. package/cjs/core/tableHelper.js +18 -9
  12. package/cjs/core/tableHelper.js.map +1 -1
  13. package/cjs/data/CachedDataSource.d.ts +1 -10
  14. package/cjs/data/CachedDataSource.js +3 -78
  15. package/cjs/data/CachedDataSource.js.map +1 -1
  16. package/cjs/dataset/statistics-helper.js +1 -0
  17. package/cjs/edit/edit-manager.d.ts +1 -1
  18. package/cjs/edit/edit-manager.js +4 -5
  19. package/cjs/edit/edit-manager.js.map +1 -1
  20. package/cjs/event/listener/container-dom.js +6 -5
  21. package/cjs/event/listener/container-dom.js.map +1 -1
  22. package/cjs/event/listener/table-group.js.map +1 -1
  23. package/cjs/event/scroll.js +6 -4
  24. package/cjs/event/scroll.js.map +1 -1
  25. package/cjs/index.d.ts +1 -1
  26. package/cjs/index.js +1 -1
  27. package/cjs/index.js.map +1 -1
  28. package/cjs/layout/layout-helper.js +2 -2
  29. package/cjs/layout/layout-helper.js.map +1 -1
  30. package/cjs/layout/row-height-map.js +0 -1
  31. package/cjs/layout/simple-header-layout.d.ts +2 -1
  32. package/cjs/layout/simple-header-layout.js +88 -2
  33. package/cjs/layout/simple-header-layout.js.map +1 -1
  34. package/cjs/plugins/icons.js +1 -1
  35. package/cjs/plugins/themes.js +1 -1
  36. package/cjs/scenegraph/group-creater/cell-helper.js +6 -11
  37. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  38. package/cjs/scenegraph/group-creater/column-helper.js +2 -7
  39. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  40. package/cjs/scenegraph/scenegraph.js +1 -1
  41. package/cjs/scenegraph/utils/get-cell-merge.js +1 -1
  42. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  43. package/cjs/scenegraph/utils/get-hierarchy-offset.js +8 -6
  44. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  45. package/cjs/state/select/is-cell-select-highlight.d.ts +1 -0
  46. package/cjs/state/select/is-cell-select-highlight.js +8 -2
  47. package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
  48. package/cjs/themes/theme.d.ts +0 -2
  49. package/cjs/themes/theme.js +4 -12
  50. package/cjs/themes/theme.js.map +1 -1
  51. package/cjs/tools/helper.js.map +1 -1
  52. package/cjs/ts-types/base-table.d.ts +0 -9
  53. package/cjs/ts-types/base-table.js.map +1 -1
  54. package/cjs/ts-types/new-data-set.d.ts +0 -1
  55. package/cjs/ts-types/new-data-set.js.map +1 -1
  56. package/cjs/ts-types/table-engine.d.ts +1 -9
  57. package/cjs/ts-types/table-engine.js.map +1 -1
  58. package/cjs/ts-types/theme.d.ts +0 -1
  59. package/cjs/ts-types/theme.js.map +1 -1
  60. package/cjs/vrender.js.map +1 -1
  61. package/dist/vtable.js +2901 -3149
  62. package/dist/vtable.min.js +2 -2
  63. package/es/ListTable.d.ts +1 -2
  64. package/es/ListTable.js +192 -30
  65. package/es/ListTable.js.map +1 -1
  66. package/es/PivotTable.d.ts +1 -1
  67. package/es/PivotTable.js +3 -3
  68. package/es/PivotTable.js.map +1 -1
  69. package/es/core/BaseTable.d.ts +3 -5
  70. package/es/core/BaseTable.js +83 -11
  71. package/es/core/BaseTable.js.map +1 -1
  72. package/es/core/tableHelper.d.ts +2 -0
  73. package/es/core/tableHelper.js +16 -6
  74. package/es/core/tableHelper.js.map +1 -1
  75. package/es/data/CachedDataSource.d.ts +1 -10
  76. package/es/data/CachedDataSource.js +0 -79
  77. package/es/data/CachedDataSource.js.map +1 -1
  78. package/es/dataset/statistics-helper.js +2 -1
  79. package/es/edit/edit-manager.d.ts +1 -1
  80. package/es/edit/edit-manager.js +5 -4
  81. package/es/edit/edit-manager.js.map +1 -1
  82. package/es/event/listener/container-dom.js +7 -4
  83. package/es/event/listener/container-dom.js.map +1 -1
  84. package/es/event/listener/table-group.js.map +1 -1
  85. package/es/event/scroll.js +6 -4
  86. package/es/event/scroll.js.map +1 -1
  87. package/es/index.d.ts +1 -1
  88. package/es/index.js +1 -1
  89. package/es/index.js.map +1 -1
  90. package/es/layout/layout-helper.js +2 -2
  91. package/es/layout/layout-helper.js.map +1 -1
  92. package/es/layout/row-height-map.js +1 -2
  93. package/es/layout/simple-header-layout.d.ts +2 -1
  94. package/es/layout/simple-header-layout.js +87 -3
  95. package/es/layout/simple-header-layout.js.map +1 -1
  96. package/es/plugins/icons.js +1 -1
  97. package/es/plugins/themes.js +1 -1
  98. package/es/scenegraph/group-creater/cell-helper.js +6 -11
  99. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  100. package/es/scenegraph/group-creater/column-helper.js +2 -7
  101. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  102. package/es/scenegraph/scenegraph.js +1 -1
  103. package/es/scenegraph/utils/get-cell-merge.js +1 -1
  104. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  105. package/es/scenegraph/utils/get-hierarchy-offset.js +9 -7
  106. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  107. package/es/state/select/is-cell-select-highlight.d.ts +1 -0
  108. package/es/state/select/is-cell-select-highlight.js +5 -0
  109. package/es/state/select/is-cell-select-highlight.js.map +1 -1
  110. package/es/themes/theme.d.ts +0 -2
  111. package/es/themes/theme.js +4 -11
  112. package/es/themes/theme.js.map +1 -1
  113. package/es/tools/helper.js.map +1 -1
  114. package/es/ts-types/base-table.d.ts +0 -9
  115. package/es/ts-types/base-table.js.map +1 -1
  116. package/es/ts-types/new-data-set.d.ts +0 -1
  117. package/es/ts-types/new-data-set.js.map +1 -1
  118. package/es/ts-types/table-engine.d.ts +1 -9
  119. package/es/ts-types/table-engine.js.map +1 -1
  120. package/es/ts-types/theme.d.ts +0 -1
  121. package/es/ts-types/theme.js.map +1 -1
  122. package/es/vrender.js.map +1 -1
  123. package/package.json +5 -5
  124. package/cjs/core/group-helper.d.ts +0 -6
  125. package/cjs/core/group-helper.js +0 -22
  126. package/cjs/core/group-helper.js.map +0 -1
  127. package/cjs/core/record-helper.d.ts +0 -6
  128. package/cjs/core/record-helper.js +0 -230
  129. package/cjs/core/record-helper.js.map +0 -1
  130. package/cjs/core/style-helper.d.ts +0 -3
  131. package/cjs/core/style-helper.js +0 -110
  132. package/cjs/core/style-helper.js.map +0 -1
  133. package/cjs/layout/cell-range/simple-cell-range.d.ts +0 -4
  134. package/cjs/layout/cell-range/simple-cell-range.js +0 -106
  135. package/cjs/layout/cell-range/simple-cell-range.js.map +0 -1
  136. package/es/core/group-helper.d.ts +0 -6
  137. package/es/core/group-helper.js +0 -14
  138. package/es/core/group-helper.js.map +0 -1
  139. package/es/core/record-helper.d.ts +0 -6
  140. package/es/core/record-helper.js +0 -220
  141. package/es/core/record-helper.js.map +0 -1
  142. package/es/core/style-helper.d.ts +0 -3
  143. package/es/core/style-helper.js +0 -86
  144. package/es/core/style-helper.js.map +0 -1
  145. package/es/layout/cell-range/simple-cell-range.d.ts +0 -4
  146. package/es/layout/cell-range/simple-cell-range.js +0 -99
  147. package/es/layout/cell-range/simple-cell-range.js.map +0 -1
@@ -1,230 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.listTableUpdateRecords = exports.listTableDeleteRecords = exports.listTableAddRecords = exports.listTableAddRecord = exports.sortRecords = void 0;
6
-
7
- const util_1 = require("../tools/util");
8
-
9
- function sortRecords(table) {
10
- var _a;
11
- if (table.sortState) {
12
- let order, field;
13
- if (Array.isArray(table.sortState) ? 0 !== table.sortState.length && ({order: order, field: field} = null === (_a = table.sortState) || void 0 === _a ? void 0 : _a[0]) : ({order: order, field: field} = table.sortState),
14
- order && field && "normal" !== order) {
15
- const sortFunc = table._getSortFuncFromHeaderOption(void 0, field), hd = table.internalProps.layoutMap.headerObjects.find((col => col && col.field === field));
16
- table.dataSource.sort(hd.field, order, null != sortFunc ? sortFunc : util_1.defaultOrderFn);
17
- }
18
- }
19
- }
20
-
21
- function listTableAddRecord(record, recordIndex, table) {
22
- var _a, _b;
23
- if (table.options.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [ record ]),
24
- table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(),
25
- table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.addRecordForSorted(record),
26
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
27
- (void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
28
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
29
- table.dataSource.addRecord(record, recordIndex);
30
- const oldRowCount = table.rowCount;
31
- if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(),
32
- void table.scenegraph.createSceneGraph();
33
- const newRowCount = table.transpose ? table.colCount : table.rowCount;
34
- if (table.pagination) {
35
- const {perPageCount: perPageCount, currentPage: currentPage} = table.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount;
36
- if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) table.scenegraph.clearCells(),
37
- table.scenegraph.createSceneGraph(); else {
38
- const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
39
- if (oldRowCount - headerCount === table.pagination.perPageCount) {
40
- const updateRows = [];
41
- for (let row = rowNum; row < newRowCount; row++) table.transpose ? updateRows.push({
42
- col: row,
43
- row: 0
44
- }) : updateRows.push({
45
- col: 0,
46
- row: row
47
- });
48
- table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
49
- } else {
50
- const addRows = [];
51
- for (let row = rowNum; row < Math.min(newRowCount, rowNum + 1); row++) table.transpose ? addRows.push({
52
- col: row,
53
- row: 0
54
- }) : addRows.push({
55
- col: 0,
56
- row: row
57
- });
58
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
59
- }
60
- }
61
- } else {
62
- const addRows = [];
63
- for (let row = recordIndex + headerCount; row < recordIndex + headerCount + 1; row++) table.transpose ? addRows.push({
64
- col: row,
65
- row: 0
66
- }) : addRows.push({
67
- col: 0,
68
- row: row
69
- });
70
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
71
- }
72
- }
73
- }
74
-
75
- function listTableAddRecords(records, recordIndex, table) {
76
- var _a, _b;
77
- if (table.options.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records),
78
- table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(),
79
- table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.addRecordsForSorted(records),
80
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
81
- void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
82
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
83
- table.dataSource.addRecords(records, recordIndex);
84
- const oldRowCount = table.transpose ? table.colCount : table.rowCount;
85
- if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(),
86
- void table.scenegraph.createSceneGraph();
87
- const newRowCount = table.transpose ? table.colCount : table.rowCount;
88
- if (table.pagination) {
89
- const {perPageCount: perPageCount, currentPage: currentPage} = table.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount;
90
- if (recordIndex < endIndex) if (recordIndex < endIndex - perPageCount) table.scenegraph.clearCells(),
91
- table.scenegraph.createSceneGraph(); else {
92
- const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;
93
- if (oldRowCount - headerCount === table.pagination.perPageCount) {
94
- const updateRows = [];
95
- for (let row = rowNum; row < newRowCount; row++) table.transpose ? updateRows.push({
96
- col: row,
97
- row: 0
98
- }) : updateRows.push({
99
- col: 0,
100
- row: row
101
- });
102
- table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
103
- } else {
104
- const addRows = [];
105
- for (let row = rowNum; row < Math.min(newRowCount, rowNum + (Array.isArray(records) ? records.length : 1)); row++) table.transpose ? addRows.push({
106
- col: row,
107
- row: 0
108
- }) : addRows.push({
109
- col: 0,
110
- row: row
111
- });
112
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
113
- }
114
- }
115
- } else {
116
- const addRows = [];
117
- for (let row = recordIndex + headerCount; row < recordIndex + headerCount + (Array.isArray(records) ? records.length : 1); row++) table.transpose ? addRows.push({
118
- col: row,
119
- row: 0
120
- }) : addRows.push({
121
- col: 0,
122
- row: row
123
- });
124
- table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);
125
- }
126
- }
127
- }
128
-
129
- function listTableDeleteRecords(recordIndexs, table) {
130
- var _a, _b;
131
- if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs),
132
- table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(),
133
- table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs),
134
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
135
- const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
136
- if (0 === deletedRecordIndexs.length) return;
137
- const oldRowCount = table.transpose ? table.colCount : table.rowCount;
138
- table.refreshRowColCount();
139
- const newRowCount = table.transpose ? table.colCount : table.rowCount, recordIndexsMinToMax = deletedRecordIndexs.sort(((a, b) => a - b)), minRecordIndex = recordIndexsMinToMax[0];
140
- if (table.pagination) {
141
- const {perPageCount: perPageCount, currentPage: currentPage} = table.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount;
142
- if (minRecordIndex < endIndex) if (minRecordIndex < endIndex - perPageCount) table.scenegraph.clearCells(),
143
- table.scenegraph.createSceneGraph(); else {
144
- const updateRows = [], delRows = [];
145
- for (let row = minRecordIndex - (endIndex - perPageCount) + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount); row < newRowCount; row++) table.transpose ? updateRows.push({
146
- col: row,
147
- row: 0
148
- }) : updateRows.push({
149
- col: 0,
150
- row: row
151
- });
152
- if (newRowCount < oldRowCount) for (let row = newRowCount; row < oldRowCount; row++) table.transpose ? delRows.push({
153
- col: row,
154
- row: 0
155
- }) : delRows.push({
156
- col: 0,
157
- row: row
158
- });
159
- table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
160
- }
161
- } else {
162
- const delRows = [];
163
- for (let index = 0; index < recordIndexsMinToMax.length; index++) {
164
- const rowNum = recordIndexsMinToMax[index] + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);
165
- table.transpose ? delRows.push({
166
- col: rowNum,
167
- row: 0
168
- }) : delRows.push({
169
- col: 0,
170
- row: rowNum
171
- });
172
- }
173
- table.transpose ? table.scenegraph.updateCol(delRows, [], []) : table.scenegraph.updateRow(delRows, [], []);
174
- }
175
- }
176
- }
177
-
178
- function listTableUpdateRecords(records, recordIndexs, table) {
179
- var _a, _b;
180
- if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).updateRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndexs),
181
- table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(),
182
- table.scenegraph.createSceneGraph(); else if (table.sortState) table.dataSource.updateRecordsForSorted(records, recordIndexs),
183
- sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(); else {
184
- const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
185
- if (0 === updateRecordIndexs.length) return;
186
- const recordIndexsMinToMax = updateRecordIndexs.sort(((a, b) => a - b));
187
- if (table.pagination) {
188
- const {perPageCount: perPageCount, currentPage: currentPage} = table.pagination, endIndex = perPageCount * (currentPage || 0) + perPageCount, updateRows = [];
189
- for (let index = 0; index < recordIndexsMinToMax.length; index++) {
190
- const recordIndex = recordIndexsMinToMax[index];
191
- if (recordIndex < endIndex && recordIndex >= endIndex - perPageCount) {
192
- const rowNum = recordIndex - (endIndex - perPageCount) + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);
193
- updateRows.push(rowNum);
194
- }
195
- }
196
- if (updateRows.length >= 1) {
197
- const updateRowCells = [];
198
- for (let index = 0; index < updateRows.length; index++) {
199
- const updateRow = updateRows[index];
200
- table.transpose ? updateRowCells.push({
201
- col: updateRow,
202
- row: 0
203
- }) : updateRowCells.push({
204
- col: 0,
205
- row: updateRow
206
- });
207
- }
208
- table.transpose ? table.scenegraph.updateCol([], [], updateRowCells) : table.scenegraph.updateRow([], [], updateRowCells);
209
- }
210
- } else {
211
- const updateRows = [];
212
- for (let index = 0; index < recordIndexsMinToMax.length; index++) {
213
- const rowNum = recordIndexsMinToMax[index] + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);
214
- table.transpose ? updateRows.push({
215
- col: rowNum,
216
- row: 0
217
- }) : updateRows.push({
218
- col: 0,
219
- row: rowNum
220
- });
221
- }
222
- table.transpose ? table.scenegraph.updateCol([], [], updateRows) : table.scenegraph.updateRow([], [], updateRows);
223
- }
224
- }
225
- }
226
-
227
- exports.sortRecords = sortRecords, exports.listTableAddRecord = listTableAddRecord,
228
- exports.listTableAddRecords = listTableAddRecords, exports.listTableDeleteRecords = listTableDeleteRecords,
229
- exports.listTableUpdateRecords = listTableUpdateRecords;
230
- //# sourceMappingURL=record-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/core/record-helper.ts"],"names":[],"mappings":";;;AAGA,wCAA+C;AAG/C,SAAgB,WAAW,CAAC,KAAgB;;IAC1C,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,IAAI,KAAU,CAAC;QACf,IAAI,KAAU,CAAC;QACf,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBAChC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAA,KAAK,CAAC,SAAS,0CAAG,CAAC,CAAC,CAAC,CAAC;aAC3C;SACF;aAAM;YACL,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,SAAsB,CAAC,CAAC;SACnD;QAED,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,QAAQ,EAAE;YACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,4BAA4B,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAEtE,MAAM,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;YAGtG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,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AM;gBACL,MAAM,UAAU,GAAG,EAAE,CAAC;gBACtB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBAChE,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;oBAChD,MAAM,MAAM,GAAG,WAAW,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1G,IAAI,KAAK,CAAC,SAAS,EAAE;wBACnB,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;qBAC1C;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;qBAC1C;iBACF;gBACD,KAAK,CAAC,SAAS;oBACb,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC;oBAChD,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;aACpD;SACF;KAEF;AACH,CAAC;AAtED,wDAsEC","file":"record-helper.js","sourcesContent":["/* eslint-disable max-depth */\nimport type { ListTable } from '../ListTable';\nimport type { CachedDataSource } from '../data';\nimport { defaultOrderFn } from '../tools/util';\nimport type { SortState } from '../ts-types';\n\nexport function sortRecords(table: ListTable) {\n if (table.sortState) {\n let order: any;\n let field: any;\n if (Array.isArray(table.sortState)) {\n if (table.sortState.length !== 0) {\n ({ order, field } = table.sortState?.[0]);\n }\n } else {\n ({ order, field } = table.sortState as SortState);\n }\n // 根据sort规则进行排序\n if (order && field && order !== 'normal') {\n const sortFunc = table._getSortFuncFromHeaderOption(undefined, field);\n // 如果sort传入的信息不能生成正确的sortFunc,直接更新表格,避免首次加载无法正常显示内容\n const hd = table.internalProps.layoutMap.headerObjects.find((col: any) => col && col.field === field);\n\n // hd?.define?.sort && //如果这里也判断 那想要利用sortState来排序 但不显示排序图标就实现不了\n table.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);\n }\n }\n}\n\n/**\n * 添加数据 单条数据\n * @param record 数据\n * @param recordIndex 向数据源中要插入的位置,从0开始。不设置recordIndex的话 默认追加到最后。\n * 如果设置了排序规则recordIndex无效,会自动适应排序逻辑确定插入顺序。\n * recordIndex 可以通过接口getRecordShowIndexByCell获取\n */\nexport function listTableAddRecord(record: any, recordIndex: number, table: ListTable) {\n if (table.options.groupBy) {\n (table.dataSource as CachedDataSource).addRecordsForGroup?.([record]);\n table.refreshRowColCount();\n table.internalProps.layoutMap.clearCellRangeMap();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else if (table.sortState) {\n table.dataSource.addRecordForSorted(record);\n sortRecords(table);\n table.refreshRowColCount();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n if (recordIndex === undefined || recordIndex > table.dataSource.sourceLength) {\n recordIndex = table.dataSource.sourceLength;\n }\n const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;\n table.dataSource.addRecord(record, recordIndex);\n const oldRowCount = table.rowCount;\n table.refreshRowColCount();\n if (table.scenegraph.proxy.totalActualBodyRowCount === 0) {\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n return;\n }\n const newRowCount = table.transpose ? table.colCount : table.rowCount;\n if (table.pagination) {\n const { perPageCount, currentPage } = table.pagination;\n const startIndex = perPageCount * (currentPage || 0);\n const endIndex = startIndex + perPageCount;\n if (recordIndex < endIndex) {\n //插入当前页或者前面的数据才需要更新 如果是插入的是当前页后面的数据不需要更新场景树\n if (recordIndex < endIndex - perPageCount) {\n // 如果是当页之前的数据 则整个场景树都更新\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n //如果是插入当前页数据\n const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;\n if (oldRowCount - headerCount === table.pagination.perPageCount) {\n //如果当页数据是满的 则更新插入的部分行\n const updateRows = [];\n for (let row = rowNum; row < newRowCount; row++) {\n if (table.transpose) {\n updateRows.push({ col: row, row: 0 });\n } else {\n updateRows.push({ col: 0, row });\n }\n }\n table.transpose\n ? table.scenegraph.updateCol([], [], updateRows)\n : table.scenegraph.updateRow([], [], updateRows);\n } else {\n //如果当页数据不是满的 则插入新数据\n const addRows = [];\n for (let row = rowNum; row < Math.min(newRowCount, rowNum + 1); row++) {\n if (table.transpose) {\n addRows.push({ col: row, row: 0 });\n } else {\n addRows.push({ col: 0, row });\n }\n }\n table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);\n }\n }\n }\n } else {\n const addRows = [];\n for (let row = recordIndex + headerCount; row < recordIndex + headerCount + 1; row++) {\n if (table.transpose) {\n addRows.push({ col: row, row: 0 });\n } else {\n addRows.push({ col: 0, row });\n }\n }\n table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);\n }\n }\n // table.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, { row });\n}\n\n/**\n * 添加数据 支持多条数据\n * @param records 多条数据\n * @param recordIndex 向数据源中要插入的位置,从0开始。不设置recordIndex的话 默认追加到最后。\n * 如果设置了排序规则recordIndex无效,会自动适应排序逻辑确定插入顺序。\n * recordIndex 可以通过接口getRecordShowIndexByCell获取\n */\nexport function listTableAddRecords(records: any[], recordIndex: number, table: ListTable) {\n if (table.options.groupBy) {\n (table.dataSource as CachedDataSource).addRecordsForGroup?.(records);\n table.refreshRowColCount();\n table.internalProps.layoutMap.clearCellRangeMap();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else if (table.sortState) {\n table.dataSource.addRecordsForSorted(records);\n sortRecords(table);\n table.refreshRowColCount();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n if (recordIndex === undefined || recordIndex > table.dataSource.sourceLength) {\n recordIndex = table.dataSource.sourceLength;\n } else if (recordIndex < 0) {\n recordIndex = 0;\n }\n const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;\n table.dataSource.addRecords(records, recordIndex);\n const oldRowCount = table.transpose ? table.colCount : table.rowCount;\n table.refreshRowColCount();\n if (table.scenegraph.proxy.totalActualBodyRowCount === 0) {\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n return;\n }\n const newRowCount = table.transpose ? table.colCount : table.rowCount;\n if (table.pagination) {\n const { perPageCount, currentPage } = table.pagination;\n const startIndex = perPageCount * (currentPage || 0);\n const endIndex = startIndex + perPageCount;\n if (recordIndex < endIndex) {\n //插入当前页或者前面的数据才需要更新 如果是插入的是当前页后面的数据不需要更新场景树\n if (recordIndex < endIndex - perPageCount) {\n // 如果是当页之前的数据 则整个场景树都更新\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n //如果是插入当前页数据\n\n const rowNum = recordIndex - (endIndex - perPageCount) + headerCount;\n if (oldRowCount - headerCount === table.pagination.perPageCount) {\n //如果当页数据是满的 则更新插入的部分行\n const updateRows = [];\n for (let row = rowNum; row < newRowCount; row++) {\n if (table.transpose) {\n updateRows.push({ col: row, row: 0 });\n } else {\n updateRows.push({ col: 0, row });\n }\n }\n table.transpose\n ? table.scenegraph.updateCol([], [], updateRows)\n : table.scenegraph.updateRow([], [], updateRows);\n } else {\n //如果当页数据不是满的 则插入新数据\n const addRows = [];\n for (\n let row = rowNum;\n row < Math.min(newRowCount, rowNum + (Array.isArray(records) ? records.length : 1));\n row++\n ) {\n if (table.transpose) {\n addRows.push({ col: row, row: 0 });\n } else {\n addRows.push({ col: 0, row });\n }\n }\n table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);\n }\n }\n }\n } else {\n const addRows = [];\n for (\n let row = recordIndex + headerCount;\n row < recordIndex + headerCount + (Array.isArray(records) ? records.length : 1);\n row++\n ) {\n if (table.transpose) {\n addRows.push({ col: row, row: 0 });\n } else {\n addRows.push({ col: 0, row });\n }\n }\n table.transpose ? table.scenegraph.updateCol([], addRows, []) : table.scenegraph.updateRow([], addRows, []);\n }\n }\n // table.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, { row });\n}\n\n/**\n * 删除数据 支持多条数据\n * @param recordIndexs 要删除数据的索引(显示在body中的索引,即要修改的是body部分的第几行数据)\n */\nexport function listTableDeleteRecords(recordIndexs: number[], table: ListTable) {\n if (recordIndexs?.length > 0) {\n if (table.options.groupBy) {\n (table.dataSource as CachedDataSource).deleteRecordsForGroup?.(recordIndexs);\n table.refreshRowColCount();\n table.internalProps.layoutMap.clearCellRangeMap();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else if (table.sortState) {\n table.dataSource.deleteRecordsForSorted(recordIndexs);\n sortRecords(table);\n table.refreshRowColCount();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);\n if (deletedRecordIndexs.length === 0) {\n return;\n }\n const oldRowCount = table.transpose ? table.colCount : table.rowCount;\n table.refreshRowColCount();\n const newRowCount = table.transpose ? table.colCount : table.rowCount;\n const recordIndexsMinToMax = deletedRecordIndexs.sort((a, b) => a - b);\n const minRecordIndex = recordIndexsMinToMax[0];\n if (table.pagination) {\n const { perPageCount, currentPage } = table.pagination;\n const startIndex = perPageCount * (currentPage || 0);\n const endIndex = startIndex + perPageCount;\n if (minRecordIndex < endIndex) {\n //删除当前页或者前面的数据才需要更新 如果是删除的是当前页后面的数据不需要更新场景树\n if (minRecordIndex < endIndex - perPageCount) {\n // 如果删除包含当页之前的数据 则整个场景树都更新\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n //如果是仅删除当前页数据\n const minRowNum =\n minRecordIndex -\n (endIndex - perPageCount) +\n (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);\n //如果当页数据是满的 则更新影响的部分行\n const updateRows = [];\n const delRows = [];\n\n for (let row = minRowNum; row < newRowCount; row++) {\n if (table.transpose) {\n updateRows.push({ col: row, row: 0 });\n } else {\n updateRows.push({ col: 0, row });\n }\n }\n if (newRowCount < oldRowCount) {\n //如果如果删除后不满 需要有删除数据\n for (let row = newRowCount; row < oldRowCount; row++) {\n if (table.transpose) {\n delRows.push({ col: row, row: 0 });\n } else {\n delRows.push({ col: 0, row });\n }\n }\n }\n table.transpose\n ? table.scenegraph.updateCol(delRows, [], updateRows)\n : table.scenegraph.updateRow(delRows, [], updateRows);\n }\n }\n } else {\n const delRows = [];\n\n for (let index = 0; index < recordIndexsMinToMax.length; index++) {\n const recordIndex = recordIndexsMinToMax[index];\n const rowNum = recordIndex + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);\n if (table.transpose) {\n delRows.push({ col: rowNum, row: 0 });\n } else {\n delRows.push({ col: 0, row: rowNum });\n }\n }\n table.transpose ? table.scenegraph.updateCol(delRows, [], []) : table.scenegraph.updateRow(delRows, [], []);\n }\n }\n // table.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, { row });\n }\n}\n\n/**\n * 修改数据 支持多条数据\n * @param records 修改数据条目\n * @param recordIndexs 对应修改数据的索引(显示在body中的索引,即要修改的是body部分的第几行数据)\n */\nexport function listTableUpdateRecords(records: any[], recordIndexs: number[], table: ListTable) {\n if (recordIndexs?.length > 0) {\n if (table.options.groupBy) {\n (table.dataSource as CachedDataSource).updateRecordsForGroup?.(records, recordIndexs);\n table.refreshRowColCount();\n table.internalProps.layoutMap.clearCellRangeMap();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else if (table.sortState) {\n table.dataSource.updateRecordsForSorted(records, recordIndexs);\n sortRecords(table);\n table.refreshRowColCount();\n // 更新整个场景树\n table.scenegraph.clearCells();\n table.scenegraph.createSceneGraph();\n } else {\n const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);\n if (updateRecordIndexs.length === 0) {\n return;\n }\n\n const recordIndexsMinToMax = updateRecordIndexs.sort((a, b) => a - b);\n if (table.pagination) {\n const { perPageCount, currentPage } = table.pagination;\n const startIndex = perPageCount * (currentPage || 0);\n const endIndex = startIndex + perPageCount;\n const updateRows = [];\n for (let index = 0; index < recordIndexsMinToMax.length; index++) {\n const recordIndex = recordIndexsMinToMax[index];\n if (recordIndex < endIndex && recordIndex >= endIndex - perPageCount) {\n const rowNum =\n recordIndex -\n (endIndex - perPageCount) +\n (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);\n updateRows.push(rowNum);\n }\n }\n if (updateRows.length >= 1) {\n const updateRowCells = [];\n for (let index = 0; index < updateRows.length; index++) {\n const updateRow = updateRows[index];\n if (table.transpose) {\n updateRowCells.push({ col: updateRow, row: 0 });\n } else {\n updateRowCells.push({ col: 0, row: updateRow });\n }\n }\n table.transpose\n ? table.scenegraph.updateCol([], [], updateRowCells)\n : table.scenegraph.updateRow([], [], updateRowCells);\n }\n } else {\n const updateRows = [];\n for (let index = 0; index < recordIndexsMinToMax.length; index++) {\n const recordIndex = recordIndexsMinToMax[index];\n const rowNum = recordIndex + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);\n if (table.transpose) {\n updateRows.push({ col: rowNum, row: 0 });\n } else {\n updateRows.push({ col: 0, row: rowNum });\n }\n }\n table.transpose\n ? table.scenegraph.updateCol([], [], updateRows)\n : table.scenegraph.updateRow([], [], updateRows);\n }\n }\n // table.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, { row });\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
- import type { BaseTableAPI } from '../ts-types/base-table';
2
- import type { FullExtendStyle } from '../ts-types';
3
- export declare function getCellStyle(col: number, row: number, table: BaseTableAPI): FullExtendStyle;
@@ -1,110 +0,0 @@
1
- "use strict";
2
-
3
- var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
4
- void 0 === k2 && (k2 = k);
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
7
- enumerable: !0,
8
- get: function() {
9
- return m[k];
10
- }
11
- }), Object.defineProperty(o, k2, desc);
12
- } : function(o, m, k, k2) {
13
- void 0 === k2 && (k2 = k), o[k2] = m[k];
14
- }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) {
15
- Object.defineProperty(o, "default", {
16
- enumerable: !0,
17
- value: v
18
- });
19
- } : function(o, v) {
20
- o.default = v;
21
- }), __importStar = this && this.__importStar || function(mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (null != mod) for (var k in mod) "default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k);
25
- return __setModuleDefault(result, mod), result;
26
- };
27
-
28
- Object.defineProperty(exports, "__esModule", {
29
- value: !0
30
- }), exports.getCellStyle = void 0;
31
-
32
- const custom_cell_style_1 = require("../plugins/custom-cell-style"), get_axis_config_1 = require("../layout/chart-helper/get-axis-config"), vutils_1 = require("@visactor/vutils"), headerStyleContents = __importStar(require("../header-helper/style")), columnStyleContents = __importStar(require("../body-helper/style")), EMPTY_STYLE = {};
33
-
34
- function getCellStyle(col, row, table) {
35
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
36
- const customCellStyle = table.customCellStylePlugin.getCustomCellStyle(col, row), {layoutMap: layoutMap} = table.internalProps;
37
- if (layoutMap.isHeader(col, row)) {
38
- let cacheKey;
39
- if (!table.isPivotTable() || table.isBottomFrozenRow(row) || table.isRightFrozenColumn(col)) cacheKey = `${col}-${row}`; else {
40
- const define = table.getHeaderDefine(col, row), isCorner = table.isCornerHeader(col, row);
41
- cacheKey = (null == define ? void 0 : define.dimensionKey) ? isCorner ? `dim-cor-${define.dimensionKey}` : `dim-${define.dimensionKey}` : (null == define ? void 0 : define.indicatorKey) ? `ind-${define.indicatorKey}` : `${col}-${row}`;
42
- }
43
- let cacheStyle = table.headerStyleCache.get(cacheKey);
44
- if (cacheStyle) return customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
45
- const hd = layoutMap.getHeader(col, row);
46
- let paddingForAxis;
47
- if (table.isPivotChart() && (0, get_axis_config_1.isTopOrBottomAxis)(col, row, layoutMap) && layoutMap.isAxisCell(col, row)) {
48
- paddingForAxis = null !== (_b = null === (_a = layoutMap.getBody(col, table.rowHeaderLevelCount).style) || void 0 === _a ? void 0 : _a.padding) && void 0 !== _b ? _b : table.theme.bodyStyle.padding;
49
- } else if (table.isPivotChart() && (0, get_axis_config_1.isLeftOrRightAxis)(col, row, layoutMap) && layoutMap.isAxisCell(col, row)) {
50
- paddingForAxis = null !== (_d = null === (_c = layoutMap.getBody(table.columnHeaderLevelCount, row).style) || void 0 === _c ? void 0 : _c.padding) && void 0 !== _d ? _d : table.theme.bodyStyle.padding;
51
- }
52
- if ((!hd || hd.isEmpty) && (layoutMap.isLeftBottomCorner(col, row) || layoutMap.isRightBottomCorner(col, row) || layoutMap.isCornerHeader(col, row) || layoutMap.isRightTopCorner(col, row))) return EMPTY_STYLE;
53
- const styleClass = table.internalProps.headerHelper.getStyleClass((null == hd ? void 0 : hd.headerType) || "text");
54
- if (layoutMap.isBottomFrozenRow(col, row) && table.theme.bottomFrozenStyle) cacheStyle = headerStyleContents.of(paddingForAxis ? {
55
- padding: paddingForAxis
56
- } : {}, table.theme.bottomFrozenStyle, {
57
- col: col,
58
- row: row,
59
- table: table,
60
- value: table.getCellValue(col, row),
61
- dataValue: table.getCellOriginValue(col, row),
62
- cellHeaderPaths: table.getCellHeaderPaths(col, row)
63
- }, styleClass, table.options.autoWrapText, table.theme); else if (layoutMap.isRightFrozenColumn(col, row) && table.theme.rightFrozenStyle) cacheStyle = headerStyleContents.of(paddingForAxis ? {
64
- padding: paddingForAxis
65
- } : {}, table.theme.rightFrozenStyle, {
66
- col: col,
67
- row: row,
68
- table: table,
69
- value: table.getCellValue(col, row),
70
- dataValue: table.getCellOriginValue(col, row),
71
- cellHeaderPaths: table.getCellHeaderPaths(col, row)
72
- }, styleClass, table.options.autoWrapText, table.theme); else {
73
- const style = (null == hd ? void 0 : hd.style) || {};
74
- paddingForAxis && (style.padding = paddingForAxis), cacheStyle = headerStyleContents.of(style, layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row) ? table.theme.headerStyle : layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row) ? table.theme.rowHeaderStyle : table.theme.cornerHeaderStyle, {
75
- col: col,
76
- row: row,
77
- table: table,
78
- value: table.getCellValue(col, row),
79
- dataValue: table.getCellOriginValue(col, row),
80
- cellHeaderPaths: table.getCellHeaderPaths(col, row)
81
- }, styleClass, table.options.autoWrapText, table.theme);
82
- }
83
- return table.headerStyleCache.set(cacheKey, cacheStyle), customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
84
- }
85
- let bgColorFunc, cacheKey;
86
- (null === (_f = null === (_e = table.internalProps) || void 0 === _e ? void 0 : _e.dataConfig) || void 0 === _f ? void 0 : _f.mappingRules) && !table.isHeader(col, row) && (null === (_j = null === (_h = null === (_g = table.internalProps) || void 0 === _g ? void 0 : _g.dataConfig) || void 0 === _h ? void 0 : _h.mappingRules) || void 0 === _j || _j.forEach(((mappingRule, i) => {
87
- mappingRule.bgColor && table.internalProps.layoutMap.getIndicatorKey(col, row) === mappingRule.bgColor.indicatorKey && (bgColorFunc = mappingRule.bgColor.mapping);
88
- })));
89
- const cellType = table.getCellType(col, row), rawRecord = table.getCellOriginRecord(col, row);
90
- let cacheStyle;
91
- if (cacheKey = (null == rawRecord ? void 0 : rawRecord.vTableMerge) ? "merge-title" : table.isSeriesNumberInBody(col, row) ? `${col}-series-` + cellType : table.isListTable() && !table.transpose || table.isPivotTable() && table.internalProps.layoutMap.indicatorsAsCol ? col + cellType : row + cellType,
92
- cacheStyle = (null == rawRecord ? void 0 : rawRecord.vTableMerge) ? table.bodyMergeTitleCache.get(cacheKey) : layoutMap.isBottomFrozenRow(row) ? table.bodyBottomStyleCache.get(cacheKey) : table.bodyStyleCache.get(cacheKey),
93
- cacheStyle) return customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
94
- const column = layoutMap.getBody(col, row), styleClass = table.internalProps.bodyHelper.getStyleClass(table.getCellType(col, row)), style = null == column ? void 0 : column.style;
95
- return cacheStyle = columnStyleContents.of(style, (null == rawRecord ? void 0 : rawRecord.vTableMerge) && table.theme.groupTitleStyle ? table.theme.groupTitleStyle : layoutMap.isBottomFrozenRow(row) && table.theme.bottomFrozenStyle ? table.theme.bottomFrozenStyle : layoutMap.isRightFrozenColumn(col) && table.theme.rightFrozenStyle ? table.theme.rightFrozenStyle : table.theme.bodyStyle, {
96
- col: col,
97
- row: row,
98
- table: table,
99
- value: table.getCellValue(col, row),
100
- dataValue: table.getCellOriginValue(col, row),
101
- cellHeaderPaths: table.getCellHeaderPaths(col, row)
102
- }, styleClass, table.options.autoWrapText, table.theme), bgColorFunc && (cacheStyle = (0,
103
- custom_cell_style_1.mergeStyle)(cacheStyle, {
104
- bgColor: bgColorFunc
105
- })), (0, vutils_1.isFunction)(style) || (layoutMap.isBottomFrozenRow(row) ? table.bodyBottomStyleCache.set(cacheKey, cacheStyle) : table.bodyStyleCache.set(cacheKey, cacheStyle)),
106
- customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
107
- }
108
-
109
- exports.getCellStyle = getCellStyle;
110
- //# sourceMappingURL=style-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/core/style-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;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AI,eAAe,EAAE;QACnB,OAAO,IAAA,8BAAU,EAAC,UAAiB,EAAE,eAAe,CAAC,CAAC;KACvD;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAxOD,oCAwOC","file":"style-helper.js","sourcesContent":["import { mergeStyle } from '../plugins/custom-cell-style';\nimport type { PivotHeaderLayoutMap } from '../layout/pivot-header-layout';\nimport { isLeftOrRightAxis, isTopOrBottomAxis } from '../layout/chart-helper/get-axis-config';\nimport { isFunction } from '@visactor/vutils';\nimport * as headerStyleContents from '../header-helper/style';\nimport * as columnStyleContents from '../body-helper/style';\nimport type { BaseTableAPI, HeaderData, PivotTableProtected } from '../ts-types/base-table';\nimport type { ColorPropertyDefine, FullExtendStyle, MappingRule } from '../ts-types';\n\nconst EMPTY_STYLE = {};\n\n/**\n * 获取单元格的样式 内部逻辑使用 获取到的样式并不是计算后的\n * @param col\n * @param row\n * @returns\n */\nexport function getCellStyle(col: number, row: number, table: BaseTableAPI): FullExtendStyle {\n const customCellStyle = table.customCellStylePlugin.getCustomCellStyle(col, row);\n const { layoutMap } = table.internalProps;\n const isHeader = layoutMap.isHeader(col, row);\n if (isHeader) {\n // const cacheKey = `${col}-${row}`;\n let cacheKey;\n if (table.isPivotTable() && !table.isBottomFrozenRow(row) && !table.isRightFrozenColumn(col)) {\n // use dimensionKey&indicatorKey to cache style object in pivot table\n const define = table.getHeaderDefine(col, row) as any;\n const isCorner = table.isCornerHeader(col, row);\n cacheKey = define?.dimensionKey\n ? isCorner\n ? `dim-cor-${define.dimensionKey}`\n : `dim-${define.dimensionKey}`\n : define?.indicatorKey\n ? `ind-${define.indicatorKey}`\n : `${col}-${row}`;\n } else {\n cacheKey = `${col}-${row}`;\n }\n let cacheStyle = table.headerStyleCache.get(cacheKey);\n if (cacheStyle) {\n if (customCellStyle) {\n return mergeStyle(cacheStyle, customCellStyle);\n }\n return cacheStyle;\n }\n const hd = layoutMap.getHeader(col, row);\n\n let paddingForAxis;\n if (\n table.isPivotChart() &&\n isTopOrBottomAxis(col, row, layoutMap as PivotHeaderLayoutMap) &&\n layoutMap.isAxisCell(col, row)\n ) {\n // get chart padding for axis cell\n const chartColumn = layoutMap.getBody(col, table.rowHeaderLevelCount);\n const padding = (chartColumn.style as any)?.padding ?? table.theme.bodyStyle.padding;\n paddingForAxis = padding;\n } else if (\n table.isPivotChart() &&\n isLeftOrRightAxis(col, row, layoutMap as PivotHeaderLayoutMap) &&\n layoutMap.isAxisCell(col, row)\n ) {\n // get chart padding for axis cell\n const chartColumn = layoutMap.getBody(table.columnHeaderLevelCount, row);\n const padding = (chartColumn.style as any)?.padding ?? table.theme.bodyStyle.padding;\n paddingForAxis = padding;\n }\n\n if (\n (!hd || (hd as HeaderData).isEmpty) &&\n (layoutMap.isLeftBottomCorner(col, row) ||\n layoutMap.isRightBottomCorner(col, row) ||\n layoutMap.isCornerHeader(col, row) ||\n layoutMap.isRightTopCorner(col, row))\n ) {\n return EMPTY_STYLE;\n }\n\n const styleClass = table.internalProps.headerHelper.getStyleClass((hd as HeaderData)?.headerType || 'text');\n if (layoutMap.isBottomFrozenRow(col, row) && table.theme.bottomFrozenStyle) {\n cacheStyle = <FullExtendStyle>headerStyleContents.of(\n paddingForAxis ? { padding: paddingForAxis } : {},\n table.theme.bottomFrozenStyle,\n {\n col,\n row,\n table: table as BaseTableAPI,\n value: table.getCellValue(col, row),\n dataValue: table.getCellOriginValue(col, row),\n cellHeaderPaths: table.getCellHeaderPaths(col, row)\n },\n styleClass,\n table.options.autoWrapText,\n table.theme\n );\n } else if (layoutMap.isRightFrozenColumn(col, row) && table.theme.rightFrozenStyle) {\n cacheStyle = <FullExtendStyle>headerStyleContents.of(\n paddingForAxis ? { padding: paddingForAxis } : {},\n table.theme.rightFrozenStyle,\n {\n col,\n row,\n table: table as BaseTableAPI,\n value: table.getCellValue(col, row),\n dataValue: table.getCellOriginValue(col, row),\n cellHeaderPaths: table.getCellHeaderPaths(col, row)\n },\n styleClass,\n table.options.autoWrapText,\n table.theme\n );\n } else {\n // let defaultStyle;\n // if (layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)) {\n // defaultStyle = table.theme.headerStyle;\n // } else if (table.internalProps.transpose && layoutMap.isRowHeader(col, row)) {\n // defaultStyle = table.theme.headerStyle;\n // } else if (layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)) {\n // defaultStyle = table.theme.rowHeaderStyle;\n // } else {\n // defaultStyle = table.theme.cornerHeaderStyle;\n // }\n // const styleClass = hd.headerType.StyleClass; //BaseHeader文件\n // const { style } = hd;\n const style = hd?.style || {};\n if (paddingForAxis) {\n (style as any).padding = paddingForAxis;\n }\n cacheStyle = <FullExtendStyle>headerStyleContents.of(\n style,\n // defaultStyle,\n layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)\n ? table.theme.headerStyle\n : layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)\n ? table.theme.rowHeaderStyle\n : table.theme.cornerHeaderStyle,\n {\n col,\n row,\n table: table as BaseTableAPI,\n value: table.getCellValue(col, row),\n dataValue: table.getCellOriginValue(col, row),\n cellHeaderPaths: table.getCellHeaderPaths(col, row)\n },\n styleClass,\n table.options.autoWrapText,\n table.theme\n );\n }\n table.headerStyleCache.set(cacheKey, cacheStyle);\n if (customCellStyle) {\n return mergeStyle(cacheStyle, customCellStyle);\n }\n return cacheStyle;\n }\n\n let bgColorFunc: ColorPropertyDefine;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (\n mappingRule.bgColor &&\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n mappingRule.bgColor.indicatorKey\n ) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n // // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n // if (bgColorFunc && typeof bgColorFunc === 'function') {\n // const cellValue = table.getCellOriginValue(col, row);\n // bgColor = bgColorFunc(this, cellValue);\n // }\n }\n\n let cacheKey;\n const cellType = table.getCellType(col, row);\n const rawRecord = table.getCellOriginRecord(col, row);\n\n //如果是主体部分,获取相应的style\n if (rawRecord?.vTableMerge) {\n cacheKey = 'merge-title';\n } else if (table.isSeriesNumberInBody(col, row)) {\n // 如果是行序号\n cacheKey = `${col}-series-` + cellType;\n } else if (\n (table.isListTable() && !(table as any).transpose) ||\n (table.isPivotTable() && (table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol)\n ) {\n cacheKey = col + cellType;\n } else {\n cacheKey = row + cellType;\n }\n let cacheStyle;\n\n if (rawRecord?.vTableMerge) {\n cacheStyle = table.bodyMergeTitleCache.get(cacheKey);\n } else if (layoutMap.isBottomFrozenRow(row)) {\n cacheStyle = table.bodyBottomStyleCache.get(cacheKey);\n } else {\n cacheStyle = table.bodyStyleCache.get(cacheKey);\n }\n if (cacheStyle) {\n if (customCellStyle) {\n return mergeStyle(cacheStyle, customCellStyle);\n }\n return cacheStyle;\n }\n const column = layoutMap.getBody(col, row);\n // const styleClass = column?.cellType?.StyleClass; //BaseColumn文件\n const styleClass = table.internalProps.bodyHelper.getStyleClass(table.getCellType(col, row));\n const style = column?.style;\n cacheStyle = <FullExtendStyle>columnStyleContents.of(\n style,\n rawRecord?.vTableMerge && table.theme.groupTitleStyle\n ? table.theme.groupTitleStyle\n : layoutMap.isBottomFrozenRow(row) && table.theme.bottomFrozenStyle\n ? table.theme.bottomFrozenStyle\n : layoutMap.isRightFrozenColumn(col) && table.theme.rightFrozenStyle\n ? table.theme.rightFrozenStyle\n : table.theme.bodyStyle,\n {\n col,\n row,\n table: table,\n value: table.getCellValue(col, row),\n dataValue: table.getCellOriginValue(col, row),\n cellHeaderPaths: table.getCellHeaderPaths(col, row)\n },\n styleClass,\n table.options.autoWrapText,\n table.theme\n );\n if (bgColorFunc) {\n cacheStyle = mergeStyle(cacheStyle as any, { bgColor: bgColorFunc });\n }\n if (!isFunction(style)) {\n if (layoutMap.isBottomFrozenRow(row)) {\n table.bodyBottomStyleCache.set(cacheKey, cacheStyle);\n } else {\n table.bodyStyleCache.set(cacheKey, cacheStyle);\n }\n }\n if (customCellStyle) {\n return mergeStyle(cacheStyle as any, customCellStyle);\n }\n return cacheStyle;\n}\n"]}
@@ -1,4 +0,0 @@
1
- import type { CellRange } from '../../ts-types';
2
- import type { SimpleHeaderLayoutMap } from '../simple-header-layout';
3
- export declare function getCellRange(col: number, row: number, layout: SimpleHeaderLayoutMap): CellRange;
4
- export declare function getCellRangeTranspose(col: number, row: number, layout: SimpleHeaderLayoutMap): CellRange;
@@ -1,106 +0,0 @@
1
- "use strict";
2
-
3
- function getCellRange(col, row, layout) {
4
- var _a, _b, _c;
5
- if (-1 === col || -1 === row) return {
6
- start: {
7
- col: col,
8
- row: row
9
- },
10
- end: {
11
- col: col,
12
- row: row
13
- }
14
- };
15
- if (layout._cellRangeMap.has(`$${col}$${row}`)) return layout._cellRangeMap.get(`$${col}$${row}`);
16
- let cellRange = {
17
- start: {
18
- col: col,
19
- row: row
20
- },
21
- end: {
22
- col: col,
23
- row: row
24
- }
25
- };
26
- if (layout.transpose) cellRange = getCellRangeTranspose(col, row, layout); else if (layout.headerLevelCount <= row) {
27
- if (layout.headerLevelCount <= row && (null === (_b = null === (_a = layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount]) || void 0 === _a ? void 0 : _a.define) || void 0 === _b ? void 0 : _b.mergeCell)) {
28
- const value = layout._table.getCellValue(col, row);
29
- for (let r = row - 1; r >= layout.headerLevelCount; r--) {
30
- const last_Value = layout._table.getCellValue(col, r);
31
- if ("boolean" == typeof layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell) {
32
- if (value !== last_Value) break;
33
- } else if (!layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell(value, last_Value)) break;
34
- cellRange.start.row = r;
35
- }
36
- for (let r = row + 1; r < layout.rowCount; r++) {
37
- const next_Value = layout._table.getCellValue(col, r);
38
- if ("boolean" == typeof layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell) {
39
- if (value !== next_Value) break;
40
- } else if (!layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell(value, next_Value)) break;
41
- cellRange.end.row = r;
42
- }
43
- }
44
- getTreeTitleMerge(col, row, cellRange, layout);
45
- } else {
46
- const id = layout.getCellId(col, row);
47
- for (let c = col - 1; c >= 0 && id === layout.getCellId(c, row); c--) cellRange.start.col = c;
48
- for (let c = col + 1; c < (null !== (_c = layout.colCount) && void 0 !== _c ? _c : 0) && id === layout.getCellId(c, row); c++) cellRange.end.col = c;
49
- for (let r = row - 1; r >= 0 && id === layout.getCellId(col, r); r--) cellRange.start.row = r;
50
- for (let r = row + 1; r < layout.headerLevelCount && id === layout.getCellId(col, r); r++) cellRange.end.row = r;
51
- }
52
- return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
53
- }
54
-
55
- function getTreeTitleMerge(col, row, cellRange, layout) {
56
- if ("tree" !== layout.rowHierarchyType) return;
57
- const cellRecord = layout._table.getCellRawRecord(col, row);
58
- (null == cellRecord ? void 0 : cellRecord.vTableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount,
59
- cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
60
- }
61
-
62
- function getCellRangeTranspose(col, row, layout) {
63
- var _a, _b, _c, _d;
64
- const result = {
65
- start: {
66
- col: col,
67
- row: row
68
- },
69
- end: {
70
- col: col,
71
- row: row
72
- }
73
- };
74
- if (layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount <= col || -1 === col && -1 === row) {
75
- if (layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount <= col && (null === (_b = null === (_a = layout.columnObjects[row]) || void 0 === _a ? void 0 : _a.define) || void 0 === _b ? void 0 : _b.mergeCell)) {
76
- const value = layout._table.getCellValue(col, row);
77
- for (let c = col - 1; c >= layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount; c--) {
78
- const last_Value = layout._table.getCellValue(c, row);
79
- if ("boolean" == typeof layout.columnObjects[row].define.mergeCell) {
80
- if (value !== last_Value) break;
81
- } else if (!layout.columnObjects[row].define.mergeCell(value, last_Value)) break;
82
- result.start.col = c;
83
- }
84
- for (let c = col + 1; c < (null !== (_c = layout.colCount) && void 0 !== _c ? _c : 0); c++) {
85
- const next_Value = layout._table.getCellValue(c, row);
86
- if ("boolean" == typeof layout.columnObjects[row].define.mergeCell) {
87
- if (value !== next_Value) break;
88
- } else if (!layout.columnObjects[row].define.mergeCell(value, next_Value)) break;
89
- result.end.col = c;
90
- }
91
- }
92
- return result;
93
- }
94
- const id = layout.getCellId(col, row);
95
- for (let r = row - 1; r >= 0 && id === layout.getCellId(col, r); r--) result.start.row = r;
96
- for (let r = row + 1; r < (null !== (_d = layout.rowCount) && void 0 !== _d ? _d : 0) && id === layout.getCellId(col, r); r++) result.end.row = r;
97
- for (let c = col - 1; c >= 0 && id === layout.getCellId(c, row); c--) result.start.col = c;
98
- for (let c = col + 1; c < layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount && id === layout.getCellId(c, row); c++) result.end.col = c;
99
- return result;
100
- }
101
-
102
- Object.defineProperty(exports, "__esModule", {
103
- value: !0
104
- }), exports.getCellRangeTranspose = exports.getCellRange = void 0, exports.getCellRange = getCellRange,
105
- exports.getCellRangeTranspose = getCellRangeTranspose;
106
- //# sourceMappingURL=simple-cell-range.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/layout/cell-range/simple-cell-range.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAAC,GAAW,EAAE,GAAW,EAAE,MAA6B;;IAClF,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE;QAC5B,OAAO;YACL,KAA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,CAAC,GAAG,GAAG,CAAC,CAAC;KACtB;IACD,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAA,MAAM,CAAC,QAAQ,mCAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACrD,IAAI,EAAE,KAAK,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE;YACnC,MAAM;SACP;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;KACpB;IACD,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACjC,IAAI,EAAE,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;YACnC,MAAM;SACP;QACD,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;KACtB;IACD,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,8BAA8B,EAAE,CAAC,EAAE,EAAE;QAC9F,IAAI,EAAE,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;YACnC,MAAM;SACP;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;KACpB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAlED,sDAkEC","file":"simple-cell-range.js","sourcesContent":["import type { CellRange, TextColumnDefine } from '../../ts-types';\nimport type { SimpleHeaderLayoutMap } from '../simple-header-layout';\n\nexport function getCellRange(col: number, row: number, layout: SimpleHeaderLayoutMap): CellRange {\n if (col === -1 || row === -1) {\n return {\n start: { col, row },\n end: { col, row }\n };\n }\n if (layout._cellRangeMap.has(`$${col}$${row}`)) {\n return layout._cellRangeMap.get(`$${col}$${row}`);\n }\n let cellRange: CellRange = { start: { col, row }, end: { col, row } };\n if (layout.transpose) {\n cellRange = getCellRangeTranspose(col, row, layout);\n } else {\n // hover相关的单元格位置是-1,-1,getCellRange计算有误,先进行判断\n if (layout.headerLevelCount <= row) {\n //如果是body部分 设置了需要合并单元格 这里判断上下是否内容相同 相同的话 将cellRange范围扩大\n if (\n layout.headerLevelCount <= row &&\n (layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount]?.define as TextColumnDefine)?.mergeCell\n ) {\n const value = layout._table.getCellValue(col, row);\n for (let r = row - 1; r >= layout.headerLevelCount; r--) {\n const last_Value = layout._table.getCellValue(col, r);\n if (typeof layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell === 'boolean') {\n if (value !== last_Value) {\n break;\n }\n } else {\n if (\n !(layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell as Function)(\n value,\n last_Value\n )\n ) {\n break;\n }\n }\n cellRange.start.row = r;\n }\n for (let r = row + 1; r < layout.rowCount; r++) {\n const next_Value = layout._table.getCellValue(col, r);\n if (typeof layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell === 'boolean') {\n if (value !== next_Value) {\n break;\n }\n } else {\n if (\n !(layout.columnObjects[col - layout.leftRowSeriesNumberColumnCount].define.mergeCell as Function)(\n value,\n next_Value\n )\n ) {\n break;\n }\n }\n cellRange.end.row = r;\n }\n }\n getTreeTitleMerge(col, row, cellRange, layout);\n // return cellRange;\n } else {\n //in header\n const id = layout.getCellId(col, row);\n for (let c = col - 1; c >= 0; c--) {\n if (id !== layout.getCellId(c, row)) {\n break;\n }\n cellRange.start.col = c;\n }\n for (let c = col + 1; c < (layout.colCount ?? 0); c++) {\n if (id !== layout.getCellId(c, row)) {\n break;\n }\n cellRange.end.col = c;\n }\n for (let r = row - 1; r >= 0; r--) {\n if (id !== layout.getCellId(col, r)) {\n break;\n }\n cellRange.start.row = r;\n }\n for (let r = row + 1; r < layout.headerLevelCount; r++) {\n if (id !== layout.getCellId(col, r)) {\n break;\n }\n cellRange.end.row = r;\n }\n // return cellRange;\n }\n }\n layout._cellRangeMap.set(`$${col}$${row}`, cellRange);\n return cellRange;\n}\n\nfunction getTreeTitleMerge(col: number, row: number, cellRange: CellRange, layout: SimpleHeaderLayoutMap) {\n if (layout.rowHierarchyType !== 'tree') {\n return;\n }\n\n const cellRecord = layout._table.getCellRawRecord(col, row);\n if (cellRecord?.vTableMerge) {\n // const vTableMergeName = cellRecord.vtableMergeName;\n cellRange.start.col = layout.rowHeaderLevelCount;\n cellRange.end.col = layout.colCount - 1;\n cellRange.start.row = cellRange.end.row = row;\n }\n}\n\nexport function getCellRangeTranspose(col: number, row: number, layout: SimpleHeaderLayoutMap): CellRange {\n const result: CellRange = { start: { col, row }, end: { col, row } };\n // hover相关的单元格位置是-1,-1,getCellRange计算有误,先进行判断\n if (layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount <= col || (col === -1 && row === -1)) {\n //如果是body部分 设置了需要合并单元格 这里判断左右是否内容相同 相同的话 将cellRange范围扩大\n if (\n layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount <= col &&\n layout.columnObjects[row]?.define?.mergeCell\n ) {\n const value = layout._table.getCellValue(col, row);\n for (let c = col - 1; c >= layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount; c--) {\n const last_Value = layout._table.getCellValue(c, row);\n if (typeof layout.columnObjects[row].define.mergeCell === 'boolean') {\n if (value !== last_Value) {\n break;\n }\n } else {\n if (!(layout.columnObjects[row].define.mergeCell as Function)(value, last_Value)) {\n break;\n }\n }\n result.start.col = c;\n }\n for (let c = col + 1; c < (layout.colCount ?? 0); c++) {\n const next_Value = layout._table.getCellValue(c, row);\n if (typeof layout.columnObjects[row].define.mergeCell === 'boolean') {\n if (value !== next_Value) {\n break;\n }\n } else {\n if (!(layout.columnObjects[row].define.mergeCell as Function)(value, next_Value)) {\n break;\n }\n }\n result.end.col = c;\n }\n }\n return result;\n }\n //in header\n const id = layout.getCellId(col, row);\n for (let r = row - 1; r >= 0; r--) {\n if (id !== layout.getCellId(col, r)) {\n break;\n }\n result.start.row = r;\n }\n for (let r = row + 1; r < (layout.rowCount ?? 0); r++) {\n if (id !== layout.getCellId(col, r)) {\n break;\n }\n result.end.row = r;\n }\n for (let c = col - 1; c >= 0; c--) {\n if (id !== layout.getCellId(c, row)) {\n break;\n }\n result.start.col = c;\n }\n for (let c = col + 1; c < layout.headerLevelCount + layout.leftRowSeriesNumberColumnCount; c++) {\n if (id !== layout.getCellId(c, row)) {\n break;\n }\n result.end.col = c;\n }\n return result;\n}\n"]}
@@ -1,6 +0,0 @@
1
- import type { GroupByOption } from '../ts-types';
2
- export declare function getGroupByDataConfig(groupByOption: GroupByOption): {
3
- groupByRules: string[];
4
- } | {
5
- groupByRules?: undefined;
6
- };
@@ -1,14 +0,0 @@
1
- import { isArray, isString } from "@visactor/vutils";
2
-
3
- export function getGroupByDataConfig(groupByOption) {
4
- if (isString(groupByOption)) return {
5
- groupByRules: [ groupByOption ]
6
- };
7
- if (isArray(groupByOption)) {
8
- return {
9
- groupByRules: groupByOption.map((item => isString(item) ? item : item.key))
10
- };
11
- }
12
- return {};
13
- }
14
- //# sourceMappingURL=group-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/core/group-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGrD,MAAM,UAAU,oBAAoB,CAAC,aAA4B;IAE/D,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE;QAC3B,OAAO,EAAE,YAAY,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;KAC1C;IACD,IAAI,OAAO,CAAC,aAAa,CAAC,EAAE;QAC1B,MAAM,YAAY,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC5C,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAClB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,IAAI,CAAC,GAAG,CAAC;QAClB,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,YAAY,EAAE,CAAC;KACzB;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","file":"group-helper.js","sourcesContent":["import { isArray, isString } from '@visactor/vutils';\nimport type { GroupByOption } from '../ts-types';\n\nexport function getGroupByDataConfig(groupByOption: GroupByOption) {\n // no sort temply\n if (isString(groupByOption)) {\n return { groupByRules: [groupByOption] };\n }\n if (isArray(groupByOption)) {\n const groupByRules = groupByOption.map(item => {\n if (isString(item)) {\n return item;\n }\n return item.key;\n });\n return { groupByRules };\n }\n\n return {};\n}\n"]}