@ai-table/grid 0.1.36 → 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.
- package/components/field-menu/field-menu.component.d.ts +1 -0
- package/components/field-menu/field-menu.component.d.ts.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.d.ts.map +1 -1
- package/components/menu-checkbox-sort/checkbox-menu-sort.component.d.ts +15 -0
- package/components/menu-checkbox-sort/checkbox-menu-sort.component.d.ts.map +1 -0
- package/components/menu-checkbox-sort/checkbox-menu-sort.component.scss +25 -0
- package/core/coordinate.d.ts +16 -1
- package/core/coordinate.d.ts.map +1 -1
- package/core/utils/common.d.ts.map +1 -1
- package/fesm2022/ai-table-grid.mjs +263 -77
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid.component.d.ts +2 -0
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/services/event.service.d.ts.map +1 -1
- package/styles/styles.scss +1 -0
- package/types/field.d.ts +2 -0
- package/types/field.d.ts.map +1 -1
- package/types/grid.d.ts +1 -0
- package/types/grid.d.ts.map +1 -1
- package/utils/cell.d.ts +1 -1
- package/utils/cell.d.ts.map +1 -1
- package/utils/field/field.d.ts.map +1 -1
- package/utils/record.d.ts.map +1 -1
@@ -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,
|
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';
|
@@ -63,10 +63,10 @@ import { ThyTag } from 'ngx-tethys/tag';
|
|
63
63
|
import { ThySwitch } from 'ngx-tethys/switch';
|
64
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';
|
@@ -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
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
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
|
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) {
|
@@ -1362,7 +1414,8 @@ function createAITable(records, fields, gridData) {
|
|
1362
1414
|
selectedRecords: new Set(),
|
1363
1415
|
selectedFields: new Set(),
|
1364
1416
|
selectedCells: new Set(),
|
1365
|
-
activeCell: null
|
1417
|
+
activeCell: null,
|
1418
|
+
selectedEndCell: null
|
1366
1419
|
}),
|
1367
1420
|
expendCell: signal({ path: null }),
|
1368
1421
|
editingCell: signal({ path: null }),
|
@@ -1985,7 +2038,8 @@ function clearSelection(aiTable) {
|
|
1985
2038
|
selectedRecords: new Set(),
|
1986
2039
|
selectedFields: new Set(),
|
1987
2040
|
selectedCells: new Set(),
|
1988
|
-
activeCell: null
|
2041
|
+
activeCell: null,
|
2042
|
+
selectedEndCell: null
|
1989
2043
|
});
|
1990
2044
|
}
|
1991
2045
|
function clearSelectionRecords(aiTable) {
|
@@ -2021,10 +2075,10 @@ function setSelection(aiTable, selection) {
|
|
2021
2075
|
...selection
|
2022
2076
|
});
|
2023
2077
|
}
|
2024
|
-
function setActiveCell(aiTable,
|
2078
|
+
function setActiveCell(aiTable, activeCellPath) {
|
2025
2079
|
aiTable.selection.set({
|
2026
2080
|
...aiTable.selection(),
|
2027
|
-
|
2081
|
+
activeCell: activeCellPath
|
2028
2082
|
});
|
2029
2083
|
}
|
2030
2084
|
function setEditingCell(aiTable, editingCell) {
|
@@ -2045,9 +2099,7 @@ function selectCells(aiTable, startCell, endCell, activeCell) {
|
|
2045
2099
|
selectedCells.add(`${startRecordId}:${startFieldId}`);
|
2046
2100
|
}
|
2047
2101
|
else {
|
2048
|
-
|
2049
|
-
const lastItem = Array.from(aiTable.selection().selectedCells).pop();
|
2050
|
-
if (endCell.join(':') === lastItem) {
|
2102
|
+
if (endCell && endCell.join(':') === aiTable.selection().selectedEndCell?.join(':')) {
|
2051
2103
|
return;
|
2052
2104
|
}
|
2053
2105
|
const [endRecordId, endFieldId] = endCell;
|
@@ -2068,6 +2120,7 @@ function selectCells(aiTable, startCell, endCell, activeCell) {
|
|
2068
2120
|
clearSelection(aiTable);
|
2069
2121
|
setSelection(aiTable, {
|
2070
2122
|
activeCell: activeCell || startCell,
|
2123
|
+
selectedEndCell: endCell || null,
|
2071
2124
|
selectedCells: selectedCells
|
2072
2125
|
});
|
2073
2126
|
}
|
@@ -3315,7 +3368,8 @@ function selectField(aiTable, fieldId) {
|
|
3315
3368
|
selectedRecords: new Set(),
|
3316
3369
|
selectedFields: new Set([fieldId]),
|
3317
3370
|
selectedCells: new Set(),
|
3318
|
-
activeCell: null
|
3371
|
+
activeCell: null,
|
3372
|
+
selectedEndCell: null
|
3319
3373
|
});
|
3320
3374
|
}
|
3321
3375
|
|
@@ -10555,7 +10609,8 @@ function toggleSelectRecord(aiTable, recordId) {
|
|
10555
10609
|
selectedRecords: selectedRecords,
|
10556
10610
|
selectedFields: new Set(),
|
10557
10611
|
selectedCells: new Set(),
|
10558
|
-
activeCell: null
|
10612
|
+
activeCell: null,
|
10613
|
+
selectedEndCell: null
|
10559
10614
|
});
|
10560
10615
|
}
|
10561
10616
|
function toggleSelectAllRecords(aiTable, checked) {
|
@@ -11057,6 +11112,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
11057
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" }]
|
11058
11113
|
}] });
|
11059
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
|
+
|
11060
11176
|
const GRID_CELL_EDITOR_MAP = {
|
11061
11177
|
[AITableFieldType.text]: TextCellEditorComponent,
|
11062
11178
|
[AITableFieldType.richText]: TextCellEditorComponent,
|
@@ -11194,6 +11310,7 @@ class AITableGridEventService {
|
|
11194
11310
|
const { component, isInternalComponent } = this.getEditorComponent(fieldType);
|
11195
11311
|
const offsetOriginPosition = this.getOriginPosition(aiTable, options);
|
11196
11312
|
setEditingCell(aiTable, { path: [recordId, fieldId] });
|
11313
|
+
closeExpendCell(this.aiTable);
|
11197
11314
|
this.cellEditorPopoverRef = this.thyPopover.open(component, {
|
11198
11315
|
viewContainerRef: isInternalComponent ? undefined : options?.viewContainerRef,
|
11199
11316
|
origin: container,
|
@@ -11301,6 +11418,9 @@ class AITableFieldMenu extends ThyDropdownAbstractMenu {
|
|
11301
11418
|
return this.aiTable.fields().find((item) => item._id === this.fieldId);
|
11302
11419
|
});
|
11303
11420
|
}
|
11421
|
+
getCustomComponent(menu) {
|
11422
|
+
return menu.customComponent?.(this.aiTable, this.field());
|
11423
|
+
}
|
11304
11424
|
execute(menu) {
|
11305
11425
|
if ((menu.disabled && !menu.disabled(this.aiTable, this.field)) || !menu.disabled) {
|
11306
11426
|
menu.exec && menu.exec(this.aiTable, this.field, this.origin, this.position);
|
@@ -11313,13 +11433,13 @@ class AITableFieldMenu extends ThyDropdownAbstractMenu {
|
|
11313
11433
|
return menu.name || '';
|
11314
11434
|
}
|
11315
11435
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
11316
|
-
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
|
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 }); }
|
11317
11437
|
}
|
11318
11438
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldMenu, decorators: [{
|
11319
11439
|
type: Component,
|
11320
11440
|
args: [{ selector: 'ai-table-field-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
11321
11441
|
class: 'field-menu'
|
11322
|
-
}, 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
|
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" }]
|
11323
11443
|
}], propDecorators: { fieldId: [{
|
11324
11444
|
type: Input,
|
11325
11445
|
args: [{ required: true }]
|
@@ -12310,6 +12430,9 @@ class AITableGrid extends AITableGridBase {
|
|
12310
12430
|
this.coordinate = computed(() => {
|
12311
12431
|
return this.rendererConfig().coordinate;
|
12312
12432
|
});
|
12433
|
+
this.scrollState = computed(() => {
|
12434
|
+
return this.aiTable.context.scrollState();
|
12435
|
+
});
|
12313
12436
|
this.scrollTotalHeight = computed(() => {
|
12314
12437
|
return Math.max(this.coordinate().totalHeight, this.containerRect().height - this.fieldHeadHeight);
|
12315
12438
|
});
|
@@ -12802,9 +12925,15 @@ class AITableGrid extends AITableGridBase {
|
|
12802
12925
|
}
|
12803
12926
|
bindGlobalMousedown() {
|
12804
12927
|
fromEvent(document, 'mousedown', { passive: true })
|
12805
|
-
.pipe(filter((e) =>
|
12806
|
-
|
12807
|
-
|
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))
|
12808
12937
|
.subscribe(() => {
|
12809
12938
|
this.updateDragSelectState(false, null);
|
12810
12939
|
clearCoverCell(this.aiTable);
|
@@ -12845,6 +12974,23 @@ class AITableGrid extends AITableGridBase {
|
|
12845
12974
|
});
|
12846
12975
|
this.resizeObserver.observe(this.containerElement());
|
12847
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
|
+
}
|
12848
12994
|
bindShortcuts() {
|
12849
12995
|
fromEvent(document, 'keydown')
|
12850
12996
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
@@ -12868,6 +13014,46 @@ class AITableGrid extends AITableGridBase {
|
|
12868
13014
|
event.preventDefault();
|
12869
13015
|
const isCopyOrPaste = (event.ctrlKey || event.metaKey) && (event.key === 'c' || event.key === 'v');
|
12870
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
|
+
}
|
12871
13057
|
if (isCopyOrPaste) {
|
12872
13058
|
if (event.key === 'c') {
|
12873
13059
|
this.copyCells();
|
@@ -13073,5 +13259,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
13073
13259
|
* Generated bundle index. Do not edit.
|
13074
13260
|
*/
|
13075
13261
|
|
13076
|
-
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, 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 };
|
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 };
|
13077
13263
|
//# sourceMappingURL=ai-table-grid.mjs.map
|