@nanahoshi/mona-ui 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-C6M8hmzY.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BwwDwf6_.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DTqG52dg.mjs +121 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-CaTuM3-x.mjs} +62 -9
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BcTk4OPK.mjs +231 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CvCis4-I.mjs} +90 -46
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-grid.d.ts +3 -3
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-n3eQNIza.mjs +0 -121
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-B4VB3xFw.mjs +0 -231
|
@@ -1432,8 +1432,16 @@ class GridService {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
validateSessionForSave(session) {
|
|
1434
1434
|
const rootField = session.form();
|
|
1435
|
-
|
|
1436
|
-
|
|
1435
|
+
const editedField = session.mode === "cell" && session.field != null ? session.form[session.field] : null;
|
|
1436
|
+
if (editedField == null) {
|
|
1437
|
+
rootField.markAsTouched();
|
|
1438
|
+
return !rootField.invalid() && !rootField.pending();
|
|
1439
|
+
}
|
|
1440
|
+
// A cell edit can only fix its own field. Row-level errors still block the save, but an invalid
|
|
1441
|
+
// sibling field must not trap the user in a cell whose own value is valid.
|
|
1442
|
+
const field = editedField();
|
|
1443
|
+
field.markAsTouched();
|
|
1444
|
+
return !field.invalid() && !field.pending() && rootField.errors().length === 0;
|
|
1437
1445
|
}
|
|
1438
1446
|
serializeFilter(filter) {
|
|
1439
1447
|
if (filter == null) {
|
|
@@ -2161,16 +2169,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2161
2169
|
}]
|
|
2162
2170
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaGridSelectable", required: false }] }], selectBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectBy", required: false }] }], selectedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedKeys", required: false }] }], selectedKeysChange: [{ type: i0.Output, args: ["selectedKeysChange"] }] } });
|
|
2163
2171
|
|
|
2164
|
-
const GRID_COLUMN_DEFINITION = new InjectionToken("GRID_COLUMN_DEFINITION");
|
|
2165
|
-
|
|
2166
2172
|
class GridSortableDirective {
|
|
2167
2173
|
#destroyRef;
|
|
2168
2174
|
#gridService;
|
|
2169
2175
|
constructor() {
|
|
2170
2176
|
this.#destroyRef = inject(DestroyRef);
|
|
2171
2177
|
this.#gridService = inject(GridService);
|
|
2172
|
-
this.columnDefinitions = contentChildren(GRID_COLUMN_DEFINITION, /* @ts-ignore */
|
|
2173
|
-
...(ngDevMode ? [{ debugName: "columnDefinitions" }] : /* istanbul ignore next */ []));
|
|
2174
2178
|
/**
|
|
2175
2179
|
* @description Emitted when a column header is activated to change its sort direction. Call `preventDefault()` on the event to cancel the sort.
|
|
2176
2180
|
*/
|
|
@@ -2197,15 +2201,6 @@ class GridSortableDirective {
|
|
|
2197
2201
|
}
|
|
2198
2202
|
});
|
|
2199
2203
|
});
|
|
2200
|
-
effect(() => {
|
|
2201
|
-
const columns = this.columnDefinitions().map(c => c.getColumn());
|
|
2202
|
-
untracked(() => {
|
|
2203
|
-
this.#gridService.setColumnDefinitions(columns);
|
|
2204
|
-
if (this.sort().length !== 0) {
|
|
2205
|
-
this.#gridService.loadSorts(this.sort());
|
|
2206
|
-
}
|
|
2207
|
-
});
|
|
2208
|
-
});
|
|
2209
2204
|
effect(() => {
|
|
2210
2205
|
const sort = this.sort();
|
|
2211
2206
|
untracked(() => this.#gridService.loadSorts(sort));
|
|
@@ -2270,14 +2265,14 @@ class GridSortableDirective {
|
|
|
2270
2265
|
});
|
|
2271
2266
|
}
|
|
2272
2267
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridSortableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2273
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.
|
|
2268
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridSortableDirective, isStandalone: true, selector: "mona-grid[monaGridSortable]", inputs: { options: { classPropertyName: "options", publicName: "monaGridSortable", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnSort: "columnSort", sort: "sortChange" }, ngImport: i0 }); }
|
|
2274
2269
|
}
|
|
2275
2270
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridSortableDirective, decorators: [{
|
|
2276
2271
|
type: Directive,
|
|
2277
2272
|
args: [{
|
|
2278
2273
|
selector: "mona-grid[monaGridSortable]"
|
|
2279
2274
|
}]
|
|
2280
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
2275
|
+
}], ctorParameters: () => [], propDecorators: { columnSort: [{ type: i0.Output, args: ["columnSort"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaGridSortable", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }] } });
|
|
2281
2276
|
|
|
2282
2277
|
class GridStatePersistenceDirective {
|
|
2283
2278
|
#gridService;
|
|
@@ -2507,6 +2502,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2507
2502
|
}]
|
|
2508
2503
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaGridVirtualScroll", required: false }] }], scrollEnd: [{ type: i0.Output, args: ["scrollEnd"] }], scrollEndThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollEndThreshold", required: false }] }] } });
|
|
2509
2504
|
|
|
2505
|
+
const GRID_COLUMN_DEFINITION = new InjectionToken("GRID_COLUMN_DEFINITION");
|
|
2506
|
+
|
|
2510
2507
|
class GridCommandColumnComponent {
|
|
2511
2508
|
constructor() {
|
|
2512
2509
|
this.#column = computed(() => {
|
|
@@ -2951,6 +2948,28 @@ class GridNavigationService {
|
|
|
2951
2948
|
this.#focusCell(fallback.key, fallback.value);
|
|
2952
2949
|
return true;
|
|
2953
2950
|
}
|
|
2951
|
+
focusAdjacentEditableCell(rowUid, columnId, direction) {
|
|
2952
|
+
const editableCells = this.#cellElementDict()
|
|
2953
|
+
.where(e => e.value.section === "body" &&
|
|
2954
|
+
e.value.cellKind === "data" &&
|
|
2955
|
+
e.value.editable &&
|
|
2956
|
+
e.value.rowUid != null &&
|
|
2957
|
+
e.value.columnId != null)
|
|
2958
|
+
.orderBy(e => e.value.rowIndex)
|
|
2959
|
+
.thenBy(e => e.value.colIndex)
|
|
2960
|
+
.toArray();
|
|
2961
|
+
const currentIndex = editableCells.findIndex(e => e.value.rowUid === rowUid && e.value.columnId === columnId);
|
|
2962
|
+
if (currentIndex === -1) {
|
|
2963
|
+
return false;
|
|
2964
|
+
}
|
|
2965
|
+
const target = editableCells[currentIndex + (direction === "next" ? 1 : -1)];
|
|
2966
|
+
if (!target) {
|
|
2967
|
+
return false;
|
|
2968
|
+
}
|
|
2969
|
+
this.#focusCell(target.key, target.value);
|
|
2970
|
+
target.value.startEdit?.();
|
|
2971
|
+
return true;
|
|
2972
|
+
}
|
|
2954
2973
|
focusFirstCell() {
|
|
2955
2974
|
const firstCell = this.#findFirstHeaderCell() ?? this.#findFirstCell();
|
|
2956
2975
|
if (firstCell) {
|
|
@@ -3194,6 +3213,7 @@ class GridNavigationService {
|
|
|
3194
3213
|
return (left.cellKind === right.cellKind &&
|
|
3195
3214
|
left.colIndex === right.colIndex &&
|
|
3196
3215
|
left.columnId === right.columnId &&
|
|
3216
|
+
left.editable === right.editable &&
|
|
3197
3217
|
left.element === right.element &&
|
|
3198
3218
|
left.firstInRow === right.firstInRow &&
|
|
3199
3219
|
left.groupHeader === right.groupHeader &&
|
|
@@ -3201,7 +3221,8 @@ class GridNavigationService {
|
|
|
3201
3221
|
left.lastInRow === right.lastInRow &&
|
|
3202
3222
|
left.rowIndex === right.rowIndex &&
|
|
3203
3223
|
left.rowUid === right.rowUid &&
|
|
3204
|
-
left.section === right.section
|
|
3224
|
+
left.section === right.section &&
|
|
3225
|
+
left.startEdit === right.startEdit);
|
|
3205
3226
|
}
|
|
3206
3227
|
#navigateToRowEdge(edge, cellKey) {
|
|
3207
3228
|
const data = this.#cellElementDict().get(cellKey);
|
|
@@ -3531,12 +3552,14 @@ class GridLogicalCellDirective {
|
|
|
3531
3552
|
#gridNavigationService;
|
|
3532
3553
|
#gridService;
|
|
3533
3554
|
#hostElementRef;
|
|
3555
|
+
#startEdit;
|
|
3534
3556
|
constructor() {
|
|
3535
3557
|
this.#cellData = computed(() => {
|
|
3536
3558
|
const data = {
|
|
3537
3559
|
cellKind: this.resolvedCellKind(),
|
|
3538
3560
|
colIndex: this.colIndex(),
|
|
3539
3561
|
columnId: this.columnId(),
|
|
3562
|
+
editable: this.editable(),
|
|
3540
3563
|
element: this.#hostElementRef.nativeElement,
|
|
3541
3564
|
firstInRow: this.firstInRow(),
|
|
3542
3565
|
groupHeader: this.groupHeader(),
|
|
@@ -3544,7 +3567,8 @@ class GridLogicalCellDirective {
|
|
|
3544
3567
|
lastInRow: this.lastInRow(),
|
|
3545
3568
|
rowIndex: this.rowIndex(),
|
|
3546
3569
|
rowUid: this.rowUid(),
|
|
3547
|
-
section: this.resolvedSection()
|
|
3570
|
+
section: this.resolvedSection(),
|
|
3571
|
+
startEdit: this.editable() ? this.#startEdit : undefined
|
|
3548
3572
|
};
|
|
3549
3573
|
return data;
|
|
3550
3574
|
}, /* @ts-ignore */
|
|
@@ -3556,6 +3580,9 @@ class GridLogicalCellDirective {
|
|
|
3556
3580
|
this.#gridNavigationService = inject(GridNavigationService);
|
|
3557
3581
|
this.#gridService = inject(GridService);
|
|
3558
3582
|
this.#hostElementRef = inject((ElementRef));
|
|
3583
|
+
this.#startEdit = () => {
|
|
3584
|
+
this.edit.emit();
|
|
3585
|
+
};
|
|
3559
3586
|
this.ariaColIndex = computed(() => this.colIndex() + this.#gridService.groupColumns().length + 1, /* @ts-ignore */
|
|
3560
3587
|
...(ngDevMode ? [{ debugName: "ariaColIndex" }] : /* istanbul ignore next */ []));
|
|
3561
3588
|
this.baseClass = computed(() => {
|
|
@@ -3605,6 +3632,11 @@ class GridLogicalCellDirective {
|
|
|
3605
3632
|
this.columnId = input(/* @ts-ignore */
|
|
3606
3633
|
...(ngDevMode ? [undefined, { debugName: "columnId" }] : /* istanbul ignore next */ []));
|
|
3607
3634
|
this.edit = output();
|
|
3635
|
+
/**
|
|
3636
|
+
* @description Marks the cell as a participant in Tab-driven cell edit traversal.
|
|
3637
|
+
*/
|
|
3638
|
+
this.editable = input(false, /* @ts-ignore */
|
|
3639
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
3608
3640
|
this.firstInRow = input.required(/* @ts-ignore */
|
|
3609
3641
|
...(ngDevMode ? [{ debugName: "firstInRow" }] : /* istanbul ignore next */ []));
|
|
3610
3642
|
this.groupHeader = input(false, /* @ts-ignore */
|
|
@@ -3645,6 +3677,18 @@ class GridLogicalCellDirective {
|
|
|
3645
3677
|
this.#gridNavigationService.unregisterCell(cellKey);
|
|
3646
3678
|
});
|
|
3647
3679
|
}
|
|
3680
|
+
focusNextPageTabTarget(backwards) {
|
|
3681
|
+
const host = this.#hostElementRef.nativeElement;
|
|
3682
|
+
const targets = this.#getPageTabTargets();
|
|
3683
|
+
const orderedTargets = backwards ? targets.reverse() : targets;
|
|
3684
|
+
const documentPosition = backwards ? Node.DOCUMENT_POSITION_PRECEDING : Node.DOCUMENT_POSITION_FOLLOWING;
|
|
3685
|
+
const target = orderedTargets.find(candidate => (host.compareDocumentPosition(candidate) & documentPosition) !== 0);
|
|
3686
|
+
if (!target) {
|
|
3687
|
+
return false;
|
|
3688
|
+
}
|
|
3689
|
+
target.focus();
|
|
3690
|
+
return true;
|
|
3691
|
+
}
|
|
3648
3692
|
#focusInnerTarget(target) {
|
|
3649
3693
|
target.focus();
|
|
3650
3694
|
}
|
|
@@ -3665,18 +3709,6 @@ class GridLogicalCellDirective {
|
|
|
3665
3709
|
this.#focusInnerTarget(target);
|
|
3666
3710
|
return true;
|
|
3667
3711
|
}
|
|
3668
|
-
#focusNextPageTabTarget(backwards) {
|
|
3669
|
-
const host = this.#hostElementRef.nativeElement;
|
|
3670
|
-
const targets = this.#getPageTabTargets();
|
|
3671
|
-
const orderedTargets = backwards ? targets.reverse() : targets;
|
|
3672
|
-
const documentPosition = backwards ? Node.DOCUMENT_POSITION_PRECEDING : Node.DOCUMENT_POSITION_FOLLOWING;
|
|
3673
|
-
const target = orderedTargets.find(candidate => (host.compareDocumentPosition(candidate) & documentPosition) !== 0);
|
|
3674
|
-
if (!target) {
|
|
3675
|
-
return false;
|
|
3676
|
-
}
|
|
3677
|
-
target.focus();
|
|
3678
|
-
return true;
|
|
3679
|
-
}
|
|
3680
3712
|
#getInnerFocusableTargets() {
|
|
3681
3713
|
const host = this.#hostElementRef.nativeElement;
|
|
3682
3714
|
const targets = Array.from(host.querySelectorAll(FOCUSABLE_TARGET_SELECTOR$1));
|
|
@@ -3765,7 +3797,7 @@ class GridLogicalCellDirective {
|
|
|
3765
3797
|
return;
|
|
3766
3798
|
}
|
|
3767
3799
|
if (event.key === "Tab") {
|
|
3768
|
-
if (this
|
|
3800
|
+
if (this.focusNextPageTabTarget(event.shiftKey)) {
|
|
3769
3801
|
event.preventDefault();
|
|
3770
3802
|
}
|
|
3771
3803
|
return;
|
|
@@ -3846,7 +3878,7 @@ class GridLogicalCellDirective {
|
|
|
3846
3878
|
}
|
|
3847
3879
|
}
|
|
3848
3880
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridLogicalCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3849
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridLogicalCellDirective, isStandalone: true, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: { cellKind: { classPropertyName: "cellKind", publicName: "cellKind", isSignal: true, isRequired: false, transformFunction: null }, colIndex: { classPropertyName: "colIndex", publicName: "colIndex", isSignal: true, isRequired: true, transformFunction: null }, columnId: { classPropertyName: "columnId", publicName: "columnId", isSignal: true, isRequired: false, transformFunction: null }, firstInRow: { classPropertyName: "firstInRow", publicName: "firstInRow", isSignal: true, isRequired: true, transformFunction: null }, groupHeader: { classPropertyName: "groupHeader", publicName: "groupHeader", isSignal: true, isRequired: false, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null }, lastInRow: { classPropertyName: "lastInRow", publicName: "lastInRow", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, rowUid: { classPropertyName: "rowUid", publicName: "rowUid", isSignal: true, isRequired: false, transformFunction: null }, section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", toggle: "toggle" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "focused() ? 0 : -1", "attr.aria-colindex": "ariaColIndex()" } }, ngImport: i0 }); }
|
|
3881
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridLogicalCellDirective, isStandalone: true, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: { cellKind: { classPropertyName: "cellKind", publicName: "cellKind", isSignal: true, isRequired: false, transformFunction: null }, colIndex: { classPropertyName: "colIndex", publicName: "colIndex", isSignal: true, isRequired: true, transformFunction: null }, columnId: { classPropertyName: "columnId", publicName: "columnId", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, firstInRow: { classPropertyName: "firstInRow", publicName: "firstInRow", isSignal: true, isRequired: true, transformFunction: null }, groupHeader: { classPropertyName: "groupHeader", publicName: "groupHeader", isSignal: true, isRequired: false, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null }, lastInRow: { classPropertyName: "lastInRow", publicName: "lastInRow", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, rowUid: { classPropertyName: "rowUid", publicName: "rowUid", isSignal: true, isRequired: false, transformFunction: null }, section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", toggle: "toggle" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "focused() ? 0 : -1", "attr.aria-colindex": "ariaColIndex()" } }, ngImport: i0 }); }
|
|
3850
3882
|
}
|
|
3851
3883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridLogicalCellDirective, decorators: [{
|
|
3852
3884
|
type: Directive,
|
|
@@ -3858,7 +3890,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3858
3890
|
"[attr.aria-colindex]": "ariaColIndex()"
|
|
3859
3891
|
}
|
|
3860
3892
|
}]
|
|
3861
|
-
}], ctorParameters: () => [], propDecorators: { cellKind: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellKind", required: false }] }], colIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "colIndex", required: true }] }], columnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnId", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], firstInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstInRow", required: true }] }], groupHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupHeader", required: false }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }], lastInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastInRow", required: true }] }], rowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIndex", required: true }] }], rowUid: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowUid", required: false }] }], section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: false }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
|
|
3893
|
+
}], ctorParameters: () => [], propDecorators: { cellKind: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellKind", required: false }] }], colIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "colIndex", required: true }] }], columnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnId", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], firstInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstInRow", required: true }] }], groupHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupHeader", required: false }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }], lastInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastInRow", required: true }] }], rowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIndex", required: true }] }], rowUid: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowUid", required: false }] }], section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: false }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
|
|
3862
3894
|
|
|
3863
3895
|
class ColumnReorderEvent extends PreventableEvent {
|
|
3864
3896
|
#column;
|
|
@@ -4450,6 +4482,8 @@ class GridComponent {
|
|
|
4450
4482
|
this.#toolbarActiveIndex = signal(0, /* @ts-ignore */
|
|
4451
4483
|
...(ngDevMode ? [{ debugName: "#toolbarActiveIndex" }] : /* istanbul ignore next */ []));
|
|
4452
4484
|
this.#resizeObserver = null;
|
|
4485
|
+
this.columnDefinitions = contentChildren(GRID_COLUMN_DEFINITION, /* @ts-ignore */
|
|
4486
|
+
...(ngDevMode ? [{ debugName: "columnDefinitions" }] : /* istanbul ignore next */ []));
|
|
4453
4487
|
this.footerScrollElement = viewChild("footerScrollElement", /* @ts-ignore */
|
|
4454
4488
|
...(ngDevMode ? [{ debugName: "footerScrollElement" }] : /* istanbul ignore next */ []));
|
|
4455
4489
|
this.baseClass = computed(() => {
|
|
@@ -4622,6 +4656,10 @@ class GridComponent {
|
|
|
4622
4656
|
* @default ""
|
|
4623
4657
|
*/
|
|
4624
4658
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
4659
|
+
effect(() => {
|
|
4660
|
+
const columns = this.columnDefinitions().map(definition => definition.getColumn());
|
|
4661
|
+
untracked(() => this.gridService.setColumnDefinitions(columns));
|
|
4662
|
+
});
|
|
4625
4663
|
this.setPageSizeEffect();
|
|
4626
4664
|
this.setGridDetailEffect();
|
|
4627
4665
|
this.setDataEffect();
|
|
@@ -4907,7 +4945,13 @@ class GridComponent {
|
|
|
4907
4945
|
untracked(() => this.gridService.setRows(data, rowKey));
|
|
4908
4946
|
if (shouldRestoreGridFocus) {
|
|
4909
4947
|
afterNextRender({
|
|
4910
|
-
read: () =>
|
|
4948
|
+
read: () => {
|
|
4949
|
+
// An open editor owns its own focus; restoring the logical cell would steal it.
|
|
4950
|
+
if (this.gridService.editContext() != null) {
|
|
4951
|
+
return;
|
|
4952
|
+
}
|
|
4953
|
+
this.#gridNavigationService.focusActiveCellOrFirstHeader();
|
|
4954
|
+
}
|
|
4911
4955
|
}, { injector: this.#injector });
|
|
4912
4956
|
}
|
|
4913
4957
|
});
|
|
@@ -5034,17 +5078,17 @@ class GridComponent {
|
|
|
5034
5078
|
}
|
|
5035
5079
|
}
|
|
5036
5080
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5037
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridComponent, isStandalone: true, selector: "mona-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, resizeMethod: { classPropertyName: "resizeMethod", publicName: "resizeMethod", isSignal: true, isRequired: false, transformFunction: null }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "grid" }, properties: { "class": "baseClass()", "attr.data-uid": "uid" } }, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], queries: [{ propertyName: "gridDetailTemplate", first: true, predicate: GridDetailTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: GridNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: GridToolbarTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "footerScrollElement", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderElement", first: true, predicate: ["gridHeaderElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderTableElement", first: true, predicate: ["headerTable"], descendants: true, isSignal: true }, { propertyName: "groupColumnList", first: true, predicate: ["groupColumnList"], descendants: true, isSignal: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>Columns</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ml-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill\"></i> Move as previous\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill\"></i> Move as next\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">Drag a column header here to group</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"gridService.groupColumns().length * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === 0\"\n [lastInRow]=\"\n colIndex ===\n gridService.visibleColumns().length - (gridService.masterDetailTemplate() ? 0 : 1)\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\") {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-r border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"'Filter by ' + column.title\">\n @if (column.kind === \"data\" && column.field) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-tl-none rounded-tr-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder text=\"No data\"></mona-placeholder>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridFilterMenuComponent, selector: "mona-grid-filter-menu", inputs: ["column", "type"], outputs: ["apply"] }, { kind: "component", type: GridFilterRowCellComponent, selector: "mona-grid-filter-row-cell", inputs: ["column"], outputs: ["apply"] }, { kind: "directive", type: GridColumnResizeHandlerDirective, selector: "[monaGridColumnResizeHandler]", inputs: ["column"], outputs: ["resizeEnd", "resizeStart"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: PlaceholderComponent, selector: "mona-placeholder", inputs: ["text", "class"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuItemComponent, selector: "mona-popup-menu-item", inputs: ["disabled", "label"], outputs: ["menuClick"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "lockedCellHeader", "lockedStructuralOffset"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupComponent, selector: "mona-popup", inputs: ["anchor", "anchorConnectionPoint", "animation", "backdropClass", "closeOnBackdropClick", "closeOnEscape", "closeOnMouseLeave", "closeOnOutsideClick", "data", "hasBackdrop", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "offset", "popupClass", "popupConnectionPoint", "popupWrapperClass", "positionStrategy", "positions", "preventClose", "providers", "trigger", "width", "withPush", "closeOnScroll", "restoreFocus", "withScrollTracking"], outputs: ["close", "open"] }, { kind: "component", type: GridColumnChooserComponent, selector: "mona-grid-column-chooser", outputs: ["apply", "cancel"] }, { kind: "pipe", type: ColumnAriaSortPipe, name: "columnAriaSort" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
|
|
5038
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-
|
|
5039
|
-
import('./nanahoshi-mona-ui-grid-grid-list.component-
|
|
5040
|
-
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
5041
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-
|
|
5081
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridComponent, isStandalone: true, selector: "mona-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, resizeMethod: { classPropertyName: "resizeMethod", publicName: "resizeMethod", isSignal: true, isRequired: false, transformFunction: null }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "grid" }, properties: { "class": "baseClass()", "attr.data-uid": "uid" } }, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], queries: [{ propertyName: "columnDefinitions", predicate: GRID_COLUMN_DEFINITION, isSignal: true }, { propertyName: "gridDetailTemplate", first: true, predicate: GridDetailTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: GridNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: GridToolbarTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "footerScrollElement", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderElement", first: true, predicate: ["gridHeaderElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderTableElement", first: true, predicate: ["headerTable"], descendants: true, isSignal: true }, { propertyName: "groupColumnList", first: true, predicate: ["groupColumnList"], descendants: true, isSignal: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>Columns</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ml-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill\"></i> Move as previous\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill\"></i> Move as next\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">Drag a column header here to group</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"gridService.groupColumns().length * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === 0\"\n [lastInRow]=\"\n colIndex ===\n gridService.visibleColumns().length - (gridService.masterDetailTemplate() ? 0 : 1)\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\") {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-r border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"'Filter by ' + column.title\">\n @if (column.kind === \"data\" && column.field) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-tl-none rounded-tr-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder text=\"No data\"></mona-placeholder>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridFilterMenuComponent, selector: "mona-grid-filter-menu", inputs: ["column", "type"], outputs: ["apply"] }, { kind: "component", type: GridFilterRowCellComponent, selector: "mona-grid-filter-row-cell", inputs: ["column"], outputs: ["apply"] }, { kind: "directive", type: GridColumnResizeHandlerDirective, selector: "[monaGridColumnResizeHandler]", inputs: ["column"], outputs: ["resizeEnd", "resizeStart"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: PlaceholderComponent, selector: "mona-placeholder", inputs: ["text", "class"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuItemComponent, selector: "mona-popup-menu-item", inputs: ["disabled", "label"], outputs: ["menuClick"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "lockedCellHeader", "lockedStructuralOffset"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupComponent, selector: "mona-popup", inputs: ["anchor", "anchorConnectionPoint", "animation", "backdropClass", "closeOnBackdropClick", "closeOnEscape", "closeOnMouseLeave", "closeOnOutsideClick", "data", "hasBackdrop", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "offset", "popupClass", "popupConnectionPoint", "popupWrapperClass", "positionStrategy", "positions", "preventClose", "providers", "trigger", "width", "withPush", "closeOnScroll", "restoreFocus", "withScrollTracking"], outputs: ["close", "open"] }, { kind: "component", type: GridColumnChooserComponent, selector: "mona-grid-column-chooser", outputs: ["apply", "cancel"] }, { kind: "pipe", type: ColumnAriaSortPipe, name: "columnAriaSort" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
|
|
5082
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-C6M8hmzY.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
|
|
5083
|
+
import('./nanahoshi-mona-ui-grid-grid-list.component-DTqG52dg.mjs').then(m => m.GridListComponent), PagerComponent, /* @ts-ignore */
|
|
5084
|
+
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-BcTk4OPK.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
|
|
5085
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BwwDwf6_.mjs').then(m => m.GridFooterTableCellDirective), GridLockedCellDirective]] }); }
|
|
5042
5086
|
}
|
|
5043
5087
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, resolveDeferredDeps: () => [/* @ts-ignore */
|
|
5044
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-
|
|
5045
|
-
import('./nanahoshi-mona-ui-grid-grid-list.component-
|
|
5046
|
-
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
5047
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-
|
|
5088
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-C6M8hmzY.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
|
|
5089
|
+
import('./nanahoshi-mona-ui-grid-grid-list.component-DTqG52dg.mjs').then(m => m.GridListComponent), /* @ts-ignore */
|
|
5090
|
+
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-BcTk4OPK.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
|
|
5091
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BwwDwf6_.mjs').then(m => m.GridFooterTableCellDirective)], resolveMetadata: (GridFooterCellComponent, GridListComponent, GridVirtualListComponent, GridFooterTableCellDirective) => ({ decorators: [{
|
|
5048
5092
|
type: Component,
|
|
5049
5093
|
args: [{ selector: "mona-grid", changeDetection: ChangeDetectionStrategy.OnPush, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], imports: [
|
|
5050
5094
|
CdkDropList,
|
|
@@ -5076,7 +5120,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
|
|
|
5076
5120
|
"[attr.data-uid]": "uid",
|
|
5077
5121
|
role: "grid"
|
|
5078
5122
|
}, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>Columns</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ml-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill\"></i> Move as previous\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill\"></i> Move as next\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">Drag a column header here to group</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"gridService.groupColumns().length * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === 0\"\n [lastInRow]=\"\n colIndex ===\n gridService.visibleColumns().length - (gridService.masterDetailTemplate() ? 0 : 1)\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\") {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-r border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"'Filter by ' + column.title\">\n @if (column.kind === \"data\" && column.field) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-tl-none rounded-tr-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder text=\"No data\"></mona-placeholder>\n }\n </div>\n</ng-template>\n" }]
|
|
5079
|
-
}], ctorParameters: () => [], propDecorators: { footerScrollElement: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], gridDetailTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridDetailTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], gridHeaderElement: [{ type: i0.ViewChild, args: ["gridHeaderElement", { isSignal: true }] }], gridHeaderTableElement: [{ type: i0.ViewChild, args: ["headerTable", { isSignal: true }] }], groupColumnList: [{ type: i0.ViewChild, args: ["groupColumnList", { isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], toolbarElement: [{ type: i0.ViewChild, args: ["toolbarElement", { isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridToolbarTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeValues", required: false }] }], resizeMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMethod", required: false }] }], responsivePager: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsivePager", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } }) });
|
|
5123
|
+
}], ctorParameters: () => [], propDecorators: { columnDefinitions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GRID_COLUMN_DEFINITION), { isSignal: true }] }], footerScrollElement: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], gridDetailTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridDetailTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], gridHeaderElement: [{ type: i0.ViewChild, args: ["gridHeaderElement", { isSignal: true }] }], gridHeaderTableElement: [{ type: i0.ViewChild, args: ["headerTable", { isSignal: true }] }], groupColumnList: [{ type: i0.ViewChild, args: ["groupColumnList", { isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], toolbarElement: [{ type: i0.ViewChild, args: ["toolbarElement", { isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridToolbarTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeValues", required: false }] }], resizeMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMethod", required: false }] }], responsivePager: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsivePager", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } }) });
|
|
5080
5124
|
|
|
5081
5125
|
/*
|
|
5082
5126
|
* Public API Surface of @nanahoshi/mona-ui/grid
|
|
@@ -5087,4 +5131,4 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
|
|
|
5087
5131
|
*/
|
|
5088
5132
|
|
|
5089
5133
|
export { GridSortableDirective as $, GridCellTemplateDirective as A, GridColumnComponent as B, CellEditEvent as C, GridColumnTitleTemplateDirective as D, GridCommandColumnComponent as E, GridComponent as F, GridNavigationService as G, GridContextMenuDirective as H, GridDetailTemplateDirective as I, GridEditCommandDirective as J, GridEditEvent as K, GridEditTemplateDirective as L, GridEditableDirective as M, GridExportDirective as N, GridFilterableDirective as O, GridFooterTemplateDirective as P, GridGroupFooterTemplateDirective as Q, GridGroupableDirective as R, GridHeaderTemplateDirective as S, GridNoDataTemplateDirective as T, GridRemoveCommandDirective as U, GridRemoveEvent as V, GridReorderableDirective as W, GridResizableDirective as X, GridSaveCommandDirective as Y, GridSaveEvent as Z, GridSelectableDirective as _, GridRowFlattenerService as a, GridStatePersistenceDirective as a0, GridToolbarTemplateDirective as a1, GridVirtualScrollDirective as a2, RowEditEvent as a3, gridFooterTableRowThemeVariants as b, GridService as c, gridGroupRowThemeVariants as d, gridListTableThemeVariants as e, GridLogicalCellDirective as f, gridListBaseThemeVariants as g, GridLockedCellDirective as h, gridFooterThemeVariants as i, gridFooterTableThemeVariants as j, gridListTableCellThemeVariants as k, gridDetailContentCellThemeVariants as l, gridDetailIndentCellThemeVariants as m, gridDetailRowThemeVariants as n, gridListTableRowThemeVariants as o, gridCellEditorBaseThemeVariants as p, gridCellEditorInputThemeVariants as q, gridCellBaseThemeVariants as r, gridCellContainerThemeVariants as s, gridCellDirtyIndicatorThemeVariants as t, gridCellTextThemeVariants as u, gridFooterTableCellThemeVariants as v, GridAddCommandDirective as w, GridAddEvent as x, GridCancelCommandDirective as y, GridCancelEvent as z };
|
|
5090
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
5134
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CvCis4-I.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CellEditEvent, w as GridAddCommandDirective, x as GridAddEvent, y as GridCancelCommandDirective, z as GridCancelEvent, A as GridCellTemplateDirective, B as GridColumnComponent, D as GridColumnTitleTemplateDirective, E as GridCommandColumnComponent, F as GridComponent, H as GridContextMenuDirective, I as GridDetailTemplateDirective, J as GridEditCommandDirective, K as GridEditEvent, L as GridEditTemplateDirective, M as GridEditableDirective, N as GridExportDirective, O as GridFilterableDirective, P as GridFooterTemplateDirective, Q as GridGroupFooterTemplateDirective, R as GridGroupableDirective, S as GridHeaderTemplateDirective, T as GridNoDataTemplateDirective, U as GridRemoveCommandDirective, V as GridRemoveEvent, W as GridReorderableDirective, X as GridResizableDirective, Y as GridSaveCommandDirective, Z as GridSaveEvent, _ as GridSelectableDirective, $ as GridSortableDirective, a0 as GridStatePersistenceDirective, a1 as GridToolbarTemplateDirective, a2 as GridVirtualScrollDirective, a3 as RowEditEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
1
|
+
export { C as CellEditEvent, w as GridAddCommandDirective, x as GridAddEvent, y as GridCancelCommandDirective, z as GridCancelEvent, A as GridCellTemplateDirective, B as GridColumnComponent, D as GridColumnTitleTemplateDirective, E as GridCommandColumnComponent, F as GridComponent, H as GridContextMenuDirective, I as GridDetailTemplateDirective, J as GridEditCommandDirective, K as GridEditEvent, L as GridEditTemplateDirective, M as GridEditableDirective, N as GridExportDirective, O as GridFilterableDirective, P as GridFooterTemplateDirective, Q as GridGroupFooterTemplateDirective, R as GridGroupableDirective, S as GridHeaderTemplateDirective, T as GridNoDataTemplateDirective, U as GridRemoveCommandDirective, V as GridRemoveEvent, W as GridReorderableDirective, X as GridResizableDirective, Y as GridSaveCommandDirective, Z as GridSaveEvent, _ as GridSelectableDirective, $ as GridSortableDirective, a0 as GridStatePersistenceDirective, a1 as GridToolbarTemplateDirective, a2 as GridVirtualScrollDirective, a3 as RowEditEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CvCis4-I.mjs';
|
|
2
2
|
//# sourceMappingURL=nanahoshi-mona-ui-grid.mjs.map
|
package/package.json
CHANGED
|
@@ -489,7 +489,6 @@ declare class ColumnSortEvent extends PreventableEvent {
|
|
|
489
489
|
|
|
490
490
|
declare class GridSortableDirective {
|
|
491
491
|
#private;
|
|
492
|
-
private readonly columnDefinitions;
|
|
493
492
|
/**
|
|
494
493
|
* @description Emitted when a column header is activated to change its sort direction. Call `preventDefault()` on the event to cancel the sort.
|
|
495
494
|
*/
|
|
@@ -507,7 +506,7 @@ declare class GridSortableDirective {
|
|
|
507
506
|
constructor();
|
|
508
507
|
private applyColumnSort;
|
|
509
508
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridSortableDirective, never>;
|
|
510
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridSortableDirective, "mona-grid[monaGridSortable]", never, { "options": { "alias": "monaGridSortable"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; }, { "columnSort": "columnSort"; "sort": "sortChange"; },
|
|
509
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridSortableDirective, "mona-grid[monaGridSortable]", never, { "options": { "alias": "monaGridSortable"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; }, { "columnSort": "columnSort"; "sort": "sortChange"; }, never, never, true, never>;
|
|
511
510
|
}
|
|
512
511
|
|
|
513
512
|
type GridStateVersion = 1;
|
|
@@ -981,6 +980,7 @@ type GridVariantInput = GridBaseVariantInput & GridHeaderTableCellVariantInput &
|
|
|
981
980
|
|
|
982
981
|
declare class GridComponent<T> implements GridVariantInput {
|
|
983
982
|
#private;
|
|
983
|
+
private readonly columnDefinitions;
|
|
984
984
|
private readonly footerScrollElement;
|
|
985
985
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
986
986
|
protected readonly columnActionsClass: _angular_core.Signal<string>;
|
|
@@ -1106,7 +1106,7 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1106
1106
|
private setResizeObserver;
|
|
1107
1107
|
private syncToolbarFocusTargets;
|
|
1108
1108
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridComponent<any>, never>;
|
|
1109
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridComponent<any>, "mona-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeValues": { "alias": "pageSizeValues"; "required": false; "isSignal": true; }; "resizeMethod": { "alias": "resizeMethod"; "required": false; "isSignal": true; }; "responsivePager": { "alias": "responsivePager"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["gridDetailTemplate", "noDataTemplate", "toolbarTemplate"], never, true, never>;
|
|
1109
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridComponent<any>, "mona-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeValues": { "alias": "pageSizeValues"; "required": false; "isSignal": true; }; "resizeMethod": { "alias": "resizeMethod"; "required": false; "isSignal": true; }; "responsivePager": { "alias": "responsivePager"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["columnDefinitions", "gridDetailTemplate", "noDataTemplate", "toolbarTemplate"], never, true, never>;
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
1112
|
export { CellEditEvent, ColumnReorderEvent, ColumnSortEvent, GridAddCommandDirective, GridAddEvent, GridCancelCommandDirective, GridCancelEvent, GridCellTemplateDirective, GridColumnComponent, GridColumnTitleTemplateDirective, GridCommandColumnComponent, GridComponent, GridContextMenuDirective, GridDetailTemplateDirective, GridEditCommandDirective, GridEditEvent, GridEditTemplateDirective, GridEditableDirective, GridExportDirective, GridFilterableDirective, GridFooterTemplateDirective, GridGroupFooterTemplateDirective, GridGroupableDirective, GridHeaderTemplateDirective, GridNoDataTemplateDirective, GridRemoveCommandDirective, GridRemoveEvent, GridReorderableDirective, GridResizableDirective, GridSaveCommandDirective, GridSaveEvent, GridSelectableDirective, GridSortableDirective, GridStatePersistenceDirective, GridToolbarTemplateDirective, GridVirtualScrollDirective, RowEditEvent };
|