@onecx/angular-accelerator 5.48.0 → 5.48.2
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/esm2022/lib/components/data-list-grid/data-list-grid.component.mjs +157 -110
- package/esm2022/lib/components/data-table/data-table.component.mjs +40 -21
- package/esm2022/lib/components/filter-view/filter-view.component.mjs +2 -2
- package/esm2022/lib/components/interactive-data-view/interactive-data-view.component.mjs +1 -1
- package/esm2022/lib/components/page-header/page-header.component.mjs +76 -101
- package/esm2022/lib/components/search-header/search-header.component.mjs +1 -1
- package/esm2022/lib/directives/if-permission.directive.mjs +79 -30
- package/esm2022/testing/data-list-grid.harness.mjs +9 -2
- package/esm2022/testing/data-table.harness.mjs +15 -2
- package/fesm2022/onecx-angular-accelerator-testing.mjs +21 -1
- package/fesm2022/onecx-angular-accelerator-testing.mjs.map +1 -1
- package/fesm2022/onecx-angular-accelerator.mjs +342 -256
- package/fesm2022/onecx-angular-accelerator.mjs.map +1 -1
- package/lib/components/data-list-grid/data-list-grid.component.d.ts +18 -10
- package/lib/components/data-table/data-table.component.d.ts +5 -2
- package/lib/components/page-header/page-header.component.d.ts +16 -24
- package/lib/directives/if-permission.directive.d.ts +15 -7
- package/package.json +7 -7
- package/testing/data-list-grid.harness.d.ts +4 -1
- package/testing/data-table.harness.d.ts +5 -1
|
@@ -13,6 +13,7 @@ import { DataTableColumn } from '../../model/data-table-column.model';
|
|
|
13
13
|
import { DataSortBase } from '../data-sort-base/data-sort-base';
|
|
14
14
|
import { Row } from '../data-table/data-table.component';
|
|
15
15
|
import { Filter } from '../../model/filter.model';
|
|
16
|
+
import { HasPermissionChecker } from '@onecx/angular-utils';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
export type ListGridData = {
|
|
18
19
|
id: string | number;
|
|
@@ -32,6 +33,7 @@ export declare class DataListGridComponent extends DataSortBase implements OnIni
|
|
|
32
33
|
private router;
|
|
33
34
|
private injector;
|
|
34
35
|
private appStateService;
|
|
36
|
+
private hasPermissionChecker?;
|
|
35
37
|
titleLineId: string | undefined;
|
|
36
38
|
subtitleLineIds: string[];
|
|
37
39
|
clientSideSorting: boolean;
|
|
@@ -58,7 +60,9 @@ export declare class DataListGridComponent extends DataSortBase implements OnIni
|
|
|
58
60
|
emptyResultsMessage: string | undefined;
|
|
59
61
|
fallbackImage: string;
|
|
60
62
|
layout: 'grid' | 'list';
|
|
61
|
-
|
|
63
|
+
_viewPermission$: BehaviorSubject<string | string[] | undefined>;
|
|
64
|
+
get viewPermission(): string | string[] | undefined;
|
|
65
|
+
set viewPermission(value: string | string[] | undefined);
|
|
62
66
|
editPermission: string | string[] | undefined;
|
|
63
67
|
deletePermission: string | string[] | undefined;
|
|
64
68
|
deleteActionVisibleField: string | undefined;
|
|
@@ -142,7 +146,7 @@ export declare class DataListGridComponent extends DataSortBase implements OnIni
|
|
|
142
146
|
get _dateListValue(): TemplateRef<any> | undefined;
|
|
143
147
|
inlineListActions$: Observable<DataAction[]>;
|
|
144
148
|
overflowListActions$: Observable<DataAction[]>;
|
|
145
|
-
|
|
149
|
+
overflowListMenuItems$: Observable<MenuItem[]>;
|
|
146
150
|
currentMenuRow$: BehaviorSubject<Row | null>;
|
|
147
151
|
_additionalActions$: BehaviorSubject<DataAction[]>;
|
|
148
152
|
get additionalActions(): DataAction[];
|
|
@@ -157,10 +161,9 @@ export declare class DataListGridComponent extends DataSortBase implements OnIni
|
|
|
157
161
|
get editItemObserved(): boolean;
|
|
158
162
|
get deleteItemObserved(): boolean;
|
|
159
163
|
get sortDirectionNumber(): number;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
observedOutputs: number;
|
|
164
|
+
gridMenuItems$: Observable<MenuItem[]>;
|
|
165
|
+
_selectedItem$: BehaviorSubject<ListGridData | undefined>;
|
|
166
|
+
observedOutputs$: BehaviorSubject<number>;
|
|
164
167
|
displayedItems$: Observable<unknown[]> | undefined;
|
|
165
168
|
fallbackImagePath$: Observable<string>;
|
|
166
169
|
templates$: BehaviorSubject<QueryList<PrimeTemplate> | undefined>;
|
|
@@ -171,7 +174,8 @@ export declare class DataListGridComponent extends DataSortBase implements OnIni
|
|
|
171
174
|
set parentTemplates(value: QueryList<PrimeTemplate> | null | undefined);
|
|
172
175
|
columnType: typeof ColumnType;
|
|
173
176
|
templatesObservables: Record<string, Observable<TemplateRef<any> | null>>;
|
|
174
|
-
|
|
177
|
+
hasViewPermission$: Observable<boolean>;
|
|
178
|
+
constructor(locale: string, translateService: TranslateService, userService: UserService, router: Router, injector: Injector, appStateService: AppStateService, hasPermissionChecker?: HasPermissionChecker | undefined);
|
|
175
179
|
ngDoCheck(): void;
|
|
176
180
|
ngOnInit(): void;
|
|
177
181
|
ngAfterContentInit(): void;
|
|
@@ -180,19 +184,23 @@ export declare class DataListGridComponent extends DataSortBase implements OnIni
|
|
|
180
184
|
onEditRow(element: ListGridData): void;
|
|
181
185
|
imgError(item: ListGridData): void;
|
|
182
186
|
getFallbackImagePath(mfeInfo: MfeInfo): string;
|
|
183
|
-
updateGridMenuItems(useSelectedItem?: boolean): void;
|
|
184
187
|
setSelectedItem(item: ListGridData): void;
|
|
185
188
|
resolveFieldData(object: any, key: any): any;
|
|
186
189
|
emitComponentStateChanged(state?: DataListGridComponentState): void;
|
|
187
190
|
onPageChange(event: any): void;
|
|
188
191
|
resetPage(): void;
|
|
189
192
|
fieldIsTruthy(object: any, key: any): boolean;
|
|
190
|
-
hasVisibleOverflowMenuItems(
|
|
193
|
+
hasVisibleOverflowMenuItems(row: any): Observable<boolean>;
|
|
191
194
|
toggleOverflowMenu(event: MouseEvent, menu: Menu, row: Row): void;
|
|
192
195
|
getFilteredColumns(): DataTableColumn[];
|
|
193
196
|
findTemplate(templates: PrimeTemplate[], names: string[]): PrimeTemplate | undefined;
|
|
194
197
|
getTemplate(column: DataTableColumn): Observable<TemplateRef<any> | null>;
|
|
195
|
-
|
|
198
|
+
private mapGridMenuItems;
|
|
199
|
+
private getGridActionsTranslations;
|
|
200
|
+
private shouldDisplayAction;
|
|
201
|
+
private filterActionsBasedOnPermissions;
|
|
202
|
+
private getPermissions;
|
|
203
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataListGridComponent, [null, null, null, null, null, null, { optional: true; }]>;
|
|
196
204
|
static ɵcmp: i0.ɵɵComponentDeclaration<DataListGridComponent, "ocx-data-list-grid", never, { "titleLineId": { "alias": "titleLineId"; "required": false; }; "subtitleLineIds": { "alias": "subtitleLineIds"; "required": false; }; "clientSideSorting": { "alias": "clientSideSorting"; "required": false; }; "clientSideFiltering": { "alias": "clientSideFiltering"; "required": false; }; "sortStates": { "alias": "sortStates"; "required": false; }; "pageSizes": { "alias": "pageSizes"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "showAllOption": { "alias": "showAllOption"; "required": false; }; "emptyResultsMessage": { "alias": "emptyResultsMessage"; "required": false; }; "fallbackImage": { "alias": "fallbackImage"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "viewPermission": { "alias": "viewPermission"; "required": false; }; "editPermission": { "alias": "editPermission"; "required": false; }; "deletePermission": { "alias": "deletePermission"; "required": false; }; "deleteActionVisibleField": { "alias": "deleteActionVisibleField"; "required": false; }; "deleteActionEnabledField": { "alias": "deleteActionEnabledField"; "required": false; }; "viewActionVisibleField": { "alias": "viewActionVisibleField"; "required": false; }; "viewActionEnabledField": { "alias": "viewActionEnabledField"; "required": false; }; "editActionVisibleField": { "alias": "editActionVisibleField"; "required": false; }; "editActionEnabledField": { "alias": "editActionEnabledField"; "required": false; }; "viewMenuItemKey": { "alias": "viewMenuItemKey"; "required": false; }; "editMenuItemKey": { "alias": "editMenuItemKey"; "required": false; }; "deleteMenuItemKey": { "alias": "deleteMenuItemKey"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "page": { "alias": "page"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "name": { "alias": "name"; "required": false; }; "totalRecordsOnServer": { "alias": "totalRecordsOnServer"; "required": false; }; "currentPageShowingKey": { "alias": "currentPageShowingKey"; "required": false; }; "currentPageShowingWithTotalOnServerKey": { "alias": "currentPageShowingWithTotalOnServerKey"; "required": false; }; "data": { "alias": "data"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortField": { "alias": "sortField"; "required": false; }; "gridItemSubtitleLinesTemplate": { "alias": "gridItemSubtitleLinesTemplate"; "required": false; }; "listItemSubtitleLinesTemplate": { "alias": "listItemSubtitleLinesTemplate"; "required": false; }; "listItemTemplate": { "alias": "listItemTemplate"; "required": false; }; "gridItemTemplate": { "alias": "gridItemTemplate"; "required": false; }; "listValueTemplate": { "alias": "listValueTemplate"; "required": false; }; "translationKeyListValueTemplate": { "alias": "translationKeyListValueTemplate"; "required": false; }; "numberListValueTemplate": { "alias": "numberListValueTemplate"; "required": false; }; "relativeDateListValueTemplate": { "alias": "relativeDateListValueTemplate"; "required": false; }; "customListValueTemplate": { "alias": "customListValueTemplate"; "required": false; }; "stringListValueTemplate": { "alias": "stringListValueTemplate"; "required": false; }; "dateListValueTemplate": { "alias": "dateListValueTemplate"; "required": false; }; "additionalActions": { "alias": "additionalActions"; "required": false; }; "parentTemplates": { "alias": "parentTemplates"; "required": false; }; }, { "viewItem": "viewItem"; "editItem": "editItem"; "deleteItem": "deleteItem"; "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; "componentStateChanged": "componentStateChanged"; }, ["gridItemSubtitleLinesChildTemplate", "listItemSubtitleLinesChildTemplate", "listItemChildTemplate", "gridItemChildTemplate", "listValueChildTemplate", "translationKeyListValueChildTemplate", "numberListValueChildTemplate", "relativeDateListValueChildTemplate", "customListValueChildTemplate", "stringListValueChildTemplate", "dateListValueChildTemplate", "templates"], never, false, never>;
|
|
197
205
|
}
|
|
198
206
|
export {};
|
|
@@ -12,6 +12,7 @@ import { DataSortDirection } from '../../model/data-sort-direction';
|
|
|
12
12
|
import { DataTableColumn } from '../../model/data-table-column.model';
|
|
13
13
|
import { Filter, FilterType } from '../../model/filter.model';
|
|
14
14
|
import { DataSortBase } from '../data-sort-base/data-sort-base';
|
|
15
|
+
import { HasPermissionChecker } from '@onecx/angular-utils';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
export type Primitive = number | string | boolean | bigint | Date;
|
|
17
18
|
export type Row = {
|
|
@@ -42,6 +43,7 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
|
|
|
42
43
|
private router;
|
|
43
44
|
private injector;
|
|
44
45
|
private userService;
|
|
46
|
+
private hasPermissionChecker?;
|
|
45
47
|
FilterType: typeof FilterType;
|
|
46
48
|
TemplateType: typeof TemplateType;
|
|
47
49
|
checked: boolean;
|
|
@@ -216,7 +218,7 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
|
|
|
216
218
|
get anyRowActionObserved(): boolean;
|
|
217
219
|
get selectionChangedObserved(): boolean;
|
|
218
220
|
templatesObservables: Record<string, Observable<TemplateRef<any> | null>>;
|
|
219
|
-
constructor(locale: string, translateService: TranslateService, router: Router, injector: Injector, userService: UserService);
|
|
221
|
+
constructor(locale: string, translateService: TranslateService, router: Router, injector: Injector, userService: UserService, hasPermissionChecker?: HasPermissionChecker | undefined);
|
|
220
222
|
ngOnInit(): void;
|
|
221
223
|
translateColumnValues(columnValues: string[]): Observable<any>;
|
|
222
224
|
emitComponentStateChanged(state?: DataTableComponentState): void;
|
|
@@ -253,7 +255,8 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
|
|
|
253
255
|
[x: string]: string | undefined;
|
|
254
256
|
};
|
|
255
257
|
rowTrackByFunction: (item: any) => any;
|
|
256
|
-
|
|
258
|
+
private filterActionsBasedOnPermissions;
|
|
259
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableComponent, [null, null, null, null, null, { optional: true; }]>;
|
|
257
260
|
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "ocx-data-table", never, { "rows": { "alias": "rows"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortColumn": { "alias": "sortColumn"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "clientSideFiltering": { "alias": "clientSideFiltering"; "required": false; }; "clientSideSorting": { "alias": "clientSideSorting"; "required": false; }; "sortStates": { "alias": "sortStates"; "required": false; }; "pageSizes": { "alias": "pageSizes"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "showAllOption": { "alias": "showAllOption"; "required": false; }; "emptyResultsMessage": { "alias": "emptyResultsMessage"; "required": false; }; "name": { "alias": "name"; "required": false; }; "deletePermission": { "alias": "deletePermission"; "required": false; }; "viewPermission": { "alias": "viewPermission"; "required": false; }; "editPermission": { "alias": "editPermission"; "required": false; }; "deleteActionVisibleField": { "alias": "deleteActionVisibleField"; "required": false; }; "deleteActionEnabledField": { "alias": "deleteActionEnabledField"; "required": false; }; "viewActionVisibleField": { "alias": "viewActionVisibleField"; "required": false; }; "viewActionEnabledField": { "alias": "viewActionEnabledField"; "required": false; }; "editActionVisibleField": { "alias": "editActionVisibleField"; "required": false; }; "editActionEnabledField": { "alias": "editActionEnabledField"; "required": false; }; "selectionEnabledField": { "alias": "selectionEnabledField"; "required": false; }; "allowSelectAll": { "alias": "allowSelectAll"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "page": { "alias": "page"; "required": false; }; "tableStyle": { "alias": "tableStyle"; "required": false; }; "totalRecordsOnServer": { "alias": "totalRecordsOnServer"; "required": false; }; "currentPageShowingKey": { "alias": "currentPageShowingKey"; "required": false; }; "currentPageShowingWithTotalOnServerKey": { "alias": "currentPageShowingWithTotalOnServerKey"; "required": false; }; "stringCellTemplate": { "alias": "stringCellTemplate"; "required": false; }; "numberCellTemplate": { "alias": "numberCellTemplate"; "required": false; }; "customCellTemplate": { "alias": "customCellTemplate"; "required": false; }; "dateCellTemplate": { "alias": "dateCellTemplate"; "required": false; }; "relativeDateCellTemplate": { "alias": "relativeDateCellTemplate"; "required": false; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; }; "translationKeyCellTemplate": { "alias": "translationKeyCellTemplate"; "required": false; }; "stringFilterCellTemplate": { "alias": "stringFilterCellTemplate"; "required": false; }; "numberFilterCellTemplate": { "alias": "numberFilterCellTemplate"; "required": false; }; "customFilterCellTemplate": { "alias": "customFilterCellTemplate"; "required": false; }; "dateFilterCellTemplate": { "alias": "dateFilterCellTemplate"; "required": false; }; "relativeDateFilterCellTemplate": { "alias": "relativeDateFilterCellTemplate"; "required": false; }; "filterCellTemplate": { "alias": "filterCellTemplate"; "required": false; }; "translationKeyFilterCellTemplate": { "alias": "translationKeyFilterCellTemplate"; "required": false; }; "additionalActions": { "alias": "additionalActions"; "required": false; }; "frozenActionColumn": { "alias": "frozenActionColumn"; "required": false; }; "actionColumnPosition": { "alias": "actionColumnPosition"; "required": false; }; "parentTemplates": { "alias": "parentTemplates"; "required": false; }; }, { "filtered": "filtered"; "sorted": "sorted"; "viewTableRow": "viewTableRow"; "editTableRow": "editTableRow"; "deleteTableRow": "deleteTableRow"; "selectionChanged": "selectionChanged"; "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; "componentStateChanged": "componentStateChanged"; }, ["stringCellChildTemplate", "numberCellChildTemplate", "customCellChildTemplate", "dateCellChildTemplate", "relativeDateCellChildTemplate", "cellChildTemplate", "translationKeyCellChildTemplate", "stringFilterCellChildTemplate", "numberFilterCellChildTemplate", "customFilterCellChildTemplate", "dateFilterCellChildTemplate", "relativeDateFilterCellChildTemplate", "filterCellChildTemplate", "translationKeyFilterCellChildTemplate", "templates"], never, false, never>;
|
|
258
261
|
}
|
|
259
262
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
3
|
import { MenuItem } from 'primeng/api';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
4
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
5
|
import { AppStateService } from '@onecx/angular-integration-interface';
|
|
6
6
|
import { UserService } from '@onecx/angular-integration-interface';
|
|
7
7
|
import { BreadcrumbService } from '../../services/breadcrumb.service';
|
|
8
8
|
import { PrimeIcon } from '../../utils/primeicon.utils';
|
|
9
|
+
import { HasPermissionChecker } from '@onecx/angular-utils';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
/**
|
|
11
12
|
* Action definition.
|
|
@@ -59,10 +60,11 @@ export interface HomeItem {
|
|
|
59
60
|
page?: string;
|
|
60
61
|
}
|
|
61
62
|
export type GridColumnOptions = 1 | 2 | 3 | 4 | 6 | 12;
|
|
62
|
-
export declare class PageHeaderComponent implements OnInit
|
|
63
|
+
export declare class PageHeaderComponent implements OnInit {
|
|
63
64
|
private translateService;
|
|
64
65
|
private appStateService;
|
|
65
66
|
private userService;
|
|
67
|
+
private hasPermissionChecker?;
|
|
66
68
|
header: string | undefined;
|
|
67
69
|
loading: boolean;
|
|
68
70
|
figureBackground: boolean;
|
|
@@ -70,9 +72,9 @@ export declare class PageHeaderComponent implements OnInit, OnChanges {
|
|
|
70
72
|
figureImage: string | undefined;
|
|
71
73
|
disableDefaultActions: boolean;
|
|
72
74
|
subheader: string | undefined;
|
|
73
|
-
_actions: Action[]
|
|
74
|
-
get actions(): Action[]
|
|
75
|
-
set actions(value: Action[]
|
|
75
|
+
_actions: BehaviorSubject<Action[]>;
|
|
76
|
+
get actions(): Action[];
|
|
77
|
+
set actions(value: Action[]);
|
|
76
78
|
objectDetails: ObjectDetailItem[] | undefined;
|
|
77
79
|
showBreadcrumbs: boolean;
|
|
78
80
|
manualBreadcrumbs: boolean;
|
|
@@ -81,8 +83,8 @@ export declare class PageHeaderComponent implements OnInit, OnChanges {
|
|
|
81
83
|
save: EventEmitter<any>;
|
|
82
84
|
additionalToolbarContent: TemplateRef<any> | undefined;
|
|
83
85
|
additionalToolbarContentLeft: TemplateRef<any> | undefined;
|
|
84
|
-
overflowActions
|
|
85
|
-
inlineActions
|
|
86
|
+
overflowActions$: BehaviorSubject<MenuItem[]>;
|
|
87
|
+
inlineActions$: BehaviorSubject<Action[]>;
|
|
86
88
|
dd: Date;
|
|
87
89
|
breadcrumbs$: Observable<MenuItem[]>;
|
|
88
90
|
home$: Observable<HomeItem>;
|
|
@@ -94,28 +96,18 @@ export declare class PageHeaderComponent implements OnInit, OnChanges {
|
|
|
94
96
|
objectInfoColumnLayoutClasses: string;
|
|
95
97
|
objectInfoDefaultLayoutClasses: string;
|
|
96
98
|
protected breadcrumbs: BreadcrumbService;
|
|
97
|
-
constructor(breadcrumbs: BreadcrumbService, translateService: TranslateService, appStateService: AppStateService, userService: UserService);
|
|
98
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
99
|
+
constructor(breadcrumbs: BreadcrumbService, translateService: TranslateService, appStateService: AppStateService, userService: UserService, hasPermissionChecker?: HasPermissionChecker | undefined);
|
|
99
100
|
ngOnInit(): void;
|
|
100
101
|
onAction(action: string): void;
|
|
101
102
|
handleImageError(): void;
|
|
102
103
|
generateItemStyle(item: ObjectDetailItem): string;
|
|
103
104
|
getObjectPanelLayoutClasses(): string;
|
|
104
105
|
getObjectInfoLayoutClasses(): string;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
private
|
|
109
|
-
|
|
110
|
-
* Generates a list of actions that should be rendered as inline buttons
|
|
111
|
-
*/
|
|
112
|
-
private generateInlineActions;
|
|
113
|
-
/**
|
|
114
|
-
* Adds a given action to a given array if the current user is allowed to see it
|
|
115
|
-
* @param allowedActions Array that the action should be added to if the current user is allowed to see it
|
|
116
|
-
* @param action Action for which a permission check should be executed
|
|
117
|
-
*/
|
|
118
|
-
private checkActionPermission;
|
|
106
|
+
private filterInlineActions;
|
|
107
|
+
private filterOverflowActions;
|
|
108
|
+
private filterActionsBasedOnPermissions;
|
|
109
|
+
private getActionTranslationKeys;
|
|
110
|
+
private mapOverflowActionsToMenuItems;
|
|
119
111
|
static ɵfac: i0.ɵɵFactoryDeclaration<PageHeaderComponent, never>;
|
|
120
112
|
static ɵcmp: i0.ɵɵComponentDeclaration<PageHeaderComponent, "ocx-page-header", never, { "header": { "alias": "header"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "figureBackground": { "alias": "figureBackground"; "required": false; }; "showFigure": { "alias": "showFigure"; "required": false; }; "figureImage": { "alias": "figureImage"; "required": false; }; "disableDefaultActions": { "alias": "disableDefaultActions"; "required": false; }; "subheader": { "alias": "subheader"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "objectDetails": { "alias": "objectDetails"; "required": false; }; "showBreadcrumbs": { "alias": "showBreadcrumbs"; "required": false; }; "manualBreadcrumbs": { "alias": "manualBreadcrumbs"; "required": false; }; "enableGridView": { "alias": "enableGridView"; "required": false; }; "gridLayoutDesktopColumns": { "alias": "gridLayoutDesktopColumns"; "required": false; }; }, { "save": "save"; }, ["additionalToolbarContent", "additionalToolbarContentLeft"], ["[figureImage]", "[toolbarItems]", "*"], false, never>;
|
|
121
113
|
}
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { UserService } from '@onecx/angular-integration-interface';
|
|
3
3
|
import { HasPermissionChecker } from '@onecx/angular-utils';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class IfPermissionDirective implements OnInit {
|
|
6
6
|
private renderer;
|
|
7
|
-
private el;
|
|
8
7
|
private viewContainer;
|
|
9
8
|
private hasPermissionChecker?;
|
|
10
9
|
private templateRef?;
|
|
11
10
|
private userService?;
|
|
12
|
-
permission: string | string[] | undefined;
|
|
11
|
+
set permission(value: string | string[] | undefined);
|
|
13
12
|
set notPermission(value: string | string[] | undefined);
|
|
13
|
+
ocxIfPermissionOnMissingPermission: 'hide' | 'disable';
|
|
14
|
+
set ocxIfNotPermissionOnMissingPermission(value: 'hide' | 'disable');
|
|
14
15
|
onMissingPermission: 'hide' | 'disable';
|
|
15
16
|
ocxIfPermissionPermissions: string[] | undefined;
|
|
16
17
|
set ocxIfNotPermissionPermissions(value: string[] | undefined);
|
|
17
18
|
ocxIfPermissionElseTemplate: TemplateRef<any> | undefined;
|
|
18
19
|
set ocxIfNotPermissionElseTemplate(value: TemplateRef<any> | undefined);
|
|
19
20
|
private permissionChecker;
|
|
21
|
+
private permissionSubject$;
|
|
22
|
+
private isDisabled;
|
|
23
|
+
private directiveContentRef;
|
|
20
24
|
negate: boolean;
|
|
21
|
-
constructor(renderer: Renderer2,
|
|
25
|
+
constructor(renderer: Renderer2, viewContainer: ViewContainerRef, hasPermissionChecker?: HasPermissionChecker | undefined, templateRef?: TemplateRef<any> | undefined, userService?: UserService | undefined);
|
|
22
26
|
ngOnInit(): void;
|
|
23
|
-
hasPermission
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
private hasPermission;
|
|
28
|
+
private showTemplateOrClear;
|
|
29
|
+
private showElseTemplateOrDefaultView;
|
|
30
|
+
private resetView;
|
|
31
|
+
private getElement;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IfPermissionDirective, [null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
33
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IfPermissionDirective, "[ocxIfPermission], [ocxIfNotPermission]", never, { "permission": { "alias": "ocxIfPermission"; "required": false; }; "notPermission": { "alias": "ocxIfNotPermission"; "required": false; }; "ocxIfPermissionOnMissingPermission": { "alias": "ocxIfPermissionOnMissingPermission"; "required": false; }; "ocxIfNotPermissionOnMissingPermission": { "alias": "ocxIfNotPermissionOnMissingPermission"; "required": false; }; "onMissingPermission": { "alias": "onMissingPermission"; "required": false; }; "ocxIfPermissionPermissions": { "alias": "ocxIfPermissionPermissions"; "required": false; }; "ocxIfNotPermissionPermissions": { "alias": "ocxIfNotPermissionPermissions"; "required": false; }; "ocxIfPermissionElseTemplate": { "alias": "ocxIfPermissionElseTemplate"; "required": false; }; "ocxIfNotPermissionElseTemplate": { "alias": "ocxIfNotPermissionElseTemplate"; "required": false; }; }, {}, never, never, false, never>;
|
|
26
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onecx/angular-accelerator",
|
|
3
|
-
"version": "5.48.
|
|
3
|
+
"version": "5.48.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^18.0.5",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"@ngx-translate/core": "^15.0.0",
|
|
13
13
|
"@ngx-translate/http-loader": "^8.0.0",
|
|
14
14
|
"@ngneat/until-destroy": "^10.0.0",
|
|
15
|
-
"@onecx/integration-interface": "^5.48.
|
|
16
|
-
"@onecx/accelerator": "^5.48.
|
|
17
|
-
"@onecx/angular-integration-interface": "^5.48.
|
|
18
|
-
"@onecx/angular-remote-components": "^5.48.
|
|
19
|
-
"@onecx/angular-testing": "^5.48.
|
|
20
|
-
"@onecx/angular-utils": "^5.48.
|
|
15
|
+
"@onecx/integration-interface": "^5.48.2",
|
|
16
|
+
"@onecx/accelerator": "^5.48.2",
|
|
17
|
+
"@onecx/angular-integration-interface": "^5.48.2",
|
|
18
|
+
"@onecx/angular-remote-components": "^5.48.2",
|
|
19
|
+
"@onecx/angular-testing": "^5.48.2",
|
|
20
|
+
"@onecx/angular-utils": "^5.48.2",
|
|
21
21
|
"chart.js": "^4.4.3",
|
|
22
22
|
"d3-scale-chromatic": "^3.1.0",
|
|
23
23
|
"rxjs": "~7.8.1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentContainerComponentHarness, TestElement } from '@angular/cdk/testing';
|
|
2
|
-
import { PPaginatorHarness } from '@onecx/angular-testing';
|
|
2
|
+
import { PMenuHarness, PPaginatorHarness } from '@onecx/angular-testing';
|
|
3
3
|
import { DefaultGridItemHarness } from './default-grid-item.harness';
|
|
4
4
|
import { DefaultListItemHarness } from './default-list-item.harness';
|
|
5
5
|
export declare class DataListGridHarness extends ContentContainerComponentHarness {
|
|
@@ -7,8 +7,11 @@ export declare class DataListGridHarness extends ContentContainerComponentHarnes
|
|
|
7
7
|
getDefaultGridItems: import("@onecx/angular-testing").AsyncFactoryFn<DefaultGridItemHarness[]>;
|
|
8
8
|
getPaginator: import("@onecx/angular-testing").AsyncFactoryFn<PPaginatorHarness>;
|
|
9
9
|
getMenuButton: import("@onecx/angular-testing").AsyncFactoryFn<TestElement>;
|
|
10
|
+
getListOverflowMenuButton: import("@onecx/angular-testing").AsyncFactoryFn<TestElement>;
|
|
11
|
+
getListOverflowMenu: import("@onecx/angular-testing").AsyncFactoryFn<PMenuHarness | null>;
|
|
10
12
|
getDefaultListItems(): Promise<DefaultListItemHarness[]>;
|
|
11
13
|
getActionButtons(actionButtonType: 'list' | 'grid' | 'grid-hidden'): Promise<TestElement[]>;
|
|
14
|
+
getListOverflowMenuItems(): Promise<import("@onecx/angular-testing").MenuItemHarness[]>;
|
|
12
15
|
actionButtonIsDisabled(actionButton: TestElement, viewType: 'list' | 'grid'): Promise<boolean>;
|
|
13
16
|
hasAmountOfActionButtons(actionButtonType: 'list' | 'grid' | 'grid-hidden', amount: number): Promise<boolean>;
|
|
14
17
|
hasAmountOfDisabledActionButtons(viewType: 'list' | 'grid', amount: number): Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, TestElement } from '@angular/cdk/testing';
|
|
2
|
-
import { TableHeaderColumnHarness, TableRowHarness, PPaginatorHarness, PTableCheckboxHarness } from '@onecx/angular-testing';
|
|
2
|
+
import { TableHeaderColumnHarness, TableRowHarness, PPaginatorHarness, PTableCheckboxHarness, PMenuHarness, MenuItemHarness } from '@onecx/angular-testing';
|
|
3
3
|
export interface DataTableHarnessFilters extends BaseHarnessFilters {
|
|
4
4
|
id?: string;
|
|
5
5
|
}
|
|
@@ -9,12 +9,16 @@ export declare class DataTableHarness extends ContentContainerComponentHarness {
|
|
|
9
9
|
getHeaderColumns: import("@onecx/angular-testing").AsyncFactoryFn<TableHeaderColumnHarness[]>;
|
|
10
10
|
getRows: import("@onecx/angular-testing").AsyncFactoryFn<TableRowHarness[]>;
|
|
11
11
|
getPaginator: import("@onecx/angular-testing").AsyncFactoryFn<PPaginatorHarness>;
|
|
12
|
+
getOverflowMenu: import("@onecx/angular-testing").AsyncFactoryFn<PMenuHarness | null>;
|
|
12
13
|
getId(): Promise<string | null>;
|
|
13
14
|
rowSelectionIsEnabled(): Promise<boolean>;
|
|
14
15
|
getHarnessesForCheckboxes(type: 'all' | 'checked' | 'unchecked'): Promise<PTableCheckboxHarness[]>;
|
|
15
16
|
getActionColumnHeader(position: 'left' | 'right'): Promise<TestElement | null>;
|
|
16
17
|
getActionColumn(position: 'left' | 'right'): Promise<TestElement | null>;
|
|
17
18
|
getActionButtons(): Promise<TestElement[]>;
|
|
19
|
+
getOverflowActionMenuButton(): Promise<TestElement | null>;
|
|
20
|
+
getOverFlowMenuItems(): Promise<MenuItemHarness[]>;
|
|
21
|
+
getOverFlowMenuItem(itemText: string): Promise<MenuItemHarness | undefined | null>;
|
|
18
22
|
actionButtonIsDisabled(actionButton: TestElement): Promise<any>;
|
|
19
23
|
hasAmountOfActionButtons(amount: number): Promise<boolean>;
|
|
20
24
|
hasAmountOfDisabledActionButtons(amount: number): Promise<boolean>;
|