@odoo/o-spreadsheet 19.0.7 → 19.0.8

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.
@@ -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.7
6
- * @date 2025-10-23T08:19:01.764Z
7
- * @hash 1c1d1ec
5
+ * @version 19.0.8
6
+ * @date 2025-10-30T12:25:04.355Z
7
+ * @hash 559e4e5
8
8
  */
9
9
 
10
10
  'use strict';
@@ -6266,10 +6266,18 @@ function _roundFormat(internalFormat) {
6266
6266
  };
6267
6267
  }
6268
6268
  function humanizeNumber({ value, format }, locale) {
6269
- const numberFormat = formatLargeNumber({
6270
- value,
6271
- format,
6272
- }, undefined, locale);
6269
+ const numberValue = tryToNumber(value, locale);
6270
+ if (numberValue === undefined) {
6271
+ return "";
6272
+ }
6273
+ let numberFormat = format;
6274
+ if (Math.abs(numberValue) < 1000) {
6275
+ const hasDecimal = numberValue % 1 !== 0;
6276
+ numberFormat = !format && hasDecimal ? "0.####" : format;
6277
+ }
6278
+ else {
6279
+ numberFormat = formatLargeNumber({ value, format }, undefined, locale);
6280
+ }
6273
6281
  return formatValue(value, { format: numberFormat, locale });
6274
6282
  }
6275
6283
  function formatLargeNumber(arg, unit, locale) {
@@ -43995,8 +44003,10 @@ const LEGACY_VERSION_MAPPING = {
43995
44003
  17: "17.4",
43996
44004
  16: "17.3",
43997
44005
  15: "17.2",
44006
+ "14.5": "16.4.1",
43998
44007
  14: "16.4",
43999
44008
  13: "16.3",
44009
+ "12.5": "15.4.1",
44000
44010
  12: "15.4",
44001
44011
  // not accurate starting at this point
44002
44012
  11: "0.10",
@@ -54904,6 +54914,12 @@ class ChartHumanizeNumbers extends owl.Component {
54904
54914
  updateChart: Function,
54905
54915
  canUpdateChart: Function,
54906
54916
  };
54917
+ get title() {
54918
+ const locale = this.env.model.getters.getLocale();
54919
+ const format = formatLargeNumber({ value: 1234567 }, undefined, locale);
54920
+ const value = formatValue(1234567, { format, locale });
54921
+ return _t("E.g. 1234567 -> %(value)s", { value });
54922
+ }
54907
54923
  }
54908
54924
 
54909
54925
  class ChartLegend extends owl.Component {
@@ -55891,6 +55907,7 @@ class SunburstChartDesignPanel extends owl.Component {
55891
55907
  RoundColorPicker,
55892
55908
  ChartLegend,
55893
55909
  PieHoleSize,
55910
+ ChartHumanizeNumbers,
55894
55911
  };
55895
55912
  static props = {
55896
55913
  chartId: String,
@@ -56004,6 +56021,7 @@ class TreeMapChartDesignPanel extends owl.Component {
56004
56021
  BadgeSelection,
56005
56022
  TreeMapCategoryColors,
56006
56023
  TreeMapColorScale,
56024
+ ChartHumanizeNumbers,
56007
56025
  };
56008
56026
  static props = {
56009
56027
  chartId: String,
@@ -88936,6 +88954,6 @@ exports.tokenColors = tokenColors;
88936
88954
  exports.tokenize = tokenize;
88937
88955
 
88938
88956
 
88939
- __info__.version = "19.0.7";
88940
- __info__.date = "2025-10-23T08:19:01.764Z";
88941
- __info__.hash = "1c1d1ec";
88957
+ __info__.version = "19.0.8";
88958
+ __info__.date = "2025-10-30T12:25:04.355Z";
88959
+ __info__.hash = "559e4e5";
@@ -8330,6 +8330,7 @@ declare class ChartHumanizeNumbers extends Component<Props$19, SpreadsheetChildE
8330
8330
  updateChart: FunctionConstructor;
8331
8331
  canUpdateChart: FunctionConstructor;
8332
8332
  };
8333
+ get title(): string;
8333
8334
  }
8334
8335
 
8335
8336
  interface Props$18 {
@@ -11779,6 +11780,7 @@ declare class SunburstChartDesignPanel extends Component<Props$c, SpreadsheetChi
11779
11780
  RoundColorPicker: typeof RoundColorPicker;
11780
11781
  ChartLegend: typeof ChartLegend;
11781
11782
  PieHoleSize: typeof PieHoleSize;
11783
+ ChartHumanizeNumbers: typeof ChartHumanizeNumbers;
11782
11784
  };
11783
11785
  static props: {
11784
11786
  chartId: StringConstructor;
@@ -11864,6 +11866,7 @@ declare class TreeMapChartDesignPanel extends Component<Props$9, SpreadsheetChil
11864
11866
  BadgeSelection: typeof BadgeSelection;
11865
11867
  TreeMapCategoryColors: typeof TreeMapCategoryColors;
11866
11868
  TreeMapColorScale: typeof TreeMapColorScale;
11869
+ ChartHumanizeNumbers: typeof ChartHumanizeNumbers;
11867
11870
  };
11868
11871
  static props: {
11869
11872
  chartId: StringConstructor;
@@ -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.7
6
- * @date 2025-10-23T08:19:01.764Z
7
- * @hash 1c1d1ec
5
+ * @version 19.0.8
6
+ * @date 2025-10-30T12:25:04.355Z
7
+ * @hash 559e4e5
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';
@@ -6264,10 +6264,18 @@ function _roundFormat(internalFormat) {
6264
6264
  };
6265
6265
  }
6266
6266
  function humanizeNumber({ value, format }, locale) {
6267
- const numberFormat = formatLargeNumber({
6268
- value,
6269
- format,
6270
- }, undefined, locale);
6267
+ const numberValue = tryToNumber(value, locale);
6268
+ if (numberValue === undefined) {
6269
+ return "";
6270
+ }
6271
+ let numberFormat = format;
6272
+ if (Math.abs(numberValue) < 1000) {
6273
+ const hasDecimal = numberValue % 1 !== 0;
6274
+ numberFormat = !format && hasDecimal ? "0.####" : format;
6275
+ }
6276
+ else {
6277
+ numberFormat = formatLargeNumber({ value, format }, undefined, locale);
6278
+ }
6271
6279
  return formatValue(value, { format: numberFormat, locale });
6272
6280
  }
6273
6281
  function formatLargeNumber(arg, unit, locale) {
@@ -43993,8 +44001,10 @@ const LEGACY_VERSION_MAPPING = {
43993
44001
  17: "17.4",
43994
44002
  16: "17.3",
43995
44003
  15: "17.2",
44004
+ "14.5": "16.4.1",
43996
44005
  14: "16.4",
43997
44006
  13: "16.3",
44007
+ "12.5": "15.4.1",
43998
44008
  12: "15.4",
43999
44009
  // not accurate starting at this point
44000
44010
  11: "0.10",
@@ -54902,6 +54912,12 @@ class ChartHumanizeNumbers extends Component {
54902
54912
  updateChart: Function,
54903
54913
  canUpdateChart: Function,
54904
54914
  };
54915
+ get title() {
54916
+ const locale = this.env.model.getters.getLocale();
54917
+ const format = formatLargeNumber({ value: 1234567 }, undefined, locale);
54918
+ const value = formatValue(1234567, { format, locale });
54919
+ return _t("E.g. 1234567 -> %(value)s", { value });
54920
+ }
54905
54921
  }
54906
54922
 
54907
54923
  class ChartLegend extends Component {
@@ -55889,6 +55905,7 @@ class SunburstChartDesignPanel extends Component {
55889
55905
  RoundColorPicker,
55890
55906
  ChartLegend,
55891
55907
  PieHoleSize,
55908
+ ChartHumanizeNumbers,
55892
55909
  };
55893
55910
  static props = {
55894
55911
  chartId: String,
@@ -56002,6 +56019,7 @@ class TreeMapChartDesignPanel extends Component {
56002
56019
  BadgeSelection,
56003
56020
  TreeMapCategoryColors,
56004
56021
  TreeMapColorScale,
56022
+ ChartHumanizeNumbers,
56005
56023
  };
56006
56024
  static props = {
56007
56025
  chartId: String,
@@ -88884,6 +88902,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
88884
88902
  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 };
88885
88903
 
88886
88904
 
88887
- __info__.version = "19.0.7";
88888
- __info__.date = "2025-10-23T08:19:01.764Z";
88889
- __info__.hash = "1c1d1ec";
88905
+ __info__.version = "19.0.8";
88906
+ __info__.date = "2025-10-30T12:25:04.355Z";
88907
+ __info__.hash = "559e4e5";
@@ -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.7
6
- * @date 2025-10-23T08:19:01.764Z
7
- * @hash 1c1d1ec
5
+ * @version 19.0.8
6
+ * @date 2025-10-30T12:25:04.355Z
7
+ * @hash 559e4e5
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -6265,10 +6265,18 @@
6265
6265
  };
6266
6266
  }
6267
6267
  function humanizeNumber({ value, format }, locale) {
6268
- const numberFormat = formatLargeNumber({
6269
- value,
6270
- format,
6271
- }, undefined, locale);
6268
+ const numberValue = tryToNumber(value, locale);
6269
+ if (numberValue === undefined) {
6270
+ return "";
6271
+ }
6272
+ let numberFormat = format;
6273
+ if (Math.abs(numberValue) < 1000) {
6274
+ const hasDecimal = numberValue % 1 !== 0;
6275
+ numberFormat = !format && hasDecimal ? "0.####" : format;
6276
+ }
6277
+ else {
6278
+ numberFormat = formatLargeNumber({ value, format }, undefined, locale);
6279
+ }
6272
6280
  return formatValue(value, { format: numberFormat, locale });
6273
6281
  }
6274
6282
  function formatLargeNumber(arg, unit, locale) {
@@ -43994,8 +44002,10 @@ stores.inject(MyMetaStore, storeInstance);
43994
44002
  17: "17.4",
43995
44003
  16: "17.3",
43996
44004
  15: "17.2",
44005
+ "14.5": "16.4.1",
43997
44006
  14: "16.4",
43998
44007
  13: "16.3",
44008
+ "12.5": "15.4.1",
43999
44009
  12: "15.4",
44000
44010
  // not accurate starting at this point
44001
44011
  11: "0.10",
@@ -54903,6 +54913,12 @@ stores.inject(MyMetaStore, storeInstance);
54903
54913
  updateChart: Function,
54904
54914
  canUpdateChart: Function,
54905
54915
  };
54916
+ get title() {
54917
+ const locale = this.env.model.getters.getLocale();
54918
+ const format = formatLargeNumber({ value: 1234567 }, undefined, locale);
54919
+ const value = formatValue(1234567, { format, locale });
54920
+ return _t("E.g. 1234567 -> %(value)s", { value });
54921
+ }
54906
54922
  }
54907
54923
 
54908
54924
  class ChartLegend extends owl.Component {
@@ -55890,6 +55906,7 @@ stores.inject(MyMetaStore, storeInstance);
55890
55906
  RoundColorPicker,
55891
55907
  ChartLegend,
55892
55908
  PieHoleSize,
55909
+ ChartHumanizeNumbers,
55893
55910
  };
55894
55911
  static props = {
55895
55912
  chartId: String,
@@ -56003,6 +56020,7 @@ stores.inject(MyMetaStore, storeInstance);
56003
56020
  BadgeSelection,
56004
56021
  TreeMapCategoryColors,
56005
56022
  TreeMapColorScale,
56023
+ ChartHumanizeNumbers,
56006
56024
  };
56007
56025
  static props = {
56008
56026
  chartId: String,
@@ -88935,9 +88953,9 @@ stores.inject(MyMetaStore, storeInstance);
88935
88953
  exports.tokenize = tokenize;
88936
88954
 
88937
88955
 
88938
- __info__.version = "19.0.7";
88939
- __info__.date = "2025-10-23T08:19:01.764Z";
88940
- __info__.hash = "1c1d1ec";
88956
+ __info__.version = "19.0.8";
88957
+ __info__.date = "2025-10-30T12:25:04.355Z";
88958
+ __info__.hash = "559e4e5";
88941
88959
 
88942
88960
 
88943
88961
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);