@swimlane/ngx-datatable 20.0.0 → 21.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/swimlane-ngx-datatable.mjs +6842 -0
- package/fesm2022/swimlane-ngx-datatable.mjs.map +1 -0
- package/{swimlane-ngx-datatable.d.ts → index.d.ts} +1 -0
- package/lib/components/body/body-cell.component.d.ts +29 -21
- package/lib/components/body/body-group-header-template.directive.d.ts +5 -3
- package/lib/components/body/body-group-header.directive.d.ts +15 -7
- package/lib/components/body/body-row-def.component.d.ts +34 -0
- package/lib/components/body/body-row-wrapper.component.d.ts +35 -20
- package/lib/components/body/body-row.component.d.ts +29 -32
- package/lib/components/body/body.component.d.ts +89 -67
- package/lib/components/body/ghost-loader/ghost-loader.component.d.ts +12 -0
- package/lib/components/body/progress-bar.component.d.ts +3 -0
- package/lib/components/body/scroller.component.d.ts +6 -6
- package/lib/components/body/selection.component.d.ts +22 -23
- package/lib/components/body/summary/summary-row.component.d.ts +6 -2
- package/lib/components/columns/column-cell.directive.d.ts +6 -2
- package/lib/components/columns/column-ghost-cell.directive.d.ts +6 -0
- package/lib/components/columns/column-header.directive.d.ts +5 -3
- package/lib/components/columns/column.directive.d.ts +44 -16
- package/lib/components/columns/tree.directive.d.ts +3 -1
- package/lib/components/datatable.component.d.ts +143 -74
- package/lib/components/footer/footer-template.directive.d.ts +5 -3
- package/lib/components/footer/footer.component.d.ts +5 -1
- package/lib/components/footer/footer.directive.d.ts +8 -3
- package/lib/components/footer/pager.component.d.ts +8 -3
- package/lib/components/header/header-cell.component.d.ts +20 -17
- package/lib/components/header/header.component.d.ts +43 -35
- package/lib/components/row-detail/row-detail-template.directive.d.ts +5 -3
- package/lib/components/row-detail/row-detail.directive.d.ts +10 -6
- package/lib/directives/disable-row.directive.d.ts +22 -0
- package/lib/directives/draggable.directive.d.ts +13 -7
- package/lib/directives/long-press.directive.d.ts +18 -4
- package/lib/directives/orderable.directive.d.ts +23 -9
- package/lib/directives/resizeable.directive.d.ts +9 -4
- package/lib/directives/visibility.directive.d.ts +4 -2
- package/lib/ngx-datatable.module.d.ts +33 -1
- package/lib/services/column-changes.service.d.ts +4 -1
- package/lib/services/scrollbar-helper.service.d.ts +3 -1
- package/lib/types/internal.types.d.ts +31 -0
- package/lib/types/public.types.d.ts +142 -0
- package/lib/types/table-column.type.d.ts +39 -66
- package/lib/utils/column-helper.d.ts +2 -2
- package/lib/utils/column-prop-getters.d.ts +1 -1
- package/lib/utils/column.d.ts +7 -14
- package/lib/utils/keys.d.ts +6 -6
- package/lib/utils/math.d.ts +4 -3
- package/lib/utils/selection.d.ts +2 -2
- package/lib/utils/sort.d.ts +5 -5
- package/lib/utils/table-token.d.ts +7 -0
- package/lib/utils/tree.d.ts +2 -2
- package/package.json +16 -12
- package/public-api.d.ts +4 -11
- package/LICENSE +0 -22
- package/README.md +0 -47
- package/assets/app.css +0 -302
- package/assets/data/100k.json +0 -100002
- package/assets/data/company.json +0 -505
- package/assets/data/company_tree.json +0 -61
- package/assets/data/forRowGrouping.json +0 -227
- package/assets/fonts/data-table.eot +0 -0
- package/assets/fonts/data-table.svg +0 -26
- package/assets/fonts/data-table.ttf +0 -0
- package/assets/fonts/data-table.woff +0 -0
- package/assets/icons-reference.html +0 -395
- package/assets/icons.css +0 -105
- package/bundles/swimlane-ngx-datatable.umd.js +0 -5900
- package/bundles/swimlane-ngx-datatable.umd.js.map +0 -1
- package/esm2015/lib/components/body/body-cell.component.js +0 -361
- package/esm2015/lib/components/body/body-group-header-template.directive.js +0 -15
- package/esm2015/lib/components/body/body-group-header.directive.js +0 -54
- package/esm2015/lib/components/body/body-row-wrapper.component.js +0 -106
- package/esm2015/lib/components/body/body-row.component.js +0 -213
- package/esm2015/lib/components/body/body.component.js +0 -716
- package/esm2015/lib/components/body/progress-bar.component.js +0 -17
- package/esm2015/lib/components/body/scroller.component.js +0 -83
- package/esm2015/lib/components/body/selection.component.js +0 -140
- package/esm2015/lib/components/body/summary/summary-row.component.js +0 -81
- package/esm2015/lib/components/columns/column-cell.directive.js +0 -13
- package/esm2015/lib/components/columns/column-header.directive.js +0 -13
- package/esm2015/lib/components/columns/column.directive.js +0 -65
- package/esm2015/lib/components/columns/tree.directive.js +0 -13
- package/esm2015/lib/components/datatable.component.js +0 -925
- package/esm2015/lib/components/footer/footer-template.directive.js +0 -13
- package/esm2015/lib/components/footer/footer.component.js +0 -75
- package/esm2015/lib/components/footer/footer.directive.js +0 -22
- package/esm2015/lib/components/footer/pager.component.js +0 -136
- package/esm2015/lib/components/header/header-cell.component.js +0 -191
- package/esm2015/lib/components/header/header.component.js +0 -297
- package/esm2015/lib/components/row-detail/row-detail-template.directive.js +0 -15
- package/esm2015/lib/components/row-detail/row-detail.directive.js +0 -55
- package/esm2015/lib/directives/draggable.directive.js +0 -102
- package/esm2015/lib/directives/long-press.directive.js +0 -103
- package/esm2015/lib/directives/orderable.directive.js +0 -131
- package/esm2015/lib/directives/resizeable.directive.js +0 -89
- package/esm2015/lib/directives/visibility.directive.js +0 -62
- package/esm2015/lib/events.js +0 -7
- package/esm2015/lib/ngx-datatable.module.js +0 -96
- package/esm2015/lib/services/column-changes.service.js +0 -21
- package/esm2015/lib/services/dimensions-helper.service.js +0 -14
- package/esm2015/lib/services/scrollbar-helper.service.js +0 -34
- package/esm2015/lib/types/click.type.js +0 -6
- package/esm2015/lib/types/column-mode.type.js +0 -7
- package/esm2015/lib/types/contextmenu.type.js +0 -6
- package/esm2015/lib/types/selection.type.js +0 -9
- package/esm2015/lib/types/sort-direction.type.js +0 -6
- package/esm2015/lib/types/sort-prop-dir.type.js +0 -2
- package/esm2015/lib/types/sort.type.js +0 -6
- package/esm2015/lib/types/table-column.type.js +0 -2
- package/esm2015/lib/utils/camel-case.js +0 -28
- package/esm2015/lib/utils/column-helper.js +0 -95
- package/esm2015/lib/utils/column-prop-getters.js +0 -96
- package/esm2015/lib/utils/column.js +0 -69
- package/esm2015/lib/utils/elm-from-point.js +0 -38
- package/esm2015/lib/utils/id.js +0 -8
- package/esm2015/lib/utils/keys.js +0 -10
- package/esm2015/lib/utils/math.js +0 -146
- package/esm2015/lib/utils/prefixes.js +0 -40
- package/esm2015/lib/utils/row-height-cache.js +0 -138
- package/esm2015/lib/utils/selection.js +0 -40
- package/esm2015/lib/utils/sort.js +0 -127
- package/esm2015/lib/utils/throttle.js +0 -60
- package/esm2015/lib/utils/translate.js +0 -25
- package/esm2015/lib/utils/tree.js +0 -103
- package/esm2015/public-api.js +0 -64
- package/esm2015/swimlane-ngx-datatable.js +0 -5
- package/fesm2015/swimlane-ngx-datatable.js +0 -5218
- package/fesm2015/swimlane-ngx-datatable.js.map +0 -1
- package/index.css +0 -198
- package/index.scss +0 -315
- package/lib/events.d.ts +0 -3
- package/lib/services/dimensions-helper.service.d.ts +0 -7
- package/lib/types/click.type.d.ts +0 -4
- package/lib/types/column-mode.type.d.ts +0 -5
- package/lib/types/contextmenu.type.d.ts +0 -4
- package/lib/types/selection.type.d.ts +0 -7
- package/lib/types/sort-direction.type.d.ts +0 -4
- package/lib/types/sort-prop-dir.type.d.ts +0 -6
- package/lib/types/sort.type.d.ts +0 -4
- package/lib/utils/elm-from-point.d.ts +0 -8
- package/lib/utils/prefixes.d.ts +0 -1
- package/lib/utils/translate.d.ts +0 -1
- package/swimlane-ngx-datatable.metadata.json +0 -1
- package/themes/bootstrap.css +0 -67
- package/themes/bootstrap.scss +0 -101
- package/themes/dark.css +0 -75
- package/themes/dark.scss +0 -120
- package/themes/material.css +0 -305
- package/themes/material.scss +0 -480
|
@@ -1,67 +1,75 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
2
|
-
import { SortType } from '../../types/
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ColumnResizeEvent, InnerSortEvent, ReorderEvent, SelectionType, SortDirection, SortEvent, SortPropDir, SortType } from '../../types/public.types';
|
|
3
|
+
import { NgStyle } from '@angular/common';
|
|
4
|
+
import { TableColumn } from '../../types/table-column.type';
|
|
5
|
+
import { OrderableReorderEvent, PinnedColumns, TargetChangedEvent } from '../../types/internal.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DataTableHeaderComponent implements OnDestroy, OnChanges {
|
|
6
8
|
private cd;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
private scrollbarHelper;
|
|
10
|
+
sortAscendingIcon: string;
|
|
11
|
+
sortDescendingIcon: string;
|
|
12
|
+
sortUnsetIcon: string;
|
|
10
13
|
scrollbarH: boolean;
|
|
11
14
|
dealsWithGroup: boolean;
|
|
12
|
-
targetMarkerTemplate:
|
|
13
|
-
|
|
15
|
+
targetMarkerTemplate: TemplateRef<unknown>;
|
|
16
|
+
enableClearingSortState: boolean;
|
|
14
17
|
set innerWidth(val: number);
|
|
15
18
|
get innerWidth(): number;
|
|
16
|
-
sorts:
|
|
19
|
+
sorts: SortPropDir[];
|
|
17
20
|
sortType: SortType;
|
|
18
21
|
allRowsSelected: boolean;
|
|
19
22
|
selectionType: SelectionType;
|
|
20
23
|
reorderable: boolean;
|
|
21
|
-
|
|
24
|
+
verticalScrollVisible: boolean;
|
|
25
|
+
dragEventTarget?: MouseEvent;
|
|
22
26
|
set headerHeight(val: any);
|
|
23
27
|
get headerHeight(): any;
|
|
24
|
-
set columns(val:
|
|
28
|
+
set columns(val: TableColumn[]);
|
|
25
29
|
get columns(): any[];
|
|
26
30
|
set offsetX(val: number);
|
|
27
31
|
get offsetX(): number;
|
|
28
|
-
sort: EventEmitter<
|
|
29
|
-
reorder: EventEmitter<
|
|
30
|
-
resize: EventEmitter<
|
|
31
|
-
|
|
32
|
+
sort: EventEmitter<SortEvent>;
|
|
33
|
+
reorder: EventEmitter<ReorderEvent>;
|
|
34
|
+
resize: EventEmitter<ColumnResizeEvent>;
|
|
35
|
+
resizing: EventEmitter<ColumnResizeEvent>;
|
|
36
|
+
select: EventEmitter<void>;
|
|
32
37
|
columnContextmenu: EventEmitter<{
|
|
33
38
|
event: MouseEvent;
|
|
34
|
-
column:
|
|
39
|
+
column: TableColumn;
|
|
35
40
|
}>;
|
|
36
|
-
_columnsByPin:
|
|
41
|
+
_columnsByPin: PinnedColumns[];
|
|
37
42
|
_columnGroupWidths: any;
|
|
38
43
|
_innerWidth: number;
|
|
39
44
|
_offsetX: number;
|
|
40
|
-
_columns:
|
|
45
|
+
_columns: TableColumn[];
|
|
41
46
|
_headerHeight: string;
|
|
42
47
|
_styleByGroup: {
|
|
43
|
-
|
|
48
|
+
left: NgStyle['ngStyle'];
|
|
49
|
+
center: NgStyle['ngStyle'];
|
|
50
|
+
right: NgStyle['ngStyle'];
|
|
44
51
|
};
|
|
45
52
|
private destroyed;
|
|
46
|
-
|
|
53
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
47
54
|
ngOnDestroy(): void;
|
|
48
55
|
onLongPressStart({ event, model }: {
|
|
49
|
-
event:
|
|
50
|
-
model:
|
|
56
|
+
event: MouseEvent;
|
|
57
|
+
model: TableColumn;
|
|
51
58
|
}): void;
|
|
52
|
-
onLongPressEnd({
|
|
53
|
-
|
|
54
|
-
model: any;
|
|
59
|
+
onLongPressEnd({ model }: {
|
|
60
|
+
model: TableColumn;
|
|
55
61
|
}): void;
|
|
56
62
|
get headerWidth(): string;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
onColumnReordered({ prevIndex, newIndex, model }:
|
|
61
|
-
onTargetChanged({ prevIndex, newIndex, initialIndex }:
|
|
63
|
+
onColumnResized(width: number, column: TableColumn): void;
|
|
64
|
+
onColumnResizing(width: number, column: TableColumn): void;
|
|
65
|
+
private makeResizeEvent;
|
|
66
|
+
onColumnReordered({ prevIndex, newIndex, model }: OrderableReorderEvent): void;
|
|
67
|
+
onTargetChanged({ prevIndex, newIndex, initialIndex }: TargetChangedEvent): void;
|
|
62
68
|
getColumn(index: number): any;
|
|
63
|
-
onSort({ column, prevValue, newValue }:
|
|
64
|
-
calcNewSorts(column:
|
|
69
|
+
onSort({ column, prevValue, newValue }: InnerSortEvent): void;
|
|
70
|
+
calcNewSorts(column: TableColumn, prevValue: SortDirection, newValue: SortDirection): SortPropDir[];
|
|
65
71
|
setStylesByGroup(): void;
|
|
66
|
-
calcStylesByGroup(group:
|
|
72
|
+
calcStylesByGroup(group: 'center' | 'right' | 'left'): NgStyle['ngStyle'];
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableHeaderComponent, never>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableHeaderComponent, "datatable-header", never, { "sortAscendingIcon": { "alias": "sortAscendingIcon"; "required": false; }; "sortDescendingIcon": { "alias": "sortDescendingIcon"; "required": false; }; "sortUnsetIcon": { "alias": "sortUnsetIcon"; "required": false; }; "scrollbarH": { "alias": "scrollbarH"; "required": false; }; "dealsWithGroup": { "alias": "dealsWithGroup"; "required": false; }; "targetMarkerTemplate": { "alias": "targetMarkerTemplate"; "required": false; }; "enableClearingSortState": { "alias": "enableClearingSortState"; "required": false; }; "innerWidth": { "alias": "innerWidth"; "required": false; }; "sorts": { "alias": "sorts"; "required": false; }; "sortType": { "alias": "sortType"; "required": false; }; "allRowsSelected": { "alias": "allRowsSelected"; "required": false; }; "selectionType": { "alias": "selectionType"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "verticalScrollVisible": { "alias": "verticalScrollVisible"; "required": false; }; "headerHeight": { "alias": "headerHeight"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; }, { "sort": "sort"; "reorder": "reorder"; "resize": "resize"; "resizing": "resizing"; "select": "select"; "columnContextmenu": "columnContextmenu"; }, never, never, true, never>;
|
|
67
75
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RowDetailContext } from '../../types/public.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class DatatableRowDetailTemplateDirective {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
static ngTemplateContextGuard(directive: DatatableRowDetailTemplateDirective, context: unknown): context is RowDetailContext;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDetailTemplateDirective, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableRowDetailTemplateDirective, "[ngx-datatable-row-detail-template]", never, {}, {}, never, never, true, never>;
|
|
5
7
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
-
|
|
2
|
+
import { RowDetailContext } from '../../types/public.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DatatableRowDetailDirective<TRow = any> {
|
|
3
5
|
/**
|
|
4
6
|
* The detail row height is required especially
|
|
5
7
|
* when virtual scroll is enabled.
|
|
6
8
|
*/
|
|
7
|
-
rowHeight: number | ((row?:
|
|
8
|
-
_templateInput: TemplateRef<
|
|
9
|
-
_templateQuery: TemplateRef<
|
|
10
|
-
get template(): TemplateRef<
|
|
9
|
+
rowHeight: number | ((row?: TRow, index?: number) => number);
|
|
10
|
+
_templateInput: TemplateRef<RowDetailContext<TRow>>;
|
|
11
|
+
_templateQuery: TemplateRef<RowDetailContext<TRow>>;
|
|
12
|
+
get template(): TemplateRef<RowDetailContext<TRow>>;
|
|
11
13
|
/**
|
|
12
14
|
* Row detail row visbility was toggled.
|
|
13
15
|
*/
|
|
@@ -15,7 +17,7 @@ export declare class DatatableRowDetailDirective {
|
|
|
15
17
|
/**
|
|
16
18
|
* Toggle the expansion of the row
|
|
17
19
|
*/
|
|
18
|
-
toggleExpandRow(row:
|
|
20
|
+
toggleExpandRow(row: TRow): void;
|
|
19
21
|
/**
|
|
20
22
|
* API method to expand all the rows.
|
|
21
23
|
*/
|
|
@@ -24,4 +26,6 @@ export declare class DatatableRowDetailDirective {
|
|
|
24
26
|
* API method to collapse all the rows.
|
|
25
27
|
*/
|
|
26
28
|
collapseAllRows(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatatableRowDetailDirective<any>, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableRowDetailDirective<any>, "ngx-datatable-row-detail", never, { "rowHeight": { "alias": "rowHeight"; "required": false; }; "_templateInput": { "alias": "template"; "required": false; }; }, { "toggle": "toggle"; }, ["_templateQuery"], never, true, never>;
|
|
27
31
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Row Disable Directive
|
|
4
|
+
* Use this to disable/enable all children elements
|
|
5
|
+
* Usage:
|
|
6
|
+
* To disable
|
|
7
|
+
* <div [disabled]="true" disable-row >
|
|
8
|
+
* </div>
|
|
9
|
+
* To enable
|
|
10
|
+
* <div [disabled]="false" disable-row >
|
|
11
|
+
* </div>
|
|
12
|
+
*/
|
|
13
|
+
export declare class DisableRowDirective {
|
|
14
|
+
private element;
|
|
15
|
+
private _disabled;
|
|
16
|
+
set disabled(val: boolean);
|
|
17
|
+
get disabled(): boolean;
|
|
18
|
+
disableAllElements(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DisableRowDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DisableRowDirective, "[disable-row]", never, { "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
+
static ngAcceptInputType_disabled: unknown;
|
|
22
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
|
+
import { TableColumn } from '../types/table-column.type';
|
|
4
|
+
import { DraggableDragEvent } from '../types/internal.types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
3
6
|
/**
|
|
4
7
|
* Draggable Directive for Angular2
|
|
5
8
|
*
|
|
@@ -10,16 +13,15 @@ import { Subscription } from 'rxjs';
|
|
|
10
13
|
*/
|
|
11
14
|
export declare class DraggableDirective implements OnDestroy, OnChanges {
|
|
12
15
|
dragEventTarget: any;
|
|
13
|
-
dragModel:
|
|
16
|
+
dragModel: TableColumn;
|
|
14
17
|
dragX: boolean;
|
|
15
18
|
dragY: boolean;
|
|
16
|
-
dragStart: EventEmitter<
|
|
17
|
-
dragging: EventEmitter<
|
|
18
|
-
dragEnd: EventEmitter<
|
|
19
|
-
element:
|
|
19
|
+
dragStart: EventEmitter<DraggableDragEvent>;
|
|
20
|
+
dragging: EventEmitter<DraggableDragEvent>;
|
|
21
|
+
dragEnd: EventEmitter<DraggableDragEvent>;
|
|
22
|
+
element: any;
|
|
20
23
|
isDragging: boolean;
|
|
21
24
|
subscription: Subscription;
|
|
22
|
-
constructor(element: ElementRef);
|
|
23
25
|
ngOnChanges(changes: SimpleChanges): void;
|
|
24
26
|
ngOnDestroy(): void;
|
|
25
27
|
onMouseup(event: MouseEvent): void;
|
|
@@ -29,4 +31,8 @@ export declare class DraggableDirective implements OnDestroy, OnChanges {
|
|
|
29
31
|
y: number;
|
|
30
32
|
}): void;
|
|
31
33
|
private _destroySubscription;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDirective, never>;
|
|
35
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableDirective, "[draggable]", never, { "dragEventTarget": { "alias": "dragEventTarget"; "required": false; }; "dragModel": { "alias": "dragModel"; "required": false; }; "dragX": { "alias": "dragX"; "required": false; }; "dragY": { "alias": "dragY"; "required": false; }; }, { "dragStart": "dragStart"; "dragging": "dragging"; "dragEnd": "dragEnd"; }, never, never, true, never>;
|
|
36
|
+
static ngAcceptInputType_dragX: unknown;
|
|
37
|
+
static ngAcceptInputType_dragY: unknown;
|
|
32
38
|
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
|
+
import { TableColumn } from '../types/table-column.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
3
5
|
export declare class LongPressDirective implements OnDestroy {
|
|
4
6
|
pressEnabled: boolean;
|
|
5
|
-
pressModel:
|
|
7
|
+
pressModel: TableColumn;
|
|
6
8
|
duration: number;
|
|
7
|
-
longPressStart: EventEmitter<
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
longPressStart: EventEmitter<{
|
|
10
|
+
event: MouseEvent;
|
|
11
|
+
model: TableColumn;
|
|
12
|
+
}>;
|
|
13
|
+
longPressing: EventEmitter<{
|
|
14
|
+
event: MouseEvent;
|
|
15
|
+
model: TableColumn;
|
|
16
|
+
}>;
|
|
17
|
+
longPressEnd: EventEmitter<{
|
|
18
|
+
model: TableColumn;
|
|
19
|
+
}>;
|
|
10
20
|
pressing: boolean;
|
|
11
21
|
isLongPressing: boolean;
|
|
12
22
|
timeout: any;
|
|
@@ -22,4 +32,8 @@ export declare class LongPressDirective implements OnDestroy {
|
|
|
22
32
|
onMouseup(): void;
|
|
23
33
|
ngOnDestroy(): void;
|
|
24
34
|
private _destroySubscription;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LongPressDirective, never>;
|
|
36
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LongPressDirective, "[long-press]", never, { "pressEnabled": { "alias": "pressEnabled"; "required": false; }; "pressModel": { "alias": "pressModel"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; }, { "longPressStart": "longPressStart"; "longPressing": "longPressing"; "longPressEnd": "longPressEnd"; }, never, never, true, never>;
|
|
37
|
+
static ngAcceptInputType_pressEnabled: unknown;
|
|
38
|
+
static ngAcceptInputType_duration: unknown;
|
|
25
39
|
}
|
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterContentInit, EventEmitter, KeyValueDiffer, OnDestroy, QueryList } from '@angular/core';
|
|
2
2
|
import { DraggableDirective } from './draggable.directive';
|
|
3
|
+
import { TableColumn } from '../types/table-column.type';
|
|
4
|
+
import { DraggableDragEvent, OrderableReorderEvent, TargetChangedEvent } from '../types/internal.types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
interface OrderPosition {
|
|
7
|
+
left: number;
|
|
8
|
+
right: number;
|
|
9
|
+
index: number;
|
|
10
|
+
element: HTMLElement;
|
|
11
|
+
}
|
|
3
12
|
export declare class OrderableDirective implements AfterContentInit, OnDestroy {
|
|
4
13
|
private document;
|
|
5
|
-
reorder: EventEmitter<
|
|
6
|
-
targetChanged: EventEmitter<
|
|
14
|
+
reorder: EventEmitter<OrderableReorderEvent>;
|
|
15
|
+
targetChanged: EventEmitter<TargetChangedEvent>;
|
|
7
16
|
draggables: QueryList<DraggableDirective>;
|
|
8
|
-
positions:
|
|
9
|
-
differ:
|
|
17
|
+
positions: Record<string, OrderPosition>;
|
|
18
|
+
differ: KeyValueDiffer<string, DraggableDirective>;
|
|
10
19
|
lastDraggingIndex: number;
|
|
11
|
-
constructor(differs: KeyValueDiffers, document: any);
|
|
12
20
|
ngAfterContentInit(): void;
|
|
13
21
|
ngOnDestroy(): void;
|
|
14
22
|
updateSubscriptions(): void;
|
|
15
23
|
onDragStart(): void;
|
|
16
|
-
onDragging({ element, model, event }:
|
|
17
|
-
onDragEnd({ element, model, event }:
|
|
18
|
-
isTarget(model:
|
|
24
|
+
onDragging({ element, model, event }: DraggableDragEvent): void;
|
|
25
|
+
onDragEnd({ element, model, event }: DraggableDragEvent): void;
|
|
26
|
+
isTarget(model: TableColumn, event: MouseEvent): {
|
|
27
|
+
pos: OrderPosition;
|
|
28
|
+
i: number;
|
|
29
|
+
};
|
|
19
30
|
private createMapDiffs;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrderableDirective, never>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<OrderableDirective, "[orderable]", never, {}, { "reorder": "reorder"; "targetChanged": "targetChanged"; }, ["draggables"], never, true, never>;
|
|
20
33
|
}
|
|
34
|
+
export {};
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ResizeableDirective implements OnDestroy, AfterViewInit {
|
|
4
5
|
private renderer;
|
|
5
6
|
resizeEnabled: boolean;
|
|
6
7
|
minWidth: number;
|
|
7
8
|
maxWidth: number;
|
|
8
9
|
resize: EventEmitter<any>;
|
|
9
|
-
|
|
10
|
+
resizing: EventEmitter<any>;
|
|
11
|
+
element: any;
|
|
10
12
|
subscription: Subscription;
|
|
11
|
-
resizing: boolean;
|
|
12
13
|
private resizeHandle;
|
|
13
|
-
constructor(element: ElementRef, renderer: Renderer2);
|
|
14
14
|
ngAfterViewInit(): void;
|
|
15
15
|
ngOnDestroy(): void;
|
|
16
16
|
onMouseup(): void;
|
|
17
17
|
onMousedown(event: MouseEvent): void;
|
|
18
18
|
move(event: MouseEvent, initialWidth: number, mouseDownScreenX: number): void;
|
|
19
19
|
private _destroySubscription;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResizeableDirective, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ResizeableDirective, "[resizeable]", never, { "resizeEnabled": { "alias": "resizeEnabled"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; }, { "resize": "resize"; "resizing": "resizing"; }, never, never, true, never>;
|
|
22
|
+
static ngAcceptInputType_resizeEnabled: unknown;
|
|
23
|
+
static ngAcceptInputType_minWidth: unknown;
|
|
24
|
+
static ngAcceptInputType_maxWidth: unknown;
|
|
20
25
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
/**
|
|
3
4
|
* Visibility Observer Directive
|
|
4
5
|
*
|
|
@@ -16,9 +17,10 @@ export declare class VisibilityDirective implements OnInit, OnDestroy {
|
|
|
16
17
|
isVisible: boolean;
|
|
17
18
|
visible: EventEmitter<any>;
|
|
18
19
|
timeout: any;
|
|
19
|
-
constructor(element: ElementRef, zone: NgZone);
|
|
20
20
|
ngOnInit(): void;
|
|
21
21
|
ngOnDestroy(): void;
|
|
22
22
|
onVisibilityChange(): void;
|
|
23
23
|
runCheck(): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VisibilityDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<VisibilityDirective, "[visibilityObserver]", never, {}, { "visible": "visible"; }, never, never, true, never>;
|
|
24
26
|
}
|
|
@@ -1,18 +1,50 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./components/footer/footer-template.directive";
|
|
4
|
+
import * as i2 from "./components/datatable.component";
|
|
5
|
+
import * as i3 from "./components/columns/column.directive";
|
|
6
|
+
import * as i4 from "./components/footer/pager.component";
|
|
7
|
+
import * as i5 from "./components/row-detail/row-detail.directive";
|
|
8
|
+
import * as i6 from "./components/body/body-group-header.directive";
|
|
9
|
+
import * as i7 from "./components/row-detail/row-detail-template.directive";
|
|
10
|
+
import * as i8 from "./components/columns/column-header.directive";
|
|
11
|
+
import * as i9 from "./components/columns/column-cell.directive";
|
|
12
|
+
import * as i10 from "./components/columns/column-ghost-cell.directive";
|
|
13
|
+
import * as i11 from "./components/columns/tree.directive";
|
|
14
|
+
import * as i12 from "./components/footer/footer.directive";
|
|
15
|
+
import * as i13 from "./components/body/body-group-header-template.directive";
|
|
16
|
+
import * as i14 from "./directives/disable-row.directive";
|
|
17
|
+
import * as i15 from "./components/body/body-row-def.component";
|
|
2
18
|
export declare class NgxDatatableModule {
|
|
3
19
|
/**
|
|
4
20
|
* Configure global configuration via INgxDatatableConfig
|
|
5
21
|
* @param configuration
|
|
6
22
|
*/
|
|
7
23
|
static forRoot(configuration: INgxDatatableConfig): ModuleWithProviders<NgxDatatableModule>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDatatableModule, never>;
|
|
25
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDatatableModule, never, [typeof i1.DataTableFooterTemplateDirective, typeof i2.DatatableComponent, typeof i3.DataTableColumnDirective, typeof i4.DataTablePagerComponent, typeof i5.DatatableRowDetailDirective, typeof i6.DatatableGroupHeaderDirective, typeof i7.DatatableRowDetailTemplateDirective, typeof i8.DataTableColumnHeaderDirective, typeof i9.DataTableColumnCellDirective, typeof i10.DataTableColumnGhostCellDirective, typeof i11.DataTableColumnCellTreeToggle, typeof i12.DatatableFooterDirective, typeof i13.DatatableGroupHeaderTemplateDirective, typeof i14.DisableRowDirective, typeof i15.DatatableRowDefComponent, typeof i15.DatatableRowDefDirective], [typeof i2.DatatableComponent, typeof i5.DatatableRowDetailDirective, typeof i6.DatatableGroupHeaderDirective, typeof i7.DatatableRowDetailTemplateDirective, typeof i3.DataTableColumnDirective, typeof i8.DataTableColumnHeaderDirective, typeof i9.DataTableColumnCellDirective, typeof i10.DataTableColumnGhostCellDirective, typeof i11.DataTableColumnCellTreeToggle, typeof i1.DataTableFooterTemplateDirective, typeof i12.DatatableFooterDirective, typeof i4.DataTablePagerComponent, typeof i13.DatatableGroupHeaderTemplateDirective, typeof i14.DisableRowDirective, typeof i15.DatatableRowDefComponent, typeof i15.DatatableRowDefDirective]>;
|
|
26
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxDatatableModule>;
|
|
8
27
|
}
|
|
9
28
|
/**
|
|
10
29
|
* Interface definition for INgxDatatableConfig global configuration
|
|
11
30
|
*/
|
|
12
31
|
export interface INgxDatatableConfig {
|
|
13
|
-
messages
|
|
32
|
+
messages?: {
|
|
14
33
|
emptyMessage: string;
|
|
15
34
|
totalMessage: string;
|
|
16
35
|
selectedMessage: string;
|
|
17
36
|
};
|
|
37
|
+
cssClasses?: {
|
|
38
|
+
sortAscending: string;
|
|
39
|
+
sortDescending: string;
|
|
40
|
+
sortUnset: string;
|
|
41
|
+
pagerLeftArrow: string;
|
|
42
|
+
pagerRightArrow: string;
|
|
43
|
+
pagerPrevious: string;
|
|
44
|
+
pagerNext: string;
|
|
45
|
+
};
|
|
46
|
+
headerHeight?: number;
|
|
47
|
+
footerHeight?: number;
|
|
48
|
+
rowHeight?: number;
|
|
49
|
+
defaultColumnWidth?: number;
|
|
18
50
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
/**
|
|
3
4
|
* service to make DatatableComponent aware of changes to
|
|
4
5
|
* input bindings of DataTableColumnDirective
|
|
5
6
|
*/
|
|
6
7
|
export declare class ColumnChangesService {
|
|
7
8
|
private columnInputChanges;
|
|
8
|
-
get columnInputChanges$(): Observable<
|
|
9
|
+
get columnInputChanges$(): Observable<void>;
|
|
9
10
|
onInputChange(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnChangesService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnChangesService>;
|
|
10
13
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
/**
|
|
2
3
|
* Gets the width of the scrollbar. Nesc for windows
|
|
3
4
|
* http://stackoverflow.com/a/13382873/888165
|
|
@@ -5,6 +6,7 @@
|
|
|
5
6
|
export declare class ScrollbarHelper {
|
|
6
7
|
private document;
|
|
7
8
|
width: number;
|
|
8
|
-
constructor(document: any);
|
|
9
9
|
getWidth(): number;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollbarHelper, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScrollbarHelper>;
|
|
10
12
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TableColumn } from './table-column.type';
|
|
2
|
+
export type PinDirection = 'left' | 'center' | 'right';
|
|
3
|
+
export interface PinnedColumns {
|
|
4
|
+
type: PinDirection;
|
|
5
|
+
columns: TableColumn[];
|
|
6
|
+
}
|
|
7
|
+
export interface ColumnGroupWidth {
|
|
8
|
+
left: number;
|
|
9
|
+
center: number;
|
|
10
|
+
right: number;
|
|
11
|
+
total: number;
|
|
12
|
+
}
|
|
13
|
+
export interface OrderableReorderEvent {
|
|
14
|
+
prevIndex: number;
|
|
15
|
+
newIndex: number;
|
|
16
|
+
model: TableColumn;
|
|
17
|
+
}
|
|
18
|
+
export interface TargetChangedEvent {
|
|
19
|
+
newIndex?: number;
|
|
20
|
+
prevIndex: number;
|
|
21
|
+
initialIndex: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Page {
|
|
24
|
+
number: number;
|
|
25
|
+
text: string;
|
|
26
|
+
}
|
|
27
|
+
export interface DraggableDragEvent {
|
|
28
|
+
event: MouseEvent;
|
|
29
|
+
element: HTMLElement;
|
|
30
|
+
model: TableColumn;
|
|
31
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { TableColumn, TableColumnProp } from './table-column.type';
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
+
export interface SortPropDir {
|
|
4
|
+
dir: SortDirection | 'desc' | 'asc';
|
|
5
|
+
prop: TableColumnProp;
|
|
6
|
+
}
|
|
7
|
+
export declare enum SortDirection {
|
|
8
|
+
asc = "asc",
|
|
9
|
+
desc = "desc"
|
|
10
|
+
}
|
|
11
|
+
export interface InnerSortEvent {
|
|
12
|
+
column: TableColumn;
|
|
13
|
+
prevValue: SortDirection;
|
|
14
|
+
newValue: SortDirection;
|
|
15
|
+
}
|
|
16
|
+
export interface SortEvent extends InnerSortEvent {
|
|
17
|
+
sorts: SortPropDir[];
|
|
18
|
+
}
|
|
19
|
+
export declare enum SortType {
|
|
20
|
+
single = "single",
|
|
21
|
+
multi = "multi"
|
|
22
|
+
}
|
|
23
|
+
export declare enum ColumnMode {
|
|
24
|
+
standard = "standard",
|
|
25
|
+
flex = "flex",
|
|
26
|
+
force = "force"
|
|
27
|
+
}
|
|
28
|
+
export type TreeStatus = 'collapsed' | 'expanded' | 'loading' | 'disabled';
|
|
29
|
+
export interface ActivateEvent<TRow> {
|
|
30
|
+
type: 'checkbox' | 'click' | 'dblclick' | 'keydown' | 'mouseenter';
|
|
31
|
+
event: MouseEvent | KeyboardEvent;
|
|
32
|
+
row: TRow;
|
|
33
|
+
group?: TRow[];
|
|
34
|
+
rowHeight?: number;
|
|
35
|
+
column?: TableColumn;
|
|
36
|
+
value?: any;
|
|
37
|
+
cellElement?: HTMLElement;
|
|
38
|
+
treeStatus?: TreeStatus;
|
|
39
|
+
cellIndex?: number;
|
|
40
|
+
rowElement?: HTMLElement;
|
|
41
|
+
}
|
|
42
|
+
export interface HeaderCellContext {
|
|
43
|
+
column: TableColumn;
|
|
44
|
+
sortDir: SortDirection | 'asc' | 'desc';
|
|
45
|
+
sortFn: () => void;
|
|
46
|
+
allRowsSelected: boolean;
|
|
47
|
+
selectFn: () => void;
|
|
48
|
+
}
|
|
49
|
+
export interface GroupContext<TRow = any> {
|
|
50
|
+
group: Group<TRow>;
|
|
51
|
+
expanded: boolean;
|
|
52
|
+
rowIndex: number;
|
|
53
|
+
}
|
|
54
|
+
export interface CellContext<TRow = any> {
|
|
55
|
+
onCheckboxChangeFn: (event: Event) => void;
|
|
56
|
+
activateFn: (event: ActivateEvent<TRow>) => void;
|
|
57
|
+
row: TRow;
|
|
58
|
+
group: TRow[];
|
|
59
|
+
value: any;
|
|
60
|
+
column: TableColumn;
|
|
61
|
+
rowHeight: number;
|
|
62
|
+
isSelected: boolean;
|
|
63
|
+
rowIndex: number;
|
|
64
|
+
treeStatus: TreeStatus;
|
|
65
|
+
disable$: BehaviorSubject<boolean>;
|
|
66
|
+
onTreeAction: () => void;
|
|
67
|
+
expanded?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface FooterContext {
|
|
70
|
+
rowCount: number;
|
|
71
|
+
pageSize: number;
|
|
72
|
+
selectedCount: number;
|
|
73
|
+
curPage: number;
|
|
74
|
+
offset: number;
|
|
75
|
+
}
|
|
76
|
+
export declare enum ContextmenuType {
|
|
77
|
+
header = "header",
|
|
78
|
+
body = "body"
|
|
79
|
+
}
|
|
80
|
+
/** A Group row */
|
|
81
|
+
export interface Group<TRow> {
|
|
82
|
+
/** The value by which to rows are grouped. */
|
|
83
|
+
key: TRow[keyof TRow];
|
|
84
|
+
/** All rows that are part of the group. */
|
|
85
|
+
value: TRow[];
|
|
86
|
+
}
|
|
87
|
+
/** Type for either a row or a group */
|
|
88
|
+
export type RowOrGroup<TRow> = TRow | Group<TRow>;
|
|
89
|
+
export interface RowDetailContext<TRow = any> {
|
|
90
|
+
row: TRow;
|
|
91
|
+
expanded: boolean;
|
|
92
|
+
rowIndex: number;
|
|
93
|
+
disableRow$?: Observable<boolean>;
|
|
94
|
+
}
|
|
95
|
+
export interface ReorderEvent {
|
|
96
|
+
column: TableColumn;
|
|
97
|
+
prevValue: number;
|
|
98
|
+
newValue: number;
|
|
99
|
+
}
|
|
100
|
+
export interface PageEvent {
|
|
101
|
+
count: number;
|
|
102
|
+
pageSize: number;
|
|
103
|
+
limit: number;
|
|
104
|
+
offset: number;
|
|
105
|
+
}
|
|
106
|
+
export interface PagerPageEvent {
|
|
107
|
+
page: number;
|
|
108
|
+
}
|
|
109
|
+
export interface ColumnResizeEvent {
|
|
110
|
+
column: TableColumn;
|
|
111
|
+
prevValue: number;
|
|
112
|
+
newValue: number;
|
|
113
|
+
}
|
|
114
|
+
export interface ScrollEvent {
|
|
115
|
+
offsetY: number;
|
|
116
|
+
offsetX: number;
|
|
117
|
+
}
|
|
118
|
+
export interface GroupToggleEvent<TRow> {
|
|
119
|
+
type: 'group';
|
|
120
|
+
value: Group<TRow>;
|
|
121
|
+
}
|
|
122
|
+
export interface AllGroupsToggleEvent {
|
|
123
|
+
type: 'all';
|
|
124
|
+
value: boolean;
|
|
125
|
+
}
|
|
126
|
+
export type GroupToggleEvents<TRow> = GroupToggleEvent<TRow> | AllGroupsToggleEvent;
|
|
127
|
+
export declare enum SelectionType {
|
|
128
|
+
single = "single",
|
|
129
|
+
multi = "multi",
|
|
130
|
+
multiClick = "multiClick",
|
|
131
|
+
cell = "cell",
|
|
132
|
+
checkbox = "checkbox"
|
|
133
|
+
}
|
|
134
|
+
export type DragEventType = 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'dragstart' | 'drop';
|
|
135
|
+
export interface DragEventData {
|
|
136
|
+
event: DragEvent;
|
|
137
|
+
srcElement: HTMLElement;
|
|
138
|
+
targetElement?: HTMLElement;
|
|
139
|
+
eventType: DragEventType;
|
|
140
|
+
dragRow: any;
|
|
141
|
+
dropRow?: any;
|
|
142
|
+
}
|