wt-front-shared 19.0.18 → 19.0.20
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/fesm2022/wt-front-shared.mjs +2167 -765
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/index.d.ts +1 -1
- package/lib/core/+state/static-data/behavios/static-data-create-with-sub-entities-behavior.d.ts +10 -0
- package/lib/core/+state/static-data/static-data.actions.d.ts +22 -0
- package/lib/core/+state/static-data/static-data.effects.d.ts +1 -0
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -0
- package/lib/core/+state/users/behavios/login-send-behavior.d.ts +2 -1
- package/lib/core/+state/users/behavios/refresh-token-behavior.d.ts +3 -1
- package/lib/core/+state/users/users.actions.d.ts +5 -2
- package/lib/core/+state/users/users.effects.d.ts +9 -7
- package/lib/core/+state/users/users.facade.d.ts +4 -1
- package/lib/core/components/auto-form/components/form-field-input-show/form-field-input-show.component.d.ts +3 -1
- package/lib/core/components/auto-form/components/form-field-select/form-field-select.component.d.ts +3 -1
- package/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.d.ts +1 -1
- package/lib/core/components/auto-form/containers/auto-form-show/auto-form-show.component.d.ts +8 -3
- package/lib/core/components/auto-form/containers/auto-form-show-field/auto-form-show-field.component.d.ts +2 -2
- package/lib/core/components/auto-form/interfaces/form-field-option.d.ts +1 -1
- package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +2 -0
- package/lib/core/components/index.d.ts +1 -0
- package/lib/core/components/static-data/components/field-settings-dialog/field-settings-dialog.component.d.ts +38 -0
- package/lib/core/components/static-data/components/filtering-dialog/filtering-dialog.component.d.ts +43 -0
- package/lib/core/components/static-data/components/filtering-form/filtering-form.component.d.ts +59 -0
- package/lib/core/components/static-data/components/list-sub-entities/list-sub-entities.component.d.ts +26 -0
- package/lib/core/components/static-data/components/static-data-filter-options/static-data-filter-options.component.d.ts +27 -0
- package/lib/core/components/static-data/components/static-data-list-filtering/static-data-list-filtering.component.d.ts +38 -0
- package/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.d.ts +40 -2
- package/lib/core/components/static-data/components/view-static-data-details-dialog/view-static-data-details-dialog.component.d.ts +28 -0
- package/lib/core/components/static-data/containers/static-data-details/static-data-details.component.d.ts +10 -4
- package/lib/core/components/static-data/containers/static-data-items/static-data-items.component.d.ts +29 -7
- package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts +7 -1
- package/lib/core/components/static-data/containers/static-data-view/static-data-view.component.d.ts +94 -0
- package/lib/core/components/static-data/interfaces/static-data.interface.d.ts +76 -1
- package/lib/core/components/static-data/static-data.module.d.ts +41 -31
- package/lib/core/interceptors/headers.interceptor.d.ts +1 -3
- package/lib/core/services/auth/authentication.service.d.ts +19 -24
- package/lib/core/services/static-data/static-data.service.d.ts +2 -0
- package/lib/core/utils/custom-pagginator.d.ts +14 -0
- package/lib/models/endpoints/static-data/static-data-create/request/static-data-create-request-config.d.ts +1 -0
- package/lib/models/endpoints/static-data/static-data-create-with-sub-entities/index.d.ts +1 -0
- package/lib/models/endpoints/static-data/static-data-create-with-sub-entities/request/index.d.ts +2 -0
- package/lib/models/endpoints/static-data/static-data-create-with-sub-entities/request/static-data-create-with-sub-entities-request-config.d.ts +13 -0
- package/lib/models/endpoints/static-data/static-data-create-with-sub-entities/request/static-data-create-with-sub-entities-request.d.ts +11 -0
- package/lib/models/endpoints/static-data/static-data-endpoint-types.d.ts +2 -1
- package/package.json +1 -1
- package/src/lib/styles.css +237 -1
- package/src/lib/styles.css.map +1 -1
|
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { MatSort } from '@angular/material/sort';
|
|
4
4
|
import { MatPaginator } from '@angular/material/paginator';
|
|
5
5
|
import { MatDialog } from '@angular/material/dialog';
|
|
6
|
-
import { StaticDataSection, StaticDataSections, SubEntityAutoCompleteField } from '../../interfaces/static-data.interface';
|
|
6
|
+
import { FieldsOnListPage, StaticDataSection, StaticDataSections, SubEntity, SubEntityAutoCompleteField } from '../../interfaces/static-data.interface';
|
|
7
7
|
import { StaticDataMeta } from '../../../../+state/static-data/static-data.reducer';
|
|
8
8
|
import { StaticDataModel } from '../../../../../models';
|
|
9
9
|
import { RightService } from '../../../../services/right-service';
|
|
@@ -21,9 +21,11 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
21
21
|
private changeDetectorRef;
|
|
22
22
|
private routerFacade;
|
|
23
23
|
staticDataConfiguration: StaticDataSections;
|
|
24
|
+
viewMode: boolean;
|
|
24
25
|
contentType: string;
|
|
25
26
|
customTitle: string;
|
|
26
27
|
addTitle: string;
|
|
28
|
+
icon: string;
|
|
27
29
|
parentSection: string;
|
|
28
30
|
parentItemId: number;
|
|
29
31
|
showPanelHeader: boolean;
|
|
@@ -33,6 +35,8 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
33
35
|
filteringQuery: {
|
|
34
36
|
[key: string]: string | number;
|
|
35
37
|
};
|
|
38
|
+
subEntity: SubEntity;
|
|
39
|
+
leftBlockFilterParamData: any;
|
|
36
40
|
paginator: MatPaginator;
|
|
37
41
|
sort: MatSort;
|
|
38
42
|
searchInput: ElementRef;
|
|
@@ -52,6 +56,21 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
52
56
|
}>;
|
|
53
57
|
queryParams: any;
|
|
54
58
|
isBrowser: boolean;
|
|
59
|
+
filterFormData: {
|
|
60
|
+
[key: string]: number | string;
|
|
61
|
+
};
|
|
62
|
+
sortingData: {
|
|
63
|
+
field: string;
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
filterFormDataValues: {
|
|
67
|
+
[key: string]: number | string;
|
|
68
|
+
};
|
|
69
|
+
displayedColumns: {
|
|
70
|
+
field: string;
|
|
71
|
+
title: string;
|
|
72
|
+
}[];
|
|
73
|
+
defaultFieldsList: FieldsOnListPage[];
|
|
55
74
|
constructor(platformId: Object, dialog: MatDialog, rightService: RightService, staticDataFacade: StaticDataFacade, changeDetectorRef: ChangeDetectorRef, routerFacade: RouterFacade);
|
|
56
75
|
ngOnInit(): void;
|
|
57
76
|
ngOnDestroy(): void;
|
|
@@ -60,8 +79,27 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
60
79
|
addHandle(): void;
|
|
61
80
|
searchHandle(searchValue: string): void;
|
|
62
81
|
searchCancelHandle(): void;
|
|
82
|
+
filterHandle(filterData: {
|
|
83
|
+
status: boolean;
|
|
84
|
+
ids: {
|
|
85
|
+
[key: string]: string | number;
|
|
86
|
+
};
|
|
87
|
+
values: {
|
|
88
|
+
[key: string]: string | number;
|
|
89
|
+
};
|
|
90
|
+
}): void;
|
|
63
91
|
preparingQueryParams(): void;
|
|
64
92
|
private loadData;
|
|
93
|
+
changedFilterHandler(newFilterOptions: {
|
|
94
|
+
value: {
|
|
95
|
+
[key: string]: number | string;
|
|
96
|
+
};
|
|
97
|
+
}): void;
|
|
98
|
+
changeSortingHandle(sorting: {
|
|
99
|
+
field: string;
|
|
100
|
+
type: string;
|
|
101
|
+
}): void;
|
|
102
|
+
openFieldSettings(): void;
|
|
65
103
|
private loadStaticData;
|
|
66
104
|
private groupItemsByNestedField;
|
|
67
105
|
private groupItemsByNestedFieldRecursion;
|
|
@@ -71,5 +109,5 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
71
109
|
deleteEvent(item: StaticDataModel): void;
|
|
72
110
|
changePage(data: any): void;
|
|
73
111
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent, never>;
|
|
74
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListItemsComponent, "app-static-data-list-items", never, { "staticDataConfiguration": { "alias": "staticDataConfiguration"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "customTitle": { "alias": "customTitle"; "required": false; }; "addTitle": { "alias": "addTitle"; "required": false; }; "parentSection": { "alias": "parentSection"; "required": false; }; "parentItemId": { "alias": "parentItemId"; "required": false; }; "showPanelHeader": { "alias": "showPanelHeader"; "required": false; }; "parentData": { "alias": "parentData"; "required": false; }; "parentSectionHashtag": { "alias": "parentSectionHashtag"; "required": false; }; "autoCompleteFields": { "alias": "autoCompleteFields"; "required": false; }; "filteringQuery": { "alias": "filteringQuery"; "required": false; }; }, {}, never, never,
|
|
112
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListItemsComponent, "app-static-data-list-items", never, { "staticDataConfiguration": { "alias": "staticDataConfiguration"; "required": false; }; "viewMode": { "alias": "viewMode"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "customTitle": { "alias": "customTitle"; "required": false; }; "addTitle": { "alias": "addTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "parentSection": { "alias": "parentSection"; "required": false; }; "parentItemId": { "alias": "parentItemId"; "required": false; }; "showPanelHeader": { "alias": "showPanelHeader"; "required": false; }; "parentData": { "alias": "parentData"; "required": false; }; "parentSectionHashtag": { "alias": "parentSectionHashtag"; "required": false; }; "autoCompleteFields": { "alias": "autoCompleteFields"; "required": false; }; "filteringQuery": { "alias": "filteringQuery"; "required": false; }; "subEntity": { "alias": "subEntity"; "required": false; }; "leftBlockFilterParamData": { "alias": "leftBlockFilterParamData"; "required": false; }; }, {}, never, never, true, never>;
|
|
75
113
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ViewStaticDataDetailsDialogComponent implements OnInit {
|
|
5
|
+
private dialogRef;
|
|
6
|
+
data: {
|
|
7
|
+
itemId: number;
|
|
8
|
+
contentType: string;
|
|
9
|
+
sectionFields: any;
|
|
10
|
+
staticSection: any;
|
|
11
|
+
itemData: any;
|
|
12
|
+
};
|
|
13
|
+
contentType: string;
|
|
14
|
+
itemId: number;
|
|
15
|
+
sectionFields: any;
|
|
16
|
+
staticSection: any;
|
|
17
|
+
constructor(dialogRef: MatDialogRef<ViewStaticDataDetailsDialogComponent>, data: {
|
|
18
|
+
itemId: number;
|
|
19
|
+
contentType: string;
|
|
20
|
+
sectionFields: any;
|
|
21
|
+
staticSection: any;
|
|
22
|
+
itemData: any;
|
|
23
|
+
});
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
onNoClick(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewStaticDataDetailsDialogComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ViewStaticDataDetailsDialogComponent, "app-view-static-data-details-dialog", never, {}, {}, never, never, true, never>;
|
|
28
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Injector, OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, Injector, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable, Subject, Subscription } from 'rxjs';
|
|
4
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
5
|
import { MatDialog } from '@angular/material/dialog';
|
|
6
6
|
import { IFormField } from '../../../auto-form/interfaces/form-field';
|
|
7
|
-
import { StaticDataAction, StaticDataSection, StaticDataSections } from '../../interfaces/static-data.interface';
|
|
7
|
+
import { StaticDataAction, StaticDataSection, StaticDataSections, SubEntity } from '../../interfaces/static-data.interface';
|
|
8
8
|
import { StaticDataModel, UserModel } from '../../../../../models';
|
|
9
9
|
import { StaticDataMetaStatus } from '../../../../+state/static-data/static-data.reducer';
|
|
10
10
|
import { AuthenticationService, AutoFormService } from '../../../../services';
|
|
@@ -20,8 +20,9 @@ import { ActionsFacade } from '../../../../+state/actions/actions.facade';
|
|
|
20
20
|
import { AutoFormChanged } from '../../../auto-form/interfaces/auto-form.interfaces';
|
|
21
21
|
import { RightService } from '../../../../services/right-service';
|
|
22
22
|
import { MatIconRegistry } from "@angular/material/icon";
|
|
23
|
+
import { MatTab } from "@angular/material/tabs";
|
|
23
24
|
import * as i0 from "@angular/core";
|
|
24
|
-
export declare class StaticDataDetailsComponent implements OnInit, OnDestroy {
|
|
25
|
+
export declare class StaticDataDetailsComponent implements OnInit, OnDestroy, OnChanges {
|
|
25
26
|
private fb;
|
|
26
27
|
private router;
|
|
27
28
|
private route;
|
|
@@ -41,6 +42,7 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy {
|
|
|
41
42
|
private cd;
|
|
42
43
|
private matIconReg;
|
|
43
44
|
private authService;
|
|
45
|
+
tabs: QueryList<MatTab>;
|
|
44
46
|
form: UntypedFormGroup;
|
|
45
47
|
formId: string;
|
|
46
48
|
fields: IFormField[];
|
|
@@ -98,6 +100,8 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy {
|
|
|
98
100
|
currentLanguageId: number;
|
|
99
101
|
defaultLanguageId: number;
|
|
100
102
|
activeTabIndex: number;
|
|
103
|
+
activeTabHashTag: any;
|
|
104
|
+
blocks: SubEntity[];
|
|
101
105
|
MESSAGES: {
|
|
102
106
|
delete: {
|
|
103
107
|
title: string;
|
|
@@ -128,6 +132,7 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy {
|
|
|
128
132
|
constructor(fb: UntypedFormBuilder, router: Router, route: ActivatedRoute, autoFormService: AutoFormService, routerFacade: RouterFacade, formErrors: FormErrorsFacade, formsFacade: FormsFacade, requestsFacade: RequestsFacade, staticDataFacade: StaticDataFacade, rightService: RightService, dialog: MatDialog, notificationsFacade: NotificationsFacade, coreFacade: CoreFacade, publicationMessagesFacade: PublicationMessagesFacade, actionsFacade: ActionsFacade, injector: Injector, cd: ChangeDetectorRef, matIconReg: MatIconRegistry, authService: AuthenticationService);
|
|
129
133
|
ngOnInit(): void;
|
|
130
134
|
ngOnDestroy(): void;
|
|
135
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
131
136
|
publishInTelegram(): void;
|
|
132
137
|
private subscribeToRequestStatusStatus;
|
|
133
138
|
private getUrlExtras;
|
|
@@ -150,6 +155,7 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy {
|
|
|
150
155
|
private subscribeToDataStatus;
|
|
151
156
|
private submitClickHandler;
|
|
152
157
|
private updatePublishedItemPopup;
|
|
158
|
+
trackByKey(index: number, subEntity: SubEntity): string;
|
|
153
159
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataDetailsComponent, never>;
|
|
154
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataDetailsComponent, "app-static-data-details", never, {}, {}, never, never,
|
|
160
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataDetailsComponent, "app-static-data-details", never, {}, {}, never, never, true, never>;
|
|
155
161
|
}
|
|
@@ -1,36 +1,58 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
+
import { MatIconRegistry } from "@angular/material/icon";
|
|
3
4
|
import { StaticDataModel } from '../../../../../models';
|
|
4
|
-
import {
|
|
5
|
+
import { StaticDataSection, SubEntity } from '../../interfaces/static-data.interface';
|
|
5
6
|
import { RouterFacade } from '../../../../+state/router/router.facade';
|
|
6
7
|
import { StaticDataFacade } from '../../../../+state/static-data/static-data.facade';
|
|
7
|
-
import {
|
|
8
|
+
import { IFormField } from "../../../auto-form/interfaces/form-field";
|
|
9
|
+
import { Dialog } from "@angular/cdk/dialog";
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
11
|
export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
10
12
|
private routerFacade;
|
|
11
13
|
private staticDataFacade;
|
|
14
|
+
private cd;
|
|
15
|
+
private dialog;
|
|
12
16
|
private matIconReg;
|
|
13
17
|
items: StaticDataModel[];
|
|
18
|
+
displayedColumns: {
|
|
19
|
+
field: string;
|
|
20
|
+
title: string;
|
|
21
|
+
}[];
|
|
14
22
|
contentType: string;
|
|
23
|
+
viewMode: boolean;
|
|
15
24
|
queryParams: any;
|
|
16
25
|
userRights: {
|
|
17
26
|
[key: number]: boolean;
|
|
18
27
|
};
|
|
28
|
+
subEntityConfig: SubEntity;
|
|
19
29
|
staticSection: StaticDataSection;
|
|
20
30
|
delete: EventEmitter<StaticDataModel>;
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
changeSorting: EventEmitter<{
|
|
32
|
+
field: string;
|
|
33
|
+
type: string;
|
|
34
|
+
}>;
|
|
35
|
+
displayedFormFields: IFormField[];
|
|
36
|
+
displayedColumnsStrings: string[];
|
|
23
37
|
editUrlArray: (string | number)[];
|
|
24
38
|
preparedItems$: Observable<StaticDataModel[]>;
|
|
25
39
|
listOfItems: StaticDataModel[];
|
|
26
|
-
|
|
40
|
+
sortingState: {
|
|
41
|
+
field: string;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
constructor(routerFacade: RouterFacade, staticDataFacade: StaticDataFacade, cd: ChangeDetectorRef, dialog: Dialog, matIconReg: MatIconRegistry);
|
|
27
45
|
ngOnInit(): void;
|
|
28
46
|
ngOnChanges(changes: SimpleChanges): void;
|
|
47
|
+
clickAction(id: number): void;
|
|
29
48
|
edit(id: number): void;
|
|
49
|
+
view(id: number): void;
|
|
50
|
+
openViewInModal(id: number): void;
|
|
30
51
|
deleteAction(item: StaticDataModel): void;
|
|
52
|
+
sorting(field: string, type: string): void;
|
|
31
53
|
private preparingItems;
|
|
32
54
|
private checkFieldGetValueMethod;
|
|
33
55
|
private getRowValue;
|
|
34
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataItemsComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataItemsComponent, "app-static-data-items", never, { "items": { "alias": "items"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "userRights": { "alias": "userRights"; "required": false; }; "staticSection": { "alias": "staticSection"; "required": false; }; }, { "delete": "delete"; }, never, never,
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataItemsComponent, "app-static-data-items", never, { "items": { "alias": "items"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "viewMode": { "alias": "viewMode"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "userRights": { "alias": "userRights"; "required": false; }; "subEntityConfig": { "alias": "subEntityConfig"; "required": false; }; "staticSection": { "alias": "staticSection"; "required": false; }; }, { "delete": "delete"; "changeSorting": "changeSorting"; }, never, never, true, never>;
|
|
36
58
|
}
|
package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { StaticDataSections } from '../../interfaces/static-data.interface';
|
|
5
5
|
import { MatIconRegistry } from "@angular/material/icon";
|
|
6
|
+
import { FilteringData } from "../../components/filtering-form/filtering-form.component";
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* @title Data table with sorting, pagination, and filtering.
|
|
@@ -12,12 +13,17 @@ export declare class StaticDataListComponent implements OnInit, OnDestroy {
|
|
|
12
13
|
private matIconReg;
|
|
13
14
|
contentType$: Observable<string>;
|
|
14
15
|
staticDataConfiguration: StaticDataSections;
|
|
16
|
+
filteringData: FilteringData;
|
|
15
17
|
private destroy$;
|
|
18
|
+
filterData: any;
|
|
16
19
|
constructor(activatedRoute: ActivatedRoute, matIconReg: MatIconRegistry);
|
|
17
20
|
ngOnInit(): Promise<void>;
|
|
18
21
|
ngOnDestroy(): void;
|
|
22
|
+
handleFilterData(data: {
|
|
23
|
+
[field: string]: any;
|
|
24
|
+
}): void;
|
|
19
25
|
private loadStaticDataConfiguration;
|
|
20
26
|
private loadContentType;
|
|
21
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListComponent, "app-static-data-list", never, {}, {}, never, never,
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListComponent, "app-static-data-list", never, {}, {}, never, never, true, never>;
|
|
23
29
|
}
|
package/lib/core/components/static-data/containers/static-data-view/static-data-view.component.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
+
import { IFormField } from '../../../auto-form/interfaces/form-field';
|
|
6
|
+
import { StaticDataAction, StaticDataSection, StaticDataSections, SubEntity } from '../../interfaces/static-data.interface';
|
|
7
|
+
import { StaticDataModel, UserModel } from '../../../../../models';
|
|
8
|
+
import { StaticDataMetaStatus } from '../../../../+state/static-data/static-data.reducer';
|
|
9
|
+
import { AuthenticationService } from '../../../../services';
|
|
10
|
+
import { RouterFacade } from '../../../../+state/router/router.facade';
|
|
11
|
+
import { StaticDataFacade } from '../../../../+state/static-data/static-data.facade';
|
|
12
|
+
import { CoreFacade } from '../../../../+state/core.facade';
|
|
13
|
+
import { ActionsFacade } from '../../../../+state/actions/actions.facade';
|
|
14
|
+
import { RightService } from '../../../../services/right-service';
|
|
15
|
+
import { MatIconRegistry } from "@angular/material/icon";
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
export declare class StaticDataViewComponent implements OnInit, OnDestroy {
|
|
18
|
+
private router;
|
|
19
|
+
private route;
|
|
20
|
+
private routerFacade;
|
|
21
|
+
private staticDataFacade;
|
|
22
|
+
private rightService;
|
|
23
|
+
private dialog;
|
|
24
|
+
private coreFacade;
|
|
25
|
+
private actionsFacade;
|
|
26
|
+
private injector;
|
|
27
|
+
private matIconReg;
|
|
28
|
+
private authService;
|
|
29
|
+
dialogContentType: string;
|
|
30
|
+
dialogItemId: number;
|
|
31
|
+
formData: StaticDataModel;
|
|
32
|
+
fields: IFormField[];
|
|
33
|
+
data: any;
|
|
34
|
+
destroy$: Subject<void>;
|
|
35
|
+
itemId: number;
|
|
36
|
+
parentSection: string;
|
|
37
|
+
parentItemId: number;
|
|
38
|
+
parentParentHashTag: string;
|
|
39
|
+
staticSection: StaticDataSection;
|
|
40
|
+
menuItems: SubEntity[];
|
|
41
|
+
blocks: SubEntity[];
|
|
42
|
+
contentType: string;
|
|
43
|
+
currentContentType: string;
|
|
44
|
+
staticSectionKey: string;
|
|
45
|
+
staticData$: Observable<{
|
|
46
|
+
value: StaticDataModel;
|
|
47
|
+
}>;
|
|
48
|
+
status$: Observable<{
|
|
49
|
+
value: string;
|
|
50
|
+
}>;
|
|
51
|
+
statusType: typeof StaticDataMetaStatus;
|
|
52
|
+
userRights$: Observable<{
|
|
53
|
+
[key: string]: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
currentItemId: number;
|
|
56
|
+
currentLanguageId: number;
|
|
57
|
+
defaultLanguageId: number;
|
|
58
|
+
activeTabIndex: number;
|
|
59
|
+
sectionFields: IFormField[];
|
|
60
|
+
publishInTelegramAction: string;
|
|
61
|
+
publishInTelegramActionId: number;
|
|
62
|
+
staticDataConfiguration: StaticDataSections;
|
|
63
|
+
componentDataInjector: Injector;
|
|
64
|
+
languageList: {
|
|
65
|
+
id: number;
|
|
66
|
+
name: string;
|
|
67
|
+
slug: string;
|
|
68
|
+
default: boolean;
|
|
69
|
+
}[];
|
|
70
|
+
additionalActions: StaticDataAction[];
|
|
71
|
+
currentUserData: UserModel;
|
|
72
|
+
mainBlockClass: string;
|
|
73
|
+
menuBlockClass: string;
|
|
74
|
+
globalViewSettings: {
|
|
75
|
+
theme: string;
|
|
76
|
+
isRtlEnabled: boolean;
|
|
77
|
+
};
|
|
78
|
+
howError: boolean;
|
|
79
|
+
constructor(router: Router, route: ActivatedRoute, routerFacade: RouterFacade, staticDataFacade: StaticDataFacade, rightService: RightService, dialog: MatDialog, coreFacade: CoreFacade, actionsFacade: ActionsFacade, injector: Injector, matIconReg: MatIconRegistry, authService: AuthenticationService);
|
|
80
|
+
ngOnInit(): void;
|
|
81
|
+
ngOnDestroy(): void;
|
|
82
|
+
publishInTelegram(): void;
|
|
83
|
+
actionHandle(data: StaticDataAction): void;
|
|
84
|
+
goBack(): void;
|
|
85
|
+
deleteAction(item: StaticDataModel): void;
|
|
86
|
+
private loadStaticDataConfiguration;
|
|
87
|
+
private subscribeToRoute;
|
|
88
|
+
private init;
|
|
89
|
+
private preLoadSections;
|
|
90
|
+
private staticDataSubscription;
|
|
91
|
+
private subscribeToDataStatus;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataViewComponent, never>;
|
|
93
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataViewComponent, "app-static-data-view", never, { "dialogContentType": { "alias": "dialogContentType"; "required": false; }; "dialogItemId": { "alias": "dialogItemId"; "required": false; }; }, {}, never, never, true, never>;
|
|
94
|
+
}
|
|
@@ -1,13 +1,62 @@
|
|
|
1
1
|
import { IFormField } from '../../auto-form/interfaces/form-field';
|
|
2
|
+
export declare enum StaticDataSectionFilteringFieldTypes {
|
|
3
|
+
"INPUT" = "input",
|
|
4
|
+
"BETWEEN" = "between",
|
|
5
|
+
"TOGGLE" = "toggle",
|
|
6
|
+
"SELECT" = "select"
|
|
7
|
+
}
|
|
8
|
+
export interface StaticDataSectionFilteringField {
|
|
9
|
+
field: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
type?: StaticDataSectionFilteringFieldTypes;
|
|
12
|
+
}
|
|
13
|
+
export interface StaticDataSectionFiltering {
|
|
14
|
+
fields: StaticDataSectionFilteringField[];
|
|
15
|
+
}
|
|
2
16
|
export interface FieldsOnListPage {
|
|
3
17
|
field: string;
|
|
4
18
|
title: string;
|
|
5
|
-
getValue?: any;
|
|
6
19
|
}
|
|
7
20
|
export interface SubEntityAutoCompleteField {
|
|
8
21
|
field: string;
|
|
9
22
|
getValue(itemData: any): string | number;
|
|
10
23
|
}
|
|
24
|
+
export declare enum SubEntityOptionsViewTypes {
|
|
25
|
+
LINK_IN_MENU = "link-in-menu",
|
|
26
|
+
BIG_BLOCK = "big-block",
|
|
27
|
+
SMALL_BLOCK = "small-block"
|
|
28
|
+
}
|
|
29
|
+
export interface SubEntityOptions {
|
|
30
|
+
hasSearch?: boolean;
|
|
31
|
+
hasFiltering?: boolean;
|
|
32
|
+
hasSorting?: boolean;
|
|
33
|
+
maxHeight?: number;
|
|
34
|
+
itemsCountPerPage?: number;
|
|
35
|
+
group?: {
|
|
36
|
+
key: string;
|
|
37
|
+
cols: number;
|
|
38
|
+
};
|
|
39
|
+
viewSettings?: {
|
|
40
|
+
listMode?: {
|
|
41
|
+
hide?: boolean;
|
|
42
|
+
viewType?: SubEntityOptionsViewTypes;
|
|
43
|
+
cols?: number;
|
|
44
|
+
positionType?: 'top' | 'bottom';
|
|
45
|
+
};
|
|
46
|
+
editMode?: {
|
|
47
|
+
hide?: boolean;
|
|
48
|
+
positionType?: 'top' | 'bottom';
|
|
49
|
+
};
|
|
50
|
+
viewMode: {
|
|
51
|
+
hide?: boolean;
|
|
52
|
+
viewType?: SubEntityOptionsViewTypes;
|
|
53
|
+
cols?: number;
|
|
54
|
+
colspan?: number;
|
|
55
|
+
positionType?: 'top' | 'bottom';
|
|
56
|
+
openInModal?: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}
|
|
11
60
|
export interface SubEntity {
|
|
12
61
|
entity?: string;
|
|
13
62
|
component?: any;
|
|
@@ -18,13 +67,27 @@ export interface SubEntity {
|
|
|
18
67
|
addTitle?: string;
|
|
19
68
|
emptyTitle?: string;
|
|
20
69
|
autoCompleteFields?: SubEntityAutoCompleteField[];
|
|
70
|
+
options?: SubEntityOptions;
|
|
71
|
+
group?: SubEntitiesGroupOptions;
|
|
21
72
|
getFilteringQuery?(itemData: any): {
|
|
22
73
|
[key: string]: string | number;
|
|
23
74
|
};
|
|
24
75
|
getInputData?(itemData: any): {
|
|
76
|
+
listId?: number[];
|
|
25
77
|
[key: string]: any;
|
|
26
78
|
};
|
|
27
79
|
}
|
|
80
|
+
export interface SubEntitiesGroupOptions {
|
|
81
|
+
cols: number;
|
|
82
|
+
key: string;
|
|
83
|
+
}
|
|
84
|
+
export interface SubEntities {
|
|
85
|
+
type: string;
|
|
86
|
+
options?: {
|
|
87
|
+
group: SubEntitiesGroupOptions;
|
|
88
|
+
};
|
|
89
|
+
subEntities?: SubEntity[];
|
|
90
|
+
}
|
|
28
91
|
export interface StaticDataAction {
|
|
29
92
|
title: string;
|
|
30
93
|
action?: string;
|
|
@@ -54,6 +117,8 @@ export interface StaticDataSection {
|
|
|
54
117
|
havePublication?: boolean;
|
|
55
118
|
allItems?: boolean;
|
|
56
119
|
search?: boolean;
|
|
120
|
+
filtering?: StaticDataSectionFiltering;
|
|
121
|
+
filteringType?: string;
|
|
57
122
|
fieldsOnListPage?: FieldsOnListPage[];
|
|
58
123
|
nestedByField?: string;
|
|
59
124
|
publicationInTelegramBot?: {
|
|
@@ -69,8 +134,18 @@ export interface StaticDataSection {
|
|
|
69
134
|
};
|
|
70
135
|
subEntities?: SubEntity[];
|
|
71
136
|
hasMultiLanguage?: boolean;
|
|
137
|
+
viewSettings?: {
|
|
138
|
+
viewMode?: {
|
|
139
|
+
mainBlockCols?: number;
|
|
140
|
+
menuBlockCols?: number;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
72
143
|
};
|
|
73
144
|
actions?: {
|
|
145
|
+
isNoViewAction?: boolean;
|
|
146
|
+
isNoDeleteAction?: boolean;
|
|
147
|
+
isNoEditAction?: boolean;
|
|
148
|
+
defaultListAction?: string;
|
|
74
149
|
list?: StaticDataAction[];
|
|
75
150
|
details?: StaticDataAction[];
|
|
76
151
|
};
|
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "./
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "@angular/
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "@angular/material/
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "../
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "../
|
|
17
|
-
import * as i16 from "../
|
|
18
|
-
import * as i17 from "
|
|
19
|
-
import * as i18 from "@angular/
|
|
20
|
-
import * as i19 from "
|
|
21
|
-
import * as i20 from "../
|
|
22
|
-
import * as i21 from "@angular/material/
|
|
23
|
-
import * as i22 from "@angular/
|
|
24
|
-
import * as i23 from "
|
|
25
|
-
import * as i24 from "
|
|
26
|
-
import * as i25 from "@angular/material/
|
|
27
|
-
import * as i26 from "@angular/material/
|
|
28
|
-
import * as i27 from "
|
|
29
|
-
import * as i28 from "@angular/material/
|
|
30
|
-
import * as i29 from "@angular/material/
|
|
31
|
-
import * as i30 from "@angular/material/
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "../auto-form/auto-form.module";
|
|
4
|
+
import * as i3 from "./static-data-routing.module";
|
|
5
|
+
import * as i4 from "@angular/material/table";
|
|
6
|
+
import * as i5 from "@angular/material/button";
|
|
7
|
+
import * as i6 from "@angular/material/form-field";
|
|
8
|
+
import * as i7 from "@angular/material/icon";
|
|
9
|
+
import * as i8 from "../table-menu/table-menu.module";
|
|
10
|
+
import * as i9 from "@angular/material/paginator";
|
|
11
|
+
import * as i10 from "../spinner/spinner.module";
|
|
12
|
+
import * as i11 from "../files-upload/files-upload.module";
|
|
13
|
+
import * as i12 from "../button/button.module";
|
|
14
|
+
import * as i13 from "ngrx-forms";
|
|
15
|
+
import * as i14 from "@angular/material/input";
|
|
16
|
+
import * as i15 from "../panel-header/panel-header.module";
|
|
17
|
+
import * as i16 from "../icon/icon.module";
|
|
18
|
+
import * as i17 from "@angular/material/tooltip";
|
|
19
|
+
import * as i18 from "@angular/forms";
|
|
20
|
+
import * as i19 from "ngx-mask";
|
|
21
|
+
import * as i20 from "../image/image.module";
|
|
22
|
+
import * as i21 from "@angular/material/dialog";
|
|
23
|
+
import * as i22 from "@angular/material/tabs";
|
|
24
|
+
import * as i23 from "../panel/panel.module";
|
|
25
|
+
import * as i24 from "@angular/material/chips";
|
|
26
|
+
import * as i25 from "@angular/material/autocomplete";
|
|
27
|
+
import * as i26 from "@angular/material/card";
|
|
28
|
+
import * as i27 from "@angular/material/slide-toggle";
|
|
29
|
+
import * as i28 from "@angular/material/expansion";
|
|
30
|
+
import * as i29 from "@angular/material/select";
|
|
31
|
+
import * as i30 from "@angular/material/grid-list";
|
|
32
|
+
import * as i31 from "./components/filtering-dialog/filtering-dialog.component";
|
|
33
|
+
import * as i32 from "./components/filtering-form/filtering-form.component";
|
|
34
|
+
import * as i33 from "./components/list-sub-entities/list-sub-entities.component";
|
|
35
|
+
import * as i34 from "./components/static-data-list-items/static-data-list-items.component";
|
|
36
|
+
import * as i35 from "./containers/static-data-list/static-data-list.component";
|
|
37
|
+
import * as i36 from "./containers/static-data-items/static-data-items.component";
|
|
38
|
+
import * as i37 from "./components/static-data-list-filtering/static-data-list-filtering.component";
|
|
39
|
+
import * as i38 from "./components/static-data-filter-options/static-data-filter-options.component";
|
|
40
|
+
import * as i39 from "./containers/static-data-view/static-data-view.component";
|
|
41
|
+
import * as i40 from "./containers/static-data-details/static-data-details.component";
|
|
32
42
|
export declare class StaticDataModule {
|
|
33
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataModule, never>;
|
|
34
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StaticDataModule, [typeof i1.
|
|
44
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StaticDataModule, never, [typeof i1.CommonModule, typeof i2.AutoFormModule, typeof i3.StaticDataRoutingModule, typeof i4.MatTableModule, typeof i5.MatButtonModule, typeof i6.MatFormFieldModule, typeof i7.MatIconModule, typeof i8.TableMenuModule, typeof i9.MatPaginatorModule, typeof i10.SharedSpinnerModule, typeof i11.FilesUploadModule, typeof i12.ButtonModule, typeof i13.NgrxFormsModule, typeof i14.MatInputModule, typeof i15.PanelHeaderModule, typeof i16.SharedIconModule, typeof i17.MatTooltipModule, typeof i18.ReactiveFormsModule, typeof i19.NgxMaskDirective, typeof i19.NgxMaskPipe, typeof i20.ImageModule, typeof i21.MatDialogModule, typeof i22.MatTabsModule, typeof i23.PanelModule, typeof i24.MatChipsModule, typeof i25.MatAutocompleteModule, typeof i26.MatCardHeader, typeof i26.MatCardContent, typeof i26.MatCardTitle, typeof i26.MatCardSubtitle, typeof i27.MatSlideToggle, typeof i28.MatExpansionModule, typeof i29.MatSelect, typeof i26.MatCard, typeof i30.MatGridListModule, typeof i31.FilteringDialogComponent, typeof i32.FilteringFormComponent, typeof i33.ListSubEntitiesComponent, typeof i34.StaticDataListItemsComponent, typeof i35.StaticDataListComponent, typeof i36.StaticDataItemsComponent, typeof i37.StaticDataListFilteringComponent, typeof i38.StaticDataFilterOptionsComponent, typeof i39.StaticDataViewComponent, typeof i40.StaticDataDetailsComponent], never>;
|
|
35
45
|
static ɵinj: i0.ɵɵInjectorDeclaration<StaticDataModule>;
|
|
36
46
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HttpHandler, HttpHeaderResponse, HttpInterceptor, HttpProgressEvent, HttpRequest, HttpResponse, HttpSentEvent, HttpUserEvent } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { UsersFacade } from '../+state/users';
|
|
4
|
-
import { RouterFacade } from '../+state/router/router.facade';
|
|
5
4
|
import { FormErrorsFacade } from '../+state/form-errors';
|
|
6
5
|
import { FormsFacade } from '../+state/forms';
|
|
7
6
|
import { NotificationsFacade } from '../+state/notifications';
|
|
@@ -15,7 +14,6 @@ import * as i0 from "@angular/core";
|
|
|
15
14
|
export declare class HeadersInterceptor implements HttpInterceptor {
|
|
16
15
|
private platformId;
|
|
17
16
|
private authenticationService;
|
|
18
|
-
private routerFacade;
|
|
19
17
|
private usersFacade;
|
|
20
18
|
private formErrorsFacade;
|
|
21
19
|
private formsFacade;
|
|
@@ -25,7 +23,7 @@ export declare class HeadersInterceptor implements HttpInterceptor {
|
|
|
25
23
|
private notificationsFacade;
|
|
26
24
|
private staticDataFacade;
|
|
27
25
|
modelAdapter: BaseModelAdapter;
|
|
28
|
-
constructor(platformId: Object, authenticationService: AuthenticationService,
|
|
26
|
+
constructor(platformId: Object, authenticationService: AuthenticationService, usersFacade: UsersFacade, formErrorsFacade: FormErrorsFacade, formsFacade: FormsFacade, filesFacade: FilesFacade, publicationMessagesFacade: PublicationMessagesFacade, requestsFacade: RequestsFacade, notificationsFacade: NotificationsFacade, staticDataFacade: StaticDataFacade);
|
|
29
27
|
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpSentEvent | HttpHeaderResponse | HttpProgressEvent | HttpResponse<any> | HttpUserEvent<any> | any>;
|
|
30
28
|
private updateRequestData;
|
|
31
29
|
private updateStaticData;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { UserModel } from '../../../models/models/user/user-model';
|
|
4
|
+
import { UserSectionRightModel } from "../../../models";
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
export interface UserAuthInfo {
|
|
7
|
+
token: string;
|
|
8
|
+
tokenExp: number;
|
|
9
|
+
refreshToken: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
role?: number;
|
|
14
|
+
roleKey?: string;
|
|
15
|
+
lastName?: string;
|
|
16
|
+
avatar?: string;
|
|
17
|
+
sex?: 0 | 1;
|
|
18
|
+
rights?: UserSectionRightModel[];
|
|
19
|
+
accessGroupId?: number;
|
|
20
|
+
parameters?: any;
|
|
21
|
+
otherData?: any;
|
|
22
|
+
}
|
|
5
23
|
export declare class AuthenticationService {
|
|
6
24
|
private platformId;
|
|
7
25
|
protected route: ActivatedRoute;
|
|
@@ -11,30 +29,7 @@ export declare class AuthenticationService {
|
|
|
11
29
|
constructor(platformId: any, route: ActivatedRoute);
|
|
12
30
|
get isGuest(): boolean;
|
|
13
31
|
get currentUserValue(): UserModel;
|
|
14
|
-
loadAuthDataFromLocalStore():
|
|
15
|
-
token: string;
|
|
16
|
-
tokenExp: number;
|
|
17
|
-
refreshToken: string;
|
|
18
|
-
id?: string;
|
|
19
|
-
email?: string;
|
|
20
|
-
name?: string;
|
|
21
|
-
role?: number;
|
|
22
|
-
roleKey?: string;
|
|
23
|
-
lastName?: string;
|
|
24
|
-
avatar?: string;
|
|
25
|
-
sex?: 0 | 1;
|
|
26
|
-
rights?: import("wt-front-shared").UserSectionRightModel[];
|
|
27
|
-
accessGroupId?: number;
|
|
28
|
-
parameters?: any;
|
|
29
|
-
otherData?: any;
|
|
30
|
-
user?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
id: string;
|
|
33
|
-
user: {};
|
|
34
|
-
token: string;
|
|
35
|
-
tokenExp: any;
|
|
36
|
-
refreshToken: string;
|
|
37
|
-
};
|
|
32
|
+
loadAuthDataFromLocalStore(): UserAuthInfo;
|
|
38
33
|
saveAuthInfo(user: UserModel, remember?: boolean): void;
|
|
39
34
|
saveServices(services: {
|
|
40
35
|
[key: string]: any;
|