wt-front-shared 19.0.38 → 19.0.41
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 +1402 -423
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/static-data/behavios/static-data-reports-behavior.d.ts +10 -0
- package/lib/core/+state/static-data/static-data.actions.d.ts +37 -0
- package/lib/core/+state/static-data/static-data.effects.d.ts +3 -0
- package/lib/core/+state/static-data/static-data.facade.d.ts +10 -2
- package/lib/core/+state/static-data/static-data.reducer.d.ts +4 -0
- package/lib/core/+state/static-data/static-data.selectors.d.ts +1 -0
- package/lib/core/components/auto-form/auto-form.module.d.ts +4 -2
- package/lib/core/components/auto-form/components/form-field-file/form-field-file.component.d.ts +7 -1
- package/lib/core/components/auto-form/components/form-field-file-show/form-field-file-show.component.d.ts +5 -0
- package/lib/core/components/auto-form/components/form-field-rating/form-field-rating.component.d.ts +12 -0
- package/lib/core/components/auto-form/components/form-field-select/form-field-select.component.d.ts +22 -4
- package/lib/core/components/auto-form/components/form-field-select-show/form-field-select-show.component.d.ts +1 -0
- package/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.d.ts +2 -1
- package/lib/core/components/auto-form/containers/auto-form-show/auto-form-show.component.d.ts +13 -4
- package/lib/core/components/auto-form/containers/form-field/form-field.component.d.ts +1 -1
- package/lib/core/components/auto-form/interfaces/dynamic-form-question-type.d.ts +7 -0
- package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +12 -3
- package/lib/core/components/files-upload/files-upload/files-upload.component.d.ts +3 -3
- package/lib/core/components/index.d.ts +2 -0
- package/lib/core/components/star-rating/star-rating.component.d.ts +4 -2
- package/lib/core/components/star-rating/star-rating.module.d.ts +2 -1
- package/lib/core/components/static-data/components/static-data-create-new-dialog/static-data-create-new-dialog.component.d.ts +15 -0
- package/lib/core/components/static-data/components/static-data-create-new-dynamic-form-dialog/static-data-create-new-dynamic-form-dialog.component.d.ts +24 -0
- package/lib/core/components/static-data/components/static-data-create-new-item-dialog/static-data-create-new-item-dialog.component.d.ts +26 -0
- package/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.d.ts +20 -7
- package/lib/core/components/static-data/components/view-static-data-details-dialog/view-static-data-details-dialog.component.d.ts +2 -4
- package/lib/core/components/static-data/containers/static-data-details/static-data-details.component.d.ts +16 -6
- package/lib/core/components/static-data/containers/static-data-items/static-data-items.component.d.ts +14 -5
- package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts +17 -4
- package/lib/core/components/static-data/containers/static-data-view/static-data-view.component.d.ts +8 -5
- package/lib/core/components/static-data/interfaces/static-data.interface.d.ts +11 -0
- package/lib/core/components/static-data/services/static-data.service.service.d.ts +13 -0
- package/lib/core/services/static-data/static-data.service.d.ts +2 -1
- package/lib/core/tokens/index.d.ts +5 -1
- package/lib/models/config/app-config.d.ts +4 -0
- package/lib/models/endpoints/static-data/index.d.ts +1 -0
- package/lib/models/endpoints/static-data/static-data-create/request/static-data-create-request-config.d.ts +4 -0
- package/lib/models/endpoints/static-data/static-data-endpoint-types.d.ts +2 -1
- package/lib/models/endpoints/static-data/static-data-reports/index.d.ts +2 -0
- package/lib/models/endpoints/static-data/static-data-reports/report-dto.d.ts +63 -0
- package/lib/models/endpoints/static-data/static-data-reports/request/index.d.ts +2 -0
- package/lib/models/endpoints/static-data/static-data-reports/request/static-data-reports-request-config.d.ts +14 -0
- package/lib/models/endpoints/static-data/static-data-reports/request/static-data-reports-request.d.ts +11 -0
- package/lib/models/endpoints/static-data/static-data-update/request/static-data-update-request-config.d.ts +4 -0
- package/lib/models/models/static-data/static-data.model.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/styles.css +5 -76
- package/src/lib/styles.css.map +1 -1
- package/lib/core/components/auto-form/components/form-field-dynamic-form/form-field-relation-entity.component.d.ts +0 -26
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, Type } from '@angular/core';
|
|
2
2
|
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 { FieldsOnListPage, StaticDataSection, StaticDataSections, SubEntity, SubEntityAutoCompleteField } from '../../interfaces/static-data.interface';
|
|
6
|
+
import { FieldsOnListPage, StaticDataListComponentModes, StaticDataSection, StaticDataSections, SubEntity, SubEntityAutoCompleteField } from '../../interfaces/static-data.interface';
|
|
7
7
|
import { StaticDataMeta } from '../../../../+state/static-data/static-data.reducer';
|
|
8
|
-
import { StaticDataModel } from '../../../../../models';
|
|
8
|
+
import { AppConfig, StaticDataModel } from '../../../../../models';
|
|
9
9
|
import { RightService } from '../../../../services/right-service';
|
|
10
10
|
import { StaticDataFacade } from '../../../../+state/static-data/static-data.facade';
|
|
11
11
|
import { RouterFacade } from '../../../../+state/router/router.facade';
|
|
@@ -20,6 +20,10 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
20
20
|
private staticDataFacade;
|
|
21
21
|
private changeDetectorRef;
|
|
22
22
|
private routerFacade;
|
|
23
|
+
private createNewDialog;
|
|
24
|
+
private config;
|
|
25
|
+
mode: StaticDataListComponentModes;
|
|
26
|
+
selectIsRequired: boolean;
|
|
23
27
|
staticDataConfiguration: StaticDataSections;
|
|
24
28
|
viewMode: boolean;
|
|
25
29
|
contentType: string;
|
|
@@ -38,6 +42,10 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
38
42
|
subEntity: SubEntity;
|
|
39
43
|
leftBlockFilterParamData: any;
|
|
40
44
|
defaultLanguageId: number;
|
|
45
|
+
selectingItem: EventEmitter<{
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
}>;
|
|
41
49
|
paginator: MatPaginator;
|
|
42
50
|
sort: MatSort;
|
|
43
51
|
searchInput: ElementRef;
|
|
@@ -72,7 +80,7 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
72
80
|
title: string;
|
|
73
81
|
}[];
|
|
74
82
|
defaultFieldsList: FieldsOnListPage[];
|
|
75
|
-
constructor(platformId: Object, dialog: MatDialog, rightService: RightService, staticDataFacade: StaticDataFacade, changeDetectorRef: ChangeDetectorRef, routerFacade: RouterFacade);
|
|
83
|
+
constructor(platformId: Object, dialog: MatDialog, rightService: RightService, staticDataFacade: StaticDataFacade, changeDetectorRef: ChangeDetectorRef, routerFacade: RouterFacade, createNewDialog: Type<any>, config: AppConfig);
|
|
76
84
|
ngOnInit(): void;
|
|
77
85
|
ngOnDestroy(): void;
|
|
78
86
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -90,7 +98,12 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
90
98
|
};
|
|
91
99
|
}): void;
|
|
92
100
|
preparingQueryParams(): void;
|
|
93
|
-
private
|
|
101
|
+
private getAutoCompleteFieldsWithValue;
|
|
102
|
+
loadData(): void;
|
|
103
|
+
selectItemHandle(data: {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
}): void;
|
|
94
107
|
changedFilterHandler(newFilterOptions: {
|
|
95
108
|
value: {
|
|
96
109
|
[key: string]: number | string;
|
|
@@ -109,6 +122,6 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
109
122
|
private preLoadSections;
|
|
110
123
|
deleteEvent(item: StaticDataModel): void;
|
|
111
124
|
changePage(data: any): void;
|
|
112
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent,
|
|
113
|
-
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; }; "defaultLanguageId": { "alias": "defaultLanguageId"; "required": false; }; }, {}, never, never, true, never>;
|
|
125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent, [null, null, null, null, null, null, { optional: true; }, null]>;
|
|
126
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListItemsComponent, "app-static-data-list-items", never, { "mode": { "alias": "mode"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; "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; }; "defaultLanguageId": { "alias": "defaultLanguageId"; "required": false; }; }, { "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
114
127
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { StaticDataModel } from "../../../../../models";
|
|
3
|
+
import { StaticDataListComponentModes } from "../../interfaces/static-data.interface";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ViewStaticDataDetailsDialogComponent implements OnInit {
|
|
5
6
|
data: {
|
|
6
7
|
itemId: number;
|
|
7
8
|
contentType: string;
|
|
8
|
-
sectionFields: any;
|
|
9
|
-
staticSection: any;
|
|
10
9
|
itemData: any;
|
|
11
10
|
};
|
|
12
11
|
contentType: string;
|
|
@@ -19,12 +18,11 @@ export declare class ViewStaticDataDetailsDialogComponent implements OnInit {
|
|
|
19
18
|
constructor(data: {
|
|
20
19
|
itemId: number;
|
|
21
20
|
contentType: string;
|
|
22
|
-
sectionFields: any;
|
|
23
|
-
staticSection: any;
|
|
24
21
|
itemData: any;
|
|
25
22
|
});
|
|
26
23
|
ngOnInit(): void;
|
|
27
24
|
onNoClick(): void;
|
|
25
|
+
protected readonly StaticDataListComponentModes: typeof StaticDataListComponentModes;
|
|
28
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewStaticDataDetailsDialogComponent, never>;
|
|
29
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<ViewStaticDataDetailsDialogComponent, "app-view-static-data-details-dialog", never, {}, {}, never, never, true, never>;
|
|
30
28
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Injector, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, 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, SubEntity } from '../../interfaces/static-data.interface';
|
|
8
|
-
import { StaticDataModel, UserModel } from '../../../../../models';
|
|
7
|
+
import { StaticDataAction, StaticDataListComponentModes, StaticDataSection, StaticDataSections, SubEntity } from '../../interfaces/static-data.interface';
|
|
8
|
+
import { AppConfig, StaticDataModel, UserModel } from '../../../../../models';
|
|
9
9
|
import { StaticDataMetaStatus } from '../../../../+state/static-data/static-data.reducer';
|
|
10
10
|
import { AuthenticationService, AutoFormService } from '../../../../services';
|
|
11
11
|
import { RouterFacade } from '../../../../+state/router/router.facade';
|
|
@@ -17,10 +17,11 @@ import { NotificationsFacade } from '../../../../+state/notifications';
|
|
|
17
17
|
import { CoreFacade } from '../../../../+state/core.facade';
|
|
18
18
|
import { PublicationMessagesFacade } from '../../../../+state/publication-messages';
|
|
19
19
|
import { ActionsFacade } from '../../../../+state/actions/actions.facade';
|
|
20
|
-
import { AutoFormChanged } from '../../../auto-form/interfaces/auto-form.interfaces';
|
|
20
|
+
import { AutoCompleteField, 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
23
|
import { MatTab } from "@angular/material/tabs";
|
|
24
|
+
import { StaticDataServiceService } from "../../services/static-data.service.service";
|
|
24
25
|
import * as i0 from "@angular/core";
|
|
25
26
|
export declare class StaticDataDetailsComponent implements OnInit, OnDestroy, OnChanges {
|
|
26
27
|
private fb;
|
|
@@ -42,6 +43,14 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy, On
|
|
|
42
43
|
private cd;
|
|
43
44
|
private matIconReg;
|
|
44
45
|
private authService;
|
|
46
|
+
private staticDataServiceService;
|
|
47
|
+
private config;
|
|
48
|
+
dynamicFormKey: string;
|
|
49
|
+
entityInput: string;
|
|
50
|
+
entityIdInput: number;
|
|
51
|
+
autoCompleteFields: AutoCompleteField[];
|
|
52
|
+
mode: StaticDataListComponentModes;
|
|
53
|
+
closePopup: EventEmitter<null>;
|
|
45
54
|
tabs: QueryList<MatTab>;
|
|
46
55
|
form: UntypedFormGroup;
|
|
47
56
|
formId: string;
|
|
@@ -129,7 +138,8 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy, On
|
|
|
129
138
|
}[];
|
|
130
139
|
additionalActions: StaticDataAction[];
|
|
131
140
|
currentUserData: UserModel;
|
|
132
|
-
|
|
141
|
+
dynamicFormFields: IFormField[];
|
|
142
|
+
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, staticDataServiceService: StaticDataServiceService, config: AppConfig);
|
|
133
143
|
ngOnInit(): void;
|
|
134
144
|
ngOnDestroy(): void;
|
|
135
145
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -159,5 +169,5 @@ export declare class StaticDataDetailsComponent implements OnInit, OnDestroy, On
|
|
|
159
169
|
private updatePublishedItemPopup;
|
|
160
170
|
trackByKey(index: number, subEntity: SubEntity): string;
|
|
161
171
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataDetailsComponent, never>;
|
|
162
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataDetailsComponent, "app-static-data-details", never, {}, {}, never, never, true, never>;
|
|
172
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataDetailsComponent, "app-static-data-details", never, { "dynamicFormKey": { "alias": "dynamicFormKey"; "required": false; }; "entityInput": { "alias": "entityInput"; "required": false; }; "entityIdInput": { "alias": "entityIdInput"; "required": false; }; "autoCompleteFields": { "alias": "autoCompleteFields"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; }, { "closePopup": "closePopup"; }, never, never, true, never>;
|
|
163
173
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges, Type } from '@angular/core';
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { MatIconRegistry } from "@angular/material/icon";
|
|
4
4
|
import { StaticDataModel } from '../../../../../models';
|
|
5
|
-
import { StaticDataSection, SubEntity } from '../../interfaces/static-data.interface';
|
|
5
|
+
import { StaticDataListComponentModes, StaticDataSection, SubEntity } from '../../interfaces/static-data.interface';
|
|
6
6
|
import { RouterFacade } from '../../../../+state/router/router.facade';
|
|
7
7
|
import { StaticDataFacade } from '../../../../+state/static-data/static-data.facade';
|
|
8
8
|
import { IFormField } from "../../../auto-form/interfaces/form-field";
|
|
@@ -14,6 +14,10 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
14
14
|
private cd;
|
|
15
15
|
private dialog;
|
|
16
16
|
private matIconReg;
|
|
17
|
+
private createNewDialog;
|
|
18
|
+
private viewDialog;
|
|
19
|
+
mode: StaticDataListComponentModes;
|
|
20
|
+
selectIsRequired: boolean;
|
|
17
21
|
items: StaticDataModel[];
|
|
18
22
|
displayedColumns: {
|
|
19
23
|
field: string;
|
|
@@ -34,6 +38,10 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
34
38
|
field: string;
|
|
35
39
|
type: string;
|
|
36
40
|
}>;
|
|
41
|
+
selectingItem: EventEmitter<{
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
}>;
|
|
37
45
|
displayedFormFields: IFormField[];
|
|
38
46
|
displayedColumnsStrings: string[];
|
|
39
47
|
editUrlArray: (string | number | object)[];
|
|
@@ -43,9 +51,10 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
43
51
|
field: string;
|
|
44
52
|
type: string;
|
|
45
53
|
};
|
|
46
|
-
constructor(routerFacade: RouterFacade, staticDataFacade: StaticDataFacade, cd: ChangeDetectorRef, dialog: MatDialog, matIconReg: MatIconRegistry);
|
|
54
|
+
constructor(routerFacade: RouterFacade, staticDataFacade: StaticDataFacade, cd: ChangeDetectorRef, dialog: MatDialog, matIconReg: MatIconRegistry, createNewDialog: Type<any>, viewDialog: Type<any>);
|
|
47
55
|
ngOnInit(): void;
|
|
48
56
|
ngOnChanges(changes: SimpleChanges): void;
|
|
57
|
+
popupModeSelectItem(id: string, name: string): void;
|
|
49
58
|
clickAction(id: number, itemData?: StaticDataModel): void;
|
|
50
59
|
edit(id: number): void;
|
|
51
60
|
view(id: number, itemData?: StaticDataModel): void;
|
|
@@ -55,6 +64,6 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
55
64
|
private preparingItems;
|
|
56
65
|
private checkFieldGetValueMethod;
|
|
57
66
|
private getRowValue;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataItemsComponent,
|
|
59
|
-
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; }; "parentSection": { "alias": "parentSection"; "required": false; }; "parentItemId": { "alias": "parentItemId"; "required": false; }; }, { "delete": "delete"; "changeSorting": "changeSorting"; }, never, never, true, never>;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataItemsComponent, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataItemsComponent, "app-static-data-items", never, { "mode": { "alias": "mode"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; "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; }; "parentSection": { "alias": "parentSection"; "required": false; }; "parentItemId": { "alias": "parentItemId"; "required": false; }; }, { "delete": "delete"; "changeSorting": "changeSorting"; "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
60
69
|
}
|
package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
|
-
import { StaticDataSections } from '../../interfaces/static-data.interface';
|
|
4
|
+
import { StaticDataListComponentModes, StaticDataSections } from '../../interfaces/static-data.interface';
|
|
5
5
|
import { MatIconRegistry } from "@angular/material/icon";
|
|
6
6
|
import { FilteringData } from "../../components/filtering-form/filtering-form.component";
|
|
7
|
+
import { AppConfig } from "../../../../../models";
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* @title Data table with sorting, pagination, and filtering.
|
|
@@ -11,20 +12,32 @@ import * as i0 from "@angular/core";
|
|
|
11
12
|
export declare class StaticDataListComponent implements OnInit, OnDestroy {
|
|
12
13
|
private activatedRoute;
|
|
13
14
|
private matIconReg;
|
|
15
|
+
private config;
|
|
16
|
+
mode: StaticDataListComponentModes;
|
|
17
|
+
contentType: string;
|
|
18
|
+
selectIsRequired: boolean;
|
|
19
|
+
selectingItem: EventEmitter<{
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}>;
|
|
14
23
|
contentType$: Observable<string>;
|
|
15
24
|
staticDataConfiguration: StaticDataSections;
|
|
16
25
|
filteringData: FilteringData;
|
|
17
26
|
private destroy$;
|
|
18
27
|
filterData: any;
|
|
19
28
|
defaultLanguageId: number;
|
|
20
|
-
constructor(activatedRoute: ActivatedRoute, matIconReg: MatIconRegistry);
|
|
29
|
+
constructor(activatedRoute: ActivatedRoute, matIconReg: MatIconRegistry, config: AppConfig);
|
|
21
30
|
ngOnInit(): Promise<void>;
|
|
22
31
|
ngOnDestroy(): void;
|
|
23
32
|
handleFilterData(data: {
|
|
24
33
|
[field: string]: any;
|
|
25
34
|
}): void;
|
|
35
|
+
selectingItemHandler(data: {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}): void;
|
|
26
39
|
private loadStaticDataConfiguration;
|
|
27
40
|
private loadContentType;
|
|
28
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListComponent, "app-static-data-list", never, {}, {}, never, never, true, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListComponent, "app-static-data-list", never, { "mode": { "alias": "mode"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; }, { "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
30
43
|
}
|
package/lib/core/components/static-data/containers/static-data-view/static-data-view.component.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import { Injector, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
4
|
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
+
import { MatIconRegistry } from "@angular/material/icon";
|
|
5
6
|
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';
|
|
7
|
+
import { StaticDataAction, StaticDataListComponentModes, StaticDataSection, StaticDataSections, SubEntity } from '../../interfaces/static-data.interface';
|
|
8
|
+
import { AppConfig, StaticDataModel, UserModel } from '../../../../../models';
|
|
8
9
|
import { StaticDataMetaStatus } from '../../../../+state/static-data/static-data.reducer';
|
|
9
10
|
import { AuthenticationService } from '../../../../services';
|
|
10
11
|
import { RouterFacade } from '../../../../+state/router/router.facade';
|
|
@@ -12,7 +13,6 @@ import { StaticDataFacade } from '../../../../+state/static-data/static-data.fac
|
|
|
12
13
|
import { CoreFacade } from '../../../../+state/core.facade';
|
|
13
14
|
import { ActionsFacade } from '../../../../+state/actions/actions.facade';
|
|
14
15
|
import { RightService } from '../../../../services/right-service';
|
|
15
|
-
import { MatIconRegistry } from "@angular/material/icon";
|
|
16
16
|
import * as i0 from "@angular/core";
|
|
17
17
|
export declare class StaticDataViewComponent implements OnInit, OnDestroy {
|
|
18
18
|
private router;
|
|
@@ -26,6 +26,8 @@ export declare class StaticDataViewComponent implements OnInit, OnDestroy {
|
|
|
26
26
|
private injector;
|
|
27
27
|
private matIconReg;
|
|
28
28
|
private authService;
|
|
29
|
+
private config;
|
|
30
|
+
mode: StaticDataListComponentModes;
|
|
29
31
|
dialogContentType: string;
|
|
30
32
|
dialogItemId: number;
|
|
31
33
|
formData: StaticDataModel;
|
|
@@ -76,7 +78,7 @@ export declare class StaticDataViewComponent implements OnInit, OnDestroy {
|
|
|
76
78
|
isRtlEnabled: boolean;
|
|
77
79
|
};
|
|
78
80
|
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);
|
|
81
|
+
constructor(router: Router, route: ActivatedRoute, routerFacade: RouterFacade, staticDataFacade: StaticDataFacade, rightService: RightService, dialog: MatDialog, coreFacade: CoreFacade, actionsFacade: ActionsFacade, injector: Injector, matIconReg: MatIconRegistry, authService: AuthenticationService, config: AppConfig);
|
|
80
82
|
ngOnInit(): void;
|
|
81
83
|
ngOnDestroy(): void;
|
|
82
84
|
publishInTelegram(): void;
|
|
@@ -89,6 +91,7 @@ export declare class StaticDataViewComponent implements OnInit, OnDestroy {
|
|
|
89
91
|
private preLoadSections;
|
|
90
92
|
private staticDataSubscription;
|
|
91
93
|
private subscribeToDataStatus;
|
|
94
|
+
protected readonly StaticDataListComponentModes: typeof StaticDataListComponentModes;
|
|
92
95
|
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>;
|
|
96
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataViewComponent, "app-static-data-view", never, { "mode": { "alias": "mode"; "required": false; }; "dialogContentType": { "alias": "dialogContentType"; "required": false; }; "dialogItemId": { "alias": "dialogItemId"; "required": false; }; }, {}, never, never, true, never>;
|
|
94
97
|
}
|
|
@@ -134,7 +134,14 @@ export interface StaticDataSection {
|
|
|
134
134
|
};
|
|
135
135
|
subEntities?: SubEntity[];
|
|
136
136
|
hasMultiLanguage?: boolean;
|
|
137
|
+
isDynamicForm?: boolean;
|
|
137
138
|
viewSettings?: {
|
|
139
|
+
listMode?: {
|
|
140
|
+
hideAddAction?: boolean;
|
|
141
|
+
hideEditAction?: boolean;
|
|
142
|
+
hideDeleteAction?: boolean;
|
|
143
|
+
hideViewAction?: boolean;
|
|
144
|
+
};
|
|
138
145
|
viewMode?: {
|
|
139
146
|
mainBlockCols?: number;
|
|
140
147
|
menuBlockCols?: number;
|
|
@@ -153,3 +160,7 @@ export interface StaticDataSection {
|
|
|
153
160
|
export interface StaticDataSections {
|
|
154
161
|
[key: string]: StaticDataSection;
|
|
155
162
|
}
|
|
163
|
+
export declare enum StaticDataListComponentModes {
|
|
164
|
+
inline = "inline",
|
|
165
|
+
modal = "modal"
|
|
166
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IFormField } from "../../auto-form/interfaces/form-field";
|
|
2
|
+
import { StaticDataFacade } from "../../../+state/static-data/static-data.facade";
|
|
3
|
+
import { AppConfig } from "../../../../models";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class StaticDataServiceService {
|
|
6
|
+
private staticDataFacade;
|
|
7
|
+
private config;
|
|
8
|
+
constructor(staticDataFacade: StaticDataFacade, config: AppConfig);
|
|
9
|
+
getDynamicFormFields(dynamicFormKey: string, dynamicFormId?: number): Promise<IFormField[]>;
|
|
10
|
+
private getNewFieldType;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataServiceService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StaticDataServiceService>;
|
|
13
|
+
}
|
|
@@ -4,7 +4,7 @@ import { BaseAPIService } from "../base";
|
|
|
4
4
|
import { AppConfig, BaseResponse, StaticDataBulkUpdateOrCreateRequestConfig } from "../../../models";
|
|
5
5
|
import { FormsFacade } from "../../+state/forms";
|
|
6
6
|
import { RequestsFacade } from "../../+state/requests";
|
|
7
|
-
import { StaticDataCreateRequestConfig, StaticDataDeleteRequestConfig, StaticDataGetListCategoriesRequestConfig, StaticDataGetListRequestConfig, StaticDataGetRequestConfig, StaticDataSubRoutingGetRequestConfig, StaticDataUpdateRequestConfig } from "../../../models/endpoints/static-data";
|
|
7
|
+
import { StaticDataCreateRequestConfig, StaticDataDeleteRequestConfig, StaticDataGetListCategoriesRequestConfig, StaticDataGetListRequestConfig, StaticDataGetRequestConfig, StaticDataSubRoutingGetRequestConfig, StaticDataUpdateRequestConfig, StaticDataReportsRequestConfig } from "../../../models/endpoints/static-data";
|
|
8
8
|
import { HttpClientResult } from "../../models/http-client-result";
|
|
9
9
|
import { StaticDataLoadRevisionsRequestConfig } from '../../../models/endpoints/static-data/static-data-load-revisions';
|
|
10
10
|
import { StaticDataCreateWithSubEntitiesRequestConfig } from "../../../models/endpoints/static-data/static-data-create-with-sub-entities";
|
|
@@ -26,6 +26,7 @@ export declare class StaticDataService extends BaseAPIService {
|
|
|
26
26
|
bulkUpdateOrCreate(config: StaticDataBulkUpdateOrCreateRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
27
27
|
update(config: StaticDataUpdateRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
28
28
|
patchUpdate(config: StaticDataUpdateRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
29
|
+
reports(config: StaticDataReportsRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
29
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataService, never>;
|
|
30
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<StaticDataService>;
|
|
31
32
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
1
|
+
import { InjectionToken, Type } from '@angular/core';
|
|
2
2
|
import { AppConfig } from '../../models/config';
|
|
3
3
|
export declare const CORE_CONFIG: InjectionToken<AppConfig>;
|
|
4
|
+
export declare const STATIC_DATA_CREATE_NEW_DIALOG: InjectionToken<Type<any>>;
|
|
5
|
+
export declare const STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG: InjectionToken<Type<any>>;
|
|
6
|
+
export declare const STATIC_DATA_CREATE_NEW_ITEM_DIALOG: InjectionToken<Type<any>>;
|
|
7
|
+
export declare const STATIC_DATA_VIEW_ITEM_DIALOG: InjectionToken<Type<any>>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { StaticDataSections } from "../../core/components/static-data/interfaces/static-data.interface";
|
|
2
|
+
import { IAppConfigStaticData } from "../../core/config/app-config";
|
|
1
3
|
export interface AppConfig {
|
|
2
4
|
apiUrl: string;
|
|
3
5
|
publicUrl: string;
|
|
@@ -22,4 +24,6 @@ export interface AppConfig {
|
|
|
22
24
|
refreshAccessToken: string;
|
|
23
25
|
userData?: string;
|
|
24
26
|
};
|
|
27
|
+
staticDataMapping?: StaticDataSections;
|
|
28
|
+
staticDataConfig?: IAppConfigStaticData;
|
|
25
29
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface ReportRelation {
|
|
2
|
+
secondaryEntityId: string;
|
|
3
|
+
primaryField: string;
|
|
4
|
+
secondaryField: string;
|
|
5
|
+
joinType: 'left' | 'inner' | 'full';
|
|
6
|
+
}
|
|
7
|
+
export interface ReportGroupBy {
|
|
8
|
+
field: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ReportCalculatedField {
|
|
11
|
+
name: string;
|
|
12
|
+
action: 'sum' | 'percentage';
|
|
13
|
+
targetFields: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ReportTransformations {
|
|
16
|
+
groupBy?: ReportGroupBy;
|
|
17
|
+
calculatedFields?: ReportCalculatedField[];
|
|
18
|
+
}
|
|
19
|
+
export interface ReportTableConfig {
|
|
20
|
+
visibleColumns?: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface ReportLineConfig {
|
|
23
|
+
xAxisField?: string;
|
|
24
|
+
yAxisField?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ReportPieConfig {
|
|
27
|
+
labelField?: string;
|
|
28
|
+
valueField?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ReportVisualization {
|
|
31
|
+
type?: 'table' | 'line' | 'pie';
|
|
32
|
+
tableConfig?: ReportTableConfig;
|
|
33
|
+
lineConfig?: ReportLineConfig;
|
|
34
|
+
pieConfig?: ReportPieConfig;
|
|
35
|
+
}
|
|
36
|
+
export interface ReportPagination {
|
|
37
|
+
page?: number;
|
|
38
|
+
limit?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface ReportSort {
|
|
41
|
+
field?: string;
|
|
42
|
+
order?: 'asc' | 'desc';
|
|
43
|
+
}
|
|
44
|
+
export interface ReportQueryDto {
|
|
45
|
+
primaryEntity: string;
|
|
46
|
+
relations?: ReportRelation[];
|
|
47
|
+
transformations?: ReportTransformations;
|
|
48
|
+
visualization?: ReportVisualization;
|
|
49
|
+
pagination?: ReportPagination;
|
|
50
|
+
sort?: ReportSort;
|
|
51
|
+
}
|
|
52
|
+
export interface ReportField {
|
|
53
|
+
field: string;
|
|
54
|
+
title: string;
|
|
55
|
+
type: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ReportResultDto {
|
|
58
|
+
fields: ReportField[];
|
|
59
|
+
records: Record<string, any>[];
|
|
60
|
+
total: number;
|
|
61
|
+
page: number;
|
|
62
|
+
limit: number;
|
|
63
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UserAuthHeaders } from "../../../../models/user";
|
|
2
|
+
import { ReportQueryDto } from "../report-dto";
|
|
3
|
+
export interface StaticDataReportsRequestConfig {
|
|
4
|
+
headers?: UserAuthHeaders;
|
|
5
|
+
query?: ReportQueryDto;
|
|
6
|
+
formId?: string;
|
|
7
|
+
storeKey?: string;
|
|
8
|
+
primaryEntity?: string;
|
|
9
|
+
relations?: any[];
|
|
10
|
+
transformations?: any;
|
|
11
|
+
visualization?: any;
|
|
12
|
+
pagination?: any;
|
|
13
|
+
sort?: any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PostRequest } from "../../../http";
|
|
2
|
+
import { StaticDataReportsRequestConfig } from "./static-data-reports-request-config";
|
|
3
|
+
export declare class StaticDataReportsRequest extends PostRequest {
|
|
4
|
+
protected domain: string;
|
|
5
|
+
private config;
|
|
6
|
+
constructor(domain: string, config: StaticDataReportsRequestConfig);
|
|
7
|
+
get url(): string;
|
|
8
|
+
get headers(): import("../../../http").RequestHeaders;
|
|
9
|
+
get params(): any;
|
|
10
|
+
get body(): any;
|
|
11
|
+
}
|