@mediusinc/mng-commons 2.0.0-rc.0-08f92864 → 2.0.0-rc.1-b808fba6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/action/action.component.mjs +2 -2
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +18 -5
- package/esm2020/lib/components/layout/index.mjs +2 -1
- package/esm2020/lib/components/layout/main-layout.component.mjs +17 -13
- package/esm2020/lib/components/layout/topbar-user.component.mjs +41 -0
- package/esm2020/lib/components/layout/topbar.component.mjs +28 -31
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +2 -2
- package/esm2020/lib/components/tableview/table/table.component.mjs +2 -2
- package/esm2020/lib/directives/component.directive.mjs +27 -10
- package/esm2020/lib/mng-commons.module.mjs +6 -1
- package/esm2020/lib/models/config.model.mjs +1 -1
- package/esm2020/lib/router/models/router.model.mjs +1 -1
- package/esm2020/lib/router/route-builder.mjs +9 -29
- package/esm2020/lib/router/routes-builder.mjs +7 -7
- package/esm2020/lib/router/tableview-route-builder.mjs +70 -73
- package/fesm2015/mediusinc-mng-commons.mjs +209 -159
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +202 -159
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/form/dropdown/dropdown.component.d.ts +7 -0
- package/lib/components/layout/index.d.ts +1 -0
- package/lib/components/layout/main-layout.component.d.ts +3 -1
- package/lib/components/layout/topbar-user.component.d.ts +21 -0
- package/lib/components/layout/topbar.component.d.ts +8 -10
- package/lib/directives/component.directive.d.ts +7 -3
- package/lib/mng-commons.module.d.ts +27 -26
- package/lib/models/config.model.d.ts +10 -0
- package/lib/router/models/router.model.d.ts +0 -5
- package/lib/router/route-builder.d.ts +6 -8
- package/lib/router/routes-builder.d.ts +4 -5
- package/lib/router/tableview-route-builder.d.ts +16 -10
- package/package.json +1 -1
- package/scss/theme/default/_mng-variables-theme-light.scss +2 -0
- package/version-info.json +5 -5
|
@@ -47,6 +47,13 @@ export declare class MngDropdownComponent implements OnInit, OnDestroy, ControlV
|
|
|
47
47
|
onDropdownBlur(event: any): void;
|
|
48
48
|
onPanelHide(event: any): void;
|
|
49
49
|
private propagateValueChange;
|
|
50
|
+
/**
|
|
51
|
+
* Prevents executions for writing and outputting value which is sometimes committed as null in cmp initialization stage.
|
|
52
|
+
* In dropdown (from ang. 15 and switch to standalone cmp) null value was always committed to dropdown even if default value was set (using ngModel or formControl) which is incorrect.
|
|
53
|
+
* Github issue: https://github.com/angular/angular/issues/14988
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
private isValueAccessorInitialized;
|
|
50
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngDropdownComponent, [null, null, { optional: true; }]>;
|
|
51
58
|
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"; "changeValueOnBlur": "changeValueOnBlur"; }, { "valueChangeEventEmitter": "valueChange"; }, never, never, true, never>;
|
|
52
59
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnInit, QueryList, Type } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { MngTemplateDirective } from '../../directives';
|
|
4
|
+
import { MngModuleConfig } from '../../models';
|
|
4
5
|
import { MngCommonsService } from '../../services';
|
|
5
6
|
import { MngMainLayoutComponentService } from './services';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
@@ -8,11 +9,12 @@ export declare class MngMainLayoutComponent implements OnInit {
|
|
|
8
9
|
private route;
|
|
9
10
|
mngCommons: MngCommonsService;
|
|
10
11
|
mainLayoutService: MngMainLayoutComponentService;
|
|
12
|
+
private config;
|
|
11
13
|
templates: QueryList<MngTemplateDirective>;
|
|
12
14
|
topbarComponent: Type<any>;
|
|
13
15
|
menuComponent: Type<any>;
|
|
14
16
|
footerComponent: Type<any>;
|
|
15
|
-
constructor(route: ActivatedRoute, mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService);
|
|
17
|
+
constructor(route: ActivatedRoute, mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService, config: MngModuleConfig);
|
|
16
18
|
ngOnInit(): void;
|
|
17
19
|
onWindowResize(event: UIEvent): void;
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngMainLayoutComponent, never>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IUser } from '../../models';
|
|
4
|
+
import { MngCommonsService } from '../../services';
|
|
5
|
+
import { MngMainLayoutComponentService } from './services';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class MngTopbarUserComponent implements OnInit, OnDestroy {
|
|
8
|
+
mngCommons: MngCommonsService;
|
|
9
|
+
mainLayoutService: MngMainLayoutComponentService;
|
|
10
|
+
elementRef: ElementRef;
|
|
11
|
+
user?: IUser;
|
|
12
|
+
userRoles$: Observable<string[]>;
|
|
13
|
+
private subscriptions;
|
|
14
|
+
constructor(mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService, elementRef: ElementRef);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
logout(user: IUser | undefined, event: Event): void;
|
|
18
|
+
click(event: any): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngTopbarUserComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MngTopbarUserComponent, "mng-topbar-user-component", never, {}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApplicationRef, ElementRef, OnInit, QueryList, Type } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
3
|
import { MngTemplateDirective } from '../../directives';
|
|
5
|
-
import {
|
|
4
|
+
import { MngModuleConfig } from '../../models';
|
|
6
5
|
import { MngCommonsService } from '../../services';
|
|
7
6
|
import { MngMainLayoutComponentService } from './services';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class MngTopbarComponent implements OnInit
|
|
8
|
+
export declare class MngTopbarComponent implements OnInit {
|
|
9
|
+
private applicationRef;
|
|
10
10
|
private route;
|
|
11
11
|
mngCommons: MngCommonsService;
|
|
12
12
|
mainLayoutService: MngMainLayoutComponentService;
|
|
13
|
+
private config;
|
|
13
14
|
templates: QueryList<MngTemplateDirective>;
|
|
15
|
+
topbarInjectionRef: ElementRef;
|
|
14
16
|
breadcrumbComponent: Type<any>;
|
|
15
17
|
menuComponent: Type<any>;
|
|
18
|
+
topbarUserComponent: Type<any>;
|
|
16
19
|
languages: Array<string>;
|
|
17
20
|
selectedLanguage: string;
|
|
18
|
-
|
|
19
|
-
userRoles$: Observable<string[]>;
|
|
20
|
-
private subscriptions;
|
|
21
|
-
constructor(route: ActivatedRoute, mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService);
|
|
21
|
+
constructor(applicationRef: ApplicationRef, route: ActivatedRoute, mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService, config: MngModuleConfig);
|
|
22
22
|
ngOnInit(): void;
|
|
23
|
-
ngOnDestroy(): void;
|
|
24
23
|
switchLanguage(language: string): void;
|
|
25
|
-
logout(user: IUser, event: Event): void;
|
|
26
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngTopbarComponent, never>;
|
|
27
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<MngTopbarComponent, "mng-topbar", never, {}, {}, never, never, true, never>;
|
|
28
26
|
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { ComponentRef, OnInit, Type, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { ApplicationRef, ComponentRef, ElementRef, Injector, OnInit, Type, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class MngComponentDirective<C> implements OnInit {
|
|
4
4
|
viewContainerRef: ViewContainerRef;
|
|
5
|
+
private elementRef;
|
|
6
|
+
private applicationRef;
|
|
7
|
+
private injector;
|
|
5
8
|
component: Type<C>;
|
|
6
9
|
inputs?: {
|
|
7
10
|
[key: string]: any;
|
|
8
11
|
};
|
|
12
|
+
attachToHost: boolean;
|
|
9
13
|
private componentInstanceEventEmitter;
|
|
10
14
|
componentRef: ComponentRef<C>;
|
|
11
|
-
constructor(viewContainerRef: ViewContainerRef);
|
|
15
|
+
constructor(viewContainerRef: ViewContainerRef, elementRef: ElementRef, applicationRef: ApplicationRef, injector: Injector);
|
|
12
16
|
ngOnInit(): void;
|
|
13
17
|
private isCmpInstanceOfColumnValue;
|
|
14
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngComponentDirective<any>, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MngComponentDirective<any>, "[mngComponent]", never, { "component": "mngComponent"; "inputs": "inputs"; }, { "componentInstanceEventEmitter": "instanceCreated"; }, never, never, true, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MngComponentDirective<any>, "[mngComponent]", never, { "component": "mngComponent"; "inputs": "inputs"; "attachToHost": "attachToHost"; }, { "componentInstanceEventEmitter": "instanceCreated"; }, never, never, true, never>;
|
|
16
20
|
}
|
|
@@ -65,35 +65,36 @@ import * as i60 from "./components/layout/main-layout.component";
|
|
|
65
65
|
import * as i61 from "./components/layout/menu.component";
|
|
66
66
|
import * as i62 from "./components/layout/menu-item.component";
|
|
67
67
|
import * as i63 from "./components/layout/topbar.component";
|
|
68
|
-
import * as i64 from "./components/layout/
|
|
69
|
-
import * as i65 from "./components/
|
|
70
|
-
import * as i66 from "./components/form/
|
|
71
|
-
import * as i67 from "./components/form/
|
|
72
|
-
import * as i68 from "./components/form/
|
|
73
|
-
import * as i69 from "./components/form/formly/wrappers/formly-field-
|
|
74
|
-
import * as i70 from "./components/form/formly/
|
|
75
|
-
import * as i71 from "./components/form/formly/fields/formly-field-
|
|
76
|
-
import * as i72 from "./components/form/formly/fields/formly-field-
|
|
77
|
-
import * as i73 from "./components/form/formly/fields/formly-field-
|
|
78
|
-
import * as i74 from "./components/form/formly/fields/formly-field-
|
|
79
|
-
import * as i75 from "./components/form/formly/fields/formly-field-
|
|
80
|
-
import * as i76 from "./components/form/formly/fields/formly-field-table-dialog-
|
|
81
|
-
import * as i77 from "./components/form/formly/fields/formly-field-
|
|
82
|
-
import * as i78 from "./components/form/formly/fields/formly-field-
|
|
83
|
-
import * as i79 from "./components/form/formly/fields/formly-field-
|
|
84
|
-
import * as i80 from "./components/
|
|
85
|
-
import * as i81 from "./components/tableview/
|
|
86
|
-
import * as i82 from "./components/tableview/
|
|
87
|
-
import * as i83 from "./components/tableview/table/column-
|
|
88
|
-
import * as i84 from "./components/tableview/
|
|
89
|
-
import * as i85 from "./components/
|
|
90
|
-
import * as i86 from "./components/
|
|
91
|
-
import * as i87 from "./components/action/
|
|
92
|
-
import * as i88 from "./components/action/
|
|
68
|
+
import * as i64 from "./components/layout/topbar-user.component";
|
|
69
|
+
import * as i65 from "./components/layout/version.component";
|
|
70
|
+
import * as i66 from "./components/form/autocomplete/autocomplete.component";
|
|
71
|
+
import * as i67 from "./components/form/dropdown/dropdown.component";
|
|
72
|
+
import * as i68 from "./components/form/date-range/date-range.component";
|
|
73
|
+
import * as i69 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
|
|
74
|
+
import * as i70 from "./components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component";
|
|
75
|
+
import * as i71 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
|
|
76
|
+
import * as i72 from "./components/form/formly/fields/formly-field-label/formly-field-label.component";
|
|
77
|
+
import * as i73 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
|
|
78
|
+
import * as i74 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
|
|
79
|
+
import * as i75 from "./components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component";
|
|
80
|
+
import * as i76 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
|
|
81
|
+
import * as i77 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
|
|
82
|
+
import * as i78 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
|
|
83
|
+
import * as i79 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
|
|
84
|
+
import * as i80 from "./components/form/formly/fields/formly-field-action/formly-field-action.component";
|
|
85
|
+
import * as i81 from "./components/tableview/table/table.component";
|
|
86
|
+
import * as i82 from "./components/tableview/tableview.component";
|
|
87
|
+
import * as i83 from "./components/tableview/table/column-value/column-value.component";
|
|
88
|
+
import * as i84 from "./components/tableview/table/column-filter/column-filter.component";
|
|
89
|
+
import * as i85 from "./components/tableview/route/tableview-route.component";
|
|
90
|
+
import * as i86 from "./components/form/editor/form-editor.component";
|
|
91
|
+
import * as i87 from "./components/action/action.component";
|
|
92
|
+
import * as i88 from "./components/action/editor/action-editor.component";
|
|
93
|
+
import * as i89 from "./components/action/localization/data-language-dropdown.component";
|
|
93
94
|
export declare const primeNgModules: (typeof RippleModule)[];
|
|
94
95
|
export declare class MngCommonsModule {
|
|
95
96
|
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
|
|
96
97
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
|
|
97
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, never, [typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.HttpClientModule, typeof i4.ReactiveFormsModule, typeof i5.TranslateModule, typeof i6.FormlyModule, typeof i7.AutoCompleteModule, typeof i8.BreadcrumbModule, typeof i9.ButtonModule, typeof i10.CalendarModule, typeof i11.CardModule, typeof i12.CheckboxModule, typeof i13.ChipModule, typeof i14.ConfirmDialogModule, typeof i15.ConfirmPopupModule, typeof i16.DialogModule, typeof i17.DynamicDialogModule, typeof i18.DropdownModule, typeof i19.FileUploadModule, typeof i20.InputNumberModule, typeof i21.InputMaskModule, typeof i22.InputSwitchModule, typeof i23.InputTextModule, typeof i24.InputTextareaModule, typeof i25.PaginatorModule, typeof i26.RadioButtonModule, typeof i27.RippleModule, typeof i28.SelectButtonModule, typeof i29.SplitButtonModule, typeof i30.TableModule, typeof i31.TagModule, typeof i32.ToastModule, typeof i33.ToggleButtonModule, typeof i34.ToolbarModule, typeof i35.TooltipModule, typeof i36.MessagesModule, typeof i37.ProgressSpinnerModule, typeof i38.TabViewModule, typeof i39.FieldsetModule, typeof i40.MultiSelectModule, typeof i41.SkeletonModule, typeof i42.SlideMenuModule, typeof i43.ImageModule, typeof i44.MngActionRouteComponent, typeof i45.MngComponentDirective, typeof i46.MngTemplateDirective, typeof i47.JsonPathPipe, typeof i48.MngEnumPipe, typeof i49.MngBooleanPipe, typeof i50.MngI18nPropertyPipe, typeof i51.MngParametrizePipe, typeof i52.MngGetterPipe, typeof i53.MngTemplatePipe, typeof i54.MngClassMapPipe, typeof i55.MngEnumeratePipe, typeof i56.MngEnumerateAsyncPipe, typeof i57.MngLocaleDefaultRowClassPipe, typeof i58.MngBreadcrumbComponent, typeof i59.MngFooterComponent, typeof i60.MngMainLayoutComponent, typeof i61.MngMenuComponent, typeof i62.MngMenuItemComponent, typeof i63.MngTopbarComponent, typeof i64.
|
|
98
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, never, [typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.HttpClientModule, typeof i4.ReactiveFormsModule, typeof i5.TranslateModule, typeof i6.FormlyModule, typeof i7.AutoCompleteModule, typeof i8.BreadcrumbModule, typeof i9.ButtonModule, typeof i10.CalendarModule, typeof i11.CardModule, typeof i12.CheckboxModule, typeof i13.ChipModule, typeof i14.ConfirmDialogModule, typeof i15.ConfirmPopupModule, typeof i16.DialogModule, typeof i17.DynamicDialogModule, typeof i18.DropdownModule, typeof i19.FileUploadModule, typeof i20.InputNumberModule, typeof i21.InputMaskModule, typeof i22.InputSwitchModule, typeof i23.InputTextModule, typeof i24.InputTextareaModule, typeof i25.PaginatorModule, typeof i26.RadioButtonModule, typeof i27.RippleModule, typeof i28.SelectButtonModule, typeof i29.SplitButtonModule, typeof i30.TableModule, typeof i31.TagModule, typeof i32.ToastModule, typeof i33.ToggleButtonModule, typeof i34.ToolbarModule, typeof i35.TooltipModule, typeof i36.MessagesModule, typeof i37.ProgressSpinnerModule, typeof i38.TabViewModule, typeof i39.FieldsetModule, typeof i40.MultiSelectModule, typeof i41.SkeletonModule, typeof i42.SlideMenuModule, typeof i43.ImageModule, typeof i44.MngActionRouteComponent, typeof i45.MngComponentDirective, typeof i46.MngTemplateDirective, typeof i47.JsonPathPipe, typeof i48.MngEnumPipe, typeof i49.MngBooleanPipe, typeof i50.MngI18nPropertyPipe, typeof i51.MngParametrizePipe, typeof i52.MngGetterPipe, typeof i53.MngTemplatePipe, typeof i54.MngClassMapPipe, typeof i55.MngEnumeratePipe, typeof i56.MngEnumerateAsyncPipe, typeof i57.MngLocaleDefaultRowClassPipe, typeof i58.MngBreadcrumbComponent, typeof i59.MngFooterComponent, typeof i60.MngMainLayoutComponent, typeof i61.MngMenuComponent, typeof i62.MngMenuItemComponent, typeof i63.MngTopbarComponent, typeof i64.MngTopbarUserComponent, typeof i65.MngVersionComponent, typeof i66.MngAutocompleteComponent, typeof i67.MngDropdownComponent, typeof i68.MngDateRangeComponent, typeof i69.MngFormlyFieldWrapperComponent, typeof i70.MngFormlyFieldNoLabelWrapperComponent, typeof i71.MngFormlyFieldInputComponent, typeof i72.MngFormlyFieldLabelComponent, typeof i73.MngFormlyFieldDropdownComponent, typeof i74.MngFormlyFieldAutocompleteComponent, typeof i75.MngFormlyFieldLookupDialogComponent, typeof i76.MngFormlyFieldTableDialogMultiselectComponent, typeof i77.MngFormlyFieldTableDialogFormComponent, typeof i78.MngFormlyFieldTabsComponent, typeof i79.MngFormlyFieldFieldsetComponent, typeof i80.MngFormlyFieldActionComponent, typeof i81.MngTableComponent, typeof i82.MngTableviewComponent, typeof i83.MngTableColumnValueComponent, typeof i84.MngTableColumnFilterComponent, typeof i85.MngTableviewRouteComponent, typeof i86.MngFormEditorComponent, typeof i87.MngActionComponent, typeof i88.MngActionEditorComponent, typeof i89.MngDataLanguageDropdownComponent], [typeof i7.AutoCompleteModule, typeof i8.BreadcrumbModule, typeof i9.ButtonModule, typeof i10.CalendarModule, typeof i11.CardModule, typeof i12.CheckboxModule, typeof i13.ChipModule, typeof i14.ConfirmDialogModule, typeof i15.ConfirmPopupModule, typeof i16.DialogModule, typeof i17.DynamicDialogModule, typeof i18.DropdownModule, typeof i19.FileUploadModule, typeof i20.InputNumberModule, typeof i21.InputMaskModule, typeof i22.InputSwitchModule, typeof i23.InputTextModule, typeof i24.InputTextareaModule, typeof i25.PaginatorModule, typeof i26.RadioButtonModule, typeof i27.RippleModule, typeof i28.SelectButtonModule, typeof i29.SplitButtonModule, typeof i30.TableModule, typeof i31.TagModule, typeof i32.ToastModule, typeof i33.ToggleButtonModule, typeof i34.ToolbarModule, typeof i35.TooltipModule, typeof i36.MessagesModule, typeof i37.ProgressSpinnerModule, typeof i38.TabViewModule, typeof i39.FieldsetModule, typeof i40.MultiSelectModule, typeof i41.SkeletonModule, typeof i42.SlideMenuModule, typeof i44.MngActionRouteComponent, typeof i45.MngComponentDirective, typeof i46.MngTemplateDirective, typeof i47.JsonPathPipe, typeof i48.MngEnumPipe, typeof i49.MngBooleanPipe, typeof i50.MngI18nPropertyPipe, typeof i51.MngParametrizePipe, typeof i52.MngGetterPipe, typeof i53.MngTemplatePipe, typeof i54.MngClassMapPipe, typeof i55.MngEnumeratePipe, typeof i56.MngEnumerateAsyncPipe, typeof i57.MngLocaleDefaultRowClassPipe, typeof i58.MngBreadcrumbComponent, typeof i59.MngFooterComponent, typeof i60.MngMainLayoutComponent, typeof i61.MngMenuComponent, typeof i62.MngMenuItemComponent, typeof i63.MngTopbarComponent, typeof i64.MngTopbarUserComponent, typeof i65.MngVersionComponent, typeof i66.MngAutocompleteComponent, typeof i67.MngDropdownComponent, typeof i68.MngDateRangeComponent, typeof i69.MngFormlyFieldWrapperComponent, typeof i70.MngFormlyFieldNoLabelWrapperComponent, typeof i71.MngFormlyFieldInputComponent, typeof i72.MngFormlyFieldLabelComponent, typeof i73.MngFormlyFieldDropdownComponent, typeof i74.MngFormlyFieldAutocompleteComponent, typeof i75.MngFormlyFieldLookupDialogComponent, typeof i76.MngFormlyFieldTableDialogMultiselectComponent, typeof i77.MngFormlyFieldTableDialogFormComponent, typeof i78.MngFormlyFieldTabsComponent, typeof i79.MngFormlyFieldFieldsetComponent, typeof i80.MngFormlyFieldActionComponent, typeof i81.MngTableComponent, typeof i82.MngTableviewComponent, typeof i83.MngTableColumnValueComponent, typeof i84.MngTableColumnFilterComponent, typeof i85.MngTableviewRouteComponent, typeof i86.MngFormEditorComponent, typeof i87.MngActionComponent, typeof i88.MngActionEditorComponent, typeof i89.MngDataLanguageDropdownComponent]>;
|
|
98
99
|
static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
|
|
99
100
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
1
2
|
import { ValidatorOption, WrapperOption } from '@ngx-formly/core/lib/models/config';
|
|
2
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
import { MenuItem } from 'primeng/api';
|
|
@@ -38,4 +39,13 @@ export interface MngModuleConfig {
|
|
|
38
39
|
validators?: ValidatorOption[];
|
|
39
40
|
getValidationMessages?: (translate: TranslateService) => any[];
|
|
40
41
|
};
|
|
42
|
+
components?: {
|
|
43
|
+
layout?: {
|
|
44
|
+
topbar?: Type<any>;
|
|
45
|
+
menu?: Type<any>;
|
|
46
|
+
footer?: Type<any>;
|
|
47
|
+
breadcrumb?: Type<any>;
|
|
48
|
+
topbarUser?: Type<any>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
41
51
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
1
|
import { ActivatedRouteSnapshot, Data } from '@angular/router';
|
|
3
2
|
import { MenuItem } from 'primeng/api';
|
|
4
3
|
import { ITableviewDataProvider } from '../../data-providers';
|
|
@@ -28,9 +27,5 @@ export interface MngRouterData extends Data {
|
|
|
28
27
|
hasDelete?: boolean;
|
|
29
28
|
};
|
|
30
29
|
menuItems?: Array<MngMenuItem>;
|
|
31
|
-
topbarComponent?: Type<any>;
|
|
32
|
-
breadcrumbComponent?: Type<any>;
|
|
33
|
-
menuComponent?: Type<any>;
|
|
34
|
-
footerComponent?: Type<any>;
|
|
35
30
|
permissions?: APermissions;
|
|
36
31
|
}
|
|
@@ -2,16 +2,15 @@ import { Type } from '@angular/core';
|
|
|
2
2
|
import { DefaultExport, LoadChildren, Route } from '@angular/router';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { MngMainLayoutComponent } from '../components/layout';
|
|
5
|
-
import { AMngTableviewRouteComponent } from '../components/tableview';
|
|
6
5
|
import { MngMenuItem } from '../models';
|
|
7
6
|
import { APermissions } from '../security/model';
|
|
8
7
|
import { BreadcrumbType, MngRouterData } from './models';
|
|
9
8
|
import { RoutesBuilder } from './routes-builder';
|
|
10
|
-
import {
|
|
9
|
+
import { TableviewRouteBuilderInternal } from './tableview-route-builder';
|
|
11
10
|
export declare class RouteBuilder {
|
|
12
11
|
private readonly route;
|
|
13
12
|
private routePath;
|
|
14
|
-
|
|
13
|
+
protected routeData: MngRouterData;
|
|
15
14
|
private root?;
|
|
16
15
|
private parent?;
|
|
17
16
|
private children;
|
|
@@ -20,7 +19,7 @@ export declare class RouteBuilder {
|
|
|
20
19
|
private breadcrumb?;
|
|
21
20
|
private pageTitle?;
|
|
22
21
|
private permissions?;
|
|
23
|
-
|
|
22
|
+
protected constructor(route: Route);
|
|
24
23
|
static create(path: string, component: Type<any>): RouteBuilder;
|
|
25
24
|
static createRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): RouteBuilder;
|
|
26
25
|
/**
|
|
@@ -31,8 +30,7 @@ export declare class RouteBuilder {
|
|
|
31
30
|
static createLazyRouteModule(path: string, loadChildren: LoadChildren, canMatch?: Array<any>): RouteBuilder;
|
|
32
31
|
static createLazyRouteComponent(path: string, loadComponent: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>, canMatch?: Array<any>): RouteBuilder;
|
|
33
32
|
static createFromRoute(route: Route): RouteBuilder;
|
|
34
|
-
static createLayoutRoute(path: string, layoutComponent?: typeof MngMainLayoutComponent
|
|
35
|
-
static createTableview<C extends AMngTableviewRouteComponent<any, any>>(builder: TableviewRouteBuilder<C>): RouteBuilder;
|
|
33
|
+
static createLayoutRoute(path: string, layoutComponent?: typeof MngMainLayoutComponent): RouteBuilder;
|
|
36
34
|
withRoot(routesBuilder: RoutesBuilder): this;
|
|
37
35
|
withParent(parent: RouteBuilder): this;
|
|
38
36
|
withBreadcrumb(breadcrumb: BreadcrumbType): this;
|
|
@@ -51,11 +49,11 @@ export declare class RouteBuilder {
|
|
|
51
49
|
withMenuItemLazyChildren(): this;
|
|
52
50
|
withPermissions(permissions: APermissions): this;
|
|
53
51
|
addChild(path: string, component: Type<any>): RouteBuilder;
|
|
54
|
-
addChildBuilder(
|
|
52
|
+
addChildBuilder(builder: RouteBuilder | TableviewRouteBuilderInternal): this;
|
|
55
53
|
toParent(): RouteBuilder;
|
|
56
54
|
toRoot(): RoutesBuilder;
|
|
57
55
|
finish(): RoutesBuilder;
|
|
58
|
-
|
|
56
|
+
build(): Route;
|
|
59
57
|
private buildMenu;
|
|
60
58
|
private createMenuItem;
|
|
61
59
|
private findMenuItemGuards;
|
|
@@ -2,16 +2,15 @@ import { Type } from '@angular/core';
|
|
|
2
2
|
import { DefaultExport, LoadChildren, Route, Routes } from '@angular/router';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { MngMainLayoutComponent } from '../components/layout';
|
|
5
|
-
import { AMngTableviewRouteComponent } from '../components/tableview';
|
|
6
5
|
import { RouteBuilder } from './route-builder';
|
|
7
|
-
import {
|
|
6
|
+
import { TableviewRouteBuilderInternal } from './tableview-route-builder';
|
|
8
7
|
export declare class RoutesBuilder {
|
|
9
8
|
private readonly layoutRoute?;
|
|
10
9
|
private routes;
|
|
11
10
|
private currentRoute?;
|
|
12
11
|
private constructor();
|
|
13
12
|
static create(): RoutesBuilder;
|
|
14
|
-
static createWithLayout(layoutComponent?: typeof MngMainLayoutComponent
|
|
13
|
+
static createWithLayout(layoutComponent?: typeof MngMainLayoutComponent): RoutesBuilder;
|
|
15
14
|
addAngularRoute(route: Route): this;
|
|
16
15
|
addRouteRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): this;
|
|
17
16
|
/**
|
|
@@ -22,8 +21,8 @@ export declare class RoutesBuilder {
|
|
|
22
21
|
addLazyRouteComponent(path: string, loadComponent: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>, canMatch?: Array<any>): this;
|
|
23
22
|
addLazyRouteModule(path: string, loadChildren: LoadChildren, canMatch?: Array<any>): this;
|
|
24
23
|
addRoute(path: string, component: Type<any>): this;
|
|
25
|
-
addTableview
|
|
24
|
+
addTableview(builder: TableviewRouteBuilderInternal): this;
|
|
26
25
|
addRouteBuilder(routeBuilder: RouteBuilder): this;
|
|
27
26
|
toRoute(): RouteBuilder;
|
|
28
|
-
|
|
27
|
+
build(): Routes;
|
|
29
28
|
}
|
|
@@ -6,12 +6,12 @@ import { ActionDescriptor } from '../descriptors/action';
|
|
|
6
6
|
import { TableviewDescriptor } from '../descriptors/tableview';
|
|
7
7
|
import { APermissions } from '../security/model';
|
|
8
8
|
import { RouteBuilder } from './route-builder';
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
10
10
|
private path;
|
|
11
|
-
private descriptor?;
|
|
12
|
-
private dataProvider?;
|
|
13
|
-
private actions?;
|
|
14
|
-
private
|
|
11
|
+
private readonly descriptor?;
|
|
12
|
+
private readonly dataProvider?;
|
|
13
|
+
private readonly actions?;
|
|
14
|
+
private readonly isFromComponent;
|
|
15
15
|
private hasDetails;
|
|
16
16
|
private detailsPath;
|
|
17
17
|
private hasEdit;
|
|
@@ -19,10 +19,13 @@ export declare class TableviewRouteBuilder<C extends AMngTableviewRouteComponent
|
|
|
19
19
|
private hasAdd;
|
|
20
20
|
private addPath;
|
|
21
21
|
private hasDelete;
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
private tableviewPermissions?;
|
|
23
|
+
constructor(path: string, options: Partial<{
|
|
24
|
+
component: Type<any>;
|
|
25
|
+
descriptor: TableviewDescriptor<any>;
|
|
26
|
+
dataProvider: ITableviewDataProvider<any, any>;
|
|
27
|
+
actions: Array<ActionDescriptor<any>>;
|
|
28
|
+
}>);
|
|
26
29
|
withReadOnly(permissions?: APermissions): this;
|
|
27
30
|
withDetails(hasDetails?: boolean, permissions?: APermissions, path?: string): this;
|
|
28
31
|
withAdd(hasAdd?: boolean, permissions?: APermissions, path?: string): this;
|
|
@@ -34,5 +37,8 @@ export declare class TableviewRouteBuilder<C extends AMngTableviewRouteComponent
|
|
|
34
37
|
[key: string]: APermissions;
|
|
35
38
|
}): this;
|
|
36
39
|
build(): Route;
|
|
37
|
-
|
|
40
|
+
}
|
|
41
|
+
export declare class TableviewRouteBuilder {
|
|
42
|
+
static fromComponent<C extends AMngTableviewRouteComponent<any, any>>(path: string, component: Type<C>): TableviewRouteBuilderInternal;
|
|
43
|
+
static from(path: string, descriptor: TableviewDescriptor<any>, dataProvider: ITableviewDataProvider<any, any>, actions: Array<ActionDescriptor<any>>): TableviewRouteBuilderInternal;
|
|
38
44
|
}
|
package/package.json
CHANGED
package/version-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.1-b808fba6",
|
|
4
4
|
"tag": "v1.4.0-rc.0",
|
|
5
|
-
"distance":
|
|
6
|
-
"hash": "
|
|
5
|
+
"distance": 27,
|
|
6
|
+
"hash": "b808fba6",
|
|
7
7
|
"dirty": true,
|
|
8
|
-
"semver": "1.4.0-rc.0+
|
|
9
|
-
"raw": "v1.4.0-rc.0-
|
|
8
|
+
"semver": "1.4.0-rc.0+27.gb808fba6.dirty",
|
|
9
|
+
"raw": "v1.4.0-rc.0-27-b808fba6-dirty"
|
|
10
10
|
}
|