@nanahoshi/mona-ui 0.9.0 → 0.10.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-D05Rq7-1.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-CJmjLl7R.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bad0K1Cw.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-pGhsAcVA.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-BhnFFIOl.mjs +145 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DvuQvc7E.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-DE3ffsva.mjs} +79 -6
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-7acNUovW.mjs +233 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-RQvhjBse.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DaOemy_G.mjs} +328 -54
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-grid.d.ts +107 -17
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-QqUUL60F.mjs +0 -122
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BmahjOXq.mjs +0 -232
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CellEditEvent,
|
|
1
|
+
export { C as CellEditEvent, A as GridAddCommandDirective, B as GridAddEvent, D as GridCancelCommandDirective, E as GridCancelEvent, F as GridCellTemplateDirective, H as GridColumnComponent, I as GridColumnTitleTemplateDirective, J as GridCommandColumnComponent, K as GridComponent, L as GridContextMenuDirective, M as GridDetailTemplateDirective, N as GridEditCommandDirective, O as GridEditEvent, P as GridEditTemplateDirective, Q as GridEditableDirective, R as GridExportDirective, S as GridFilterableDirective, T as GridFooterTemplateDirective, U as GridGroupFooterTemplateDirective, V as GridGroupableDirective, W as GridHeaderTemplateDirective, X as GridNoDataTemplateDirective, Y as GridRemoveCommandDirective, Z as GridRemoveEvent, _ as GridReorderableDirective, $ as GridResizableDirective, a0 as GridRowReorderableDirective, a1 as GridSaveCommandDirective, a2 as GridSaveEvent, a3 as GridSelectableDirective, a4 as GridSortableDirective, a5 as GridStatePersistenceDirective, a6 as GridToolbarTemplateDirective, a7 as GridVirtualScrollDirective, a8 as RowEditEvent, a9 as RowReorderEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DaOemy_G.mjs';
|
|
2
2
|
//# sourceMappingURL=nanahoshi-mona-ui-grid.mjs.map
|
package/package.json
CHANGED
|
@@ -3,11 +3,11 @@ import * as _angular_core from '@angular/core';
|
|
|
3
3
|
import { TemplateRef, WritableSignal, OnInit, ElementRef } from '@angular/core';
|
|
4
4
|
import { FieldTree, SchemaOrSchemaFn, ValidationError } from '@angular/forms/signals';
|
|
5
5
|
import { SortDirection, CompositeFilterDescriptor, SortDescriptor, FilterLogic, FilterOperators } from '@nanahoshi/mona-ui/query';
|
|
6
|
-
import { Selector, ImmutableDictionary, ImmutableList, ImmutableSet } from '@mirei/ts-collections';
|
|
7
6
|
import * as _nanahoshi_mona_ui_grid from '@nanahoshi/mona-ui/grid';
|
|
8
7
|
import { CdkDropList, CdkDragEnter, CdkDragStart, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
8
|
import { PageChangeEvent, PageSizeChangeEvent } from '@nanahoshi/mona-ui/pager';
|
|
10
9
|
import { FilterMenuValue } from '@nanahoshi/mona-ui/filter';
|
|
10
|
+
import { Selector, ImmutableDictionary, ImmutableList, ImmutableSet } from '@mirei/ts-collections';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
12
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
13
13
|
import { PopupMenuItem } from '@nanahoshi/mona-ui/popup-menu';
|
|
@@ -345,8 +345,6 @@ interface EditableOptions {
|
|
|
345
345
|
schema?: GridEditSchemaFactory;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
type GridKeySelector<TData, TKey = unknown> = string | Selector<TData, TKey> | null;
|
|
349
|
-
|
|
350
348
|
declare class GridEditableDirective {
|
|
351
349
|
#private;
|
|
352
350
|
/**
|
|
@@ -378,17 +376,13 @@ declare class GridEditableDirective {
|
|
|
378
376
|
* @description Emitted when a row edit is committed (row mode only).
|
|
379
377
|
*/
|
|
380
378
|
readonly rowEdit: _angular_core.OutputEmitterRef<RowEditEvent>;
|
|
381
|
-
/**
|
|
382
|
-
* @description Field name or selector used to keep edited row identity stable when data is rebound.
|
|
383
|
-
*/
|
|
384
|
-
readonly rowKey: _angular_core.InputSignal<GridKeySelector<unknown>>;
|
|
385
379
|
/**
|
|
386
380
|
* @description Emitted before an edited or new row is saved.
|
|
387
381
|
*/
|
|
388
382
|
readonly save: _angular_core.OutputEmitterRef<GridSaveEvent>;
|
|
389
383
|
constructor();
|
|
390
384
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridEditableDirective, never>;
|
|
391
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridEditableDirective, "mona-grid[monaGridEditable]", never, { "newRowFactory": { "alias": "newRowFactory"; "required": false; "isSignal": true; }; "options": { "alias": "monaGridEditable"; "required": false; "isSignal": true; };
|
|
385
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridEditableDirective, "mona-grid[monaGridEditable]", never, { "newRowFactory": { "alias": "newRowFactory"; "required": false; "isSignal": true; }; "options": { "alias": "monaGridEditable"; "required": false; "isSignal": true; }; }, { "add": "add"; "cancel": "cancel"; "cellEdit": "cellEdit"; "edit": "edit"; "remove": "remove"; "rowEdit": "rowEdit"; "save": "save"; }, never, never, true, never>;
|
|
392
386
|
}
|
|
393
387
|
|
|
394
388
|
declare class GridFilterableDirective {
|
|
@@ -504,6 +498,65 @@ declare class GridResizableDirective {
|
|
|
504
498
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridResizableDirective, "mona-grid[monaGridResizable]", never, { "options": { "alias": "monaGridResizable"; "required": false; "isSignal": true; }; }, { "columnResize": "columnResize"; }, never, never, true, never>;
|
|
505
499
|
}
|
|
506
500
|
|
|
501
|
+
interface RowReorderableOptions {
|
|
502
|
+
/**
|
|
503
|
+
* Determines whether an individual row may be reordered.
|
|
504
|
+
*
|
|
505
|
+
* Rows for which this returns false must show a disabled handle.
|
|
506
|
+
*/
|
|
507
|
+
canReorder?: (rowData: Record<PropertyKey, unknown>) => boolean;
|
|
508
|
+
/**
|
|
509
|
+
* Enables row reordering.
|
|
510
|
+
*
|
|
511
|
+
* @default true when the directive is used without a value
|
|
512
|
+
*/
|
|
513
|
+
enabled?: boolean;
|
|
514
|
+
/**
|
|
515
|
+
* Returns the accessible label for a row's reorder handle.
|
|
516
|
+
*
|
|
517
|
+
* The default must be positional, such as:
|
|
518
|
+
* "Reorder row 3"
|
|
519
|
+
*/
|
|
520
|
+
rowAriaLabel?: (rowData: Record<PropertyKey, unknown>, absoluteIndex: number) => string;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare class RowReorderEvent<TData extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>> extends PreventableEvent {
|
|
524
|
+
#private;
|
|
525
|
+
constructor(options: RowReorderEventOptions<TData>);
|
|
526
|
+
get currentIndex(): number;
|
|
527
|
+
get currentPageIndex(): number;
|
|
528
|
+
get previousIndex(): number;
|
|
529
|
+
get previousPageIndex(): number;
|
|
530
|
+
get reorderedData(): readonly TData[];
|
|
531
|
+
get rowData(): TData;
|
|
532
|
+
}
|
|
533
|
+
interface RowReorderEventOptions<TData extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>> {
|
|
534
|
+
currentIndex: number;
|
|
535
|
+
currentPageIndex: number;
|
|
536
|
+
previousIndex: number;
|
|
537
|
+
previousPageIndex: number;
|
|
538
|
+
reorderedData: readonly TData[];
|
|
539
|
+
rowData: TData;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
declare class GridRowReorderableDirective {
|
|
543
|
+
#private;
|
|
544
|
+
/**
|
|
545
|
+
* @description Enables row reordering via the reorder-handle column. Pass a `RowReorderableOptions`
|
|
546
|
+
* object to configure it explicitly.
|
|
547
|
+
* @default ""
|
|
548
|
+
*/
|
|
549
|
+
readonly options: _angular_core.InputSignal<"" | RowReorderableOptions>;
|
|
550
|
+
/**
|
|
551
|
+
* @description Emitted when a row is moved to a new position. The event carries the moved row,
|
|
552
|
+
* source- and page-relative indices, and the complete reordered application data.
|
|
553
|
+
*/
|
|
554
|
+
readonly rowReorder: _angular_core.OutputEmitterRef<RowReorderEvent<Record<PropertyKey, unknown>>>;
|
|
555
|
+
constructor();
|
|
556
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridRowReorderableDirective, never>;
|
|
557
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridRowReorderableDirective, "mona-grid[monaGridRowReorderable]", never, { "options": { "alias": "monaGridRowReorderable"; "required": false; "isSignal": true; }; }, { "rowReorder": "rowReorder"; }, never, never, true, never>;
|
|
558
|
+
}
|
|
559
|
+
|
|
507
560
|
declare class GridSelectableDirective {
|
|
508
561
|
#private;
|
|
509
562
|
/**
|
|
@@ -768,6 +821,8 @@ interface ColumnFilterState {
|
|
|
768
821
|
filterMenuValue?: FilterMenuValue;
|
|
769
822
|
}
|
|
770
823
|
|
|
824
|
+
type GridKeySelector<TData, TKey = unknown> = string | Selector<TData, TKey> | null;
|
|
825
|
+
|
|
771
826
|
type ResizeMethod = "auto" | "fitView" | number;
|
|
772
827
|
|
|
773
828
|
interface ColumnSortState {
|
|
@@ -819,6 +874,13 @@ interface PaginationState {
|
|
|
819
874
|
readonly take: number;
|
|
820
875
|
}
|
|
821
876
|
|
|
877
|
+
type StructuralColumnKind = "detail" | "reorder" | "selection";
|
|
878
|
+
interface StructuralColumnDescriptor {
|
|
879
|
+
readonly kind: StructuralColumnKind;
|
|
880
|
+
readonly visible: boolean;
|
|
881
|
+
readonly width: number;
|
|
882
|
+
}
|
|
883
|
+
|
|
822
884
|
interface RowEditDataItem extends Record<string, unknown> {
|
|
823
885
|
readonly $rowId: string;
|
|
824
886
|
}
|
|
@@ -836,7 +898,7 @@ declare class GridService {
|
|
|
836
898
|
readonly appliedSorts: _angular_core.WritableSignal<ImmutableDictionary<string, ColumnSortState>>;
|
|
837
899
|
readonly bodyScrollElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
838
900
|
readonly bodyTableElement: _angular_core.WritableSignal<HTMLTableElement | null>;
|
|
839
|
-
readonly bulkSelectionRows: _angular_core.Signal<
|
|
901
|
+
readonly bulkSelectionRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
840
902
|
readonly cellEdit$: Subject<CellEditEvent>;
|
|
841
903
|
readonly cancel$: Subject<GridCancelEvent>;
|
|
842
904
|
/** Set of currently collapsed group keys (global, shared by both paginated and virtual list). */
|
|
@@ -847,6 +909,7 @@ declare class GridService {
|
|
|
847
909
|
readonly columns: _angular_core.WritableSignal<ImmutableList<Column>>;
|
|
848
910
|
readonly contextMenuItems: _angular_core.WritableSignal<ImmutableSet<PopupMenuItem>>;
|
|
849
911
|
readonly detailColumnWidth = 36;
|
|
912
|
+
readonly detailColumnOffset: _angular_core.Signal<number>;
|
|
850
913
|
readonly detailStructuralWidth: _angular_core.Signal<0 | 36>;
|
|
851
914
|
readonly editBaseDict: _angular_core.Signal<ImmutableDictionary<string, RowEditDataItem>>;
|
|
852
915
|
readonly editContext: _angular_core.Signal<GridEditContext | null>;
|
|
@@ -854,9 +917,8 @@ declare class GridService {
|
|
|
854
917
|
readonly editViewDict: _angular_core.Signal<ImmutableDictionary<string, RowEditDataItem>>;
|
|
855
918
|
readonly editSession: _angular_core.Signal<GridEditSession | null>;
|
|
856
919
|
readonly editableOptions: _angular_core.WritableSignal<EditableOptions>;
|
|
857
|
-
readonly editableRowKey: _angular_core.WritableSignal<GridKeySelector<unknown>>;
|
|
858
920
|
readonly editingRowUid: _angular_core.Signal<string | null>;
|
|
859
|
-
readonly expandedKeys: _angular_core.WritableSignal<ImmutableSet<
|
|
921
|
+
readonly expandedKeys: _angular_core.WritableSignal<ImmutableSet<string>>;
|
|
860
922
|
readonly filterChange$: Subject<CompositeFilterDescriptor[]>;
|
|
861
923
|
readonly filterableOptions: _angular_core.Signal<FilterableOptions>;
|
|
862
924
|
readonly footerScrollElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
@@ -872,6 +934,7 @@ declare class GridService {
|
|
|
872
934
|
readonly headerTableElement: _angular_core.WritableSignal<HTMLTableElement | null>;
|
|
873
935
|
readonly horizontalScrollLeft: _angular_core.Signal<number>;
|
|
874
936
|
readonly isInEditMode: _angular_core.Signal<boolean>;
|
|
937
|
+
readonly lastLeftStructuralOffset: _angular_core.Signal<number | null>;
|
|
875
938
|
readonly leftLockedStructuralWidth: _angular_core.Signal<number>;
|
|
876
939
|
readonly lockedColumnStates: _angular_core.Signal<ReadonlyMap<string, GridLockedColumnState>>;
|
|
877
940
|
readonly leadingStructuralWidth: _angular_core.Signal<number>;
|
|
@@ -885,9 +948,20 @@ declare class GridService {
|
|
|
885
948
|
readonly remove$: Subject<GridRemoveEvent>;
|
|
886
949
|
readonly reorderableOptions: _angular_core.Signal<ReorderableOptions>;
|
|
887
950
|
readonly resizableOptions: _angular_core.Signal<ResizableOptions>;
|
|
951
|
+
readonly rowDragInProgress: _angular_core.Signal<boolean>;
|
|
888
952
|
readonly rowEdit$: Subject<RowEditEvent>;
|
|
889
|
-
readonly
|
|
953
|
+
readonly rowKey: _angular_core.WritableSignal<GridKeySelector<unknown>>;
|
|
954
|
+
readonly rowReorder$: Subject<RowReorderEvent<Record<PropertyKey, unknown>>>;
|
|
955
|
+
readonly rowReorderColumnOffset: _angular_core.Signal<number>;
|
|
956
|
+
readonly rowReorderColumnVisible: _angular_core.Signal<boolean>;
|
|
957
|
+
readonly rowReorderColumnWidth = 36;
|
|
958
|
+
readonly rowReorderDisabledReason: _angular_core.Signal<RowReorderDisabledReason>;
|
|
959
|
+
readonly rowReorderInteractionEnabled: _angular_core.Signal<boolean>;
|
|
960
|
+
readonly rowReorderStructuralWidth: _angular_core.Signal<0 | 36>;
|
|
961
|
+
readonly rowReorderableOptions: _angular_core.Signal<RowReorderableOptions>;
|
|
962
|
+
readonly rows: _angular_core.WritableSignal<ImmutableList<Row>>;
|
|
890
963
|
readonly save$: Subject<GridSaveEvent>;
|
|
964
|
+
readonly draggingRowUid: _angular_core.WritableSignal<string | null>;
|
|
891
965
|
readonly scrollEnd$: Subject<void>;
|
|
892
966
|
readonly scrollEndThreshold: _angular_core.WritableSignal<number>;
|
|
893
967
|
readonly scrollbarGutterWidth: _angular_core.Signal<number>;
|
|
@@ -903,17 +977,22 @@ declare class GridService {
|
|
|
903
977
|
readonly selectionStructuralWidth: _angular_core.Signal<0 | 40>;
|
|
904
978
|
readonly someBulkSelectionRowsSelected: _angular_core.Signal<boolean>;
|
|
905
979
|
readonly sortableOptions: _angular_core.WritableSignal<SortableOptions>;
|
|
980
|
+
readonly structuralColIndexMap: _angular_core.Signal<Map<StructuralColumnKind, number>>;
|
|
981
|
+
readonly structuralColumns: _angular_core.Signal<readonly StructuralColumnDescriptor[]>;
|
|
982
|
+
readonly structuralLastKind: _angular_core.Signal<StructuralColumnKind | null>;
|
|
906
983
|
readonly tableWidth: _angular_core.Signal<number | null>;
|
|
907
|
-
readonly viewPageRows: _angular_core.Signal<
|
|
984
|
+
readonly viewPageRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
908
985
|
readonly viewRowCount: _angular_core.Signal<number>;
|
|
909
|
-
readonly viewRows: _angular_core.Signal<
|
|
986
|
+
readonly viewRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
910
987
|
readonly virtualGridMaxBuffer: _angular_core.Signal<number>;
|
|
911
988
|
readonly virtualGridMinBuffer: _angular_core.WritableSignal<number>;
|
|
912
989
|
readonly virtualScrollOptions: _angular_core.WritableSignal<VirtualScrollOptions>;
|
|
913
990
|
readonly visibleColumns: _angular_core.Signal<ImmutableList<Column>>;
|
|
991
|
+
readonly visibleStructuralColumns: _angular_core.Signal<StructuralColumnDescriptor[]>;
|
|
914
992
|
constructor();
|
|
915
993
|
addGroupColumn(column: Column): void;
|
|
916
994
|
applyState(state: GridState | null, options?: GridStatePersistenceOptions): GridStateLoadResult;
|
|
995
|
+
canReorderRow(row: Row): boolean;
|
|
917
996
|
cancelAddRow(originalEvent?: Event): boolean;
|
|
918
997
|
cancelEdit(originalEvent?: Event): boolean;
|
|
919
998
|
captureState(options?: GridStatePersistenceOptions): GridState;
|
|
@@ -926,6 +1005,7 @@ declare class GridService {
|
|
|
926
1005
|
getColumnStateId(column: Column): string | null;
|
|
927
1006
|
getColumnWidth(column: Column): number;
|
|
928
1007
|
getGroupDescriptors(columns: Iterable<Column>): GroupDescriptor[];
|
|
1008
|
+
getRowReorderAriaLabel(row: Row, absoluteIndex: number): string;
|
|
929
1009
|
handleMultipleSelection(event: MouseEvent, row: Row): void;
|
|
930
1010
|
handleRowClick(event: MouseEvent, row: Row): void;
|
|
931
1011
|
handleSingleSelection(event: MouseEvent, row: Row): void;
|
|
@@ -941,6 +1021,7 @@ declare class GridService {
|
|
|
941
1021
|
patchAddCell(field: string, value: unknown): void;
|
|
942
1022
|
patchCellEdit(rowUid: string, field: string, value: unknown): void;
|
|
943
1023
|
removeRow(row: Row, originalEvent?: Event): boolean;
|
|
1024
|
+
requestRowReorder(row: Row, previousPageIndex: number, currentPageIndex: number): boolean;
|
|
944
1025
|
resolveAggregateValue(bucket: GridAggregateBucket | null, aggregateFunction: AggregateFunction | null): unknown;
|
|
945
1026
|
saveAddRow(originalEvent?: Event): boolean;
|
|
946
1027
|
selectRow(row: Row): void;
|
|
@@ -963,6 +1044,7 @@ declare class GridService {
|
|
|
963
1044
|
setReorderableOptions(options: Partial<ReorderableOptions>): void;
|
|
964
1045
|
setResizableOptions(options: Partial<ResizableOptions>): void;
|
|
965
1046
|
setRowExpanded(row: Row, expanded: boolean): void;
|
|
1047
|
+
setRowReorderableOptions(options: RowReorderableOptions): void;
|
|
966
1048
|
setRows(value: Iterable<Record<PropertyKey, unknown>>, rowKey?: GridKeySelector<unknown> | null): void;
|
|
967
1049
|
setSelectableOptions(options: SelectableOptions): void;
|
|
968
1050
|
setRowSelected(row: Row, selected: boolean): void;
|
|
@@ -973,6 +1055,7 @@ declare class GridService {
|
|
|
973
1055
|
startCellEdit(uid: string, row: Row, column: Column, originalEvent?: Event): boolean;
|
|
974
1056
|
startRowEdit(row: Row, originalEvent?: Event): boolean;
|
|
975
1057
|
stopCellEdit(originalEvent?: Event): boolean;
|
|
1058
|
+
structuralColumnOffset(kind: StructuralColumnKind, groupPrefixWidth: number): number;
|
|
976
1059
|
toggleGroupCollapse(groupKey: string): void;
|
|
977
1060
|
updateColumn(columnId: string, patch: Partial<Omit<Column, "id">>): void;
|
|
978
1061
|
private applyColumnIndexes;
|
|
@@ -1017,6 +1100,7 @@ declare class GridService {
|
|
|
1017
1100
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridService, never>;
|
|
1018
1101
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GridService>;
|
|
1019
1102
|
}
|
|
1103
|
+
type RowReorderDisabledReason = "disabled" | "editing" | "filtered" | "grouped" | "single-row" | "sorted" | "virtual-scroll" | null;
|
|
1020
1104
|
|
|
1021
1105
|
declare const gridBaseThemeVariants: (props?: ({
|
|
1022
1106
|
rounded?: "small" | "none" | "medium" | "large" | null | undefined;
|
|
@@ -1118,6 +1202,12 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1118
1202
|
* @default "fitView"
|
|
1119
1203
|
*/
|
|
1120
1204
|
readonly resizeMethod: _angular_core.InputSignal<ResizeMethod>;
|
|
1205
|
+
/**
|
|
1206
|
+
* @description Field name or selector used to derive a stable identity for each row.
|
|
1207
|
+
* The resolved value must be unique within the grid data.
|
|
1208
|
+
* @default null
|
|
1209
|
+
*/
|
|
1210
|
+
readonly rowKey: _angular_core.InputSignal<GridKeySelector<unknown>>;
|
|
1121
1211
|
/**
|
|
1122
1212
|
* @description Whether the pager is responsive.
|
|
1123
1213
|
* If set to `true`, the pager will be displayed as a dropdown when the grid width gets smaller.
|
|
@@ -1171,8 +1261,8 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1171
1261
|
private setResizeObserver;
|
|
1172
1262
|
private syncToolbarFocusTargets;
|
|
1173
1263
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridComponent<any>, never>;
|
|
1174
|
-
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>;
|
|
1264
|
+
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; }; "rowKey": { "alias": "rowKey"; "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>;
|
|
1175
1265
|
}
|
|
1176
1266
|
|
|
1177
|
-
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 };
|
|
1178
|
-
export type { AggregateFunction, Column, ColumnConfig, ColumnFormat, ColumnKind, ColumnResizeEvent, EditableOptions, FilterableOptions, GridColumnLockedPosition, GridColumnState, GridEditFormContext, GridEditOperation, GridEditSchemaFactory, GridEditSession, GridEditTemplateContext, GridSaveOperation, GridState, GridStateCompositeFilterDescriptor, GridStateFilterDescriptor, GridStateFilterValue, GridStateLoadResult, GridStateLoadStatus, GridStatePersistenceOptions, GridStateSortDescriptor, GridStateVersion, GroupDescriptor, GroupableOptions, ReorderableOptions, ResizableOptions, ResizeMethod, SelectableOptions, SortableOptions };
|
|
1267
|
+
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, GridRowReorderableDirective, GridSaveCommandDirective, GridSaveEvent, GridSelectableDirective, GridSortableDirective, GridStatePersistenceDirective, GridToolbarTemplateDirective, GridVirtualScrollDirective, RowEditEvent, RowReorderEvent };
|
|
1268
|
+
export type { AggregateFunction, Column, ColumnConfig, ColumnFormat, ColumnKind, ColumnResizeEvent, EditableOptions, FilterableOptions, GridColumnLockedPosition, GridColumnState, GridEditFormContext, GridEditOperation, GridEditSchemaFactory, GridEditSession, GridEditTemplateContext, GridSaveOperation, GridState, GridStateCompositeFilterDescriptor, GridStateFilterDescriptor, GridStateFilterValue, GridStateLoadResult, GridStateLoadStatus, GridStatePersistenceOptions, GridStateSortDescriptor, GridStateVersion, GroupDescriptor, GroupableOptions, ReorderableOptions, ResizableOptions, ResizeMethod, RowReorderableOptions, SelectableOptions, SortableOptions };
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, DestroyRef, ElementRef, viewChild, computed, input, afterNextRender, Component } from '@angular/core';
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import { ImmutableList, ImmutableSet, span } from '@mirei/ts-collections';
|
|
6
|
-
import { SlicePipe } from '@nanahoshi/mona-ui/common';
|
|
7
|
-
import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
|
|
8
|
-
import { fromEvent } from 'rxjs';
|
|
9
|
-
import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent, h as GridSelectionCheckboxComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-DvuQvc7E.mjs';
|
|
10
|
-
import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bad0K1Cw.mjs';
|
|
11
|
-
import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-RQvhjBse.mjs';
|
|
12
|
-
import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-D05Rq7-1.mjs';
|
|
13
|
-
|
|
14
|
-
class GridListComponent {
|
|
15
|
-
#destroyRef;
|
|
16
|
-
#gridNavigationService;
|
|
17
|
-
#hostElementRef;
|
|
18
|
-
#rowFlattener;
|
|
19
|
-
constructor() {
|
|
20
|
-
this.#destroyRef = inject(DestroyRef);
|
|
21
|
-
this.#gridNavigationService = inject(GridNavigationService);
|
|
22
|
-
this.#hostElementRef = inject((ElementRef));
|
|
23
|
-
this.#rowFlattener = inject(GridRowFlattenerService);
|
|
24
|
-
this.bodyTableElementRef = viewChild.required("bodyTable", /* @ts-ignore */
|
|
25
|
-
...(ngDevMode ? [{ debugName: "bodyTableElementRef" }] : /* istanbul ignore next */ []));
|
|
26
|
-
this.baseClass = computed(() => {
|
|
27
|
-
return gridListBaseThemeVariants({ virtual: false });
|
|
28
|
-
}, /* @ts-ignore */
|
|
29
|
-
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
30
|
-
this.flattenedGroupedRows = computed(() => {
|
|
31
|
-
const groupColumns = this.gridService.groupColumns();
|
|
32
|
-
if (groupColumns.length === 0) {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
const collapsedKeys = new Set(this.gridService.collapsedGroupKeys());
|
|
36
|
-
const groupAggregateDict = this.gridService.groupAggregateMap().toDictionary(e => e.key, e => e.value);
|
|
37
|
-
const showFooter = this.gridService.groupableOptions().showFooter;
|
|
38
|
-
return this.#rowFlattener.flatten(this.data(), groupColumns, collapsedKeys, showFooter, groupAggregateDict);
|
|
39
|
-
}, /* @ts-ignore */
|
|
40
|
-
...(ngDevMode ? [{ debugName: "flattenedGroupedRows" }] : /* istanbul ignore next */ []));
|
|
41
|
-
this.footerTableRowClass = computed(() => {
|
|
42
|
-
return gridFooterTableRowThemeVariants();
|
|
43
|
-
}, /* @ts-ignore */
|
|
44
|
-
...(ngDevMode ? [{ debugName: "footerTableRowClass" }] : /* istanbul ignore next */ []));
|
|
45
|
-
this.gridService = inject(GridService);
|
|
46
|
-
this.groupRowClass = computed(() => {
|
|
47
|
-
return gridGroupRowThemeVariants();
|
|
48
|
-
}, /* @ts-ignore */
|
|
49
|
-
...(ngDevMode ? [{ debugName: "groupRowClass" }] : /* istanbul ignore next */ []));
|
|
50
|
-
this.tableClass = computed(() => {
|
|
51
|
-
return gridListTableThemeVariants();
|
|
52
|
-
}, /* @ts-ignore */
|
|
53
|
-
...(ngDevMode ? [{ debugName: "tableClass" }] : /* istanbul ignore next */ []));
|
|
54
|
-
this.columns = input(ImmutableList.create(), /* @ts-ignore */
|
|
55
|
-
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
56
|
-
this.data = input(ImmutableSet.create(), /* @ts-ignore */
|
|
57
|
-
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
58
|
-
this.span = span;
|
|
59
|
-
afterNextRender({
|
|
60
|
-
read: () => {
|
|
61
|
-
const bodyTableElement = this.bodyTableElementRef().nativeElement;
|
|
62
|
-
const bodyScrollElement = this.#hostElementRef.nativeElement;
|
|
63
|
-
this.gridService.bodyTableElement.set(bodyTableElement);
|
|
64
|
-
this.gridService.bodyScrollElement.set(bodyScrollElement);
|
|
65
|
-
this.setSubscriptions();
|
|
66
|
-
this.#destroyRef.onDestroy(() => {
|
|
67
|
-
if (this.gridService.bodyTableElement() === bodyTableElement) {
|
|
68
|
-
this.gridService.bodyTableElement.set(null);
|
|
69
|
-
}
|
|
70
|
-
if (this.gridService.bodyScrollElement() === bodyScrollElement) {
|
|
71
|
-
this.gridService.bodyScrollElement.set(null);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
onGridRowClick(event, row) {
|
|
78
|
-
this.gridService.handleRowClick(event, row);
|
|
79
|
-
}
|
|
80
|
-
onGroupExpandChange(groupKey) {
|
|
81
|
-
this.gridService.toggleGroupCollapse(groupKey);
|
|
82
|
-
}
|
|
83
|
-
onToggleDetailClick(row) {
|
|
84
|
-
const expanded = this.gridService.isRowExpanded(row);
|
|
85
|
-
this.gridService.setRowExpanded(row, !expanded);
|
|
86
|
-
}
|
|
87
|
-
setSubscriptions() {
|
|
88
|
-
fromEvent(this.#hostElementRef.nativeElement, "focus")
|
|
89
|
-
.pipe(takeUntilDestroyed(this.#destroyRef))
|
|
90
|
-
.subscribe(() => {
|
|
91
|
-
this.#gridNavigationService.focusActiveCellOrFirstHeader();
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridListComponent, isStandalone: true, selector: "mona-grid-list", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "bodyTableElementRef", first: true, predicate: ["bodyTable"], descendants: true, isSignal: true }], ngImport: i0, template: "<table #bodyTable [class]=\"tableClass()\" [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 @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of columns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tbody role=\"rowgroup\">\n @if (gridService.addRowVisible()) {\n <tr monaGridAddRow [columns]=\"columns()\"></tr>\n }\n @if (gridService.groupColumns().length === 0) {\n @for (row of data(); track row.uid) {\n @let rowIndex = $index;\n <tr\n (click)=\"onGridRowClick($event, row)\"\n monaGridRow\n [index]=\"rowIndex\"\n [row]=\"row\"\n #gridRow=\"monaGridRow\"\n #rowElement>\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"0\"\n [masterDetailToggle]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'detail'\"\n [colIndex]=\"0\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0 && !gridService.selectionColumnVisible()\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"row.uid\"\n [section]=\"'body'\"\n [style.width.px]=\"gridService.detailColumnWidth\"\n [attr.colspan]=\"1\">\n <span class=\"flex h-full w-full items-stretch justify-center\">\n <mona-grid-toggle\n [expanded]=\"gridRow.expanded()\"\n [type]=\"'detail'\"\n [width]=\"gridService.detailColumnWidth\"\n (expandedChange)=\"onToggleDetailClick(row)\"></mona-grid-toggle>\n </span>\n </td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"row.uid\"\n [section]=\"'body'\"\n [colIndex]=\"gridService.masterDetailTemplate() ? 1 : 0\"\n [firstInRow]=\"!gridService.masterDetailTemplate()\"\n [lastInRow]=\"columns().length === 0\"\n [style.width.px]=\"gridService.selectionColumnWidth\"\n [attr.colspan]=\"1\">\n <mona-grid-selection-checkbox [row]=\"row\" [rowIndex]=\"rowIndex\" />\n </td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [editable]=\"\n gridService.editableOptions().enabled === true &&\n gridService.editableOptions().mode === 'cell' &&\n column.kind === 'data' &&\n column.editable === true\n \"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"row.uid\"\n [section]=\"'body'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() + columns().length - 1\n \"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\"\n (edit)=\"gridCell.handleLogicalCellEnter()\">\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"row\"></mona-grid-cell>\n </td>\n }\n @if (gridService.contextMenuItems().length !== 0) {\n <ng-container\n [ngTemplateOutlet]=\"contextMenuTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row.data, element: rowElement, index: $index }\">\n </ng-container>\n }\n </tr>\n @if (gridRow.expanded()) {\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"0\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n <td monaGridCell [masterDetailContent]=\"true\" [attr.colspan]=\"columns().length\">\n <ng-container\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row.data }\"></ng-container>\n </td>\n </tr>\n }\n }\n } @else {\n @for (viewRow of flattenedGroupedRows(); track $index) {\n @let rowIndex = $index;\n @if (viewRow.type === \"group\") {\n @let isCollapsed = gridService.isGroupCollapsed(viewRow.groupKey);\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\n\n <tr\n [class]=\"groupRowClass()\"\n role=\"row\"\n [attr.aria-level]=\"viewRow.depth + 1\"\n [attr.aria-expanded]=\"!isCollapsed\">\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth; track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @let colspan =\n columns().length +\n gridService.groupColumns().length +\n (gridService.masterDetailTemplate() ? 1 : 0) +\n (gridService.selectionColumnVisible() ? 1 : 0) -\n viewRow.depth +\n 1;\n\n <td\n monaGridCell\n monaGridLogicalCell\n [cellKind]=\"'group'\"\n [rowIndex]=\"rowIndex\"\n [colIndex]=\"0\"\n [section]=\"'body'\"\n [grouped]=\"true\"\n [groupHeader]=\"true\"\n [prevRowType]=\"prevRow?.type\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0\"\n [groupKey]=\"viewRow.groupKey\"\n (toggle)=\"onGroupExpandChange(viewRow.groupKey)\"\n [attr.colspan]=\"colspan\">\n <p class=\"flex h-full items-center text-sm whitespace-nowrap\">\n <mona-grid-toggle\n [expanded]=\"!isCollapsed\"\n [width]=\"gridService.groupColumnWidth\"\n [type]=\"'group'\"\n (expandedChange)=\"onGroupExpandChange(viewRow.groupKey)\"></mona-grid-toggle>\n <span class=\"font-bold\">{{ viewRow.title }}: {{ viewRow.groupValue }}</span>\n </p>\n </td>\n </tr>\n } @else if (viewRow.type === \"groupFooter\") {\n <tr role=\"row\" [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 @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of columns(); 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\"\n [groupKey]=\"viewRow.groupAggregate.groupKey\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n } @else {\n @let nextRow = flattenedGroupedRows()[rowIndex + 1];\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\n <tr\n (click)=\"onGridRowClick($event, viewRow.row)\"\n monaGridRow\n [index]=\"rowIndex\"\n [row]=\"viewRow.row\"\n #gridRow=\"monaGridRow\"\n #rowElement>\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n [grouped]=\"true\"\n [masterDetailToggle]=\"true\"\n [prevRowType]=\"prevRow?.type\"\n [nextRowType]=\"nextRow?.type\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"viewRow.row.uid\"\n [section]=\"'body'\"\n [cellKind]=\"'detail'\"\n [colIndex]=\"0\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0 && !gridService.selectionColumnVisible()\"\n [style.width.px]=\"gridService.detailColumnWidth\">\n <span class=\"flex h-full w-full items-stretch justify-center\">\n <mona-grid-toggle\n [expanded]=\"gridRow.expanded()\"\n [type]=\"'detail'\"\n [width]=\"gridService.detailColumnWidth\"\n (expandedChange)=\"onToggleDetailClick(viewRow.row)\"></mona-grid-toggle>\n </span>\n </td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [grouped]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [prevRowType]=\"prevRow?.type\"\n [nextRowType]=\"nextRow?.type\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"viewRow.row.uid\"\n [section]=\"'body'\"\n [colIndex]=\"gridService.masterDetailTemplate() ? 1 : 0\"\n [firstInRow]=\"!gridService.masterDetailTemplate()\"\n [lastInRow]=\"columns().length === 0\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n <mona-grid-selection-checkbox [row]=\"viewRow.row\" [rowIndex]=\"rowIndex\" />\n </td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [grouped]=\"true\"\n [dataCell]=\"true\"\n [prevRowType]=\"prevRow?.type\"\n [nextRowType]=\"nextRow?.type\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [editable]=\"\n gridService.editableOptions().enabled === true &&\n gridService.editableOptions().mode === 'cell' &&\n column.kind === 'data' &&\n column.editable === true\n \"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() + columns().length - 1\n \"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"viewRow.row.uid\"\n [section]=\"'body'\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\"\n (edit)=\"gridCell.handleLogicalCellEnter()\">\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"viewRow.row\"></mona-grid-cell>\n </td>\n }\n @if (gridService.contextMenuItems().length !== 0) {\n <ng-container\n [ngTemplateOutlet]=\"contextMenuTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: viewRow.row.data,\n element: rowElement,\n index: rowIndex\n }\">\n </ng-container>\n }\n </tr>\n @if (gridRow.expanded()) {\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth + 1; track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @let colspan = columns().length + gridService.groupColumns().length - 1;\n <td\n monaGridDetailIndentCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"(viewRow.depth + 1) * gridService.groupColumnWidth\"\n [nextRowType]=\"nextRow?.type\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n <td monaGridDetailContentCell [nextRowType]=\"nextRow?.type\" [attr.colspan]=\"colspan\">\n <ng-container\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: viewRow.row.data }\"></ng-container>\n </td>\n </tr>\n }\n }\n }\n }\n </tbody>\n</table>\n\n<ng-template let-rowData let-element=\"element\" let-rowIndex=\"index\" #contextMenuTemplate>\n <mona-contextmenu [target]=\"element\" [items]=\"gridService.contextMenuItems()\"></mona-contextmenu>\n <!-- [context]=\"{rowData, element, rowIndex}\"-->\n</ng-template>\n", dependencies: [{ kind: "component", type: GridAddRowComponent, selector: "tr[monaGridAddRow]", inputs: ["columns"] }, { kind: "component", type: GridCellComponent, selector: "mona-grid-cell", inputs: ["column", "row"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ContextMenuComponent, selector: "mona-contextmenu", inputs: ["ariaLabel", "items", "minWidth", "rounded", "size", "target", "width"], outputs: ["menuClick"] }, { kind: "directive", type: GridRowDirective, selector: "tr[monaGridRow]", inputs: ["index", "row"], exportAs: ["monaGridRow"] }, { kind: "directive", type: GridCellDirective, selector: "td[monaGridCell]", inputs: ["dataCell", "groupHeader", "groupToggle", "grouped", "indentCell", "lastInRow", "masterDetailContent", "masterDetailToggle", "nextRowType", "prevRowType"] }, { kind: "directive", type: GridDetailRowDirective, selector: "tr[monaGridDetailRow]" }, { kind: "directive", type: GridDetailIndentCellDirective, selector: "td[monaGridDetailIndentCell]", inputs: ["nextRowType"] }, { kind: "directive", type: GridDetailContentCellDirective, selector: "td[monaGridDetailContentCell]", inputs: ["nextRowType"] }, { kind: "component", type: GridToggleComponent, selector: "mona-grid-toggle", inputs: ["expanded", "type", "width"], outputs: ["expandedChange"] }, { kind: "directive", type: GridFooterTableCellDirective, selector: "td[monaGridFooterTableCell]", inputs: ["footerCellMinWidth", "footerCellWidth", "footerColumn"] }, { 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: "component", type: GridFooterCellComponent, selector: "mona-grid-footer-cell", inputs: ["column", "columnIndex", "groupKey"] }, { kind: "component", type: GridSelectionCheckboxComponent, selector: "mona-grid-selection-checkbox", inputs: ["row", "rowIndex"] }, { kind: "pipe", type: SlicePipe, name: "monaSlice" }] }); }
|
|
96
|
-
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridListComponent, decorators: [{
|
|
98
|
-
type: Component,
|
|
99
|
-
args: [{ selector: "mona-grid-list", imports: [
|
|
100
|
-
GridAddRowComponent,
|
|
101
|
-
GridCellComponent,
|
|
102
|
-
NgTemplateOutlet,
|
|
103
|
-
ContextMenuComponent,
|
|
104
|
-
GridRowDirective,
|
|
105
|
-
GridCellDirective,
|
|
106
|
-
GridDetailRowDirective,
|
|
107
|
-
GridDetailIndentCellDirective,
|
|
108
|
-
GridDetailContentCellDirective,
|
|
109
|
-
SlicePipe,
|
|
110
|
-
GridToggleComponent,
|
|
111
|
-
GridFooterTableCellDirective,
|
|
112
|
-
GridLogicalCellDirective,
|
|
113
|
-
GridLockedCellDirective,
|
|
114
|
-
GridFooterCellComponent,
|
|
115
|
-
GridSelectionCheckboxComponent
|
|
116
|
-
], host: {
|
|
117
|
-
"[class]": "baseClass()"
|
|
118
|
-
}, template: "<table #bodyTable [class]=\"tableClass()\" [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 @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of columns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tbody role=\"rowgroup\">\n @if (gridService.addRowVisible()) {\n <tr monaGridAddRow [columns]=\"columns()\"></tr>\n }\n @if (gridService.groupColumns().length === 0) {\n @for (row of data(); track row.uid) {\n @let rowIndex = $index;\n <tr\n (click)=\"onGridRowClick($event, row)\"\n monaGridRow\n [index]=\"rowIndex\"\n [row]=\"row\"\n #gridRow=\"monaGridRow\"\n #rowElement>\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"0\"\n [masterDetailToggle]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'detail'\"\n [colIndex]=\"0\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0 && !gridService.selectionColumnVisible()\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"row.uid\"\n [section]=\"'body'\"\n [style.width.px]=\"gridService.detailColumnWidth\"\n [attr.colspan]=\"1\">\n <span class=\"flex h-full w-full items-stretch justify-center\">\n <mona-grid-toggle\n [expanded]=\"gridRow.expanded()\"\n [type]=\"'detail'\"\n [width]=\"gridService.detailColumnWidth\"\n (expandedChange)=\"onToggleDetailClick(row)\"></mona-grid-toggle>\n </span>\n </td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"row.uid\"\n [section]=\"'body'\"\n [colIndex]=\"gridService.masterDetailTemplate() ? 1 : 0\"\n [firstInRow]=\"!gridService.masterDetailTemplate()\"\n [lastInRow]=\"columns().length === 0\"\n [style.width.px]=\"gridService.selectionColumnWidth\"\n [attr.colspan]=\"1\">\n <mona-grid-selection-checkbox [row]=\"row\" [rowIndex]=\"rowIndex\" />\n </td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [editable]=\"\n gridService.editableOptions().enabled === true &&\n gridService.editableOptions().mode === 'cell' &&\n column.kind === 'data' &&\n column.editable === true\n \"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"row.uid\"\n [section]=\"'body'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() + columns().length - 1\n \"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\"\n (edit)=\"gridCell.handleLogicalCellEnter()\">\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"row\"></mona-grid-cell>\n </td>\n }\n @if (gridService.contextMenuItems().length !== 0) {\n <ng-container\n [ngTemplateOutlet]=\"contextMenuTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row.data, element: rowElement, index: $index }\">\n </ng-container>\n }\n </tr>\n @if (gridRow.expanded()) {\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"0\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n <td monaGridCell [masterDetailContent]=\"true\" [attr.colspan]=\"columns().length\">\n <ng-container\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row.data }\"></ng-container>\n </td>\n </tr>\n }\n }\n } @else {\n @for (viewRow of flattenedGroupedRows(); track $index) {\n @let rowIndex = $index;\n @if (viewRow.type === \"group\") {\n @let isCollapsed = gridService.isGroupCollapsed(viewRow.groupKey);\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\n\n <tr\n [class]=\"groupRowClass()\"\n role=\"row\"\n [attr.aria-level]=\"viewRow.depth + 1\"\n [attr.aria-expanded]=\"!isCollapsed\">\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth; track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @let colspan =\n columns().length +\n gridService.groupColumns().length +\n (gridService.masterDetailTemplate() ? 1 : 0) +\n (gridService.selectionColumnVisible() ? 1 : 0) -\n viewRow.depth +\n 1;\n\n <td\n monaGridCell\n monaGridLogicalCell\n [cellKind]=\"'group'\"\n [rowIndex]=\"rowIndex\"\n [colIndex]=\"0\"\n [section]=\"'body'\"\n [grouped]=\"true\"\n [groupHeader]=\"true\"\n [prevRowType]=\"prevRow?.type\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0\"\n [groupKey]=\"viewRow.groupKey\"\n (toggle)=\"onGroupExpandChange(viewRow.groupKey)\"\n [attr.colspan]=\"colspan\">\n <p class=\"flex h-full items-center text-sm whitespace-nowrap\">\n <mona-grid-toggle\n [expanded]=\"!isCollapsed\"\n [width]=\"gridService.groupColumnWidth\"\n [type]=\"'group'\"\n (expandedChange)=\"onGroupExpandChange(viewRow.groupKey)\"></mona-grid-toggle>\n <span class=\"font-bold\">{{ viewRow.title }}: {{ viewRow.groupValue }}</span>\n </p>\n </td>\n </tr>\n } @else if (viewRow.type === \"groupFooter\") {\n <tr role=\"row\" [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 @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of columns(); 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\"\n [groupKey]=\"viewRow.groupAggregate.groupKey\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n } @else {\n @let nextRow = flattenedGroupedRows()[rowIndex + 1];\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\n <tr\n (click)=\"onGridRowClick($event, viewRow.row)\"\n monaGridRow\n [index]=\"rowIndex\"\n [row]=\"viewRow.row\"\n #gridRow=\"monaGridRow\"\n #rowElement>\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"\n gridService.groupColumns().length * gridService.groupColumnWidth\n \"\n [grouped]=\"true\"\n [masterDetailToggle]=\"true\"\n [prevRowType]=\"prevRow?.type\"\n [nextRowType]=\"nextRow?.type\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"viewRow.row.uid\"\n [section]=\"'body'\"\n [cellKind]=\"'detail'\"\n [colIndex]=\"0\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0 && !gridService.selectionColumnVisible()\"\n [style.width.px]=\"gridService.detailColumnWidth\">\n <span class=\"flex h-full w-full items-stretch justify-center\">\n <mona-grid-toggle\n [expanded]=\"gridRow.expanded()\"\n [type]=\"'detail'\"\n [width]=\"gridService.detailColumnWidth\"\n (expandedChange)=\"onToggleDetailClick(viewRow.row)\"></mona-grid-toggle>\n </span>\n </td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [grouped]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [prevRowType]=\"prevRow?.type\"\n [nextRowType]=\"nextRow?.type\"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"viewRow.row.uid\"\n [section]=\"'body'\"\n [colIndex]=\"gridService.masterDetailTemplate() ? 1 : 0\"\n [firstInRow]=\"!gridService.masterDetailTemplate()\"\n [lastInRow]=\"columns().length === 0\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n <mona-grid-selection-checkbox [row]=\"viewRow.row\" [rowIndex]=\"rowIndex\" />\n </td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [grouped]=\"true\"\n [dataCell]=\"true\"\n [prevRowType]=\"prevRow?.type\"\n [nextRowType]=\"nextRow?.type\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [editable]=\"\n gridService.editableOptions().enabled === true &&\n gridService.editableOptions().mode === 'cell' &&\n column.kind === 'data' &&\n column.editable === true\n \"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() + columns().length - 1\n \"\n [rowIndex]=\"rowIndex\"\n [rowUid]=\"viewRow.row.uid\"\n [section]=\"'body'\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\"\n (edit)=\"gridCell.handleLogicalCellEnter()\">\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"viewRow.row\"></mona-grid-cell>\n </td>\n }\n @if (gridService.contextMenuItems().length !== 0) {\n <ng-container\n [ngTemplateOutlet]=\"contextMenuTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: viewRow.row.data,\n element: rowElement,\n index: rowIndex\n }\">\n </ng-container>\n }\n </tr>\n @if (gridRow.expanded()) {\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth + 1; track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @let colspan = columns().length + gridService.groupColumns().length - 1;\n <td\n monaGridDetailIndentCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"(viewRow.depth + 1) * gridService.groupColumnWidth\"\n [nextRowType]=\"nextRow?.type\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.selectionColumnOffset()\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n <td monaGridDetailContentCell [nextRowType]=\"nextRow?.type\" [attr.colspan]=\"colspan\">\n <ng-container\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: viewRow.row.data }\"></ng-container>\n </td>\n </tr>\n }\n }\n }\n }\n </tbody>\n</table>\n\n<ng-template let-rowData let-element=\"element\" let-rowIndex=\"index\" #contextMenuTemplate>\n <mona-contextmenu [target]=\"element\" [items]=\"gridService.contextMenuItems()\"></mona-contextmenu>\n <!-- [context]=\"{rowData, element, rowIndex}\"-->\n</ng-template>\n" }]
|
|
119
|
-
}], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
120
|
-
|
|
121
|
-
export { GridListComponent };
|
|
122
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-QqUUL60F.mjs.map
|