@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
package/index.d.ts
CHANGED
|
@@ -19,7 +19,12 @@ export * from './lib/registry/type.registry';
|
|
|
19
19
|
export * from './lib/api/models';
|
|
20
20
|
export * from './lib/components/action/models';
|
|
21
21
|
export * from './lib/components/form/models';
|
|
22
|
-
export * from './lib/components/tableview
|
|
22
|
+
export * from './lib/components/tableview';
|
|
23
|
+
export * from './lib/components/table/table.component';
|
|
24
|
+
export * from './lib/components/table/models/table.event';
|
|
25
|
+
export * from './lib/components/table/models/table.interface';
|
|
26
|
+
export * from './lib/components/table/column-filter-full/column-filter-full.component';
|
|
27
|
+
export * from './lib/components/table/column-value/column-value.component';
|
|
23
28
|
export * from './lib/components/form/formly/models';
|
|
24
29
|
export * from './lib/components/form/formly';
|
|
25
30
|
export * from './lib/data-providers';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AfterContentInit, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { MediusQueryResult } from '../../../api/models';
|
|
4
|
+
import { ITableDataProvider } from '../../../data-providers';
|
|
5
|
+
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
6
|
+
import { TableDescriptorInst } from '../../../descriptors/table';
|
|
7
|
+
import { MngComponentDirective, MngTemplateDirective } from '../../../directives';
|
|
8
|
+
import { IViewContainer } from '../../../models';
|
|
9
|
+
import { ActionInstance } from '../../action/models';
|
|
10
|
+
import { MngTableCellClickEvent, MngTableLoadEvent } from '../../table/models/table.event';
|
|
11
|
+
import { MngTableComponent } from '../../table/table.component';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
export declare class MngActionTableComponent<T = any, S = any> implements OnInit, OnChanges, AfterContentInit {
|
|
14
|
+
private readonly route;
|
|
15
|
+
private readonly actionExecutor;
|
|
16
|
+
private readonly viewContainerService;
|
|
17
|
+
descriptor: TableDescriptorInst<T>;
|
|
18
|
+
items?: Observable<Array<T>> | Array<T>;
|
|
19
|
+
queryResult?: Observable<MediusQueryResult<T>>;
|
|
20
|
+
loading?: Observable<boolean>;
|
|
21
|
+
dataProvider?: ITableDataProvider;
|
|
22
|
+
useQueryParams: boolean;
|
|
23
|
+
selectionMode: 'single' | 'multiple';
|
|
24
|
+
selectionEnabled: boolean;
|
|
25
|
+
globalFilterFields?: string[];
|
|
26
|
+
actions: Array<ActionDescriptorInst<any>>;
|
|
27
|
+
viewContainerInput?: IViewContainer<T, S>;
|
|
28
|
+
captionComponent?: Type<any>;
|
|
29
|
+
columnActionComponent?: Type<any>;
|
|
30
|
+
columnActionMinWidth?: number;
|
|
31
|
+
loadEventEmitter: EventEmitter<MngTableLoadEvent>;
|
|
32
|
+
selectionChangeEventEmitter: EventEmitter<T[]>;
|
|
33
|
+
captionCmpInstEventEmitter: EventEmitter<any>;
|
|
34
|
+
columnActionCmpInstEventEmitter: EventEmitter<any>;
|
|
35
|
+
templates: QueryList<MngTemplateDirective>;
|
|
36
|
+
components: QueryList<MngComponentDirective<any>>;
|
|
37
|
+
table: MngTableComponent;
|
|
38
|
+
captionTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
39
|
+
footerTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
40
|
+
rowClickActions: WritableSignal<ActionDescriptorInst<T>[]>;
|
|
41
|
+
rowInlineActions: WritableSignal<ActionDescriptorInst<T>[]>;
|
|
42
|
+
viewContainer: WritableSignal<IViewContainer<T, S> | undefined>;
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngAfterContentInit(): void;
|
|
45
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
46
|
+
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
47
|
+
onCellClick(event: MngTableCellClickEvent<T>): void;
|
|
48
|
+
onSelectionChange(items: Array<T>): void;
|
|
49
|
+
onActionFinish(runResult: ActionInstance<T, S>): void;
|
|
50
|
+
private initializeViewContainer;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionTableComponent<any, any>, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionTableComponent<any, any>, "mng-action-table", never, { "descriptor": { "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; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "viewContainerInput": { "alias": "viewContainer"; "required": false; }; "captionComponent": { "alias": "captionComponent"; "required": false; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; }; "columnActionMinWidth": { "alias": "columnActionMinWidth"; "required": false; }; }, { "loadEventEmitter": "tableLoad"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnActionCmpInstEventEmitter": "columnActionComponentInstance"; }, ["templates"], never, true, never>;
|
|
53
|
+
static ngAcceptInputType_queryResult: unknown;
|
|
54
|
+
static ngAcceptInputType_loading: unknown;
|
|
55
|
+
}
|
|
@@ -7,7 +7,7 @@ import { MediusQueryResult } from '../../../../../api/models';
|
|
|
7
7
|
import { FieldLookupDescriptor } from '../../../../../descriptors/editor';
|
|
8
8
|
import { FieldLookupConfig } from '../../../../../descriptors/interfaces';
|
|
9
9
|
import { IViewContainer } from '../../../../../models';
|
|
10
|
-
import { MngTableComponent } from '../../../../
|
|
10
|
+
import { MngTableComponent } from '../../../../table/table.component';
|
|
11
11
|
import { MngFormlyFieldConfig } from '../../models';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
export declare class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -4,7 +4,7 @@ import { Observable, Subject } from 'rxjs';
|
|
|
4
4
|
import { MediusQueryResult } from '../../../../../api/models';
|
|
5
5
|
import { FieldManyToManyEditorDescriptor } from '../../../../../descriptors/editor';
|
|
6
6
|
import { IViewContainer } from '../../../../../models';
|
|
7
|
-
import { MngTableComponent } from '../../../../
|
|
7
|
+
import { MngTableComponent } from '../../../../table/table.component';
|
|
8
8
|
import { MngFormlyFieldConfig } from '../../models';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -9,7 +9,6 @@ export declare class MngTopbarV2Component implements OnInit {
|
|
|
9
9
|
mainLayoutService: MngMainLayoutComponentV2Service;
|
|
10
10
|
private config;
|
|
11
11
|
menuButton: ElementRef;
|
|
12
|
-
topbarInjectionRef: ElementRef;
|
|
13
12
|
appSidebar: MngSidebarV2Component;
|
|
14
13
|
breadcrumbComponent: Type<any>;
|
|
15
14
|
topbarUserComponent: Type<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ElementRef, OnDestroy, OnInit, WritableSignal } from '@angular/core';
|
|
2
2
|
import { FilterMetadata, SelectItem } from 'primeng/api';
|
|
3
3
|
import { Nullable } from 'primeng/ts-helpers';
|
|
4
|
-
import { FilterDescriptor, FilterLookupDescriptor } from '
|
|
5
|
-
import { FilterLookupTypeEnum, FilterMatchModeEnum } from '
|
|
4
|
+
import { FilterDescriptor, FilterLookupDescriptor } from '../../../descriptors/filter';
|
|
5
|
+
import { FilterLookupTypeEnum, FilterMatchModeEnum } from '../../../descriptors/types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Cannot be on push change detection strategy because of filter updates triggered from route which causes to force update values in force metadata
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
3
|
import { MessageService } from 'primeng/api';
|
|
4
|
-
import { ColumnDescriptor } from '
|
|
5
|
-
import { ColumnDisplayTypeEnum } from '
|
|
6
|
-
import { JsonPathPipe, MngGetterPipe, MngTemplatePipe } from '
|
|
4
|
+
import { ColumnDescriptor } from '../../../descriptors/table';
|
|
5
|
+
import { ColumnDisplayTypeEnum } from '../../../descriptors/types';
|
|
6
|
+
import { JsonPathPipe, MngGetterPipe, MngTemplatePipe } from '../../../pipes';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class MngTableColumnValueComponent<T, TT> implements OnInit {
|
|
9
9
|
private elementRef;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ColumnDescriptor } from '
|
|
1
|
+
import { ColumnDescriptor } from '../../../descriptors/table';
|
|
2
2
|
export interface ColumnWithPreferences {
|
|
3
|
+
id: string;
|
|
3
4
|
descriptor: ColumnDescriptor<any, any>;
|
|
4
5
|
disabled: boolean;
|
|
5
6
|
isVisible: boolean;
|
|
6
7
|
width?: number;
|
|
8
|
+
orderIdx?: number;
|
|
7
9
|
}
|
|
8
10
|
export interface TableLayoutPreferences {
|
|
9
11
|
columnWidths?: Record<string, number>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { ColumnDescriptor } from '../../../descriptors/table/column.descriptor';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MngTableColumnFilterClassPipe implements PipeTransform {
|
|
5
|
+
transform(value: unknown, column: ColumnDescriptor<any, any>, isEnabled: boolean): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngTableColumnFilterClassPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MngTableColumnFilterClassPipe, "mngTableColumnFilterClass", true>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { AfterContentInit, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
2
|
+
import { FilterMetadata, SortMeta } from 'primeng/api';
|
|
3
|
+
import { MultiSelectChangeEvent } from 'primeng/multiselect';
|
|
4
|
+
import { Table, TableLazyLoadEvent } from 'primeng/table';
|
|
5
|
+
import { TableColumnReorderEvent } from 'primeng/table/table.interface';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { MediusQueryResult } from '../../api/models';
|
|
8
|
+
import { ITableDataProvider } from '../../data-providers';
|
|
9
|
+
import { ColumnDescriptor, TableDescriptorInst } from '../../descriptors/table';
|
|
10
|
+
import { MngComponentDirective, MngTemplateDirective } from '../../directives';
|
|
11
|
+
import { IViewContainer } from '../../models';
|
|
12
|
+
import { MngTableCellClickEvent, MngTableLoadEvent } from './models/table.event';
|
|
13
|
+
import { ColumnWithPreferences } from './models/table.interface';
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
15
|
+
export declare class MngTableComponent<T = any, S = any> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
16
|
+
readonly cmpTypeName = "MngTableComponent";
|
|
17
|
+
private readonly logger;
|
|
18
|
+
private readonly injector;
|
|
19
|
+
private readonly router;
|
|
20
|
+
private readonly route;
|
|
21
|
+
private readonly translate;
|
|
22
|
+
private readonly mngCommonsService;
|
|
23
|
+
private readonly localStorageService;
|
|
24
|
+
private readonly destroyRef;
|
|
25
|
+
private readonly viewContainerService;
|
|
26
|
+
descriptorInput: TableDescriptorInst<T>;
|
|
27
|
+
items?: Observable<Array<T>>;
|
|
28
|
+
queryResult?: Observable<MediusQueryResult<T>>;
|
|
29
|
+
loadingInput?: Observable<boolean>;
|
|
30
|
+
dataProvider?: ITableDataProvider;
|
|
31
|
+
useQueryParams: boolean;
|
|
32
|
+
selectionMode: 'single' | 'multiple';
|
|
33
|
+
selectionEnabled: boolean;
|
|
34
|
+
columnLastMinWidth?: number;
|
|
35
|
+
viewContainerInit?: IViewContainer<T, S>;
|
|
36
|
+
captionComponent?: Type<any>;
|
|
37
|
+
columnCustomLastComponent?: Type<any>;
|
|
38
|
+
globalFilterFieldsInput?: string[];
|
|
39
|
+
loadEventEmitter: EventEmitter<MngTableLoadEvent>;
|
|
40
|
+
cellClickEventEmitter: EventEmitter<MngTableCellClickEvent<T>>;
|
|
41
|
+
selectionChangeEventEmitter: EventEmitter<T[]>;
|
|
42
|
+
captionCmpInstEventEmitter: EventEmitter<any>;
|
|
43
|
+
columnCustomLastCmpInstEventEmitter: EventEmitter<any>;
|
|
44
|
+
templates: QueryList<MngTemplateDirective>;
|
|
45
|
+
components: QueryList<MngComponentDirective<any>>;
|
|
46
|
+
primeTable: Table;
|
|
47
|
+
captionTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
48
|
+
columnCustomLastTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
49
|
+
footerTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
50
|
+
private useDataProvider;
|
|
51
|
+
isLazy: WritableSignal<boolean>;
|
|
52
|
+
isPagination: WritableSignal<boolean>;
|
|
53
|
+
useQueryParamsInitialized: WritableSignal<boolean>;
|
|
54
|
+
data: WritableSignal<T[]>;
|
|
55
|
+
count: WritableSignal<number>;
|
|
56
|
+
loading: WritableSignal<boolean>;
|
|
57
|
+
rowsPerPageOptions: WritableSignal<number[]>;
|
|
58
|
+
rows: WritableSignal<number>;
|
|
59
|
+
offset: WritableSignal<number>;
|
|
60
|
+
sortMeta: WritableSignal<SortMeta[] | null>;
|
|
61
|
+
filterMeta: WritableSignal<Record<string, FilterMetadata>>;
|
|
62
|
+
globalFilterFields: WritableSignal<string[]>;
|
|
63
|
+
infiniteScroll: WritableSignal<boolean>;
|
|
64
|
+
className: WritableSignal<string>;
|
|
65
|
+
tableFullHeightOffset: WritableSignal<number | undefined>;
|
|
66
|
+
rowHeight: WritableSignal<number | undefined>;
|
|
67
|
+
private dataProviderService;
|
|
68
|
+
private dataProviderLatestLazyLoadEvent?;
|
|
69
|
+
private dataProviderLatestLazyLoadEventVersion;
|
|
70
|
+
private dataProviderLatestQueryParam?;
|
|
71
|
+
private dataProviderLatestQueryParamVersion;
|
|
72
|
+
private dataProviderSubscription?;
|
|
73
|
+
descriptor: WritableSignal<TableDescriptorInst<any>>;
|
|
74
|
+
columns: WritableSignal<ColumnWithPreferences[]>;
|
|
75
|
+
visibleColumns: import("@angular/core").Signal<ColumnWithPreferences[]>;
|
|
76
|
+
hasColumnFilters: import("@angular/core").Signal<boolean>;
|
|
77
|
+
private filterDescriptors;
|
|
78
|
+
private isFilterChanged;
|
|
79
|
+
private isSortChanged;
|
|
80
|
+
anyColumnVisible: import("@angular/core").Signal<boolean>;
|
|
81
|
+
hasCustomLastColumn: WritableSignal<boolean>;
|
|
82
|
+
hasLastColumn: import("@angular/core").Signal<boolean>;
|
|
83
|
+
areColumnsReorderable: import("@angular/core").Signal<boolean>;
|
|
84
|
+
areColumnsToggleable: import("@angular/core").Signal<boolean>;
|
|
85
|
+
private layoutPreferences;
|
|
86
|
+
private localstorageKey;
|
|
87
|
+
private routerIsNavigationOutsideInProgress;
|
|
88
|
+
private viewContainer?;
|
|
89
|
+
ngOnInit(): void;
|
|
90
|
+
ngAfterContentInit(): void;
|
|
91
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
92
|
+
ngOnDestroy(): void;
|
|
93
|
+
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
94
|
+
onTableLazyLoad(event: TableLazyLoadEvent): void;
|
|
95
|
+
onTableSort(event: any): void;
|
|
96
|
+
onTableFilter(event: any): void;
|
|
97
|
+
onCellClick(event: Event, col: ColumnDescriptor<any, T>, item: T, idx: number): void;
|
|
98
|
+
onSelectionChange(event: Array<T>): void;
|
|
99
|
+
/**
|
|
100
|
+
* Method is called on column resize
|
|
101
|
+
* @param element event's element
|
|
102
|
+
*/
|
|
103
|
+
onTableColumnResize({ element }: any): void;
|
|
104
|
+
private loadTableWithDataProvider;
|
|
105
|
+
private loadTableFromRouteUpdate;
|
|
106
|
+
private setMainAndRelatedDescriptors;
|
|
107
|
+
private updatePrimeSortAndFilter;
|
|
108
|
+
private createFilterMeta;
|
|
109
|
+
private createSortMeta;
|
|
110
|
+
private initializeDataLoadingTriggers;
|
|
111
|
+
private initializeViewContainer;
|
|
112
|
+
onColumnToggle(event: MultiSelectChangeEvent): void;
|
|
113
|
+
onColumnToggleAll(): void;
|
|
114
|
+
onColumnReorder(event: TableColumnReorderEvent): void;
|
|
115
|
+
private saveLayoutPreferences;
|
|
116
|
+
/**
|
|
117
|
+
* Reset column order and column visibility to default settings
|
|
118
|
+
*/
|
|
119
|
+
resetDefaultLayout(): void;
|
|
120
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngTableComponent<any, any>, never>;
|
|
121
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngTableComponent<any, any>, "mng-table", never, { "descriptorInput": { "alias": "descriptor"; "required": true; }; "items": { "alias": "items"; "required": false; }; "queryResult": { "alias": "queryResult"; "required": false; }; "loadingInput": { "alias": "loading"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; }; "columnLastMinWidth": { "alias": "columnLastMinWidth"; "required": false; }; "viewContainerInit": { "alias": "viewContainer"; "required": false; }; "captionComponent": { "alias": "captionComponent"; "required": false; }; "columnCustomLastComponent": { "alias": "columnCustomLastComponent"; "required": false; }; "globalFilterFieldsInput": { "alias": "globalFilterFields"; "required": false; }; }, { "loadEventEmitter": "tableLoad"; "cellClickEventEmitter": "cellClick"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnCustomLastCmpInstEventEmitter": "columnCustomLastComponentInstance"; }, ["templates"], never, true, never>;
|
|
122
|
+
static ngAcceptInputType_items: unknown;
|
|
123
|
+
static ngAcceptInputType_queryResult: unknown;
|
|
124
|
+
static ngAcceptInputType_loadingInput: unknown;
|
|
125
|
+
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export * from './tableview.component';
|
|
2
2
|
export * from './route/tableview-route.abstract.component';
|
|
3
3
|
export * from './route/tableview-route.component';
|
|
4
|
-
export * from './table/table.component';
|
|
5
|
-
export * from './table/column-filter-full/column-filter-full.component';
|
|
6
|
-
export * from './table/column-value/column-value.component';
|
|
@@ -7,8 +7,8 @@ import { TableviewDescriptorInst } from '../../descriptors/tableview';
|
|
|
7
7
|
import { MngTemplateDirective } from '../../directives';
|
|
8
8
|
import { IViewContainer } from '../../models';
|
|
9
9
|
import { MngViewContainerComponentService } from '../../services';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { MngActionTableComponent } from '../action';
|
|
11
|
+
import { MngTableLoadEvent } from '../table/models/table.event';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, AfterContentInit, IViewContainer<T, S> {
|
|
14
14
|
private messageService;
|
|
@@ -16,7 +16,7 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, A
|
|
|
16
16
|
descriptor: TableviewDescriptorInst<T>;
|
|
17
17
|
dataProvider?: ITableviewDataProvider<T, S>;
|
|
18
18
|
actions: Array<ActionDescriptorInst<any>>;
|
|
19
|
-
tableComponent?:
|
|
19
|
+
tableComponent?: MngActionTableComponent<T, S>;
|
|
20
20
|
tableActions: ActionDescriptorInst<T>[];
|
|
21
21
|
toolbarLeftActions: ActionDescriptorInst<T>[];
|
|
22
22
|
toolbarRightActions: ActionDescriptorInst<T>[];
|
|
@@ -251,7 +251,7 @@ export declare class EditorDescriptorInst<EditorModel> implements IEditorDescrip
|
|
|
251
251
|
}
|
|
252
252
|
export declare class EditorDescriptor extends EditorDescriptorInst<any> {
|
|
253
253
|
protected constructor();
|
|
254
|
-
static create<EditorModel>(idProperty
|
|
254
|
+
static create<EditorModel>(idProperty?: keyof EditorModel, titleProperty?: keyof EditorModel, i18nBaseKey?: string | ClassType<unknown>, tableviewEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
255
255
|
static fromClass<EditorModel>(type: ClassType<EditorModel>, idProperty?: keyof EditorModel, titleProperty?: keyof EditorModel, i18nBaseKey?: ClassType<unknown> | string, tableviewEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
256
256
|
static fromModel<EditorModel>(model: ModelDescriptor<EditorModel>, tableviewEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
257
257
|
/**
|
|
@@ -10,11 +10,12 @@ import { ITableDescriptorInternal } from './internal/table.model';
|
|
|
10
10
|
export declare class TableDescriptorInst<TableModel> implements ITableDescriptorInternal<TableModel>, IColumnsManageInterface<TableModel> {
|
|
11
11
|
private readonly _model;
|
|
12
12
|
protected readonly _autoGenerated: boolean;
|
|
13
|
+
private _identifier?;
|
|
13
14
|
private _trackProperty?;
|
|
14
15
|
private _filterDisplay;
|
|
15
16
|
private _paginationMode?;
|
|
16
|
-
private _rowsPerPageOptions
|
|
17
|
-
private _defaultNumRows
|
|
17
|
+
private _rowsPerPageOptions?;
|
|
18
|
+
private _defaultNumRows?;
|
|
18
19
|
protected _columns: Array<ColumnDescriptor<any, TableModel>>;
|
|
19
20
|
private _title?;
|
|
20
21
|
private _hideHeader;
|
|
@@ -23,27 +24,28 @@ export declare class TableDescriptorInst<TableModel> implements ITableDescriptor
|
|
|
23
24
|
private _hasDefaultSort;
|
|
24
25
|
private _defaultSortProperty;
|
|
25
26
|
private _defaultSortAsc;
|
|
26
|
-
private _className;
|
|
27
|
-
private _size;
|
|
28
|
-
private _tableFullHeightOffset?;
|
|
29
|
-
private _rowHeight?;
|
|
30
27
|
private _hasHover;
|
|
31
28
|
private _hasGridlines;
|
|
32
29
|
private _hasResizableColumns;
|
|
33
|
-
private _columnResizeMode
|
|
30
|
+
private _columnResizeMode?;
|
|
34
31
|
private _selectionColumnFrozen?;
|
|
35
32
|
private _actionColumnFrozen?;
|
|
33
|
+
private _size;
|
|
34
|
+
private _className;
|
|
36
35
|
private _headerClassName?;
|
|
37
36
|
private _rowClassName?;
|
|
38
37
|
private _rowClassNameMapFn?;
|
|
38
|
+
private _tableFullHeightOffset?;
|
|
39
|
+
private _rowHeight?;
|
|
39
40
|
private _isLocalized;
|
|
40
41
|
private _localizationLocaleProperty?;
|
|
41
42
|
protected constructor(model: ModelDescriptor<TableModel>, autoGenerated?: boolean);
|
|
43
|
+
get identifier(): string | undefined;
|
|
42
44
|
get trackProperty(): string | undefined;
|
|
43
45
|
get filterDisplay(): TableFilterDisplayEnum;
|
|
44
46
|
get paginationMode(): TablePaginationModeEnum | undefined;
|
|
45
|
-
get rowsPerPageOptions(): number[];
|
|
46
|
-
get defaultNumRows(): number;
|
|
47
|
+
get rowsPerPageOptions(): number[] | undefined;
|
|
48
|
+
get defaultNumRows(): number | undefined;
|
|
47
49
|
get columns(): ColumnDescriptor<any, TableModel, any, string>[];
|
|
48
50
|
get title(): string | undefined;
|
|
49
51
|
get hideHeader(): boolean;
|
|
@@ -60,7 +62,7 @@ export declare class TableDescriptorInst<TableModel> implements ITableDescriptor
|
|
|
60
62
|
get hasHover(): boolean;
|
|
61
63
|
get hasGridlines(): boolean;
|
|
62
64
|
get hasResizableColumns(): boolean;
|
|
63
|
-
get columnResizeMode(): "fit" | "expand";
|
|
65
|
+
get columnResizeMode(): "fit" | "expand" | undefined;
|
|
64
66
|
get rowClassName(): string | undefined;
|
|
65
67
|
get rowClassNameMapFn(): ((className?: string | undefined, item?: TableModel | undefined) => string) | undefined;
|
|
66
68
|
get selectionColumnFrozen(): boolean | undefined;
|
|
@@ -71,8 +73,9 @@ export declare class TableDescriptorInst<TableModel> implements ITableDescriptor
|
|
|
71
73
|
/**
|
|
72
74
|
* Track property is used for the purpose of combined saving user preferences in localstorage if 2 tables have the same track properties they will share the same localstorage entry.
|
|
73
75
|
* Similarly, this property can also be used to differentiate two tables of the same model on the same url (so that they have separate entries in localstorage).
|
|
74
|
-
* @param
|
|
76
|
+
* @param identifier
|
|
75
77
|
*/
|
|
78
|
+
withIdentifier(identifier: string): this;
|
|
76
79
|
withTrackProperty(property?: keyof TableModel): this;
|
|
77
80
|
withTrackPropertyUnsafe(property?: string): this;
|
|
78
81
|
getColumn(property: keyof TableModel): ColumnDescriptor<any, TableModel, any, string> | null;
|
|
@@ -162,7 +165,7 @@ export declare class TableDescriptorInst<TableModel> implements ITableDescriptor
|
|
|
162
165
|
}
|
|
163
166
|
export declare class TableDescriptor extends TableDescriptorInst<any> {
|
|
164
167
|
protected constructor();
|
|
165
|
-
static create<TableModel>(idProperty
|
|
168
|
+
static create<TableModel>(idProperty?: keyof TableModel, titleProperty?: keyof TableModel, i18nBaseKey?: string | ClassType<unknown>): TableDescriptorInst<TableModel>;
|
|
166
169
|
static fromClass<TableModel>(type: ClassType<TableModel>, idProperty?: keyof TableModel, titleProperty?: keyof TableModel, i18nBaseKey?: ClassType<unknown> | string, isAutoGenerated?: boolean): TableDescriptorInst<TableModel>;
|
|
167
170
|
static fromModel<TableModel>(model: ModelDescriptor<TableModel>): TableDescriptorInst<TableModel>;
|
|
168
171
|
/**
|
|
@@ -115,7 +115,7 @@ export declare class TableviewDescriptorInst<TableviewModel> implements ITablevi
|
|
|
115
115
|
}
|
|
116
116
|
export declare class TableviewDescriptor extends TableviewDescriptorInst<any> {
|
|
117
117
|
protected constructor();
|
|
118
|
-
static create<TableviewModel>(idProperty
|
|
118
|
+
static create<TableviewModel>(idProperty?: keyof TableviewModel, titleProperty?: keyof TableviewModel, i18nBaseKey?: string | ClassType<unknown>): TableviewDescriptorInst<TableviewModel>;
|
|
119
119
|
static fromClass<TableviewModel>(type: ClassType<TableviewModel>, idProperty?: keyof TableviewModel, titleProperty?: keyof TableviewModel, i18nBaseKey?: ClassType<unknown> | string): TableviewDescriptorInst<TableviewModel>;
|
|
120
120
|
static fromModel<TableviewModel>(model: ModelDescriptor<TableviewModel>): TableviewDescriptorInst<TableviewModel>;
|
|
121
121
|
/**
|
package/package.json
CHANGED
|
@@ -9,28 +9,35 @@
|
|
|
9
9
|
|
|
10
10
|
.p-datatable-thead > tr > th,
|
|
11
11
|
.p-datatable-tbody > tr > td {
|
|
12
|
-
|
|
13
|
-
&.mng-column-filter-0 {
|
|
12
|
+
&.mng-column-filter-string {
|
|
14
13
|
min-width: 135px;
|
|
15
14
|
}
|
|
16
15
|
// number
|
|
17
|
-
&.mng-column-filter-
|
|
16
|
+
&.mng-column-filter-number {
|
|
18
17
|
min-width: 165px;
|
|
19
18
|
}
|
|
20
19
|
// date
|
|
21
|
-
&.mng-column-filter-
|
|
20
|
+
&.mng-column-filter-date {
|
|
22
21
|
min-width: 170px;
|
|
23
22
|
}
|
|
24
23
|
// boolean
|
|
25
|
-
&.mng-column-filter-
|
|
24
|
+
&.mng-column-filter-boolean {
|
|
26
25
|
min-width: 80px;
|
|
27
26
|
}
|
|
28
27
|
// lookup, lookup enum
|
|
29
|
-
&.mng-column-filter-
|
|
30
|
-
&.mng-column-filter-
|
|
28
|
+
&.mng-column-filter-lookup,
|
|
29
|
+
&.mng-column-filter-lookupenum {
|
|
31
30
|
min-width: 180px;
|
|
32
31
|
}
|
|
33
32
|
|
|
33
|
+
.mng-column-filter-string-input {
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mng-column-filter-number-input {
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
&:hover {
|
|
35
42
|
mng-table-column-value .help-buttons {
|
|
36
43
|
display: block;
|
|
@@ -52,10 +59,17 @@
|
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
61
|
|
|
62
|
+
.p-datatable-thead > tr > th {
|
|
63
|
+
&.column-custom-last {
|
|
64
|
+
padding-top: 0.1rem;
|
|
65
|
+
padding-bottom: 0.1rem;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
55
69
|
.p-datatable-tbody > tr > td {
|
|
56
70
|
position: relative;
|
|
57
71
|
|
|
58
|
-
&.column-
|
|
72
|
+
&.column-custom-last {
|
|
59
73
|
padding-top: 0.1rem;
|
|
60
74
|
padding-bottom: 0.1rem;
|
|
61
75
|
}
|
|
@@ -77,14 +91,14 @@
|
|
|
77
91
|
//}
|
|
78
92
|
|
|
79
93
|
&.p-datatable-lg .p-datatable-tbody > tr > td {
|
|
80
|
-
&.column-
|
|
94
|
+
&.column-custom-last {
|
|
81
95
|
padding-top: 0.15rem;
|
|
82
96
|
padding-bottom: 0.15rem;
|
|
83
97
|
}
|
|
84
98
|
}
|
|
85
99
|
|
|
86
100
|
&.p-datatable-sm .p-datatable-tbody > tr > td {
|
|
87
|
-
&.column-
|
|
101
|
+
&.column-custom-last {
|
|
88
102
|
padding-top: 0.05rem;
|
|
89
103
|
padding-bottom: 0.05rem;
|
|
90
104
|
}
|
|
@@ -10,27 +10,35 @@
|
|
|
10
10
|
.p-datatable-thead > tr > th,
|
|
11
11
|
.p-datatable-tbody > tr > td {
|
|
12
12
|
// string
|
|
13
|
-
&.mng-column-filter-
|
|
13
|
+
&.mng-column-filter-string {
|
|
14
14
|
min-width: 135px;
|
|
15
15
|
}
|
|
16
16
|
// number
|
|
17
|
-
&.mng-column-filter-
|
|
17
|
+
&.mng-column-filter-number {
|
|
18
18
|
min-width: 165px;
|
|
19
19
|
}
|
|
20
20
|
// date
|
|
21
|
-
&.mng-column-filter-
|
|
21
|
+
&.mng-column-filter-date {
|
|
22
22
|
min-width: 170px;
|
|
23
23
|
}
|
|
24
24
|
// boolean
|
|
25
|
-
&.mng-column-filter-
|
|
25
|
+
&.mng-column-filter-boolean {
|
|
26
26
|
min-width: 80px;
|
|
27
27
|
}
|
|
28
28
|
// lookup, lookup enum
|
|
29
|
-
&.mng-column-filter-
|
|
30
|
-
&.mng-column-filter-
|
|
29
|
+
&.mng-column-filter-lookup,
|
|
30
|
+
&.mng-column-filter-lookupenum {
|
|
31
31
|
min-width: 180px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.mng-column-filter-string-input {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mng-column-filter-number-input {
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
34
42
|
&:hover {
|
|
35
43
|
mng-table-column-value .help-buttons {
|
|
36
44
|
display: block;
|
|
@@ -52,10 +60,17 @@
|
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
|
|
63
|
+
.p-datatable-thead > tr > th {
|
|
64
|
+
&.column-custom-last {
|
|
65
|
+
padding-top: 0.1rem;
|
|
66
|
+
padding-bottom: 0.1rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
55
70
|
.p-datatable-tbody > tr > td {
|
|
56
71
|
position: relative;
|
|
57
72
|
|
|
58
|
-
&.column-
|
|
73
|
+
&.column-custom-last {
|
|
59
74
|
padding-top: 0.1rem;
|
|
60
75
|
padding-bottom: 0.1rem;
|
|
61
76
|
}
|
|
@@ -77,14 +92,14 @@
|
|
|
77
92
|
//}
|
|
78
93
|
|
|
79
94
|
&.p-datatable-lg .p-datatable-tbody > tr > td {
|
|
80
|
-
&.column-
|
|
95
|
+
&.column-custom-last {
|
|
81
96
|
padding-top: 0.15rem;
|
|
82
97
|
padding-bottom: 0.15rem;
|
|
83
98
|
}
|
|
84
99
|
}
|
|
85
100
|
|
|
86
101
|
&.p-datatable-sm .p-datatable-tbody > tr > td {
|
|
87
|
-
&.column-
|
|
102
|
+
&.column-custom-last {
|
|
88
103
|
padding-top: 0.05rem;
|
|
89
104
|
padding-bottom: 0.05rem;
|
|
90
105
|
}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
+
$blue: #2196f3 !default;
|
|
2
|
+
$green: #4caf50 !default;
|
|
3
|
+
$yellow: #fbc02d !default;
|
|
4
|
+
$cyan: #00bcd4 !default;
|
|
5
|
+
$pink: #e91e63 !default;
|
|
6
|
+
$indigo: #3f51b5 !default;
|
|
7
|
+
$teal: #009688 !default;
|
|
8
|
+
$orange: #f57c00 !default;
|
|
9
|
+
$bluegray: #607d8b !default;
|
|
10
|
+
$purple: #9c27b0 !default;
|
|
11
|
+
$red: #ff3d32 !default;
|
|
12
|
+
|
|
1
13
|
$colors: (
|
|
2
|
-
'blue':
|
|
3
|
-
'green':
|
|
4
|
-
'yellow':
|
|
5
|
-
'cyan':
|
|
6
|
-
'pink':
|
|
7
|
-
'indigo':
|
|
8
|
-
'teal':
|
|
9
|
-
'orange':
|
|
10
|
-
'bluegray':
|
|
11
|
-
'purple':
|
|
12
|
-
'red':
|
|
14
|
+
'blue': $blue,
|
|
15
|
+
'green': $green,
|
|
16
|
+
'yellow': $yellow,
|
|
17
|
+
'cyan': $cyan,
|
|
18
|
+
'pink': $pink,
|
|
19
|
+
'indigo': $indigo,
|
|
20
|
+
'teal': $teal,
|
|
21
|
+
'orange': $orange,
|
|
22
|
+
'bluegray': $bluegray,
|
|
23
|
+
'purple': $purple,
|
|
24
|
+
'red': $red,
|
|
13
25
|
'primary': $primaryColor
|
|
14
|
-
);
|
|
26
|
+
) !default;
|
|
15
27
|
|
|
16
28
|
//shades
|
|
17
29
|
$shade000: #ffffff !default; //text color
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
$primaryColor: #0f8bfd;
|
|
1
|
+
$primaryColor: #0f8bfd !default;
|
|
2
2
|
$primaryLightColor: scale-color($primaryColor, $lightness: 60%) !default;
|
|
3
3
|
$primaryDarkColor: scale-color($primaryColor, $lightness: -10%) !default;
|
|
4
4
|
$primaryDarkerColor: scale-color($primaryColor, $lightness: -20%) !default;
|
|
5
|
-
$primaryTextColor: #ffffff;
|
|
5
|
+
$primaryTextColor: #ffffff !default;
|
|
6
6
|
$primary500: #0f8bfd !default;
|
|
7
7
|
|
|
8
|
-
$highlightBg: $primaryColor;
|
|
9
|
-
$highlightTextColor: $primaryTextColor;
|
|
8
|
+
$highlightBg: $primaryColor !default;
|
|
9
|
+
$highlightTextColor: $primaryTextColor !default;
|
|
10
10
|
|
|
11
11
|
@import '../_variables';
|
|
12
12
|
@import '../../theme-base/_components';
|