@mediusinc/mng-commons 0.2.18 → 0.2.19

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 (66) hide show
  1. package/assets/i18n/sl.json +15 -15
  2. package/esm2020/lib/components/action/action.component.mjs +32 -18
  3. package/esm2020/lib/components/action/editor/action-editor.component.mjs +182 -0
  4. package/esm2020/lib/components/action/index.mjs +2 -2
  5. package/esm2020/lib/components/action/models/action-execution.model.mjs +3 -3
  6. package/esm2020/lib/components/action/route/action-route.component.mjs +17 -12
  7. package/esm2020/lib/components/form/editor/form-editor.component.mjs +2 -2
  8. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  9. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  10. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  11. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
  12. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +7 -3
  13. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
  14. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
  15. package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +4 -3
  16. package/esm2020/lib/components/form/models/form-editor.event.mjs +1 -1
  17. package/esm2020/lib/components/tableview/table/table.component.mjs +9 -9
  18. package/esm2020/lib/components/tableview/tableview.component.mjs +22 -15
  19. package/esm2020/lib/data-providers/table.data-provider.mjs +1 -1
  20. package/esm2020/lib/descriptors/action.descriptor.mjs +112 -1
  21. package/esm2020/lib/descriptors/editor.descriptor.mjs +53 -11
  22. package/esm2020/lib/mng-commons.module.mjs +14 -10
  23. package/esm2020/lib/models/index.mjs +2 -1
  24. package/esm2020/lib/models/view-container.model.mjs +2 -0
  25. package/esm2020/lib/services/action-executor.service.mjs +291 -0
  26. package/esm2020/lib/services/index.mjs +2 -2
  27. package/esm2020/lib/services/mng-view-container-component.service.mjs +35 -0
  28. package/esm2020/lib/services/tokens/default-setting.token.mjs +3 -0
  29. package/esm2020/lib/services/tokens/index.mjs +2 -1
  30. package/esm2020/lib/utils/toast.util.mjs +15 -7
  31. package/esm2020/public-api.mjs +1 -2
  32. package/fesm2015/mediusinc-mng-commons.mjs +944 -677
  33. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  34. package/fesm2020/mediusinc-mng-commons.mjs +914 -657
  35. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  36. package/lib/components/action/action.component.d.ts +12 -7
  37. package/lib/components/action/{dialog/action-dialog.component.d.ts → editor/action-editor.component.d.ts} +18 -12
  38. package/lib/components/action/index.d.ts +1 -1
  39. package/lib/components/action/models/action-execution.model.d.ts +3 -3
  40. package/lib/components/action/route/action-route.component.d.ts +6 -6
  41. package/lib/components/tableview/table/table.component.d.ts +3 -3
  42. package/lib/components/tableview/tableview.component.d.ts +10 -7
  43. package/lib/descriptors/action.descriptor.d.ts +41 -5
  44. package/lib/descriptors/editor.descriptor.d.ts +23 -4
  45. package/lib/mng-commons.module.d.ts +2 -2
  46. package/lib/models/index.d.ts +1 -0
  47. package/lib/models/view-container.model.d.ts +6 -0
  48. package/lib/services/{action.service.d.ts → action-executor.service.d.ts} +19 -18
  49. package/lib/services/index.d.ts +1 -1
  50. package/lib/services/mng-view-container-component.service.d.ts +22 -0
  51. package/lib/services/tokens/default-setting.token.d.ts +2 -0
  52. package/lib/services/tokens/index.d.ts +1 -0
  53. package/lib/utils/toast.util.d.ts +5 -4
  54. package/package.json +1 -1
  55. package/public-api.d.ts +0 -1
  56. package/scss/mng-overrides/_layout_forms.scss +2 -0
  57. package/scss/mng-overrides/_mixins.scss +7 -0
  58. package/scss/mng-overrides/_theme_button.scss +58 -0
  59. package/scss/mng-overrides/_theme_styles.scss +1 -0
  60. package/scss/mng-overrides/_variables.scss +2 -0
  61. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +0 -151
  62. package/esm2020/lib/components/tableview/services/index.mjs +0 -2
  63. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +0 -21
  64. package/esm2020/lib/services/action.service.mjs +0 -273
  65. package/lib/components/tableview/services/index.d.ts +0 -1
  66. package/lib/components/tableview/services/tableview.component.service.d.ts +0 -14
@@ -3,22 +3,26 @@ import { ActivatedRoute } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { ConfirmationService } from 'primeng/api';
5
5
  import { Observable } from 'rxjs';
6
+ import { DataProvider } from '../../data-providers';
6
7
  import { ActionDescriptor } from '../../descriptors';
7
- import { MngActionService } from '../../services';
8
+ import { IViewContainer } from '../../models';
9
+ import { MngActionExecutorService } from '../../services';
10
+ import { MngViewContainerComponentService } from '../../services/mng-view-container-component.service';
8
11
  import { IdType } from '../../types';
9
- import { TableviewComponentService } from '../tableview/services';
10
12
  import { ActionData, IActionConfirmationService } from './models';
11
13
  import * as i0 from "@angular/core";
12
14
  export declare class MngActionComponent<T, S> implements OnInit, IActionConfirmationService {
13
15
  private route;
14
16
  private translate;
15
- private actionService;
17
+ private actionExecutor;
16
18
  private confirmationService;
17
- private tableviewService;
19
+ private viewContainerService;
18
20
  action: ActionDescriptor<T>;
19
21
  item?: T;
20
22
  itemId?: IdType;
21
23
  actionData?: ActionData;
24
+ dataProvider?: DataProvider<T, S>;
25
+ viewContainerInit?: IViewContainer<T, S>;
22
26
  private loadingSubject;
23
27
  $loading: Observable<boolean>;
24
28
  cmpId: string;
@@ -26,11 +30,12 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
26
30
  $isEnabled: Observable<boolean>;
27
31
  $label: Observable<string | null>;
28
32
  $tooltip: Observable<string | null>;
29
- constructor(route: ActivatedRoute, translate: TranslateService, actionService: MngActionService, confirmationService: ConfirmationService, tableviewService: TableviewComponentService<T, S>);
33
+ private viewContainer?;
34
+ constructor(route: ActivatedRoute, translate: TranslateService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
30
35
  ngOnInit(): void;
31
36
  triggerAction(event: Event): void;
32
37
  getConfirmationService(): ConfirmationService;
33
38
  getConfirmationServiceInstanceKey(action: ActionDescriptor<any>): string;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; }, {}, never, never>;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, [null, null, null, null, { optional: true; }]>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; "dataProvider": "dataProvider"; "viewContainerInit": "viewContainer"; }, {}, never, never>;
36
41
  }
@@ -5,43 +5,49 @@ import { Observable } from 'rxjs';
5
5
  import { IEditorDataProvider } from '../../../data-providers';
6
6
  import { ActionEditorDescriptor } from '../../../descriptors';
7
7
  import { MngTemplateDirective } from '../../../directives';
8
- import { MngActionService, MngCommonsService } from '../../../services';
8
+ import { IViewContainer } from '../../../models';
9
+ import { MngActionExecutorService, MngCommonsService } from '../../../services';
10
+ import { MngViewContainerComponentService } from '../../../services/mng-view-container-component.service';
9
11
  import { IdType } from '../../../types';
10
12
  import { MngFormEditorSubmitEvent } from '../../form/models';
11
13
  import { ActionData, ActionRunResult } from '../models';
12
14
  import * as i0 from "@angular/core";
13
- export declare class MngActionDialogComponent<T, S> implements OnInit, OnDestroy {
15
+ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy {
14
16
  private injector;
15
17
  private translate;
16
- dialogRef: DynamicDialogRef;
17
- dialogConfig: DynamicDialogConfig;
18
- private actionService;
18
+ private actionExecutor;
19
19
  private mngCommonsService;
20
+ private dialogRef;
21
+ private dialogConfig;
22
+ private viewContainerService;
20
23
  action: ActionEditorDescriptor<T>;
21
24
  itemId?: IdType;
22
25
  item?: T;
23
26
  actionData?: ActionData;
24
27
  dataProvider?: IEditorDataProvider<T, S>;
28
+ viewContainerInit?: IViewContainer<T, S>;
25
29
  templates: QueryList<MngTemplateDirective>;
26
- cmpId: string;
27
- isSaveButton: boolean;
28
30
  private submitButtonElementRef;
29
31
  private editorComponent;
32
+ cmpId: string;
33
+ title?: string;
34
+ isDialog: boolean;
35
+ isSaveButton: boolean;
30
36
  private loadingSubject;
31
37
  loading$: Observable<boolean>;
32
38
  private submitLoadingSubject;
33
39
  submitLoading$: Observable<boolean>;
34
- private tableviewService?;
40
+ private viewContainer?;
35
41
  private sourceComponent;
36
42
  private subscriptions;
37
- constructor(injector: Injector, translate: TranslateService, dialogRef: DynamicDialogRef, dialogConfig: DynamicDialogConfig, actionService: MngActionService, mngCommonsService: MngCommonsService);
43
+ constructor(injector: Injector, translate: TranslateService, actionExecutor: MngActionExecutorService, mngCommonsService: MngCommonsService, dialogRef: DynamicDialogRef | null, dialogConfig: DynamicDialogConfig | null, viewContainerService: MngViewContainerComponentService<T, S> | null);
38
44
  ngOnInit(): void;
39
45
  ngOnDestroy(): void;
40
46
  onSubmit(event: MngFormEditorSubmitEvent<T>): void;
41
47
  closeDialog(result?: ActionRunResult<T, any, any>): void;
42
48
  saveItem(): void;
43
49
  private loadItemWithDataProvider;
44
- private setDialogHeaderTitle;
45
- static ɵfac: i0.ɵɵFactoryDeclaration<MngActionDialogComponent<any, any>, never>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<MngActionDialogComponent<any, any>, "mng-action-dialog", never, { "action": "action"; "itemId": "itemId"; "item": "item"; "actionData": "actionData"; "dataProvider": "dataProvider"; }, {}, ["templates"], never>;
50
+ private setTitle;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngActionEditorComponent<any, any>, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<MngActionEditorComponent<any, any>, "mng-action-editor", never, { "action": "action"; "itemId": "itemId"; "item": "item"; "actionData": "actionData"; "dataProvider": "dataProvider"; "viewContainerInit": "viewContainer"; }, {}, ["templates"], never>;
47
53
  }
@@ -1,3 +1,3 @@
1
1
  export * from './action.component';
2
2
  export * from './route/action-route.component';
3
- export * from './dialog/action-dialog.component';
3
+ export * from './editor/action-editor.component';
@@ -1,8 +1,8 @@
1
1
  import { DynamicDialogRef } from 'primeng/dynamicdialog';
2
2
  import { Observable } from 'rxjs';
3
3
  import { IDataProvider } from '../../../data-providers';
4
+ import { IViewContainer } from '../../../models';
4
5
  import { IdType } from '../../../types';
5
- import { TableviewComponentService } from '../../tableview/services';
6
6
  export declare class ActionExecContext<T, S, DP extends IDataProvider<T, S>> {
7
7
  readonly dataProvider?: DP | undefined;
8
8
  readonly serviceInstance?: S | undefined;
@@ -12,12 +12,12 @@ export declare class ActionExecContext<T, S, DP extends IDataProvider<T, S>> {
12
12
  actionData?: ActionData | undefined;
13
13
  } | undefined;
14
14
  readonly sourceComponent: any;
15
- readonly tableview: TableviewComponentService<T, S> | null;
15
+ readonly viewContainer: IViewContainer<T, S> | null;
16
16
  constructor(dataProvider?: DP | undefined, serviceInstance?: S | undefined, data?: {
17
17
  item?: T | undefined;
18
18
  itemId?: IdType | undefined;
19
19
  actionData?: ActionData | undefined;
20
- } | undefined, sourceComponent?: any, tableview?: TableviewComponentService<T, S> | null);
20
+ } | undefined, sourceComponent?: any, viewContainer?: IViewContainer<T, S> | null);
21
21
  }
22
22
  export declare class ActionError {
23
23
  readonly error: any;
@@ -2,8 +2,8 @@ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { ActivatedRoute, Router } from '@angular/router';
3
3
  import { ConfirmationService } from 'primeng/api';
4
4
  import { ActionDescriptor } from '../../../descriptors';
5
- import { MngActionService, MngNavigationService } from '../../../services';
6
- import { TableviewComponentService } from '../../tableview/services';
5
+ import { MngActionExecutorService, MngNavigationService } from '../../../services';
6
+ import { MngViewContainerComponentService } from '../../../services/mng-view-container-component.service';
7
7
  import { IActionConfirmationService } from '../models';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy, IActionConfirmationService {
@@ -11,15 +11,15 @@ export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy,
11
11
  private route;
12
12
  private confirmationService;
13
13
  private navigationService;
14
- private actionService;
15
- private tableviewService;
14
+ private actionExecutor;
15
+ private viewContainerService;
16
16
  cmpId: string;
17
17
  private actions;
18
18
  private activeAction?;
19
19
  private dialogRef?;
20
20
  private dialogCloseSubscription?;
21
21
  private subscriptions;
22
- constructor(router: Router, route: ActivatedRoute, confirmationService: ConfirmationService, navigationService: MngNavigationService, actionService: MngActionService, tableviewService: TableviewComponentService<T, S>);
22
+ constructor(router: Router, route: ActivatedRoute, confirmationService: ConfirmationService, navigationService: MngNavigationService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S> | null);
23
23
  ngOnInit(): void;
24
24
  ngOnDestroy(): void;
25
25
  getConfirmationService(): ConfirmationService;
@@ -27,6 +27,6 @@ export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy,
27
27
  private activateAction;
28
28
  private deactivateAction;
29
29
  private findActiveAction;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<MngActionRouteComponent<any, any>, never>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngActionRouteComponent<any, any>, [null, null, null, null, null, { optional: true; }]>;
31
31
  static ɵcmp: i0.ɵɵComponentDeclaration<MngActionRouteComponent<any, any>, "mng-action-route", never, {}, {}, never, never>;
32
32
  }
@@ -9,15 +9,15 @@ import { MediusQueryResult } from '../../../api/models';
9
9
  import { ITableDataProvider } from '../../../data-providers';
10
10
  import { ColumnDescriptor, TableDescriptor } from '../../../descriptors';
11
11
  import { MngComponentDirective, MngTemplateDirective } from '../../../directives';
12
+ import { MngViewContainerComponentService } from '../../../services/mng-view-container-component.service';
12
13
  import { MngTableCellClickEvent, MngTableLoadEvent } from '../models';
13
- import { TableviewComponentService } from '../services';
14
14
  import * as i0 from "@angular/core";
15
15
  export declare class MngTableComponent<T, S> implements OnInit, AfterContentInit, OnDestroy {
16
16
  private injector;
17
17
  private router;
18
18
  private activatedRoute;
19
19
  private translate;
20
- private tableviewService;
20
+ private viewContainerService;
21
21
  readonly filterDisplayRow: TableDescriptor.FilterDisplayEnum;
22
22
  readonly filterDisplayMenu: TableDescriptor.FilterDisplayEnum;
23
23
  descriptor: TableDescriptor<T>;
@@ -68,7 +68,7 @@ export declare class MngTableComponent<T, S> implements OnInit, AfterContentInit
68
68
  private isSortChanged;
69
69
  private filterDescriptors;
70
70
  private subscriptions;
71
- constructor(injector: Injector, router: Router, activatedRoute: ActivatedRoute, translate: TranslateService, tableviewService: TableviewComponentService<T, S>);
71
+ constructor(injector: Injector, router: Router, activatedRoute: ActivatedRoute, translate: TranslateService, viewContainerService: MngViewContainerComponentService<T, S> | null);
72
72
  ngOnInit(): void;
73
73
  ngAfterContentInit(): void;
74
74
  ngOnDestroy(): void;
@@ -3,21 +3,22 @@ import { ActivatedRoute } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { ConfirmationService, MessageService } from 'primeng/api';
5
5
  import { DialogService } from 'primeng/dynamicdialog';
6
- import { ITableviewDataProvider } from '../../data-providers';
6
+ import { IDataProvider, ITableviewDataProvider } from '../../data-providers';
7
7
  import { ActionDescriptor, TableviewDescriptor } from '../../descriptors';
8
- import { MngActionService } from '../../services';
8
+ import { IViewContainer } from '../../models';
9
+ import { MngActionExecutorService } from '../../services';
10
+ import { MngViewContainerComponentService } from '../../services/mng-view-container-component.service';
9
11
  import { MngTableCellClickEvent } from './models';
10
- import { TableviewComponentService } from './services';
11
12
  import { MngTableComponent } from './table/table.component';
12
13
  import * as i0 from "@angular/core";
13
- export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy {
14
+ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, IViewContainer<T, S> {
14
15
  private route;
15
16
  private messageService;
16
17
  private translateService;
17
18
  private dialogService;
18
19
  private confirmationService;
19
- private actionService;
20
- private tableviewService;
20
+ private actionExecutor;
21
+ private viewContainerService;
21
22
  descriptor: TableviewDescriptor<T>;
22
23
  dataProvider?: ITableviewDataProvider<T, S>;
23
24
  actions: Array<ActionDescriptor<T>>;
@@ -27,9 +28,11 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy {
27
28
  toolbarLeftActions: ActionDescriptor<T>[];
28
29
  toolbarRightActions: ActionDescriptor<T>[];
29
30
  private subscriptions;
30
- constructor(route: ActivatedRoute, messageService: MessageService, translateService: TranslateService, dialogService: DialogService, confirmationService: ConfirmationService, actionService: MngActionService, tableviewService: TableviewComponentService<T, S>);
31
+ constructor(route: ActivatedRoute, messageService: MessageService, translateService: TranslateService, dialogService: DialogService, confirmationService: ConfirmationService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S>);
31
32
  ngOnInit(): void;
32
33
  ngOnDestroy(): void;
34
+ getMessageService(): MessageService;
35
+ getDataProvider(): IDataProvider<T, S> | undefined;
33
36
  reloadTable(): void;
34
37
  onTableCellClick(event: MngTableCellClickEvent<T>): void;
35
38
  static ɵfac: i0.ɵɵFactoryDeclaration<MngTableviewComponent<any, any>, never>;
@@ -1,7 +1,8 @@
1
+ import { Type } from '@angular/core';
1
2
  import { Observable } from 'rxjs';
2
3
  import { ActionExecContext } from '../components/action/models';
3
4
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
4
- import { ClassType } from '../types';
5
+ import { ClassType, IdType } from '../types';
5
6
  import { EditorDescriptor, ModelDescriptor } from './';
6
7
  export declare class ActionDescriptor<T> {
7
8
  protected readonly _model: ModelDescriptor<T>;
@@ -18,7 +19,9 @@ export declare class ActionDescriptor<T> {
18
19
  protected _title?: string | null;
19
20
  protected _icon?: string;
20
21
  protected _className: string;
22
+ protected _size: ActionDescriptor.SizeEnum;
21
23
  protected _tooltip?: string | null;
24
+ protected _dataProvider?: IDataProvider<T, any>;
22
25
  protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
23
26
  protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
24
27
  protected _isEnabledFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
@@ -47,11 +50,17 @@ export declare class ActionDescriptor<T> {
47
50
  get title(): string | null | undefined;
48
51
  get icon(): string | undefined;
49
52
  get tooltip(): string | null | undefined;
53
+ get dataProvider(): IDataProvider<T, any> | undefined;
50
54
  get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
51
55
  get isVisibleFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
52
56
  get isEnabledFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
53
57
  get actionName(): string;
54
58
  get className(): string;
59
+ get size(): ActionDescriptor.SizeEnum;
60
+ get isSizeExtraSmall(): boolean;
61
+ get isSizeSmall(): boolean;
62
+ get isSizeLarge(): boolean;
63
+ get isSizeExtraLarge(): boolean;
55
64
  get hasRunConfirmation(): boolean;
56
65
  get runConfirmationIcon(): string | undefined;
57
66
  get runConfirmationTitle(): string | undefined;
@@ -64,6 +73,8 @@ export declare class ActionDescriptor<T> {
64
73
  get hasRunNotificationError(): boolean;
65
74
  get runNotificationErrorTitle(): string | undefined;
66
75
  get runNotificationErrorMessage(): string | undefined;
76
+ withDataProvider(dataProvider: IDataProvider<T, any>): this;
77
+ withServiceType<S>(serviceType: Type<S>): this;
67
78
  withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
68
79
  withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
69
80
  withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
@@ -81,45 +92,70 @@ export declare class ActionDescriptor<T> {
81
92
  withIcon(icon: string): this;
82
93
  withTooltip(tooltip: string | null): this;
83
94
  withClassName(className: string): this;
95
+ withSize(size?: ActionDescriptor.SizeEnum): this;
84
96
  withPosition(position: ActionPositionEnum): this;
85
97
  withRunConfirmation(icon?: string, title?: string, message?: string, acceptTitle?: string, rejectTitle?: string): this;
86
98
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): void;
87
99
  withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
88
100
  }
101
+ export declare namespace ActionDescriptor {
102
+ enum SizeEnum {
103
+ ExtraSmall = 0,
104
+ Small = 1,
105
+ Normal = 2,
106
+ Large = 3,
107
+ ExtraLarge = 4
108
+ }
109
+ }
89
110
  export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
90
111
  private readonly _editorDescriptor;
91
112
  protected _editorTitle?: string;
92
- private _hasFetchNotificationSuccess;
93
- private _fetchNotificationSuccessTitle?;
94
- private _fetchNotificationSuccessMessage?;
113
+ protected _hasFetchNotificationSuccess: boolean;
114
+ protected _fetchNotificationSuccessTitle?: string;
115
+ protected _fetchNotificationSuccessMessage?: string;
116
+ protected _dataProvider?: IEditorDataProvider<T, any>;
95
117
  protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
96
118
  protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
119
+ protected _editorComponent?: Type<any>;
97
120
  constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
98
121
  get editorTitle(): string | undefined;
99
122
  get editorDescriptor(): EditorDescriptor<T>;
100
123
  get hasFetchNotificationSuccess(): boolean;
101
124
  get fetchNotificationSuccessTitle(): string | undefined;
102
125
  get fetchNotificationSuccessMessage(): string | undefined;
126
+ get dataProvider(): IEditorDataProvider<T, any> | undefined;
103
127
  get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
104
128
  get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
105
129
  get submitFunction(): ((ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>) | undefined;
130
+ get editorComponent(): Type<any> | undefined;
106
131
  withEditorTitle(title: string): this;
132
+ withDataProvider(dataProvider: IEditorDataProvider<T, any>): this;
133
+ withServiceType<S>(serviceType: Type<S>): this;
107
134
  withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
108
135
  withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
109
136
  withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
110
- withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
137
+ withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
138
+ withEditorComponent(editorComponent: Type<any>): this;
111
139
  }
112
140
  export declare class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {
113
141
  constructor(editorDescriptor: EditorDescriptor<T>);
142
+ withServiceType<S>(serviceType: Type<S>): this;
143
+ withServiceFetchFunction<S>(serviceType: Type<S>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
114
144
  }
115
145
  export declare class ActionEditorAddDescriptor<T> extends ActionEditorDescriptor<T> {
116
146
  constructor(editorDescriptor: EditorDescriptor<T>);
147
+ withServiceType<S>(serviceType: Type<S>): this;
148
+ withServiceSubmitFunction<S>(serviceType: Type<S>, createFn?: (item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
117
149
  }
118
150
  export declare class ActionEditorEditDescriptor<T> extends ActionEditorDescriptor<T> {
119
151
  constructor(editorDescriptor: EditorDescriptor<T>);
152
+ withServiceType<S>(serviceType: Type<S>): this;
153
+ withServiceSubmitFunction<S>(serviceType: Type<S>, updateFn?: (id: IdType, item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
120
154
  }
121
155
  export declare class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {
122
156
  constructor(model: ModelDescriptor<T>);
157
+ withServiceType<S>(serviceType: Type<S>): this;
158
+ withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this;
123
159
  }
124
160
  export declare enum ActionPositionEnum {
125
161
  ToolbarLeft = 0,
@@ -54,47 +54,66 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
54
54
  protected _group?: AFieldGroupDescriptor<ET>;
55
55
  protected _label?: string;
56
56
  protected _placeholder?: string;
57
+ protected _helpText?: string;
57
58
  protected _required: boolean;
58
59
  protected _disabled: boolean;
59
60
  protected _defaultValue?: T;
60
- protected _className: string;
61
61
  protected _getter?: (item: ET) => T;
62
62
  protected _setter?: (item: ET, value: T) => void;
63
63
  protected _validators: Array<FieldValidator>;
64
64
  protected _requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
65
65
  protected _disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
66
66
  protected _hiddenExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
67
+ protected _className: string;
68
+ protected _labelClassName: string;
69
+ protected _inputClassName: string;
70
+ protected _size: FieldDescriptor.SizeEnum;
67
71
  protected readonly _eventsSubject: Subject<MngFormFieldEvent<T, ET>>;
68
72
  protected constructor(editor: EditorDescriptor<ET>, property: string);
73
+ get property(): string;
69
74
  get group(): AFieldGroupDescriptor<ET> | undefined;
70
75
  get label(): string | undefined;
71
76
  get placeholder(): string | undefined;
77
+ get helpText(): string | undefined;
72
78
  get required(): boolean;
73
79
  get disabled(): boolean;
74
80
  get defaultValue(): T | undefined;
75
- get className(): string;
76
81
  get getter(): ((item: ET) => T) | undefined;
77
82
  get setter(): ((item: ET, value: T) => void) | undefined;
78
83
  get validators(): FieldValidator[];
79
84
  get requiredExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
80
85
  get disabledExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
81
86
  get hiddenExpression(): string | Observable<boolean> | ((model: any, formState?: any, field?: FormlyFieldConfig | undefined) => boolean) | undefined;
82
- get property(): string;
87
+ get className(): string;
88
+ get labelClassName(): string;
89
+ get inputClassName(): string;
90
+ get size(): FieldDescriptor.SizeEnum;
91
+ get isSizeSmall(): boolean;
92
+ get isSizeLarge(): boolean;
83
93
  abstract copy(): AFieldDescriptor<T, ET>;
84
94
  withLabel(label: string): this;
85
95
  withPlaceholder(placeholder: string): this;
96
+ withHelpText(helpText: string): this;
86
97
  withRequired(required?: boolean, requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
87
98
  withDisabled(disabled?: boolean, disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
88
99
  withHidden(hiddenExpression: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
89
100
  withDefaultValue(defaultValue: T): this;
90
- withClassName(className: string): this;
91
101
  withGetter(getter: (item: ET) => T): this;
92
102
  withSetter(setter: (item: ET, value: T) => void): this;
93
103
  withValidator(name: string, expression: (control: AbstractControl) => boolean, message?: (err: any, field: FormlyFieldConfig) => string): this;
104
+ withClassName(className: string, labelClassName?: string, inputClassName?: string): this;
105
+ withSize(size?: FieldDescriptor.SizeEnum): this;
94
106
  nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<T, ET>): void;
95
107
  get events$(): Observable<MngFormFieldEvent<T, ET>>;
96
108
  protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
97
109
  }
110
+ export declare namespace FieldDescriptor {
111
+ enum SizeEnum {
112
+ Small = 0,
113
+ Normal = 1,
114
+ Large = 2
115
+ }
116
+ }
98
117
  export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {
99
118
  private _fieldType;
100
119
  private _rows?;
@@ -33,7 +33,7 @@ import * as i28 from "./components/tableview/table/column-filter/column-filter.c
33
33
  import * as i29 from "./components/tableview/route/tableview-route.component";
34
34
  import * as i30 from "./components/form/editor/form-editor.component";
35
35
  import * as i31 from "./components/action/action.component";
36
- import * as i32 from "./components/action/dialog/action-dialog.component";
36
+ import * as i32 from "./components/action/editor/action-editor.component";
37
37
  import * as i33 from "./components/action/route/action-route.component";
38
38
  import * as i34 from "@angular/common";
39
39
  import * as i35 from "@angular/router";
@@ -79,6 +79,6 @@ export declare const primeNgModules: (typeof InputTextModule)[];
79
79
  export declare class MngCommonsModule {
80
80
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
81
81
  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.MngActionDialogComponent, 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.MngActionDialogComponent, typeof i33.MngActionRouteComponent]>;
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
83
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
84
84
  }
@@ -1,3 +1,4 @@
1
1
  export * from './enum.model';
2
2
  export * from './menu.model';
3
3
  export * from './user.model';
4
+ export * from './view-container.model';
@@ -0,0 +1,6 @@
1
+ import { MessageService } from 'primeng/api';
2
+ import { IDataProvider } from '../data-providers';
3
+ export interface IViewContainer<T, S> {
4
+ getMessageService(): MessageService | undefined;
5
+ getDataProvider(): IDataProvider<T, S> | undefined;
6
+ }
@@ -1,4 +1,4 @@
1
- import { Injector } from '@angular/core';
1
+ import { Injector, Type } from '@angular/core';
2
2
  import { ActivatedRoute, Router } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { ConfirmationService } from 'primeng/api';
@@ -6,20 +6,21 @@ import { DialogService } from 'primeng/dynamicdialog';
6
6
  import { Observable } from 'rxjs';
7
7
  import { ActionActivationResult, ActionData, ActionExecContext, ActionRunResult, ActionTriggerResult } from '../components/action/models';
8
8
  import { MngTableCellClickEvent } from '../components/tableview/models';
9
- import { TableviewComponentService } from '../components/tableview/services';
10
9
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
11
10
  import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
11
+ import { IViewContainer } from '../models/view-container.model';
12
12
  import { IdType } from '../types';
13
13
  import * as i0 from "@angular/core";
14
- export declare class MngActionService {
14
+ export declare class MngActionExecutorService {
15
15
  private injector;
16
16
  private router;
17
17
  private dialogService;
18
18
  private confirmationService;
19
19
  private translate;
20
- constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService);
21
- getActionExecContext<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, tableview?: TableviewComponentService<T, S>, sourceComponent?: any, actionData?: ActionData): ActionExecContext<T, S, IDataProvider<T, S>>;
22
- runAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IDataProvider<T, S>>>;
20
+ private defaultEditorDialogComponent;
21
+ constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService, defaultEditorDialogComponent: Type<any>);
22
+ 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>>;
23
+ 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>>>;
23
24
  /**
24
25
  * Runs editor action save function usually triggered on form submit.
25
26
  *
@@ -28,10 +29,10 @@ export declare class MngActionService {
28
29
  * @param formItem Item instance (from form).
29
30
  * @param dataProvider Data provider
30
31
  * @param sourceComponent Source component from where the fetch function was called.
31
- * @param tableview Tableview component.
32
+ * @param viewContainer View container/service.
32
33
  * @param actionData Additional action data.
33
34
  */
34
- runEditorSave<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, formItem?: T, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
35
+ runEditorSave<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, formItem?: T, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, viewContainer?: IViewContainer<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
35
36
  /**
36
37
  * Runs editor action fetch function.
37
38
  *
@@ -39,21 +40,21 @@ export declare class MngActionService {
39
40
  * @param itemId Item id.
40
41
  * @param dataProvider Data provider
41
42
  * @param sourceComponent Source component from where the fetch function was called.
42
- * @param tableview Tableview component.
43
+ * @param viewContainer View container/service. Tableview component.
43
44
  * @param actionData Additional action data.
44
45
  */
45
- runEditorFetch<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
46
+ runEditorFetch<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, viewContainer?: IViewContainer<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
46
47
  /**
47
- * Prepares action run context for action of type editor.
48
+ * Prepares action exec context for action of type editor.
48
49
  *
49
50
  * @param item Item instance (if exists).
50
51
  * @param itemId Item id (if exists).
51
52
  * @param dataProvider Data provider.
52
53
  * @param sourceComponent Source component from where the context preparation was called.
53
- * @param tableview Tableview component.
54
+ * @param viewContainer View container/service.
54
55
  * @param actionData Additional action data.
55
56
  */
56
- private prepareRunContextForEditor;
57
+ private prepareExecContextForEditor;
57
58
  /**
58
59
  * Gets service instance of data provider.
59
60
  *
@@ -67,10 +68,10 @@ export declare class MngActionService {
67
68
  * @param item Item instance (if exists).
68
69
  * @param itemId Item id (if exists).
69
70
  * @param actionData Optional additional action data.
70
- * @param tableview Tableview component.
71
+ * @param viewContainer View container component/service.
71
72
  * @param sourceComponent Source activation component.
72
73
  */
73
- activateAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, tableview?: TableviewComponentService<T, S>, sourceComponent?: any): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>>;
74
+ activateAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, viewContainer?: IViewContainer<T, S>, sourceComponent?: any): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>>;
74
75
  /**
75
76
  * Triggers action from table row click position.
76
77
  *
@@ -86,7 +87,7 @@ export declare class MngActionService {
86
87
  * @param actionData Optional action data.
87
88
  * @param route Optional activated route.
88
89
  */
89
- triggerAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, route?: ActivatedRoute, tableview?: TableviewComponentService<T, S>, sourceComponent?: any): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>>;
90
- static ɵfac: i0.ɵɵFactoryDeclaration<MngActionService, never>;
91
- static ɵprov: i0.ɵɵInjectableDeclaration<MngActionService>;
90
+ 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>>>;
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngActionExecutorService, never>;
92
+ static ɵprov: i0.ɵɵInjectableDeclaration<MngActionExecutorService>;
92
93
  }
@@ -1,4 +1,4 @@
1
- export * from './action.service';
1
+ export * from './action-executor.service';
2
2
  export * from './configuration.service';
3
3
  export * from './commons.service';
4
4
  export * from './navigation.service';
@@ -0,0 +1,22 @@
1
+ import { MessageService } from 'primeng/api';
2
+ import { IDataProvider } from '../data-providers';
3
+ import { ActionDescriptor } from '../descriptors';
4
+ import { IViewContainer } from '../models';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Should be used with providers defined within component.
8
+ */
9
+ export declare class MngViewContainerComponentService<T, S> implements IViewContainer<T, S> {
10
+ private messageService;
11
+ private _dataProvider?;
12
+ actions: Array<ActionDescriptor<T>>;
13
+ private _reloadTableSubject;
14
+ constructor(messageService: MessageService);
15
+ set dataProvider(dataProvider: IDataProvider<T, S>);
16
+ get reloadTable$(): import("rxjs").Observable<any>;
17
+ triggerTableReload(event: any): void;
18
+ getMessageService(): MessageService;
19
+ getDataProvider(): IDataProvider<T, S> | undefined;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngViewContainerComponentService<any, any>, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<MngViewContainerComponentService<any, any>>;
22
+ }