@odoo/o-spreadsheet 19.1.0-alpha.11 → 19.1.0-alpha.12

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.0-alpha.11
6
- * @date 2025-11-03T12:34:28.925Z
7
- * @hash d9230f3
5
+ * @version 19.1.0-alpha.12
6
+ * @date 2025-11-12T14:17:07.713Z
7
+ * @hash 6fefc9c
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';
@@ -247,7 +247,7 @@ const DEFAULT_CAROUSEL_TITLE_STYLE = {
247
247
  fontSize: CHART_TITLE_FONT_SIZE,
248
248
  color: TEXT_BODY,
249
249
  };
250
- const DEFAULT_TOKEN_COLOR = "#000000";
250
+ const DEFAULT_TOKEN_COLOR = "light-dark(#000000, #ffffff)";
251
251
  const functionColor = DEFAULT_TOKEN_COLOR;
252
252
  const operatorColor = "#3da4ab";
253
253
  const tokenColors = {
@@ -1775,7 +1775,10 @@ function isInside(col, row, zone) {
1775
1775
  * Check if a zone is inside another
1776
1776
  */
1777
1777
  function isZoneInside(smallZone, biggerZone) {
1778
- return isEqual(union(biggerZone, smallZone), biggerZone);
1778
+ return (smallZone.left >= biggerZone.left &&
1779
+ smallZone.right <= biggerZone.right &&
1780
+ smallZone.top >= biggerZone.top &&
1781
+ smallZone.bottom <= biggerZone.bottom);
1779
1782
  }
1780
1783
  function zoneToDimension(zone) {
1781
1784
  return {
@@ -18389,12 +18392,10 @@ const colors = [
18389
18392
  "#00a3a3",
18390
18393
  "#f012be",
18391
18394
  "#3d9970",
18392
- "#111111",
18393
18395
  "#62A300",
18394
18396
  "#ff4136",
18395
18397
  "#949494",
18396
- "#85144b",
18397
- "#001f3f",
18398
+ "#ff5c9d",
18398
18399
  ];
18399
18400
  /*
18400
18401
  * transform a color number (R * 256^2 + G * 256 + B) into classic hex (+alpha) value
@@ -19419,7 +19420,7 @@ function getRangeString(range, forSheetId, getSheetName, options = { useBoundedR
19419
19420
  let sheetName = "";
19420
19421
  if (prefixSheet) {
19421
19422
  if (range.invalidSheetName) {
19422
- sheetName = range.invalidSheetName;
19423
+ sheetName = getCanonicalSymbolName(range.invalidSheetName);
19423
19424
  }
19424
19425
  else {
19425
19426
  sheetName = getCanonicalSymbolName(getSheetName(range.sheetId));
@@ -22396,7 +22397,7 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
22396
22397
  return {
22397
22398
  background: context.background,
22398
22399
  type: "scorecard",
22399
- keyValue: context.range ? context.range[0].dataRange : undefined,
22400
+ keyValue: context.range?.[0]?.dataRange,
22400
22401
  title: context.title || { text: "" },
22401
22402
  baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
22402
22403
  baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
@@ -23320,8 +23321,7 @@ function generateMasterChartConfig(chartJsConfig) {
23320
23321
  .filter((ds) => !isTrendLineAxis(ds["xAxisID"]))
23321
23322
  .map((ds) => ({
23322
23323
  ...ds,
23323
- pointRadius: 0,
23324
- showLine: true,
23324
+ pointRadius: ds.showLine === false ? 2 : 0, // Show points only for scatter plots
23325
23325
  })),
23326
23326
  },
23327
23327
  options: {
@@ -23884,9 +23884,13 @@ async function canvasToObjectUrl(canvas) {
23884
23884
  if (!blob) {
23885
23885
  return undefined;
23886
23886
  }
23887
- if (!URL.createObjectURL)
23888
- throw new Error("URL.createObjectURL is not supported in this environment");
23889
- return URL.createObjectURL(blob);
23887
+ return new Promise((resolve) => {
23888
+ const f = new FileReader();
23889
+ f.addEventListener("load", () => {
23890
+ resolve(f.result);
23891
+ });
23892
+ f.readAsDataURL(blob);
23893
+ });
23890
23894
  }
23891
23895
 
23892
23896
  /**
@@ -56920,7 +56924,7 @@ class GaugeChart extends AbstractChart {
56920
56924
  background: context.background,
56921
56925
  title: context.title || { text: "" },
56922
56926
  type: "gauge",
56923
- dataRange: context.range ? context.range[0].dataRange : undefined,
56927
+ dataRange: context.range?.[0]?.dataRange,
56924
56928
  sectionRule: {
56925
56929
  colors: {
56926
56930
  lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
@@ -61730,7 +61734,7 @@ class TextValueProvider extends Component {
61730
61734
  }
61731
61735
  getCss(html) {
61732
61736
  return cssPropertiesToCss({
61733
- color: html.color || "#000000",
61737
+ color: html.color,
61734
61738
  background: html.backgroundColor,
61735
61739
  });
61736
61740
  }
@@ -61885,6 +61889,9 @@ class ContentEditableHelper {
61885
61889
  const span = document.createElement("span");
61886
61890
  span.innerText = content.value;
61887
61891
  span.style.color = content.color || "";
61892
+ if (content.opacity !== undefined && content.opacity !== 1) {
61893
+ span.style.opacity = content.opacity.toString();
61894
+ }
61888
61895
  span.addEventListener("mousemove", () => {
61889
61896
  content.onHover?.(getBoundingRectAsPOJO(span));
61890
61897
  });
@@ -61980,12 +61987,14 @@ class ContentEditableHelper {
61980
61987
  }
61981
61988
  }
61982
61989
  function compareContentToSpanElement(content, node) {
61983
- const contentColor = content.color ? toHex(content.color) : "";
61984
- const nodeColor = node.style?.color ? toHex(node.style.color) : "";
61990
+ const contentColor = content.color || "";
61991
+ const nodeColor = node.style?.color || "";
61992
+ const nodeOpacity = node.style?.opacity || "1";
61985
61993
  const sameColor = contentColor === nodeColor;
61986
61994
  const sameClass = deepEquals$1(content.classes, [...node.classList]);
61987
61995
  const sameContent = node.innerText === content.value;
61988
- return sameColor && sameClass && sameContent;
61996
+ const sameOpacity = (content.opacity ?? 1).toString() === nodeOpacity;
61997
+ return sameColor && sameClass && sameContent && sameOpacity;
61989
61998
  }
61990
61999
  const doc = new DOMParser();
61991
62000
  const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
@@ -62591,10 +62600,6 @@ class Composer extends Component {
62591
62600
  const { end, start } = this.props.composerStore.composerSelection;
62592
62601
  for (let index = 0; index < tokens.length; index++) {
62593
62602
  const token = tokens[index];
62594
- let color = token.color || DEFAULT_TOKEN_COLOR;
62595
- if (token.isBlurred) {
62596
- color = setColorAlpha(color, 0.5);
62597
- }
62598
62603
  const classes = [];
62599
62604
  if (token.type === "REFERENCE" &&
62600
62605
  this.props.composerStore.tokenAtCursor === token &&
@@ -62612,7 +62617,8 @@ class Composer extends Component {
62612
62617
  }
62613
62618
  result.push({
62614
62619
  value: token.value,
62615
- color,
62620
+ color: token.color || DEFAULT_TOKEN_COLOR,
62621
+ opacity: token.isBlurred ? 0.5 : 1,
62616
62622
  classes,
62617
62623
  onHover: (rect) => this.onTokenHover(index, rect),
62618
62624
  onStopHover: () => this.onTokenHover(undefined),
@@ -63169,6 +63175,7 @@ class AbstractComposerStore extends SpreadsheetStore {
63169
63175
  this.highlightStore.register(this);
63170
63176
  this.onDispose(() => {
63171
63177
  this.highlightStore.unRegister(this);
63178
+ this._cancelEdition();
63172
63179
  });
63173
63180
  }
63174
63181
  handleEvent(event) {
@@ -72287,6 +72294,9 @@ class GridRenderer extends SpreadsheetStore {
72287
72294
  break;
72288
72295
  }
72289
72296
  }
72297
+ finalize() {
72298
+ this.zonesWithPreventedAnimationsInNextFrame = recomputeZones(this.zonesWithPreventedAnimationsInNextFrame);
72299
+ }
72290
72300
  get renderingLayers() {
72291
72301
  return ["Background", "Headers"];
72292
72302
  }
@@ -76890,15 +76900,19 @@ class ConditionalFormattingEditor extends Component {
76890
76900
  this.updateConditionalFormat({ rule: this.state.rules.colorScale });
76891
76901
  this.closeMenus();
76892
76902
  }
76893
- getPreviewGradient() {
76903
+ getColorScalePreviewStyle() {
76894
76904
  const rule = this.state.rules.colorScale;
76895
76905
  const minColor = colorNumberToHex(rule.minimum.color);
76896
76906
  const midColor = colorNumberToHex(rule.midpoint?.color || DEFAULT_COLOR_SCALE_MIDPOINT_COLOR);
76897
76907
  const maxColor = colorNumberToHex(rule.maximum.color);
76898
- const baseString = "background-image: linear-gradient(to right, ";
76899
- return rule.midpoint === undefined
76908
+ const baseString = "linear-gradient(to right, ";
76909
+ const backgroundImage = rule.midpoint === undefined
76900
76910
  ? baseString + minColor + ", " + maxColor + ")"
76901
76911
  : baseString + minColor + ", " + midColor + ", " + maxColor + ")";
76912
+ return cssPropertiesToCss({
76913
+ "background-image": backgroundImage,
76914
+ color: "#000",
76915
+ });
76902
76916
  }
76903
76917
  getThresholdColor(threshold) {
76904
76918
  return threshold
@@ -79244,11 +79258,15 @@ pivotSidePanelRegistry.add("SPREADSHEET", {
79244
79258
  class PivotDesignPanel extends Component {
79245
79259
  static template = "o-spreadsheet-PivotDesignPanel";
79246
79260
  static props = { pivotId: String };
79247
- static components = { Section, Checkbox };
79261
+ static components = { Section, Checkbox, NumberInput };
79248
79262
  store;
79249
79263
  setup() {
79250
79264
  this.store = useLocalStore(PivotSidePanelStore, this.props.pivotId, "neverDefer");
79251
79265
  }
79266
+ updatePivotStyleNumberProperty(valueStr, key) {
79267
+ const value = parseInt(valueStr);
79268
+ this.store.update({ style: { ...this.pivotStyle, [key]: isNaN(value) ? undefined : value } });
79269
+ }
79252
79270
  updatePivotStyleProperty(key, value) {
79253
79271
  this.store.update({ style: { ...this.pivotStyle, [key]: value } });
79254
79272
  }
@@ -82055,7 +82073,7 @@ autoCompleteProviders.add("dataValidation", {
82055
82073
  htmlContent: [
82056
82074
  {
82057
82075
  value: value.label,
82058
- color: color ? chipTextColor(color) : undefined,
82076
+ color: chipTextColor(color || GRAY_200),
82059
82077
  backgroundColor: color || GRAY_200,
82060
82078
  classes: ["badge rounded-pill fs-6 fw-normal w-100 mt-1 text-start"],
82061
82079
  },
@@ -82739,6 +82757,7 @@ topbarMenuRegistry
82739
82757
  .add("file", {
82740
82758
  name: _t$1("File"),
82741
82759
  sequence: 10,
82760
+ isReadonlyAllowed: true,
82742
82761
  })
82743
82762
  .addChild("settings", ["file"], {
82744
82763
  name: _t$1("Settings"),
@@ -82753,6 +82772,7 @@ topbarMenuRegistry
82753
82772
  .add("edit", {
82754
82773
  name: _t$1("Edit"),
82755
82774
  sequence: 20,
82775
+ isReadonlyAllowed: true,
82756
82776
  })
82757
82777
  .addChild("undo", ["edit"], {
82758
82778
  ...undo,
@@ -82837,6 +82857,7 @@ topbarMenuRegistry
82837
82857
  .add("view", {
82838
82858
  name: _t$1("View"),
82839
82859
  sequence: 30,
82860
+ isReadonlyAllowed: true,
82840
82861
  })
82841
82862
  .addChild("unfreeze_panes", ["view"], {
82842
82863
  ...unFreezePane,
@@ -82933,6 +82954,7 @@ topbarMenuRegistry
82933
82954
  .add("insert", {
82934
82955
  name: _t$1("Insert"),
82935
82956
  sequence: 40,
82957
+ isReadonlyAllowed: true,
82936
82958
  })
82937
82959
  .addChild("insert_row", ["insert"], {
82938
82960
  ...insertRow,
@@ -83044,7 +83066,11 @@ topbarMenuRegistry
83044
83066
  // ---------------------------------------------------------------------
83045
83067
  // FORMAT MENU ITEMS
83046
83068
  // ---------------------------------------------------------------------
83047
- .add("format", { name: _t$1("Format"), sequence: 50 })
83069
+ .add("format", {
83070
+ name: _t$1("Format"),
83071
+ sequence: 50,
83072
+ isReadonlyAllowed: true,
83073
+ })
83048
83074
  .addChild("format_number", ["format"], {
83049
83075
  ...formatNumberMenuItemSpec,
83050
83076
  name: _t$1("Number"),
@@ -83136,6 +83162,7 @@ topbarMenuRegistry
83136
83162
  .add("data", {
83137
83163
  name: _t$1("Data"),
83138
83164
  sequence: 60,
83165
+ isReadonlyAllowed: true,
83139
83166
  })
83140
83167
  .addChild("sort_range", ["data"], {
83141
83168
  ...sortRange,
@@ -85823,6 +85850,7 @@ class Spreadsheet extends Component {
85823
85850
  notifyUser: { type: Function, optional: true },
85824
85851
  raiseError: { type: Function, optional: true },
85825
85852
  askConfirmation: { type: Function, optional: true },
85853
+ colorScheme: { type: String, optional: true },
85826
85854
  };
85827
85855
  static components = {
85828
85856
  TopBar,
@@ -85858,6 +85886,7 @@ class Spreadsheet extends Component {
85858
85886
  : "auto";
85859
85887
  properties["grid-template-columns"] = `auto ${columnWidth}`;
85860
85888
  properties["--os-scrollbar-width"] = `${scrollbarWidth}px`;
85889
+ properties["color-scheme"] = this.props.colorScheme;
85861
85890
  return cssPropertiesToCss(properties);
85862
85891
  }
85863
85892
  setup() {
@@ -86021,6 +86050,12 @@ class Spreadsheet extends Component {
86021
86050
  height: Math.max(gridHeight / zoom - scrollbarWidth, 0),
86022
86051
  };
86023
86052
  }
86053
+ getSpreadSheetClasses() {
86054
+ return [
86055
+ this.env.isSmall ? "o-spreadsheet-mobile" : "",
86056
+ this.props.colorScheme === "dark" ? "dark" : "",
86057
+ ].join(" ");
86058
+ }
86024
86059
  }
86025
86060
 
86026
86061
  class ComboChart extends AbstractChart {
@@ -88468,6 +88503,7 @@ const components = {
88468
88503
  ChartDashboardMenu,
88469
88504
  FullScreenFigure,
88470
88505
  NumberInput,
88506
+ TopBar,
88471
88507
  };
88472
88508
  const hooks = {
88473
88509
  useDragAndDropListItems,
@@ -88517,6 +88553,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
88517
88553
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType$1 as 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, compile, compileTokens, 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 };
88518
88554
 
88519
88555
 
88520
- __info__.version = "19.1.0-alpha.11";
88521
- __info__.date = "2025-11-03T12:34:28.925Z";
88522
- __info__.hash = "d9230f3";
88556
+ __info__.version = "19.1.0-alpha.12";
88557
+ __info__.date = "2025-11-12T14:17:07.713Z";
88558
+ __info__.hash = "6fefc9c";
@@ -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.0-alpha.11
6
- * @date 2025-11-03T12:34:28.925Z
7
- * @hash d9230f3
5
+ * @version 19.1.0-alpha.12
6
+ * @date 2025-11-12T14:17:07.713Z
7
+ * @hash 6fefc9c
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -248,7 +248,7 @@
248
248
  fontSize: CHART_TITLE_FONT_SIZE,
249
249
  color: TEXT_BODY,
250
250
  };
251
- const DEFAULT_TOKEN_COLOR = "#000000";
251
+ const DEFAULT_TOKEN_COLOR = "light-dark(#000000, #ffffff)";
252
252
  const functionColor = DEFAULT_TOKEN_COLOR;
253
253
  const operatorColor = "#3da4ab";
254
254
  const tokenColors = {
@@ -1776,7 +1776,10 @@
1776
1776
  * Check if a zone is inside another
1777
1777
  */
1778
1778
  function isZoneInside(smallZone, biggerZone) {
1779
- return isEqual(union(biggerZone, smallZone), biggerZone);
1779
+ return (smallZone.left >= biggerZone.left &&
1780
+ smallZone.right <= biggerZone.right &&
1781
+ smallZone.top >= biggerZone.top &&
1782
+ smallZone.bottom <= biggerZone.bottom);
1780
1783
  }
1781
1784
  function zoneToDimension(zone) {
1782
1785
  return {
@@ -18390,12 +18393,10 @@ stores.inject(MyMetaStore, storeInstance);
18390
18393
  "#00a3a3",
18391
18394
  "#f012be",
18392
18395
  "#3d9970",
18393
- "#111111",
18394
18396
  "#62A300",
18395
18397
  "#ff4136",
18396
18398
  "#949494",
18397
- "#85144b",
18398
- "#001f3f",
18399
+ "#ff5c9d",
18399
18400
  ];
18400
18401
  /*
18401
18402
  * transform a color number (R * 256^2 + G * 256 + B) into classic hex (+alpha) value
@@ -19420,7 +19421,7 @@ stores.inject(MyMetaStore, storeInstance);
19420
19421
  let sheetName = "";
19421
19422
  if (prefixSheet) {
19422
19423
  if (range.invalidSheetName) {
19423
- sheetName = range.invalidSheetName;
19424
+ sheetName = getCanonicalSymbolName(range.invalidSheetName);
19424
19425
  }
19425
19426
  else {
19426
19427
  sheetName = getCanonicalSymbolName(getSheetName(range.sheetId));
@@ -22397,7 +22398,7 @@ stores.inject(MyMetaStore, storeInstance);
22397
22398
  return {
22398
22399
  background: context.background,
22399
22400
  type: "scorecard",
22400
- keyValue: context.range ? context.range[0].dataRange : undefined,
22401
+ keyValue: context.range?.[0]?.dataRange,
22401
22402
  title: context.title || { text: "" },
22402
22403
  baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
22403
22404
  baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
@@ -23321,8 +23322,7 @@ stores.inject(MyMetaStore, storeInstance);
23321
23322
  .filter((ds) => !isTrendLineAxis(ds["xAxisID"]))
23322
23323
  .map((ds) => ({
23323
23324
  ...ds,
23324
- pointRadius: 0,
23325
- showLine: true,
23325
+ pointRadius: ds.showLine === false ? 2 : 0, // Show points only for scatter plots
23326
23326
  })),
23327
23327
  },
23328
23328
  options: {
@@ -23885,9 +23885,13 @@ stores.inject(MyMetaStore, storeInstance);
23885
23885
  if (!blob) {
23886
23886
  return undefined;
23887
23887
  }
23888
- if (!URL.createObjectURL)
23889
- throw new Error("URL.createObjectURL is not supported in this environment");
23890
- return URL.createObjectURL(blob);
23888
+ return new Promise((resolve) => {
23889
+ const f = new FileReader();
23890
+ f.addEventListener("load", () => {
23891
+ resolve(f.result);
23892
+ });
23893
+ f.readAsDataURL(blob);
23894
+ });
23891
23895
  }
23892
23896
 
23893
23897
  /**
@@ -56921,7 +56925,7 @@ stores.inject(MyMetaStore, storeInstance);
56921
56925
  background: context.background,
56922
56926
  title: context.title || { text: "" },
56923
56927
  type: "gauge",
56924
- dataRange: context.range ? context.range[0].dataRange : undefined,
56928
+ dataRange: context.range?.[0]?.dataRange,
56925
56929
  sectionRule: {
56926
56930
  colors: {
56927
56931
  lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
@@ -61731,7 +61735,7 @@ stores.inject(MyMetaStore, storeInstance);
61731
61735
  }
61732
61736
  getCss(html) {
61733
61737
  return cssPropertiesToCss({
61734
- color: html.color || "#000000",
61738
+ color: html.color,
61735
61739
  background: html.backgroundColor,
61736
61740
  });
61737
61741
  }
@@ -61886,6 +61890,9 @@ stores.inject(MyMetaStore, storeInstance);
61886
61890
  const span = document.createElement("span");
61887
61891
  span.innerText = content.value;
61888
61892
  span.style.color = content.color || "";
61893
+ if (content.opacity !== undefined && content.opacity !== 1) {
61894
+ span.style.opacity = content.opacity.toString();
61895
+ }
61889
61896
  span.addEventListener("mousemove", () => {
61890
61897
  content.onHover?.(getBoundingRectAsPOJO(span));
61891
61898
  });
@@ -61981,12 +61988,14 @@ stores.inject(MyMetaStore, storeInstance);
61981
61988
  }
61982
61989
  }
61983
61990
  function compareContentToSpanElement(content, node) {
61984
- const contentColor = content.color ? toHex(content.color) : "";
61985
- const nodeColor = node.style?.color ? toHex(node.style.color) : "";
61991
+ const contentColor = content.color || "";
61992
+ const nodeColor = node.style?.color || "";
61993
+ const nodeOpacity = node.style?.opacity || "1";
61986
61994
  const sameColor = contentColor === nodeColor;
61987
61995
  const sameClass = deepEquals$1(content.classes, [...node.classList]);
61988
61996
  const sameContent = node.innerText === content.value;
61989
- return sameColor && sameClass && sameContent;
61997
+ const sameOpacity = (content.opacity ?? 1).toString() === nodeOpacity;
61998
+ return sameColor && sameClass && sameContent && sameOpacity;
61990
61999
  }
61991
62000
  const doc = new DOMParser();
61992
62001
  const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
@@ -62592,10 +62601,6 @@ stores.inject(MyMetaStore, storeInstance);
62592
62601
  const { end, start } = this.props.composerStore.composerSelection;
62593
62602
  for (let index = 0; index < tokens.length; index++) {
62594
62603
  const token = tokens[index];
62595
- let color = token.color || DEFAULT_TOKEN_COLOR;
62596
- if (token.isBlurred) {
62597
- color = setColorAlpha(color, 0.5);
62598
- }
62599
62604
  const classes = [];
62600
62605
  if (token.type === "REFERENCE" &&
62601
62606
  this.props.composerStore.tokenAtCursor === token &&
@@ -62613,7 +62618,8 @@ stores.inject(MyMetaStore, storeInstance);
62613
62618
  }
62614
62619
  result.push({
62615
62620
  value: token.value,
62616
- color,
62621
+ color: token.color || DEFAULT_TOKEN_COLOR,
62622
+ opacity: token.isBlurred ? 0.5 : 1,
62617
62623
  classes,
62618
62624
  onHover: (rect) => this.onTokenHover(index, rect),
62619
62625
  onStopHover: () => this.onTokenHover(undefined),
@@ -63170,6 +63176,7 @@ stores.inject(MyMetaStore, storeInstance);
63170
63176
  this.highlightStore.register(this);
63171
63177
  this.onDispose(() => {
63172
63178
  this.highlightStore.unRegister(this);
63179
+ this._cancelEdition();
63173
63180
  });
63174
63181
  }
63175
63182
  handleEvent(event) {
@@ -72288,6 +72295,9 @@ stores.inject(MyMetaStore, storeInstance);
72288
72295
  break;
72289
72296
  }
72290
72297
  }
72298
+ finalize() {
72299
+ this.zonesWithPreventedAnimationsInNextFrame = recomputeZones(this.zonesWithPreventedAnimationsInNextFrame);
72300
+ }
72291
72301
  get renderingLayers() {
72292
72302
  return ["Background", "Headers"];
72293
72303
  }
@@ -76891,15 +76901,19 @@ stores.inject(MyMetaStore, storeInstance);
76891
76901
  this.updateConditionalFormat({ rule: this.state.rules.colorScale });
76892
76902
  this.closeMenus();
76893
76903
  }
76894
- getPreviewGradient() {
76904
+ getColorScalePreviewStyle() {
76895
76905
  const rule = this.state.rules.colorScale;
76896
76906
  const minColor = colorNumberToHex(rule.minimum.color);
76897
76907
  const midColor = colorNumberToHex(rule.midpoint?.color || DEFAULT_COLOR_SCALE_MIDPOINT_COLOR);
76898
76908
  const maxColor = colorNumberToHex(rule.maximum.color);
76899
- const baseString = "background-image: linear-gradient(to right, ";
76900
- return rule.midpoint === undefined
76909
+ const baseString = "linear-gradient(to right, ";
76910
+ const backgroundImage = rule.midpoint === undefined
76901
76911
  ? baseString + minColor + ", " + maxColor + ")"
76902
76912
  : baseString + minColor + ", " + midColor + ", " + maxColor + ")";
76913
+ return cssPropertiesToCss({
76914
+ "background-image": backgroundImage,
76915
+ color: "#000",
76916
+ });
76903
76917
  }
76904
76918
  getThresholdColor(threshold) {
76905
76919
  return threshold
@@ -79245,11 +79259,15 @@ stores.inject(MyMetaStore, storeInstance);
79245
79259
  class PivotDesignPanel extends owl.Component {
79246
79260
  static template = "o-spreadsheet-PivotDesignPanel";
79247
79261
  static props = { pivotId: String };
79248
- static components = { Section, Checkbox };
79262
+ static components = { Section, Checkbox, NumberInput };
79249
79263
  store;
79250
79264
  setup() {
79251
79265
  this.store = useLocalStore(PivotSidePanelStore, this.props.pivotId, "neverDefer");
79252
79266
  }
79267
+ updatePivotStyleNumberProperty(valueStr, key) {
79268
+ const value = parseInt(valueStr);
79269
+ this.store.update({ style: { ...this.pivotStyle, [key]: isNaN(value) ? undefined : value } });
79270
+ }
79253
79271
  updatePivotStyleProperty(key, value) {
79254
79272
  this.store.update({ style: { ...this.pivotStyle, [key]: value } });
79255
79273
  }
@@ -82056,7 +82074,7 @@ stores.inject(MyMetaStore, storeInstance);
82056
82074
  htmlContent: [
82057
82075
  {
82058
82076
  value: value.label,
82059
- color: color ? chipTextColor(color) : undefined,
82077
+ color: chipTextColor(color || GRAY_200),
82060
82078
  backgroundColor: color || GRAY_200,
82061
82079
  classes: ["badge rounded-pill fs-6 fw-normal w-100 mt-1 text-start"],
82062
82080
  },
@@ -82740,6 +82758,7 @@ stores.inject(MyMetaStore, storeInstance);
82740
82758
  .add("file", {
82741
82759
  name: _t$1("File"),
82742
82760
  sequence: 10,
82761
+ isReadonlyAllowed: true,
82743
82762
  })
82744
82763
  .addChild("settings", ["file"], {
82745
82764
  name: _t$1("Settings"),
@@ -82754,6 +82773,7 @@ stores.inject(MyMetaStore, storeInstance);
82754
82773
  .add("edit", {
82755
82774
  name: _t$1("Edit"),
82756
82775
  sequence: 20,
82776
+ isReadonlyAllowed: true,
82757
82777
  })
82758
82778
  .addChild("undo", ["edit"], {
82759
82779
  ...undo,
@@ -82838,6 +82858,7 @@ stores.inject(MyMetaStore, storeInstance);
82838
82858
  .add("view", {
82839
82859
  name: _t$1("View"),
82840
82860
  sequence: 30,
82861
+ isReadonlyAllowed: true,
82841
82862
  })
82842
82863
  .addChild("unfreeze_panes", ["view"], {
82843
82864
  ...unFreezePane,
@@ -82934,6 +82955,7 @@ stores.inject(MyMetaStore, storeInstance);
82934
82955
  .add("insert", {
82935
82956
  name: _t$1("Insert"),
82936
82957
  sequence: 40,
82958
+ isReadonlyAllowed: true,
82937
82959
  })
82938
82960
  .addChild("insert_row", ["insert"], {
82939
82961
  ...insertRow,
@@ -83045,7 +83067,11 @@ stores.inject(MyMetaStore, storeInstance);
83045
83067
  // ---------------------------------------------------------------------
83046
83068
  // FORMAT MENU ITEMS
83047
83069
  // ---------------------------------------------------------------------
83048
- .add("format", { name: _t$1("Format"), sequence: 50 })
83070
+ .add("format", {
83071
+ name: _t$1("Format"),
83072
+ sequence: 50,
83073
+ isReadonlyAllowed: true,
83074
+ })
83049
83075
  .addChild("format_number", ["format"], {
83050
83076
  ...formatNumberMenuItemSpec,
83051
83077
  name: _t$1("Number"),
@@ -83137,6 +83163,7 @@ stores.inject(MyMetaStore, storeInstance);
83137
83163
  .add("data", {
83138
83164
  name: _t$1("Data"),
83139
83165
  sequence: 60,
83166
+ isReadonlyAllowed: true,
83140
83167
  })
83141
83168
  .addChild("sort_range", ["data"], {
83142
83169
  ...sortRange,
@@ -85824,6 +85851,7 @@ stores.inject(MyMetaStore, storeInstance);
85824
85851
  notifyUser: { type: Function, optional: true },
85825
85852
  raiseError: { type: Function, optional: true },
85826
85853
  askConfirmation: { type: Function, optional: true },
85854
+ colorScheme: { type: String, optional: true },
85827
85855
  };
85828
85856
  static components = {
85829
85857
  TopBar,
@@ -85859,6 +85887,7 @@ stores.inject(MyMetaStore, storeInstance);
85859
85887
  : "auto";
85860
85888
  properties["grid-template-columns"] = `auto ${columnWidth}`;
85861
85889
  properties["--os-scrollbar-width"] = `${scrollbarWidth}px`;
85890
+ properties["color-scheme"] = this.props.colorScheme;
85862
85891
  return cssPropertiesToCss(properties);
85863
85892
  }
85864
85893
  setup() {
@@ -86022,6 +86051,12 @@ stores.inject(MyMetaStore, storeInstance);
86022
86051
  height: Math.max(gridHeight / zoom - scrollbarWidth, 0),
86023
86052
  };
86024
86053
  }
86054
+ getSpreadSheetClasses() {
86055
+ return [
86056
+ this.env.isSmall ? "o-spreadsheet-mobile" : "",
86057
+ this.props.colorScheme === "dark" ? "dark" : "",
86058
+ ].join(" ");
86059
+ }
86025
86060
  }
86026
86061
 
86027
86062
  class ComboChart extends AbstractChart {
@@ -88469,6 +88504,7 @@ stores.inject(MyMetaStore, storeInstance);
88469
88504
  ChartDashboardMenu,
88470
88505
  FullScreenFigure,
88471
88506
  NumberInput,
88507
+ TopBar,
88472
88508
  };
88473
88509
  const hooks = {
88474
88510
  useDragAndDropListItems,
@@ -88572,9 +88608,9 @@ stores.inject(MyMetaStore, storeInstance);
88572
88608
  exports.tokenize = tokenize;
88573
88609
 
88574
88610
 
88575
- __info__.version = "19.1.0-alpha.11";
88576
- __info__.date = "2025-11-03T12:34:28.925Z";
88577
- __info__.hash = "d9230f3";
88611
+ __info__.version = "19.1.0-alpha.12";
88612
+ __info__.date = "2025-11-12T14:17:07.713Z";
88613
+ __info__.hash = "6fefc9c";
88578
88614
 
88579
88615
 
88580
88616
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);