@testgorilla/tgo-ui 1.5.0 → 1.6.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/components/badge/badge.component.d.ts +1 -1
- package/components/button/button.component.d.ts +20 -3
- package/components/button/button.model.d.ts +1 -0
- package/components/deprecated-paginator/deprecated-paginator.component.d.ts +38 -0
- package/components/deprecated-paginator/deprecated-paginator.component.module.d.ts +9 -0
- package/components/deprecated-table/deprecated-table.component.d.ts +91 -0
- package/components/deprecated-table/deprecated-table.component.module.d.ts +14 -0
- package/components/deprecated-table/deprecated-table.model.d.ts +45 -0
- package/components/{table → deprecated-table}/directives/dynamic-component.directive.d.ts +1 -1
- package/components/paginator/paginator.component.d.ts +13 -14
- package/components/skeleton/skeleton.component.d.ts +9 -0
- package/components/snackbar/snackbar.component.d.ts +1 -2
- package/components/table/ellipse-text.directive.d.ts +16 -0
- package/components/table/table.component.d.ts +29 -78
- package/components/table/table.component.module.d.ts +7 -8
- package/components/table/table.model.d.ts +26 -40
- package/esm2022/components/alert-banner/alert-banner.component.mjs +3 -3
- package/esm2022/components/avatar/avatar.component.mjs +3 -3
- package/esm2022/components/badge/badge.component.mjs +3 -3
- package/esm2022/components/banner-action/banner-action.component.mjs +1 -1
- package/esm2022/components/button/button.component.mjs +34 -11
- package/esm2022/components/button/button.model.mjs +1 -1
- package/esm2022/components/create-account/create-account.component.mjs +1 -1
- package/esm2022/components/create-password/create-password.component.mjs +1 -1
- package/esm2022/components/deprecated-paginator/deprecated-paginator.component.mjs +55 -0
- package/esm2022/components/deprecated-paginator/deprecated-paginator.component.module.mjs +20 -0
- package/esm2022/components/deprecated-table/deprecated-table.component.mjs +158 -0
- package/esm2022/components/deprecated-table/deprecated-table.component.module.mjs +25 -0
- package/esm2022/components/deprecated-table/deprecated-table.model.mjs +13 -0
- package/esm2022/components/deprecated-table/directives/dynamic-component.directive.mjs +39 -0
- package/esm2022/components/deprecated-table/pipes/data-property-getter.mjs +32 -0
- package/esm2022/components/dialog/dialog.component.mjs +3 -3
- package/esm2022/components/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/components/empty-state/empty-state.component.mjs +3 -3
- package/esm2022/components/field/field.component.mjs +3 -3
- package/esm2022/components/file-upload/file-upload.component.mjs +3 -3
- package/esm2022/components/forgot-password/forgot-password.component.mjs +1 -1
- package/esm2022/components/login/login.component.mjs +1 -1
- package/esm2022/components/paginator/paginator.component.mjs +21 -20
- package/esm2022/components/paginator/paginator.component.module.mjs +3 -4
- package/esm2022/components/skeleton/skeleton.component.mjs +25 -0
- package/esm2022/components/snackbar/snackbar.component.mjs +5 -5
- package/esm2022/components/table/ellipse-text.directive.mjs +36 -0
- package/esm2022/components/table/table.component.mjs +58 -140
- package/esm2022/components/table/table.component.module.mjs +10 -12
- package/esm2022/components/table/table.model.mjs +2 -13
- package/esm2022/public-api.mjs +18 -9
- package/fesm2022/testgorilla-tgo-ui.mjs +299 -72
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +3 -2
- package/public-api.d.ts +12 -6
- package/src/assets/images/premium.svg +4 -0
- package/src/theme/_mat-paginator.scss +59 -0
- package/src/theme/theme.scss +2 -0
- package/esm2022/components/table/directives/dynamic-component.directive.mjs +0 -39
- package/esm2022/components/table/pipes/data-property-getter.mjs +0 -32
- /package/components/{table → deprecated-table}/pipes/data-property-getter.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { IconName } from '../../components/icon/icon.model';
|
|
3
|
-
import { ButtonColor, ButtonIconPosition, ButtonSize, IconButtonSize, LinkUrlTarget } from './button.model';
|
|
3
|
+
import { ButtonColor, ButtonIconPosition, ButtonSize, ButtonType, IconButtonSize, LinkUrlTarget } from './button.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ButtonComponent implements OnInit, AfterViewInit {
|
|
6
6
|
/**
|
|
@@ -16,7 +16,7 @@ export declare class ButtonComponent implements OnInit, AfterViewInit {
|
|
|
16
16
|
* @type {ButtonColor}
|
|
17
17
|
* @memberof ButtonComponent
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
variant: ButtonColor;
|
|
20
20
|
/**
|
|
21
21
|
* Text content to appear on the button
|
|
22
22
|
*
|
|
@@ -87,6 +87,21 @@ export declare class ButtonComponent implements OnInit, AfterViewInit {
|
|
|
87
87
|
* @memberof ButtonComponent
|
|
88
88
|
*/
|
|
89
89
|
tooltip: string;
|
|
90
|
+
/**
|
|
91
|
+
* @property isPremium
|
|
92
|
+
* @description The icon that is displayed for Premium button
|
|
93
|
+
* @type {boolean}
|
|
94
|
+
* @memberof ButtonComponent
|
|
95
|
+
*/
|
|
96
|
+
isPremium: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* The type of the button.
|
|
99
|
+
*
|
|
100
|
+
* @type {ButtonType}
|
|
101
|
+
* @memberof ButtonComponent
|
|
102
|
+
* @default 'button'
|
|
103
|
+
*/
|
|
104
|
+
type: ButtonType;
|
|
90
105
|
buttonClickEvent: EventEmitter<Event>;
|
|
91
106
|
buttonHoverEvent: EventEmitter<Event>;
|
|
92
107
|
constructor();
|
|
@@ -94,6 +109,8 @@ export declare class ButtonComponent implements OnInit, AfterViewInit {
|
|
|
94
109
|
isButtonLink: boolean;
|
|
95
110
|
isLabel: boolean;
|
|
96
111
|
iconButtonSize: IconButtonSize;
|
|
112
|
+
allowButtonTypeForPremium: ButtonColor[];
|
|
113
|
+
get typeIncluded(): boolean;
|
|
97
114
|
ngOnInit(): void;
|
|
98
115
|
ngOnChanges(changes: SimpleChanges): void;
|
|
99
116
|
ngAfterViewInit(): void;
|
|
@@ -105,5 +122,5 @@ export declare class ButtonComponent implements OnInit, AfterViewInit {
|
|
|
105
122
|
showButtonLink(): boolean;
|
|
106
123
|
setIconButtonSize(): IconButtonSize;
|
|
107
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
108
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ui-button", never, { "size": { "alias": "size"; "required": false; }; "
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ui-button", never, { "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "label": { "alias": "label"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "justIcon": { "alias": "justIcon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "url": { "alias": "url"; "required": false; }; "urlTarget": { "alias": "urlTarget"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "isPremium": { "alias": "isPremium"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "buttonClickEvent": "buttonClickEvent"; "buttonHoverEvent": "buttonHoverEvent"; }, never, never, false, never>;
|
|
109
126
|
}
|
|
@@ -3,3 +3,4 @@ export type ButtonColor = 'primary' | 'secondary' | 'outlined' | 'destructive' |
|
|
|
3
3
|
export type ButtonSize = 'big' | 'small';
|
|
4
4
|
export type LinkUrlTarget = '' | '_self' | '_blank' | '_parent' | '_top';
|
|
5
5
|
export type IconButtonSize = '32' | '40';
|
|
6
|
+
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { PageEvent } from '@angular/material/paginator';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DeprecatedPaginatorComponent implements OnInit {
|
|
5
|
+
/**
|
|
6
|
+
* Paginator size options
|
|
7
|
+
*
|
|
8
|
+
* @type {number[]}
|
|
9
|
+
* @memberof PaginatorComponent
|
|
10
|
+
*/
|
|
11
|
+
readonly pageSizeOptions: number[];
|
|
12
|
+
/**
|
|
13
|
+
* Data length
|
|
14
|
+
*
|
|
15
|
+
* @type {number}
|
|
16
|
+
* @memberof PaginatorComponent
|
|
17
|
+
*/
|
|
18
|
+
length: number;
|
|
19
|
+
/**
|
|
20
|
+
* Default page size
|
|
21
|
+
*
|
|
22
|
+
* @type {number}
|
|
23
|
+
* @memberof PaginatorComponent
|
|
24
|
+
*/
|
|
25
|
+
defaultPageSize: number;
|
|
26
|
+
/**
|
|
27
|
+
* @ignore
|
|
28
|
+
*/
|
|
29
|
+
paginatorChangedEvent: EventEmitter<PageEvent>;
|
|
30
|
+
/**
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
ngOnInit(): void;
|
|
34
|
+
constructor();
|
|
35
|
+
paginatorChanged(paginator: PageEvent): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeprecatedPaginatorComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DeprecatedPaginatorComponent, "ui-paginator", never, { "length": { "alias": "length"; "required": false; }; "defaultPageSize": { "alias": "defaultPageSize"; "required": false; }; }, { "paginatorChangedEvent": "paginatorChangedEvent"; }, never, never, false, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./deprecated-paginator.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/material/paginator";
|
|
5
|
+
export declare class DeprecatedPaginatorComponentModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeprecatedPaginatorComponentModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DeprecatedPaginatorComponentModule, [typeof i1.DeprecatedPaginatorComponent], [typeof i2.CommonModule, typeof i3.MatPaginatorModule], [typeof i1.DeprecatedPaginatorComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DeprecatedPaginatorComponentModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { MatSort, Sort } from '@angular/material/sort';
|
|
3
|
+
import { MatTableDataSource } from '@angular/material/table';
|
|
4
|
+
import { DataPropertyGetterPipe } from './pipes/data-property-getter';
|
|
5
|
+
import { ColumnTypeEnum, IDataSource, ITableColumn, ITableDetailColumn } from './deprecated-table.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DeprecatedTableComponent<T extends IDataSource, TDetail extends IDataSource> implements OnInit {
|
|
8
|
+
private dataPropertyGetterPipe;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
set matSort(matSort: MatSort);
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
tableDetails: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Data to be rendered
|
|
19
|
+
*
|
|
20
|
+
* @ignore
|
|
21
|
+
* @type {IDataSource}
|
|
22
|
+
* @memberof TableComponent
|
|
23
|
+
*/
|
|
24
|
+
set tableData(data: T[] | null);
|
|
25
|
+
/**
|
|
26
|
+
* Data structure to select which columns should be rendered and their capabilities
|
|
27
|
+
*
|
|
28
|
+
* @type {ITableColumn}
|
|
29
|
+
* @memberof TableComponent
|
|
30
|
+
*/
|
|
31
|
+
tableColumns: ITableColumn<T>[];
|
|
32
|
+
/**
|
|
33
|
+
* Data structure to select which columns should be rendered and their capabilities
|
|
34
|
+
*
|
|
35
|
+
* @type {ITableColumn}
|
|
36
|
+
* @memberof TableComponent
|
|
37
|
+
*/
|
|
38
|
+
tableDetailColumns: ITableDetailColumn<T, TDetail>;
|
|
39
|
+
/**
|
|
40
|
+
* @ignore
|
|
41
|
+
*/
|
|
42
|
+
onSortEvent: EventEmitter<Sort>;
|
|
43
|
+
/**
|
|
44
|
+
* @ignore
|
|
45
|
+
*/
|
|
46
|
+
onRowClickEvent: EventEmitter<any>;
|
|
47
|
+
/**
|
|
48
|
+
* @ignore
|
|
49
|
+
*/
|
|
50
|
+
onDetailRowClickEvent: EventEmitter<any>;
|
|
51
|
+
/**
|
|
52
|
+
* @ignore
|
|
53
|
+
*/
|
|
54
|
+
dataSource: MatTableDataSource<any, import("@angular/material/table").MatTableDataSourcePaginator>;
|
|
55
|
+
/**
|
|
56
|
+
* @ignore
|
|
57
|
+
*/
|
|
58
|
+
dataSourceDetail: MatTableDataSource<any, import("@angular/material/table").MatTableDataSourcePaginator>;
|
|
59
|
+
/**
|
|
60
|
+
* @ignore
|
|
61
|
+
*/
|
|
62
|
+
elementDetail: any;
|
|
63
|
+
/**
|
|
64
|
+
* @ignore
|
|
65
|
+
*/
|
|
66
|
+
columnsToDisplay: string[];
|
|
67
|
+
/**
|
|
68
|
+
* @ignore
|
|
69
|
+
*/
|
|
70
|
+
columnsDetailToDisplay: string[];
|
|
71
|
+
/**
|
|
72
|
+
* @ignore
|
|
73
|
+
*/
|
|
74
|
+
DataType: typeof ColumnTypeEnum;
|
|
75
|
+
ngOnInit(): void;
|
|
76
|
+
constructor(dataPropertyGetterPipe: DataPropertyGetterPipe);
|
|
77
|
+
onSort(sortParams: Sort): void;
|
|
78
|
+
onRowClick(rowParams: any): void;
|
|
79
|
+
onDetailRowClick(rowParams: any): void;
|
|
80
|
+
toggleRow(element: T): void;
|
|
81
|
+
/**
|
|
82
|
+
* @ignore
|
|
83
|
+
*/
|
|
84
|
+
private setTableDataSource;
|
|
85
|
+
/**
|
|
86
|
+
* @ignore
|
|
87
|
+
*/
|
|
88
|
+
private setTableDetailDataSource;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeprecatedTableComponent<any, any>, never>;
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DeprecatedTableComponent<any, any>, "ui-deprecated-table", never, { "tableDetails": { "alias": "tableDetails"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "tableColumns": { "alias": "tableColumns"; "required": false; }; "tableDetailColumns": { "alias": "tableDetailColumns"; "required": false; }; }, { "onSortEvent": "onSortEvent"; "onRowClickEvent": "onRowClickEvent"; "onDetailRowClickEvent": "onDetailRowClickEvent"; }, never, never, false, never>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./deprecated-table.component";
|
|
3
|
+
import * as i2 from "./pipes/data-property-getter";
|
|
4
|
+
import * as i3 from "./directives/dynamic-component.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/material/table";
|
|
7
|
+
import * as i6 from "@angular/material/sort";
|
|
8
|
+
import * as i7 from "@angular/material/icon";
|
|
9
|
+
import * as i8 from "@angular/material/tooltip";
|
|
10
|
+
export declare class DeprecatedTableComponentModule {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeprecatedTableComponentModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DeprecatedTableComponentModule, [typeof i1.DeprecatedTableComponent, typeof i2.DataPropertyGetterPipe, typeof i3.DynamicComponentDirective], [typeof i4.CommonModule, typeof i5.MatTableModule, typeof i6.MatSortModule, typeof i7.MatIconModule, typeof i8.MatTooltipModule], [typeof i1.DeprecatedTableComponent]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DeprecatedTableComponentModule>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
export type IDataSource = {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
export interface ITableColumn<T> {
|
|
6
|
+
headerName: string;
|
|
7
|
+
headerTooltip?: string;
|
|
8
|
+
field?: string;
|
|
9
|
+
type?: ColumnTypeEnum;
|
|
10
|
+
function?: (v: T) => string;
|
|
11
|
+
renderer?: (v: T) => IComponentRenderer | string;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
styles?: IColumnStyles;
|
|
14
|
+
}
|
|
15
|
+
export interface IComponentRenderer {
|
|
16
|
+
component: Type<any>;
|
|
17
|
+
inputs?: any;
|
|
18
|
+
outputs?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface IDetailRowDataParams<T, TDetail> {
|
|
23
|
+
data: T;
|
|
24
|
+
setDetailDataSource(rowData: TDetail[]): void;
|
|
25
|
+
}
|
|
26
|
+
export interface ITableDetailColumn<T, TDetail> {
|
|
27
|
+
columnDefs: ITableColumn<TDetail>[];
|
|
28
|
+
setDetailRowData: (params: IDetailRowDataParams<T, TDetail>) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface IColumnStyles {
|
|
31
|
+
alignment?: ColumnAlignmentEnum;
|
|
32
|
+
width?: string;
|
|
33
|
+
'min-width'?: string;
|
|
34
|
+
padding?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare enum ColumnTypeEnum {
|
|
37
|
+
FIELD = "field",
|
|
38
|
+
FUNCTION = "function",
|
|
39
|
+
RENDERER = "renderer"
|
|
40
|
+
}
|
|
41
|
+
export declare enum ColumnAlignmentEnum {
|
|
42
|
+
LEFT = "left",
|
|
43
|
+
RIGHT = "right",
|
|
44
|
+
CENTER = "center"
|
|
45
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnDestroy, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { IComponentRenderer } from '../table.model';
|
|
2
|
+
import { IComponentRenderer } from '../deprecated-table.model';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DynamicComponentDirective implements OnDestroy {
|
|
5
5
|
private vcr;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EventEmitter
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { PageEvent } from '@angular/material/paginator';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PaginatorComponent
|
|
4
|
+
export declare class PaginatorComponent {
|
|
5
5
|
/**
|
|
6
6
|
* Paginator size options
|
|
7
7
|
*
|
|
8
8
|
* @type {number[]}
|
|
9
9
|
* @memberof PaginatorComponent
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
pageSizeOptions: number[];
|
|
12
12
|
/**
|
|
13
13
|
* Data length
|
|
14
14
|
*
|
|
@@ -17,22 +17,21 @@ export declare class PaginatorComponent implements OnInit {
|
|
|
17
17
|
*/
|
|
18
18
|
length: number;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Page size
|
|
21
21
|
*
|
|
22
22
|
* @type {number}
|
|
23
23
|
* @memberof PaginatorComponent
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
pageSize: number;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* @ignore
|
|
27
|
+
* Disabled
|
|
28
|
+
*
|
|
29
|
+
* @type {boolean}
|
|
30
|
+
* @memberOf PaginatorComponent
|
|
32
31
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
paginatorChange: EventEmitter<PageEvent>;
|
|
34
|
+
onPaginatorChange(paginator: PageEvent): void;
|
|
36
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PaginatorComponent, "ui-paginator", never, { "length": { "alias": "length"; "required": false; }; "
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PaginatorComponent, "ui-paginator", never, { "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "length": { "alias": "length"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "paginatorChange": "paginatorChange"; }, never, never, false, never>;
|
|
38
37
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NgxSkeletonLoaderConfig, NgxSkeletonLoaderConfigTheme } from 'ngx-skeleton-loader';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SkeletonComponent {
|
|
4
|
+
count: number | string;
|
|
5
|
+
theme: NgxSkeletonLoaderConfigTheme;
|
|
6
|
+
appearance: NgxSkeletonLoaderConfig['appearance'];
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonComponent, "ui-skeleton", never, { "count": { "alias": "count"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
3
2
|
import { MatSnackBarRef } from '@angular/material/snack-bar';
|
|
4
3
|
import { IconName } from '../../components/icon/icon.model';
|
|
@@ -51,7 +50,7 @@ export declare class SnackbarComponent implements OnInit {
|
|
|
51
50
|
showSnackbar: boolean;
|
|
52
51
|
milisenconds: number;
|
|
53
52
|
visible: boolean;
|
|
54
|
-
timer?:
|
|
53
|
+
timer?: number;
|
|
55
54
|
timerStartedAt: number;
|
|
56
55
|
timerPausedAt: number;
|
|
57
56
|
position: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Checks if element ellipsis
|
|
6
|
+
*/
|
|
7
|
+
export declare class EllipseTextDirective implements OnInit {
|
|
8
|
+
private el;
|
|
9
|
+
checkEllipsis$: Subject<void>;
|
|
10
|
+
onChangeTextState: EventEmitter<boolean>;
|
|
11
|
+
resize(): void;
|
|
12
|
+
constructor(el: ElementRef);
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EllipseTextDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EllipseTextDirective, "[uiEllipseText]", never, {}, { "onChangeTextState": "onChangeTextState"; }, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -1,91 +1,42 @@
|
|
|
1
|
-
import { EventEmitter
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DataPropertyGetterPipe } from './pipes/data-property-getter';
|
|
5
|
-
import { ColumnTypeEnum, IDataSource, ITableColumn, ITableDetailColumn } from './table.model';
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ColumnEllipse, TableConfig, TableConfigWithPagination, TableData } from './table.model';
|
|
3
|
+
import { PageEvent } from '@angular/material/paginator';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class TableComponent
|
|
8
|
-
private dataPropertyGetterPipe;
|
|
5
|
+
export declare class TableComponent {
|
|
9
6
|
/**
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
set matSort(matSort: MatSort);
|
|
13
|
-
/**
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
tableDetails: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Data to be rendered
|
|
7
|
+
* Table configuration
|
|
19
8
|
*
|
|
20
|
-
* @
|
|
21
|
-
* @type {IDataSource}
|
|
9
|
+
* @type {TableConfig}
|
|
22
10
|
* @memberof TableComponent
|
|
23
11
|
*/
|
|
24
|
-
set
|
|
12
|
+
set config(config: TableConfig);
|
|
25
13
|
/**
|
|
26
|
-
*
|
|
14
|
+
* Input property for providing the table data.
|
|
27
15
|
*
|
|
28
|
-
* @type {
|
|
16
|
+
* @type {TableData}
|
|
29
17
|
* @memberof TableComponent
|
|
30
18
|
*/
|
|
31
|
-
|
|
19
|
+
data: TableData;
|
|
32
20
|
/**
|
|
33
|
-
*
|
|
21
|
+
* Input property indicating whether the table is in a loading state.
|
|
34
22
|
*
|
|
35
|
-
* @type {
|
|
23
|
+
* @type {boolean}
|
|
36
24
|
* @memberof TableComponent
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
dataSource: MatTableDataSource<any, import("@angular/material/table").MatTableDataSourcePaginator>;
|
|
55
|
-
/**
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
dataSourceDetail: MatTableDataSource<any, import("@angular/material/table").MatTableDataSourcePaginator>;
|
|
59
|
-
/**
|
|
60
|
-
* @ignore
|
|
61
|
-
*/
|
|
62
|
-
elementDetail: any;
|
|
63
|
-
/**
|
|
64
|
-
* @ignore
|
|
65
|
-
*/
|
|
66
|
-
columnsToDisplay: string[];
|
|
67
|
-
/**
|
|
68
|
-
* @ignore
|
|
69
|
-
*/
|
|
70
|
-
columnsDetailToDisplay: string[];
|
|
71
|
-
/**
|
|
72
|
-
* @ignore
|
|
73
|
-
*/
|
|
74
|
-
DataType: typeof ColumnTypeEnum;
|
|
75
|
-
ngOnInit(): void;
|
|
76
|
-
constructor(dataPropertyGetterPipe: DataPropertyGetterPipe);
|
|
77
|
-
onSort(sortParams: Sort): void;
|
|
78
|
-
onRowClick(rowParams: any): void;
|
|
79
|
-
onDetailRowClick(rowParams: any): void;
|
|
80
|
-
toggleRow(element: T): void;
|
|
81
|
-
/**
|
|
82
|
-
* @ignore
|
|
83
|
-
*/
|
|
84
|
-
private setTableDataSource;
|
|
85
|
-
/**
|
|
86
|
-
* @ignore
|
|
87
|
-
*/
|
|
88
|
-
private setTableDetailDataSource;
|
|
89
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any, any>, never>;
|
|
90
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any>, "ui-table", never, { "tableDetails": { "alias": "tableDetails"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "tableColumns": { "alias": "tableColumns"; "required": false; }; "tableDetailColumns": { "alias": "tableDetailColumns"; "required": false; }; }, { "onSortEvent": "onSortEvent"; "onRowClickEvent": "onRowClickEvent"; "onDetailRowClickEvent": "onDetailRowClickEvent"; }, never, never, false, never>;
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
loading: boolean;
|
|
28
|
+
paginatorChange: EventEmitter<PageEvent>;
|
|
29
|
+
protected columnsTooltipState: ColumnEllipse[];
|
|
30
|
+
protected tableConfig: TableConfigWithPagination;
|
|
31
|
+
protected displayedColumns: string[];
|
|
32
|
+
protected skeletonStyleConfig: {
|
|
33
|
+
background: string;
|
|
34
|
+
'border-radius': string;
|
|
35
|
+
height: string;
|
|
36
|
+
};
|
|
37
|
+
private defaultPaginationConfig;
|
|
38
|
+
protected onPaginatorChange(event: PageEvent): void;
|
|
39
|
+
protected onChangeColumnSize(columnIndex: number, showTooltip: boolean): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ui-table", never, { "config": { "alias": "config"; "required": true; }; "data": { "alias": "data"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "paginatorChange": "paginatorChange"; }, never, never, false, never>;
|
|
91
42
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./table.component";
|
|
3
|
-
import * as i2 from "./
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "@angular/material/
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "@angular/material/tooltip";
|
|
3
|
+
import * as i2 from "./ellipse-text.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/material/table";
|
|
6
|
+
import * as i5 from "@angular/material/tooltip";
|
|
7
|
+
import * as i6 from "../skeleton/skeleton.component";
|
|
8
|
+
import * as i7 from "../paginator/paginator.component.module";
|
|
10
9
|
export declare class TableComponentModule {
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponentModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TableComponentModule, [typeof i1.TableComponent, typeof i2.
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableComponentModule, [typeof i1.TableComponent, typeof i2.EllipseTextDirective], [typeof i3.CommonModule, typeof i4.MatTableModule, typeof i5.MatTooltipModule, typeof i6.SkeletonComponent, typeof i7.PaginatorComponentModule], [typeof i1.TableComponent]>;
|
|
13
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<TableComponentModule>;
|
|
14
13
|
}
|
|
@@ -1,45 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
field?: string;
|
|
9
|
-
type?: ColumnTypeEnum;
|
|
10
|
-
function?: (v: T) => string;
|
|
11
|
-
renderer?: (v: T) => IComponentRenderer | string;
|
|
12
|
-
sortable?: boolean;
|
|
13
|
-
styles?: IColumnStyles;
|
|
1
|
+
export interface TableConfig {
|
|
2
|
+
columns: TableColumn[];
|
|
3
|
+
pagination?: Pagination;
|
|
4
|
+
title?: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
stickyFirstColumn?: boolean;
|
|
7
|
+
stickyLastColumn?: boolean;
|
|
14
8
|
}
|
|
15
|
-
export interface
|
|
16
|
-
|
|
17
|
-
inputs?: any;
|
|
18
|
-
outputs?: {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
9
|
+
export interface TableConfigWithPagination extends TableConfig {
|
|
10
|
+
pagination: Pagination;
|
|
21
11
|
}
|
|
22
|
-
export interface
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
export interface TableColumn {
|
|
13
|
+
title: string;
|
|
14
|
+
key: string;
|
|
15
|
+
widthPerc?: number;
|
|
16
|
+
minWidthPx?: number;
|
|
17
|
+
allowMultiline?: boolean;
|
|
18
|
+
bold?: boolean;
|
|
19
|
+
showTooltip?: boolean;
|
|
25
20
|
}
|
|
26
|
-
export interface
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
export interface Pagination {
|
|
22
|
+
itemsPerPageOptions: number[];
|
|
23
|
+
itemsPerPage: number;
|
|
24
|
+
currentPage: number;
|
|
25
|
+
totalItems: number;
|
|
29
26
|
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
padding?: string;
|
|
35
|
-
}
|
|
36
|
-
export declare enum ColumnTypeEnum {
|
|
37
|
-
FIELD = "field",
|
|
38
|
-
FUNCTION = "function",
|
|
39
|
-
RENDERER = "renderer"
|
|
40
|
-
}
|
|
41
|
-
export declare enum ColumnAlignmentEnum {
|
|
42
|
-
LEFT = "left",
|
|
43
|
-
RIGHT = "right",
|
|
44
|
-
CENTER = "center"
|
|
27
|
+
export type TableData = Record<string, any>[];
|
|
28
|
+
export interface ColumnEllipse {
|
|
29
|
+
index: number;
|
|
30
|
+
showTooltip: boolean;
|
|
45
31
|
}
|