@mediusinc/mng-commons 0.19.2 → 0.19.3
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/components/action/action.component.mjs +12 -5
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +14 -5
- package/esm2020/lib/components/action/models/action-execution.model.mjs +5 -1
- package/esm2020/lib/components/action/route/action-route.component.mjs +7 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +1 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +1 -1
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +38 -5
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
- package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
- package/esm2020/lib/components/tableview/tableview.component.mjs +3 -3
- package/esm2020/lib/descriptors/field-validation.descriptor.mjs +5 -1
- package/esm2020/lib/descriptors/field.descriptor.mjs +5 -3
- package/esm2020/lib/models/view-container.model.mjs +1 -1
- package/esm2020/lib/router/tableview-route-builder.mjs +4 -1
- package/esm2020/lib/services/action-executor.service.mjs +23 -19
- package/esm2020/lib/services/view-container.component.service.mjs +8 -1
- package/fesm2015/mediusinc-mng-commons.mjs +122 -42
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +115 -37
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/action/action.component.d.ts +6 -3
- package/lib/components/action/editor/action-editor.component.d.ts +2 -0
- package/lib/components/action/models/action-execution.model.d.ts +2 -0
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +5 -3
- package/lib/descriptors/field-validation.descriptor.d.ts +1 -0
- package/lib/models/view-container.model.d.ts +5 -0
- package/lib/services/view-container.component.service.d.ts +4 -1
- package/package.json +1 -1
- package/version-info.json +5 -5
|
@@ -13,7 +13,7 @@ import { IdType } from '../../types';
|
|
|
13
13
|
import { ActionData, ActionInstance, IActionConfirmationService } from './models';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDestroy, IActionConfirmationService {
|
|
16
|
-
private
|
|
16
|
+
private routeService;
|
|
17
17
|
private translate;
|
|
18
18
|
private authorization;
|
|
19
19
|
private actionExecutor;
|
|
@@ -27,6 +27,8 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
|
|
|
27
27
|
actionData?: ActionData;
|
|
28
28
|
queryParam?: MediusQueryParam;
|
|
29
29
|
dataProvider?: IDataProvider<T, S>;
|
|
30
|
+
hostComponent?: unknown;
|
|
31
|
+
routeInit?: ActivatedRoute;
|
|
30
32
|
inputDisabled: Observable<boolean>;
|
|
31
33
|
inputLoading: Observable<boolean>;
|
|
32
34
|
viewContainerInit?: IViewContainer<T, S>;
|
|
@@ -54,9 +56,10 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
|
|
|
54
56
|
actionLink?: ActionLinkDescriptor<T>;
|
|
55
57
|
hasNoTitle: boolean;
|
|
56
58
|
private subscriptions;
|
|
59
|
+
route: ActivatedRoute;
|
|
57
60
|
private routePermissions?;
|
|
58
61
|
buttonClass: string;
|
|
59
|
-
constructor(
|
|
62
|
+
constructor(routeService: ActivatedRoute, translate: TranslateService, authorization: MngAuthorizationService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
|
|
60
63
|
ngOnInit(): void;
|
|
61
64
|
ngOnChanges(changes: SimpleChanges): void;
|
|
62
65
|
ngOnDestroy(): void;
|
|
@@ -65,5 +68,5 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
|
|
|
65
68
|
getConfirmationServiceInstanceKey(action: ActionDescriptor<any>): string;
|
|
66
69
|
private processSubscriptions;
|
|
67
70
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, [null, null, null, null, null, { optional: true; }]>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; "queryParam": "queryParam"; "dataProvider": "dataProvider"; "inputDisabled": "disabled"; "inputLoading": "loading"; "viewContainerInit": "viewContainer"; "selectedItems": "selectedItems"; }, { "finishEventEmitter": "finish"; }, never, never, false>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; "queryParam": "queryParam"; "dataProvider": "dataProvider"; "hostComponent": "hostComponent"; "routeInit": "route"; "inputDisabled": "disabled"; "inputLoading": "loading"; "viewContainerInit": "viewContainer"; "selectedItems": "selectedItems"; }, { "finishEventEmitter": "finish"; }, never, never, false>;
|
|
69
72
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, Injector, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute } from '@angular/router';
|
|
2
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
4
5
|
import { Observable } from 'rxjs';
|
|
@@ -46,6 +47,7 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
|
|
|
46
47
|
submitLoading$: Observable<boolean>;
|
|
47
48
|
private isFinished;
|
|
48
49
|
viewContainer?: IViewContainer<T, S>;
|
|
50
|
+
dialogRoute?: ActivatedRoute;
|
|
49
51
|
private sourceComponent;
|
|
50
52
|
private subscriptions;
|
|
51
53
|
constructor(injector: Injector, translate: TranslateService, actionExecutor: MngActionExecutorService, mngCommonsService: MngCommonsService, navigationService: MngNavigationService, dialogRef: DynamicDialogRef | null, dialogConfig: DynamicDialogConfig | null, viewContainerService: MngViewContainerComponentService<T, S> | null);
|
|
@@ -96,6 +96,7 @@ export declare class ActionParameters<T> {
|
|
|
96
96
|
queryParam?: MediusQueryParam;
|
|
97
97
|
viewContainer?: IViewContainer<T, unknown>;
|
|
98
98
|
sourceComponent?: any;
|
|
99
|
+
hostComponent?: unknown;
|
|
99
100
|
route?: ActivatedRoute;
|
|
100
101
|
selectedItems: T[];
|
|
101
102
|
constructor(itemId?: IdType | undefined, item?: T | undefined);
|
|
@@ -103,6 +104,7 @@ export declare class ActionParameters<T> {
|
|
|
103
104
|
withQueryParam(queryParam?: MediusQueryParam): this;
|
|
104
105
|
withViewContainer<S>(viewContainer?: IViewContainer<T, S>): this;
|
|
105
106
|
withSourceComponent(sourceComponent?: any): this;
|
|
107
|
+
withHostComponent(hostComponent?: unknown): this;
|
|
106
108
|
withRoute(route?: ActivatedRoute): this;
|
|
107
109
|
withSelectedItems(selectedItems: T[]): this;
|
|
108
110
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { ITableviewDataProvider } from '../../../data-providers';
|
|
4
|
-
import { ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, EditorDescriptor, ModelDescriptor, TableviewDescriptor } from '../../../descriptors';
|
|
4
|
+
import { ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionLinkDescriptor, EditorDescriptor, ModelDescriptor, TableviewDescriptor } from '../../../descriptors';
|
|
5
5
|
import { MngRouterData } from '../../../router/models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare abstract class AMngTableviewRouteComponent<T, S> implements OnInit {
|
|
@@ -18,9 +18,11 @@ export declare abstract class AMngTableviewRouteComponent<T, S> implements OnIni
|
|
|
18
18
|
protected createActionDescriptorForDetails(descriptor?: EditorDescriptor<T>): ActionEditorDetailsDescriptor<T> | null;
|
|
19
19
|
protected createActionDescriptorForAdd(descriptor?: EditorDescriptor<T>): ActionEditorAddDescriptor<T> | null;
|
|
20
20
|
protected createActionDescriptorForEdit(descriptor?: EditorDescriptor<T>): ActionEditorEditDescriptor<T> | null;
|
|
21
|
+
protected createActionDescriptorForDetailsEditLink(descriptor?: ModelDescriptor<T>): ActionLinkDescriptor<T> | null;
|
|
22
|
+
protected createActionDescriptorForDetailsDelete(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
|
|
21
23
|
protected createActionDescriptorForDelete(descriptor?: ModelDescriptor<T>): ActionDeleteDescriptor<T> | null;
|
|
22
|
-
protected createActionDescriptorForExport(descriptor?: ModelDescriptor<T>): ActionDescriptor<T
|
|
23
|
-
protected createActionDescriptorForRefresh(descriptor?: ModelDescriptor<T>): ActionDescriptor<T
|
|
24
|
+
protected createActionDescriptorForExport(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
|
|
25
|
+
protected createActionDescriptorForRefresh(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
|
|
24
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<AMngTableviewRouteComponent<any, any>, never>;
|
|
25
27
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AMngTableviewRouteComponent<any, any>, never, never, {}, {}, never, never, false>;
|
|
26
28
|
}
|
|
@@ -15,6 +15,8 @@ export interface IViewContainerTable<T, S> extends IViewContainer<T, S> {
|
|
|
15
15
|
export interface IViewContainerEditor<T, S> extends IViewContainer<T, S> {
|
|
16
16
|
getEditorReset$(): Observable<ViewContainerEditorResetEvent<T>>;
|
|
17
17
|
resetEditor(event?: ViewContainerEditorResetEvent<T>): void;
|
|
18
|
+
getEditorClose$(): Observable<ViewContainerEditorCloseEvent<T>>;
|
|
19
|
+
closeEditor(event?: ViewContainerEditorCloseEvent<T>): void;
|
|
18
20
|
}
|
|
19
21
|
export interface ViewContainerTableReloadEvent {
|
|
20
22
|
emitEvent?: boolean;
|
|
@@ -35,3 +37,6 @@ export interface ViewContainerEditorResetEvent<T> {
|
|
|
35
37
|
[key: string]: any;
|
|
36
38
|
};
|
|
37
39
|
}
|
|
40
|
+
export interface ViewContainerEditorCloseEvent<T> {
|
|
41
|
+
emitEvent?: boolean;
|
|
42
|
+
}
|
|
@@ -2,7 +2,7 @@ import { MessageService } from 'primeng/api';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IDataProvider } from '../data-providers';
|
|
4
4
|
import { ActionDescriptor } from '../descriptors';
|
|
5
|
-
import { IViewContainerEditor, IViewContainerTable, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
|
|
5
|
+
import { IViewContainerEditor, IViewContainerTable, ViewContainerEditorCloseEvent, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Should be used with providers defined within component.
|
|
@@ -13,6 +13,7 @@ export declare class MngViewContainerComponentService<T, S> implements IViewCont
|
|
|
13
13
|
private actions;
|
|
14
14
|
private _tableReloadSubject;
|
|
15
15
|
private _editorResetSubject;
|
|
16
|
+
private _editorCloseSubject;
|
|
16
17
|
constructor(messageService: MessageService);
|
|
17
18
|
set dataProvider(dataProvider: IDataProvider<T, S>);
|
|
18
19
|
getMessageService(): MessageService;
|
|
@@ -23,6 +24,8 @@ export declare class MngViewContainerComponentService<T, S> implements IViewCont
|
|
|
23
24
|
reloadTable(event?: ViewContainerTableReloadEvent): void;
|
|
24
25
|
getEditorReset$(): Observable<ViewContainerEditorResetEvent<T>>;
|
|
25
26
|
resetEditor(event?: ViewContainerEditorResetEvent<T> | undefined): void;
|
|
27
|
+
getEditorClose$(): Observable<ViewContainerEditorCloseEvent<T>>;
|
|
28
|
+
closeEditor(event?: ViewContainerEditorCloseEvent<T>): void;
|
|
26
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngViewContainerComponentService<any, any>, never>;
|
|
27
30
|
static ɵprov: i0.ɵɵInjectableDeclaration<MngViewContainerComponentService<any, any>>;
|
|
28
31
|
}
|
package/package.json
CHANGED
package/version-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "0.19.
|
|
4
|
-
"tag": "v0.19.
|
|
3
|
+
"version": "0.19.3",
|
|
4
|
+
"tag": "v0.19.3",
|
|
5
5
|
"distance": 0,
|
|
6
|
-
"hash": "
|
|
6
|
+
"hash": "9a1520ab",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"semver": "0.19.
|
|
9
|
-
"raw": "v0.19.
|
|
8
|
+
"semver": "0.19.3",
|
|
9
|
+
"raw": "v0.19.3-9a1520ab"
|
|
10
10
|
}
|