@ai-table/grid 0.2.5 → 0.3.1
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/cell-editors/abstract-cell-editor.component.d.ts.map +1 -1
- package/components/cell-editors/select/select-editor.component.d.ts.map +1 -1
- package/components/cell-editors/text/text-editor.component.d.ts.map +1 -1
- package/components/drag/drag.component.d.ts.map +1 -1
- package/components/menu-checkbox-sort/checkbox-menu-sort.component.d.ts.map +1 -1
- package/components/stat-type-menu/stat-type-menucomponent.d.ts.map +1 -1
- package/constants/field-stat.d.ts.map +1 -1
- package/core/coordinate.d.ts.map +1 -1
- package/core/utils/common.d.ts +0 -1
- package/core/utils/common.d.ts.map +1 -1
- package/core/utils/field.d.ts +1 -1
- package/core/utils/field.d.ts.map +1 -1
- package/core/utils/index.d.ts +1 -0
- package/core/utils/index.d.ts.map +1 -1
- package/core/utils/name-creator.d.ts +5 -0
- package/core/utils/name-creator.d.ts.map +1 -0
- package/fesm2022/ai-table-grid.mjs +147 -137
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid-base.component.d.ts.map +1 -1
- package/grid.component.d.ts +2 -0
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/components/cells/attachment.component.d.ts.map +1 -1
- package/renderer/components/cells/link.component.d.ts.map +1 -1
- package/renderer/components/cells/single-text.component.d.ts +1 -0
- package/renderer/components/cells/single-text.component.d.ts.map +1 -1
- package/renderer/components/field-stat/stat.component.d.ts.map +1 -1
- package/renderer/components/field-stat/stats.component.d.ts.map +1 -1
- package/renderer/components/frozen-heads.component.d.ts +0 -1
- package/renderer/components/frozen-heads.component.d.ts.map +1 -1
- package/renderer/components/group/frozen-groups.component.d.ts.map +1 -1
- package/renderer/components/group/groups.component.d.ts.map +1 -1
- package/renderer/components/hover-row-heads.component.d.ts.map +1 -1
- package/renderer/components/scrollable-group/scrollable-group.component.d.ts.map +1 -1
- package/renderer/components/text.component.d.ts.map +1 -1
- package/renderer/creations/create-cells.d.ts.map +1 -1
- package/renderer/drawers/add-row-layout-drawer.d.ts.map +1 -1
- package/renderer/drawers/cell-drawer.d.ts.map +1 -1
- package/renderer/drawers/group-layout.d.ts.map +1 -1
- package/renderer/drawers/record-row-layout-drawer.d.ts.map +1 -1
- package/types/cell.d.ts.map +1 -1
- package/types/component-config.d.ts.map +1 -1
- package/utils/cell.d.ts.map +1 -1
- package/utils/clipboard/clipboard.d.ts +2 -2
- package/utils/clipboard/clipboard.d.ts.map +1 -1
- package/utils/clipboard/paste.d.ts +1 -1
- package/utils/clipboard/paste.d.ts.map +1 -1
- package/utils/field/model/checkbox.d.ts.map +1 -1
- package/utils/field-stat.d.ts.map +1 -1
- package/utils/get-placeholder-cells.d.ts.map +1 -1
- package/utils/record.d.ts.map +1 -1
|
@@ -1439,6 +1439,57 @@ function shortIdsCreator(count) {
|
|
|
1439
1439
|
return shortId(undefined, 8, count);
|
|
1440
1440
|
}
|
|
1441
1441
|
|
|
1442
|
+
const isSystemField = (field) => {
|
|
1443
|
+
return [AITableFieldType.createdAt, AITableFieldType.createdBy, AITableFieldType.updatedAt, AITableFieldType.updatedBy].includes(field.type);
|
|
1444
|
+
};
|
|
1445
|
+
function createDefaultFieldName(aiTable, field) {
|
|
1446
|
+
const fieldOption = getFieldOptionByField(aiTable, field);
|
|
1447
|
+
if (fieldOption) {
|
|
1448
|
+
return generateNewFieldName(aiTable, field, fieldOption.name);
|
|
1449
|
+
}
|
|
1450
|
+
const fieldOptions = getFieldOptions(aiTable);
|
|
1451
|
+
return fieldOptions[0].name;
|
|
1452
|
+
}
|
|
1453
|
+
function getFieldOptionByField(aiTable, field) {
|
|
1454
|
+
const fieldOptions = getFieldOptions(aiTable);
|
|
1455
|
+
let fieldOption = fieldOptions.find((item) => isSameFieldOption(item, field));
|
|
1456
|
+
if (fieldOption && field.type === AITableFieldType.member && field.settings?.is_multiple) {
|
|
1457
|
+
fieldOption.width = AI_TABLE_FIELD_MIDDLE_WIDTH;
|
|
1458
|
+
}
|
|
1459
|
+
return fieldOption;
|
|
1460
|
+
}
|
|
1461
|
+
function isSameFieldOption(fieldOption, field) {
|
|
1462
|
+
return (fieldOption.type === field.type &&
|
|
1463
|
+
(fieldOption.type === AITableFieldType.select
|
|
1464
|
+
? !!fieldOption.settings?.is_multiple === !!field.settings?.is_multiple
|
|
1465
|
+
: true));
|
|
1466
|
+
}
|
|
1467
|
+
function createDefaultField(aiTable, type = AITableFieldType.text) {
|
|
1468
|
+
const fieldOptions = getFieldOptions(aiTable);
|
|
1469
|
+
const fieldOption = fieldOptions.find((item) => item.type === type);
|
|
1470
|
+
return { _id: idCreator$1(), type, name: createDefaultFieldName(aiTable, fieldOption) };
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
function generateNewName(existNames, count, name) {
|
|
1474
|
+
let newName = name;
|
|
1475
|
+
let suffix = count;
|
|
1476
|
+
if (count > 1) {
|
|
1477
|
+
newName = `${name} ${suffix}`;
|
|
1478
|
+
}
|
|
1479
|
+
while (existNames.includes(newName)) {
|
|
1480
|
+
suffix++;
|
|
1481
|
+
newName = `${name} ${suffix}`;
|
|
1482
|
+
}
|
|
1483
|
+
return newName;
|
|
1484
|
+
}
|
|
1485
|
+
function generateNewFieldName(aiTable, field, name, existNames) {
|
|
1486
|
+
existNames = existNames || aiTable.fields().map((item) => item.name);
|
|
1487
|
+
const count = aiTable.fields().filter((item) => {
|
|
1488
|
+
return isSameFieldOption(field, item);
|
|
1489
|
+
}).length;
|
|
1490
|
+
return generateNewName(existNames, count, name);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1442
1493
|
function createAITable(records, fields, gridData) {
|
|
1443
1494
|
const aiTable = {
|
|
1444
1495
|
records,
|
|
@@ -1477,53 +1528,6 @@ function createAITable(records, fields, gridData) {
|
|
|
1477
1528
|
};
|
|
1478
1529
|
return aiTable;
|
|
1479
1530
|
}
|
|
1480
|
-
function generateNewName(existNames, count, name) {
|
|
1481
|
-
let newName = name;
|
|
1482
|
-
let suffix = count;
|
|
1483
|
-
if (count > 1) {
|
|
1484
|
-
newName = `${name} ${suffix}`;
|
|
1485
|
-
}
|
|
1486
|
-
while (existNames.includes(newName)) {
|
|
1487
|
-
suffix++;
|
|
1488
|
-
newName = `${name} ${suffix}`;
|
|
1489
|
-
}
|
|
1490
|
-
return newName;
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
const isSystemField = (field) => {
|
|
1494
|
-
return [AITableFieldType.createdAt, AITableFieldType.createdBy, AITableFieldType.updatedAt, AITableFieldType.updatedBy].includes(field.type);
|
|
1495
|
-
};
|
|
1496
|
-
function createDefaultFieldName(aiTable, field) {
|
|
1497
|
-
const fieldOption = getFieldOptionByField(aiTable, field);
|
|
1498
|
-
if (fieldOption) {
|
|
1499
|
-
const allNames = aiTable.fields().map((item) => item.name);
|
|
1500
|
-
const count = aiTable.fields().filter((item) => {
|
|
1501
|
-
return isSameFieldOption(field, item);
|
|
1502
|
-
}).length;
|
|
1503
|
-
return generateNewName(allNames, count, fieldOption.name);
|
|
1504
|
-
}
|
|
1505
|
-
const fieldOptions = getFieldOptions(aiTable);
|
|
1506
|
-
return fieldOptions[0].name;
|
|
1507
|
-
}
|
|
1508
|
-
function getFieldOptionByField(aiTable, field) {
|
|
1509
|
-
const fieldOptions = getFieldOptions(aiTable);
|
|
1510
|
-
let fieldOption = fieldOptions.find((item) => isSameFieldOption(item, field));
|
|
1511
|
-
if (fieldOption && field.type === AITableFieldType.member && field.settings?.is_multiple) {
|
|
1512
|
-
fieldOption.width = AI_TABLE_FIELD_MIDDLE_WIDTH;
|
|
1513
|
-
}
|
|
1514
|
-
return fieldOption;
|
|
1515
|
-
}
|
|
1516
|
-
function isSameFieldOption(fieldOption, field) {
|
|
1517
|
-
return (fieldOption.type === field.type &&
|
|
1518
|
-
(fieldOption.type === AITableFieldType.select
|
|
1519
|
-
? !!fieldOption.settings?.is_multiple === !!field.settings?.is_multiple
|
|
1520
|
-
: true));
|
|
1521
|
-
}
|
|
1522
|
-
function createDefaultField(aiTable, type = AITableFieldType.text) {
|
|
1523
|
-
const fieldOptions = getFieldOptions(aiTable);
|
|
1524
|
-
const fieldOption = fieldOptions.find((item) => item.type === type);
|
|
1525
|
-
return { _id: idCreator$1(), type, name: createDefaultFieldName(aiTable, fieldOption) };
|
|
1526
|
-
}
|
|
1527
1531
|
|
|
1528
1532
|
function getFieldValue(record, field) {
|
|
1529
1533
|
if (isSystemField(field)) {
|
|
@@ -2414,7 +2418,7 @@ const isClipboardReadSupported = () => {
|
|
|
2414
2418
|
const isClipboardReadTextSupported = () => {
|
|
2415
2419
|
return 'clipboard' in navigator && 'readText' in navigator.clipboard;
|
|
2416
2420
|
};
|
|
2417
|
-
const writeToClipboard = async (data) => {
|
|
2421
|
+
const writeToClipboard = async (data, dataTransfer) => {
|
|
2418
2422
|
try {
|
|
2419
2423
|
const { text, html } = data;
|
|
2420
2424
|
if (isClipboardWriteSupported()) {
|
|
@@ -2423,24 +2427,24 @@ const writeToClipboard = async (data) => {
|
|
|
2423
2427
|
'text/html': new Blob([html], { type: 'text/html' })
|
|
2424
2428
|
});
|
|
2425
2429
|
await navigator.clipboard.write([clipboardItem]);
|
|
2430
|
+
return;
|
|
2426
2431
|
}
|
|
2427
|
-
|
|
2428
|
-
|
|
2432
|
+
if (dataTransfer) {
|
|
2433
|
+
dataTransfer.setData(`text/html`, html);
|
|
2434
|
+
dataTransfer.setData(`text/plain`, text);
|
|
2435
|
+
window.dataTransfer = dataTransfer;
|
|
2436
|
+
return;
|
|
2429
2437
|
}
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
document.body.appendChild(textarea);
|
|
2434
|
-
textarea.select();
|
|
2435
|
-
document.execCommand('copy');
|
|
2436
|
-
document.body.removeChild(textarea);
|
|
2438
|
+
if (isClipboardWriteTextSupported()) {
|
|
2439
|
+
await navigator.clipboard.writeText(text);
|
|
2440
|
+
return;
|
|
2437
2441
|
}
|
|
2438
2442
|
}
|
|
2439
2443
|
catch (error) {
|
|
2440
2444
|
console.warn('Failed to write clipboard:', error);
|
|
2441
2445
|
}
|
|
2442
2446
|
};
|
|
2443
|
-
const readFromClipboard = async () => {
|
|
2447
|
+
const readFromClipboard = async (dataTransfer) => {
|
|
2444
2448
|
try {
|
|
2445
2449
|
let clipboardData = {};
|
|
2446
2450
|
if (isClipboardReadSupported()) {
|
|
@@ -2457,32 +2461,28 @@ const readFromClipboard = async () => {
|
|
|
2457
2461
|
}
|
|
2458
2462
|
}
|
|
2459
2463
|
}
|
|
2464
|
+
const { html, text } = clipboardData;
|
|
2465
|
+
if (html || text) {
|
|
2466
|
+
return clipboardData;
|
|
2467
|
+
}
|
|
2460
2468
|
}
|
|
2461
|
-
|
|
2462
|
-
const
|
|
2463
|
-
|
|
2469
|
+
if (dataTransfer) {
|
|
2470
|
+
const html = dataTransfer.getData(`text/html`);
|
|
2471
|
+
const text = dataTransfer.getData(`text/plain`);
|
|
2472
|
+
html && (clipboardData.html = html);
|
|
2473
|
+
text && (clipboardData.text = text);
|
|
2474
|
+
if (html || text) {
|
|
2475
|
+
return clipboardData;
|
|
2476
|
+
}
|
|
2464
2477
|
}
|
|
2465
|
-
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
const html = e.clipboardData?.getData('text/html') || '';
|
|
2472
|
-
resolve({
|
|
2473
|
-
text,
|
|
2474
|
-
html: html || undefined
|
|
2475
|
-
});
|
|
2476
|
-
textarea.removeEventListener('paste', handlePaste);
|
|
2477
|
-
};
|
|
2478
|
-
textarea.addEventListener('paste', handlePaste);
|
|
2479
|
-
textarea.focus();
|
|
2480
|
-
document.execCommand('paste');
|
|
2481
|
-
document.body.removeChild(textarea);
|
|
2482
|
-
});
|
|
2483
|
-
clipboardData = await pastePromise;
|
|
2478
|
+
if (isClipboardReadTextSupported()) {
|
|
2479
|
+
const text = await navigator.clipboard.readText();
|
|
2480
|
+
text && (clipboardData.text = text);
|
|
2481
|
+
if (text) {
|
|
2482
|
+
return clipboardData;
|
|
2483
|
+
}
|
|
2484
2484
|
}
|
|
2485
|
-
return
|
|
2485
|
+
return null;
|
|
2486
2486
|
}
|
|
2487
2487
|
catch (error) {
|
|
2488
2488
|
console.warn('Failed to read clipboard:', error);
|
|
@@ -3666,8 +3666,8 @@ function extractAITableContentFromClipboardHtml(clipboardHtml) {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
return null;
|
|
3668
3668
|
}
|
|
3669
|
-
const readClipboardData = async () => {
|
|
3670
|
-
const clipboardData = await readFromClipboard();
|
|
3669
|
+
const readClipboardData = async (dataTransfer) => {
|
|
3670
|
+
const clipboardData = await readFromClipboard(dataTransfer);
|
|
3671
3671
|
let clipboardContent = [];
|
|
3672
3672
|
let aiTableContent = null;
|
|
3673
3673
|
if (clipboardData) {
|
|
@@ -3737,7 +3737,7 @@ function appendField(aiTable, originField, actions) {
|
|
|
3737
3737
|
defaultValue: defaultFieldValue
|
|
3738
3738
|
});
|
|
3739
3739
|
}
|
|
3740
|
-
const writeToAITable = async (aiTable, actions) => {
|
|
3740
|
+
const writeToAITable = async (aiTable, actions, dataTransfer) => {
|
|
3741
3741
|
const selectedCells = Array.from(aiTable.selection().selectedCells);
|
|
3742
3742
|
const result = {
|
|
3743
3743
|
isPasteSuccess: false,
|
|
@@ -3747,7 +3747,7 @@ const writeToAITable = async (aiTable, actions) => {
|
|
|
3747
3747
|
if (!selectedCells.length) {
|
|
3748
3748
|
return result;
|
|
3749
3749
|
}
|
|
3750
|
-
const { clipboardContent, aiTableContent } = await readClipboardData();
|
|
3750
|
+
const { clipboardContent, aiTableContent } = await readClipboardData(dataTransfer);
|
|
3751
3751
|
if (!clipboardContent.length) {
|
|
3752
3752
|
return result;
|
|
3753
3753
|
}
|
|
@@ -3758,8 +3758,9 @@ const writeToAITable = async (aiTable, actions) => {
|
|
|
3758
3758
|
const startRowIndex = aiTable.context.visibleRowsIndexMap().get(startRecordId) ?? 0;
|
|
3759
3759
|
const lastRowIndex = getGroupLastRecordIndex(aiTable, startRowIndex);
|
|
3760
3760
|
let appendRowCount = clipboardContent.length - (lastRowIndex - startRowIndex) - 1;
|
|
3761
|
-
|
|
3762
|
-
|
|
3761
|
+
// 最后一行时 + 按钮,需要排除最后一行
|
|
3762
|
+
const recordsCount = aiTable.records().length - 1;
|
|
3763
|
+
if (maxRecords && recordsCount + appendRowCount >= maxRecords) {
|
|
3763
3764
|
appendRowCount = maxRecords - recordsCount;
|
|
3764
3765
|
result.isPasteOverMaxRecords = true;
|
|
3765
3766
|
}
|
|
@@ -3777,7 +3778,7 @@ const writeToAITable = async (aiTable, actions) => {
|
|
|
3777
3778
|
const appendOffset = copiedFieldLength - appendColCount;
|
|
3778
3779
|
const fieldsCount = aiTable.fields().length;
|
|
3779
3780
|
for (let i = 0; i < appendColCount; i++) {
|
|
3780
|
-
if (maxFields && fieldsCount + i + 1
|
|
3781
|
+
if (maxFields && fieldsCount + i + 1 <= maxFields) {
|
|
3781
3782
|
const originField = aiTableContent?.fields[appendOffset + i] || null;
|
|
3782
3783
|
appendField(aiTable, originField, actions);
|
|
3783
3784
|
}
|
|
@@ -5681,13 +5682,7 @@ class AddRowLayout extends Layout {
|
|
|
5681
5682
|
const columnWidth = this.columnWidth;
|
|
5682
5683
|
const frozenOffset = AI_TABLE_OFFSET;
|
|
5683
5684
|
const fill = isHoverRow ? this.colors.gray80 : this.colors.transparent;
|
|
5684
|
-
|
|
5685
|
-
if (this.hiddenIndexColumn) {
|
|
5686
|
-
x = frozenOffset;
|
|
5687
|
-
}
|
|
5688
|
-
else {
|
|
5689
|
-
x = frozenOffset + (this.hiddenRowDrag ? 0 : AI_TABLE_ROW_DRAG_ICON_WIDTH);
|
|
5690
|
-
}
|
|
5685
|
+
const x = frozenOffset + AI_TABLE_ROW_DRAG_ICON_WIDTH;
|
|
5691
5686
|
this.rect({
|
|
5692
5687
|
x,
|
|
5693
5688
|
y: y + AI_TABLE_OFFSET,
|
|
@@ -6926,12 +6921,11 @@ class RecordRowLayout extends Layout {
|
|
|
6926
6921
|
const rowHeight = this.rowHeight;
|
|
6927
6922
|
const columnWidth = this.columnWidth;
|
|
6928
6923
|
const colors = AITable.getColors();
|
|
6929
|
-
const dragOccupyWidth = this.hiddenRowDrag || this.readonly ? 0 : AI_TABLE_ROW_DRAG_ICON_WIDTH;
|
|
6930
6924
|
if (!this.hiddenIndexColumn) {
|
|
6931
6925
|
this.customRect({
|
|
6932
|
-
x: AI_TABLE_OFFSET +
|
|
6926
|
+
x: AI_TABLE_OFFSET + AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
6933
6927
|
y,
|
|
6934
|
-
width: this.rowHeadWidth - AI_TABLE_OFFSET -
|
|
6928
|
+
width: this.rowHeadWidth - AI_TABLE_OFFSET - AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
6935
6929
|
height: rowHeight,
|
|
6936
6930
|
fill: indexFill,
|
|
6937
6931
|
strokes: {
|
|
@@ -6943,7 +6937,7 @@ class RecordRowLayout extends Layout {
|
|
|
6943
6937
|
// 设置字体样式,居中绘制行号
|
|
6944
6938
|
this.setStyle({ fontSize: DEFAULT_FONT_SIZE });
|
|
6945
6939
|
this.text({
|
|
6946
|
-
x: (this.rowHeadWidth +
|
|
6940
|
+
x: (this.rowHeadWidth + AI_TABLE_ROW_DRAG_ICON_WIDTH) / 2,
|
|
6947
6941
|
y: y + AI_TABLE_FIELD_HEAD_HEIGHT / 2,
|
|
6948
6942
|
text: String(row.displayIndex),
|
|
6949
6943
|
textAlign: DEFAULT_TEXT_ALIGN_CENTER,
|
|
@@ -7044,12 +7038,11 @@ class GroupLayout extends Layout {
|
|
|
7044
7038
|
const rowHeight = this.rowHeight;
|
|
7045
7039
|
const columnWidth = this.columnWidth;
|
|
7046
7040
|
const { fill: indexFill } = indexStyle || {};
|
|
7047
|
-
const dragOccupyWidth = this.hiddenRowDrag || this.readonly ? 0 : AI_TABLE_ROW_DRAG_ICON_WIDTH;
|
|
7048
7041
|
if (!this.hiddenIndexColumn) {
|
|
7049
7042
|
this.customRect({
|
|
7050
|
-
x: AI_TABLE_OFFSET +
|
|
7043
|
+
x: AI_TABLE_OFFSET + AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
7051
7044
|
y,
|
|
7052
|
-
width: this.rowHeadWidth - AI_TABLE_OFFSET -
|
|
7045
|
+
width: this.rowHeadWidth - AI_TABLE_OFFSET - AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
7053
7046
|
height: rowHeight,
|
|
7054
7047
|
fill: indexFill,
|
|
7055
7048
|
strokes: {
|
|
@@ -7059,7 +7052,7 @@ class GroupLayout extends Layout {
|
|
|
7059
7052
|
});
|
|
7060
7053
|
// 第一列单元格
|
|
7061
7054
|
this.rect({
|
|
7062
|
-
x: AI_TABLE_CELL_PADDING +
|
|
7055
|
+
x: AI_TABLE_CELL_PADDING + AI_TABLE_ROW_DRAG_ICON_WIDTH + 2,
|
|
7063
7056
|
y: this.y + (rowHeight - AI_TABLE_ICON_COMMON_SIZE) / 2,
|
|
7064
7057
|
width: AI_TABLE_ICON_COMMON_SIZE,
|
|
7065
7058
|
height: AI_TABLE_ICON_COMMON_SIZE,
|
|
@@ -7943,22 +7936,18 @@ class AITableFrozenColumnHeads {
|
|
|
7943
7936
|
return {
|
|
7944
7937
|
x: AI_TABLE_OFFSET,
|
|
7945
7938
|
y: AI_TABLE_OFFSET,
|
|
7946
|
-
width: ctx.rowHeadWidth() || 0,
|
|
7939
|
+
width: ctx.rowHeadWidth() - AI_TABLE_CELL_LINE_BORDER || 0,
|
|
7947
7940
|
height: this.fieldHeadHeight(),
|
|
7948
7941
|
fill: Colors.white,
|
|
7949
7942
|
listening: false
|
|
7950
7943
|
};
|
|
7951
7944
|
});
|
|
7952
|
-
this.dragOccupyWidth = computed(() => {
|
|
7953
|
-
const ctx = this.context();
|
|
7954
|
-
return ctx?.aiFieldConfig()?.hiddenRowDrag || this.readonly() ? 0 : AI_TABLE_ROW_DRAG_ICON_WIDTH;
|
|
7955
|
-
});
|
|
7956
7945
|
this.topLineConfig = computed(() => {
|
|
7957
7946
|
const ctx = this.context();
|
|
7958
7947
|
if (!ctx)
|
|
7959
7948
|
return { points: [0, 0, 0, 0] };
|
|
7960
7949
|
return {
|
|
7961
|
-
x: AI_TABLE_OFFSET +
|
|
7950
|
+
x: AI_TABLE_OFFSET + AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
7962
7951
|
y: AI_TABLE_OFFSET,
|
|
7963
7952
|
points: [0, 0, ctx.rowHeadWidth(), 0],
|
|
7964
7953
|
stroke: Colors.gray200,
|
|
@@ -7971,7 +7960,7 @@ class AITableFrozenColumnHeads {
|
|
|
7971
7960
|
if (!ctx)
|
|
7972
7961
|
return { points: [0, 0, 0, 0] };
|
|
7973
7962
|
return {
|
|
7974
|
-
x: AI_TABLE_OFFSET +
|
|
7963
|
+
x: AI_TABLE_OFFSET + AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
7975
7964
|
y: AI_TABLE_OFFSET,
|
|
7976
7965
|
points: [ctx.rowHeadWidth(), this.fieldHeadHeight(), 0, this.fieldHeadHeight()],
|
|
7977
7966
|
stroke: Colors.gray200,
|
|
@@ -7982,7 +7971,7 @@ class AITableFrozenColumnHeads {
|
|
|
7982
7971
|
this.iconConfig = computed(() => {
|
|
7983
7972
|
return {
|
|
7984
7973
|
name: AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX,
|
|
7985
|
-
x: AI_TABLE_CELL_PADDING +
|
|
7974
|
+
x: AI_TABLE_CELL_PADDING + AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
7986
7975
|
y: (this.fieldHeadHeight() - AI_TABLE_ICON_COMMON_SIZE) / 2,
|
|
7987
7976
|
type: this.isChecked() ? AITableCheckType.checked : AITableCheckType.unchecked,
|
|
7988
7977
|
fill: this.isChecked() || (this.config().pointPosition.targetName === AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX && !this.isChecked())
|
|
@@ -7995,7 +7984,7 @@ class AITableFrozenColumnHeads {
|
|
|
7995
7984
|
const lineHeight = AI_TABLE_TEXT_LINE_HEIGHT;
|
|
7996
7985
|
const measureText = TextMeasure().measureText(text);
|
|
7997
7986
|
return {
|
|
7998
|
-
x: AI_TABLE_CELL_PADDING +
|
|
7987
|
+
x: AI_TABLE_CELL_PADDING + AI_TABLE_ROW_DRAG_ICON_WIDTH + measureText.width / 2,
|
|
7999
7988
|
y: measureText.height / 2,
|
|
8000
7989
|
width: measureText.width,
|
|
8001
7990
|
height: measureText.height,
|
|
@@ -8233,13 +8222,12 @@ class AITableHoverRowHeads {
|
|
|
8233
8222
|
};
|
|
8234
8223
|
if (isCheckedRow || isHoverRow) {
|
|
8235
8224
|
const iconOffsetY = (AI_TABLE_FIELD_HEAD_HEIGHT - 16) / 2;
|
|
8236
|
-
const dragOccupyWidth = this.hiddenRowDrag() ? 0 : AI_TABLE_ROW_DRAG_ICON_WIDTH;
|
|
8237
8225
|
operationGroup.iconConfig = {
|
|
8238
8226
|
name: generateTargetName({
|
|
8239
8227
|
targetName: AI_TABLE_ROW_SELECT_CHECKBOX,
|
|
8240
8228
|
recordId
|
|
8241
8229
|
}),
|
|
8242
|
-
x: AI_TABLE_CELL_PADDING +
|
|
8230
|
+
x: AI_TABLE_CELL_PADDING + AI_TABLE_ROW_DRAG_ICON_WIDTH,
|
|
8243
8231
|
y: iconOffsetY,
|
|
8244
8232
|
type: isCheckedRow ? AITableCheckType.checked : AITableCheckType.unchecked,
|
|
8245
8233
|
fill: isCheckedRow || (targetName === AI_TABLE_ROW_SELECT_CHECKBOX && !isCheckedRow) ? Colors.primary : Colors.gray300
|
|
@@ -10849,11 +10837,16 @@ class AITableCellText extends CoverCellBase {
|
|
|
10849
10837
|
const { columnWidth } = render;
|
|
10850
10838
|
if (isExpand) {
|
|
10851
10839
|
return {
|
|
10840
|
+
name: generateTargetName({
|
|
10841
|
+
targetName: AI_TABLE_CELL,
|
|
10842
|
+
fieldId: field._id,
|
|
10843
|
+
recordId
|
|
10844
|
+
}),
|
|
10852
10845
|
width: columnWidth - AI_TABLE_CELL_BORDER / 2,
|
|
10853
10846
|
height: this.height(),
|
|
10854
10847
|
stroke: Colors.primary,
|
|
10855
10848
|
strokeWidth: 2,
|
|
10856
|
-
listening:
|
|
10849
|
+
listening: true
|
|
10857
10850
|
};
|
|
10858
10851
|
}
|
|
10859
10852
|
return null;
|
|
@@ -13258,6 +13251,8 @@ class AITableGrid extends AITableGridBase {
|
|
|
13258
13251
|
this.bindGlobalMousedown();
|
|
13259
13252
|
this.containerResizeListener();
|
|
13260
13253
|
this.bindShortcuts();
|
|
13254
|
+
this.subscribeCopyEvent();
|
|
13255
|
+
this.subscribePasteEvent();
|
|
13261
13256
|
});
|
|
13262
13257
|
effect(() => {
|
|
13263
13258
|
if (this.hasContainerRect() && this.horizontalBarRef() && this.verticalBarRef()) {
|
|
@@ -13320,10 +13315,7 @@ class AITableGrid extends AITableGridBase {
|
|
|
13320
13315
|
rowHeadWidth: computed(() => {
|
|
13321
13316
|
const aiFieldConfig = this.aiFieldConfig();
|
|
13322
13317
|
let width = AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH;
|
|
13323
|
-
|
|
13324
|
-
width = AI_TABLE_ROW_HEAD_WIDTH;
|
|
13325
|
-
}
|
|
13326
|
-
return aiFieldConfig?.hiddenIndexColumn ? 0 : width;
|
|
13318
|
+
return aiFieldConfig?.hiddenIndexColumn ? AI_TABLE_ROW_DRAG_ICON_WIDTH : width;
|
|
13327
13319
|
}),
|
|
13328
13320
|
linearRows: this.linearRows,
|
|
13329
13321
|
visibleColumnsIndexMap: this.visibleColumnsIndexMap,
|
|
@@ -13749,6 +13741,30 @@ class AITableGrid extends AITableGridBase {
|
|
|
13749
13741
|
clearCoverCell(this.aiTable);
|
|
13750
13742
|
});
|
|
13751
13743
|
}
|
|
13744
|
+
subscribeCopyEvent() {
|
|
13745
|
+
fromEvent(document, 'copy')
|
|
13746
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
13747
|
+
.subscribe((event) => {
|
|
13748
|
+
if (this.aiReadonly()) {
|
|
13749
|
+
return;
|
|
13750
|
+
}
|
|
13751
|
+
const dataTransfer = event.clipboardData;
|
|
13752
|
+
this.copyCells(dataTransfer);
|
|
13753
|
+
event.preventDefault();
|
|
13754
|
+
});
|
|
13755
|
+
}
|
|
13756
|
+
subscribePasteEvent() {
|
|
13757
|
+
fromEvent(document, 'paste')
|
|
13758
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
13759
|
+
.subscribe((event) => {
|
|
13760
|
+
if (this.aiReadonly()) {
|
|
13761
|
+
return;
|
|
13762
|
+
}
|
|
13763
|
+
const dataTransfer = event.clipboardData;
|
|
13764
|
+
this.pasteCells(dataTransfer);
|
|
13765
|
+
event.preventDefault();
|
|
13766
|
+
});
|
|
13767
|
+
}
|
|
13752
13768
|
updateDragSelectState(isDragging, startCell) {
|
|
13753
13769
|
this.dragSelectState = {
|
|
13754
13770
|
isDragging: isDragging,
|
|
@@ -13865,7 +13881,6 @@ class AITableGrid extends AITableGridBase {
|
|
|
13865
13881
|
if (hasContentEditable) {
|
|
13866
13882
|
return;
|
|
13867
13883
|
}
|
|
13868
|
-
const isCopyOrPaste = (event.ctrlKey || event.metaKey) && (event.key === 'c' || event.key === 'v');
|
|
13869
13884
|
const isDeleteOrBackspace = event.key === 'Backspace' || event.key === 'Delete';
|
|
13870
13885
|
const isDirectionKey = event.key === 'ArrowUp' || event.key === 'ArrowDown' || event.key === 'ArrowLeft' || event.key === 'ArrowRight';
|
|
13871
13886
|
const isShiftDirectionKey = event.shiftKey &&
|
|
@@ -13908,16 +13923,6 @@ class AITableGrid extends AITableGridBase {
|
|
|
13908
13923
|
event.preventDefault();
|
|
13909
13924
|
return;
|
|
13910
13925
|
}
|
|
13911
|
-
if (isCopyOrPaste) {
|
|
13912
|
-
if (event.key === 'c') {
|
|
13913
|
-
this.copyCells();
|
|
13914
|
-
}
|
|
13915
|
-
else if (event.key === 'v') {
|
|
13916
|
-
this.pasteCells();
|
|
13917
|
-
}
|
|
13918
|
-
event.preventDefault();
|
|
13919
|
-
return;
|
|
13920
|
-
}
|
|
13921
13926
|
if (isDeleteOrBackspace) {
|
|
13922
13927
|
clearCells(this.aiTable, this.actions);
|
|
13923
13928
|
event.preventDefault();
|
|
@@ -13945,10 +13950,10 @@ class AITableGrid extends AITableGridBase {
|
|
|
13945
13950
|
}
|
|
13946
13951
|
});
|
|
13947
13952
|
}
|
|
13948
|
-
copyCells() {
|
|
13953
|
+
copyCells(dataTransfer) {
|
|
13949
13954
|
const clipboardData = buildClipboardData(this.aiTable);
|
|
13950
13955
|
if (clipboardData) {
|
|
13951
|
-
writeToClipboard(clipboardData).then(() => {
|
|
13956
|
+
writeToClipboard(clipboardData, dataTransfer).then(() => {
|
|
13952
13957
|
const copiedCellsCount = this.aiTable.selection().selectedCells.size;
|
|
13953
13958
|
const message = getI18nTextByKey(this.aiTable, AITableGridI18nKey.copiedCells).replace('{count}', copiedCellsCount.toString());
|
|
13954
13959
|
this.notifyService.success(message, undefined, {
|
|
@@ -13957,12 +13962,17 @@ class AITableGrid extends AITableGridBase {
|
|
|
13957
13962
|
});
|
|
13958
13963
|
}
|
|
13959
13964
|
}
|
|
13960
|
-
pasteCells() {
|
|
13961
|
-
writeToAITable(this.aiTable, this.actions).then((result) => {
|
|
13962
|
-
|
|
13965
|
+
pasteCells(dataTransfer) {
|
|
13966
|
+
writeToAITable(this.aiTable, this.actions, dataTransfer).then((result) => {
|
|
13967
|
+
const { isPasteOverMaxRecords, isPasteOverMaxFields, isPasteSuccess } = result;
|
|
13968
|
+
if (isPasteOverMaxRecords || isPasteOverMaxFields) {
|
|
13969
|
+
const message = getI18nTextByKey(this.aiTable, isPasteOverMaxRecords ? AITableGridI18nKey.pasteOverMaxRecords : AITableGridI18nKey.pasteOverMaxFields);
|
|
13970
|
+
this.notifyService.error(message, undefined, {
|
|
13971
|
+
placement: 'bottomLeft'
|
|
13972
|
+
});
|
|
13963
13973
|
return;
|
|
13964
13974
|
}
|
|
13965
|
-
if (!
|
|
13975
|
+
if (!isPasteSuccess) {
|
|
13966
13976
|
this.notifyService.error(getI18nTextByKey(this.aiTable, AITableGridI18nKey.invalidPasteContent), undefined, {
|
|
13967
13977
|
placement: 'bottomLeft'
|
|
13968
13978
|
});
|
|
@@ -14116,5 +14126,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
14116
14126
|
* Generated bundle index. Do not edit.
|
|
14117
14127
|
*/
|
|
14118
14128
|
|
|
14119
|
-
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, AITableFrozenGroups, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGroups, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableScrollableGroup, AITableSelectAllState, AITableShadow, 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_GROUP_MAX_LEVEL, 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_GROUP_COLLAPSE_BUTTON, AI_TABLE_ROW_GROUP_OFFSET, 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_SHADOW_DEFAULT_WIDTH, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AngleRightPath, 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, GROUP_STAT_DEFAULT_FONT_SIZE, 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, buildNormalLinearRows, 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, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getGroupLastRecordIndex, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isEmptyOrNot, isMac, isMeetFilter, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, scrollToMatchedCell, selectCells, selectField, setActiveCell, setCollapseDisabled, 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 };
|
|
14129
|
+
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, AITableFrozenGroups, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGroups, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableScrollableGroup, AITableSelectAllState, AITableShadow, 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_GROUP_MAX_LEVEL, 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_GROUP_COLLAPSE_BUTTON, AI_TABLE_ROW_GROUP_OFFSET, 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_SHADOW_DEFAULT_WIDTH, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AngleRightPath, 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, GROUP_STAT_DEFAULT_FONT_SIZE, 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, buildNormalLinearRows, castToString, cellDrawer, clearCells, clearCoverCell, clearSelectedCells, clearSelection, clearSelectionFields, clearSelectionRecords, closeEditingCell, closeExpendCell, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewFieldName, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getGroupLastRecordIndex, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isEmptyOrNot, isMac, isMeetFilter, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, scrollToMatchedCell, selectCells, selectField, setActiveCell, setCollapseDisabled, 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 };
|
|
14120
14130
|
//# sourceMappingURL=ai-table-grid.mjs.map
|