nuxeo-development-framework 5.7.8 → 5.8.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/bundles/nuxeo-development-framework.umd.js +153 -73
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/reports/ndf-reports/containers/ndf-report/ndf-report.component.js +2 -2
- package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +2 -2
- package/esm2015/lib/components/reports/ndf-reports/models/graph-definition.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/options/index.js +1 -2
- package/esm2015/lib/components/reports/ndf-reports/services/chart-callbacks-register.services.js +38 -0
- package/esm2015/lib/components/reports/ndf-reports/services/index.js +2 -1
- package/esm2015/lib/components/reports/ndf-reports/services/report-config-mapper.service.js +61 -9
- package/esm2015/lib/components/reports/ndf-reports/utilities/reports-table.mapper.js +6 -6
- package/esm2015/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.js +6 -6
- package/fesm2015/nuxeo-development-framework.js +145 -71
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/reports/ndf-reports/models/graph-definition.d.ts +6 -0
- package/lib/components/reports/ndf-reports/options/index.d.ts +0 -1
- package/lib/components/reports/ndf-reports/services/chart-callbacks-register.services.d.ts +14 -0
- package/lib/components/reports/ndf-reports/services/index.d.ts +1 -0
- package/lib/components/reports/ndf-reports/services/report-config-mapper.service.d.ts +6 -1
- package/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.d.ts +1 -0
- package/package.json +1 -1
- package/src/docs/ndf-table.doc.md +1 -1
- package/esm2015/lib/components/reports/ndf-reports/options/options.js +0 -15
- package/lib/components/reports/ndf-reports/options/options.d.ts +0 -2
|
@@ -5,6 +5,7 @@ import { BaseReportConfig } from './base';
|
|
|
5
5
|
import { ChartOptionsByType } from './common';
|
|
6
6
|
import { ReportDataSource } from './report-data-source';
|
|
7
7
|
import { CHARTS_TYPES } from '../constants';
|
|
8
|
+
import { EvaluatedString } from '../../../../shared';
|
|
8
9
|
declare type chartTypes = Omit<typeof CHARTS_TYPES, 'line'>;
|
|
9
10
|
export declare type AllowedChartType = chartTypes[keyof chartTypes];
|
|
10
11
|
export interface ChartTypeConfig {
|
|
@@ -25,6 +26,10 @@ export declare type GraphDialogConfig = {
|
|
|
25
26
|
maxHeight?: number | string;
|
|
26
27
|
position?: DialogPosition;
|
|
27
28
|
};
|
|
29
|
+
export declare type CallbackDefinition = {
|
|
30
|
+
path: string;
|
|
31
|
+
callback: EvaluatedString<'callback'>;
|
|
32
|
+
};
|
|
28
33
|
/**
|
|
29
34
|
* Definition of chart options with plugins as strings (used in configuration)
|
|
30
35
|
*/
|
|
@@ -34,6 +39,7 @@ export declare type GraphChartOptionsDefinition<TType extends ChartType = ChartT
|
|
|
34
39
|
datasets?: Omit<ChartDataset<TType>, 'data'>[];
|
|
35
40
|
overrides?: ChartOptionsByType;
|
|
36
41
|
plugins?: string[];
|
|
42
|
+
callbacks?: Array<CallbackDefinition>;
|
|
37
43
|
colors?: string[];
|
|
38
44
|
direction?: 'horizontal' | 'vertical';
|
|
39
45
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActiveElement, Chart, ChartEvent, ChartType, LegendItem, Point, TooltipItem } from 'chart.js';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare type Callback = ((tooltipItem: TooltipItem<ChartType>) => string | number | string[]) | ((legendItem: LegendItem, chart: Chart<ChartType>) => boolean | void) | ((chart: Chart<ChartType>, event: ChartEvent, options: any, active: ActiveElement[]) => string | Point) | ((event: ChartEvent, legendItem: LegendItem, legend: any) => boolean | void);
|
|
4
|
+
export declare class ChartCallbacksRegisterService {
|
|
5
|
+
private readonly _callbacks;
|
|
6
|
+
register(key: string, callback: Callback): void;
|
|
7
|
+
register(callbacks: Record<string, Callback>): void;
|
|
8
|
+
getAll(): ReadonlyMap<string, Callback>;
|
|
9
|
+
has(key: string): boolean;
|
|
10
|
+
get(key: string): Callback;
|
|
11
|
+
delete(key: string): boolean;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartCallbacksRegisterService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChartCallbacksRegisterService>;
|
|
14
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { CustomChart, CustomChartDefinition, DigitChart, DigitChartDefinition, DynamicLineChart, DynamicLineChartDefinition, GraphChart, GraphChartDefinition } from '../models';
|
|
2
2
|
import { ChartPluginsRegistry } from './chart-plugins-registry.service';
|
|
3
|
+
import { ChartCallbacksRegisterService } from './chart-callbacks-register.services';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export declare class ReportConfigMapperService {
|
|
5
7
|
private readonly _chartPluginsRegistry;
|
|
6
|
-
|
|
8
|
+
private readonly _chartPluginsCallbacks;
|
|
9
|
+
private readonly _translateService;
|
|
10
|
+
constructor(_chartPluginsRegistry: ChartPluginsRegistry, _chartPluginsCallbacks: ChartCallbacksRegisterService, _translateService: TranslateService);
|
|
7
11
|
/**
|
|
8
12
|
* Prepares a graph chart configuration by converting plugin names to actual plugin objects
|
|
9
13
|
* @param config The graph chart definition
|
|
@@ -35,6 +39,7 @@ export declare class ReportConfigMapperService {
|
|
|
35
39
|
private _preparePlugins;
|
|
36
40
|
private _getChartOptions;
|
|
37
41
|
private _prepareColors;
|
|
42
|
+
private _prepareCallbacks;
|
|
38
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportConfigMapperService, never>;
|
|
39
44
|
static ɵprov: i0.ɵɵInjectableDeclaration<ReportConfigMapperService>;
|
|
40
45
|
}
|
package/package.json
CHANGED
|
@@ -1489,7 +1489,7 @@ type TranslateKey = string
|
|
|
1489
1489
|
"prop": "properties.physicalOriginal",
|
|
1490
1490
|
"display": true,
|
|
1491
1491
|
"type": "custom",
|
|
1492
|
-
"template": "
|
|
1492
|
+
"template": "common.components.TranslatedValueColumn",
|
|
1493
1493
|
"translatePrefix": "rmDocumentUpload.hasPhysicalOriginal",
|
|
1494
1494
|
"isBooleanValue": true,
|
|
1495
1495
|
"sortable": false,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getVerticalBarOptions } from './vertical-bar';
|
|
2
|
-
import { getHorizontalBarOptions } from './horizontal-bar';
|
|
3
|
-
import { getDoughnutOptions } from './doughnut';
|
|
4
|
-
import { getLineOptions } from './line';
|
|
5
|
-
import { getPieOptions } from './pie';
|
|
6
|
-
export function getChartsOptions(overrides) {
|
|
7
|
-
return {
|
|
8
|
-
verticalBar: getVerticalBarOptions(overrides === null || overrides === void 0 ? void 0 : overrides.verticalBar),
|
|
9
|
-
horizontalBar: getHorizontalBarOptions(overrides === null || overrides === void 0 ? void 0 : overrides.horizontalBar),
|
|
10
|
-
doughnut: getDoughnutOptions(overrides === null || overrides === void 0 ? void 0 : overrides.doughnut),
|
|
11
|
-
line: getLineOptions(overrides === null || overrides === void 0 ? void 0 : overrides.line),
|
|
12
|
-
pie: getPieOptions(overrides === null || overrides === void 0 ? void 0 : overrides.pie)
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL251eGVvLWRldmVsb3BtZW50LWZyYW1ld29yay9zcmMvbGliL2NvbXBvbmVudHMvcmVwb3J0cy9uZGYtcmVwb3J0cy9vcHRpb25zL29wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDdkQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQ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