@mediusinc/mng-commons 4.0.0-rc.1 → 4.0.0-rc.2
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/index.mjs +8 -2
- package/esm2022/lib/components/action/index.mjs +2 -1
- package/esm2022/lib/components/action/table/action-table.component.mjs +164 -0
- package/esm2022/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +4 -4
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +4 -5
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
- package/esm2022/lib/components/layoutV2/topbar.component.mjs +2 -7
- package/esm2022/lib/components/table/column-filter-full/column-filter-full.component.mjs +466 -0
- package/esm2022/lib/components/table/column-value/column-value.component.mjs +87 -0
- package/esm2022/lib/components/table/models/table.event.mjs +16 -0
- package/esm2022/lib/components/table/models/table.interface.mjs +2 -0
- package/esm2022/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.mjs +25 -0
- package/esm2022/lib/components/table/table.component.mjs +723 -0
- package/esm2022/lib/components/tableview/index.mjs +1 -4
- package/esm2022/lib/components/tableview/tableview.component.mjs +6 -7
- package/esm2022/lib/descriptors/editor/editor.descriptor.mjs +1 -1
- package/esm2022/lib/descriptors/table/table.descriptor.mjs +16 -17
- package/esm2022/lib/descriptors/tableview/tableview.descriptor.mjs +1 -1
- package/esm2022/lib/utils/tableview.util.mjs +2 -2
- package/fesm2022/mediusinc-mng-commons.mjs +2221 -2080
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/index.d.ts +6 -1
- package/lib/components/action/index.d.ts +1 -0
- package/lib/components/action/table/action-table.component.d.ts +55 -0
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +1 -1
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +1 -1
- package/lib/components/layoutV2/topbar.component.d.ts +0 -1
- package/lib/components/{tableview/table → table}/column-filter-full/column-filter-full.component.d.ts +2 -2
- package/lib/components/{tableview/table → table}/column-value/column-value.component.d.ts +3 -3
- package/lib/components/{tableview/table → table}/models/table.interface.d.ts +3 -1
- package/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.d.ts +8 -0
- package/lib/components/table/table.component.d.ts +125 -0
- package/lib/components/tableview/index.d.ts +0 -3
- package/lib/components/tableview/tableview.component.d.ts +3 -3
- package/lib/descriptors/editor/editor.descriptor.d.ts +1 -1
- package/lib/descriptors/table/table.descriptor.d.ts +15 -12
- package/lib/descriptors/tableview/tableview.descriptor.d.ts +1 -1
- package/package.json +1 -1
- package/scss/mng-overrides/_theme_datatable.scss +24 -10
- package/scss/v2/theme/theme-base/mng/_mng_theme_datatable.scss +24 -9
- package/scss/v2/theme/theme-dark/_variables.scss +24 -12
- package/scss/v2/theme/theme-dark/blue/theme.scss +4 -4
- package/scss/v2/theme/theme-light/_variables.scss +23 -11
- package/scss/v2/theme/theme-light/blue/theme.scss +2 -2
- package/esm2022/lib/components/tableview/models/index.mjs +0 -2
- package/esm2022/lib/components/tableview/models/table.event.mjs +0 -16
- package/esm2022/lib/components/tableview/table/column-filter-full/column-filter-full.component.mjs +0 -467
- package/esm2022/lib/components/tableview/table/column-value/column-value.component.mjs +0 -87
- package/esm2022/lib/components/tableview/table/models/index.mjs +0 -2
- package/esm2022/lib/components/tableview/table/models/table.interface.mjs +0 -2
- package/esm2022/lib/components/tableview/table/table.component.mjs +0 -752
- package/lib/components/tableview/models/index.d.ts +0 -1
- package/lib/components/tableview/table/models/index.d.ts +0 -1
- package/lib/components/tableview/table/table.component.d.ts +0 -147
- /package/lib/components/{tableview → table}/models/table.event.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './table.event';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './table.interface';
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { AfterContentInit, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges, TemplateRef, Type } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import { FilterMetadata, SortMeta } from 'primeng/api';
|
|
5
|
-
import { Table, TableLazyLoadEvent } from 'primeng/table';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
import { MediusQueryResult } from '../../../api/models';
|
|
8
|
-
import { ITableDataProvider } from '../../../data-providers';
|
|
9
|
-
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
10
|
-
import { ColumnDescriptor, TableDescriptorInst } from '../../../descriptors/table';
|
|
11
|
-
import { MngComponentDirective, MngTemplateDirective } from '../../../directives';
|
|
12
|
-
import { IViewContainer } from '../../../models';
|
|
13
|
-
import { MngActionExecutorService, MngCommonsService, MngLocalStorageService, MngViewContainerComponentService } from '../../../services';
|
|
14
|
-
import { ActionInstance } from '../../action/models';
|
|
15
|
-
import { MngTableCellClickEvent, MngTableLoadEvent } from '../models';
|
|
16
|
-
import { ColumnWithPreferences } from './models';
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
export declare class MngTableComponent<T = any, S = any> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
19
|
-
private injector;
|
|
20
|
-
private router;
|
|
21
|
-
private route;
|
|
22
|
-
private translate;
|
|
23
|
-
private mngCommonsService;
|
|
24
|
-
private actionExecutor;
|
|
25
|
-
private viewContainerService;
|
|
26
|
-
private localStorageService;
|
|
27
|
-
readonly cmpTypeName = "MngTableComponent";
|
|
28
|
-
private readonly logger;
|
|
29
|
-
initialDescriptor: TableDescriptorInst<T>;
|
|
30
|
-
descriptor?: TableDescriptorInst<T>;
|
|
31
|
-
items?: Observable<Array<T>> | Array<T>;
|
|
32
|
-
queryResult?: Observable<MediusQueryResult<T>> | MediusQueryResult<T>;
|
|
33
|
-
loading?: Observable<boolean> | boolean;
|
|
34
|
-
dataProvider?: ITableDataProvider;
|
|
35
|
-
useQueryParams: boolean;
|
|
36
|
-
selectionMode: 'single' | 'multiple';
|
|
37
|
-
selectionEnabled: boolean;
|
|
38
|
-
actions: Array<ActionDescriptorInst<any>>;
|
|
39
|
-
isColumnClickable?: boolean;
|
|
40
|
-
viewContainerInit?: IViewContainer<T, S>;
|
|
41
|
-
captionComponent?: Type<any>;
|
|
42
|
-
columnActionComponent?: Type<any>;
|
|
43
|
-
columnActionMinWidth: number | null;
|
|
44
|
-
globalFilterFieldsInit?: string[];
|
|
45
|
-
loadEventEmitter: EventEmitter<MngTableLoadEvent>;
|
|
46
|
-
cellClickEventEmitter: EventEmitter<MngTableCellClickEvent<T>>;
|
|
47
|
-
selectionChangeEventEmitter: EventEmitter<T[]>;
|
|
48
|
-
captionCmpInstEventEmitter: EventEmitter<any>;
|
|
49
|
-
columnActionCmpInstEventEmitter: EventEmitter<any>;
|
|
50
|
-
templates: QueryList<MngTemplateDirective>;
|
|
51
|
-
components: QueryList<MngComponentDirective<any>>;
|
|
52
|
-
primeTable: Table;
|
|
53
|
-
captionTemplate?: TemplateRef<any>;
|
|
54
|
-
columnActionTemplate?: TemplateRef<any>;
|
|
55
|
-
footerTemplate?: TemplateRef<any>;
|
|
56
|
-
isLazy: boolean;
|
|
57
|
-
isPagination: boolean;
|
|
58
|
-
private useDataProvider;
|
|
59
|
-
private useQueryParamsInitializedSubject;
|
|
60
|
-
useQueryParamsInitialized$: Observable<boolean>;
|
|
61
|
-
queryResult$?: Observable<MediusQueryResult<T>>;
|
|
62
|
-
loading$?: Observable<boolean>;
|
|
63
|
-
dataProviderInfiniteScrollItems: Array<T>;
|
|
64
|
-
private itemsSubject;
|
|
65
|
-
private queryResultSubscription?;
|
|
66
|
-
rowsPerPageOptions: Array<number>;
|
|
67
|
-
rows: number;
|
|
68
|
-
offset: number;
|
|
69
|
-
multiSortMeta: SortMeta[] | null;
|
|
70
|
-
private filterMetadataSubject;
|
|
71
|
-
globalFilterFields: string[];
|
|
72
|
-
get filterMetadata(): {
|
|
73
|
-
[p: string]: FilterMetadata;
|
|
74
|
-
};
|
|
75
|
-
get filterMetadata$(): Observable<{
|
|
76
|
-
[p: string]: FilterMetadata;
|
|
77
|
-
}>;
|
|
78
|
-
infiniteScroll: boolean;
|
|
79
|
-
className: string;
|
|
80
|
-
tableFullHeightOffset: number | null;
|
|
81
|
-
rowHeight?: number;
|
|
82
|
-
selection: Array<T>;
|
|
83
|
-
private dataProviderService;
|
|
84
|
-
private dataProviderQueryResultSubject;
|
|
85
|
-
private dataProviderLoadingSubject;
|
|
86
|
-
private dataProviderLatestLazyLoadEvent?;
|
|
87
|
-
private dataProviderLatestLazyLoadEventVersion;
|
|
88
|
-
private dataProviderLatestQueryParam?;
|
|
89
|
-
private dataProviderLatestQueryParamVersion;
|
|
90
|
-
private dataProviderSubscription?;
|
|
91
|
-
hasColumnFilters: boolean;
|
|
92
|
-
private isFilterChanged;
|
|
93
|
-
private isSortChanged;
|
|
94
|
-
private filterDescriptors;
|
|
95
|
-
showInlineActionsColumn: boolean;
|
|
96
|
-
rowClickActions: ActionDescriptorInst<T>[];
|
|
97
|
-
rowInlineActions: ActionDescriptorInst<T>[];
|
|
98
|
-
private routerIsNavigationOutsideInProgress;
|
|
99
|
-
viewContainer?: IViewContainer<T, S>;
|
|
100
|
-
private subscriptions;
|
|
101
|
-
areColumnsReorderable: boolean;
|
|
102
|
-
areColumnsToggleable: boolean;
|
|
103
|
-
columns: ColumnWithPreferences[];
|
|
104
|
-
visibleColumns: ColumnWithPreferences[];
|
|
105
|
-
private layoutPreferences;
|
|
106
|
-
private localstorageKey;
|
|
107
|
-
constructor(injector: Injector, router: Router, route: ActivatedRoute, translate: TranslateService, mngCommonsService: MngCommonsService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S> | null, localStorageService: MngLocalStorageService);
|
|
108
|
-
ngOnInit(): void;
|
|
109
|
-
ngAfterContentInit(): void;
|
|
110
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
111
|
-
ngOnDestroy(): void;
|
|
112
|
-
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
113
|
-
onTableLazyLoad(event: TableLazyLoadEvent): void;
|
|
114
|
-
onTableSort(event: any): void;
|
|
115
|
-
onTableFilter(event: any): void;
|
|
116
|
-
onCellClick(event: Event, col: ColumnDescriptor<any, T>, item: T, idx: number): void;
|
|
117
|
-
onSelectionChange(event: Array<T>): void;
|
|
118
|
-
onCaptionCmpInst<C>(instance: C): void;
|
|
119
|
-
onColumnActionCmpInst<C>(instance: C): void;
|
|
120
|
-
onActionFinish(runResult: ActionInstance<T, S>): void;
|
|
121
|
-
/**
|
|
122
|
-
* Method is called on column resize
|
|
123
|
-
* @param element event's element
|
|
124
|
-
*/
|
|
125
|
-
onTableColumnResize({ element }: any): void;
|
|
126
|
-
private loadTableWithDataProvider;
|
|
127
|
-
private loadTableFromRouteUpdate;
|
|
128
|
-
private setMainAndRelatedDescriptors;
|
|
129
|
-
private updatePrimeSortAndFilter;
|
|
130
|
-
private createFilterMeta;
|
|
131
|
-
private createSortMeta;
|
|
132
|
-
private initializeDataLoadingTriggers;
|
|
133
|
-
private initializeViewContainer;
|
|
134
|
-
onColumnToggle(event: any): void;
|
|
135
|
-
/**
|
|
136
|
-
* Propagates the column move from the this.visibleColumns array to this.columns array
|
|
137
|
-
* @param event: MultiSelectChangeEvent
|
|
138
|
-
*/
|
|
139
|
-
onColumnReorder(event: any): void;
|
|
140
|
-
private saveLayoutPreferences;
|
|
141
|
-
/**
|
|
142
|
-
* Reset column order and column visibility to default settings
|
|
143
|
-
*/
|
|
144
|
-
resetDefaultLayout(): void;
|
|
145
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngTableComponent<any, any>, [null, null, null, null, null, null, { optional: true; }, null]>;
|
|
146
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngTableComponent<any, any>, "mng-table", never, { "initialDescriptor": { "alias": "descriptor"; "required": true; }; "items": { "alias": "items"; "required": false; }; "queryResult": { "alias": "queryResult"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "isColumnClickable": { "alias": "isColumnClickable"; "required": false; }; "viewContainerInit": { "alias": "viewContainer"; "required": false; }; "captionComponent": { "alias": "captionComponent"; "required": false; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; }; "columnActionMinWidth": { "alias": "columnActionMinWidth"; "required": false; }; "globalFilterFieldsInit": { "alias": "globalFilterFields"; "required": false; }; }, { "loadEventEmitter": "tableLoad"; "cellClickEventEmitter": "cellClick"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnActionCmpInstEventEmitter": "columnActionComponentInstance"; }, ["templates"], never, true, never>;
|
|
147
|
-
}
|
|
File without changes
|