@mediusinc/mng-commons 0.2.9 → 0.2.14
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/form/dropdown/dropdown.component.mjs +2 -4
- 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-input/formly-field-input.component.mjs +9 -8
- package/esm2020/lib/components/layout/menu-item.component.mjs +59 -17
- 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 +6 -3
- package/esm2020/lib/config/formly.config.mjs +10 -1
- package/esm2020/lib/descriptors/editor.descriptor.mjs +27 -1
- package/esm2020/lib/descriptors/table.descriptor.mjs +82 -3
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -1
- package/esm2020/lib/mng-commons.module.mjs +5 -2
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/menu.model.mjs +2 -0
- package/esm2020/lib/pipes/enum.pipe.mjs +22 -0
- package/esm2020/lib/pipes/index.mjs +2 -1
- package/esm2020/lib/router/route-builder.mjs +86 -17
- package/esm2020/lib/services/commons.service.mjs +1 -1
- package/esm2020/lib/utils/editor-formly.util.mjs +7 -1
- package/esm2020/lib/utils/enum.util.mjs +23 -2
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/mediusinc-mng-commons.mjs +330 -51
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +325 -50
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/layout/menu-item.component.d.ts +13 -5
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +1 -0
- package/lib/descriptors/editor.descriptor.d.ts +11 -1
- package/lib/descriptors/table.descriptor.d.ts +22 -4
- package/lib/descriptors/tableview.descriptor.d.ts +1 -0
- package/lib/mng-commons.module.d.ts +70 -69
- package/lib/models/index.d.ts +1 -0
- package/lib/models/menu.model.d.ts +25 -0
- package/lib/pipes/enum.pipe.d.ts +7 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/router/route-builder.d.ts +9 -5
- package/lib/services/commons.service.d.ts +6 -6
- package/lib/utils/enum.util.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,29 +1,37 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
1
|
+
import { Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { MngMenuItem } from '../../models';
|
|
3
5
|
import { MngCommonsService } from '../../services';
|
|
4
6
|
import { MngMainLayoutComponentService } from './services';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare class MngMenuItemComponent implements OnInit, OnDestroy {
|
|
7
|
-
|
|
9
|
+
private injector;
|
|
10
|
+
private router;
|
|
11
|
+
private route;
|
|
8
12
|
mngCommons: MngCommonsService;
|
|
9
13
|
mainLayoutService: MngMainLayoutComponentService;
|
|
10
|
-
item:
|
|
14
|
+
item: MngMenuItem;
|
|
11
15
|
index: number;
|
|
12
16
|
root: boolean;
|
|
13
17
|
parentKey: string | null;
|
|
14
18
|
key: string;
|
|
15
19
|
active: boolean;
|
|
16
20
|
hover: boolean;
|
|
21
|
+
private isAllowedSubject;
|
|
22
|
+
isAllowed$: Observable<boolean>;
|
|
17
23
|
private itemUrl?;
|
|
18
24
|
private menuSourceSubscription?;
|
|
19
25
|
private menuResetSubscription?;
|
|
20
26
|
private routerEventsSubscription?;
|
|
21
|
-
|
|
27
|
+
private guardsSubscription?;
|
|
28
|
+
constructor(injector: Injector, router: Router, route: ActivatedRoute, mngCommons: MngCommonsService, mainLayoutService: MngMainLayoutComponentService);
|
|
22
29
|
ngOnInit(): void;
|
|
23
30
|
updateActiveStateFromRoute(): void;
|
|
24
31
|
itemClick(event: Event): void;
|
|
25
32
|
onMouseEnter(): void;
|
|
26
33
|
ngOnDestroy(): void;
|
|
34
|
+
private checkIfMenuItemIsAllowedFromGuard;
|
|
27
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngMenuItemComponent, never>;
|
|
28
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<MngMenuItemComponent, "[mng-menuitem]", never, { "item": "item"; "index": "index"; "root": "root"; "parentKey": "parentKey"; }, {}, never, never>;
|
|
29
37
|
}
|
|
@@ -5,6 +5,7 @@ export declare class MngTableColumnValueComponent<T, TT> {
|
|
|
5
5
|
readonly columnTypeNumber: ColumnDescriptor.TypeEnum;
|
|
6
6
|
readonly columnTypeBoolean: ColumnDescriptor.TypeEnum;
|
|
7
7
|
readonly columnTypeDate: ColumnDescriptor.TypeEnum;
|
|
8
|
+
readonly columnTypeEnum: ColumnDescriptor.TypeEnum;
|
|
8
9
|
descriptor: ColumnDescriptor<T, TT>;
|
|
9
10
|
item: any;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngTableColumnValueComponent<any, any>, never>;
|
|
@@ -98,6 +98,9 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
|
|
|
98
98
|
private _maxLength?;
|
|
99
99
|
private _minLength?;
|
|
100
100
|
private _pattern?;
|
|
101
|
+
private _mask?;
|
|
102
|
+
private _slotChar?;
|
|
103
|
+
private _customComponentName?;
|
|
101
104
|
constructor(editor: EditorDescriptor<ET>, property: string);
|
|
102
105
|
get fieldType(): FieldInputDescriptor.TypeEnum;
|
|
103
106
|
get rows(): number | undefined;
|
|
@@ -114,6 +117,9 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
|
|
|
114
117
|
get maxLength(): number | undefined;
|
|
115
118
|
get minLength(): number | undefined;
|
|
116
119
|
get pattern(): string | RegExp | undefined;
|
|
120
|
+
get mask(): string | undefined;
|
|
121
|
+
get slotChar(): string | undefined;
|
|
122
|
+
get customComponentName(): string | undefined;
|
|
117
123
|
asText(minLength?: number, maxLength?: number, pattern?: string | RegExp, isEmail?: boolean): this;
|
|
118
124
|
asTextarea(rows?: number, minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
|
|
119
125
|
asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number): this;
|
|
@@ -121,6 +127,8 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
|
|
|
121
127
|
asRadio(options: Array<string | number>, optionsTitlePath?: string): this;
|
|
122
128
|
asRadioFromEnum(enumType: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue?: boolean): this;
|
|
123
129
|
asDatePicker(format?: string, min?: Date, max?: Date, showTime?: boolean): this;
|
|
130
|
+
asMask(mask: string, slotChar: string): this;
|
|
131
|
+
asCustomComponent(customComponentName: string): this;
|
|
124
132
|
copy(): FieldInputDescriptor<ET>;
|
|
125
133
|
}
|
|
126
134
|
export declare namespace FieldInputDescriptor {
|
|
@@ -130,7 +138,9 @@ export declare namespace FieldInputDescriptor {
|
|
|
130
138
|
Number = 2,
|
|
131
139
|
Switch = 3,
|
|
132
140
|
Radio = 4,
|
|
133
|
-
Datepicker = 5
|
|
141
|
+
Datepicker = 5,
|
|
142
|
+
Mask = 6,
|
|
143
|
+
Custom = 7
|
|
134
144
|
}
|
|
135
145
|
}
|
|
136
146
|
export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET> implements ILookupDescriptor<T> {
|
|
@@ -2,7 +2,8 @@ import { Type } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { MediusQueryParam } from '../api/models';
|
|
4
4
|
import { ILookupDataProvider } from '../data-providers';
|
|
5
|
-
import {
|
|
5
|
+
import { EnumValue } from '../models';
|
|
6
|
+
import { ClassType, EnumConstantType, EnumType } from '../types';
|
|
6
7
|
import { ILookupDescriptor } from './lookup.descriptor';
|
|
7
8
|
import { ModelDescriptor } from './model.descriptor';
|
|
8
9
|
export declare class TableDescriptor<T> {
|
|
@@ -36,6 +37,7 @@ export declare class TableDescriptor<T> {
|
|
|
36
37
|
addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
|
|
37
38
|
addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
|
|
38
39
|
addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
|
|
40
|
+
addColumnEnum(property: string, enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): ColumnDescriptor<boolean, T>;
|
|
39
41
|
addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
|
|
40
42
|
withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this;
|
|
41
43
|
withPaginationMode(paginationMode: TableDescriptor.PaginationModeEnum): this;
|
|
@@ -68,6 +70,9 @@ export declare class ColumnDescriptor<T, TT> {
|
|
|
68
70
|
private _isSortEnabled;
|
|
69
71
|
private _filterDescriptor?;
|
|
70
72
|
private _displayFormat?;
|
|
73
|
+
private _enumType?;
|
|
74
|
+
private _enumTitlePath?;
|
|
75
|
+
private _enumNameAsValue;
|
|
71
76
|
constructor(table: TableDescriptor<TT>, property: string);
|
|
72
77
|
get modelType(): ClassType<T> | null;
|
|
73
78
|
get columnType(): ColumnDescriptor.TypeEnum;
|
|
@@ -78,15 +83,20 @@ export declare class ColumnDescriptor<T, TT> {
|
|
|
78
83
|
get displayFormat(): string | undefined;
|
|
79
84
|
get table(): TableDescriptor<TT>;
|
|
80
85
|
get property(): string;
|
|
86
|
+
get enumType(): EnumType | undefined;
|
|
87
|
+
get enumTitlePath(): string | null | undefined;
|
|
88
|
+
get enumNameAsValue(): boolean;
|
|
81
89
|
asType(type?: ColumnDescriptor.TypeEnum): this;
|
|
82
90
|
asNumber(displayFormat?: string): this;
|
|
83
91
|
asDate(displayFormat?: string): this;
|
|
84
92
|
asBoolean(): this;
|
|
93
|
+
asEnum(enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): this;
|
|
85
94
|
withModelType(modelType: ClassType<T>): this;
|
|
86
95
|
withTitle(title: string): this;
|
|
87
96
|
withDisplayPropertyPath(displayPropertyPath: string): this;
|
|
88
97
|
withFilter(): FilterDescriptor<T>;
|
|
89
98
|
withFilterLookup(): FilterLookupDescriptor<T>;
|
|
99
|
+
withFilterLookupEnum(options?: Array<EnumConstantType>): FilterLookupEnumDescriptor;
|
|
90
100
|
withSort(isEnabled?: boolean): this;
|
|
91
101
|
copy(): ColumnDescriptor<T, TT>;
|
|
92
102
|
}
|
|
@@ -95,7 +105,8 @@ export declare namespace ColumnDescriptor {
|
|
|
95
105
|
String = 0,
|
|
96
106
|
Number = 1,
|
|
97
107
|
Boolean = 2,
|
|
98
|
-
Date = 3
|
|
108
|
+
Date = 3,
|
|
109
|
+
Enum = 4
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
export declare class FilterDescriptor<T> {
|
|
@@ -112,7 +123,7 @@ export declare class FilterDescriptor<T> {
|
|
|
112
123
|
get placeholder(): string | undefined;
|
|
113
124
|
get className(): string;
|
|
114
125
|
get property(): string;
|
|
115
|
-
asFilterType(filterType:
|
|
126
|
+
asFilterType(filterType: FilterDescriptor.TypeEnum): this;
|
|
116
127
|
/**
|
|
117
128
|
* Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.
|
|
118
129
|
* @param filterProperty
|
|
@@ -130,7 +141,8 @@ export declare namespace FilterDescriptor {
|
|
|
130
141
|
Number = 1,
|
|
131
142
|
Boolean = 2,
|
|
132
143
|
Date = 3,
|
|
133
|
-
Lookup = 4
|
|
144
|
+
Lookup = 4,
|
|
145
|
+
LookupEnum = 5
|
|
134
146
|
}
|
|
135
147
|
enum MatchModeEnum {
|
|
136
148
|
StartsWith = "startsWith",
|
|
@@ -179,6 +191,12 @@ export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> imple
|
|
|
179
191
|
copy(): FilterLookupDescriptor<T>;
|
|
180
192
|
protected copyFieldsTo(descriptor: FilterLookupDescriptor<T>): void;
|
|
181
193
|
}
|
|
194
|
+
export declare class FilterLookupEnumDescriptor extends FilterLookupDescriptor<EnumValue<string | number>> {
|
|
195
|
+
private readonly _enumType;
|
|
196
|
+
constructor(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
|
|
197
|
+
get enumType(): EnumType;
|
|
198
|
+
copy(): FilterLookupEnumDescriptor;
|
|
199
|
+
}
|
|
182
200
|
export declare namespace FilterLookupDescriptor {
|
|
183
201
|
enum LookupTypeEnum {
|
|
184
202
|
Dropdown = 0,
|
|
@@ -26,6 +26,7 @@ export declare class TableviewDescriptor<T> {
|
|
|
26
26
|
addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
|
|
27
27
|
addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
|
|
28
28
|
addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
|
|
29
|
+
addColumnEnum(property: string, enumType: EnumType, nameAsValue?: boolean, titlePath?: string | null): ColumnDescriptor<boolean, T>;
|
|
29
30
|
addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
|
|
30
31
|
createTabGroup(name: string, title?: string): this;
|
|
31
32
|
createFieldGroup(name: string, title?: string): this;
|
|
@@ -5,78 +5,79 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
import * as i1 from "./directives/component.directive";
|
|
6
6
|
import * as i2 from "./directives/template.directive";
|
|
7
7
|
import * as i3 from "./pipes/property-path.pipe";
|
|
8
|
-
import * as i4 from "./pipes/
|
|
9
|
-
import * as i5 from "./pipes/
|
|
10
|
-
import * as i6 from "./
|
|
11
|
-
import * as i7 from "./components/layout/
|
|
12
|
-
import * as i8 from "./components/layout/
|
|
13
|
-
import * as i9 from "./components/layout/
|
|
14
|
-
import * as i10 from "./components/layout/menu
|
|
15
|
-
import * as i11 from "./components/layout/
|
|
16
|
-
import * as i12 from "./components/
|
|
17
|
-
import * as i13 from "./components/form/
|
|
18
|
-
import * as i14 from "./components/form/
|
|
19
|
-
import * as i15 from "./components/form/formly/wrappers/formly-
|
|
20
|
-
import * as i16 from "./components/form/formly/
|
|
21
|
-
import * as i17 from "./components/form/formly/fields/formly-field-
|
|
22
|
-
import * as i18 from "./components/form/formly/fields/formly-field-
|
|
23
|
-
import * as i19 from "./components/form/formly/fields/formly-field-
|
|
24
|
-
import * as i20 from "./components/form/formly/fields/formly-field-table-dialog-
|
|
25
|
-
import * as i21 from "./components/form/formly/fields/formly-field-
|
|
26
|
-
import * as i22 from "./components/form/formly/fields/formly-field-
|
|
27
|
-
import * as i23 from "./components/
|
|
28
|
-
import * as i24 from "./components/tableview/
|
|
29
|
-
import * as i25 from "./components/tableview/
|
|
30
|
-
import * as i26 from "./components/tableview/table/column-
|
|
31
|
-
import * as i27 from "./components/tableview/
|
|
32
|
-
import * as i28 from "./components/
|
|
33
|
-
import * as i29 from "./components/
|
|
34
|
-
import * as i30 from "./components/action/
|
|
35
|
-
import * as i31 from "./components/action/
|
|
36
|
-
import * as i32 from "
|
|
37
|
-
import * as i33 from "@angular/
|
|
38
|
-
import * as i34 from "@angular/
|
|
39
|
-
import * as i35 from "@angular/
|
|
40
|
-
import * as i36 from "@
|
|
41
|
-
import * as i37 from "@ngx-
|
|
42
|
-
import * as i38 from "
|
|
43
|
-
import * as i39 from "primeng/
|
|
44
|
-
import * as i40 from "primeng/
|
|
45
|
-
import * as i41 from "primeng/
|
|
46
|
-
import * as i42 from "primeng/
|
|
47
|
-
import * as i43 from "primeng/
|
|
48
|
-
import * as i44 from "primeng/
|
|
49
|
-
import * as i45 from "primeng/
|
|
50
|
-
import * as i46 from "primeng/
|
|
51
|
-
import * as i47 from "primeng/
|
|
52
|
-
import * as i48 from "primeng/
|
|
53
|
-
import * as i49 from "primeng/
|
|
54
|
-
import * as i50 from "primeng/
|
|
55
|
-
import * as i51 from "primeng/
|
|
56
|
-
import * as i52 from "primeng/
|
|
57
|
-
import * as i53 from "primeng/
|
|
58
|
-
import * as i54 from "primeng/
|
|
59
|
-
import * as i55 from "primeng/
|
|
60
|
-
import * as i56 from "primeng/
|
|
61
|
-
import * as i57 from "primeng/
|
|
62
|
-
import * as i58 from "primeng/
|
|
63
|
-
import * as i59 from "primeng/
|
|
64
|
-
import * as i60 from "primeng/
|
|
65
|
-
import * as i61 from "primeng/
|
|
66
|
-
import * as i62 from "primeng/
|
|
67
|
-
import * as i63 from "primeng/
|
|
68
|
-
import * as i64 from "primeng/
|
|
69
|
-
import * as i65 from "primeng/
|
|
70
|
-
import * as i66 from "primeng/
|
|
71
|
-
import * as i67 from "primeng/
|
|
72
|
-
import * as i68 from "primeng/
|
|
73
|
-
import * as i69 from "primeng/
|
|
74
|
-
import * as i70 from "primeng/
|
|
75
|
-
import * as i71 from "primeng/
|
|
8
|
+
import * as i4 from "./pipes/enum.pipe";
|
|
9
|
+
import * as i5 from "./pipes/boolean.pipe";
|
|
10
|
+
import * as i6 from "./pipes/i18n-property.pipe";
|
|
11
|
+
import * as i7 from "./components/layout/breadcrumb.component";
|
|
12
|
+
import * as i8 from "./components/layout/footer.component";
|
|
13
|
+
import * as i9 from "./components/layout/main-layout.component";
|
|
14
|
+
import * as i10 from "./components/layout/menu.component";
|
|
15
|
+
import * as i11 from "./components/layout/menu-item.component";
|
|
16
|
+
import * as i12 from "./components/layout/topbar.component";
|
|
17
|
+
import * as i13 from "./components/form/autocomplete/autocomplete.component";
|
|
18
|
+
import * as i14 from "./components/form/dropdown/dropdown.component";
|
|
19
|
+
import * as i15 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
|
|
20
|
+
import * as i16 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
|
|
21
|
+
import * as i17 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
|
|
22
|
+
import * as i18 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
|
|
23
|
+
import * as i19 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
|
|
24
|
+
import * as i20 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
|
|
25
|
+
import * as i21 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
|
|
26
|
+
import * as i22 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
|
|
27
|
+
import * as i23 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
|
|
28
|
+
import * as i24 from "./components/tableview/table/table.component";
|
|
29
|
+
import * as i25 from "./components/tableview/tableview.component";
|
|
30
|
+
import * as i26 from "./components/tableview/table/column-value/column-value.component";
|
|
31
|
+
import * as i27 from "./components/tableview/table/column-filter/column-filter.component";
|
|
32
|
+
import * as i28 from "./components/tableview/route/tableview-route.component";
|
|
33
|
+
import * as i29 from "./components/form/editor/form-editor.component";
|
|
34
|
+
import * as i30 from "./components/action/action.component";
|
|
35
|
+
import * as i31 from "./components/action/dialog/action-dialog.component";
|
|
36
|
+
import * as i32 from "./components/action/route/action-route.component";
|
|
37
|
+
import * as i33 from "@angular/common";
|
|
38
|
+
import * as i34 from "@angular/router";
|
|
39
|
+
import * as i35 from "@angular/common/http";
|
|
40
|
+
import * as i36 from "@angular/forms";
|
|
41
|
+
import * as i37 from "@ngx-translate/core";
|
|
42
|
+
import * as i38 from "@ngx-formly/core";
|
|
43
|
+
import * as i39 from "primeng/autocomplete";
|
|
44
|
+
import * as i40 from "primeng/breadcrumb";
|
|
45
|
+
import * as i41 from "primeng/button";
|
|
46
|
+
import * as i42 from "primeng/calendar";
|
|
47
|
+
import * as i43 from "primeng/card";
|
|
48
|
+
import * as i44 from "primeng/checkbox";
|
|
49
|
+
import * as i45 from "primeng/chip";
|
|
50
|
+
import * as i46 from "primeng/confirmdialog";
|
|
51
|
+
import * as i47 from "primeng/confirmpopup";
|
|
52
|
+
import * as i48 from "primeng/dialog";
|
|
53
|
+
import * as i49 from "primeng/dynamicdialog";
|
|
54
|
+
import * as i50 from "primeng/dropdown";
|
|
55
|
+
import * as i51 from "primeng/fileupload";
|
|
56
|
+
import * as i52 from "primeng/inputnumber";
|
|
57
|
+
import * as i53 from "primeng/inputmask";
|
|
58
|
+
import * as i54 from "primeng/inputswitch";
|
|
59
|
+
import * as i55 from "primeng/inputtext";
|
|
60
|
+
import * as i56 from "primeng/inputtextarea";
|
|
61
|
+
import * as i57 from "primeng/paginator";
|
|
62
|
+
import * as i58 from "primeng/radiobutton";
|
|
63
|
+
import * as i59 from "primeng/ripple";
|
|
64
|
+
import * as i60 from "primeng/selectbutton";
|
|
65
|
+
import * as i61 from "primeng/table";
|
|
66
|
+
import * as i62 from "primeng/tag";
|
|
67
|
+
import * as i63 from "primeng/toast";
|
|
68
|
+
import * as i64 from "primeng/togglebutton";
|
|
69
|
+
import * as i65 from "primeng/toolbar";
|
|
70
|
+
import * as i66 from "primeng/tooltip";
|
|
71
|
+
import * as i67 from "primeng/messages";
|
|
72
|
+
import * as i68 from "primeng/progressspinner";
|
|
73
|
+
import * as i69 from "primeng/tabview";
|
|
74
|
+
import * as i70 from "primeng/fieldset";
|
|
75
|
+
import * as i71 from "primeng/multiselect";
|
|
76
|
+
import * as i72 from "primeng/skeleton";
|
|
76
77
|
export declare const primeNgModules: (typeof InputTextModule)[];
|
|
77
78
|
export declare class MngCommonsModule {
|
|
78
79
|
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
|
|
79
80
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
|
|
80
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.
|
|
81
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldTableDialogMultiselectComponent, typeof i21.MngFormlyFieldTableDialogFormComponent, typeof i22.MngFormlyFieldTabsComponent, typeof i23.MngFormlyFieldFieldsetComponent, typeof i24.MngTableComponent, typeof i25.MngTableviewComponent, typeof i26.MngTableColumnValueComponent, typeof i27.MngTableColumnFilterComponent, typeof i28.MngTableviewRouteComponent, typeof i29.MngFormEditorComponent, typeof i30.MngActionComponent, typeof i31.MngActionDialogComponent, typeof i32.MngActionRouteComponent], [typeof i33.CommonModule, typeof i34.RouterModule, typeof i35.HttpClientModule, typeof i36.ReactiveFormsModule, typeof i37.TranslateModule, typeof i38.FormlyModule, typeof i39.AutoCompleteModule, typeof i40.BreadcrumbModule, typeof i41.ButtonModule, typeof i42.CalendarModule, typeof i43.CardModule, typeof i44.CheckboxModule, typeof i45.ChipModule, typeof i46.ConfirmDialogModule, typeof i47.ConfirmPopupModule, typeof i48.DialogModule, typeof i49.DynamicDialogModule, typeof i50.DropdownModule, typeof i51.FileUploadModule, typeof i52.InputNumberModule, typeof i53.InputMaskModule, typeof i54.InputSwitchModule, typeof i55.InputTextModule, typeof i56.InputTextareaModule, typeof i57.PaginatorModule, typeof i58.RadioButtonModule, typeof i59.RippleModule, typeof i60.SelectButtonModule, typeof i61.TableModule, typeof i62.TagModule, typeof i63.ToastModule, typeof i64.ToggleButtonModule, typeof i65.ToolbarModule, typeof i66.TooltipModule, typeof i67.MessagesModule, typeof i68.ProgressSpinnerModule, typeof i69.TabViewModule, typeof i70.FieldsetModule, typeof i71.MultiSelectModule, typeof i72.SkeletonModule], [typeof i39.AutoCompleteModule, typeof i40.BreadcrumbModule, typeof i41.ButtonModule, typeof i42.CalendarModule, typeof i43.CardModule, typeof i44.CheckboxModule, typeof i45.ChipModule, typeof i46.ConfirmDialogModule, typeof i47.ConfirmPopupModule, typeof i48.DialogModule, typeof i49.DynamicDialogModule, typeof i50.DropdownModule, typeof i51.FileUploadModule, typeof i52.InputNumberModule, typeof i53.InputMaskModule, typeof i54.InputSwitchModule, typeof i55.InputTextModule, typeof i56.InputTextareaModule, typeof i57.PaginatorModule, typeof i58.RadioButtonModule, typeof i59.RippleModule, typeof i60.SelectButtonModule, typeof i61.TableModule, typeof i62.TagModule, typeof i63.ToastModule, typeof i64.ToggleButtonModule, typeof i65.ToolbarModule, typeof i66.TooltipModule, typeof i67.MessagesModule, typeof i68.ProgressSpinnerModule, typeof i69.TabViewModule, typeof i70.FieldsetModule, typeof i71.MultiSelectModule, typeof i72.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngBreadcrumbComponent, typeof i8.MngFooterComponent, typeof i9.MngMainLayoutComponent, typeof i10.MngMenuComponent, typeof i11.MngMenuItemComponent, typeof i12.MngTopbarComponent, typeof i13.MngAutocompleteComponent, typeof i14.MngDropdownComponent, typeof i15.MngFormlyFieldWrapperComponent, typeof i16.MngFormlyTableWrapperComponent, typeof i17.MngFormlyFieldInputComponent, typeof i18.MngFormlyFieldDropdownComponent, typeof i19.MngFormlyFieldAutocompleteComponent, typeof i20.MngFormlyFieldTableDialogMultiselectComponent, typeof i21.MngFormlyFieldTableDialogFormComponent, typeof i22.MngFormlyFieldTabsComponent, typeof i23.MngFormlyFieldFieldsetComponent, typeof i24.MngTableComponent, typeof i25.MngTableviewComponent, typeof i26.MngTableColumnValueComponent, typeof i27.MngTableColumnFilterComponent, typeof i28.MngTableviewRouteComponent, typeof i29.MngFormEditorComponent, typeof i30.MngActionComponent, typeof i31.MngActionDialogComponent, typeof i32.MngActionRouteComponent]>;
|
|
81
82
|
static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
|
|
82
83
|
}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QueryParamsHandling } from '@angular/router';
|
|
2
|
+
export interface MngMenuItem {
|
|
3
|
+
title?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
items?: Array<MngMenuItem>;
|
|
7
|
+
guards?: Array<any>;
|
|
8
|
+
separator?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
badge?: string;
|
|
11
|
+
badgeClassName?: string;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
routerLink?: string | Array<string>;
|
|
15
|
+
href?: string;
|
|
16
|
+
target?: string;
|
|
17
|
+
queryParams?: {
|
|
18
|
+
[k: string]: any;
|
|
19
|
+
};
|
|
20
|
+
fragment?: string;
|
|
21
|
+
queryParamsHandling?: QueryParamsHandling;
|
|
22
|
+
preserveFragment?: boolean;
|
|
23
|
+
skipLocationChange?: boolean;
|
|
24
|
+
replaceUrl?: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MngEnumPipe implements PipeTransform {
|
|
4
|
+
transform(value: string | number, enumObj: any, i18nPath?: string | null, nameAsValue?: boolean): any;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngEnumPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MngEnumPipe, "enum">;
|
|
7
|
+
}
|
package/lib/pipes/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { LoadChildren, Route, Routes } from '@angular/router';
|
|
3
|
-
import { MenuItem } from 'primeng/api';
|
|
4
3
|
import { MngMainLayoutComponent } from '../components/layout';
|
|
5
4
|
import { ITableviewDataProvider } from '../data-providers';
|
|
6
5
|
import { ActionDescriptor, TableviewDescriptor } from '../descriptors';
|
|
6
|
+
import { MngMenuItem } from '../models';
|
|
7
7
|
import { BreadcrumbType } from './models';
|
|
8
8
|
export declare class RoutesBuilder {
|
|
9
9
|
private readonly layoutRoute?;
|
|
@@ -14,14 +14,14 @@ export declare class RoutesBuilder {
|
|
|
14
14
|
static createWithLayout(layoutComponent?: typeof MngMainLayoutComponent): RoutesBuilder;
|
|
15
15
|
addAngularRoute(route: Route): this;
|
|
16
16
|
addRouteRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): this;
|
|
17
|
-
addLazyRoute(path: string, loadChildren: LoadChildren): this;
|
|
17
|
+
addLazyRoute(path: string, loadChildren: LoadChildren, canLoad?: Array<any>): this;
|
|
18
18
|
addRoute(path: string, component: Type<any>): this;
|
|
19
19
|
addTableviewRoutes<T, S>(path: string, descriptor: TableviewDescriptor<T>, tableviewDataProvider: ITableviewDataProvider<T, S>, actions?: Array<ActionDescriptor<T>>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): this;
|
|
20
20
|
addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): this;
|
|
21
21
|
addRouteBuilder(routeBuilder: RouteBuilder): this;
|
|
22
22
|
toRoute(): RouteBuilder;
|
|
23
23
|
buildRoutes(): Routes;
|
|
24
|
-
buildMenu(): Array<
|
|
24
|
+
buildMenu(): Array<MngMenuItem>;
|
|
25
25
|
}
|
|
26
26
|
export declare class RouteBuilder {
|
|
27
27
|
private readonly route;
|
|
@@ -47,8 +47,11 @@ export declare class RouteBuilder {
|
|
|
47
47
|
withRedirectTo(redirectTo: string): this;
|
|
48
48
|
withPathMatch(pathMatch: 'full' | 'prefix'): this;
|
|
49
49
|
withTitle(title: string): this;
|
|
50
|
+
withCanActivate(diToken: any): this;
|
|
51
|
+
withCanDeactivate(diToken: any): this;
|
|
52
|
+
withResolver(diToken: any, name: string): this;
|
|
50
53
|
withData(data: any): this;
|
|
51
|
-
|
|
54
|
+
withMngMenuItem(menuItem: MngMenuItem): this;
|
|
52
55
|
withMenuItem(icon?: string, label?: string, routerLink?: Array<string>): this;
|
|
53
56
|
withMenuItemChild(label: string, icon?: string, routerLink?: Array<string>): this;
|
|
54
57
|
withMenuItemChildren(routesBuilder: RoutesBuilder): this;
|
|
@@ -60,7 +63,8 @@ export declare class RouteBuilder {
|
|
|
60
63
|
toRoot(): RoutesBuilder;
|
|
61
64
|
finish(): RoutesBuilder;
|
|
62
65
|
buildRoute(): Route;
|
|
63
|
-
buildMenu(): Array<
|
|
66
|
+
buildMenu(): Array<MngMenuItem>;
|
|
64
67
|
private createMenuItem;
|
|
65
68
|
private adjustMenuRouterLinksFromBuilder;
|
|
69
|
+
private findMenuItemGuards;
|
|
66
70
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Title } from '@angular/platform-browser';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import {
|
|
4
|
+
import { PrimeNGConfig } from 'primeng/api';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { MngModuleConfig } from '../config/models';
|
|
7
|
-
import { IUser } from '../models';
|
|
7
|
+
import { IUser, MngMenuItem } from '../models';
|
|
8
8
|
import { MngConfigurationService } from './configuration.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class MngCommonsService {
|
|
@@ -48,11 +48,11 @@ export declare class MngCommonsService {
|
|
|
48
48
|
get menuModeIsSidebar$(): Observable<boolean>;
|
|
49
49
|
get menuActiveKey$(): Observable<string>;
|
|
50
50
|
get menuReset$(): Observable<any>;
|
|
51
|
-
get menuItems():
|
|
52
|
-
set menuItems(menuItems:
|
|
51
|
+
get menuItems(): MngMenuItem[];
|
|
52
|
+
set menuItems(menuItems: MngMenuItem[]);
|
|
53
53
|
get menuPinEnabled(): boolean;
|
|
54
|
-
get breadcrumbHome$(): Observable<
|
|
55
|
-
get breadcrumbs$(): Observable<
|
|
54
|
+
get breadcrumbHome$(): Observable<MngMenuItem | null>;
|
|
55
|
+
get breadcrumbs$(): Observable<MngMenuItem[]>;
|
|
56
56
|
get colorSchemeIsLight(): boolean;
|
|
57
57
|
get colorSchemeIsDark(): boolean;
|
|
58
58
|
get user(): IUser | undefined;
|
package/lib/utils/enum.util.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export declare class EnumUtil {
|
|
|
6
6
|
* @param enumType Enum object.
|
|
7
7
|
*/
|
|
8
8
|
static getConstantNames(enumType: EnumType): Array<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Returns array of names for constants in enum.
|
|
11
|
+
* @param enumObj Enum object.
|
|
12
|
+
*/
|
|
13
|
+
static getConstantNamesFromEnumObject(enumObj: object): Array<string>;
|
|
9
14
|
/**
|
|
10
15
|
* Returns array of string values for constants in enum.
|
|
11
16
|
* @param enumType Enum object.
|
|
@@ -36,4 +41,10 @@ export declare class EnumUtil {
|
|
|
36
41
|
* @param value Value of enum constant.
|
|
37
42
|
*/
|
|
38
43
|
static getConstantName(enumType: EnumType, value: EnumConstantType): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Gets constant name for value.
|
|
46
|
+
* @param enumObj Enum object.
|
|
47
|
+
* @param value Value of enum constant.
|
|
48
|
+
*/
|
|
49
|
+
static getConstantNameFromEnumObject(enumObj: object, value: EnumConstantType): string | null;
|
|
39
50
|
}
|
package/package.json
CHANGED