@mediusinc/mng-commons 0.2.23 → 0.3.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.
Files changed (56) hide show
  1. package/esm2020/lib/api/models/filter-param.model.mjs +1 -2
  2. package/esm2020/lib/api/models/mappers.mjs +2 -6
  3. package/esm2020/lib/api/models/query-mode.model.mjs +1 -2
  4. package/esm2020/lib/api/models/query-param.model.mjs +1 -2
  5. package/esm2020/lib/api/models/query-result.model.mjs +6 -34
  6. package/esm2020/lib/api/services/api.abstract.service.mjs +34 -0
  7. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +15 -32
  8. package/esm2020/lib/api/services/get-all-api.abstract.service.mjs +23 -0
  9. package/esm2020/lib/api/services/index.mjs +3 -1
  10. package/esm2020/lib/components/action/action.component.mjs +29 -7
  11. package/esm2020/lib/components/action/editor/action-editor.component.mjs +9 -8
  12. package/esm2020/lib/components/action/models/action-execution.model.mjs +1 -1
  13. package/esm2020/lib/components/form/editor/form-editor.component.mjs +3 -3
  14. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +4 -6
  15. package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +30 -9
  16. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
  17. package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
  18. package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
  19. package/esm2020/lib/descriptors/action.descriptor.mjs +87 -4
  20. package/esm2020/lib/descriptors/editor.descriptor.mjs +11 -12
  21. package/esm2020/lib/descriptors/table.descriptor.mjs +4 -1
  22. package/esm2020/lib/descriptors/tableview.descriptor.mjs +5 -5
  23. package/esm2020/lib/mng-commons.module.mjs +6 -2
  24. package/esm2020/lib/models/error.model.mjs +1 -1
  25. package/esm2020/lib/pipes/enum.pipe.mjs +4 -1
  26. package/esm2020/lib/pipes/index.mjs +2 -1
  27. package/esm2020/lib/pipes/link-formatter.pipe.mjs +39 -0
  28. package/esm2020/lib/services/action-executor.service.mjs +36 -41
  29. package/esm2020/lib/utils/index.mjs +2 -2
  30. package/esm2020/lib/utils/notification.util.mjs +47 -0
  31. package/fesm2015/mediusinc-mng-commons.mjs +417 -246
  32. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  33. package/fesm2020/mediusinc-mng-commons.mjs +413 -244
  34. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  35. package/lib/api/models/query-result.model.d.ts +4 -17
  36. package/lib/api/services/api.abstract.service.d.ts +19 -0
  37. package/lib/api/services/crud-api.abstract.service.d.ts +3 -11
  38. package/lib/api/services/get-all-api.abstract.service.d.ts +11 -0
  39. package/lib/api/services/index.d.ts +2 -0
  40. package/lib/components/action/action.component.d.ts +12 -1
  41. package/lib/components/action/models/action-execution.model.d.ts +2 -0
  42. package/lib/components/tableview/route/tableview-route.component.d.ts +4 -1
  43. package/lib/descriptors/action.descriptor.d.ts +35 -1
  44. package/lib/descriptors/editor.descriptor.d.ts +4 -6
  45. package/lib/descriptors/tableview.descriptor.d.ts +2 -2
  46. package/lib/mng-commons.module.d.ts +69 -68
  47. package/lib/models/error.model.d.ts +2 -0
  48. package/lib/pipes/index.d.ts +1 -0
  49. package/lib/pipes/link-formatter.pipe.d.ts +11 -0
  50. package/lib/services/action-executor.service.d.ts +5 -3
  51. package/lib/utils/index.d.ts +1 -1
  52. package/lib/utils/{toast.util.d.ts → notification.util.d.ts} +7 -10
  53. package/package.json +1 -1
  54. package/scss/mng-overrides/_theme_button.scss +4 -0
  55. package/{assets/templates → templates}/tableview-route.component.html +0 -0
  56. package/esm2020/lib/utils/toast.util.mjs +0 -44
@@ -10,27 +10,14 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { AttributeDef } from './serialization.model';
13
- export declare class MediusQueryResultBase {
14
- 'selectInTwoSteps'?: boolean;
15
- 'allDataCount'?: number;
16
- static discriminator: string | undefined;
17
- static attributeTypeMap: Array<AttributeDef>;
18
- }
19
- export declare class MediusQueryResultWithObject extends MediusQueryResultBase {
20
- 'pageData'?: Array<object>;
21
- static discriminator: string | undefined;
22
- static attributeTypeMap: Array<AttributeDef>;
23
- static getAttributeTypeMap(): AttributeDef[];
24
- }
25
- export declare class MediusQueryResult<T> extends MediusQueryResultBase implements IMediusQueryResult<T> {
26
- 'pageData'?: Array<T>;
27
- static discriminator: string | undefined;
28
- static attributeTypeMapBase: Array<AttributeDef>;
13
+ export declare class MediusQueryResult<T> implements IMediusQueryResult<T> {
14
+ allDataCount?: number;
15
+ pageData?: Array<T>;
16
+ static discriminator?: string;
29
17
  static attributeTypeMap: Array<AttributeDef>;
30
18
  static getAttributeTypeMap(): AttributeDef[];
31
19
  }
32
20
  export interface IMediusQueryResult<T> {
33
- selectInTwoSteps?: boolean;
34
21
  allDataCount?: number;
35
22
  pageData?: Array<T>;
36
23
  }
@@ -0,0 +1,19 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ClassType } from '../../types';
3
+ import { MediusQueryParam } from '../models';
4
+ import { ObjectSerializer } from '../utils';
5
+ export declare abstract class AMngApiService<T> {
6
+ protected type: ClassType<T>;
7
+ protected http: HttpClient;
8
+ protected readonly objectSerializer: ObjectSerializer;
9
+ protected constructor(type: ClassType<T>, http: HttpClient);
10
+ protected abstract getBasePath(): string;
11
+ protected abstract getServiceBasePath(): string;
12
+ protected getUrl(...pathSegments: Array<string>): string;
13
+ protected deserialize(item: any): T;
14
+ protected serialize(item: T): any;
15
+ protected serializeQueryParam(queryParam: MediusQueryParam, type?: string): any;
16
+ protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR;
17
+ protected deserializeClass<C>(item: any, type: ClassType<C>): C;
18
+ protected serializeClass<C>(item: C, type: ClassType<C>): any;
19
+ }
@@ -1,22 +1,14 @@
1
1
  import { HttpClient, HttpParams } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { ClassType } from '../../types';
4
- import { MediusQueryParam, MediusQueryResult } from '../models';
5
- import { ObjectSerializer } from '../utils';
6
- export declare abstract class AMngCrudApiService<T, QRT extends MediusQueryResult<T>> {
7
- protected type: ClassType<T>;
8
- protected queryResultType: ClassType<QRT>;
9
- protected http: HttpClient;
10
- protected readonly objectSerializer: ObjectSerializer;
4
+ import { MediusQueryResult } from '../models';
5
+ import { AMngGetAllApiService } from './get-all-api.abstract.service';
6
+ export declare abstract class AMngCrudApiService<T, QRT extends MediusQueryResult<any>> extends AMngGetAllApiService<T, QRT> {
11
7
  protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>, http: HttpClient);
12
8
  createPost(item: T, params?: HttpParams): Observable<T>;
13
- getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams): Observable<QRT>;
14
9
  getByIdGet(id: any, params?: HttpParams): Observable<T>;
15
10
  updatePut(id: any, item: T, params?: HttpParams): Observable<T>;
16
11
  removeDelete(id: any, item?: T, params?: HttpParams): Observable<any>;
17
- protected abstract getBasePath(): string;
18
- protected abstract getServiceBasePath(): string;
19
- protected getGetAllPostPath(): string;
20
12
  protected getCreatePostPath(): string;
21
13
  protected getUpdatePutPath(id: any, item: T): string;
22
14
  protected getGetByIdGetPath(id: any): string;
@@ -0,0 +1,11 @@
1
+ import { HttpClient, HttpParams } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ClassType } from '../../types';
4
+ import { MediusQueryParam, MediusQueryResult } from '../models';
5
+ import { AMngApiService } from './api.abstract.service';
6
+ export declare abstract class AMngGetAllApiService<T, QRT extends MediusQueryResult<any>> extends AMngApiService<T> {
7
+ protected queryResultType: ClassType<QRT>;
8
+ protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>, http: HttpClient);
9
+ getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams): Observable<QRT>;
10
+ protected getGetAllPostPath(): string;
11
+ }
@@ -1 +1,3 @@
1
+ export * from './api.abstract.service';
1
2
  export * from './crud-api.abstract.service';
3
+ export * from './get-all-api.abstract.service';
@@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
4
4
  import { ConfirmationService } from 'primeng/api';
5
5
  import { Observable } from 'rxjs';
6
6
  import { IDataProvider } from '../../data-providers';
7
- import { ActionDescriptor } from '../../descriptors';
7
+ import { ActionDescriptor, ActionLevelEnum, ActionLinkDescriptor } from '../../descriptors';
8
8
  import { IViewContainer } from '../../models';
9
9
  import { MngActionExecutorService, MngViewContainerComponentService } from '../../services';
10
10
  import { IdType } from '../../types';
@@ -16,6 +16,15 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
16
16
  private actionExecutor;
17
17
  private confirmationService;
18
18
  private viewContainerService;
19
+ readonly levelDefault = ActionLevelEnum.Default;
20
+ readonly levelPrimary = ActionLevelEnum.Primary;
21
+ readonly levelSecondary = ActionLevelEnum.Secondary;
22
+ readonly levelInfo = ActionLevelEnum.Info;
23
+ readonly levelHelp = ActionLevelEnum.Help;
24
+ readonly levelSuccess = ActionLevelEnum.Success;
25
+ readonly levelWarning = ActionLevelEnum.Warning;
26
+ readonly levelDanger = ActionLevelEnum.Danger;
27
+ hostClass: string;
19
28
  action: ActionDescriptor<T>;
20
29
  item?: T;
21
30
  itemId?: IdType;
@@ -33,6 +42,8 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
33
42
  $label: Observable<string | null>;
34
43
  $tooltip: Observable<string | null>;
35
44
  private viewContainer?;
45
+ actionLink?: ActionLinkDescriptor<T>;
46
+ hasNoTitle: boolean;
36
47
  constructor(route: ActivatedRoute, translate: TranslateService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
37
48
  ngOnInit(): void;
38
49
  triggerAction(event: Event): void;
@@ -1,3 +1,4 @@
1
+ import { Message } from 'primeng/api';
1
2
  import { DynamicDialogRef } from 'primeng/dynamicdialog';
2
3
  import { Observable } from 'rxjs';
3
4
  import { IDataProvider } from '../../../data-providers';
@@ -29,6 +30,7 @@ export declare class ActionRunResult<T, S, DP extends IDataProvider<T, S>> {
29
30
  readonly context?: ActionExecContext<T, S, DP> | undefined;
30
31
  readonly result?: T | undefined;
31
32
  readonly error?: ActionError | undefined;
33
+ notification?: Message;
32
34
  constructor(context?: ActionExecContext<T, S, DP> | undefined, result?: T | undefined, error?: ActionError | undefined);
33
35
  }
34
36
  export declare class ActionActivationResult<T, S, DP extends IDataProvider<T, S>> {
@@ -6,10 +6,13 @@ import { AMngTableviewRouteComponent } from './tableview-route.abstract.componen
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class MngTableviewRouteComponent<T, S> extends AMngTableviewRouteComponent<T, S> implements OnInit {
8
8
  private route;
9
+ descriptorInit?: TableviewDescriptor<T>;
10
+ dataProviderInit?: ITableviewDataProvider<T, S>;
11
+ actionsInit?: Array<ActionDescriptor<T>>;
9
12
  constructor(route: ActivatedRoute);
10
13
  protected createTableviewDescriptor(): TableviewDescriptor<T>;
11
14
  protected createTableviewDataProvider(): ITableviewDataProvider<T, S>;
12
15
  protected createActionDescriptors(): Array<ActionDescriptor<T>>;
13
16
  static ɵfac: i0.ɵɵFactoryDeclaration<MngTableviewRouteComponent<any, any>, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<MngTableviewRouteComponent<any, any>, "mng-tableview-route", never, {}, {}, never, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<MngTableviewRouteComponent<any, any>, "mng-tableview-route", never, { "descriptorInit": "descriptor"; "dataProviderInit": "dataProvider"; "actionsInit": "actions"; }, {}, never, never>;
15
18
  }
@@ -1,4 +1,5 @@
1
1
  import { Type } from '@angular/core';
2
+ import { Params, QueryParamsHandling } from '@angular/router';
2
3
  import { Observable } from 'rxjs';
3
4
  import { ActionExecContext } from '../components/action/models';
4
5
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
@@ -18,9 +19,12 @@ export declare class ActionDescriptor<T> {
18
19
  protected _routeUrl: string | null;
19
20
  protected _title?: string | null;
20
21
  protected _icon?: string | null;
22
+ protected _tooltip?: string | null;
21
23
  protected _className: string;
22
24
  protected _size: ActionDescriptor.SizeEnum;
23
- protected _tooltip?: string | null;
25
+ protected _isStyleText: boolean;
26
+ protected _isStyleOutlined: boolean;
27
+ protected _isStyleRaised: boolean;
24
28
  protected _dataProvider?: IDataProvider<T, any>;
25
29
  protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined>;
26
30
  protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
@@ -57,6 +61,9 @@ export declare class ActionDescriptor<T> {
57
61
  get isEnabledFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
58
62
  get actionName(): string;
59
63
  get className(): string;
64
+ get isStyleText(): boolean;
65
+ get isStyleOutlined(): boolean;
66
+ get isStyleRaised(): boolean;
60
67
  get size(): ActionDescriptor.SizeEnum;
61
68
  get isSizeExtraSmall(): boolean;
62
69
  get isSizeSmall(): boolean;
@@ -94,6 +101,7 @@ export declare class ActionDescriptor<T> {
94
101
  withTooltip(tooltip: string | null): this;
95
102
  withClassName(className: string): this;
96
103
  withSize(size?: ActionDescriptor.SizeEnum): this;
104
+ withStyle(styleText?: boolean, styleOutlined?: boolean, styleRaised?: boolean): this;
97
105
  withPosition(position: ActionPositionEnum): this;
98
106
  withRunConfirmation(icon?: string, title?: string, message?: string, acceptTitle?: string, rejectTitle?: string): this;
99
107
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): void;
@@ -115,6 +123,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
115
123
  protected _hasFetchNotificationSuccess: boolean;
116
124
  protected _fetchNotificationSuccessTitle?: string;
117
125
  protected _fetchNotificationSuccessMessage?: string;
126
+ protected _dialogClassName: string;
118
127
  protected _dataProvider?: IEditorDataProvider<T, any>;
119
128
  protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
120
129
  protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
@@ -122,6 +131,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
122
131
  constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
123
132
  get editorTitle(): string | null | undefined;
124
133
  get editorDescriptor(): EditorDescriptor<T>;
134
+ get dialogClassName(): string;
125
135
  get hasFetchNotificationSuccess(): boolean;
126
136
  get fetchNotificationSuccessTitle(): string | undefined;
127
137
  get fetchNotificationSuccessMessage(): string | undefined;
@@ -134,6 +144,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
134
144
  withEditorTitle(title: string | null): this;
135
145
  withDataProvider(dataProvider: IEditorDataProvider<T, any>): this;
136
146
  withServiceType<S>(serviceType: Type<S>): this;
147
+ withDialogClassName(className: string): this;
137
148
  withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
138
149
  withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
139
150
  withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
@@ -174,6 +185,29 @@ export declare class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {
174
185
  withServiceType<S>(serviceType: Type<S>): this;
175
186
  withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this;
176
187
  }
188
+ export declare class ActionLinkDescriptor<T> extends ActionDescriptor<T> {
189
+ private _url;
190
+ private _pathSegments;
191
+ private _queryParams?;
192
+ private _queryParamsHandling?;
193
+ private _replaceUrl;
194
+ private _target;
195
+ private _isStyleLink;
196
+ constructor(model: ModelDescriptor<T>);
197
+ get url(): string;
198
+ get pathSegments(): string[];
199
+ get queryParams(): Params | undefined;
200
+ get queryParamsHandling(): QueryParamsHandling | undefined;
201
+ get replaceUrl(): boolean;
202
+ get target(): string;
203
+ get isStyleLink(): boolean;
204
+ withHref(url: string): this;
205
+ withRouterLink(...pathSegments: string[]): this;
206
+ withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this;
207
+ withReplaceUrl(replaceUrl?: boolean): this;
208
+ withTarget(target?: '_self' | '_blank'): this;
209
+ withStyleLink(isStyleLink: boolean): this;
210
+ }
177
211
  export declare enum ActionPositionEnum {
178
212
  ToolbarLeft = 0,
179
213
  ToolbarRight = 1,
@@ -33,8 +33,8 @@ export declare class EditorDescriptor<T> {
33
33
  getField(property: string): AFieldDescriptor<any, T> | null;
34
34
  addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
35
35
  addFieldLookupEnum(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<T>;
36
- addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
37
- addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
36
+ addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
37
+ addFieldManyToManyEditor<FT>(property: string, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
38
38
  withDisabled(disabled?: boolean): this;
39
39
  addValidator(name: string, expression: (control: AbstractControl) => boolean): void;
40
40
  copy(): EditorDescriptor<T>;
@@ -239,7 +239,6 @@ export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor
239
239
  copy(): FieldLookupEnumDescriptor<ET>;
240
240
  }
241
241
  export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
242
- private readonly _model;
243
242
  private readonly _mainTableDescriptor;
244
243
  private readonly _lookupTableDescriptor;
245
244
  private _fieldType;
@@ -248,7 +247,7 @@ export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescri
248
247
  private _hasLookupExcludeValues;
249
248
  private _excludeFilterProperty;
250
249
  private _excludeValueProperty;
251
- constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, mainTableDescriptor: TableDescriptor<T>, lookupTableDescriptor: TableDescriptor<T>);
250
+ constructor(editor: EditorDescriptor<ET>, property: string, mainTableDescriptor: TableDescriptor<T>, lookupTableDescriptor: TableDescriptor<T>);
252
251
  get fieldType(): FieldManyToManyEditorDescriptor.TypeEnum;
253
252
  get lookupTableDataProvider(): ITableDataProvider<T, any> | null;
254
253
  get actions(): FieldManyToManyEditorDescriptor.ActionEnum[];
@@ -273,12 +272,11 @@ export declare namespace FieldManyToManyEditorDescriptor {
273
272
  }
274
273
  }
275
274
  export declare class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
276
- private readonly _modelType;
277
275
  private readonly _tableviewDescriptor;
278
276
  private _fieldType;
279
277
  private _fieldActions;
280
278
  private _actions;
281
- constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, tableviewDescriptor: TableviewDescriptor<T>);
279
+ constructor(editor: EditorDescriptor<ET>, property: string, tableviewDescriptor: TableviewDescriptor<T>);
282
280
  get fieldType(): FieldManyEditorDescriptor.TypeEnum;
283
281
  get fieldActions(): FieldManyEditorDescriptor.ActionEnum[];
284
282
  get actions(): ActionDescriptor<T>[];
@@ -34,7 +34,7 @@ export declare class TableviewDescriptor<T> {
34
34
  addField(property: string): FieldInputDescriptor<T>;
35
35
  addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
36
36
  addFieldLookupEnum(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<T>;
37
- addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
38
- addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
37
+ addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
38
+ addFieldManyToManyEditor<FT>(property: string, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
39
39
  copy(): TableviewDescriptor<T>;
40
40
  }
@@ -8,77 +8,78 @@ import * as i3 from "./pipes/property-path.pipe";
8
8
  import * as i4 from "./pipes/enum.pipe";
9
9
  import * as i5 from "./pipes/boolean.pipe";
10
10
  import * as i6 from "./pipes/i18n-property.pipe";
11
- import * as i7 from "./components/layout/breadcrumb.component";
12
- import * as i8 from "./components/layout/footer.component";
13
- import * as i9 from "./components/layout/main-layout.component";
14
- import * as i10 from "./components/layout/menu.component";
15
- import * as i11 from "./components/layout/menu-item.component";
16
- import * as i12 from "./components/layout/topbar.component";
17
- import * as i13 from "./components/form/autocomplete/autocomplete.component";
18
- import * as i14 from "./components/form/dropdown/dropdown.component";
19
- import * as i15 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
20
- import * as i16 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
21
- import * as i17 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
22
- import * as i18 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
23
- import * as i19 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
24
- import * as i20 from "./components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component";
25
- import * as i21 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
26
- import * as i22 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
27
- import * as i23 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
28
- import * as i24 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
29
- import * as i25 from "./components/tableview/table/table.component";
30
- import * as i26 from "./components/tableview/tableview.component";
31
- import * as i27 from "./components/tableview/table/column-value/column-value.component";
32
- import * as i28 from "./components/tableview/table/column-filter/column-filter.component";
33
- import * as i29 from "./components/tableview/route/tableview-route.component";
34
- import * as i30 from "./components/form/editor/form-editor.component";
35
- import * as i31 from "./components/action/action.component";
36
- import * as i32 from "./components/action/editor/action-editor.component";
37
- import * as i33 from "./components/action/route/action-route.component";
38
- import * as i34 from "@angular/common";
39
- import * as i35 from "@angular/router";
40
- import * as i36 from "@angular/common/http";
41
- import * as i37 from "@angular/forms";
42
- import * as i38 from "@ngx-translate/core";
43
- import * as i39 from "@ngx-formly/core";
44
- import * as i40 from "primeng/autocomplete";
45
- import * as i41 from "primeng/breadcrumb";
46
- import * as i42 from "primeng/button";
47
- import * as i43 from "primeng/calendar";
48
- import * as i44 from "primeng/card";
49
- import * as i45 from "primeng/checkbox";
50
- import * as i46 from "primeng/chip";
51
- import * as i47 from "primeng/confirmdialog";
52
- import * as i48 from "primeng/confirmpopup";
53
- import * as i49 from "primeng/dialog";
54
- import * as i50 from "primeng/dynamicdialog";
55
- import * as i51 from "primeng/dropdown";
56
- import * as i52 from "primeng/fileupload";
57
- import * as i53 from "primeng/inputnumber";
58
- import * as i54 from "primeng/inputmask";
59
- import * as i55 from "primeng/inputswitch";
60
- import * as i56 from "primeng/inputtext";
61
- import * as i57 from "primeng/inputtextarea";
62
- import * as i58 from "primeng/paginator";
63
- import * as i59 from "primeng/radiobutton";
64
- import * as i60 from "primeng/ripple";
65
- import * as i61 from "primeng/selectbutton";
66
- import * as i62 from "primeng/table";
67
- import * as i63 from "primeng/tag";
68
- import * as i64 from "primeng/toast";
69
- import * as i65 from "primeng/togglebutton";
70
- import * as i66 from "primeng/toolbar";
71
- import * as i67 from "primeng/tooltip";
72
- import * as i68 from "primeng/messages";
73
- import * as i69 from "primeng/progressspinner";
74
- import * as i70 from "primeng/tabview";
75
- import * as i71 from "primeng/fieldset";
76
- import * as i72 from "primeng/multiselect";
77
- import * as i73 from "primeng/skeleton";
11
+ import * as i7 from "./pipes/link-formatter.pipe";
12
+ import * as i8 from "./components/layout/breadcrumb.component";
13
+ import * as i9 from "./components/layout/footer.component";
14
+ import * as i10 from "./components/layout/main-layout.component";
15
+ import * as i11 from "./components/layout/menu.component";
16
+ import * as i12 from "./components/layout/menu-item.component";
17
+ import * as i13 from "./components/layout/topbar.component";
18
+ import * as i14 from "./components/form/autocomplete/autocomplete.component";
19
+ import * as i15 from "./components/form/dropdown/dropdown.component";
20
+ import * as i16 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
21
+ import * as i17 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
22
+ import * as i18 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
23
+ import * as i19 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
24
+ import * as i20 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
25
+ import * as i21 from "./components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component";
26
+ import * as i22 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
27
+ import * as i23 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
28
+ import * as i24 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
29
+ import * as i25 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
30
+ import * as i26 from "./components/tableview/table/table.component";
31
+ import * as i27 from "./components/tableview/tableview.component";
32
+ import * as i28 from "./components/tableview/table/column-value/column-value.component";
33
+ import * as i29 from "./components/tableview/table/column-filter/column-filter.component";
34
+ import * as i30 from "./components/tableview/route/tableview-route.component";
35
+ import * as i31 from "./components/form/editor/form-editor.component";
36
+ import * as i32 from "./components/action/action.component";
37
+ import * as i33 from "./components/action/editor/action-editor.component";
38
+ import * as i34 from "./components/action/route/action-route.component";
39
+ import * as i35 from "@angular/common";
40
+ import * as i36 from "@angular/router";
41
+ import * as i37 from "@angular/common/http";
42
+ import * as i38 from "@angular/forms";
43
+ import * as i39 from "@ngx-translate/core";
44
+ import * as i40 from "@ngx-formly/core";
45
+ import * as i41 from "primeng/autocomplete";
46
+ import * as i42 from "primeng/breadcrumb";
47
+ import * as i43 from "primeng/button";
48
+ import * as i44 from "primeng/calendar";
49
+ import * as i45 from "primeng/card";
50
+ import * as i46 from "primeng/checkbox";
51
+ import * as i47 from "primeng/chip";
52
+ import * as i48 from "primeng/confirmdialog";
53
+ import * as i49 from "primeng/confirmpopup";
54
+ import * as i50 from "primeng/dialog";
55
+ import * as i51 from "primeng/dynamicdialog";
56
+ import * as i52 from "primeng/dropdown";
57
+ import * as i53 from "primeng/fileupload";
58
+ import * as i54 from "primeng/inputnumber";
59
+ import * as i55 from "primeng/inputmask";
60
+ import * as i56 from "primeng/inputswitch";
61
+ import * as i57 from "primeng/inputtext";
62
+ import * as i58 from "primeng/inputtextarea";
63
+ import * as i59 from "primeng/paginator";
64
+ import * as i60 from "primeng/radiobutton";
65
+ import * as i61 from "primeng/ripple";
66
+ import * as i62 from "primeng/selectbutton";
67
+ import * as i63 from "primeng/table";
68
+ import * as i64 from "primeng/tag";
69
+ import * as i65 from "primeng/toast";
70
+ import * as i66 from "primeng/togglebutton";
71
+ import * as i67 from "primeng/toolbar";
72
+ import * as i68 from "primeng/tooltip";
73
+ import * as i69 from "primeng/messages";
74
+ import * as i70 from "primeng/progressspinner";
75
+ import * as i71 from "primeng/tabview";
76
+ import * as i72 from "primeng/fieldset";
77
+ import * as i73 from "primeng/multiselect";
78
+ import * as i74 from "primeng/skeleton";
78
79
  export declare const primeNgModules: (typeof InputTextModule)[];
79
80
  export declare class MngCommonsModule {
80
81
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
81
82
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
82
- static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldLookupDialogComponent, typeof i21.MngFormlyFieldTableDialogMultiselectComponent, typeof i22.MngFormlyFieldTableDialogFormComponent, typeof i23.MngFormlyFieldTabsComponent, typeof i24.MngFormlyFieldFieldsetComponent, typeof i25.MngTableComponent, typeof i26.MngTableviewComponent, typeof i27.MngTableColumnValueComponent, typeof i28.MngTableColumnFilterComponent, typeof i29.MngTableviewRouteComponent, typeof i30.MngFormEditorComponent, typeof i31.MngActionComponent, typeof i32.MngActionEditorComponent, typeof i33.MngActionRouteComponent], [typeof i34.CommonModule, typeof i35.RouterModule, typeof i36.HttpClientModule, typeof i37.ReactiveFormsModule, typeof i38.TranslateModule, typeof i39.FormlyModule, typeof i40.AutoCompleteModule, typeof i41.BreadcrumbModule, typeof i42.ButtonModule, typeof i43.CalendarModule, typeof i44.CardModule, typeof i45.CheckboxModule, typeof i46.ChipModule, typeof i47.ConfirmDialogModule, typeof i48.ConfirmPopupModule, typeof i49.DialogModule, typeof i50.DynamicDialogModule, typeof i51.DropdownModule, typeof i52.FileUploadModule, typeof i53.InputNumberModule, typeof i54.InputMaskModule, typeof i55.InputSwitchModule, typeof i56.InputTextModule, typeof i57.InputTextareaModule, typeof i58.PaginatorModule, typeof i59.RadioButtonModule, typeof i60.RippleModule, typeof i61.SelectButtonModule, typeof i62.TableModule, typeof i63.TagModule, typeof i64.ToastModule, typeof i65.ToggleButtonModule, typeof i66.ToolbarModule, typeof i67.TooltipModule, typeof i68.MessagesModule, typeof i69.ProgressSpinnerModule, typeof i70.TabViewModule, typeof i71.FieldsetModule, typeof i72.MultiSelectModule, typeof i73.SkeletonModule], [typeof i40.AutoCompleteModule, typeof i41.BreadcrumbModule, typeof i42.ButtonModule, typeof i43.CalendarModule, typeof i44.CardModule, typeof i45.CheckboxModule, typeof i46.ChipModule, typeof i47.ConfirmDialogModule, typeof i48.ConfirmPopupModule, typeof i49.DialogModule, typeof i50.DynamicDialogModule, typeof i51.DropdownModule, typeof i52.FileUploadModule, typeof i53.InputNumberModule, typeof i54.InputMaskModule, typeof i55.InputSwitchModule, typeof i56.InputTextModule, typeof i57.InputTextareaModule, typeof i58.PaginatorModule, typeof i59.RadioButtonModule, typeof i60.RippleModule, typeof i61.SelectButtonModule, typeof i62.TableModule, typeof i63.TagModule, typeof i64.ToastModule, typeof i65.ToggleButtonModule, typeof i66.ToolbarModule, typeof i67.TooltipModule, typeof i68.MessagesModule, typeof i69.ProgressSpinnerModule, typeof i70.TabViewModule, typeof i71.FieldsetModule, typeof i72.MultiSelectModule, typeof i73.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldLookupDialogComponent, typeof i21.MngFormlyFieldTableDialogMultiselectComponent, typeof i22.MngFormlyFieldTableDialogFormComponent, typeof i23.MngFormlyFieldTabsComponent, typeof i24.MngFormlyFieldFieldsetComponent, typeof i25.MngTableComponent, typeof i26.MngTableviewComponent, typeof i27.MngTableColumnValueComponent, typeof i28.MngTableColumnFilterComponent, typeof i29.MngTableviewRouteComponent, typeof i30.MngFormEditorComponent, typeof i31.MngActionComponent, typeof i32.MngActionEditorComponent, typeof i33.MngActionRouteComponent]>;
83
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngLinkFormatterPipe, typeof i8.MngBreadcrumbComponent, typeof i9.MngFooterComponent, typeof i10.MngMainLayoutComponent, typeof i11.MngMenuComponent, typeof i12.MngMenuItemComponent, typeof i13.MngTopbarComponent, typeof i14.MngAutocompleteComponent, typeof i15.MngDropdownComponent, typeof i16.MngFormlyFieldWrapperComponent, typeof i17.MngFormlyTableWrapperComponent, typeof i18.MngFormlyFieldInputComponent, typeof i19.MngFormlyFieldDropdownComponent, typeof i20.MngFormlyFieldAutocompleteComponent, typeof i21.MngFormlyFieldLookupDialogComponent, typeof i22.MngFormlyFieldTableDialogMultiselectComponent, typeof i23.MngFormlyFieldTableDialogFormComponent, typeof i24.MngFormlyFieldTabsComponent, typeof i25.MngFormlyFieldFieldsetComponent, typeof i26.MngTableComponent, typeof i27.MngTableviewComponent, typeof i28.MngTableColumnValueComponent, typeof i29.MngTableColumnFilterComponent, typeof i30.MngTableviewRouteComponent, typeof i31.MngFormEditorComponent, typeof i32.MngActionComponent, typeof i33.MngActionEditorComponent, typeof i34.MngActionRouteComponent], [typeof i35.CommonModule, typeof i36.RouterModule, typeof i37.HttpClientModule, typeof i38.ReactiveFormsModule, typeof i39.TranslateModule, typeof i40.FormlyModule, typeof i41.AutoCompleteModule, typeof i42.BreadcrumbModule, typeof i43.ButtonModule, typeof i44.CalendarModule, typeof i45.CardModule, typeof i46.CheckboxModule, typeof i47.ChipModule, typeof i48.ConfirmDialogModule, typeof i49.ConfirmPopupModule, typeof i50.DialogModule, typeof i51.DynamicDialogModule, typeof i52.DropdownModule, typeof i53.FileUploadModule, typeof i54.InputNumberModule, typeof i55.InputMaskModule, typeof i56.InputSwitchModule, typeof i57.InputTextModule, typeof i58.InputTextareaModule, typeof i59.PaginatorModule, typeof i60.RadioButtonModule, typeof i61.RippleModule, typeof i62.SelectButtonModule, typeof i63.TableModule, typeof i64.TagModule, typeof i65.ToastModule, typeof i66.ToggleButtonModule, typeof i67.ToolbarModule, typeof i68.TooltipModule, typeof i69.MessagesModule, typeof i70.ProgressSpinnerModule, typeof i71.TabViewModule, typeof i72.FieldsetModule, typeof i73.MultiSelectModule, typeof i74.SkeletonModule], [typeof i41.AutoCompleteModule, typeof i42.BreadcrumbModule, typeof i43.ButtonModule, typeof i44.CalendarModule, typeof i45.CardModule, typeof i46.CheckboxModule, typeof i47.ChipModule, typeof i48.ConfirmDialogModule, typeof i49.ConfirmPopupModule, typeof i50.DialogModule, typeof i51.DynamicDialogModule, typeof i52.DropdownModule, typeof i53.FileUploadModule, typeof i54.InputNumberModule, typeof i55.InputMaskModule, typeof i56.InputSwitchModule, typeof i57.InputTextModule, typeof i58.InputTextareaModule, typeof i59.PaginatorModule, typeof i60.RadioButtonModule, typeof i61.RippleModule, typeof i62.SelectButtonModule, typeof i63.TableModule, typeof i64.TagModule, typeof i65.ToastModule, typeof i66.ToggleButtonModule, typeof i67.ToolbarModule, typeof i68.TooltipModule, typeof i69.MessagesModule, typeof i70.ProgressSpinnerModule, typeof i71.TabViewModule, typeof i72.FieldsetModule, typeof i73.MultiSelectModule, typeof i74.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngLinkFormatterPipe, typeof i8.MngBreadcrumbComponent, typeof i9.MngFooterComponent, typeof i10.MngMainLayoutComponent, typeof i11.MngMenuComponent, typeof i12.MngMenuItemComponent, typeof i13.MngTopbarComponent, typeof i14.MngAutocompleteComponent, typeof i15.MngDropdownComponent, typeof i16.MngFormlyFieldWrapperComponent, typeof i17.MngFormlyTableWrapperComponent, typeof i18.MngFormlyFieldInputComponent, typeof i19.MngFormlyFieldDropdownComponent, typeof i20.MngFormlyFieldAutocompleteComponent, typeof i21.MngFormlyFieldLookupDialogComponent, typeof i22.MngFormlyFieldTableDialogMultiselectComponent, typeof i23.MngFormlyFieldTableDialogFormComponent, typeof i24.MngFormlyFieldTabsComponent, typeof i25.MngFormlyFieldFieldsetComponent, typeof i26.MngTableComponent, typeof i27.MngTableviewComponent, typeof i28.MngTableColumnValueComponent, typeof i29.MngTableColumnFilterComponent, typeof i30.MngTableviewRouteComponent, typeof i31.MngFormEditorComponent, typeof i32.MngActionComponent, typeof i33.MngActionEditorComponent, typeof i34.MngActionRouteComponent]>;
83
84
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
84
85
  }
@@ -1,8 +1,10 @@
1
+ import { Message } from 'primeng/api';
1
2
  import { IdType } from '../types';
2
3
  export interface MngError extends Error {
3
4
  id?: IdType;
4
5
  messageCode?: number | string;
5
6
  message: string;
7
+ notification?: Message;
6
8
  details?: any;
7
9
  status?: number;
8
10
  statusDescription?: string;
@@ -1,4 +1,5 @@
1
1
  export * from './boolean.pipe';
2
2
  export * from './enum.pipe';
3
3
  export * from './i18n-property.pipe';
4
+ export * from './link-formatter.pipe';
4
5
  export * from './property-path.pipe';
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ModelDescriptor } from '../descriptors';
3
+ import { ActionData } from '../components/action/models';
4
+ import { IdType } from '../types';
5
+ import * as i0 from "@angular/core";
6
+ export declare class MngLinkFormatterPipe implements PipeTransform {
7
+ private parseUrl;
8
+ transform(value: string | string[], itemId?: IdType, item?: any, model?: ModelDescriptor<any>, actionData?: ActionData): any;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngLinkFormatterPipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<MngLinkFormatterPipe, "linkFormatter">;
11
+ }
@@ -8,10 +8,11 @@ import { ActionActivationResult, ActionData, ActionExecContext, ActionRunResult,
8
8
  import { MngTableCellClickEvent } from '../components/tableview/models';
9
9
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
10
10
  import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
11
- import { IViewContainer } from '../models';
11
+ import { IViewContainer, MngError } from '../models';
12
12
  import { IdType } from '../types';
13
13
  import { MngErrorMapperService } from './error-mapper.service';
14
14
  import { MngNavigationService } from './navigation.service';
15
+ import { MngLinkFormatterPipe } from '../pipes';
15
16
  import * as i0 from "@angular/core";
16
17
  export declare class MngActionExecutorService {
17
18
  private injector;
@@ -21,8 +22,9 @@ export declare class MngActionExecutorService {
21
22
  private translate;
22
23
  private navigationService;
23
24
  private errorMapper;
25
+ private linkFormatter;
24
26
  private defaultEditorDialogComponent;
25
- constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService, navigationService: MngNavigationService, errorMapper: MngErrorMapperService, defaultEditorDialogComponent: Type<any>);
27
+ constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService, navigationService: MngNavigationService, errorMapper: MngErrorMapperService, linkFormatter: MngLinkFormatterPipe, defaultEditorDialogComponent: Type<any>);
26
28
  prepareActionExecContext<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, viewContainer?: IViewContainer<T, S>, sourceComponent?: any, actionData?: ActionData): ActionExecContext<T, S, IDataProvider<T, S>>;
27
29
  runAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, sourceComponent?: any, viewContainer?: IViewContainer<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IDataProvider<T, S>>>;
28
30
  /**
@@ -94,7 +96,7 @@ export declare class MngActionExecutorService {
94
96
  */
95
97
  triggerAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, route?: ActivatedRoute, viewContainer?: IViewContainer<T, S>, sourceComponent?: any): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>>;
96
98
  deactivateAction<T>(action: ActionDescriptor<T>): void;
97
- private toMngActionError;
99
+ toMngActionError(error?: any): MngError;
98
100
  static ɵfac: i0.ɵɵFactoryDeclaration<MngActionExecutorService, never>;
99
101
  static ɵprov: i0.ɵɵInjectableDeclaration<MngActionExecutorService>;
100
102
  }
@@ -2,5 +2,5 @@ export * from './editor-formly.util';
2
2
  export * from './enum.util';
3
3
  export * from './i18n.util';
4
4
  export * from './model.util';
5
- export * from './toast.util';
5
+ export * from './notification.util';
6
6
  export * from './type.util';
@@ -1,14 +1,11 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
+ import { Message } from 'primeng/api';
2
3
  import { ActionDescriptor, TableDescriptor } from '../descriptors';
3
4
  import { IViewContainer, MngError } from '../models';
4
- export declare class ToastUtil {
5
- static notification(viewContainer?: IViewContainer<any, any>, title?: string, message?: string, severity?: 'success' | 'warn' | 'error'): void;
6
- static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, viewContainer?: IViewContainer<any, any>): void;
7
- static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, viewContainer?: IViewContainer<any, any>, item?: any): void;
8
- static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: MngError, functionName: string, viewContainer?: IViewContainer<any, any>, item?: any): void;
9
- static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): {
10
- severity: string;
11
- summary: any;
12
- detail: any;
13
- };
5
+ export declare class NotificationUtil {
6
+ static notification(viewContainer?: IViewContainer<any, any>, title?: string, message?: string, severity?: 'success' | 'warn' | 'error'): Message;
7
+ static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, viewContainer?: IViewContainer<any, any>): Message;
8
+ static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, viewContainer?: IViewContainer<any, any>, item?: any): Message;
9
+ static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: MngError, functionName: string, viewContainer?: IViewContainer<any, any>, item?: any): Message;
10
+ static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): Message;
14
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.2.23",
3
+ "version": "0.3.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.1.0",
6
6
  "@angular/core": "^13.1.0",
@@ -1,5 +1,9 @@
1
1
  @import 'mixins';
2
2
 
3
+ mng-action-button.mng-action-button {
4
+ margin: 0.1rem;
5
+ }
6
+
3
7
  .p-button {
4
8
  &.p-button-icon-only {
5
9
  &.mng-button-xs {