@onecx/angular-accelerator 5.29.0 → 5.31.0
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/index.mjs +3 -1
- package/esm2022/lib/angular-accelerator.module.mjs +26 -11
- package/esm2022/lib/components/column-group-selection/column-group-selection.component.mjs +3 -3
- package/esm2022/lib/components/diagram/diagram.component.mjs +26 -3
- package/esm2022/lib/components/group-by-count-diagram/group-by-count-diagram.component.mjs +24 -6
- package/esm2022/lib/components/page-header/page-header.component.mjs +3 -3
- package/esm2022/lib/directives/if-permission.directive.mjs +3 -11
- package/esm2022/lib/injection-tokens/has-permission-checker.mjs +10 -0
- package/esm2022/lib/model/diagram-data.mjs +1 -1
- package/esm2022/lib/services/translation-cache.service.mjs +4 -1
- package/esm2022/lib/utils/async-translate-loader.utils.mjs +4 -1
- package/esm2022/lib/utils/caching-translate-loader.utils.mjs +4 -1
- package/esm2022/lib/utils/create-translate-loader.utils.mjs +4 -1
- package/esm2022/lib/utils/translate.combined.loader.mjs +4 -1
- package/fesm2022/onecx-angular-accelerator.mjs +96 -28
- package/fesm2022/onecx-angular-accelerator.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/components/diagram/diagram.component.d.ts +8 -1
- package/lib/components/group-by-count-diagram/group-by-count-diagram.component.d.ts +10 -1
- package/lib/components/page-header/page-header.component.d.ts +2 -0
- package/lib/directives/if-permission.directive.d.ts +2 -11
- package/lib/injection-tokens/has-permission-checker.d.ts +13 -0
- package/lib/model/diagram-data.d.ts +1 -0
- package/lib/services/translation-cache.service.d.ts +3 -0
- package/lib/utils/async-translate-loader.utils.d.ts +3 -0
- package/lib/utils/caching-translate-loader.utils.d.ts +3 -0
- package/lib/utils/create-translate-loader.utils.d.ts +3 -0
- package/lib/utils/translate.combined.loader.d.ts +3 -0
- package/package.json +10 -6
package/index.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export declare class DiagramComponent implements OnInit, OnChanges {
|
|
|
21
21
|
private translateService;
|
|
22
22
|
data: DiagramData[] | undefined;
|
|
23
23
|
sumKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* This property determines if diagram should generate the colors for the data that does not have any set.
|
|
26
|
+
*
|
|
27
|
+
* Setting this property to false will result in using the provided colors only if every data item has one. In the scenario where at least one item does not have a color set, diagram will generate all colors.
|
|
28
|
+
*/
|
|
29
|
+
fillMissingColors: boolean;
|
|
24
30
|
private _diagramType;
|
|
25
31
|
selectedDiagramType: DiagramLayouts | undefined;
|
|
26
32
|
chartType: 'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar';
|
|
@@ -42,11 +48,12 @@ export declare class DiagramComponent implements OnInit, OnChanges {
|
|
|
42
48
|
ngOnChanges(): void;
|
|
43
49
|
ngOnInit(): void;
|
|
44
50
|
generateChart(colorScale: any, colorRangeInfo: any): void;
|
|
51
|
+
generateColors(data: DiagramData[], colorScale: any, colorRangeInfo: any): any;
|
|
45
52
|
generateTotal(data: DiagramData[]): number;
|
|
46
53
|
generateDiagramValueString(data: DiagramData[]): string;
|
|
47
54
|
private diagramTypeToChartType;
|
|
48
55
|
dataClicked(event: []): void;
|
|
49
56
|
onDiagramTypeChanged(event: any): void;
|
|
50
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "ocx-diagram", never, { "data": { "alias": "data"; "required": false; }; "sumKey": { "alias": "sumKey"; "required": false; }; "diagramType": { "alias": "diagramType"; "required": false; }; "supportedDiagramTypes": { "alias": "supportedDiagramTypes"; "required": false; }; }, { "dataSelected": "dataSelected"; "diagramTypeChanged": "diagramTypeChanged"; "componentStateChanged": "componentStateChanged"; }, never, never, false, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "ocx-diagram", never, { "data": { "alias": "data"; "required": false; }; "sumKey": { "alias": "sumKey"; "required": false; }; "fillMissingColors": { "alias": "fillMissingColors"; "required": false; }; "diagramType": { "alias": "diagramType"; "required": false; }; "supportedDiagramTypes": { "alias": "supportedDiagramTypes"; "required": false; }; }, { "dataSelected": "dataSelected"; "diagramTypeChanged": "diagramTypeChanged"; "componentStateChanged": "componentStateChanged"; }, never, never, false, never>;
|
|
52
59
|
}
|
|
@@ -13,6 +13,12 @@ export declare class GroupByCountDiagramComponent implements OnInit {
|
|
|
13
13
|
private translateService;
|
|
14
14
|
sumKey: string;
|
|
15
15
|
diagramType: DiagramType;
|
|
16
|
+
/**
|
|
17
|
+
* This property determines if diagram should generate the colors for the data that does not have any set.
|
|
18
|
+
*
|
|
19
|
+
* Setting this property to false will result in using the provided colors only if every data item has one. In the scenario where at least one item does not have a color set, diagram will generate all colors.
|
|
20
|
+
*/
|
|
21
|
+
fillMissingColors: boolean;
|
|
16
22
|
/**
|
|
17
23
|
* @deprecated Will be replaced by diagramType
|
|
18
24
|
*/
|
|
@@ -31,6 +37,9 @@ export declare class GroupByCountDiagramComponent implements OnInit {
|
|
|
31
37
|
set columnField(value: string);
|
|
32
38
|
get column(): DiagramColumn;
|
|
33
39
|
set column(value: DiagramColumn);
|
|
40
|
+
private _colors$;
|
|
41
|
+
get colors(): Record<string, string>;
|
|
42
|
+
set colors(value: Record<string, string>);
|
|
34
43
|
dataSelected: EventEmitter<any>;
|
|
35
44
|
diagramTypeChanged: EventEmitter<DiagramType>;
|
|
36
45
|
componentStateChanged: EventEmitter<GroupByCountDiagramComponentState>;
|
|
@@ -39,5 +48,5 @@ export declare class GroupByCountDiagramComponent implements OnInit {
|
|
|
39
48
|
dataClicked(event: any): void;
|
|
40
49
|
onDiagramTypeChanged(newDiagramType: DiagramType): void;
|
|
41
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupByCountDiagramComponent, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GroupByCountDiagramComponent, "ocx-group-by-count-diagram", never, { "sumKey": { "alias": "sumKey"; "required": false; }; "diagramType": { "alias": "diagramType"; "required": false; }; "type": { "alias": "type"; "required": false; }; "supportedDiagramTypes": { "alias": "supportedDiagramTypes"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnType": { "alias": "columnType"; "required": false; }; "columnField": { "alias": "columnField"; "required": false; }; "column": { "alias": "column"; "required": false; }; }, { "dataSelected": "dataSelected"; "diagramTypeChanged": "diagramTypeChanged"; "componentStateChanged": "componentStateChanged"; }, never, never, false, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupByCountDiagramComponent, "ocx-group-by-count-diagram", never, { "sumKey": { "alias": "sumKey"; "required": false; }; "diagramType": { "alias": "diagramType"; "required": false; }; "fillMissingColors": { "alias": "fillMissingColors"; "required": false; }; "type": { "alias": "type"; "required": false; }; "supportedDiagramTypes": { "alias": "supportedDiagramTypes"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnType": { "alias": "columnType"; "required": false; }; "columnField": { "alias": "columnField"; "required": false; }; "column": { "alias": "column"; "required": false; }; "colors": { "alias": "colors"; "required": false; }; }, { "dataSelected": "dataSelected"; "diagramTypeChanged": "diagramTypeChanged"; "componentStateChanged": "componentStateChanged"; }, never, never, false, never>;
|
|
43
52
|
}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import { ElementRef,
|
|
1
|
+
import { ElementRef, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { UserService } from '@onecx/angular-integration-interface';
|
|
3
|
+
import { HasPermissionChecker } from '@onecx/angular-utils';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export interface HasPermissionChecker {
|
|
5
|
-
hasPermission(permissionKey: string): boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* This checker always returns true, basically disabling the permission system on the UI side
|
|
9
|
-
*/
|
|
10
|
-
export declare class AlwaysGrantPermissionChecker implements HasPermissionChecker {
|
|
11
|
-
hasPermission(_permissionKey: string): boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const HAS_PERMISSION_CHECKER: InjectionToken<HasPermissionChecker>;
|
|
14
5
|
export declare class IfPermissionDirective implements OnInit {
|
|
15
6
|
private renderer;
|
|
16
7
|
private el;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
3
|
+
*/
|
|
4
|
+
export { HasPermissionChecker } from '@onecx/angular-utils';
|
|
5
|
+
/**
|
|
6
|
+
* This checker always returns true, basically disabling the permission system on the UI side
|
|
7
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
8
|
+
*/
|
|
9
|
+
export { AlwaysGrantPermissionChecker } from '@onecx/angular-utils';
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
12
|
+
*/
|
|
13
|
+
export { HAS_PERMISSION_CHECKER } from '@onecx/angular-utils';
|
|
@@ -6,6 +6,9 @@ declare global {
|
|
|
6
6
|
onecxTranslations: Record<string, any>;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
11
|
+
*/
|
|
9
12
|
export declare class TranslationCacheService implements OnDestroy {
|
|
10
13
|
private translationTopic$;
|
|
11
14
|
constructor();
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TranslateLoader } from '@ngx-translate/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
5
|
+
*/
|
|
3
6
|
export declare class AsyncTranslateLoader implements TranslateLoader {
|
|
4
7
|
private translateLoader$;
|
|
5
8
|
static lastTimerId: number;
|
|
@@ -2,6 +2,9 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { TranslateLoader } from '@ngx-translate/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { TranslationCacheService } from '../services/translation-cache.service';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
7
|
+
*/
|
|
5
8
|
export declare class CachingTranslateLoader implements TranslateLoader {
|
|
6
9
|
private translationCache;
|
|
7
10
|
private http;
|
|
@@ -2,4 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { TranslateLoader } from '@ngx-translate/core';
|
|
3
3
|
import { AppStateService } from '@onecx/angular-integration-interface';
|
|
4
4
|
import { TranslationCacheService } from '../services/translation-cache.service';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
7
|
+
*/
|
|
5
8
|
export declare function createTranslateLoader(http: HttpClient, appStateService: AppStateService, translationCacheService?: TranslationCacheService): TranslateLoader;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TranslateLoader } from '@ngx-translate/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
5
|
+
*/
|
|
3
6
|
export declare class TranslateCombinedLoader implements TranslateLoader {
|
|
4
7
|
private _loaders;
|
|
5
8
|
constructor(...loaders: TranslateLoader[]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onecx/angular-accelerator",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.31.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^18.0.5",
|
|
@@ -10,15 +10,19 @@
|
|
|
10
10
|
"@angular/platform-browser": "^18.0.5",
|
|
11
11
|
"@angular/router": "^18.0.5",
|
|
12
12
|
"@ngx-translate/core": "^15.0.0",
|
|
13
|
+
"@ngx-translate/http-loader": "^8.0.0",
|
|
13
14
|
"@ngneat/until-destroy": "^10.0.0",
|
|
14
|
-
"@onecx/integration-interface": "^5.
|
|
15
|
-
"@onecx/
|
|
16
|
-
"@onecx/angular-
|
|
17
|
-
"@onecx/angular-
|
|
15
|
+
"@onecx/integration-interface": "^5.31.0",
|
|
16
|
+
"@onecx/accelerator": "^5.31.0",
|
|
17
|
+
"@onecx/angular-integration-interface": "^5.31.0",
|
|
18
|
+
"@onecx/angular-remote-components": "^5.31.0",
|
|
19
|
+
"@onecx/angular-testing": "^5.31.0",
|
|
20
|
+
"@onecx/angular-utils": "^5.31.0",
|
|
18
21
|
"chart.js": "^4.4.3",
|
|
19
22
|
"d3-scale-chromatic": "^3.1.0",
|
|
20
23
|
"rxjs": "~7.8.1",
|
|
21
|
-
"primeng": "^17.18.6"
|
|
24
|
+
"primeng": "^17.18.6",
|
|
25
|
+
"@storybook/angular": "^8.3.2"
|
|
22
26
|
},
|
|
23
27
|
"dependencies": {
|
|
24
28
|
"tslib": "^2.3.0"
|