@mediusinc/mng-commons 0.2.19 → 0.2.22
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/assets/i18n/en.json +16 -15
- package/assets/i18n/sl.json +16 -15
- package/esm2020/lib/api/services/crud-api.abstract.service.mjs +6 -6
- package/esm2020/lib/api/utils/object-serializer.util.mjs +7 -2
- package/esm2020/lib/components/action/action.component.mjs +26 -13
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +79 -22
- package/esm2020/lib/components/action/route/action-route.component.mjs +6 -30
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +66 -15
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +1 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +57 -21
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +1 -1
- package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +2 -2
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/table.component.mjs +8 -4
- package/esm2020/lib/components/tableview/tableview.component.mjs +13 -13
- package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
- package/esm2020/lib/descriptors/action.descriptor.mjs +40 -2
- package/esm2020/lib/descriptors/editor.descriptor.mjs +74 -16
- package/esm2020/lib/descriptors/table.descriptor.mjs +29 -6
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +7 -6
- package/esm2020/lib/mng-commons.module.mjs +6 -3
- package/esm2020/lib/models/enum.model.mjs +1 -1
- package/esm2020/lib/models/error.model.mjs +2 -0
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/pipes/boolean.pipe.mjs +8 -3
- package/esm2020/lib/services/action-executor.service.mjs +65 -12
- package/esm2020/lib/services/commons.service.mjs +1 -2
- package/esm2020/lib/services/error-mapper.service.mjs +14 -0
- package/esm2020/lib/services/index.mjs +3 -1
- package/esm2020/lib/services/view-container.component.service.mjs +35 -0
- package/esm2020/lib/utils/i18n.util.mjs +29 -1
- package/esm2020/lib/utils/model.util.mjs +9 -7
- package/esm2020/lib/utils/toast.util.mjs +5 -9
- package/fesm2015/mediusinc-mng-commons.mjs +581 -219
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +578 -218
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/action/action.component.d.ts +9 -7
- package/lib/components/action/editor/action-editor.component.d.ts +19 -13
- package/lib/components/action/route/action-route.component.d.ts +1 -2
- package/lib/components/form/dropdown/dropdown.component.d.ts +10 -4
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +8 -2
- package/lib/components/tableview/table/table.component.d.ts +3 -2
- package/lib/components/tableview/tableview.component.d.ts +1 -2
- package/lib/descriptors/action.descriptor.d.ts +31 -11
- package/lib/descriptors/editor.descriptor.d.ts +32 -9
- package/lib/descriptors/table.descriptor.d.ts +11 -3
- package/lib/descriptors/tableview.descriptor.d.ts +1 -1
- package/lib/models/enum.model.d.ts +1 -0
- package/lib/models/error.model.d.ts +12 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/pipes/boolean.pipe.d.ts +1 -1
- package/lib/services/action-executor.service.d.ts +11 -4
- package/lib/services/error-mapper.service.d.ts +7 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/{mng-view-container-component.service.d.ts → view-container.component.service.d.ts} +0 -0
- package/lib/utils/i18n.util.d.ts +3 -0
- package/lib/utils/model.util.d.ts +1 -1
- package/lib/utils/toast.util.d.ts +2 -2
- package/package.json +1 -1
- package/scss/mng-overrides/_layout_dialog.scss +0 -7
- package/scss/mng-overrides/_theme_button.scss +0 -1
- package/scss/mng-overrides/_theme_dialog.scss +3 -1
- package/scss/mng-overrides/_theme_styles.scss +1 -0
- package/scss/mng-overrides/_theme_tableview.scss +10 -10
- package/scss/mng-overrides/_theme_toolbar.scss +5 -0
- package/scss/theme/default/_mng-variables-theme-dark.scss +3 -0
- package/scss/theme/default/_mng-variables-theme-light.scss +3 -0
- package/esm2020/lib/services/mng-view-container-component.service.mjs +0 -35
- package/scss/mng-overrides/_variables.scss +0 -2
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
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 {
|
|
6
|
+
import { IDataProvider } from '../../data-providers';
|
|
7
7
|
import { ActionDescriptor } from '../../descriptors';
|
|
8
8
|
import { IViewContainer } from '../../models';
|
|
9
|
-
import { MngActionExecutorService } from '../../services';
|
|
10
|
-
import { MngViewContainerComponentService } from '../../services/mng-view-container-component.service';
|
|
9
|
+
import { MngActionExecutorService, MngViewContainerComponentService } from '../../services';
|
|
11
10
|
import { IdType } from '../../types';
|
|
12
|
-
import { ActionData, IActionConfirmationService } from './models';
|
|
11
|
+
import { ActionData, ActionTriggerResult, IActionConfirmationService } from './models';
|
|
13
12
|
import * as i0 from "@angular/core";
|
|
14
13
|
export declare class MngActionComponent<T, S> implements OnInit, IActionConfirmationService {
|
|
15
14
|
private route;
|
|
@@ -21,8 +20,11 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
|
|
|
21
20
|
item?: T;
|
|
22
21
|
itemId?: IdType;
|
|
23
22
|
actionData?: ActionData;
|
|
24
|
-
dataProvider?:
|
|
23
|
+
dataProvider?: IDataProvider<T, S>;
|
|
24
|
+
inputDisabled: Observable<boolean>;
|
|
25
|
+
inputLoading: Observable<boolean>;
|
|
25
26
|
viewContainerInit?: IViewContainer<T, S>;
|
|
27
|
+
triggerEventEmitter: EventEmitter<ActionTriggerResult<T, S, IDataProvider<T, S>>>;
|
|
26
28
|
private loadingSubject;
|
|
27
29
|
$loading: Observable<boolean>;
|
|
28
30
|
cmpId: string;
|
|
@@ -37,5 +39,5 @@ export declare class MngActionComponent<T, S> implements OnInit, IActionConfirma
|
|
|
37
39
|
getConfirmationService(): ConfirmationService;
|
|
38
40
|
getConfirmationServiceInstanceKey(action: ActionDescriptor<any>): string;
|
|
39
41
|
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>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; "dataProvider": "dataProvider"; "inputDisabled": "disabled"; "inputLoading": "loading"; "viewContainerInit": "viewContainer"; }, { "triggerEventEmitter": "trigger"; }, never, never>;
|
|
41
43
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Injector, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, Injector, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
3
|
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { IEditorDataProvider } from '../../../data-providers';
|
|
6
|
-
import { ActionEditorDescriptor } from '../../../descriptors';
|
|
5
|
+
import { IDataProvider, IEditorDataProvider } from '../../../data-providers';
|
|
6
|
+
import { ActionDescriptor, ActionEditorDescriptor } from '../../../descriptors';
|
|
7
7
|
import { MngTemplateDirective } from '../../../directives';
|
|
8
8
|
import { IViewContainer } from '../../../models';
|
|
9
|
-
import { MngActionExecutorService, MngCommonsService } from '../../../services';
|
|
10
|
-
import { MngViewContainerComponentService } from '../../../services/mng-view-container-component.service';
|
|
9
|
+
import { MngActionExecutorService, MngCommonsService, MngNavigationService, MngViewContainerComponentService } from '../../../services';
|
|
11
10
|
import { IdType } from '../../../types';
|
|
11
|
+
import { MngFormEditorComponent } from '../../form';
|
|
12
12
|
import { MngFormEditorSubmitEvent } from '../../form/models';
|
|
13
13
|
import { ActionData, ActionRunResult } from '../models';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
@@ -17,6 +17,7 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
|
|
|
17
17
|
private translate;
|
|
18
18
|
private actionExecutor;
|
|
19
19
|
private mngCommonsService;
|
|
20
|
+
private navigationService;
|
|
20
21
|
private dialogRef;
|
|
21
22
|
private dialogConfig;
|
|
22
23
|
private viewContainerService;
|
|
@@ -26,28 +27,33 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
|
|
|
26
27
|
actionData?: ActionData;
|
|
27
28
|
dataProvider?: IEditorDataProvider<T, S>;
|
|
28
29
|
viewContainerInit?: IViewContainer<T, S>;
|
|
30
|
+
actionRunEventEmitter: EventEmitter<ActionRunResult<T, S, IDataProvider<T, S>>>;
|
|
29
31
|
templates: QueryList<MngTemplateDirective>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
submitButtonElementRef: ElementRef;
|
|
33
|
+
editorComponent: MngFormEditorComponent<T>;
|
|
32
34
|
cmpId: string;
|
|
33
35
|
title?: string;
|
|
34
36
|
isDialog: boolean;
|
|
35
37
|
isSaveButton: boolean;
|
|
38
|
+
toolbarLeftActions: ActionDescriptor<T>[];
|
|
39
|
+
toolbarRightActions: ActionDescriptor<T>[];
|
|
40
|
+
footerLeftActions: ActionDescriptor<T>[];
|
|
41
|
+
footerRightActions: ActionDescriptor<T>[];
|
|
36
42
|
private loadingSubject;
|
|
37
43
|
loading$: Observable<boolean>;
|
|
38
44
|
private submitLoadingSubject;
|
|
39
45
|
submitLoading$: Observable<boolean>;
|
|
40
|
-
|
|
46
|
+
viewContainer?: IViewContainer<T, S>;
|
|
41
47
|
private sourceComponent;
|
|
42
48
|
private subscriptions;
|
|
43
|
-
constructor(injector: Injector, translate: TranslateService, actionExecutor: MngActionExecutorService, mngCommonsService: MngCommonsService, dialogRef: DynamicDialogRef | null, dialogConfig: DynamicDialogConfig | null, viewContainerService: MngViewContainerComponentService<T, S> | null);
|
|
49
|
+
constructor(injector: Injector, translate: TranslateService, actionExecutor: MngActionExecutorService, mngCommonsService: MngCommonsService, navigationService: MngNavigationService, dialogRef: DynamicDialogRef | null, dialogConfig: DynamicDialogConfig | null, viewContainerService: MngViewContainerComponentService<T, S> | null);
|
|
44
50
|
ngOnInit(): void;
|
|
45
51
|
ngOnDestroy(): void;
|
|
46
52
|
onSubmit(event: MngFormEditorSubmitEvent<T>): void;
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
cancel(result?: ActionRunResult<T, S, IDataProvider<T, S>>): void;
|
|
54
|
+
triggerSubmit(): void;
|
|
49
55
|
private loadItemWithDataProvider;
|
|
50
56
|
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>;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionEditorComponent<any, any>, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngActionEditorComponent<any, any>, "mng-action-editor", never, { "action": "action"; "itemId": "itemId"; "item": "item"; "actionData": "actionData"; "dataProvider": "dataProvider"; "viewContainerInit": "viewContainer"; }, { "actionRunEventEmitter": "actionSubmit"; }, ["templates"], never>;
|
|
53
59
|
}
|
|
@@ -2,8 +2,7 @@ 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 { MngActionExecutorService, MngNavigationService } from '../../../services';
|
|
6
|
-
import { MngViewContainerComponentService } from '../../../services/mng-view-container-component.service';
|
|
5
|
+
import { MngActionExecutorService, MngNavigationService, MngViewContainerComponentService } from '../../../services';
|
|
7
6
|
import { IActionConfirmationService } from '../models';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class MngActionRouteComponent<T, S> implements OnInit, OnDestroy, IActionConfirmationService {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, ExistingProvider, Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
import { Dropdown } from 'primeng/dropdown';
|
|
4
5
|
import { Observable } from 'rxjs';
|
|
5
6
|
import { ILookupDataProvider } from '../../../data-providers';
|
|
@@ -7,10 +8,13 @@ import * as i0 from "@angular/core";
|
|
|
7
8
|
export declare const MNG_DROPDOWN_VALUE_ACCESSOR: ExistingProvider;
|
|
8
9
|
export declare class MngDropdownComponent implements OnInit, OnDestroy, ControlValueAccessor {
|
|
9
10
|
private injector;
|
|
11
|
+
private translate;
|
|
10
12
|
dataProvider?: ILookupDataProvider<any, any>;
|
|
11
13
|
dataKeyProperty?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
itemsLabelPropertyInit?: string;
|
|
15
|
+
itemsLabelTranslate: boolean;
|
|
16
|
+
itemsValuePropertyInit?: string;
|
|
17
|
+
itemsDisabledProperty?: string;
|
|
14
18
|
multiselect: boolean;
|
|
15
19
|
placeholder?: string;
|
|
16
20
|
showClear: boolean;
|
|
@@ -19,6 +23,8 @@ export declare class MngDropdownComponent implements OnInit, OnDestroy, ControlV
|
|
|
19
23
|
dropdownClassName: string | null;
|
|
20
24
|
valueChangeEventEmitter: EventEmitter<any>;
|
|
21
25
|
primeDropdown?: Dropdown;
|
|
26
|
+
itemsLabelProperty?: string;
|
|
27
|
+
itemsValueProperty?: string;
|
|
22
28
|
private itemsSubject;
|
|
23
29
|
private dataProviderService;
|
|
24
30
|
private onChangeFn;
|
|
@@ -26,7 +32,7 @@ export declare class MngDropdownComponent implements OnInit, OnDestroy, ControlV
|
|
|
26
32
|
dropdownFormControl: FormControl;
|
|
27
33
|
items$: Observable<Array<any>>;
|
|
28
34
|
private itemsSubscription?;
|
|
29
|
-
constructor(injector: Injector);
|
|
35
|
+
constructor(injector: Injector, translate: TranslateService);
|
|
30
36
|
ngOnInit(): void;
|
|
31
37
|
ngOnDestroy(): void;
|
|
32
38
|
registerOnChange(fn: any): void;
|
|
@@ -34,5 +40,5 @@ export declare class MngDropdownComponent implements OnInit, OnDestroy, ControlV
|
|
|
34
40
|
setDisabledState(isDisabled: boolean): void;
|
|
35
41
|
writeValue(obj: any): void;
|
|
36
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngDropdownComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngDropdownComponent, "mng-dropdown", never, { "dataProvider": "dataProvider"; "dataKeyProperty": "dataKeyProperty"; "
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngDropdownComponent, "mng-dropdown", never, { "dataProvider": "dataProvider"; "dataKeyProperty": "dataKeyProperty"; "itemsLabelPropertyInit": "itemsLabelProperty"; "itemsLabelTranslate": "itemsLabelTranslate"; "itemsValuePropertyInit": "itemsValueProperty"; "itemsDisabledProperty": "itemsDisabledProperty"; "multiselect": "multiselect"; "placeholder": "placeholder"; "showClear": "showClear"; "selectFirstItem": "selectFirstItem"; "className": "className"; "dropdownClassName": "dropdownClassName"; }, { "valueChangeEventEmitter": "valueChange"; }, never, never>;
|
|
38
44
|
}
|
|
@@ -2,18 +2,24 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { FieldType } from '@ngx-formly/core';
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { ActionDescriptor, FieldManyEditorDescriptor } from '../../../../../descriptors';
|
|
5
|
+
import { MngActionExecutorService } from '../../../../../services';
|
|
6
|
+
import { MngTableCellClickEvent } from '../../../../tableview/models';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType implements OnInit, OnDestroy {
|
|
9
|
+
private actionExecutor;
|
|
7
10
|
descriptor: FieldManyEditorDescriptor<T, ET>;
|
|
8
11
|
itemsSubject: Subject<Array<T>>;
|
|
9
12
|
items$: Observable<Array<T>>;
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
toolbarRightActions: Array<ActionDescriptor<T>>;
|
|
14
|
+
rowClickActions: Array<ActionDescriptor<T>>;
|
|
15
|
+
rowInlineActions: Array<ActionDescriptor<T>>;
|
|
12
16
|
private subscriptions;
|
|
13
17
|
private isDisabledSubject;
|
|
14
18
|
private isEnabled$;
|
|
19
|
+
constructor(actionExecutor: MngActionExecutorService);
|
|
15
20
|
ngOnInit(): void;
|
|
16
21
|
ngOnDestroy(): void;
|
|
22
|
+
onTableCellClick(event: MngTableCellClickEvent<T>): void;
|
|
17
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldTableDialogFormComponent<any, any>, never>;
|
|
18
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldTableDialogFormComponent<any, any>, "mng-formly-table-dialog-form-field", never, {}, {}, never, never>;
|
|
19
25
|
}
|
|
@@ -9,7 +9,7 @@ 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
|
|
12
|
+
import { MngViewContainerComponentService } from '../../../services';
|
|
13
13
|
import { MngTableCellClickEvent, MngTableLoadEvent } from '../models';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export declare class MngTableComponent<T, S> implements OnInit, AfterContentInit, OnDestroy {
|
|
@@ -28,6 +28,7 @@ export declare class MngTableComponent<T, S> implements OnInit, AfterContentInit
|
|
|
28
28
|
useQueryParams: boolean;
|
|
29
29
|
selectionMode: string;
|
|
30
30
|
selectionEnabled: boolean;
|
|
31
|
+
isColumnClickable: boolean;
|
|
31
32
|
captionComponent?: Type<any>;
|
|
32
33
|
columnActionComponent?: Type<any>;
|
|
33
34
|
loadEventEmitter: EventEmitter<MngTableLoadEvent>;
|
|
@@ -85,5 +86,5 @@ export declare class MngTableComponent<T, S> implements OnInit, AfterContentInit
|
|
|
85
86
|
private updatePrimeSortAndFilter;
|
|
86
87
|
private getDefaultSortMeta;
|
|
87
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngTableComponent<any, any>, [null, null, null, null, { optional: true; }]>;
|
|
88
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MngTableComponent<any, any>, "mng-table", never, { "descriptor": "descriptor"; "items": "items"; "queryResult": "queryResult"; "loading": "loading"; "dataProvider": "dataProvider"; "useQueryParams": "useQueryParams"; "selectionMode": "selectionMode"; "selectionEnabled": "selectionEnabled"; "captionComponent": "captionComponent"; "columnActionComponent": "columnActionComponent"; }, { "loadEventEmitter": "tableLoad"; "cellClickEventEmitter": "cellClick"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnActionCmpInstEventEmitter": "columnActionComponentInstance"; }, ["templates"], never>;
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngTableComponent<any, any>, "mng-table", never, { "descriptor": "descriptor"; "items": "items"; "queryResult": "queryResult"; "loading": "loading"; "dataProvider": "dataProvider"; "useQueryParams": "useQueryParams"; "selectionMode": "selectionMode"; "selectionEnabled": "selectionEnabled"; "isColumnClickable": "isColumnClickable"; "captionComponent": "captionComponent"; "columnActionComponent": "columnActionComponent"; }, { "loadEventEmitter": "tableLoad"; "cellClickEventEmitter": "cellClick"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnActionCmpInstEventEmitter": "columnActionComponentInstance"; }, ["templates"], never>;
|
|
89
90
|
}
|
|
@@ -6,8 +6,7 @@ import { DialogService } from 'primeng/dynamicdialog';
|
|
|
6
6
|
import { IDataProvider, ITableviewDataProvider } from '../../data-providers';
|
|
7
7
|
import { ActionDescriptor, TableviewDescriptor } from '../../descriptors';
|
|
8
8
|
import { IViewContainer } from '../../models';
|
|
9
|
-
import { MngActionExecutorService } from '../../services';
|
|
10
|
-
import { MngViewContainerComponentService } from '../../services/mng-view-container-component.service';
|
|
9
|
+
import { MngActionExecutorService, MngViewContainerComponentService } from '../../services';
|
|
11
10
|
import { MngTableCellClickEvent } from './models';
|
|
12
11
|
import { MngTableComponent } from './table/table.component';
|
|
13
12
|
import * as i0 from "@angular/core";
|
|
@@ -17,12 +17,12 @@ export declare class ActionDescriptor<T> {
|
|
|
17
17
|
protected _level: ActionLevelEnum;
|
|
18
18
|
protected _routeUrl: string | null;
|
|
19
19
|
protected _title?: string | null;
|
|
20
|
-
protected _icon?: string;
|
|
20
|
+
protected _icon?: string | null;
|
|
21
21
|
protected _className: string;
|
|
22
22
|
protected _size: ActionDescriptor.SizeEnum;
|
|
23
23
|
protected _tooltip?: string | null;
|
|
24
24
|
protected _dataProvider?: IDataProvider<T, any>;
|
|
25
|
-
protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
|
|
25
|
+
protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined>;
|
|
26
26
|
protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
|
|
27
27
|
protected _isEnabledFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
|
|
28
28
|
private _hasRunConfirmation;
|
|
@@ -48,10 +48,11 @@ export declare class ActionDescriptor<T> {
|
|
|
48
48
|
get level(): ActionLevelEnum;
|
|
49
49
|
get routeUrl(): string | null;
|
|
50
50
|
get title(): string | null | undefined;
|
|
51
|
-
get icon(): string | undefined;
|
|
51
|
+
get icon(): string | null | undefined;
|
|
52
52
|
get tooltip(): string | null | undefined;
|
|
53
53
|
get dataProvider(): IDataProvider<T, any> | undefined;
|
|
54
|
-
get
|
|
54
|
+
get hasRunFunction(): boolean;
|
|
55
|
+
get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined>;
|
|
55
56
|
get isVisibleFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
|
|
56
57
|
get isEnabledFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
|
|
57
58
|
get actionName(): string;
|
|
@@ -75,7 +76,7 @@ export declare class ActionDescriptor<T> {
|
|
|
75
76
|
get runNotificationErrorMessage(): string | undefined;
|
|
76
77
|
withDataProvider(dataProvider: IDataProvider<T, any>): this;
|
|
77
78
|
withServiceType<S>(serviceType: Type<S>): this;
|
|
78
|
-
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
|
|
79
|
+
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T | undefined>): this;
|
|
79
80
|
withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
|
|
80
81
|
withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
|
|
81
82
|
withRouteTrigger(routeUrl: string): this;
|
|
@@ -89,7 +90,7 @@ export declare class ActionDescriptor<T> {
|
|
|
89
90
|
* @param title Title i18n key or title.
|
|
90
91
|
*/
|
|
91
92
|
withTitle(title: string | null): this;
|
|
92
|
-
withIcon(icon: string): this;
|
|
93
|
+
withIcon(icon: string | null): this;
|
|
93
94
|
withTooltip(tooltip: string | null): this;
|
|
94
95
|
withClassName(className: string): this;
|
|
95
96
|
withSize(size?: ActionDescriptor.SizeEnum): this;
|
|
@@ -109,7 +110,8 @@ export declare namespace ActionDescriptor {
|
|
|
109
110
|
}
|
|
110
111
|
export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
111
112
|
private readonly _editorDescriptor;
|
|
112
|
-
protected
|
|
113
|
+
protected _editorActions: ActionDescriptor<T>[];
|
|
114
|
+
protected _editorTitle?: string | null;
|
|
113
115
|
protected _hasFetchNotificationSuccess: boolean;
|
|
114
116
|
protected _fetchNotificationSuccessTitle?: string;
|
|
115
117
|
protected _fetchNotificationSuccessMessage?: string;
|
|
@@ -118,7 +120,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
|
118
120
|
protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
119
121
|
protected _editorComponent?: Type<any>;
|
|
120
122
|
constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
|
|
121
|
-
get editorTitle(): string | undefined;
|
|
123
|
+
get editorTitle(): string | null | undefined;
|
|
122
124
|
get editorDescriptor(): EditorDescriptor<T>;
|
|
123
125
|
get hasFetchNotificationSuccess(): boolean;
|
|
124
126
|
get fetchNotificationSuccessTitle(): string | undefined;
|
|
@@ -127,16 +129,31 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
|
127
129
|
get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
|
|
128
130
|
get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
129
131
|
get submitFunction(): ((ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>) | undefined;
|
|
132
|
+
get editorActions(): ActionDescriptor<T>[];
|
|
130
133
|
get editorComponent(): Type<any> | undefined;
|
|
131
|
-
withEditorTitle(title: string): this;
|
|
134
|
+
withEditorTitle(title: string | null): this;
|
|
132
135
|
withDataProvider(dataProvider: IEditorDataProvider<T, any>): this;
|
|
133
136
|
withServiceType<S>(serviceType: Type<S>): this;
|
|
134
137
|
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
|
|
135
138
|
withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
|
|
136
139
|
withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
|
|
137
140
|
withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
|
|
141
|
+
withEditorAction(action: ActionDescriptor<T>): this;
|
|
142
|
+
withEditorActions(actions: ActionDescriptor<T>[]): this;
|
|
138
143
|
withEditorComponent(editorComponent: Type<any>): this;
|
|
139
144
|
}
|
|
145
|
+
export declare class ActionEditorSubmitDescriptor<T> extends ActionDescriptor<T> {
|
|
146
|
+
private readonly _editorAction;
|
|
147
|
+
private readonly _submitType;
|
|
148
|
+
constructor(editorAction: ActionEditorDescriptor<T>, submitType?: ActionEditorSubmitDescriptor.TypeEnum);
|
|
149
|
+
get submitType(): ActionEditorSubmitDescriptor.TypeEnum;
|
|
150
|
+
}
|
|
151
|
+
export declare namespace ActionEditorSubmitDescriptor {
|
|
152
|
+
enum TypeEnum {
|
|
153
|
+
Submit = 0,
|
|
154
|
+
Cancel = 1
|
|
155
|
+
}
|
|
156
|
+
}
|
|
140
157
|
export declare class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
141
158
|
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
142
159
|
withServiceType<S>(serviceType: Type<S>): this;
|
|
@@ -162,7 +179,9 @@ export declare enum ActionPositionEnum {
|
|
|
162
179
|
ToolbarRight = 1,
|
|
163
180
|
TableHeader = 2,
|
|
164
181
|
RowInline = 3,
|
|
165
|
-
RowClick = 4
|
|
182
|
+
RowClick = 4,
|
|
183
|
+
FooterLeft = 5,
|
|
184
|
+
FooterRight = 6
|
|
166
185
|
}
|
|
167
186
|
export declare enum ActionActivationTriggerEnum {
|
|
168
187
|
OnClick = 0,
|
|
@@ -170,7 +189,8 @@ export declare enum ActionActivationTriggerEnum {
|
|
|
170
189
|
}
|
|
171
190
|
export declare enum ActionTypeEnum {
|
|
172
191
|
Direct = 0,
|
|
173
|
-
|
|
192
|
+
Event = 1,
|
|
193
|
+
Editor = 2
|
|
174
194
|
}
|
|
175
195
|
export declare enum ActionLevelEnum {
|
|
176
196
|
Default = 0,
|
|
@@ -7,22 +7,24 @@ import { MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum } f
|
|
|
7
7
|
import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
|
|
8
8
|
import { EnumValue } from '../models';
|
|
9
9
|
import { ClassType, EnumConstantType, EnumType } from '../types';
|
|
10
|
-
import { FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
|
|
10
|
+
import { ActionDescriptor, FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
|
|
11
11
|
import { FieldConfig, FieldLookupConfig } from './editor.descriptor.interface';
|
|
12
12
|
export declare class EditorDescriptor<T> {
|
|
13
13
|
static readonly defaultGroupName = "_default";
|
|
14
14
|
private readonly _model;
|
|
15
|
+
private readonly _tableviewEditorType;
|
|
15
16
|
private readonly _tabs;
|
|
16
17
|
private readonly _groups;
|
|
17
18
|
private readonly _fields;
|
|
18
19
|
private _currentTabGroup?;
|
|
19
20
|
private _currentGroup?;
|
|
20
|
-
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
|
|
21
21
|
private _disabled;
|
|
22
|
-
|
|
22
|
+
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType?: EditorDescriptor.TableviewEditorTypeEnum);
|
|
23
23
|
get model(): ModelDescriptor<T>;
|
|
24
24
|
get tabs(): FieldTabGroupDescriptor<T>[];
|
|
25
25
|
get fields(): AFieldDescriptor<any, T>[];
|
|
26
|
+
get tableviewEditorType(): boolean;
|
|
27
|
+
get disabled(): boolean;
|
|
26
28
|
createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T>;
|
|
27
29
|
createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T>;
|
|
28
30
|
addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
|
|
@@ -41,6 +43,14 @@ export declare class EditorDescriptor<T> {
|
|
|
41
43
|
private createDefaultGroup;
|
|
42
44
|
private createDefaultTabGroup;
|
|
43
45
|
}
|
|
46
|
+
export declare namespace EditorDescriptor {
|
|
47
|
+
enum TableviewEditorTypeEnum {
|
|
48
|
+
None = 0,
|
|
49
|
+
View = 1,
|
|
50
|
+
Edit = 2,
|
|
51
|
+
Add = 3
|
|
52
|
+
}
|
|
53
|
+
}
|
|
44
54
|
export declare abstract class AGenericFieldDescriptor<ET> {
|
|
45
55
|
protected readonly _editor: EditorDescriptor<ET>;
|
|
46
56
|
protected _config: FieldConfig;
|
|
@@ -183,7 +193,9 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
|
|
|
183
193
|
protected readonly _modelType: ClassType<T> | null;
|
|
184
194
|
protected _lookupType: FieldLookupDescriptor.LookupTypeEnum;
|
|
185
195
|
protected _itemsLabelProperty?: string;
|
|
196
|
+
protected _itemsLabelTranslate: boolean;
|
|
186
197
|
protected _itemsValueProperty?: string;
|
|
198
|
+
protected _itemsDisabledProperty?: string;
|
|
187
199
|
protected _dataKeyProperty?: string;
|
|
188
200
|
protected _dataProvider?: ILookupDataProvider<T, any>;
|
|
189
201
|
protected _lookupTableDescriptor?: TableDescriptor<T>;
|
|
@@ -191,14 +203,17 @@ export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET
|
|
|
191
203
|
constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null);
|
|
192
204
|
get lookupType(): FieldLookupDescriptor.LookupTypeEnum;
|
|
193
205
|
get itemsLabelProperty(): string | undefined;
|
|
206
|
+
get itemsLabelTranslate(): boolean;
|
|
194
207
|
get itemsValueProperty(): string | undefined;
|
|
208
|
+
get itemsDisabledProperty(): string | undefined;
|
|
195
209
|
get dataKeyProperty(): string | undefined;
|
|
196
210
|
get dataProvider(): ILookupDataProvider<T, any> | undefined;
|
|
197
211
|
get lookupTableDataProvider(): ITableDataProvider<T, any> | undefined;
|
|
198
212
|
get modelType(): ClassType<T> | null;
|
|
199
213
|
get lookupTableDescriptor(): TableDescriptor<T> | undefined;
|
|
200
|
-
withItemsLabelProperty(itemsLabelProperty: string): this;
|
|
214
|
+
withItemsLabelProperty(itemsLabelProperty: string, translate?: boolean): this;
|
|
201
215
|
withItemsValueProperty(itemsValueProperty: string): this;
|
|
216
|
+
withItemsDisabledProperty(itemsDisabledProperty: string): this;
|
|
202
217
|
withDataKeyProperty(property: string): this;
|
|
203
218
|
withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
|
|
204
219
|
withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
|
|
@@ -216,8 +231,11 @@ export declare namespace FieldLookupDescriptor {
|
|
|
216
231
|
}
|
|
217
232
|
export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumValue<string | number>, ET> {
|
|
218
233
|
private readonly _enumType;
|
|
234
|
+
private readonly _optionEnumValues;
|
|
235
|
+
private readonly _nameAsValue;
|
|
219
236
|
constructor(editor: EditorDescriptor<ET>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
|
|
220
237
|
get enumType(): EnumType;
|
|
238
|
+
withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this;
|
|
221
239
|
copy(): FieldLookupEnumDescriptor<ET>;
|
|
222
240
|
}
|
|
223
241
|
export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
|
|
@@ -258,16 +276,20 @@ export declare class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T
|
|
|
258
276
|
private readonly _modelType;
|
|
259
277
|
private readonly _tableviewDescriptor;
|
|
260
278
|
private _fieldType;
|
|
279
|
+
private _fieldActions;
|
|
261
280
|
private _actions;
|
|
262
281
|
constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, tableviewDescriptor: TableviewDescriptor<T>);
|
|
263
282
|
get fieldType(): FieldManyEditorDescriptor.TypeEnum;
|
|
264
|
-
get
|
|
283
|
+
get fieldActions(): FieldManyEditorDescriptor.ActionEnum[];
|
|
284
|
+
get actions(): ActionDescriptor<T>[];
|
|
265
285
|
get tableviewDescriptor(): TableviewDescriptor<T>;
|
|
266
286
|
get tableDescriptor(): TableDescriptor<T>;
|
|
267
287
|
get editorForCreate(): EditorDescriptor<T>;
|
|
268
288
|
get editorForRead(): EditorDescriptor<T>;
|
|
269
289
|
get editorForUpdate(): EditorDescriptor<T>;
|
|
270
|
-
|
|
290
|
+
withFieldAction(action: FieldManyEditorDescriptor.ActionEnum): this;
|
|
291
|
+
withFieldActions(actions: FieldManyEditorDescriptor.ActionEnum[]): this;
|
|
292
|
+
withAction(action: ActionDescriptor<T>): this;
|
|
271
293
|
copy(): FieldManyEditorDescriptor<T, ET>;
|
|
272
294
|
}
|
|
273
295
|
export declare namespace FieldManyEditorDescriptor {
|
|
@@ -275,9 +297,10 @@ export declare namespace FieldManyEditorDescriptor {
|
|
|
275
297
|
DialogEditor = 0
|
|
276
298
|
}
|
|
277
299
|
enum ActionEnum {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
300
|
+
View = 0,
|
|
301
|
+
Add = 1,
|
|
302
|
+
Edit = 2,
|
|
303
|
+
Delete = 3
|
|
281
304
|
}
|
|
282
305
|
}
|
|
283
306
|
export declare abstract class AFieldGroupDescriptor<ET> extends AGenericFieldDescriptor<ET> {
|
|
@@ -36,7 +36,7 @@ export declare class TableDescriptor<T> {
|
|
|
36
36
|
addColumn(property: string): ColumnDescriptor<string, T>;
|
|
37
37
|
addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
|
|
38
38
|
addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
|
|
39
|
-
addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
|
|
39
|
+
addColumnBoolean(property: string, yes?: string, no?: string, asIcon?: boolean): ColumnDescriptor<boolean, T>;
|
|
40
40
|
addColumnEnum(property: string, enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): ColumnDescriptor<boolean, T>;
|
|
41
41
|
addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
|
|
42
42
|
withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this;
|
|
@@ -73,6 +73,9 @@ export declare class ColumnDescriptor<T, TT> {
|
|
|
73
73
|
private _enumType?;
|
|
74
74
|
private _enumTitlePath?;
|
|
75
75
|
private _enumNameAsValue;
|
|
76
|
+
private _booleanAsIcon;
|
|
77
|
+
private _booleanYes?;
|
|
78
|
+
private _booleanNo?;
|
|
76
79
|
constructor(table: TableDescriptor<TT>, property: string);
|
|
77
80
|
get modelType(): ClassType<T> | null;
|
|
78
81
|
get columnType(): ColumnDescriptor.TypeEnum;
|
|
@@ -86,10 +89,13 @@ export declare class ColumnDescriptor<T, TT> {
|
|
|
86
89
|
get enumType(): EnumType | undefined;
|
|
87
90
|
get enumTitlePath(): string | null | undefined;
|
|
88
91
|
get enumNameAsValue(): boolean;
|
|
92
|
+
get booleanAsIcon(): boolean;
|
|
93
|
+
get booleanYes(): string | undefined;
|
|
94
|
+
get booleanNo(): string | undefined;
|
|
89
95
|
asType(type?: ColumnDescriptor.TypeEnum): this;
|
|
90
96
|
asNumber(displayFormat?: string): this;
|
|
91
97
|
asDate(displayFormat?: string): this;
|
|
92
|
-
asBoolean(): this;
|
|
98
|
+
asBoolean(yes?: string, no?: string, asIcon?: boolean): this;
|
|
93
99
|
asEnum(enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): this;
|
|
94
100
|
withModelType(modelType: ClassType<T>): this;
|
|
95
101
|
withTitle(title: string): this;
|
|
@@ -167,6 +173,7 @@ export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> imple
|
|
|
167
173
|
private _lookupType?;
|
|
168
174
|
private _dataProvider?;
|
|
169
175
|
private _itemsLabelProperty?;
|
|
176
|
+
private _itemsLabelTranslate;
|
|
170
177
|
private _itemsValueProperty?;
|
|
171
178
|
private _dataKeyProperty?;
|
|
172
179
|
private _multiselect;
|
|
@@ -175,12 +182,13 @@ export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> imple
|
|
|
175
182
|
get lookupType(): FilterLookupDescriptor.LookupTypeEnum | undefined;
|
|
176
183
|
get dataProvider(): ILookupDataProvider<T, any> | undefined;
|
|
177
184
|
get itemsLabelProperty(): string | undefined;
|
|
185
|
+
get itemsLabelTranslate(): boolean;
|
|
178
186
|
get itemsValueProperty(): string | undefined;
|
|
179
187
|
get dataKeyProperty(): string | undefined;
|
|
180
188
|
get multiselect(): boolean;
|
|
181
189
|
get dropdownClassName(): string;
|
|
182
190
|
get modelType(): ClassType<T> | null;
|
|
183
|
-
withItemsLabelProperty(itemsLabelProperty: string): this;
|
|
191
|
+
withItemsLabelProperty(itemsLabelProperty: string, translate?: boolean): this;
|
|
184
192
|
withItemsValueProperty(itemsValueProperty: string): this;
|
|
185
193
|
withDataKeyProperty(dataKeyProperty: string): this;
|
|
186
194
|
withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
|
|
@@ -25,7 +25,7 @@ export declare class TableviewDescriptor<T> {
|
|
|
25
25
|
addColumn(property: string): ColumnDescriptor<string, T>;
|
|
26
26
|
addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
|
|
27
27
|
addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
|
|
28
|
-
addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
|
|
28
|
+
addColumnBoolean(property: string, yes?: string, no?: string, asIcon?: boolean): ColumnDescriptor<boolean, T>;
|
|
29
29
|
addColumnEnum(property: string, enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): ColumnDescriptor<boolean, T>;
|
|
30
30
|
addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
|
|
31
31
|
createTabGroup(name: string, title?: string): this;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IdType } from '../types';
|
|
2
|
+
export interface MngError extends Error {
|
|
3
|
+
id?: IdType;
|
|
4
|
+
messageCode?: number | string;
|
|
5
|
+
message: string;
|
|
6
|
+
details?: any;
|
|
7
|
+
status?: number;
|
|
8
|
+
statusDescription?: string;
|
|
9
|
+
stack?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
cause?: Error;
|
|
12
|
+
}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class MngBooleanPipe implements PipeTransform {
|
|
4
|
-
transform(value: any): any;
|
|
4
|
+
transform(value: any, yes?: string, no?: string, icon?: boolean): any;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngBooleanPipe, never>;
|
|
6
6
|
static ɵpipe: i0.ɵɵPipeDeclaration<MngBooleanPipe, "boolean">;
|
|
7
7
|
}
|