ngx-st-tables 17.0.38 → 17.0.41
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/esm2022/lib/components/material-table/material-table-row-cell/material-table-row-cell.component.mjs +3 -3
- package/esm2022/lib/components/material-table/material-table.component.mjs +6 -3
- package/esm2022/lib/ngx-st-tables.module.mjs +7 -4
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ngx-st-tables.mjs +135 -40
- package/fesm2022/ngx-st-tables.mjs.map +1 -1
- package/lib/ngx-st-tables.module.d.ts +31 -30
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2022/lib/components/local-table/configurations/configurations.component.mjs +0 -69
- package/esm2022/lib/components/local-table/local-table.component.mjs +0 -259
- package/esm2022/lib/models/st-configurations-settings.model.mjs +0 -2
- package/esm2022/lib/models/st-global-search-settings.model.mjs +0 -2
- package/esm2022/lib/models/st-local-storage-configuration.model.mjs +0 -2
- package/esm2022/lib/models/st-local-table-column.model.mjs +0 -2
- package/esm2022/lib/models/st-local-table-columns.model.mjs +0 -2
- package/esm2022/lib/models/st-table-settings.model.mjs +0 -2
- package/esm2022/lib/services/local-table.service.mjs +0 -36
- package/lib/components/local-table/configurations/configurations.component.d.ts +0 -27
- package/lib/components/local-table/local-table.component.d.ts +0 -63
- package/lib/models/st-configurations-settings.model.d.ts +0 -6
- package/lib/models/st-global-search-settings.model.d.ts +0 -4
- package/lib/models/st-local-storage-configuration.model.d.ts +0 -8
- package/lib/models/st-local-table-column.model.d.ts +0 -22
- package/lib/models/st-local-table-columns.model.d.ts +0 -4
- package/lib/models/st-table-settings.model.d.ts +0 -3
- package/lib/services/local-table.service.d.ts +0 -11
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3QtbG9jYWwtdGFibGUtY29sdW1ucy5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC10YWJsZXMvc3JjL2xpYi9tb2RlbHMvc3QtbG9jYWwtdGFibGUtY29sdW1ucy5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3RMb2NhbFRhYmxlQ29sdW1uTW9kZWwgfSBmcm9tICcuL3N0LWxvY2FsLXRhYmxlLWNvbHVtbi5tb2RlbCc7XHJcbmV4cG9ydCBpbnRlcmZhY2UgU3RMb2NhbFRhYmxlQ29sdW1uc01vZGVsIHtcclxuICAgIFtjb2x1bW5OYW1lOiBzdHJpbmddOiBTdExvY2FsVGFibGVDb2x1bW5Nb2RlbDtcclxufVxyXG4iXX0=
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3QtdGFibGUtc2V0dGluZ3MubW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc3QtdGFibGVzL3NyYy9saWIvbW9kZWxzL3N0LXRhYmxlLXNldHRpbmdzLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFN0VGFibGVTZXR0aW5nc01vZGVsIHtcclxuICAgIHJvd0NsaWNrQWN0aW9uOiAocm93OiBhbnkpID0+IHZvaWQ7XHJcbn1cclxuIl19
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class LocalTableService {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.localStorageName = '';
|
|
6
|
-
}
|
|
7
|
-
getConfigs() {
|
|
8
|
-
if (this.checkLocalStorageName()) {
|
|
9
|
-
return JSON.parse(localStorage.getItem(this.localStorageName) || '[]');
|
|
10
|
-
}
|
|
11
|
-
return [];
|
|
12
|
-
}
|
|
13
|
-
saveConfigs(configs) {
|
|
14
|
-
if (this.checkLocalStorageName()) {
|
|
15
|
-
localStorage.setItem(this.localStorageName, JSON.stringify(configs));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
checkLocalStorageName() {
|
|
19
|
-
if (this.localStorageName) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
console.warn('Yiu have to add configurationsSettings');
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableService, providedIn: 'root' }); }
|
|
29
|
-
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableService, decorators: [{
|
|
31
|
-
type: Injectable,
|
|
32
|
-
args: [{
|
|
33
|
-
providedIn: 'root',
|
|
34
|
-
}]
|
|
35
|
-
}], ctorParameters: () => [] });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtdGFibGUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC10YWJsZXMvc3JjL2xpYi9zZXJ2aWNlcy9sb2NhbC10YWJsZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9B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Wl1IGhhdmUgdG8gYWRkIGNvbmZpZ3VyYXRpb25zU2V0dGluZ3MnKTtcclxuICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { StConfigurationsSettingsModel } from '../../../models/st-configurations-settings.model';
|
|
3
|
-
import { StLocalStorageConfigurationModel } from '../../../models/st-local-storage-configuration.model';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ConfigurationsComponent implements OnInit {
|
|
6
|
-
configurationsSettings: StConfigurationsSettingsModel;
|
|
7
|
-
configurations: StLocalStorageConfigurationModel[];
|
|
8
|
-
set initSelectedConfig(config: StLocalStorageConfigurationModel | null);
|
|
9
|
-
createNewConfig: EventEmitter<string>;
|
|
10
|
-
removeConfig: EventEmitter<string>;
|
|
11
|
-
changeConfig: EventEmitter<string | null>;
|
|
12
|
-
creatingConfiguration: boolean;
|
|
13
|
-
createConfigurationName: string;
|
|
14
|
-
removingConfiguration: boolean;
|
|
15
|
-
selectedConfig: StLocalStorageConfigurationModel | null;
|
|
16
|
-
constructor();
|
|
17
|
-
ngOnInit(): void;
|
|
18
|
-
showCreateConfiguration(): void;
|
|
19
|
-
hideCreateConfiguration(): void;
|
|
20
|
-
saveCreateConfiguration(): void;
|
|
21
|
-
deleteConfiguration(): void;
|
|
22
|
-
acceptDeleteConfiguration(): void;
|
|
23
|
-
declineDeleteConfiguration(): void;
|
|
24
|
-
selectedConfigChanged(): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationsComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigurationsComponent, "st-configurations[configurationsSettings]", never, { "configurationsSettings": { "alias": "configurationsSettings"; "required": false; }; "configurations": { "alias": "configurations"; "required": false; }; "initSelectedConfig": { "alias": "initSelectedConfig"; "required": false; }; }, { "createNewConfig": "createNewConfig"; "removeConfig": "removeConfig"; "changeConfig": "changeConfig"; }, never, never, false, never>;
|
|
27
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
-
import { LocalTableService } from '../../services/local-table.service';
|
|
3
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
-
import { MatPaginator } from '@angular/material/paginator';
|
|
5
|
-
import { MatSort } from '@angular/material/sort';
|
|
6
|
-
import { StTableSettingsModel } from '../../models/st-table-settings.model';
|
|
7
|
-
import { StGlobalSearchSettingsModel } from '../../models/st-global-search-settings.model';
|
|
8
|
-
import { StConfigurationsSettingsModel } from '../../models/st-configurations-settings.model';
|
|
9
|
-
import { StLocalTableColumnsModel } from '../../models/st-local-table-columns.model';
|
|
10
|
-
import { MatTableDataSource } from '@angular/material/table';
|
|
11
|
-
import { LocalTableActionColumnModel, StLocalTableColumnModel } from '../../models/st-local-table-column.model';
|
|
12
|
-
import { StLocalStorageConfigurationModel } from '../../models/st-local-storage-configuration.model';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
export declare class LocalTableComponent implements OnInit, AfterViewInit {
|
|
15
|
-
private localTableService;
|
|
16
|
-
private changeDetectorRef;
|
|
17
|
-
private router;
|
|
18
|
-
private activatedRoute;
|
|
19
|
-
paginator: MatPaginator;
|
|
20
|
-
sort: MatSort;
|
|
21
|
-
tableSettings: StTableSettingsModel;
|
|
22
|
-
globalSearchSettings: StGlobalSearchSettingsModel;
|
|
23
|
-
pageSize: number;
|
|
24
|
-
allowPickColumns: boolean;
|
|
25
|
-
configurationsSettings: StConfigurationsSettingsModel;
|
|
26
|
-
localStorageName: string;
|
|
27
|
-
bindSearchToUrl: boolean;
|
|
28
|
-
set columns(columns: StLocalTableColumnsModel);
|
|
29
|
-
get columns(): StLocalTableColumnsModel;
|
|
30
|
-
private _columns;
|
|
31
|
-
set data(data: any[]);
|
|
32
|
-
get data(): any[];
|
|
33
|
-
private _data;
|
|
34
|
-
searchModel: string;
|
|
35
|
-
displayedColumns: string[];
|
|
36
|
-
tableSource: MatTableDataSource<any>;
|
|
37
|
-
columnsArray: StLocalTableColumnModel[];
|
|
38
|
-
configurations: StLocalStorageConfigurationModel[];
|
|
39
|
-
initConfig: StLocalStorageConfigurationModel | null;
|
|
40
|
-
activeConfig: StLocalStorageConfigurationModel | null;
|
|
41
|
-
pageIndex: number;
|
|
42
|
-
constructor(localTableService: LocalTableService, changeDetectorRef: ChangeDetectorRef, router: Router, activatedRoute: ActivatedRoute);
|
|
43
|
-
ngOnInit(): void;
|
|
44
|
-
ngAfterViewInit(): void;
|
|
45
|
-
applySearch(): void;
|
|
46
|
-
clearSearch(): void;
|
|
47
|
-
checkIfActionVisible(row: any, action: LocalTableActionColumnModel): boolean;
|
|
48
|
-
columnVisibleChanged(column: StLocalTableColumnModel): void;
|
|
49
|
-
newConfigCreated(name: string): void;
|
|
50
|
-
configRemoved(configId: string): void;
|
|
51
|
-
configChanged(configId: string | null): void;
|
|
52
|
-
pageChanged(event: any): void;
|
|
53
|
-
private updateSearchToUrl;
|
|
54
|
-
private updateConfigsToLocalStorage;
|
|
55
|
-
private setTableSource;
|
|
56
|
-
private setDisplayedColumns;
|
|
57
|
-
private getColumnsArray;
|
|
58
|
-
private loadConfigs;
|
|
59
|
-
private generateNewConfig;
|
|
60
|
-
private setTableConfig;
|
|
61
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LocalTableComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LocalTableComponent, "ngx-st-local-table", never, { "tableSettings": { "alias": "tableSettings"; "required": false; }; "globalSearchSettings": { "alias": "globalSearchSettings"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "allowPickColumns": { "alias": "allowPickColumns"; "required": false; }; "configurationsSettings": { "alias": "configurationsSettings"; "required": false; }; "localStorageName": { "alias": "localStorageName"; "required": false; }; "bindSearchToUrl": { "alias": "bindSearchToUrl"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
|
|
63
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface StLocalTableColumnModel {
|
|
2
|
-
translateColumnName: string;
|
|
3
|
-
visible: boolean;
|
|
4
|
-
type?: 'string' | 'date';
|
|
5
|
-
sort?: boolean;
|
|
6
|
-
search?: boolean;
|
|
7
|
-
searchLabel?: string;
|
|
8
|
-
flexRight?: boolean;
|
|
9
|
-
width?: string;
|
|
10
|
-
actions?: LocalTableActionColumnModel[] | undefined;
|
|
11
|
-
translateValue?: {
|
|
12
|
-
[value: string]: string;
|
|
13
|
-
};
|
|
14
|
-
notShowInColumnPick?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface LocalTableActionColumnModel {
|
|
17
|
-
iconName: string;
|
|
18
|
-
tooltipName?: string;
|
|
19
|
-
action?: (row: any) => void;
|
|
20
|
-
show?: (row: any) => boolean;
|
|
21
|
-
url?: string[];
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StLocalStorageConfigurationModel } from '../models/st-local-storage-configuration.model';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class LocalTableService {
|
|
4
|
-
localStorageName: string;
|
|
5
|
-
constructor();
|
|
6
|
-
getConfigs(): StLocalStorageConfigurationModel[];
|
|
7
|
-
saveConfigs(configs: StLocalStorageConfigurationModel[]): void;
|
|
8
|
-
checkLocalStorageName(): boolean;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LocalTableService, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LocalTableService>;
|
|
11
|
-
}
|