@nanahoshi/mona-ui 0.24.5 → 0.24.7
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/README.md +2 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +196 -137
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +14 -4
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +164 -3
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +124 -140
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +205 -202
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +233 -231
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-BMCM0W8s.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-vXXNWmEN.mjs} +24 -12
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DDgNmgE0.mjs +208 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-Dzf6Vbs_.mjs +1100 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-C2kf5MwO.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DAPNqnWV.mjs} +34 -21
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Dh42tUui.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-B9rmDLq8.mjs} +2564 -927
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -8
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +3 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -8
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +195 -122
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +367 -463
- package/fesm2022/nanahoshi-mona-ui-query.mjs +317 -122
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +149 -167
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +182 -137
- package/i18n/catalogs/en-US.messages.json +36 -11
- package/locales/ar-sa/ar-sa.messages.json +33 -8
- package/locales/de-de/de-de.messages.json +33 -8
- package/locales/es-es/es-es.messages.json +33 -8
- package/locales/fr-fr/fr-fr.messages.json +33 -8
- package/locales/id-id/id-id.messages.json +33 -8
- package/locales/it-it/it-it.messages.json +33 -8
- package/locales/ja-jp/ja-jp.messages.json +33 -8
- package/locales/ko-kr/ko-kr.messages.json +33 -8
- package/locales/pt-br/pt-br.messages.json +33 -8
- package/locales/ru-ru/ru-ru.messages.json +33 -8
- package/locales/tr-tr/tr-tr.messages.json +33 -8
- package/locales/zh-cn/zh-cn.messages.json +33 -8
- package/locales/zh-tw/zh-tw.messages.json +33 -8
- package/package.json +2 -2
- package/types/nanahoshi-mona-ui-calendar.d.ts +30 -11
- package/types/nanahoshi-mona-ui-check-box.d.ts +11 -1
- package/types/nanahoshi-mona-ui-date-input.d.ts +74 -3
- package/types/nanahoshi-mona-ui-date-picker.d.ts +61 -33
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +79 -38
- package/types/nanahoshi-mona-ui-filter.d.ts +54 -32
- package/types/nanahoshi-mona-ui-grid.d.ts +359 -110
- package/types/nanahoshi-mona-ui-i18n.d.ts +47 -6
- package/types/nanahoshi-mona-ui-list-view.d.ts +1 -2
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +31 -6
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +31 -6
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +57 -16
- package/types/nanahoshi-mona-ui-pager.d.ts +159 -76
- package/types/nanahoshi-mona-ui-query.d.ts +45 -14
- package/types/nanahoshi-mona-ui-time-picker.d.ts +72 -42
- package/types/nanahoshi-mona-ui-time-selector.d.ts +78 -46
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-BSlV8Sua.mjs +0 -176
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-CTOdnH29.mjs +0 -946
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { DataType, PreventableEvent, VirtualScrollOptions } from '@nanahoshi/mona-ui/common';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { TemplateRef, WritableSignal,
|
|
3
|
+
import { TemplateRef, WritableSignal, ElementRef } from '@angular/core';
|
|
4
4
|
import { FieldTree, SchemaOrSchemaFn, ValidationError } from '@angular/forms/signals';
|
|
5
|
-
import { SortDirection, CompositeFilterDescriptor, SortDescriptor,
|
|
6
|
-
import
|
|
5
|
+
import { SortDirection, CompositeFilterDescriptor, SortDescriptor, FilterOperators, FilterLogic } from '@nanahoshi/mona-ui/query';
|
|
6
|
+
import { Selector, ImmutableDictionary, ImmutableList, ImmutableSet } from '@mirei/ts-collections';
|
|
7
7
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
8
|
-
import { CdkDropList, CdkDragEnter, CdkDragStart, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
|
-
import { PageChangeEvent
|
|
8
|
+
import { CdkDropList, CdkDragEnd, CdkDragEnter, CdkDragMove, CdkDragStart, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
|
+
import { PageChangeEvent } from '@nanahoshi/mona-ui/pager';
|
|
10
10
|
import { FilterMenuValue } from '@nanahoshi/mona-ui/filter';
|
|
11
|
-
import { Selector, ImmutableDictionary, ImmutableList, ImmutableSet } from '@mirei/ts-collections';
|
|
12
11
|
import * as rxjs from 'rxjs';
|
|
13
12
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
14
13
|
import { PopupMenuItem } from '@nanahoshi/mona-ui/popup-menu';
|
|
@@ -21,13 +20,31 @@ type AggregateFunction = "sum" | "avg" | "count" | "min" | "max" | "custom";
|
|
|
21
20
|
type GridColumnLockedPosition = "left" | "right";
|
|
22
21
|
|
|
23
22
|
type ColumnKind = "command" | "data";
|
|
24
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Formats a cell's value for display. Written in method form so a formatter typed for the column's own
|
|
25
|
+
* value (`(value: number) => string`) is accepted.
|
|
26
|
+
*/
|
|
27
|
+
type ColumnFormatFunction = {
|
|
28
|
+
format(value: unknown, row: Record<PropertyKey, unknown>, column: Column): string;
|
|
29
|
+
}["format"];
|
|
30
|
+
/** A date format string (date, datetime and time columns), or a formatter function. */
|
|
31
|
+
type ColumnFormat = string | ColumnFormatFunction;
|
|
32
|
+
/** Compares two cell values for sorting: negative, zero or positive, as for `Array.prototype.sort`. */
|
|
33
|
+
type ColumnSortComparator = {
|
|
34
|
+
compare(left: unknown, right: unknown): number;
|
|
35
|
+
}["compare"];
|
|
25
36
|
interface ColumnConfig {
|
|
26
37
|
readonly aggregate: AggregateFunction | null;
|
|
27
38
|
readonly cellTemplate: TemplateRef<unknown> | null;
|
|
28
39
|
readonly commandTemplate: TemplateRef<unknown> | null;
|
|
40
|
+
/**
|
|
41
|
+
* The `editable` input as the consumer set it; `null` leaves it to the default, which is every column but
|
|
42
|
+
* the `rowKey` field. Left out, `editable` is used as given.
|
|
43
|
+
*/
|
|
44
|
+
readonly configuredEditable?: boolean | null;
|
|
29
45
|
readonly dataType: DataType;
|
|
30
46
|
readonly editTemplate: TemplateRef<unknown> | null;
|
|
47
|
+
/** Whether the column can be edited. The grid resolves it from {@link configuredEditable} when that is set. */
|
|
31
48
|
readonly editable: boolean;
|
|
32
49
|
readonly field: string;
|
|
33
50
|
readonly filterable: boolean;
|
|
@@ -43,6 +60,8 @@ interface ColumnConfig {
|
|
|
43
60
|
readonly maxWidth: number | null;
|
|
44
61
|
readonly minWidth: number | null;
|
|
45
62
|
readonly removeConfirmation: boolean;
|
|
63
|
+
/** Compares values when the user sorts this column; without it values sort by type, strings by locale. */
|
|
64
|
+
readonly sortComparator?: ColumnSortComparator | null;
|
|
46
65
|
readonly sortable: boolean;
|
|
47
66
|
readonly stateKey: string | null;
|
|
48
67
|
readonly title: string;
|
|
@@ -140,16 +159,24 @@ interface GridSaveEventOptions {
|
|
|
140
159
|
session: GridEditSession;
|
|
141
160
|
}
|
|
142
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Why an edit is being canceled: `"command"` for the Cancel button or `cancel()` in a template, `"escape"` for
|
|
164
|
+
* the Escape key, `"switch"` when another edit or the add row starts, `"removed"` when the edited row left the
|
|
165
|
+
* data or the view. A `"removed"` cancel can't be prevented: the row is gone.
|
|
166
|
+
*/
|
|
167
|
+
type GridCancelReason = "command" | "escape" | "removed" | "switch";
|
|
143
168
|
declare class GridCancelEvent extends PreventableEvent {
|
|
144
169
|
#private;
|
|
145
170
|
constructor(options: GridCancelEventOptions);
|
|
146
171
|
get operation(): GridSaveOperation;
|
|
172
|
+
get reason(): GridCancelReason;
|
|
147
173
|
get rowData(): Record<PropertyKey, unknown>;
|
|
148
174
|
get session(): GridEditSession;
|
|
149
175
|
}
|
|
150
176
|
interface GridCancelEventOptions {
|
|
151
177
|
operation: GridSaveOperation;
|
|
152
178
|
originalEvent?: Event;
|
|
179
|
+
reason?: GridCancelReason;
|
|
153
180
|
rowData: Record<PropertyKey, unknown>;
|
|
154
181
|
session: GridEditSession;
|
|
155
182
|
}
|
|
@@ -197,9 +224,15 @@ interface GridEditTemplateContext {
|
|
|
197
224
|
declare class GridRemoveEvent extends PreventableEvent {
|
|
198
225
|
#private;
|
|
199
226
|
constructor(options: GridRemoveEventOptions);
|
|
227
|
+
/** The row's position in the grid's `data`, or -1 when it is no longer there. */
|
|
228
|
+
get index(): number;
|
|
229
|
+
/** The row's `rowKey` value, or the data item when the grid has no `rowKey`. */
|
|
230
|
+
get key(): unknown;
|
|
200
231
|
get rowData(): Record<PropertyKey, unknown>;
|
|
201
232
|
}
|
|
202
233
|
interface GridRemoveEventOptions {
|
|
234
|
+
index?: number;
|
|
235
|
+
key?: unknown;
|
|
203
236
|
originalEvent?: Event;
|
|
204
237
|
rowData: Record<PropertyKey, unknown>;
|
|
205
238
|
}
|
|
@@ -260,8 +293,8 @@ interface SelectableOptions {
|
|
|
260
293
|
}
|
|
261
294
|
|
|
262
295
|
interface GroupDescriptor {
|
|
263
|
-
field: string;
|
|
264
296
|
dir?: SortDirection;
|
|
297
|
+
field: string;
|
|
265
298
|
}
|
|
266
299
|
|
|
267
300
|
interface GroupableOptions {
|
|
@@ -279,6 +312,40 @@ type GridRowClassValue = string | readonly string[] | null | undefined;
|
|
|
279
312
|
/** Returns the classes to add to the data row that shows the given item. */
|
|
280
313
|
type GridRowClass<TData> = (data: TData) => GridRowClassValue;
|
|
281
314
|
|
|
315
|
+
/** The paging, sorting, and filtering requested by a server-bound Grid. */
|
|
316
|
+
interface GridDataState {
|
|
317
|
+
readonly filter: readonly CompositeFilterDescriptor[];
|
|
318
|
+
readonly skip: number;
|
|
319
|
+
readonly sort: readonly SortDescriptor[];
|
|
320
|
+
readonly take: number;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** The grid state and actions a toolbar template can use. */
|
|
324
|
+
interface GridToolbarContext {
|
|
325
|
+
/** The new row's values while a row is being added, otherwise `null`. */
|
|
326
|
+
readonly addRowData: Record<PropertyKey, unknown> | null;
|
|
327
|
+
/** Whether the add row is open. */
|
|
328
|
+
readonly addRowVisible: boolean;
|
|
329
|
+
/** Closes the add row without saving. Returns whether it closed. */
|
|
330
|
+
cancelAdd(): boolean;
|
|
331
|
+
/** Ends the current cell or row edit without saving. Returns whether an edit was cancelled. */
|
|
332
|
+
cancelEdit(): boolean;
|
|
333
|
+
/** The current paging, sorting and filtering. */
|
|
334
|
+
readonly dataState: GridDataState;
|
|
335
|
+
/** The current edit, or `null` when nothing is being edited. */
|
|
336
|
+
readonly editSession: GridEditSession | null;
|
|
337
|
+
/** Saves the add row. Returns whether it was saved. */
|
|
338
|
+
saveAdd(): boolean;
|
|
339
|
+
/** The selected row keys. */
|
|
340
|
+
readonly selectedKeys: readonly unknown[];
|
|
341
|
+
/** Opens the add row. Returns whether it opened. */
|
|
342
|
+
startAdd(): boolean;
|
|
343
|
+
}
|
|
344
|
+
/** Context of `monaGridToolbarTemplate`: the toolbar state, also as `$implicit`. */
|
|
345
|
+
interface GridToolbarTemplateContext extends GridToolbarContext {
|
|
346
|
+
readonly $implicit: GridToolbarContext;
|
|
347
|
+
}
|
|
348
|
+
|
|
282
349
|
interface SortableOptions {
|
|
283
350
|
allowUnsort?: boolean;
|
|
284
351
|
enabled?: boolean;
|
|
@@ -347,7 +414,15 @@ declare class GridEditTemplateDirective {
|
|
|
347
414
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridEditTemplateDirective, "ng-template[monaGridEditTemplate]", never, {}, {}, never, never, true, never>;
|
|
348
415
|
}
|
|
349
416
|
|
|
417
|
+
/** A row command button: Edit, Remove, Save or Cancel. */
|
|
418
|
+
type GridRowCommand = "cancel" | "edit" | "remove" | "save";
|
|
350
419
|
interface EditableOptions {
|
|
420
|
+
/**
|
|
421
|
+
* Returns the accessible name of a row's command button, such as "Edit order 10248". Without it the
|
|
422
|
+
* buttons are named by position ("Edit row 3"). `absoluteIndex` is the row's 0-based position in the
|
|
423
|
+
* filtered and sorted rows; the add row isn't passed here.
|
|
424
|
+
*/
|
|
425
|
+
commandAriaLabel?: (command: GridRowCommand, rowData: Record<PropertyKey, unknown>, absoluteIndex: number) => string;
|
|
351
426
|
enabled?: boolean;
|
|
352
427
|
mode: "cell" | "row";
|
|
353
428
|
schema?: GridEditSchemaFactory;
|
|
@@ -360,11 +435,13 @@ declare class GridEditableDirective {
|
|
|
360
435
|
*/
|
|
361
436
|
readonly add: _angular_core.OutputEmitterRef<GridAddEvent>;
|
|
362
437
|
/**
|
|
363
|
-
* @description Emitted before an edit operation is canceled.
|
|
438
|
+
* @description Emitted before an edit operation is canceled; `reason` says why. Prevent it to keep editing,
|
|
439
|
+
* except for `"removed"`, when the edited row left the data or the view.
|
|
364
440
|
*/
|
|
365
441
|
readonly cancel: _angular_core.OutputEmitterRef<GridCancelEvent>;
|
|
366
442
|
/**
|
|
367
|
-
* @description Emitted
|
|
443
|
+
* @description Emitted before a changed cell is saved in cell mode; not when the value didn't change.
|
|
444
|
+
* `rowData` is the row as it was; persist from `save`, whose `rowData` holds the edited values.
|
|
368
445
|
*/
|
|
369
446
|
readonly cellEdit: _angular_core.OutputEmitterRef<CellEditEvent>;
|
|
370
447
|
/**
|
|
@@ -377,18 +454,25 @@ declare class GridEditableDirective {
|
|
|
377
454
|
readonly newRowFactory: _angular_core.InputSignal<() => Record<PropertyKey, unknown>>;
|
|
378
455
|
readonly options: _angular_core.InputSignal<"" | EditableOptions>;
|
|
379
456
|
/**
|
|
380
|
-
* @description Emitted when a row remove command is triggered
|
|
457
|
+
* @description Emitted when a row remove command is triggered, with the row's `key` and `index`.
|
|
381
458
|
*/
|
|
382
459
|
readonly remove: _angular_core.OutputEmitterRef<GridRemoveEvent>;
|
|
383
460
|
/**
|
|
384
|
-
* @description Emitted
|
|
461
|
+
* @description Emitted after a changed row is saved (row mode only).
|
|
385
462
|
*/
|
|
386
463
|
readonly rowEdit: _angular_core.OutputEmitterRef<RowEditEvent>;
|
|
387
464
|
/**
|
|
388
|
-
* @description Emitted before an edited or new row is saved.
|
|
465
|
+
* @description Emitted before an edited or new row is saved; not when an edit changed nothing. `rowData`
|
|
466
|
+
* holds the edited values and `originalRowData` the row as it was. Prevent it to keep the editor open,
|
|
467
|
+
* for example while saving on the server, then call `endEdit()`.
|
|
389
468
|
*/
|
|
390
469
|
readonly save: _angular_core.OutputEmitterRef<GridSaveEvent>;
|
|
391
470
|
constructor();
|
|
471
|
+
/**
|
|
472
|
+
* Closes the current edit without reporting it, such as after a `save` that was prevented to save on the
|
|
473
|
+
* server has finished.
|
|
474
|
+
*/
|
|
475
|
+
endEdit(): void;
|
|
392
476
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridEditableDirective, never>;
|
|
393
477
|
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>;
|
|
394
478
|
}
|
|
@@ -396,15 +480,18 @@ declare class GridEditableDirective {
|
|
|
396
480
|
declare class GridFilterableDirective {
|
|
397
481
|
#private;
|
|
398
482
|
/**
|
|
399
|
-
* @description Current filter descriptors applied to the grid.
|
|
483
|
+
* @description Current filter descriptors applied to the grid. Conditions on one field show in that column's
|
|
484
|
+
* filter menu (repeated fields are combined with `and`); filters across fields, such as an `or` of two
|
|
485
|
+
* columns, are still applied and reported. Conditions with an unknown operator are ignored. Supports
|
|
486
|
+
* two-way binding.
|
|
400
487
|
* @default []
|
|
401
488
|
*/
|
|
402
489
|
readonly filter: _angular_core.ModelSignal<CompositeFilterDescriptor[]>;
|
|
403
490
|
/**
|
|
404
|
-
* @description Enables column filtering on the grid. Pass a `FilterableOptions` object to configure whether filters render in the header menu, a filter row, or both.
|
|
491
|
+
* @description Enables column filtering on the grid. Pass a `FilterableOptions` object to configure whether filters render in the header menu, a filter row, or both. Filtering is on unless the object sets `enabled: false`.
|
|
405
492
|
* @default ""
|
|
406
493
|
*/
|
|
407
|
-
readonly options: _angular_core.InputSignal<"" | FilterableOptions
|
|
494
|
+
readonly options: _angular_core.InputSignal<"" | Partial<FilterableOptions>>;
|
|
408
495
|
constructor();
|
|
409
496
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridFilterableDirective, never>;
|
|
410
497
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridFilterableDirective, "mona-grid[monaGridFilterable]", never, { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "options": { "alias": "monaGridFilterable"; "required": false; "isSignal": true; }; }, { "filter": "filterChange"; }, never, never, true, never>;
|
|
@@ -415,26 +502,23 @@ declare class GridFooterTemplateDirective {
|
|
|
415
502
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridFooterTemplateDirective, "ng-template[monaGridFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
416
503
|
}
|
|
417
504
|
|
|
418
|
-
declare class GridGroupableDirective
|
|
505
|
+
declare class GridGroupableDirective {
|
|
419
506
|
#private;
|
|
420
507
|
/**
|
|
421
|
-
* @description
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
* @description Current group descriptors applied to the grid.
|
|
508
|
+
* @description Current group descriptors applied to the grid. A repeated field keeps its last descriptor;
|
|
509
|
+
* a field without a column is grouped once its column appears. Supports two-way binding: `groupChange`
|
|
510
|
+
* emits after the user groups, ungroups, reorders or re-sorts groups, and after a grid state is restored,
|
|
511
|
+
* never for a value set here.
|
|
426
512
|
* @default []
|
|
427
513
|
*/
|
|
428
|
-
group: _angular_core.
|
|
514
|
+
readonly group: _angular_core.ModelSignal<GroupDescriptor[]>;
|
|
429
515
|
/**
|
|
430
|
-
* @description Enables column grouping on the grid. Pass a `GroupableOptions` object to configure group footer display.
|
|
516
|
+
* @description Enables column grouping on the grid. Pass a `GroupableOptions` object to configure group footer display. Grouping is on unless the object sets `enabled: false`.
|
|
431
517
|
*/
|
|
432
|
-
options: _angular_core.InputSignal<"" | GroupableOptions | undefined>;
|
|
518
|
+
readonly options: _angular_core.InputSignal<"" | Partial<GroupableOptions> | undefined>;
|
|
433
519
|
constructor();
|
|
434
|
-
ngOnInit(): void;
|
|
435
|
-
private setSubscriptions;
|
|
436
520
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridGroupableDirective, never>;
|
|
437
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridGroupableDirective, "mona-grid[monaGridGroupable]", never, { "group": { "alias": "group"; "required": false; "isSignal": true; }; "options": { "alias": "monaGridGroupable"; "required": false; "isSignal": true; }; }, { "
|
|
521
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridGroupableDirective, "mona-grid[monaGridGroupable]", never, { "group": { "alias": "group"; "required": false; "isSignal": true; }; "options": { "alias": "monaGridGroupable"; "required": false; "isSignal": true; }; }, { "group": "groupChange"; }, never, never, true, never>;
|
|
438
522
|
}
|
|
439
523
|
|
|
440
524
|
declare class GridGroupFooterTemplateDirective {
|
|
@@ -567,25 +651,28 @@ declare class GridRowReorderableDirective {
|
|
|
567
651
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridRowReorderableDirective, "mona-grid[monaGridRowReorderable]", never, { "options": { "alias": "monaGridRowReorderable"; "required": false; "isSignal": true; }; }, { "rowReorder": "rowReorder"; }, never, never, true, never>;
|
|
568
652
|
}
|
|
569
653
|
|
|
654
|
+
type GridKeySelector<TData, TKey = unknown> = string | Selector<TData, TKey> | null;
|
|
655
|
+
|
|
570
656
|
declare class GridSelectableDirective {
|
|
571
657
|
#private;
|
|
572
658
|
/**
|
|
573
|
-
* @description Enables row selection on the grid. Pass a `
|
|
659
|
+
* @description Enables row selection on the grid. Pass a `SelectableOptions` object to configure single or multiple selection mode. Selection is on unless the object sets `enabled: false`.
|
|
574
660
|
* @default ""
|
|
575
661
|
*/
|
|
576
662
|
readonly options: _angular_core.InputSignal<"" | SelectableOptions>;
|
|
577
663
|
/**
|
|
578
|
-
* @description Field name or
|
|
664
|
+
* @description Field name or function that gives a row's selection key. Without it, rows are selected by the
|
|
665
|
+
* grid's `rowKey` value, or by the data item when there's no `rowKey`.
|
|
579
666
|
* @default ""
|
|
580
667
|
*/
|
|
581
|
-
readonly selectBy: _angular_core.InputSignal<
|
|
668
|
+
readonly selectBy: _angular_core.InputSignal<GridKeySelector<unknown>>;
|
|
582
669
|
/**
|
|
583
670
|
* @description Currently selected row keys.
|
|
584
671
|
* @default []
|
|
585
672
|
*/
|
|
586
673
|
readonly selectedKeys: _angular_core.InputSignal<Iterable<unknown>>;
|
|
587
674
|
/**
|
|
588
|
-
* @description Emitted when the
|
|
675
|
+
* @description Emitted when the user changes the selection. Not emitted for a `selectedKeys` value set from code.
|
|
589
676
|
*/
|
|
590
677
|
readonly selectedKeysChange: _angular_core.OutputEmitterRef<unknown[]>;
|
|
591
678
|
constructor();
|
|
@@ -607,35 +694,29 @@ declare class GridSortableDirective {
|
|
|
607
694
|
*/
|
|
608
695
|
readonly columnSort: _angular_core.OutputEmitterRef<ColumnSortEvent>;
|
|
609
696
|
/**
|
|
610
|
-
* @description Enables column sorting on the grid. Pass a `SortableOptions` object to configure sort mode, unsort behavior, or sort-index display.
|
|
697
|
+
* @description Enables column sorting on the grid. Pass a `SortableOptions` object to configure sort mode, unsort behavior, or sort-index display. Sorting is on unless the object sets `enabled: false`.
|
|
611
698
|
* @default ""
|
|
612
699
|
*/
|
|
613
700
|
readonly options: _angular_core.InputSignal<"" | SortableOptions>;
|
|
614
701
|
/**
|
|
615
|
-
* @description Current sort descriptors applied to the grid.
|
|
702
|
+
* @description Current sort descriptors applied to the grid. Descriptors are kept even when no column shows
|
|
703
|
+
* the field, and a repeated field keeps its last descriptor. Supports two-way binding; a restored grid
|
|
704
|
+
* state updates it too.
|
|
616
705
|
* @default []
|
|
617
706
|
*/
|
|
618
|
-
readonly sort: _angular_core.ModelSignal<SortDescriptor<
|
|
707
|
+
readonly sort: _angular_core.ModelSignal<SortDescriptor<unknown>[]>;
|
|
619
708
|
constructor();
|
|
620
709
|
private applyColumnSort;
|
|
621
710
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridSortableDirective, never>;
|
|
622
711
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridSortableDirective, "mona-grid[monaGridSortable]", never, { "options": { "alias": "monaGridSortable"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; }, { "columnSort": "columnSort"; "sort": "sortChange"; }, never, never, true, never>;
|
|
623
712
|
}
|
|
624
713
|
|
|
625
|
-
/** The paging, sorting, and filtering requested by a server-bound Grid. */
|
|
626
|
-
interface GridDataState {
|
|
627
|
-
readonly filter: readonly CompositeFilterDescriptor[];
|
|
628
|
-
readonly skip: number;
|
|
629
|
-
readonly sort: readonly SortDescriptor[];
|
|
630
|
-
readonly take: number;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
714
|
declare class GridServerBindingDirective {
|
|
634
715
|
#private;
|
|
635
716
|
/** @description Emitted once per user paging, sorting, or filtering action with the requested server state. */
|
|
636
717
|
readonly dataStateChange: _angular_core.OutputEmitterRef<GridDataState>;
|
|
637
718
|
/** @description Shows a loading overlay while the application requests server data. */
|
|
638
|
-
readonly loading: _angular_core.
|
|
719
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
639
720
|
/** @description Zero-based offset of the supplied server page. External changes do not request data. */
|
|
640
721
|
readonly skip: _angular_core.InputSignal<number>;
|
|
641
722
|
/** @description Total matching server records before paging. Must be a non-negative integer. */
|
|
@@ -653,8 +734,8 @@ interface GridStateFilterDescriptor {
|
|
|
653
734
|
value?: GridStateFilterValue;
|
|
654
735
|
}
|
|
655
736
|
interface GridStateCompositeFilterDescriptor {
|
|
656
|
-
logic: FilterLogic;
|
|
657
737
|
filters: readonly (GridStateFilterDescriptor | GridStateCompositeFilterDescriptor)[];
|
|
738
|
+
logic: FilterLogic;
|
|
658
739
|
}
|
|
659
740
|
interface GridStateSortDescriptor {
|
|
660
741
|
dir: SortDirection;
|
|
@@ -680,7 +761,12 @@ interface GridStatePersistenceOptions {
|
|
|
680
761
|
persistPageSize?: boolean;
|
|
681
762
|
schemaVersion?: number | string;
|
|
682
763
|
}
|
|
683
|
-
|
|
764
|
+
/**
|
|
765
|
+
* The outcome of loading a state. `rejected-invalid`: the state isn't a well-formed `GridState` (a missing
|
|
766
|
+
* array, a duplicate column id, an unknown filter operator, a page size or width that isn't a positive
|
|
767
|
+
* number), and nothing was changed.
|
|
768
|
+
*/
|
|
769
|
+
type GridStateLoadStatus = "applied" | "empty" | "rejected-invalid" | "rejected-schema" | "rejected-version";
|
|
684
770
|
interface GridStateLoadResult {
|
|
685
771
|
ignoredColumns: readonly string[];
|
|
686
772
|
missingColumns: readonly string[];
|
|
@@ -746,11 +832,11 @@ declare class GridCommandColumnComponent implements GridColumnDefinition {
|
|
|
746
832
|
/**
|
|
747
833
|
* @description Whether this command column is hidden from the rendered grid.
|
|
748
834
|
*/
|
|
749
|
-
readonly hidden: _angular_core.
|
|
835
|
+
readonly hidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
750
836
|
/**
|
|
751
837
|
* @description Whether this command column remains fixed while the grid scrolls horizontally.
|
|
752
838
|
*/
|
|
753
|
-
readonly locked: _angular_core.
|
|
839
|
+
readonly locked: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
754
840
|
/**
|
|
755
841
|
* @description The side of the grid where this locked command column is fixed.
|
|
756
842
|
*/
|
|
@@ -766,15 +852,17 @@ declare class GridCommandColumnComponent implements GridColumnDefinition {
|
|
|
766
852
|
/**
|
|
767
853
|
* @description Whether the built-in remove command asks for confirmation before emitting remove.
|
|
768
854
|
*/
|
|
769
|
-
readonly removeConfirmation: _angular_core.
|
|
855
|
+
readonly removeConfirmation: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
770
856
|
/**
|
|
771
857
|
* @description A stable key used to persist state for this command column.
|
|
772
858
|
*/
|
|
773
859
|
readonly stateKey: _angular_core.InputSignal<string | null>;
|
|
774
860
|
/**
|
|
775
|
-
* @description The title displayed in the command column header.
|
|
861
|
+
* @description The title displayed in the command column header. Without one, the localized
|
|
862
|
+
* `commandColumnTitle` message ("Commands").
|
|
863
|
+
* @default null
|
|
776
864
|
*/
|
|
777
|
-
readonly title: _angular_core.InputSignal<string>;
|
|
865
|
+
readonly title: _angular_core.InputSignal<string | null>;
|
|
778
866
|
/**
|
|
779
867
|
* @description The fixed width of this command column in pixels.
|
|
780
868
|
*/
|
|
@@ -797,9 +885,11 @@ declare class GridColumnComponent implements GridColumnDefinition {
|
|
|
797
885
|
*/
|
|
798
886
|
readonly aggregate: _angular_core.InputSignal<AggregateFunction | null>;
|
|
799
887
|
/**
|
|
800
|
-
* @description Whether this column is editable when the grid is in edit mode.
|
|
888
|
+
* @description Whether this column is editable when the grid is in edit mode. Left unset, every column is
|
|
889
|
+
* editable except the one whose `field` is the grid's `rowKey`.
|
|
890
|
+
* @default null
|
|
801
891
|
*/
|
|
802
|
-
readonly editable: _angular_core.
|
|
892
|
+
readonly editable: _angular_core.InputSignalWithTransform<boolean | null, unknown>;
|
|
803
893
|
/**
|
|
804
894
|
* @description The field name of the data property to display in this column.
|
|
805
895
|
*/
|
|
@@ -807,19 +897,19 @@ declare class GridColumnComponent implements GridColumnDefinition {
|
|
|
807
897
|
/**
|
|
808
898
|
* @description Whether this column can be filtered when grid filtering is enabled. Has no effect if filtering is disabled on the grid.
|
|
809
899
|
*/
|
|
810
|
-
readonly filterable: _angular_core.
|
|
900
|
+
readonly filterable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
811
901
|
/**
|
|
812
|
-
* @description Formats the displayed cell value. String formats apply to date
|
|
902
|
+
* @description Formats the displayed cell value. String formats apply to date columns and their date filters; formatter functions replace the cell text.
|
|
813
903
|
*/
|
|
814
904
|
readonly format: _angular_core.InputSignal<ColumnFormat | null | undefined>;
|
|
815
905
|
/**
|
|
816
906
|
* @description Whether this column is hidden from the rendered grid.
|
|
817
907
|
*/
|
|
818
|
-
readonly hidden: _angular_core.
|
|
908
|
+
readonly hidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
819
909
|
/**
|
|
820
910
|
* @description Whether this column remains fixed while the grid scrolls horizontally.
|
|
821
911
|
*/
|
|
822
|
-
readonly locked: _angular_core.
|
|
912
|
+
readonly locked: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
823
913
|
/**
|
|
824
914
|
* @description The side of the grid where this locked column is fixed.
|
|
825
915
|
*/
|
|
@@ -832,10 +922,15 @@ declare class GridColumnComponent implements GridColumnDefinition {
|
|
|
832
922
|
* @description The minimum width of this column in pixels.
|
|
833
923
|
*/
|
|
834
924
|
readonly minWidth: _angular_core.InputSignal<number>;
|
|
925
|
+
/**
|
|
926
|
+
* @description Compares two values of this column when the user sorts it, returning a negative number, zero
|
|
927
|
+
* or a positive number. Without it, values sort by type (empty values first) and strings by the locale.
|
|
928
|
+
*/
|
|
929
|
+
readonly sortComparator: _angular_core.InputSignal<((left: unknown, right: unknown) => number) | null>;
|
|
835
930
|
/**
|
|
836
931
|
* @description Whether this column can be sorted through its header when grid sorting is enabled. Has no effect if sorting is disabled on the grid.
|
|
837
932
|
*/
|
|
838
|
-
readonly sortable: _angular_core.
|
|
933
|
+
readonly sortable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
839
934
|
/**
|
|
840
935
|
* @description A stable key used to persist state for columns whose field is empty or unstable.
|
|
841
936
|
*/
|
|
@@ -854,7 +949,7 @@ declare class GridColumnComponent implements GridColumnDefinition {
|
|
|
854
949
|
readonly width: _angular_core.InputSignal<number | null | undefined>;
|
|
855
950
|
getColumn(): Column;
|
|
856
951
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridColumnComponent, never>;
|
|
857
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridColumnComponent, "mona-grid-column", never, { "aggregate": { "alias": "aggregate"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "locked": { "alias": "locked"; "required": false; "isSignal": true; }; "lockedPosition": { "alias": "lockedPosition"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, ["cellTemplate", "editTemplate", "footerTemplate", "groupFooterTemplate", "headerTemplate", "titleTemplate"], never, true, never>;
|
|
952
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridColumnComponent, "mona-grid-column", never, { "aggregate": { "alias": "aggregate"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "locked": { "alias": "locked"; "required": false; "isSignal": true; }; "lockedPosition": { "alias": "lockedPosition"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "sortComparator": { "alias": "sortComparator"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, ["cellTemplate", "editTemplate", "footerTemplate", "groupFooterTemplate", "headerTemplate", "titleTemplate"], never, true, never>;
|
|
858
953
|
}
|
|
859
954
|
|
|
860
955
|
interface ColumnFilterState {
|
|
@@ -862,18 +957,12 @@ interface ColumnFilterState {
|
|
|
862
957
|
filterMenuValue?: FilterMenuValue;
|
|
863
958
|
}
|
|
864
959
|
|
|
865
|
-
type GridKeySelector<TData, TKey = unknown> = string | Selector<TData, TKey> | null;
|
|
866
|
-
|
|
867
960
|
type ResizeMethod = "auto" | "fitView" | number;
|
|
868
961
|
|
|
869
|
-
interface ColumnSortState {
|
|
870
|
-
sort: SortDescriptor;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
962
|
interface GridAggregateBucket {
|
|
874
|
-
readonly field: string;
|
|
875
963
|
readonly avg?: number;
|
|
876
964
|
readonly count?: number;
|
|
965
|
+
readonly field: string;
|
|
877
966
|
readonly max?: unknown;
|
|
878
967
|
readonly min?: unknown;
|
|
879
968
|
readonly sum?: number;
|
|
@@ -896,6 +985,8 @@ interface CellEditContext {
|
|
|
896
985
|
readonly session: GridEditSession;
|
|
897
986
|
}
|
|
898
987
|
interface RowEditContext {
|
|
988
|
+
/** The column whose editor takes focus; the first editable column when null. */
|
|
989
|
+
readonly focusColumnId: string | null;
|
|
899
990
|
readonly mode: "row";
|
|
900
991
|
readonly row: Row;
|
|
901
992
|
readonly rowUid: string;
|
|
@@ -1028,8 +1119,11 @@ declare class GridService {
|
|
|
1028
1119
|
readonly aggregateRows: _angular_core.Signal<Record<PropertyKey, unknown>[]>;
|
|
1029
1120
|
readonly allBulkSelectionRowsSelected: _angular_core.Signal<boolean>;
|
|
1030
1121
|
readonly appliedFilters: _angular_core.WritableSignal<ImmutableDictionary<string, ColumnFilterState>>;
|
|
1031
|
-
|
|
1032
|
-
|
|
1122
|
+
/**
|
|
1123
|
+
* The `aria-rowindex` before the first body row: the header rows, the add row and, when paged, the rows of
|
|
1124
|
+
* the earlier pages (counted as data rows).
|
|
1125
|
+
*/
|
|
1126
|
+
readonly bodyAriaRowStart: _angular_core.Signal<number>;
|
|
1033
1127
|
readonly bodyScrollElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
1034
1128
|
readonly bodyTableElement: _angular_core.WritableSignal<HTMLTableElement | null>;
|
|
1035
1129
|
readonly bulkSelectionRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
@@ -1039,6 +1133,8 @@ declare class GridService {
|
|
|
1039
1133
|
readonly collapsedGroupKeys: _angular_core.WritableSignal<ImmutableSet<string>>;
|
|
1040
1134
|
readonly columnReorder$: Subject<ColumnReorderEvent>;
|
|
1041
1135
|
readonly columnResize$: Subject<ColumnResizeEvent>;
|
|
1136
|
+
/** True while the user drags a column edge; state persistence waits for the drag to end. */
|
|
1137
|
+
readonly columnResizeActive: _angular_core.WritableSignal<boolean>;
|
|
1042
1138
|
readonly columnSort$: Subject<ColumnSortEvent>;
|
|
1043
1139
|
readonly columns: _angular_core.WritableSignal<ImmutableList<Column>>;
|
|
1044
1140
|
readonly contextMenuItems: _angular_core.WritableSignal<ImmutableSet<PopupMenuItem>>;
|
|
@@ -1046,25 +1142,33 @@ declare class GridService {
|
|
|
1046
1142
|
readonly detailColumnWidth = 36;
|
|
1047
1143
|
readonly draggingRowUid: _angular_core.WritableSignal<string | null>;
|
|
1048
1144
|
readonly edit$: Subject<GridEditEvent>;
|
|
1049
|
-
readonly editBaseDict: _angular_core.Signal<ImmutableDictionary<string, RowEditDataItem>>;
|
|
1050
1145
|
readonly editContext: _angular_core.Signal<GridEditContext | null>;
|
|
1051
1146
|
readonly editSession: _angular_core.Signal<GridEditSession | null>;
|
|
1052
1147
|
readonly editViewDict: _angular_core.Signal<ImmutableDictionary<string, RowEditDataItem>>;
|
|
1053
1148
|
readonly editableOptions: _angular_core.WritableSignal<EditableOptions>;
|
|
1054
1149
|
readonly editingRowUid: _angular_core.Signal<string | null>;
|
|
1055
|
-
|
|
1150
|
+
/** Keys of the rows whose detail row is open: the `rowKey` value, or the data item without one. */
|
|
1151
|
+
readonly expandedKeys: _angular_core.WritableSignal<ImmutableSet<unknown>>;
|
|
1152
|
+
/** Emits the expanded keys after the user opens or closes a detail row. */
|
|
1153
|
+
readonly expandedKeysChange$: Subject<unknown[]>;
|
|
1056
1154
|
readonly filterChange$: Subject<CompositeFilterDescriptor[]>;
|
|
1155
|
+
readonly filterRowEnabled: _angular_core.Signal<boolean>;
|
|
1057
1156
|
readonly filterableOptions: _angular_core.Signal<FilterableOptions>;
|
|
1058
1157
|
readonly footerScrollElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
1059
1158
|
readonly gridHeaderElement: _angular_core.WritableSignal<HTMLDivElement | null>;
|
|
1060
1159
|
readonly groupAggregateMap: _angular_core.Signal<ImmutableDictionary<string, GridGroupAggregate>>;
|
|
1160
|
+
/** Emits the group descriptors after the user changes grouping, and after a state is applied. */
|
|
1161
|
+
readonly groupChange$: Subject<GroupDescriptor[]>;
|
|
1061
1162
|
readonly groupColumnWidth = 36;
|
|
1163
|
+
/** The grouped columns; a width or visibility change elsewhere doesn't produce a new list. */
|
|
1062
1164
|
readonly groupColumns: _angular_core.Signal<ImmutableList<Column>>;
|
|
1063
1165
|
readonly groupStructuralWidth: _angular_core.Signal<number>;
|
|
1064
1166
|
readonly groupableOptions: _angular_core.WritableSignal<GroupableOptions>;
|
|
1065
1167
|
readonly hasFooter: _angular_core.Signal<boolean>;
|
|
1066
1168
|
readonly hasLeftLockedColumns: _angular_core.Signal<boolean>;
|
|
1067
1169
|
readonly hasLiveScrollbarGutterWidth: _angular_core.Signal<boolean>;
|
|
1170
|
+
/** The header rows: the column headers and, when shown, the filter row. */
|
|
1171
|
+
readonly headerRowCount: _angular_core.Signal<1 | 2>;
|
|
1068
1172
|
readonly headerTableElement: _angular_core.WritableSignal<HTMLTableElement | null>;
|
|
1069
1173
|
readonly horizontalScrollLeft: _angular_core.Signal<number>;
|
|
1070
1174
|
readonly isInEditMode: _angular_core.Signal<boolean>;
|
|
@@ -1078,6 +1182,8 @@ declare class GridService {
|
|
|
1078
1182
|
readonly pagerTotal: _angular_core.Signal<number>;
|
|
1079
1183
|
readonly paginationState: _angular_core.WritableSignal<PaginationState>;
|
|
1080
1184
|
readonly remove$: Subject<GridRemoveEvent>;
|
|
1185
|
+
/** How many rows the body draws, detail and group rows included; the body list keeps it current. */
|
|
1186
|
+
readonly renderedBodyRowCount: _angular_core.WritableSignal<number>;
|
|
1081
1187
|
readonly reorderableOptions: _angular_core.Signal<ReorderableOptions>;
|
|
1082
1188
|
readonly resizableOptions: _angular_core.Signal<ResizableOptions>;
|
|
1083
1189
|
readonly rowClass: _angular_core.WritableSignal<GridRowClass<unknown> | null>;
|
|
@@ -1100,14 +1206,20 @@ declare class GridService {
|
|
|
1100
1206
|
readonly selectedKeys: _angular_core.WritableSignal<ImmutableSet<unknown>>;
|
|
1101
1207
|
readonly selectedKeysChange$: rxjs.Observable<ImmutableSet<unknown>>;
|
|
1102
1208
|
readonly selectedKeysLoad$: BehaviorSubject<ImmutableSet<unknown>>;
|
|
1103
|
-
readonly selectedRows: _angular_core.Signal<ImmutableSet<Row>>;
|
|
1104
1209
|
readonly selectionColumnVisible: _angular_core.Signal<boolean>;
|
|
1105
1210
|
readonly selectionColumnWidth = 40;
|
|
1106
1211
|
readonly serverBindingEnabled: _angular_core.Signal<boolean>;
|
|
1107
1212
|
readonly serverLoading: _angular_core.Signal<boolean>;
|
|
1108
1213
|
readonly serverTotal: _angular_core.Signal<number>;
|
|
1109
1214
|
readonly someBulkSelectionRowsSelected: _angular_core.Signal<boolean>;
|
|
1215
|
+
/** Emits the sort descriptors after a state is applied, for the `sort` model. */
|
|
1216
|
+
readonly sortChange$: Subject<SortDescriptor<unknown>[]>;
|
|
1110
1217
|
readonly sortableOptions: _angular_core.WritableSignal<SortableOptions>;
|
|
1218
|
+
/** The widths of the columns pinned to the start and to the end, which cover part of the body. */
|
|
1219
|
+
readonly stickyInset: _angular_core.Signal<{
|
|
1220
|
+
end: number;
|
|
1221
|
+
start: number;
|
|
1222
|
+
}>;
|
|
1111
1223
|
readonly structuralColumns: _angular_core.Signal<readonly StructuralColumnDescriptor[]>;
|
|
1112
1224
|
readonly tableWidth: _angular_core.Signal<number | null>;
|
|
1113
1225
|
readonly viewPageRows: _angular_core.Signal<ImmutableList<Row>>;
|
|
@@ -1122,8 +1234,8 @@ declare class GridService {
|
|
|
1122
1234
|
addGroupColumn(column: Column): void;
|
|
1123
1235
|
applyState(state: GridState | null, options?: GridStatePersistenceOptions): GridStateLoadResult;
|
|
1124
1236
|
canReorderRow(row: Row): boolean;
|
|
1125
|
-
cancelAddRow(originalEvent?: Event): boolean;
|
|
1126
|
-
cancelEdit(originalEvent?: Event): boolean;
|
|
1237
|
+
cancelAddRow(originalEvent?: Event, reason?: GridCancelReason): boolean;
|
|
1238
|
+
cancelEdit(originalEvent?: Event, reason?: GridCancelReason): boolean;
|
|
1127
1239
|
captureState(options?: GridStatePersistenceOptions): GridState;
|
|
1128
1240
|
clearCollapsedGroups(predicate?: (key: string) => boolean): void;
|
|
1129
1241
|
clearColumnGrouping(column: Column): void;
|
|
@@ -1135,36 +1247,85 @@ declare class GridService {
|
|
|
1135
1247
|
createBodyRows(rows: Iterable<Row>): GridViewRow[];
|
|
1136
1248
|
deselectAllRows(): void;
|
|
1137
1249
|
deselectRow(row: Row): void;
|
|
1250
|
+
/**
|
|
1251
|
+
* Ends the current edit without reporting it: after the consumer prevented `save` to save asynchronously,
|
|
1252
|
+
* or to drop an edit from code. Does nothing when no edit is open.
|
|
1253
|
+
*/
|
|
1254
|
+
endEdit(): void;
|
|
1138
1255
|
findTextWidthOfColumn(column: Column, element: HTMLTableCellElement): number;
|
|
1256
|
+
/**
|
|
1257
|
+
* The `aria-rowindex` of each body row, after the rows before the body and the detail rows opened above
|
|
1258
|
+
* it, and how many rows the body draws. A row's detail row takes the next index.
|
|
1259
|
+
*/
|
|
1260
|
+
getBodyAriaRowIndices(bodyRows: readonly GridViewRow[]): {
|
|
1261
|
+
count: number;
|
|
1262
|
+
indices: readonly number[];
|
|
1263
|
+
};
|
|
1139
1264
|
getColumnStateId(column: Column): string | null;
|
|
1140
1265
|
getColumnWidth(column: Column): number;
|
|
1141
1266
|
getDataState(): GridDataState;
|
|
1267
|
+
/** Every applied filter: the column filters, then the filters across columns. */
|
|
1268
|
+
getFilterDescriptors(): CompositeFilterDescriptor[];
|
|
1142
1269
|
getGroupDescriptors(columns: Iterable<Column>): GroupDescriptor[];
|
|
1270
|
+
/** The accessible name of a row command button; `row` is null for the add row. */
|
|
1271
|
+
getRowCommandAriaLabel(command: GridRowCommand, row: Row | null): string;
|
|
1272
|
+
/** The row's 1-based position in the filtered and sorted rows, counting earlier server pages. */
|
|
1273
|
+
getRowNumber(row: Row): number;
|
|
1143
1274
|
getRowReorderAriaLabel(row: Row, absoluteIndex: number): string;
|
|
1144
1275
|
/** Sort order shared by models, persistence, and server requests. */
|
|
1145
1276
|
getSortDescriptors(): SortDescriptor[];
|
|
1146
|
-
handleMultipleSelection(event:
|
|
1147
|
-
handleRowClick(event:
|
|
1148
|
-
handleSingleSelection(event:
|
|
1277
|
+
handleMultipleSelection(event: GridSelectionModifiers, row: Row): void;
|
|
1278
|
+
handleRowClick(event: GridSelectionModifiers, row: Row): void;
|
|
1279
|
+
handleSingleSelection(event: GridSelectionModifiers, row: Row): void;
|
|
1149
1280
|
isGroupCollapsed(groupKey: string): boolean;
|
|
1281
|
+
/** Whether a selection value came from the `selectedKeys` input rather than from the user. */
|
|
1282
|
+
isLoadedSelection(keys: ImmutableSet<unknown>): boolean;
|
|
1150
1283
|
isRowExpanded(row: Row): boolean;
|
|
1151
1284
|
isRowSelected(row: Row): boolean;
|
|
1152
|
-
|
|
1153
|
-
|
|
1285
|
+
/** Sets the expanded detail rows from the `expandedKeys` input. */
|
|
1286
|
+
loadExpandedKeys(keys: Iterable<unknown> | null | undefined): void;
|
|
1287
|
+
/**
|
|
1288
|
+
* Applies filters from code. Conditions on one field become that column's filter (repeated fields are
|
|
1289
|
+
* combined with `and`); filters across fields stay whole and are still applied and reported. Filters on
|
|
1290
|
+
* a field with no column are kept for when the column appears. Conditions with an unknown operator are
|
|
1291
|
+
* dropped.
|
|
1292
|
+
*/
|
|
1293
|
+
loadFilters(filters: Iterable<CompositeFilterDescriptor> | null | undefined): void;
|
|
1294
|
+
/**
|
|
1295
|
+
* Applies group descriptors from code. A repeated field keeps its last descriptor; fields without a
|
|
1296
|
+
* column are remembered and grouped once their column appears.
|
|
1297
|
+
*/
|
|
1298
|
+
loadGroupColumns(descriptors: Iterable<GroupDescriptor> | null | undefined): void;
|
|
1154
1299
|
loadSelectedKeys(selectedKeys: Iterable<unknown>): void;
|
|
1155
|
-
|
|
1300
|
+
/**
|
|
1301
|
+
* Applies sort descriptors. They are kept whether or not a column shows the field, so a column added
|
|
1302
|
+
* later shows its sort; a repeated field keeps its last descriptor.
|
|
1303
|
+
*/
|
|
1304
|
+
loadSorts(sorts: Iterable<SortDescriptor> | null | undefined): void;
|
|
1156
1305
|
moveGroupColumn(column: Column, moveAs: "prev" | "next"): void;
|
|
1157
1306
|
normalizeRenderedWidth(width: number): number;
|
|
1158
|
-
|
|
1159
|
-
|
|
1307
|
+
/** Ends an update whose row left the data or the view; the cancel can't be prevented. */
|
|
1308
|
+
reconcileEditSession(): void;
|
|
1160
1309
|
removeRow(row: Row, originalEvent?: Event): boolean;
|
|
1310
|
+
/**
|
|
1311
|
+
* Moves a column in front of the column at `beforeIndex` in `columns()`, or to the end with
|
|
1312
|
+
* `columns().length`. Reports `columnReorder$`, which can cancel the move. Returns whether it moved.
|
|
1313
|
+
*/
|
|
1314
|
+
reorderColumn(column: Column, beforeIndex: number): boolean;
|
|
1161
1315
|
requestDataStateChange(options?: {
|
|
1162
1316
|
readonly resetPage?: boolean;
|
|
1163
1317
|
}): void;
|
|
1164
1318
|
requestRowReorder(row: Row, previousPageIndex: number, currentPageIndex: number): boolean;
|
|
1165
1319
|
resolveAggregateValue(bucket: GridAggregateBucket | null, aggregateFunction: AggregateFunction | null): unknown;
|
|
1166
1320
|
saveAddRow(originalEvent?: Event): boolean;
|
|
1321
|
+
/** Ctrl+A or Cmd+A in the body: selects every row in the select-all scope. */
|
|
1322
|
+
selectAllRowsFromKeyboard(): boolean;
|
|
1167
1323
|
selectRow(row: Row): void;
|
|
1324
|
+
/**
|
|
1325
|
+
* Space on a row toggles its selection; with Shift (Shift+Space, Shift+ArrowUp/Down) it selects the rows
|
|
1326
|
+
* from the anchor row to this one. Returns false when rows can't be selected.
|
|
1327
|
+
*/
|
|
1328
|
+
selectRowFromKeyboard(rowUid: string, extend: boolean): boolean;
|
|
1168
1329
|
setBulkSelection(selected: boolean): void;
|
|
1169
1330
|
setCalculatedWidth(columnId: string, value: number | null): void;
|
|
1170
1331
|
setCalculatedWidths(widthByColumnId: ReadonlyMap<string, number | null>): void;
|
|
@@ -1176,34 +1337,46 @@ declare class GridService {
|
|
|
1176
1337
|
setColumnSortDirection(columnId: string, value: SortDirection | null): void;
|
|
1177
1338
|
setColumnSortIndex(columnId: string, value: number | null): void;
|
|
1178
1339
|
setColumnVisibilityByFields(visibleFields: ImmutableSet<string>): void;
|
|
1179
|
-
|
|
1340
|
+
/** Replaces the editing options; the feature is on unless `enabled` is `false`. */
|
|
1341
|
+
setEditableOptions(options: Partial<EditableOptions>): void;
|
|
1342
|
+
/** Replaces the filtering options; the feature is on unless `enabled` is `false`. */
|
|
1180
1343
|
setFilterableOptions(options: Partial<FilterableOptions>): void;
|
|
1344
|
+
/** Changes a group's direction from the group panel and reports it. */
|
|
1345
|
+
setGroupSortDirection(column: Column, dir: SortDirection): void;
|
|
1346
|
+
/** Replaces the grouping options; the feature is on unless `enabled` is `false`. */
|
|
1181
1347
|
setGroupableOptions(options: Partial<GroupableOptions>): void;
|
|
1182
1348
|
setNewRowFactory(factory: () => Record<PropertyKey, unknown>): void;
|
|
1183
1349
|
setPageState(state: Partial<PaginationState>): void;
|
|
1350
|
+
/** Replaces the column reorder options; the feature is on unless `enabled` is `false`. */
|
|
1184
1351
|
setReorderableOptions(options: Partial<ReorderableOptions>): void;
|
|
1352
|
+
/** Replaces the column resize options; the feature is on unless `enabled` is `false`. */
|
|
1185
1353
|
setResizableOptions(options: Partial<ResizableOptions>): void;
|
|
1186
1354
|
setRowExpanded(row: Row, expanded: boolean): void;
|
|
1355
|
+
/** Sets the row key; columns left to the default become read-only when they hold the key. */
|
|
1356
|
+
setRowKey(rowKey: GridKeySelector<unknown> | null): void;
|
|
1187
1357
|
setRowReorderableOptions(options: RowReorderableOptions): void;
|
|
1188
1358
|
setRowSelected(row: Row, selected: boolean): void;
|
|
1189
1359
|
setRows(value: Iterable<Record<PropertyKey, unknown>>, rowKey?: GridKeySelector<unknown> | null): void;
|
|
1190
1360
|
setScrollEndThreshold(threshold: number): void;
|
|
1191
|
-
|
|
1361
|
+
/** Replaces the selection options; the feature is on unless `enabled` is `false`. */
|
|
1362
|
+
setSelectableOptions(options: Partial<SelectableOptions>): void;
|
|
1192
1363
|
setServerBindingEnabled(enabled: boolean): void;
|
|
1193
1364
|
setServerLoading(loading: boolean): void;
|
|
1194
1365
|
setServerSkip(skip: number): void;
|
|
1195
1366
|
setServerTotal(total: number): void;
|
|
1367
|
+
/** Replaces the sorting options; the feature is on unless `enabled` is `false`. */
|
|
1196
1368
|
setSortableOptions(options: Partial<SortableOptions>): void;
|
|
1197
1369
|
setVirtualScrollOptions(options: VirtualScrollOptions): void;
|
|
1198
1370
|
startAddRow(originalEvent?: Event): boolean;
|
|
1199
1371
|
startCellEdit(uid: string, row: Row, column: Column, originalEvent?: Event): boolean;
|
|
1200
|
-
startRowEdit(row: Row, originalEvent?: Event): boolean;
|
|
1372
|
+
startRowEdit(row: Row, originalEvent?: Event, focusColumnId?: string | null): boolean;
|
|
1201
1373
|
stopCellEdit(originalEvent?: Event): boolean;
|
|
1202
1374
|
toggleGroupCollapse(groupKey: string): void;
|
|
1203
1375
|
updateColumn(columnId: string, patch: Partial<Omit<Column, "id">>): void;
|
|
1376
|
+
/** Tells assistive technology why a commit didn't go through. */
|
|
1377
|
+
private announceInvalid;
|
|
1204
1378
|
private applyColumnIndexes;
|
|
1205
1379
|
private buildGroupAggregates;
|
|
1206
|
-
private buildGroupKey;
|
|
1207
1380
|
private clearEditSession;
|
|
1208
1381
|
private cloneFilter;
|
|
1209
1382
|
private cloneFilterValue;
|
|
@@ -1214,29 +1387,36 @@ declare class GridService {
|
|
|
1214
1387
|
private deserializeFilterDescriptor;
|
|
1215
1388
|
private deserializeFilterValue;
|
|
1216
1389
|
private deserializeFilters;
|
|
1390
|
+
private emitGroupChange;
|
|
1217
1391
|
private findLongestCellContentOfColumn;
|
|
1218
1392
|
private getColumnById;
|
|
1219
1393
|
private getColumnLockBucket;
|
|
1220
1394
|
private getRowDataItemSelectionKey;
|
|
1395
|
+
/** The key a row is tracked by across data refreshes: its `rowKey` value, or the data item. */
|
|
1396
|
+
private getRowIdentityKey;
|
|
1221
1397
|
private getRowSelectionKey;
|
|
1222
1398
|
private getRowUid;
|
|
1223
1399
|
private getRowUidKey;
|
|
1224
|
-
private groupRowsByColumn;
|
|
1225
1400
|
private measureElementScrollbarGutter;
|
|
1226
1401
|
private measureFallbackScrollbarGutter;
|
|
1227
1402
|
private orderColumnsByLockBucket;
|
|
1228
|
-
private patchSessionField;
|
|
1229
1403
|
private reconcileColumn;
|
|
1404
|
+
/** The column's `editable`, with the default (every column but the `rowKey` field) resolved. */
|
|
1405
|
+
private resolveEditable;
|
|
1230
1406
|
private resolveEditedRowData;
|
|
1231
1407
|
private resolveSessionRowData;
|
|
1232
1408
|
private selectRowRange;
|
|
1233
1409
|
private serializeFilter;
|
|
1234
1410
|
private serializeFilterDescriptor;
|
|
1235
1411
|
private serializeFilterValue;
|
|
1412
|
+
/** The session's values, with the fields it filled in for the editors put back as the row had them. */
|
|
1413
|
+
private sessionRowData;
|
|
1236
1414
|
private setElementScrollLeft;
|
|
1237
1415
|
private setHorizontalScrollLeft;
|
|
1238
1416
|
private setHorizontalScrollSyncEffects;
|
|
1239
1417
|
private setScrollbarGutterEffects;
|
|
1418
|
+
private syncColumnFilterState;
|
|
1419
|
+
private syncColumnSortState;
|
|
1240
1420
|
private updateColumns;
|
|
1241
1421
|
private validateServerInteger;
|
|
1242
1422
|
private validateSessionForSave;
|
|
@@ -1244,6 +1424,8 @@ declare class GridService {
|
|
|
1244
1424
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridService, never>;
|
|
1245
1425
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GridService>;
|
|
1246
1426
|
}
|
|
1427
|
+
/** The modifier keys of a click or key press that selects rows. */
|
|
1428
|
+
type GridSelectionModifiers = Pick<MouseEvent, "ctrlKey" | "metaKey" | "shiftKey">;
|
|
1247
1429
|
type RowReorderDisabledReason = "disabled" | "editing" | "filtered" | "grouped" | "server-binding" | "single-row" | "sorted" | "virtual-scroll" | null;
|
|
1248
1430
|
|
|
1249
1431
|
declare const gridBaseThemeVariants: (props?: ({
|
|
@@ -1274,7 +1456,13 @@ type GridVariantInput = GridBaseVariantInput & GridHeaderTableCellVariantInput &
|
|
|
1274
1456
|
declare class GridComponent<T> implements GridVariantInput {
|
|
1275
1457
|
#private;
|
|
1276
1458
|
private readonly columnDefinitions;
|
|
1459
|
+
private readonly filterMenus;
|
|
1277
1460
|
private readonly footerScrollElement;
|
|
1461
|
+
/**
|
|
1462
|
+
* Every row of the grid: header rows, add row, body rows (group, detail and group footer rows included) and
|
|
1463
|
+
* footer. Exact when every row is drawn or rows are plain; -1 (unknown) for paged groups or detail rows.
|
|
1464
|
+
*/
|
|
1465
|
+
protected readonly ariaRowCount: _angular_core.Signal<number>;
|
|
1278
1466
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
1279
1467
|
protected readonly columnActionsClass: _angular_core.Signal<string>;
|
|
1280
1468
|
protected readonly columnDragPreviewClass: _angular_core.Signal<string>;
|
|
@@ -1282,15 +1470,20 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1282
1470
|
protected readonly columnDropHintClass: _angular_core.Signal<string>;
|
|
1283
1471
|
protected readonly columnResizerClass: _angular_core.Signal<string>;
|
|
1284
1472
|
protected readonly dragColumn: _angular_core.WritableSignal<Column | null>;
|
|
1473
|
+
/** Whether a dragged column goes after the hovered column rather than before it. */
|
|
1474
|
+
protected readonly dropAfter: _angular_core.WritableSignal<boolean>;
|
|
1285
1475
|
protected readonly dropColumn: _angular_core.WritableSignal<Column | null>;
|
|
1286
1476
|
protected readonly filterMenuEnabled: _angular_core.Signal<boolean>;
|
|
1477
|
+
protected readonly filterRowCellClass: _angular_core.Signal<string>;
|
|
1287
1478
|
protected readonly filterRowEnabled: _angular_core.Signal<boolean>;
|
|
1288
1479
|
protected readonly footerClass: _angular_core.Signal<string>;
|
|
1289
1480
|
protected readonly footerTableClass: _angular_core.Signal<string>;
|
|
1290
1481
|
protected readonly footerVisible: _angular_core.Signal<boolean>;
|
|
1291
1482
|
protected readonly gridDetailTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1483
|
+
/** A treegrid while rows are grouped, a grid otherwise. */
|
|
1292
1484
|
protected readonly gridHeaderElement: _angular_core.Signal<ElementRef<HTMLDivElement>>;
|
|
1293
1485
|
protected readonly gridHeaderTableElement: _angular_core.Signal<ElementRef<HTMLTableElement>>;
|
|
1486
|
+
protected readonly gridRole: _angular_core.Signal<"grid" | "treegrid">;
|
|
1294
1487
|
protected readonly gridService: GridService;
|
|
1295
1488
|
protected readonly gridWidthSet: _angular_core.WritableSignal<boolean>;
|
|
1296
1489
|
protected readonly groupColumnList: _angular_core.Signal<CdkDropList<any> | undefined>;
|
|
@@ -1300,6 +1493,8 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1300
1493
|
protected readonly groupable: _angular_core.Signal<boolean>;
|
|
1301
1494
|
protected readonly groupingInProgress: _angular_core.WritableSignal<boolean>;
|
|
1302
1495
|
protected readonly headerClass: _angular_core.Signal<string>;
|
|
1496
|
+
/** Each header's keyboard shortcuts, for `aria-keyshortcuts`. */
|
|
1497
|
+
protected readonly headerKeyShortcuts: _angular_core.Signal<Map<string, string>>;
|
|
1303
1498
|
protected readonly headerMarginInlineEnd: _angular_core.Signal<number>;
|
|
1304
1499
|
protected readonly headerTableCellClass: _angular_core.Signal<string>;
|
|
1305
1500
|
protected readonly headerTableClass: _angular_core.Signal<string>;
|
|
@@ -1307,29 +1502,45 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1307
1502
|
protected readonly headerTableColumnWrapClass: _angular_core.Signal<string>;
|
|
1308
1503
|
protected readonly headerTableRowClass: _angular_core.Signal<string>;
|
|
1309
1504
|
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaGridMessages>;
|
|
1505
|
+
protected readonly multiselectable: _angular_core.Signal<boolean | undefined>;
|
|
1310
1506
|
protected readonly noDataClass: _angular_core.Signal<string>;
|
|
1311
1507
|
protected readonly noDataTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1312
1508
|
protected readonly resizing: _angular_core.WritableSignal<boolean>;
|
|
1313
|
-
protected readonly toolbarContext: _angular_core.Signal<
|
|
1314
|
-
$implicit: GridService;
|
|
1315
|
-
addRowData: Record<PropertyKey, unknown> | null;
|
|
1316
|
-
addRowVisible: boolean;
|
|
1317
|
-
cancelAdd: () => boolean;
|
|
1318
|
-
editSession: _nanahoshi_mona_ui_grid.GridEditSession | null;
|
|
1319
|
-
saveAdd: () => boolean;
|
|
1320
|
-
startAdd: () => boolean;
|
|
1321
|
-
}>;
|
|
1509
|
+
protected readonly toolbarContext: _angular_core.Signal<GridToolbarTemplateContext>;
|
|
1322
1510
|
protected readonly toolbarElement: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1323
1511
|
protected readonly toolbarTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1324
1512
|
protected readonly uid: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* @description The grid's accessible name, such as "Orders". Use it, or `ariaLabelledBy`, rather than
|
|
1515
|
+
* an `aria-label` attribute on the host, which names nothing.
|
|
1516
|
+
* @default null
|
|
1517
|
+
*/
|
|
1518
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
1519
|
+
/**
|
|
1520
|
+
* @description The id of the element that names the grid, such as a heading above it.
|
|
1521
|
+
* @default null
|
|
1522
|
+
*/
|
|
1523
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string | null>;
|
|
1325
1524
|
/**
|
|
1326
1525
|
* @description The row data to be displayed in the grid.
|
|
1327
1526
|
*/
|
|
1328
1527
|
readonly data: _angular_core.InputSignal<Iterable<T>>;
|
|
1329
1528
|
/**
|
|
1330
|
-
* @description
|
|
1529
|
+
* @description Keys of the rows whose detail row is open: `rowKey` values, or the data items when the grid
|
|
1530
|
+
* has no `rowKey`. Supports two-way binding; `expandedKeysChange` emits when the user opens or closes one.
|
|
1531
|
+
* @default []
|
|
1532
|
+
*/
|
|
1533
|
+
readonly expandedKeys: _angular_core.ModelSignal<unknown[]>;
|
|
1534
|
+
/**
|
|
1535
|
+
* @description Emitted when the user changes the page or the page size, and when the grid moves back to the
|
|
1536
|
+
* last page because the data shrank. Not emitted for `skip` or `pageSize` values set from code.
|
|
1537
|
+
*/
|
|
1538
|
+
readonly pageChange: _angular_core.OutputEmitterRef<PageChangeEvent>;
|
|
1539
|
+
/**
|
|
1540
|
+
* @description The number of items to be displayed on a page. Values that aren't positive integers are
|
|
1541
|
+
* ignored. A new size keeps the first row of the current page in view. Supports two-way binding.
|
|
1331
1542
|
*/
|
|
1332
|
-
readonly pageSize: _angular_core.
|
|
1543
|
+
readonly pageSize: _angular_core.ModelSignal<number | undefined>;
|
|
1333
1544
|
/**
|
|
1334
1545
|
* @description The page sizes that the user can select from.
|
|
1335
1546
|
* These values will be displayed in the page size dropdown.
|
|
@@ -1351,7 +1562,7 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1351
1562
|
* If set to `true`, the pager will be displayed as a dropdown when the grid width gets smaller.
|
|
1352
1563
|
* @default true
|
|
1353
1564
|
*/
|
|
1354
|
-
readonly responsivePager: _angular_core.
|
|
1565
|
+
readonly responsivePager: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1355
1566
|
/**
|
|
1356
1567
|
* @description The border radius of the grid.
|
|
1357
1568
|
* @default "medium"
|
|
@@ -1377,27 +1588,46 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1377
1588
|
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
1378
1589
|
* @default ""
|
|
1379
1590
|
*/
|
|
1591
|
+
/**
|
|
1592
|
+
* @description The number of rows before the current page, in client paging. Supports two-way binding. With
|
|
1593
|
+
* `monaGridServerBinding`, the directive's `skip` sets the page and this model reports user changes.
|
|
1594
|
+
* @default 0
|
|
1595
|
+
*/
|
|
1596
|
+
readonly skip: _angular_core.ModelSignal<number>;
|
|
1380
1597
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
1381
1598
|
constructor();
|
|
1382
1599
|
protected isColumnDragDisabled(column: Column): boolean;
|
|
1600
|
+
/** A dragged header leaves the page during the drag; give focus back to it once it's dropped. */
|
|
1601
|
+
protected onColumnDragEnd(event: CdkDragEnd<Column>): void;
|
|
1383
1602
|
protected onColumnDragEnter(event: CdkDragEnter<void, Column>): void;
|
|
1384
1603
|
protected onColumnDragEnterForGrouping(): void;
|
|
1385
1604
|
protected onColumnDragExitForGrouping(): void;
|
|
1605
|
+
/** Puts the drop hint before or after the header under the pointer, which works for touch too. */
|
|
1606
|
+
protected onColumnDragMove(event: CdkDragMove<Column>): void;
|
|
1386
1607
|
protected onColumnDragStart(event: CdkDragStart<Column>): void;
|
|
1387
1608
|
protected onColumnDrop(): void;
|
|
1388
1609
|
protected onColumnDropForGrouping(event: CdkDragDrop<Column, void, Column>): void;
|
|
1389
1610
|
protected onColumnFilter(column: Column, state: ColumnFilterState): void;
|
|
1390
|
-
protected onColumnMouseEnter(column: Column): void;
|
|
1391
1611
|
protected onColumnResizeEnd(event: ColumnResizeEvent): void;
|
|
1392
1612
|
protected onColumnResizeStart(): void;
|
|
1393
1613
|
protected onColumnSort(column: Column): void;
|
|
1614
|
+
/** Delete or Backspace on a group chip, or on its remove button, removes the group. */
|
|
1615
|
+
protected onGroupChipKeydown(event: KeyboardEvent, column: Column): void;
|
|
1394
1616
|
protected onGroupColumnReorder(column: Column, moveAs: "prev" | "next"): void;
|
|
1395
1617
|
protected onGroupingColumnRemove(event: Event, column: Column): void;
|
|
1396
1618
|
protected onGroupingColumnSort(column: Column): void;
|
|
1619
|
+
/**
|
|
1620
|
+
* Ctrl+Shift+ArrowLeft/Right (Cmd on macOS) moves the focused header's column, and Ctrl+Shift+G groups the
|
|
1621
|
+
* grid by it: the keyboard way to drag a header.
|
|
1622
|
+
*/
|
|
1623
|
+
protected onHeaderKeydown(event: KeyboardEvent, column: Column): void;
|
|
1397
1624
|
protected onPageChange(event: PageChangeEvent): void;
|
|
1398
|
-
|
|
1625
|
+
/** The toolbar's roving Tab stop follows focus, also when a control is clicked. */
|
|
1626
|
+
protected onToolbarFocusIn(event: FocusEvent): void;
|
|
1627
|
+
/** ArrowLeft/Right move between the toolbar's controls (mirrored in RTL), Home and End to its ends. */
|
|
1399
1628
|
protected onToolbarKeydown(event: KeyboardEvent): void;
|
|
1400
|
-
|
|
1629
|
+
/** Alt+ArrowDown on a header: opens the column's filter menu. */
|
|
1630
|
+
protected openColumnFilterMenu(column: Column): void;
|
|
1401
1631
|
private clampCalculatedWidth;
|
|
1402
1632
|
private clearDragState;
|
|
1403
1633
|
private createFitViewWidthMap;
|
|
@@ -1406,43 +1636,59 @@ declare class GridComponent<T> implements GridVariantInput {
|
|
|
1406
1636
|
private getToolbarFocusTargets;
|
|
1407
1637
|
private isElementDisabled;
|
|
1408
1638
|
private isElementHidden;
|
|
1639
|
+
private reportPage;
|
|
1409
1640
|
private setDataEffect;
|
|
1641
|
+
/** An edit whose row was replaced follows the new data; one whose row left the data or the view ends. */
|
|
1642
|
+
private setEditSessionEffect;
|
|
1410
1643
|
private setFitViewScrollbarSyncEffect;
|
|
1411
1644
|
private setFooterScrollElementEffect;
|
|
1412
1645
|
private setGridDetailEffect;
|
|
1413
1646
|
private setInitialCalculatedWidthOfColumns;
|
|
1414
1647
|
private setPageSizeEffect;
|
|
1648
|
+
private setPagingEffects;
|
|
1415
1649
|
private setResizeObserver;
|
|
1416
1650
|
private syncToolbarFocusTargets;
|
|
1417
1651
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridComponent<any>, never>;
|
|
1418
|
-
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; }; "rowClass": { "alias": "rowClass"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["columnDefinitions", "gridDetailTemplate", "noDataTemplate", "toolbarTemplate"], never, true, never>;
|
|
1652
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridComponent<any>, "mona-grid", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "expandedKeys": { "alias": "expandedKeys"; "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; }; "rowClass": { "alias": "rowClass"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "skip": { "alias": "skip"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "expandedKeys": "expandedKeysChange"; "pageChange": "pageChange"; "pageSize": "pageSizeChange"; "skip": "skipChange"; }, ["columnDefinitions", "gridDetailTemplate", "noDataTemplate", "toolbarTemplate"], never, true, never>;
|
|
1419
1653
|
}
|
|
1420
1654
|
|
|
1421
1655
|
declare const GRID_DEFAULT_MESSAGES: {
|
|
1422
1656
|
all: string;
|
|
1423
1657
|
apply: string;
|
|
1424
1658
|
cancel: string;
|
|
1425
|
-
|
|
1659
|
+
cancelNewRow: string;
|
|
1660
|
+
cancelRowEdit: (rowNumber: number) => string;
|
|
1661
|
+
clearFilter: (column: string) => string;
|
|
1662
|
+
collapseDetail: (rowNumber: number) => string;
|
|
1663
|
+
columnGrouped: (column: string) => string;
|
|
1664
|
+
columnMoved: (column: string, position: number) => string;
|
|
1426
1665
|
columns: string;
|
|
1427
1666
|
columnsSelected: (count: number) => string;
|
|
1667
|
+
commandColumnTitle: string;
|
|
1428
1668
|
delete: string;
|
|
1429
|
-
deleteRowConfirmation: string;
|
|
1669
|
+
deleteRowConfirmation: (rowNumber: number) => string;
|
|
1430
1670
|
deleteRowTitle: string;
|
|
1671
|
+
details: string;
|
|
1431
1672
|
dragColumnHeaderToGroup: string;
|
|
1432
1673
|
edit: string;
|
|
1433
|
-
editRow: string;
|
|
1674
|
+
editRow: (rowNumber: number) => string;
|
|
1675
|
+
expandDetail: (rowNumber: number) => string;
|
|
1434
1676
|
fieldValidationError: string;
|
|
1435
1677
|
filterByColumn: (column: string) => string;
|
|
1678
|
+
filterByColumnFiltered: (column: string) => string;
|
|
1679
|
+
filterOperator: (column: string, operator: string) => string;
|
|
1436
1680
|
filterPlaceholder: string;
|
|
1681
|
+
group: string;
|
|
1682
|
+
loading: string;
|
|
1437
1683
|
modified: string;
|
|
1438
1684
|
moveAsNext: string;
|
|
1439
1685
|
moveAsPrevious: string;
|
|
1440
1686
|
moveRow: string;
|
|
1441
1687
|
noData: string;
|
|
1442
1688
|
remove: string;
|
|
1443
|
-
removeRow: string;
|
|
1689
|
+
removeRow: (rowNumber: number) => string;
|
|
1444
1690
|
reorderRow: (rowNumber: number) => string;
|
|
1445
|
-
resizeColumn: string;
|
|
1691
|
+
resizeColumn: (column: string) => string;
|
|
1446
1692
|
rowReorder: string;
|
|
1447
1693
|
rowReorderDisabled: string;
|
|
1448
1694
|
rowReorderDisabledEditing: string;
|
|
@@ -1457,10 +1703,13 @@ declare const GRID_DEFAULT_MESSAGES: {
|
|
|
1457
1703
|
rowReorderMoved: (fromRowNumber: number, toPosition: number) => string;
|
|
1458
1704
|
rowValidationError: string;
|
|
1459
1705
|
save: string;
|
|
1460
|
-
|
|
1706
|
+
saveNewRow: string;
|
|
1707
|
+
saveRow: (rowNumber: number) => string;
|
|
1461
1708
|
selectAllRows: string;
|
|
1462
1709
|
selectRow: (rowNumber: number) => string;
|
|
1710
|
+
sortOrder: (position: number) => string;
|
|
1711
|
+
toolbar: string;
|
|
1463
1712
|
};
|
|
1464
1713
|
|
|
1465
1714
|
export { CellEditEvent, ColumnReorderEvent, ColumnSortEvent, GRID_DEFAULT_MESSAGES, 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, GridServerBindingDirective, GridSortableDirective, GridStatePersistenceDirective, GridToolbarTemplateDirective, GridVirtualScrollDirective, RowEditEvent, RowReorderEvent };
|
|
1466
|
-
export type { AggregateFunction, Column, ColumnConfig, ColumnFormat, ColumnKind, ColumnResizeEvent, EditableOptions, FilterableOptions, GridColumnLockedPosition, GridColumnState, GridDataState, GridEditFormContext, GridEditOperation, GridEditSchemaFactory, GridEditSession, GridEditTemplateContext, GridRowClass, GridRowClassValue, GridSaveOperation, GridState, GridStateCompositeFilterDescriptor, GridStateFilterDescriptor, GridStateFilterValue, GridStateLoadResult, GridStateLoadStatus, GridStatePersistenceOptions, GridStateSortDescriptor, GridStateVersion, GroupDescriptor, GroupableOptions, ReorderableOptions, ResizableOptions, ResizeMethod, RowReorderableOptions, SelectableOptions, SortableOptions };
|
|
1715
|
+
export type { AggregateFunction, Column, ColumnConfig, ColumnFormat, ColumnFormatFunction, ColumnKind, ColumnResizeEvent, ColumnSortComparator, EditableOptions, FilterableOptions, GridCancelReason, GridColumnLockedPosition, GridColumnState, GridDataState, GridEditFormContext, GridEditOperation, GridEditSchemaFactory, GridEditSession, GridEditTemplateContext, GridRowClass, GridRowClassValue, GridRowCommand, GridSaveOperation, GridState, GridStateCompositeFilterDescriptor, GridStateFilterDescriptor, GridStateFilterValue, GridStateLoadResult, GridStateLoadStatus, GridStatePersistenceOptions, GridStateSortDescriptor, GridStateVersion, GridToolbarContext, GridToolbarTemplateContext, GroupDescriptor, GroupableOptions, ReorderableOptions, ResizableOptions, ResizeMethod, RowReorderableOptions, SelectableOptions, SortableOptions };
|