@mediusinc/mng-commons 2.1.0 → 2.2.0
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/utils/medius-rest.util.mjs +4 -4
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +4 -10
- package/esm2020/lib/components/tableview/table/table.component.mjs +12 -14
- package/esm2020/lib/components/tableview/tableview.component.mjs +8 -11
- package/esm2020/lib/descriptors/action/action.descriptor.mjs +1 -6
- package/esm2020/lib/services/action-executor.service.mjs +35 -17
- package/esm2020/lib/services/providers/config-service.provider.mjs +1 -1
- package/esm2020/lib/utils/action-data-provider.util.mjs +16 -10
- package/fesm2015/mediusinc-mng-commons.mjs +75 -65
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +72 -62
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/utils/medius-rest.util.d.ts +1 -1
- package/lib/components/action/editor/action-editor.component.d.ts +1 -1
- package/lib/components/tableview/tableview.component.d.ts +1 -3
- package/lib/descriptors/action/action.descriptor.d.ts +1 -1
- package/lib/services/providers/config-service.provider.d.ts +1 -1
- package/lib/utils/action-data-provider.util.d.ts +6 -0
- package/package.json +1 -1
- package/scss/mng-overrides/_theme_input.scss +4 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
|
@@ -7,7 +7,7 @@ import { MediusFilterMatchType, MediusQueryParam, MediusQueryParamBuilder } from
|
|
|
7
7
|
export declare class MediusRestUtil {
|
|
8
8
|
private static readonly matchModeMapping;
|
|
9
9
|
static fromAngularQueryParamsToMediusQueryParams(params: Params, filterDescriptors: Array<FilterDescriptor<any>>, defaultItemsPerPage?: number, defaultOffset?: number): MediusQueryParam;
|
|
10
|
-
static fromPrimeLazyLoadEventToAngularQueryParams(event: LazyLoadEvent
|
|
10
|
+
static fromPrimeLazyLoadEventToAngularQueryParams(event: LazyLoadEvent): Params;
|
|
11
11
|
static modifyFilterProperties(mediusQueryParams: MediusQueryParam, filterDescriptors: Array<FilterDescriptor<any>>): void;
|
|
12
12
|
static fromPrimeLazyLoadEventToMediusQueryParams(event: LazyLoadEvent): MediusQueryParam;
|
|
13
13
|
static addMediusFilterFromPrimeFilterMetadata(queryParamBuilder: MediusQueryParamBuilder, property: string, filterMetadata: FilterMetadata): void;
|
|
@@ -60,7 +60,7 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
|
|
|
60
60
|
onSubmit(event: MngFormEditorSubmitEvent<T>): void;
|
|
61
61
|
cancel(): void;
|
|
62
62
|
triggerSubmit(): void;
|
|
63
|
-
private
|
|
63
|
+
private fetchItem;
|
|
64
64
|
private setTitle;
|
|
65
65
|
private deactivateAction;
|
|
66
66
|
private placeActionsOnPositions;
|
|
@@ -2,7 +2,6 @@ import { AfterContentInit, OnDestroy, OnInit, QueryList, TemplateRef } from '@an
|
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
5
|
-
import { DialogService } from 'primeng/dynamicdialog';
|
|
6
5
|
import { MediusQueryParam } from '../../api/models';
|
|
7
6
|
import { IDataProvider, ITableviewDataProvider } from '../../data-providers';
|
|
8
7
|
import { ActionDescriptor } from '../../descriptors/action';
|
|
@@ -17,7 +16,6 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, A
|
|
|
17
16
|
private route;
|
|
18
17
|
private messageService;
|
|
19
18
|
private translateService;
|
|
20
|
-
private dialogService;
|
|
21
19
|
private confirmationService;
|
|
22
20
|
private actionExecutor;
|
|
23
21
|
private viewContainerService;
|
|
@@ -34,7 +32,7 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, A
|
|
|
34
32
|
selectedItems: T[];
|
|
35
33
|
templates: QueryList<MngTemplateDirective>;
|
|
36
34
|
footerTemplate?: TemplateRef<any>;
|
|
37
|
-
constructor(route: ActivatedRoute, messageService: MessageService, translateService: TranslateService,
|
|
35
|
+
constructor(route: ActivatedRoute, messageService: MessageService, translateService: TranslateService, confirmationService: ConfirmationService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S>);
|
|
38
36
|
ngOnInit(): void;
|
|
39
37
|
ngAfterContentInit(): void;
|
|
40
38
|
ngOnDestroy(): void;
|
|
@@ -141,7 +141,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
|
141
141
|
get fetchNotificationSuccessMessage(): string | undefined;
|
|
142
142
|
get dataProvider(): IEditorDataProvider<T, any> | undefined;
|
|
143
143
|
get runFunction(): (ctx: ActionContext<T, unknown>) => Observable<T>;
|
|
144
|
-
get fetchFunction(): (ctx: ActionContext<T,
|
|
144
|
+
get fetchFunction(): ((ctx: ActionContext<T, any>) => Observable<T>) | undefined;
|
|
145
145
|
get submitFunction(): ((ctx: ActionContext<T, any>) => Observable<T>) | undefined;
|
|
146
146
|
get editorActions(): ActionDescriptor<T>[];
|
|
147
147
|
get editorComponent(): Type<any> | undefined;
|
|
@@ -2,5 +2,5 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { MngModuleConfig } from '../../models';
|
|
4
4
|
import { MngConfigurationService } from '../configuration.service';
|
|
5
|
-
export declare const mngConfigurationServiceProvider: (httpClient: HttpClient, moduleConfig
|
|
5
|
+
export declare const mngConfigurationServiceProvider: (httpClient: HttpClient, moduleConfig?: MngModuleConfig) => MngConfigurationService;
|
|
6
6
|
export declare function mngConfigJsonAppInitializerProvider(configService: MngConfigurationService, moduleConfig: MngModuleConfig): () => Observable<boolean>;
|
|
@@ -4,8 +4,14 @@ import { ActionContext } from '../components/action/models';
|
|
|
4
4
|
export declare class ActionDataProviderUtil {
|
|
5
5
|
static runGetAllOrFail<T, S>(ctx: ActionContext<T, S>): Observable<MediusQueryResult<T>>;
|
|
6
6
|
static runFetchOrFail<T, S>(ctx: ActionContext<T, S>): Observable<T>;
|
|
7
|
+
static runFetch<T, S>(ctx: ActionContext<T, S>): Observable<T> | null;
|
|
8
|
+
static runFetch<T, S>(ctx: ActionContext<T, S>, fallback: Observable<T | null | undefined>): Observable<T | null | undefined>;
|
|
7
9
|
static runCreateOrFail<T, S>(ctx: ActionContext<T, S>): Observable<T>;
|
|
10
|
+
static runCreate<T, S>(ctx: ActionContext<T, S>): Observable<T> | null;
|
|
11
|
+
static runCreate<T, S>(ctx: ActionContext<T, S>, fallback: Observable<T | null | undefined>): Observable<T | null | undefined>;
|
|
8
12
|
static runUpdateOrFail<T, S>(ctx: ActionContext<T, S>): Observable<T>;
|
|
13
|
+
static runUpdate<T, S>(ctx: ActionContext<T, S>): Observable<T> | null;
|
|
14
|
+
static runUpdate<T, S>(ctx: ActionContext<T, S>, fallback: Observable<T | null | undefined>): Observable<T | null | undefined>;
|
|
9
15
|
static runDeleteOrFail<T, S>(ctx: ActionContext<T, S>): Observable<T | null>;
|
|
10
16
|
static runGetAllService<T>(ctx: ActionContext<T, unknown>): Observable<MediusQueryResult<T>> | null;
|
|
11
17
|
static runGetByIdService<T>(ctx: ActionContext<T, unknown>): Observable<T> | null;
|
package/package.json
CHANGED