@universis/ngx-tables 0.7.19 → 0.7.23
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 +438 -13
- 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/add-items/add-items.component.js +2 -2
- package/esm2015/lib/components/advanced-table/advanced-table.component.js +72 -3
- package/esm2015/lib/components/advanced-table/advanced-table.formatters.js +3 -3
- package/esm2015/lib/components/advanced-table/advanced-table.interfaces.js +1 -1
- package/esm2015/lib/components/column-selector/column-selector.component.js +190 -0
- package/esm2015/lib/components/column-selector/column-selector.service.js +47 -0
- package/esm2015/lib/directives/advance-table-state.directive.js +1 -1
- package/esm2015/lib/i18n/tables.el.js +14 -2
- package/esm2015/lib/i18n/tables.en.js +14 -2
- package/esm2015/lib/tables.module.js +10 -4
- package/esm2015/public_api.js +3 -1
- package/esm5/lib/components/add-items/add-items.component.js +2 -2
- package/esm5/lib/components/advanced-table/advanced-table.component.js +73 -3
- package/esm5/lib/components/advanced-table/advanced-table.formatters.js +2 -2
- package/esm5/lib/components/advanced-table/advanced-table.interfaces.js +1 -1
- package/esm5/lib/components/column-selector/column-selector.component.js +257 -0
- package/esm5/lib/components/column-selector/column-selector.service.js +50 -0
- package/esm5/lib/directives/advance-table-state.directive.js +1 -1
- package/esm5/lib/i18n/tables.el.js +14 -2
- package/esm5/lib/i18n/tables.en.js +14 -2
- package/esm5/lib/tables.module.js +10 -4
- package/esm5/public_api.js +3 -1
- package/fesm2015/universis-ngx-tables.js +335 -13
- package/fesm2015/universis-ngx-tables.js.map +1 -1
- package/fesm5/universis-ngx-tables.js +402 -12
- package/fesm5/universis-ngx-tables.js.map +1 -1
- package/lib/components/advanced-table/advanced-table.component.d.ts +6 -1
- package/lib/components/advanced-table/advanced-table.interfaces.d.ts +2 -0
- package/lib/components/column-selector/column-selector.component.d.ts +37 -0
- package/lib/components/column-selector/column-selector.service.d.ts +19 -0
- package/lib/i18n/tables.el.d.ts +12 -0
- package/lib/i18n/tables.en.d.ts +12 -0
- package/package.json +3 -2
- package/public_api.d.ts +2 -0
- package/universis-ngx-tables.metadata.json +1 -1
|
@@ -10,7 +10,9 @@ import { TemplatePipe, LoadingService } from '@universis/common';
|
|
|
10
10
|
import { IAdvancedTableFormatters } from './advanced-table.formatters.interface';
|
|
11
11
|
import 'datatables.net';
|
|
12
12
|
import 'datatables.net-scroller';
|
|
13
|
+
import 'datatables.net-colreorder';
|
|
13
14
|
import { HttpClient } from '@angular/common/http';
|
|
15
|
+
import { ColumnSelectorService } from '../column-selector/column-selector.service';
|
|
14
16
|
export interface AdvancedTableDataResult {
|
|
15
17
|
recordsTotal: number;
|
|
16
18
|
recordsFiltered: number;
|
|
@@ -31,6 +33,7 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
31
33
|
private _template;
|
|
32
34
|
private _loading;
|
|
33
35
|
private _http;
|
|
36
|
+
private _columnSelector;
|
|
34
37
|
private _query;
|
|
35
38
|
private _config;
|
|
36
39
|
private _firstLoad;
|
|
@@ -63,6 +66,7 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
63
66
|
lengthMenu: number[];
|
|
64
67
|
paging: boolean;
|
|
65
68
|
pageLength: number;
|
|
69
|
+
columnOrdering: boolean;
|
|
66
70
|
stateSave: boolean;
|
|
67
71
|
stateLoadCallback: (settings: any, callback: (state: any) => void) => void;
|
|
68
72
|
stateSaveCallback: (settings: any, state: any) => void;
|
|
@@ -111,7 +115,7 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
111
115
|
dtOptions: any;
|
|
112
116
|
private lastQueryParams;
|
|
113
117
|
private reloadSubscription;
|
|
114
|
-
constructor(_context: AngularDataContext, _columnFormatters: IAdvancedTableFormatters, _activatedRoute: ActivatedRoute, _translateService: TranslateService, _injector: Injector, _advancedFilterValueProvider: AdvancedFilterValueProvider, _element: ElementRef, _template: TemplatePipe, _loading: LoadingService, _http: HttpClient);
|
|
118
|
+
constructor(_context: AngularDataContext, _columnFormatters: IAdvancedTableFormatters, _activatedRoute: ActivatedRoute, _translateService: TranslateService, _injector: Injector, _advancedFilterValueProvider: AdvancedFilterValueProvider, _element: ElementRef, _template: TemplatePipe, _loading: LoadingService, _http: HttpClient, _columnSelector: ColumnSelectorService);
|
|
115
119
|
search(searchText: any): void;
|
|
116
120
|
fetch(clearSelected?: boolean): void;
|
|
117
121
|
destroy(): void;
|
|
@@ -157,4 +161,5 @@ export declare class AdvancedTableComponent implements OnInit, OnDestroy, OnChan
|
|
|
157
161
|
getConfig(): TableConfiguration;
|
|
158
162
|
ngOnChanges(changes: SimpleChanges): void;
|
|
159
163
|
reset(load?: boolean): void;
|
|
164
|
+
selectColumns(): void;
|
|
160
165
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { RouterModalOkCancel } from '@universis/common/routing';
|
|
6
|
+
import { BsModalRef } from 'ngx-bootstrap/modal';
|
|
7
|
+
export declare class ColumnSelectorComponent extends RouterModalOkCancel implements OnInit, OnDestroy, OnChanges {
|
|
8
|
+
private _modalRef;
|
|
9
|
+
private ref;
|
|
10
|
+
private _translateService;
|
|
11
|
+
columns: {
|
|
12
|
+
key: string;
|
|
13
|
+
title: string;
|
|
14
|
+
visible: boolean;
|
|
15
|
+
index: number;
|
|
16
|
+
}[];
|
|
17
|
+
dismiss: EventEmitter<any>;
|
|
18
|
+
selectedColumns: {
|
|
19
|
+
key: string;
|
|
20
|
+
title: string;
|
|
21
|
+
}[];
|
|
22
|
+
moveUpButton: ElementRef;
|
|
23
|
+
moveDownButton: ElementRef;
|
|
24
|
+
availableColumnsControl: FormControl;
|
|
25
|
+
selectedColumnsControl: FormControl;
|
|
26
|
+
ok(): Promise<any>;
|
|
27
|
+
cancel(): Promise<any>;
|
|
28
|
+
constructor(router: Router, activatedRoute: ActivatedRoute, _modalRef: BsModalRef, ref: ChangeDetectorRef, _translateService: TranslateService);
|
|
29
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
private applyChanges;
|
|
33
|
+
removeColumns(): void;
|
|
34
|
+
addColumns(): void;
|
|
35
|
+
moveUp(): void;
|
|
36
|
+
moveDown(): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModalService } from '@universis/common';
|
|
2
|
+
export declare class ColumnSelectorService {
|
|
3
|
+
private _modal;
|
|
4
|
+
constructor(_modal: ModalService);
|
|
5
|
+
selectColumns(columns: {
|
|
6
|
+
key: string;
|
|
7
|
+
title: string;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
index: number;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
result: string;
|
|
12
|
+
columns?: {
|
|
13
|
+
key: string;
|
|
14
|
+
title: string;
|
|
15
|
+
visible: boolean;
|
|
16
|
+
index: number;
|
|
17
|
+
}[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
package/lib/i18n/tables.el.d.ts
CHANGED
|
@@ -68,6 +68,15 @@ export declare const TABLES_EL: {
|
|
|
68
68
|
"Title": string;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
+
"SelectColumns": string;
|
|
72
|
+
"MoveUp": string;
|
|
73
|
+
"MoveDown": string;
|
|
74
|
+
"AddColumn": string;
|
|
75
|
+
"RemoveColumn": string;
|
|
76
|
+
"SelectColumnHelp": string;
|
|
77
|
+
"MoveColumnHelp": string;
|
|
78
|
+
"UnknownColumn": string;
|
|
79
|
+
"SelectColumn": string;
|
|
71
80
|
};
|
|
72
81
|
"TrueFalse": {
|
|
73
82
|
"long": {
|
|
@@ -103,4 +112,7 @@ export declare const TABLES_EL: {
|
|
|
103
112
|
"Close": string;
|
|
104
113
|
};
|
|
105
114
|
};
|
|
115
|
+
"AddItems": {
|
|
116
|
+
"SelectItems": string;
|
|
117
|
+
};
|
|
106
118
|
};
|
package/lib/i18n/tables.en.d.ts
CHANGED
|
@@ -67,6 +67,15 @@ export declare const TABLES_EN: {
|
|
|
67
67
|
"Title": string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
"SelectColumns": string;
|
|
71
|
+
"MoveUp": string;
|
|
72
|
+
"MoveDown": string;
|
|
73
|
+
"AddColumn": string;
|
|
74
|
+
"RemoveColumn": string;
|
|
75
|
+
"SelectColumnHelp": string;
|
|
76
|
+
"MoveColumnHelp": string;
|
|
77
|
+
"UnknownColumn": string;
|
|
78
|
+
"SelectColumn": string;
|
|
70
79
|
};
|
|
71
80
|
"TrueFalse": {
|
|
72
81
|
"long": {
|
|
@@ -102,4 +111,7 @@ export declare const TABLES_EN: {
|
|
|
102
111
|
"Close": string;
|
|
103
112
|
};
|
|
104
113
|
};
|
|
114
|
+
"AddItems": {
|
|
115
|
+
"SelectItems": string;
|
|
116
|
+
};
|
|
105
117
|
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@universis/ngx-tables",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.23",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"datatables": "^1.10.18",
|
|
6
6
|
"datatables.net": "1.10.24",
|
|
7
7
|
"datatables.net-buttons": "^1.5.6",
|
|
8
8
|
"datatables.net-buttons-dt": "^1.5.6",
|
|
9
|
+
"datatables.net-colreorder": "^1.5.4",
|
|
9
10
|
"datatables.net-scroller": "^1.5.1",
|
|
10
|
-
"ngx-pipes": "^2.7.5",
|
|
11
11
|
"jsrsasign": "^10.0.5",
|
|
12
|
+
"ngx-pipes": "^2.7.5",
|
|
12
13
|
"tslib": "^1.9.0"
|
|
13
14
|
},
|
|
14
15
|
"peerDependencies": {
|
package/public_api.d.ts
CHANGED
|
@@ -25,4 +25,6 @@ export * from './lib/services/advanced-aggregator/advanced-aggregator.service';
|
|
|
25
25
|
export * from './lib/advanced-aggregator';
|
|
26
26
|
export * from './lib/tables.module';
|
|
27
27
|
export * from './lib/tables.activated-table.service';
|
|
28
|
+
export * from './lib/components/column-selector/column-selector.service';
|
|
29
|
+
export * from './lib/components/column-selector/column-selector.component';
|
|
28
30
|
export * from './lib/reducers/index';
|