@ai-table/grid 0.4.0-1 → 0.4.0

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.
@@ -18,6 +18,7 @@ export declare abstract class AbstractEditCellEditor<TValue, TFieldType extends
18
18
  protected render2: Renderer2;
19
19
  protected minHeight: number;
20
20
  ngOnInit(): void;
21
+ applyContainerClass(className: string): void;
21
22
  update(): void;
22
23
  closePopover(): void;
23
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-cell-editor.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/cell-editors/abstract-cell-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,UAAU,EAAwB,MAAM,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1I,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;;AAG3F,8BAKsB,sBAAsB,CAAC,MAAM,EAAE,UAAU,SAAS,YAAY,GAAG,YAAY,CAAE,YAAW,MAAM;IACvF,OAAO,EAAG,OAAO,CAAC;IAElB,OAAO,EAAG,MAAM,CAAC;IAEjB,QAAQ,EAAG,MAAM,CAAC;IAElB,UAAU,EAAG,iBAAiB,CAAC;IAE1D,YAAY,8CAAoD;IAEhE,iBAAiB,8EAA+C;IAEhE,UAAU,EAAG,MAAM,CAAC;IAEpB,KAAK,6CAEF;IAEH,MAAM,0EAEH;IAEH,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,CAAmC;IAEtE,SAAS,CAAC,aAAa,sCAA6E;IAEpG,SAAS,CAAC,OAAO,YAAqB;IAEtC,SAAS,CAAC,SAAS,SAAM;IAEzB,QAAQ,IAAI,IAAI;IAIhB,MAAM;IAYN,YAAY;IAIZ;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAE,MAAM,IAAI;yCAzDjF,sBAAsB;2CAAtB,sBAAsB;CA6E3C"}
1
+ {"version":3,"file":"abstract-cell-editor.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/cell-editors/abstract-cell-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,UAAU,EAAwB,MAAM,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1I,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;;AAG3F,8BAKsB,sBAAsB,CAAC,MAAM,EAAE,UAAU,SAAS,YAAY,GAAG,YAAY,CAAE,YAAW,MAAM;IACvF,OAAO,EAAG,OAAO,CAAC;IAElB,OAAO,EAAG,MAAM,CAAC;IAEjB,QAAQ,EAAG,MAAM,CAAC;IAElB,UAAU,EAAG,iBAAiB,CAAC;IAE1D,YAAY,8CAAoD;IAEhE,iBAAiB,8EAA+C;IAEhE,UAAU,EAAG,MAAM,CAAC;IAEpB,KAAK,6CAEF;IAEH,MAAM,0EAEH;IAEH,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,CAAmC;IAEtE,SAAS,CAAC,aAAa,sCAA6E;IAEpG,SAAS,CAAC,OAAO,YAAqB;IAEtC,SAAS,CAAC,SAAS,SAAM;IAEzB,QAAQ,IAAI,IAAI;IAIhB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAO5C,MAAM;IAYN,YAAY;IAIZ;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAE,MAAM,IAAI;yCAhEjF,sBAAsB;2CAAtB,sBAAsB;CAoF3C"}
@@ -4,7 +4,9 @@
4
4
 
5
5
  .grid-cell-editor {
6
6
  border: 2px solid variables.$primary;
7
- &:has(.text-cell-editor, .select-cell-editor) {
7
+ box-sizing: border-box;
8
+ &.has-text-cell,
9
+ &.has-select-cell {
8
10
  border: none;
9
11
  .form-control {
10
12
  // 特殊处理文本框border在输入框上
@@ -1 +1 @@
1
- {"version":3,"file":"number-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/number/number-editor.component.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;;AAEnD,qBAea,yBAA0B,SAAQ,sBAAsB,CAAC,gBAAgB,CAAC;IACnF,WAAW;yCADF,yBAAyB;2CAAzB,yBAAyB;CASrC"}
1
+ {"version":3,"file":"number-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/number/number-editor.component.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;;AAEnD,qBAgBa,yBAA0B,SAAQ,sBAAsB,CAAC,gBAAgB,CAAC;IACnF,WAAW;yCADF,yBAAyB;2CAAzB,yBAAyB;CASrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/select/select-editor.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAmE,MAAM,eAAe,CAAC;AAO/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;;AAI3E,qBAmBa,yBAA0B,SAAQ,sBAAsB,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,kBAAkB,CAAE,YAAW,aAAa;IACjI,aAAa,kFAEV;IAEH,MAAM,6CAEH;IAEH,IAAI,UAAU,YAEb;;IAMQ,QAAQ,IAAI,IAAI;IAUzB,eAAe;IAMf,YAAY,CAAC,KAAK,EAAE,OAAO;IAM3B,aAAa,CAAC,KAAK,EAAE,GAAG;IAOxB,aAAa;IAab,WAAW;yCA3DF,yBAAyB;2CAAzB,yBAAyB;CAgErC"}
1
+ {"version":3,"file":"select-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/select/select-editor.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAmE,MAAM,eAAe,CAAC;AAO/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;;AAI3E,qBAmBa,yBAA0B,SAAQ,sBAAsB,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,kBAAkB,CAAE,YAAW,aAAa;IACjI,aAAa,kFAEV;IAEH,MAAM,6CAEH;IAEH,IAAI,UAAU,YAEb;;IAMQ,QAAQ,IAAI,IAAI;IAYzB,eAAe;IAMf,YAAY,CAAC,KAAK,EAAE,OAAO;IAM3B,aAAa,CAAC,KAAK,EAAE,GAAG;IAOxB,aAAa;IAab,WAAW;yCA7DF,yBAAyB;2CAAzB,yBAAyB;CAkErC"}
@@ -4,6 +4,7 @@ import * as i0 from "@angular/core";
4
4
  export declare class TextCellEditorComponent extends AbstractEditCellEditor<string> implements AfterViewInit {
5
5
  isSelectAll: import("@angular/core").InputSignal<boolean>;
6
6
  constructor();
7
+ ngOnInit(): void;
7
8
  ngAfterViewInit(): void;
8
9
  updateStyle(): void;
9
10
  handleSelectAll(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"text-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/text/text-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgE,MAAM,eAAe,CAAC;AAI5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;;AAE3E,qBAqBa,uBAAwB,SAAQ,sBAAsB,CAAC,MAAM,CAAE,YAAW,aAAa;IAChG,WAAW,+CAAgB;;IAM3B,eAAe;IAQf,WAAW;IAIX,eAAe;IAOf,WAAW;IAIX,WAAW;yCA9BF,uBAAuB;2CAAvB,uBAAuB;CAkCnC"}
1
+ {"version":3,"file":"text-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/text/text-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgE,MAAM,eAAe,CAAC;AAI5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;;AAE3E,qBAqBa,uBAAwB,SAAQ,sBAAsB,CAAC,MAAM,CAAE,YAAW,aAAa;IAChG,WAAW,+CAAgB;;IAMlB,QAAQ,IAAI,IAAI;IAKzB,eAAe;IAQf,WAAW;IAIX,eAAe;IAOf,WAAW;IAIX,WAAW;yCAnCF,uBAAuB;2CAAvB,uBAAuB;CAuCnC"}
@@ -1682,6 +1682,12 @@ class AbstractEditCellEditor {
1682
1682
  ngOnInit() {
1683
1683
  this.modelValue = AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]);
1684
1684
  }
1685
+ applyContainerClass(className) {
1686
+ const container = this.elementRef.nativeElement.closest('.grid-cell-editor');
1687
+ if (container) {
1688
+ this.render2.addClass(container, className);
1689
+ }
1690
+ }
1685
1691
  update() {
1686
1692
  if (this.modelValue === AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id])) {
1687
1693
  return;
@@ -4457,6 +4463,8 @@ class Drawer {
4457
4463
  const fontStyleKey = `${fontWeight}-${fontSize}px`;
4458
4464
  const isUnderline = textDecoration === 'underline';
4459
4465
  const textRenderer = (textDataList) => {
4466
+ this.ctx.font = `${fontWeight} ${fontSize}px ${DEFAULT_FONT_FAMILY}`;
4467
+ this.ctx.textAlign = textAlign;
4460
4468
  textDataList.forEach((data) => {
4461
4469
  const { offsetX, offsetY, text, width, linkUrl } = data;
4462
4470
  this.ctx.fillText(text, x + offsetX, y + offsetY + baselineOffset);
@@ -5829,16 +5837,19 @@ const createActiveCellBorder = (config) => {
5829
5837
  if (isGroupAndFirstColumn) {
5830
5838
  offset += AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE;
5831
5839
  }
5832
- const currentConfig = {
5833
- x: x + offset + AI_TABLE_OFFSET,
5834
- y: y + AI_TABLE_OFFSET,
5835
- width: width - AI_TABLE_CELL_BORDER / 2,
5836
- height: rowHeight - AI_TABLE_CELL_BORDER / 2,
5837
- strokeWidth: AI_TABLE_CELL_BORDER,
5838
- stroke: colors.primary,
5839
- fillEnabled: false,
5840
- listening: false
5841
- };
5840
+ let currentConfig = null;
5841
+ if (!aiTable.editingCell()?.path) {
5842
+ currentConfig = {
5843
+ x: x + offset + AI_TABLE_OFFSET,
5844
+ y: y + AI_TABLE_OFFSET,
5845
+ width: width - AI_TABLE_CELL_BORDER / 2,
5846
+ height: rowHeight - AI_TABLE_CELL_BORDER / 2,
5847
+ strokeWidth: AI_TABLE_CELL_BORDER,
5848
+ stroke: colors.primary,
5849
+ fillEnabled: false,
5850
+ listening: false
5851
+ };
5852
+ }
5842
5853
  if (isFrozenColumn) {
5843
5854
  frozenActiveCellBorder = currentConfig;
5844
5855
  }
@@ -8758,8 +8769,8 @@ class AITableScrollableGroup {
8758
8769
  };
8759
8770
  });
8760
8771
  this.bgConfig = computed(() => {
8761
- const { x = 0, y = 0, width, height } = this.config();
8762
- return {
8772
+ const { x = 0, y = 0, width, height, bgName } = this.config();
8773
+ const config = {
8763
8774
  x: 0,
8764
8775
  y: 0,
8765
8776
  fill: Colors.white,
@@ -8767,6 +8778,10 @@ class AITableScrollableGroup {
8767
8778
  height,
8768
8779
  listening: true
8769
8780
  };
8781
+ if (bgName) {
8782
+ config.name = bgName;
8783
+ }
8784
+ return config;
8770
8785
  });
8771
8786
  // 内容区域配置
8772
8787
  this.contentConfig = computed(() => {
@@ -10973,6 +10988,14 @@ class AITableCellText extends CoverCellBase {
10973
10988
  static { this.fieldType = AITableFieldType.text; }
10974
10989
  constructor() {
10975
10990
  super();
10991
+ this.cellName = computed(() => {
10992
+ const { field, recordId } = this.config()?.render;
10993
+ return generateTargetName({
10994
+ targetName: AI_TABLE_CELL,
10995
+ fieldId: field._id,
10996
+ recordId
10997
+ });
10998
+ });
10976
10999
  this.expandBorderConfig = computed(() => {
10977
11000
  const { render, field, recordId, readonly, isExpand } = this.config();
10978
11001
  const { columnWidth } = render;
@@ -11008,7 +11031,8 @@ class AITableCellText extends CoverCellBase {
11008
11031
  listening: true,
11009
11032
  verticalScrollbar: true,
11010
11033
  horizontalScrollbar: true,
11011
- contentNotScrollbar: false
11034
+ contentNotScrollbar: false,
11035
+ bgName: this.cellName()
11012
11036
  };
11013
11037
  });
11014
11038
  this.expandTextBounds = computed(() => {
@@ -11067,11 +11091,7 @@ class AITableCellText extends CoverCellBase {
11067
11091
  return {
11068
11092
  x,
11069
11093
  y: this.startY(),
11070
- name: generateTargetName({
11071
- targetName: AI_TABLE_CELL,
11072
- fieldId: field._id,
11073
- recordId
11074
- }),
11094
+ name: this.cellName(),
11075
11095
  text: textRender,
11076
11096
  wrap: 'char',
11077
11097
  width: this.textMaxWidth(),
@@ -11935,10 +11955,11 @@ class NumberCellEditorComponent extends AbstractEditCellEditor {
11935
11955
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NumberCellEditorComponent, isStandalone: true, selector: "number-cell-editor", host: { classAttribute: "number-cell-editor" }, usesInheritance: true, ngImport: i0, template: `<thy-input-number
11936
11956
  class="h-100"
11937
11957
  [thyAutoFocus]="true"
11958
+ [thyShowStepControls]="false"
11938
11959
  [(ngModel)]="modelValue"
11939
11960
  (thyEnter)="updateValue()"
11940
11961
  (thyBlur)="updateValue()"
11941
- /> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11962
+ /> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyShowStepControls", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11942
11963
  }
11943
11964
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberCellEditorComponent, decorators: [{
11944
11965
  type: Component,
@@ -11947,6 +11968,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
11947
11968
  template: `<thy-input-number
11948
11969
  class="h-100"
11949
11970
  [thyAutoFocus]="true"
11971
+ [thyShowStepControls]="false"
11950
11972
  [(ngModel)]="modelValue"
11951
11973
  (thyEnter)="updateValue()"
11952
11974
  (thyBlur)="updateValue()"
@@ -11993,6 +12015,8 @@ class SelectCellEditorComponent extends AbstractEditCellEditor {
11993
12015
  });
11994
12016
  }
11995
12017
  ngOnInit() {
12018
+ super.ngOnInit();
12019
+ this.applyContainerClass('has-select-cell');
11996
12020
  this.modelValue = computed(() => {
11997
12021
  const value = AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]);
11998
12022
  if (!this.isMultiple) {
@@ -12059,6 +12083,10 @@ class TextCellEditorComponent extends AbstractEditCellEditor {
12059
12083
  super();
12060
12084
  this.isSelectAll = input(false);
12061
12085
  }
12086
+ ngOnInit() {
12087
+ super.ngOnInit();
12088
+ this.applyContainerClass('has-text-cell');
12089
+ }
12062
12090
  ngAfterViewInit() {
12063
12091
  // 解决闪烁线问题
12064
12092
  queueMicrotask(() => {
@@ -12390,7 +12418,7 @@ class AITableContextMenu extends ThyDropdownAbstractMenu {
12390
12418
  this.thyPopoverRef.close();
12391
12419
  }
12392
12420
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableContextMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
12393
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableContextMenu, isStandalone: true, selector: "ai-table-context-menu", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, targetName: { classPropertyName: "targetName", publicName: "targetName", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "context-menu" }, usesInheritance: true, ngImport: i0, 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", dependencies: [{ kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemMetaDirective, selector: "[thyDropdownMenuItemMeta]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12421
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableContextMenu, isStandalone: true, selector: "ai-table-context-menu", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, targetName: { classPropertyName: "targetName", publicName: "targetName", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "context-menu" }, usesInheritance: true, ngImport: i0, 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", dependencies: [{ kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyShowStepControls", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemMetaDirective, selector: "[thyDropdownMenuItemMeta]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12394
12422
  }
12395
12423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableContextMenu, decorators: [{
12396
12424
  type: Component,
@@ -13698,6 +13726,7 @@ class AITableGrid extends AITableGridBase {
13698
13726
  const offset = this.coordinate().getRowOffset(rowIndex);
13699
13727
  return {
13700
13728
  top: offset - scrollTop - AI_TABLE_FIELD_HEAD_HEIGHT,
13729
+ height: AI_TABLE_RECORD_HEIGHT_LEVELS[this.aiRecordHeight()],
13701
13730
  left: 0,
13702
13731
  tooltip
13703
13732
  };
@@ -14311,8 +14340,6 @@ class AITableGrid extends AITableGridBase {
14311
14340
  const fieldType = field.type;
14312
14341
  if (DBL_CLICK_EDIT_TYPE.includes(fieldType)) {
14313
14342
  setTimeout(() => {
14314
- // 边框重叠,清除选区
14315
- clearSelection(this.aiTable);
14316
14343
  this.aiTableGridEventService.openCellEditor(this.aiTable, {
14317
14344
  viewContainerRef: this.viewContainerRef,
14318
14345
  container: this.containerElement(),
@@ -14737,13 +14764,13 @@ class AITableGrid extends AITableGridBase {
14737
14764
  });
14738
14765
  }
14739
14766
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14740
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableGrid, isStandalone: true, selector: "ai-table-grid", host: { classAttribute: "ai-table-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableScrollControllerService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "verticalBarRef", first: true, predicate: ["verticalBar"], descendants: true, isSignal: true }, { propertyName: "horizontalBarRef", first: true, predicate: ["horizontalBar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div class=\"ai-table-left-background\" [thyTooltip]=\"domToolTip.tooltip\" [style.--scroll-top.px]=\"domToolTip.top\">\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n", dependencies: [{ kind: "component", type: AITableRenderer, selector: "ai-table-renderer", inputs: ["config"], outputs: ["koMousemove", "koMousedown", "koMouseup", "koContextmenu", "koWheel", "koClick", "koDblclick", "koMouseleave", "onScrollPosition"] }, { kind: "component", type: AITableDragComponent, selector: "ai-table-drag", inputs: ["horizontalBar", "verticalBar"], outputs: ["dragEnd"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14767
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableGrid, isStandalone: true, selector: "ai-table-grid", host: { classAttribute: "ai-table-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableScrollControllerService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "verticalBarRef", first: true, predicate: ["verticalBar"], descendants: true, isSignal: true }, { propertyName: "horizontalBarRef", first: true, predicate: ["horizontalBar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div\n class=\"ai-table-left-background\"\n [thyTooltip]=\"domToolTip.tooltip\"\n [style.--scroll-top.px]=\"domToolTip.top\"\n [style.height.px]=\"domToolTip.height\"\n >\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n", dependencies: [{ kind: "component", type: AITableRenderer, selector: "ai-table-renderer", inputs: ["config"], outputs: ["koMousemove", "koMousedown", "koMouseup", "koContextmenu", "koWheel", "koClick", "koDblclick", "koMouseleave", "onScrollPosition"] }, { kind: "component", type: AITableDragComponent, selector: "ai-table-drag", inputs: ["horizontalBar", "verticalBar"], outputs: ["dragEnd"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14741
14768
  }
14742
14769
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGrid, decorators: [{
14743
14770
  type: Component,
14744
14771
  args: [{ selector: 'ai-table-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
14745
14772
  class: 'ai-table-grid'
14746
- }, imports: [AITableRenderer, AITableDragComponent, ThyTooltipDirective, ThyIcon], providers: [AITableGridEventService, AITableGridFieldService, AITableScrollControllerService], template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div class=\"ai-table-left-background\" [thyTooltip]=\"domToolTip.tooltip\" [style.--scroll-top.px]=\"domToolTip.top\">\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n" }]
14773
+ }, imports: [AITableRenderer, AITableDragComponent, ThyTooltipDirective, ThyIcon], providers: [AITableGridEventService, AITableGridFieldService, AITableScrollControllerService], template: "<div #container class=\"ai-table-grid-view\">\n @if (hasContainerRect()) {\n <ai-table-renderer\n [config]=\"rendererConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n (koWheel)=\"stageWheel($event)\"\n >\n @if (domToolTips().length > 0) {\n <div\n class=\"ai-table-left-background-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n @for (domToolTip of domToolTips(); track trackBy(idx, domToolTip); let idx = $index) {\n <div\n class=\"ai-table-left-background\"\n [thyTooltip]=\"domToolTip.tooltip\"\n [style.--scroll-top.px]=\"domToolTip.top\"\n [style.height.px]=\"domToolTip.height\"\n >\n <thy-icon class=\"text-white\" thyIconName=\"filter-line\"></thy-icon>\n </div>\n }\n </div>\n }\n <div #horizontalBar class=\"ai-table-horizontal-scroll-bar-wrapper\" [style.width.px]=\"containerRect().width\">\n <div class=\"ai-table-scroll-bar-inner\" [style.width.px]=\"scrollbarWidth()\"></div>\n </div>\n <div\n #verticalBar\n class=\"ai-table-vertical-scroll-bar-wrapper\"\n [style.height.px]=\"containerRect().height - fieldHeadHeight\"\n [style.top.px]=\"fieldHeadHeight\"\n >\n <div class=\"ai-table-scroll-bar-inner\" [style.height.px]=\"scrollTotalHeight()\"></div>\n </div>\n </ai-table-renderer>\n }\n <ai-table-drag [horizontalBar]=\"horizontalBarRef()\" [verticalBar]=\"verticalBarRef()\" (dragEnd)=\"dragEnd($event)\"></ai-table-drag>\n</div>\n" }]
14747
14774
  }], ctorParameters: () => [] });
14748
14775
 
14749
14776
  /**