@angular-bootstrap/ngbootstrap 0.0.12 → 1.0.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/README.md +61 -74
- package/fesm2022/angular-bootstrap-ngbootstrap.mjs +11738 -1784
- package/fesm2022/angular-bootstrap-ngbootstrap.mjs.map +1 -1
- package/package.json +17 -15
- package/types/angular-bootstrap-ngbootstrap.d.ts +1553 -123
|
@@ -1,7 +1,55 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EventEmitter, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, TemplateRef, AfterContentInit, OnChanges, SimpleChanges, InjectionToken, OnInit, AfterViewChecked, QueryList } from '@angular/core';
|
|
3
3
|
import { AbstractControl, FormGroup, FormControl, ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
+
import * as _angular_bootstrap_ngbootstrap from '@angular-bootstrap/ngbootstrap';
|
|
6
|
+
import { ChartConfiguration } from 'chart.js';
|
|
7
|
+
|
|
8
|
+
type NgbFilterMode = 'row' | 'menu' | 'multi' | 'none';
|
|
9
|
+
type NgbFilterable = boolean | 'row' | 'menu' | 'multi' | 'none';
|
|
10
|
+
type NgbFilterOperator = 'contains' | 'doesnotcontain' | 'eq' | 'neq' | 'startswith' | 'endswith' | 'gt' | 'gte' | 'lt' | 'lte' | 'isnull' | 'isnotnull' | 'isempty' | 'isnotempty';
|
|
11
|
+
interface NgbFilterDescriptor {
|
|
12
|
+
field: string;
|
|
13
|
+
operator: NgbFilterOperator;
|
|
14
|
+
value?: any;
|
|
15
|
+
ignoreCase?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Single condition in a column filter menu or layout-toolbar filter tool. */
|
|
18
|
+
interface NgbMenuFilterConditionDraft {
|
|
19
|
+
operator: NgbFilterOperator;
|
|
20
|
+
value: any;
|
|
21
|
+
}
|
|
22
|
+
interface NgbCompositeFilterDescriptor {
|
|
23
|
+
logic: 'and' | 'or';
|
|
24
|
+
filters: Array<NgbFilterDescriptor | NgbCompositeFilterDescriptor>;
|
|
25
|
+
}
|
|
26
|
+
interface NgbFilterState {
|
|
27
|
+
global?: string;
|
|
28
|
+
root: NgbCompositeFilterDescriptor;
|
|
29
|
+
}
|
|
30
|
+
type NgbColumnFilterType = 'text' | 'numeric' | 'boolean' | 'date' | 'select';
|
|
31
|
+
declare const NGB_TEXT_FILTER_OPERATORS: NgbFilterOperator[];
|
|
32
|
+
declare const NGB_NUMERIC_FILTER_OPERATORS: NgbFilterOperator[];
|
|
33
|
+
declare const NGB_BOOLEAN_FILTER_OPERATORS: NgbFilterOperator[];
|
|
34
|
+
declare const NGB_DATE_FILTER_OPERATORS: NgbFilterOperator[];
|
|
35
|
+
declare const NGB_SELECT_FILTER_OPERATORS: NgbFilterOperator[];
|
|
36
|
+
declare function ngbColumnTypeToFilterType(type?: ColumnType): NgbColumnFilterType;
|
|
37
|
+
declare function ngbDefaultFilterOperator(type: NgbColumnFilterType): NgbFilterOperator;
|
|
38
|
+
declare function ngbAllowedFilterOperators(type: NgbColumnFilterType): NgbFilterOperator[];
|
|
39
|
+
declare function ngbFilterOperatorLabel(operator: NgbFilterOperator, type?: NgbColumnFilterType): string;
|
|
40
|
+
declare function ngbIsCompositeFilter(filter: NgbFilterDescriptor | NgbCompositeFilterDescriptor): filter is NgbCompositeFilterDescriptor;
|
|
41
|
+
/** Recursively collects leaf filter descriptors from a composite filter tree. */
|
|
42
|
+
declare function ngbFlattenFilterDescriptors(composite: NgbCompositeFilterDescriptor | null | undefined): NgbFilterDescriptor[];
|
|
43
|
+
/** Returns the first leaf descriptor for `field`, searching nested composite nodes. */
|
|
44
|
+
declare function ngbFindFieldFilterDescriptor(composite: NgbCompositeFilterDescriptor | null | undefined, field: string): NgbFilterDescriptor | null;
|
|
45
|
+
declare function ngbOperatorRequiresFilterValue(operator: NgbFilterOperator): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Returns a new composite filter with the field set (or removed when value is empty).
|
|
48
|
+
* Supports manual `filterChange(root)` updates from custom filter templates.
|
|
49
|
+
*/
|
|
50
|
+
declare function ngbSetFieldFilter(composite: NgbCompositeFilterDescriptor, field: string, operator: NgbFilterOperator, value?: any, options?: {
|
|
51
|
+
requiresValue?: (operator: NgbFilterOperator) => boolean;
|
|
52
|
+
}): NgbCompositeFilterDescriptor;
|
|
5
53
|
|
|
6
54
|
type ColumnType = 'text' | 'number' | 'email' | 'boolean' | 'date' | 'select';
|
|
7
55
|
interface ColumnDef<T = any> {
|
|
@@ -9,19 +57,181 @@ interface ColumnDef<T = any> {
|
|
|
9
57
|
field: Extract<keyof T, string>;
|
|
10
58
|
/** human‐readable header text */
|
|
11
59
|
header: string;
|
|
60
|
+
/** Optional tooltip/title for the header cell; defaults to header text. */
|
|
61
|
+
title?: string;
|
|
62
|
+
/** Optional tooltip/title for body cells; defaults to the cell text. */
|
|
63
|
+
cellTitle?: string | ((row: T) => string);
|
|
12
64
|
/** enable clicking to sort */
|
|
13
65
|
sortable?: boolean;
|
|
14
66
|
/** enable filtering on this column */
|
|
15
67
|
filterable?: boolean;
|
|
16
|
-
|
|
68
|
+
filterType?: NgbColumnFilterType;
|
|
69
|
+
/** When `''`, the first entry from {@link allowedFilterOperators} or the type list is used. */
|
|
70
|
+
defaultFilterOperator?: NgbFilterOperator | '';
|
|
71
|
+
allowedFilterOperators?: NgbFilterOperator[];
|
|
72
|
+
showFilterMenu?: boolean;
|
|
73
|
+
showFilterRow?: boolean;
|
|
74
|
+
/** When `false`, hides the operator-list trigger in row filter mode. */
|
|
75
|
+
showFilterOperator?: boolean;
|
|
76
|
+
/** Placeholder for the row filter input; defaults to a type-specific label. */
|
|
77
|
+
filterPlaceholder?: string;
|
|
78
|
+
editable?: boolean | ((row: T, isNew: boolean) => boolean);
|
|
17
79
|
type?: ColumnType;
|
|
18
80
|
options?: Array<{
|
|
19
81
|
label: string;
|
|
20
82
|
value: any;
|
|
21
83
|
}>;
|
|
84
|
+
width?: number;
|
|
85
|
+
/** Groups cells in stacked card layout (`tableOptions.stackedLayout = 'cards'`). */
|
|
86
|
+
stackedGroup?: 'start' | 'center' | 'end';
|
|
87
|
+
hidden?: boolean;
|
|
88
|
+
sticky?: boolean | 'start' | 'end';
|
|
89
|
+
locked?: boolean;
|
|
90
|
+
reorderable?: boolean;
|
|
91
|
+
/** When grid `[resizable]` is true, set to `false` to disable resizing for this column. */
|
|
92
|
+
resizable?: boolean;
|
|
93
|
+
/** Minimum width (px) while resizing; defaults to 50 when resizing is enabled. */
|
|
94
|
+
minResizableWidth?: number;
|
|
95
|
+
/** Maximum width (px) while resizing. */
|
|
96
|
+
maxResizableWidth?: number;
|
|
97
|
+
headerClass?: string | string[] | Record<string, boolean>;
|
|
98
|
+
headerStyle?: Record<string, string | number>;
|
|
99
|
+
cellClass?: string | string[] | Record<string, boolean> | ((row: T, rowIndex: number) => string | string[] | Record<string, boolean>);
|
|
100
|
+
cellStyle?: Record<string, string | number> | ((row: T, rowIndex: number) => Record<string, string | number> | null | undefined);
|
|
22
101
|
required?: boolean;
|
|
23
102
|
}
|
|
24
103
|
|
|
104
|
+
declare class NgbPaginationComponent {
|
|
105
|
+
page: number;
|
|
106
|
+
pageSize: number;
|
|
107
|
+
collectionSize: number;
|
|
108
|
+
/** @deprecated Use `buttonCount`. Kept for compatibility. */
|
|
109
|
+
maxSize: number;
|
|
110
|
+
buttonCount?: number;
|
|
111
|
+
previousNext: boolean;
|
|
112
|
+
pagerType: 'numeric' | 'input';
|
|
113
|
+
responsive: boolean;
|
|
114
|
+
pageChange: EventEmitter<number>;
|
|
115
|
+
get effectiveButtonCount(): number;
|
|
116
|
+
get totalPages(): number;
|
|
117
|
+
get pages(): Array<number | '…'>;
|
|
118
|
+
go(p: number | string): void;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbPaginationComponent, never>;
|
|
120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbPaginationComponent, "ngb-pagination", never, { "page": { "alias": "page"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "collectionSize": { "alias": "collectionSize"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "buttonCount": { "alias": "buttonCount"; "required": false; }; "previousNext": { "alias": "previousNext"; "required": false; }; "pagerType": { "alias": "pagerType"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type NgbPagerType = 'numeric' | 'input';
|
|
124
|
+
/**
|
|
125
|
+
* Responsive pager density based on container width.
|
|
126
|
+
* - `full`: info, pagination, and page-size controls
|
|
127
|
+
* - `compact`: hides range info
|
|
128
|
+
* - `minimal`: hides range info and page-size controls (pagination remains)
|
|
129
|
+
*/
|
|
130
|
+
type NgbPagerDensity = 'full' | 'compact' | 'minimal';
|
|
131
|
+
/** Width breakpoints (px) for {@link ngbResolvePagerDensity}. */
|
|
132
|
+
declare const NGB_PAGER_BREAKPOINTS: {
|
|
133
|
+
readonly fullMinWidth: 520;
|
|
134
|
+
readonly compactMinWidth: 360;
|
|
135
|
+
};
|
|
136
|
+
/** Configuration for {@link NgbPagerComponent}. */
|
|
137
|
+
interface NgbPagerSettings {
|
|
138
|
+
/** Maximum numeric page buttons before ellipsis collapse. Default `10`. */
|
|
139
|
+
buttonCount?: number;
|
|
140
|
+
/** Shows the current range and total record count. Default `true`. */
|
|
141
|
+
info?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Page-size presets. `false` hides the control (set `pageSize` yourself).
|
|
144
|
+
* The active `pageSize` is included when it is not already in the list.
|
|
145
|
+
*/
|
|
146
|
+
pageSizes?: false | number[];
|
|
147
|
+
/** Shows previous/next pager buttons. Default `true`. */
|
|
148
|
+
previousNext?: boolean;
|
|
149
|
+
/** `numeric` (page buttons) or `input` (type a page number). Default `numeric`. */
|
|
150
|
+
type?: NgbPagerType;
|
|
151
|
+
/**
|
|
152
|
+
* When `true` (default), hides info and page-size controls as the container narrows.
|
|
153
|
+
* When `false`, all controls stay visible and wrap onto new rows.
|
|
154
|
+
*/
|
|
155
|
+
responsive?: boolean;
|
|
156
|
+
}
|
|
157
|
+
declare const NGB_PAGER_DEFAULT_SETTINGS: Required<Omit<NgbPagerSettings, 'pageSizes'>> & {
|
|
158
|
+
pageSizes: false | number[];
|
|
159
|
+
};
|
|
160
|
+
declare function ngbResolvePagerSettings(settings: boolean | NgbPagerSettings | null | undefined): NgbPagerSettings | null;
|
|
161
|
+
declare function ngbResolvePagerDensity(width: number): NgbPagerDensity;
|
|
162
|
+
declare function ngbResolvePagerPageSizeOptions(pageSizes: false | number[] | undefined, pageSize: number): number[];
|
|
163
|
+
declare function ngbPagerButtonCountForDensity(base: number, density: NgbPagerDensity, responsive: boolean): number;
|
|
164
|
+
declare function ngbFormatPagerRangeLabel(start: number, end: number, total: number, template?: string): string;
|
|
165
|
+
|
|
166
|
+
declare class NgbPagerComponent implements AfterViewInit, OnDestroy {
|
|
167
|
+
private readonly cdr;
|
|
168
|
+
private static nextId;
|
|
169
|
+
private readonly uid;
|
|
170
|
+
readonly pageSizeSelectId: string;
|
|
171
|
+
pagerDensity: NgbPagerDensity;
|
|
172
|
+
private resizeObserver?;
|
|
173
|
+
pagerRoot?: ElementRef<HTMLElement>;
|
|
174
|
+
page: number;
|
|
175
|
+
pageSize: number;
|
|
176
|
+
collectionSize: number;
|
|
177
|
+
settings: boolean | NgbPagerSettings | null;
|
|
178
|
+
/** Overrides the default range label when `info` is enabled. */
|
|
179
|
+
infoLabel?: string;
|
|
180
|
+
rangeLabelTemplate: string;
|
|
181
|
+
rowsPerPageLabel: string;
|
|
182
|
+
/** When set, overrides `settings.responsive`. */
|
|
183
|
+
responsive?: boolean;
|
|
184
|
+
pageChange: EventEmitter<number>;
|
|
185
|
+
pageSizeChange: EventEmitter<number>;
|
|
186
|
+
constructor(cdr: ChangeDetectorRef);
|
|
187
|
+
get resolved(): NgbPagerSettings;
|
|
188
|
+
get responsiveEnabled(): boolean;
|
|
189
|
+
get showInfoSetting(): boolean;
|
|
190
|
+
get showPageSizesSetting(): boolean;
|
|
191
|
+
get showInfo(): boolean;
|
|
192
|
+
get showPageSizes(): boolean;
|
|
193
|
+
get previousNextEnabled(): boolean;
|
|
194
|
+
get pagerType(): 'numeric' | 'input';
|
|
195
|
+
get effectiveButtonCount(): number;
|
|
196
|
+
get resolvedPageSizeOptions(): number[];
|
|
197
|
+
get displayInfoLabel(): string;
|
|
198
|
+
ngAfterViewInit(): void;
|
|
199
|
+
ngOnDestroy(): void;
|
|
200
|
+
onPageChange(page: number): void;
|
|
201
|
+
onPageSizeChange(size: number): void;
|
|
202
|
+
private observeWidth;
|
|
203
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbPagerComponent, never>;
|
|
204
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbPagerComponent, "ngb-pager", never, { "page": { "alias": "page"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "collectionSize": { "alias": "collectionSize"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "infoLabel": { "alias": "infoLabel"; "required": false; }; "rangeLabelTemplate": { "alias": "rangeLabelTemplate"; "required": false; }; "rowsPerPageLabel": { "alias": "rowsPerPageLabel"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
type NgbDatagridPagerType = NgbPagerType;
|
|
208
|
+
type NgbDatagridPagerPosition = 'top' | 'bottom' | 'both';
|
|
209
|
+
type NgbDatagridPagerDensity = NgbPagerDensity;
|
|
210
|
+
/** @deprecated Use {@link NGB_PAGER_BREAKPOINTS}. */
|
|
211
|
+
declare const NGB_DATAGRID_PAGER_BREAKPOINTS: {
|
|
212
|
+
readonly fullMinWidth: 520;
|
|
213
|
+
readonly compactMinWidth: 360;
|
|
214
|
+
};
|
|
215
|
+
/** Pager configuration for {@link Datagrid} via `[pageable]`. */
|
|
216
|
+
interface NgbDatagridPageableSettings extends NgbPagerSettings {
|
|
217
|
+
/** Pager placement relative to the table. Default `bottom`. */
|
|
218
|
+
position?: NgbDatagridPagerPosition;
|
|
219
|
+
}
|
|
220
|
+
declare const NGB_DATAGRID_DEFAULT_PAGEABLE: Required<Omit<NgbDatagridPageableSettings, 'pageSizes'>> & {
|
|
221
|
+
pageSizes: false | number[];
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
declare function ngbResolvePageableSettings(pageable: boolean | NgbDatagridPageableSettings | null | undefined, legacy?: {
|
|
225
|
+
enablePagination?: boolean;
|
|
226
|
+
pageSizeOptions?: number[];
|
|
227
|
+
}): NgbDatagridPageableSettings | null;
|
|
228
|
+
/** Settings for {@link NgbPagerComponent} (excludes grid-only `position`). */
|
|
229
|
+
declare function ngbDatagridPagerSettings(pageable: NgbDatagridPageableSettings): NgbPagerSettings;
|
|
230
|
+
declare function ngbResolveDatagridPagerSettings(pageable: boolean | NgbDatagridPageableSettings | null | undefined, legacy?: {
|
|
231
|
+
enablePagination?: boolean;
|
|
232
|
+
pageSizeOptions?: number[];
|
|
233
|
+
}): NgbPagerSettings | null;
|
|
234
|
+
|
|
25
235
|
interface CellCtx<T = any> {
|
|
26
236
|
$implicit: any;
|
|
27
237
|
row: T;
|
|
@@ -41,10 +251,30 @@ interface FilterCtx<T = any> {
|
|
|
41
251
|
$implicit: AbstractControl | null;
|
|
42
252
|
control: AbstractControl | null;
|
|
43
253
|
col: ColumnDef<T>;
|
|
254
|
+
/** Column field name (same as `col.field`). */
|
|
255
|
+
field: string;
|
|
256
|
+
descriptor: NgbFilterDescriptor | null;
|
|
257
|
+
/** Current composite filter root (clone). Use with `filterChange` for custom filter templates. */
|
|
258
|
+
filter: NgbCompositeFilterDescriptor;
|
|
259
|
+
operators: NgbFilterOperator[];
|
|
260
|
+
setOperator: (operator: NgbFilterOperator) => void;
|
|
261
|
+
setValue: (value: any) => void;
|
|
262
|
+
clear: () => void;
|
|
263
|
+
/** Replaces the grid filter state and emits `filterChange` when enabled. */
|
|
264
|
+
filterChange: (filter: NgbCompositeFilterDescriptor) => void;
|
|
265
|
+
/** Sets this column's field filter in the current descriptor and commits. */
|
|
266
|
+
setFieldFilter: (operator: NgbFilterOperator, value?: any) => void;
|
|
44
267
|
}
|
|
45
268
|
interface GlobalFilterCtx {
|
|
46
269
|
$implicit: AbstractControl;
|
|
47
270
|
}
|
|
271
|
+
interface PagerCtx<T = any> {
|
|
272
|
+
grid: T;
|
|
273
|
+
page: number;
|
|
274
|
+
pageSize: number;
|
|
275
|
+
total: number;
|
|
276
|
+
pageCount: number;
|
|
277
|
+
}
|
|
48
278
|
declare class NgbCellTemplate<T = any> {
|
|
49
279
|
readonly template: TemplateRef<CellCtx<T>>;
|
|
50
280
|
field: string;
|
|
@@ -66,6 +296,13 @@ declare class NgbFilterTemplate<T = any> {
|
|
|
66
296
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterTemplate<any>, never>;
|
|
67
297
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterTemplate<any>, "ng-template[ngbFilter]", never, { "field": { "alias": "ngbFilter"; "required": false; }; }, {}, never, never, true, never>;
|
|
68
298
|
}
|
|
299
|
+
declare class NgbFilterMenuTemplate<T = any> {
|
|
300
|
+
readonly template: TemplateRef<FilterCtx<T>>;
|
|
301
|
+
field: string;
|
|
302
|
+
constructor(template: TemplateRef<FilterCtx<T>>);
|
|
303
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterMenuTemplate<any>, never>;
|
|
304
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterMenuTemplate<any>, "ng-template[ngbFilterMenu]", never, { "field": { "alias": "ngbFilterMenu"; "required": false; }; }, {}, never, never, true, never>;
|
|
305
|
+
}
|
|
69
306
|
declare class NgbGlobalFilterTemplate {
|
|
70
307
|
readonly template: TemplateRef<GlobalFilterCtx>;
|
|
71
308
|
constructor(template: TemplateRef<GlobalFilterCtx>);
|
|
@@ -84,12 +321,69 @@ declare class NgbRowDetailTemplate<T = any> {
|
|
|
84
321
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbRowDetailTemplate<any>, never>;
|
|
85
322
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbRowDetailTemplate<any>, "ng-template[ngbRowDetail]", never, {}, {}, never, never, true, never>;
|
|
86
323
|
}
|
|
324
|
+
declare class NgbPagerTemplate<T = any> {
|
|
325
|
+
readonly template: TemplateRef<PagerCtx<T>>;
|
|
326
|
+
constructor(template: TemplateRef<PagerCtx<T>>);
|
|
327
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbPagerTemplate<any>, never>;
|
|
328
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPagerTemplate<any>, "ng-template[ngbPager]", never, {}, {}, never, never, true, never>;
|
|
329
|
+
}
|
|
87
330
|
/** Handy constant to import in consumer apps */
|
|
88
|
-
declare const DATAGRID_TEMPLATE_DIRECTIVES: (typeof NgbCellTemplate | typeof NgbGlobalFilterTemplate)[];
|
|
331
|
+
declare const DATAGRID_TEMPLATE_DIRECTIVES: (typeof NgbCellTemplate | typeof NgbFilterTemplate | typeof NgbGlobalFilterTemplate | typeof NgbPagerTemplate)[];
|
|
89
332
|
|
|
333
|
+
type NgbDataGridSortDirection = 'asc' | 'desc';
|
|
334
|
+
interface NgbDataGridSortDescriptor {
|
|
335
|
+
field: string;
|
|
336
|
+
direction: NgbDataGridSortDirection;
|
|
337
|
+
}
|
|
338
|
+
interface NgbDataGridState {
|
|
339
|
+
/** 1-based page number used by the DataGrid pager. */
|
|
340
|
+
page?: number;
|
|
341
|
+
/** 0-based page index for API integrations that use page indexes. */
|
|
342
|
+
pageIndex?: number;
|
|
343
|
+
/** Number of records skipped before the current page. */
|
|
344
|
+
skip?: number;
|
|
345
|
+
pageSize?: number;
|
|
346
|
+
sort?: NgbDataGridSortDescriptor[];
|
|
347
|
+
filter?: NgbCompositeFilterDescriptor;
|
|
348
|
+
globalFilter?: string;
|
|
349
|
+
}
|
|
350
|
+
type NgbDataGridAggregateFunction = 'count' | 'sum' | 'average' | 'min' | 'max';
|
|
351
|
+
interface NgbDataGridAggregateDescriptor {
|
|
352
|
+
field: string;
|
|
353
|
+
aggregate: NgbDataGridAggregateFunction;
|
|
354
|
+
}
|
|
355
|
+
type NgbDataGridAggregateResults = Record<string, Partial<Record<NgbDataGridAggregateFunction, number | string | Date | null>>>;
|
|
356
|
+
interface NgbDataGridProcessOptions<T = unknown> {
|
|
357
|
+
state?: NgbDataGridState | null;
|
|
358
|
+
aggregates?: NgbDataGridAggregateDescriptor[];
|
|
359
|
+
globalFilterFields?: string[];
|
|
360
|
+
columns?: Array<{
|
|
361
|
+
field: Extract<keyof T, string> | string;
|
|
362
|
+
type?: string;
|
|
363
|
+
filterType?: string;
|
|
364
|
+
}>;
|
|
365
|
+
/**
|
|
366
|
+
* When false, returns the filtered/sorted full result without page slicing.
|
|
367
|
+
* Aggregates are always calculated before page slicing.
|
|
368
|
+
*/
|
|
369
|
+
page?: boolean;
|
|
370
|
+
}
|
|
371
|
+
interface NgbDataGridDataResult<T = unknown> {
|
|
372
|
+
data: T[];
|
|
373
|
+
total: number;
|
|
374
|
+
aggregates?: NgbDataGridAggregateResults;
|
|
375
|
+
}
|
|
90
376
|
type NgbDataGridExportType = 'pdf' | 'excel' | 'both';
|
|
91
377
|
type NgbDataGridExportPages = 'all' | 'current' | 'selection';
|
|
92
|
-
type NgbDataGridTheme = 'material' | 'tailwind' | '
|
|
378
|
+
type NgbDataGridTheme = 'bootstrap' | 'bootstrap-main' | 'bootstrap-main-dark' | 'bootstrap-nordic' | 'bootstrap-urban' | 'bootstrap-vintage' | 'material' | 'material-main' | 'material-indigo' | 'material-deep-purple' | 'tailwind' | 'tailwind-main' | 'tailwind-slate' | 'tailwind-emerald';
|
|
379
|
+
interface NgbDataGridThemeOption {
|
|
380
|
+
value: NgbDataGridTheme;
|
|
381
|
+
label: string;
|
|
382
|
+
group: 'Bootstrap' | 'Material' | 'Tailwind';
|
|
383
|
+
swatches: [string, string, string];
|
|
384
|
+
dark?: boolean;
|
|
385
|
+
}
|
|
386
|
+
declare const NGB_DATAGRID_THEME_OPTIONS: NgbDataGridThemeOption[];
|
|
93
387
|
interface NgbDataGridExportOptions {
|
|
94
388
|
enabled: boolean;
|
|
95
389
|
type: NgbDataGridExportType;
|
|
@@ -112,6 +406,40 @@ interface NgbDataGridResponsiveOptions {
|
|
|
112
406
|
desktop?: number;
|
|
113
407
|
};
|
|
114
408
|
}
|
|
409
|
+
/** Built-in row editing interaction mode. */
|
|
410
|
+
type NgbEditMode = 'inline' | 'incell' | 'external' | 'toolbar';
|
|
411
|
+
/** Labels and visibility for the built-in multi-checkbox filter menu footer. */
|
|
412
|
+
/** Segment returned by {@link Datagrid.getSearchHighlightSegments} for match highlighting. */
|
|
413
|
+
interface NgbSearchHighlightSegment {
|
|
414
|
+
text: string;
|
|
415
|
+
match: boolean;
|
|
416
|
+
}
|
|
417
|
+
/** Placement when calling {@link Datagrid.reorderColumn}. */
|
|
418
|
+
interface NgbColumnReorderOptions {
|
|
419
|
+
/** When true (default), inserts before the column at the destination index. When false, inserts after it. */
|
|
420
|
+
before?: boolean;
|
|
421
|
+
}
|
|
422
|
+
interface NgbColumnReorderEvent<T = any> {
|
|
423
|
+
/** Visible columns in their new order. */
|
|
424
|
+
columns: Array<{
|
|
425
|
+
field: string;
|
|
426
|
+
header: string;
|
|
427
|
+
} & Record<string, unknown>>;
|
|
428
|
+
/** Column that was moved. */
|
|
429
|
+
column: T;
|
|
430
|
+
fromIndex: number;
|
|
431
|
+
toIndex: number;
|
|
432
|
+
/** Ordered field names after the move. */
|
|
433
|
+
fields: string[];
|
|
434
|
+
}
|
|
435
|
+
interface NgbMultiCheckboxFilterOptions {
|
|
436
|
+
/** Primary action label. Default: `OK` */
|
|
437
|
+
applyLabel?: string;
|
|
438
|
+
/** Secondary action label. Default: `Cancel` */
|
|
439
|
+
cancelLabel?: string;
|
|
440
|
+
/** Whether the secondary action is shown. Default: `true` */
|
|
441
|
+
showCancel?: boolean;
|
|
442
|
+
}
|
|
115
443
|
|
|
116
444
|
type NgbDatagridTrackByFn<T> = (index: number, row: T) => any;
|
|
117
445
|
interface NgbDatagridEditService<T> {
|
|
@@ -180,8 +508,142 @@ interface HighlightItem {
|
|
|
180
508
|
columnKey?: any;
|
|
181
509
|
}
|
|
182
510
|
|
|
511
|
+
interface NgbDndDropEvent<T> {
|
|
512
|
+
item: T;
|
|
513
|
+
fromIndex: number;
|
|
514
|
+
toIndex: number;
|
|
515
|
+
fromList: T[];
|
|
516
|
+
toList: T[];
|
|
517
|
+
sameList: boolean;
|
|
518
|
+
}
|
|
519
|
+
interface DndCanDropPayload<T = any> {
|
|
520
|
+
dragItem: T;
|
|
521
|
+
srcList: T[];
|
|
522
|
+
srcIndex: number;
|
|
523
|
+
dstList: T[];
|
|
524
|
+
dstIndex: number;
|
|
525
|
+
isExternal: boolean;
|
|
526
|
+
}
|
|
527
|
+
/** Guard function; return true to allow, false to block */
|
|
528
|
+
type DndCanDropFn<T = any> = (payload: DndCanDropPayload<T>) => boolean;
|
|
529
|
+
declare class NgbDndListDirective<T = unknown> {
|
|
530
|
+
private el;
|
|
531
|
+
private state;
|
|
532
|
+
dndChildrenKey: string | null;
|
|
533
|
+
/** Bind your array here: <div [ngbDndList]="items"> */
|
|
534
|
+
list: T[];
|
|
535
|
+
/** Optional: group barrier across lists */
|
|
536
|
+
dndGroup?: string;
|
|
537
|
+
/** Disable this list */
|
|
538
|
+
dndDisabled: boolean;
|
|
539
|
+
/** NEW: clone if source wasn't a list (e.g. palette) */
|
|
540
|
+
dndCloneOnDrop: boolean;
|
|
541
|
+
/** NEW: custom clone function */
|
|
542
|
+
dndCloneFn?: (item: T) => T;
|
|
543
|
+
dndIsPalette: boolean;
|
|
544
|
+
dndCanDrop: boolean | DndCanDropFn<any>;
|
|
545
|
+
private _denied;
|
|
546
|
+
get denied(): boolean;
|
|
547
|
+
dndAriaLabel?: string;
|
|
548
|
+
get ariaLabel(): string | null;
|
|
549
|
+
/** Fires after item is inserted */
|
|
550
|
+
dndDropped: EventEmitter<NgbDndDropEvent<T>>;
|
|
551
|
+
role: string;
|
|
552
|
+
hostClass: boolean;
|
|
553
|
+
private hover;
|
|
554
|
+
get isOver(): boolean;
|
|
555
|
+
private canDrop;
|
|
556
|
+
get dataDropValid(): "true" | "false" | null;
|
|
557
|
+
private placeholder?;
|
|
558
|
+
private lastIndex;
|
|
559
|
+
onDragEnter(ev: DragEvent): void;
|
|
560
|
+
onDragOver(ev: DragEvent): void;
|
|
561
|
+
onDragLeave(ev: DragEvent): void;
|
|
562
|
+
onDocumentDrop(ev: DragEvent): void;
|
|
563
|
+
onDrop(ev: DragEvent): void;
|
|
564
|
+
onDocumentDragFinished(): void;
|
|
565
|
+
private getSession;
|
|
566
|
+
private ensurePlaceholder;
|
|
567
|
+
private removePlaceholder;
|
|
568
|
+
private resetVisualState;
|
|
569
|
+
private positionPlaceholderAt;
|
|
570
|
+
private indexFromPointer;
|
|
571
|
+
private draggableChildren;
|
|
572
|
+
private cloneItem;
|
|
573
|
+
private isDroppingIntoOwnDescendant;
|
|
574
|
+
/**
|
|
575
|
+
* Build a guard payload using whatever drag context you already store.
|
|
576
|
+
* If some fields don’t exist in your code, the fallbacks keep it working.
|
|
577
|
+
*/
|
|
578
|
+
private _buildGuardPayload;
|
|
579
|
+
/**
|
|
580
|
+
* Compute destination index from the event position (no placeholder var needed).
|
|
581
|
+
* Uses vertical list heuristics; adjust for horizontal if your list is horizontal.
|
|
582
|
+
*/
|
|
583
|
+
private _computeDropIndex;
|
|
584
|
+
private _allowDrop;
|
|
585
|
+
private performDrop;
|
|
586
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndListDirective<any>, never>;
|
|
587
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndListDirective<any>, "[ngbDndList]", never, { "dndChildrenKey": { "alias": "dndChildrenKey"; "required": false; }; "list": { "alias": "ngbDndList"; "required": false; }; "dndGroup": { "alias": "dndGroup"; "required": false; }; "dndDisabled": { "alias": "dndDisabled"; "required": false; }; "dndCloneOnDrop": { "alias": "dndCloneOnDrop"; "required": false; }; "dndCloneFn": { "alias": "dndCloneFn"; "required": false; }; "dndIsPalette": { "alias": "dndIsPalette"; "required": false; }; "dndCanDrop": { "alias": "dndCanDrop"; "required": false; }; "dndAriaLabel": { "alias": "dndAriaLabel"; "required": false; }; }, { "dndDropped": "dndDropped"; }, never, never, true, never>;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Localizable strings for built-in datagrid UI (pagination, filters, actions, a11y). */
|
|
591
|
+
interface NgbDatagridLabels {
|
|
592
|
+
paginationRange?: string;
|
|
593
|
+
rowsPerPage?: string;
|
|
594
|
+
emptyState?: string;
|
|
595
|
+
booleanYes?: string;
|
|
596
|
+
booleanNo?: string;
|
|
597
|
+
selectAll?: string;
|
|
598
|
+
unselectAll?: string;
|
|
599
|
+
selectRow?: string;
|
|
600
|
+
unselectRow?: string;
|
|
601
|
+
globalFilter?: string;
|
|
602
|
+
expandRow?: string;
|
|
603
|
+
collapseRow?: string;
|
|
604
|
+
exportPdf?: string;
|
|
605
|
+
exportExcel?: string;
|
|
606
|
+
stickyRowToggle?: string;
|
|
607
|
+
editRow?: string;
|
|
608
|
+
deleteRow?: string;
|
|
609
|
+
reorderColumn?: string;
|
|
610
|
+
resizeColumn?: string;
|
|
611
|
+
openFilterMenu?: string;
|
|
612
|
+
clearFilter?: string;
|
|
613
|
+
filterOperator?: string;
|
|
614
|
+
columnFilter?: string;
|
|
615
|
+
sortBy?: string;
|
|
616
|
+
stickyBadge?: string;
|
|
617
|
+
addRow?: string;
|
|
618
|
+
addRowButton?: string;
|
|
619
|
+
save?: string;
|
|
620
|
+
cancel?: string;
|
|
621
|
+
edit?: string;
|
|
622
|
+
delete?: string;
|
|
623
|
+
multiCheckboxApply?: string;
|
|
624
|
+
multiCheckboxCancel?: string;
|
|
625
|
+
combineConditions?: string;
|
|
626
|
+
searchFilterValues?: string;
|
|
627
|
+
}
|
|
628
|
+
declare const NGB_DATAGRID_DEFAULT_LABELS: Required<NgbDatagridLabels>;
|
|
629
|
+
/** Documented keyboard shortcuts when [keyboardNavigation] is enabled. */
|
|
630
|
+
declare const NGB_DATAGRID_KEYBOARD_SHORTCUTS: {
|
|
631
|
+
readonly moveCell: "Arrow keys — move focus between data cells";
|
|
632
|
+
readonly firstLastColumn: "Home / End — first or last column in the row";
|
|
633
|
+
readonly firstLastRow: "Ctrl+Home / Ctrl+End — first or last row on the page";
|
|
634
|
+
readonly sortColumn: "Enter on focused sortable header — cycle sort";
|
|
635
|
+
readonly toggleSelection: "Space on a focused row — toggle row selection (when enabled)";
|
|
636
|
+
readonly pagePrevNext: "Alt+Page Up / Alt+Page Down — previous or next page (when paginated)";
|
|
637
|
+
readonly openFilter: "F3 on a focused column — open row filter operator menu (row filter mode)";
|
|
638
|
+
readonly cancelOverlay: "Escape — close filter menus and cancel in-cell edit";
|
|
639
|
+
readonly commitIncell: "Enter — commit in-cell edit; Arrow keys move between editable cells while editing";
|
|
640
|
+
};
|
|
641
|
+
type NgbDatagridTextDirection = 'ltr' | 'rtl' | 'auto';
|
|
642
|
+
declare function ngbFormatDatagridLabel(template: string, tokens: Record<string, string | number>): string;
|
|
643
|
+
|
|
183
644
|
type SortDir = 'asc' | 'desc' | '';
|
|
184
645
|
type KeyOf<T> = Extract<keyof T, string>;
|
|
646
|
+
type UtilityColumnKind = 'selection' | 'detail' | 'sticky-toggle' | 'actions';
|
|
185
647
|
type NgbTableResponsive = true | false | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
186
648
|
interface NgbTableOptions {
|
|
187
649
|
stripedRows?: boolean;
|
|
@@ -199,7 +661,15 @@ interface NgbTableOptions {
|
|
|
199
661
|
stickyHeader?: boolean;
|
|
200
662
|
stickyFooter?: boolean;
|
|
201
663
|
stickyRows?: boolean;
|
|
664
|
+
density?: 'comfortable' | 'compact';
|
|
665
|
+
stacked?: boolean;
|
|
666
|
+
/** `list` = single-column cards; `cards` = multi-column card rows (use `stackedGroup` on columns). */
|
|
667
|
+
stackedLayout?: 'list' | 'cards';
|
|
668
|
+
/** Alternating row backgrounds in the table body (Figma patient grid). */
|
|
669
|
+
zebraStripes?: boolean;
|
|
202
670
|
}
|
|
671
|
+
/** Tabular columns vs adaptive stacked cards (`stacked` in {@link NgbTableOptions}). */
|
|
672
|
+
type NgbDataLayoutMode = 'tabular' | 'stacked';
|
|
203
673
|
type NgbSelectionMode = 'none' | 'single' | 'multiple';
|
|
204
674
|
type NgbSelectionBehavior = 'row' | 'checkbox' | 'both';
|
|
205
675
|
type NgbSelectionKeyMode = 'desktop' | 'mobile';
|
|
@@ -211,19 +681,79 @@ interface NgbSelectionLabels {
|
|
|
211
681
|
selectRow?: string;
|
|
212
682
|
unselectRow?: string;
|
|
213
683
|
}
|
|
214
|
-
declare class Datagrid<T = any> implements AfterContentInit,
|
|
684
|
+
declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
|
|
215
685
|
/** Column definitions to render */
|
|
216
|
-
|
|
686
|
+
private _columns;
|
|
687
|
+
get columns(): ColumnDef<T>[];
|
|
688
|
+
set columns(value: ColumnDef<T>[] | null | undefined);
|
|
217
689
|
/** Row data to display */
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
690
|
+
private _data;
|
|
691
|
+
get data(): T[];
|
|
692
|
+
set data(value: T[] | null | undefined);
|
|
693
|
+
/**
|
|
694
|
+
* When `true`, shows a loading overlay and sets `aria-busy` on the grid root.
|
|
695
|
+
* Use while fetching remote data before assigning `[data]`.
|
|
696
|
+
*/
|
|
697
|
+
loading: boolean;
|
|
698
|
+
/**
|
|
699
|
+
* Total record count for paging and range labels when using server-side data binding.
|
|
700
|
+
* When set and greater than `data.length`, the grid treats `[data]` as the current page only
|
|
701
|
+
* (no client-side page slicing). Omit for local in-memory arrays.
|
|
702
|
+
*/
|
|
703
|
+
private _total;
|
|
704
|
+
get total(): number | null;
|
|
705
|
+
set total(value: number | null | undefined);
|
|
706
|
+
private _enableSorting;
|
|
707
|
+
get enableSorting(): boolean;
|
|
708
|
+
set enableSorting(value: boolean);
|
|
709
|
+
private _enableFiltering;
|
|
710
|
+
get enableFiltering(): boolean;
|
|
711
|
+
set enableFiltering(value: boolean);
|
|
712
|
+
private _filterable;
|
|
713
|
+
get filterable(): NgbFilterable;
|
|
714
|
+
set filterable(value: NgbFilterable | null | undefined);
|
|
715
|
+
private _enableGlobalFilter;
|
|
716
|
+
get enableGlobalFilter(): boolean;
|
|
717
|
+
set enableGlobalFilter(value: boolean);
|
|
718
|
+
private _filterMode;
|
|
719
|
+
get filterMode(): NgbFilterMode;
|
|
720
|
+
set filterMode(value: NgbFilterMode | null | undefined);
|
|
721
|
+
private _filter;
|
|
722
|
+
get filter(): NgbCompositeFilterDescriptor | null;
|
|
723
|
+
set filter(value: NgbCompositeFilterDescriptor | null | undefined);
|
|
724
|
+
filterOperators?: Partial<Record<ColumnType, NgbFilterOperator[]>>;
|
|
725
|
+
filterManual: boolean;
|
|
726
|
+
externalFiltering: boolean;
|
|
727
|
+
/** Opts local arrays into the reusable DataGrid operation helper for filter/sort/page processing. */
|
|
728
|
+
private _dataOperations;
|
|
729
|
+
get dataOperations(): boolean | NgbDataGridProcessOptions<T>;
|
|
730
|
+
set dataOperations(value: boolean | NgbDataGridProcessOptions<T> | null | undefined);
|
|
731
|
+
/**
|
|
732
|
+
* Optional controlled data-operation state. When provided, the grid syncs page, pageSize,
|
|
733
|
+
* sort, filter, and global filter from this object.
|
|
734
|
+
*/
|
|
735
|
+
private _state;
|
|
736
|
+
get state(): NgbDataGridState | null;
|
|
737
|
+
set state(value: NgbDataGridState | null | undefined);
|
|
738
|
+
/** Footer actions for the built-in multi-checkbox filter menu. */
|
|
739
|
+
multiCheckboxFilterOptions: NgbMultiCheckboxFilterOptions;
|
|
740
|
+
private _enablePagination;
|
|
741
|
+
get enablePagination(): boolean;
|
|
742
|
+
set enablePagination(value: boolean);
|
|
743
|
+
/**
|
|
744
|
+
* Pager configuration. `true` enables the pager with defaults; pass an object to customize.
|
|
745
|
+
* When set, pagination is active even if `[enablePagination]` is false.
|
|
746
|
+
*/
|
|
747
|
+
private _pageable;
|
|
748
|
+
get pageable(): boolean | NgbDatagridPageableSettings;
|
|
749
|
+
set pageable(value: boolean | NgbDatagridPageableSettings | null | undefined);
|
|
223
750
|
enableEdit: boolean;
|
|
224
751
|
enableDelete: boolean;
|
|
752
|
+
/** @deprecated Prefer `pageable.pageSizes`. Kept for `[enablePagination]` compatibility. */
|
|
225
753
|
pageSizeOptions: number[];
|
|
226
|
-
|
|
754
|
+
private _enableAdd;
|
|
755
|
+
get enableAdd(): boolean;
|
|
756
|
+
set enableAdd(value: boolean);
|
|
227
757
|
/** Accessible label (aria-label) applied to the add-row button. */
|
|
228
758
|
addButtonAriaLabel: string | null;
|
|
229
759
|
/** Visible text rendered inside the add-row button. */
|
|
@@ -234,7 +764,7 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
234
764
|
stickyHeader: boolean;
|
|
235
765
|
/** Enables sticky footer when scrolling. */
|
|
236
766
|
stickyFooter: boolean;
|
|
237
|
-
/** Enables scroll
|
|
767
|
+
/** Enables scroll table body container */
|
|
238
768
|
scrollable: boolean;
|
|
239
769
|
/** Row height used to stack multiple sticky rows without overlap (px). */
|
|
240
770
|
stickyRowHeight: number;
|
|
@@ -243,7 +773,14 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
243
773
|
/** Footer height (px) used to offset scrollable area. */
|
|
244
774
|
stickyFooterHeight: number;
|
|
245
775
|
/** Bootstrap-like table styling options. */
|
|
246
|
-
|
|
776
|
+
private _tableOptions;
|
|
777
|
+
get tableOptions(): NgbTableOptions;
|
|
778
|
+
set tableOptions(value: NgbTableOptions | null | undefined);
|
|
779
|
+
/**
|
|
780
|
+
* When set, overrides `tableOptions.stacked` for layout mode.
|
|
781
|
+
* Use `'stacked'` for card/label-value rows or `'tabular'` for the standard column grid.
|
|
782
|
+
*/
|
|
783
|
+
dataLayoutMode: NgbDataLayoutMode | null;
|
|
247
784
|
/** Selection mode for rows. */
|
|
248
785
|
selectionMode: NgbSelectionMode;
|
|
249
786
|
/** Selection activation: row click, checkbox only, or both. */
|
|
@@ -257,14 +794,21 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
257
794
|
/** Disable selection for specific rows. */
|
|
258
795
|
selectionDisabledFn?: (row: T, index: number) => boolean;
|
|
259
796
|
/** Highlight items (row/cell). */
|
|
260
|
-
|
|
797
|
+
private _highlightedIndex;
|
|
798
|
+
get highlightedIndex(): HighlightItem[];
|
|
799
|
+
set highlightedIndex(value: HighlightItem[] | null | undefined);
|
|
261
800
|
/** Row key for highlighting. */
|
|
262
801
|
highlightRowKey: NgbRowKey | null;
|
|
263
802
|
/** Column key for highlighting. */
|
|
264
803
|
highlightColKey: NgbColKey | null;
|
|
265
|
-
scrollbarWidth: number;
|
|
266
804
|
/** Accessible label for the global filter input. */
|
|
267
805
|
globalFilterAriaLabel: string;
|
|
806
|
+
/** Placeholder for the built-in global search input. */
|
|
807
|
+
globalFilterPlaceholder: string;
|
|
808
|
+
/** When set, matching substrings in visible cells are wrapped with `.grid-search-highlight`. */
|
|
809
|
+
searchHighlightTerm: string;
|
|
810
|
+
/** Column fields included in search highlighting; all visible columns when empty. */
|
|
811
|
+
searchHighlightFields: string[] | null;
|
|
268
812
|
/** Accessible label announced when expanding a row. */
|
|
269
813
|
expandRowAriaLabel: string;
|
|
270
814
|
/** Accessible label announced when collapsing a row. */
|
|
@@ -277,18 +821,54 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
277
821
|
newRowDefaults: Partial<Record<KeyOf<T>, any>> | (() => Partial<Record<KeyOf<T>, any>>) | null;
|
|
278
822
|
strictEmail: boolean;
|
|
279
823
|
editOnRowClick: boolean;
|
|
824
|
+
/** Row editing interaction: inline actions, in-cell, external dialog, or toolbar selection. */
|
|
825
|
+
editMode: NgbEditMode;
|
|
826
|
+
/** Hint shown in toolbar editing mode when a row is selected. */
|
|
827
|
+
toolbarEditHint: string;
|
|
280
828
|
singleExpand: boolean;
|
|
281
|
-
|
|
829
|
+
private _exportOptions;
|
|
830
|
+
get exportOptions(): NgbDataGridExportOptions;
|
|
831
|
+
set exportOptions(value: NgbDataGridExportOptions | null | undefined);
|
|
282
832
|
theme: NgbDataGridTheme;
|
|
283
833
|
responsive: NgbDataGridResponsiveOptions | boolean;
|
|
284
834
|
trackBy?: NgbDatagridTrackByFn<T>;
|
|
835
|
+
rowClass?: string | string[] | Record<string, boolean> | ((row: T, rowIndex: number) => string | string[] | Record<string, boolean>);
|
|
836
|
+
rowStyle?: Record<string, string | number> | ((row: T, rowIndex: number) => Record<string, string | number> | null | undefined);
|
|
837
|
+
rowReorderable: boolean;
|
|
838
|
+
private _columnReorderable;
|
|
839
|
+
get columnReorderable(): boolean;
|
|
840
|
+
set columnReorderable(value: boolean);
|
|
841
|
+
/** Enables drag-to-resize on column headers (requires explicit column widths). */
|
|
842
|
+
private _resizable;
|
|
843
|
+
get resizable(): boolean;
|
|
844
|
+
set resizable(value: boolean);
|
|
845
|
+
/** Render row actions as icon-only square buttons (Figma editing screen). */
|
|
846
|
+
actionDisplay: 'text' | 'icons';
|
|
847
|
+
/** Show a STICKY badge on the configured column when a row is pinned. */
|
|
848
|
+
showStickyRowBadge: boolean;
|
|
849
|
+
stickyRowBadgeField: string | null;
|
|
850
|
+
stickyRowBadgeLabel: string;
|
|
851
|
+
/** Localized strings for built-in UI; individual aria/text inputs override matching keys. */
|
|
852
|
+
labels: NgbDatagridLabels;
|
|
853
|
+
/** BCP 47 locale for pagination range and number formatting (e.g. `en-US`, `ar-SA`). */
|
|
854
|
+
locale: string | null;
|
|
855
|
+
/** Text direction on the grid root; `auto` inherits from document or parent `dir`. */
|
|
856
|
+
dir: NgbDatagridTextDirection;
|
|
857
|
+
/** Enables arrow-key cell focus, Space selection, Alt+Page paging, and F3 filter shortcuts. */
|
|
858
|
+
keyboardNavigation: boolean;
|
|
285
859
|
editService?: NgbDatagridEditService<T>;
|
|
286
860
|
dataProviderAll?: () => Observable<any[]> | Promise<any[]> | any[];
|
|
287
861
|
dataProviderSelection?: () => any[];
|
|
288
862
|
exportButtonDir?: ExportButtonDirective;
|
|
289
863
|
bodyScroller?: ElementRef<HTMLElement>;
|
|
290
864
|
headerScroller?: ElementRef<HTMLElement>;
|
|
865
|
+
private hostEl;
|
|
291
866
|
colgroupSyncId: string;
|
|
867
|
+
private columnWidthOverrides;
|
|
868
|
+
private resizeSession;
|
|
869
|
+
private columnOrder;
|
|
870
|
+
columnDragField: string | null;
|
|
871
|
+
columnDragOverIndex: number | null;
|
|
292
872
|
exporting: boolean;
|
|
293
873
|
rowAdd: EventEmitter<{
|
|
294
874
|
newRow: T;
|
|
@@ -314,6 +894,7 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
314
894
|
active: string | null;
|
|
315
895
|
direction: "asc" | "desc" | "";
|
|
316
896
|
}>;
|
|
897
|
+
filterChange: EventEmitter<NgbCompositeFilterDescriptor>;
|
|
317
898
|
filtersChange: EventEmitter<{
|
|
318
899
|
global: string;
|
|
319
900
|
columns: Record<string, string>;
|
|
@@ -322,6 +903,7 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
322
903
|
page: number;
|
|
323
904
|
pageSize: number;
|
|
324
905
|
}>;
|
|
906
|
+
dataStateChange: EventEmitter<NgbDataGridState>;
|
|
325
907
|
selectionChange: EventEmitter<{
|
|
326
908
|
selected: T[];
|
|
327
909
|
lastAction: {
|
|
@@ -330,7 +912,15 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
330
912
|
selected: boolean;
|
|
331
913
|
} | null;
|
|
332
914
|
}>;
|
|
915
|
+
rowReorder: EventEmitter<{
|
|
916
|
+
row: T;
|
|
917
|
+
fromIndex: number;
|
|
918
|
+
toIndex: number;
|
|
919
|
+
data: T[];
|
|
920
|
+
}>;
|
|
921
|
+
columnReorder: EventEmitter<NgbColumnReorderEvent<ColumnDef<T>>>;
|
|
333
922
|
rowDetailTpl?: NgbRowDetailTemplate<T>;
|
|
923
|
+
pagerTpl?: NgbPagerTemplate<T>;
|
|
334
924
|
private exporter;
|
|
335
925
|
expanded: Set<number>;
|
|
336
926
|
private fb;
|
|
@@ -339,27 +929,85 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
339
929
|
addingNew: boolean;
|
|
340
930
|
draftNew: Partial<Record<KeyOf<T>, any>> | null;
|
|
341
931
|
errorsNew: Partial<Record<KeyOf<T>, string>>;
|
|
342
|
-
|
|
932
|
+
private _sort;
|
|
933
|
+
get sort(): {
|
|
343
934
|
active: Extract<keyof T, string> | null;
|
|
344
935
|
direction: SortDir;
|
|
345
936
|
};
|
|
937
|
+
set sort(value: {
|
|
938
|
+
active: Extract<keyof T, string> | null;
|
|
939
|
+
direction: SortDir;
|
|
940
|
+
} | null | undefined);
|
|
346
941
|
stickyRowIds: Set<any>;
|
|
347
942
|
selectedRowIds: Set<any>;
|
|
348
943
|
private selectionAnchor;
|
|
349
944
|
private highlightRowMap;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
945
|
+
private _globalFilter;
|
|
946
|
+
get globalFilter(): string;
|
|
947
|
+
set globalFilter(value: string | null | undefined);
|
|
948
|
+
private _filters;
|
|
949
|
+
get filters(): Record<string, string>;
|
|
950
|
+
set filters(value: Record<string, string> | null | undefined);
|
|
951
|
+
private _localFilter;
|
|
952
|
+
get localFilter(): NgbCompositeFilterDescriptor;
|
|
953
|
+
set localFilter(value: NgbCompositeFilterDescriptor | null | undefined);
|
|
954
|
+
openFilterMenuField: string | null;
|
|
955
|
+
openFilterMenuAnchor: HTMLElement | null;
|
|
956
|
+
openRowFilterField: string | null;
|
|
957
|
+
openRowFilterOperatorAnchor: HTMLElement | null;
|
|
958
|
+
openMenuOperatorField: string | null;
|
|
959
|
+
menuDrafts: Record<string, NgbMenuFilterConditionDraft[]>;
|
|
960
|
+
/** Join logic between conditions in a column filter menu (And / Or). */
|
|
961
|
+
menuDraftJoinLogic: Record<string, 'and' | 'or'>;
|
|
962
|
+
multiCheckboxDrafts: Record<string, any[]>;
|
|
963
|
+
multiCheckboxSearch: Record<string, string>;
|
|
964
|
+
private syncingFilterForm;
|
|
965
|
+
private _page;
|
|
966
|
+
get page(): number;
|
|
967
|
+
set page(value: number | null | undefined);
|
|
968
|
+
private _pageSize;
|
|
969
|
+
get pageSize(): number;
|
|
970
|
+
set pageSize(value: number | null | undefined);
|
|
971
|
+
/** Inline / in-cell editing state */
|
|
355
972
|
editingIndex: number | null;
|
|
973
|
+
editingCell: {
|
|
974
|
+
rowIndex: number;
|
|
975
|
+
field: string;
|
|
976
|
+
} | null;
|
|
977
|
+
/** Roving keyboard focus within the current page (data cells). */
|
|
978
|
+
focusedCell: {
|
|
979
|
+
rowIndex: number;
|
|
980
|
+
colIndex: number;
|
|
981
|
+
} | null;
|
|
982
|
+
/** Screen-reader status updates (sort, page, selection). */
|
|
983
|
+
statusMessage: string;
|
|
356
984
|
editForm: FormGroup;
|
|
357
985
|
saveAttemptedEdit: boolean;
|
|
986
|
+
/** External dialog editing state */
|
|
987
|
+
externalEditOpen: boolean;
|
|
988
|
+
externalEditIsNew: boolean;
|
|
989
|
+
externalEditPagedIndex: number | null;
|
|
990
|
+
externalForm: FormGroup;
|
|
991
|
+
saveAttemptedExternal: boolean;
|
|
992
|
+
private externalDialogOpener;
|
|
993
|
+
private externalDialogFocusedOnce;
|
|
358
994
|
addForm: FormGroup;
|
|
359
995
|
saveAttemptedNew: boolean;
|
|
360
996
|
private addDraftRowId;
|
|
361
997
|
private readonly defaultEditService;
|
|
362
998
|
private cdr;
|
|
999
|
+
private resolvedColumnsCache;
|
|
1000
|
+
private visibleColumnsCache;
|
|
1001
|
+
private filteredCache;
|
|
1002
|
+
private sortedCache;
|
|
1003
|
+
private pagedCache;
|
|
1004
|
+
private resolvedColumnsDirty;
|
|
1005
|
+
private visibleColumnsDirty;
|
|
1006
|
+
private filteredDirty;
|
|
1007
|
+
private sortedDirty;
|
|
1008
|
+
private pagedDirty;
|
|
1009
|
+
private rowIndexMap;
|
|
1010
|
+
private rowIndexMapSource;
|
|
363
1011
|
private norm;
|
|
364
1012
|
private keyOf;
|
|
365
1013
|
private getDefaults;
|
|
@@ -369,22 +1017,275 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
369
1017
|
private buildFormFromRow;
|
|
370
1018
|
private strictEmailValidator;
|
|
371
1019
|
get exportButtonTpl(): TemplateRef<ExportButtonContext> | null;
|
|
1020
|
+
get gridHost(): this;
|
|
1021
|
+
get declarativeColumns(): ColumnDef<T>[];
|
|
1022
|
+
get resolvedColumns(): ColumnDef<T>[];
|
|
1023
|
+
get visibleColumns(): ColumnDef<T>[];
|
|
1024
|
+
private invalidateColumnCaches;
|
|
1025
|
+
private invalidateFilteredCaches;
|
|
1026
|
+
private invalidateSortedCaches;
|
|
1027
|
+
private invalidatePagedCache;
|
|
1028
|
+
private invalidateDataCaches;
|
|
1029
|
+
private markGridForCheck;
|
|
1030
|
+
private ensureRowIndexMap;
|
|
1031
|
+
private dataIndexOf;
|
|
1032
|
+
private syncColumnOrder;
|
|
1033
|
+
isColumnReorderEnabled(): boolean;
|
|
1034
|
+
isColumnReorderable(col: ColumnDef<T>): boolean;
|
|
1035
|
+
onColumnDragStart(event: DragEvent, col: ColumnDef<T>, fromIndex: number): void;
|
|
1036
|
+
onColumnDragOver(event: DragEvent, toIndex: number): void;
|
|
1037
|
+
onColumnDragLeave(event: DragEvent, index: number): void;
|
|
1038
|
+
onColumnDrop(event: DragEvent, toIndex: number): void;
|
|
1039
|
+
onColumnDragEnd(): void;
|
|
1040
|
+
/**
|
|
1041
|
+
* Reorders a visible column relative to another visible column index.
|
|
1042
|
+
* Only columns that pass {@link isColumnReorderable} can be moved.
|
|
1043
|
+
*/
|
|
1044
|
+
reorderColumn(column: ColumnDef<T> | Extract<keyof T, string>, destinationIndex: number, options?: NgbColumnReorderOptions, emit?: boolean): void;
|
|
1045
|
+
moveColumn(fromIndex: number, toIndex: number, emit?: boolean): void;
|
|
1046
|
+
private validateColumnConfig;
|
|
1047
|
+
isFilteringEnabled(): boolean;
|
|
1048
|
+
resolvedFilterMode(): NgbFilterMode;
|
|
372
1049
|
get filtered(): T[];
|
|
1050
|
+
private effectiveFilterDescriptor;
|
|
1051
|
+
private legacyFilterDescriptor;
|
|
1052
|
+
private currentGlobalFilter;
|
|
1053
|
+
private matchesComposite;
|
|
1054
|
+
private matchesDescriptor;
|
|
1055
|
+
private normalizeFilterValue;
|
|
1056
|
+
getColumnFilterType(col?: ColumnDef<T>): 'text' | 'numeric' | 'boolean' | 'date' | 'select';
|
|
1057
|
+
isMultiCheckboxMode(col: ColumnDef<T>): boolean;
|
|
1058
|
+
getAllowedOperators(col: ColumnDef<T>): NgbFilterOperator[];
|
|
1059
|
+
defaultFilterOperator(col: ColumnDef<T>): NgbFilterOperator;
|
|
1060
|
+
rowFilterOperator(col: ColumnDef<T>): NgbFilterOperator;
|
|
1061
|
+
operatorLabel(operator: NgbFilterOperator): string;
|
|
1062
|
+
rowFilterOperatorLabel(col: ColumnDef<T>, operator: NgbFilterOperator): string;
|
|
1063
|
+
rowFilterMenuTitle(col: ColumnDef<T>): string;
|
|
1064
|
+
rowFilterPlaceholder(col: ColumnDef<T>): string;
|
|
1065
|
+
isSearchHighlightEnabled(): boolean;
|
|
1066
|
+
shouldHighlightSearchInColumn(field: string): boolean;
|
|
1067
|
+
formatCellDisplayValue(value: unknown): string;
|
|
1068
|
+
getSearchHighlightSegments(value: unknown, field: string): Array<{
|
|
1069
|
+
text: string;
|
|
1070
|
+
match: boolean;
|
|
1071
|
+
}>;
|
|
1072
|
+
rowFilterEmptyOptionLabel(col: ColumnDef<T>): string;
|
|
1073
|
+
booleanFilterOptionLabel(value: boolean): string;
|
|
1074
|
+
isRowFilterMenuOpen(field: string): boolean;
|
|
1075
|
+
get openRowFilterColumn(): ColumnDef<T> | null;
|
|
1076
|
+
toggleRowFilterMenu(field: string, anchor?: HTMLElement | null): void;
|
|
1077
|
+
setRowFilterOperator(col: ColumnDef<T>, operator: NgbFilterOperator): void;
|
|
1078
|
+
operatorRequiresValue(operator: NgbFilterOperator): boolean;
|
|
1079
|
+
isRowFilterVisible(col: ColumnDef<T>): boolean;
|
|
1080
|
+
isRowFilterOperatorVisible(col: ColumnDef<T>): boolean;
|
|
1081
|
+
isMenuFilterVisible(col: ColumnDef<T>): boolean;
|
|
1082
|
+
getColumnFilter(field: string): NgbFilterDescriptor | null;
|
|
1083
|
+
hasActiveColumnFilter(field: string): boolean;
|
|
1084
|
+
private findFieldFilter;
|
|
1085
|
+
private withoutFieldFilters;
|
|
1086
|
+
private upsertColumnFilter;
|
|
1087
|
+
clearColumnFilter(field: string, emit?: boolean): void;
|
|
1088
|
+
clearAllFilters(emit?: boolean): void;
|
|
1089
|
+
private commitFilter;
|
|
1090
|
+
private cloneComposite;
|
|
1091
|
+
private syncLegacyFilters;
|
|
1092
|
+
currentGlobalFilterValue(): string;
|
|
1093
|
+
operatorControlName(field: string): string;
|
|
1094
|
+
valueControlName(field: string): string;
|
|
1095
|
+
getFilterControl(field: string): AbstractControl | null;
|
|
1096
|
+
applyRowFilter(col: ColumnDef<T>): void;
|
|
1097
|
+
private setFilterFormField;
|
|
1098
|
+
private syncFilterFormFromState;
|
|
1099
|
+
private static readonly MENU_FILTER_CONDITION_COUNT;
|
|
1100
|
+
private defaultMenuOperator;
|
|
1101
|
+
private defaultMenuCondition;
|
|
1102
|
+
private defaultMenuDraftPair;
|
|
1103
|
+
private normalizeMenuDraftConditions;
|
|
1104
|
+
private menuConditionsFromFieldFilter;
|
|
1105
|
+
ensureMenuJoinLogic(col: ColumnDef<T>): 'and' | 'or';
|
|
1106
|
+
setMenuJoinLogic(col: ColumnDef<T>, logic: 'and' | 'or'): void;
|
|
1107
|
+
menuFilterConditionIsValid(col: ColumnDef<T>, draft: NgbMenuFilterConditionDraft): boolean;
|
|
1108
|
+
canApplyMenuFilter(col: ColumnDef<T>): boolean;
|
|
1109
|
+
canClearMenuFilter(col: ColumnDef<T>): boolean;
|
|
1110
|
+
ensureMenuDraftConditions(col: ColumnDef<T>): NgbMenuFilterConditionDraft[];
|
|
1111
|
+
/** First menu condition (header filter menus). */
|
|
1112
|
+
ensureMenuDraft(col: ColumnDef<T>): NgbMenuFilterConditionDraft;
|
|
1113
|
+
setMenuDraftOperator(col: ColumnDef<T>, operator: NgbFilterOperator, index?: number): void;
|
|
1114
|
+
menuOperatorKey(field: string, index?: number): string;
|
|
1115
|
+
isMenuOperatorOpen(field: string, index?: number): boolean;
|
|
1116
|
+
toggleMenuOperator(field: string, index?: number): void;
|
|
1117
|
+
get openFilterMenuColumn(): ColumnDef<T> | null;
|
|
1118
|
+
private closeFilterMenu;
|
|
1119
|
+
private resolveFilterMenuAnchor;
|
|
1120
|
+
toggleFilterMenu(field: string, anchor?: HTMLElement | null): void;
|
|
1121
|
+
applyMenuFilter(col: ColumnDef<T>): void;
|
|
1122
|
+
clearMenuFilter(col: ColumnDef<T>): void;
|
|
1123
|
+
multiCheckboxOptions(col: ColumnDef<T>): Array<{
|
|
1124
|
+
label: string;
|
|
1125
|
+
value: any;
|
|
1126
|
+
}>;
|
|
1127
|
+
multiCheckboxVisibleOptions(col: ColumnDef<T>): Array<{
|
|
1128
|
+
label: string;
|
|
1129
|
+
value: any;
|
|
1130
|
+
}>;
|
|
1131
|
+
multiCheckboxValueLabel(col: ColumnDef<T>, value: any): string;
|
|
1132
|
+
private multiCheckboxValueKey;
|
|
1133
|
+
ensureMultiCheckboxDraft(col: ColumnDef<T>): any[];
|
|
1134
|
+
multiCheckboxSelectedCount(col: ColumnDef<T>): number;
|
|
1135
|
+
multiCheckboxTotalCount(col: ColumnDef<T>): number;
|
|
1136
|
+
isMultiCheckboxChecked(col: ColumnDef<T>, value: any): boolean;
|
|
1137
|
+
toggleMultiCheckboxValue(col: ColumnDef<T>, value: any): void;
|
|
1138
|
+
isMultiCheckboxAllSelected(col: ColumnDef<T>): boolean;
|
|
1139
|
+
toggleMultiCheckboxAll(col: ColumnDef<T>): void;
|
|
1140
|
+
multiCheckboxToggleLabel(col: ColumnDef<T>): string;
|
|
1141
|
+
isMultiCheckboxPartiallySelected(col: ColumnDef<T>): boolean;
|
|
1142
|
+
private multiCheckboxSelectedValues;
|
|
1143
|
+
multiCheckboxFilterApplyLabel(): string;
|
|
1144
|
+
multiCheckboxFilterCancelLabel(): string;
|
|
1145
|
+
multiCheckboxFilterShowCancel(): boolean;
|
|
1146
|
+
cancelMultiCheckboxFilter(col: ColumnDef<T>): void;
|
|
1147
|
+
applyMultiCheckboxFilter(col: ColumnDef<T>): void;
|
|
1148
|
+
filterContext(col: ColumnDef<T>, source: 'row' | 'menu'): FilterCtx<T>;
|
|
373
1149
|
get sorted(): T[];
|
|
1150
|
+
/** True when `[data]` is a server page and `[total]` is the full result count. */
|
|
1151
|
+
isServerBound(): boolean;
|
|
1152
|
+
/** Row count for pager, range labels, and `aria-rowcount`. */
|
|
1153
|
+
recordTotal(): number;
|
|
1154
|
+
/** Collection size passed to the built-in pager. */
|
|
1155
|
+
pagerCollectionSize(): number;
|
|
374
1156
|
get paged(): T[];
|
|
1157
|
+
private shouldUseLocalDataOperations;
|
|
1158
|
+
private localDataOperationsResult;
|
|
375
1159
|
get anyFilterable(): boolean;
|
|
376
1160
|
get startIndex(): number;
|
|
377
1161
|
get endIndex(): number;
|
|
1162
|
+
get paginationActive(): boolean;
|
|
1163
|
+
resolvedPageable(): NgbDatagridPageableSettings;
|
|
1164
|
+
pagerShowsAt(placement: NgbDatagridPagerPosition): boolean;
|
|
1165
|
+
showPagerInfo(): boolean;
|
|
1166
|
+
showPagerPageSizes(): boolean;
|
|
1167
|
+
pagerButtonCount(): number;
|
|
1168
|
+
pagerPreviousNext(): boolean;
|
|
1169
|
+
pagerType(): NgbDatagridPagerType;
|
|
1170
|
+
hasCustomPagerTemplate(): boolean;
|
|
1171
|
+
pagerResponsive(): boolean;
|
|
1172
|
+
pagerContext(): PagerCtx<Datagrid<T>> & {
|
|
1173
|
+
$implicit: PagerCtx<Datagrid<T>>;
|
|
1174
|
+
};
|
|
1175
|
+
dataState(): NgbDataGridState;
|
|
1176
|
+
private emitDataStateChange;
|
|
1177
|
+
private syncFromDataState;
|
|
1178
|
+
/** Page-size options for the footer dropdown (includes [pageSize] when not listed in pageSizes). */
|
|
1179
|
+
get resolvedPageSizeOptions(): number[];
|
|
378
1180
|
get shouldEnableScroll(): boolean;
|
|
1181
|
+
onBodyHorizontalScroll(): void;
|
|
379
1182
|
get isHeaderSticky(): boolean;
|
|
380
1183
|
get isFooterSticky(): boolean;
|
|
381
1184
|
get detailColspan(): number;
|
|
1185
|
+
isColumnPinned(col: ColumnDef<T>): boolean;
|
|
1186
|
+
columnPinnedSide(col: ColumnDef<T>): 'start' | 'end' | null;
|
|
1187
|
+
private columnOrderGroup;
|
|
1188
|
+
resolvedDir(): 'ltr' | 'rtl' | null;
|
|
1189
|
+
isRtl(): boolean;
|
|
1190
|
+
hasPinnedColumns(): boolean;
|
|
1191
|
+
shouldPinLeadingUtilityColumns(): boolean;
|
|
1192
|
+
utilityColumnWidth(kind: UtilityColumnKind): number;
|
|
1193
|
+
resolvedEditMode(): NgbEditMode;
|
|
1194
|
+
isIncellEditMode(): boolean;
|
|
1195
|
+
isExternalEditMode(): boolean;
|
|
1196
|
+
isToolbarEditMode(): boolean;
|
|
1197
|
+
showEditingToolbar(): boolean;
|
|
1198
|
+
showRowEditAction(): boolean;
|
|
1199
|
+
showRowDeleteAction(): boolean;
|
|
1200
|
+
showActionsColumn(): boolean;
|
|
1201
|
+
get externalEditableColumns(): ColumnDef<T>[];
|
|
1202
|
+
isCellInEditMode(pagedIndex: number, col: ColumnDef<T>): boolean;
|
|
1203
|
+
onCellClick(ev: MouseEvent, pagedIndex: number, col: ColumnDef<T>): void;
|
|
1204
|
+
onCellKeydown(ev: KeyboardEvent, pagedIndex: number, col: ColumnDef<T>, colIndex: number): void;
|
|
1205
|
+
startIncellEdit(pagedIndex: number, field: string): void;
|
|
1206
|
+
private focusInlineEditor;
|
|
1207
|
+
commitIncellEdit(close?: boolean): boolean;
|
|
1208
|
+
cancelIncellEdit(): void;
|
|
1209
|
+
getSingleSelectedPagedIndex(): number | null;
|
|
1210
|
+
editSelectedRow(): void;
|
|
1211
|
+
deleteSelectedRows(): void;
|
|
1212
|
+
openExternalEdit(pagedIndex: number): void;
|
|
1213
|
+
openExternalAdd(): void;
|
|
1214
|
+
saveExternalEdit(): void;
|
|
1215
|
+
cancelExternalEdit(): void;
|
|
1216
|
+
private closeExternalEdit;
|
|
1217
|
+
private focusExternalDialogFirstField;
|
|
1218
|
+
utilityLeadingWidth(): number;
|
|
1219
|
+
columnWidth(col: ColumnDef<T>): number;
|
|
1220
|
+
isColumnResizable(col: ColumnDef<T>): boolean;
|
|
1221
|
+
startColumnResize(event: MouseEvent, col: ColumnDef<T>): void;
|
|
1222
|
+
onDocumentMouseMove(event: MouseEvent): void;
|
|
1223
|
+
onDocumentMouseUp(): void;
|
|
1224
|
+
private syncResizableColgroups;
|
|
1225
|
+
autoFitColumnsToGrid(): void;
|
|
1226
|
+
private clampColumnWidth;
|
|
1227
|
+
private gridViewportWidth;
|
|
1228
|
+
private nonDataColumnWidth;
|
|
1229
|
+
private syncColumnWidthOverrides;
|
|
1230
|
+
get tablePixelWidth(): number | null;
|
|
1231
|
+
utilityStickyOffset(kind: Exclude<UtilityColumnKind, 'actions'>): number | null;
|
|
1232
|
+
columnStartOffset(col: ColumnDef<T>): number | null;
|
|
1233
|
+
columnEndOffset(col: ColumnDef<T>): number | null;
|
|
1234
|
+
columnPinnedClass(col: ColumnDef<T>): string | null;
|
|
382
1235
|
get tableClassList(): string[];
|
|
383
1236
|
get responsiveWrapperClasses(): string[];
|
|
1237
|
+
get densityMode(): 'comfortable' | 'compact';
|
|
1238
|
+
isStackedLayout(): boolean;
|
|
1239
|
+
isStackedCardsLayout(): boolean;
|
|
1240
|
+
stackedGroupFor(col: ColumnDef<T>): 'start' | 'center' | 'end';
|
|
1241
|
+
stackedColumnsInGroup(group: 'start' | 'center' | 'end'): ColumnDef<T>[];
|
|
1242
|
+
stackedCardGroups(): Array<'start' | 'center' | 'end'>;
|
|
1243
|
+
visibleColumnIndex(col: ColumnDef<T>): number;
|
|
1244
|
+
stackedCardColspan(): number;
|
|
1245
|
+
clearSorting(emit?: boolean): void;
|
|
1246
|
+
setColumnHidden(field: string, hidden: boolean): void;
|
|
1247
|
+
applyColumnVisibility(visibility: Record<string, boolean>): void;
|
|
1248
|
+
get zebraStripesEnabled(): boolean;
|
|
1249
|
+
getSelectedCount(): number;
|
|
1250
|
+
hasSelectedRows(): boolean;
|
|
1251
|
+
hasSingleSelectedRow(): boolean;
|
|
1252
|
+
resolveHeaderClass(col: ColumnDef<T>): string | string[] | Record<string, boolean> | null;
|
|
1253
|
+
resolveHeaderStyle(col: ColumnDef<T>): Record<string, string | number> | null;
|
|
1254
|
+
resolveCellClass(row: T, rowIndex: number, col: ColumnDef<T>): string | string[] | Record<string, boolean> | null;
|
|
1255
|
+
resolveCellStyle(row: T, rowIndex: number, col: ColumnDef<T>): Record<string, string | number> | null;
|
|
1256
|
+
resolveRowClass(row: T, rowIndex: number): string | string[] | Record<string, boolean> | null;
|
|
1257
|
+
resolveRowStyle(row: T, rowIndex: number): Record<string, string | number> | null;
|
|
384
1258
|
updateHighlightCache(): void;
|
|
385
1259
|
headerText(col: ColumnDef<T>): string;
|
|
1260
|
+
headerTitle(col: ColumnDef<T>): string;
|
|
1261
|
+
cellTitle(row: T, col: ColumnDef<T>): string;
|
|
386
1262
|
columnFilterAriaLabel(col: ColumnDef<T>): string;
|
|
387
1263
|
inputAriaLabel(col: ColumnDef<T>): string;
|
|
1264
|
+
reorderColumnAriaLabel(col: ColumnDef<T>): string;
|
|
1265
|
+
resizeColumnAriaLabel(col: ColumnDef<T>): string;
|
|
1266
|
+
openFilterMenuAriaLabel(col: ColumnDef<T>): string;
|
|
1267
|
+
clearFilterAriaLabel(col: ColumnDef<T>): string;
|
|
1268
|
+
filterOperatorAriaLabel(col: ColumnDef<T>): string;
|
|
1269
|
+
editRowAriaLabel(index: number): string;
|
|
1270
|
+
deleteRowAriaLabel(index: number): string;
|
|
1271
|
+
stickyRowToggleAriaLabel(): string;
|
|
1272
|
+
booleanDisplayLabel(value: boolean): string;
|
|
1273
|
+
emptyStateLabel(): string;
|
|
1274
|
+
paginationRangeLabel(): string;
|
|
1275
|
+
rowsPerPageLabel(): string;
|
|
1276
|
+
ariaRowCount(): number;
|
|
1277
|
+
ariaColCount(): number;
|
|
1278
|
+
isCellFocused(rowIndex: number, colIndex: number): boolean;
|
|
1279
|
+
cellTabIndex(rowIndex: number, colIndex: number): number | null;
|
|
1280
|
+
focusCell(rowIndex: number, colIndex: number): void;
|
|
1281
|
+
onDataCellFocus(rowIndex: number, colIndex: number): void;
|
|
1282
|
+
onDataCellKeydown(ev: KeyboardEvent, rowIndex: number, colIndex: number, col: ColumnDef<T>): void;
|
|
1283
|
+
private openRowFilterMenuForColumn;
|
|
1284
|
+
private isRowFilterEnabledForColumn;
|
|
1285
|
+
private focusFocusedCellElement;
|
|
1286
|
+
announceStatus(message: string): void;
|
|
1287
|
+
private labelTemplate;
|
|
1288
|
+
private formatLocaleNumber;
|
|
388
1289
|
ariaSortFor(field: Extract<keyof T, string>): 'ascending' | 'descending' | 'none';
|
|
389
1290
|
sortButtonAriaLabel(col: ColumnDef<T>): string;
|
|
390
1291
|
exportAriaLabel(kind: 'pdf' | 'excel'): string;
|
|
@@ -394,20 +1295,31 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
394
1295
|
private cellTplQ;
|
|
395
1296
|
private editTplQ;
|
|
396
1297
|
private filterTplQ;
|
|
1298
|
+
private filterMenuTplQ;
|
|
397
1299
|
private globalTplQ;
|
|
1300
|
+
private gridColumnQ;
|
|
398
1301
|
/** Internal lookup maps */
|
|
399
1302
|
cellTpls: Record<string, NgbCellTemplate<T>>;
|
|
400
1303
|
editTpls: Record<string, NgbEditorTemplate<T>>;
|
|
401
1304
|
filterTpls: Record<string, NgbFilterTemplate<T>>;
|
|
1305
|
+
filterMenuTpls: Record<string, NgbFilterMenuTemplate<T>>;
|
|
402
1306
|
globalTpl: NgbGlobalFilterTemplate | null;
|
|
1307
|
+
private warnedDeclarativeColumns;
|
|
403
1308
|
private toRecord;
|
|
404
1309
|
export(kind: 'pdf' | 'excel'): Promise<void>;
|
|
405
1310
|
private resolveDataset;
|
|
406
1311
|
ngAfterContentInit(): void;
|
|
407
|
-
ngAfterViewInit(): void;
|
|
408
1312
|
ngOnChanges(ch: SimpleChanges): void;
|
|
1313
|
+
private resetEditingState;
|
|
409
1314
|
private getRowId;
|
|
1315
|
+
/** Apply selection ids and refresh checkbox UI (for programmatic / OnPush sync). */
|
|
1316
|
+
setSelectionIds(ids: Iterable<any>, options?: {
|
|
1317
|
+
emit?: boolean;
|
|
1318
|
+
}): void;
|
|
410
1319
|
private getEditService;
|
|
1320
|
+
isCellEditable(col: ColumnDef<T>, row: T, isNew: boolean): boolean;
|
|
1321
|
+
isRowReorderEnabled(): boolean;
|
|
1322
|
+
hasActiveFilters(): boolean;
|
|
411
1323
|
startAdd(): void;
|
|
412
1324
|
saveAdd(): void;
|
|
413
1325
|
cancelAdd(): void;
|
|
@@ -425,13 +1337,25 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
425
1337
|
toggleSort(field: Extract<keyof T, string>): void;
|
|
426
1338
|
onGlobalFilterChange(): void;
|
|
427
1339
|
onColumnFilterChange(): void;
|
|
1340
|
+
onDocumentClick(event: MouseEvent): void;
|
|
1341
|
+
canCancelToolbarEdit(): boolean;
|
|
1342
|
+
isToolbarEditActive(): boolean;
|
|
1343
|
+
isToolbarSaveDisabled(): boolean;
|
|
1344
|
+
saveToolbarEdit(): void;
|
|
1345
|
+
cancelToolbarEdit(): void;
|
|
1346
|
+
private ariaUtilityColumns;
|
|
1347
|
+
ariaColIndexForUtility(kind: Exclude<UtilityColumnKind, 'actions'>): number | null;
|
|
1348
|
+
ariaColIndexForDataColumn(visibleColumnIndex: number): number;
|
|
1349
|
+
ariaColIndexForActions(): number;
|
|
1350
|
+
onEscapeKey(): void;
|
|
428
1351
|
onPageChange(p: number): void;
|
|
429
1352
|
onPageSizeChange(): void;
|
|
430
1353
|
toggleExpand(i: number): void;
|
|
431
1354
|
isExpanded(i: number): boolean;
|
|
432
1355
|
onRowClick(ev: MouseEvent, i: number): void;
|
|
433
1356
|
onPage(p: number): void;
|
|
434
|
-
onPageSize(sz: number): void;
|
|
1357
|
+
onPageSize(sz: number | string): void;
|
|
1358
|
+
onRowDrop(event: NgbDndDropEvent<T>): void;
|
|
435
1359
|
asBool(v: any): boolean;
|
|
436
1360
|
triggerExport(kind: 'pdf' | 'excel'): void;
|
|
437
1361
|
isResponsiveEnabled(): boolean;
|
|
@@ -439,10 +1363,12 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
439
1363
|
toggleStickyRow(pagedIndex: number): void;
|
|
440
1364
|
stickyIcon(row: T, pagedIndex: number): string;
|
|
441
1365
|
stickyTop(row: T, pagedIndex: number): number | null;
|
|
1366
|
+
private measuredStickyRowHeight;
|
|
442
1367
|
get stickyRowsEnabled(): boolean;
|
|
443
1368
|
get stickyHeaderEnabled(): boolean;
|
|
444
1369
|
get stickyFooterEnabled(): boolean;
|
|
445
1370
|
isSelectionEnabled(): boolean;
|
|
1371
|
+
showSelectionColumn(): boolean;
|
|
446
1372
|
isCheckboxOnly(): boolean;
|
|
447
1373
|
isSelectionDisabled(row: T, pagedIndex: number): boolean;
|
|
448
1374
|
isRowSelected(row: T, pagedIndex: number): boolean;
|
|
@@ -454,10 +1380,62 @@ declare class Datagrid<T = any> implements AfterContentInit, AfterViewInit, OnCh
|
|
|
454
1380
|
selectAllLabel(): string;
|
|
455
1381
|
rowSelectionLabel(index: number): string;
|
|
456
1382
|
onRowSelect(ev: MouseEvent, pagedIndex: number): void;
|
|
457
|
-
onHeaderScroll(): void;
|
|
458
|
-
private syncScrollbarWidth;
|
|
459
1383
|
static ɵfac: i0.ɵɵFactoryDeclaration<Datagrid<any>, never>;
|
|
460
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Datagrid<any>, "ngb-datagrid", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "enableSorting": { "alias": "enableSorting"; "required": false; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; }; "enableGlobalFilter": { "alias": "enableGlobalFilter"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "enableEdit": { "alias": "enableEdit"; "required": false; }; "enableDelete": { "alias": "enableDelete"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "enableAdd": { "alias": "enableAdd"; "required": false; }; "addButtonAriaLabel": { "alias": "addButtonAriaLabel"; "required": false; }; "addButtonText": { "alias": "addButtonText"; "required": false; }; "stickyRows": { "alias": "stickyRows"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "stickyRowHeight": { "alias": "stickyRowHeight"; "required": false; }; "stickyHeaderHeight": { "alias": "stickyHeaderHeight"; "required": false; }; "stickyFooterHeight": { "alias": "stickyFooterHeight"; "required": false; }; "tableOptions": { "alias": "tableOptions"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; }; "selectionKeyMode": { "alias": "selectionKeyMode"; "required": false; }; "selectAllEnabled": { "alias": "selectAllEnabled"; "required": false; }; "selectionA11yLabels": { "alias": "selectionA11yLabels"; "required": false; }; "selectionDisabledFn": { "alias": "selectionDisabledFn"; "required": false; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; }; "highlightRowKey": { "alias": "highlightRowKey"; "required": false; }; "highlightColKey": { "alias": "highlightColKey"; "required": false; }; "globalFilterAriaLabel": { "alias": "globalFilterAriaLabel"; "required": false; }; "expandRowAriaLabel": { "alias": "expandRowAriaLabel"; "required": false; }; "collapseRowAriaLabel": { "alias": "collapseRowAriaLabel"; "required": false; }; "exportPdfAriaLabel": { "alias": "exportPdfAriaLabel"; "required": false; }; "exportExcelAriaLabel": { "alias": "exportExcelAriaLabel"; "required": false; }; "newRowDefaults": { "alias": "newRowDefaults"; "required": false; }; "strictEmail": { "alias": "strictEmail"; "required": false; }; "editOnRowClick": { "alias": "editOnRowClick"; "required": false; }; "singleExpand": { "alias": "singleExpand"; "required": false; }; "exportOptions": { "alias": "exportOptions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "editService": { "alias": "editService"; "required": false; }; "dataProviderAll": { "alias": "dataProviderAll"; "required": false; }; "dataProviderSelection": { "alias": "dataProviderSelection"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "rowAdd": "rowAdd"; "rowEdit": "rowEdit"; "rowSave": "rowSave"; "rowCancel": "rowCancel"; "rowDelete": "rowDelete"; "sortChange": "sortChange"; "filtersChange": "filtersChange"; "pageChange": "pageChange"; "selectionChange": "selectionChange"; }, ["exportButtonDir", "rowDetailTpl", "cellTplQ", "editTplQ", "filterTplQ", "globalTplQ"],
|
|
1384
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Datagrid<any>, "ngb-datagrid", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "total": { "alias": "total"; "required": false; }; "enableSorting": { "alias": "enableSorting"; "required": false; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "enableGlobalFilter": { "alias": "enableGlobalFilter"; "required": false; }; "filterMode": { "alias": "filterMode"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "filterOperators": { "alias": "filterOperators"; "required": false; }; "filterManual": { "alias": "filterManual"; "required": false; }; "externalFiltering": { "alias": "externalFiltering"; "required": false; }; "dataOperations": { "alias": "dataOperations"; "required": false; }; "state": { "alias": "state"; "required": false; }; "multiCheckboxFilterOptions": { "alias": "multiCheckboxFilterOptions"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "enableEdit": { "alias": "enableEdit"; "required": false; }; "enableDelete": { "alias": "enableDelete"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "enableAdd": { "alias": "enableAdd"; "required": false; }; "addButtonAriaLabel": { "alias": "addButtonAriaLabel"; "required": false; }; "addButtonText": { "alias": "addButtonText"; "required": false; }; "stickyRows": { "alias": "stickyRows"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "stickyRowHeight": { "alias": "stickyRowHeight"; "required": false; }; "stickyHeaderHeight": { "alias": "stickyHeaderHeight"; "required": false; }; "stickyFooterHeight": { "alias": "stickyFooterHeight"; "required": false; }; "tableOptions": { "alias": "tableOptions"; "required": false; }; "dataLayoutMode": { "alias": "dataLayoutMode"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; }; "selectionKeyMode": { "alias": "selectionKeyMode"; "required": false; }; "selectAllEnabled": { "alias": "selectAllEnabled"; "required": false; }; "selectionA11yLabels": { "alias": "selectionA11yLabels"; "required": false; }; "selectionDisabledFn": { "alias": "selectionDisabledFn"; "required": false; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; }; "highlightRowKey": { "alias": "highlightRowKey"; "required": false; }; "highlightColKey": { "alias": "highlightColKey"; "required": false; }; "globalFilterAriaLabel": { "alias": "globalFilterAriaLabel"; "required": false; }; "globalFilterPlaceholder": { "alias": "globalFilterPlaceholder"; "required": false; }; "searchHighlightTerm": { "alias": "searchHighlightTerm"; "required": false; }; "searchHighlightFields": { "alias": "searchHighlightFields"; "required": false; }; "expandRowAriaLabel": { "alias": "expandRowAriaLabel"; "required": false; }; "collapseRowAriaLabel": { "alias": "collapseRowAriaLabel"; "required": false; }; "exportPdfAriaLabel": { "alias": "exportPdfAriaLabel"; "required": false; }; "exportExcelAriaLabel": { "alias": "exportExcelAriaLabel"; "required": false; }; "newRowDefaults": { "alias": "newRowDefaults"; "required": false; }; "strictEmail": { "alias": "strictEmail"; "required": false; }; "editOnRowClick": { "alias": "editOnRowClick"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "toolbarEditHint": { "alias": "toolbarEditHint"; "required": false; }; "singleExpand": { "alias": "singleExpand"; "required": false; }; "exportOptions": { "alias": "exportOptions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "rowStyle": { "alias": "rowStyle"; "required": false; }; "rowReorderable": { "alias": "rowReorderable"; "required": false; }; "columnReorderable": { "alias": "columnReorderable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionDisplay": { "alias": "actionDisplay"; "required": false; }; "showStickyRowBadge": { "alias": "showStickyRowBadge"; "required": false; }; "stickyRowBadgeField": { "alias": "stickyRowBadgeField"; "required": false; }; "stickyRowBadgeLabel": { "alias": "stickyRowBadgeLabel"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "keyboardNavigation": { "alias": "keyboardNavigation"; "required": false; }; "editService": { "alias": "editService"; "required": false; }; "dataProviderAll": { "alias": "dataProviderAll"; "required": false; }; "dataProviderSelection": { "alias": "dataProviderSelection"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "rowAdd": "rowAdd"; "rowEdit": "rowEdit"; "rowSave": "rowSave"; "rowCancel": "rowCancel"; "rowDelete": "rowDelete"; "sortChange": "sortChange"; "filterChange": "filterChange"; "filtersChange": "filtersChange"; "pageChange": "pageChange"; "dataStateChange": "dataStateChange"; "selectionChange": "selectionChange"; "rowReorder": "rowReorder"; "columnReorder": "columnReorder"; }, ["exportButtonDir", "rowDetailTpl", "pagerTpl", "cellTplQ", "editTplQ", "filterTplQ", "filterMenuTplQ", "globalTplQ", "gridColumnQ"], ["ngb-datagrid-layout-toolbar"], true, never>;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/** Injection token for the active `ngb-datagrid` instance (layout toolbar tools). */
|
|
1388
|
+
declare const NGB_DATAGRID_HOST: InjectionToken<unknown>;
|
|
1389
|
+
|
|
1390
|
+
type NgbDatagridFloatingPanelPlacement = 'menu' | 'operator';
|
|
1391
|
+
/**
|
|
1392
|
+
* Popup-style overlay: anchors to a trigger, portals to document.body,
|
|
1393
|
+
* and uses viewport-fixed coordinates.
|
|
1394
|
+
*/
|
|
1395
|
+
declare class NgbDatagridFloatingPanelDirective implements OnChanges, AfterViewInit, OnDestroy {
|
|
1396
|
+
private readonly el;
|
|
1397
|
+
private readonly renderer;
|
|
1398
|
+
private readonly document;
|
|
1399
|
+
private readonly cdr;
|
|
1400
|
+
ngbDatagridFloatingPanelAnchor?: HTMLElement | null;
|
|
1401
|
+
ngbDatagridFloatingPanelPlacement: NgbDatagridFloatingPanelPlacement;
|
|
1402
|
+
readonly hostPosition = "fixed";
|
|
1403
|
+
readonly hostZIndex = 1200;
|
|
1404
|
+
readonly hostMargin = "0";
|
|
1405
|
+
readonly hostTransform = "none";
|
|
1406
|
+
panelTop: number;
|
|
1407
|
+
panelLeft: number;
|
|
1408
|
+
private active;
|
|
1409
|
+
private portaled;
|
|
1410
|
+
private originalParent;
|
|
1411
|
+
private originalNextSibling;
|
|
1412
|
+
private scrollListeners;
|
|
1413
|
+
private resizeObserver;
|
|
1414
|
+
private rafId;
|
|
1415
|
+
private readonly scheduleUpdate;
|
|
1416
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1417
|
+
ngAfterViewInit(): void;
|
|
1418
|
+
private tryActivate;
|
|
1419
|
+
ngOnDestroy(): void;
|
|
1420
|
+
/** Called when anchor/layout may have changed after the panel opens. */
|
|
1421
|
+
reposition(): void;
|
|
1422
|
+
private activate;
|
|
1423
|
+
private deactivate;
|
|
1424
|
+
private portalToBody;
|
|
1425
|
+
private restoreFromBody;
|
|
1426
|
+
private schedulePositionPasses;
|
|
1427
|
+
private attachObservers;
|
|
1428
|
+
private detachObservers;
|
|
1429
|
+
private resolveAnchor;
|
|
1430
|
+
/** Portaled panels must carry the grid theme so token SCSS applies on document.body. */
|
|
1431
|
+
private syncThemeFromGrid;
|
|
1432
|
+
private anchorRect;
|
|
1433
|
+
private updatePosition;
|
|
1434
|
+
private applyPosition;
|
|
1435
|
+
private placementWidth;
|
|
1436
|
+
private clearPositionStyles;
|
|
1437
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridFloatingPanelDirective, never>;
|
|
1438
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDatagridFloatingPanelDirective, "[ngbDatagridFloatingPanel]", never, { "ngbDatagridFloatingPanelAnchor": { "alias": "ngbDatagridFloatingPanelAnchor"; "required": false; }; "ngbDatagridFloatingPanelPlacement": { "alias": "ngbDatagridFloatingPanelPlacement"; "required": false; }; }, {}, never, never, true, never>;
|
|
461
1439
|
}
|
|
462
1440
|
|
|
463
1441
|
interface PdfExportPayload {
|
|
@@ -498,6 +1476,518 @@ declare class XlsxAdapter implements ExcelExportAdapter {
|
|
|
498
1476
|
export({ fileName, sheetName, columns, rows }: ExcelExportPayload): Promise<void>;
|
|
499
1477
|
}
|
|
500
1478
|
|
|
1479
|
+
declare class NgbGridColumnDirective<T = any> implements ColumnDef<T> {
|
|
1480
|
+
field: Extract<keyof T, string>;
|
|
1481
|
+
header: string;
|
|
1482
|
+
title?: string;
|
|
1483
|
+
cellTitle?: string | ((row: T) => string);
|
|
1484
|
+
sortable?: boolean;
|
|
1485
|
+
filterable?: boolean;
|
|
1486
|
+
filterType?: NgbColumnFilterType;
|
|
1487
|
+
defaultFilterOperator?: NgbFilterOperator;
|
|
1488
|
+
allowedFilterOperators?: NgbFilterOperator[];
|
|
1489
|
+
showFilterMenu?: boolean;
|
|
1490
|
+
showFilterRow?: boolean;
|
|
1491
|
+
showFilterOperator?: boolean;
|
|
1492
|
+
editable?: boolean;
|
|
1493
|
+
type?: ColumnType;
|
|
1494
|
+
options?: Array<{
|
|
1495
|
+
label: string;
|
|
1496
|
+
value: any;
|
|
1497
|
+
}>;
|
|
1498
|
+
width?: number;
|
|
1499
|
+
stackedGroup?: 'start' | 'center' | 'end';
|
|
1500
|
+
required?: boolean;
|
|
1501
|
+
hidden?: boolean;
|
|
1502
|
+
sticky?: boolean | 'start' | 'end';
|
|
1503
|
+
locked?: boolean;
|
|
1504
|
+
reorderable?: boolean;
|
|
1505
|
+
resizable?: boolean;
|
|
1506
|
+
minResizableWidth?: number;
|
|
1507
|
+
maxResizableWidth?: number;
|
|
1508
|
+
toColumnDef(): ColumnDef<T>;
|
|
1509
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbGridColumnDirective<any>, never>;
|
|
1510
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbGridColumnDirective<any>, "ngb-grid-column", never, { "field": { "alias": "field"; "required": false; }; "header": { "alias": "header"; "required": false; }; "title": { "alias": "title"; "required": false; }; "cellTitle": { "alias": "cellTitle"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "filterType": { "alias": "filterType"; "required": false; }; "defaultFilterOperator": { "alias": "defaultFilterOperator"; "required": false; }; "allowedFilterOperators": { "alias": "allowedFilterOperators"; "required": false; }; "showFilterMenu": { "alias": "showFilterMenu"; "required": false; }; "showFilterRow": { "alias": "showFilterRow"; "required": false; }; "showFilterOperator": { "alias": "showFilterOperator"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "type": { "alias": "type"; "required": false; }; "options": { "alias": "options"; "required": false; }; "width": { "alias": "width"; "required": false; }; "stackedGroup": { "alias": "stackedGroup"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "sticky": { "alias": "sticky"; "required": false; }; "locked": { "alias": "locked"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "minResizableWidth": { "alias": "minResizableWidth"; "required": false; }; "maxResizableWidth": { "alias": "maxResizableWidth"; "required": false; }; }, {}, never, never, true, never>;
|
|
1511
|
+
}
|
|
1512
|
+
declare const DATAGRID_COLUMN_DIRECTIVES: (typeof NgbGridColumnDirective)[];
|
|
1513
|
+
|
|
1514
|
+
type NgbDatagridButtonVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'neutral' | 'icon';
|
|
1515
|
+
declare class NgbDatagridButtonDirective {
|
|
1516
|
+
variant: NgbDatagridButtonVariant;
|
|
1517
|
+
get toolbarButtonClass(): boolean;
|
|
1518
|
+
get toolbarPrimary(): boolean;
|
|
1519
|
+
get toolbarSecondary(): boolean;
|
|
1520
|
+
get rowActionClass(): boolean;
|
|
1521
|
+
get rowSuccess(): boolean;
|
|
1522
|
+
get rowDanger(): boolean;
|
|
1523
|
+
get rowNeutral(): boolean;
|
|
1524
|
+
get iconButtonClass(): boolean;
|
|
1525
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridButtonDirective, never>;
|
|
1526
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDatagridButtonDirective, "button[ngbDatagridButton], a[ngbDatagridButton]", never, { "variant": { "alias": "ngbDatagridButton"; "required": false; }; }, {}, never, never, true, never>;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
declare class NgbDatagridControlDirective {
|
|
1530
|
+
ngbDatagridControlMode: 'filter' | 'edit';
|
|
1531
|
+
get filterClass(): boolean;
|
|
1532
|
+
get editClass(): boolean;
|
|
1533
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridControlDirective, never>;
|
|
1534
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDatagridControlDirective, "input[ngbDatagridControl], select[ngbDatagridControl], textarea[ngbDatagridControl]", never, { "ngbDatagridControlMode": { "alias": "ngbDatagridControlMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
declare class NgbDatagridFieldShellComponent {
|
|
1538
|
+
icon?: string;
|
|
1539
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridFieldShellComponent, never>;
|
|
1540
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridFieldShellComponent, "ngb-datagrid-field-shell", never, { "icon": { "alias": "icon"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
declare class NgbDatagridSurfaceCardComponent {
|
|
1544
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridSurfaceCardComponent, never>;
|
|
1545
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridSurfaceCardComponent, "ngb-datagrid-surface-card", never, {}, {}, never, ["*"], true, never>;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
declare class NgbDatagridLayoutToolbarComponent implements AfterContentInit, OnChanges {
|
|
1549
|
+
/**
|
|
1550
|
+
* Grid instance for toolbar tools. Child tools inherit this via `bindHostGrid`
|
|
1551
|
+
* and do not need their own `[grid]` binding.
|
|
1552
|
+
*/
|
|
1553
|
+
grid: Datagrid<any>;
|
|
1554
|
+
ariaLabel: string;
|
|
1555
|
+
private filterTools?;
|
|
1556
|
+
private sortTools?;
|
|
1557
|
+
private columnTools?;
|
|
1558
|
+
ngAfterContentInit(): void;
|
|
1559
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1560
|
+
private syncToolHosts;
|
|
1561
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridLayoutToolbarComponent, never>;
|
|
1562
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridLayoutToolbarComponent, "ngb-datagrid-layout-toolbar", never, { "grid": { "alias": "grid"; "required": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, ["filterTools", "sortTools", "columnTools"], ["*"], true, never>;
|
|
1563
|
+
}
|
|
1564
|
+
declare class NgbDatagridLayoutToolbarSpacerComponent {
|
|
1565
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridLayoutToolbarSpacerComponent, never>;
|
|
1566
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridLayoutToolbarSpacerComponent, "ngb-datagrid-layout-toolbar-spacer", never, {}, {}, never, never, true, never>;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
/** Layout-toolbar tools receive the grid from the toolbar host. */
|
|
1570
|
+
interface NgbDatagridToolHost {
|
|
1571
|
+
bindHostGrid(grid: Datagrid<any>): void;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
declare class NgbDatagridFilterToolComponent implements NgbDatagridToolHost, OnInit, OnDestroy {
|
|
1575
|
+
private readonly cdr;
|
|
1576
|
+
private readonly coordinator;
|
|
1577
|
+
/** Optional override when the tool is not inside `ngb-datagrid-layout-toolbar`. */
|
|
1578
|
+
grid?: Datagrid<any>;
|
|
1579
|
+
label: string;
|
|
1580
|
+
private toolbarGrid?;
|
|
1581
|
+
open: boolean;
|
|
1582
|
+
expandedField: string | null;
|
|
1583
|
+
ngOnInit(): void;
|
|
1584
|
+
ngOnDestroy(): void;
|
|
1585
|
+
bindHostGrid(grid: Datagrid<any>): void;
|
|
1586
|
+
private resolvedGrid;
|
|
1587
|
+
get activeGrid(): Datagrid<any>;
|
|
1588
|
+
get filterableColumns(): ColumnDef<any>[];
|
|
1589
|
+
menuConditions(col: ColumnDef<any>): NgbMenuFilterConditionDraft[];
|
|
1590
|
+
togglePanel(event: MouseEvent): void;
|
|
1591
|
+
private closePanel;
|
|
1592
|
+
toggleSection(field: string): void;
|
|
1593
|
+
operatorsFor(col: ColumnDef<any>): NgbFilterOperator[];
|
|
1594
|
+
applyColumn(col: ColumnDef<any>): void;
|
|
1595
|
+
clearColumn(col: ColumnDef<any>): void;
|
|
1596
|
+
clearAll(): void;
|
|
1597
|
+
closeOnOutsideClick(event: MouseEvent): void;
|
|
1598
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridFilterToolComponent, never>;
|
|
1599
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridFilterToolComponent, "ngb-datagrid-filter-tool", never, { "grid": { "alias": "grid"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
declare class NgbDatagridSortToolComponent implements NgbDatagridToolHost, OnInit, OnDestroy {
|
|
1603
|
+
private readonly cdr;
|
|
1604
|
+
private readonly coordinator;
|
|
1605
|
+
grid?: Datagrid<any>;
|
|
1606
|
+
label: string;
|
|
1607
|
+
private toolbarGrid?;
|
|
1608
|
+
open: boolean;
|
|
1609
|
+
ngOnInit(): void;
|
|
1610
|
+
ngOnDestroy(): void;
|
|
1611
|
+
bindHostGrid(grid: Datagrid<any>): void;
|
|
1612
|
+
private resolvedGrid;
|
|
1613
|
+
get activeGrid(): Datagrid<any>;
|
|
1614
|
+
get sortableColumns(): ColumnDef<any>[];
|
|
1615
|
+
togglePanel(event: MouseEvent): void;
|
|
1616
|
+
private closePanel;
|
|
1617
|
+
toggleSort(col: ColumnDef<any>): void;
|
|
1618
|
+
clearSorting(): void;
|
|
1619
|
+
closeOnOutsideClick(event: MouseEvent): void;
|
|
1620
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridSortToolComponent, never>;
|
|
1621
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridSortToolComponent, "ngb-datagrid-sort-tool", never, { "grid": { "alias": "grid"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
declare class NgbDatagridColumnChooserToolComponent implements OnChanges, OnInit, OnDestroy, NgbDatagridToolHost {
|
|
1625
|
+
private readonly cdr;
|
|
1626
|
+
private readonly coordinator;
|
|
1627
|
+
grid?: Datagrid<any>;
|
|
1628
|
+
label: string;
|
|
1629
|
+
private toolbarGrid?;
|
|
1630
|
+
open: boolean;
|
|
1631
|
+
searchTerm: string;
|
|
1632
|
+
draftVisibility: Record<string, boolean>;
|
|
1633
|
+
bindHostGrid(grid: Datagrid<any>): void;
|
|
1634
|
+
private resolvedGrid;
|
|
1635
|
+
get activeGrid(): Datagrid<any>;
|
|
1636
|
+
get chooserColumns(): _angular_bootstrap_ngbootstrap.ColumnDef<any>[];
|
|
1637
|
+
get filteredColumns(): _angular_bootstrap_ngbootstrap.ColumnDef<any>[];
|
|
1638
|
+
get selectedCount(): number;
|
|
1639
|
+
get allVisible(): boolean;
|
|
1640
|
+
get partiallyVisible(): boolean;
|
|
1641
|
+
ngOnInit(): void;
|
|
1642
|
+
ngOnDestroy(): void;
|
|
1643
|
+
ngOnChanges(): void;
|
|
1644
|
+
togglePanel(event: MouseEvent): void;
|
|
1645
|
+
private closePanel;
|
|
1646
|
+
toggleColumn(field: string): void;
|
|
1647
|
+
toggleAll(): void;
|
|
1648
|
+
apply(): void;
|
|
1649
|
+
resetDraft(mark?: boolean): void;
|
|
1650
|
+
closeOnOutsideClick(event: MouseEvent): void;
|
|
1651
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridColumnChooserToolComponent, never>;
|
|
1652
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridColumnChooserToolComponent, "ngb-datagrid-column-chooser-tool", never, { "grid": { "alias": "grid"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
type NgbDataChartType = 'bar' | 'line' | 'area' | 'pie' | 'doughnut';
|
|
1656
|
+
type NgbDataAggregate = 'sum' | 'avg' | 'min' | 'max' | 'count';
|
|
1657
|
+
interface NgbDataMetricDef<T = any> {
|
|
1658
|
+
key: string;
|
|
1659
|
+
label: string;
|
|
1660
|
+
accessor: (row: T) => number;
|
|
1661
|
+
color?: string;
|
|
1662
|
+
}
|
|
1663
|
+
interface NgbDataDimensionDef<T = any> {
|
|
1664
|
+
key: string;
|
|
1665
|
+
label: string;
|
|
1666
|
+
accessor: (row: T) => string;
|
|
1667
|
+
}
|
|
1668
|
+
interface NgbDataChartSeries {
|
|
1669
|
+
key: string;
|
|
1670
|
+
label: string;
|
|
1671
|
+
data: number[];
|
|
1672
|
+
color?: string;
|
|
1673
|
+
}
|
|
1674
|
+
interface NgbDataChartConfig {
|
|
1675
|
+
type: NgbDataChartType;
|
|
1676
|
+
labels: string[];
|
|
1677
|
+
series: NgbDataChartSeries[];
|
|
1678
|
+
title?: string;
|
|
1679
|
+
height?: number;
|
|
1680
|
+
emptyState?: string;
|
|
1681
|
+
showLegend?: boolean;
|
|
1682
|
+
legendPosition?: 'top' | 'bottom';
|
|
1683
|
+
stacked?: boolean;
|
|
1684
|
+
valueFormatter?: (value: number) => string;
|
|
1685
|
+
}
|
|
1686
|
+
interface NgbFullGridChartOptions<T = any> {
|
|
1687
|
+
dimension: NgbDataDimensionDef<T>;
|
|
1688
|
+
metric: NgbDataMetricDef<T>;
|
|
1689
|
+
aggregate?: NgbDataAggregate;
|
|
1690
|
+
chartType?: NgbDataChartType;
|
|
1691
|
+
title?: string;
|
|
1692
|
+
limit?: number;
|
|
1693
|
+
sort?: 'asc' | 'desc' | null;
|
|
1694
|
+
valueFormatter?: (value: number) => string;
|
|
1695
|
+
}
|
|
1696
|
+
interface NgbRowSelectionChartOptions<T = any> {
|
|
1697
|
+
metrics: NgbDataMetricDef<T>[];
|
|
1698
|
+
seriesLabel?: (row: T, index: number) => string;
|
|
1699
|
+
chartType?: NgbDataChartType;
|
|
1700
|
+
title?: string;
|
|
1701
|
+
valueFormatter?: (value: number) => string;
|
|
1702
|
+
}
|
|
1703
|
+
interface NgbColumnSelectionChartOptions<T = any> {
|
|
1704
|
+
dimension: NgbDataDimensionDef<T>;
|
|
1705
|
+
metrics: NgbDataMetricDef<T>[];
|
|
1706
|
+
chartType?: NgbDataChartType;
|
|
1707
|
+
title?: string;
|
|
1708
|
+
valueFormatter?: (value: number) => string;
|
|
1709
|
+
}
|
|
1710
|
+
interface NgbSparklinePoint {
|
|
1711
|
+
x: number;
|
|
1712
|
+
y: number;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
declare const ngbChartPalette: (index: number) => string;
|
|
1716
|
+
declare const ngbAggregateValues: (values: number[], aggregate?: NgbDataAggregate) => number;
|
|
1717
|
+
declare const ngbBuildRowSelectionChartData: <T>(rows: T[], options: NgbRowSelectionChartOptions<T>) => NgbDataChartConfig;
|
|
1718
|
+
declare const ngbBuildColumnSelectionChartData: <T>(rows: T[], options: NgbColumnSelectionChartOptions<T>) => NgbDataChartConfig;
|
|
1719
|
+
declare const ngbBuildFullGridChartData: <T>(rows: T[], options: NgbFullGridChartOptions<T>) => NgbDataChartConfig;
|
|
1720
|
+
declare const ngbBuildSparklinePoints: (values: number[], width?: number, height?: number, padding?: number) => NgbSparklinePoint[];
|
|
1721
|
+
declare const ngbBuildChartJsConfig: (config: NgbDataChartConfig, height?: number) => ChartConfiguration;
|
|
1722
|
+
|
|
1723
|
+
declare class NgbDataChartComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
1724
|
+
config: NgbDataChartConfig | null;
|
|
1725
|
+
ariaLabel: string;
|
|
1726
|
+
emptyState: string;
|
|
1727
|
+
private canvas?;
|
|
1728
|
+
private chart?;
|
|
1729
|
+
private chartConstructor?;
|
|
1730
|
+
private viewReady;
|
|
1731
|
+
private configSignature;
|
|
1732
|
+
private rendering;
|
|
1733
|
+
get chartHeight(): number;
|
|
1734
|
+
ngAfterViewInit(): void;
|
|
1735
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1736
|
+
ngOnDestroy(): void;
|
|
1737
|
+
hasData(): boolean;
|
|
1738
|
+
private renderChart;
|
|
1739
|
+
private loadChartConstructor;
|
|
1740
|
+
private buildConfigSignature;
|
|
1741
|
+
private destroyChart;
|
|
1742
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDataChartComponent, never>;
|
|
1743
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDataChartComponent, "ngb-data-chart", never, { "config": { "alias": "config"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "emptyState": { "alias": "emptyState"; "required": false; }; }, {}, never, never, true, never>;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
declare class NgbDataSparklineComponent implements OnChanges {
|
|
1747
|
+
values: number[];
|
|
1748
|
+
/** Cached series used by getters so template bindings stay stable between checks. */
|
|
1749
|
+
series: number[];
|
|
1750
|
+
width: number;
|
|
1751
|
+
height: number;
|
|
1752
|
+
strokeWidth: number;
|
|
1753
|
+
positiveColor: string;
|
|
1754
|
+
negativeColor: string;
|
|
1755
|
+
neutralColor: string;
|
|
1756
|
+
color: string | null;
|
|
1757
|
+
showEndDot: boolean;
|
|
1758
|
+
endDotRadius: number;
|
|
1759
|
+
ariaLabel: string;
|
|
1760
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1761
|
+
get points(): NgbSparklinePoint[];
|
|
1762
|
+
get path(): string;
|
|
1763
|
+
get strokeColor(): string;
|
|
1764
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDataSparklineComponent, never>;
|
|
1765
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDataSparklineComponent, "ngb-data-sparkline", never, { "values": { "alias": "values"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; "positiveColor": { "alias": "positiveColor"; "required": false; }; "negativeColor": { "alias": "negativeColor"; "required": false; }; "neutralColor": { "alias": "neutralColor"; "required": false; }; "color": { "alias": "color"; "required": false; }; "showEndDot": { "alias": "showEndDot"; "required": false; }; "endDotRadius": { "alias": "endDotRadius"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, never, never, true, never>;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
type NgbGridChartMode = 'row-selection' | 'column-selection' | 'full-grid' | 'sparklines';
|
|
1769
|
+
interface NgbGridChartSparklineOptions<T = any> {
|
|
1770
|
+
/** Field key rendered with an inline sparkline. */
|
|
1771
|
+
field: string;
|
|
1772
|
+
values: (row: T) => number[];
|
|
1773
|
+
width?: number;
|
|
1774
|
+
height?: number;
|
|
1775
|
+
trendColor?: boolean;
|
|
1776
|
+
}
|
|
1777
|
+
interface NgbGridChartConfig<T = any> {
|
|
1778
|
+
mode: NgbGridChartMode;
|
|
1779
|
+
/** Tabular rows used by the grid and chart builders. */
|
|
1780
|
+
rows: T[];
|
|
1781
|
+
/** Primary label column (e.g. product name). */
|
|
1782
|
+
dimension: NgbDataDimensionDef<T>;
|
|
1783
|
+
/** Optional secondary line under the dimension label (e.g. category). */
|
|
1784
|
+
subDimension?: NgbDataDimensionDef<T>;
|
|
1785
|
+
/** Metrics available for charts / sparklines. */
|
|
1786
|
+
metrics: NgbDataMetricDef<T>[];
|
|
1787
|
+
/** Metrics plotted for row-selection mode (defaults to all metrics). */
|
|
1788
|
+
rowSelectionMetrics?: NgbDataMetricDef<T>[];
|
|
1789
|
+
/** Keys of metrics enabled in column-selection mode. */
|
|
1790
|
+
selectedMetricKeys?: string[];
|
|
1791
|
+
/** Row ids selected in row-selection mode. */
|
|
1792
|
+
selectedRowIds?: Array<string | number>;
|
|
1793
|
+
chartType?: NgbDataChartType;
|
|
1794
|
+
chartTitle?: string;
|
|
1795
|
+
valueFormatter?: (value: number) => string;
|
|
1796
|
+
/** Full-grid mode options (metric + grouping). */
|
|
1797
|
+
fullGrid?: Partial<NgbFullGridChartOptions<T>>;
|
|
1798
|
+
sparkline?: NgbGridChartSparklineOptions<T>;
|
|
1799
|
+
/** Extra grid columns appended after metric columns (e.g. growth %). */
|
|
1800
|
+
trailingColumns?: Array<{
|
|
1801
|
+
field: string;
|
|
1802
|
+
header: string;
|
|
1803
|
+
type?: 'text' | 'number';
|
|
1804
|
+
width?: number;
|
|
1805
|
+
}>;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
interface NgbGridChartSelectionChange<T> {
|
|
1809
|
+
selected: T[];
|
|
1810
|
+
selectedRowIds: Array<string | number>;
|
|
1811
|
+
}
|
|
1812
|
+
declare class NgbGridChartComponent<T = any> implements OnChanges, AfterViewInit, AfterViewChecked {
|
|
1813
|
+
config: NgbGridChartConfig<T>;
|
|
1814
|
+
ariaLabel: string;
|
|
1815
|
+
selectionChange: EventEmitter<NgbGridChartSelectionChange<T>>;
|
|
1816
|
+
private grid?;
|
|
1817
|
+
gridColumns: ColumnDef<T>[];
|
|
1818
|
+
chartConfig: NgbDataChartConfig | null;
|
|
1819
|
+
dimensionTemplate: boolean;
|
|
1820
|
+
sparklineField: string | null;
|
|
1821
|
+
sparklineColumns: ColumnDef<T>[];
|
|
1822
|
+
readonly tableOptions: {
|
|
1823
|
+
responsive: boolean;
|
|
1824
|
+
hoverRows: boolean;
|
|
1825
|
+
zebraStripes: boolean;
|
|
1826
|
+
};
|
|
1827
|
+
readonly rowTrackBy: (index: number, row: T) => string | number;
|
|
1828
|
+
private readonly cdr;
|
|
1829
|
+
private selectedIds;
|
|
1830
|
+
private activeMetricKeys;
|
|
1831
|
+
private lastMode;
|
|
1832
|
+
private lastMetricKeys;
|
|
1833
|
+
private lastChartType;
|
|
1834
|
+
private lastRowIds;
|
|
1835
|
+
private lastSparklineKey;
|
|
1836
|
+
private lastFullGridKey;
|
|
1837
|
+
private selectionSeedPending;
|
|
1838
|
+
private sparklineSeriesByRowId;
|
|
1839
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1840
|
+
ngAfterViewInit(): void;
|
|
1841
|
+
ngAfterViewChecked(): void;
|
|
1842
|
+
get chartAriaLabel(): string;
|
|
1843
|
+
sparklineValues(row: T): number[];
|
|
1844
|
+
sparklineColor(row: T): string | null;
|
|
1845
|
+
isRowSelected(row: T): boolean;
|
|
1846
|
+
seriesColor(row: T): string;
|
|
1847
|
+
onGridSelectionChange(event: {
|
|
1848
|
+
selected: T[];
|
|
1849
|
+
}): void;
|
|
1850
|
+
private applyConfigChanges;
|
|
1851
|
+
private rebuildSparklineCache;
|
|
1852
|
+
private syncSelectionFromConfig;
|
|
1853
|
+
private rebuildChartOnly;
|
|
1854
|
+
private selectedRows;
|
|
1855
|
+
private activeMetrics;
|
|
1856
|
+
private rowMetrics;
|
|
1857
|
+
private resolveRowId;
|
|
1858
|
+
private scheduleSeedSelection;
|
|
1859
|
+
private seedGridSelection;
|
|
1860
|
+
private buildRowSelectionColumns;
|
|
1861
|
+
private buildColumnSelectionColumns;
|
|
1862
|
+
private buildSparklineColumns;
|
|
1863
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbGridChartComponent<any>, never>;
|
|
1864
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbGridChartComponent<any>, "ngb-grid-chart", never, { "config": { "alias": "config"; "required": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["[gridChartSummary]", "[gridChartFooter]"], true, never>;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
interface NgbAdvancedSearchField {
|
|
1868
|
+
field: string;
|
|
1869
|
+
label: string;
|
|
1870
|
+
type?: ColumnType;
|
|
1871
|
+
filterType?: NgbColumnFilterType;
|
|
1872
|
+
defaultFilterOperator?: NgbFilterOperator | '';
|
|
1873
|
+
allowedFilterOperators?: NgbFilterOperator[];
|
|
1874
|
+
}
|
|
1875
|
+
interface NgbAdvancedSearchOperator {
|
|
1876
|
+
value: NgbFilterOperator;
|
|
1877
|
+
label: string;
|
|
1878
|
+
}
|
|
1879
|
+
interface NgbAdvancedSearchRule {
|
|
1880
|
+
field: string;
|
|
1881
|
+
operator: NgbFilterOperator;
|
|
1882
|
+
value: any;
|
|
1883
|
+
}
|
|
1884
|
+
declare class NgbAdvancedSearchComponent {
|
|
1885
|
+
private _fields;
|
|
1886
|
+
private _operators;
|
|
1887
|
+
private fieldConfigCache;
|
|
1888
|
+
private filterTypeCache;
|
|
1889
|
+
private inputTypeCache;
|
|
1890
|
+
private operatorOptionsCache;
|
|
1891
|
+
set fields(value: NgbAdvancedSearchField[] | null | undefined);
|
|
1892
|
+
get fields(): NgbAdvancedSearchField[];
|
|
1893
|
+
set operators(value: NgbAdvancedSearchOperator[] | null | undefined);
|
|
1894
|
+
get operators(): NgbAdvancedSearchOperator[] | null;
|
|
1895
|
+
rules: NgbAdvancedSearchRule[];
|
|
1896
|
+
logic: 'and' | 'or';
|
|
1897
|
+
minRules: number;
|
|
1898
|
+
matchLabel: string;
|
|
1899
|
+
rulesLabel: string;
|
|
1900
|
+
whenLabel: string;
|
|
1901
|
+
addRuleLabel: string;
|
|
1902
|
+
applyLabel: string;
|
|
1903
|
+
removeRuleLabel: string;
|
|
1904
|
+
removeRuleAriaLabel: string;
|
|
1905
|
+
fieldAriaLabel: string;
|
|
1906
|
+
operatorAriaLabel: string;
|
|
1907
|
+
valueAriaLabel: string;
|
|
1908
|
+
valuePlaceholder: string;
|
|
1909
|
+
rulesChange: EventEmitter<NgbAdvancedSearchRule[]>;
|
|
1910
|
+
logicChange: EventEmitter<"and" | "or">;
|
|
1911
|
+
filterChange: EventEmitter<NgbCompositeFilterDescriptor>;
|
|
1912
|
+
setLogic(logic: 'and' | 'or'): void;
|
|
1913
|
+
addRule(): void;
|
|
1914
|
+
removeRule(index: number): void;
|
|
1915
|
+
apply(): void;
|
|
1916
|
+
emitRules(): void;
|
|
1917
|
+
setRuleField(rule: NgbAdvancedSearchRule, field: string): void;
|
|
1918
|
+
setRuleOperator(rule: NgbAdvancedSearchRule, operator: NgbFilterOperator): void;
|
|
1919
|
+
inputType(rule: NgbAdvancedSearchRule): string;
|
|
1920
|
+
operatorRequiresValue(operator: NgbFilterOperator): boolean;
|
|
1921
|
+
operatorOptionsFor(rule: NgbAdvancedSearchRule): NgbAdvancedSearchOperator[];
|
|
1922
|
+
toFilterDescriptor(): NgbCompositeFilterDescriptor;
|
|
1923
|
+
private fieldConfig;
|
|
1924
|
+
private filterTypeForField;
|
|
1925
|
+
private allowedOperatorsForField;
|
|
1926
|
+
private defaultOperatorForField;
|
|
1927
|
+
private rebuildFieldCaches;
|
|
1928
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbAdvancedSearchComponent, never>;
|
|
1929
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbAdvancedSearchComponent, "ngb-advanced-search", never, { "fields": { "alias": "fields"; "required": false; }; "operators": { "alias": "operators"; "required": false; }; "rules": { "alias": "rules"; "required": false; }; "logic": { "alias": "logic"; "required": false; }; "minRules": { "alias": "minRules"; "required": false; }; "matchLabel": { "alias": "matchLabel"; "required": false; }; "rulesLabel": { "alias": "rulesLabel"; "required": false; }; "whenLabel": { "alias": "whenLabel"; "required": false; }; "addRuleLabel": { "alias": "addRuleLabel"; "required": false; }; "applyLabel": { "alias": "applyLabel"; "required": false; }; "removeRuleLabel": { "alias": "removeRuleLabel"; "required": false; }; "removeRuleAriaLabel": { "alias": "removeRuleAriaLabel"; "required": false; }; "fieldAriaLabel": { "alias": "fieldAriaLabel"; "required": false; }; "operatorAriaLabel": { "alias": "operatorAriaLabel"; "required": false; }; "valueAriaLabel": { "alias": "valueAriaLabel"; "required": false; }; "valuePlaceholder": { "alias": "valuePlaceholder"; "required": false; }; }, { "rulesChange": "rulesChange"; "logicChange": "logicChange"; "filterChange": "filterChange"; }, never, never, true, never>;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
interface NgbSearchHighlightField {
|
|
1933
|
+
field: string;
|
|
1934
|
+
label: string;
|
|
1935
|
+
disabled?: boolean;
|
|
1936
|
+
}
|
|
1937
|
+
interface NgbSearchHighlightSelectionChange {
|
|
1938
|
+
term: string;
|
|
1939
|
+
selectedFields: string[];
|
|
1940
|
+
}
|
|
1941
|
+
declare class NgbSearchHighlightComponent {
|
|
1942
|
+
fields: NgbSearchHighlightField[];
|
|
1943
|
+
selectedFields: string[];
|
|
1944
|
+
term: string;
|
|
1945
|
+
placeholder: string;
|
|
1946
|
+
searchAriaLabel: string;
|
|
1947
|
+
fieldsLabel: string;
|
|
1948
|
+
fieldsAriaLabel: string;
|
|
1949
|
+
searchIcon: string;
|
|
1950
|
+
allowEmptySelection: boolean;
|
|
1951
|
+
termChange: EventEmitter<string>;
|
|
1952
|
+
selectedFieldsChange: EventEmitter<string[]>;
|
|
1953
|
+
selectionChange: EventEmitter<NgbSearchHighlightSelectionChange>;
|
|
1954
|
+
setTerm(term: string): void;
|
|
1955
|
+
isFieldSelected(field: string): boolean;
|
|
1956
|
+
toggleField(field: string): void;
|
|
1957
|
+
private emitSelectionChange;
|
|
1958
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbSearchHighlightComponent, never>;
|
|
1959
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbSearchHighlightComponent, "ngb-search-highlight", never, { "fields": { "alias": "fields"; "required": false; }; "selectedFields": { "alias": "selectedFields"; "required": false; }; "term": { "alias": "term"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "searchAriaLabel": { "alias": "searchAriaLabel"; "required": false; }; "fieldsLabel": { "alias": "fieldsLabel"; "required": false; }; "fieldsAriaLabel": { "alias": "fieldsAriaLabel"; "required": false; }; "searchIcon": { "alias": "searchIcon"; "required": false; }; "allowEmptySelection": { "alias": "allowEmptySelection"; "required": false; }; }, { "termChange": "termChange"; "selectedFieldsChange": "selectedFieldsChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
declare class NgbDatagridThemePickerComponent {
|
|
1963
|
+
private readonly host;
|
|
1964
|
+
private _value;
|
|
1965
|
+
private _themes;
|
|
1966
|
+
label: string;
|
|
1967
|
+
get value(): NgbDataGridTheme;
|
|
1968
|
+
set value(value: NgbDataGridTheme);
|
|
1969
|
+
get themes(): NgbDataGridThemeOption[];
|
|
1970
|
+
set themes(themes: NgbDataGridThemeOption[] | null | undefined);
|
|
1971
|
+
valueChange: EventEmitter<NgbDataGridTheme>;
|
|
1972
|
+
open: boolean;
|
|
1973
|
+
selectedTheme: NgbDataGridThemeOption;
|
|
1974
|
+
groupedThemes: Array<{
|
|
1975
|
+
label: NgbDataGridThemeOption['group'];
|
|
1976
|
+
items: NgbDataGridThemeOption[];
|
|
1977
|
+
}>;
|
|
1978
|
+
toggle(): void;
|
|
1979
|
+
select(theme: NgbDataGridThemeOption): void;
|
|
1980
|
+
closeOnOutsideClick(event: MouseEvent): void;
|
|
1981
|
+
closeOnEscape(): void;
|
|
1982
|
+
private updateSelectedTheme;
|
|
1983
|
+
private buildGroupedThemes;
|
|
1984
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatagridThemePickerComponent, never>;
|
|
1985
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbDatagridThemePickerComponent, "ngb-datagrid-theme-picker", never, { "label": { "alias": "label"; "required": false; }; "value": { "alias": "value"; "required": false; }; "themes": { "alias": "themes"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
declare function ngbApplyDataGridOperations<T>(data: readonly T[] | null | undefined, options?: NgbDataGridProcessOptions<T>): NgbDataGridDataResult<T>;
|
|
1989
|
+
declare function ngbCalculateDataGridAggregates<T>(data: readonly T[] | null | undefined, descriptors: readonly NgbDataGridAggregateDescriptor[] | null | undefined): NgbDataGridAggregateResults;
|
|
1990
|
+
|
|
501
1991
|
type DndI18n = {
|
|
502
1992
|
listLabel: (name?: string) => string;
|
|
503
1993
|
pickedUp: () => string;
|
|
@@ -515,113 +2005,45 @@ interface DndSession<T = unknown> {
|
|
|
515
2005
|
fromList?: T[];
|
|
516
2006
|
fromIndex?: number;
|
|
517
2007
|
fromIsPalette?: boolean;
|
|
2008
|
+
fromListRef?: unknown;
|
|
518
2009
|
}
|
|
519
2010
|
declare class NgbDndState {
|
|
520
2011
|
readonly active: i0.WritableSignal<boolean>;
|
|
521
2012
|
private store;
|
|
522
2013
|
private currentId;
|
|
2014
|
+
private activeDropList;
|
|
523
2015
|
i18n: DndI18n;
|
|
524
2016
|
announce?: (m: string) => void;
|
|
525
2017
|
constructor(announceFn: ((m: string) => void) | null, i18n: DndI18n | null);
|
|
526
2018
|
createSession<T>(session: DndSession<T>): string;
|
|
527
2019
|
get(id: string | null): DndSession | null;
|
|
528
2020
|
getCurrent(): DndSession | null;
|
|
2021
|
+
setActiveDropList(list: unknown): void;
|
|
2022
|
+
getActiveDropList(): unknown | null;
|
|
2023
|
+
clearActiveDropList(list?: unknown): void;
|
|
529
2024
|
clear(id?: string | null): void;
|
|
530
2025
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndState, [{ optional: true; }, { optional: true; }]>;
|
|
531
2026
|
static ɵprov: i0.ɵɵInjectableDeclaration<NgbDndState>;
|
|
532
2027
|
}
|
|
533
2028
|
|
|
534
|
-
interface NgbDndDropEvent<T> {
|
|
535
|
-
item: T;
|
|
536
|
-
fromIndex: number;
|
|
537
|
-
toIndex: number;
|
|
538
|
-
fromList: T[];
|
|
539
|
-
toList: T[];
|
|
540
|
-
sameList: boolean;
|
|
541
|
-
}
|
|
542
|
-
interface DndCanDropPayload<T = any> {
|
|
543
|
-
dragItem: T;
|
|
544
|
-
srcList: T[];
|
|
545
|
-
srcIndex: number;
|
|
546
|
-
dstList: T[];
|
|
547
|
-
dstIndex: number;
|
|
548
|
-
isExternal: boolean;
|
|
549
|
-
}
|
|
550
|
-
/** Guard function; return true to allow, false to block */
|
|
551
|
-
type DndCanDropFn<T = any> = (payload: DndCanDropPayload<T>) => boolean;
|
|
552
|
-
declare class NgbDndListDirective<T = unknown> {
|
|
553
|
-
private el;
|
|
554
|
-
private state;
|
|
555
|
-
dndChildrenKey: string | null;
|
|
556
|
-
/** Bind your array here: <div [ngbDndList]="items"> */
|
|
557
|
-
list: T[];
|
|
558
|
-
/** Optional: group barrier across lists */
|
|
559
|
-
dndGroup?: string;
|
|
560
|
-
/** Disable this list */
|
|
561
|
-
dndDisabled: boolean;
|
|
562
|
-
/** NEW: clone if source wasn't a list (e.g. palette) */
|
|
563
|
-
dndCloneOnDrop: boolean;
|
|
564
|
-
/** NEW: custom clone function */
|
|
565
|
-
dndCloneFn?: (item: T) => T;
|
|
566
|
-
dndIsPalette: boolean;
|
|
567
|
-
dndCanDrop: boolean | DndCanDropFn<any>;
|
|
568
|
-
private _denied;
|
|
569
|
-
get denied(): boolean;
|
|
570
|
-
dndAriaLabel?: string;
|
|
571
|
-
get ariaLabel(): string;
|
|
572
|
-
/** Fires after item is inserted */
|
|
573
|
-
dndDropped: EventEmitter<NgbDndDropEvent<T>>;
|
|
574
|
-
role: string;
|
|
575
|
-
hostClass: boolean;
|
|
576
|
-
private hover;
|
|
577
|
-
get isOver(): boolean;
|
|
578
|
-
private canDrop;
|
|
579
|
-
get dataDropValid(): "true" | "false";
|
|
580
|
-
private placeholder?;
|
|
581
|
-
private lastIndex;
|
|
582
|
-
onDragEnter(ev: DragEvent): void;
|
|
583
|
-
onDragOver(ev: DragEvent): void;
|
|
584
|
-
onDragLeave(ev: DragEvent): void;
|
|
585
|
-
onDocumentDrop(ev: DragEvent): void;
|
|
586
|
-
onDrop(ev: DragEvent): void;
|
|
587
|
-
private getSession;
|
|
588
|
-
private ensurePlaceholder;
|
|
589
|
-
private removePlaceholder;
|
|
590
|
-
private positionPlaceholderAt;
|
|
591
|
-
private indexFromPointer;
|
|
592
|
-
private cloneItem;
|
|
593
|
-
private isDroppingIntoOwnDescendant;
|
|
594
|
-
/**
|
|
595
|
-
* Build a guard payload using whatever drag context you already store.
|
|
596
|
-
* If some fields don’t exist in your code, the fallbacks keep it working.
|
|
597
|
-
*/
|
|
598
|
-
private _buildGuardPayload;
|
|
599
|
-
/**
|
|
600
|
-
* Compute destination index from the event position (no placeholder var needed).
|
|
601
|
-
* Uses vertical list heuristics; adjust for horizontal if your list is horizontal.
|
|
602
|
-
*/
|
|
603
|
-
private _computeDropIndex;
|
|
604
|
-
private _allowDrop;
|
|
605
|
-
private performDrop;
|
|
606
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndListDirective<any>, never>;
|
|
607
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndListDirective<any>, "[ngbDndList]", never, { "dndChildrenKey": { "alias": "dndChildrenKey"; "required": false; }; "list": { "alias": "ngbDndList"; "required": false; }; "dndGroup": { "alias": "dndGroup"; "required": false; }; "dndDisabled": { "alias": "dndDisabled"; "required": false; }; "dndCloneOnDrop": { "alias": "dndCloneOnDrop"; "required": false; }; "dndCloneFn": { "alias": "dndCloneFn"; "required": false; }; "dndIsPalette": { "alias": "dndIsPalette"; "required": false; }; "dndCanDrop": { "alias": "dndCanDrop"; "required": false; }; "dndAriaLabel": { "alias": "dndAriaLabel"; "required": false; }; }, { "dndDropped": "dndDropped"; }, never, never, true, never>;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
2029
|
declare class NgbDndItemDirective<T = unknown> {
|
|
611
2030
|
private parentList?;
|
|
612
2031
|
private el;
|
|
613
2032
|
private state;
|
|
614
|
-
constructor(parentList?: NgbDndListDirective<T>);
|
|
2033
|
+
constructor(parentList?: NgbDndListDirective<T> | undefined);
|
|
615
2034
|
/** required: the value carried by this row/panel */
|
|
616
2035
|
item: T;
|
|
617
2036
|
/** optional: constrain cross-list drops */
|
|
618
2037
|
dndGroup?: string;
|
|
619
|
-
/** index inside its parent list (bind to
|
|
2038
|
+
/** index inside its parent list (bind to the rendered row index) */
|
|
620
2039
|
dndIndex?: number;
|
|
2040
|
+
/** Explicit source list for recursive templates where DI can be ambiguous. */
|
|
2041
|
+
dndSourceList?: T[];
|
|
621
2042
|
dndDisabled: boolean;
|
|
622
2043
|
dndDragStart: EventEmitter<T>;
|
|
623
2044
|
dndDragEnd: EventEmitter<void>;
|
|
624
2045
|
get draggable(): boolean;
|
|
2046
|
+
hostClass: boolean;
|
|
625
2047
|
dragging: boolean;
|
|
626
2048
|
get ariaGrabbed(): "true" | "false";
|
|
627
2049
|
role: string;
|
|
@@ -631,7 +2053,28 @@ declare class NgbDndItemDirective<T = unknown> {
|
|
|
631
2053
|
onDragEnd(): void;
|
|
632
2054
|
onKeydown(ev: KeyboardEvent): void;
|
|
633
2055
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndItemDirective<any>, [{ optional: true; }]>;
|
|
634
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndItemDirective<any>, "[ngbDndItem]", never, { "item": { "alias": "ngbDndItem"; "required": false; }; "dndGroup": { "alias": "dndGroup"; "required": false; }; "dndIndex": { "alias": "dndIndex"; "required": false; }; "dndDisabled": { "alias": "dndDisabled"; "required": false; }; }, { "dndDragStart": "dndDragStart"; "dndDragEnd": "dndDragEnd"; }, never, never, true, never>;
|
|
2056
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndItemDirective<any>, "[ngbDndItem]", never, { "item": { "alias": "ngbDndItem"; "required": false; }; "dndGroup": { "alias": "dndGroup"; "required": false; }; "dndIndex": { "alias": "dndIndex"; "required": false; }; "dndSourceList": { "alias": "dndSourceList"; "required": false; }; "dndDisabled": { "alias": "dndDisabled"; "required": false; }; }, { "dndDragStart": "dndDragStart"; "dndDragEnd": "dndDragEnd"; }, never, never, true, never>;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
declare class NgbDndHandleDirective {
|
|
2060
|
+
private item?;
|
|
2061
|
+
constructor(item?: NgbDndItemDirective | undefined);
|
|
2062
|
+
draggable: string;
|
|
2063
|
+
hostClass: boolean;
|
|
2064
|
+
onDragStart(ev: DragEvent): void;
|
|
2065
|
+
onDragEnd(): void;
|
|
2066
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndHandleDirective, [{ optional: true; skipSelf: true; }]>;
|
|
2067
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbDndHandleDirective, "[ngbDndHandle]", never, {}, {}, never, never, true, never>;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
declare class NgbJsonPreviewComponent {
|
|
2071
|
+
value: unknown;
|
|
2072
|
+
indent: number;
|
|
2073
|
+
fallback: string;
|
|
2074
|
+
maxHeight: number;
|
|
2075
|
+
get formattedJson(): string;
|
|
2076
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbJsonPreviewComponent, never>;
|
|
2077
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgbJsonPreviewComponent, "ngb-json-preview", never, { "value": { "alias": "value"; "required": false; }; "indent": { "alias": "indent"; "required": false; }; "fallback": { "alias": "fallback"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; }, {}, never, never, true, never>;
|
|
635
2078
|
}
|
|
636
2079
|
|
|
637
2080
|
declare class NgbLiveAnnouncer {
|
|
@@ -640,20 +2083,7 @@ declare class NgbLiveAnnouncer {
|
|
|
640
2083
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbLiveAnnouncer, never>;
|
|
641
2084
|
static ɵprov: i0.ɵɵInjectableDeclaration<NgbLiveAnnouncer>;
|
|
642
2085
|
}
|
|
643
|
-
declare const DND_LIVE_ANNOUNCE: InjectionToken<(m: string) => void>;
|
|
644
|
-
|
|
645
|
-
declare class NgbPaginationComponent {
|
|
646
|
-
page: number;
|
|
647
|
-
pageSize: number;
|
|
648
|
-
collectionSize: number;
|
|
649
|
-
maxSize: number;
|
|
650
|
-
pageChange: EventEmitter<number>;
|
|
651
|
-
get totalPages(): number;
|
|
652
|
-
get pages(): Array<number | '…'>;
|
|
653
|
-
go(p: number): void;
|
|
654
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgbPaginationComponent, never>;
|
|
655
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgbPaginationComponent, "ngb-pagination", never, { "page": { "alias": "page"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "collectionSize": { "alias": "collectionSize"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
|
|
656
|
-
}
|
|
2086
|
+
declare const DND_LIVE_ANNOUNCE: InjectionToken<((m: string) => void) | null>;
|
|
657
2087
|
|
|
658
2088
|
type NgbStepperOrientation = 'horizontal' | 'vertical';
|
|
659
2089
|
type NgbStepperLabelPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -1005,5 +2435,5 @@ declare class NgbChipsComponent {
|
|
|
1005
2435
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgbChipsComponent, "ngb-chips", never, { "items": { "alias": "items"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "removeLabel": { "alias": "removeLabel"; "required": false; }; }, { "remove": "remove"; }, never, never, true, never>;
|
|
1006
2436
|
}
|
|
1007
2437
|
|
|
1008
|
-
export { DATAGRID_TEMPLATE_DIRECTIVES, DND_I18N, DND_LIVE_ANNOUNCE, Datagrid, ExcelExportAdapter, ExportButtonDirective, JsPdfAdapter, NgbCellTemplate, NgbChipsComponent, NgbDatagridDefaultEditService, NgbDndItemDirective, NgbDndListDirective, NgbDndState, NgbEditorTemplate, NgbExportService, NgbFilterTemplate, NgbGlobalFilterTemplate, NgbLiveAnnouncer, NgbPaginationComponent, NgbRowDetailTemplate, NgbSplitterComponent, NgbSplitterPaneComponent, NgbStepLabelDirective, NgbStepperComponent, NgbTreeComponent, NgbTypeaheadComponent, PdfExportAdapter, XlsxAdapter, defaultDndI18n };
|
|
1009
|
-
export type { CellCtx, ColumnDef, ColumnType, DndCanDropFn, DndCanDropPayload, DndI18n, DndSession, EditCtx, ExcelExportPayload, ExportButtonContext, FilterCtx, GlobalFilterCtx, NgbChip, NgbColKey, NgbDataGridExportOptions, NgbDataGridExportPages, NgbDataGridExportType, NgbDataGridResponsiveOptions, NgbDataGridTheme, NgbDatagridEditService, NgbDatagridTrackByFn, NgbDndDropEvent, NgbRowKey, NgbSelectionBehavior, NgbSelectionKeyMode, NgbSelectionLabels, NgbSelectionMode, NgbSplitterOrientation, NgbSplitterPaneSize, NgbStepperContentPosition, NgbStepperLabelPosition, NgbStepperOrientation, NgbStepperSelectionChangeEvent, NgbStepperState, NgbStepperStep, NgbStepperTheme, NgbTableOptions, NgbTableResponsive, NgbTreeI18n, NgbTreeNode, NgbTreeType, NgbTypeaheadI18n, NgbTypeaheadItem, PdfExportPayload };
|
|
2438
|
+
export { DATAGRID_COLUMN_DIRECTIVES, DATAGRID_TEMPLATE_DIRECTIVES, DND_I18N, DND_LIVE_ANNOUNCE, Datagrid, ExcelExportAdapter, ExportButtonDirective, JsPdfAdapter, NGB_BOOLEAN_FILTER_OPERATORS, NGB_DATAGRID_DEFAULT_LABELS, NGB_DATAGRID_DEFAULT_PAGEABLE, NGB_DATAGRID_HOST, NGB_DATAGRID_KEYBOARD_SHORTCUTS, NGB_DATAGRID_PAGER_BREAKPOINTS, NGB_DATAGRID_THEME_OPTIONS, NGB_DATE_FILTER_OPERATORS, NGB_NUMERIC_FILTER_OPERATORS, NGB_PAGER_BREAKPOINTS, NGB_PAGER_DEFAULT_SETTINGS, NGB_SELECT_FILTER_OPERATORS, NGB_TEXT_FILTER_OPERATORS, NgbAdvancedSearchComponent, NgbCellTemplate, NgbChipsComponent, NgbDataChartComponent, NgbDataSparklineComponent, NgbDatagridButtonDirective, NgbDatagridColumnChooserToolComponent, NgbDatagridControlDirective, NgbDatagridDefaultEditService, NgbDatagridFieldShellComponent, NgbDatagridFilterToolComponent, NgbDatagridFloatingPanelDirective, NgbDatagridLayoutToolbarComponent, NgbDatagridLayoutToolbarSpacerComponent, NgbDatagridSortToolComponent, NgbDatagridSurfaceCardComponent, NgbDatagridThemePickerComponent, NgbDndHandleDirective, NgbDndItemDirective, NgbDndListDirective, NgbDndState, NgbEditorTemplate, NgbExportService, NgbFilterMenuTemplate, NgbFilterTemplate, NgbGlobalFilterTemplate, NgbGridChartComponent, NgbGridColumnDirective, NgbJsonPreviewComponent, NgbLiveAnnouncer, NgbPagerComponent, NgbPagerTemplate, NgbPaginationComponent, NgbRowDetailTemplate, NgbSearchHighlightComponent, NgbSplitterComponent, NgbSplitterPaneComponent, NgbStepLabelDirective, NgbStepperComponent, NgbTreeComponent, NgbTypeaheadComponent, PdfExportAdapter, XlsxAdapter, defaultDndI18n, ngbAggregateValues, ngbAllowedFilterOperators, ngbApplyDataGridOperations, ngbBuildChartJsConfig, ngbBuildColumnSelectionChartData, ngbBuildFullGridChartData, ngbBuildRowSelectionChartData, ngbBuildSparklinePoints, ngbCalculateDataGridAggregates, ngbChartPalette, ngbColumnTypeToFilterType, ngbDatagridPagerSettings, ngbDefaultFilterOperator, ngbFilterOperatorLabel, ngbFindFieldFilterDescriptor, ngbFlattenFilterDescriptors, ngbFormatDatagridLabel, ngbFormatPagerRangeLabel, ngbIsCompositeFilter, ngbOperatorRequiresFilterValue, ngbPagerButtonCountForDensity, ngbResolveDatagridPagerSettings, ngbResolvePageableSettings, ngbResolvePagerDensity, ngbResolvePagerPageSizeOptions, ngbResolvePagerSettings, ngbSetFieldFilter };
|
|
2439
|
+
export type { CellCtx, ColumnDef, ColumnType, DndCanDropFn, DndCanDropPayload, DndI18n, DndSession, EditCtx, ExcelExportPayload, ExportButtonContext, FilterCtx, GlobalFilterCtx, NgbAdvancedSearchField, NgbAdvancedSearchOperator, NgbAdvancedSearchRule, NgbChip, NgbColKey, NgbColumnFilterType, NgbColumnReorderEvent, NgbColumnReorderOptions, NgbColumnSelectionChartOptions, NgbCompositeFilterDescriptor, NgbDataAggregate, NgbDataChartConfig, NgbDataChartSeries, NgbDataChartType, NgbDataDimensionDef, NgbDataGridAggregateDescriptor, NgbDataGridAggregateFunction, NgbDataGridAggregateResults, NgbDataGridDataResult, NgbDataGridExportOptions, NgbDataGridExportPages, NgbDataGridExportType, NgbDataGridProcessOptions, NgbDataGridResponsiveOptions, NgbDataGridSortDescriptor, NgbDataGridSortDirection, NgbDataGridState, NgbDataGridTheme, NgbDataGridThemeOption, NgbDataLayoutMode, NgbDataMetricDef, NgbDatagridButtonVariant, NgbDatagridEditService, NgbDatagridFloatingPanelPlacement, NgbDatagridLabels, NgbDatagridPageableSettings, NgbDatagridPagerDensity, NgbDatagridPagerPosition, NgbDatagridPagerType, NgbDatagridTextDirection, NgbDatagridTrackByFn, NgbDndDropEvent, NgbEditMode, NgbFilterDescriptor, NgbFilterMode, NgbFilterOperator, NgbFilterState, NgbFilterable, NgbFullGridChartOptions, NgbGridChartConfig, NgbGridChartMode, NgbGridChartSelectionChange, NgbGridChartSparklineOptions, NgbMenuFilterConditionDraft, NgbMultiCheckboxFilterOptions, NgbPagerDensity, NgbPagerSettings, NgbPagerType, NgbRowKey, NgbRowSelectionChartOptions, NgbSearchHighlightField, NgbSearchHighlightSegment, NgbSearchHighlightSelectionChange, NgbSelectionBehavior, NgbSelectionKeyMode, NgbSelectionLabels, NgbSelectionMode, NgbSparklinePoint, NgbSplitterOrientation, NgbSplitterPaneSize, NgbStepperContentPosition, NgbStepperLabelPosition, NgbStepperOrientation, NgbStepperSelectionChangeEvent, NgbStepperState, NgbStepperStep, NgbStepperTheme, NgbTableOptions, NgbTableResponsive, NgbTreeI18n, NgbTreeNode, NgbTreeType, NgbTypeaheadI18n, NgbTypeaheadItem, PagerCtx, PdfExportPayload };
|