@ai-table/grid 0.1.0 → 0.1.2
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 +4 -0
- package/components/context-menu/context-menu.component.d.ts.map +1 -1
- package/components/context-menu/context-menu.scss +3 -0
- package/core/context.d.ts +2 -2
- package/core/context.d.ts.map +1 -1
- package/fesm2022/ai-table-grid.mjs +45 -15
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid-base.component.d.ts +2 -2
- package/grid-base.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/renderer.component.d.ts +3 -1
- package/renderer/renderer.component.d.ts.map +1 -1
- package/types/cell.d.ts +1 -1
- package/types/cell.d.ts.map +1 -1
- package/types/grid.d.ts +6 -5
- package/types/grid.d.ts.map +1 -1
- package/types/row.d.ts +5 -2
- package/types/row.d.ts.map +1 -1
- package/utils/field/model/select.d.ts +4 -1
- package/utils/field/model/select.d.ts.map +1 -1
@@ -3,10 +3,12 @@ import { AITable } from '../../core';
|
|
3
3
|
import { AITableContextMenuItem } from '../../types';
|
4
4
|
import { AITableGridSelectionService } from '../../services/selection.service';
|
5
5
|
import { ThyNotifyService } from 'ngx-tethys/notify';
|
6
|
+
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
export declare class AITableContextMenu extends ThyDropdownAbstractMenu {
|
8
9
|
aiTableGridSelectionService: AITableGridSelectionService;
|
9
10
|
notifyService: ThyNotifyService;
|
11
|
+
thyPopoverRef: ThyPopoverRef<any, any, any>;
|
10
12
|
aiTable: import("@angular/core").InputSignal<AITable>;
|
11
13
|
menuItems: import("@angular/core").InputSignal<AITableContextMenuItem[]>;
|
12
14
|
targetName: import("@angular/core").InputSignal<string>;
|
@@ -15,6 +17,8 @@ export declare class AITableContextMenu extends ThyDropdownAbstractMenu {
|
|
15
17
|
y: number;
|
16
18
|
}>;
|
17
19
|
execute(menu: AITableContextMenuItem): void;
|
20
|
+
inputNumberFocus(e: Event): void;
|
21
|
+
itemEnterHandle(e: Event, menu: AITableContextMenuItem): void;
|
18
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<AITableContextMenu, never>;
|
19
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<AITableContextMenu, "ai-table-context-menu", never, { "aiTable": { "alias": "aiTable"; "required": true; "isSignal": true; }; "menuItems": { "alias": "menuItems"; "required": true; "isSignal": true; }; "targetName": { "alias": "targetName"; "required": true; "isSignal": true; }; "position": { "alias": "position"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
20
24
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/context-menu/context-menu.component.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,uBAAuB,EAK1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;;
|
1
|
+
{"version":3,"file":"context-menu.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/context-menu/context-menu.component.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,uBAAuB,EAK1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;AACnD,qBAqBa,kBAAmB,SAAQ,uBAAuB;IAC3D,2BAA2B,8BAAuC;IAElE,aAAa,mBAA4B;IAEzC,aAAa,+BAAyB;IAEtC,OAAO,+CAA6B;IAEpC,SAAS,gEAA8C;IAEvD,UAAU,8CAA4B;IAEtC,QAAQ;WAAuB,MAAM;WAAK,MAAM;OAAM;IAEtD,OAAO,CAAC,IAAI,EAAE,sBAAsB;IAcpC,gBAAgB,CAAC,CAAC,EAAE,KAAK;IAIzB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB;yCAjC7C,kBAAkB;2CAAlB,kBAAkB;CAqC9B"}
|
package/core/context.d.ts
CHANGED
@@ -12,8 +12,8 @@ export declare class RendererContext {
|
|
12
12
|
references: Signal<AITableReferences>;
|
13
13
|
aiFieldConfig: Signal<AIFieldConfig | undefined>;
|
14
14
|
scrollAction: (options: ScrollActionOptions) => void;
|
15
|
-
maxFields: Signal<number>;
|
16
|
-
maxRecords: Signal<number>;
|
15
|
+
maxFields: Signal<number | undefined>;
|
16
|
+
maxRecords: Signal<number | undefined>;
|
17
17
|
constructor(options: AITableContext);
|
18
18
|
setPointPosition(position: Partial<AITablePointPosition>): void;
|
19
19
|
setScrollState(scrollState: Partial<AITableScrollState>): void;
|
package/core/context.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/core/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC1I,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,qBAAa,eAAe;IACxB,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACvC,aAAa,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;IACpD,WAAW,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAChD,sBAAsB,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IACjD,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/core/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC1I,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,qBAAa,eAAe;IACxB,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACvC,aAAa,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;IACpD,WAAW,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAChD,sBAAsB,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IACjD,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;gBAE3B,OAAO,EAAE,cAAc;IA6BnC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAaxD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAG1D"}
|
@@ -2170,6 +2170,7 @@ class AITableContextMenu extends ThyDropdownAbstractMenu {
|
|
2170
2170
|
super(...arguments);
|
2171
2171
|
this.aiTableGridSelectionService = inject(AITableGridSelectionService);
|
2172
2172
|
this.notifyService = inject(ThyNotifyService);
|
2173
|
+
this.thyPopoverRef = inject(ThyPopoverRef);
|
2173
2174
|
this.aiTable = input.required();
|
2174
2175
|
this.menuItems = input.required();
|
2175
2176
|
this.targetName = input.required();
|
@@ -2178,17 +2179,28 @@ class AITableContextMenu extends ThyDropdownAbstractMenu {
|
|
2178
2179
|
execute(menu) {
|
2179
2180
|
if ((menu.disabled && !menu.disabled(this.aiTable(), this.targetName(), this.position())) || !menu.disabled) {
|
2180
2181
|
menu.exec &&
|
2181
|
-
menu.exec(this.aiTable(), this.targetName(), this.position(), this.aiTableGridSelectionService, this.notifyService);
|
2182
|
+
menu.exec(this.aiTable(), this.targetName(), this.position(), this.aiTableGridSelectionService, this.notifyService, menu.count);
|
2182
2183
|
}
|
2183
2184
|
}
|
2185
|
+
inputNumberFocus(e) {
|
2186
|
+
e.target.focus();
|
2187
|
+
}
|
2188
|
+
itemEnterHandle(e, menu) {
|
2189
|
+
this.execute(menu);
|
2190
|
+
this.thyPopoverRef.close();
|
2191
|
+
}
|
2184
2192
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableContextMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
2185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableContextMenu, isStandalone: true, selector: "ai-table-context-menu", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, targetName: { classPropertyName: "targetName", publicName: "targetName", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "context-menu" }, usesInheritance: true, ngImport: i0, template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection
|
2193
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableContextMenu, isStandalone: true, selector: "ai-table-context-menu", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, targetName: { classPropertyName: "targetName", publicName: "targetName", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "context-menu" }, usesInheritance: true, ngImport: i0, template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemMetaDirective, selector: "[thyDropdownMenuItemMeta]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2186
2194
|
}
|
2187
2195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableContextMenu, decorators: [{
|
2188
2196
|
type: Component,
|
2189
2197
|
args: [{ selector: 'ai-table-context-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
2190
2198
|
class: 'context-menu'
|
2191
2199
|
}, imports: [
|
2200
|
+
ThyInputNumber,
|
2201
|
+
FormsModule,
|
2202
|
+
ThyEnterDirective,
|
2203
|
+
ThyStopPropagationDirective,
|
2192
2204
|
ThyDropdownMenuItemDirective,
|
2193
2205
|
ThyDropdownMenuItemNameDirective,
|
2194
2206
|
ThyDropdownMenuItemIconDirective,
|
@@ -2196,7 +2208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
2196
2208
|
ThyIcon,
|
2197
2209
|
NgClass,
|
2198
2210
|
ThyDivider
|
2199
|
-
], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection
|
2211
|
+
], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n" }]
|
2200
2212
|
}] });
|
2201
2213
|
|
2202
2214
|
const GRID_CELL_EDITOR_MAP = {
|
@@ -2986,18 +2998,20 @@ class SelectField extends SelectFieldBase {
|
|
2986
2998
|
isValid(cellValue) {
|
2987
2999
|
return Array.isArray(cellValue) || cellValue === null;
|
2988
3000
|
}
|
2989
|
-
isMeetFilter(condition, cellValue) {
|
3001
|
+
isMeetFilter(condition, cellValue, options) {
|
3002
|
+
const optionsMap = helpers.keyBy(options?.field?.settings?.options || [], '_id');
|
3003
|
+
const validCellValue = cellValue.filter((optionId) => !!optionsMap[optionId]);
|
2990
3004
|
switch (condition.operation) {
|
2991
3005
|
case AITableFilterOperation.empty:
|
2992
|
-
return isEmpty(
|
3006
|
+
return isEmpty(validCellValue);
|
2993
3007
|
case AITableFilterOperation.exists:
|
2994
|
-
return !isEmpty(
|
3008
|
+
return !isEmpty(validCellValue);
|
2995
3009
|
case AITableFilterOperation.in:
|
2996
|
-
return Array.isArray(condition.value) && hasIntersect(
|
3010
|
+
return Array.isArray(condition.value) && hasIntersect(validCellValue, condition.value);
|
2997
3011
|
case AITableFilterOperation.nin:
|
2998
|
-
return Array.isArray(condition.value) && !hasIntersect(
|
3012
|
+
return Array.isArray(condition.value) && !hasIntersect(validCellValue, condition.value);
|
2999
3013
|
default:
|
3000
|
-
return isMeetFilter(condition,
|
3014
|
+
return isMeetFilter(condition, validCellValue);
|
3001
3015
|
}
|
3002
3016
|
}
|
3003
3017
|
compare(cellValue1, cellValue2, references, sortKey, options) {
|
@@ -8412,6 +8426,14 @@ class AITableRenderer {
|
|
8412
8426
|
clipHeight: this.containerHeight() - this.coordinate().rowInitSize
|
8413
8427
|
};
|
8414
8428
|
});
|
8429
|
+
this.hoverAttachGroupConfig = computed(() => {
|
8430
|
+
return {
|
8431
|
+
clipX: this.frozenAreaWidth() + 1,
|
8432
|
+
clipY: this.coordinate().rowInitSize + 1,
|
8433
|
+
clipWidth: this.containerWidth() - this.frozenAreaWidth(),
|
8434
|
+
clipHeight: this.containerHeight() - this.coordinate().rowInitSize
|
8435
|
+
};
|
8436
|
+
});
|
8415
8437
|
this.frozenAttachGroupConfig = computed(() => {
|
8416
8438
|
return {
|
8417
8439
|
clipX: 0,
|
@@ -8420,6 +8442,14 @@ class AITableRenderer {
|
|
8420
8442
|
clipHeight: this.containerHeight() - this.coordinate().rowInitSize
|
8421
8443
|
};
|
8422
8444
|
});
|
8445
|
+
this.frozenHoverAttachGroupConfig = computed(() => {
|
8446
|
+
return {
|
8447
|
+
clipX: 0,
|
8448
|
+
clipY: this.coordinate().rowInitSize + 1,
|
8449
|
+
clipWidth: this.frozenAreaWidth() + 4,
|
8450
|
+
clipHeight: this.containerHeight() - this.coordinate().rowInitSize
|
8451
|
+
};
|
8452
|
+
});
|
8423
8453
|
this.offsetYConfig = computed(() => {
|
8424
8454
|
const { scrollTop } = this.scrollState();
|
8425
8455
|
return {
|
@@ -8498,7 +8528,7 @@ class AITableRenderer {
|
|
8498
8528
|
this.koMouseleave.emit(e);
|
8499
8529
|
}
|
8500
8530
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8501
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", 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", koMouseup: "koMouseup", koContextmenu: "koContextmenu", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick", koMouseleave: "koMouseleave" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\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 @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\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 <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\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 <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\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: AITableHoverCells, selector: "ai-table-hover-cell", 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 }); }
|
8531
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", 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", koMouseup: "koMouseup", koContextmenu: "koContextmenu", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick", koMouseleave: "koMouseleave" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\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 @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\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]=\"hoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\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\n <ko-group [config]=\"frozenHoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\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: AITableHoverCells, selector: "ai-table-hover-cell", 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 }); }
|
8502
8532
|
}
|
8503
8533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, decorators: [{
|
8504
8534
|
type: Component,
|
@@ -8516,7 +8546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
8516
8546
|
AITableAddField,
|
8517
8547
|
AITableHoverRowHeads,
|
8518
8548
|
AITableOtherRows
|
8519
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\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 @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\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 <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\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 <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
|
8549
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\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 @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\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]=\"hoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\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\n <ko-group [config]=\"frozenHoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-hover-cell [config]=\"cellsConfig()\"></ai-table-hover-cell>\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
|
8520
8550
|
}] });
|
8521
8551
|
|
8522
8552
|
class AITableCellRate {
|
@@ -9223,8 +9253,8 @@ class AITableGridBase {
|
|
9223
9253
|
this.aiReadonly = input(false);
|
9224
9254
|
this.aiRowDragDisabled = input(false);
|
9225
9255
|
this.aiPlugins = input();
|
9226
|
-
this.aiMaxFields = input(
|
9227
|
-
this.aiMaxRecords = input(
|
9256
|
+
this.aiMaxFields = input();
|
9257
|
+
this.aiMaxRecords = input();
|
9228
9258
|
this.aiReferences = input.required();
|
9229
9259
|
this.aiBuildRenderDataFn = input();
|
9230
9260
|
this.aiGetI18nTextByKey = input();
|
@@ -9293,7 +9323,7 @@ class AITableGridBase {
|
|
9293
9323
|
addRecord(options) {
|
9294
9324
|
const records = this.aiTable.gridData().records;
|
9295
9325
|
const recordCount = records.length;
|
9296
|
-
if (recordCount >= this.aiMaxRecords()) {
|
9326
|
+
if (this.aiMaxRecords() && recordCount >= this.aiMaxRecords()) {
|
9297
9327
|
return;
|
9298
9328
|
}
|
9299
9329
|
this.aiAddRecord.emit(options || {});
|
@@ -9305,7 +9335,7 @@ class AITableGridBase {
|
|
9305
9335
|
this.aiTableGridSelectionService.toggleSelectAll(checked);
|
9306
9336
|
}
|
9307
9337
|
addField(gridColumnBlank, position) {
|
9308
|
-
if (this.aiTable.gridData().fields.length >= this.aiMaxFields()) {
|
9338
|
+
if (this.aiMaxFields() && this.aiTable.gridData().fields.length >= this.aiMaxFields()) {
|
9309
9339
|
return;
|
9310
9340
|
}
|
9311
9341
|
const field = createDefaultField(this.aiTable, AITableFieldType.text);
|