nuxeo-development-framework 5.5.5 → 5.5.7
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/bundles/nuxeo-development-framework.umd.js +308 -153
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/reports/charts/chart.token.js +1 -1
- package/esm2015/lib/components/reports/charts/components/chart.component.js +1 -1
- package/esm2015/lib/components/reports/charts/utility/colors.js +7 -1
- package/esm2015/lib/components/reports/charts/utility/css.js +32 -1
- package/esm2015/lib/components/reports/ndf-reports/base/base-graph.report.js +30 -1
- package/esm2015/lib/components/reports/ndf-reports/charts-components/graph-chart/graph-chart.component.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +1 -23
- package/esm2015/lib/components/reports/ndf-reports/components/graph-report/graph-report.component.js +2 -24
- package/esm2015/lib/components/reports/ndf-reports/services/report-config-mapper.service.js +3 -9
- package/esm2015/lib/components/reports/ndf-reports/utilities/dataset-colors.js +3 -5
- package/esm2015/lib/components/spell-checker-field/spell-checker-field.module.js +1 -1
- package/esm2015/lib/components/tables/table/dynamic-column/dynamic-column.component.js +10 -5
- package/esm2015/lib/components/tables/table/dynamic-component.js +10 -5
- package/esm2015/lib/core/services/column-renderer/column-renderer-registry.service.js +102 -0
- package/esm2015/lib/core/services/column-renderer/index.js +2 -0
- package/esm2015/lib/core/services/extension/extension.service.js +35 -4
- package/esm2015/lib/core/services/index.js +2 -1
- package/fesm2015/nuxeo-development-framework.js +298 -145
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/reports/charts/chart.token.d.ts +3 -0
- package/lib/components/reports/charts/utility/colors.d.ts +1 -0
- package/lib/components/reports/charts/utility/css.d.ts +4 -0
- package/lib/components/reports/ndf-reports/base/base-graph.report.d.ts +5 -1
- package/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.d.ts +2 -5
- package/lib/components/reports/ndf-reports/components/graph-report/graph-report.component.d.ts +1 -5
- package/lib/components/tables/table/dynamic-column/dynamic-column.component.d.ts +3 -1
- package/lib/components/tables/table/dynamic-component.d.ts +3 -1
- package/lib/core/services/column-renderer/column-renderer-registry.service.d.ts +62 -0
- package/lib/core/services/column-renderer/index.d.ts +1 -0
- package/lib/core/services/extension/extension.service.d.ts +33 -0
- package/lib/core/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,5 +4,8 @@ export declare type ChartDefaultsOptions = {
|
|
|
4
4
|
globalPlugins?: Plugin[];
|
|
5
5
|
fontFamily?: string;
|
|
6
6
|
fontSize?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
7
10
|
};
|
|
8
11
|
export declare const CHART_DEFAULTS_OPTIONS: InjectionToken<ChartDefaultsOptions>;
|
|
@@ -43,3 +43,7 @@ export declare const getColors: (length?: number, staticColors?: string[]) => st
|
|
|
43
43
|
* @returns {string} - The text color, either the dark color (`--chart-value-dark-color`) or the light color (`--chart-value-light-color`).
|
|
44
44
|
*/
|
|
45
45
|
export declare function getTextColor(backgroundColor: string): string;
|
|
46
|
+
export declare function getCssColors(colors: string[]): string[];
|
|
47
|
+
export declare function isCssVar(value: string): boolean;
|
|
48
|
+
export declare function extractCssVar(data: string): string;
|
|
49
|
+
export declare function resolveColor(value: string | undefined, cssVar: string, fallback: string): string;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/portal';
|
|
2
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
3
|
import { DynamicLineChart, DynamicLineChartDefinition, GraphChart, GraphChartDefinition } from '../models';
|
|
3
4
|
import { ChartThemeService } from '../services';
|
|
4
5
|
import { ReportsDialogService } from '../services/reports-dialog.service';
|
|
5
6
|
import { BaseReport } from './base-report';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare abstract class BaseGraphReport<TDefinition extends GraphChartDefinition | DynamicLineChartDefinition, TConfig extends GraphChart | DynamicLineChart> extends BaseReport<TDefinition, TConfig> {
|
|
8
|
+
export declare abstract class BaseGraphReport<TDefinition extends GraphChartDefinition | DynamicLineChartDefinition, TConfig extends GraphChart | DynamicLineChart> extends BaseReport<TDefinition, TConfig> implements AfterViewInit, OnDestroy {
|
|
8
9
|
protected _dialog: ReportsDialogService<any>;
|
|
9
10
|
protected _chartThemeService: ChartThemeService;
|
|
10
11
|
protected _initialTheme: "dark" | "light";
|
|
11
12
|
openGraphDialog(component?: ComponentType<any>): void;
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
ngOnDestroy(): void;
|
|
15
|
+
protected _setupThemeWatcher(): void;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseGraphReport<any, any>, never>;
|
|
13
17
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseGraphReport<any, any>, never, never, {}, {}, never>;
|
|
14
18
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
2
|
import { GraphChartComponent } from '../../charts-components';
|
|
3
3
|
import { BaseGraphReport } from '../../base/base-graph.report';
|
|
4
4
|
import { DynamicLineChart, DynamicLineChartDefinition, TimeGroups } from '../../models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class DynamicTimelineReportComponent extends BaseGraphReport<DynamicLineChartDefinition, DynamicLineChart>
|
|
6
|
+
export declare class DynamicTimelineReportComponent extends BaseGraphReport<DynamicLineChartDefinition, DynamicLineChart> {
|
|
7
7
|
injector: Injector;
|
|
8
8
|
private readonly _timelineService;
|
|
9
9
|
graphChartComponent: GraphChartComponent;
|
|
@@ -12,14 +12,11 @@ export declare class DynamicTimelineReportComponent extends BaseGraphReport<Dyna
|
|
|
12
12
|
filterCriteria$: import("rxjs").Observable<any>;
|
|
13
13
|
report$: import("rxjs").Observable<any>;
|
|
14
14
|
constructor(injector: Injector);
|
|
15
|
-
ngAfterViewInit(): void;
|
|
16
|
-
ngOnDestroy(): void;
|
|
17
15
|
_subscribeToLanguage(): void;
|
|
18
16
|
printChart(): void;
|
|
19
17
|
changeGroup(group: TimeGroups): void;
|
|
20
18
|
openTimelineDialog(): void;
|
|
21
19
|
openDetails(): void;
|
|
22
|
-
private _setupThemeWatcher;
|
|
23
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicTimelineReportComponent, never>;
|
|
24
21
|
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTimelineReportComponent, "app-dynamic-timeline-report", never, {}, {}, never, never>;
|
|
25
22
|
}
|
package/lib/components/reports/ndf-reports/components/graph-report/graph-report.component.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
1
|
import { GraphChartComponent } from '../../charts-components';
|
|
3
2
|
import { BaseGraphReport } from '../../base/base-graph.report';
|
|
4
3
|
import { ChartTypes, GraphChart, GraphChartDefinition } from '../../models';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class GraphReportComponent extends BaseGraphReport<GraphChartDefinition, GraphChart>
|
|
5
|
+
export declare class GraphReportComponent extends BaseGraphReport<GraphChartDefinition, GraphChart> {
|
|
7
6
|
graphChartComponent: GraphChartComponent;
|
|
8
7
|
chartType$: import("rxjs").Observable<"line" | "scatter" | "bubble" | "pie" | "doughnut" | "polarArea" | "radar" | "verticalBar" | "horizontalBar">;
|
|
9
|
-
ngAfterViewInit(): void;
|
|
10
|
-
ngOnDestroy(): void;
|
|
11
8
|
changeChartType(type: ChartTypes): void;
|
|
12
9
|
printChart(): void;
|
|
13
|
-
private _setupThemeWatcher;
|
|
14
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<GraphReportComponent, never>;
|
|
15
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<GraphReportComponent, "app-graph-report", never, {}, {}, never, never>;
|
|
16
12
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ComponentFactoryResolver, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { ExtensionService } from '../../../../core/services/extension/extension.service';
|
|
3
|
+
import { ColumnRendererRegistryService } from '../../../../core/services';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class DynamicColumnComponent implements OnInit, OnChanges, OnDestroy {
|
|
5
6
|
private extensions;
|
|
7
|
+
private _columnRegister;
|
|
6
8
|
private componentFactoryResolver;
|
|
7
9
|
private cdr;
|
|
8
10
|
content: ViewContainerRef;
|
|
@@ -10,7 +12,7 @@ export declare class DynamicColumnComponent implements OnInit, OnChanges, OnDest
|
|
|
10
12
|
context: any;
|
|
11
13
|
column: any;
|
|
12
14
|
private componentRef;
|
|
13
|
-
constructor(extensions: ExtensionService, componentFactoryResolver: ComponentFactoryResolver, cdr: ChangeDetectorRef);
|
|
15
|
+
constructor(extensions: ExtensionService, _columnRegister: ColumnRendererRegistryService, componentFactoryResolver: ComponentFactoryResolver, cdr: ChangeDetectorRef);
|
|
14
16
|
ngOnInit(): void;
|
|
15
17
|
ngOnChanges(changes: SimpleChanges): void;
|
|
16
18
|
ngOnDestroy(): void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ComponentFactoryResolver, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ExtensionService } from '../../../core/services/extension/extension.service';
|
|
3
|
+
import { ColumnRendererRegistryService } from '../../../core/services';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class DynamicCustomComponent implements OnInit, OnChanges, OnDestroy {
|
|
5
6
|
private _extensions;
|
|
7
|
+
private _columnRegister;
|
|
6
8
|
private _factoryResolver;
|
|
7
9
|
private _vcr;
|
|
8
10
|
componentName: string;
|
|
@@ -10,7 +12,7 @@ export declare class DynamicCustomComponent implements OnInit, OnChanges, OnDest
|
|
|
10
12
|
rowAction: EventEmitter<any>;
|
|
11
13
|
onClick: EventEmitter<any>;
|
|
12
14
|
private _componentRef;
|
|
13
|
-
constructor(_extensions: ExtensionService, _factoryResolver: ComponentFactoryResolver);
|
|
15
|
+
constructor(_extensions: ExtensionService, _columnRegister: ColumnRendererRegistryService, _factoryResolver: ComponentFactoryResolver);
|
|
14
16
|
ngOnInit(): void;
|
|
15
17
|
ngOnChanges(changes: SimpleChanges): void;
|
|
16
18
|
private updateInstance;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare type CategoryType = 'common' | 'custom';
|
|
4
|
+
export interface ColumnTypeDefinition {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
app?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
component: Type<any>;
|
|
11
|
+
category: CategoryType;
|
|
12
|
+
}
|
|
13
|
+
export declare class ColumnRendererRegistryService {
|
|
14
|
+
private registry;
|
|
15
|
+
register(definition: ColumnTypeDefinition): void;
|
|
16
|
+
register(definition: ColumnTypeDefinition[]): void;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a column type definition by its unique type key.
|
|
19
|
+
* @param type The column type identifier
|
|
20
|
+
*/
|
|
21
|
+
get(type: string): ColumnTypeDefinition | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Returns all registered column type definitions.
|
|
24
|
+
*/
|
|
25
|
+
getAll(): ColumnTypeDefinition[];
|
|
26
|
+
/**
|
|
27
|
+
* Gets column types filtered by app
|
|
28
|
+
*/
|
|
29
|
+
getByApp(app: string): ColumnTypeDefinition[];
|
|
30
|
+
/**
|
|
31
|
+
* Returns only the component associated with a column type.
|
|
32
|
+
* @param type The column type identifier
|
|
33
|
+
*/
|
|
34
|
+
getComponent(type: string): Type<unknown> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Gets all column types filtered by category
|
|
37
|
+
*/
|
|
38
|
+
getByCategory(category: string): ColumnTypeDefinition[];
|
|
39
|
+
/**
|
|
40
|
+
* Returns all unique categories
|
|
41
|
+
*/
|
|
42
|
+
getCategories(): string[];
|
|
43
|
+
/**
|
|
44
|
+
* Returns column types grouped by category
|
|
45
|
+
*/
|
|
46
|
+
getGroupedByCategory(): Record<string, ColumnTypeDefinition[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Gets column types filtered by multiple categories
|
|
49
|
+
*/
|
|
50
|
+
getByCategories(categories: string[]): ColumnTypeDefinition[];
|
|
51
|
+
/**
|
|
52
|
+
* Checks if a column type exists
|
|
53
|
+
*/
|
|
54
|
+
has(type: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Clears all registered column types (mainly for testing or hot reload scenarios).
|
|
57
|
+
*/
|
|
58
|
+
clear(): void;
|
|
59
|
+
private _set;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnRendererRegistryService, never>;
|
|
61
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnRendererRegistryService>;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './column-renderer-registry.service';
|
|
@@ -41,6 +41,39 @@ export declare class ExtensionService {
|
|
|
41
41
|
/**
|
|
42
42
|
* Adds one or more new components to the existing set.
|
|
43
43
|
* @param values The new components to add
|
|
44
|
+
* @deprecated This method is deprecated for column components and will be removed in a future version.
|
|
45
|
+
* Use `ColumnRendererRegistryService.register()` instead for registering column components.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // For columns (deprecated)
|
|
49
|
+
* this.setComponents({ 'common.components.text': TextComponent, 'number': NumberComponent });
|
|
50
|
+
*
|
|
51
|
+
* // For columns (recommended - single)
|
|
52
|
+
* this.columnRegistry.register({
|
|
53
|
+
* name: 'Text Column',
|
|
54
|
+
* type: 'common.text',
|
|
55
|
+
* category: 'basic',
|
|
56
|
+
* component: TextComponent
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // For columns (recommended - multiple)
|
|
60
|
+
* this.columnRegistry.register([
|
|
61
|
+
* {
|
|
62
|
+
* name: 'Text Column',
|
|
63
|
+
* type: 'common.text',
|
|
64
|
+
* category: 'basic',
|
|
65
|
+
* component: TextComponent
|
|
66
|
+
* },
|
|
67
|
+
* {
|
|
68
|
+
* name: 'Number Column',
|
|
69
|
+
* type: 'common.number',
|
|
70
|
+
* category: 'basic',
|
|
71
|
+
* component: NumberComponent
|
|
72
|
+
* }
|
|
73
|
+
* ]);
|
|
74
|
+
*
|
|
75
|
+
* // For viewer components (still supported)
|
|
76
|
+
* this.setComponents({ 'viewer.components.pdf': PdfViewerComponent });
|
|
44
77
|
*/
|
|
45
78
|
setComponents(values: {
|
|
46
79
|
[key: string]: Type<{}>;
|