@universis/ngx-tables 0.8.0 → 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 +472 -308
- 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 +148 -4
- package/esm2015/lib/directives/btnexp.directive.js +9 -8
- package/esm2015/lib/i18n/tables.el.js +7 -2
- package/esm2015/lib/i18n/tables.en.js +7 -2
- package/esm5/lib/components/advanced-table/advanced-table.component.js +155 -4
- package/esm5/lib/directives/btnexp.directive.js +20 -17
- package/esm5/lib/i18n/tables.el.js +7 -2
- package/esm5/lib/i18n/tables.en.js +7 -2
- package/fesm2015/universis-ngx-tables.js +412 -259
- package/fesm2015/universis-ngx-tables.js.map +1 -1
- package/fesm5/universis-ngx-tables.js +466 -304
- package/fesm5/universis-ngx-tables.js.map +1 -1
- package/lib/components/advanced-table/advanced-table.component.d.ts +24 -2
- package/lib/directives/btnexp.directive.d.ts +6 -0
- package/lib/i18n/tables.el.d.ts +3 -0
- package/lib/i18n/tables.en.d.ts +3 -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;
|
|
@@ -99,6 +107,7 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
99
107
|
* Gets or sets table configuration
|
|
100
108
|
*/
|
|
101
109
|
config: TableConfiguration;
|
|
110
|
+
readonly lastQueryTotalItems: number;
|
|
102
111
|
/**
|
|
103
112
|
* Indicates whether table footer will be visible or not
|
|
104
113
|
*/
|
|
@@ -119,8 +128,9 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
119
128
|
dataTable: any;
|
|
120
129
|
dtOptions: any;
|
|
121
130
|
private lastQueryParams;
|
|
131
|
+
private _lastQueryTotalItems;
|
|
122
132
|
private reloadSubscription;
|
|
123
|
-
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);
|
|
124
134
|
search(searchText: any): void;
|
|
125
135
|
fetch(clearSelected?: boolean): void;
|
|
126
136
|
destroy(): void;
|
|
@@ -168,4 +178,16 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
168
178
|
ngOnChanges(changes: SimpleChanges): void;
|
|
169
179
|
reset(load?: boolean): void;
|
|
170
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
|
+
};
|
|
171
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
package/lib/i18n/tables.en.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@universis/ngx-tables",
|
|
3
|
-
"version": "0.8.
|
|
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
|
},
|