@ai-table/grid 0.1.35 → 0.1.37

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 (50) hide show
  1. package/angular-konva/components/shape.component.d.ts.map +1 -1
  2. package/components/context-menu/context-menu.component.d.ts +0 -2
  3. package/components/context-menu/context-menu.component.d.ts.map +1 -1
  4. package/components/drag/drag.component.d.ts +1 -1
  5. package/components/drag/drag.component.d.ts.map +1 -1
  6. package/components/field-menu/field-menu.component.d.ts +1 -0
  7. package/components/field-menu/field-menu.component.d.ts.map +1 -1
  8. package/components/index.d.ts +1 -0
  9. package/components/index.d.ts.map +1 -1
  10. package/components/menu-checkbox-sort/checkbox-menu-sort.component.d.ts +15 -0
  11. package/components/menu-checkbox-sort/checkbox-menu-sort.component.d.ts.map +1 -0
  12. package/components/menu-checkbox-sort/checkbox-menu-sort.component.scss +25 -0
  13. package/core/coordinate.d.ts +16 -1
  14. package/core/coordinate.d.ts.map +1 -1
  15. package/core/types/ai-table.d.ts +3 -1
  16. package/core/types/ai-table.d.ts.map +1 -1
  17. package/dom-grid.component.d.ts.map +1 -1
  18. package/fesm2022/ai-table-grid.mjs +438 -293
  19. package/fesm2022/ai-table-grid.mjs.map +1 -1
  20. package/grid-base.component.d.ts +1 -3
  21. package/grid-base.component.d.ts.map +1 -1
  22. package/grid.component.d.ts +2 -0
  23. package/grid.component.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/renderer/components/cells/cover-cell-base.d.ts.map +1 -1
  26. package/renderer/components/fill-handle.component.d.ts.map +1 -1
  27. package/renderer/components/frozen-heads.component.d.ts.map +1 -1
  28. package/services/event.service.d.ts +0 -1
  29. package/services/event.service.d.ts.map +1 -1
  30. package/services/index.d.ts +0 -1
  31. package/services/index.d.ts.map +1 -1
  32. package/styles/styles.scss +1 -0
  33. package/types/cell.d.ts +6 -1
  34. package/types/cell.d.ts.map +1 -1
  35. package/types/field.d.ts +2 -0
  36. package/types/field.d.ts.map +1 -1
  37. package/types/grid.d.ts +1 -7
  38. package/types/grid.d.ts.map +1 -1
  39. package/types/row.d.ts +1 -2
  40. package/types/row.d.ts.map +1 -1
  41. package/utils/cell.d.ts +14 -5
  42. package/utils/cell.d.ts.map +1 -1
  43. package/utils/field/field.d.ts +2 -0
  44. package/utils/field/field.d.ts.map +1 -1
  45. package/utils/index.d.ts +1 -0
  46. package/utils/index.d.ts.map +1 -1
  47. package/utils/record.d.ts +4 -0
  48. package/utils/record.d.ts.map +1 -0
  49. package/services/selection.service.d.ts +0 -26
  50. package/services/selection.service.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, input, EventEmitter, inject, ElementRef, effect, Output, ChangeDetectionStrategy, Component, signal, computed, output, Input, ChangeDetectorRef, ViewChild, model, untracked, Renderer2, Pipe, booleanAttribute, Injectable, DestroyRef, NgZone, ViewContainerRef, viewChild, afterNextRender } from '@angular/core';
2
+ import { InjectionToken, input, EventEmitter, inject, ElementRef, effect, Output, ChangeDetectionStrategy, Component, signal, computed, output, Input, ChangeDetectorRef, ViewChild, model, untracked, Renderer2, Pipe, booleanAttribute, DestroyRef, Injectable, NgZone, ViewContainerRef, viewChild, afterNextRender } from '@angular/core';
3
3
  import Konva from 'konva';
4
4
  import { Shape } from 'konva/lib/Shape';
5
5
  import { Sprite } from 'konva/lib/shapes/Sprite';
@@ -25,7 +25,7 @@ import { Transformer } from 'konva/lib/shapes/Transformer';
25
25
  import { Wedge } from 'konva/lib/shapes/Wedge';
26
26
  import * as i1$1 from 'ngx-tethys/popover';
27
27
  import { ThyPopoverRef, ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
28
- import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, isUndefinedOrNull, idCreator as idCreator$1, isUrl, isEmpty, AITableFilterOperation, AttachmentFieldBase, AITableStatType, DateFieldBase, DEFAULT_FIELD_STAT_TYPE_ITEMS, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgressAndReturnValue, RateFieldBase, RichTextFieldBase, SelectFieldBase, AITableSelectOptionStyle, generateOptionsByTexts, TextFieldBase, CheckboxFieldBase, FieldModelBaseMap, numberFormat, DragDirection, AI_TABLE_MIN_FROZEN_COLUMN_COUNT } from '@ai-table/utils';
28
+ import { AITableFieldGroup, AITableFieldType, DragType, AITableRowColumnType, isUndefinedOrNull, idCreator as idCreator$1, isUrl, isEmpty, AITableFilterOperation, AttachmentFieldBase, AITableStatType, DateFieldBase, DEFAULT_FIELD_STAT_TYPE_ITEMS, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgressAndReturnValue, RateFieldBase, RichTextFieldBase, SelectFieldBase, AITableSelectOptionStyle, generateOptionsByTexts, TextFieldBase, CheckboxFieldBase, FieldModelBaseMap, numberFormat, DragDirection, AI_TABLE_MIN_FROZEN_COLUMN_COUNT } from '@ai-table/utils';
29
29
  import ObjectID from 'bson-objectid';
30
30
  import { customAlphabet } from 'nanoid';
31
31
  import * as _ from 'lodash';
@@ -53,7 +53,7 @@ import { isArray, TinyDate, helpers } from 'ngx-tethys/util';
53
53
  import { DEFAULT_COLORS } from 'ngx-tethys/color-picker';
54
54
  import GraphemeSplitter from 'grapheme-splitter';
55
55
  import * as i1$2 from '@angular/common';
56
- import { CommonModule, NgClass, NgTemplateOutlet } from '@angular/common';
56
+ import { CommonModule, NgClass, NgTemplateOutlet, NgComponentOutlet } from '@angular/common';
57
57
  import { ThyDropdownAbstractMenu, ThyDropdownMenuItemDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownMenuItemMetaDirective } from 'ngx-tethys/dropdown';
58
58
  import { ThyEmptyModule } from 'ngx-tethys/empty';
59
59
  import { ThySelect, ThySelectModule } from 'ngx-tethys/select';
@@ -61,12 +61,12 @@ import { ThyDot } from 'ngx-tethys/dot';
61
61
  import { ThyIcon } from 'ngx-tethys/icon';
62
62
  import { ThyTag } from 'ngx-tethys/tag';
63
63
  import { ThySwitch } from 'ngx-tethys/switch';
64
- import { of, Subject, fromEvent, debounceTime, mergeWith, animationFrames, filter } from 'rxjs';
64
+ import { of, Subject, fromEvent, debounceTime, animationFrames, filter } from 'rxjs';
65
65
  import { ThyDivider } from 'ngx-tethys/divider';
66
+ import * as i3$1 from 'ngx-tethys/checkbox';
67
+ import { ThyCheckbox, ThyCheckboxModule } from 'ngx-tethys/checkbox';
66
68
  import * as i4 from 'ngx-tethys/avatar';
67
69
  import { ThyAvatarModule } from 'ngx-tethys/avatar';
68
- import * as i3$1 from 'ngx-tethys/checkbox';
69
- import { ThyCheckboxModule } from 'ngx-tethys/checkbox';
70
70
  import { ThyProgress } from 'ngx-tethys/progress';
71
71
  import { ThyRate } from 'ngx-tethys/rate';
72
72
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -222,6 +222,9 @@ class KoShape {
222
222
  if (this.config()) {
223
223
  this.updateNode(this.config());
224
224
  }
225
+ else {
226
+ this.updateNode({});
227
+ }
225
228
  });
226
229
  }
227
230
  getNode() {
@@ -254,9 +257,6 @@ class KoShape {
254
257
  });
255
258
  }, 200);
256
259
  };
257
- if (this.config()) {
258
- this.updateNode(this.config());
259
- }
260
260
  }
261
261
  updateNode(config) {
262
262
  if (!this._node)
@@ -1003,6 +1003,65 @@ const DEFAULT_TEXT_SCALE = 1;
1003
1003
  const DEFAULT_TEXT_MAX_CACHE = 500;
1004
1004
  const FONT_SIZE_SM = 12;
1005
1005
 
1006
+ const AITable = {
1007
+ getColors() {
1008
+ return Colors;
1009
+ },
1010
+ getVisibleFields(aiTable) {
1011
+ return aiTable.gridData().fields.filter((field) => !field.hidden);
1012
+ },
1013
+ getVisibleRows(aiTable) {
1014
+ return aiTable.records();
1015
+ },
1016
+ getActiveCell(aiTable) {
1017
+ return aiTable.selection().activeCell;
1018
+ },
1019
+ getActiveRecordIds(aiTable) {
1020
+ const selectedRecords = aiTable.selection().selectedRecords;
1021
+ const selectedCells = aiTable.selection().selectedCells;
1022
+ let selectedRecordIds = [];
1023
+ if (selectedRecords.size > 0) {
1024
+ selectedRecordIds = [...selectedRecords.keys()];
1025
+ }
1026
+ else if (selectedCells.size > 0) {
1027
+ selectedRecordIds = [...selectedCells].map((item) => item.split(':')[0]);
1028
+ }
1029
+ else {
1030
+ selectedRecordIds = [];
1031
+ }
1032
+ return selectedRecordIds;
1033
+ },
1034
+ isCellVisible(aiTable, cell) {
1035
+ const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
1036
+ const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
1037
+ const [recordId, fieldId] = cell || [];
1038
+ const isVisible = visibleRowIndexMap.has(recordId) && visibleColumnIndexMap.has(fieldId);
1039
+ return isVisible;
1040
+ },
1041
+ getCellIndex(aiTable, cell) {
1042
+ const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
1043
+ const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
1044
+ if (AITable.isCellVisible(aiTable, cell)) {
1045
+ const [recordId, fieldId] = cell;
1046
+ return {
1047
+ rowIndex: visibleRowIndexMap.get(recordId),
1048
+ columnIndex: visibleColumnIndexMap.get(fieldId)
1049
+ };
1050
+ }
1051
+ return null;
1052
+ },
1053
+ isFrozenColumn(aiTable, columnIndex) {
1054
+ const frozenColumnCount = aiTable.context.frozenColumnCount();
1055
+ if (columnIndex <= frozenColumnCount - 1) {
1056
+ return true;
1057
+ }
1058
+ return false;
1059
+ },
1060
+ getDragState(aiTable) {
1061
+ return aiTable.dragState?.()?.type || DragType.none;
1062
+ }
1063
+ };
1064
+
1006
1065
  /**
1007
1066
  * 用于构建 Canvas 基础坐标系,后续的绘制工作以此为基础
1008
1067
  */
@@ -1222,66 +1281,59 @@ class Coordinate {
1222
1281
  height
1223
1282
  };
1224
1283
  }
1225
- }
1226
-
1227
- const AITable = {
1228
- getColors() {
1229
- return Colors;
1230
- },
1231
- getVisibleFields(aiTable) {
1232
- return aiTable.gridData().fields.filter((field) => !field.hidden);
1233
- },
1234
- getVisibleRows(aiTable) {
1235
- return aiTable.records();
1236
- },
1237
- getActiveCell(aiTable) {
1238
- return aiTable.selection().activeCell;
1239
- },
1240
- getActiveRecordIds(aiTable) {
1241
- const selectedRecords = aiTable.selection().selectedRecords;
1242
- const selectedCells = aiTable.selection().selectedCells;
1243
- let selectedRecordIds = [];
1244
- if (selectedRecords.size > 0) {
1245
- selectedRecordIds = [...selectedRecords.keys()];
1246
- }
1247
- else if (selectedCells.size > 0) {
1248
- selectedRecordIds = [...selectedCells].map((item) => item.split(':')[0]);
1249
- }
1250
- else {
1251
- selectedRecordIds = [];
1252
- }
1253
- return selectedRecordIds;
1254
- },
1255
- isCellVisible(aiTable, cell) {
1256
- const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
1257
- const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
1258
- const [recordId, fieldId] = cell || [];
1259
- const isVisible = visibleRowIndexMap.has(recordId) && visibleColumnIndexMap.has(fieldId);
1260
- return isVisible;
1261
- },
1262
- getCellIndex(aiTable, cell) {
1263
- const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
1264
- const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
1265
- if (AITable.isCellVisible(aiTable, cell)) {
1266
- const [recordId, fieldId] = cell;
1267
- return {
1268
- rowIndex: visibleRowIndexMap.get(recordId),
1269
- columnIndex: visibleColumnIndexMap.get(fieldId)
1270
- };
1271
- }
1272
- return null;
1273
- },
1274
- isFrozenColumn(aiTable, columnIndex) {
1275
- const frozenColumnCount = aiTable.context.frozenColumnCount();
1276
- if (columnIndex <= frozenColumnCount - 1) {
1277
- return true;
1284
+ /**
1285
+ * 判断单元格是否在冻结区域
1286
+ */
1287
+ isCellInFrozen(aiTable, cell) {
1288
+ const cellIndex = AITable.getCellIndex(aiTable, cell);
1289
+ if (!cellIndex) {
1290
+ return false;
1278
1291
  }
1279
- return false;
1280
- },
1281
- getDragState(aiTable) {
1282
- return aiTable.dragState?.()?.type || DragType.none;
1292
+ return cellIndex.columnIndex < this.frozenColumnCount;
1283
1293
  }
1284
- };
1294
+ /**
1295
+ * 获取单元格是否可以完整渲染
1296
+ * 如果可以完整渲染,则返回 { isCellCanFullRender: true, offsetX: 0, offsetY: 0 }
1297
+ * 如果不能完整渲染,则返回 { isCellCanFullRender: false, offsetX: 需要偏移的 x 值, offsetY: 需要偏移的 y 值 }
1298
+ */
1299
+ getCellIsFullRenderInfo(aiTable, cell) {
1300
+ let offsetX = 0;
1301
+ let offsetY = 0;
1302
+ const cellIndex = AITable.getCellIndex(aiTable, cell);
1303
+ const { rowIndex, columnIndex } = cellIndex;
1304
+ const isCellInFrozen = columnIndex < this.frozenColumnCount;
1305
+ const frozenWidth = this.getColumnOffset(this.frozenColumnCount);
1306
+ const { x, y, width, height } = this.getCellRect(rowIndex, columnIndex);
1307
+ const { scrollLeft, scrollTop } = aiTable.context.scrollState();
1308
+ const containerStartPointXY = [frozenWidth + scrollLeft, scrollTop + AI_TABLE_FIELD_HEAD_HEIGHT];
1309
+ const containerEndPointXY = [
1310
+ aiTable.context.containerRect().width + scrollLeft - AI_TABLE_CELL_LINE_BORDER * 4,
1311
+ aiTable.context.containerRect().height + scrollTop - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT - AI_TABLE_CELL_LINE_BORDER * 4
1312
+ ];
1313
+ const cellStartPointXY = [x, y];
1314
+ const cellEndPointXY = [x + width, y + height];
1315
+ // 不在左侧固定列时,才需要判断 x 坐标是否超出
1316
+ if (!isCellInFrozen && cellStartPointXY[0] < containerStartPointXY[0]) {
1317
+ offsetX = cellStartPointXY[0] - containerStartPointXY[0];
1318
+ }
1319
+ if (cellStartPointXY[1] < containerStartPointXY[1]) {
1320
+ offsetY = cellStartPointXY[1] - containerStartPointXY[1];
1321
+ }
1322
+ // 不在左侧固定列时,才需要判断 x 坐标是否超出
1323
+ if (!isCellInFrozen && cellEndPointXY[0] > containerEndPointXY[0]) {
1324
+ offsetX = cellEndPointXY[0] - containerEndPointXY[0];
1325
+ }
1326
+ if (cellEndPointXY[1] > containerEndPointXY[1]) {
1327
+ offsetY = cellEndPointXY[1] - containerEndPointXY[1];
1328
+ }
1329
+ const isCellCanFullRender = offsetX === 0 && offsetY === 0;
1330
+ return {
1331
+ isCellCanFullRender,
1332
+ offsetX,
1333
+ offsetY
1334
+ };
1335
+ }
1336
+ }
1285
1337
 
1286
1338
  var AlphabetType;
1287
1339
  (function (AlphabetType) {
@@ -1363,10 +1415,10 @@ function createAITable(records, fields, gridData) {
1363
1415
  selectedFields: new Set(),
1364
1416
  selectedCells: new Set(),
1365
1417
  activeCell: null,
1366
- expandCell: null,
1367
- editingCell: null,
1368
- selectAllState: AITableSelectAllState.none
1418
+ selectedEndCell: null
1369
1419
  }),
1420
+ expendCell: signal({ path: null }),
1421
+ editingCell: signal({ path: null }),
1370
1422
  keywordsMatchedCells: signal(new Set()),
1371
1423
  recordsMap: computed(() => {
1372
1424
  return records().reduce((object, item) => {
@@ -1976,19 +2028,100 @@ function getAvatarBgColor(name) {
1976
2028
  : 0;
1977
2029
  return colors[code % 9];
1978
2030
  }
1979
- function expandCell(aiTable, path) {
1980
- const [recordId, fieldId] = path;
2031
+ function clearCoverCell(aiTable) {
2032
+ clearSelection(aiTable);
2033
+ closeEditingCell(aiTable);
2034
+ closeExpendCell(aiTable);
2035
+ }
2036
+ function clearSelection(aiTable) {
1981
2037
  aiTable.selection.set({
1982
- ...aiTable.selection(),
1983
- activeCell: [recordId, fieldId],
1984
- selectedCells: new Set([`${recordId}:${fieldId}`]),
1985
- expandCell: [recordId, fieldId]
2038
+ selectedRecords: new Set(),
2039
+ selectedFields: new Set(),
2040
+ selectedCells: new Set(),
2041
+ activeCell: null,
2042
+ selectedEndCell: null
2043
+ });
2044
+ }
2045
+ function clearSelectionRecords(aiTable) {
2046
+ setSelection(aiTable, {
2047
+ selectedRecords: new Set()
2048
+ });
2049
+ }
2050
+ function clearSelectionFields(aiTable) {
2051
+ setSelection(aiTable, {
2052
+ selectedFields: new Set()
2053
+ });
2054
+ }
2055
+ function clearSelectedCells(aiTable) {
2056
+ setSelection(aiTable, {
2057
+ selectedCells: new Set()
1986
2058
  });
1987
2059
  }
1988
2060
  function setExpandCellInfo(aiTable, expandCellInfo) {
2061
+ aiTable.expendCell.set({
2062
+ ...aiTable.expendCell(),
2063
+ ...expandCellInfo
2064
+ });
2065
+ }
2066
+ function expandCell(aiTable, cellPath) {
2067
+ setExpandCellInfo(aiTable, { path: cellPath });
2068
+ }
2069
+ function closeExpendCell(aiTable) {
2070
+ setExpandCellInfo(aiTable, { path: null, width: undefined, height: undefined });
2071
+ }
2072
+ function setSelection(aiTable, selection) {
1989
2073
  aiTable.selection.set({
1990
2074
  ...aiTable.selection(),
1991
- expandCellInfo: expandCellInfo
2075
+ ...selection
2076
+ });
2077
+ }
2078
+ function setActiveCell(aiTable, activeCellPath) {
2079
+ aiTable.selection.set({
2080
+ ...aiTable.selection(),
2081
+ activeCell: activeCellPath
2082
+ });
2083
+ }
2084
+ function setEditingCell(aiTable, editingCell) {
2085
+ aiTable.editingCell.set({
2086
+ ...aiTable.editingCell(),
2087
+ ...editingCell
2088
+ });
2089
+ }
2090
+ function closeEditingCell(aiTable) {
2091
+ setEditingCell(aiTable, { path: null });
2092
+ }
2093
+ function selectCells(aiTable, startCell, endCell, activeCell) {
2094
+ const [startRecordId, startFieldId] = startCell;
2095
+ const records = aiTable.context.linearRows();
2096
+ const fields = AITable.getVisibleFields(aiTable);
2097
+ const selectedCells = new Set();
2098
+ if (!endCell) {
2099
+ selectedCells.add(`${startRecordId}:${startFieldId}`);
2100
+ }
2101
+ else {
2102
+ if (endCell && endCell.join(':') === aiTable.selection().selectedEndCell?.join(':')) {
2103
+ return;
2104
+ }
2105
+ const [endRecordId, endFieldId] = endCell;
2106
+ const startRowIndex = aiTable.context.visibleRowsIndexMap().get(startRecordId);
2107
+ const endRowIndex = aiTable.context.visibleRowsIndexMap().get(endRecordId);
2108
+ const startColIndex = aiTable.context.visibleColumnsIndexMap().get(startFieldId);
2109
+ const endColIndex = aiTable.context.visibleColumnsIndexMap().get(endFieldId);
2110
+ const minRowIndex = Math.min(startRowIndex, endRowIndex);
2111
+ const maxRowIndex = Math.max(startRowIndex, endRowIndex);
2112
+ const minColIndex = Math.min(startColIndex, endColIndex);
2113
+ const maxColIndex = Math.max(startColIndex, endColIndex);
2114
+ for (let i = minRowIndex; i <= maxRowIndex; i++) {
2115
+ for (let j = minColIndex; j <= maxColIndex; j++) {
2116
+ selectedCells.add(`${records[i]._id}:${fields[j]._id}`);
2117
+ }
2118
+ }
2119
+ }
2120
+ clearSelection(aiTable);
2121
+ setSelection(aiTable, {
2122
+ activeCell: activeCell || startCell,
2123
+ selectedEndCell: endCell || null,
2124
+ selectedCells: selectedCells
1992
2125
  });
1993
2126
  }
1994
2127
 
@@ -3227,6 +3360,18 @@ const FieldModelMap = {
3227
3360
  [AITableFieldType.attachment]: new AttachmentField(),
3228
3361
  [AITableFieldType.checkbox]: new CheckboxField()
3229
3362
  };
3363
+ function selectField(aiTable, fieldId) {
3364
+ if (aiTable.selection().selectedFields.has(fieldId)) {
3365
+ return;
3366
+ }
3367
+ aiTable.selection.set({
3368
+ selectedRecords: new Set(),
3369
+ selectedFields: new Set([fieldId]),
3370
+ selectedCells: new Set(),
3371
+ activeCell: null,
3372
+ selectedEndCell: null
3373
+ });
3374
+ }
3230
3375
 
3231
3376
  const aiTableFragmentAttribute = 'ai-table-fragment';
3232
3377
  const buildClipboardData = (aiTable) => {
@@ -5196,7 +5341,7 @@ const createActiveCellBorder = (config) => {
5196
5341
  !!activeCell.length &&
5197
5342
  aiTable.context.visibleRowsIndexMap().has(activeCell[0]) &&
5198
5343
  aiTable.context.visibleColumnsIndexMap().has(activeCell[1]) &&
5199
- !aiTable.selection().expandCell) {
5344
+ !aiTable.expendCell()?.path) {
5200
5345
  const fieldId = activeCell[1];
5201
5346
  const { rowIndex, columnIndex } = AITable.getCellIndex(aiTable, activeCell);
5202
5347
  const checkIsVisible = (rowIndex, columnIndex) => {
@@ -7398,7 +7543,13 @@ class AITableFrozenColumnHeads {
7398
7543
  const config = this.config();
7399
7544
  if (!config)
7400
7545
  return false;
7401
- return config.aiTable.selection().selectAllState === AITableSelectAllState.all;
7546
+ const selectedRecords = config.aiTable.selection().selectedRecords;
7547
+ const selectedAllState = selectedRecords.size === config.aiTable.records().length
7548
+ ? AITableSelectAllState.all
7549
+ : selectedRecords.size === 0
7550
+ ? AITableSelectAllState.none
7551
+ : AITableSelectAllState.partial;
7552
+ return selectedAllState === AITableSelectAllState.all;
7402
7553
  });
7403
7554
  this.fieldHeadHeight = computed(() => {
7404
7555
  const coord = this.coordinate();
@@ -8564,7 +8715,7 @@ class AITableFillHandle {
8564
8715
  const { aiTable, readonly } = this.config();
8565
8716
  const selection = aiTable.selection();
8566
8717
  const hasSelectedCells = selection.selectedCells.size > 0;
8567
- const isEditingCell = selection.editingCell;
8718
+ const isEditingCell = !!aiTable.editingCell()?.path;
8568
8719
  return hasSelectedCells && !readonly && !isEditingCell;
8569
8720
  });
8570
8721
  this.handleConfig = computed(() => {
@@ -8579,8 +8730,11 @@ class AITableFillHandle {
8579
8730
  const rowOffset = coordinate.getRowOffset(rowIndex);
8580
8731
  const width = 6;
8581
8732
  const height = 6;
8582
- const cellHeight = aiTable.selection().expandCellInfo?.height
8583
- ? aiTable.selection().expandCellInfo.height + AI_TABLE_CELL_LINE_BORDER
8733
+ const [expandRecordId, expandFieldId] = aiTable.expendCell()?.path || [null, null];
8734
+ const cellHeight = expandRecordId === recordId && expandFieldId === fieldId && aiTable.expendCell()?.height
8735
+ ? aiTable.expendCell()?.height
8736
+ ? aiTable.expendCell().height + AI_TABLE_CELL_LINE_BORDER
8737
+ : AI_TABLE_ROW_HEIGHT
8584
8738
  : AI_TABLE_ROW_HEIGHT;
8585
8739
  return {
8586
8740
  x: columnOffset + columnWidth - width / 2 + AI_TABLE_OFFSET,
@@ -9424,7 +9578,7 @@ class AITableRenderer {
9424
9578
  let expandCellBorder = false;
9425
9579
  let frozenExpandCellBorder = false;
9426
9580
  const { aiTable } = this.config();
9427
- const expandCellPath = aiTable.selection().expandCell;
9581
+ const expandCellPath = aiTable.expendCell()?.path;
9428
9582
  if (expandCellPath) {
9429
9583
  const { rowIndex, columnIndex } = AITable.getCellIndex(aiTable, expandCellPath);
9430
9584
  const isFrozenColumn = columnIndex < aiTable.context.frozenColumnCount();
@@ -10185,10 +10339,10 @@ function getCoverCell(aiTable) {
10185
10339
  const pointPosition = aiTable.context.pointPosition();
10186
10340
  let fieldId;
10187
10341
  let recordId;
10188
- const expandCell = aiTable.selection().expandCell;
10189
- if (expandCell) {
10190
- fieldId = expandCell[1];
10191
- recordId = expandCell[0];
10342
+ const expandCellPath = aiTable.expendCell()?.path;
10343
+ if (expandCellPath) {
10344
+ fieldId = expandCellPath[1];
10345
+ recordId = expandCellPath[0];
10192
10346
  }
10193
10347
  else {
10194
10348
  const { fieldId: fieldIdDetail, recordId: recordIdDetail } = getDetailByTargetName(pointPosition.realTargetName) ?? {};
@@ -10215,7 +10369,7 @@ function getCoverCell(aiTable) {
10215
10369
  field,
10216
10370
  recordId,
10217
10371
  fieldId,
10218
- isExpand: !!expandCell,
10372
+ isExpand: !!expandCellPath,
10219
10373
  renderComponentDefinition
10220
10374
  };
10221
10375
  }
@@ -10443,6 +10597,33 @@ function getStartAndEndCell(selectedCells) {
10443
10597
  return { startCell, endCell };
10444
10598
  }
10445
10599
 
10600
+ function toggleSelectRecord(aiTable, recordId) {
10601
+ if (aiTable.selection().selectedRecords.has(recordId)) {
10602
+ aiTable.selection().selectedRecords.delete(recordId);
10603
+ }
10604
+ else {
10605
+ aiTable.selection().selectedRecords.add(recordId);
10606
+ }
10607
+ const selectedRecords = aiTable.selection().selectedRecords;
10608
+ aiTable.selection.set({
10609
+ selectedRecords: selectedRecords,
10610
+ selectedFields: new Set(),
10611
+ selectedCells: new Set(),
10612
+ activeCell: null,
10613
+ selectedEndCell: null
10614
+ });
10615
+ }
10616
+ function toggleSelectAllRecords(aiTable, checked) {
10617
+ if (checked) {
10618
+ setSelection(aiTable, {
10619
+ selectedRecords: new Set(aiTable.records().map((item) => item._id))
10620
+ });
10621
+ }
10622
+ else {
10623
+ clearSelection(aiTable);
10624
+ }
10625
+ }
10626
+
10446
10627
  class NumberCellEditorComponent extends AbstractEditCellEditor {
10447
10628
  updateValue() {
10448
10629
  if (this.modelValue === '') {
@@ -10886,165 +11067,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
10886
11067
  }, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig()\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired [thyLabelText]=\"i18nTexts().columnName\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n (ngModelChange)=\"nameChange($event)\"\n required\n [placeholder]=\"i18nTexts().columnNamePlaceholder\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().fieldType\">\n <div class=\"thy-dropdown-menu py-0\">\n <div class=\"ml-n5 mr-n5\">\n <span thyDropdownMenuItem [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" (click)=\"fieldTypeClick($event)\">\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"selectedFieldOption().icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ selectedFieldOption().name }}</span>\n <thy-icon thyDropdownMenuItemExtendIcon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </span>\n </div>\n </div>\n\n @if (selectedFieldOption().type === aITableFieldType.member) {\n <div class=\"d-flex justify-content-between mt-3\">\n {{ i18nTexts().allowMultipleMembers }}\n <thy-switch\n name=\"isMultipleMember\"\n [(ngModel)]=\"isMultipleMember\"\n (ngModelChange)=\"multipleMemberChange()\"\n thySize=\"sm\"\n ></thy-switch>\n </div>\n }\n </thy-form-group>\n @if (aiExternalTemplate()) {\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate()\"></ng-container>\n }\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">{{ i18nTexts().cancel }}</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">{{ i18nTexts().confirm }}</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n <div class=\"ai-table-field-type-menu\">\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().base\">\n @for (item of fieldOptions().base; track $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: (item | fieldIsSameOption: aiEditField())\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n </thy-dropdown-menu-group>\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().advanced\">\n @for (item of fieldOptions().advanced; track $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: (item | fieldIsSameOption: aiEditField())\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n </thy-dropdown-menu-group>\n </div>\n</thy-dropdown-menu>\n", styles: [":host{width:350px}\n"] }]
10887
11068
  }] });
10888
11069
 
10889
- class AITableGridSelectionService {
10890
- constructor() {
10891
- this.selectAllState = computed(() => {
10892
- const selectedRecords = this.aiTable.selection().selectedRecords;
10893
- return selectedRecords.size === this.aiTable.records().length
10894
- ? AITableSelectAllState.all
10895
- : selectedRecords.size === 0
10896
- ? AITableSelectAllState.none
10897
- : AITableSelectAllState.partial;
10898
- });
10899
- }
10900
- initialize(aiTable) {
10901
- this.aiTable = aiTable;
10902
- }
10903
- clearSelection(options) {
10904
- this.aiTable.selection.set({
10905
- selectedRecords: new Set(),
10906
- selectedFields: new Set(),
10907
- selectedCells: new Set(),
10908
- activeCell: null,
10909
- expandCell: null,
10910
- editingCell: null,
10911
- selectAllState: AITableSelectAllState.none,
10912
- expandCellInfo: options?.retainExpandCellInfo ? this.aiTable.selection().expandCellInfo : null
10913
- });
10914
- }
10915
- setActiveCell(activeCell) {
10916
- this.aiTable.selection().activeCell = activeCell;
10917
- }
10918
- setExpandCell(expandCell) {
10919
- this.aiTable.selection.set({
10920
- ...this.aiTable.selection(),
10921
- expandCell: expandCell
10922
- });
10923
- }
10924
- setEditingCell(editingCell) {
10925
- this.aiTable.selection.set({
10926
- ...this.aiTable.selection(),
10927
- editingCell: editingCell
10928
- });
10929
- }
10930
- selectField(fieldId) {
10931
- if (this.aiTable.selection().selectedFields.has(fieldId)) {
10932
- return;
10933
- }
10934
- this.clearSelection();
10935
- this.aiTable.selection().selectedFields.add(fieldId);
10936
- }
10937
- get selectedFields() {
10938
- return this.aiTable.selection().selectedFields;
10939
- }
10940
- get selectedRecords() {
10941
- return this.aiTable.selection().selectedRecords;
10942
- }
10943
- selectRecord(recordId) {
10944
- if (this.aiTable.selection().selectedRecords.has(recordId)) {
10945
- this.aiTable.selection().selectedRecords.delete(recordId);
10946
- }
10947
- else {
10948
- this.aiTable.selection().selectedRecords.add(recordId);
10949
- }
10950
- const selectedRecords = this.aiTable.selection().selectedRecords;
10951
- this.aiTable.selection.set({
10952
- selectedRecords: selectedRecords,
10953
- selectedFields: new Set(),
10954
- selectedCells: new Set(),
10955
- activeCell: null,
10956
- expandCell: null,
10957
- editingCell: null,
10958
- selectAllState: this.selectAllState()
10959
- });
10960
- }
10961
- toggleSelectAll(checked) {
10962
- if (checked) {
10963
- if (this.aiTable.records().length === 0) {
10964
- this.aiTable.selection.set({
10965
- ...this.aiTable.selection(),
10966
- selectAllState: AITableSelectAllState.all
10967
- });
10968
- }
10969
- else {
10970
- this.aiTable.records().forEach((item) => {
10971
- this.selectRecord(item._id);
10972
- });
10973
- }
10974
- }
10975
- else {
10976
- this.clearSelection();
10977
- }
10978
- }
10979
- updateSelect(event) {
10980
- const target = event?.target;
10981
- if (!target) {
10982
- return;
10983
- }
10984
- const cellDom = target.closest('.grid-cell');
10985
- const colDom = target.closest('.grid-field');
10986
- const checkbox = target.tagName === 'INPUT' && target.type === 'checkbox' && target.closest('.grid-checkbox');
10987
- const fieldAction = target.closest('.grid-field-action');
10988
- if (cellDom) {
10989
- const fieldId = cellDom.getAttribute('fieldId');
10990
- const recordId = cellDom.getAttribute('recordId');
10991
- fieldId && recordId && this.selectCells([recordId, fieldId]);
10992
- }
10993
- if (colDom && !fieldAction) {
10994
- const fieldId = colDom.getAttribute('fieldId');
10995
- fieldId && this.selectField(fieldId);
10996
- }
10997
- if (!cellDom && !colDom && !checkbox) {
10998
- this.clearSelection();
10999
- }
11000
- }
11001
- selectCells(startCell, endCell, activeCell) {
11002
- const [startRecordId, startFieldId] = startCell;
11003
- const records = this.aiTable.context.linearRows();
11004
- const fields = AITable.getVisibleFields(this.aiTable);
11005
- const selectedCells = new Set();
11006
- if (!endCell) {
11007
- selectedCells.add(`${startRecordId}:${startFieldId}`);
11008
- }
11009
- else {
11010
- // 数据的存储设计结构,决定了最后一条就是endCell
11011
- const lastItem = Array.from(this.aiTable.selection().selectedCells).pop();
11012
- if (endCell.join(':') === lastItem) {
11013
- return;
11014
- }
11015
- const [endRecordId, endFieldId] = endCell;
11016
- const startRowIndex = this.aiTable.context.visibleRowsIndexMap().get(startRecordId);
11017
- const endRowIndex = this.aiTable.context.visibleRowsIndexMap().get(endRecordId);
11018
- const startColIndex = this.aiTable.context.visibleColumnsIndexMap().get(startFieldId);
11019
- const endColIndex = this.aiTable.context.visibleColumnsIndexMap().get(endFieldId);
11020
- const minRowIndex = Math.min(startRowIndex, endRowIndex);
11021
- const maxRowIndex = Math.max(startRowIndex, endRowIndex);
11022
- const minColIndex = Math.min(startColIndex, endColIndex);
11023
- const maxColIndex = Math.max(startColIndex, endColIndex);
11024
- for (let i = minRowIndex; i <= maxRowIndex; i++) {
11025
- for (let j = minColIndex; j <= maxColIndex; j++) {
11026
- selectedCells.add(`${records[i]._id}:${fields[j]._id}`);
11027
- }
11028
- }
11029
- }
11030
- this.clearSelection();
11031
- this.aiTable.selection.set({
11032
- ...this.aiTable.selection(),
11033
- activeCell: activeCell || startCell,
11034
- selectedCells: selectedCells
11035
- });
11036
- }
11037
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
11038
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridSelectionService }); }
11039
- }
11040
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridSelectionService, decorators: [{
11041
- type: Injectable
11042
- }], ctorParameters: () => [] });
11043
-
11044
11070
  class AITableContextMenu extends ThyDropdownAbstractMenu {
11045
11071
  constructor() {
11046
11072
  super(...arguments);
11047
- this.aiTableGridSelectionService = inject(AITableGridSelectionService);
11048
11073
  this.notifyService = inject(ThyNotifyService);
11049
11074
  this.thyPopoverRef = inject(ThyPopoverRef);
11050
11075
  this.aiTable = input.required();
@@ -11055,8 +11080,7 @@ class AITableContextMenu extends ThyDropdownAbstractMenu {
11055
11080
  }
11056
11081
  execute(menu) {
11057
11082
  if ((menu.disabled && !menu.disabled(this.aiTable(), this.targetName(), this.position())) || !menu.disabled) {
11058
- menu.exec &&
11059
- menu.exec(this.aiTable(), this.targetName(), this.position(), this.aiTableGridSelectionService, this.notifyService, menu.count);
11083
+ menu.exec && menu.exec(this.aiTable(), this.targetName(), this.position(), this.notifyService, menu.count);
11060
11084
  }
11061
11085
  }
11062
11086
  inputNumberFocus(e) {
@@ -11088,6 +11112,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
11088
11112
  ], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n draggable=\"false\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n" }]
11089
11113
  }] });
11090
11114
 
11115
+ class CheckboxMenuSort {
11116
+ constructor() {
11117
+ this.field = input.required();
11118
+ this.menu = input.required();
11119
+ this.Direction = {
11120
+ ascending: 'ascending',
11121
+ descending: 'descending'
11122
+ };
11123
+ }
11124
+ getSortText() {
11125
+ if (this.menu() && this.field()) {
11126
+ const menuName = this.menu().name;
11127
+ if (typeof menuName === 'function') {
11128
+ return menuName(this.field());
11129
+ }
11130
+ return menuName || '按 Z → A 排序';
11131
+ }
11132
+ return '按 Z → A 排序';
11133
+ }
11134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CheckboxMenuSort, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11135
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: CheckboxMenuSort, isStandalone: true, selector: "checkbox-menu-sort", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "checkbox-menu-sort" }, ngImport: i0, template: `
11136
+ <thy-icon class="sort-icon" [thyIconName]="menu().icon!"></thy-icon>
11137
+ <div class="sort-state">
11138
+ @if (menu().type === 'sortByAsc') {
11139
+ <label thyCheckbox [ngModel]="true" class="sort-checkbox"></label>
11140
+ <thy-icon thyIconName="arrow-right" class="mx-2"></thy-icon>
11141
+ <label thyCheckbox [ngModel]="false" class="sort-checkbox"></label>
11142
+ } @else {
11143
+ <label thyCheckbox [ngModel]="false" class="sort-checkbox"></label>
11144
+ <thy-icon thyIconName="arrow-right" class="mx-2"></thy-icon>
11145
+ <label thyCheckbox [ngModel]="true" class="sort-checkbox"></label>
11146
+ }
11147
+ </div>
11148
+ `, isInline: true, dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyCheckbox, selector: "thy-checkbox,[thy-checkbox],[thyCheckbox]", inputs: ["thyIndeterminate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11149
+ }
11150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CheckboxMenuSort, decorators: [{
11151
+ type: Component,
11152
+ args: [{
11153
+ selector: 'checkbox-menu-sort',
11154
+ template: `
11155
+ <thy-icon class="sort-icon" [thyIconName]="menu().icon!"></thy-icon>
11156
+ <div class="sort-state">
11157
+ @if (menu().type === 'sortByAsc') {
11158
+ <label thyCheckbox [ngModel]="true" class="sort-checkbox"></label>
11159
+ <thy-icon thyIconName="arrow-right" class="mx-2"></thy-icon>
11160
+ <label thyCheckbox [ngModel]="false" class="sort-checkbox"></label>
11161
+ } @else {
11162
+ <label thyCheckbox [ngModel]="false" class="sort-checkbox"></label>
11163
+ <thy-icon thyIconName="arrow-right" class="mx-2"></thy-icon>
11164
+ <label thyCheckbox [ngModel]="true" class="sort-checkbox"></label>
11165
+ }
11166
+ </div>
11167
+ `,
11168
+ host: {
11169
+ class: 'checkbox-menu-sort'
11170
+ },
11171
+ changeDetection: ChangeDetectionStrategy.OnPush,
11172
+ imports: [ThyIcon, ThyCheckbox, FormsModule, FormsModule]
11173
+ }]
11174
+ }] });
11175
+
11091
11176
  const GRID_CELL_EDITOR_MAP = {
11092
11177
  [AITableFieldType.text]: TextCellEditorComponent,
11093
11178
  [AITableFieldType.richText]: TextCellEditorComponent,
@@ -11106,7 +11191,6 @@ class AITableGridEventService {
11106
11191
  this.globalMousedownEvent$ = new Subject();
11107
11192
  this.destroyRef = inject(DestroyRef);
11108
11193
  this.thyPopover = inject(ThyPopover);
11109
- this.selectionService = inject(AITableGridSelectionService);
11110
11194
  }
11111
11195
  initialize(aiTable, aiFieldRenderers) {
11112
11196
  this.aiTable = aiTable;
@@ -11225,7 +11309,8 @@ class AITableGridEventService {
11225
11309
  const fieldType = this.aiTable.fieldsMap()[fieldId].type;
11226
11310
  const { component, isInternalComponent } = this.getEditorComponent(fieldType);
11227
11311
  const offsetOriginPosition = this.getOriginPosition(aiTable, options);
11228
- this.selectionService.setEditingCell([recordId, fieldId]);
11312
+ setEditingCell(aiTable, { path: [recordId, fieldId] });
11313
+ closeExpendCell(this.aiTable);
11229
11314
  this.cellEditorPopoverRef = this.thyPopover.open(component, {
11230
11315
  viewContainerRef: isInternalComponent ? undefined : options?.viewContainerRef,
11231
11316
  origin: container,
@@ -11273,7 +11358,7 @@ class AITableGridEventService {
11273
11358
  this.cellEditorPopoverRef.afterClosed().subscribe(() => {
11274
11359
  wheelEvent.unsubscribe();
11275
11360
  this.cellEditorPopoverRef = null;
11276
- this.selectionService.setEditingCell(null);
11361
+ closeEditingCell(this.aiTable);
11277
11362
  });
11278
11363
  this.cellEditorPopoverRef.componentInstance.updateFieldValues.subscribe((value) => {
11279
11364
  options.updateFieldValues(value);
@@ -11285,7 +11370,7 @@ class AITableGridEventService {
11285
11370
  if (this.cellEditorPopoverRef) {
11286
11371
  this.cellEditorPopoverRef.close();
11287
11372
  this.cellEditorPopoverRef = null;
11288
- this.selectionService.setEditingCell(null);
11373
+ closeEditingCell(this.aiTable);
11289
11374
  }
11290
11375
  }
11291
11376
  getCurrentEditCell() {
@@ -11333,6 +11418,9 @@ class AITableFieldMenu extends ThyDropdownAbstractMenu {
11333
11418
  return this.aiTable.fields().find((item) => item._id === this.fieldId);
11334
11419
  });
11335
11420
  }
11421
+ getCustomComponent(menu) {
11422
+ return menu.customComponent?.(this.aiTable, this.field());
11423
+ }
11336
11424
  execute(menu) {
11337
11425
  if ((menu.disabled && !menu.disabled(this.aiTable, this.field)) || !menu.disabled) {
11338
11426
  menu.exec && menu.exec(this.aiTable, this.field, this.origin, this.position);
@@ -11345,13 +11433,13 @@ class AITableFieldMenu extends ThyDropdownAbstractMenu {
11345
11433
  return menu.name || '';
11346
11434
  }
11347
11435
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
11348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldMenu, isStandalone: true, selector: "ai-table-field-menu", inputs: { fieldId: "fieldId", aiTable: "aiTable", fieldMenus: "fieldMenus", origin: "origin", position: "position" }, host: { classAttribute: "field-menu" }, usesInheritance: true, ngImport: i0, template: "@if (field()) {\n @for (menu of fieldMenus; track index; let index = $index) {\n @if ((menu.hidden && !menu.hidden(aiTable, field)) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider [thyStyle]=\"'solid'\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable, field));\n @let isRemoveField = menu.type === 'removeField';\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{ 'remove-field': isRemoveField && !disabled }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon [thyIconName]=\"menu.icon!\"></thy-icon>\n <span>{{ getMenuName(menu, field()) }}</span>\n </a>\n }\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11436
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldMenu, isStandalone: true, selector: "ai-table-field-menu", inputs: { fieldId: "fieldId", aiTable: "aiTable", fieldMenus: "fieldMenus", origin: "origin", position: "position" }, host: { classAttribute: "field-menu" }, usesInheritance: true, ngImport: i0, template: "@if (field()) {\n @for (menu of fieldMenus; track index; let index = $index) {\n @if ((menu.hidden && !menu.hidden(aiTable, field)) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider [thyStyle]=\"'solid'\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable, field));\n @let isRemoveField = menu.type === 'removeField';\n @let customComponent = getCustomComponent(menu);\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{ 'remove-field': isRemoveField && !disabled }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n @if (customComponent) {\n <ng-container *ngComponentOutlet=\"customComponent; inputs: { field: field(), menu: menu }\"> </ng-container>\n } @else {\n <thy-icon [thyIconName]=\"menu.icon!\"></thy-icon>\n <span>{{ getMenuName(menu, field()) }}</span>\n }\n </a>\n }\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11349
11437
  }
11350
11438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldMenu, decorators: [{
11351
11439
  type: Component,
11352
11440
  args: [{ selector: 'ai-table-field-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
11353
11441
  class: 'field-menu'
11354
- }, imports: [ThyIcon, ThyDivider, ThyDropdownMenuItemDirective, NgClass], template: "@if (field()) {\n @for (menu of fieldMenus; track index; let index = $index) {\n @if ((menu.hidden && !menu.hidden(aiTable, field)) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider [thyStyle]=\"'solid'\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable, field));\n @let isRemoveField = menu.type === 'removeField';\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{ 'remove-field': isRemoveField && !disabled }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon [thyIconName]=\"menu.icon!\"></thy-icon>\n <span>{{ getMenuName(menu, field()) }}</span>\n </a>\n }\n }\n }\n}\n" }]
11442
+ }, imports: [ThyIcon, ThyDivider, ThyDropdownMenuItemDirective, NgClass, NgComponentOutlet], template: "@if (field()) {\n @for (menu of fieldMenus; track index; let index = $index) {\n @if ((menu.hidden && !menu.hidden(aiTable, field)) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider [thyStyle]=\"'solid'\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable, field));\n @let isRemoveField = menu.type === 'removeField';\n @let customComponent = getCustomComponent(menu);\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{ 'remove-field': isRemoveField && !disabled }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n @if (customComponent) {\n <ng-container *ngComponentOutlet=\"customComponent; inputs: { field: field(), menu: menu }\"> </ng-container>\n } @else {\n <thy-icon [thyIconName]=\"menu.icon!\"></thy-icon>\n <span>{{ getMenuName(menu, field()) }}</span>\n }\n </a>\n }\n }\n }\n}\n" }]
11355
11443
  }], propDecorators: { fieldId: [{
11356
11444
  type: Input,
11357
11445
  args: [{ required: true }]
@@ -11475,7 +11563,6 @@ class AITableGridBase {
11475
11563
  this.destroyRef = inject(DestroyRef);
11476
11564
  this.aiTableGridFieldService = inject(AITableGridFieldService);
11477
11565
  this.aiTableGridEventService = inject(AITableGridEventService);
11478
- this.aiTableGridSelectionService = inject(AITableGridSelectionService);
11479
11566
  }
11480
11567
  ngOnInit() {
11481
11568
  this.initAITable();
@@ -11493,7 +11580,6 @@ class AITableGridBase {
11493
11580
  }
11494
11581
  initService() {
11495
11582
  this.aiTableGridEventService.initialize(this.aiTable, this.aiFieldConfig()?.fieldRenderers);
11496
- this.aiTableGridSelectionService.initialize(this.aiTable);
11497
11583
  this.aiTableGridEventService.registerEvents(this.elementRef.nativeElement);
11498
11584
  this.aiTableGridFieldService.initAIFieldConfig(this.aiFieldConfig());
11499
11585
  AI_TABLE_GRID_FIELD_SERVICE_MAP.set(this.aiTable, this.aiTableGridFieldService);
@@ -11506,11 +11592,11 @@ class AITableGridBase {
11506
11592
  }
11507
11593
  this.aiAddRecord.emit(options || {});
11508
11594
  }
11509
- selectRecord(recordId) {
11510
- this.aiTableGridSelectionService.selectRecord(recordId);
11595
+ toggleSelectRecord(recordId) {
11596
+ toggleSelectRecord(this.aiTable, recordId);
11511
11597
  }
11512
11598
  toggleSelectAll(checked) {
11513
- this.aiTableGridSelectionService.toggleSelectAll(checked);
11599
+ toggleSelectAllRecords(this.aiTable, checked);
11514
11600
  }
11515
11601
  addField(gridColumnBlank, position) {
11516
11602
  if (this.aiMaxFields() && this.aiTable.fields().length >= this.aiMaxFields()) {
@@ -11540,11 +11626,6 @@ class AITableGridBase {
11540
11626
  this.aiTableGridEventService.dblClickEvent$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
11541
11627
  this.dblClick(event);
11542
11628
  });
11543
- this.aiTableGridEventService.mousedownEvent$
11544
- .pipe(mergeWith(this.aiTableGridEventService.globalMousedownEvent$), takeUntilDestroyed(this.destroyRef))
11545
- .subscribe((event) => {
11546
- this.aiTableGridSelectionService.updateSelect(event);
11547
- });
11548
11629
  });
11549
11630
  }
11550
11631
  dblClick(event) {
@@ -11581,7 +11662,7 @@ class AITableDomGrid extends AITableGridBase {
11581
11662
  });
11582
11663
  }
11583
11664
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableDomGrid, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
11584
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableDomGrid, isStandalone: true, selector: "ai-table-dom-grid", host: { classAttribute: "ai-table-grid ai-table-dom-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService], usesInheritance: true, ngImport: i0, template: "<div class=\"grid-header d-flex\">\n <div class=\"grid-column-checkbox grid-cell grid-checkbox\">\n <label thyCheckbox thyLabelText=\"\" [ngModel]=\"isSelectedAll()\" (ngModelChange)=\"toggleSelectAll($event)\"></label>\n </div>\n @for (field of gridData().fields; track field._id) {\n <div\n class=\"grid-cell grid-field\"\n #fieldAction\n [attr.fieldId]=\"field._id\"\n [ngClass]=\"{ highlight: aiTable.selection().selectedFields.has(field._id) }\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n <span class=\"text-truncate\">\n <thy-icon [thyIconName]=\"field.icon!\" class=\"mr-2 text-muted\"></thy-icon>\n <span>{{ field.name }}</span>\n </span>\n <a\n href=\"javascript:;\"\n class=\"grid-field-action\"\n thyAction\n thyIcon=\"more-vertical\"\n (click)=\"openFieldMenu($event, field, fieldAction)\"\n >\n </a>\n </div>\n }\n <div class=\"grid-column-blank cursor-pointer\" #gridColumnBlank (click)=\"addField(gridColumnBlank)\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n<div class=\"grid-body d-flex\">\n @for (record of gridData().records; track record._id; let index = $index) {\n <div class=\"grid-row d-flex\" [ngClass]=\"{ highlight: (record._id | isSelectRecord: aiTable.selection()) }\">\n <div class=\"grid-row-index grid-checkbox\">\n <label\n [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'checked-box' : 'unchecked-box'\"\n thyCheckbox\n thyLabelText=\"\"\n [ngModel]=\"record._id | isSelectRecord: aiTable.selection()\"\n (ngModelChange)=\"selectRecord(record._id)\"\n ></label>\n <span [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'grid-row-no-number' : 'grid-row-number'\">\n {{ index + 1 }}\n </span>\n </div>\n @for (field of gridData().fields; track field._id) {\n <!-- [ngClass]=\"{\n highlight: aiTable.selection().selectedCells.has(record._id) || aiTable.selection().selectedFields.has(field._id),\n selected: aiTable.selection().selectedCells.get(record._id)?.hasOwnProperty(field._id)\n }\" -->\n <div\n #cell\n class=\"grid-cell\"\n [attr.type]=\"[field.type]\"\n [attr.fieldId]=\"[field._id]\"\n [attr.recordId]=\"[record._id]\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n @switch (field.type) {\n @case (AITableFieldType.select) {\n @let fieldValue = record.values[field._id];\n @let settings = field.settings! | selectSetting;\n @let options = settings['options'];\n @let optionStyle = settings['option_style'] || AITableSelectOptionStyle.tag;\n @let isTagStyle = optionStyle === AITableSelectOptionStyle.tag;\n\n @if (!settings['is_multiple'] && fieldValue | selectOption: options; as selectedOption) {\n @if (isTagStyle) {\n <select-option class=\"mb-1 mr-1\" [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n </div>\n }\n } @else {\n @let maxShowCount = 2;\n\n <div class=\"d-flex\">\n @if (fieldValue | selectOptions: options; as selectedOptions) {\n @for (option of selectedOptions; track option!._id; let i = $index) {\n @if (i + 1 <= maxShowCount) {\n @if (isTagStyle) {\n <select-option\n class=\"mb-1 mr-1\"\n [field]=\"field\"\n [displayOption]=\"option!\"\n ></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"option!\"></select-option>\n </div>\n }\n }\n }\n\n @let selectedLength = selectedOptions.length || 0;\n @if (selectedOptions && maxShowCount < selectedLength) {\n @let shape = isTagStyle ? 'pill' : 'rectangle';\n @let isHidden = maxShowCount >= selectedLength;\n\n <thy-tag\n class=\"cursor-pointer\"\n [class.multi-property-value-hidden]=\"isHidden\"\n [thyShape]=\"shape\"\n >\n <span class=\"text-truncate\"> +{{ selectedLength - maxShowCount }} </span>\n </thy-tag>\n }\n }\n </div>\n }\n }\n @case (AITableFieldType.date) {\n {{ record.values[field._id].timestamp | thyDatePickerFormat }}\n }\n @case (AITableFieldType.updatedAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.createdAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.rate) {\n <thy-rate [ngModel]=\"record.values[field._id]\"></thy-rate>\n }\n @case (AITableFieldType.link) {\n <a\n class=\"d-block\"\n target=\"_blank\"\n [href]=\"record.values[field._id]?.url\"\n thyStopPropagation\n thyFlexibleText\n [thyTooltipContent]=\"record.values[field._id]?.text\"\n >\n {{ record.values[field._id]?.text }}\n </a>\n }\n @case (AITableFieldType.progress) {\n <thy-progress\n class=\"w-100\"\n [thyValue]=\"record.values[field._id] || 0\"\n [thySize]=\"record.values[field._id]?.config?.size || 'md'\"\n [thyMax]=\"record.values[field._id]?.config?.max || 100\"\n [thyType]=\"record.values[field._id]?.config?.progressType || 'success'\"\n >\n <span> {{ record.values[field._id] || 0 }}{{ record.values[field._id]?.config?.suffix || '%' }} </span>\n </thy-progress>\n }\n @case (AITableFieldType.member) {\n @let settings = field.settings! | memberSetting;\n\n @if (!settings!['is_multiple']) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n } @else {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n <thy-avatar-list thyAvatarSize=\"xs\">\n @for (item of recordValues; track $index) {\n <thy-avatar [thyName]=\"item.display_name!\" [thySrc]=\"item.avatar!\"></thy-avatar>\n }\n </thy-avatar-list>\n }\n }\n @case (AITableFieldType.createdBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @case (AITableFieldType.updatedBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @default {\n <span class=\"text-truncate\"> {{ record.values[field._id] }}</span>\n }\n }\n <div class=\"autofill-container\"></div>\n </div>\n }\n <div class=\"grid-column-blank\"></div>\n </div>\n }\n <div class=\"grid-row-insert grid-row cursor-pointer\" (click)=\"addRecord()\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n\n<div #activeBorder class=\"active-border\"></div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SelectOptionPipe, name: "selectOption" }, { kind: "pipe", type: SelectOptionsPipe, name: "selectOptions" }, { kind: "component", type: ThyTag, selector: "thy-tag,[thyTag]", inputs: ["thyTag", "thyShape", "thyColor", "thyTheme", "thySize", "thyHoverable"] }, { kind: "ngmodule", type: ThyPopoverModule }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyRate, selector: "thy-rate", inputs: ["thyCount", "thyDisabled", "thyAllowHalf", "thyAllowClear", "thyTooltips", "thyIconTemplate"], outputs: ["thyItemHoverChange"] }, { kind: "component", type: ThyProgress, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }, { kind: "pipe", type: ThyDatePickerFormatPipe, name: "thyDatePickerFormat" }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "ngmodule", type: ThyCheckboxModule }, { kind: "component", type: i3$1.ThyCheckbox, selector: "thy-checkbox,[thy-checkbox],[thyCheckbox]", inputs: ["thyIndeterminate"] }, { kind: "ngmodule", type: ThyAvatarModule }, { kind: "component", type: i4.ThyAvatar, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyRemovable", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyRemove", "thyError", "thySizeChange"] }, { kind: "component", type: i4.ThyAvatarList, selector: "thy-avatar-list", inputs: ["thyMode", "thyAvatarSize"] }, { kind: "pipe", type: IsSelectRecordPipe, name: "isSelectRecord" }, { kind: "component", type: SelectOptionComponent, selector: "select-option", inputs: ["field", "displayOption"] }, { kind: "pipe", type: UserPipe, name: "user" }, { kind: "pipe", type: SelectSettingPipe, name: "selectSetting" }, { kind: "pipe", type: MemberSettingPipe, name: "memberSetting" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11665
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableDomGrid, isStandalone: true, selector: "ai-table-dom-grid", host: { classAttribute: "ai-table-grid ai-table-dom-grid" }, providers: [AITableGridEventService, AITableGridFieldService], usesInheritance: true, ngImport: i0, template: "<div class=\"grid-header d-flex\">\n <div class=\"grid-column-checkbox grid-cell grid-checkbox\">\n <label thyCheckbox thyLabelText=\"\" [ngModel]=\"isSelectedAll()\" (ngModelChange)=\"toggleSelectAll($event)\"></label>\n </div>\n @for (field of gridData().fields; track field._id) {\n <div\n class=\"grid-cell grid-field\"\n #fieldAction\n [attr.fieldId]=\"field._id\"\n [ngClass]=\"{ highlight: aiTable.selection().selectedFields.has(field._id) }\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n <span class=\"text-truncate\">\n <thy-icon [thyIconName]=\"field.icon!\" class=\"mr-2 text-muted\"></thy-icon>\n <span>{{ field.name }}</span>\n </span>\n <a\n href=\"javascript:;\"\n class=\"grid-field-action\"\n thyAction\n thyIcon=\"more-vertical\"\n (click)=\"openFieldMenu($event, field, fieldAction)\"\n >\n </a>\n </div>\n }\n <div class=\"grid-column-blank cursor-pointer\" #gridColumnBlank (click)=\"addField(gridColumnBlank)\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n<div class=\"grid-body d-flex\">\n @for (record of gridData().records; track record._id; let index = $index) {\n <div class=\"grid-row d-flex\" [ngClass]=\"{ highlight: (record._id | isSelectRecord: aiTable.selection()) }\">\n <div class=\"grid-row-index grid-checkbox\">\n <label\n [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'checked-box' : 'unchecked-box'\"\n thyCheckbox\n thyLabelText=\"\"\n [ngModel]=\"record._id | isSelectRecord: aiTable.selection()\"\n (ngModelChange)=\"toggleSelectRecord(record._id)\"\n ></label>\n <span [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'grid-row-no-number' : 'grid-row-number'\">\n {{ index + 1 }}\n </span>\n </div>\n @for (field of gridData().fields; track field._id) {\n <!-- [ngClass]=\"{\n highlight: aiTable.selection().selectedCells.has(record._id) || aiTable.selection().selectedFields.has(field._id),\n selected: aiTable.selection().selectedCells.get(record._id)?.hasOwnProperty(field._id)\n }\" -->\n <div\n #cell\n class=\"grid-cell\"\n [attr.type]=\"[field.type]\"\n [attr.fieldId]=\"[field._id]\"\n [attr.recordId]=\"[record._id]\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n @switch (field.type) {\n @case (AITableFieldType.select) {\n @let fieldValue = record.values[field._id];\n @let settings = field.settings! | selectSetting;\n @let options = settings['options'];\n @let optionStyle = settings['option_style'] || AITableSelectOptionStyle.tag;\n @let isTagStyle = optionStyle === AITableSelectOptionStyle.tag;\n\n @if (!settings['is_multiple'] && fieldValue | selectOption: options; as selectedOption) {\n @if (isTagStyle) {\n <select-option class=\"mb-1 mr-1\" [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n </div>\n }\n } @else {\n @let maxShowCount = 2;\n\n <div class=\"d-flex\">\n @if (fieldValue | selectOptions: options; as selectedOptions) {\n @for (option of selectedOptions; track option!._id; let i = $index) {\n @if (i + 1 <= maxShowCount) {\n @if (isTagStyle) {\n <select-option\n class=\"mb-1 mr-1\"\n [field]=\"field\"\n [displayOption]=\"option!\"\n ></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"option!\"></select-option>\n </div>\n }\n }\n }\n\n @let selectedLength = selectedOptions.length || 0;\n @if (selectedOptions && maxShowCount < selectedLength) {\n @let shape = isTagStyle ? 'pill' : 'rectangle';\n @let isHidden = maxShowCount >= selectedLength;\n\n <thy-tag\n class=\"cursor-pointer\"\n [class.multi-property-value-hidden]=\"isHidden\"\n [thyShape]=\"shape\"\n >\n <span class=\"text-truncate\"> +{{ selectedLength - maxShowCount }} </span>\n </thy-tag>\n }\n }\n </div>\n }\n }\n @case (AITableFieldType.date) {\n {{ record.values[field._id].timestamp | thyDatePickerFormat }}\n }\n @case (AITableFieldType.updatedAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.createdAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.rate) {\n <thy-rate [ngModel]=\"record.values[field._id]\"></thy-rate>\n }\n @case (AITableFieldType.link) {\n <a\n class=\"d-block\"\n target=\"_blank\"\n [href]=\"record.values[field._id]?.url\"\n thyStopPropagation\n thyFlexibleText\n [thyTooltipContent]=\"record.values[field._id]?.text\"\n >\n {{ record.values[field._id]?.text }}\n </a>\n }\n @case (AITableFieldType.progress) {\n <thy-progress\n class=\"w-100\"\n [thyValue]=\"record.values[field._id] || 0\"\n [thySize]=\"record.values[field._id]?.config?.size || 'md'\"\n [thyMax]=\"record.values[field._id]?.config?.max || 100\"\n [thyType]=\"record.values[field._id]?.config?.progressType || 'success'\"\n >\n <span> {{ record.values[field._id] || 0 }}{{ record.values[field._id]?.config?.suffix || '%' }} </span>\n </thy-progress>\n }\n @case (AITableFieldType.member) {\n @let settings = field.settings! | memberSetting;\n\n @if (!settings!['is_multiple']) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n } @else {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n <thy-avatar-list thyAvatarSize=\"xs\">\n @for (item of recordValues; track $index) {\n <thy-avatar [thyName]=\"item.display_name!\" [thySrc]=\"item.avatar!\"></thy-avatar>\n }\n </thy-avatar-list>\n }\n }\n @case (AITableFieldType.createdBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @case (AITableFieldType.updatedBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @default {\n <span class=\"text-truncate\"> {{ record.values[field._id] }}</span>\n }\n }\n <div class=\"autofill-container\"></div>\n </div>\n }\n <div class=\"grid-column-blank\"></div>\n </div>\n }\n <div class=\"grid-row-insert grid-row cursor-pointer\" (click)=\"addRecord()\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n\n<div #activeBorder class=\"active-border\"></div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SelectOptionPipe, name: "selectOption" }, { kind: "pipe", type: SelectOptionsPipe, name: "selectOptions" }, { kind: "component", type: ThyTag, selector: "thy-tag,[thyTag]", inputs: ["thyTag", "thyShape", "thyColor", "thyTheme", "thySize", "thyHoverable"] }, { kind: "ngmodule", type: ThyPopoverModule }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyRate, selector: "thy-rate", inputs: ["thyCount", "thyDisabled", "thyAllowHalf", "thyAllowClear", "thyTooltips", "thyIconTemplate"], outputs: ["thyItemHoverChange"] }, { kind: "component", type: ThyProgress, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }, { kind: "pipe", type: ThyDatePickerFormatPipe, name: "thyDatePickerFormat" }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "ngmodule", type: ThyCheckboxModule }, { kind: "component", type: i3$1.ThyCheckbox, selector: "thy-checkbox,[thy-checkbox],[thyCheckbox]", inputs: ["thyIndeterminate"] }, { kind: "ngmodule", type: ThyAvatarModule }, { kind: "component", type: i4.ThyAvatar, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyRemovable", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyRemove", "thyError", "thySizeChange"] }, { kind: "component", type: i4.ThyAvatarList, selector: "thy-avatar-list", inputs: ["thyMode", "thyAvatarSize"] }, { kind: "pipe", type: IsSelectRecordPipe, name: "isSelectRecord" }, { kind: "component", type: SelectOptionComponent, selector: "select-option", inputs: ["field", "displayOption"] }, { kind: "pipe", type: UserPipe, name: "user" }, { kind: "pipe", type: SelectSettingPipe, name: "selectSetting" }, { kind: "pipe", type: MemberSettingPipe, name: "memberSetting" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11585
11666
  }
11586
11667
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableDomGrid, decorators: [{
11587
11668
  type: Component,
@@ -11609,7 +11690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
11609
11690
  UserPipe,
11610
11691
  SelectSettingPipe,
11611
11692
  MemberSettingPipe
11612
- ], providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService], template: "<div class=\"grid-header d-flex\">\n <div class=\"grid-column-checkbox grid-cell grid-checkbox\">\n <label thyCheckbox thyLabelText=\"\" [ngModel]=\"isSelectedAll()\" (ngModelChange)=\"toggleSelectAll($event)\"></label>\n </div>\n @for (field of gridData().fields; track field._id) {\n <div\n class=\"grid-cell grid-field\"\n #fieldAction\n [attr.fieldId]=\"field._id\"\n [ngClass]=\"{ highlight: aiTable.selection().selectedFields.has(field._id) }\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n <span class=\"text-truncate\">\n <thy-icon [thyIconName]=\"field.icon!\" class=\"mr-2 text-muted\"></thy-icon>\n <span>{{ field.name }}</span>\n </span>\n <a\n href=\"javascript:;\"\n class=\"grid-field-action\"\n thyAction\n thyIcon=\"more-vertical\"\n (click)=\"openFieldMenu($event, field, fieldAction)\"\n >\n </a>\n </div>\n }\n <div class=\"grid-column-blank cursor-pointer\" #gridColumnBlank (click)=\"addField(gridColumnBlank)\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n<div class=\"grid-body d-flex\">\n @for (record of gridData().records; track record._id; let index = $index) {\n <div class=\"grid-row d-flex\" [ngClass]=\"{ highlight: (record._id | isSelectRecord: aiTable.selection()) }\">\n <div class=\"grid-row-index grid-checkbox\">\n <label\n [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'checked-box' : 'unchecked-box'\"\n thyCheckbox\n thyLabelText=\"\"\n [ngModel]=\"record._id | isSelectRecord: aiTable.selection()\"\n (ngModelChange)=\"selectRecord(record._id)\"\n ></label>\n <span [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'grid-row-no-number' : 'grid-row-number'\">\n {{ index + 1 }}\n </span>\n </div>\n @for (field of gridData().fields; track field._id) {\n <!-- [ngClass]=\"{\n highlight: aiTable.selection().selectedCells.has(record._id) || aiTable.selection().selectedFields.has(field._id),\n selected: aiTable.selection().selectedCells.get(record._id)?.hasOwnProperty(field._id)\n }\" -->\n <div\n #cell\n class=\"grid-cell\"\n [attr.type]=\"[field.type]\"\n [attr.fieldId]=\"[field._id]\"\n [attr.recordId]=\"[record._id]\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n @switch (field.type) {\n @case (AITableFieldType.select) {\n @let fieldValue = record.values[field._id];\n @let settings = field.settings! | selectSetting;\n @let options = settings['options'];\n @let optionStyle = settings['option_style'] || AITableSelectOptionStyle.tag;\n @let isTagStyle = optionStyle === AITableSelectOptionStyle.tag;\n\n @if (!settings['is_multiple'] && fieldValue | selectOption: options; as selectedOption) {\n @if (isTagStyle) {\n <select-option class=\"mb-1 mr-1\" [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n </div>\n }\n } @else {\n @let maxShowCount = 2;\n\n <div class=\"d-flex\">\n @if (fieldValue | selectOptions: options; as selectedOptions) {\n @for (option of selectedOptions; track option!._id; let i = $index) {\n @if (i + 1 <= maxShowCount) {\n @if (isTagStyle) {\n <select-option\n class=\"mb-1 mr-1\"\n [field]=\"field\"\n [displayOption]=\"option!\"\n ></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"option!\"></select-option>\n </div>\n }\n }\n }\n\n @let selectedLength = selectedOptions.length || 0;\n @if (selectedOptions && maxShowCount < selectedLength) {\n @let shape = isTagStyle ? 'pill' : 'rectangle';\n @let isHidden = maxShowCount >= selectedLength;\n\n <thy-tag\n class=\"cursor-pointer\"\n [class.multi-property-value-hidden]=\"isHidden\"\n [thyShape]=\"shape\"\n >\n <span class=\"text-truncate\"> +{{ selectedLength - maxShowCount }} </span>\n </thy-tag>\n }\n }\n </div>\n }\n }\n @case (AITableFieldType.date) {\n {{ record.values[field._id].timestamp | thyDatePickerFormat }}\n }\n @case (AITableFieldType.updatedAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.createdAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.rate) {\n <thy-rate [ngModel]=\"record.values[field._id]\"></thy-rate>\n }\n @case (AITableFieldType.link) {\n <a\n class=\"d-block\"\n target=\"_blank\"\n [href]=\"record.values[field._id]?.url\"\n thyStopPropagation\n thyFlexibleText\n [thyTooltipContent]=\"record.values[field._id]?.text\"\n >\n {{ record.values[field._id]?.text }}\n </a>\n }\n @case (AITableFieldType.progress) {\n <thy-progress\n class=\"w-100\"\n [thyValue]=\"record.values[field._id] || 0\"\n [thySize]=\"record.values[field._id]?.config?.size || 'md'\"\n [thyMax]=\"record.values[field._id]?.config?.max || 100\"\n [thyType]=\"record.values[field._id]?.config?.progressType || 'success'\"\n >\n <span> {{ record.values[field._id] || 0 }}{{ record.values[field._id]?.config?.suffix || '%' }} </span>\n </thy-progress>\n }\n @case (AITableFieldType.member) {\n @let settings = field.settings! | memberSetting;\n\n @if (!settings!['is_multiple']) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n } @else {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n <thy-avatar-list thyAvatarSize=\"xs\">\n @for (item of recordValues; track $index) {\n <thy-avatar [thyName]=\"item.display_name!\" [thySrc]=\"item.avatar!\"></thy-avatar>\n }\n </thy-avatar-list>\n }\n }\n @case (AITableFieldType.createdBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @case (AITableFieldType.updatedBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @default {\n <span class=\"text-truncate\"> {{ record.values[field._id] }}</span>\n }\n }\n <div class=\"autofill-container\"></div>\n </div>\n }\n <div class=\"grid-column-blank\"></div>\n </div>\n }\n <div class=\"grid-row-insert grid-row cursor-pointer\" (click)=\"addRecord()\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n\n<div #activeBorder class=\"active-border\"></div>\n" }]
11693
+ ], providers: [AITableGridEventService, AITableGridFieldService], template: "<div class=\"grid-header d-flex\">\n <div class=\"grid-column-checkbox grid-cell grid-checkbox\">\n <label thyCheckbox thyLabelText=\"\" [ngModel]=\"isSelectedAll()\" (ngModelChange)=\"toggleSelectAll($event)\"></label>\n </div>\n @for (field of gridData().fields; track field._id) {\n <div\n class=\"grid-cell grid-field\"\n #fieldAction\n [attr.fieldId]=\"field._id\"\n [ngClass]=\"{ highlight: aiTable.selection().selectedFields.has(field._id) }\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n <span class=\"text-truncate\">\n <thy-icon [thyIconName]=\"field.icon!\" class=\"mr-2 text-muted\"></thy-icon>\n <span>{{ field.name }}</span>\n </span>\n <a\n href=\"javascript:;\"\n class=\"grid-field-action\"\n thyAction\n thyIcon=\"more-vertical\"\n (click)=\"openFieldMenu($event, field, fieldAction)\"\n >\n </a>\n </div>\n }\n <div class=\"grid-column-blank cursor-pointer\" #gridColumnBlank (click)=\"addField(gridColumnBlank)\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n<div class=\"grid-body d-flex\">\n @for (record of gridData().records; track record._id; let index = $index) {\n <div class=\"grid-row d-flex\" [ngClass]=\"{ highlight: (record._id | isSelectRecord: aiTable.selection()) }\">\n <div class=\"grid-row-index grid-checkbox\">\n <label\n [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'checked-box' : 'unchecked-box'\"\n thyCheckbox\n thyLabelText=\"\"\n [ngModel]=\"record._id | isSelectRecord: aiTable.selection()\"\n (ngModelChange)=\"toggleSelectRecord(record._id)\"\n ></label>\n <span [ngClass]=\"(record._id | isSelectRecord: aiTable.selection()) ? 'grid-row-no-number' : 'grid-row-number'\">\n {{ index + 1 }}\n </span>\n </div>\n @for (field of gridData().fields; track field._id) {\n <!-- [ngClass]=\"{\n highlight: aiTable.selection().selectedCells.has(record._id) || aiTable.selection().selectedFields.has(field._id),\n selected: aiTable.selection().selectedCells.get(record._id)?.hasOwnProperty(field._id)\n }\" -->\n <div\n #cell\n class=\"grid-cell\"\n [attr.type]=\"[field.type]\"\n [attr.fieldId]=\"[field._id]\"\n [attr.recordId]=\"[record._id]\"\n [ngStyle]=\"{ width: gridData().fieldsSizeMap[field._id] + 'px' }\"\n >\n @switch (field.type) {\n @case (AITableFieldType.select) {\n @let fieldValue = record.values[field._id];\n @let settings = field.settings! | selectSetting;\n @let options = settings['options'];\n @let optionStyle = settings['option_style'] || AITableSelectOptionStyle.tag;\n @let isTagStyle = optionStyle === AITableSelectOptionStyle.tag;\n\n @if (!settings['is_multiple'] && fieldValue | selectOption: options; as selectedOption) {\n @if (isTagStyle) {\n <select-option class=\"mb-1 mr-1\" [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"selectedOption\"></select-option>\n </div>\n }\n } @else {\n @let maxShowCount = 2;\n\n <div class=\"d-flex\">\n @if (fieldValue | selectOptions: options; as selectedOptions) {\n @for (option of selectedOptions; track option!._id; let i = $index) {\n @if (i + 1 <= maxShowCount) {\n @if (isTagStyle) {\n <select-option\n class=\"mb-1 mr-1\"\n [field]=\"field\"\n [displayOption]=\"option!\"\n ></select-option>\n } @else {\n <div thyTag class=\"mb-1 mr-1\">\n <select-option [field]=\"field\" [displayOption]=\"option!\"></select-option>\n </div>\n }\n }\n }\n\n @let selectedLength = selectedOptions.length || 0;\n @if (selectedOptions && maxShowCount < selectedLength) {\n @let shape = isTagStyle ? 'pill' : 'rectangle';\n @let isHidden = maxShowCount >= selectedLength;\n\n <thy-tag\n class=\"cursor-pointer\"\n [class.multi-property-value-hidden]=\"isHidden\"\n [thyShape]=\"shape\"\n >\n <span class=\"text-truncate\"> +{{ selectedLength - maxShowCount }} </span>\n </thy-tag>\n }\n }\n </div>\n }\n }\n @case (AITableFieldType.date) {\n {{ record.values[field._id].timestamp | thyDatePickerFormat }}\n }\n @case (AITableFieldType.updatedAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.createdAt) {\n <div class=\"d-block user-select-none\">\n <span class=\"text-truncate\">\n {{ record.values[field._id] | thyDatePickerFormat: 'yyyy-MM-dd HH:mm' }}\n </span>\n </div>\n }\n @case (AITableFieldType.rate) {\n <thy-rate [ngModel]=\"record.values[field._id]\"></thy-rate>\n }\n @case (AITableFieldType.link) {\n <a\n class=\"d-block\"\n target=\"_blank\"\n [href]=\"record.values[field._id]?.url\"\n thyStopPropagation\n thyFlexibleText\n [thyTooltipContent]=\"record.values[field._id]?.text\"\n >\n {{ record.values[field._id]?.text }}\n </a>\n }\n @case (AITableFieldType.progress) {\n <thy-progress\n class=\"w-100\"\n [thyValue]=\"record.values[field._id] || 0\"\n [thySize]=\"record.values[field._id]?.config?.size || 'md'\"\n [thyMax]=\"record.values[field._id]?.config?.max || 100\"\n [thyType]=\"record.values[field._id]?.config?.progressType || 'success'\"\n >\n <span> {{ record.values[field._id] || 0 }}{{ record.values[field._id]?.config?.suffix || '%' }} </span>\n </thy-progress>\n }\n @case (AITableFieldType.member) {\n @let settings = field.settings! | memberSetting;\n\n @if (!settings!['is_multiple']) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n } @else {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n <thy-avatar-list thyAvatarSize=\"xs\">\n @for (item of recordValues; track $index) {\n <thy-avatar [thyName]=\"item.display_name!\" [thySrc]=\"item.avatar!\"></thy-avatar>\n }\n </thy-avatar-list>\n }\n }\n @case (AITableFieldType.createdBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @case (AITableFieldType.updatedBy) {\n @let recordValues = record.values[field._id] | user: aiReferences()!;\n\n @if (recordValues && recordValues.length) {\n <thy-avatar\n [thyName]=\"recordValues[0].display_name!\"\n [thySrc]=\"recordValues[0].avatar!\"\n thySize=\"xs\"\n thyShowName=\"true\"\n ></thy-avatar>\n }\n }\n @default {\n <span class=\"text-truncate\"> {{ record.values[field._id] }}</span>\n }\n }\n <div class=\"autofill-container\"></div>\n </div>\n }\n <div class=\"grid-column-blank\"></div>\n </div>\n }\n <div class=\"grid-row-insert grid-row cursor-pointer\" (click)=\"addRecord()\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n </div>\n</div>\n\n<div #activeBorder class=\"active-border\"></div>\n" }]
11613
11694
  }] });
11614
11695
 
11615
11696
  class AITableScrollControllerService {
@@ -11812,7 +11893,7 @@ class AITableDragComponent {
11812
11893
  this.horizontalBar = input();
11813
11894
  this.verticalBar = input();
11814
11895
  this.dragEnd = output();
11815
- this.aiTableGridSelectionService = inject(AITableGridSelectionService);
11896
+ this.aiTableGridEventService = inject(AITableGridEventService);
11816
11897
  this.render2 = inject(Renderer2);
11817
11898
  this.scrollControllerService = inject(AITableScrollControllerService);
11818
11899
  this.elementRef = inject((ElementRef));
@@ -11877,7 +11958,7 @@ class AITableDragComponent {
11877
11958
  });
11878
11959
  }
11879
11960
  handleDragStateChange() {
11880
- const drag = this.aiTableGridSelectionService.aiTable.dragState?.();
11961
+ const drag = this.aiTableGridEventService.aiTable.dragState?.();
11881
11962
  if (!drag) {
11882
11963
  this.aiTableDrag = null;
11883
11964
  return;
@@ -11916,7 +11997,7 @@ class AITableDragComponent {
11916
11997
  }
11917
11998
  }
11918
11999
  movingColumn(drag, moveX, direction) {
11919
- const aiTable = this.aiTableGridSelectionService.aiTable;
12000
+ const aiTable = this.aiTableGridEventService.aiTable;
11920
12001
  const scroll = { x: this.horizontalBarElement?.scrollLeft || 0, y: 0 };
11921
12002
  const coordinate = drag.coordinate;
11922
12003
  const fields = aiTable.gridData().fields;
@@ -12043,7 +12124,7 @@ class AITableDragComponent {
12043
12124
  }
12044
12125
  movingColumnWidth(drag, moveX) {
12045
12126
  this.setCursorStyle('col-resize');
12046
- const aiTable = this.aiTableGridSelectionService.aiTable;
12127
+ const aiTable = this.aiTableGridEventService.aiTable;
12047
12128
  const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
12048
12129
  const sourceColumnIndex = visibleColumnIndexMap.get(drag.sourceIds.values().next().value) || 0;
12049
12130
  const sourceColumnStartX = drag.coordinate.getColumnOffset(sourceColumnIndex);
@@ -12073,7 +12154,7 @@ class AITableDragComponent {
12073
12154
  };
12074
12155
  }
12075
12156
  movingRecord(drag, moveY) {
12076
- const aiTable = this.aiTableGridSelectionService.aiTable;
12157
+ const aiTable = this.aiTableGridEventService.aiTable;
12077
12158
  const scroll = { x: 0, y: this.verticalBarElement?.scrollTop || 0 };
12078
12159
  const coordinate = drag.coordinate;
12079
12160
  const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
@@ -12349,6 +12430,9 @@ class AITableGrid extends AITableGridBase {
12349
12430
  this.coordinate = computed(() => {
12350
12431
  return this.rendererConfig().coordinate;
12351
12432
  });
12433
+ this.scrollState = computed(() => {
12434
+ return this.aiTable.context.scrollState();
12435
+ });
12352
12436
  this.scrollTotalHeight = computed(() => {
12353
12437
  return Math.max(this.coordinate().totalHeight, this.containerRect().height - this.fieldHeadHeight);
12354
12438
  });
@@ -12449,8 +12533,7 @@ class AITableGrid extends AITableGridBase {
12449
12533
  this.aiTable.selection.update((item) => {
12450
12534
  return {
12451
12535
  ...item,
12452
- selectedRecords,
12453
- selectAllState: this.aiTableGridSelectionService.selectAllState()
12536
+ selectedRecords
12454
12537
  };
12455
12538
  });
12456
12539
  });
@@ -12562,7 +12645,7 @@ class AITableGrid extends AITableGridBase {
12562
12645
  endCell = [recordId, fieldId];
12563
12646
  }
12564
12647
  if (startCell && !!startCell.length) {
12565
- this.aiTableGridSelectionService.selectCells(startCell, endCell, activeCell);
12648
+ selectCells(this.aiTable, startCell, endCell, activeCell);
12566
12649
  this.scrollViewToCell(pos, startCell, endCell, this.coordinate(), this.horizontalBarRef(), this.verticalBarRef());
12567
12650
  }
12568
12651
  }
@@ -12584,7 +12667,7 @@ class AITableGrid extends AITableGridBase {
12584
12667
  mouseEvent.preventDefault();
12585
12668
  if (!fieldId)
12586
12669
  return;
12587
- this.aiTableGridSelectionService.selectField(fieldId);
12670
+ selectField(this.aiTable, fieldId);
12588
12671
  this.handleFieldDragStart();
12589
12672
  return;
12590
12673
  case AI_TABLE_FIELD_HEAD_OPACITY_LINE:
@@ -12598,16 +12681,15 @@ class AITableGrid extends AITableGridBase {
12598
12681
  return;
12599
12682
  const startCell = [recordId, fieldId];
12600
12683
  this.updateDragSelectState(true, startCell);
12601
- const [expandRecordId, expandFieldId] = this.aiTable.selection().expandCell || [null, null];
12684
+ const [expandRecordId, expandFieldId] = this.aiTable.expendCell()?.path || [null, null];
12602
12685
  if (expandRecordId !== recordId || expandFieldId !== fieldId) {
12603
12686
  const field = this.aiTable.fieldsMap()[fieldId];
12687
+ closeEditingCell(this.aiTable);
12688
+ selectCells(this.aiTable, startCell);
12689
+ closeExpendCell(this.aiTable);
12604
12690
  if (field.type === AITableFieldType.text) {
12605
- this.aiTableGridSelectionService.clearSelection({ retainExpandCellInfo: true });
12606
12691
  expandCell(this.aiTable, [recordId, fieldId]);
12607
12692
  }
12608
- else {
12609
- this.aiTableGridSelectionService.selectCells(startCell);
12610
- }
12611
12693
  }
12612
12694
  return;
12613
12695
  case AI_TABLE_FILL_HANDLE:
@@ -12641,7 +12723,7 @@ class AITableGrid extends AITableGridBase {
12641
12723
  case AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX:
12642
12724
  return;
12643
12725
  default:
12644
- this.aiTableGridSelectionService.clearSelection();
12726
+ clearCoverCell(this.aiTable);
12645
12727
  }
12646
12728
  }
12647
12729
  stageMouseup(e) {
@@ -12731,23 +12813,23 @@ class AITableGrid extends AITableGridBase {
12731
12813
  return;
12732
12814
  switch (targetName) {
12733
12815
  case AI_TABLE_ROW_ADD_BUTTON: {
12734
- this.aiTableGridSelectionService.clearSelection();
12816
+ clearCoverCell(this.aiTable);
12735
12817
  this.addRecord();
12736
12818
  break;
12737
12819
  }
12738
12820
  case AI_TABLE_ROW_SELECT_CHECKBOX: {
12739
12821
  const { rowIndex: pointRowIndex } = context.pointPosition();
12740
12822
  const pointRecordId = context.linearRows()[pointRowIndex]?._id;
12741
- this.selectRecord(pointRecordId);
12823
+ this.toggleSelectRecord(pointRecordId);
12742
12824
  break;
12743
12825
  }
12744
12826
  case AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX: {
12745
- const isChecked = this.aiTable.selection().selectAllState === AITableSelectAllState.all;
12827
+ const isChecked = this.aiTable.selection().selectedRecords.size === this.aiTable.records().length;
12746
12828
  this.toggleSelectAll(!isChecked);
12747
12829
  break;
12748
12830
  }
12749
12831
  case AI_TABLE_FIELD_ADD_BUTTON: {
12750
- this.aiTableGridSelectionService.clearSelection();
12832
+ clearCoverCell(this.aiTable);
12751
12833
  const fieldGroupRect = e.event.target.getParent()?.getClientRect();
12752
12834
  const containerRect = this.containerElement().getBoundingClientRect();
12753
12835
  this.addField(this.containerElement(), {
@@ -12843,12 +12925,18 @@ class AITableGrid extends AITableGridBase {
12843
12925
  }
12844
12926
  bindGlobalMousedown() {
12845
12927
  fromEvent(document, 'mousedown', { passive: true })
12846
- .pipe(filter((e) => e.target instanceof Element &&
12847
- !this.containerElement().contains(e.target) &&
12848
- !e.target.closest(AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS)), takeUntilDestroyed(this.destroyRef))
12928
+ .pipe(filter((e) => {
12929
+ // 检查点击事件的目标元素是否在 container 内
12930
+ const isInContainer = e.target instanceof Element && this.containerElement().contains(e.target);
12931
+ // 检查点击事件的目标元素是否在 prevent-clear-selection 元素内
12932
+ const isInPreventClearSelection = e.target instanceof Element && e.target.closest(AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS);
12933
+ // 检查点击事件的目标元素是否在 popover 弹窗内
12934
+ const isInPopover = e.target instanceof Element && e.target.closest('.cdk-overlay-container');
12935
+ return e.target instanceof Element && !isInContainer && !isInPreventClearSelection && !isInPopover;
12936
+ }), takeUntilDestroyed(this.destroyRef))
12849
12937
  .subscribe(() => {
12850
12938
  this.updateDragSelectState(false, null);
12851
- this.aiTableGridSelectionService.clearSelection();
12939
+ clearCoverCell(this.aiTable);
12852
12940
  });
12853
12941
  }
12854
12942
  updateDragSelectState(isDragging, startCell) {
@@ -12886,6 +12974,23 @@ class AITableGrid extends AITableGridBase {
12886
12974
  });
12887
12975
  this.resizeObserver.observe(this.containerElement());
12888
12976
  }
12977
+ getNextCell(currentCell, event) {
12978
+ const { rowIndex, columnIndex } = AITable.getCellIndex(this.aiTable, currentCell) || {};
12979
+ let nextCellPath = null;
12980
+ if (event.key === 'ArrowUp' && rowIndex) {
12981
+ nextCellPath = [this.aiTable.gridData().records[rowIndex - 1]._id, currentCell[1]];
12982
+ }
12983
+ if (event.key === 'ArrowDown' && rowIndex < this.gridData().records.length - 1) {
12984
+ nextCellPath = [this.aiTable.gridData().records[rowIndex + 1]._id, currentCell[1]];
12985
+ }
12986
+ if (event.key === 'ArrowLeft' && columnIndex) {
12987
+ nextCellPath = [currentCell[0], this.aiTable.gridData().fields[columnIndex - 1]._id];
12988
+ }
12989
+ if (event.key === 'ArrowRight' && columnIndex < this.aiTable.gridData().fields.length - 1) {
12990
+ nextCellPath = [currentCell[0], this.aiTable.gridData().fields[columnIndex + 1]._id];
12991
+ }
12992
+ return nextCellPath;
12993
+ }
12889
12994
  bindShortcuts() {
12890
12995
  fromEvent(document, 'keydown')
12891
12996
  .pipe(takeUntilDestroyed(this.destroyRef))
@@ -12909,6 +13014,46 @@ class AITableGrid extends AITableGridBase {
12909
13014
  event.preventDefault();
12910
13015
  const isCopyOrPaste = (event.ctrlKey || event.metaKey) && (event.key === 'c' || event.key === 'v');
12911
13016
  const isDeleteOrBackspace = event.key === 'Backspace' || event.key === 'Delete';
13017
+ const isDirectionKey = event.key === 'ArrowUp' || event.key === 'ArrowDown' || event.key === 'ArrowLeft' || event.key === 'ArrowRight';
13018
+ const isShiftDirectionKey = event.shiftKey &&
13019
+ (event.key === 'ArrowUp' || event.key === 'ArrowDown' || event.key === 'ArrowLeft' || event.key === 'ArrowRight');
13020
+ if (isDirectionKey) {
13021
+ let endCell = this.aiTable.selection().activeCell;
13022
+ if (isShiftDirectionKey) {
13023
+ endCell = this.aiTable.selection().selectedEndCell || endCell;
13024
+ }
13025
+ if (endCell) {
13026
+ const nextCellPath = this.getNextCell(endCell, event);
13027
+ if (nextCellPath) {
13028
+ const newField = this.aiTable.fieldsMap()[nextCellPath[1]];
13029
+ if (isShiftDirectionKey) {
13030
+ closeExpendCell(this.aiTable);
13031
+ selectCells(this.aiTable, this.aiTable.selection().activeCell, nextCellPath);
13032
+ }
13033
+ else {
13034
+ clearCoverCell(this.aiTable);
13035
+ if (newField.type === AITableFieldType.text) {
13036
+ setExpandCellInfo(this.aiTable, {
13037
+ path: nextCellPath
13038
+ });
13039
+ }
13040
+ setSelection(this.aiTable, {
13041
+ selectedCells: new Set([nextCellPath.join(':')]),
13042
+ activeCell: nextCellPath
13043
+ });
13044
+ }
13045
+ const cellIsFullRenderInfo = this.coordinate().getCellIsFullRenderInfo(this.aiTable, nextCellPath);
13046
+ if (cellIsFullRenderInfo.offsetY !== 0 || cellIsFullRenderInfo.offsetX !== 0) {
13047
+ this.scrollAction({
13048
+ deltaX: cellIsFullRenderInfo.offsetX,
13049
+ deltaY: cellIsFullRenderInfo.offsetY,
13050
+ shiftKey: false
13051
+ });
13052
+ }
13053
+ }
13054
+ }
13055
+ return;
13056
+ }
12912
13057
  if (isCopyOrPaste) {
12913
13058
  if (event.key === 'c') {
12914
13059
  this.copyCells();
@@ -12968,10 +13113,10 @@ class AITableGrid extends AITableGridBase {
12968
13113
  });
12969
13114
  }
12970
13115
  handleFieldDragStart() {
12971
- if (!this.aiReadonly() && this.aiTableGridSelectionService.selectedFields.size > 0) {
13116
+ if (!this.aiReadonly() && this.aiTable.selection().selectedFields.size > 0) {
12972
13117
  this.setDragState({
12973
13118
  type: DragType.field,
12974
- sourceIds: this.aiTableGridSelectionService.selectedFields,
13119
+ sourceIds: this.aiTable.selection().selectedFields,
12975
13120
  coordinate: this.coordinate()
12976
13121
  });
12977
13122
  }
@@ -13090,7 +13235,7 @@ class AITableGrid extends AITableGridBase {
13090
13235
  newEndCell = [nextRecord._id, nextField._id];
13091
13236
  newActiveCell = null;
13092
13237
  }
13093
- this.aiTableGridSelectionService.selectCells(newStartCell, newEndCell, newActiveCell);
13238
+ selectCells(this.aiTable, newStartCell, newEndCell, newActiveCell);
13094
13239
  }
13095
13240
  }
13096
13241
  },
@@ -13101,18 +13246,18 @@ class AITableGrid extends AITableGridBase {
13101
13246
  });
13102
13247
  }
13103
13248
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13104
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableGrid, isStandalone: true, selector: "ai-table-grid", host: { classAttribute: "ai-table-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService, AITableScrollControllerService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "verticalBarRef", first: true, predicate: ["verticalBar"], descendants: true, isSignal: true }, { propertyName: "horizontalBarRef", first: true, predicate: ["horizontalBar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div\n class=\"ai-table-left-background\"\n [thyTooltip]=\"i18nTexts().rowAddFilterTooltip\"\n [style.--scroll-top.px]=\"domToolTip.top\"\n >\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n", dependencies: [{ kind: "component", type: AITableRenderer, selector: "ai-table-renderer", inputs: ["config"], outputs: ["koMousemove", "koMousedown", "koMouseup", "koContextmenu", "koWheel", "koClick", "koDblclick", "koMouseleave", "onScrollPosition"] }, { kind: "component", type: AITableDragComponent, selector: "ai-table-drag", inputs: ["horizontalBar", "verticalBar"], outputs: ["dragEnd"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13249
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableGrid, isStandalone: true, selector: "ai-table-grid", host: { classAttribute: "ai-table-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableScrollControllerService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "verticalBarRef", first: true, predicate: ["verticalBar"], descendants: true, isSignal: true }, { propertyName: "horizontalBarRef", first: true, predicate: ["horizontalBar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div\n class=\"ai-table-left-background\"\n [thyTooltip]=\"i18nTexts().rowAddFilterTooltip\"\n [style.--scroll-top.px]=\"domToolTip.top\"\n >\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n", dependencies: [{ kind: "component", type: AITableRenderer, selector: "ai-table-renderer", inputs: ["config"], outputs: ["koMousemove", "koMousedown", "koMouseup", "koContextmenu", "koWheel", "koClick", "koDblclick", "koMouseleave", "onScrollPosition"] }, { kind: "component", type: AITableDragComponent, selector: "ai-table-drag", inputs: ["horizontalBar", "verticalBar"], outputs: ["dragEnd"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13105
13250
  }
13106
13251
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGrid, decorators: [{
13107
13252
  type: Component,
13108
13253
  args: [{ selector: 'ai-table-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
13109
13254
  class: 'ai-table-grid'
13110
- }, imports: [AITableRenderer, AITableDragComponent, ThyTooltipDirective, ThyIcon], providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService, AITableScrollControllerService], template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div\n class=\"ai-table-left-background\"\n [thyTooltip]=\"i18nTexts().rowAddFilterTooltip\"\n [style.--scroll-top.px]=\"domToolTip.top\"\n >\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n" }]
13255
+ }, imports: [AITableRenderer, AITableDragComponent, ThyTooltipDirective, ThyIcon], providers: [AITableGridEventService, AITableGridFieldService, AITableScrollControllerService], template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div\n class=\"ai-table-left-background\"\n [thyTooltip]=\"i18nTexts().rowAddFilterTooltip\"\n [style.--scroll-top.px]=\"domToolTip.top\"\n >\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n" }]
13111
13256
  }], ctorParameters: () => [] });
13112
13257
 
13113
13258
  /**
13114
13259
  * Generated bundle index. Do not edit.
13115
13260
  */
13116
13261
 
13117
- export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableBackground, AITableCellAttachment, AITableCellCheckbox, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCellText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenFieldShadow, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGridSelectionService, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableScrollableGroup, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EDIT, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_LINE_BORDER, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FIELD_STAT_BG, AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT, AI_TABLE_FIELD_STAT_INNER_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_OPTION_MULTI_ITEM_FONT_SIZE, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, Colors, ColumnCalendarFilledPath, ColumnCheckboxFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellBase, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, setExpandCellInfo, setMouseStyle, shortIdCreator, shortIdsCreator, statDateRangeOfDays, statDateRangeOfMonths, statEarliestTime, statLatestTime, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
13262
+ export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableBackground, AITableCellAttachment, AITableCellCheckbox, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCellText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenFieldShadow, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableScrollableGroup, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EDIT, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_LINE_BORDER, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FIELD_STAT_BG, AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT, AI_TABLE_FIELD_STAT_INNER_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_OPTION_MULTI_ITEM_FONT_SIZE, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, CheckboxMenuSort, Colors, ColumnCalendarFilledPath, ColumnCheckboxFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellBase, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, clearCoverCell, clearSelectedCells, clearSelection, clearSelectionFields, clearSelectionRecords, closeEditingCell, closeExpendCell, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, selectCells, selectField, setActiveCell, setEditingCell, setExpandCellInfo, setMouseStyle, setSelection, shortIdCreator, shortIdsCreator, statDateRangeOfDays, statDateRangeOfMonths, statEarliestTime, statLatestTime, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, toggleSelectAllRecords, toggleSelectRecord, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
13118
13263
  //# sourceMappingURL=ai-table-grid.mjs.map