shark-ng-table 7.0.0 → 8.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 +66 -52
- package/fesm2022/shark-ng-table.mjs +2191 -1833
- package/fesm2022/shark-ng-table.mjs.map +1 -1
- package/package.json +43 -31
- package/shark-ng-table.css +19 -1
- package/shark-ng-table.min.css +2 -4
- package/types/shark-ng-table.d.ts +913 -0
- package/app/table/child.component.d.ts +0 -34
- package/app/table/column-change-event.d.ts +0 -5
- package/app/table/column.d.ts +0 -64
- package/app/table/current.data.event.d.ts +0 -5
- package/app/table/dynamic/dynamic.contents.d.ts +0 -20
- package/app/table/dynamic/dynamic.contents.directive.d.ts +0 -8
- package/app/table/header-button.component.d.ts +0 -16
- package/app/table/index.d.ts +0 -15
- package/app/table/localfilter.pipe.d.ts +0 -11
- package/app/table/notifier/aria-notifier.component.d.ts +0 -14
- package/app/table/notifier/notifier.service.d.ts +0 -7
- package/app/table/page.change.event.d.ts +0 -27
- package/app/table/page.d.ts +0 -20
- package/app/table/sort.type.d.ts +0 -30
- package/app/table/table.body.component.d.ts +0 -67
- package/app/table/table.cell.component.d.ts +0 -20
- package/app/table/table.component.d.ts +0 -202
- package/app/table/table.footer.component.d.ts +0 -49
- package/app/table/table.header.component.d.ts +0 -39
- package/app/table/table.info.header.component.d.ts +0 -28
- package/app/table/table.module.d.ts +0 -21
- package/app/table/table.pagination.component.d.ts +0 -21
- package/app/table/table.utils.d.ts +0 -13
- package/esm2022/app/table/child.component.mjs +0 -76
- package/esm2022/app/table/column-change-event.mjs +0 -5
- package/esm2022/app/table/column.mjs +0 -2
- package/esm2022/app/table/current.data.event.mjs +0 -5
- package/esm2022/app/table/dynamic/dynamic.contents.directive.mjs +0 -17
- package/esm2022/app/table/dynamic/dynamic.contents.mjs +0 -2
- package/esm2022/app/table/header-button.component.mjs +0 -52
- package/esm2022/app/table/index.mjs +0 -11
- package/esm2022/app/table/localfilter.pipe.mjs +0 -24
- package/esm2022/app/table/notifier/aria-notifier.component.mjs +0 -44
- package/esm2022/app/table/notifier/notifier.service.mjs +0 -13
- package/esm2022/app/table/page.change.event.mjs +0 -2
- package/esm2022/app/table/page.mjs +0 -2
- package/esm2022/app/table/sort.type.mjs +0 -32
- package/esm2022/app/table/table.body.component.mjs +0 -181
- package/esm2022/app/table/table.cell.component.mjs +0 -75
- package/esm2022/app/table/table.component.mjs +0 -773
- package/esm2022/app/table/table.footer.component.mjs +0 -176
- package/esm2022/app/table/table.header.component.mjs +0 -204
- package/esm2022/app/table/table.info.header.component.mjs +0 -142
- package/esm2022/app/table/table.module.mjs +0 -73
- package/esm2022/app/table/table.pagination.component.mjs +0 -134
- package/esm2022/app/table/table.utils.mjs +0 -72
- package/esm2022/public_api.mjs +0 -2
- package/esm2022/shark-ng-table.mjs +0 -5
- package/index.d.ts +0 -5
- package/public_api.d.ts +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, OnChanges, SimpleChanges, Type } from '@angular/core';
|
|
2
|
-
import { SharkTableUtils } from './table.utils';
|
|
3
|
-
import { SharkDynamicContents } from './dynamic/dynamic.contents';
|
|
4
|
-
import { SharkDynamicContentsDirective } from './dynamic/dynamic.contents.directive';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* This Component is used to render your custom child row component.
|
|
8
|
-
*/
|
|
9
|
-
export declare class SharkChildComponent implements AfterViewInit, OnChanges {
|
|
10
|
-
private tableUtils;
|
|
11
|
-
private componentFactoryResolver;
|
|
12
|
-
private changeDetectorRef;
|
|
13
|
-
/**
|
|
14
|
-
* Your custom component which extends {@link SharkDynamicContents} that will be used
|
|
15
|
-
* to render each child row. Your custom component needs to be registerd in your NgModule
|
|
16
|
-
* as an `entryComponent` and in the `declarations` section.
|
|
17
|
-
*/
|
|
18
|
-
component: Type<SharkDynamicContents>;
|
|
19
|
-
/**
|
|
20
|
-
* The entire row, you can display anything from this row in your child component.
|
|
21
|
-
*/
|
|
22
|
-
row: any;
|
|
23
|
-
rowIndex: number;
|
|
24
|
-
openChildren: number[];
|
|
25
|
-
childContentsDirective: SharkDynamicContentsDirective;
|
|
26
|
-
childOpen: boolean;
|
|
27
|
-
componentRef: ComponentRef<SharkDynamicContents>;
|
|
28
|
-
constructor(tableUtils: SharkTableUtils, componentFactoryResolver: ComponentFactoryResolver, changeDetectorRef: ChangeDetectorRef);
|
|
29
|
-
ngAfterViewInit(): void;
|
|
30
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
31
|
-
private loadComponent;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkChildComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SharkChildComponent, "shark-child", never, { "component": { "alias": "component"; "required": false; }; "row": { "alias": "row"; "required": false; }; "rowIndex": { "alias": "rowIndex"; "required": false; }; "openChildren": { "alias": "openChildren"; "required": false; }; }, {}, never, never, false, never>;
|
|
34
|
-
}
|
package/app/table/column.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { PipeTransform, Type } from '@angular/core';
|
|
2
|
-
import { SharkSortType } from './sort.type';
|
|
3
|
-
import { SharkDynamicContents } from './dynamic/dynamic.contents';
|
|
4
|
-
/**
|
|
5
|
-
* A column definition for shark-ng-table
|
|
6
|
-
*/
|
|
7
|
-
export interface SharkColumn {
|
|
8
|
-
/**
|
|
9
|
-
* Display name
|
|
10
|
-
*/
|
|
11
|
-
header: string;
|
|
12
|
-
/**
|
|
13
|
-
* Property for this column from the data Object
|
|
14
|
-
*/
|
|
15
|
-
property: string;
|
|
16
|
-
/**
|
|
17
|
-
* {@link PipeTransform} to use for rendering the column.
|
|
18
|
-
*/
|
|
19
|
-
pipe?: Type<PipeTransform>;
|
|
20
|
-
/**
|
|
21
|
-
* Any arguments for the pipe
|
|
22
|
-
*/
|
|
23
|
-
pipeConstructorArgs?: any[];
|
|
24
|
-
/**
|
|
25
|
-
* Arguments to pass to the pipe
|
|
26
|
-
*/
|
|
27
|
-
pipeArgs?: any[];
|
|
28
|
-
/**
|
|
29
|
-
* A Component to use for rendering the column.
|
|
30
|
-
*/
|
|
31
|
-
component?: Type<SharkDynamicContents>;
|
|
32
|
-
/**
|
|
33
|
-
* The current sort type for this column
|
|
34
|
-
*/
|
|
35
|
-
sortType?: SharkSortType | number;
|
|
36
|
-
/**
|
|
37
|
-
* Provide a custom column sorting function.
|
|
38
|
-
*/
|
|
39
|
-
ascendingSortFunction?: (left: any, right: any) => number;
|
|
40
|
-
/**
|
|
41
|
-
* If the column should be aligned to the right in the cell.
|
|
42
|
-
*/
|
|
43
|
-
alignRight?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* The current filter string for this column
|
|
46
|
-
*/
|
|
47
|
-
filter?: string;
|
|
48
|
-
/**
|
|
49
|
-
* If this column should not be sortable
|
|
50
|
-
*/
|
|
51
|
-
unsortable?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Disable filtering for this column
|
|
54
|
-
*/
|
|
55
|
-
hideHeaderFilter?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Disable column re-ordering for this column
|
|
58
|
-
*/
|
|
59
|
-
disableOrdering?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* If this column is currently shown, Default `true`
|
|
62
|
-
*/
|
|
63
|
-
displayed?: boolean;
|
|
64
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Implement this interface in order to provide a custom component to render your
|
|
3
|
-
* child row or table cell.
|
|
4
|
-
*/
|
|
5
|
-
export interface SharkDynamicContents {
|
|
6
|
-
/**
|
|
7
|
-
* Data for this instance of SharkDynamicContents, for a Child row, it will be all of the row's
|
|
8
|
-
* data, for a table cell, it will just be the data for that cell.
|
|
9
|
-
*/
|
|
10
|
-
data: any;
|
|
11
|
-
/**
|
|
12
|
-
* The row that was used to render this instance of SharkDynamicContents. For a Child row, this field won't
|
|
13
|
-
* be set as it's redundant with this.data. (Optional)
|
|
14
|
-
*/
|
|
15
|
-
row?: any;
|
|
16
|
-
/**
|
|
17
|
-
* This is called when a child row is opened, if you need to retrieve more data, etc.
|
|
18
|
-
*/
|
|
19
|
-
childOpen(value: boolean): void;
|
|
20
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SharkDynamicContentsDirective {
|
|
4
|
-
viewContainerRef: ViewContainerRef;
|
|
5
|
-
constructor(viewContainerRef: ViewContainerRef);
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkDynamicContentsDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SharkDynamicContentsDirective, "[sharkDynamicContents]", never, {}, {}, never, never, false, never>;
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
import { SharkSortType } from './sort.type';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SharkTableHeaderButtonComponent {
|
|
6
|
-
column: SharkColumn;
|
|
7
|
-
sortChange: EventEmitter<SharkSortChangeEvent>;
|
|
8
|
-
ariaButtonLabel: string;
|
|
9
|
-
changeSort(): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkTableHeaderButtonComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SharkTableHeaderButtonComponent, "shark-table-header-button", never, { "column": { "alias": "column"; "required": false; }; }, { "sortChange": "sortChange"; }, never, never, false, never>;
|
|
12
|
-
}
|
|
13
|
-
export interface SharkSortChangeEvent {
|
|
14
|
-
property: string;
|
|
15
|
-
sortType: SharkSortType;
|
|
16
|
-
}
|
package/app/table/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { SharkChildComponent } from './child.component';
|
|
2
|
-
export { SharkColumn } from './column';
|
|
3
|
-
export { SharkColumnChangeEvent } from './column-change-event';
|
|
4
|
-
export { SharkDynamicContents } from './dynamic/dynamic.contents';
|
|
5
|
-
export { SharkPageChangeEvent } from './page.change.event';
|
|
6
|
-
export { SharkCurrentSort } from './sort.type';
|
|
7
|
-
export { SharkSortType } from './sort.type';
|
|
8
|
-
export { SharkTableModule } from './table.module';
|
|
9
|
-
export { SharkTableCellComponent } from './table.cell.component';
|
|
10
|
-
export { SharkTableComponent } from './table.component';
|
|
11
|
-
export { SharkTableUtils } from './table.utils';
|
|
12
|
-
export { Page } from './page';
|
|
13
|
-
export { RowStyleFunction, CellStyleFunction } from './table.body.component';
|
|
14
|
-
export { SharkTableCurrentDataEvent } from './current.data.event';
|
|
15
|
-
export { SharkTablePaginationComponent } from './table.pagination.component';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
import { SharkTableUtils } from './table.utils';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class LocalFilterPipe implements PipeTransform {
|
|
6
|
-
private tableUtils;
|
|
7
|
-
constructor(tableUtils: SharkTableUtils);
|
|
8
|
-
transform(items: any, cols: SharkColumn[], localFilter: boolean, localPaging: boolean, columnFiltering: boolean, filterText: string): any;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LocalFilterPipe, never>;
|
|
10
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<LocalFilterPipe, "localfilter", false>;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { NotifierService } from './notifier.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AriaNotifierComponent implements OnChanges, OnDestroy {
|
|
5
|
-
status: string;
|
|
6
|
-
tableId: string;
|
|
7
|
-
notifierService: NotifierService;
|
|
8
|
-
private notifierSubscription;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
ngOnDestroy(): void;
|
|
11
|
-
private subscribeToNotifier;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AriaNotifierComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AriaNotifierComponent, "shark-table-aria-notifier", never, { "tableId": { "alias": "tableId"; "required": false; }; "notifierService": { "alias": "notifierService"; "required": false; }; }, {}, never, never, false, never>;
|
|
14
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SharkCurrentSort } from './sort.type';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
/**
|
|
4
|
-
* This event is emitted when the current Page changes or if the current sorts/filters change
|
|
5
|
-
*/
|
|
6
|
-
export interface SharkPageChangeEvent {
|
|
7
|
-
/**
|
|
8
|
-
* The new page number
|
|
9
|
-
*/
|
|
10
|
-
pageNo: number;
|
|
11
|
-
/**
|
|
12
|
-
* The current column array (with sorting/filtering information
|
|
13
|
-
*/
|
|
14
|
-
columns: SharkColumn[];
|
|
15
|
-
/**
|
|
16
|
-
* The current global filter text
|
|
17
|
-
*/
|
|
18
|
-
filter?: string;
|
|
19
|
-
/**
|
|
20
|
-
* The current sorting array
|
|
21
|
-
*/
|
|
22
|
-
sorts?: SharkCurrentSort[];
|
|
23
|
-
/**
|
|
24
|
-
* The current sort string, formatted as comma separated, with the `-` sign signifying descending
|
|
25
|
-
*/
|
|
26
|
-
sortString?: string;
|
|
27
|
-
}
|
package/app/table/page.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript implementation of the Spring Data Page object
|
|
3
|
-
*/
|
|
4
|
-
export interface Page {
|
|
5
|
-
content?: any[];
|
|
6
|
-
first?: boolean;
|
|
7
|
-
last?: boolean;
|
|
8
|
-
number?: number;
|
|
9
|
-
numberOfElements?: number;
|
|
10
|
-
size?: number;
|
|
11
|
-
totalElements?: number;
|
|
12
|
-
totalPages?: number;
|
|
13
|
-
sorts?: Sort[];
|
|
14
|
-
}
|
|
15
|
-
export interface Sort {
|
|
16
|
-
direction: string;
|
|
17
|
-
property: string;
|
|
18
|
-
descending: boolean;
|
|
19
|
-
ascending: boolean;
|
|
20
|
-
}
|
package/app/table/sort.type.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enumeration of the 3 different Sort types
|
|
3
|
-
*/
|
|
4
|
-
export declare enum SharkSortType {
|
|
5
|
-
/**
|
|
6
|
-
* No sorting applied, defaults to ASC.
|
|
7
|
-
*/
|
|
8
|
-
NONE = 0,
|
|
9
|
-
/**
|
|
10
|
-
* Sort ascending (1, 2, 3)
|
|
11
|
-
*/
|
|
12
|
-
ASC = 1,
|
|
13
|
-
/**
|
|
14
|
-
* Sort descending (3, 2, 1)
|
|
15
|
-
*/
|
|
16
|
-
DESC = 2
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Placeholder for a column sort
|
|
20
|
-
*/
|
|
21
|
-
export declare class SharkCurrentSort {
|
|
22
|
-
/**
|
|
23
|
-
* Column property
|
|
24
|
-
*/
|
|
25
|
-
property: string;
|
|
26
|
-
/**
|
|
27
|
-
* Sort type
|
|
28
|
-
*/
|
|
29
|
-
sortType: SharkSortType;
|
|
30
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges, Type } from '@angular/core';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
import { Router } from '@angular/router';
|
|
4
|
-
import { SharkTableUtils } from './table.utils';
|
|
5
|
-
import { SharkDynamicContents } from './dynamic/dynamic.contents';
|
|
6
|
-
import { Page } from './page';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* This component controls each row in the table.
|
|
10
|
-
*/
|
|
11
|
-
export declare class SharkTableBodyComponent implements OnChanges {
|
|
12
|
-
private router;
|
|
13
|
-
private tableUtils;
|
|
14
|
-
currentColumns: SharkColumn[];
|
|
15
|
-
columns: SharkColumn[];
|
|
16
|
-
localFilter: boolean;
|
|
17
|
-
localPaging: boolean;
|
|
18
|
-
columnFiltering: boolean;
|
|
19
|
-
filter: string;
|
|
20
|
-
rowStylingFunction: RowStyleFunction;
|
|
21
|
-
cellStylingFunction: CellStyleFunction;
|
|
22
|
-
childRows: boolean;
|
|
23
|
-
childComponent: Type<SharkDynamicContents>;
|
|
24
|
-
linkTarget: string;
|
|
25
|
-
linkKey: string;
|
|
26
|
-
tableEmptyMessage: string;
|
|
27
|
-
page: Page;
|
|
28
|
-
openChildren: number[];
|
|
29
|
-
constructor(router: Router, tableUtils: SharkTableUtils);
|
|
30
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
31
|
-
addStyleToCell(row: any, column: SharkColumn): {
|
|
32
|
-
[key: string]: string;
|
|
33
|
-
} | {};
|
|
34
|
-
childOpen(index: number): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Toggle the show/hide status of the child row
|
|
37
|
-
*/
|
|
38
|
-
toggleChild(index: number): void;
|
|
39
|
-
/**
|
|
40
|
-
* If provided, navigate to link for this row using the router.
|
|
41
|
-
*/
|
|
42
|
-
rowClick(row: Object): void;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkTableBodyComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SharkTableBodyComponent, "[shark-table-body]", never, { "currentColumns": { "alias": "currentColumns"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "localFilter": { "alias": "localFilter"; "required": false; }; "localPaging": { "alias": "localPaging"; "required": false; }; "columnFiltering": { "alias": "columnFiltering"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "rowStylingFunction": { "alias": "rowStylingFunction"; "required": false; }; "cellStylingFunction": { "alias": "cellStylingFunction"; "required": false; }; "childRows": { "alias": "childRows"; "required": false; }; "childComponent": { "alias": "childComponent"; "required": false; }; "linkTarget": { "alias": "linkTarget"; "required": false; }; "linkKey": { "alias": "linkKey"; "required": false; }; "tableEmptyMessage": { "alias": "tableEmptyMessage"; "required": false; }; "page": { "alias": "page"; "required": false; }; }, {}, never, never, false, never>;
|
|
45
|
-
}
|
|
46
|
-
export interface RowStyleFunction {
|
|
47
|
-
/**
|
|
48
|
-
* Sends in the current row data and returns an object to be
|
|
49
|
-
* used in conjunction with NgStyle with the format like:
|
|
50
|
-
*
|
|
51
|
-
* { 'background-color': 'red' }
|
|
52
|
-
*/
|
|
53
|
-
(row: any): {
|
|
54
|
-
[key: string]: string;
|
|
55
|
-
} | {};
|
|
56
|
-
}
|
|
57
|
-
export interface CellStyleFunction {
|
|
58
|
-
/**
|
|
59
|
-
* Sends in the current row data and returns an object to be
|
|
60
|
-
* used in conjunction with NgStyle with the format like:
|
|
61
|
-
*
|
|
62
|
-
* { 'background-color': 'red' }
|
|
63
|
-
*/
|
|
64
|
-
(row: any, column: SharkColumn, cell: any): {
|
|
65
|
-
[key: string]: string;
|
|
66
|
-
} | {};
|
|
67
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver } from '@angular/core';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
import { SharkTableUtils } from './table.utils';
|
|
4
|
-
import { SharkDynamicContentsDirective } from './dynamic/dynamic.contents.directive';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class SharkTableCellComponent implements AfterViewInit {
|
|
7
|
-
private tableUtils;
|
|
8
|
-
private componentFactoryResolver;
|
|
9
|
-
private cdr;
|
|
10
|
-
column: SharkColumn;
|
|
11
|
-
row: any;
|
|
12
|
-
tableCellContentsDirective: SharkDynamicContentsDirective;
|
|
13
|
-
noComponentContents: any;
|
|
14
|
-
constructor(tableUtils: SharkTableUtils, componentFactoryResolver: ComponentFactoryResolver, cdr: ChangeDetectorRef);
|
|
15
|
-
ngAfterViewInit(): void;
|
|
16
|
-
private retrieveCell;
|
|
17
|
-
private loadComponent;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkTableCellComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SharkTableCellComponent, "shark-table-cell", never, { "column": { "alias": "column"; "required": false; }; "row": { "alias": "row"; "required": false; }; }, {}, never, never, false, never>;
|
|
20
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, Type } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { Page } from './page';
|
|
5
|
-
import { SharkColumn } from './column';
|
|
6
|
-
import { SharkPageChangeEvent } from './page.change.event';
|
|
7
|
-
import { SharkSortType } from './sort.type';
|
|
8
|
-
import { SharkTableUtils } from './table.utils';
|
|
9
|
-
import { SharkDynamicContents } from './dynamic/dynamic.contents';
|
|
10
|
-
import { SharkHeaderFilterChange, SharkTableHeaderComponent } from './table.header.component';
|
|
11
|
-
import { CellStyleFunction, RowStyleFunction } from './table.body.component';
|
|
12
|
-
import { SharkTableFooterComponent } from './table.footer.component';
|
|
13
|
-
import { SharkTableInfoHeaderComponent } from './table.info.header.component';
|
|
14
|
-
import { NotifierService } from './notifier/notifier.service';
|
|
15
|
-
import { SharkTableCurrentDataEvent } from './current.data.event';
|
|
16
|
-
import { SharkColumnChangeEvent } from './column-change-event';
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
export declare class SharkTableComponent implements OnInit, OnChanges, OnDestroy {
|
|
19
|
-
private router;
|
|
20
|
-
private tableUtils;
|
|
21
|
-
headerInfoComponent: SharkTableInfoHeaderComponent;
|
|
22
|
-
headerComponent: SharkTableHeaderComponent;
|
|
23
|
-
footerComponent: SharkTableFooterComponent;
|
|
24
|
-
headerLeftTemplate: TemplateRef<any>;
|
|
25
|
-
headerRightTemplate: TemplateRef<any>;
|
|
26
|
-
footerLeftTemplate: TemplateRef<any>;
|
|
27
|
-
footerRightTemplate: TemplateRef<any>;
|
|
28
|
-
notifierService: NotifierService;
|
|
29
|
-
/**
|
|
30
|
-
* An ID for this table, defaults to `uuid.substring(0, 5)`
|
|
31
|
-
*/
|
|
32
|
-
tableId: any;
|
|
33
|
-
/**
|
|
34
|
-
* The raw table data
|
|
35
|
-
*/
|
|
36
|
-
data: Page | Observable<Page | any[]> | any[];
|
|
37
|
-
/**
|
|
38
|
-
* The table column definitions
|
|
39
|
-
*/
|
|
40
|
-
columns: SharkColumn[];
|
|
41
|
-
currentColumns: SharkColumn[];
|
|
42
|
-
/**
|
|
43
|
-
* The <caption> text for this table
|
|
44
|
-
*/
|
|
45
|
-
caption: string;
|
|
46
|
-
/**
|
|
47
|
-
* Whether or not the table <caption> should be hidden (screen-reader) only.
|
|
48
|
-
*/
|
|
49
|
-
hideCaption: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Allow users to turn columns on and off
|
|
52
|
-
*/
|
|
53
|
-
columnPicker: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Allow users to reorder columns with header buttons
|
|
56
|
-
*/
|
|
57
|
-
columnOrdering: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* The destination page for the call to `router.navigate` when the row is clicked.
|
|
60
|
-
*/
|
|
61
|
-
linkTarget: string;
|
|
62
|
-
/**
|
|
63
|
-
* The property name from the data object to pass to `router.navigate` when the rows is clicked.
|
|
64
|
-
*/
|
|
65
|
-
linkKey: string;
|
|
66
|
-
/**
|
|
67
|
-
* Enables the sorting headers
|
|
68
|
-
*/
|
|
69
|
-
sortable: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Enables the global filter text box
|
|
72
|
-
*/
|
|
73
|
-
filterable: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Enables column specific filter boxes
|
|
76
|
-
*/
|
|
77
|
-
columnFiltering: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Enables client-side filtering as opposed to just emitting a `SharkPageChangeEvent`
|
|
80
|
-
*/
|
|
81
|
-
localFilter: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Enables the placeholder text for the filter boxes
|
|
84
|
-
*/
|
|
85
|
-
showFilterPlaceholders: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Enables client-side pagination as opposed to just emitting a `SharkPageChangeEvent`
|
|
88
|
-
*/
|
|
89
|
-
localPaging: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* The size of each page
|
|
92
|
-
*/
|
|
93
|
-
localPagingSize: number;
|
|
94
|
-
/**
|
|
95
|
-
* The supported page sizes
|
|
96
|
-
*/
|
|
97
|
-
localPagingOptions: number[];
|
|
98
|
-
/**
|
|
99
|
-
* Enables the drop down for changing the page size
|
|
100
|
-
*/
|
|
101
|
-
showLocalPagingOptions: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Shows a button that when clicked, emits a `SharkPageChangeEvent`
|
|
104
|
-
*/
|
|
105
|
-
serverSideData: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* The initial sortString
|
|
108
|
-
*/
|
|
109
|
-
initialSort: string;
|
|
110
|
-
cellStylingFunction: CellStyleFunction;
|
|
111
|
-
/**
|
|
112
|
-
* Enables children rows
|
|
113
|
-
*/
|
|
114
|
-
childRows: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Your custom component which extends {@link SharkDynamicContents} that will be used
|
|
117
|
-
* to render each child row. Your custom component needs to be registered in your NgModule
|
|
118
|
-
* as an `entryComponent` and in the `declarations` section.
|
|
119
|
-
*
|
|
120
|
-
* The easiest way to specify this component in your HTML template is to create an instance variable
|
|
121
|
-
* and assign it, eg:
|
|
122
|
-
*
|
|
123
|
-
* ```typescript
|
|
124
|
-
* @Component({
|
|
125
|
-
* template: `
|
|
126
|
-
* <shark-table
|
|
127
|
-
* [data]="testData"
|
|
128
|
-
* [columns]="tableColumns"
|
|
129
|
-
* [childRows]="true"
|
|
130
|
-
* [childComponent]="childComponent"
|
|
131
|
-
* >
|
|
132
|
-
* </shark-table>
|
|
133
|
-
* `
|
|
134
|
-
* })
|
|
135
|
-
* export class MyComponent {
|
|
136
|
-
* childComponent = MyChildComponent
|
|
137
|
-
* }
|
|
138
|
-
*
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
childComponent?: Type<SharkDynamicContents>;
|
|
142
|
-
/**
|
|
143
|
-
* {@link SharkPageChangeEvent} events are emitted from here
|
|
144
|
-
*/
|
|
145
|
-
pageChange: EventEmitter<SharkPageChangeEvent>;
|
|
146
|
-
/**
|
|
147
|
-
* The column metadata is emitted from here whenever it changes
|
|
148
|
-
*/
|
|
149
|
-
columnChange: EventEmitter<SharkColumnChangeEvent>;
|
|
150
|
-
/**
|
|
151
|
-
* Disable the column change event, if needed, for performance reasons
|
|
152
|
-
*/
|
|
153
|
-
disableColumnChangeEvent: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* The current filter value
|
|
156
|
-
*/
|
|
157
|
-
filter: string;
|
|
158
|
-
/**
|
|
159
|
-
* Show the footer with 'Showing x through y of z rows`
|
|
160
|
-
*/
|
|
161
|
-
footer: boolean;
|
|
162
|
-
/**
|
|
163
|
-
* Message to show when the table is empty
|
|
164
|
-
*/
|
|
165
|
-
tableEmptyMessage: string;
|
|
166
|
-
page: Page;
|
|
167
|
-
private dataSubscription;
|
|
168
|
-
private localSubscription;
|
|
169
|
-
rowStylingFunction: RowStyleFunction;
|
|
170
|
-
constructor(router: Router, tableUtils: SharkTableUtils);
|
|
171
|
-
ngOnInit(): void;
|
|
172
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
173
|
-
ngOnDestroy(): void;
|
|
174
|
-
updateCurrentColumns(newColumns: SharkColumn[], emitPageEvent?: boolean): void;
|
|
175
|
-
/**
|
|
176
|
-
* Emits a {@link SharkPageChangeEvent} with the current information. This event should be consumed by the host
|
|
177
|
-
* component and sent to a REST endpoint to update the data.
|
|
178
|
-
*/
|
|
179
|
-
emitCurrent(): void;
|
|
180
|
-
headerChange(event: SharkHeaderFilterChange): void;
|
|
181
|
-
changePage(pageNo: number): void;
|
|
182
|
-
changeSort(columnProperty: string, sortType: SharkSortType): void;
|
|
183
|
-
/**
|
|
184
|
-
* Currently only works if your input is an any[], returns the current "view" into the table with filtering/column selection
|
|
185
|
-
*
|
|
186
|
-
* @param rendered If you would like inline pipes to be applied to the exported data
|
|
187
|
-
*/
|
|
188
|
-
exportCurrentData(rendered?: boolean): SharkTableCurrentDataEvent;
|
|
189
|
-
private publishColumnChangeEvent;
|
|
190
|
-
private generateSortString;
|
|
191
|
-
private generateSortArray;
|
|
192
|
-
private sort;
|
|
193
|
-
private updatePage;
|
|
194
|
-
private createLocalPage;
|
|
195
|
-
private setupPageArray;
|
|
196
|
-
private calculateLocalPageNoPagination;
|
|
197
|
-
private calculateLocalPage;
|
|
198
|
-
private setupPageSubscription;
|
|
199
|
-
private setupInitialSort;
|
|
200
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkTableComponent, never>;
|
|
201
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SharkTableComponent, "shark-table", never, { "tableId": { "alias": "tableId"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "hideCaption": { "alias": "hideCaption"; "required": false; }; "columnPicker": { "alias": "columnPicker"; "required": false; }; "columnOrdering": { "alias": "columnOrdering"; "required": false; }; "linkTarget": { "alias": "linkTarget"; "required": false; }; "linkKey": { "alias": "linkKey"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "columnFiltering": { "alias": "columnFiltering"; "required": false; }; "localFilter": { "alias": "localFilter"; "required": false; }; "showFilterPlaceholders": { "alias": "showFilterPlaceholders"; "required": false; }; "localPaging": { "alias": "localPaging"; "required": false; }; "localPagingSize": { "alias": "localPagingSize"; "required": false; }; "localPagingOptions": { "alias": "localPagingOptions"; "required": false; }; "showLocalPagingOptions": { "alias": "showLocalPagingOptions"; "required": false; }; "serverSideData": { "alias": "serverSideData"; "required": false; }; "initialSort": { "alias": "initialSort"; "required": false; }; "cellStylingFunction": { "alias": "cellStylingFunction"; "required": false; }; "childRows": { "alias": "childRows"; "required": false; }; "childComponent": { "alias": "childComponent"; "required": false; }; "disableColumnChangeEvent": { "alias": "disableColumnChangeEvent"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; "tableEmptyMessage": { "alias": "tableEmptyMessage"; "required": false; }; "rowStylingFunction": { "alias": "rowStylingFunction"; "required": false; }; }, { "pageChange": "pageChange"; "columnChange": "columnChange"; }, ["headerLeftTemplate", "headerRightTemplate", "footerLeftTemplate", "footerRightTemplate"], never, false, never>;
|
|
202
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
-
import { Page } from './page';
|
|
3
|
-
import { SharkColumn } from './column';
|
|
4
|
-
import { SharkTableUtils } from './table.utils';
|
|
5
|
-
import { SharkHeaderFilterChange } from './table.header.component';
|
|
6
|
-
import { SharkTablePaginationComponent } from './table.pagination.component';
|
|
7
|
-
import { NotifierService } from './notifier/notifier.service';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class SharkTableFooterComponent implements OnChanges {
|
|
10
|
-
private tableUtils;
|
|
11
|
-
start: number;
|
|
12
|
-
end: number;
|
|
13
|
-
total: number;
|
|
14
|
-
filtered: boolean;
|
|
15
|
-
currentPageInfo: string;
|
|
16
|
-
paginationComponent: SharkTablePaginationComponent;
|
|
17
|
-
leftSideFooterTemplate: TemplateRef<any>;
|
|
18
|
-
rightSideFooterTemplate: TemplateRef<any>;
|
|
19
|
-
notifierService: NotifierService;
|
|
20
|
-
localPaging: boolean;
|
|
21
|
-
localPagingSize: number;
|
|
22
|
-
localPagingOptions: number[];
|
|
23
|
-
showLocalPagingOptions: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The current {@link Page}
|
|
26
|
-
*/
|
|
27
|
-
page: Page;
|
|
28
|
-
/**
|
|
29
|
-
* The current {@link SharkColumn}[]
|
|
30
|
-
*/
|
|
31
|
-
currentColumns: SharkColumn[];
|
|
32
|
-
/**
|
|
33
|
-
* The current {@link SharkColumn}[]
|
|
34
|
-
*/
|
|
35
|
-
allColumns: SharkColumn[];
|
|
36
|
-
/**
|
|
37
|
-
* The current filter string
|
|
38
|
-
*/
|
|
39
|
-
filter: string;
|
|
40
|
-
tableId: string;
|
|
41
|
-
filterChange: EventEmitter<SharkHeaderFilterChange>;
|
|
42
|
-
paginationChange: EventEmitter<number>;
|
|
43
|
-
constructor(tableUtils: SharkTableUtils);
|
|
44
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
45
|
-
firePageSizeChange(): void;
|
|
46
|
-
changePage(pageNo: number): void;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharkTableFooterComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SharkTableFooterComponent, "shark-table-footer", never, { "leftSideFooterTemplate": { "alias": "leftSideFooterTemplate"; "required": false; }; "rightSideFooterTemplate": { "alias": "rightSideFooterTemplate"; "required": false; }; "notifierService": { "alias": "notifierService"; "required": false; }; "localPaging": { "alias": "localPaging"; "required": false; }; "localPagingSize": { "alias": "localPagingSize"; "required": false; }; "localPagingOptions": { "alias": "localPagingOptions"; "required": false; }; "showLocalPagingOptions": { "alias": "showLocalPagingOptions"; "required": false; }; "page": { "alias": "page"; "required": false; }; "currentColumns": { "alias": "currentColumns"; "required": false; }; "allColumns": { "alias": "allColumns"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "tableId": { "alias": "tableId"; "required": false; }; }, { "filterChange": "filterChange"; "paginationChange": "paginationChange"; }, never, never, false, never>;
|
|
49
|
-
}
|