shark-ng-table 6.0.3 → 7.0.0-rc1
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/LICENSE +22 -22
- package/README.md +9 -2
- package/app/table/child.component.d.ts +34 -31
- package/app/table/column-change-event.d.ts +5 -5
- package/app/table/column.d.ts +64 -64
- package/app/table/current.data.event.d.ts +5 -5
- package/app/table/dynamic/dynamic.contents.d.ts +20 -20
- package/app/table/dynamic/dynamic.contents.directive.d.ts +8 -5
- package/app/table/header-button.component.d.ts +16 -13
- package/app/table/index.d.ts +15 -14
- package/app/table/localfilter.pipe.d.ts +11 -8
- package/app/table/notifier/aria-notifier.component.d.ts +14 -11
- package/app/table/notifier/notifier.service.d.ts +7 -7
- package/app/table/page.change.event.d.ts +27 -27
- package/app/table/page.d.ts +20 -20
- package/app/table/sort.type.d.ts +30 -30
- package/app/table/table.body.component.d.ts +67 -64
- package/app/table/table.cell.component.d.ts +20 -17
- package/app/table/table.component.d.ts +202 -199
- package/app/table/table.footer.component.d.ts +49 -46
- package/app/table/table.header.component.d.ts +39 -36
- package/app/table/table.info.header.component.d.ts +28 -25
- package/app/table/table.module.d.ts +21 -2
- package/app/table/table.pagination.component.d.ts +21 -18
- package/app/table/table.utils.d.ts +13 -10
- package/esm2022/app/table/child.component.mjs +76 -0
- package/esm2022/app/table/column-change-event.mjs +5 -0
- package/esm2022/app/table/column.mjs +2 -0
- package/esm2022/app/table/current.data.event.mjs +5 -0
- package/esm2022/app/table/dynamic/dynamic.contents.directive.mjs +17 -0
- package/esm2022/app/table/dynamic/dynamic.contents.mjs +2 -0
- package/esm2022/app/table/header-button.component.mjs +52 -0
- package/esm2022/app/table/index.mjs +11 -0
- package/esm2022/app/table/localfilter.pipe.mjs +24 -0
- package/esm2022/app/table/notifier/aria-notifier.component.mjs +44 -0
- package/esm2022/app/table/notifier/notifier.service.mjs +13 -0
- package/esm2022/app/table/page.change.event.mjs +2 -0
- package/esm2022/app/table/page.mjs +2 -0
- package/esm2022/app/table/sort.type.mjs +32 -0
- package/esm2022/app/table/table.body.component.mjs +181 -0
- package/esm2022/app/table/table.cell.component.mjs +75 -0
- package/esm2022/app/table/table.component.mjs +773 -0
- package/esm2022/app/table/table.footer.component.mjs +176 -0
- package/esm2022/app/table/table.header.component.mjs +204 -0
- package/esm2022/app/table/table.info.header.component.mjs +142 -0
- package/esm2022/app/table/table.module.mjs +73 -0
- package/esm2022/app/table/table.pagination.component.mjs +134 -0
- package/esm2022/app/table/table.utils.mjs +72 -0
- package/esm2022/public_api.mjs +2 -0
- package/esm2022/shark-ng-table.mjs +5 -0
- package/fesm2022/shark-ng-table.mjs +2028 -0
- package/fesm2022/shark-ng-table.mjs.map +1 -0
- package/fonts/shark-ng-table-icons.svg +21 -21
- package/index.d.ts +5 -0
- package/package.json +17 -64
- package/public_api.d.ts +1 -1
- package/shark-ng-table.css +312 -312
- package/bundles/shark-ng-table.umd.js +0 -2010
- package/bundles/shark-ng-table.umd.js.map +0 -1
- package/bundles/shark-ng-table.umd.min.js +0 -2
- package/bundles/shark-ng-table.umd.min.js.map +0 -1
- package/esm2015/app/table/child.component.js +0 -105
- package/esm2015/app/table/column-change-event.js +0 -14
- package/esm2015/app/table/column.js +0 -81
- package/esm2015/app/table/current.data.event.js +0 -14
- package/esm2015/app/table/dynamic/dynamic.contents.directive.js +0 -28
- package/esm2015/app/table/dynamic/dynamic.contents.js +0 -29
- package/esm2015/app/table/header-button.component.js +0 -60
- package/esm2015/app/table/index.js +0 -15
- package/esm2015/app/table/localfilter.pipe.js +0 -44
- package/esm2015/app/table/notifier/aria-notifier.component.js +0 -62
- package/esm2015/app/table/notifier/notifier.service.js +0 -26
- package/esm2015/app/table/page.change.event.js +0 -36
- package/esm2015/app/table/page.js +0 -41
- package/esm2015/app/table/sort.type.js +0 -42
- package/esm2015/app/table/table.body.component.js +0 -184
- package/esm2015/app/table/table.cell.component.js +0 -99
- package/esm2015/app/table/table.component.js +0 -883
- package/esm2015/app/table/table.footer.component.js +0 -195
- package/esm2015/app/table/table.header.component.js +0 -238
- package/esm2015/app/table/table.info.header.component.js +0 -124
- package/esm2015/app/table/table.module.js +0 -55
- package/esm2015/app/table/table.pagination.component.js +0 -139
- package/esm2015/app/table/table.utils.js +0 -118
- package/esm2015/public_api.js +0 -7
- package/esm2015/shark-ng-table.js +0 -19
- package/esm5/app/table/child.component.js +0 -110
- package/esm5/app/table/column-change-event.js +0 -18
- package/esm5/app/table/column.js +0 -81
- package/esm5/app/table/current.data.event.js +0 -18
- package/esm5/app/table/dynamic/dynamic.contents.directive.js +0 -27
- package/esm5/app/table/dynamic/dynamic.contents.js +0 -29
- package/esm5/app/table/header-button.component.js +0 -53
- package/esm5/app/table/index.js +0 -15
- package/esm5/app/table/localfilter.pipe.js +0 -52
- package/esm5/app/table/notifier/aria-notifier.component.js +0 -77
- package/esm5/app/table/notifier/notifier.service.js +0 -32
- package/esm5/app/table/page.change.event.js +0 -36
- package/esm5/app/table/page.js +0 -41
- package/esm5/app/table/sort.type.js +0 -52
- package/esm5/app/table/table.body.component.js +0 -174
- package/esm5/app/table/table.cell.component.js +0 -99
- package/esm5/app/table/table.component.js +0 -898
- package/esm5/app/table/table.footer.component.js +0 -184
- package/esm5/app/table/table.header.component.js +0 -242
- package/esm5/app/table/table.info.header.component.js +0 -99
- package/esm5/app/table/table.module.js +0 -59
- package/esm5/app/table/table.pagination.component.js +0 -117
- package/esm5/app/table/table.utils.js +0 -174
- package/esm5/public_api.js +0 -7
- package/esm5/shark-ng-table.js +0 -19
- package/fesm2015/shark-ng-table.js +0 -1868
- package/fesm2015/shark-ng-table.js.map +0 -1
- package/fesm5/shark-ng-table.js +0 -1902
- package/fesm5/shark-ng-table.js.map +0 -1
- package/shark-ng-table.d.ts +0 -13
- package/shark-ng-table.metadata.json +0 -1
- package/typings.d.ts +0 -5
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 Andrew Landsverk
|
|
4
|
-
Copyright (c) 2018 Great Lakes Educational Loan Services, Inc.
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Andrew Landsverk
|
|
4
|
+
Copyright (c) 2018 Great Lakes Educational Loan Services, Inc.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -19,7 +19,8 @@ Section508 and WCAG 2.0 AA compliant.
|
|
|
19
19
|
|
|
20
20
|
| Angular Version | shark-ng-table Version |
|
|
21
21
|
| --------------- | ---------------------- |
|
|
22
|
-
| >= 6.0.0
|
|
22
|
+
| >= 6.0.0 | >= 6.0.0 |
|
|
23
|
+
| >= 16.0.0 | >= 7.0.0 |
|
|
23
24
|
|
|
24
25
|
## Samples
|
|
25
26
|
|
|
@@ -55,7 +56,13 @@ This will install the latest version of `shark-ng-table`.
|
|
|
55
56
|
- [Child Rows](usage/child-rows.md)
|
|
56
57
|
- [Developer Guide](usage/developers.md)
|
|
57
58
|
- [Change Log](CHANGELOG.md)
|
|
58
|
-
|
|
59
|
+
|
|
60
|
+
## Dev Environment
|
|
61
|
+
|
|
62
|
+
shark-ng-table also provides a `.devcontainer` folder for support of Visual Studio Code's Remote-Container support. This will setup a full shark-ng-table dev
|
|
63
|
+
environment automatically. You should be able to run `npm run start` inside the dev enviornment and expose the port, 4200, and be able to do live development
|
|
64
|
+
on the table.
|
|
65
|
+
|
|
59
66
|
## Attribution
|
|
60
67
|
|
|
61
68
|
- Developed and tested in collaboration with Great Lakes Higher Education Corporation and Nelnet Inc. and Affiliates
|
|
@@ -1,31 +1,34 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SharkColumn } from './column';
|
|
2
|
-
export declare class SharkColumnChangeEvent {
|
|
3
|
-
columns: SharkColumn[];
|
|
4
|
-
currentSortString: string;
|
|
5
|
-
}
|
|
1
|
+
import { SharkColumn } from './column';
|
|
2
|
+
export declare class SharkColumnChangeEvent {
|
|
3
|
+
columns: SharkColumn[];
|
|
4
|
+
currentSortString: string;
|
|
5
|
+
}
|
package/app/table/column.d.ts
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
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;
|
|
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
|
+
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,5 +1,5 @@
|
|
|
1
|
-
import { SharkColumn } from './column';
|
|
2
|
-
export declare class SharkTableCurrentDataEvent {
|
|
3
|
-
data: any[];
|
|
4
|
-
columns: SharkColumn[];
|
|
5
|
-
}
|
|
1
|
+
import { SharkColumn } from './column';
|
|
2
|
+
export declare class SharkTableCurrentDataEvent {
|
|
3
|
+
data: any[];
|
|
4
|
+
columns: SharkColumn[];
|
|
5
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
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
|
+
/**
|
|
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,5 +1,8 @@
|
|
|
1
|
-
import { ViewContainerRef } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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,13 +1,16 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
import { SharkSortType } from './sort.type';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
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';
|
|
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,8 +1,11 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { SharkColumn } from './column';
|
|
3
|
-
import { SharkTableUtils } from './table.utils';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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,11 +1,14 @@
|
|
|
1
|
-
import { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { NotifierService } from './notifier.service';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
export declare class NotifierService {
|
|
3
|
-
messageObservable: Observable<string>;
|
|
4
|
-
private messageSubject;
|
|
5
|
-
constructor();
|
|
6
|
-
postMessage(message: string): void;
|
|
7
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare class NotifierService {
|
|
3
|
+
messageObservable: Observable<string>;
|
|
4
|
+
private messageSubject;
|
|
5
|
+
constructor();
|
|
6
|
+
postMessage(message: string): void;
|
|
7
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
}
|
|
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
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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
|
-
}
|
|
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
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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
|
+
/**
|
|
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
|
+
}
|