@odoo/o-spreadsheet 16.5.0-alpha.3 → 16.5.0-alpha.4
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/dist/o-spreadsheet.cjs.js +418 -138
- package/dist/o-spreadsheet.d.ts +31 -23
- package/dist/o-spreadsheet.esm.js +418 -138
- package/dist/o-spreadsheet.iife.js +418 -138
- package/dist/o-spreadsheet.iife.min.js +241 -241
- package/package.json +5 -4
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _odoo_owl from '@odoo/owl';
|
|
2
2
|
import { ComponentConstructor, Component } from '@odoo/owl';
|
|
3
|
-
import { ChartConfiguration, ChartData,
|
|
3
|
+
import { ChartConfiguration, ChartData, ChartDataset, ChartOptions } from 'chart.js';
|
|
4
4
|
|
|
5
5
|
declare enum CellErrorLevel {
|
|
6
6
|
silent = 0,
|
|
@@ -374,7 +374,7 @@ interface SectionThreshold {
|
|
|
374
374
|
}
|
|
375
375
|
interface GaugeChartConfiguration extends Omit<ChartConfiguration, "data" | "options"> {
|
|
376
376
|
data?: GaugeChartData;
|
|
377
|
-
options
|
|
377
|
+
options: GaugeChartOptions;
|
|
378
378
|
}
|
|
379
379
|
interface GaugeChartRuntime {
|
|
380
380
|
chartJsConfig: GaugeChartConfiguration;
|
|
@@ -383,32 +383,40 @@ interface GaugeChartRuntime {
|
|
|
383
383
|
interface GaugeChartData extends Omit<ChartData, "datasets"> {
|
|
384
384
|
datasets: GaugeChartDataSets[];
|
|
385
385
|
}
|
|
386
|
-
interface GaugeChartDataSets extends
|
|
386
|
+
interface GaugeChartDataSets extends ChartDataset<"doughnut"> {
|
|
387
387
|
readonly minValue?: number;
|
|
388
388
|
readonly value?: number | undefined;
|
|
389
389
|
readonly backgroundColor?: string[];
|
|
390
390
|
}
|
|
391
391
|
interface GaugeChartOptions extends ChartOptions {
|
|
392
|
-
needle?:
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
392
|
+
needle?: NeedleOptions;
|
|
393
|
+
valueLabel?: ValueLabelOptions;
|
|
394
|
+
}
|
|
395
|
+
interface NeedleOptions {
|
|
396
|
+
display?: boolean;
|
|
397
|
+
borderColor?: Color;
|
|
398
|
+
backgroundColor?: Color;
|
|
399
|
+
/**
|
|
400
|
+
* Needle width as the percentage of the chart area width
|
|
401
|
+
*/
|
|
402
|
+
width?: number;
|
|
403
|
+
}
|
|
404
|
+
interface ValueLabelOptions {
|
|
405
|
+
display?: boolean;
|
|
406
|
+
formatter?: (value: any) => string;
|
|
407
|
+
font?: {
|
|
408
|
+
size?: number;
|
|
409
|
+
family?: string;
|
|
410
|
+
color?: Color;
|
|
397
411
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
top: number;
|
|
407
|
-
right: number;
|
|
408
|
-
bottom: number;
|
|
409
|
-
left: number;
|
|
410
|
-
};
|
|
411
|
-
bottomMarginPercentage: number;
|
|
412
|
+
backgroundColor?: Color;
|
|
413
|
+
borderColor?: Color;
|
|
414
|
+
borderRadius?: number;
|
|
415
|
+
padding?: {
|
|
416
|
+
left: number;
|
|
417
|
+
right: number;
|
|
418
|
+
top: number;
|
|
419
|
+
bottom: number;
|
|
412
420
|
};
|
|
413
421
|
}
|
|
414
422
|
|
|
@@ -7182,7 +7190,7 @@ declare function chartFontColor(backgroundColor: Color | undefined): Color;
|
|
|
7182
7190
|
/**
|
|
7183
7191
|
* Get a default chart js configuration
|
|
7184
7192
|
*/
|
|
7185
|
-
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): ChartConfiguration
|
|
7193
|
+
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): Required<ChartConfiguration>;
|
|
7186
7194
|
/** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
|
|
7187
7195
|
declare function getFillingMode(index: number): "origin" | number;
|
|
7188
7196
|
|