@ai-table/grid 0.0.20 → 0.0.22
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-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/core/types/core.d.ts +5 -1
- package/core/types/core.d.ts.map +1 -1
- package/core/utils/field.d.ts +1 -1
- package/core/utils/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 +6 -6
- 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/core/types/core.mjs +1 -1
- package/esm2022/core/utils/field.mjs +3 -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 +242 -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/components/text.component.d.ts +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 +1 -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: {
|
@@ -632,7 +638,7 @@ function getDefaultFieldValue(field) {
|
|
632
638
|
return [];
|
633
639
|
}
|
634
640
|
if (isNumberFiled(field)) {
|
635
|
-
return
|
641
|
+
return null;
|
636
642
|
}
|
637
643
|
return '';
|
638
644
|
}
|
@@ -651,7 +657,7 @@ function getFieldOptionByField(field) {
|
|
651
657
|
}
|
652
658
|
function isSameFieldOption(fieldOption, field) {
|
653
659
|
return (fieldOption.type === field.type &&
|
654
|
-
(fieldOption.type === AITableFieldType.select
|
660
|
+
(fieldOption.type === AITableFieldType.select || fieldOption.type === AITableFieldType.member
|
655
661
|
? !!fieldOption.settings?.is_multiple === !!field.settings?.is_multiple
|
656
662
|
: true));
|
657
663
|
}
|
@@ -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,12 +1803,12 @@ 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, host: {
|
1811
|
+
args: [{ selector: 'ai-table-field-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
1678
1812
|
class: 'field-menu'
|
1679
1813
|
}, imports: [
|
1680
1814
|
ThyIcon,
|
@@ -1754,6 +1888,8 @@ class AITableGridFieldService {
|
|
1754
1888
|
placement: 'bottomLeft',
|
1755
1889
|
manualClosure: true,
|
1756
1890
|
originActiveClass: undefined,
|
1891
|
+
height: 'auto',
|
1892
|
+
panelClass: 'ai-table-field-property-editor-panel',
|
1757
1893
|
initialState: {
|
1758
1894
|
aiTable,
|
1759
1895
|
aiEditField: field,
|
@@ -1763,11 +1899,12 @@ class AITableGridFieldService {
|
|
1763
1899
|
}
|
1764
1900
|
openFieldMenu(aiTable, options) {
|
1765
1901
|
const { origin, editOrigin, position, fieldId, fieldMenus } = options;
|
1766
|
-
const ref = this.thyPopover.open(
|
1902
|
+
const ref = this.thyPopover.open(AITableFieldMenu, {
|
1767
1903
|
origin,
|
1768
1904
|
originPosition: position,
|
1769
1905
|
placement: 'bottomLeft',
|
1770
1906
|
originActiveClass: undefined,
|
1907
|
+
insideClosable: true,
|
1771
1908
|
initialState: {
|
1772
1909
|
origin: editOrigin,
|
1773
1910
|
position: options.editFieldPosition,
|
@@ -1785,83 +1922,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
1785
1922
|
type: Injectable
|
1786
1923
|
}], ctorParameters: () => [{ type: i1$1.ThyPopover }] });
|
1787
1924
|
|
1788
|
-
class AITableGridSelectionService {
|
1789
|
-
constructor() { }
|
1790
|
-
initialize(aiTable) {
|
1791
|
-
this.aiTable = aiTable;
|
1792
|
-
}
|
1793
|
-
clearSelection() {
|
1794
|
-
this.aiTable.selection.set({
|
1795
|
-
selectedRecords: new Map(),
|
1796
|
-
selectedFields: new Map(),
|
1797
|
-
selectedCells: new Map()
|
1798
|
-
});
|
1799
|
-
}
|
1800
|
-
selectCell(recordId, fieldId) {
|
1801
|
-
const fields = this.aiTable.selection().selectedCells.get(recordId);
|
1802
|
-
if (fields?.hasOwnProperty(fieldId)) {
|
1803
|
-
return;
|
1804
|
-
}
|
1805
|
-
this.clearSelection();
|
1806
|
-
this.aiTable.selection().selectedCells.set(recordId, { [fieldId]: true });
|
1807
|
-
}
|
1808
|
-
selectField(fieldId) {
|
1809
|
-
if (this.aiTable.selection().selectedFields.has(fieldId)) {
|
1810
|
-
return;
|
1811
|
-
}
|
1812
|
-
this.clearSelection();
|
1813
|
-
this.aiTable.selection().selectedFields.set(fieldId, true);
|
1814
|
-
}
|
1815
|
-
selectRecord(recordId) {
|
1816
|
-
if (this.aiTable.selection().selectedRecords.has(recordId)) {
|
1817
|
-
this.aiTable.selection().selectedRecords.delete(recordId);
|
1818
|
-
}
|
1819
|
-
else {
|
1820
|
-
this.aiTable.selection().selectedRecords.set(recordId, true);
|
1821
|
-
}
|
1822
|
-
this.aiTable.selection.set({
|
1823
|
-
selectedRecords: this.aiTable.selection().selectedRecords,
|
1824
|
-
selectedFields: new Map(),
|
1825
|
-
selectedCells: new Map()
|
1826
|
-
});
|
1827
|
-
}
|
1828
|
-
toggleSelectAll(checked) {
|
1829
|
-
this.clearSelection();
|
1830
|
-
if (checked) {
|
1831
|
-
this.aiTable.records().forEach((item) => {
|
1832
|
-
this.selectRecord(item._id);
|
1833
|
-
});
|
1834
|
-
}
|
1835
|
-
}
|
1836
|
-
updateSelect(event) {
|
1837
|
-
const target = event?.target;
|
1838
|
-
if (!target) {
|
1839
|
-
return;
|
1840
|
-
}
|
1841
|
-
const cellDom = target.closest('.grid-cell');
|
1842
|
-
const colDom = target.closest('.grid-field');
|
1843
|
-
const checkbox = target.tagName === 'INPUT' && target.type === 'checkbox' && target.closest('.grid-checkbox');
|
1844
|
-
const fieldAction = target.closest('.grid-field-action');
|
1845
|
-
if (cellDom) {
|
1846
|
-
const fieldId = cellDom.getAttribute('fieldId');
|
1847
|
-
const recordId = cellDom.getAttribute('recordId');
|
1848
|
-
fieldId && recordId && this.selectCell(recordId, fieldId);
|
1849
|
-
}
|
1850
|
-
if (colDom && !fieldAction) {
|
1851
|
-
const fieldId = colDom.getAttribute('fieldId');
|
1852
|
-
fieldId && this.selectField(fieldId);
|
1853
|
-
}
|
1854
|
-
if (!cellDom && !colDom && !checkbox) {
|
1855
|
-
this.clearSelection();
|
1856
|
-
}
|
1857
|
-
}
|
1858
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1859
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService }); }
|
1860
|
-
}
|
1861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridSelectionService, decorators: [{
|
1862
|
-
type: Injectable
|
1863
|
-
}], ctorParameters: () => [] });
|
1864
|
-
|
1865
1925
|
function getColumnIndicesMap(fields) {
|
1866
1926
|
const columnIndicesMap = {};
|
1867
1927
|
fields?.forEach((field, index) => {
|
@@ -2552,6 +2612,23 @@ class AITableGridEventService {
|
|
2552
2612
|
}
|
2553
2613
|
return null;
|
2554
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
|
+
}
|
2555
2632
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2556
2633
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridEventService }); }
|
2557
2634
|
}
|
@@ -2563,6 +2640,7 @@ class AITableGridBase {
|
|
2563
2640
|
constructor() {
|
2564
2641
|
this.aiRecords = model.required();
|
2565
2642
|
this.aiFields = model.required();
|
2643
|
+
this.aiContextMenuItems = input([]);
|
2566
2644
|
this.aiFieldConfig = input();
|
2567
2645
|
this.aiReadonly = input();
|
2568
2646
|
this.aiPlugins = input();
|
@@ -2691,7 +2769,7 @@ class AITableGridBase {
|
|
2691
2769
|
}
|
2692
2770
|
}
|
2693
2771
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2694
|
-
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 }); }
|
2695
2773
|
}
|
2696
2774
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGridBase, decorators: [{
|
2697
2775
|
type: Component,
|
@@ -2740,7 +2818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
2740
2818
|
ThyDatePickerFormatPipe,
|
2741
2819
|
ThyFlexibleText,
|
2742
2820
|
ThyStopPropagationDirective,
|
2743
|
-
|
2821
|
+
AITableFieldMenu,
|
2744
2822
|
ThyAction,
|
2745
2823
|
ThyDropdownDirective,
|
2746
2824
|
ThyDropdownMenuComponent,
|
@@ -4307,9 +4385,9 @@ class Layout extends Drawer {
|
|
4307
4385
|
get isLast() {
|
4308
4386
|
return this.columnIndex === this.columnCount - 1;
|
4309
4387
|
}
|
4310
|
-
renderAddFieldBlank({
|
4388
|
+
renderAddFieldBlank({ isHoverRow, isCheckedRow }) {
|
4311
4389
|
const rowHeight = this.rowHeight;
|
4312
|
-
const fill =
|
4390
|
+
const fill = isCheckedRow ? this.colors.itemActiveBgColor : isHoverRow ? this.colors.gray80 : this.colors.transparent;
|
4313
4391
|
const addFieldBlankX = this.x + this.columnWidth + AI_TABLE_OFFSET;
|
4314
4392
|
this.rect({
|
4315
4393
|
x: addFieldBlankX,
|
@@ -4324,8 +4402,8 @@ class Layout extends Drawer {
|
|
4324
4402
|
}
|
4325
4403
|
|
4326
4404
|
class AddRowLayout extends Layout {
|
4327
|
-
renderAddFieldBlank({ isHoverRow }) {
|
4328
|
-
super.renderAddFieldBlank({ isHoverRow });
|
4405
|
+
renderAddFieldBlank({ isHoverRow, isCheckedRow }) {
|
4406
|
+
super.renderAddFieldBlank({ isHoverRow, isCheckedRow });
|
4329
4407
|
const rowHeight = this.rowHeight;
|
4330
4408
|
const defaultWidth = AI_TABLE_FIELD_ADD_BUTTON_WIDTH;
|
4331
4409
|
const width = this.containerWidth - this.x < defaultWidth ? defaultWidth : this.containerWidth - this.x;
|
@@ -4384,7 +4462,7 @@ class AddRowLayout extends Layout {
|
|
4384
4462
|
fill: this.colors.gray600
|
4385
4463
|
});
|
4386
4464
|
}
|
4387
|
-
renderLastCell({ isHoverRow }) {
|
4465
|
+
renderLastCell({ isHoverRow, isCheckedRow }) {
|
4388
4466
|
if (!this.isLast)
|
4389
4467
|
return;
|
4390
4468
|
const width = this.columnWidth;
|
@@ -4394,7 +4472,7 @@ class AddRowLayout extends Layout {
|
|
4394
4472
|
isHoverRow
|
4395
4473
|
});
|
4396
4474
|
}
|
4397
|
-
this.renderAddFieldBlank({ isHoverRow });
|
4475
|
+
this.renderAddFieldBlank({ isHoverRow, isCheckedRow });
|
4398
4476
|
}
|
4399
4477
|
renderCommonCell({ isHoverRow }) {
|
4400
4478
|
if (this.isFirst || this.isLast)
|
@@ -4404,7 +4482,7 @@ class AddRowLayout extends Layout {
|
|
4404
4482
|
isHoverRow
|
4405
4483
|
});
|
4406
4484
|
}
|
4407
|
-
render({ isHoverRow }) {
|
4485
|
+
render({ isHoverRow, isCheckedRow }) {
|
4408
4486
|
this.renderFirstCell({
|
4409
4487
|
isHoverRow
|
4410
4488
|
});
|
@@ -4412,7 +4490,8 @@ class AddRowLayout extends Layout {
|
|
4412
4490
|
isHoverRow
|
4413
4491
|
});
|
4414
4492
|
this.renderLastCell({
|
4415
|
-
isHoverRow
|
4493
|
+
isHoverRow,
|
4494
|
+
isCheckedRow
|
4416
4495
|
});
|
4417
4496
|
}
|
4418
4497
|
}
|
@@ -5057,7 +5136,7 @@ class RecordRowLayout extends Layout {
|
|
5057
5136
|
}
|
5058
5137
|
}
|
5059
5138
|
// 尾列
|
5060
|
-
renderLastCell({ style, isHoverRow }) {
|
5139
|
+
renderLastCell({ style, isHoverRow, isCheckedRow }) {
|
5061
5140
|
if (!this.isLast || this.isFirst)
|
5062
5141
|
return;
|
5063
5142
|
const { fill, stroke } = style;
|
@@ -5072,7 +5151,7 @@ class RecordRowLayout extends Layout {
|
|
5072
5151
|
stroke: stroke || colors.gray200
|
5073
5152
|
});
|
5074
5153
|
// 延伸到 FIELD_ADD_BUTTON
|
5075
|
-
super.renderAddFieldBlank({
|
5154
|
+
super.renderAddFieldBlank({ isHoverRow, isCheckedRow });
|
5076
5155
|
const rowHeight = this.rowHeight;
|
5077
5156
|
const startX = this.x + this.columnWidth;
|
5078
5157
|
const lineWidth = this.containerWidth - startX < AI_TABLE_FIELD_ADD_BUTTON_WIDTH ? AI_TABLE_FIELD_ADD_BUTTON_WIDTH : this.containerWidth - startX;
|
@@ -5103,7 +5182,7 @@ class RecordRowLayout extends Layout {
|
|
5103
5182
|
const { row, style, isCheckedRow, isHoverRow } = config;
|
5104
5183
|
this.renderFirstCell({ row, style, isCheckedRow, isHoverRow });
|
5105
5184
|
this.renderCommonCell({ style });
|
5106
|
-
this.renderLastCell({ style, isHoverRow });
|
5185
|
+
this.renderLastCell({ style, isCheckedRow, isHoverRow });
|
5107
5186
|
}
|
5108
5187
|
}
|
5109
5188
|
const recordRowLayout = new RecordRowLayout();
|
@@ -5150,6 +5229,7 @@ const createCells = (config) => {
|
|
5150
5229
|
switch (type) {
|
5151
5230
|
case AITableRowType.add: {
|
5152
5231
|
const isHoverRow = isHover && targetName === AI_TABLE_ROW_ADD_BUTTON;
|
5232
|
+
const isCheckedRow = aiTable.selection().selectedRecords.has(row._id);
|
5153
5233
|
addRowLayout.init({
|
5154
5234
|
x,
|
5155
5235
|
y,
|
@@ -5161,19 +5241,24 @@ const createCells = (config) => {
|
|
5161
5241
|
containerWidth: coordinate.containerWidth
|
5162
5242
|
});
|
5163
5243
|
addRowLayout.render({
|
5164
|
-
isHoverRow
|
5244
|
+
isHoverRow,
|
5245
|
+
isCheckedRow
|
5165
5246
|
});
|
5166
5247
|
break;
|
5167
5248
|
}
|
5168
5249
|
case AITableRowType.record: {
|
5169
5250
|
let background = colors.white;
|
5251
|
+
const fieldId = field._id;
|
5170
5252
|
const isCheckedRow = aiTable.selection().selectedRecords.has(row._id);
|
5171
|
-
const isSelected = aiTable.selection().selectedFields.has(
|
5253
|
+
const isSelected = aiTable.selection().selectedFields.has(fieldId);
|
5172
5254
|
const isHoverRow = isHover && targetName !== AI_TABLE_FIELD_HEAD;
|
5173
|
-
|
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) {
|
5174
5259
|
background = colors.itemActiveBgColor;
|
5175
5260
|
}
|
5176
|
-
else if (isHoverRow) {
|
5261
|
+
else if (isHoverRow && !isActiveCell) {
|
5177
5262
|
background = colors.gray80;
|
5178
5263
|
}
|
5179
5264
|
recordRowLayout.init({
|
@@ -5200,7 +5285,7 @@ const createCells = (config) => {
|
|
5200
5285
|
const realX = x + offset + AI_TABLE_OFFSET;
|
5201
5286
|
const realY = y + AI_TABLE_OFFSET;
|
5202
5287
|
const style = { fontWeight: DEFAULT_FONT_STYLE };
|
5203
|
-
const cellValue = AITableQueries.getFieldValue(aiTable, [recordId,
|
5288
|
+
const cellValue = AITableQueries.getFieldValue(aiTable, [recordId, fieldId]);
|
5204
5289
|
const transformValue = transformCellValue(aiTable, field, cellValue);
|
5205
5290
|
const render = {
|
5206
5291
|
aiTable,
|
@@ -5775,7 +5860,7 @@ class AITableHoverRowHeads {
|
|
5775
5860
|
continue;
|
5776
5861
|
}
|
5777
5862
|
let isHoverRow;
|
5778
|
-
if (pointRowIndex > -1) {
|
5863
|
+
if (pointRowIndex > -1 && !!context.linearRows().length && pointRowIndex < context.linearRows().length) {
|
5779
5864
|
const { type: pointRowType, _id: pointRecordId } = context.linearRows()[pointRowIndex];
|
5780
5865
|
isHoverRow = recordId === pointRecordId && pointRowType === AITableRowType.record && targetName !== AI_TABLE_FIELD_HEAD;
|
5781
5866
|
}
|
@@ -6006,6 +6091,7 @@ class AITableRenderer {
|
|
6006
6091
|
this.config = input.required();
|
6007
6092
|
this.koMousemove = output();
|
6008
6093
|
this.koMousedown = output();
|
6094
|
+
this.koContextmenu = output();
|
6009
6095
|
this.koWheel = output();
|
6010
6096
|
this.koClick = output();
|
6011
6097
|
this.koDblclick = output();
|
@@ -6139,6 +6225,9 @@ class AITableRenderer {
|
|
6139
6225
|
stageMousedown(e) {
|
6140
6226
|
this.koMousedown.emit(e);
|
6141
6227
|
}
|
6228
|
+
stageContextmenu(e) {
|
6229
|
+
this.koContextmenu.emit(e);
|
6230
|
+
}
|
6142
6231
|
stageClick(e) {
|
6143
6232
|
this.koClick.emit(e);
|
6144
6233
|
}
|
@@ -6146,7 +6235,7 @@ class AITableRenderer {
|
|
6146
6235
|
this.koDblclick.emit(e);
|
6147
6236
|
}
|
6148
6237
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
6149
|
-
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 }); }
|
6150
6239
|
}
|
6151
6240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableRenderer, decorators: [{
|
6152
6241
|
type: Component,
|
@@ -6163,12 +6252,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
6163
6252
|
AITableAddField,
|
6164
6253
|
AITableHoverRowHeads,
|
6165
6254
|
AITableOtherRows
|
6166
|
-
], 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" }]
|
6167
6256
|
}] });
|
6168
6257
|
|
6169
6258
|
class AITableGrid extends AITableGridBase {
|
6170
6259
|
constructor() {
|
6171
6260
|
super();
|
6261
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
6172
6262
|
this.fieldHeadHeight = AI_TABLE_FIELD_HEAD_HEIGHT;
|
6173
6263
|
this.containerRect = signal({ width: 0, height: 0 });
|
6174
6264
|
this.hasContainerRect = computed(() => {
|
@@ -6311,6 +6401,12 @@ class AITableGrid extends AITableGridBase {
|
|
6311
6401
|
const mouseEvent = e.event.evt;
|
6312
6402
|
const _targetName = e.event.target.name();
|
6313
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
|
+
}
|
6314
6410
|
switch (targetName) {
|
6315
6411
|
case AI_TABLE_FIELD_HEAD:
|
6316
6412
|
mouseEvent.preventDefault();
|
@@ -6333,6 +6429,33 @@ class AITableGrid extends AITableGridBase {
|
|
6333
6429
|
this.aiTableGridSelectionService.clearSelection();
|
6334
6430
|
}
|
6335
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
|
+
}
|
6336
6459
|
stageClick(e) {
|
6337
6460
|
const mouseEvent = e.event.evt;
|
6338
6461
|
mouseEvent.preventDefault();
|
@@ -6444,7 +6567,9 @@ class AITableGrid extends AITableGridBase {
|
|
6444
6567
|
}
|
6445
6568
|
bindGlobalMousedown() {
|
6446
6569
|
fromEvent(document, 'mousedown', { passive: true })
|
6447
|
-
.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))
|
6448
6573
|
.subscribe(() => {
|
6449
6574
|
this.aiTableGridSelectionService.clearSelection();
|
6450
6575
|
});
|
@@ -6519,18 +6644,18 @@ class AITableGrid extends AITableGridBase {
|
|
6519
6644
|
}
|
6520
6645
|
}
|
6521
6646
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
6522
|
-
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 }); }
|
6523
6648
|
}
|
6524
6649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AITableGrid, decorators: [{
|
6525
6650
|
type: Component,
|
6526
6651
|
args: [{ selector: 'ai-table-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
6527
6652
|
class: 'ai-table-grid'
|
6528
|
-
}, 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" }]
|
6529
6654
|
}], ctorParameters: () => [] });
|
6530
6655
|
|
6531
6656
|
/**
|
6532
6657
|
* Generated bundle index. Do not edit.
|
6533
6658
|
*/
|
6534
6659
|
|
6535
|
-
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 };
|
6536
6661
|
//# sourceMappingURL=ai-table-grid.mjs.map
|