@nanahoshi/mona-ui 0.8.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-check-box.mjs +8 -11
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-BbBPZj7t.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-CJmjLl7R.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BkISJoqL.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-QDo6TweF.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-DE3ffsva.mjs} +120 -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-DWzYyGnb.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DaOemy_G.mjs} +534 -81
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-check-box.d.ts +1 -2
- package/types/nanahoshi-mona-ui-grid.d.ts +172 -17
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DReEfWfG.mjs +0 -121
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BCIs_lmz.mjs +0 -231
|
@@ -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
|
@@ -103,9 +103,8 @@ declare class CheckBoxComponent implements CheckboxVariantInput, CheckmarkVarian
|
|
|
103
103
|
* @default ""
|
|
104
104
|
*/
|
|
105
105
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
106
|
-
protected onCheckedChange(checked: boolean): void;
|
|
107
|
-
protected onInputChange(event: Event): void;
|
|
108
106
|
protected onInputBlur(event: FocusEvent): void;
|
|
107
|
+
protected onInputChange(event: Event): void;
|
|
109
108
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckBoxComponent, never>;
|
|
110
109
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckBoxComponent, "mona-check-box", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelSize": { "alias": "labelSize"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "inputBlur": "inputBlur"; "inputChange": "inputChange"; "inputFocus": "inputFocus"; "touch": "touch"; }, never, ["*"], true, never>;
|
|
111
110
|
}
|
|
@@ -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';
|
|
@@ -202,8 +202,58 @@ interface GridRemoveEventOptions {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
interface SelectableOptions {
|
|
205
|
+
/**
|
|
206
|
+
* Enables row selection.
|
|
207
|
+
*/
|
|
205
208
|
enabled?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Controls whether one or multiple rows can be selected.
|
|
211
|
+
*
|
|
212
|
+
* @default "single"
|
|
213
|
+
*/
|
|
206
214
|
mode?: "single" | "multiple";
|
|
215
|
+
/**
|
|
216
|
+
* Derives the accessible label for a row's selection checkbox from its data.
|
|
217
|
+
*
|
|
218
|
+
* When omitted, the checkbox falls back to a positional label (e.g. "Select row 3").
|
|
219
|
+
*/
|
|
220
|
+
rowAriaLabel?: (rowData: Record<PropertyKey, unknown>) => string;
|
|
221
|
+
/**
|
|
222
|
+
* Determines which rows are affected by the header checkbox.
|
|
223
|
+
*
|
|
224
|
+
* - "page": rows on the current paginated page
|
|
225
|
+
* - "view": all rows in the current filtered and sorted view
|
|
226
|
+
*
|
|
227
|
+
* For virtual scrolling, "page" resolves to the complete current view
|
|
228
|
+
* because virtual scrolling does not have logical pages.
|
|
229
|
+
*
|
|
230
|
+
* @default "page"
|
|
231
|
+
*/
|
|
232
|
+
selectAllScope?: "page" | "view";
|
|
233
|
+
/**
|
|
234
|
+
* Whether clicking the row itself changes selection.
|
|
235
|
+
*
|
|
236
|
+
* Off by default so that clicking a row to interact with its content (a link, a button,
|
|
237
|
+
* an editable cell) never silently discards the current selection. Set this to true to
|
|
238
|
+
* also select rows via a plain click, in addition to checkboxes or application code.
|
|
239
|
+
*
|
|
240
|
+
* @default false
|
|
241
|
+
*/
|
|
242
|
+
selectOnRowClick?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Displays the built-in checkbox selection column.
|
|
245
|
+
*
|
|
246
|
+
* @default false
|
|
247
|
+
*/
|
|
248
|
+
showCheckboxes?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Displays a select-all checkbox in the selection-column header.
|
|
251
|
+
*
|
|
252
|
+
* Only applies to multiple-selection mode.
|
|
253
|
+
*
|
|
254
|
+
* @default true
|
|
255
|
+
*/
|
|
256
|
+
showSelectAll?: boolean;
|
|
207
257
|
}
|
|
208
258
|
|
|
209
259
|
interface GroupDescriptor {
|
|
@@ -295,8 +345,6 @@ interface EditableOptions {
|
|
|
295
345
|
schema?: GridEditSchemaFactory;
|
|
296
346
|
}
|
|
297
347
|
|
|
298
|
-
type GridKeySelector<TData, TKey = unknown> = string | Selector<TData, TKey> | null;
|
|
299
|
-
|
|
300
348
|
declare class GridEditableDirective {
|
|
301
349
|
#private;
|
|
302
350
|
/**
|
|
@@ -328,17 +376,13 @@ declare class GridEditableDirective {
|
|
|
328
376
|
* @description Emitted when a row edit is committed (row mode only).
|
|
329
377
|
*/
|
|
330
378
|
readonly rowEdit: _angular_core.OutputEmitterRef<RowEditEvent>;
|
|
331
|
-
/**
|
|
332
|
-
* @description Field name or selector used to keep edited row identity stable when data is rebound.
|
|
333
|
-
*/
|
|
334
|
-
readonly rowKey: _angular_core.InputSignal<GridKeySelector<unknown>>;
|
|
335
379
|
/**
|
|
336
380
|
* @description Emitted before an edited or new row is saved.
|
|
337
381
|
*/
|
|
338
382
|
readonly save: _angular_core.OutputEmitterRef<GridSaveEvent>;
|
|
339
383
|
constructor();
|
|
340
384
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridEditableDirective, never>;
|
|
341
|
-
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>;
|
|
342
386
|
}
|
|
343
387
|
|
|
344
388
|
declare class GridFilterableDirective {
|
|
@@ -454,6 +498,65 @@ declare class GridResizableDirective {
|
|
|
454
498
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridResizableDirective, "mona-grid[monaGridResizable]", never, { "options": { "alias": "monaGridResizable"; "required": false; "isSignal": true; }; }, { "columnResize": "columnResize"; }, never, never, true, never>;
|
|
455
499
|
}
|
|
456
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
|
+
|
|
457
560
|
declare class GridSelectableDirective {
|
|
458
561
|
#private;
|
|
459
562
|
/**
|
|
@@ -718,6 +821,8 @@ interface ColumnFilterState {
|
|
|
718
821
|
filterMenuValue?: FilterMenuValue;
|
|
719
822
|
}
|
|
720
823
|
|
|
824
|
+
type GridKeySelector<TData, TKey = unknown> = string | Selector<TData, TKey> | null;
|
|
825
|
+
|
|
721
826
|
type ResizeMethod = "auto" | "fitView" | number;
|
|
722
827
|
|
|
723
828
|
interface ColumnSortState {
|
|
@@ -769,6 +874,13 @@ interface PaginationState {
|
|
|
769
874
|
readonly take: number;
|
|
770
875
|
}
|
|
771
876
|
|
|
877
|
+
type StructuralColumnKind = "detail" | "reorder" | "selection";
|
|
878
|
+
interface StructuralColumnDescriptor {
|
|
879
|
+
readonly kind: StructuralColumnKind;
|
|
880
|
+
readonly visible: boolean;
|
|
881
|
+
readonly width: number;
|
|
882
|
+
}
|
|
883
|
+
|
|
772
884
|
interface RowEditDataItem extends Record<string, unknown> {
|
|
773
885
|
readonly $rowId: string;
|
|
774
886
|
}
|
|
@@ -777,6 +889,7 @@ declare class GridService {
|
|
|
777
889
|
readonly addRowData: _angular_core.Signal<Record<PropertyKey, unknown> | null>;
|
|
778
890
|
readonly addRowVisible: _angular_core.Signal<boolean>;
|
|
779
891
|
readonly add$: Subject<GridAddEvent>;
|
|
892
|
+
readonly allBulkSelectionRowsSelected: _angular_core.Signal<boolean>;
|
|
780
893
|
readonly aggregateColumns: _angular_core.Signal<ImmutableList<Column>>;
|
|
781
894
|
readonly aggregateMap: _angular_core.Signal<ImmutableDictionary<string, GridAggregateBucket>>;
|
|
782
895
|
readonly aggregateRows: _angular_core.Signal<Record<PropertyKey, unknown>[]>;
|
|
@@ -785,6 +898,7 @@ declare class GridService {
|
|
|
785
898
|
readonly appliedSorts: _angular_core.WritableSignal<ImmutableDictionary<string, ColumnSortState>>;
|
|
786
899
|
readonly bodyScrollElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
787
900
|
readonly bodyTableElement: _angular_core.WritableSignal<HTMLTableElement | null>;
|
|
901
|
+
readonly bulkSelectionRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
788
902
|
readonly cellEdit$: Subject<CellEditEvent>;
|
|
789
903
|
readonly cancel$: Subject<GridCancelEvent>;
|
|
790
904
|
/** Set of currently collapsed group keys (global, shared by both paginated and virtual list). */
|
|
@@ -795,15 +909,16 @@ declare class GridService {
|
|
|
795
909
|
readonly columns: _angular_core.WritableSignal<ImmutableList<Column>>;
|
|
796
910
|
readonly contextMenuItems: _angular_core.WritableSignal<ImmutableSet<PopupMenuItem>>;
|
|
797
911
|
readonly detailColumnWidth = 36;
|
|
912
|
+
readonly detailColumnOffset: _angular_core.Signal<number>;
|
|
913
|
+
readonly detailStructuralWidth: _angular_core.Signal<0 | 36>;
|
|
798
914
|
readonly editBaseDict: _angular_core.Signal<ImmutableDictionary<string, RowEditDataItem>>;
|
|
799
915
|
readonly editContext: _angular_core.Signal<GridEditContext | null>;
|
|
800
916
|
readonly edit$: Subject<GridEditEvent>;
|
|
801
917
|
readonly editViewDict: _angular_core.Signal<ImmutableDictionary<string, RowEditDataItem>>;
|
|
802
918
|
readonly editSession: _angular_core.Signal<GridEditSession | null>;
|
|
803
919
|
readonly editableOptions: _angular_core.WritableSignal<EditableOptions>;
|
|
804
|
-
readonly editableRowKey: _angular_core.WritableSignal<GridKeySelector<unknown>>;
|
|
805
920
|
readonly editingRowUid: _angular_core.Signal<string | null>;
|
|
806
|
-
readonly expandedKeys: _angular_core.WritableSignal<ImmutableSet<
|
|
921
|
+
readonly expandedKeys: _angular_core.WritableSignal<ImmutableSet<string>>;
|
|
807
922
|
readonly filterChange$: Subject<CompositeFilterDescriptor[]>;
|
|
808
923
|
readonly filterableOptions: _angular_core.Signal<FilterableOptions>;
|
|
809
924
|
readonly footerScrollElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
@@ -811,6 +926,7 @@ declare class GridService {
|
|
|
811
926
|
readonly groupAggregateMap: _angular_core.Signal<ImmutableDictionary<string, GridGroupAggregate>>;
|
|
812
927
|
readonly groupColumnWidth = 36;
|
|
813
928
|
readonly groupColumns: _angular_core.Signal<ImmutableList<Column>>;
|
|
929
|
+
readonly groupStructuralWidth: _angular_core.Signal<number>;
|
|
814
930
|
readonly groupableOptions: _angular_core.WritableSignal<GroupableOptions>;
|
|
815
931
|
readonly hasLeftLockedColumns: _angular_core.Signal<boolean>;
|
|
816
932
|
readonly hasFooter: _angular_core.Signal<boolean>;
|
|
@@ -818,8 +934,12 @@ declare class GridService {
|
|
|
818
934
|
readonly headerTableElement: _angular_core.WritableSignal<HTMLTableElement | null>;
|
|
819
935
|
readonly horizontalScrollLeft: _angular_core.Signal<number>;
|
|
820
936
|
readonly isInEditMode: _angular_core.Signal<boolean>;
|
|
937
|
+
readonly lastLeftStructuralOffset: _angular_core.Signal<number | null>;
|
|
821
938
|
readonly leftLockedStructuralWidth: _angular_core.Signal<number>;
|
|
822
939
|
readonly lockedColumnStates: _angular_core.Signal<ReadonlyMap<string, GridLockedColumnState>>;
|
|
940
|
+
readonly leadingStructuralWidth: _angular_core.Signal<number>;
|
|
941
|
+
readonly leadingStructuralColumnCount: _angular_core.Signal<number>;
|
|
942
|
+
readonly leadingLogicalColumnCount: _angular_core.Signal<number>;
|
|
823
943
|
readonly masterDetailEmptyCellWidth: _angular_core.Signal<number>;
|
|
824
944
|
readonly masterDetailRowWidth: _angular_core.Signal<number>;
|
|
825
945
|
readonly masterDetailTemplate: _angular_core.WritableSignal<TemplateRef<unknown> | null>;
|
|
@@ -828,9 +948,20 @@ declare class GridService {
|
|
|
828
948
|
readonly remove$: Subject<GridRemoveEvent>;
|
|
829
949
|
readonly reorderableOptions: _angular_core.Signal<ReorderableOptions>;
|
|
830
950
|
readonly resizableOptions: _angular_core.Signal<ResizableOptions>;
|
|
951
|
+
readonly rowDragInProgress: _angular_core.Signal<boolean>;
|
|
831
952
|
readonly rowEdit$: Subject<RowEditEvent>;
|
|
832
|
-
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>>;
|
|
833
963
|
readonly save$: Subject<GridSaveEvent>;
|
|
964
|
+
readonly draggingRowUid: _angular_core.WritableSignal<string | null>;
|
|
834
965
|
readonly scrollEnd$: Subject<void>;
|
|
835
966
|
readonly scrollEndThreshold: _angular_core.WritableSignal<number>;
|
|
836
967
|
readonly scrollbarGutterWidth: _angular_core.Signal<number>;
|
|
@@ -840,18 +971,28 @@ declare class GridService {
|
|
|
840
971
|
readonly selectedKeysChange$: rxjs.Observable<ImmutableSet<unknown>>;
|
|
841
972
|
readonly selectedKeysLoad$: BehaviorSubject<ImmutableSet<unknown>>;
|
|
842
973
|
readonly selectedRows: _angular_core.Signal<ImmutableSet<Row>>;
|
|
974
|
+
readonly selectionColumnWidth = 40;
|
|
975
|
+
readonly selectionColumnVisible: _angular_core.Signal<boolean>;
|
|
976
|
+
readonly selectionColumnOffset: _angular_core.Signal<number>;
|
|
977
|
+
readonly selectionStructuralWidth: _angular_core.Signal<0 | 40>;
|
|
978
|
+
readonly someBulkSelectionRowsSelected: _angular_core.Signal<boolean>;
|
|
843
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>;
|
|
844
983
|
readonly tableWidth: _angular_core.Signal<number | null>;
|
|
845
|
-
readonly viewPageRows: _angular_core.Signal<
|
|
984
|
+
readonly viewPageRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
846
985
|
readonly viewRowCount: _angular_core.Signal<number>;
|
|
847
|
-
readonly viewRows: _angular_core.Signal<
|
|
986
|
+
readonly viewRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
848
987
|
readonly virtualGridMaxBuffer: _angular_core.Signal<number>;
|
|
849
988
|
readonly virtualGridMinBuffer: _angular_core.WritableSignal<number>;
|
|
850
989
|
readonly virtualScrollOptions: _angular_core.WritableSignal<VirtualScrollOptions>;
|
|
851
990
|
readonly visibleColumns: _angular_core.Signal<ImmutableList<Column>>;
|
|
991
|
+
readonly visibleStructuralColumns: _angular_core.Signal<StructuralColumnDescriptor[]>;
|
|
852
992
|
constructor();
|
|
853
993
|
addGroupColumn(column: Column): void;
|
|
854
994
|
applyState(state: GridState | null, options?: GridStatePersistenceOptions): GridStateLoadResult;
|
|
995
|
+
canReorderRow(row: Row): boolean;
|
|
855
996
|
cancelAddRow(originalEvent?: Event): boolean;
|
|
856
997
|
cancelEdit(originalEvent?: Event): boolean;
|
|
857
998
|
captureState(options?: GridStatePersistenceOptions): GridState;
|
|
@@ -859,17 +1000,18 @@ declare class GridService {
|
|
|
859
1000
|
clearColumnGrouping(column: Column): void;
|
|
860
1001
|
commitRowEdit(originalEvent?: Event): boolean;
|
|
861
1002
|
deselectAllRows(): void;
|
|
1003
|
+
deselectRow(row: Row): void;
|
|
862
1004
|
findTextWidthOfColumn(column: Column, element: HTMLTableCellElement): number;
|
|
863
1005
|
getColumnStateId(column: Column): string | null;
|
|
864
1006
|
getColumnWidth(column: Column): number;
|
|
865
1007
|
getGroupDescriptors(columns: Iterable<Column>): GroupDescriptor[];
|
|
1008
|
+
getRowReorderAriaLabel(row: Row, absoluteIndex: number): string;
|
|
866
1009
|
handleMultipleSelection(event: MouseEvent, row: Row): void;
|
|
867
1010
|
handleRowClick(event: MouseEvent, row: Row): void;
|
|
868
1011
|
handleSingleSelection(event: MouseEvent, row: Row): void;
|
|
869
1012
|
isGroupCollapsed(groupKey: string): boolean;
|
|
870
1013
|
isRowExpanded(row: Row): boolean;
|
|
871
1014
|
isRowSelected(row: Row): boolean;
|
|
872
|
-
isSelectableGrid(): boolean;
|
|
873
1015
|
loadFilters(filters: CompositeFilterDescriptor[]): void;
|
|
874
1016
|
loadGroupColumns(descriptors: Iterable<GroupDescriptor>): void;
|
|
875
1017
|
loadSelectedKeys(selectedKeys: Iterable<unknown>): void;
|
|
@@ -879,9 +1021,11 @@ declare class GridService {
|
|
|
879
1021
|
patchAddCell(field: string, value: unknown): void;
|
|
880
1022
|
patchCellEdit(rowUid: string, field: string, value: unknown): void;
|
|
881
1023
|
removeRow(row: Row, originalEvent?: Event): boolean;
|
|
1024
|
+
requestRowReorder(row: Row, previousPageIndex: number, currentPageIndex: number): boolean;
|
|
882
1025
|
resolveAggregateValue(bucket: GridAggregateBucket | null, aggregateFunction: AggregateFunction | null): unknown;
|
|
883
1026
|
saveAddRow(originalEvent?: Event): boolean;
|
|
884
1027
|
selectRow(row: Row): void;
|
|
1028
|
+
setBulkSelection(selected: boolean): void;
|
|
885
1029
|
setCalculatedWidth(columnId: string, value: number | null): void;
|
|
886
1030
|
setCalculatedWidths(widthByColumnId: ReadonlyMap<string, number | null>): void;
|
|
887
1031
|
setColumnDefinitions(configs: readonly ColumnConfig[]): void;
|
|
@@ -900,8 +1044,10 @@ declare class GridService {
|
|
|
900
1044
|
setReorderableOptions(options: Partial<ReorderableOptions>): void;
|
|
901
1045
|
setResizableOptions(options: Partial<ResizableOptions>): void;
|
|
902
1046
|
setRowExpanded(row: Row, expanded: boolean): void;
|
|
1047
|
+
setRowReorderableOptions(options: RowReorderableOptions): void;
|
|
903
1048
|
setRows(value: Iterable<Record<PropertyKey, unknown>>, rowKey?: GridKeySelector<unknown> | null): void;
|
|
904
1049
|
setSelectableOptions(options: SelectableOptions): void;
|
|
1050
|
+
setRowSelected(row: Row, selected: boolean): void;
|
|
905
1051
|
setSortableOptions(options: Partial<SortableOptions>): void;
|
|
906
1052
|
setScrollEndThreshold(threshold: number): void;
|
|
907
1053
|
setVirtualScrollOptions(options: VirtualScrollOptions): void;
|
|
@@ -909,6 +1055,7 @@ declare class GridService {
|
|
|
909
1055
|
startCellEdit(uid: string, row: Row, column: Column, originalEvent?: Event): boolean;
|
|
910
1056
|
startRowEdit(row: Row, originalEvent?: Event): boolean;
|
|
911
1057
|
stopCellEdit(originalEvent?: Event): boolean;
|
|
1058
|
+
structuralColumnOffset(kind: StructuralColumnKind, groupPrefixWidth: number): number;
|
|
912
1059
|
toggleGroupCollapse(groupKey: string): void;
|
|
913
1060
|
updateColumn(columnId: string, patch: Partial<Omit<Column, "id">>): void;
|
|
914
1061
|
private applyColumnIndexes;
|
|
@@ -933,6 +1080,7 @@ declare class GridService {
|
|
|
933
1080
|
private measureFallbackScrollbarGutter;
|
|
934
1081
|
private orderColumnsByLockBucket;
|
|
935
1082
|
private reconcileColumn;
|
|
1083
|
+
private selectRowRange;
|
|
936
1084
|
private clearEditSession;
|
|
937
1085
|
private createEditSession;
|
|
938
1086
|
private patchSessionField;
|
|
@@ -952,6 +1100,7 @@ declare class GridService {
|
|
|
952
1100
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridService, never>;
|
|
953
1101
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GridService>;
|
|
954
1102
|
}
|
|
1103
|
+
type RowReorderDisabledReason = "disabled" | "editing" | "filtered" | "grouped" | "single-row" | "sorted" | "virtual-scroll" | null;
|
|
955
1104
|
|
|
956
1105
|
declare const gridBaseThemeVariants: (props?: ({
|
|
957
1106
|
rounded?: "small" | "none" | "medium" | "large" | null | undefined;
|
|
@@ -1053,6 +1202,12 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1053
1202
|
* @default "fitView"
|
|
1054
1203
|
*/
|
|
1055
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>>;
|
|
1056
1211
|
/**
|
|
1057
1212
|
* @description Whether the pager is responsive.
|
|
1058
1213
|
* If set to `true`, the pager will be displayed as a dropdown when the grid width gets smaller.
|
|
@@ -1106,8 +1261,8 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1106
1261
|
private setResizeObserver;
|
|
1107
1262
|
private syncToolbarFocusTargets;
|
|
1108
1263
|
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; }; }, {}, ["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>;
|
|
1110
1265
|
}
|
|
1111
1266
|
|
|
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 };
|
|
1113
|
-
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 };
|