@angular-bootstrap/ngbootstrap 0.0.1

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.
@@ -0,0 +1,747 @@
1
+ import * as i0 from '@angular/core';
2
+ import { TemplateRef, AfterContentInit, OnChanges, EventEmitter, SimpleChanges, InjectionToken, OnDestroy, QueryList, ElementRef, AfterViewInit } from '@angular/core';
3
+ import { AbstractControl, FormGroup, FormControl } from '@angular/forms';
4
+ import { Observable } from 'rxjs';
5
+
6
+ type ColumnType = 'text' | 'number' | 'email' | 'boolean' | 'date' | 'select';
7
+ interface ColumnDef<T = any> {
8
+ /** key of the property on your row object */
9
+ field: Extract<keyof T, string>;
10
+ /** human‐readable header text */
11
+ header: string;
12
+ /** enable clicking to sort */
13
+ sortable?: boolean;
14
+ /** enable filtering on this column */
15
+ filterable?: boolean;
16
+ editable?: boolean;
17
+ type?: ColumnType;
18
+ options?: Array<{
19
+ label: string;
20
+ value: any;
21
+ }>;
22
+ required?: boolean;
23
+ }
24
+
25
+ interface CellCtx<T = any> {
26
+ $implicit: any;
27
+ row: T;
28
+ col: ColumnDef<T>;
29
+ index: number;
30
+ }
31
+ interface EditCtx<T = any> {
32
+ $implicit: AbstractControl | null;
33
+ control: AbstractControl | null;
34
+ row: T;
35
+ col: ColumnDef<T>;
36
+ form: FormGroup;
37
+ index: number;
38
+ isNew: boolean;
39
+ }
40
+ interface FilterCtx<T = any> {
41
+ $implicit: AbstractControl | null;
42
+ control: AbstractControl | null;
43
+ col: ColumnDef<T>;
44
+ }
45
+ interface GlobalFilterCtx {
46
+ $implicit: AbstractControl;
47
+ }
48
+ declare class NgbCellTemplate<T = any> {
49
+ readonly template: TemplateRef<CellCtx<T>>;
50
+ field: string;
51
+ constructor(template: TemplateRef<CellCtx<T>>);
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbCellTemplate<any>, never>;
53
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbCellTemplate<any>, "ng-template[ngbCell]", never, { "field": { "alias": "ngbCell"; "required": false; }; }, {}, never, never, true, never>;
54
+ }
55
+ declare class NgbEditorTemplate<T = any> {
56
+ readonly template: TemplateRef<EditCtx<T>>;
57
+ field: string;
58
+ constructor(template: TemplateRef<EditCtx<T>>);
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbEditorTemplate<any>, never>;
60
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbEditorTemplate<any>, "ng-template[ngbEditor]", never, { "field": { "alias": "ngbEditor"; "required": false; }; }, {}, never, never, true, never>;
61
+ }
62
+ declare class NgbFilterTemplate<T = any> {
63
+ readonly template: TemplateRef<FilterCtx<T>>;
64
+ field: string;
65
+ constructor(template: TemplateRef<FilterCtx<T>>);
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbFilterTemplate<any>, never>;
67
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbFilterTemplate<any>, "ng-template[ngbFilter]", never, { "field": { "alias": "ngbFilter"; "required": false; }; }, {}, never, never, true, never>;
68
+ }
69
+ declare class NgbGlobalFilterTemplate {
70
+ readonly template: TemplateRef<GlobalFilterCtx>;
71
+ constructor(template: TemplateRef<GlobalFilterCtx>);
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbGlobalFilterTemplate, never>;
73
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbGlobalFilterTemplate, "ng-template[ngbGlobalFilter]", never, {}, {}, never, never, true, never>;
74
+ }
75
+ declare class NgbRowDetailTemplate<T = any> {
76
+ readonly template: TemplateRef<{
77
+ $implicit: T;
78
+ index: number;
79
+ }>;
80
+ constructor(template: TemplateRef<{
81
+ $implicit: T;
82
+ index: number;
83
+ }>);
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbRowDetailTemplate<any>, never>;
85
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbRowDetailTemplate<any>, "ng-template[ngbRowDetail]", never, {}, {}, never, never, true, never>;
86
+ }
87
+ /** Handy constant to import in consumer apps */
88
+ declare const DATAGRID_TEMPLATE_DIRECTIVES: (typeof NgbCellTemplate | typeof NgbGlobalFilterTemplate)[];
89
+
90
+ type NgbDataGridExportType = 'pdf' | 'excel' | 'both';
91
+ type NgbDataGridExportPages = 'all' | 'current' | 'selection';
92
+ type NgbDataGridTheme = 'material' | 'tailwind' | 'bootstrap';
93
+ interface NgbDataGridExportOptions {
94
+ enabled: boolean;
95
+ type: NgbDataGridExportType;
96
+ pages: NgbDataGridExportPages;
97
+ fileName?: string;
98
+ pdf?: {
99
+ pageSize?: 'A4' | 'Letter' | string;
100
+ landscape?: boolean;
101
+ margins?: [number, number, number, number];
102
+ };
103
+ excel?: {
104
+ sheetName?: string;
105
+ };
106
+ }
107
+ interface NgbDataGridResponsiveOptions {
108
+ enabled: boolean;
109
+ breakpoints?: {
110
+ mobile?: number;
111
+ tablet?: number;
112
+ desktop?: number;
113
+ };
114
+ }
115
+
116
+ interface ExportButtonContext {
117
+ $implicit: (kind: 'pdf' | 'excel') => void;
118
+ }
119
+ declare class ExportButtonDirective {
120
+ readonly templateRef: TemplateRef<ExportButtonContext>;
121
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportButtonDirective, never>;
122
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ExportButtonDirective, "[ngbExportButton]", never, {}, {}, never, never, true, never>;
123
+ }
124
+
125
+ type SortDir = 'asc' | 'desc' | '';
126
+ type KeyOf<T> = Extract<keyof T, string>;
127
+ declare class Datagrid<T = any> implements AfterContentInit, OnChanges {
128
+ /** Column definitions to render */
129
+ columns: ColumnDef<T>[];
130
+ /** Row data to display */
131
+ data: T[];
132
+ enableSorting: boolean;
133
+ enableFiltering: boolean;
134
+ enableGlobalFilter: boolean;
135
+ enablePagination: boolean;
136
+ enableEdit: boolean;
137
+ enableDelete: boolean;
138
+ pageSizeOptions: number[];
139
+ enableAdd: boolean;
140
+ /** Accessible label (aria-label) applied to the add-row button. */
141
+ addButtonAriaLabel: string | null;
142
+ /** Visible text rendered inside the add-row button. */
143
+ addButtonText: string;
144
+ /** Accessible label for the global filter input. */
145
+ globalFilterAriaLabel: string;
146
+ /** Accessible label announced when expanding a row. */
147
+ expandRowAriaLabel: string;
148
+ /** Accessible label announced when collapsing a row. */
149
+ collapseRowAriaLabel: string;
150
+ /** Accessible label for the PDF export button. */
151
+ exportPdfAriaLabel: string;
152
+ /** Accessible label for the Excel export button. */
153
+ exportExcelAriaLabel: string;
154
+ /** Optional defaults for new rows */
155
+ newRowDefaults: Partial<Record<KeyOf<T>, any>> | (() => Partial<Record<KeyOf<T>, any>>) | null;
156
+ strictEmail: boolean;
157
+ editOnRowClick: boolean;
158
+ singleExpand: boolean;
159
+ exportOptions: NgbDataGridExportOptions;
160
+ theme: NgbDataGridTheme;
161
+ responsive: NgbDataGridResponsiveOptions | boolean;
162
+ dataProviderAll?: () => Observable<any[]> | Promise<any[]> | any[];
163
+ dataProviderSelection?: () => any[];
164
+ exportButtonDir?: ExportButtonDirective;
165
+ exporting: boolean;
166
+ rowAdd: EventEmitter<{
167
+ newRow: T;
168
+ }>;
169
+ rowEdit: EventEmitter<{
170
+ row: T;
171
+ index: number;
172
+ }>;
173
+ rowSave: EventEmitter<{
174
+ original: T;
175
+ updated: T;
176
+ index: number;
177
+ }>;
178
+ rowCancel: EventEmitter<{
179
+ row: T;
180
+ index: number;
181
+ }>;
182
+ rowDelete: EventEmitter<{
183
+ row: T;
184
+ index: number;
185
+ }>;
186
+ sortChange: EventEmitter<{
187
+ active: string | null;
188
+ direction: "asc" | "desc" | "";
189
+ }>;
190
+ filtersChange: EventEmitter<{
191
+ global: string;
192
+ columns: Record<string, string>;
193
+ }>;
194
+ pageChange: EventEmitter<{
195
+ page: number;
196
+ pageSize: number;
197
+ }>;
198
+ rowDetailTpl?: NgbRowDetailTemplate<T>;
199
+ private exporter;
200
+ expanded: Set<number>;
201
+ private fb;
202
+ filterForm: FormGroup;
203
+ globalFilterCtrl: FormControl<string>;
204
+ addingNew: boolean;
205
+ draftNew: Partial<Record<KeyOf<T>, any>> | null;
206
+ errorsNew: Partial<Record<KeyOf<T>, string>>;
207
+ sort: {
208
+ active: Extract<keyof T, string> | null;
209
+ direction: SortDir;
210
+ };
211
+ globalFilter: string;
212
+ filters: Record<string, string>;
213
+ page: number;
214
+ pageSize: number;
215
+ /** Inline editing state */
216
+ editingIndex: number | null;
217
+ editForm: FormGroup;
218
+ saveAttemptedEdit: boolean;
219
+ addForm: FormGroup;
220
+ saveAttemptedNew: boolean;
221
+ private norm;
222
+ private keyOf;
223
+ private passesRowFilters;
224
+ private getDefaults;
225
+ private defaultFor;
226
+ private numberValidator;
227
+ private dateValidator;
228
+ private buildFormFromRow;
229
+ private rowIsValidAgainst;
230
+ private strictEmailValidator;
231
+ get exportButtonTpl(): TemplateRef<ExportButtonContext> | null;
232
+ get filtered(): T[];
233
+ private compare;
234
+ get sorted(): T[];
235
+ get paged(): T[];
236
+ get anyFilterable(): boolean;
237
+ get startIndex(): number;
238
+ get endIndex(): number;
239
+ get detailColspan(): number;
240
+ headerText(col: ColumnDef<T>): string;
241
+ columnFilterAriaLabel(col: ColumnDef<T>): string;
242
+ inputAriaLabel(col: ColumnDef<T>): string;
243
+ ariaSortFor(field: Extract<keyof T, string>): 'ascending' | 'descending' | 'none';
244
+ sortButtonAriaLabel(col: ColumnDef<T>): string;
245
+ exportAriaLabel(kind: 'pdf' | 'excel'): string;
246
+ private dataIndexFromPaged;
247
+ private rebuildFilterForm;
248
+ private cellTplQ;
249
+ private editTplQ;
250
+ private filterTplQ;
251
+ private globalTplQ;
252
+ /** Internal lookup maps */
253
+ cellTpls: Record<string, NgbCellTemplate<T>>;
254
+ editTpls: Record<string, NgbEditorTemplate<T>>;
255
+ filterTpls: Record<string, NgbFilterTemplate<T>>;
256
+ globalTpl: NgbGlobalFilterTemplate | null;
257
+ private toRecord;
258
+ export(kind: 'pdf' | 'excel'): Promise<void>;
259
+ private resolveDataset;
260
+ ngAfterContentInit(): void;
261
+ ngOnChanges(ch: SimpleChanges): void;
262
+ startAdd(): void;
263
+ saveAdd(): void;
264
+ cancelAdd(): void;
265
+ startEdit(i: number): void;
266
+ saveEdit(i: number): void;
267
+ cancelEdit(i: number): void;
268
+ onNewDraftChange(col: ColumnDef<T>): void;
269
+ validateInto(col: ColumnDef<T>, targetDraft: Partial<Record<KeyOf<T>, any>> | null, targetErrors: Partial<Record<KeyOf<T>, string>>): void;
270
+ deleteRow(i: number): void;
271
+ trackRow: (_: number, row: T) => T;
272
+ toggleSort(field: Extract<keyof T, string>): void;
273
+ onGlobalFilterChange(): void;
274
+ onColumnFilterChange(): void;
275
+ onPageChange(p: number): void;
276
+ onPageSizeChange(): void;
277
+ toggleExpand(i: number): void;
278
+ isExpanded(i: number): boolean;
279
+ onRowClick(ev: MouseEvent, i: number): void;
280
+ onPage(p: number): void;
281
+ onPageSize(sz: number): void;
282
+ asBool(v: any): boolean;
283
+ triggerExport(kind: 'pdf' | 'excel'): void;
284
+ isResponsiveEnabled(): boolean;
285
+ static ɵfac: i0.ɵɵFactoryDeclaration<Datagrid<any>, never>;
286
+ 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; }; "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; }; "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"; }, ["exportButtonDir", "rowDetailTpl", "cellTplQ", "editTplQ", "filterTplQ", "globalTplQ"], never, true, never>;
287
+ }
288
+
289
+ interface PdfExportPayload {
290
+ fileName: string;
291
+ columns: string[];
292
+ rows: any[];
293
+ options?: any;
294
+ }
295
+ interface ExcelExportPayload {
296
+ fileName: string;
297
+ sheetName: string;
298
+ columns: Array<{
299
+ key: string;
300
+ title: string;
301
+ }>;
302
+ rows: any[];
303
+ }
304
+ declare abstract class PdfExportAdapter {
305
+ abstract export(p: PdfExportPayload): Promise<void>;
306
+ }
307
+ declare abstract class ExcelExportAdapter {
308
+ abstract export(p: ExcelExportPayload): Promise<void>;
309
+ }
310
+ declare class NgbExportService {
311
+ private pdf;
312
+ private excel;
313
+ exportPdf(p: PdfExportPayload): Promise<void>;
314
+ exportExcel(p: ExcelExportPayload): Promise<void>;
315
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbExportService, never>;
316
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgbExportService>;
317
+ }
318
+
319
+ declare class JsPdfAdapter implements PdfExportAdapter {
320
+ export({ fileName, columns, rows, options }: PdfExportPayload): Promise<void>;
321
+ }
322
+
323
+ declare class XlsxAdapter implements ExcelExportAdapter {
324
+ export({ fileName, sheetName, columns, rows }: ExcelExportPayload): Promise<void>;
325
+ }
326
+
327
+ type DndI18n = {
328
+ listLabel: (name?: string) => string;
329
+ pickedUp: () => string;
330
+ dropped: () => string;
331
+ moveToIndex: (pos: number, total: number) => string;
332
+ dropHere: () => string;
333
+ cannotDropHere: () => string;
334
+ };
335
+ declare const DND_I18N: InjectionToken<DndI18n>;
336
+ declare const defaultDndI18n: DndI18n;
337
+
338
+ interface DndSession<T = unknown> {
339
+ item: T;
340
+ group?: string;
341
+ fromList?: T[];
342
+ fromIndex?: number;
343
+ fromIsPalette?: boolean;
344
+ }
345
+ declare class NgbDndState {
346
+ readonly active: i0.WritableSignal<boolean>;
347
+ private store;
348
+ private currentId;
349
+ i18n: DndI18n;
350
+ announce?: (m: string) => void;
351
+ constructor(announceFn: ((m: string) => void) | null, i18n: DndI18n | null);
352
+ createSession<T>(session: DndSession<T>): string;
353
+ get(id: string | null): DndSession | null;
354
+ getCurrent(): DndSession | null;
355
+ clear(id?: string | null): void;
356
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndState, [{ optional: true; }, { optional: true; }]>;
357
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgbDndState>;
358
+ }
359
+
360
+ interface NgbDndDropEvent<T> {
361
+ item: T;
362
+ fromIndex: number;
363
+ toIndex: number;
364
+ fromList: T[];
365
+ toList: T[];
366
+ sameList: boolean;
367
+ }
368
+ interface DndCanDropPayload<T = any> {
369
+ dragItem: T;
370
+ srcList: T[];
371
+ srcIndex: number;
372
+ dstList: T[];
373
+ dstIndex: number;
374
+ isExternal: boolean;
375
+ }
376
+ /** Guard function; return true to allow, false to block */
377
+ type DndCanDropFn<T = any> = (payload: DndCanDropPayload<T>) => boolean;
378
+ declare class NgbDndListDirective<T = unknown> {
379
+ private el;
380
+ private state;
381
+ dndChildrenKey: string | null;
382
+ /** Bind your array here: <div [ngbDndList]="items"> */
383
+ list: T[];
384
+ /** Optional: group barrier across lists */
385
+ dndGroup?: string;
386
+ /** Disable this list */
387
+ dndDisabled: boolean;
388
+ /** NEW: clone if source wasn't a list (e.g. palette) */
389
+ dndCloneOnDrop: boolean;
390
+ /** NEW: custom clone function */
391
+ dndCloneFn?: (item: T) => T;
392
+ dndIsPalette: boolean;
393
+ dndCanDrop: boolean | DndCanDropFn<any>;
394
+ private _denied;
395
+ get denied(): boolean;
396
+ dndAriaLabel?: string;
397
+ get ariaLabel(): string;
398
+ /** Fires after item is inserted */
399
+ dndDropped: EventEmitter<NgbDndDropEvent<T>>;
400
+ role: string;
401
+ hostClass: boolean;
402
+ private hover;
403
+ get isOver(): boolean;
404
+ private canDrop;
405
+ get dataDropValid(): "true" | "false";
406
+ private placeholder?;
407
+ private lastIndex;
408
+ onDragEnter(ev: DragEvent): void;
409
+ onDragOver(ev: DragEvent): void;
410
+ onDragLeave(ev: DragEvent): void;
411
+ onDocumentDrop(ev: DragEvent): void;
412
+ onDrop(ev: DragEvent): void;
413
+ private getSession;
414
+ private ensurePlaceholder;
415
+ private removePlaceholder;
416
+ private positionPlaceholderAt;
417
+ private indexFromPointer;
418
+ private cloneItem;
419
+ private isDroppingIntoOwnDescendant;
420
+ /**
421
+ * Build a guard payload using whatever drag context you already store.
422
+ * If some fields don’t exist in your code, the fallbacks keep it working.
423
+ */
424
+ private _buildGuardPayload;
425
+ /**
426
+ * Compute destination index from the event position (no placeholder var needed).
427
+ * Uses vertical list heuristics; adjust for horizontal if your list is horizontal.
428
+ */
429
+ private _computeDropIndex;
430
+ private _allowDrop;
431
+ private performDrop;
432
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndListDirective<any>, never>;
433
+ 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>;
434
+ }
435
+
436
+ declare class NgbDndItemDirective<T = unknown> {
437
+ private parentList?;
438
+ private el;
439
+ private state;
440
+ constructor(parentList?: NgbDndListDirective<T>);
441
+ /** required: the value carried by this row/panel */
442
+ item: T;
443
+ /** optional: constrain cross-list drops */
444
+ dndGroup?: string;
445
+ /** index inside its parent list (bind to *ngFor index) */
446
+ dndIndex?: number;
447
+ dndDisabled: boolean;
448
+ dndDragStart: EventEmitter<T>;
449
+ dndDragEnd: EventEmitter<void>;
450
+ get draggable(): boolean;
451
+ dragging: boolean;
452
+ get ariaGrabbed(): "true" | "false";
453
+ role: string;
454
+ tabIndex: number;
455
+ private sessionId;
456
+ onDragStart(ev: DragEvent): void;
457
+ onDragEnd(): void;
458
+ onKeydown(ev: KeyboardEvent): void;
459
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbDndItemDirective<any>, [{ optional: true; }]>;
460
+ 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>;
461
+ }
462
+
463
+ declare class NgbLiveAnnouncer {
464
+ private node;
465
+ announce(message: string): void;
466
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbLiveAnnouncer, never>;
467
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgbLiveAnnouncer>;
468
+ }
469
+ declare const DND_LIVE_ANNOUNCE: InjectionToken<(m: string) => void>;
470
+
471
+ declare class NgbPaginationComponent {
472
+ page: number;
473
+ pageSize: number;
474
+ collectionSize: number;
475
+ maxSize: number;
476
+ pageChange: EventEmitter<number>;
477
+ get totalPages(): number;
478
+ get pages(): Array<number | '…'>;
479
+ go(p: number): void;
480
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbPaginationComponent, never>;
481
+ 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>;
482
+ }
483
+
484
+ type NgbStepperOrientation = 'horizontal' | 'vertical';
485
+ type NgbStepperLabelPosition = 'top' | 'bottom' | 'left' | 'right';
486
+ type NgbStepperContentPosition = 'top' | 'bottom';
487
+ type NgbStepperTheme = 'bootstrap' | 'material' | 'tailwind';
488
+ type NgbStepperState = 'number' | 'done' | 'active' | 'error' | 'disabled' | string;
489
+ interface NgbStepperStep {
490
+ /** Unique id for the step, otherwise index is used */
491
+ id?: string;
492
+ /** Simple text label (used when no custom label template is provided) */
493
+ label?: string;
494
+ /** Optional description / helper text */
495
+ description?: string;
496
+ /** Current state of the step (maps to icon + CSS classes) */
497
+ state?: NgbStepperState;
498
+ /** Error message to display when step is invalid and visited */
499
+ errorMessage?: string | null;
500
+ /** Whether this step is optional (used only for styling / a11y text) */
501
+ optional?: boolean;
502
+ /** Whether this step is disabled */
503
+ disabled?: boolean;
504
+ }
505
+
506
+ declare class NgbStepLabelDirective {
507
+ template: TemplateRef<unknown>;
508
+ for?: string | number;
509
+ constructor(template: TemplateRef<unknown>);
510
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbStepLabelDirective, never>;
511
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbStepLabelDirective, "[ngbStepLabel]", never, { "for": { "alias": "ngbStepLabel"; "required": false; }; }, {}, never, never, true, never>;
512
+ }
513
+
514
+ interface NgbStepperSelectionChangeEvent {
515
+ previousIndex: number;
516
+ currentIndex: number;
517
+ step: NgbStepperStep | undefined;
518
+ }
519
+ declare class NgbStepperComponent implements AfterContentInit {
520
+ /** Steps definition */
521
+ steps: NgbStepperStep[];
522
+ /** Orientation of the stepper */
523
+ orientation: NgbStepperOrientation;
524
+ /** Position of labels around the indicator */
525
+ labelPosition: NgbStepperLabelPosition;
526
+ /** Position of content relative to header (horizontal only) */
527
+ contentPosition: NgbStepperContentPosition;
528
+ /** Allow navigating back to previous steps by clicking header */
529
+ allowRevisit: boolean;
530
+ /** Enable lazy loading of step content (default true) */
531
+ lazy: boolean;
532
+ /** Theme keyword (only CSS classes, no external deps) */
533
+ theme: NgbStepperTheme;
534
+ /** Whether to apply responsive helper class */
535
+ responsive: boolean;
536
+ /** Disable transition / animation helpers */
537
+ disableAnimation: boolean;
538
+ /** Animation duration (ms) for step transitions when enabled */
539
+ animationDuration: number;
540
+ /** Label strings (for i18n) */
541
+ nextLabel: string;
542
+ previousLabel: string;
543
+ resetLabel: string;
544
+ cancelLabel: string;
545
+ optionalLabel: string;
546
+ /** Custom mapping from state -> icon text */
547
+ stateIcons: Record<string, string>;
548
+ /** Current selected index */
549
+ selectedIndex: number;
550
+ /** Emits when selectedIndex changes (programmatically or by user) */
551
+ selectedIndexChange: EventEmitter<number>;
552
+ /** Emits when selection changes with rich event */
553
+ selectionChange: EventEmitter<NgbStepperSelectionChangeEvent>;
554
+ /** Navigation events */
555
+ nextClicked: EventEmitter<number>;
556
+ prevClicked: EventEmitter<number>;
557
+ resetClicked: EventEmitter<void>;
558
+ cancelClicked: EventEmitter<void>;
559
+ /** Custom label template (applied for all steps) */
560
+ stepLabelTplDir?: NgbStepLabelDirective;
561
+ /** Custom icon template for step indicator */
562
+ customIconTpl?: TemplateRef<any>;
563
+ /** Content template; user will typically use <ng-template #stepContent ...> */
564
+ stepContentTpl?: TemplateRef<any>;
565
+ /** Track which steps have been visited */
566
+ private visited;
567
+ /** Used when allowRevisit=false to block earlier steps */
568
+ visitedFrom: number;
569
+ ngAfterContentInit(): void;
570
+ get stepLabelTpl(): TemplateRef<any> | null;
571
+ get labelPositionClass(): string;
572
+ get currentErrorMessage(): string | null;
573
+ stepId(i: number): string;
574
+ contentId(i: number): string;
575
+ private markVisited;
576
+ stepState(i: number): NgbStepperState;
577
+ isStepInError(i: number): boolean;
578
+ indicatorClass(i: number): string;
579
+ defaultIconForState(state: NgbStepperState, index: number): string;
580
+ onHeaderClick(i: number): void;
581
+ onHeaderKeydown(event: KeyboardEvent | Event, i: number): void;
582
+ next(): void;
583
+ prev(): void;
584
+ onReset(): void;
585
+ onCancel(): void;
586
+ private changeIndex;
587
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbStepperComponent, never>;
588
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbStepperComponent, "ngb-stepper", never, { "steps": { "alias": "steps"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "contentPosition": { "alias": "contentPosition"; "required": false; }; "allowRevisit": { "alias": "allowRevisit"; "required": false; }; "lazy": { "alias": "lazy"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "disableAnimation": { "alias": "disableAnimation"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "nextLabel": { "alias": "nextLabel"; "required": false; }; "previousLabel": { "alias": "previousLabel"; "required": false; }; "resetLabel": { "alias": "resetLabel"; "required": false; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; }; "optionalLabel": { "alias": "optionalLabel"; "required": false; }; "stateIcons": { "alias": "stateIcons"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "selectionChange": "selectionChange"; "nextClicked": "nextClicked"; "prevClicked": "prevClicked"; "resetClicked": "resetClicked"; "cancelClicked": "cancelClicked"; }, ["stepLabelTplDir", "customIconTpl", "stepContentTpl"], never, true, never>;
589
+ }
590
+
591
+ declare class NgbSplitterPaneComponent {
592
+ templateRef: TemplateRef<any>;
593
+ size?: string;
594
+ min?: string;
595
+ max?: string;
596
+ collapsible: boolean;
597
+ collapsed: boolean;
598
+ collapsedChange: EventEmitter<boolean>;
599
+ toggleCollapsed(next?: boolean): void;
600
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbSplitterPaneComponent, never>;
601
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbSplitterPaneComponent, "ngb-splitter-pane", never, { "size": { "alias": "size"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "collapsedChange": "collapsedChange"; }, never, ["*"], true, never>;
602
+ }
603
+
604
+ type NgbSplitterOrientation = 'horizontal' | 'vertical';
605
+ interface NgbSplitterPaneSize {
606
+ size?: string;
607
+ min?: string;
608
+ max?: string;
609
+ }
610
+
611
+ type PaneState = {
612
+ sizePx?: number;
613
+ minPx?: number;
614
+ maxPx?: number;
615
+ id: string;
616
+ };
617
+ declare class NgbSplitterComponent implements AfterContentInit, OnDestroy, OnChanges {
618
+ panes: QueryList<NgbSplitterPaneComponent>;
619
+ container: ElementRef<HTMLElement>;
620
+ orientation: NgbSplitterOrientation;
621
+ handleThickness: number;
622
+ paneStates: PaneState[];
623
+ private resizeSub?;
624
+ private currentDrag?;
625
+ ngAfterContentInit(): void;
626
+ ngOnChanges(changes: SimpleChanges): void;
627
+ ngOnDestroy(): void;
628
+ onWindowResize(): void;
629
+ startResize(index: number, event: MouseEvent): void;
630
+ onHandleKeydown(index: number, event: KeyboardEvent): void;
631
+ toggleFromHandle(index: number): void;
632
+ private onDrag;
633
+ private stopDrag;
634
+ private adjustPaneSizes;
635
+ private initStates;
636
+ private computePaneSizes;
637
+ private resolveSize;
638
+ private getLimits;
639
+ private clamp;
640
+ private pointerPosition;
641
+ private getContainerSize;
642
+ private detachDragListeners;
643
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbSplitterComponent, never>;
644
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbSplitterComponent, "ngb-splitter", never, { "orientation": { "alias": "orientation"; "required": false; }; "handleThickness": { "alias": "handleThickness"; "required": false; }; }, {}, ["panes"], never, true, never>;
645
+ }
646
+
647
+ interface NgbTypeaheadItem {
648
+ id: string | number;
649
+ label: string;
650
+ value?: any;
651
+ disabled?: boolean;
652
+ }
653
+ interface NgbTypeaheadI18n {
654
+ placeholder?: string;
655
+ noResults?: string;
656
+ clearSelection?: string;
657
+ }
658
+
659
+ declare class NgbTypeaheadComponent implements AfterViewInit, OnChanges, OnDestroy {
660
+ data: NgbTypeaheadItem[];
661
+ debounceTime: number;
662
+ characterTyped: number;
663
+ limit: number;
664
+ selectExact: boolean;
665
+ multiSelect: boolean;
666
+ i18n?: NgbTypeaheadI18n;
667
+ itemTemplate?: TemplateRef<any>;
668
+ selectedItems: EventEmitter<NgbTypeaheadItem[]>;
669
+ selectionChange: EventEmitter<NgbTypeaheadItem[]>;
670
+ onChange: EventEmitter<string>;
671
+ onScrollEvent: EventEmitter<void>;
672
+ scroller: ElementRef<HTMLElement>;
673
+ inputEl: ElementRef<HTMLInputElement>;
674
+ itemButtons?: QueryList<ElementRef<HTMLButtonElement>>;
675
+ query: string;
676
+ filtered: NgbTypeaheadItem[];
677
+ visible: NgbTypeaheadItem[];
678
+ selected: NgbTypeaheadItem[];
679
+ viewportHeight: number;
680
+ itemHeight: number;
681
+ beforePadding: number;
682
+ afterPadding: number;
683
+ private debounceId?;
684
+ ngAfterViewInit(): void;
685
+ ngOnChanges(changes: SimpleChanges): void;
686
+ ngOnDestroy(): void;
687
+ get selectionSummary(): string;
688
+ onInput(value: string): void;
689
+ onKeydown(event: KeyboardEvent): void;
690
+ onScroll(event: Event): void;
691
+ selectItem(item: NgbTypeaheadItem): void;
692
+ clearSelection(): void;
693
+ isSelected(item: NgbTypeaheadItem): boolean;
694
+ trackById: (_: number, item: NgbTypeaheadItem) => string | number;
695
+ private applyFilter;
696
+ private updateViewport;
697
+ private focusSibling;
698
+ private validateItem;
699
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbTypeaheadComponent, never>;
700
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbTypeaheadComponent, "ngb-typeahead", never, { "data": { "alias": "data"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "characterTyped": { "alias": "characterTyped"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "selectExact": { "alias": "selectExact"; "required": false; }; "multiSelect": { "alias": "multiSelect"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; }, { "selectedItems": "selectedItems"; "selectionChange": "selectionChange"; "onChange": "onChange"; "onScrollEvent": "onScrollEvent"; }, ["itemTemplate"], never, true, never>;
701
+ }
702
+
703
+ type NgbTreeType = 'text' | 'json';
704
+ interface NgbTreeNode {
705
+ id: string;
706
+ label: string;
707
+ children?: NgbTreeNode[];
708
+ expanded?: boolean;
709
+ selected?: boolean;
710
+ disabled?: boolean;
711
+ }
712
+ interface NgbTreeI18n {
713
+ treeLabel?: string;
714
+ expand?: string;
715
+ collapse?: string;
716
+ expandAll?: string;
717
+ collapseAll?: string;
718
+ select?: string;
719
+ }
720
+
721
+ declare class NgbTreeComponent {
722
+ nodes: NgbTreeNode[];
723
+ type: NgbTreeType;
724
+ showCheckbox: boolean;
725
+ i18n?: NgbTreeI18n;
726
+ expand: EventEmitter<NgbTreeNode>;
727
+ collapse: EventEmitter<NgbTreeNode>;
728
+ expandAll: EventEmitter<void>;
729
+ collapseAll: EventEmitter<void>;
730
+ selectionChange: EventEmitter<NgbTreeNode[]>;
731
+ nodeButtons: QueryList<ElementRef<HTMLButtonElement>>;
732
+ trackById: (_: number, node: NgbTreeNode) => string;
733
+ hasChildren(node: NgbTreeNode): boolean;
734
+ toggleNode(node: NgbTreeNode): void;
735
+ toggleSelection(node: NgbTreeNode, value: boolean): void;
736
+ expandAllNodes(): void;
737
+ collapseAllNodes(): void;
738
+ onNodeKeydown(event: KeyboardEvent, node: NgbTreeNode): void;
739
+ private focusSibling;
740
+ private setExpanded;
741
+ private collectSelection;
742
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbTreeComponent, never>;
743
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbTreeComponent, "ngb-tree", never, { "nodes": { "alias": "nodes"; "required": false; }; "type": { "alias": "type"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; }, { "expand": "expand"; "collapse": "collapse"; "expandAll": "expandAll"; "collapseAll": "collapseAll"; "selectionChange": "selectionChange"; }, never, never, true, never>;
744
+ }
745
+
746
+ export { DATAGRID_TEMPLATE_DIRECTIVES, DND_I18N, DND_LIVE_ANNOUNCE, Datagrid, ExcelExportAdapter, ExportButtonDirective, JsPdfAdapter, NgbCellTemplate, NgbDndItemDirective, NgbDndListDirective, NgbDndState, NgbEditorTemplate, NgbExportService, NgbFilterTemplate, NgbGlobalFilterTemplate, NgbLiveAnnouncer, NgbPaginationComponent, NgbRowDetailTemplate, NgbSplitterComponent, NgbStepLabelDirective, NgbStepperComponent, NgbTreeComponent, NgbTypeaheadComponent, PdfExportAdapter, XlsxAdapter, defaultDndI18n };
747
+ export type { CellCtx, ColumnDef, ColumnType, DndCanDropFn, DndCanDropPayload, DndI18n, DndSession, EditCtx, ExcelExportPayload, ExportButtonContext, FilterCtx, GlobalFilterCtx, NgbDataGridExportOptions, NgbDataGridExportPages, NgbDataGridExportType, NgbDataGridResponsiveOptions, NgbDataGridTheme, NgbDndDropEvent, NgbSplitterOrientation, NgbSplitterPaneSize, NgbStepperContentPosition, NgbStepperLabelPosition, NgbStepperOrientation, NgbStepperSelectionChangeEvent, NgbStepperState, NgbStepperStep, NgbStepperTheme, NgbTreeI18n, NgbTreeNode, NgbTreeType, NgbTypeaheadI18n, NgbTypeaheadItem, PdfExportPayload };