@ai-table/grid 0.0.19 → 0.0.21
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/context-menu/context-menu.component.d.ts +18 -0
- package/components/context-menu/context-menu.component.d.ts.map +1 -0
- package/components/context-menu/context-menu.scss +12 -0
- package/components/field-menu/field-menu.component.d.ts +3 -3
- package/components/field-menu/field-menu.component.d.ts.map +1 -1
- package/components/field-menu/field-menu.scss +12 -0
- package/components/field-property-editor/field-property-editor.component.d.ts.map +1 -1
- package/components/field-property-editor/field-property-editor.component.scss +7 -0
- package/components/index.d.ts +1 -0
- package/components/index.d.ts.map +1 -1
- package/constants/table.d.ts +1 -0
- package/constants/table.d.ts.map +1 -1
- package/core/constants/field.d.ts.map +1 -1
- package/dom-grid.component.d.ts.map +1 -1
- package/esm2022/components/context-menu/context-menu.component.mjs +37 -0
- package/esm2022/components/field-menu/field-menu.component.mjs +12 -8
- package/esm2022/components/field-property-editor/field-property-editor.component.mjs +8 -5
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/constants/table.mjs +2 -1
- package/esm2022/core/constants/field.mjs +9 -3
- package/esm2022/dom-grid.component.mjs +3 -3
- package/esm2022/grid-base.component.mjs +3 -2
- package/esm2022/grid.component.mjs +42 -6
- package/esm2022/pipes/grid.pipe.mjs +18 -1
- package/esm2022/renderer/components/hover-row-heads.component.mjs +2 -2
- package/esm2022/renderer/creations/create-cells.mjs +12 -6
- package/esm2022/renderer/drawers/add-row-layout-drawer.mjs +8 -7
- package/esm2022/renderer/drawers/layout-drawer.mjs +3 -3
- package/esm2022/renderer/drawers/record-row-layout-drawer.mjs +4 -4
- package/esm2022/renderer/renderer.component.mjs +7 -3
- package/esm2022/services/event.service.mjs +19 -1
- package/esm2022/services/field.service.mjs +6 -3
- package/esm2022/types/grid.mjs +1 -1
- package/esm2022/types/row.mjs +1 -1
- package/fesm2022/ai-table-grid.mjs +245 -117
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid-base.component.d.ts +3 -2
- 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/pipes/grid.pipe.d.ts +5 -0
- package/pipes/grid.pipe.d.ts.map +1 -1
- package/renderer/creations/create-cells.d.ts.map +1 -1
- package/renderer/drawers/add-row-layout-drawer.d.ts +2 -2
- package/renderer/drawers/add-row-layout-drawer.d.ts.map +1 -1
- package/renderer/drawers/layout-drawer.d.ts +1 -1
- package/renderer/drawers/layout-drawer.d.ts.map +1 -1
- package/renderer/renderer.component.d.ts +3 -1
- package/renderer/renderer.component.d.ts.map +1 -1
- package/services/event.service.d.ts +3 -1
- package/services/event.service.d.ts.map +1 -1
- package/services/field.service.d.ts +2 -2
- package/services/field.service.d.ts.map +1 -1
- package/styles/styles.scss +3 -0
- package/types/grid.d.ts.map +1 -1
- package/types/row.d.ts +29 -0
- package/types/row.d.ts.map +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { signal, computed, output, inject, ElementRef, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, ChangeDetectorRef, ViewChild, HostListener, Pipe, input, Renderer2, model, booleanAttribute, Injectable, DestroyRef, NgZone, InjectionToken, effect, viewChild, afterNextRender } from '@angular/core';
|
2
|
+
import { signal, computed, output, inject, ElementRef, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, ChangeDetectorRef, ViewChild, HostListener, Pipe, input, Renderer2, model, booleanAttribute, Injectable, DestroyRef, NgZone, InjectionToken, effect, ViewContainerRef, viewChild, afterNextRender } from '@angular/core';
|
3
3
|
import * as i1$1 from 'ngx-tethys/popover';
|
4
4
|
import { ThyPopoverRef, ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
|
5
5
|
import ObjectID from 'bson-objectid';
|
@@ -26,7 +26,7 @@ import { ThyInputNumber } from 'ngx-tethys/input-number';
|
|
26
26
|
import { ThySlider } from 'ngx-tethys/slider';
|
27
27
|
import { ThyRate } from 'ngx-tethys/rate';
|
28
28
|
import * as i1$2 from '@angular/common';
|
29
|
-
import { NgTemplateOutlet, NgIf,
|
29
|
+
import { NgTemplateOutlet, NgIf, NgClass, NgForOf, CommonModule, NgComponentOutlet } from '@angular/common';
|
30
30
|
import { ThyDot } from 'ngx-tethys/dot';
|
31
31
|
import { ThyEmptyModule } from 'ngx-tethys/empty';
|
32
32
|
import { ThyIcon } from 'ngx-tethys/icon';
|
@@ -185,7 +185,7 @@ const FieldOptions = [
|
|
185
185
|
type: AITableFieldType.text,
|
186
186
|
name: '单行文本',
|
187
187
|
icon: 'font',
|
188
|
-
width:
|
188
|
+
width: 200
|
189
189
|
},
|
190
190
|
// 多行文本
|
191
191
|
{
|
@@ -217,7 +217,13 @@ const FieldOptions = [
|
|
217
217
|
},
|
218
218
|
{
|
219
219
|
type: AITableFieldType.member,
|
220
|
-
name: '
|
220
|
+
name: '单个成员',
|
221
|
+
icon: 'user',
|
222
|
+
width: 200
|
223
|
+
},
|
224
|
+
{
|
225
|
+
type: AITableFieldType.member,
|
226
|
+
name: '多个成员',
|
221
227
|
icon: 'user',
|
222
228
|
width: 200,
|
223
229
|
settings: {
|
@@ -1274,6 +1280,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
1274
1280
|
standalone: true
|
1275
1281
|
}]
|
1276
1282
|
}] });
|
1283
|
+
class AITableFieldIsMultiplePipe {
|
1284
|
+
transform(settings) {
|
1285
|
+
if (settings && settings.hasOwnProperty('is_multiple')) {
|
1286
|
+
return !!settings.is_multiple;
|
1287
|
+
}
|
1288
|
+
return false;
|
1289
|
+
}
|
1290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldIsMultiplePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
1291
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldIsMultiplePipe, isStandalone: true, name: "fieldIsMultiple" }); }
|
1292
|
+
}
|
1293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldIsMultiplePipe, decorators: [{
|
1294
|
+
type: Pipe,
|
1295
|
+
args: [{
|
1296
|
+
name: 'fieldIsMultiple',
|
1297
|
+
standalone: true
|
1298
|
+
}]
|
1299
|
+
}] });
|
1277
1300
|
|
1278
1301
|
class SelectOptionComponent {
|
1279
1302
|
constructor() {
|
@@ -1465,13 +1488,14 @@ class AITableFieldPropertyEditor {
|
|
1465
1488
|
this.thyPopoverRef.close();
|
1466
1489
|
}
|
1467
1490
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldPropertyEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1468
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AITableFieldPropertyEditor, isStandalone: true, selector: "ai-table-field-property-editor", inputs: { aiEditField: { classPropertyName: "aiEditField", publicName: "aiEditField", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: false, isRequired: true, transformFunction: null }, aiExternalTemplate: { classPropertyName: "aiExternalTemplate", publicName: "aiExternalTemplate", isSignal: false, isRequired: false, transformFunction: null }, isUpdate: { classPropertyName: "isUpdate", publicName: "isUpdate", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { aiEditField: "aiEditFieldChange", addField: "addField", setField: "setField" }, host: { classAttribute: "field-property-editor d-block pl-5 pr-5 pb-5 pt-4" }, ngImport: i0, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired thyLabelText=\"\u8868\u683C\u5217\u540D\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n required\n placeholder=\"\u8F93\u5165\u5217\u540D\u79F0\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u5217\u7C7B\u578B\">\n <div class=\"ml-n5 mr-n5\">\n <thy-list-item [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" class=\"justify-content-between\">\n <span>\n <thy-icon [thyIconName]=\"selectedFieldOption().icon\" class=\"text-desc mr-2\"></thy-icon>\n <span>{{ selectedFieldOption().name }}</span>\n </span>\n <thy-icon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </thy-list-item>\n </div>\n </thy-form-group>\n <ng-container *ngIf=\"aiExternalTemplate; else defaultTemplate\">\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultTemplate>\n <!-- TODO: \u5185\u90E8\u5C5E\u6027\u6E32\u67D3 -->\n </ng-template>\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">\u53D6\u6D88</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">\u786E\u5B9A</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n @for (item of fieldOptions; track $index) {\n <a
|
1491
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AITableFieldPropertyEditor, isStandalone: true, selector: "ai-table-field-property-editor", inputs: { aiEditField: { classPropertyName: "aiEditField", publicName: "aiEditField", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: false, isRequired: true, transformFunction: null }, aiExternalTemplate: { classPropertyName: "aiExternalTemplate", publicName: "aiExternalTemplate", isSignal: false, isRequired: false, transformFunction: null }, isUpdate: { classPropertyName: "isUpdate", publicName: "isUpdate", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { aiEditField: "aiEditFieldChange", addField: "addField", setField: "setField" }, host: { classAttribute: "field-property-editor d-block pl-5 pr-5 pb-5 pt-4" }, ngImport: i0, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired thyLabelText=\"\u8868\u683C\u5217\u540D\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n required\n placeholder=\"\u8F93\u5165\u5217\u540D\u79F0\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u5217\u7C7B\u578B\">\n <div class=\"ml-n5 mr-n5\">\n <thy-list-item [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" class=\"justify-content-between\">\n <span>\n <thy-icon [thyIconName]=\"selectedFieldOption().icon\" class=\"text-desc mr-2\"></thy-icon>\n <span>{{ selectedFieldOption().name }}</span>\n </span>\n <thy-icon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </thy-list-item>\n </div>\n </thy-form-group>\n <ng-container *ngIf=\"aiExternalTemplate; else defaultTemplate\">\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultTemplate>\n <!-- TODO: \u5185\u90E8\u5C5E\u6027\u6E32\u67D3 -->\n </ng-template>\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">\u53D6\u6D88</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">\u786E\u5B9A</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n @for (item of fieldOptions; track $index) {\n @let isSelectedField = aiEditField().type === item.type;\n @let isSameMultipleMode = (item.settings! | fieldIsMultiple) === (aiEditField().settings! | fieldIsMultiple);\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: isSelectedField && isSameMultipleMode\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n</thy-dropdown-menu>\n", styles: [":host{width:350px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyInputGroup, selector: "thy-input-group", inputs: ["thyAppendText", "thyAppendTextTranslateKey", "thyPrependText", "thyPrependTextTranslateKey", "thySize"] }, { kind: "component", type: ThyInputCount, selector: "thy-input-count", inputs: ["thyInput"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyUniqueCheckValidator, selector: "[thyUniqueCheck]", inputs: ["thyUniqueCheck"] }, { kind: "directive", type: ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { kind: "ngmodule", type: ThyFormModule }, { kind: "directive", type: i2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i2.ThyFormGroup, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i2.ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "component", type: ThyListItem, selector: "thy-list-item,[thy-list-item]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "pipe", type: AITableFieldIsMultiplePipe, name: "fieldIsMultiple" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1469
1492
|
}
|
1470
1493
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldPropertyEditor, decorators: [{
|
1471
1494
|
type: Component,
|
1472
1495
|
args: [{ selector: 'ai-table-field-property-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
1473
1496
|
NgIf,
|
1474
1497
|
NgForOf,
|
1498
|
+
NgClass,
|
1475
1499
|
FormsModule,
|
1476
1500
|
ThyIcon,
|
1477
1501
|
ThyInput,
|
@@ -1489,10 +1513,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
1489
1513
|
ThyFormModule,
|
1490
1514
|
ThyListItem,
|
1491
1515
|
NgTemplateOutlet,
|
1492
|
-
ThyAutofocusDirective
|
1516
|
+
ThyAutofocusDirective,
|
1517
|
+
AITableFieldIsMultiplePipe
|
1493
1518
|
], host: {
|
1494
1519
|
class: 'field-property-editor d-block pl-5 pr-5 pb-5 pt-4'
|
1495
|
-
}, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired thyLabelText=\"\u8868\u683C\u5217\u540D\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n required\n placeholder=\"\u8F93\u5165\u5217\u540D\u79F0\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u5217\u7C7B\u578B\">\n <div class=\"ml-n5 mr-n5\">\n <thy-list-item [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" class=\"justify-content-between\">\n <span>\n <thy-icon [thyIconName]=\"selectedFieldOption().icon\" class=\"text-desc mr-2\"></thy-icon>\n <span>{{ selectedFieldOption().name }}</span>\n </span>\n <thy-icon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </thy-list-item>\n </div>\n </thy-form-group>\n <ng-container *ngIf=\"aiExternalTemplate; else defaultTemplate\">\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultTemplate>\n <!-- TODO: \u5185\u90E8\u5C5E\u6027\u6E32\u67D3 -->\n </ng-template>\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">\u53D6\u6D88</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">\u786E\u5B9A</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n @for (item of fieldOptions; track $index) {\n <a
|
1520
|
+
}, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired thyLabelText=\"\u8868\u683C\u5217\u540D\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n required\n placeholder=\"\u8F93\u5165\u5217\u540D\u79F0\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u5217\u7C7B\u578B\">\n <div class=\"ml-n5 mr-n5\">\n <thy-list-item [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" class=\"justify-content-between\">\n <span>\n <thy-icon [thyIconName]=\"selectedFieldOption().icon\" class=\"text-desc mr-2\"></thy-icon>\n <span>{{ selectedFieldOption().name }}</span>\n </span>\n <thy-icon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </thy-list-item>\n </div>\n </thy-form-group>\n <ng-container *ngIf=\"aiExternalTemplate; else defaultTemplate\">\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultTemplate>\n <!-- TODO: \u5185\u90E8\u5C5E\u6027\u6E32\u67D3 -->\n </ng-template>\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">\u53D6\u6D88</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">\u786E\u5B9A</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n @for (item of fieldOptions; track $index) {\n @let isSelectedField = aiEditField().type === item.type;\n @let isSameMultipleMode = (item.settings! | fieldIsMultiple) === (aiEditField().settings! | fieldIsMultiple);\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: isSelectedField && isSameMultipleMode\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n</thy-dropdown-menu>\n", styles: [":host{width:350px}\n"] }]
|
1496
1521
|
}], propDecorators: { aiTable: [{
|
1497
1522
|
type: Input,
|
1498
1523
|
args: [{ required: true }]
|
@@ -1503,6 +1528,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
1503
1528
|
args: [{ transform: booleanAttribute }]
|
1504
1529
|
}] } });
|
1505
1530
|
|
1531
|
+
class AITableGridSelectionService {
|
1532
|
+
constructor() { }
|
1533
|
+
initialize(aiTable) {
|
1534
|
+
this.aiTable = aiTable;
|
1535
|
+
}
|
1536
|
+
clearSelection() {
|
1537
|
+
this.aiTable.selection.set({
|
1538
|
+
selectedRecords: new Map(),
|
1539
|
+
selectedFields: new Map(),
|
1540
|
+
selectedCells: new Map()
|
1541
|
+
});
|
1542
|
+
}
|
1543
|
+
selectCell(recordId, fieldId) {
|
1544
|
+
const fields = this.aiTable.selection().selectedCells.get(recordId);
|
1545
|
+
if (fields?.hasOwnProperty(fieldId)) {
|
1546
|
+
return;
|
1547
|
+
}
|
1548
|
+
this.clearSelection();
|
1549
|
+
this.aiTable.selection().selectedCells.set(recordId, { [fieldId]: true });
|
1550
|
+
}
|
1551
|
+
selectField(fieldId) {
|
1552
|
+
if (this.aiTable.selection().selectedFields.has(fieldId)) {
|
1553
|
+
return;
|
1554
|
+
}
|
1555
|
+
this.clearSelection();
|
1556
|
+
this.aiTable.selection().selectedFields.set(fieldId, true);
|
1557
|
+
}
|
1558
|
+
selectRecord(recordId) {
|
1559
|
+
if (this.aiTable.selection().selectedRecords.has(recordId)) {
|
1560
|
+
this.aiTable.selection().selectedRecords.delete(recordId);
|
1561
|
+
}
|
1562
|
+
else {
|
1563
|
+
this.aiTable.selection().selectedRecords.set(recordId, true);
|
1564
|
+
}
|
1565
|
+
this.aiTable.selection.set({
|
1566
|
+
selectedRecords: this.aiTable.selection().selectedRecords,
|
1567
|
+
selectedFields: new Map(),
|
1568
|
+
selectedCells: new Map()
|
1569
|
+
});
|
1570
|
+
}
|
1571
|
+
toggleSelectAll(checked) {
|
1572
|
+
this.clearSelection();
|
1573
|
+
if (checked) {
|
1574
|
+
this.aiTable.records().forEach((item) => {
|
1575
|
+
this.selectRecord(item._id);
|
1576
|
+
});
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
updateSelect(event) {
|
1580
|
+
const target = event?.target;
|
1581
|
+
if (!target) {
|
1582
|
+
return;
|
1583
|
+
}
|
1584
|
+
const cellDom = target.closest('.grid-cell');
|
1585
|
+
const colDom = target.closest('.grid-field');
|
1586
|
+
const checkbox = target.tagName === 'INPUT' && target.type === 'checkbox' && target.closest('.grid-checkbox');
|
1587
|
+
const fieldAction = target.closest('.grid-field-action');
|
1588
|
+
if (cellDom) {
|
1589
|
+
const fieldId = cellDom.getAttribute('fieldId');
|
1590
|
+
const recordId = cellDom.getAttribute('recordId');
|
1591
|
+
fieldId && recordId && this.selectCell(recordId, fieldId);
|
1592
|
+
}
|
1593
|
+
if (colDom && !fieldAction) {
|
1594
|
+
const fieldId = colDom.getAttribute('fieldId');
|
1595
|
+
fieldId && this.selectField(fieldId);
|
1596
|
+
}
|
1597
|
+
if (!cellDom && !colDom && !checkbox) {
|
1598
|
+
this.clearSelection();
|
1599
|
+
}
|
1600
|
+
}
|
1601
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1602
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService }); }
|
1603
|
+
}
|
1604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService, decorators: [{
|
1605
|
+
type: Injectable
|
1606
|
+
}], ctorParameters: () => [] });
|
1607
|
+
|
1608
|
+
class AITableContextMenu extends ThyDropdownAbstractMenu {
|
1609
|
+
constructor() {
|
1610
|
+
super(...arguments);
|
1611
|
+
this.aiTableGridSelectionService = inject(AITableGridSelectionService);
|
1612
|
+
this.aiTable = input.required();
|
1613
|
+
this.menuItems = input.required();
|
1614
|
+
this.targetName = input.required();
|
1615
|
+
this.position = input.required();
|
1616
|
+
}
|
1617
|
+
execute(menu) {
|
1618
|
+
if ((menu.disabled && !menu.disabled(this.aiTable(), this.targetName(), this.position())) || !menu.disabled) {
|
1619
|
+
menu.exec && menu.exec(this.aiTable(), this.targetName(), this.position(), this.aiTableGridSelectionService);
|
1620
|
+
}
|
1621
|
+
}
|
1622
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableContextMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
1623
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{ 'ai-table-prohibit-clear-selection remove-record': !disabled }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyIconName=\"menu.icon\"></thy-icon>\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n", dependencies: [{ kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1624
|
+
}
|
1625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableContextMenu, decorators: [{
|
1626
|
+
type: Component,
|
1627
|
+
args: [{ selector: 'ai-table-context-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
1628
|
+
class: 'context-menu'
|
1629
|
+
}, imports: [
|
1630
|
+
ThyDropdownMenuComponent,
|
1631
|
+
ThyDropdownMenuItemDirective,
|
1632
|
+
ThyDropdownMenuItemNameDirective,
|
1633
|
+
ThyDropdownMenuItemIconDirective,
|
1634
|
+
ThyIcon,
|
1635
|
+
NgClass
|
1636
|
+
], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{ 'ai-table-prohibit-clear-selection remove-record': !disabled }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyIconName=\"menu.icon\"></thy-icon>\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n" }]
|
1637
|
+
}] });
|
1638
|
+
|
1506
1639
|
const GRID_CELL_EDITOR_MAP = {
|
1507
1640
|
[AITableFieldType.text]: TextCellEditorComponent,
|
1508
1641
|
[AITableFieldType.richText]: TextCellEditorComponent,
|
@@ -1536,6 +1669,7 @@ const AI_TABLE_FIELD_ADD_BUTTON = 'AI_TABLE_FIELD_ADD_BUTTON'; // 添加列名
|
|
1536
1669
|
const AI_TABLE_FIELD_ADD_BUTTON_WIDTH = 100; // 添加列宽度
|
1537
1670
|
const AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE = 8; // 字段表列头图标的间距
|
1538
1671
|
const AI_TABLE_FIELD_HEAD_MORE = 'AI_TABLE_FIELD_HEAD_MORE'; // 更多图标名称
|
1672
|
+
const AI_TABLE_PROHIBIT_CLEAR_SELECTION_CLASS = '.ai-table-prohibit-clear-selection';
|
1539
1673
|
const AI_TABLE_ICON_COMMON_SIZE = 16; // 表格图标的通用尺寸
|
1540
1674
|
const AI_TABLE_CELL = 'AI_TABLE_CELL'; // 单元格标识
|
1541
1675
|
// 因为 dom 的边距 12 是不包含 边框的,所以加上边框 2px 才能跟 编辑里面的内容对其;
|
@@ -1657,7 +1791,7 @@ const DEFAULT_TEXT_SCALE = 1;
|
|
1657
1791
|
const DEFAULT_TEXT_MAX_CACHE = 500;
|
1658
1792
|
const FONT_SIZE_SM = 12;
|
1659
1793
|
|
1660
|
-
class
|
1794
|
+
class AITableFieldMenu extends ThyDropdownAbstractMenu {
|
1661
1795
|
constructor() {
|
1662
1796
|
super(...arguments);
|
1663
1797
|
this.field = computed(() => {
|
@@ -1669,19 +1803,22 @@ class FieldMenu extends ThyDropdownAbstractMenu {
|
|
1669
1803
|
menu.exec && menu.exec(this.aiTable, this.field, this.origin, this.position);
|
1670
1804
|
}
|
1671
1805
|
}
|
1672
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
1673
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type:
|
1806
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
1807
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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>{{ menu.name! }}</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 }); }
|
1674
1808
|
}
|
1675
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
1809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableFieldMenu, decorators: [{
|
1676
1810
|
type: Component,
|
1677
|
-
args: [{ selector: 'field-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
1811
|
+
args: [{ selector: 'ai-table-field-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
1812
|
+
class: 'field-menu'
|
1813
|
+
}, imports: [
|
1678
1814
|
ThyIcon,
|
1679
1815
|
ThyDivider,
|
1680
1816
|
ThyDropdownMenuComponent,
|
1681
1817
|
ThyDropdownMenuItemDirective,
|
1682
1818
|
ThyDropdownMenuItemNameDirective,
|
1683
|
-
ThyDropdownMenuItemIconDirective
|
1684
|
-
|
1819
|
+
ThyDropdownMenuItemIconDirective,
|
1820
|
+
NgClass
|
1821
|
+
], 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>{{ menu.name! }}</span>\n </a>\n }\n }\n}\n" }]
|
1685
1822
|
}], propDecorators: { fieldId: [{
|
1686
1823
|
type: Input,
|
1687
1824
|
args: [{ required: true }]
|
@@ -1751,6 +1888,8 @@ class AITableGridFieldService {
|
|
1751
1888
|
placement: 'bottomLeft',
|
1752
1889
|
manualClosure: true,
|
1753
1890
|
originActiveClass: undefined,
|
1891
|
+
height: 'auto',
|
1892
|
+
panelClass: 'ai-table-field-property-editor-panel',
|
1754
1893
|
initialState: {
|
1755
1894
|
aiTable,
|
1756
1895
|
aiEditField: field,
|
@@ -1760,11 +1899,12 @@ class AITableGridFieldService {
|
|
1760
1899
|
}
|
1761
1900
|
openFieldMenu(aiTable, options) {
|
1762
1901
|
const { origin, editOrigin, position, fieldId, fieldMenus } = options;
|
1763
|
-
const ref = this.thyPopover.open(
|
1902
|
+
const ref = this.thyPopover.open(AITableFieldMenu, {
|
1764
1903
|
origin,
|
1765
1904
|
originPosition: position,
|
1766
1905
|
placement: 'bottomLeft',
|
1767
1906
|
originActiveClass: undefined,
|
1907
|
+
insideClosable: true,
|
1768
1908
|
initialState: {
|
1769
1909
|
origin: editOrigin,
|
1770
1910
|
position: options.editFieldPosition,
|
@@ -1782,83 +1922,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
1782
1922
|
type: Injectable
|
1783
1923
|
}], ctorParameters: () => [{ type: i1$1.ThyPopover }] });
|
1784
1924
|
|
1785
|
-
class AITableGridSelectionService {
|
1786
|
-
constructor() { }
|
1787
|
-
initialize(aiTable) {
|
1788
|
-
this.aiTable = aiTable;
|
1789
|
-
}
|
1790
|
-
clearSelection() {
|
1791
|
-
this.aiTable.selection.set({
|
1792
|
-
selectedRecords: new Map(),
|
1793
|
-
selectedFields: new Map(),
|
1794
|
-
selectedCells: new Map()
|
1795
|
-
});
|
1796
|
-
}
|
1797
|
-
selectCell(recordId, fieldId) {
|
1798
|
-
const fields = this.aiTable.selection().selectedCells.get(recordId);
|
1799
|
-
if (fields?.hasOwnProperty(fieldId)) {
|
1800
|
-
return;
|
1801
|
-
}
|
1802
|
-
this.clearSelection();
|
1803
|
-
this.aiTable.selection().selectedCells.set(recordId, { [fieldId]: true });
|
1804
|
-
}
|
1805
|
-
selectField(fieldId) {
|
1806
|
-
if (this.aiTable.selection().selectedFields.has(fieldId)) {
|
1807
|
-
return;
|
1808
|
-
}
|
1809
|
-
this.clearSelection();
|
1810
|
-
this.aiTable.selection().selectedFields.set(fieldId, true);
|
1811
|
-
}
|
1812
|
-
selectRecord(recordId) {
|
1813
|
-
if (this.aiTable.selection().selectedRecords.has(recordId)) {
|
1814
|
-
this.aiTable.selection().selectedRecords.delete(recordId);
|
1815
|
-
}
|
1816
|
-
else {
|
1817
|
-
this.aiTable.selection().selectedRecords.set(recordId, true);
|
1818
|
-
}
|
1819
|
-
this.aiTable.selection.set({
|
1820
|
-
selectedRecords: this.aiTable.selection().selectedRecords,
|
1821
|
-
selectedFields: new Map(),
|
1822
|
-
selectedCells: new Map()
|
1823
|
-
});
|
1824
|
-
}
|
1825
|
-
toggleSelectAll(checked) {
|
1826
|
-
this.clearSelection();
|
1827
|
-
if (checked) {
|
1828
|
-
this.aiTable.records().forEach((item) => {
|
1829
|
-
this.selectRecord(item._id);
|
1830
|
-
});
|
1831
|
-
}
|
1832
|
-
}
|
1833
|
-
updateSelect(event) {
|
1834
|
-
const target = event?.target;
|
1835
|
-
if (!target) {
|
1836
|
-
return;
|
1837
|
-
}
|
1838
|
-
const cellDom = target.closest('.grid-cell');
|
1839
|
-
const colDom = target.closest('.grid-field');
|
1840
|
-
const checkbox = target.tagName === 'INPUT' && target.type === 'checkbox' && target.closest('.grid-checkbox');
|
1841
|
-
const fieldAction = target.closest('.grid-field-action');
|
1842
|
-
if (cellDom) {
|
1843
|
-
const fieldId = cellDom.getAttribute('fieldId');
|
1844
|
-
const recordId = cellDom.getAttribute('recordId');
|
1845
|
-
fieldId && recordId && this.selectCell(recordId, fieldId);
|
1846
|
-
}
|
1847
|
-
if (colDom && !fieldAction) {
|
1848
|
-
const fieldId = colDom.getAttribute('fieldId');
|
1849
|
-
fieldId && this.selectField(fieldId);
|
1850
|
-
}
|
1851
|
-
if (!cellDom && !colDom && !checkbox) {
|
1852
|
-
this.clearSelection();
|
1853
|
-
}
|
1854
|
-
}
|
1855
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1856
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService }); }
|
1857
|
-
}
|
1858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService, decorators: [{
|
1859
|
-
type: Injectable
|
1860
|
-
}], ctorParameters: () => [] });
|
1861
|
-
|
1862
1925
|
function getColumnIndicesMap(fields) {
|
1863
1926
|
const columnIndicesMap = {};
|
1864
1927
|
fields?.forEach((field, index) => {
|
@@ -2549,6 +2612,23 @@ class AITableGridEventService {
|
|
2549
2612
|
}
|
2550
2613
|
return null;
|
2551
2614
|
}
|
2615
|
+
openContextMenu(aiTable, options) {
|
2616
|
+
const { origin, position, menuItems, targetName, viewContainerRef } = options;
|
2617
|
+
const ref = this.thyPopover.open(AITableContextMenu, {
|
2618
|
+
origin: origin,
|
2619
|
+
originPosition: position,
|
2620
|
+
placement: 'bottomLeft',
|
2621
|
+
insideClosable: true,
|
2622
|
+
viewContainerRef,
|
2623
|
+
initialState: {
|
2624
|
+
aiTable,
|
2625
|
+
menuItems,
|
2626
|
+
targetName,
|
2627
|
+
position
|
2628
|
+
}
|
2629
|
+
});
|
2630
|
+
return ref;
|
2631
|
+
}
|
2552
2632
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2553
2633
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridEventService }); }
|
2554
2634
|
}
|
@@ -2560,6 +2640,7 @@ class AITableGridBase {
|
|
2560
2640
|
constructor() {
|
2561
2641
|
this.aiRecords = model.required();
|
2562
2642
|
this.aiFields = model.required();
|
2643
|
+
this.aiContextMenuItems = input([]);
|
2563
2644
|
this.aiFieldConfig = input();
|
2564
2645
|
this.aiReadonly = input();
|
2565
2646
|
this.aiPlugins = input();
|
@@ -2688,7 +2769,7 @@ class AITableGridBase {
|
|
2688
2769
|
}
|
2689
2770
|
}
|
2690
2771
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2691
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AITableGridBase, isStandalone: true, selector: "ai-table-grid-base", inputs: { aiRecords: { classPropertyName: "aiRecords", publicName: "aiRecords", isSignal: true, isRequired: true, transformFunction: null }, aiFields: { classPropertyName: "aiFields", publicName: "aiFields", isSignal: true, isRequired: true, transformFunction: null }, aiFieldConfig: { classPropertyName: "aiFieldConfig", publicName: "aiFieldConfig", isSignal: true, isRequired: false, transformFunction: null }, aiReadonly: { classPropertyName: "aiReadonly", publicName: "aiReadonly", isSignal: true, isRequired: false, transformFunction: null }, aiPlugins: { classPropertyName: "aiPlugins", publicName: "aiPlugins", isSignal: true, isRequired: false, transformFunction: null }, aiReferences: { classPropertyName: "aiReferences", publicName: "aiReferences", isSignal: true, isRequired: true, transformFunction: null }, aiBuildRenderDataFn: { classPropertyName: "aiBuildRenderDataFn", publicName: "aiBuildRenderDataFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aiRecords: "aiRecordsChange", aiFields: "aiFieldsChange", aiTableInitialized: "aiTableInitialized", aiAddRecord: "aiAddRecord", aiAddField: "aiAddField", aiUpdateFieldValue: "aiUpdateFieldValue" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2772
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AITableGridBase, isStandalone: true, selector: "ai-table-grid-base", inputs: { aiRecords: { classPropertyName: "aiRecords", publicName: "aiRecords", isSignal: true, isRequired: true, transformFunction: null }, aiFields: { classPropertyName: "aiFields", publicName: "aiFields", isSignal: true, isRequired: true, transformFunction: null }, aiContextMenuItems: { classPropertyName: "aiContextMenuItems", publicName: "aiContextMenuItems", isSignal: true, isRequired: false, transformFunction: null }, aiFieldConfig: { classPropertyName: "aiFieldConfig", publicName: "aiFieldConfig", isSignal: true, isRequired: false, transformFunction: null }, aiReadonly: { classPropertyName: "aiReadonly", publicName: "aiReadonly", isSignal: true, isRequired: false, transformFunction: null }, aiPlugins: { classPropertyName: "aiPlugins", publicName: "aiPlugins", isSignal: true, isRequired: false, transformFunction: null }, aiReferences: { classPropertyName: "aiReferences", publicName: "aiReferences", isSignal: true, isRequired: true, transformFunction: null }, aiBuildRenderDataFn: { classPropertyName: "aiBuildRenderDataFn", publicName: "aiBuildRenderDataFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aiRecords: "aiRecordsChange", aiFields: "aiFieldsChange", aiTableInitialized: "aiTableInitialized", aiAddRecord: "aiAddRecord", aiAddField: "aiAddField", aiUpdateFieldValue: "aiUpdateFieldValue" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2692
2773
|
}
|
2693
2774
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridBase, decorators: [{
|
2694
2775
|
type: Component,
|
@@ -2737,7 +2818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
2737
2818
|
ThyDatePickerFormatPipe,
|
2738
2819
|
ThyFlexibleText,
|
2739
2820
|
ThyStopPropagationDirective,
|
2740
|
-
|
2821
|
+
AITableFieldMenu,
|
2741
2822
|
ThyAction,
|
2742
2823
|
ThyDropdownDirective,
|
2743
2824
|
ThyDropdownMenuComponent,
|
@@ -4304,9 +4385,9 @@ class Layout extends Drawer {
|
|
4304
4385
|
get isLast() {
|
4305
4386
|
return this.columnIndex === this.columnCount - 1;
|
4306
4387
|
}
|
4307
|
-
renderAddFieldBlank({
|
4388
|
+
renderAddFieldBlank({ isHoverRow, isCheckedRow }) {
|
4308
4389
|
const rowHeight = this.rowHeight;
|
4309
|
-
const fill =
|
4390
|
+
const fill = isCheckedRow ? this.colors.itemActiveBgColor : isHoverRow ? this.colors.gray80 : this.colors.transparent;
|
4310
4391
|
const addFieldBlankX = this.x + this.columnWidth + AI_TABLE_OFFSET;
|
4311
4392
|
this.rect({
|
4312
4393
|
x: addFieldBlankX,
|
@@ -4321,8 +4402,8 @@ class Layout extends Drawer {
|
|
4321
4402
|
}
|
4322
4403
|
|
4323
4404
|
class AddRowLayout extends Layout {
|
4324
|
-
renderAddFieldBlank({ isHoverRow }) {
|
4325
|
-
super.renderAddFieldBlank({ isHoverRow });
|
4405
|
+
renderAddFieldBlank({ isHoverRow, isCheckedRow }) {
|
4406
|
+
super.renderAddFieldBlank({ isHoverRow, isCheckedRow });
|
4326
4407
|
const rowHeight = this.rowHeight;
|
4327
4408
|
const defaultWidth = AI_TABLE_FIELD_ADD_BUTTON_WIDTH;
|
4328
4409
|
const width = this.containerWidth - this.x < defaultWidth ? defaultWidth : this.containerWidth - this.x;
|
@@ -4381,7 +4462,7 @@ class AddRowLayout extends Layout {
|
|
4381
4462
|
fill: this.colors.gray600
|
4382
4463
|
});
|
4383
4464
|
}
|
4384
|
-
renderLastCell({ isHoverRow }) {
|
4465
|
+
renderLastCell({ isHoverRow, isCheckedRow }) {
|
4385
4466
|
if (!this.isLast)
|
4386
4467
|
return;
|
4387
4468
|
const width = this.columnWidth;
|
@@ -4391,7 +4472,7 @@ class AddRowLayout extends Layout {
|
|
4391
4472
|
isHoverRow
|
4392
4473
|
});
|
4393
4474
|
}
|
4394
|
-
this.renderAddFieldBlank({ isHoverRow });
|
4475
|
+
this.renderAddFieldBlank({ isHoverRow, isCheckedRow });
|
4395
4476
|
}
|
4396
4477
|
renderCommonCell({ isHoverRow }) {
|
4397
4478
|
if (this.isFirst || this.isLast)
|
@@ -4401,7 +4482,7 @@ class AddRowLayout extends Layout {
|
|
4401
4482
|
isHoverRow
|
4402
4483
|
});
|
4403
4484
|
}
|
4404
|
-
render({ isHoverRow }) {
|
4485
|
+
render({ isHoverRow, isCheckedRow }) {
|
4405
4486
|
this.renderFirstCell({
|
4406
4487
|
isHoverRow
|
4407
4488
|
});
|
@@ -4409,7 +4490,8 @@ class AddRowLayout extends Layout {
|
|
4409
4490
|
isHoverRow
|
4410
4491
|
});
|
4411
4492
|
this.renderLastCell({
|
4412
|
-
isHoverRow
|
4493
|
+
isHoverRow,
|
4494
|
+
isCheckedRow
|
4413
4495
|
});
|
4414
4496
|
}
|
4415
4497
|
}
|
@@ -5054,7 +5136,7 @@ class RecordRowLayout extends Layout {
|
|
5054
5136
|
}
|
5055
5137
|
}
|
5056
5138
|
// 尾列
|
5057
|
-
renderLastCell({ style, isHoverRow }) {
|
5139
|
+
renderLastCell({ style, isHoverRow, isCheckedRow }) {
|
5058
5140
|
if (!this.isLast || this.isFirst)
|
5059
5141
|
return;
|
5060
5142
|
const { fill, stroke } = style;
|
@@ -5069,7 +5151,7 @@ class RecordRowLayout extends Layout {
|
|
5069
5151
|
stroke: stroke || colors.gray200
|
5070
5152
|
});
|
5071
5153
|
// 延伸到 FIELD_ADD_BUTTON
|
5072
|
-
super.renderAddFieldBlank({
|
5154
|
+
super.renderAddFieldBlank({ isHoverRow, isCheckedRow });
|
5073
5155
|
const rowHeight = this.rowHeight;
|
5074
5156
|
const startX = this.x + this.columnWidth;
|
5075
5157
|
const lineWidth = this.containerWidth - startX < AI_TABLE_FIELD_ADD_BUTTON_WIDTH ? AI_TABLE_FIELD_ADD_BUTTON_WIDTH : this.containerWidth - startX;
|
@@ -5100,7 +5182,7 @@ class RecordRowLayout extends Layout {
|
|
5100
5182
|
const { row, style, isCheckedRow, isHoverRow } = config;
|
5101
5183
|
this.renderFirstCell({ row, style, isCheckedRow, isHoverRow });
|
5102
5184
|
this.renderCommonCell({ style });
|
5103
|
-
this.renderLastCell({ style, isHoverRow });
|
5185
|
+
this.renderLastCell({ style, isCheckedRow, isHoverRow });
|
5104
5186
|
}
|
5105
5187
|
}
|
5106
5188
|
const recordRowLayout = new RecordRowLayout();
|
@@ -5147,6 +5229,7 @@ const createCells = (config) => {
|
|
5147
5229
|
switch (type) {
|
5148
5230
|
case AITableRowType.add: {
|
5149
5231
|
const isHoverRow = isHover && targetName === AI_TABLE_ROW_ADD_BUTTON;
|
5232
|
+
const isCheckedRow = aiTable.selection().selectedRecords.has(row._id);
|
5150
5233
|
addRowLayout.init({
|
5151
5234
|
x,
|
5152
5235
|
y,
|
@@ -5158,19 +5241,24 @@ const createCells = (config) => {
|
|
5158
5241
|
containerWidth: coordinate.containerWidth
|
5159
5242
|
});
|
5160
5243
|
addRowLayout.render({
|
5161
|
-
isHoverRow
|
5244
|
+
isHoverRow,
|
5245
|
+
isCheckedRow
|
5162
5246
|
});
|
5163
5247
|
break;
|
5164
5248
|
}
|
5165
5249
|
case AITableRowType.record: {
|
5166
5250
|
let background = colors.white;
|
5251
|
+
const fieldId = field._id;
|
5167
5252
|
const isCheckedRow = aiTable.selection().selectedRecords.has(row._id);
|
5168
|
-
const isSelected = aiTable.selection().selectedFields.has(
|
5253
|
+
const isSelected = aiTable.selection().selectedFields.has(fieldId);
|
5169
5254
|
const isHoverRow = isHover && targetName !== AI_TABLE_FIELD_HEAD;
|
5170
|
-
|
5255
|
+
const activeCell = AITable.getActiveCell(aiTable);
|
5256
|
+
const isSiblingActiveCell = recordId === activeCell?.recordId && fieldId !== activeCell?.fieldId;
|
5257
|
+
const isActiveCell = recordId === activeCell?.recordId;
|
5258
|
+
if (isCheckedRow || isSelected || isSiblingActiveCell) {
|
5171
5259
|
background = colors.itemActiveBgColor;
|
5172
5260
|
}
|
5173
|
-
else if (isHoverRow) {
|
5261
|
+
else if (isHoverRow && !isActiveCell) {
|
5174
5262
|
background = colors.gray80;
|
5175
5263
|
}
|
5176
5264
|
recordRowLayout.init({
|
@@ -5197,7 +5285,7 @@ const createCells = (config) => {
|
|
5197
5285
|
const realX = x + offset + AI_TABLE_OFFSET;
|
5198
5286
|
const realY = y + AI_TABLE_OFFSET;
|
5199
5287
|
const style = { fontWeight: DEFAULT_FONT_STYLE };
|
5200
|
-
const cellValue = AITableQueries.getFieldValue(aiTable, [recordId,
|
5288
|
+
const cellValue = AITableQueries.getFieldValue(aiTable, [recordId, fieldId]);
|
5201
5289
|
const transformValue = transformCellValue(aiTable, field, cellValue);
|
5202
5290
|
const render = {
|
5203
5291
|
aiTable,
|
@@ -5772,7 +5860,7 @@ class AITableHoverRowHeads {
|
|
5772
5860
|
continue;
|
5773
5861
|
}
|
5774
5862
|
let isHoverRow;
|
5775
|
-
if (pointRowIndex > -1) {
|
5863
|
+
if (pointRowIndex > -1 && !!context.linearRows().length && pointRowIndex < context.linearRows().length) {
|
5776
5864
|
const { type: pointRowType, _id: pointRecordId } = context.linearRows()[pointRowIndex];
|
5777
5865
|
isHoverRow = recordId === pointRecordId && pointRowType === AITableRowType.record && targetName !== AI_TABLE_FIELD_HEAD;
|
5778
5866
|
}
|
@@ -6003,6 +6091,7 @@ class AITableRenderer {
|
|
6003
6091
|
this.config = input.required();
|
6004
6092
|
this.koMousemove = output();
|
6005
6093
|
this.koMousedown = output();
|
6094
|
+
this.koContextmenu = output();
|
6006
6095
|
this.koWheel = output();
|
6007
6096
|
this.koClick = output();
|
6008
6097
|
this.koDblclick = output();
|
@@ -6136,6 +6225,9 @@ class AITableRenderer {
|
|
6136
6225
|
stageMousedown(e) {
|
6137
6226
|
this.koMousedown.emit(e);
|
6138
6227
|
}
|
6228
|
+
stageContextmenu(e) {
|
6229
|
+
this.koContextmenu.emit(e);
|
6230
|
+
}
|
6139
6231
|
stageClick(e) {
|
6140
6232
|
this.koClick.emit(e);
|
6141
6233
|
}
|
@@ -6143,7 +6235,7 @@ class AITableRenderer {
|
|
6143
6235
|
this.koDblclick.emit(e);
|
6144
6236
|
}
|
6145
6237
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
6146
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AITableRenderer, isStandalone: true, selector: "ai-table-renderer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { koMousemove: "koMousemove", koMousedown: "koMousedown", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoStage, selector: "ko-stage", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: AITableColumnHeads, selector: "ai-table-column-heads", inputs: ["config"] }, { kind: "component", type: AITableFrozenColumnHeads, selector: "ai-table-frozen-column-heads", inputs: ["config"] }, { kind: "component", type: AITableCells, selector: "ai-table-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenCells, selector: "ai-table-frozen-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenPlaceholderCells, selector: "ai-table-frozen-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITablePlaceholderCells, selector: "ai-table-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableAddField, selector: "ai-table-add-field", inputs: ["config"] }, { kind: "component", type: AITableHoverRowHeads, selector: "ai-table-hover-row-heads", inputs: ["config"] }, { kind: "component", type: AITableOtherRows, selector: "ai-table-other-rows", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
6238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AITableRenderer, isStandalone: true, selector: "ai-table-renderer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { koMousemove: "koMousemove", koMousedown: "koMousedown", koContextmenu: "koContextmenu", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoStage, selector: "ko-stage", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: AITableColumnHeads, selector: "ai-table-column-heads", inputs: ["config"] }, { kind: "component", type: AITableFrozenColumnHeads, selector: "ai-table-frozen-column-heads", inputs: ["config"] }, { kind: "component", type: AITableCells, selector: "ai-table-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenCells, selector: "ai-table-frozen-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenPlaceholderCells, selector: "ai-table-frozen-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITablePlaceholderCells, selector: "ai-table-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableAddField, selector: "ai-table-add-field", inputs: ["config"] }, { kind: "component", type: AITableHoverRowHeads, selector: "ai-table-hover-row-heads", inputs: ["config"] }, { kind: "component", type: AITableOtherRows, selector: "ai-table-other-rows", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
6147
6239
|
}
|
6148
6240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableRenderer, decorators: [{
|
6149
6241
|
type: Component,
|
@@ -6160,12 +6252,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
6160
6252
|
AITableAddField,
|
6161
6253
|
AITableHoverRowHeads,
|
6162
6254
|
AITableOtherRows
|
6163
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
|
6255
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
|
6164
6256
|
}] });
|
6165
6257
|
|
6166
6258
|
class AITableGrid extends AITableGridBase {
|
6167
6259
|
constructor() {
|
6168
6260
|
super();
|
6261
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
6169
6262
|
this.fieldHeadHeight = AI_TABLE_FIELD_HEAD_HEIGHT;
|
6170
6263
|
this.containerRect = signal({ width: 0, height: 0 });
|
6171
6264
|
this.hasContainerRect = computed(() => {
|
@@ -6308,6 +6401,12 @@ class AITableGrid extends AITableGridBase {
|
|
6308
6401
|
const mouseEvent = e.event.evt;
|
6309
6402
|
const _targetName = e.event.target.name();
|
6310
6403
|
const { targetName, fieldId, recordId } = getDetailByTargetName(_targetName);
|
6404
|
+
if (mouseEvent.button === AITableMouseDownType.Right &&
|
6405
|
+
recordId &&
|
6406
|
+
fieldId &&
|
6407
|
+
this.aiTable.selection().selectedRecords.has(recordId)) {
|
6408
|
+
return;
|
6409
|
+
}
|
6311
6410
|
switch (targetName) {
|
6312
6411
|
case AI_TABLE_FIELD_HEAD:
|
6313
6412
|
mouseEvent.preventDefault();
|
@@ -6330,6 +6429,33 @@ class AITableGrid extends AITableGridBase {
|
|
6330
6429
|
this.aiTableGridSelectionService.clearSelection();
|
6331
6430
|
}
|
6332
6431
|
}
|
6432
|
+
stageContextmenu(e) {
|
6433
|
+
const mouseEvent = e.event.evt;
|
6434
|
+
mouseEvent.preventDefault();
|
6435
|
+
if (this.aiReadonly()) {
|
6436
|
+
return;
|
6437
|
+
}
|
6438
|
+
const targetName = e.event.target.name();
|
6439
|
+
const { fieldId, recordId } = getDetailByTargetName(targetName);
|
6440
|
+
if (!recordId || !fieldId) {
|
6441
|
+
return;
|
6442
|
+
}
|
6443
|
+
const position = {
|
6444
|
+
x: mouseEvent.x,
|
6445
|
+
y: mouseEvent.y
|
6446
|
+
};
|
6447
|
+
const menuItems = this.aiContextMenuItems();
|
6448
|
+
if (!menuItems.length || menuItems.every((item) => !!(item.hidden && item.hidden(this.aiTable, targetName, position)))) {
|
6449
|
+
return;
|
6450
|
+
}
|
6451
|
+
this.aiTableGridEventService.openContextMenu(this.aiTable, {
|
6452
|
+
origin: this.containerElement(),
|
6453
|
+
menuItems,
|
6454
|
+
position,
|
6455
|
+
targetName,
|
6456
|
+
viewContainerRef: this.viewContainerRef
|
6457
|
+
});
|
6458
|
+
}
|
6333
6459
|
stageClick(e) {
|
6334
6460
|
const mouseEvent = e.event.evt;
|
6335
6461
|
mouseEvent.preventDefault();
|
@@ -6441,7 +6567,9 @@ class AITableGrid extends AITableGridBase {
|
|
6441
6567
|
}
|
6442
6568
|
bindGlobalMousedown() {
|
6443
6569
|
fromEvent(document, 'mousedown', { passive: true })
|
6444
|
-
.pipe(filter((e) => e.target instanceof Element &&
|
6570
|
+
.pipe(filter((e) => e.target instanceof Element &&
|
6571
|
+
!this.containerElement().contains(e.target) &&
|
6572
|
+
!(e.target.closest(AI_TABLE_PROHIBIT_CLEAR_SELECTION_CLASS) && this.aiTable.selection().selectedRecords.size > 0)), takeUntilDestroyed(this.destroyRef))
|
6445
6573
|
.subscribe(() => {
|
6446
6574
|
this.aiTableGridSelectionService.clearSelection();
|
6447
6575
|
});
|
@@ -6516,18 +6644,18 @@ class AITableGrid extends AITableGridBase {
|
|
6516
6644
|
}
|
6517
6645
|
}
|
6518
6646
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
6519
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AITableGrid, isStandalone: true, selector: "ai-table-grid", host: { classAttribute: "ai-table-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService], 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 (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\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</div>\n", dependencies: [{ kind: "component", type: AITableRenderer, selector: "ai-table-renderer", inputs: ["config"], outputs: ["koMousemove", "koMousedown", "koWheel", "koClick", "koDblclick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
6647
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AITableGrid, isStandalone: true, selector: "ai-table-grid", host: { classAttribute: "ai-table-grid" }, providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService], 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 (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\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</div>\n", dependencies: [{ kind: "component", type: AITableRenderer, selector: "ai-table-renderer", inputs: ["config"], outputs: ["koMousemove", "koMousedown", "koContextmenu", "koWheel", "koClick", "koDblclick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
6520
6648
|
}
|
6521
6649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGrid, decorators: [{
|
6522
6650
|
type: Component,
|
6523
6651
|
args: [{ selector: 'ai-table-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
6524
6652
|
class: 'ai-table-grid'
|
6525
|
-
}, imports: [AITableRenderer], providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService], 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 (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\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</div>\n" }]
|
6653
|
+
}, imports: [AITableRenderer], providers: [AITableGridEventService, AITableGridFieldService, AITableGridSelectionService], 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 (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\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</div>\n" }]
|
6526
6654
|
}], ctorParameters: () => [] });
|
6527
6655
|
|
6528
6656
|
/**
|
6529
6657
|
* Generated bundle index. Do not edit.
|
6530
6658
|
*/
|
6531
6659
|
|
6532
|
-
export { AITable, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableCheckType, AITableDomGrid, AITableFieldPropertyEditor, AITableFieldType, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridSelectionService, AITableMemberType, AITableMouseDownType, AITableQueries, AITableRenderer, AITableRowColumnType, AITableRowType, AITableSelectOptionStyle, AITableStatType, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, 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_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, 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_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_Width, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AbstractEditCellEditor, AddOutlinedPath, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, 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, DepartmentOutlinedPath, Direction, FONT_SIZE_SM, FieldOptions, GRID_CELL_EDITOR_MAP, IsSelectRecordPipe, LinkCellEditorComponent, MIN_COLUMN_WIDTH, MOUSEOVER_EDIT_TYPE, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, ProgressEditorComponent, RatingCellEditorComponent, RendererContext, RowHeight, SelectCellEditorComponent, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, buildGridData, buildGridLinearRows, castToString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesMap, getDefaultFieldValue, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getHoverEditorBoxOffset, getHoverEditorSpace, getMousePosition, getPlaceHolderCellsConfigs, getTargetName, getTextWidth, getVisibleRangeInfo, handleMouseStyle, idCreator, idsCreator, imageCache, isArrayField, isMac, isNumberFiled, isSameFieldOption, isSystemField, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, textDataCache, transformCellValue };
|
6660
|
+
export { AITable, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableCheckType, AITableContextMenu, AITableDomGrid, AITableFieldIsMultiplePipe, AITableFieldPropertyEditor, AITableFieldType, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridSelectionService, AITableMemberType, AITableMouseDownType, AITableQueries, AITableRenderer, AITableRowColumnType, AITableRowType, AITableSelectOptionStyle, AITableStatType, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, 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_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, 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_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_Width, AI_TABLE_PROHIBIT_CLEAR_SELECTION_CLASS, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AbstractEditCellEditor, AddOutlinedPath, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, 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, DepartmentOutlinedPath, Direction, FONT_SIZE_SM, FieldOptions, GRID_CELL_EDITOR_MAP, IsSelectRecordPipe, LinkCellEditorComponent, MIN_COLUMN_WIDTH, MOUSEOVER_EDIT_TYPE, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, ProgressEditorComponent, RatingCellEditorComponent, RendererContext, RowHeight, SelectCellEditorComponent, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, buildGridData, buildGridLinearRows, castToString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesMap, getDefaultFieldValue, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getHoverEditorBoxOffset, getHoverEditorSpace, getMousePosition, getPlaceHolderCellsConfigs, getTargetName, getTextWidth, getVisibleRangeInfo, handleMouseStyle, idCreator, idsCreator, imageCache, isArrayField, isMac, isNumberFiled, isSameFieldOption, isSystemField, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, textDataCache, transformCellValue };
|
6533
6661
|
//# sourceMappingURL=ai-table-grid.mjs.map
|