@nanahoshi/mona-ui 0.9.0 → 0.11.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-combo-box.mjs +53 -25
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +53 -24
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-D05Rq7-1.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-C86jzKCU.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-D_GxIU2u.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-C9VBe6IU.mjs +145 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DvuQvc7E.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-BpgLVr6a.mjs} +79 -6
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-9f5wNcOJ.mjs +233 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-RQvhjBse.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CChyqXg7.mjs} +329 -55
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +24 -21
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +46 -12
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +2 -2
- package/types/nanahoshi-mona-ui-combo-box.d.ts +26 -10
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +25 -9
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +3 -3
- package/types/nanahoshi-mona-ui-grid.d.ts +107 -17
- package/types/nanahoshi-mona-ui-internal-list.d.ts +13 -4
- package/types/nanahoshi-mona-ui-multi-select.d.ts +26 -10
- 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
|
@@ -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 };
|
|
@@ -122,7 +122,7 @@ declare class ListService<TData> {
|
|
|
122
122
|
readonly selectedListItems: _angular_core.Signal<ImmutableSet<ListItem<TData>>>;
|
|
123
123
|
readonly selectionChange$: Subject<ListItem<TData>>;
|
|
124
124
|
readonly textField: _angular_core.WritableSignal<string | Selector<TData, string>>;
|
|
125
|
-
readonly valueField: _angular_core.WritableSignal<string | Selector<TData,
|
|
125
|
+
readonly valueField: _angular_core.WritableSignal<string | Selector<TData, unknown>>;
|
|
126
126
|
readonly viewItems: _angular_core.Signal<ImmutableSet<ListItem<TData>>>;
|
|
127
127
|
readonly virtualScrollOptions: _angular_core.WritableSignal<VirtualScrollOptions>;
|
|
128
128
|
readonly itemPositions: _angular_core.Signal<Map<string, {
|
|
@@ -133,6 +133,16 @@ declare class ListService<TData> {
|
|
|
133
133
|
position: number;
|
|
134
134
|
total: number;
|
|
135
135
|
} | null;
|
|
136
|
+
/**
|
|
137
|
+
* Resolves the selection value of a data item through `valueField`.
|
|
138
|
+
*
|
|
139
|
+
* When no `valueField` is configured, the data item itself is the value.
|
|
140
|
+
* When `valueField` is a string, the item property is read with a nullish fallback to the item.
|
|
141
|
+
* When `valueField` is a function, its result is used as-is.
|
|
142
|
+
*
|
|
143
|
+
* Falsy results such as `0`, `false`, and `""` are valid values and do not fall back to the item.
|
|
144
|
+
*/
|
|
145
|
+
getDataItemValue(dataItem: TData): unknown;
|
|
136
146
|
clearFilter(): void;
|
|
137
147
|
clearHighlightedItem(): void;
|
|
138
148
|
clearSelections(): void;
|
|
@@ -161,12 +171,11 @@ declare class ListService<TData> {
|
|
|
161
171
|
setPageableOptions(settings: PagerSettings): void;
|
|
162
172
|
setSelectableOptions(options: Partial<SelectableOptions>): void;
|
|
163
173
|
setSelectedDataItems(dataItems: Iterable<TData>): void;
|
|
164
|
-
setSelectedKeys(selectedKeys: Iterable<
|
|
174
|
+
setSelectedKeys(selectedKeys: Iterable<unknown>): void;
|
|
165
175
|
setTextField(textField: string | Selector<TData, string>): void;
|
|
166
|
-
setValueField(valueField: string | Selector<TData,
|
|
176
|
+
setValueField(valueField: string | Selector<TData, unknown>): void;
|
|
167
177
|
setVirtualScrollOptions(options: VirtualScrollOptions): void;
|
|
168
178
|
private filterItem;
|
|
169
|
-
private getDataItemSelectionKey;
|
|
170
179
|
private getOrderKey;
|
|
171
180
|
private getPreviousItemForNavigation;
|
|
172
181
|
private getSelectionKey;
|
|
@@ -36,7 +36,7 @@ type MultiSelectIndicatorContainerVariantInput = VariantInputs<MultiSelectIndica
|
|
|
36
36
|
type MultiSelectVariantProps = MultiSelectBaseVariantProps & MultiSelectItemContainerVariantProps & MultiSelectAffixContainerVariantProps & MultiSelectIndicatorContainerVariantProps;
|
|
37
37
|
type MultiSelectVariantInput = Omit<MultiSelectBaseVariantInput, "focused" | "invalid"> & MultiSelectItemContainerVariantInput & MultiSelectAffixContainerVariantInput & MultiSelectIndicatorContainerVariantInput;
|
|
38
38
|
|
|
39
|
-
declare class MultiSelectComponent<TData = unknown> implements FormValueControl<Iterable<
|
|
39
|
+
declare class MultiSelectComponent<TData = unknown, TValue = TData> implements FormValueControl<Iterable<TValue>>, MultiSelectVariantInput, DropdownDataInput<TData>, DropdownPopupInput, DropdownPopupVariantInput {
|
|
40
40
|
#private;
|
|
41
41
|
protected readonly activeDescendant: _angular_core.Signal<string | null>;
|
|
42
42
|
protected readonly affixClass: _angular_core.Signal<string>;
|
|
@@ -168,7 +168,7 @@ declare class MultiSelectComponent<TData = unknown> implements FormValueControl<
|
|
|
168
168
|
* If null, the item itself will be used as the text representation.
|
|
169
169
|
* @default null
|
|
170
170
|
*/
|
|
171
|
-
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
171
|
+
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, string>>;
|
|
172
172
|
/**
|
|
173
173
|
* @description Emitted when the multi select is interacted with on blur, selection, remove, or clear.
|
|
174
174
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
@@ -187,18 +187,32 @@ declare class MultiSelectComponent<TData = unknown> implements FormValueControl<
|
|
|
187
187
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
188
188
|
/**
|
|
189
189
|
* @description Sets the value field of the multi select component.
|
|
190
|
-
* It
|
|
190
|
+
* It is used for stable item identity, matching externally supplied values, and primitive
|
|
191
|
+
* value projection when {@link valuePrimitive} is enabled.
|
|
192
|
+
* It can be null, string, or a function that takes an item and returns a value.
|
|
191
193
|
* If null, the item itself will be used as the value representation.
|
|
194
|
+
* Should resolve to a stable, unique scalar.
|
|
192
195
|
* @default null
|
|
193
196
|
*/
|
|
194
|
-
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
197
|
+
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, unknown>>;
|
|
198
|
+
/**
|
|
199
|
+
* @description Determines whether the bound value contains complete data items
|
|
200
|
+
* or values extracted through {@link valueField}.
|
|
201
|
+
*
|
|
202
|
+
* When `false`, selecting an item writes the complete data item.
|
|
203
|
+
* When `true`, selecting an item writes the value resolved through `valueField`.
|
|
204
|
+
*
|
|
205
|
+
* @default false
|
|
206
|
+
*/
|
|
207
|
+
readonly valuePrimitive: _angular_core.InputSignal<boolean>;
|
|
195
208
|
/**
|
|
196
|
-
* @description Two-way bindable current selected values. Implements `FormValueControl<Iterable<
|
|
197
|
-
* enabling signal forms `[formField]` binding.
|
|
198
|
-
*
|
|
209
|
+
* @description Two-way bindable current selected values. Implements `FormValueControl<Iterable<TValue>>`,
|
|
210
|
+
* enabling signal forms `[formField]` binding.
|
|
211
|
+
* Object mode contains selected data items; primitive mode (see {@link valuePrimitive}) contains values
|
|
212
|
+
* resolved through {@link valueField}. An empty selection is represented by an empty iterable/array.
|
|
199
213
|
* @default []
|
|
200
214
|
*/
|
|
201
|
-
readonly value: _angular_core.ModelSignal<Iterable<
|
|
215
|
+
readonly value: _angular_core.ModelSignal<Iterable<TValue>>;
|
|
202
216
|
constructor();
|
|
203
217
|
focus(): void;
|
|
204
218
|
protected onBlur(): void;
|
|
@@ -206,6 +220,7 @@ declare class MultiSelectComponent<TData = unknown> implements FormValueControl<
|
|
|
206
220
|
protected onSelectedItemRemove(event: Event, listItem: ListItem<TData>): void;
|
|
207
221
|
protected onSelectedItemGroupRemove(event: Event): void;
|
|
208
222
|
protected onValueClear(event: Event): void;
|
|
223
|
+
private getSelectedControlValues;
|
|
209
224
|
private handleEnterKey;
|
|
210
225
|
private handlePopupPositionUpdate;
|
|
211
226
|
private initialize;
|
|
@@ -213,9 +228,10 @@ declare class MultiSelectComponent<TData = unknown> implements FormValueControl<
|
|
|
213
228
|
private setEnterKeySubscription;
|
|
214
229
|
private setEventListeners;
|
|
215
230
|
private setSubscriptions;
|
|
231
|
+
private synchronizeSelection;
|
|
216
232
|
private updateValue;
|
|
217
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MultiSelectComponent<any>, never>;
|
|
218
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultiSelectComponent<any>, "mona-multi-select", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "autoClose": { "alias": "autoClose"; "required": false; "isSignal": true; }; "checkboxes": { "alias": "checkboxes"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "tagTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
233
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MultiSelectComponent<any, any>, never>;
|
|
234
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultiSelectComponent<any, any>, "mona-multi-select", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "autoClose": { "alias": "autoClose"; "required": false; "isSignal": true; }; "checkboxes": { "alias": "checkboxes"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "valuePrimitive": { "alias": "valuePrimitive"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "tagTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
219
235
|
}
|
|
220
236
|
|
|
221
237
|
declare class MultiSelectSummaryTagDirective<TData> {
|