@odoo/o-spreadsheet 19.0.15 → 19.0.17

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.15
6
- * @date 2025-12-26T10:19:23.408Z
7
- * @hash fe625c9
5
+ * @version 19.0.17
6
+ * @date 2026-01-14T10:01:24.044Z
7
+ * @hash 2165bad
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -20099,9 +20099,10 @@ stores.inject(MyMetaStore, storeInstance);
20099
20099
  throw new EvaluationError(_t("Function PIVOT takes an even number of arguments."));
20100
20100
  }
20101
20101
  }
20102
- function addPivotDependencies(evalContext, coreDefinition, forMeasures) {
20102
+ function addPivotDependencies(evalContext, pivotId, forMeasures) {
20103
20103
  //TODO This function can be very costly when used with PIVOT.VALUE and PIVOT.HEADER
20104
20104
  const dependencies = [];
20105
+ const coreDefinition = evalContext.getters.getPivotCoreDefinition(pivotId);
20105
20106
  if (coreDefinition.type === "SPREADSHEET" && coreDefinition.dataSet) {
20106
20107
  const { sheetId, zone } = coreDefinition.dataSet;
20107
20108
  const xc = zoneToXc(zone);
@@ -20118,8 +20119,7 @@ stores.inject(MyMetaStore, storeInstance);
20118
20119
  }
20119
20120
  for (const measure of forMeasures) {
20120
20121
  if (measure.computedBy) {
20121
- const formula = evalContext.getters.getMeasureCompiledFormula(measure);
20122
- dependencies.push(...formula.dependencies.filter((range) => !range.invalidXc));
20122
+ dependencies.push(...evalContext.getters.getMeasureFullDependencies(pivotId, measure));
20123
20123
  }
20124
20124
  }
20125
20125
  const originPosition = evalContext.__originCellPosition;
@@ -20616,7 +20616,7 @@ stores.inject(MyMetaStore, storeInstance);
20616
20616
  assertDomainLength(domainArgs);
20617
20617
  const pivot = this.getters.getPivot(pivotId);
20618
20618
  const coreDefinition = this.getters.getPivotCoreDefinition(pivotId);
20619
- addPivotDependencies(this, coreDefinition, coreDefinition.measures.filter((m) => m.id === _measure));
20619
+ addPivotDependencies(this, pivotId, coreDefinition.measures.filter((m) => m.id === _measure));
20620
20620
  pivot.init({ reload: pivot.needsReevaluation });
20621
20621
  const error = pivot.assertIsValid({ throwOnError: false });
20622
20622
  if (error) {
@@ -20649,8 +20649,7 @@ stores.inject(MyMetaStore, storeInstance);
20649
20649
  const _pivotId = getPivotId(_pivotFormulaId, this.getters);
20650
20650
  assertDomainLength(domainArgs);
20651
20651
  const pivot = this.getters.getPivot(_pivotId);
20652
- const coreDefinition = this.getters.getPivotCoreDefinition(_pivotId);
20653
- addPivotDependencies(this, coreDefinition, []);
20652
+ addPivotDependencies(this, _pivotId, []);
20654
20653
  pivot.init({ reload: pivot.needsReevaluation });
20655
20654
  const error = pivot.assertIsValid({ throwOnError: false });
20656
20655
  if (error) {
@@ -20708,7 +20707,7 @@ stores.inject(MyMetaStore, storeInstance);
20708
20707
  const pivotId = getPivotId(_pivotFormulaId, this.getters);
20709
20708
  const pivot = this.getters.getPivot(pivotId);
20710
20709
  const coreDefinition = this.getters.getPivotCoreDefinition(pivotId);
20711
- addPivotDependencies(this, coreDefinition, coreDefinition.measures);
20710
+ addPivotDependencies(this, pivotId, coreDefinition.measures);
20712
20711
  pivot.init({ reload: pivot.needsReevaluation });
20713
20712
  const error = pivot.assertIsValid({ throwOnError: false });
20714
20713
  if (error) {
@@ -35483,7 +35482,7 @@ stores.inject(MyMetaStore, storeInstance);
35483
35482
  }
35484
35483
  captureSelection(zone, col, row) {
35485
35484
  this.model.selection.capture(this, {
35486
- cell: { col: col ?? zone.left, row: row ?? zone.right },
35485
+ cell: { col: col ?? zone.left, row: row ?? zone.top },
35487
35486
  zone,
35488
35487
  }, {
35489
35488
  handleEvent: this.handleEvent.bind(this),
@@ -51370,7 +51369,6 @@ stores.inject(MyMetaStore, storeInstance);
51370
51369
  onGridMoved: Function,
51371
51370
  gridOverlayDimensions: String,
51372
51371
  slots: { type: Object, optional: true },
51373
- getGridSize: Function,
51374
51372
  };
51375
51373
  static components = {
51376
51374
  FiguresContainer,
@@ -51389,14 +51387,7 @@ stores.inject(MyMetaStore, storeInstance);
51389
51387
  setup() {
51390
51388
  useCellHovered(this.env, this.gridOverlay);
51391
51389
  const resizeObserver = new ResizeObserver(() => {
51392
- const boundingRect = this.gridOverlayEl.getBoundingClientRect();
51393
- const { width, height } = this.props.getGridSize();
51394
- this.props.onGridResized({
51395
- x: boundingRect.left,
51396
- y: boundingRect.top,
51397
- height: height,
51398
- width: width,
51399
- });
51390
+ this.props.onGridResized();
51400
51391
  });
51401
51392
  owl.onMounted(() => {
51402
51393
  resizeObserver.observe(this.gridOverlayEl);
@@ -57884,6 +57875,12 @@ stores.inject(MyMetaStore, storeInstance);
57884
57875
  case "ACTIVATE_SHEET":
57885
57876
  this.isSearchDirty = true;
57886
57877
  this.shouldFinalizeUpdateSelection = true;
57878
+ if (this.searchOptions.specificRange) {
57879
+ this.searchOptions.specificRange = {
57880
+ ...this.searchOptions.specificRange,
57881
+ sheetId: this.getters.getActiveSheetId(),
57882
+ };
57883
+ }
57887
57884
  break;
57888
57885
  case "REPLACE_SEARCH":
57889
57886
  for (const match of cmd.matches) {
@@ -58303,9 +58300,20 @@ stores.inject(MyMetaStore, storeInstance);
58303
58300
  const specificRange = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.dataRange);
58304
58301
  this.store.updateSearchOptions({ specificRange });
58305
58302
  }
58303
+ get specificRange() {
58304
+ const range = this.store.searchOptions.specificRange;
58305
+ return range ? this.env.model.getters.getRangeString(range, "forceSheetReference") : "";
58306
+ }
58306
58307
  get pendingSearch() {
58307
58308
  return this.updateSearchContent.isDebouncePending();
58308
58309
  }
58310
+ get selectionInputKey() {
58311
+ // Selections input are made to work with objects linked to a sheet id. They store the active sheet id at their creation,
58312
+ // and have specific behaviour linked to it (eg. go back to the initial sheet after confirmation).
58313
+ // We don't want all those behaviors here, so we force the recreation of the component when the active sheet changes.
58314
+ // The only drawback is that the input loses focus when changing sheet.
58315
+ return this.env.model.getters.getActiveSheetId();
58316
+ }
58309
58317
  }
58310
58318
 
58311
58319
  css /* scss */ `
@@ -61420,7 +61428,8 @@ stores.inject(MyMetaStore, storeInstance);
61420
61428
  });
61421
61429
  return !(rect.width === 0 || rect.height === 0);
61422
61430
  }
61423
- onGridResized({ height, width }) {
61431
+ onGridResized() {
61432
+ const { height, width } = this.props.getGridSize();
61424
61433
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
61425
61434
  width: width - HEADER_WIDTH,
61426
61435
  height: height - HEADER_HEIGHT,
@@ -67614,6 +67623,7 @@ stores.inject(MyMetaStore, storeInstance);
67614
67623
  "getMeasureCompiledFormula",
67615
67624
  "getPivotName",
67616
67625
  "isExistingPivot",
67626
+ "getMeasureFullDependencies",
67617
67627
  ];
67618
67628
  nextFormulaId = 1;
67619
67629
  pivots = {};
@@ -67696,7 +67706,7 @@ stores.inject(MyMetaStore, storeInstance);
67696
67706
  }
67697
67707
  case "UPDATE_PIVOT": {
67698
67708
  this.history.update("pivots", cmd.pivotId, "definition", deepCopy(cmd.pivot));
67699
- this.compileCalculatedMeasures(cmd.pivot.measures);
67709
+ this.compileCalculatedMeasures(cmd.pivotId, cmd.pivot.measures);
67700
67710
  break;
67701
67711
  }
67702
67712
  }
@@ -67714,9 +67724,14 @@ stores.inject(MyMetaStore, storeInstance);
67714
67724
  this.history.update("pivots", pivotId, "definition", newDefinition);
67715
67725
  }
67716
67726
  }
67717
- for (const sheetId in this.compiledMeasureFormulas) {
67718
- for (const formulaString in this.compiledMeasureFormulas[sheetId]) {
67719
- const compiledFormula = this.compiledMeasureFormulas[sheetId][formulaString];
67727
+ for (const pivotId in this.compiledMeasureFormulas) {
67728
+ for (const measureId in this.compiledMeasureFormulas[pivotId]) {
67729
+ const measure = this.pivots[pivotId]?.definition.measures.find((m) => m.id === measureId);
67730
+ if (!measure || !measure.computedBy) {
67731
+ continue;
67732
+ }
67733
+ const sheetId = measure.computedBy.sheetId;
67734
+ const compiledFormula = this.compiledMeasureFormulas[pivotId][measureId].formula;
67720
67735
  const newDependencies = [];
67721
67736
  for (const range of compiledFormula.dependencies) {
67722
67737
  const change = applyChange(range);
@@ -67728,8 +67743,9 @@ stores.inject(MyMetaStore, storeInstance);
67728
67743
  }
67729
67744
  }
67730
67745
  const newFormulaString = this.getters.getFormulaString(sheetId, compiledFormula.tokens, newDependencies);
67731
- if (newFormulaString !== formulaString) {
67732
- this.replaceMeasureFormula(sheetId, formulaString, newFormulaString);
67746
+ const oldFormulaString = measure.computedBy.formula;
67747
+ if (newFormulaString !== oldFormulaString) {
67748
+ this.replaceMeasureFormula(pivotId, measure, newFormulaString);
67733
67749
  }
67734
67750
  }
67735
67751
  }
@@ -67767,31 +67783,60 @@ stores.inject(MyMetaStore, storeInstance);
67767
67783
  isExistingPivot(pivotId) {
67768
67784
  return pivotId in this.pivots;
67769
67785
  }
67770
- getMeasureCompiledFormula(measure) {
67786
+ getMeasureCompiledFormula(pivotId, measure) {
67771
67787
  if (!measure.computedBy) {
67772
67788
  throw new Error(`Measure ${measure.fieldName} is not computed by formula`);
67773
67789
  }
67774
- const sheetId = measure.computedBy.sheetId;
67775
- return this.compiledMeasureFormulas[sheetId][measure.computedBy.formula];
67790
+ return this.compiledMeasureFormulas[pivotId][measure.id].formula;
67791
+ }
67792
+ getMeasureFullDependencies(pivotId, measure) {
67793
+ if (!measure.computedBy) {
67794
+ throw new Error(`Measure ${measure.fieldName} is not computed by formula`);
67795
+ }
67796
+ return this.compiledMeasureFormulas[pivotId][measure.id].dependencies;
67776
67797
  }
67777
67798
  // -------------------------------------------------------------------------
67778
67799
  // Private
67779
67800
  // -------------------------------------------------------------------------
67780
67801
  addPivot(pivotId, pivot, formulaId = this.nextFormulaId.toString()) {
67781
67802
  this.history.update("pivots", pivotId, { definition: deepCopy(pivot), formulaId });
67782
- this.compileCalculatedMeasures(pivot.measures);
67803
+ this.compileCalculatedMeasures(pivotId, pivot.measures);
67783
67804
  this.history.update("formulaIds", formulaId, pivotId);
67784
67805
  this.history.update("nextFormulaId", this.nextFormulaId + 1);
67785
67806
  }
67786
- compileCalculatedMeasures(measures) {
67807
+ compileCalculatedMeasures(pivotId, measures) {
67787
67808
  for (const measure of measures) {
67788
67809
  if (measure.computedBy) {
67789
- const sheetId = measure.computedBy.sheetId;
67790
67810
  const compiledFormula = this.compileMeasureFormula(measure.computedBy.sheetId, measure.computedBy.formula);
67791
- this.history.update("compiledMeasureFormulas", sheetId, measure.computedBy.formula, compiledFormula);
67811
+ this.history.update("compiledMeasureFormulas", pivotId, measure.id, "formula", compiledFormula);
67812
+ }
67813
+ }
67814
+ for (const measure of measures) {
67815
+ if (measure.computedBy) {
67816
+ const dependencies = this.computeMeasureFullDependencies(pivotId, measure);
67817
+ this.history.update("compiledMeasureFormulas", pivotId, measure.id, "dependencies", dependencies);
67792
67818
  }
67793
67819
  }
67794
67820
  }
67821
+ computeMeasureFullDependencies(pivotId, measure, exploredMeasures = new Set()) {
67822
+ const rangeDependencies = [];
67823
+ const definition = this.getPivotCoreDefinition(pivotId);
67824
+ const formula = this.getMeasureCompiledFormula(pivotId, measure);
67825
+ exploredMeasures.add(measure.id);
67826
+ for (const token of formula.tokens) {
67827
+ if (token.type !== "SYMBOL") {
67828
+ continue;
67829
+ }
67830
+ const otherMeasure = definition.measures.find((measureCandidate) => getCanonicalSymbolName(measureCandidate.id) === token.value &&
67831
+ measure.id !== measureCandidate.id);
67832
+ if (!otherMeasure || exploredMeasures.has(otherMeasure.id) || !otherMeasure.computedBy) {
67833
+ continue;
67834
+ }
67835
+ rangeDependencies.push(...this.computeMeasureFullDependencies(pivotId, otherMeasure, exploredMeasures));
67836
+ }
67837
+ rangeDependencies.push(...formula.dependencies.filter((range) => !range.invalidXc));
67838
+ return rangeDependencies;
67839
+ }
67795
67840
  insertPivot(position, formulaId, table) {
67796
67841
  this.resizeSheet(position.sheetId, position, table);
67797
67842
  const pivotCells = table.getPivotCells();
@@ -67850,21 +67895,17 @@ stores.inject(MyMetaStore, storeInstance);
67850
67895
  dependencies: rangeDependencies,
67851
67896
  };
67852
67897
  }
67853
- replaceMeasureFormula(sheetId, formulaString, newFormulaString) {
67854
- this.history.update("compiledMeasureFormulas", sheetId, formulaString, undefined);
67855
- this.history.update("compiledMeasureFormulas", sheetId, newFormulaString, this.compileMeasureFormula(sheetId, newFormulaString));
67856
- for (const pivotId in this.pivots) {
67857
- const pivot = this.pivots[pivotId];
67858
- if (!pivot) {
67859
- continue;
67860
- }
67861
- for (const measure of pivot.definition.measures) {
67862
- if (measure.computedBy?.formula === formulaString) {
67863
- const measureIndex = pivot.definition.measures.indexOf(measure);
67864
- this.history.update("pivots", pivotId, "definition", "measures", measureIndex, "computedBy", { formula: newFormulaString, sheetId });
67865
- }
67866
- }
67898
+ replaceMeasureFormula(pivotId, measure, newFormulaString) {
67899
+ const pivot = this.pivots[pivotId];
67900
+ if (!pivot) {
67901
+ return;
67867
67902
  }
67903
+ const measureIndex = pivot.definition.measures.indexOf(measure);
67904
+ this.history.update("pivots", pivotId, "definition", "measures", measureIndex, "computedBy", {
67905
+ formula: newFormulaString,
67906
+ sheetId: measure.computedBy.sheetId,
67907
+ });
67908
+ this.compileCalculatedMeasures(pivotId, pivot.definition.measures);
67868
67909
  }
67869
67910
  checkSortedColumnInMeasures(definition) {
67870
67911
  const measures = definition.measures.map((measure) => measure.id);
@@ -71714,14 +71755,16 @@ stores.inject(MyMetaStore, storeInstance);
71714
71755
  function withPivotPresentationLayer (PivotClass) {
71715
71756
  class PivotPresentationLayer extends PivotClass {
71716
71757
  getters;
71758
+ pivotId;
71717
71759
  cache = {};
71718
71760
  rankAsc = {};
71719
71761
  rankDesc = {};
71720
71762
  runningTotal = {};
71721
71763
  runningTotalInPercent = {};
71722
- constructor(custom, params) {
71764
+ constructor(pivotId, custom, params) {
71723
71765
  super(custom, params);
71724
71766
  this.getters = params.getters;
71767
+ this.pivotId = pivotId;
71725
71768
  }
71726
71769
  markAsDirtyForEvaluation() {
71727
71770
  this.cache = {};
@@ -71771,7 +71814,7 @@ stores.inject(MyMetaStore, storeInstance);
71771
71814
  return handleError(error, measure.aggregator.toUpperCase());
71772
71815
  }
71773
71816
  }
71774
- const formula = this.getters.getMeasureCompiledFormula(measure);
71817
+ const formula = this.getters.getMeasureCompiledFormula(this.pivotId, measure);
71775
71818
  const getSymbolValue = (symbolName) => {
71776
71819
  const { columns, rows } = this.definition;
71777
71820
  if (columns.find((col) => col.nameWithGranularity === symbolName)) {
@@ -72526,7 +72569,7 @@ stores.inject(MyMetaStore, storeInstance);
72526
72569
  const definition = deepCopy(this.getters.getPivotCoreDefinition(pivotId));
72527
72570
  if (!(pivotId in this.pivots)) {
72528
72571
  const Pivot = withPivotPresentationLayer(pivotRegistry.get(definition.type).ui);
72529
- this.pivots[pivotId] = new Pivot(this.custom, { definition, getters: this.getters });
72572
+ this.pivots[pivotId] = new Pivot(pivotId, this.custom, { definition, getters: this.getters });
72530
72573
  }
72531
72574
  else if (recreate) {
72532
72575
  this.pivots[pivotId].onDefinitionChange(definition);
@@ -74418,7 +74461,7 @@ stores.inject(MyMetaStore, storeInstance);
74418
74461
  }
74419
74462
  delete this.clients[this.clientId];
74420
74463
  this.transportService.leave(this.clientId);
74421
- this.transportService.sendMessage({
74464
+ this.sendToTransport({
74422
74465
  type: "CLIENT_LEFT",
74423
74466
  clientId: this.clientId,
74424
74467
  version: MESSAGE_VERSION,
@@ -74432,7 +74475,7 @@ stores.inject(MyMetaStore, storeInstance);
74432
74475
  return;
74433
74476
  }
74434
74477
  const snapshotId = this.uuidGenerator.uuidv4();
74435
- await this.transportService.sendMessage({
74478
+ await this.sendToTransport({
74436
74479
  type: "SNAPSHOT",
74437
74480
  nextRevisionId: snapshotId,
74438
74481
  serverRevisionId: this.serverRevisionId,
@@ -74480,10 +74523,14 @@ stores.inject(MyMetaStore, storeInstance);
74480
74523
  const type = currentPosition ? "CLIENT_MOVED" : "CLIENT_JOINED";
74481
74524
  const client = this.getCurrentClient();
74482
74525
  this.clients[this.clientId] = { ...client, position };
74483
- this.transportService.sendMessage({
74526
+ this.sendToTransport({
74484
74527
  type,
74485
74528
  version: MESSAGE_VERSION,
74486
74529
  client: { ...client, position },
74530
+ }).then(() => {
74531
+ if (this.pendingMessages.length > 0 && !this.waitingAck) {
74532
+ this.sendPendingMessage();
74533
+ }
74487
74534
  });
74488
74535
  }
74489
74536
  /**
@@ -74564,7 +74611,7 @@ stores.inject(MyMetaStore, storeInstance);
74564
74611
  if (client) {
74565
74612
  const { position } = client;
74566
74613
  if (position) {
74567
- this.transportService.sendMessage({
74614
+ this.sendToTransport({
74568
74615
  type: "CLIENT_MOVED",
74569
74616
  version: MESSAGE_VERSION,
74570
74617
  client: { ...client, position },
@@ -74585,6 +74632,10 @@ stores.inject(MyMetaStore, storeInstance);
74585
74632
  }
74586
74633
  this.sendPendingMessage();
74587
74634
  }
74635
+ async sendToTransport(message) {
74636
+ // wrap in an async function to ensure it returns a promise
74637
+ return this.transportService.sendMessage(message);
74638
+ }
74588
74639
  /**
74589
74640
  * Send the next pending message
74590
74641
  */
@@ -74613,9 +74664,14 @@ stores.inject(MyMetaStore, storeInstance);
74613
74664
  ${JSON.stringify(message)}`);
74614
74665
  }
74615
74666
  this.waitingAck = true;
74616
- this.transportService.sendMessage({
74667
+ this.sendToTransport({
74617
74668
  ...message,
74618
74669
  serverRevisionId: this.serverRevisionId,
74670
+ }).catch((e) => {
74671
+ if (!(e instanceof ClientDisconnectedError)) {
74672
+ throw e.cause || e;
74673
+ }
74674
+ this.waitingAck = false;
74619
74675
  });
74620
74676
  }
74621
74677
  acknowledge(message) {
@@ -82121,10 +82177,8 @@ stores.inject(MyMetaStore, storeInstance);
82121
82177
  });
82122
82178
  }
82123
82179
  get gridContainer() {
82124
- const sheetId = this.env.model.getters.getActiveSheetId();
82125
- const { right } = this.env.model.getters.getSheetZone(sheetId);
82126
- const { end } = this.env.model.getters.getColDimensions(sheetId, right);
82127
- return cssPropertiesToCss({ "max-width": `${end}px` });
82180
+ const maxWidth = this.getMaxSheetWidth();
82181
+ return cssPropertiesToCss({ "max-width": `${maxWidth}px` });
82128
82182
  }
82129
82183
  get gridOverlayDimensions() {
82130
82184
  return cssPropertiesToCss({
@@ -82156,10 +82210,12 @@ stores.inject(MyMetaStore, storeInstance);
82156
82210
  onClosePopover() {
82157
82211
  this.cellPopovers.close();
82158
82212
  }
82159
- onGridResized({ height, width }) {
82213
+ onGridResized() {
82214
+ const { height, width } = this.props.getGridSize();
82215
+ const maxWidth = this.getMaxSheetWidth();
82160
82216
  this.env.model.dispatch("RESIZE_SHEETVIEW", {
82161
- width: width,
82162
- height: height,
82217
+ width: Math.min(maxWidth, width),
82218
+ height,
82163
82219
  gridOffsetX: 0,
82164
82220
  gridOffsetY: 0,
82165
82221
  });
@@ -82177,6 +82233,11 @@ stores.inject(MyMetaStore, storeInstance);
82177
82233
  ...this.env.model.getters.getSheetViewDimensionWithHeaders(),
82178
82234
  };
82179
82235
  }
82236
+ getMaxSheetWidth() {
82237
+ const sheetId = this.env.model.getters.getActiveSheetId();
82238
+ const { right } = this.env.model.getters.getSheetZone(sheetId);
82239
+ return this.env.model.getters.getColDimensions(sheetId, right).end;
82240
+ }
82180
82241
  }
82181
82242
 
82182
82243
  css /* scss */ `
@@ -84418,22 +84479,20 @@ stores.inject(MyMetaStore, storeInstance);
84418
84479
  return this.env.model.getters.getVisibleGroupLayers(sheetId, "COL");
84419
84480
  }
84420
84481
  getGridSize() {
84421
- const topBarHeight = this.spreadsheetRef.el
84422
- ?.querySelector(".o-spreadsheet-topbar-wrapper")
84423
- ?.getBoundingClientRect().height || 0;
84424
- const bottomBarHeight = this.spreadsheetRef.el
84425
- ?.querySelector(".o-spreadsheet-bottombar-wrapper")
84426
- ?.getBoundingClientRect().height || 0;
84427
- const gridWidth = this.spreadsheetRef.el?.querySelector(".o-grid")?.getBoundingClientRect().width || 0;
84428
- const gridHeight = (this.spreadsheetRef.el?.getBoundingClientRect().height || 0) -
84429
- (this.spreadsheetRef.el?.querySelector(".o-column-groups")?.getBoundingClientRect().height ||
84430
- 0) -
84431
- topBarHeight -
84432
- bottomBarHeight;
84433
- return {
84434
- width: Math.max(gridWidth - SCROLLBAR_WIDTH, 0),
84435
- height: Math.max(gridHeight - SCROLLBAR_WIDTH, 0),
84436
- };
84482
+ const el = this.spreadsheetRef.el;
84483
+ if (!el) {
84484
+ return { width: 0, height: 0 };
84485
+ }
84486
+ const getHeight = (selector) => el.querySelector(selector)?.getBoundingClientRect().height || 0;
84487
+ const getWidth = (selector) => el.querySelector(selector)?.getBoundingClientRect().width || 0;
84488
+ const rect = el.getBoundingClientRect();
84489
+ const topBarHeight = getHeight(".o-spreadsheet-topbar-wrapper");
84490
+ const bottomBarHeight = getHeight(".o-spreadsheet-bottombar-wrapper");
84491
+ const colGroupHeight = getHeight(".o-column-groups");
84492
+ const gridWidth = getWidth(".o-grid");
84493
+ const width = Math.max(gridWidth - SCROLLBAR_WIDTH, 0);
84494
+ const height = Math.max(rect.height - topBarHeight - bottomBarHeight - colGroupHeight - SCROLLBAR_WIDTH, 0);
84495
+ return { width, height };
84437
84496
  }
84438
84497
  }
84439
84498
 
@@ -84446,7 +84505,7 @@ stores.inject(MyMetaStore, storeInstance);
84446
84505
  if (message.type === "CLIENT_JOINED" ||
84447
84506
  message.type === "CLIENT_LEFT" ||
84448
84507
  message.type === "CLIENT_MOVED") {
84449
- this.transportService.sendMessage(message);
84508
+ await this.transportService.sendMessage(message);
84450
84509
  }
84451
84510
  // ignore all other messages
84452
84511
  }
@@ -89115,9 +89174,9 @@ stores.inject(MyMetaStore, storeInstance);
89115
89174
  exports.tokenize = tokenize;
89116
89175
 
89117
89176
 
89118
- __info__.version = "19.0.15";
89119
- __info__.date = "2025-12-26T10:19:23.408Z";
89120
- __info__.hash = "fe625c9";
89177
+ __info__.version = "19.0.17";
89178
+ __info__.date = "2026-01-14T10:01:24.044Z";
89179
+ __info__.hash = "2165bad";
89121
89180
 
89122
89181
 
89123
89182
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);