wt-front-shared 19.0.43 → 19.0.45
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/README.md +72 -13
- package/fesm2022/wt-front-shared.mjs +3932 -805
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/form-validation/form-validation.effects.d.ts +2 -2
- package/lib/core/+state/router/router.effects.d.ts +1 -1
- package/lib/core/+state/static-data/static-data.actions.d.ts +1 -0
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -0
- package/lib/core/+state/users/users.effects.d.ts +7 -2
- package/lib/core/components/auto-form/auto-form.module.d.ts +29 -26
- package/lib/core/components/auto-form/components/form-field-date/form-field-date.component.d.ts +53 -0
- package/lib/core/components/auto-form/interfaces/field-type.d.ts +2 -0
- package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +11 -0
- package/lib/core/components/auto-form/interfaces/form-field.d.ts +3 -0
- package/lib/core/components/external-services/external-service-dialog.component.d.ts +15 -0
- package/lib/core/components/external-services/external-service.models.d.ts +19 -0
- package/lib/core/components/external-services/external-services.facade.d.ts +23 -0
- package/lib/core/components/external-services/index.d.ts +3 -0
- package/lib/core/components/image/image.component.d.ts +6 -1
- package/lib/core/components/index.d.ts +4 -0
- package/lib/core/components/profile/profile.component.d.ts +29 -0
- package/lib/core/components/profile/profile.module.d.ts +12 -0
- package/lib/core/components/static-data/boards/board-edit-dialog.component.d.ts +22 -0
- package/lib/core/components/static-data/boards/board-filter.component.d.ts +55 -0
- package/lib/core/components/static-data/boards/board-settings-dialog.component.d.ts +41 -0
- package/lib/core/components/static-data/boards/board.models.d.ts +28 -0
- package/lib/core/components/static-data/boards/boards.facade.d.ts +17 -0
- package/lib/core/components/static-data/boards/index.d.ts +6 -0
- package/lib/core/components/static-data/boards/kanban.component.d.ts +24 -0
- package/lib/core/components/static-data/components/filtering-dialog/filtering-dialog.component.d.ts +6 -3
- package/lib/core/components/static-data/components/static-data-list-items/column-preferences.d.ts +6 -0
- package/lib/core/components/static-data/components/static-data-list-items/group-nested-items.d.ts +6 -0
- package/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.d.ts +74 -12
- package/lib/core/components/static-data/components/static-data-list-items/visible-nested-rows.d.ts +4 -0
- package/lib/core/components/static-data/containers/static-data-items/column-filter.component.d.ts +26 -0
- package/lib/core/components/static-data/containers/static-data-items/column-resize.directive.d.ts +26 -0
- package/lib/core/components/static-data/containers/static-data-items/static-data-items.component.d.ts +9 -1
- package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts +13 -4
- package/lib/core/components/static-data/interfaces/static-data.interface.d.ts +17 -1
- package/lib/core/components/static-data/presets/index.d.ts +4 -0
- package/lib/core/components/static-data/presets/preset.models.d.ts +10 -0
- package/lib/core/components/static-data/presets/presets.component.d.ts +29 -0
- package/lib/core/components/static-data/presets/presets.facade.d.ts +13 -0
- package/lib/core/components/static-data/presets/save-preset-dialog.component.d.ts +23 -0
- package/lib/core/interceptors/headers.interceptor.d.ts +1 -0
- package/lib/core/services/static-data/static-data.service.d.ts +2 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/user-profile.helper.d.ts +76 -0
- package/lib/models/endpoints/static-data/board-settings-request.d.ts +28 -0
- package/lib/models/endpoints/static-data/index.d.ts +2 -0
- package/lib/models/endpoints/static-data/preset-settings-request.d.ts +28 -0
- package/lib/models/endpoints/static-data/static-data-endpoint-types.d.ts +4 -0
- package/lib/models/endpoints/static-data/static-data-get-list/request/static-data-get-list-request-config.d.ts +1 -0
- package/lib/models/models/user/user-model.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PresetSettings, PresetWhere, StaticDataPreset } from '../../presets/preset.models';
|
|
2
|
+
import { StaticDataPresetsFacade } from '../../presets/presets.facade';
|
|
3
|
+
import { BoardSettings, StaticDataBoard } from '../../boards/board.models';
|
|
4
|
+
import { StaticDataBoardsFacade } from '../../boards/boards.facade';
|
|
5
|
+
import { IFormField } from '../../../auto-form/interfaces/form-field';
|
|
6
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, Type, ViewContainerRef } from '@angular/core';
|
|
2
7
|
import { Observable } from 'rxjs';
|
|
3
8
|
import { MatSort } from '@angular/material/sort';
|
|
4
9
|
import { MatPaginator } from '@angular/material/paginator';
|
|
@@ -13,15 +18,17 @@ import * as i0 from "@angular/core";
|
|
|
13
18
|
/**
|
|
14
19
|
* @title Data table with sorting, pagination, and filtering.
|
|
15
20
|
*/
|
|
16
|
-
export declare class StaticDataListItemsComponent implements OnInit, OnDestroy, OnChanges {
|
|
21
|
+
export declare class StaticDataListItemsComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
|
|
17
22
|
private platformId;
|
|
18
23
|
dialog: MatDialog;
|
|
19
24
|
private rightService;
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
+
private boardsFacade;
|
|
26
|
+
private presetsFacade?;
|
|
27
|
+
private staticDataFacade?;
|
|
28
|
+
private changeDetectorRef?;
|
|
29
|
+
private routerFacade?;
|
|
30
|
+
private createNewDialog?;
|
|
31
|
+
private config?;
|
|
25
32
|
mode: StaticDataListComponentModes;
|
|
26
33
|
selectIsRequired: boolean;
|
|
27
34
|
staticDataConfiguration: StaticDataSections;
|
|
@@ -42,6 +49,7 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
42
49
|
subEntity: SubEntity;
|
|
43
50
|
leftBlockFilterParamData: any;
|
|
44
51
|
defaultLanguageId: number;
|
|
52
|
+
presetApplied: EventEmitter<PresetWhere>;
|
|
45
53
|
selectingItem: EventEmitter<{
|
|
46
54
|
id: string;
|
|
47
55
|
name: string;
|
|
@@ -51,12 +59,53 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
51
59
|
paginator: MatPaginator;
|
|
52
60
|
sort: MatSort;
|
|
53
61
|
searchInput: ElementRef;
|
|
62
|
+
customTopFilterHost?: ViewContainerRef;
|
|
63
|
+
customTopFilterData: {
|
|
64
|
+
[key: string]: any;
|
|
65
|
+
};
|
|
66
|
+
private customTopFilterRef?;
|
|
67
|
+
private customTopFilterSub?;
|
|
68
|
+
get hasCustomTopFilter(): boolean;
|
|
69
|
+
boardSettings: BoardSettings;
|
|
70
|
+
activeBoard: StaticDataBoard | null;
|
|
71
|
+
boardView: 'list' | 'kanban';
|
|
72
|
+
get boardSubSection(): string;
|
|
73
|
+
get visibleBoards(): StaticDataBoard[];
|
|
74
|
+
boardsLoading: boolean;
|
|
75
|
+
boardsError: string;
|
|
76
|
+
private boardsLoadSub?;
|
|
77
|
+
private boardsDialogSub?;
|
|
78
|
+
private boardsChangesSub?;
|
|
79
|
+
get boardsEnabled(): boolean;
|
|
80
|
+
get kanbanField(): IFormField | undefined;
|
|
81
|
+
loadBoards(): void;
|
|
82
|
+
selectBoard(board: StaticDataBoard | null): void;
|
|
83
|
+
openBoardSettings(): void;
|
|
84
|
+
openKanbanItem(item: StaticDataModel, rights: {
|
|
85
|
+
[key: string]: boolean;
|
|
86
|
+
}): void;
|
|
87
|
+
presetWhere: PresetWhere;
|
|
88
|
+
presetSettings: PresetSettings;
|
|
89
|
+
activePresetId: string;
|
|
90
|
+
private restoredPreset;
|
|
91
|
+
private presetsLoadSub?;
|
|
92
|
+
private presetsChangesSub?;
|
|
93
|
+
get presetsEnabled(): boolean;
|
|
94
|
+
loadPresets(): void;
|
|
95
|
+
selectPreset(preset: StaticDataPreset): void;
|
|
96
|
+
removePreset(preset: StaticDataPreset, event: MouseEvent): void;
|
|
97
|
+
applyPreset(where: PresetWhere): void;
|
|
54
98
|
title: string;
|
|
55
99
|
isLoaded: boolean;
|
|
56
100
|
loaded$: Observable<boolean>;
|
|
57
101
|
staticSection: StaticDataSection;
|
|
58
102
|
totalCount: number;
|
|
59
103
|
perPage: number;
|
|
104
|
+
columnFilters: Record<string, number[]>;
|
|
105
|
+
filterColumn(event: {
|
|
106
|
+
field: string;
|
|
107
|
+
values: number[];
|
|
108
|
+
}): void;
|
|
60
109
|
pageIndex: number;
|
|
61
110
|
staticData$: Observable<any[]>;
|
|
62
111
|
staticDataMeta$: Observable<{
|
|
@@ -82,10 +131,15 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
82
131
|
title: string;
|
|
83
132
|
}[];
|
|
84
133
|
defaultFieldsList: FieldsOnListPage[];
|
|
85
|
-
constructor(platformId: Object, dialog: MatDialog, rightService: RightService,
|
|
134
|
+
constructor(platformId: Object, dialog: MatDialog, rightService: RightService, boardsFacade: StaticDataBoardsFacade, presetsFacade?: StaticDataPresetsFacade, staticDataFacade?: StaticDataFacade, changeDetectorRef?: ChangeDetectorRef, routerFacade?: RouterFacade, createNewDialog?: Type<any>, config?: AppConfig);
|
|
86
135
|
ngOnInit(): void;
|
|
136
|
+
ngAfterViewInit(): void;
|
|
87
137
|
ngOnDestroy(): void;
|
|
88
138
|
ngOnChanges(changes: SimpleChanges): void;
|
|
139
|
+
handleCustomTopFilter(filters: {
|
|
140
|
+
[field: string]: any;
|
|
141
|
+
} | null): void;
|
|
142
|
+
private setupCustomTopFilter;
|
|
89
143
|
private preparingData;
|
|
90
144
|
addHandle(): void;
|
|
91
145
|
searchHandle(searchValue: string): void;
|
|
@@ -115,15 +169,23 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
|
|
|
115
169
|
field: string;
|
|
116
170
|
type: string;
|
|
117
171
|
}): void;
|
|
172
|
+
get hasFilteringFields(): boolean;
|
|
173
|
+
get activeFilterChips(): {
|
|
174
|
+
field: string;
|
|
175
|
+
title: string;
|
|
176
|
+
value: string;
|
|
177
|
+
}[];
|
|
178
|
+
get activeFilterChipsCount(): number;
|
|
179
|
+
openFilterFieldsDialog(): void;
|
|
180
|
+
removeFilterChip(field: string): void;
|
|
181
|
+
clearAllFilterChips(): void;
|
|
118
182
|
openFieldSettings(): void;
|
|
119
183
|
private loadStaticData;
|
|
120
|
-
private groupItemsByNestedField;
|
|
121
|
-
private groupItemsByNestedFieldRecursion;
|
|
122
184
|
private loadStaticDataMeta;
|
|
123
185
|
private openDeleteDialog;
|
|
124
186
|
private preLoadSections;
|
|
125
187
|
deleteEvent(item: StaticDataModel): void;
|
|
126
188
|
changePage(data: any): void;
|
|
127
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent, [null, null, null, null, null, null, { optional: true; },
|
|
128
|
-
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; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; }, { "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent, [null, null, null, null, { optional: true; }, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
190
|
+
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; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; }, { "presetApplied": "presetApplied"; "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
129
191
|
}
|
package/lib/core/components/static-data/containers/static-data-items/column-filter.component.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
|
2
|
+
import { MatMenuTrigger } from '@angular/material/menu';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { IFormField } from '../../../auto-form/interfaces/form-field';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface ColumnFilterOption {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class ColumnFilterComponent implements OnChanges {
|
|
11
|
+
private readonly facade;
|
|
12
|
+
field: IFormField;
|
|
13
|
+
values: number[];
|
|
14
|
+
applied: EventEmitter<number[]>;
|
|
15
|
+
trigger: MatMenuTrigger;
|
|
16
|
+
options$: Observable<ColumnFilterOption[]>;
|
|
17
|
+
draft: number[] | null;
|
|
18
|
+
ngOnChanges(): void;
|
|
19
|
+
begin(): void;
|
|
20
|
+
selectAll(checked: boolean): void;
|
|
21
|
+
toggle(id: number, options: ColumnFilterOption[]): void;
|
|
22
|
+
apply(options: ColumnFilterOption[]): void;
|
|
23
|
+
clear(): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnFilterComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnFilterComponent, "shared-column-filter", never, { "field": { "alias": "field"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "applied": "applied"; }, never, never, true, never>;
|
|
26
|
+
}
|
package/lib/core/components/static-data/containers/static-data-items/column-resize.directive.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ColumnResizeDirective implements AfterViewInit, OnDestroy {
|
|
4
|
+
private element;
|
|
5
|
+
private renderer;
|
|
6
|
+
private platform;
|
|
7
|
+
sharedColumnResize: string;
|
|
8
|
+
private cleanup;
|
|
9
|
+
private readonly minimum;
|
|
10
|
+
constructor(element: ElementRef<HTMLElement>, renderer: Renderer2, platform: object);
|
|
11
|
+
ngAfterViewInit(): void;
|
|
12
|
+
start(event: PointerEvent): void;
|
|
13
|
+
keydown(event: KeyboardEvent): void;
|
|
14
|
+
reset(event: Event): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
private get key();
|
|
17
|
+
private get header();
|
|
18
|
+
private get table();
|
|
19
|
+
private get headers();
|
|
20
|
+
private fixLayout;
|
|
21
|
+
private resize;
|
|
22
|
+
private save;
|
|
23
|
+
private stop;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResizeDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ColumnResizeDirective, "[sharedColumnResize]", never, { "sharedColumnResize": { "alias": "sharedColumnResize"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -35,6 +35,11 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
35
35
|
parentItemId: number;
|
|
36
36
|
createUpdateUrl: string[];
|
|
37
37
|
viewUrl: string[];
|
|
38
|
+
columnFilters: Record<string, number[]>;
|
|
39
|
+
columnFilterChange: EventEmitter<{
|
|
40
|
+
field: string;
|
|
41
|
+
values: number[];
|
|
42
|
+
}>;
|
|
38
43
|
delete: EventEmitter<StaticDataModel>;
|
|
39
44
|
changeSorting: EventEmitter<{
|
|
40
45
|
field: string;
|
|
@@ -44,6 +49,9 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
44
49
|
id: string;
|
|
45
50
|
name: string;
|
|
46
51
|
}>;
|
|
52
|
+
private readonly expandedRows;
|
|
53
|
+
isExpanded(id: unknown): boolean;
|
|
54
|
+
toggleChildren(id: unknown): void;
|
|
47
55
|
displayedFormFields: IFormField[];
|
|
48
56
|
displayedColumnsStrings: string[];
|
|
49
57
|
editUrlArray: (string | number | object)[];
|
|
@@ -67,5 +75,5 @@ export declare class StaticDataItemsComponent implements OnInit, OnChanges {
|
|
|
67
75
|
private checkFieldGetValueMethod;
|
|
68
76
|
private getRowValue;
|
|
69
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataItemsComponent, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
70
|
-
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; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; }, { "delete": "delete"; "changeSorting": "changeSorting"; "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
78
|
+
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; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; "columnFilters": { "alias": "columnFilters"; "required": false; }; }, { "columnFilterChange": "columnFilterChange"; "delete": "delete"; "changeSorting": "changeSorting"; "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
71
79
|
}
|
package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { StaticDataListComponentModes, 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
|
+
import { FilteringData, FilteringFormComponent } from "../../components/filtering-form/filtering-form.component";
|
|
7
7
|
import { AppConfig } from "../../../../../models";
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
10
|
* @title Data table with sorting, pagination, and filtering.
|
|
11
11
|
*/
|
|
12
|
-
export declare class StaticDataListComponent implements OnInit, OnDestroy {
|
|
12
|
+
export declare class StaticDataListComponent implements OnInit, OnChanges, OnDestroy {
|
|
13
13
|
private activatedRoute;
|
|
14
14
|
private matIconReg;
|
|
15
15
|
private config;
|
|
@@ -19,6 +19,8 @@ export declare class StaticDataListComponent implements OnInit, OnDestroy {
|
|
|
19
19
|
viewUrl: string[];
|
|
20
20
|
test: string;
|
|
21
21
|
selectIsRequired: boolean;
|
|
22
|
+
presetApplied: EventEmitter<import("../../presets/preset.models").PresetWhere>;
|
|
23
|
+
filteringForm?: FilteringFormComponent;
|
|
22
24
|
selectingItem: EventEmitter<{
|
|
23
25
|
id: string;
|
|
24
26
|
name: string;
|
|
@@ -26,21 +28,28 @@ export declare class StaticDataListComponent implements OnInit, OnDestroy {
|
|
|
26
28
|
contentType$: Observable<string>;
|
|
27
29
|
staticDataConfiguration: StaticDataSections;
|
|
28
30
|
filteringData: FilteringData;
|
|
31
|
+
leftClass: string;
|
|
32
|
+
rightClass: string;
|
|
33
|
+
filtersExpanded: boolean;
|
|
34
|
+
showFilterToggle: boolean;
|
|
29
35
|
private destroy$;
|
|
30
36
|
filterData: any;
|
|
31
37
|
defaultLanguageId: number;
|
|
32
38
|
constructor(activatedRoute: ActivatedRoute, matIconReg: MatIconRegistry, config: AppConfig);
|
|
33
39
|
ngOnInit(): Promise<void>;
|
|
40
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
34
41
|
ngOnDestroy(): void;
|
|
35
42
|
handleFilterData(data: {
|
|
36
43
|
[field: string]: any;
|
|
37
44
|
}): void;
|
|
45
|
+
handlePreset(where: import('../../presets/preset.models').PresetWhere): void;
|
|
38
46
|
selectingItemHandler(data: {
|
|
39
47
|
id: string;
|
|
40
48
|
name: string;
|
|
41
49
|
}): void;
|
|
50
|
+
private updateLayoutSettings;
|
|
42
51
|
private loadStaticDataConfiguration;
|
|
43
52
|
private loadContentType;
|
|
44
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListComponent, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListComponent, "app-static-data-list", never, { "mode": { "alias": "mode"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; "test": { "alias": "test"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; }, { "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListComponent, "app-static-data-list", never, { "mode": { "alias": "mode"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; "test": { "alias": "test"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; "filtersExpanded": { "alias": "filtersExpanded"; "required": false; }; "showFilterToggle": { "alias": "showFilterToggle"; "required": false; }; }, { "presetApplied": "presetApplied"; "selectingItem": "selectingItem"; }, never, never, true, never>;
|
|
46
55
|
}
|
|
@@ -11,7 +11,9 @@ export interface StaticDataSectionFilteringField {
|
|
|
11
11
|
type?: StaticDataSectionFilteringFieldTypes;
|
|
12
12
|
}
|
|
13
13
|
export interface StaticDataSectionFiltering {
|
|
14
|
-
fields
|
|
14
|
+
fields?: StaticDataSectionFilteringField[];
|
|
15
|
+
customComponent?: any;
|
|
16
|
+
customTopFiltering?: any;
|
|
15
17
|
}
|
|
16
18
|
export interface FieldsOnListPage {
|
|
17
19
|
field: string;
|
|
@@ -113,12 +115,23 @@ export interface StaticDataSection {
|
|
|
113
115
|
};
|
|
114
116
|
};
|
|
115
117
|
options?: {
|
|
118
|
+
settings?: boolean | {
|
|
119
|
+
boards?: boolean;
|
|
120
|
+
[key: string]: any;
|
|
121
|
+
};
|
|
122
|
+
showSettings?: boolean;
|
|
123
|
+
showpresets?: boolean;
|
|
124
|
+
boards?: boolean;
|
|
125
|
+
kanbanColumnField?: string;
|
|
126
|
+
kanbanField?: string;
|
|
116
127
|
orderByField?: string;
|
|
117
128
|
havePublication?: boolean;
|
|
118
129
|
allItems?: boolean;
|
|
119
130
|
search?: boolean;
|
|
120
131
|
filtering?: StaticDataSectionFiltering;
|
|
121
132
|
filteringType?: string;
|
|
133
|
+
customTopFilterComponent?: any;
|
|
134
|
+
customTopFiltering?: any;
|
|
122
135
|
fieldsOnListPage?: FieldsOnListPage[];
|
|
123
136
|
nestedByField?: string;
|
|
124
137
|
publicationInTelegramBot?: {
|
|
@@ -141,6 +154,9 @@ export interface StaticDataSection {
|
|
|
141
154
|
hideEditAction?: boolean;
|
|
142
155
|
hideDeleteAction?: boolean;
|
|
143
156
|
hideViewAction?: boolean;
|
|
157
|
+
mainBlockCols?: number;
|
|
158
|
+
filterBlockCols?: number;
|
|
159
|
+
menuBlockCols?: number;
|
|
144
160
|
};
|
|
145
161
|
viewMode?: {
|
|
146
162
|
mainBlockCols?: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type PresetWhere = Record<string, string | number | boolean | null | (string | number | boolean | null)[]>;
|
|
2
|
+
export interface StaticDataPreset {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
where: PresetWhere;
|
|
6
|
+
}
|
|
7
|
+
export interface PresetSettings {
|
|
8
|
+
presets: StaticDataPreset[];
|
|
9
|
+
version: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { PresetSettings, PresetWhere, StaticDataPreset } from './preset.models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StaticDataPresetsComponent implements OnChanges, OnDestroy {
|
|
5
|
+
contentType: string;
|
|
6
|
+
where: PresetWhere;
|
|
7
|
+
applied: EventEmitter<PresetWhere>;
|
|
8
|
+
settings: PresetSettings;
|
|
9
|
+
name: string;
|
|
10
|
+
activeId: string;
|
|
11
|
+
error: string;
|
|
12
|
+
busy: boolean;
|
|
13
|
+
loaded: boolean;
|
|
14
|
+
private sub?;
|
|
15
|
+
private readonly facade;
|
|
16
|
+
private readonly cd;
|
|
17
|
+
get hasFilters(): boolean;
|
|
18
|
+
ngOnChanges(changes: import('@angular/core').SimpleChanges): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
load(): void;
|
|
21
|
+
apply(preset: StaticDataPreset): void;
|
|
22
|
+
clear(): void;
|
|
23
|
+
save(): void;
|
|
24
|
+
remove(preset: StaticDataPreset): void;
|
|
25
|
+
private persist;
|
|
26
|
+
private failed;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataPresetsComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataPresetsComponent, "shared-static-data-presets", never, { "contentType": { "alias": "contentType"; "required": false; }; "where": { "alias": "where"; "required": false; }; }, { "applied": "applied"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { PresetSettings, StaticDataPreset } from './preset.models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StaticDataPresetsFacade {
|
|
5
|
+
private readonly service;
|
|
6
|
+
private readonly auth;
|
|
7
|
+
readonly changes$: Subject<string>;
|
|
8
|
+
load(contentType: string): Observable<PresetSettings>;
|
|
9
|
+
save(contentType: string, presets: StaticDataPreset[], version: number): Observable<PresetSettings>;
|
|
10
|
+
private request;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataPresetsFacade, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StaticDataPresetsFacade>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { StaticDataPresetsFacade } from './presets.facade';
|
|
4
|
+
import { PresetWhere } from './preset.models';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface SavePresetDialogData {
|
|
7
|
+
contentType: string;
|
|
8
|
+
where: PresetWhere;
|
|
9
|
+
}
|
|
10
|
+
export declare class SavePresetDialogComponent {
|
|
11
|
+
data: SavePresetDialogData;
|
|
12
|
+
dialogRef: MatDialogRef<SavePresetDialogComponent>;
|
|
13
|
+
private facade;
|
|
14
|
+
private cd;
|
|
15
|
+
name: string;
|
|
16
|
+
saving: boolean;
|
|
17
|
+
error: string;
|
|
18
|
+
constructor(data: SavePresetDialogData, dialogRef: MatDialogRef<SavePresetDialogComponent>, facade: StaticDataPresetsFacade, cd: ChangeDetectorRef);
|
|
19
|
+
close(): void;
|
|
20
|
+
save(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SavePresetDialogComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SavePresetDialogComponent, "shared-save-preset-dialog", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -32,6 +32,7 @@ export declare class HeadersInterceptor implements HttpInterceptor {
|
|
|
32
32
|
private handlePublicationMessagesAndFiles;
|
|
33
33
|
private getDomainByUrl;
|
|
34
34
|
private handle401Error;
|
|
35
|
+
private isSameOrAppDomain;
|
|
35
36
|
private checkPublicationMessages;
|
|
36
37
|
private checkPublishErrors;
|
|
37
38
|
private checkErrors;
|
|
@@ -15,6 +15,8 @@ export declare class StaticDataService extends BaseAPIService {
|
|
|
15
15
|
protected requestsFacade: RequestsFacade;
|
|
16
16
|
protected formsFacade: FormsFacade;
|
|
17
17
|
constructor(httpClient: HttpClient, config: AppConfig, requestsFacade: RequestsFacade, formsFacade: FormsFacade);
|
|
18
|
+
presetSettings(config: import('../../../models/endpoints/static-data/preset-settings-request').PresetSettingsRequestConfig, save?: boolean): Observable<HttpClientResult<BaseResponse>>;
|
|
19
|
+
boardSettings(config: import('../../../models/endpoints/static-data/board-settings-request').BoardSettingsRequestConfig, save?: boolean): Observable<HttpClientResult<BaseResponse>>;
|
|
18
20
|
loadRevision(config: StaticDataLoadRevisionsRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
19
21
|
getList(config: StaticDataGetListRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
20
22
|
getSubRouting(config: StaticDataSubRoutingGetRequestConfig): Observable<HttpClientResult<BaseResponse>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { UserModel } from '../../models/models/user/user-model';
|
|
2
|
+
export interface WtssoActions {
|
|
3
|
+
add_user?: boolean;
|
|
4
|
+
remove_user?: boolean;
|
|
5
|
+
add_organization?: boolean;
|
|
6
|
+
delete_organization?: boolean;
|
|
7
|
+
add_user_to_organization?: boolean;
|
|
8
|
+
delete_user_from_organization?: boolean;
|
|
9
|
+
[key: string]: boolean | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface JwtUserPayload {
|
|
12
|
+
sub?: string;
|
|
13
|
+
user?: {
|
|
14
|
+
id?: string | number;
|
|
15
|
+
name?: string;
|
|
16
|
+
lastName?: string;
|
|
17
|
+
last_name?: string;
|
|
18
|
+
surname?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
avatar?: string;
|
|
21
|
+
picture?: string;
|
|
22
|
+
};
|
|
23
|
+
name?: string;
|
|
24
|
+
given_name?: string;
|
|
25
|
+
lastName?: string;
|
|
26
|
+
last_name?: string;
|
|
27
|
+
family_name?: string;
|
|
28
|
+
surname?: string;
|
|
29
|
+
email?: string;
|
|
30
|
+
avatar?: string;
|
|
31
|
+
picture?: string;
|
|
32
|
+
wtsso_actions?: WtssoActions;
|
|
33
|
+
organizations?: Array<{
|
|
34
|
+
id?: string | number;
|
|
35
|
+
name?: string;
|
|
36
|
+
role?: string;
|
|
37
|
+
roleId?: number;
|
|
38
|
+
access_group_id?: number;
|
|
39
|
+
}>;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
export interface ResolvedUserProfile {
|
|
43
|
+
avatar: string | null;
|
|
44
|
+
initials: string;
|
|
45
|
+
name: string;
|
|
46
|
+
surname: string;
|
|
47
|
+
fullName: string;
|
|
48
|
+
displayName: string;
|
|
49
|
+
email: string;
|
|
50
|
+
role: string;
|
|
51
|
+
accessGroupId?: number;
|
|
52
|
+
workspaces?: any[];
|
|
53
|
+
rights?: any[];
|
|
54
|
+
wtsso_actions?: WtssoActions;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Decodes the payload portion of a JWT token string.
|
|
58
|
+
*/
|
|
59
|
+
export declare function decodeJwtToken<T = any>(token: string | null | undefined): T | null;
|
|
60
|
+
/**
|
|
61
|
+
* Extracts avatar URL from WTSSO JWT token payload if present.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getAvatarFromJwtToken(token: string | null | undefined): string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Extracts first letter from Name and Surname (e.g. "Olivia", "John" -> "OJ").
|
|
66
|
+
*/
|
|
67
|
+
export declare function getInitialsFromNameAndSurname(name?: string | null, surname?: string | null): string;
|
|
68
|
+
/**
|
|
69
|
+
* Resolves full profile details, extracting avatar from WTSSO JWT token,
|
|
70
|
+
* or falling back to first letter from Name and Surname.
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveUserProfile(user?: UserModel | null, rawToken?: string | null): ResolvedUserProfile;
|
|
73
|
+
/**
|
|
74
|
+
* Checks whether the JWT token or user contains a specific WTSSO action permission.
|
|
75
|
+
*/
|
|
76
|
+
export declare function hasWtssoAction(token: string | null | undefined, action: keyof WtssoActions | string): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GetRequest, PutRequest } from '../http';
|
|
2
|
+
import { UserAuthHeaders } from '../../models/user';
|
|
3
|
+
import { StaticDataBoard } from '../../../core/components/static-data/boards/board.models';
|
|
4
|
+
export interface BoardSettingsRequestConfig {
|
|
5
|
+
contentType: string;
|
|
6
|
+
headers: UserAuthHeaders;
|
|
7
|
+
boards?: StaticDataBoard[];
|
|
8
|
+
version?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class BoardSettingsGetRequest extends GetRequest {
|
|
11
|
+
protected config: BoardSettingsRequestConfig;
|
|
12
|
+
constructor(domain: string, config: BoardSettingsRequestConfig);
|
|
13
|
+
get url(): string;
|
|
14
|
+
get headers(): import("../http").RequestHeaders;
|
|
15
|
+
get params(): any;
|
|
16
|
+
get body(): any;
|
|
17
|
+
}
|
|
18
|
+
export declare class BoardSettingsPutRequest extends PutRequest {
|
|
19
|
+
protected config: BoardSettingsRequestConfig;
|
|
20
|
+
constructor(domain: string, config: BoardSettingsRequestConfig);
|
|
21
|
+
get url(): string;
|
|
22
|
+
get headers(): import("../http").RequestHeaders;
|
|
23
|
+
get params(): any;
|
|
24
|
+
get body(): {
|
|
25
|
+
boards: StaticDataBoard[];
|
|
26
|
+
version: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GetRequest, PutRequest } from '../http';
|
|
2
|
+
import { UserAuthHeaders } from '../../models/user';
|
|
3
|
+
import { StaticDataPreset } from '../../../core/components/static-data/presets/preset.models';
|
|
4
|
+
export interface PresetSettingsRequestConfig {
|
|
5
|
+
contentType: string;
|
|
6
|
+
headers: UserAuthHeaders;
|
|
7
|
+
presets?: StaticDataPreset[];
|
|
8
|
+
version?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class PresetSettingsGetRequest extends GetRequest {
|
|
11
|
+
protected config: PresetSettingsRequestConfig;
|
|
12
|
+
constructor(domain: string, config: PresetSettingsRequestConfig);
|
|
13
|
+
get url(): string;
|
|
14
|
+
get headers(): import("../http").RequestHeaders;
|
|
15
|
+
get params(): any;
|
|
16
|
+
get body(): any;
|
|
17
|
+
}
|
|
18
|
+
export declare class PresetSettingsPutRequest extends PutRequest {
|
|
19
|
+
protected config: PresetSettingsRequestConfig;
|
|
20
|
+
constructor(domain: string, config: PresetSettingsRequestConfig);
|
|
21
|
+
get url(): string;
|
|
22
|
+
get headers(): import("../http").RequestHeaders;
|
|
23
|
+
get params(): any;
|
|
24
|
+
get body(): {
|
|
25
|
+
presets: StaticDataPreset[];
|
|
26
|
+
version: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare enum StaticDataEndpointTypes {
|
|
2
|
+
PRESET_SETTINGS_GET = "presetSettingsGet",
|
|
3
|
+
PRESET_SETTINGS_PUT = "presetSettingsPut",
|
|
4
|
+
BOARD_SETTINGS_GET = "boardSettingsGet",
|
|
5
|
+
BOARD_SETTINGS_PUT = "boardSettingsPut",
|
|
2
6
|
CREATE = "create",
|
|
3
7
|
BULK_UPDATE_OR_CREATE = "bulkUpdateOrCreate",
|
|
4
8
|
DELETE = "delete",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UserAuthHeaders } from "../../../../models/user";
|
|
2
2
|
import { PagingType } from "../../../../entity";
|
|
3
3
|
export interface StaticDataGetListRequestConfig {
|
|
4
|
+
boardFilter?: import('../../../../../core/components/static-data/boards/board.models').BoardFilterGroup;
|
|
4
5
|
contentType: string;
|
|
5
6
|
subSection?: string;
|
|
6
7
|
headers: UserAuthHeaders;
|