@mediusinc/mng-commons 0.14.1 → 0.14.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/esm2020/lib/api/models/query-result.model.mjs +7 -1
- package/esm2020/lib/components/form/date-range/date-range.component.mjs +5 -2
- package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/table.component.mjs +18 -4
- package/esm2020/lib/components/tableview/tableview.component.mjs +17 -4
- package/esm2020/lib/descriptors/action.descriptor.mjs +1 -1
- package/esm2020/lib/descriptors/filter.descriptor.mjs +7 -3
- package/fesm2015/mediusinc-mng-commons.mjs +50 -11
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +49 -10
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/query-result.model.d.ts +1 -0
- package/lib/components/tableview/table/table.component.d.ts +2 -0
- package/lib/components/tableview/tableview.component.d.ts +7 -3
- package/lib/descriptors/action.descriptor.d.ts +3 -3
- package/package.json +1 -1
- package/templates/tableview-route.component.html +1 -1
- package/version-info.json +5 -5
|
@@ -14,6 +14,7 @@ export declare class MediusQueryResult<T> implements IMediusQueryResult<T> {
|
|
|
14
14
|
allDataCount?: number;
|
|
15
15
|
pageData?: Array<T>;
|
|
16
16
|
static discriminator?: string;
|
|
17
|
+
static fromArray<T>(pageData: T[], allDataCount?: number): MediusQueryResult<unknown>;
|
|
17
18
|
static attributeTypeMap: Array<AttributeDef>;
|
|
18
19
|
static getAttributeTypeMap(): AttributeDef[];
|
|
19
20
|
}
|
|
@@ -48,6 +48,7 @@ export declare class MngTableComponent<T, S> implements OnInit, OnChanges, After
|
|
|
48
48
|
primeTable: Table;
|
|
49
49
|
captionTemplate?: TemplateRef<any>;
|
|
50
50
|
columnActionTemplate?: TemplateRef<any>;
|
|
51
|
+
footerTemplate?: TemplateRef<any>;
|
|
51
52
|
useDataProvider: boolean;
|
|
52
53
|
private useQueryParamsInitializedSubejct;
|
|
53
54
|
useQueryParamsInitialized$: Observable<boolean>;
|
|
@@ -55,6 +56,7 @@ export declare class MngTableComponent<T, S> implements OnInit, OnChanges, After
|
|
|
55
56
|
loading$?: Observable<boolean>;
|
|
56
57
|
dataProviderInfiniteScrollItems: Array<T>;
|
|
57
58
|
private itemsSubject;
|
|
59
|
+
private queryResultSubscription?;
|
|
58
60
|
rowsPerPageOptions: Array<number>;
|
|
59
61
|
rows: number;
|
|
60
62
|
offset: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
@@ -6,12 +6,13 @@ import { DialogService } from 'primeng/dynamicdialog';
|
|
|
6
6
|
import { MediusQueryParam } from '../../api/models';
|
|
7
7
|
import { IDataProvider, ITableviewDataProvider } from '../../data-providers';
|
|
8
8
|
import { ActionDescriptor, TableviewDescriptor } from '../../descriptors';
|
|
9
|
+
import { MngTemplateDirective } from '../../directives';
|
|
9
10
|
import { IViewContainer } from '../../models';
|
|
10
11
|
import { MngActionExecutorService, MngViewContainerComponentService } from '../../services';
|
|
11
12
|
import { MngTableLoadEvent } from './models';
|
|
12
13
|
import { MngTableComponent } from './table/table.component';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
|
-
export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, IViewContainer<T, S> {
|
|
15
|
+
export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, AfterContentInit, IViewContainer<T, S> {
|
|
15
16
|
private route;
|
|
16
17
|
private messageService;
|
|
17
18
|
private translateService;
|
|
@@ -31,8 +32,11 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, I
|
|
|
31
32
|
private subscriptions;
|
|
32
33
|
hasItemSelectionAction: boolean;
|
|
33
34
|
selectedItems: T[];
|
|
35
|
+
templates: QueryList<MngTemplateDirective>;
|
|
36
|
+
footerTemplate?: TemplateRef<any>;
|
|
34
37
|
constructor(route: ActivatedRoute, messageService: MessageService, translateService: TranslateService, dialogService: DialogService, confirmationService: ConfirmationService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S>);
|
|
35
38
|
ngOnInit(): void;
|
|
39
|
+
ngAfterContentInit(): void;
|
|
36
40
|
ngOnDestroy(): void;
|
|
37
41
|
getMessageService(): MessageService;
|
|
38
42
|
getDataProvider(): IDataProvider<T, S> | undefined;
|
|
@@ -40,5 +44,5 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, I
|
|
|
40
44
|
onTableLoad(event: MngTableLoadEvent): void;
|
|
41
45
|
selectionChange(selectedItems: Array<T>): void;
|
|
42
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngTableviewComponent<any, any>, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngTableviewComponent<any, any>, "mng-tableview", never, { "descriptor": "descriptor"; "dataProvider": "dataProvider"; "actions": "actions"; }, {},
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngTableviewComponent<any, any>, "mng-tableview", never, { "descriptor": "descriptor"; "dataProvider": "dataProvider"; "actions": "actions"; }, {}, ["templates"], never, false>;
|
|
44
48
|
}
|
|
@@ -12,7 +12,7 @@ export declare class ActionDescriptor<T> {
|
|
|
12
12
|
protected readonly _model: ModelDescriptor<T> | null;
|
|
13
13
|
protected readonly _actionName: string;
|
|
14
14
|
protected readonly _actionNameLong: string;
|
|
15
|
-
protected readonly _parentType?: ClassType<
|
|
15
|
+
protected readonly _parentType?: ClassType<unknown>;
|
|
16
16
|
protected readonly _parentTypeName?: string;
|
|
17
17
|
protected readonly _parentProperty?: string;
|
|
18
18
|
protected readonly _i18nModelActionBaseKey?: string;
|
|
@@ -39,7 +39,7 @@ export declare class ActionDescriptor<T> {
|
|
|
39
39
|
protected _permissionsRouteType?: string;
|
|
40
40
|
protected _buttonDescriptor: ButtonDescriptor;
|
|
41
41
|
protected _hasItemsSelection: boolean;
|
|
42
|
-
constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<
|
|
42
|
+
constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<unknown>, parentProperty?: string);
|
|
43
43
|
get model(): ModelDescriptor<T> | null;
|
|
44
44
|
get parentTypeName(): string | undefined;
|
|
45
45
|
get parentProperty(): string | undefined;
|
|
@@ -112,7 +112,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
|
112
112
|
protected _fetchFunction?: (ctx: ActionContext<T, any>) => Observable<T>;
|
|
113
113
|
protected _submitFunction?: (ctx: ActionContext<T, any>) => Observable<T>;
|
|
114
114
|
protected _editorComponent?: Type<any>;
|
|
115
|
-
constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<
|
|
115
|
+
constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<unknown>, parentProperty?: string);
|
|
116
116
|
get editorTitle(): string | null | undefined;
|
|
117
117
|
get editorDescriptor(): EditorDescriptor<T>;
|
|
118
118
|
get dialogSize(): ActionEditorDialogSizeEnum;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="grid">
|
|
2
2
|
<div class="col-12">
|
|
3
|
-
<mng-tableview [descriptor]="descriptor" [dataProvider]="dataProvider" [actions]="actions"
|
|
3
|
+
<mng-tableview [descriptor]="descriptor" [dataProvider]="dataProvider" [actions]="actions"> </mng-tableview>
|
|
4
4
|
</div>
|
|
5
5
|
</div>
|
package/version-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "0.14.
|
|
4
|
-
"tag": "v0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
|
+
"tag": "v0.14.2",
|
|
5
5
|
"distance": 0,
|
|
6
|
-
"hash": "
|
|
6
|
+
"hash": "5b158061",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"semver": "0.14.
|
|
9
|
-
"raw": "v0.14.
|
|
8
|
+
"semver": "0.14.2",
|
|
9
|
+
"raw": "v0.14.2-5b158061"
|
|
10
10
|
}
|