@ai-table/grid 0.0.48 → 0.0.50

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 (35) hide show
  1. package/components/drag/drag.component.d.ts +3 -0
  2. package/components/drag/drag.component.d.ts.map +1 -1
  3. package/core/coordinate.d.ts.map +1 -1
  4. package/esm2022/components/drag/drag.component.mjs +35 -3
  5. package/esm2022/components/field-menu/field-menu.component.mjs +3 -3
  6. package/esm2022/core/coordinate.mjs +3 -3
  7. package/esm2022/grid.component.mjs +22 -23
  8. package/esm2022/renderer/components/add-field-column.component.mjs +5 -2
  9. package/esm2022/renderer/creations/create-cells.mjs +2 -2
  10. package/esm2022/utils/field/model/attachment.mjs +4 -4
  11. package/esm2022/utils/field/model/field.mjs +2 -2
  12. package/esm2022/utils/field/model/index.mjs +3 -2
  13. package/esm2022/utils/field/model/member.mjs +4 -4
  14. package/esm2022/utils/field/model/rich-text.mjs +39 -0
  15. package/esm2022/utils/field/model/select.mjs +4 -4
  16. package/esm2022/utils/style.mjs +5 -2
  17. package/fesm2022/ai-table-grid.mjs +112 -42
  18. package/fesm2022/ai-table-grid.mjs.map +1 -1
  19. package/grid.component.d.ts +1 -0
  20. package/grid.component.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/renderer/components/add-field-column.component.d.ts.map +1 -1
  23. package/utils/field/model/attachment.d.ts +5 -2
  24. package/utils/field/model/attachment.d.ts.map +1 -1
  25. package/utils/field/model/field.d.ts +9 -2
  26. package/utils/field/model/field.d.ts.map +1 -1
  27. package/utils/field/model/index.d.ts.map +1 -1
  28. package/utils/field/model/member.d.ts +5 -2
  29. package/utils/field/model/member.d.ts.map +1 -1
  30. package/utils/field/model/rich-text.d.ts +22 -0
  31. package/utils/field/model/rich-text.d.ts.map +1 -0
  32. package/utils/field/model/select.d.ts +6 -3
  33. package/utils/field/model/select.d.ts.map +1 -1
  34. package/utils/style.d.ts +1 -1
  35. package/utils/style.d.ts.map +1 -1
@@ -956,7 +956,7 @@ class Coordinate {
956
956
  * 根据 columnIndex 获取对应列宽
957
957
  */
958
958
  getColumnWidth(index) {
959
- return this.columnIndicesSizeMap[index];
959
+ return this.columnIndicesSizeMap[index] ?? 0;
960
960
  }
961
961
  /**
962
962
  * 获取每个 cell 垂直/水平方向的坐标信息
@@ -980,7 +980,7 @@ class Coordinate {
980
980
  offset = itemMetadata.offset + itemMetadata.size;
981
981
  }
982
982
  for (let i = lastMeasuredIndex + 1; i <= index; i++) {
983
- const size = isColumnType ? this.columnIndicesSizeMap[i] : (this.rowIndicesSizeMap[i] ?? this.rowHeight);
983
+ const size = isColumnType ? (this.columnIndicesSizeMap[i] ?? 0) : (this.rowIndicesSizeMap[i] ?? this.rowHeight);
984
984
  cellMetadataMap[i] = {
985
985
  offset,
986
986
  size
@@ -2560,13 +2560,13 @@ class AITableFieldMenu extends ThyDropdownAbstractMenu {
2560
2560
  return menu.name || '';
2561
2561
  }
2562
2562
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AITableFieldMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2563
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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: "@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", 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 }); }
2563
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 }); }
2564
2564
  }
2565
2565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AITableFieldMenu, decorators: [{
2566
2566
  type: Component,
2567
2567
  args: [{ selector: 'ai-table-field-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
2568
2568
  class: 'field-menu'
2569
- }, imports: [ThyIcon, ThyDivider, ThyDropdownMenuItemDirective, NgClass], template: "@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" }]
2569
+ }, 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" }]
2570
2570
  }], propDecorators: { fieldId: [{
2571
2571
  type: Input,
2572
2572
  args: [{ required: true }]
@@ -3134,7 +3134,7 @@ function hasIntersect(array1, array2) {
3134
3134
 
3135
3135
  class Field {
3136
3136
  // 筛选
3137
- isMeetFilter(condition, cellValue) {
3137
+ isMeetFilter(condition, cellValue, options) {
3138
3138
  switch (condition.operation) {
3139
3139
  case AITableFilterOperation.empty:
3140
3140
  case AITableFilterOperation.exists: {
@@ -3183,9 +3183,9 @@ class AttachmentField extends Field {
3183
3183
  return super.isMeetFilter(condition, cellValue);
3184
3184
  }
3185
3185
  }
3186
- compare(cellValue1, cellValue2, field, references, sortKey) {
3187
- const value1 = cellValueToSortValue$5(cellValue1, field, references, sortKey);
3188
- const value2 = cellValueToSortValue$5(cellValue2, field, references, sortKey);
3186
+ compare(cellValue1, cellValue2, references, sortKey, options) {
3187
+ const value1 = cellValueToSortValue$5(cellValue1, options.field, references, sortKey);
3188
+ const value2 = cellValueToSortValue$5(cellValue2, options.field, references, sortKey);
3189
3189
  return compareString(value1, value2);
3190
3190
  }
3191
3191
  cellFullText(transformValue, field, references) {
@@ -3416,9 +3416,9 @@ class MemberField extends Field {
3416
3416
  return super.isMeetFilter(condition, cellValue);
3417
3417
  }
3418
3418
  }
3419
- compare(cellValue1, cellValue2, field, references, sortKey) {
3420
- const value1 = cellValueToSortValue$2(cellValue1, field, references, sortKey);
3421
- const value2 = cellValueToSortValue$2(cellValue2, field, references, sortKey);
3419
+ compare(cellValue1, cellValue2, references, sortKey, options) {
3420
+ const value1 = cellValueToSortValue$2(cellValue1, options.field, references, sortKey);
3421
+ const value2 = cellValueToSortValue$2(cellValue2, options.field, references, sortKey);
3422
3422
  return compareString(value1, value2);
3423
3423
  }
3424
3424
  cellFullText(transformValue, field, references) {
@@ -3675,6 +3675,39 @@ function toRateFieldValue(plainText, targetField, originData) {
3675
3675
  return null;
3676
3676
  }
3677
3677
 
3678
+ class RichTextField extends Field {
3679
+ isMeetFilter(condition, cellValue, options) {
3680
+ const textValue = transformCellValue(options.aiTable, options.field, cellValue || []);
3681
+ switch (condition.operation) {
3682
+ case AITableFilterOperation.empty:
3683
+ return isEmpty(textValue);
3684
+ case AITableFilterOperation.exists:
3685
+ return !isEmpty(textValue);
3686
+ case AITableFilterOperation.contain:
3687
+ return !isEmpty(textValue) && stringInclude(textValue, condition.value);
3688
+ default:
3689
+ return super.isMeetFilter(condition, textValue);
3690
+ }
3691
+ }
3692
+ compare(cellValue1, cellValue2, references, sortKey, options) {
3693
+ const value1 = transformCellValue(options.aiTable, options.field, cellValue1 || []);
3694
+ const value2 = transformCellValue(options.aiTable, options.field, cellValue2 || []);
3695
+ return compareString(value1, value2);
3696
+ }
3697
+ toFieldValue(plainText, targetField, originData) {
3698
+ return toRichTextFieldValue(plainText, targetField, originData);
3699
+ }
3700
+ }
3701
+ function toRichTextFieldValue(plainText, targetField, originData) {
3702
+ if (originData) {
3703
+ const { field, cellValue } = originData;
3704
+ if (field.type === AITableFieldType.richText) {
3705
+ return cellValue;
3706
+ }
3707
+ }
3708
+ return null;
3709
+ }
3710
+
3678
3711
  class SelectField extends Field {
3679
3712
  isMeetFilter(condition, cellValue) {
3680
3713
  switch (condition.operation) {
@@ -3690,9 +3723,9 @@ class SelectField extends Field {
3690
3723
  return super.isMeetFilter(condition, cellValue);
3691
3724
  }
3692
3725
  }
3693
- compare(cellValue1, cellValue2, field) {
3694
- const value1 = cellValueToSortValue$1(cellValue1, field);
3695
- const value2 = cellValueToSortValue$1(cellValue2, field);
3726
+ compare(cellValue1, cellValue2, references, sortKey, options) {
3727
+ const value1 = cellValueToSortValue$1(cellValue1, options.field);
3728
+ const value2 = cellValueToSortValue$1(cellValue2, options.field);
3696
3729
  return compareString(value1, value2);
3697
3730
  }
3698
3731
  cellFullText(transformValue, field) {
@@ -3839,7 +3872,7 @@ function cellValueToSortValue(cellValue) {
3839
3872
 
3840
3873
  const FieldModelMap = {
3841
3874
  [AITableFieldType.text]: new TextField(),
3842
- [AITableFieldType.richText]: new TextField(),
3875
+ [AITableFieldType.richText]: new RichTextField(),
3843
3876
  [AITableFieldType.select]: new SelectField(),
3844
3877
  [AITableFieldType.date]: new DateField(),
3845
3878
  [AITableFieldType.createdAt]: new DateField(),
@@ -4211,7 +4244,7 @@ const getHoverEditorBoxOffset = () => {
4211
4244
  return borderSpace / 2;
4212
4245
  };
4213
4246
 
4214
- const handleMouseStyle = (realTargetName, areaType = AITableAreaType.grid, container) => {
4247
+ const handleMouseStyle = (realTargetName, areaType = AITableAreaType.grid, container, isReadOnly) => {
4215
4248
  const { targetName, mouseStyle } = getDetailByTargetName(realTargetName);
4216
4249
  if (mouseStyle)
4217
4250
  return setMouseStyle(mouseStyle, container);
@@ -4226,6 +4259,9 @@ const handleMouseStyle = (realTargetName, areaType = AITableAreaType.grid, conta
4226
4259
  return setMouseStyle('pointer', container);
4227
4260
  }
4228
4261
  case AI_TABLE_FIELD_HEAD_OPACITY_LINE: {
4262
+ if (isReadOnly) {
4263
+ return setMouseStyle('default', container);
4264
+ }
4229
4265
  return setMouseStyle('col-resize', container);
4230
4266
  }
4231
4267
  default:
@@ -6775,10 +6811,13 @@ class AITableAddField {
6775
6811
  this.rectConfig = computed(() => {
6776
6812
  const { pointPosition: { targetName }, readonly } = this.config();
6777
6813
  const fill = targetName === AI_TABLE_FIELD_ADD_BUTTON ? Colors.gray80 : Colors.white;
6814
+ const fields = this.config().fields || [];
6815
+ const index = this.config().columnStopIndex;
6816
+ const fieldId = fields.length && index < fields.length ? fields[index]._id : '';
6778
6817
  return {
6779
6818
  name: generateTargetName({
6780
6819
  targetName: AI_TABLE_FIELD_ADD_BUTTON,
6781
- fieldId: this.config().fields[this.config().columnStopIndex]._id,
6820
+ fieldId,
6782
6821
  mouseStyle: readonly ? 'default' : 'pointer'
6783
6822
  }),
6784
6823
  x: AI_TABLE_OFFSET,
@@ -7813,7 +7852,7 @@ const createCells = (config) => {
7813
7852
  // 获取该列对应的宽度
7814
7853
  const columnWidth = coordinate.getColumnWidth(columnIndex);
7815
7854
  const x = coordinate.getColumnOffset(columnIndex) + AI_TABLE_OFFSET;
7816
- const isLastColumn = columnIndex === aiTable.fields.length - 1;
7855
+ const isLastColumn = columnIndex === aiTable.gridData().fields?.length - 1;
7817
7856
  if (columnIndex === 1) {
7818
7857
  cellDrawer.initStyle(field, { fontWeight: DEFAULT_FONT_STYLE });
7819
7858
  }
@@ -8996,6 +9035,8 @@ class AITableDragComponent {
8996
9035
  this.draggedData = null;
8997
9036
  this.mouseStartPosition = null;
8998
9037
  this.aiTableDrag = null;
9038
+ this.mouseDownTimeout = null;
9039
+ this.isDraggingEnabled = false;
8999
9040
  effect(() => this.handleDragStateChange());
9000
9041
  }
9001
9042
  ngOnInit() {
@@ -9009,8 +9050,18 @@ class AITableDragComponent {
9009
9050
  setupEventListeners() {
9010
9051
  this.mousedownListener = this.render2.listen('window', 'mousedown', (e) => {
9011
9052
  this.mouseStartPosition = { x: e.x, y: e.y };
9053
+ if (this.mouseDownTimeout) {
9054
+ clearTimeout(this.mouseDownTimeout);
9055
+ }
9056
+ this.isDraggingEnabled = false;
9057
+ this.mouseDownTimeout = setTimeout(() => {
9058
+ this.isDraggingEnabled = true;
9059
+ }, 200);
9012
9060
  });
9013
9061
  this.mousemoveListener = this.render2.listen('window', 'mousemove', (e) => {
9062
+ if (!this.isDraggingEnabled) {
9063
+ return;
9064
+ }
9014
9065
  if (this.timer) {
9015
9066
  cancelAnimationFrame(this.timer);
9016
9067
  }
@@ -9021,6 +9072,11 @@ class AITableDragComponent {
9021
9072
  });
9022
9073
  });
9023
9074
  this.mouseupListener = this.render2.listen('window', 'mouseup', () => {
9075
+ if (this.mouseDownTimeout) {
9076
+ clearTimeout(this.mouseDownTimeout);
9077
+ this.mouseDownTimeout = null;
9078
+ }
9079
+ this.isDraggingEnabled = false;
9024
9080
  this.mouseStartPosition = null;
9025
9081
  this.aiTableDrag = null;
9026
9082
  this.handleDragEnd();
@@ -9135,11 +9191,26 @@ class AITableDragComponent {
9135
9191
  };
9136
9192
  }
9137
9193
  handleDragEnd() {
9138
- this.setDisplayStyle('none');
9139
9194
  if (this.draggedData) {
9140
9195
  this.dragEnd.emit({ ...this.draggedData });
9141
- this.draggedData = null;
9142
9196
  }
9197
+ this.clearDragState();
9198
+ }
9199
+ clearDragState() {
9200
+ this.setDisplayStyle('none');
9201
+ this.setRectStyles({
9202
+ width: '0',
9203
+ height: '0',
9204
+ top: '0',
9205
+ left: '0'
9206
+ });
9207
+ this.setAuxiliaryLineStyles({
9208
+ width: '0',
9209
+ height: '0',
9210
+ top: '0',
9211
+ left: '0'
9212
+ });
9213
+ this.draggedData = null;
9143
9214
  }
9144
9215
  calculateDragWidth(fields, coordinate, drag) {
9145
9216
  let width = 0;
@@ -9373,7 +9444,7 @@ class AITableGrid extends AITableGridBase {
9373
9444
  const { context } = this.aiTable;
9374
9445
  const { x, y } = pos;
9375
9446
  const curMousePosition = getMousePosition(this.aiTable, x, y, this.coordinate(), AITable.getVisibleFields(this.aiTable), context, targetName);
9376
- handleMouseStyle(curMousePosition.realTargetName, curMousePosition.areaType, this.containerElement());
9447
+ handleMouseStyle(curMousePosition.realTargetName, curMousePosition.areaType, this.containerElement(), this.aiReadonly());
9377
9448
  context.setPointPosition(curMousePosition);
9378
9449
  this.timer = null;
9379
9450
  if (this.isDragSelecting) {
@@ -9410,12 +9481,7 @@ class AITableGrid extends AITableGridBase {
9410
9481
  mouseEvent.preventDefault();
9411
9482
  if (!fieldId)
9412
9483
  return;
9413
- this.aiTableGridSelectionService.drag({
9414
- type: DragType.columnWidth,
9415
- sourceIds: new Set([fieldId]),
9416
- scroll: this.getScrollPosition(),
9417
- coordinate: this.coordinate()
9418
- });
9484
+ this.handleFieldWidthDragStart(fieldId);
9419
9485
  return;
9420
9486
  case AI_TABLE_CELL:
9421
9487
  if (!recordId || !fieldId)
@@ -9467,6 +9533,11 @@ class AITableGrid extends AITableGridBase {
9467
9533
  });
9468
9534
  }
9469
9535
  stageClick(e) {
9536
+ const targetNameDetail = getDetailByTargetName(e.event.target.name());
9537
+ this.aiClick.emit({
9538
+ ...e,
9539
+ targetNameDetail
9540
+ });
9470
9541
  const mouseEvent = e.event.evt;
9471
9542
  mouseEvent.preventDefault();
9472
9543
  this.aiTableGridEventService.closeCellEditor();
@@ -9528,21 +9599,16 @@ class AITableGrid extends AITableGridBase {
9528
9599
  }
9529
9600
  break;
9530
9601
  }
9531
- const targetNameDetail = getDetailByTargetName(e.event.target.name());
9532
- this.aiClick.emit({
9533
- ...e,
9534
- targetNameDetail
9535
- });
9536
9602
  return;
9537
9603
  }
9538
9604
  stageDblclick(e) {
9539
9605
  const _targetName = e.event.target.name();
9540
9606
  const targetNameDetail = getDetailByTargetName(_targetName);
9607
+ this.aiDbClick.emit({
9608
+ ...e,
9609
+ targetNameDetail
9610
+ });
9541
9611
  if (this.aiReadonly()) {
9542
- this.aiDbClick.emit({
9543
- ...e,
9544
- targetNameDetail
9545
- });
9546
9612
  return;
9547
9613
  }
9548
9614
  const { fieldId, recordId } = targetNameDetail;
@@ -9566,12 +9632,6 @@ class AITableGrid extends AITableGridBase {
9566
9632
  });
9567
9633
  }, 0);
9568
9634
  }
9569
- else {
9570
- this.aiDbClick.emit({
9571
- ...e,
9572
- targetNameDetail
9573
- });
9574
- }
9575
9635
  }
9576
9636
  bindWheel() {
9577
9637
  fromEvent(this.containerElement(), 'wheel', { passive: false })
@@ -9739,6 +9799,16 @@ class AITableGrid extends AITableGridBase {
9739
9799
  });
9740
9800
  }
9741
9801
  }
9802
+ handleFieldWidthDragStart(fieldId) {
9803
+ if (!this.aiReadonly() && fieldId) {
9804
+ this.aiTableGridSelectionService.drag({
9805
+ type: DragType.columnWidth,
9806
+ sourceIds: new Set([fieldId]),
9807
+ scroll: this.getScrollPosition(),
9808
+ coordinate: this.coordinate()
9809
+ });
9810
+ }
9811
+ }
9742
9812
  getScrollPosition() {
9743
9813
  const horizontalBar = this.horizontalBarRef()?.nativeElement;
9744
9814
  const verticalBar = this.verticalBarRef()?.nativeElement;