@odoo/o-spreadsheet 19.1.34 → 19.1.35

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.1.34
6
- * @date 2026-09-04T07:25:45.601Z
7
- * @hash b709c26
5
+ * @version 19.1.35
6
+ * @date 2026-09-10T05:36:17.404Z
7
+ * @hash 619eeac
8
8
  */
9
9
  :root {
10
10
  --os-gray-100: light-dark(#f9fafb, #1b1d26);
@@ -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.1.34
6
- * @date 2026-09-04T07:25:44.071Z
7
- * @hash b709c26
5
+ * @version 19.1.35
6
+ * @date 2026-09-10T05:36:15.885Z
7
+ * @hash 619eeac
8
8
  */
9
9
 
10
10
  import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, whenReady, xml } from "@odoo/owl";
@@ -8296,7 +8296,7 @@ function drawLineOrBarOrRadarChartValues(chart, options, ctx) {
8296
8296
  const point = dataset.data[i];
8297
8297
  const xPosition = point.x;
8298
8298
  let yPosition = 0;
8299
- if (chart.config.type === "line" || chart.config.type === "radar") yPosition = value < 0 ? point.y + 10 : point.y - 10;
8299
+ if (dataset.type === "line" || dataset.type === "radar") yPosition = value < 0 ? point.y + 10 : point.y - 10;
8300
8300
  else {
8301
8301
  const yZeroLine = yAxisScale.getPixelForValue(0);
8302
8302
  const distanceFromAxisOrigin = Math.abs(yZeroLine - point.y);
@@ -11186,7 +11186,7 @@ const RemoveDuplicateTerms = { Errors: {
11186
11186
  ["MoreThanOneRangeSelected"]: _t("Please select only one range of cells"),
11187
11187
  ["EmptyTarget"]: _t("Please select a range of cells containing values."),
11188
11188
  ["NoColumnsProvided"]: _t("Please select at latest one column to analyze."),
11189
- ["WillRemoveExistingMerge"]: _t("This operation is not possible due to a merge. Please remove the merges first than try again.")
11189
+ ["WillRemoveExistingMerge"]: _t("Cannot perform this action on merged cells. Unmerge the cells and try again.")
11190
11190
  } };
11191
11191
  const DVTerms = {
11192
11192
  DateIs: {
@@ -42782,6 +42782,11 @@ var GridOverlay = class extends Component {
42782
42782
  });
42783
42783
  return icon?.onClick ? icon : void 0;
42784
42784
  }
42785
+ get isFooterVisible() {
42786
+ const { y } = this.env.model.getters.getMainViewportCoordinates();
42787
+ const { height } = this.env.model.getters.getSheetViewDimension();
42788
+ return !this.env.model.getters.isReadonly() && height - y > 46;
42789
+ }
42785
42790
  };
42786
42791
 
42787
42792
  //#endregion
@@ -46374,43 +46379,6 @@ var CalendarChartConfigPanel = class extends GenericChartConfigPanel {
46374
46379
  onChange: this.onUpdateDataSetsHaveTitle.bind(this)
46375
46380
  }];
46376
46381
  }
46377
- getGroupByOptions() {
46378
- const sheetId = this.env.model.getters.getFigureSheetId(this.env.model.getters.getFigureIdFromChartId(this.props.chartId));
46379
- const dataSets = createDataSets(this.env.model.getters, this.props.definition.dataSets, sheetId, this.props.definition.dataSetsHaveTitle);
46380
- if (dataSets.length === 0) return [];
46381
- const labelRange = createValidRange(this.env.model.getters, sheetId, this.props.definition.labelRange);
46382
- const labels = getBarChartData(this.props.definition, dataSets, labelRange, this.env.model.getters).labels.filter((l) => isDateTime(l, DEFAULT_LOCALE));
46383
- if (labels.length === 0) return [];
46384
- const dates = labels.map((label) => toJsDate(label, this.env.model.getters.getLocale()));
46385
- const uniqueYears = /* @__PURE__ */ new Set();
46386
- const uniqueMonths = /* @__PURE__ */ new Set();
46387
- const uniqueDays = /* @__PURE__ */ new Set();
46388
- const uniqueHours = /* @__PURE__ */ new Set();
46389
- const uniqueMinutes = /* @__PURE__ */ new Set();
46390
- const uniqueSeconds = /* @__PURE__ */ new Set();
46391
- for (const date of dates) {
46392
- uniqueYears.add(date.getFullYear());
46393
- uniqueMonths.add(date.getMonth());
46394
- uniqueDays.add(date.getDate());
46395
- uniqueHours.add(date.getHours());
46396
- uniqueMinutes.add(date.getMinutes());
46397
- uniqueSeconds.add(date.getSeconds());
46398
- }
46399
- return this.groupByChoices.filter((groupBy) => {
46400
- switch (groupBy.value) {
46401
- case "year": return uniqueYears.size > 1;
46402
- case "quarter_number":
46403
- case "month_number": return uniqueMonths.size > 1;
46404
- case "iso_week_number":
46405
- case "day_of_month":
46406
- case "day_of_week": return uniqueDays.size > 1;
46407
- case "hour_number": return uniqueHours.size > 1;
46408
- case "minute_number": return uniqueMinutes.size > 1;
46409
- case "second_number": return uniqueSeconds.size > 1;
46410
- default: return false;
46411
- }
46412
- });
46413
- }
46414
46382
  getGroupByType(currentAxis) {
46415
46383
  return (currentAxis === "horizontal" ? this.props.definition.horizontalGroupBy : this.props.definition.verticalGroupBy) || "year";
46416
46384
  }
@@ -48901,7 +48869,7 @@ var FindAndReplacePanel = class extends Component {
48901
48869
  }
48902
48870
  get specificRangeMatchesCount() {
48903
48871
  const range = this.searchOptions.specificRange;
48904
- if (!range) return "";
48872
+ if (!range || range.invalidSheetName || range.invalidXc) return "";
48905
48873
  const { sheetId, zone } = range;
48906
48874
  return _t("%(matches)s matches in range %(range)s of %(sheetName)s", {
48907
48875
  matches: this.store.specificRangeMatchesCount,
@@ -64513,7 +64481,8 @@ var GeoFeaturePlugin = class extends UIPlugin {
64513
64481
  static getters = [
64514
64482
  "getGeoJsonFeatures",
64515
64483
  "geoFeatureNameToId",
64516
- "getGeoChartAvailableRegions"
64484
+ "getGeoChartAvailableRegions",
64485
+ "loadUsedGeoJsonFeatures"
64517
64486
  ];
64518
64487
  geoJsonService;
64519
64488
  geoJsonCache = {};
@@ -64550,6 +64519,23 @@ var GeoFeaturePlugin = class extends UIPlugin {
64550
64519
  }
64551
64520
  return this.geoJsonService.geoFeatureNameToId(region, featureName);
64552
64521
  }
64522
+ loadUsedGeoJsonFeatures() {
64523
+ const regions = this.getters.getSheetIds().flatMap((sheetId) => this.getters.getChartIds(sheetId).map((chartId) => {
64524
+ const definition = this.getters.getChartDefinition(chartId);
64525
+ return definition.type === "geo" ? definition.region || this.getters.getGeoChartAvailableRegions()[0]?.id : void 0;
64526
+ })).filter(isDefined);
64527
+ const uniqueRegions = Array.from(new Set(regions));
64528
+ if (uniqueRegions.length && !this.geoJsonService) {
64529
+ console.error("No geoJsonService provided to the model");
64530
+ return Promise.resolve();
64531
+ }
64532
+ for (const region of uniqueRegions) this.getGeoJsonFeatures(region);
64533
+ const promises = uniqueRegions.map((region) => {
64534
+ const cachedGeoJson = this.geoJsonCache[region];
64535
+ return cachedGeoJson instanceof Promise ? cachedGeoJson : Promise.resolve();
64536
+ });
64537
+ return Promise.all(promises).then(() => {});
64538
+ }
64553
64539
  convertToGeoJson(json) {
64554
64540
  if (!json) return null;
64555
64541
  if (json.type === "Topology") {
@@ -67447,7 +67433,7 @@ var InternalViewport = class {
67447
67433
  let height = lastRowEnd - this.offsetCorrectionY;
67448
67434
  if (this.canScrollVertically) {
67449
67435
  height = Math.max(height, this.viewportHeight);
67450
- if (lastRowEnd + 46 > height && !this.getters.isReadonly()) height += 46;
67436
+ if (lastRowEnd + 46 > height && !this.getters.isReadonly() && this.viewportHeight > 46) height += 46;
67451
67437
  }
67452
67438
  return {
67453
67439
  width,
@@ -79207,6 +79193,6 @@ const chartHelpers = {
79207
79193
  //#endregion
79208
79194
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
79209
79195
 
79210
- __info__.version = "19.1.34";
79211
- __info__.date = "2026-09-04T07:25:44.071Z";
79212
- __info__.hash = "b709c26";
79196
+ __info__.version = "19.1.35";
79197
+ __info__.date = "2026-09-10T05:36:15.885Z";
79198
+ __info__.hash = "619eeac";
@@ -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.1.34
6
- * @date 2026-09-04T07:25:44.071Z
7
- * @hash b709c26
5
+ * @version 19.1.35
6
+ * @date 2026-09-10T05:36:15.885Z
7
+ * @hash 619eeac
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -8298,7 +8298,7 @@ stores.inject(MyMetaStore, storeInstance);
8298
8298
  const point = dataset.data[i];
8299
8299
  const xPosition = point.x;
8300
8300
  let yPosition = 0;
8301
- if (chart.config.type === "line" || chart.config.type === "radar") yPosition = value < 0 ? point.y + 10 : point.y - 10;
8301
+ if (dataset.type === "line" || dataset.type === "radar") yPosition = value < 0 ? point.y + 10 : point.y - 10;
8302
8302
  else {
8303
8303
  const yZeroLine = yAxisScale.getPixelForValue(0);
8304
8304
  const distanceFromAxisOrigin = Math.abs(yZeroLine - point.y);
@@ -11188,7 +11188,7 @@ stores.inject(MyMetaStore, storeInstance);
11188
11188
  ["MoreThanOneRangeSelected"]: _t("Please select only one range of cells"),
11189
11189
  ["EmptyTarget"]: _t("Please select a range of cells containing values."),
11190
11190
  ["NoColumnsProvided"]: _t("Please select at latest one column to analyze."),
11191
- ["WillRemoveExistingMerge"]: _t("This operation is not possible due to a merge. Please remove the merges first than try again.")
11191
+ ["WillRemoveExistingMerge"]: _t("Cannot perform this action on merged cells. Unmerge the cells and try again.")
11192
11192
  } };
11193
11193
  const DVTerms = {
11194
11194
  DateIs: {
@@ -42784,6 +42784,11 @@ stores.inject(MyMetaStore, storeInstance);
42784
42784
  });
42785
42785
  return icon?.onClick ? icon : void 0;
42786
42786
  }
42787
+ get isFooterVisible() {
42788
+ const { y } = this.env.model.getters.getMainViewportCoordinates();
42789
+ const { height } = this.env.model.getters.getSheetViewDimension();
42790
+ return !this.env.model.getters.isReadonly() && height - y > 46;
42791
+ }
42787
42792
  };
42788
42793
 
42789
42794
  //#endregion
@@ -46376,43 +46381,6 @@ stores.inject(MyMetaStore, storeInstance);
46376
46381
  onChange: this.onUpdateDataSetsHaveTitle.bind(this)
46377
46382
  }];
46378
46383
  }
46379
- getGroupByOptions() {
46380
- const sheetId = this.env.model.getters.getFigureSheetId(this.env.model.getters.getFigureIdFromChartId(this.props.chartId));
46381
- const dataSets = createDataSets(this.env.model.getters, this.props.definition.dataSets, sheetId, this.props.definition.dataSetsHaveTitle);
46382
- if (dataSets.length === 0) return [];
46383
- const labelRange = createValidRange(this.env.model.getters, sheetId, this.props.definition.labelRange);
46384
- const labels = getBarChartData(this.props.definition, dataSets, labelRange, this.env.model.getters).labels.filter((l) => isDateTime(l, DEFAULT_LOCALE));
46385
- if (labels.length === 0) return [];
46386
- const dates = labels.map((label) => toJsDate(label, this.env.model.getters.getLocale()));
46387
- const uniqueYears = /* @__PURE__ */ new Set();
46388
- const uniqueMonths = /* @__PURE__ */ new Set();
46389
- const uniqueDays = /* @__PURE__ */ new Set();
46390
- const uniqueHours = /* @__PURE__ */ new Set();
46391
- const uniqueMinutes = /* @__PURE__ */ new Set();
46392
- const uniqueSeconds = /* @__PURE__ */ new Set();
46393
- for (const date of dates) {
46394
- uniqueYears.add(date.getFullYear());
46395
- uniqueMonths.add(date.getMonth());
46396
- uniqueDays.add(date.getDate());
46397
- uniqueHours.add(date.getHours());
46398
- uniqueMinutes.add(date.getMinutes());
46399
- uniqueSeconds.add(date.getSeconds());
46400
- }
46401
- return this.groupByChoices.filter((groupBy) => {
46402
- switch (groupBy.value) {
46403
- case "year": return uniqueYears.size > 1;
46404
- case "quarter_number":
46405
- case "month_number": return uniqueMonths.size > 1;
46406
- case "iso_week_number":
46407
- case "day_of_month":
46408
- case "day_of_week": return uniqueDays.size > 1;
46409
- case "hour_number": return uniqueHours.size > 1;
46410
- case "minute_number": return uniqueMinutes.size > 1;
46411
- case "second_number": return uniqueSeconds.size > 1;
46412
- default: return false;
46413
- }
46414
- });
46415
- }
46416
46384
  getGroupByType(currentAxis) {
46417
46385
  return (currentAxis === "horizontal" ? this.props.definition.horizontalGroupBy : this.props.definition.verticalGroupBy) || "year";
46418
46386
  }
@@ -48903,7 +48871,7 @@ stores.inject(MyMetaStore, storeInstance);
48903
48871
  }
48904
48872
  get specificRangeMatchesCount() {
48905
48873
  const range = this.searchOptions.specificRange;
48906
- if (!range) return "";
48874
+ if (!range || range.invalidSheetName || range.invalidXc) return "";
48907
48875
  const { sheetId, zone } = range;
48908
48876
  return _t("%(matches)s matches in range %(range)s of %(sheetName)s", {
48909
48877
  matches: this.store.specificRangeMatchesCount,
@@ -64515,7 +64483,8 @@ stores.inject(MyMetaStore, storeInstance);
64515
64483
  static getters = [
64516
64484
  "getGeoJsonFeatures",
64517
64485
  "geoFeatureNameToId",
64518
- "getGeoChartAvailableRegions"
64486
+ "getGeoChartAvailableRegions",
64487
+ "loadUsedGeoJsonFeatures"
64519
64488
  ];
64520
64489
  geoJsonService;
64521
64490
  geoJsonCache = {};
@@ -64552,6 +64521,23 @@ stores.inject(MyMetaStore, storeInstance);
64552
64521
  }
64553
64522
  return this.geoJsonService.geoFeatureNameToId(region, featureName);
64554
64523
  }
64524
+ loadUsedGeoJsonFeatures() {
64525
+ const regions = this.getters.getSheetIds().flatMap((sheetId) => this.getters.getChartIds(sheetId).map((chartId) => {
64526
+ const definition = this.getters.getChartDefinition(chartId);
64527
+ return definition.type === "geo" ? definition.region || this.getters.getGeoChartAvailableRegions()[0]?.id : void 0;
64528
+ })).filter(isDefined);
64529
+ const uniqueRegions = Array.from(new Set(regions));
64530
+ if (uniqueRegions.length && !this.geoJsonService) {
64531
+ console.error("No geoJsonService provided to the model");
64532
+ return Promise.resolve();
64533
+ }
64534
+ for (const region of uniqueRegions) this.getGeoJsonFeatures(region);
64535
+ const promises = uniqueRegions.map((region) => {
64536
+ const cachedGeoJson = this.geoJsonCache[region];
64537
+ return cachedGeoJson instanceof Promise ? cachedGeoJson : Promise.resolve();
64538
+ });
64539
+ return Promise.all(promises).then(() => {});
64540
+ }
64555
64541
  convertToGeoJson(json) {
64556
64542
  if (!json) return null;
64557
64543
  if (json.type === "Topology") {
@@ -67449,7 +67435,7 @@ stores.inject(MyMetaStore, storeInstance);
67449
67435
  let height = lastRowEnd - this.offsetCorrectionY;
67450
67436
  if (this.canScrollVertically) {
67451
67437
  height = Math.max(height, this.viewportHeight);
67452
- if (lastRowEnd + 46 > height && !this.getters.isReadonly()) height += 46;
67438
+ if (lastRowEnd + 46 > height && !this.getters.isReadonly() && this.viewportHeight > 46) height += 46;
67453
67439
  }
67454
67440
  return {
67455
67441
  width,
@@ -79262,8 +79248,8 @@ exports.stores = stores;
79262
79248
  exports.tokenColors = tokenColors;
79263
79249
  exports.tokenize = tokenize;
79264
79250
 
79265
- __info__.version = "19.1.34";
79266
- __info__.date = "2026-09-04T07:25:44.071Z";
79267
- __info__.hash = "b709c26";
79251
+ __info__.version = "19.1.35";
79252
+ __info__.date = "2026-09-10T05:36:15.885Z";
79253
+ __info__.hash = "619eeac";
79268
79254
 
79269
79255
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);