@mediusinc/mng-commons 4.0.0-rc.1 → 4.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +12 -2
- package/esm2022/lib/api/utils/medius-rest.util.mjs +15 -7
- package/esm2022/lib/api/utils/object-serializer.util.mjs +8 -4
- package/esm2022/lib/components/action/action.component.mjs +16 -45
- package/esm2022/lib/components/action/editor/action-editor.component.mjs +60 -434
- package/esm2022/lib/components/action/editor/injector-context/action-editor-injector-context.component.mjs +394 -0
- package/esm2022/lib/components/action/index.mjs +2 -1
- package/esm2022/lib/components/action/localization/data-language-dropdown.component.mjs +6 -7
- package/esm2022/lib/components/action/models/action-component.model.mjs +1 -1
- package/esm2022/lib/components/action/models/action-execution.model.mjs +3 -6
- package/esm2022/lib/components/action/models/index.mjs +1 -2
- package/esm2022/lib/components/action/route/action-route.component.mjs +14 -30
- package/esm2022/lib/components/action/table/action-table.component.mjs +154 -0
- package/esm2022/lib/components/form/editor/form-editor.component.mjs +5 -11
- package/esm2022/lib/components/form/formly/fields/formly-field-custom/formly-field-custom.component.mjs +1 -1
- package/esm2022/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -5
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +6 -7
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +5 -5
- package/esm2022/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +1 -1
- package/esm2022/lib/components/layout/main-layout.component.mjs +21 -25
- package/esm2022/lib/components/layout/topbar.component.mjs +8 -8
- package/esm2022/lib/components/layoutV2/main-layout.component.mjs +13 -10
- package/esm2022/lib/components/layoutV2/menu-item.component.mjs +48 -5
- package/esm2022/lib/components/layoutV2/menu.component.mjs +13 -4
- package/esm2022/lib/components/layoutV2/services/main-layout.component.service.mjs +11 -2
- package/esm2022/lib/components/layoutV2/sidebar.component.mjs +5 -5
- package/esm2022/lib/components/layoutV2/topbar.component.mjs +7 -12
- package/esm2022/lib/components/notification/notification-wrapper.component.mjs +50 -0
- package/esm2022/lib/components/table/column-filter-full/column-filter-full.component.mjs +466 -0
- package/esm2022/lib/components/table/column-value/column-value.component.mjs +87 -0
- package/esm2022/lib/components/table/models/table.event.mjs +16 -0
- package/esm2022/lib/components/table/models/table.interface.mjs +2 -0
- package/esm2022/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.mjs +25 -0
- package/esm2022/lib/components/table/table.component.mjs +717 -0
- package/esm2022/lib/components/tableview/index.mjs +1 -4
- package/esm2022/lib/components/tableview/route/tableview-route.abstract.component.mjs +5 -5
- package/esm2022/lib/components/tableview/route/tableview-route.component.mjs +3 -9
- package/esm2022/lib/components/tableview/tableview.component.mjs +18 -78
- package/esm2022/lib/descriptors/editor/editor.descriptor.mjs +1 -1
- package/esm2022/lib/descriptors/editor/field-lookup.descriptor.mjs +1 -2
- package/esm2022/lib/descriptors/filter/filter.descriptor.mjs +20 -20
- package/esm2022/lib/descriptors/table/table.descriptor.mjs +16 -17
- package/esm2022/lib/descriptors/tableview/tableview.descriptor.mjs +1 -1
- package/esm2022/lib/directives/component.directive.mjs +8 -4
- package/esm2022/lib/helpers/coercion.mjs +8 -1
- package/esm2022/lib/models/action-editor.model.mjs +1 -1
- package/esm2022/lib/models/config.model.mjs +1 -1
- package/esm2022/lib/models/index.mjs +2 -2
- package/esm2022/lib/models/layout-config.model.mjs +2 -0
- package/esm2022/lib/models/view-container.model.mjs +1 -1
- package/esm2022/lib/provide-commons.mjs +7 -1
- package/esm2022/lib/registry/type.registry.mjs +2 -3
- package/esm2022/lib/router/route-builder.mjs +1 -1
- package/esm2022/lib/services/action/action-executor.service.mjs +725 -0
- package/esm2022/lib/services/action/component-action-executor.service.mjs +19 -0
- package/esm2022/lib/services/action/index.mjs +5 -0
- package/esm2022/lib/services/action/provide-action-executor.mjs +9 -0
- package/esm2022/lib/services/action/root-action-executor.service.mjs +18 -0
- package/esm2022/lib/services/commons.service.mjs +5 -5
- package/esm2022/lib/services/index.mjs +1 -3
- package/esm2022/lib/services/logger.service.mjs +2 -2
- package/esm2022/lib/services/view/index.mjs +3 -0
- package/esm2022/lib/services/view/provide-view-container.mjs +17 -0
- package/esm2022/lib/services/view/view-container.service.mjs +59 -0
- package/esm2022/lib/utils/date.util.mjs +33 -23
- package/esm2022/lib/utils/notification.util.mjs +9 -16
- package/esm2022/lib/utils/string.util.mjs +2 -2
- package/esm2022/lib/utils/tableview.util.mjs +2 -2
- package/fesm2022/mediusinc-mng-commons.mjs +4305 -4121
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/index.d.ts +10 -1
- package/lib/components/action/action.component.d.ts +11 -17
- package/lib/components/action/editor/action-editor.component.d.ts +20 -80
- package/lib/components/action/editor/injector-context/action-editor-injector-context.component.d.ts +80 -0
- package/lib/components/action/index.d.ts +1 -0
- package/lib/components/action/localization/data-language-dropdown.component.d.ts +2 -3
- package/lib/components/action/models/action-component.model.d.ts +0 -2
- package/lib/components/action/models/action-execution.model.d.ts +6 -6
- package/lib/components/action/models/index.d.ts +0 -1
- package/lib/components/action/route/action-route.component.d.ts +6 -12
- package/lib/components/action/table/action-table.component.d.ts +50 -0
- package/lib/components/form/editor/form-editor.component.d.ts +4 -7
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +2 -4
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +0 -2
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +1 -3
- package/lib/components/layout/main-layout.component.d.ts +4 -7
- package/lib/components/layoutV2/main-layout.component.d.ts +4 -3
- package/lib/components/layoutV2/menu-item.component.d.ts +7 -3
- package/lib/components/layoutV2/menu.component.d.ts +2 -0
- package/lib/components/layoutV2/services/main-layout.component.service.d.ts +3 -0
- package/lib/components/layoutV2/sidebar.component.d.ts +1 -1
- package/lib/components/layoutV2/topbar.component.d.ts +2 -3
- package/lib/components/notification/notification-wrapper.component.d.ts +12 -0
- package/lib/components/{tableview/table → table}/column-filter-full/column-filter-full.component.d.ts +2 -2
- package/lib/components/{tableview/table → table}/column-value/column-value.component.d.ts +3 -3
- package/lib/components/{tableview/table → table}/models/table.interface.d.ts +3 -1
- package/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.d.ts +8 -0
- package/lib/components/table/table.component.d.ts +122 -0
- package/lib/components/tableview/index.d.ts +0 -3
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +2 -3
- package/lib/components/tableview/route/tableview-route.component.d.ts +0 -3
- package/lib/components/tableview/tableview.component.d.ts +4 -20
- package/lib/descriptors/editor/editor.descriptor.d.ts +1 -1
- package/lib/descriptors/filter/filter.descriptor.d.ts +7 -7
- package/lib/descriptors/table/table.descriptor.d.ts +15 -12
- package/lib/descriptors/tableview/tableview.descriptor.d.ts +1 -1
- package/lib/directives/component.directive.d.ts +3 -2
- package/lib/models/action-editor.model.d.ts +11 -0
- package/lib/models/config.model.d.ts +3 -13
- package/lib/models/index.d.ts +1 -1
- package/lib/models/layout-config.model.d.ts +33 -0
- package/lib/models/view-container.model.d.ts +0 -25
- package/lib/router/route-builder.d.ts +1 -1
- package/lib/services/{action-executor.service.d.ts → action/action-executor.service.d.ts} +32 -31
- package/lib/services/action/component-action-executor.service.d.ts +9 -0
- package/lib/services/action/index.d.ts +4 -0
- package/lib/services/action/provide-action-executor.d.ts +2 -0
- package/lib/services/action/root-action-executor.service.d.ts +9 -0
- package/lib/services/index.d.ts +0 -2
- package/lib/services/view/index.d.ts +2 -0
- package/lib/services/view/provide-view-container.d.ts +2 -0
- package/lib/services/view/view-container.service.d.ts +32 -0
- package/lib/utils/date.util.d.ts +12 -2
- package/lib/utils/notification.util.d.ts +6 -6
- package/openapi/angular/README.mustache +226 -0
- package/openapi/angular/api.module.mustache +39 -0
- package/openapi/angular/api.service.mustache +253 -0
- package/openapi/angular/apiInterface.mustache +47 -0
- package/openapi/angular/apis.mustache +12 -0
- package/openapi/angular/configuration.mustache +128 -0
- package/openapi/angular/custom/base-api.service.mustache +14 -0
- package/openapi/angular/custom/helpers.mustache +71 -0
- package/openapi/angular/custom/modelSchema.mustache +46 -0
- package/openapi/angular/custom/schema.mustache +18 -0
- package/openapi/angular/encoder.mustache +20 -0
- package/openapi/angular/git_push.sh.mustache +57 -0
- package/openapi/angular/index.mustache +0 -0
- package/openapi/angular/licenseInfo.mustache +11 -0
- package/openapi/angular/model.mustache +16 -0
- package/openapi/angular/modelAlias.mustache +1 -0
- package/openapi/angular/modelEnum.mustache +24 -0
- package/openapi/angular/modelGeneric.mustache +14 -0
- package/openapi/angular/modelGenericAdditionalProperties.mustache +5 -0
- package/openapi/angular/modelGenericEnums.mustache +30 -0
- package/openapi/angular/modelOneOf.mustache +14 -0
- package/openapi/angular/modelTaggedUnion.mustache +21 -0
- package/openapi/angular/models.mustache +5 -0
- package/openapi/angular/ng-package.mustache +6 -0
- package/openapi/angular/package.mustache +39 -0
- package/openapi/angular/param.mustache +69 -0
- package/openapi/angular/tsconfig.mustache +28 -0
- package/openapi/angular/variables.mustache +9 -0
- package/openapi/{templates → node}/model.mustache +3 -17
- package/package.json +2 -2
- package/scss/mng-commons-dark-v2.scss +1 -1
- package/scss/mng-commons-light-v2.scss +1 -1
- package/scss/mng-overrides/_theme_datatable.scss +24 -10
- package/scss/v2/layout/layout.scss +2 -2
- package/scss/v2/layout/mng/_mng_layout_topbar.scss +2 -0
- package/scss/v2/layout/preloading.scss +8 -8
- package/scss/v2/theme/theme-base/mng/_mng_theme_datatable.scss +24 -9
- package/scss/v2/theme/theme-dark/_variables.scss +24 -12
- package/scss/v2/theme/theme-dark/blue/theme.scss +4 -4
- package/scss/v2/theme/theme-light/_variables.scss +23 -11
- package/scss/v2/theme/theme-light/blue/theme.scss +2 -2
- package/esm2022/lib/components/action/models/action-confirmation-service.model.mjs +0 -2
- package/esm2022/lib/components/tableview/models/index.mjs +0 -2
- package/esm2022/lib/components/tableview/models/table.event.mjs +0 -16
- package/esm2022/lib/components/tableview/table/column-filter-full/column-filter-full.component.mjs +0 -467
- package/esm2022/lib/components/tableview/table/column-value/column-value.component.mjs +0 -87
- package/esm2022/lib/components/tableview/table/models/index.mjs +0 -2
- package/esm2022/lib/components/tableview/table/models/table.interface.mjs +0 -2
- package/esm2022/lib/components/tableview/table/table.component.mjs +0 -752
- package/esm2022/lib/models/menu-config.model.mjs +0 -2
- package/esm2022/lib/services/action-executor.service.mjs +0 -747
- package/esm2022/lib/services/view-container.component.service.mjs +0 -65
- package/lib/components/action/models/action-confirmation-service.model.d.ts +0 -6
- package/lib/components/tableview/models/index.d.ts +0 -1
- package/lib/components/tableview/table/models/index.d.ts +0 -1
- package/lib/components/tableview/table/table.component.d.ts +0 -147
- package/lib/models/menu-config.model.d.ts +0 -15
- package/lib/services/view-container.component.service.d.ts +0 -36
- /package/lib/components/{tableview → table}/models/table.event.d.ts +0 -0
- /package/openapi/{templates → node}/models.mustache +0 -0
package/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export * from './lib/provide-commons';
|
|
|
2
2
|
export * from './lib/api/services';
|
|
3
3
|
export * from './lib/components/layout/services';
|
|
4
4
|
export * from './lib/services';
|
|
5
|
+
export * from './lib/services/action';
|
|
6
|
+
export * from './lib/services/view';
|
|
5
7
|
export * from './lib/services/providers';
|
|
6
8
|
export * from './lib/services/tokens';
|
|
7
9
|
export * from './lib/api/utils';
|
|
@@ -11,15 +13,22 @@ export * from './lib/components/form';
|
|
|
11
13
|
export * from './lib/components/form/formly/fields';
|
|
12
14
|
export * from './lib/components/form/formly/wrappers';
|
|
13
15
|
export * from './lib/components/layout';
|
|
16
|
+
export * from './lib/components/layoutV2';
|
|
14
17
|
export * from './lib/components/tableview';
|
|
15
18
|
export * from './lib/components/pages';
|
|
19
|
+
export * from './lib/components/notification/notification-wrapper.component';
|
|
16
20
|
export * from './lib/directives';
|
|
17
21
|
export * from './lib/pipes';
|
|
18
22
|
export * from './lib/registry/type.registry';
|
|
19
23
|
export * from './lib/api/models';
|
|
20
24
|
export * from './lib/components/action/models';
|
|
21
25
|
export * from './lib/components/form/models';
|
|
22
|
-
export * from './lib/components/tableview
|
|
26
|
+
export * from './lib/components/tableview';
|
|
27
|
+
export * from './lib/components/table/table.component';
|
|
28
|
+
export * from './lib/components/table/models/table.event';
|
|
29
|
+
export * from './lib/components/table/models/table.interface';
|
|
30
|
+
export * from './lib/components/table/column-filter-full/column-filter-full.component';
|
|
31
|
+
export * from './lib/components/table/column-value/column-value.component';
|
|
23
32
|
export * from './lib/components/form/formly/models';
|
|
24
33
|
export * from './lib/components/form/formly';
|
|
25
34
|
export * from './lib/data-providers';
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import {
|
|
4
|
+
import { MenuItem } from 'primeng/api';
|
|
5
5
|
import { Menu } from 'primeng/menu';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
7
|
import { MediusQueryParam } from '../../api/models';
|
|
8
8
|
import { IDataProvider } from '../../data-providers';
|
|
9
9
|
import { ActionDescriptorInst, ActionLinkDescriptorInst } from '../../descriptors/action';
|
|
10
|
-
import { IViewContainer } from '../../models';
|
|
11
10
|
import { MngAuthorizationService } from '../../security';
|
|
12
|
-
import { MngActionExecutorService
|
|
11
|
+
import { MngActionExecutorService } from '../../services/action';
|
|
12
|
+
import { ViewContainer } from '../../services/view';
|
|
13
13
|
import { IdType } from '../../types';
|
|
14
|
-
import { ActionData, ActionInstance, ActionParameters, IActionComponent
|
|
14
|
+
import { ActionData, ActionInstance, ActionParameters, IActionComponent } from './models';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
|
-
export declare class MngActionComponent<T = any, S = any> implements OnInit, OnChanges, OnDestroy
|
|
16
|
+
export declare class MngActionComponent<T = any, S = any> implements OnInit, OnChanges, OnDestroy {
|
|
17
17
|
private routeService;
|
|
18
18
|
private translate;
|
|
19
19
|
private authorization;
|
|
20
20
|
private actionExecutor;
|
|
21
|
-
private
|
|
22
|
-
private viewContainerService;
|
|
21
|
+
private viewContainer;
|
|
23
22
|
hostClass: string;
|
|
24
23
|
isHostHidden: boolean;
|
|
25
24
|
action: ActionDescriptorInst<T, S>;
|
|
@@ -32,13 +31,11 @@ export declare class MngActionComponent<T = any, S = any> implements OnInit, OnC
|
|
|
32
31
|
routeInit?: ActivatedRoute;
|
|
33
32
|
inputDisabled: Observable<boolean>;
|
|
34
33
|
inputLoading: Observable<boolean>;
|
|
35
|
-
viewContainerInit?: IViewContainer<T, S>;
|
|
36
34
|
selectedItems: Array<T>;
|
|
37
35
|
finishEventEmitter: EventEmitter<ActionInstance<T, S>>;
|
|
38
36
|
subactionsMenu?: Menu;
|
|
39
37
|
private loadingSubject;
|
|
40
38
|
$loading: Observable<boolean>;
|
|
41
|
-
cmpId: string;
|
|
42
39
|
private isVisibleSubject;
|
|
43
40
|
private isVisibleSubscription?;
|
|
44
41
|
$isVisible: Observable<boolean>;
|
|
@@ -54,7 +51,6 @@ export declare class MngActionComponent<T = any, S = any> implements OnInit, OnC
|
|
|
54
51
|
private tooltipSubject;
|
|
55
52
|
private tooltipSubscription?;
|
|
56
53
|
$tooltip: Observable<string | null>;
|
|
57
|
-
viewContainer?: IViewContainer<T, S>;
|
|
58
54
|
actionLink?: ActionLinkDescriptorInst<T>;
|
|
59
55
|
hasNoTitle: boolean;
|
|
60
56
|
private subscriptions;
|
|
@@ -65,18 +61,16 @@ export declare class MngActionComponent<T = any, S = any> implements OnInit, OnC
|
|
|
65
61
|
private subactionSubscriptions;
|
|
66
62
|
actionOrSubactionHasRunConfirmation: boolean;
|
|
67
63
|
private instance?;
|
|
68
|
-
constructor(routeService: ActivatedRoute, translate: TranslateService, authorization: MngAuthorizationService, actionExecutor: MngActionExecutorService,
|
|
64
|
+
constructor(routeService: ActivatedRoute, translate: TranslateService, authorization: MngAuthorizationService, actionExecutor: MngActionExecutorService, viewContainer: ViewContainer<T, S> | null);
|
|
69
65
|
ngOnInit(): void;
|
|
70
66
|
ngOnChanges(changes: SimpleChanges): void;
|
|
71
67
|
ngOnDestroy(): void;
|
|
72
|
-
triggerAction(action: ActionDescriptorInst<T, S>, parameters?: ActionParameters<T
|
|
73
|
-
getConfirmationService(): ConfirmationService;
|
|
74
|
-
getConfirmationServiceInstanceKey(): string;
|
|
68
|
+
triggerAction(action: ActionDescriptorInst<T, S>, parameters?: ActionParameters<T>, event?: Event): void;
|
|
75
69
|
onCustomActionCmpInst(instance: IActionComponent<T>): void;
|
|
76
70
|
private processSubactions;
|
|
77
71
|
private processSubscriptions;
|
|
78
|
-
|
|
79
|
-
static
|
|
80
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": { "alias": "action"; "required": true; }; "item": { "alias": "item"; "required": false; }; "itemId": { "alias": "itemId"; "required": false; }; "actionData": { "alias": "actionData"; "required": false; }; "queryParam": { "alias": "queryParam"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "hostComponent": { "alias": "hostComponent"; "required": false; }; "routeInit": { "alias": "route"; "required": false; }; "inputDisabled": { "alias": "disabled"; "required": false; }; "inputLoading": { "alias": "loading"; "required": false; }; "viewContainerInit": { "alias": "viewContainer"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; }, { "finishEventEmitter": "finish"; }, never, never, true, never>;
|
|
72
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, [null, null, null, null, { optional: true; }]>;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": { "alias": "action"; "required": true; }; "item": { "alias": "item"; "required": false; }; "itemId": { "alias": "itemId"; "required": false; }; "actionData": { "alias": "actionData"; "required": false; }; "queryParam": { "alias": "queryParam"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "hostComponent": { "alias": "hostComponent"; "required": false; }; "routeInit": { "alias": "route"; "required": false; }; "inputDisabled": { "alias": "disabled"; "required": false; }; "inputLoading": { "alias": "loading"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; }, { "finishEventEmitter": "finish"; }, never, never, true, never>;
|
|
81
74
|
static ngAcceptInputType_inputDisabled: unknown;
|
|
75
|
+
static ngAcceptInputType_inputLoading: unknown;
|
|
82
76
|
}
|
|
@@ -1,93 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ConfirmationService } from 'primeng/api';
|
|
5
|
-
import { DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
import { IEditorDataProvider } from '../../../data-providers';
|
|
8
|
-
import { ActionDescriptorInst, ActionEditorDescriptorInst } from '../../../descriptors/action';
|
|
9
|
-
import { ActionActivationTriggerEnum, ActionEditorSubmitTypeEnum } from '../../../descriptors/types';
|
|
10
|
-
import { MngTemplateDirective } from '../../../directives';
|
|
11
|
-
import { IActionEditorComponent, IViewContainer } from '../../../models';
|
|
12
|
-
import { MngActionExecutorService, MngCommonsService, MngViewContainerComponentService } from '../../../services';
|
|
1
|
+
import { DestroyRef, EventEmitter, Injector, OnChanges, OnInit, SimpleChanges, Type } from '@angular/core';
|
|
2
|
+
import { IDataProvider } from '../../../data-providers';
|
|
3
|
+
import { ActionEditorDescriptorInst } from '../../../descriptors/action';
|
|
13
4
|
import { IdType } from '../../../types';
|
|
14
|
-
import { MngFormEditorComponent } from '../../form';
|
|
15
|
-
import { MngFormEditorSubmitEvent } from '../../form/models';
|
|
16
5
|
import { ActionData } from '../models';
|
|
6
|
+
import { ActionEditorInjectorContextInputData, MngActionEditorInjectorContextComponent } from './injector-context/action-editor-injector-context.component';
|
|
17
7
|
import * as i0 from "@angular/core";
|
|
18
8
|
import * as i1 from "../../../directives/dialog-keydown-handler.directive";
|
|
19
|
-
export declare class MngActionEditorComponent<T = any, S = any> implements OnInit, OnChanges
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
private dialogService;
|
|
25
|
-
private dialogConfig;
|
|
26
|
-
private viewContainerService;
|
|
27
|
-
protected readonly ActionActivationTriggerEnum: typeof ActionActivationTriggerEnum;
|
|
28
|
-
readonly cmpId: string;
|
|
29
|
-
readonly confirmDialogKey: string;
|
|
30
|
-
readonly actionEditorSubmitTypeSubmit = ActionEditorSubmitTypeEnum.Submit;
|
|
31
|
-
readonly actionDefaultLoadingInput: Observable<boolean>;
|
|
32
|
-
private readonly logger;
|
|
9
|
+
export declare class MngActionEditorComponent<T = any, S = any> implements OnInit, OnChanges {
|
|
10
|
+
readonly injContextCmpType: Type<any>;
|
|
11
|
+
injector: Injector;
|
|
12
|
+
readonly destroyRef: DestroyRef;
|
|
13
|
+
private readonly dialogConfig;
|
|
33
14
|
action: ActionEditorDescriptorInst<T, S>;
|
|
34
|
-
|
|
35
|
-
|
|
15
|
+
itemIdInput?: IdType;
|
|
16
|
+
itemInput?: T;
|
|
36
17
|
actionData?: ActionData;
|
|
37
|
-
dataProvider?:
|
|
38
|
-
viewContainerInit?: IViewContainer<T, S>;
|
|
18
|
+
dataProvider?: IDataProvider<T, S>;
|
|
39
19
|
actionRunEventEmitter: EventEmitter<T | null | undefined>;
|
|
40
20
|
actionCancelEventEmitter: EventEmitter<T | null | undefined>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
isFormDisabled: boolean;
|
|
47
|
-
itemId?: IdType;
|
|
48
|
-
item?: T;
|
|
49
|
-
private instance?;
|
|
50
|
-
private instanceStateSubscription?;
|
|
51
|
-
private instanceReactivationSubscription?;
|
|
52
|
-
private instanceSubmitFormItem?;
|
|
53
|
-
private instanceSubmitResult?;
|
|
54
|
-
private previousActionInstance?;
|
|
55
|
-
toolbarLeftActions: ActionDescriptorInst<T, S>[];
|
|
56
|
-
toolbarRightActions: ActionDescriptorInst<T, S>[];
|
|
57
|
-
footerLeftActions: ActionDescriptorInst<T, S>[];
|
|
58
|
-
footerRightActions: ActionDescriptorInst<T, S>[];
|
|
59
|
-
private loadingSubject;
|
|
60
|
-
loading$: Observable<boolean>;
|
|
61
|
-
private fetchExecutionSubscription?;
|
|
62
|
-
private submitActionIdSubject;
|
|
63
|
-
private submitLoadingSubject;
|
|
64
|
-
submitLoading$: Observable<boolean>;
|
|
65
|
-
private submitExecutionSubscription?;
|
|
66
|
-
viewContainer?: IViewContainer<T, S>;
|
|
67
|
-
dialogRoute?: ActivatedRoute;
|
|
68
|
-
private sourceComponent;
|
|
69
|
-
private subscriptions;
|
|
70
|
-
constructor(translate: TranslateService, actionExecutor: MngActionExecutorService, mngCommonsService: MngCommonsService, confirmationService: ConfirmationService, dialogService: DialogService, dialogConfig: DynamicDialogConfig | null, viewContainerService: MngViewContainerComponentService<T, S> | null);
|
|
21
|
+
private actionEditorWInjContextCmp?;
|
|
22
|
+
actionEditorWInjContextInputData?: ActionEditorInjectorContextInputData<T, S>;
|
|
23
|
+
private isDialog;
|
|
24
|
+
get actionEditor(): MngActionEditorInjectorContextComponent<T, S> | undefined;
|
|
25
|
+
get formEditorCmp(): import("@mediusinc/mng-commons").MngFormEditorComponent<any> | undefined;
|
|
71
26
|
ngOnInit(): void;
|
|
72
27
|
ngOnChanges(changes: SimpleChanges): void;
|
|
73
|
-
|
|
74
|
-
onSubmit(event: MngFormEditorSubmitEvent<T>): void;
|
|
28
|
+
onActionEditorWInjContextCmp(cmp: MngActionEditorInjectorContextComponent<T, S>): void;
|
|
75
29
|
cancel(): void;
|
|
76
30
|
triggerSubmit(): void;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
private initializeSubActions;
|
|
80
|
-
private fetchItem;
|
|
81
|
-
private updateTitle;
|
|
82
|
-
private placeActionsOnPositions;
|
|
83
|
-
private initializeViewContainer;
|
|
84
|
-
private setEditorEnabled;
|
|
85
|
-
private processActionInstance;
|
|
86
|
-
private beforeWindowUnload;
|
|
87
|
-
private onEscapePressed;
|
|
88
|
-
private showUnsavedChangesConfirmationDialog;
|
|
89
|
-
closeWithUnsavedChangesConfirmation(callFromGuard?: boolean): Observable<boolean>;
|
|
90
|
-
private unsetInstance;
|
|
91
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionEditorComponent<any, any>, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
92
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionEditorComponent<any, any>, "mng-action-editor", never, { "action": { "alias": "action"; "required": true; }; "itemIdInit": { "alias": "itemId"; "required": false; }; "itemInit": { "alias": "item"; "required": false; }; "actionData": { "alias": "actionData"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "viewContainerInit": { "alias": "viewContainer"; "required": false; }; }, { "actionRunEventEmitter": "actionSubmit"; "actionCancelEventEmitter": "actionCancel"; }, ["templates"], never, true, [{ directive: typeof i1.MngDialogKeydownHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionEditorComponent<any, any>, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionEditorComponent<any, any>, "mng-action-editor", never, { "action": { "alias": "action"; "required": true; }; "itemIdInput": { "alias": "itemId"; "required": false; }; "itemInput": { "alias": "item"; "required": false; }; "actionData": { "alias": "actionData"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; }, { "actionRunEventEmitter": "actionSubmit"; "actionCancelEventEmitter": "actionCancel"; }, never, never, true, [{ directive: typeof i1.MngDialogKeydownHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
93
33
|
}
|
package/lib/components/action/editor/injector-context/action-editor-injector-context.component.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit, WritableSignal } from '@angular/core';
|
|
2
|
+
import { DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { IDataProvider } from '../../../../data-providers';
|
|
5
|
+
import { ActionDescriptorInst, ActionEditorDescriptorInst } from '../../../../descriptors/action';
|
|
6
|
+
import { ActionActivationTriggerEnum, ActionEditorSubmitTypeEnum } from '../../../../descriptors/types';
|
|
7
|
+
import { IActionEditorComponent } from '../../../../models';
|
|
8
|
+
import { IdType } from '../../../../types';
|
|
9
|
+
import { MngFormEditorComponent } from '../../../form';
|
|
10
|
+
import { MngFormEditorSubmitEvent } from '../../../form/models';
|
|
11
|
+
import { ActionData, ActionInstance } from '../../models';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
export declare class MngActionEditorInjectorContextComponent<T = any, S = any> implements OnInit, OnDestroy, IActionEditorComponent {
|
|
14
|
+
protected readonly ActionActivationTriggerEnum: typeof ActionActivationTriggerEnum;
|
|
15
|
+
readonly actionEditorSubmitTypeSubmit = ActionEditorSubmitTypeEnum.Submit;
|
|
16
|
+
private readonly destroyRef;
|
|
17
|
+
private readonly route;
|
|
18
|
+
private readonly translate;
|
|
19
|
+
private readonly confirmationService;
|
|
20
|
+
private readonly dialogService;
|
|
21
|
+
private readonly logger;
|
|
22
|
+
private readonly commonsService;
|
|
23
|
+
private readonly actionExecutor;
|
|
24
|
+
private readonly viewContainer;
|
|
25
|
+
data: ActionEditorInjectorContextInputData<T, S>;
|
|
26
|
+
actionRunEventEmitter: EventEmitter<T | null | undefined>;
|
|
27
|
+
actionCancelEventEmitter: EventEmitter<T | null | undefined>;
|
|
28
|
+
submitButtonElementRef: ElementRef;
|
|
29
|
+
formEditorCmp?: MngFormEditorComponent;
|
|
30
|
+
title: WritableSignal<string | undefined>;
|
|
31
|
+
isFormDisabled: WritableSignal<boolean>;
|
|
32
|
+
item: WritableSignal<T | undefined>;
|
|
33
|
+
itemId: WritableSignal<IdType | undefined>;
|
|
34
|
+
actionData: WritableSignal<ActionData | undefined>;
|
|
35
|
+
toolbarLeftActions: WritableSignal<ActionDescriptorInst<T, S>[]>;
|
|
36
|
+
toolbarRightActions: WritableSignal<ActionDescriptorInst<T, S>[]>;
|
|
37
|
+
footerLeftActions: WritableSignal<ActionDescriptorInst<T, S>[]>;
|
|
38
|
+
footerRightActions: WritableSignal<ActionDescriptorInst<T, S>[]>;
|
|
39
|
+
private instance?;
|
|
40
|
+
private instanceStateSubscription?;
|
|
41
|
+
private instanceReactivationSubscription?;
|
|
42
|
+
private instanceSubmitFormItem?;
|
|
43
|
+
private instanceSubmitResult?;
|
|
44
|
+
loading: WritableSignal<boolean>;
|
|
45
|
+
private fetchExecutionSubscription?;
|
|
46
|
+
submitLoading: WritableSignal<boolean>;
|
|
47
|
+
private submitExecutionSubscription?;
|
|
48
|
+
constructor();
|
|
49
|
+
ngOnInit(): void;
|
|
50
|
+
ngOnDestroy(): void;
|
|
51
|
+
onSubmit(event: MngFormEditorSubmitEvent<T>): void;
|
|
52
|
+
cancel(): void;
|
|
53
|
+
updateItemId(itemId: IdType | undefined): void;
|
|
54
|
+
updateItem(item: T | undefined): void;
|
|
55
|
+
triggerSubmit(): void;
|
|
56
|
+
private initializeSubActions;
|
|
57
|
+
private fetchItem;
|
|
58
|
+
private updateTitle;
|
|
59
|
+
private placeActionsOnPositions;
|
|
60
|
+
private setEditorEnabled;
|
|
61
|
+
private processActionInstance;
|
|
62
|
+
private unsetInstance;
|
|
63
|
+
private beforeWindowUnload;
|
|
64
|
+
private onEscapePressed;
|
|
65
|
+
private showUnsavedChangesConfirmationDialog;
|
|
66
|
+
closeWithUnsavedChangesConfirmation(callFromGuard?: boolean): Observable<boolean>;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionEditorInjectorContextComponent<any, any>, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionEditorInjectorContextComponent<any, any>, "mng-action-editor-injector-context", never, { "data": { "alias": "data"; "required": true; }; }, { "actionRunEventEmitter": "actionSubmit"; "actionCancelEventEmitter": "actionCancel"; }, never, never, true, never>;
|
|
69
|
+
}
|
|
70
|
+
export interface ActionEditorInjectorContextInputData<T, S> {
|
|
71
|
+
descriptor: ActionEditorDescriptorInst<T, S>;
|
|
72
|
+
isDialog: boolean;
|
|
73
|
+
dialogConfig?: DynamicDialogConfig;
|
|
74
|
+
itemId?: IdType;
|
|
75
|
+
item?: T;
|
|
76
|
+
actionData?: ActionData;
|
|
77
|
+
dataProvider?: IDataProvider<T, S>;
|
|
78
|
+
actionInstance?: ActionInstance<T, S>;
|
|
79
|
+
previousActionInstance?: ActionInstance<any, any>;
|
|
80
|
+
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { LookupDataProviderInst } from '../../../data-providers';
|
|
3
3
|
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
4
|
-
import { IViewContainer } from '../../../models';
|
|
5
4
|
import { MngCommonsService } from '../../../services';
|
|
6
5
|
import { IdType } from '../../../types';
|
|
7
6
|
import { ActionData, ActionParameters, IActionComponent } from '../models';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class MngDataLanguageDropdownComponent<T = any> implements IActionComponent<T> {
|
|
10
9
|
mngCommons: MngCommonsService;
|
|
10
|
+
private readonly viewContainer;
|
|
11
11
|
action: ActionDescriptorInst<T>;
|
|
12
12
|
actionData: ActionData;
|
|
13
13
|
item: T;
|
|
14
14
|
itemId: IdType;
|
|
15
15
|
enabled: boolean;
|
|
16
16
|
loading: boolean;
|
|
17
|
-
viewContainer: IViewContainer<T>;
|
|
18
17
|
triggerActionEventEmitter: EventEmitter<ActionParameters<T>>;
|
|
19
18
|
private dropdown?;
|
|
20
19
|
selectionItemsDataProvider: LookupDataProviderInst<string>;
|
|
21
20
|
constructor(mngCommons: MngCommonsService);
|
|
22
21
|
updateDataLanguage(dataLang: string): void;
|
|
23
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngDataLanguageDropdownComponent<any>, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngDataLanguageDropdownComponent<any>, "mng-data-language-dropdown", never, { "action": { "alias": "action"; "required": true; }; "actionData": { "alias": "actionData"; "required": true; }; "item": { "alias": "item"; "required": true; }; "itemId": { "alias": "itemId"; "required": true; }; "enabled": { "alias": "enabled"; "required": true; }; "loading": { "alias": "loading"; "required": true; };
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngDataLanguageDropdownComponent<any>, "mng-data-language-dropdown", never, { "action": { "alias": "action"; "required": true; }; "actionData": { "alias": "actionData"; "required": true; }; "item": { "alias": "item"; "required": true; }; "itemId": { "alias": "itemId"; "required": true; }; "enabled": { "alias": "enabled"; "required": true; }; "loading": { "alias": "loading"; "required": true; }; }, { "triggerActionEventEmitter": "triggerActionEventEmitter"; }, never, never, true, never>;
|
|
25
24
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
3
|
-
import { IViewContainer } from '../../../models';
|
|
4
3
|
import { IdType } from '../../../types';
|
|
5
4
|
import { ActionData, ActionParameters } from './action-execution.model';
|
|
6
5
|
export interface IActionComponent<T = any, S = undefined> {
|
|
@@ -10,6 +9,5 @@ export interface IActionComponent<T = any, S = undefined> {
|
|
|
10
9
|
actionData: ActionData;
|
|
11
10
|
enabled: boolean;
|
|
12
11
|
loading: boolean;
|
|
13
|
-
viewContainer: IViewContainer<T, S>;
|
|
14
12
|
triggerActionEventEmitter: EventEmitter<ActionParameters<T>>;
|
|
15
13
|
}
|
|
@@ -5,7 +5,8 @@ import { BehaviorSubject, Observable, ReplaySubject, Subscription } from 'rxjs';
|
|
|
5
5
|
import { MediusQueryParam } from '../../../api/models';
|
|
6
6
|
import { IDataProvider } from '../../../data-providers';
|
|
7
7
|
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
8
|
-
import { IActionEditorComponent, IMngError
|
|
8
|
+
import { IActionEditorComponent, IMngError } from '../../../models';
|
|
9
|
+
import { ViewContainer } from '../../../services/view';
|
|
9
10
|
import { IdType } from '../../../types';
|
|
10
11
|
export declare class ActionError {
|
|
11
12
|
readonly error: any;
|
|
@@ -68,10 +69,11 @@ export declare class ActionInstance<T, S> {
|
|
|
68
69
|
*/
|
|
69
70
|
export declare class ActionContext<T, S = any | undefined> {
|
|
70
71
|
readonly instance: ActionInstance<T, S>;
|
|
71
|
-
readonly parameters: ActionParameters<T
|
|
72
|
+
readonly parameters: ActionParameters<T>;
|
|
72
73
|
readonly functionName: 'run' | 'fetch' | 'submit';
|
|
73
74
|
readonly serviceInstance: S;
|
|
74
75
|
readonly dataProvider?: IDataProvider<T, S> | undefined;
|
|
76
|
+
readonly viewContainer?: ViewContainer<T, S> | undefined;
|
|
75
77
|
private readonly executionSubject;
|
|
76
78
|
private readonly executionIsRunningSubject;
|
|
77
79
|
private readonly logger;
|
|
@@ -80,7 +82,7 @@ export declare class ActionContext<T, S = any | undefined> {
|
|
|
80
82
|
confirmation?: Confirmation;
|
|
81
83
|
notification?: Message;
|
|
82
84
|
runSubscription?: Subscription;
|
|
83
|
-
constructor(instance: ActionInstance<T, S>, parameters: ActionParameters<T
|
|
85
|
+
constructor(instance: ActionInstance<T, S>, parameters: ActionParameters<T>, functionName: 'run' | 'fetch' | 'submit', serviceInstance: S, dataProvider?: IDataProvider<T, S> | undefined, viewContainer?: ViewContainer<T, S> | undefined, executionSubject?: ReplaySubject<T | null | undefined>, executionIsRunningSubject?: BehaviorSubject<boolean>);
|
|
84
86
|
get execution$(): Observable<T | null | undefined>;
|
|
85
87
|
get executionIsRunning$(): Observable<boolean>;
|
|
86
88
|
executionStart(): void;
|
|
@@ -100,12 +102,11 @@ export declare class ActionContextValidation<T, S = undefined> {
|
|
|
100
102
|
readonly dataProvider?: IDataProvider<T, S> | undefined;
|
|
101
103
|
constructor(descriptor: ActionDescriptorInst<T, S>, parameters: ActionParameters<T>, serviceInstance: S, dataProvider?: IDataProvider<T, S> | undefined);
|
|
102
104
|
}
|
|
103
|
-
export declare class ActionParameters<T
|
|
105
|
+
export declare class ActionParameters<T> {
|
|
104
106
|
itemId?: IdType | undefined;
|
|
105
107
|
item?: T | undefined;
|
|
106
108
|
actionData?: ActionData;
|
|
107
109
|
queryParam?: MediusQueryParam;
|
|
108
|
-
viewContainer?: IViewContainer<T, S>;
|
|
109
110
|
sourceComponent?: any;
|
|
110
111
|
hostComponent?: unknown;
|
|
111
112
|
route?: ActivatedRoute;
|
|
@@ -116,7 +117,6 @@ export declare class ActionParameters<T, S = any | undefined> {
|
|
|
116
117
|
constructor(itemId?: IdType | undefined, item?: T | undefined);
|
|
117
118
|
withActionData(actionData?: ActionData): this;
|
|
118
119
|
withQueryParam(queryParam?: MediusQueryParam): this;
|
|
119
|
-
withViewContainer(viewContainer?: IViewContainer<T, S>): this;
|
|
120
120
|
withSourceComponent(sourceComponent?: any): this;
|
|
121
121
|
withHostComponent(hostComponent?: unknown): this;
|
|
122
122
|
withRoute(route?: ActivatedRoute): this;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
import { ConfirmationService } from 'primeng/api';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
6
4
|
import { CanComponentDeactivate } from '../../../models';
|
|
7
|
-
import { MngActionExecutorService
|
|
8
|
-
import {
|
|
5
|
+
import { MngActionExecutorService } from '../../../services/action';
|
|
6
|
+
import { ViewContainer } from '../../../services/view';
|
|
9
7
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy, CanComponentDeactivate
|
|
8
|
+
export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy, CanComponentDeactivate {
|
|
11
9
|
private router;
|
|
12
10
|
private route;
|
|
13
|
-
private confirmationService;
|
|
14
|
-
private navigationService;
|
|
15
11
|
private actionExecutor;
|
|
16
|
-
private
|
|
12
|
+
private viewContainer;
|
|
17
13
|
cmpId: string;
|
|
18
14
|
private actions;
|
|
19
15
|
private instance?;
|
|
@@ -21,17 +17,15 @@ export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy,
|
|
|
21
17
|
private instanceReactivationSubscription?;
|
|
22
18
|
private subscriptions;
|
|
23
19
|
private isRouterNavigationInProgress;
|
|
24
|
-
constructor(router: Router, route: ActivatedRoute,
|
|
20
|
+
constructor(router: Router, route: ActivatedRoute, actionExecutor: MngActionExecutorService, viewContainer: ViewContainer<T, S> | null);
|
|
25
21
|
ngOnInit(): void;
|
|
26
22
|
ngOnDestroy(): void;
|
|
27
|
-
getConfirmationService(): ConfirmationService;
|
|
28
|
-
getConfirmationServiceInstanceKey(action: ActionDescriptorInst<any>): string;
|
|
29
23
|
private activateAction;
|
|
30
24
|
private untriggerAction;
|
|
31
25
|
private findActionForRoute;
|
|
32
26
|
private processActionInstance;
|
|
33
27
|
canDeactivate(): Observable<boolean>;
|
|
34
28
|
private unsetInstance;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionRouteComponent<any, any>, [null, null, null,
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionRouteComponent<any, any>, [null, null, null, { optional: true; }]>;
|
|
36
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionRouteComponent<any, any>, "mng-action-route", never, {}, {}, never, never, true, never>;
|
|
37
31
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AfterContentInit, EventEmitter, OnInit, QueryList, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { MediusQueryResult } from '../../../api/models';
|
|
4
|
+
import { ITableDataProvider } from '../../../data-providers';
|
|
5
|
+
import { ActionDescriptorInst } from '../../../descriptors/action';
|
|
6
|
+
import { TableDescriptorInst } from '../../../descriptors/table';
|
|
7
|
+
import { MngComponentDirective, MngTemplateDirective } from '../../../directives';
|
|
8
|
+
import { ActionInstance } from '../../action/models';
|
|
9
|
+
import { MngTableCellClickEvent, MngTableLoadEvent } from '../../table/models/table.event';
|
|
10
|
+
import { MngTableComponent } from '../../table/table.component';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class MngActionTableComponent<T = any, S = any> implements OnInit, AfterContentInit {
|
|
13
|
+
private readonly route;
|
|
14
|
+
private readonly actionExecutor;
|
|
15
|
+
private readonly viewContainerService;
|
|
16
|
+
descriptor: TableDescriptorInst<T>;
|
|
17
|
+
items?: Observable<Array<T>> | Array<T>;
|
|
18
|
+
queryResult?: Observable<MediusQueryResult<T>>;
|
|
19
|
+
loading?: Observable<boolean>;
|
|
20
|
+
dataProvider?: ITableDataProvider;
|
|
21
|
+
useQueryParams: boolean;
|
|
22
|
+
selectionMode: 'single' | 'multiple';
|
|
23
|
+
selectionEnabled: boolean;
|
|
24
|
+
globalFilterFields?: string[];
|
|
25
|
+
actions: Array<ActionDescriptorInst<any>>;
|
|
26
|
+
captionComponent?: Type<any>;
|
|
27
|
+
columnActionComponent?: Type<any>;
|
|
28
|
+
columnActionMinWidth?: number;
|
|
29
|
+
loadEventEmitter: EventEmitter<MngTableLoadEvent>;
|
|
30
|
+
selectionChangeEventEmitter: EventEmitter<T[]>;
|
|
31
|
+
captionCmpInstEventEmitter: EventEmitter<any>;
|
|
32
|
+
columnActionCmpInstEventEmitter: EventEmitter<any>;
|
|
33
|
+
templates: QueryList<MngTemplateDirective>;
|
|
34
|
+
components: QueryList<MngComponentDirective<any>>;
|
|
35
|
+
table: MngTableComponent;
|
|
36
|
+
captionTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
37
|
+
footerTemplate: WritableSignal<TemplateRef<any> | undefined>;
|
|
38
|
+
rowClickActions: WritableSignal<ActionDescriptorInst<T>[]>;
|
|
39
|
+
rowInlineActions: WritableSignal<ActionDescriptorInst<T>[]>;
|
|
40
|
+
ngOnInit(): void;
|
|
41
|
+
ngAfterContentInit(): void;
|
|
42
|
+
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
43
|
+
onCellClick(event: MngTableCellClickEvent<T>): void;
|
|
44
|
+
onSelectionChange(items: Array<T>): void;
|
|
45
|
+
onActionFinish(runResult: ActionInstance<T, S>): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionTableComponent<any, any>, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionTableComponent<any, any>, "mng-action-table", never, { "descriptor": { "alias": "descriptor"; "required": true; }; "items": { "alias": "items"; "required": false; }; "queryResult": { "alias": "queryResult"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "dataProvider": { "alias": "dataProvider"; "required": false; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "captionComponent": { "alias": "captionComponent"; "required": false; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; }; "columnActionMinWidth": { "alias": "columnActionMinWidth"; "required": false; }; }, { "loadEventEmitter": "tableLoad"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnActionCmpInstEventEmitter": "columnActionComponentInstance"; }, ["templates"], never, true, never>;
|
|
48
|
+
static ngAcceptInputType_queryResult: unknown;
|
|
49
|
+
static ngAcceptInputType_loading: unknown;
|
|
50
|
+
}
|
|
@@ -5,19 +5,16 @@ import { Message } from 'primeng/api';
|
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { EditorDescriptorInst } from '../../../descriptors/editor';
|
|
7
7
|
import { MngTemplateDirective } from '../../../directives';
|
|
8
|
-
import { IViewContainer } from '../../../models';
|
|
9
8
|
import { IFormEditorComponent, MngFormEditorSubmitEvent } from '../models';
|
|
10
9
|
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class MngFormEditorComponent<T = any
|
|
10
|
+
export declare class MngFormEditorComponent<T = any> implements IFormEditorComponent<T>, OnInit, OnChanges, OnDestroy {
|
|
12
11
|
private readonly translateService;
|
|
13
12
|
private readonly mngCommonsService;
|
|
14
13
|
private readonly logger;
|
|
14
|
+
private viewContainer;
|
|
15
15
|
descriptor?: EditorDescriptorInst<T>;
|
|
16
16
|
submitLoading: Observable<boolean> | boolean;
|
|
17
17
|
item?: T;
|
|
18
|
-
viewContainerInit?: IViewContainer<T, S>;
|
|
19
|
-
private viewContainerSubject;
|
|
20
|
-
viewContainer$: Observable<IViewContainer<T, unknown>>;
|
|
21
18
|
isFormDisabled: boolean;
|
|
22
19
|
formSubmitEventEmitter: EventEmitter<MngFormEditorSubmitEvent<T>>;
|
|
23
20
|
templates: QueryList<MngTemplateDirective>;
|
|
@@ -49,6 +46,6 @@ export declare class MngFormEditorComponent<T = any, S = any> implements IFormEd
|
|
|
49
46
|
* Possible options are: disabled, add or edit.
|
|
50
47
|
*/
|
|
51
48
|
private setInitialFormState;
|
|
52
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormEditorComponent<any
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormEditorComponent<any
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormEditorComponent<any>, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormEditorComponent<any>, "mng-form-editor", never, { "descriptor": { "alias": "descriptor"; "required": false; }; "submitLoading": { "alias": "submitLoading"; "required": false; }; "item": { "alias": "item"; "required": false; }; "isFormDisabled": { "alias": "isFormDisabled"; "required": false; }; }, { "formSubmitEventEmitter": "formSubmit"; }, ["templates"], never, true, never>;
|
|
54
51
|
}
|
|
@@ -6,13 +6,12 @@ import { Observable, Subject } from 'rxjs';
|
|
|
6
6
|
import { MediusQueryResult } from '../../../../../api/models';
|
|
7
7
|
import { FieldLookupDescriptor } from '../../../../../descriptors/editor';
|
|
8
8
|
import { FieldLookupConfig } from '../../../../../descriptors/interfaces';
|
|
9
|
-
import {
|
|
10
|
-
import { MngTableComponent } from '../../../../tableview';
|
|
9
|
+
import { MngTableComponent } from '../../../../table/table.component';
|
|
11
10
|
import { MngFormlyFieldConfig } from '../../models';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
12
|
export declare class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
14
13
|
private injector;
|
|
15
|
-
mngTable?: MngTableComponent
|
|
14
|
+
mngTable?: MngTableComponent;
|
|
16
15
|
private readonly logger;
|
|
17
16
|
descriptor: FieldLookupDescriptor<T, ET>;
|
|
18
17
|
config: FieldLookupConfig;
|
|
@@ -29,7 +28,6 @@ export declare class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldTyp
|
|
|
29
28
|
dialogSelectedItem: any;
|
|
30
29
|
dialogMessages: Message[];
|
|
31
30
|
dialogIsLoading$: Observable<boolean>;
|
|
32
|
-
viewContainer?: IViewContainer<any, unknown>;
|
|
33
31
|
private lookupDataProviderSubscription?;
|
|
34
32
|
private subscriptions;
|
|
35
33
|
constructor(injector: Injector);
|
|
@@ -3,7 +3,6 @@ import { FieldType } from '@ngx-formly/core';
|
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { ActionDescriptorInst } from '../../../../../descriptors/action';
|
|
5
5
|
import { FieldManyEditorDescriptor } from '../../../../../descriptors/editor';
|
|
6
|
-
import { IViewContainer } from '../../../../../models';
|
|
7
6
|
import { MngFormlyFieldConfig } from '../../models';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class MngFormlyFieldTableDialogFormComponent<T = any, ET = any> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -13,7 +12,6 @@ export declare class MngFormlyFieldTableDialogFormComponent<T = any, ET = any> e
|
|
|
13
12
|
items$: Observable<Array<T>>;
|
|
14
13
|
actions: Array<ActionDescriptorInst<T>>;
|
|
15
14
|
toolbarRightActions: Array<ActionDescriptorInst<T>>;
|
|
16
|
-
viewContainer?: IViewContainer<any, unknown>;
|
|
17
15
|
private subscriptions;
|
|
18
16
|
private isDisabledSubject;
|
|
19
17
|
private isEnabled$;
|
|
@@ -3,8 +3,7 @@ import { FieldType } from '@ngx-formly/core';
|
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { MediusQueryResult } from '../../../../../api/models';
|
|
5
5
|
import { FieldManyToManyEditorDescriptor } from '../../../../../descriptors/editor';
|
|
6
|
-
import {
|
|
7
|
-
import { MngTableComponent } from '../../../../tableview';
|
|
6
|
+
import { MngTableComponent } from '../../../../table/table.component';
|
|
8
7
|
import { MngFormlyFieldConfig } from '../../models';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -27,7 +26,6 @@ export declare class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extend
|
|
|
27
26
|
private searchDebounceSubject;
|
|
28
27
|
private lookupDataProviderSubscription?;
|
|
29
28
|
private subscriptions;
|
|
30
|
-
viewContainer?: IViewContainer<any, unknown>;
|
|
31
29
|
addTableComponent?: MngTableComponent<T, ET>;
|
|
32
30
|
constructor(injector: Injector);
|
|
33
31
|
ngOnInit(): void;
|