@odoo/o-spreadsheet 19.0.0 → 19.0.1
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 +87 -40
- package/dist/o-spreadsheet.d.ts +22 -6
- package/dist/o-spreadsheet.esm.js +86 -41
- package/dist/o-spreadsheet.iife.js +87 -40
- package/dist/o-spreadsheet.iife.min.js +232 -232
- package/dist/o_spreadsheet.xml +9 -6
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.0.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.1
|
|
6
|
+
* @date 2025-09-11T08:45:47.109Z
|
|
7
|
+
* @hash bd79eea
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -24537,18 +24537,15 @@ function createScorecardChartRuntime(chart, getters) {
|
|
|
24537
24537
|
return {
|
|
24538
24538
|
title: {
|
|
24539
24539
|
...chart.title,
|
|
24540
|
-
|
|
24541
|
-
text: chart.title.text ? _t(chart.title.text) : "",
|
|
24540
|
+
text: chart.title.text ? getters.dynamicTranslate(chart.title.text) : "",
|
|
24542
24541
|
},
|
|
24543
24542
|
keyValue: formattedKeyValue,
|
|
24544
|
-
keyDescr: chart.keyDescr?.text
|
|
24545
|
-
? _t(chart.keyDescr.text) // descriptions are extracted from .json files and they are translated at runtime here
|
|
24546
|
-
: "",
|
|
24543
|
+
keyDescr: chart.keyDescr?.text ? getters.dynamicTranslate(chart.keyDescr.text) : "",
|
|
24547
24544
|
baselineDisplay,
|
|
24548
24545
|
baselineArrow: getBaselineArrowDirection(baselineCell, keyValueCell, chart.baselineMode),
|
|
24549
24546
|
baselineColor: getBaselineColor(baselineCell, chart.baselineMode, keyValueCell, chart.baselineColorUp, chart.baselineColorDown),
|
|
24550
24547
|
baselineDescr: chart.baselineMode !== "progress" && chart.baselineDescr?.text
|
|
24551
|
-
?
|
|
24548
|
+
? getters.dynamicTranslate(chart.baselineDescr.text)
|
|
24552
24549
|
: "",
|
|
24553
24550
|
fontColor,
|
|
24554
24551
|
background,
|
|
@@ -24848,9 +24845,8 @@ class ScorecardChart extends Component {
|
|
|
24848
24845
|
return this.env.model.getters.getChartRuntime(this.props.chartId);
|
|
24849
24846
|
}
|
|
24850
24847
|
get title() {
|
|
24851
|
-
const title = this.env.model.getters.getChartDefinition(this.props.chartId).title.text
|
|
24852
|
-
|
|
24853
|
-
return _t(title);
|
|
24848
|
+
const title = this.env.model.getters.getChartDefinition(this.props.chartId).title.text;
|
|
24849
|
+
return title ? this.env.model.getters.dynamicTranslate(title) : "";
|
|
24854
24850
|
}
|
|
24855
24851
|
setup() {
|
|
24856
24852
|
useEffect(this.createChart.bind(this), () => {
|
|
@@ -27023,12 +27019,12 @@ function getDatasetAxisId(definition, dataset) {
|
|
|
27023
27019
|
return axisId || "y";
|
|
27024
27020
|
}
|
|
27025
27021
|
|
|
27026
|
-
function getChartTitle(definition) {
|
|
27022
|
+
function getChartTitle(definition, getters) {
|
|
27027
27023
|
const chartTitle = definition.title;
|
|
27028
27024
|
const fontColor = chartMutedFontColor(definition.background);
|
|
27029
27025
|
return {
|
|
27030
27026
|
display: !!chartTitle.text,
|
|
27031
|
-
text:
|
|
27027
|
+
text: chartTitle.text ? getters.dynamicTranslate(chartTitle.text) : "",
|
|
27032
27028
|
color: chartTitle?.color ?? fontColor,
|
|
27033
27029
|
align: chartTitle.align === "center" ? "center" : chartTitle.align === "right" ? "end" : "start",
|
|
27034
27030
|
font: {
|
|
@@ -27596,7 +27592,7 @@ function createBarChartRuntime(chart, getters) {
|
|
|
27596
27592
|
layout: getChartLayout(definition, chartData),
|
|
27597
27593
|
scales: getBarChartScales(definition, chartData),
|
|
27598
27594
|
plugins: {
|
|
27599
|
-
title: getChartTitle(definition),
|
|
27595
|
+
title: getChartTitle(definition, getters),
|
|
27600
27596
|
legend: getBarChartLegend(definition),
|
|
27601
27597
|
tooltip: getBarChartTooltip(definition, chartData),
|
|
27602
27598
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -28827,7 +28823,7 @@ function createComboChartRuntime(chart, getters) {
|
|
|
28827
28823
|
layout: getChartLayout(definition, chartData),
|
|
28828
28824
|
scales: getBarChartScales(definition, chartData),
|
|
28829
28825
|
plugins: {
|
|
28830
|
-
title: getChartTitle(definition),
|
|
28826
|
+
title: getChartTitle(definition, getters),
|
|
28831
28827
|
legend: getComboChartLegend(definition),
|
|
28832
28828
|
tooltip: getBarChartTooltip(definition, chartData),
|
|
28833
28829
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -28973,7 +28969,7 @@ function createFunnelChartRuntime(chart, getters) {
|
|
|
28973
28969
|
layout: getChartLayout(definition, chartData),
|
|
28974
28970
|
scales: getFunnelChartScales(definition, chartData),
|
|
28975
28971
|
plugins: {
|
|
28976
|
-
title: getChartTitle(definition),
|
|
28972
|
+
title: getChartTitle(definition, getters),
|
|
28977
28973
|
legend: { display: false },
|
|
28978
28974
|
tooltip: getFunnelChartTooltip(definition, chartData),
|
|
28979
28975
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -29210,8 +29206,7 @@ function createGaugeChartRuntime(chart, getters) {
|
|
|
29210
29206
|
background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
|
|
29211
29207
|
title: {
|
|
29212
29208
|
...chart.title,
|
|
29213
|
-
|
|
29214
|
-
text: _t(chart.title.text ?? ""),
|
|
29209
|
+
text: chart.title.text ? getters.dynamicTranslate(chart.title.text) : "",
|
|
29215
29210
|
},
|
|
29216
29211
|
minValue: {
|
|
29217
29212
|
value: minValue,
|
|
@@ -29395,7 +29390,7 @@ function createGeoChartRuntime(chart, getters) {
|
|
|
29395
29390
|
layout: getChartLayout(definition, chartData),
|
|
29396
29391
|
scales: getGeoChartScales(definition, chartData),
|
|
29397
29392
|
plugins: {
|
|
29398
|
-
title: getChartTitle(definition),
|
|
29393
|
+
title: getChartTitle(definition, getters),
|
|
29399
29394
|
tooltip: getGeoChartTooltip(definition, chartData),
|
|
29400
29395
|
legend: { display: false },
|
|
29401
29396
|
},
|
|
@@ -29560,7 +29555,7 @@ function createLineChartRuntime(chart, getters) {
|
|
|
29560
29555
|
layout: getChartLayout(definition, chartData),
|
|
29561
29556
|
scales: getLineChartScales(definition, chartData),
|
|
29562
29557
|
plugins: {
|
|
29563
|
-
title: getChartTitle(definition),
|
|
29558
|
+
title: getChartTitle(definition, getters),
|
|
29564
29559
|
legend: getLineChartLegend(definition),
|
|
29565
29560
|
tooltip: getLineChartTooltip(definition, chartData),
|
|
29566
29561
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -29697,7 +29692,7 @@ function createPieChartRuntime(chart, getters) {
|
|
|
29697
29692
|
: undefined,
|
|
29698
29693
|
layout: getChartLayout(definition, chartData),
|
|
29699
29694
|
plugins: {
|
|
29700
|
-
title: getChartTitle(definition),
|
|
29695
|
+
title: getChartTitle(definition, getters),
|
|
29701
29696
|
legend: getPieChartLegend(definition, chartData),
|
|
29702
29697
|
tooltip: getPieChartTooltip(definition, chartData),
|
|
29703
29698
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -29851,7 +29846,7 @@ function createPyramidChartRuntime(chart, getters) {
|
|
|
29851
29846
|
layout: getChartLayout(definition, chartData),
|
|
29852
29847
|
scales: getPyramidChartScales(definition, chartData),
|
|
29853
29848
|
plugins: {
|
|
29854
|
-
title: getChartTitle(definition),
|
|
29849
|
+
title: getChartTitle(definition, getters),
|
|
29855
29850
|
legend: getBarChartLegend(definition),
|
|
29856
29851
|
tooltip: getPyramidChartTooltip(definition, chartData),
|
|
29857
29852
|
chartShowValuesPlugin: getPyramidChartShowValues(definition, chartData),
|
|
@@ -30000,7 +29995,7 @@ function createRadarChartRuntime(chart, getters) {
|
|
|
30000
29995
|
layout: getChartLayout(definition, chartData),
|
|
30001
29996
|
scales: getRadarChartScales(definition, chartData),
|
|
30002
29997
|
plugins: {
|
|
30003
|
-
title: getChartTitle(definition),
|
|
29998
|
+
title: getChartTitle(definition, getters),
|
|
30004
29999
|
legend: getRadarChartLegend(definition),
|
|
30005
30000
|
tooltip: getRadarChartTooltip(definition, chartData),
|
|
30006
30001
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -30155,7 +30150,7 @@ function createScatterChartRuntime(chart, getters) {
|
|
|
30155
30150
|
layout: getChartLayout(definition, chartData),
|
|
30156
30151
|
scales: getScatterChartScales(definition, chartData),
|
|
30157
30152
|
plugins: {
|
|
30158
|
-
title: getChartTitle(definition),
|
|
30153
|
+
title: getChartTitle(definition, getters),
|
|
30159
30154
|
legend: getScatterChartLegend(definition),
|
|
30160
30155
|
tooltip: getLineChartTooltip(definition, chartData),
|
|
30161
30156
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -30294,7 +30289,7 @@ function createSunburstChartRuntime(chart, getters) {
|
|
|
30294
30289
|
...CHART_COMMON_OPTIONS,
|
|
30295
30290
|
layout: getChartLayout(definition, chartData),
|
|
30296
30291
|
plugins: {
|
|
30297
|
-
title: getChartTitle(definition),
|
|
30292
|
+
title: getChartTitle(definition, getters),
|
|
30298
30293
|
legend: getSunburstChartLegend(definition),
|
|
30299
30294
|
tooltip: getSunburstChartTooltip(definition, chartData),
|
|
30300
30295
|
sunburstLabelsPlugin: getSunburstShowValues(definition, chartData),
|
|
@@ -30444,7 +30439,7 @@ function createTreeMapChartRuntime(chart, getters) {
|
|
|
30444
30439
|
...CHART_COMMON_OPTIONS,
|
|
30445
30440
|
layout: getChartLayout(definition, chartData),
|
|
30446
30441
|
plugins: {
|
|
30447
|
-
title: getChartTitle(definition),
|
|
30442
|
+
title: getChartTitle(definition, getters),
|
|
30448
30443
|
legend: { display: false },
|
|
30449
30444
|
tooltip: getTreeMapChartTooltip(definition, chartData),
|
|
30450
30445
|
},
|
|
@@ -30607,7 +30602,7 @@ function createWaterfallChartRuntime(chart, getters) {
|
|
|
30607
30602
|
layout: getChartLayout(definition, chartData),
|
|
30608
30603
|
scales: getWaterfallChartScales(definition, chartData),
|
|
30609
30604
|
plugins: {
|
|
30610
|
-
title: getChartTitle(definition),
|
|
30605
|
+
title: getChartTitle(definition, getters),
|
|
30611
30606
|
legend: getWaterfallChartLegend(definition),
|
|
30612
30607
|
tooltip: getWaterfallChartTooltip(definition, chartData),
|
|
30613
30608
|
chartShowValuesPlugin: getWaterfallChartShowValues(definition, chartData),
|
|
@@ -39326,6 +39321,14 @@ function getCaretDownSvg(color) {
|
|
|
39326
39321
|
paths: [{ fillColor: color.textColor || TEXT_BODY_MUTED, path: "M120 195 h270 l-135 130" }],
|
|
39327
39322
|
};
|
|
39328
39323
|
}
|
|
39324
|
+
function getCaretUpSvg(color) {
|
|
39325
|
+
return {
|
|
39326
|
+
name: "CARET_UP",
|
|
39327
|
+
width: 512,
|
|
39328
|
+
height: 512,
|
|
39329
|
+
paths: [{ fillColor: color.textColor || TEXT_BODY_MUTED, path: "M120 325 h270 l-135 -130" }],
|
|
39330
|
+
};
|
|
39331
|
+
}
|
|
39329
39332
|
function getHoveredCaretDownSvg(color) {
|
|
39330
39333
|
return {
|
|
39331
39334
|
name: "CARET_DOWN",
|
|
@@ -55634,7 +55637,7 @@ class ScorecardChartDesignPanel extends Component {
|
|
|
55634
55637
|
return SCORECARD_CHART_TITLE_FONT_SIZE;
|
|
55635
55638
|
}
|
|
55636
55639
|
translate(term) {
|
|
55637
|
-
return
|
|
55640
|
+
return this.env.model.getters.dynamicTranslate(term);
|
|
55638
55641
|
}
|
|
55639
55642
|
setColor(color, colorPickerId) {
|
|
55640
55643
|
switch (colorPickerId) {
|
|
@@ -57186,7 +57189,7 @@ class CustomCurrencyPanel extends Component {
|
|
|
57186
57189
|
});
|
|
57187
57190
|
}
|
|
57188
57191
|
const emptyCurrency = {
|
|
57189
|
-
name:
|
|
57192
|
+
name: CustomCurrencyTerms.Custom,
|
|
57190
57193
|
code: "",
|
|
57191
57194
|
symbol: "",
|
|
57192
57195
|
decimalPlaces: 2,
|
|
@@ -61443,14 +61446,16 @@ class ClickableCellSortIcon extends Component {
|
|
|
61443
61446
|
"background-color": this.getBackgroundColor(cellStyle),
|
|
61444
61447
|
});
|
|
61445
61448
|
}
|
|
61446
|
-
get
|
|
61447
|
-
|
|
61448
|
-
|
|
61449
|
-
|
|
61450
|
-
|
|
61451
|
-
|
|
61449
|
+
get verticalJustifyClass() {
|
|
61450
|
+
const cellStyle = this.env.model.getters.getCellComputedStyle(this.props.position);
|
|
61451
|
+
switch (cellStyle.verticalAlign) {
|
|
61452
|
+
case "top":
|
|
61453
|
+
return "justify-content-start";
|
|
61454
|
+
case "middle":
|
|
61455
|
+
return "justify-content-center";
|
|
61456
|
+
case "bottom":
|
|
61452
61457
|
default:
|
|
61453
|
-
return "
|
|
61458
|
+
return "justify-content-end";
|
|
61454
61459
|
}
|
|
61455
61460
|
}
|
|
61456
61461
|
getBackgroundColor(cellStyle) {
|
|
@@ -70651,6 +70656,30 @@ function togglePivotCollapse(position, env) {
|
|
|
70651
70656
|
pivot: { ...definition, collapsedDomains: newDomains },
|
|
70652
70657
|
});
|
|
70653
70658
|
}
|
|
70659
|
+
iconsOnCellRegistry.add("pivot_dashboard_sorting", (getters, position) => {
|
|
70660
|
+
if (!getters.isDashboard()) {
|
|
70661
|
+
return undefined;
|
|
70662
|
+
}
|
|
70663
|
+
const pivotCell = getters.getPivotCellFromPosition(position);
|
|
70664
|
+
if (pivotCell.type !== "MEASURE_HEADER") {
|
|
70665
|
+
return undefined;
|
|
70666
|
+
}
|
|
70667
|
+
const sortDirection = getters.getPivotCellSortDirection(position);
|
|
70668
|
+
if (sortDirection !== "asc" && sortDirection !== "desc") {
|
|
70669
|
+
return undefined;
|
|
70670
|
+
}
|
|
70671
|
+
const cellStyle = getters.getCellComputedStyle(position);
|
|
70672
|
+
return {
|
|
70673
|
+
type: `pivot_dashboard_sorting_${sortDirection}`,
|
|
70674
|
+
priority: 5,
|
|
70675
|
+
horizontalAlign: "right",
|
|
70676
|
+
size: GRID_ICON_EDGE_LENGTH,
|
|
70677
|
+
margin: GRID_ICON_MARGIN,
|
|
70678
|
+
svg: sortDirection === "asc" ? getCaretUpSvg(cellStyle) : getCaretDownSvg(cellStyle),
|
|
70679
|
+
position,
|
|
70680
|
+
onClick: undefined, // click is managed by ClickableCellSortIcon
|
|
70681
|
+
};
|
|
70682
|
+
});
|
|
70654
70683
|
|
|
70655
70684
|
class CellIconPlugin extends CoreViewPlugin {
|
|
70656
70685
|
static getters = ["doesCellHaveGridIcon", "getCellIcons", "getCellIconRect"];
|
|
@@ -75547,6 +75576,21 @@ class DataValidationInsertionPlugin extends UIPlugin {
|
|
|
75547
75576
|
}
|
|
75548
75577
|
}
|
|
75549
75578
|
|
|
75579
|
+
/**
|
|
75580
|
+
* This plugin provides dynamic translation getter. In o-spreadsheet, it has
|
|
75581
|
+
* no implementation, but this plugin can be replaced by another one to provide
|
|
75582
|
+
* a real implementation.
|
|
75583
|
+
*
|
|
75584
|
+
* For example, in Odoo, the plugin is replaced by a plugin that used the
|
|
75585
|
+
* module namespace to dynamically translate terms.
|
|
75586
|
+
*/
|
|
75587
|
+
class DynamicTranslate extends UIPlugin {
|
|
75588
|
+
static getters = ["dynamicTranslate"];
|
|
75589
|
+
dynamicTranslate(term) {
|
|
75590
|
+
return term;
|
|
75591
|
+
}
|
|
75592
|
+
}
|
|
75593
|
+
|
|
75550
75594
|
const genericRepeatsTransforms = [
|
|
75551
75595
|
repeatSheetDependantCommand,
|
|
75552
75596
|
repeatTargetDependantCommand,
|
|
@@ -79178,6 +79222,7 @@ const featurePluginRegistry = new Registry()
|
|
|
79178
79222
|
.add("table_ui_resize", TableResizeUI)
|
|
79179
79223
|
.add("datavalidation_insert", DataValidationInsertionPlugin)
|
|
79180
79224
|
.add("checkbox_toggle", CheckboxTogglePlugin)
|
|
79225
|
+
.add("dynamic_translate", DynamicTranslate)
|
|
79181
79226
|
.add("geo_features", GeoFeaturePlugin);
|
|
79182
79227
|
// Plugins which have a state, but which should not be shared in collaborative
|
|
79183
79228
|
const statefulUIPluginRegistry = new Registry()
|
|
@@ -88357,9 +88402,9 @@ const constants = {
|
|
|
88357
88402
|
};
|
|
88358
88403
|
const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
88359
88404
|
|
|
88360
|
-
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
88405
|
+
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
88361
88406
|
|
|
88362
88407
|
|
|
88363
|
-
__info__.version = "19.0.
|
|
88364
|
-
__info__.date = "2025-09-
|
|
88365
|
-
__info__.hash = "
|
|
88408
|
+
__info__.version = "19.0.1";
|
|
88409
|
+
__info__.date = "2025-09-11T08:45:47.109Z";
|
|
88410
|
+
__info__.hash = "bd79eea";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.0.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.1
|
|
6
|
+
* @date 2025-09-11T08:45:47.109Z
|
|
7
|
+
* @hash bd79eea
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -24538,18 +24538,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24538
24538
|
return {
|
|
24539
24539
|
title: {
|
|
24540
24540
|
...chart.title,
|
|
24541
|
-
|
|
24542
|
-
text: chart.title.text ? _t(chart.title.text) : "",
|
|
24541
|
+
text: chart.title.text ? getters.dynamicTranslate(chart.title.text) : "",
|
|
24543
24542
|
},
|
|
24544
24543
|
keyValue: formattedKeyValue,
|
|
24545
|
-
keyDescr: chart.keyDescr?.text
|
|
24546
|
-
? _t(chart.keyDescr.text) // descriptions are extracted from .json files and they are translated at runtime here
|
|
24547
|
-
: "",
|
|
24544
|
+
keyDescr: chart.keyDescr?.text ? getters.dynamicTranslate(chart.keyDescr.text) : "",
|
|
24548
24545
|
baselineDisplay,
|
|
24549
24546
|
baselineArrow: getBaselineArrowDirection(baselineCell, keyValueCell, chart.baselineMode),
|
|
24550
24547
|
baselineColor: getBaselineColor(baselineCell, chart.baselineMode, keyValueCell, chart.baselineColorUp, chart.baselineColorDown),
|
|
24551
24548
|
baselineDescr: chart.baselineMode !== "progress" && chart.baselineDescr?.text
|
|
24552
|
-
?
|
|
24549
|
+
? getters.dynamicTranslate(chart.baselineDescr.text)
|
|
24553
24550
|
: "",
|
|
24554
24551
|
fontColor,
|
|
24555
24552
|
background,
|
|
@@ -24849,9 +24846,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24849
24846
|
return this.env.model.getters.getChartRuntime(this.props.chartId);
|
|
24850
24847
|
}
|
|
24851
24848
|
get title() {
|
|
24852
|
-
const title = this.env.model.getters.getChartDefinition(this.props.chartId).title.text
|
|
24853
|
-
|
|
24854
|
-
return _t(title);
|
|
24849
|
+
const title = this.env.model.getters.getChartDefinition(this.props.chartId).title.text;
|
|
24850
|
+
return title ? this.env.model.getters.dynamicTranslate(title) : "";
|
|
24855
24851
|
}
|
|
24856
24852
|
setup() {
|
|
24857
24853
|
owl.useEffect(this.createChart.bind(this), () => {
|
|
@@ -27024,12 +27020,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
27024
27020
|
return axisId || "y";
|
|
27025
27021
|
}
|
|
27026
27022
|
|
|
27027
|
-
function getChartTitle(definition) {
|
|
27023
|
+
function getChartTitle(definition, getters) {
|
|
27028
27024
|
const chartTitle = definition.title;
|
|
27029
27025
|
const fontColor = chartMutedFontColor(definition.background);
|
|
27030
27026
|
return {
|
|
27031
27027
|
display: !!chartTitle.text,
|
|
27032
|
-
text:
|
|
27028
|
+
text: chartTitle.text ? getters.dynamicTranslate(chartTitle.text) : "",
|
|
27033
27029
|
color: chartTitle?.color ?? fontColor,
|
|
27034
27030
|
align: chartTitle.align === "center" ? "center" : chartTitle.align === "right" ? "end" : "start",
|
|
27035
27031
|
font: {
|
|
@@ -27597,7 +27593,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
27597
27593
|
layout: getChartLayout(definition, chartData),
|
|
27598
27594
|
scales: getBarChartScales(definition, chartData),
|
|
27599
27595
|
plugins: {
|
|
27600
|
-
title: getChartTitle(definition),
|
|
27596
|
+
title: getChartTitle(definition, getters),
|
|
27601
27597
|
legend: getBarChartLegend(definition),
|
|
27602
27598
|
tooltip: getBarChartTooltip(definition, chartData),
|
|
27603
27599
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -28828,7 +28824,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28828
28824
|
layout: getChartLayout(definition, chartData),
|
|
28829
28825
|
scales: getBarChartScales(definition, chartData),
|
|
28830
28826
|
plugins: {
|
|
28831
|
-
title: getChartTitle(definition),
|
|
28827
|
+
title: getChartTitle(definition, getters),
|
|
28832
28828
|
legend: getComboChartLegend(definition),
|
|
28833
28829
|
tooltip: getBarChartTooltip(definition, chartData),
|
|
28834
28830
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -28974,7 +28970,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28974
28970
|
layout: getChartLayout(definition, chartData),
|
|
28975
28971
|
scales: getFunnelChartScales(definition, chartData),
|
|
28976
28972
|
plugins: {
|
|
28977
|
-
title: getChartTitle(definition),
|
|
28973
|
+
title: getChartTitle(definition, getters),
|
|
28978
28974
|
legend: { display: false },
|
|
28979
28975
|
tooltip: getFunnelChartTooltip(definition, chartData),
|
|
28980
28976
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -29211,8 +29207,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29211
29207
|
background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
|
|
29212
29208
|
title: {
|
|
29213
29209
|
...chart.title,
|
|
29214
|
-
|
|
29215
|
-
text: _t(chart.title.text ?? ""),
|
|
29210
|
+
text: chart.title.text ? getters.dynamicTranslate(chart.title.text) : "",
|
|
29216
29211
|
},
|
|
29217
29212
|
minValue: {
|
|
29218
29213
|
value: minValue,
|
|
@@ -29396,7 +29391,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29396
29391
|
layout: getChartLayout(definition, chartData),
|
|
29397
29392
|
scales: getGeoChartScales(definition, chartData),
|
|
29398
29393
|
plugins: {
|
|
29399
|
-
title: getChartTitle(definition),
|
|
29394
|
+
title: getChartTitle(definition, getters),
|
|
29400
29395
|
tooltip: getGeoChartTooltip(definition, chartData),
|
|
29401
29396
|
legend: { display: false },
|
|
29402
29397
|
},
|
|
@@ -29561,7 +29556,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29561
29556
|
layout: getChartLayout(definition, chartData),
|
|
29562
29557
|
scales: getLineChartScales(definition, chartData),
|
|
29563
29558
|
plugins: {
|
|
29564
|
-
title: getChartTitle(definition),
|
|
29559
|
+
title: getChartTitle(definition, getters),
|
|
29565
29560
|
legend: getLineChartLegend(definition),
|
|
29566
29561
|
tooltip: getLineChartTooltip(definition, chartData),
|
|
29567
29562
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -29698,7 +29693,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29698
29693
|
: undefined,
|
|
29699
29694
|
layout: getChartLayout(definition, chartData),
|
|
29700
29695
|
plugins: {
|
|
29701
|
-
title: getChartTitle(definition),
|
|
29696
|
+
title: getChartTitle(definition, getters),
|
|
29702
29697
|
legend: getPieChartLegend(definition, chartData),
|
|
29703
29698
|
tooltip: getPieChartTooltip(definition, chartData),
|
|
29704
29699
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -29852,7 +29847,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29852
29847
|
layout: getChartLayout(definition, chartData),
|
|
29853
29848
|
scales: getPyramidChartScales(definition, chartData),
|
|
29854
29849
|
plugins: {
|
|
29855
|
-
title: getChartTitle(definition),
|
|
29850
|
+
title: getChartTitle(definition, getters),
|
|
29856
29851
|
legend: getBarChartLegend(definition),
|
|
29857
29852
|
tooltip: getPyramidChartTooltip(definition, chartData),
|
|
29858
29853
|
chartShowValuesPlugin: getPyramidChartShowValues(definition, chartData),
|
|
@@ -30001,7 +29996,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30001
29996
|
layout: getChartLayout(definition, chartData),
|
|
30002
29997
|
scales: getRadarChartScales(definition, chartData),
|
|
30003
29998
|
plugins: {
|
|
30004
|
-
title: getChartTitle(definition),
|
|
29999
|
+
title: getChartTitle(definition, getters),
|
|
30005
30000
|
legend: getRadarChartLegend(definition),
|
|
30006
30001
|
tooltip: getRadarChartTooltip(definition, chartData),
|
|
30007
30002
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -30156,7 +30151,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30156
30151
|
layout: getChartLayout(definition, chartData),
|
|
30157
30152
|
scales: getScatterChartScales(definition, chartData),
|
|
30158
30153
|
plugins: {
|
|
30159
|
-
title: getChartTitle(definition),
|
|
30154
|
+
title: getChartTitle(definition, getters),
|
|
30160
30155
|
legend: getScatterChartLegend(definition),
|
|
30161
30156
|
tooltip: getLineChartTooltip(definition, chartData),
|
|
30162
30157
|
chartShowValuesPlugin: getChartShowValues(definition, chartData),
|
|
@@ -30295,7 +30290,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30295
30290
|
...CHART_COMMON_OPTIONS,
|
|
30296
30291
|
layout: getChartLayout(definition, chartData),
|
|
30297
30292
|
plugins: {
|
|
30298
|
-
title: getChartTitle(definition),
|
|
30293
|
+
title: getChartTitle(definition, getters),
|
|
30299
30294
|
legend: getSunburstChartLegend(definition),
|
|
30300
30295
|
tooltip: getSunburstChartTooltip(definition, chartData),
|
|
30301
30296
|
sunburstLabelsPlugin: getSunburstShowValues(definition, chartData),
|
|
@@ -30445,7 +30440,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30445
30440
|
...CHART_COMMON_OPTIONS,
|
|
30446
30441
|
layout: getChartLayout(definition, chartData),
|
|
30447
30442
|
plugins: {
|
|
30448
|
-
title: getChartTitle(definition),
|
|
30443
|
+
title: getChartTitle(definition, getters),
|
|
30449
30444
|
legend: { display: false },
|
|
30450
30445
|
tooltip: getTreeMapChartTooltip(definition, chartData),
|
|
30451
30446
|
},
|
|
@@ -30608,7 +30603,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30608
30603
|
layout: getChartLayout(definition, chartData),
|
|
30609
30604
|
scales: getWaterfallChartScales(definition, chartData),
|
|
30610
30605
|
plugins: {
|
|
30611
|
-
title: getChartTitle(definition),
|
|
30606
|
+
title: getChartTitle(definition, getters),
|
|
30612
30607
|
legend: getWaterfallChartLegend(definition),
|
|
30613
30608
|
tooltip: getWaterfallChartTooltip(definition, chartData),
|
|
30614
30609
|
chartShowValuesPlugin: getWaterfallChartShowValues(definition, chartData),
|
|
@@ -39327,6 +39322,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
39327
39322
|
paths: [{ fillColor: color.textColor || TEXT_BODY_MUTED, path: "M120 195 h270 l-135 130" }],
|
|
39328
39323
|
};
|
|
39329
39324
|
}
|
|
39325
|
+
function getCaretUpSvg(color) {
|
|
39326
|
+
return {
|
|
39327
|
+
name: "CARET_UP",
|
|
39328
|
+
width: 512,
|
|
39329
|
+
height: 512,
|
|
39330
|
+
paths: [{ fillColor: color.textColor || TEXT_BODY_MUTED, path: "M120 325 h270 l-135 -130" }],
|
|
39331
|
+
};
|
|
39332
|
+
}
|
|
39330
39333
|
function getHoveredCaretDownSvg(color) {
|
|
39331
39334
|
return {
|
|
39332
39335
|
name: "CARET_DOWN",
|
|
@@ -55635,7 +55638,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55635
55638
|
return SCORECARD_CHART_TITLE_FONT_SIZE;
|
|
55636
55639
|
}
|
|
55637
55640
|
translate(term) {
|
|
55638
|
-
return
|
|
55641
|
+
return this.env.model.getters.dynamicTranslate(term);
|
|
55639
55642
|
}
|
|
55640
55643
|
setColor(color, colorPickerId) {
|
|
55641
55644
|
switch (colorPickerId) {
|
|
@@ -57187,7 +57190,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57187
57190
|
});
|
|
57188
57191
|
}
|
|
57189
57192
|
const emptyCurrency = {
|
|
57190
|
-
name:
|
|
57193
|
+
name: CustomCurrencyTerms.Custom,
|
|
57191
57194
|
code: "",
|
|
57192
57195
|
symbol: "",
|
|
57193
57196
|
decimalPlaces: 2,
|
|
@@ -61444,14 +61447,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61444
61447
|
"background-color": this.getBackgroundColor(cellStyle),
|
|
61445
61448
|
});
|
|
61446
61449
|
}
|
|
61447
|
-
get
|
|
61448
|
-
|
|
61449
|
-
|
|
61450
|
-
|
|
61451
|
-
|
|
61452
|
-
|
|
61450
|
+
get verticalJustifyClass() {
|
|
61451
|
+
const cellStyle = this.env.model.getters.getCellComputedStyle(this.props.position);
|
|
61452
|
+
switch (cellStyle.verticalAlign) {
|
|
61453
|
+
case "top":
|
|
61454
|
+
return "justify-content-start";
|
|
61455
|
+
case "middle":
|
|
61456
|
+
return "justify-content-center";
|
|
61457
|
+
case "bottom":
|
|
61453
61458
|
default:
|
|
61454
|
-
return "
|
|
61459
|
+
return "justify-content-end";
|
|
61455
61460
|
}
|
|
61456
61461
|
}
|
|
61457
61462
|
getBackgroundColor(cellStyle) {
|
|
@@ -70652,6 +70657,30 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
70652
70657
|
pivot: { ...definition, collapsedDomains: newDomains },
|
|
70653
70658
|
});
|
|
70654
70659
|
}
|
|
70660
|
+
iconsOnCellRegistry.add("pivot_dashboard_sorting", (getters, position) => {
|
|
70661
|
+
if (!getters.isDashboard()) {
|
|
70662
|
+
return undefined;
|
|
70663
|
+
}
|
|
70664
|
+
const pivotCell = getters.getPivotCellFromPosition(position);
|
|
70665
|
+
if (pivotCell.type !== "MEASURE_HEADER") {
|
|
70666
|
+
return undefined;
|
|
70667
|
+
}
|
|
70668
|
+
const sortDirection = getters.getPivotCellSortDirection(position);
|
|
70669
|
+
if (sortDirection !== "asc" && sortDirection !== "desc") {
|
|
70670
|
+
return undefined;
|
|
70671
|
+
}
|
|
70672
|
+
const cellStyle = getters.getCellComputedStyle(position);
|
|
70673
|
+
return {
|
|
70674
|
+
type: `pivot_dashboard_sorting_${sortDirection}`,
|
|
70675
|
+
priority: 5,
|
|
70676
|
+
horizontalAlign: "right",
|
|
70677
|
+
size: GRID_ICON_EDGE_LENGTH,
|
|
70678
|
+
margin: GRID_ICON_MARGIN,
|
|
70679
|
+
svg: sortDirection === "asc" ? getCaretUpSvg(cellStyle) : getCaretDownSvg(cellStyle),
|
|
70680
|
+
position,
|
|
70681
|
+
onClick: undefined, // click is managed by ClickableCellSortIcon
|
|
70682
|
+
};
|
|
70683
|
+
});
|
|
70655
70684
|
|
|
70656
70685
|
class CellIconPlugin extends CoreViewPlugin {
|
|
70657
70686
|
static getters = ["doesCellHaveGridIcon", "getCellIcons", "getCellIconRect"];
|
|
@@ -75548,6 +75577,21 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
75548
75577
|
}
|
|
75549
75578
|
}
|
|
75550
75579
|
|
|
75580
|
+
/**
|
|
75581
|
+
* This plugin provides dynamic translation getter. In o-spreadsheet, it has
|
|
75582
|
+
* no implementation, but this plugin can be replaced by another one to provide
|
|
75583
|
+
* a real implementation.
|
|
75584
|
+
*
|
|
75585
|
+
* For example, in Odoo, the plugin is replaced by a plugin that used the
|
|
75586
|
+
* module namespace to dynamically translate terms.
|
|
75587
|
+
*/
|
|
75588
|
+
class DynamicTranslate extends UIPlugin {
|
|
75589
|
+
static getters = ["dynamicTranslate"];
|
|
75590
|
+
dynamicTranslate(term) {
|
|
75591
|
+
return term;
|
|
75592
|
+
}
|
|
75593
|
+
}
|
|
75594
|
+
|
|
75551
75595
|
const genericRepeatsTransforms = [
|
|
75552
75596
|
repeatSheetDependantCommand,
|
|
75553
75597
|
repeatTargetDependantCommand,
|
|
@@ -79179,6 +79223,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
79179
79223
|
.add("table_ui_resize", TableResizeUI)
|
|
79180
79224
|
.add("datavalidation_insert", DataValidationInsertionPlugin)
|
|
79181
79225
|
.add("checkbox_toggle", CheckboxTogglePlugin)
|
|
79226
|
+
.add("dynamic_translate", DynamicTranslate)
|
|
79182
79227
|
.add("geo_features", GeoFeaturePlugin);
|
|
79183
79228
|
// Plugins which have a state, but which should not be shared in collaborative
|
|
79184
79229
|
const statefulUIPluginRegistry = new Registry()
|
|
@@ -88389,6 +88434,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
88389
88434
|
exports.coreTypes = coreTypes;
|
|
88390
88435
|
exports.findCellInNewZone = findCellInNewZone;
|
|
88391
88436
|
exports.functionCache = functionCache;
|
|
88437
|
+
exports.getCaretDownSvg = getCaretDownSvg;
|
|
88438
|
+
exports.getCaretUpSvg = getCaretUpSvg;
|
|
88392
88439
|
exports.helpers = helpers;
|
|
88393
88440
|
exports.hooks = hooks;
|
|
88394
88441
|
exports.invalidateCFEvaluationCommands = invalidateCFEvaluationCommands;
|
|
@@ -88409,9 +88456,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
88409
88456
|
exports.tokenize = tokenize;
|
|
88410
88457
|
|
|
88411
88458
|
|
|
88412
|
-
__info__.version = "19.0.
|
|
88413
|
-
__info__.date = "2025-09-
|
|
88414
|
-
__info__.hash = "
|
|
88459
|
+
__info__.version = "19.0.1";
|
|
88460
|
+
__info__.date = "2025-09-11T08:45:47.109Z";
|
|
88461
|
+
__info__.hash = "bd79eea";
|
|
88415
88462
|
|
|
88416
88463
|
|
|
88417
88464
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|