@universis/ngx-tables 0.7.30 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/universis-ngx-tables.umd.js +527 -315
- package/bundles/universis-ngx-tables.umd.js.map +1 -1
- package/bundles/universis-ngx-tables.umd.min.js +1 -1
- package/bundles/universis-ngx-tables.umd.min.js.map +1 -1
- package/esm2015/lib/components/advanced-table/advanced-table.component.js +206 -7
- package/esm2015/lib/directives/btnexp.directive.js +9 -8
- package/esm2015/lib/i18n/tables.el.js +11 -2
- package/esm2015/lib/i18n/tables.en.js +11 -2
- package/esm5/lib/components/advanced-table/advanced-table.component.js +200 -8
- package/esm5/lib/directives/btnexp.directive.js +20 -17
- package/esm5/lib/i18n/tables.el.js +11 -2
- package/esm5/lib/i18n/tables.en.js +11 -2
- package/fesm2015/universis-ngx-tables.js +482 -267
- package/fesm2015/universis-ngx-tables.js.map +1 -1
- package/fesm5/universis-ngx-tables.js +522 -312
- package/fesm5/universis-ngx-tables.js.map +1 -1
- package/lib/components/advanced-table/advanced-table.component.d.ts +27 -2
- package/lib/directives/btnexp.directive.d.ts +6 -0
- package/lib/i18n/tables.el.d.ts +7 -0
- package/lib/i18n/tables.en.d.ts +7 -0
- package/package.json +4 -4
- package/universis-ngx-tables.metadata.json +1 -1
|
@@ -6,11 +6,12 @@ import { TableConfiguration } from './advanced-table.interfaces';
|
|
|
6
6
|
import { ClientDataQueryable } from '@themost/client';
|
|
7
7
|
import { AdvancedFilterValueProvider } from './advanced-filter-value-provider.service';
|
|
8
8
|
import { BehaviorSubject } from 'rxjs';
|
|
9
|
-
import { TemplatePipe, LoadingService } from '@universis/common';
|
|
9
|
+
import { TemplatePipe, LoadingService, ConfigurationService, ModalService, ErrorService, ExportSpreadsheetService } from '@universis/common';
|
|
10
10
|
import { IAdvancedTableFormatters } from './advanced-table.formatters.interface';
|
|
11
11
|
import 'datatables.net';
|
|
12
12
|
import 'datatables.net-scroller';
|
|
13
13
|
import 'datatables.net-colreorder';
|
|
14
|
+
import 'datatables.net-buttons';
|
|
14
15
|
import { HttpClient } from '@angular/common/http';
|
|
15
16
|
import { ColumnSelectorService } from '../column-selector/column-selector.service';
|
|
16
17
|
export interface AdvancedTableDataResult {
|
|
@@ -19,6 +20,9 @@ export interface AdvancedTableDataResult {
|
|
|
19
20
|
data: Array<any>;
|
|
20
21
|
}
|
|
21
22
|
export declare let COLUMN_FORMATTERS: InjectionToken<{}>;
|
|
23
|
+
export declare class ExportLimitExceededError extends RangeError {
|
|
24
|
+
constructor(message: string);
|
|
25
|
+
}
|
|
22
26
|
export declare class AdvancedTableConfiguration {
|
|
23
27
|
static cast(input: any, clone?: boolean): TableConfiguration;
|
|
24
28
|
}
|
|
@@ -34,6 +38,10 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
34
38
|
private _loading;
|
|
35
39
|
private _http;
|
|
36
40
|
private _columnSelector;
|
|
41
|
+
private _configuration;
|
|
42
|
+
private _exportSpreadsheet;
|
|
43
|
+
private _modalService;
|
|
44
|
+
private _errorService;
|
|
37
45
|
private _query;
|
|
38
46
|
private _config;
|
|
39
47
|
private _firstLoad;
|
|
@@ -45,6 +53,7 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
45
53
|
configChanges: BehaviorSubject<any>;
|
|
46
54
|
table: ElementRef;
|
|
47
55
|
emptyTable: ElementRef;
|
|
56
|
+
errorTemplate: ElementRef;
|
|
48
57
|
loadingTable: ElementRef;
|
|
49
58
|
height: number;
|
|
50
59
|
showActions: boolean;
|
|
@@ -93,10 +102,12 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
93
102
|
* Gets or sets a URL to load table configuration from
|
|
94
103
|
*/
|
|
95
104
|
configSrc: string;
|
|
105
|
+
lastError: any;
|
|
96
106
|
/**
|
|
97
107
|
* Gets or sets table configuration
|
|
98
108
|
*/
|
|
99
109
|
config: TableConfiguration;
|
|
110
|
+
readonly lastQueryTotalItems: number;
|
|
100
111
|
/**
|
|
101
112
|
* Indicates whether table footer will be visible or not
|
|
102
113
|
*/
|
|
@@ -117,8 +128,9 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
117
128
|
dataTable: any;
|
|
118
129
|
dtOptions: any;
|
|
119
130
|
private lastQueryParams;
|
|
131
|
+
private _lastQueryTotalItems;
|
|
120
132
|
private reloadSubscription;
|
|
121
|
-
constructor(_context: AngularDataContext, _columnFormatters: IAdvancedTableFormatters, _activatedRoute: ActivatedRoute, _translateService: TranslateService, _injector: Injector, _advancedFilterValueProvider: AdvancedFilterValueProvider, _element: ElementRef, _template: TemplatePipe, _loading: LoadingService, _http: HttpClient, _columnSelector: ColumnSelectorService);
|
|
133
|
+
constructor(_context: AngularDataContext, _columnFormatters: IAdvancedTableFormatters, _activatedRoute: ActivatedRoute, _translateService: TranslateService, _injector: Injector, _advancedFilterValueProvider: AdvancedFilterValueProvider, _element: ElementRef, _template: TemplatePipe, _loading: LoadingService, _http: HttpClient, _columnSelector: ColumnSelectorService, _configuration: ConfigurationService, _exportSpreadsheet: ExportSpreadsheetService, _modalService: ModalService, _errorService: ErrorService);
|
|
122
134
|
search(searchText: any): void;
|
|
123
135
|
fetch(clearSelected?: boolean): void;
|
|
124
136
|
destroy(): void;
|
|
@@ -158,6 +170,7 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
158
170
|
*/
|
|
159
171
|
onSelectionChange($event: any): void;
|
|
160
172
|
private resetEmptyTable;
|
|
173
|
+
private toggleError;
|
|
161
174
|
private clearEmptyTable;
|
|
162
175
|
export(): void;
|
|
163
176
|
handleColumns(columnsToShow: any): void;
|
|
@@ -165,4 +178,16 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
165
178
|
ngOnChanges(changes: SimpleChanges): void;
|
|
166
179
|
reset(load?: boolean): void;
|
|
167
180
|
selectColumns(): void;
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @param options to pass an errorHandler callback, if desired
|
|
184
|
+
* @returns void
|
|
185
|
+
*/
|
|
186
|
+
exportView(options?: {
|
|
187
|
+
errorHandler?: (reason?: any) => any;
|
|
188
|
+
}): Promise<void>;
|
|
189
|
+
getExportableData(): {
|
|
190
|
+
body: any[];
|
|
191
|
+
header: any[];
|
|
192
|
+
};
|
|
168
193
|
}
|
|
@@ -4,6 +4,12 @@ import { ConfigurationService, ErrorService, LoadingService } from '@universis/c
|
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import { ClientDataQueryable } from '@themost/client';
|
|
6
6
|
import { TableConfiguration } from '../components/advanced-table/advanced-table.interfaces';
|
|
7
|
+
export declare const MAX_EXPORT_ITEMS = 500;
|
|
8
|
+
export declare interface ExportLimitConfiguration {
|
|
9
|
+
tables?: {
|
|
10
|
+
exportLimit?: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
7
13
|
export declare class BtnExpDirective {
|
|
8
14
|
private _activatedTable;
|
|
9
15
|
private _context;
|
package/lib/i18n/tables.el.d.ts
CHANGED
|
@@ -78,6 +78,13 @@ export declare const TABLES_EL: {
|
|
|
78
78
|
"UnknownColumn": string;
|
|
79
79
|
"SelectColumn": string;
|
|
80
80
|
"ActionLinkColumn": string;
|
|
81
|
+
"DataError": {
|
|
82
|
+
"Title": string;
|
|
83
|
+
"Message": string;
|
|
84
|
+
};
|
|
85
|
+
"ExportList": string;
|
|
86
|
+
"ExportLimitExceeded": string;
|
|
87
|
+
"ExportResults": string;
|
|
81
88
|
};
|
|
82
89
|
"TrueFalse": {
|
|
83
90
|
"long": {
|
package/lib/i18n/tables.en.d.ts
CHANGED
|
@@ -77,6 +77,13 @@ export declare const TABLES_EN: {
|
|
|
77
77
|
"UnknownColumn": string;
|
|
78
78
|
"SelectColumn": string;
|
|
79
79
|
"ActionLinkColumn": string;
|
|
80
|
+
"DataError": {
|
|
81
|
+
"Title": string;
|
|
82
|
+
"Message": string;
|
|
83
|
+
};
|
|
84
|
+
"ExportList": string;
|
|
85
|
+
"ExportLimitExceeded": string;
|
|
86
|
+
"ExportResults": string;
|
|
80
87
|
};
|
|
81
88
|
"TrueFalse": {
|
|
82
89
|
"long": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@universis/ngx-tables",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"datatables": "^1.10.18",
|
|
6
6
|
"datatables.net": "1.10.24",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@ngrx/effects": "^6.1.2",
|
|
23
23
|
"@ngrx/entity": "^6.1.2",
|
|
24
24
|
"@ngrx/store": "^6.1.2",
|
|
25
|
-
"@universis/common": "^1.
|
|
25
|
+
"@universis/common": "^1.5.9",
|
|
26
26
|
"@universis/forms": "^0.5.6",
|
|
27
27
|
"@universis/theme": "^1.1.5",
|
|
28
28
|
"angular-formio": "^4.3.14",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"lodash": "^4.17.4",
|
|
32
32
|
"@ngx-translate/core": "^10.0.2",
|
|
33
33
|
"@ngx-translate/http-loader": "^3.0.1",
|
|
34
|
-
"@themost/angular": "
|
|
35
|
-
"@themost/client": "
|
|
34
|
+
"@themost/angular": "~6.5.2",
|
|
35
|
+
"@themost/client": "~2.5.6",
|
|
36
36
|
"ngx-bootstrap": "^3 || ^4 || ^5",
|
|
37
37
|
"tslib": "^1.9.0"
|
|
38
38
|
},
|