@odoo/o-spreadsheet 16.0.55 → 16.0.56

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.
@@ -10688,15 +10688,23 @@ class ChartFigure extends owl.Component {
10688
10688
  ChartFigure.template = "o-spreadsheet-ChartFigure";
10689
10689
  ChartFigure.components = { Menu };
10690
10690
 
10691
+ /**
10692
+ * Start listening to pointer events and apply the given callbacks.
10693
+ *
10694
+ * @returns A function to remove the listeners.
10695
+ */
10691
10696
  function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
10692
- const _onMouseUp = (ev) => {
10693
- onMouseUp(ev);
10697
+ const removeListeners = () => {
10694
10698
  window.removeEventListener("mousedown", onMouseDown);
10695
10699
  window.removeEventListener("mouseup", _onMouseUp);
10696
10700
  window.removeEventListener("dragstart", _onDragStart);
10697
10701
  window.removeEventListener("mousemove", onMouseMove);
10698
10702
  window.removeEventListener("wheel", onMouseMove);
10699
10703
  };
10704
+ const _onMouseUp = (ev) => {
10705
+ onMouseUp(ev);
10706
+ removeListeners();
10707
+ };
10700
10708
  function _onDragStart(ev) {
10701
10709
  ev.preventDefault();
10702
10710
  }
@@ -10705,6 +10713,7 @@ function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
10705
10713
  window.addEventListener("dragstart", _onDragStart);
10706
10714
  window.addEventListener("mousemove", onMouseMove);
10707
10715
  window.addEventListener("wheel", onMouseMove);
10716
+ return removeListeners;
10708
10717
  }
10709
10718
  /**
10710
10719
  * Function to be used during a mousedown event, this function allows to
@@ -18399,13 +18408,12 @@ function tokenizeSymbol(chars) {
18399
18408
  }
18400
18409
  const whiteSpaceRegexp = /\s/;
18401
18410
  function tokenizeSpace(chars) {
18402
- let length = 0;
18411
+ let spaces = "";
18403
18412
  while (chars[0] && chars[0].match(whiteSpaceRegexp)) {
18404
- length++;
18405
- chars.shift();
18413
+ spaces += chars.shift();
18406
18414
  }
18407
- if (length) {
18408
- return { type: "SPACE", value: " ".repeat(length) };
18415
+ if (spaces) {
18416
+ return { type: "SPACE", value: spaces };
18409
18417
  }
18410
18418
  return null;
18411
18419
  }
@@ -20432,11 +20440,11 @@ css /* scss */ `
20432
20440
  }
20433
20441
 
20434
20442
  /* Custom css to highlight topbar composer on focus */
20435
- .o-topbar-toolbar .o-composer-container:focus-within {
20436
- border: 1px solid ${SELECTION_BORDER_COLOR};
20443
+ .o-topbar-toolbar .o-composer-container[active] {
20444
+ border: 1px solid ${SELECTION_BORDER_COLOR} !important;
20437
20445
  }
20438
20446
 
20439
- .o-topbar-toolbar .o-composer-container {
20447
+ .o-topbar-toolbar .o-composer-container[active] {
20440
20448
  z-index: ${ComponentsImportance.TopBarComposer};
20441
20449
  }
20442
20450
  `;
@@ -21385,6 +21393,7 @@ class FiguresContainer extends owl.Component {
21385
21393
  y: 0,
21386
21394
  width: 0,
21387
21395
  height: 0,
21396
+ cancelDnd: undefined,
21388
21397
  });
21389
21398
  }
21390
21399
  setup() {
@@ -21398,11 +21407,24 @@ class FiguresContainer extends owl.Component {
21398
21407
  // new rendering
21399
21408
  this.render();
21400
21409
  });
21410
+ owl.onWillUpdateProps(() => {
21411
+ const sheetId = this.env.model.getters.getActiveSheetId();
21412
+ if (this.dnd.figId && !this.env.model.getters.getFigure(sheetId, this.dnd.figId)) {
21413
+ if (this.dnd.cancelDnd) {
21414
+ this.dnd.cancelDnd();
21415
+ }
21416
+ this.dnd.figId = undefined;
21417
+ this.dnd.cancelDnd = undefined;
21418
+ }
21419
+ });
21401
21420
  }
21402
21421
  getVisibleFigures() {
21403
21422
  const visibleFigures = this.env.model.getters.getVisibleFigures();
21404
21423
  if (this.dnd.figId && !visibleFigures.some((figure) => figure.id === this.dnd.figId)) {
21405
- visibleFigures.push(this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId));
21424
+ const draggedFigure = this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId);
21425
+ if (draggedFigure) {
21426
+ visibleFigures.push(draggedFigure);
21427
+ }
21406
21428
  }
21407
21429
  return visibleFigures;
21408
21430
  }
@@ -21515,7 +21537,7 @@ class FiguresContainer extends owl.Component {
21515
21537
  this.dnd.figId = undefined;
21516
21538
  this.env.model.dispatch("UPDATE_FIGURE", { sheetId, id: figure.id, x, y });
21517
21539
  };
21518
- startDnd(onMouseMove, onMouseUp);
21540
+ this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
21519
21541
  }
21520
21542
  startResize(figure, dirX, dirY, ev) {
21521
21543
  ev.stopPropagation();
@@ -21569,7 +21591,7 @@ class FiguresContainer extends owl.Component {
21569
21591
  ...update,
21570
21592
  });
21571
21593
  };
21572
- startDnd(onMouseMove, onMouseUp);
21594
+ this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
21573
21595
  }
21574
21596
  getDndFigure() {
21575
21597
  const figure = this.getVisibleFigures().find((fig) => fig.id === this.dnd.figId);
@@ -27938,7 +27960,6 @@ class BordersPlugin extends CorePlugin {
27938
27960
  }
27939
27961
  BordersPlugin.getters = ["getCellBorder"];
27940
27962
 
27941
- const nbspRegexp = new RegExp(String.fromCharCode(160), "g");
27942
27963
  const LINK_STYLE = { textColor: LINK_COLOR };
27943
27964
  /**
27944
27965
  * Core Plugin
@@ -28272,13 +28293,10 @@ class CellPlugin extends CorePlugin {
28272
28293
  return id;
28273
28294
  }
28274
28295
  updateCell(sheetId, col, row, after) {
28275
- var _a;
28276
28296
  const before = this.getters.getCell(sheetId, col, row);
28277
28297
  const hasContent = "content" in after || "formula" in after;
28278
28298
  // Compute the new cell properties
28279
- const afterContent = hasContent
28280
- ? ((_a = after.content) === null || _a === void 0 ? void 0 : _a.replace(nbspRegexp, "")) || ""
28281
- : (before === null || before === void 0 ? void 0 : before.content) || "";
28299
+ const afterContent = (hasContent ? after.content : before === null || before === void 0 ? void 0 : before.content) || "";
28282
28300
  let style;
28283
28301
  if (after.style !== undefined) {
28284
28302
  style = after.style || undefined;
@@ -37162,6 +37180,7 @@ class SheetViewPlugin extends UIPlugin {
37162
37180
  break;
37163
37181
  case "DELETE_SHEET":
37164
37182
  this.cleanViewports();
37183
+ this.sheetsWithDirtyViewports.delete(cmd.sheetId);
37165
37184
  break;
37166
37185
  case "ACTIVATE_SHEET":
37167
37186
  this.setViewports();
@@ -37514,6 +37533,9 @@ class SheetViewPlugin extends UIPlugin {
37514
37533
  };
37515
37534
  }
37516
37535
  resetViewports(sheetId) {
37536
+ if (!this.getters.tryGetSheet(sheetId)) {
37537
+ return;
37538
+ }
37517
37539
  const { xSplit, ySplit } = this.getters.getPaneDivisions(sheetId);
37518
37540
  const nCols = this.getters.getNumberCols(sheetId);
37519
37541
  const nRows = this.getters.getNumberRows(sheetId);
@@ -43462,6 +43484,6 @@ exports.setTranslationMethod = setTranslationMethod;
43462
43484
  exports.tokenize = tokenize;
43463
43485
 
43464
43486
 
43465
- __info__.version = '16.0.55';
43466
- __info__.date = '2024-11-13T15:02:56.109Z';
43467
- __info__.hash = '6984990';
43487
+ __info__.version = '16.0.56';
43488
+ __info__.date = '2024-12-19T07:45:47.250Z';
43489
+ __info__.hash = '9d0e335';
@@ -5721,6 +5721,7 @@ interface DndState {
5721
5721
  y: Pixel;
5722
5722
  width: Pixel;
5723
5723
  height: Pixel;
5724
+ cancelDnd: (() => void) | undefined;
5724
5725
  }
5725
5726
  interface Props$e {
5726
5727
  sidePanelIsOpen: Boolean;
@@ -10684,15 +10684,23 @@ class ChartFigure extends Component {
10684
10684
  ChartFigure.template = "o-spreadsheet-ChartFigure";
10685
10685
  ChartFigure.components = { Menu };
10686
10686
 
10687
+ /**
10688
+ * Start listening to pointer events and apply the given callbacks.
10689
+ *
10690
+ * @returns A function to remove the listeners.
10691
+ */
10687
10692
  function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
10688
- const _onMouseUp = (ev) => {
10689
- onMouseUp(ev);
10693
+ const removeListeners = () => {
10690
10694
  window.removeEventListener("mousedown", onMouseDown);
10691
10695
  window.removeEventListener("mouseup", _onMouseUp);
10692
10696
  window.removeEventListener("dragstart", _onDragStart);
10693
10697
  window.removeEventListener("mousemove", onMouseMove);
10694
10698
  window.removeEventListener("wheel", onMouseMove);
10695
10699
  };
10700
+ const _onMouseUp = (ev) => {
10701
+ onMouseUp(ev);
10702
+ removeListeners();
10703
+ };
10696
10704
  function _onDragStart(ev) {
10697
10705
  ev.preventDefault();
10698
10706
  }
@@ -10701,6 +10709,7 @@ function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
10701
10709
  window.addEventListener("dragstart", _onDragStart);
10702
10710
  window.addEventListener("mousemove", onMouseMove);
10703
10711
  window.addEventListener("wheel", onMouseMove);
10712
+ return removeListeners;
10704
10713
  }
10705
10714
  /**
10706
10715
  * Function to be used during a mousedown event, this function allows to
@@ -18395,13 +18404,12 @@ function tokenizeSymbol(chars) {
18395
18404
  }
18396
18405
  const whiteSpaceRegexp = /\s/;
18397
18406
  function tokenizeSpace(chars) {
18398
- let length = 0;
18407
+ let spaces = "";
18399
18408
  while (chars[0] && chars[0].match(whiteSpaceRegexp)) {
18400
- length++;
18401
- chars.shift();
18409
+ spaces += chars.shift();
18402
18410
  }
18403
- if (length) {
18404
- return { type: "SPACE", value: " ".repeat(length) };
18411
+ if (spaces) {
18412
+ return { type: "SPACE", value: spaces };
18405
18413
  }
18406
18414
  return null;
18407
18415
  }
@@ -20428,11 +20436,11 @@ css /* scss */ `
20428
20436
  }
20429
20437
 
20430
20438
  /* Custom css to highlight topbar composer on focus */
20431
- .o-topbar-toolbar .o-composer-container:focus-within {
20432
- border: 1px solid ${SELECTION_BORDER_COLOR};
20439
+ .o-topbar-toolbar .o-composer-container[active] {
20440
+ border: 1px solid ${SELECTION_BORDER_COLOR} !important;
20433
20441
  }
20434
20442
 
20435
- .o-topbar-toolbar .o-composer-container {
20443
+ .o-topbar-toolbar .o-composer-container[active] {
20436
20444
  z-index: ${ComponentsImportance.TopBarComposer};
20437
20445
  }
20438
20446
  `;
@@ -21381,6 +21389,7 @@ class FiguresContainer extends Component {
21381
21389
  y: 0,
21382
21390
  width: 0,
21383
21391
  height: 0,
21392
+ cancelDnd: undefined,
21384
21393
  });
21385
21394
  }
21386
21395
  setup() {
@@ -21394,11 +21403,24 @@ class FiguresContainer extends Component {
21394
21403
  // new rendering
21395
21404
  this.render();
21396
21405
  });
21406
+ onWillUpdateProps(() => {
21407
+ const sheetId = this.env.model.getters.getActiveSheetId();
21408
+ if (this.dnd.figId && !this.env.model.getters.getFigure(sheetId, this.dnd.figId)) {
21409
+ if (this.dnd.cancelDnd) {
21410
+ this.dnd.cancelDnd();
21411
+ }
21412
+ this.dnd.figId = undefined;
21413
+ this.dnd.cancelDnd = undefined;
21414
+ }
21415
+ });
21397
21416
  }
21398
21417
  getVisibleFigures() {
21399
21418
  const visibleFigures = this.env.model.getters.getVisibleFigures();
21400
21419
  if (this.dnd.figId && !visibleFigures.some((figure) => figure.id === this.dnd.figId)) {
21401
- visibleFigures.push(this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId));
21420
+ const draggedFigure = this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId);
21421
+ if (draggedFigure) {
21422
+ visibleFigures.push(draggedFigure);
21423
+ }
21402
21424
  }
21403
21425
  return visibleFigures;
21404
21426
  }
@@ -21511,7 +21533,7 @@ class FiguresContainer extends Component {
21511
21533
  this.dnd.figId = undefined;
21512
21534
  this.env.model.dispatch("UPDATE_FIGURE", { sheetId, id: figure.id, x, y });
21513
21535
  };
21514
- startDnd(onMouseMove, onMouseUp);
21536
+ this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
21515
21537
  }
21516
21538
  startResize(figure, dirX, dirY, ev) {
21517
21539
  ev.stopPropagation();
@@ -21565,7 +21587,7 @@ class FiguresContainer extends Component {
21565
21587
  ...update,
21566
21588
  });
21567
21589
  };
21568
- startDnd(onMouseMove, onMouseUp);
21590
+ this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
21569
21591
  }
21570
21592
  getDndFigure() {
21571
21593
  const figure = this.getVisibleFigures().find((fig) => fig.id === this.dnd.figId);
@@ -27934,7 +27956,6 @@ class BordersPlugin extends CorePlugin {
27934
27956
  }
27935
27957
  BordersPlugin.getters = ["getCellBorder"];
27936
27958
 
27937
- const nbspRegexp = new RegExp(String.fromCharCode(160), "g");
27938
27959
  const LINK_STYLE = { textColor: LINK_COLOR };
27939
27960
  /**
27940
27961
  * Core Plugin
@@ -28268,13 +28289,10 @@ class CellPlugin extends CorePlugin {
28268
28289
  return id;
28269
28290
  }
28270
28291
  updateCell(sheetId, col, row, after) {
28271
- var _a;
28272
28292
  const before = this.getters.getCell(sheetId, col, row);
28273
28293
  const hasContent = "content" in after || "formula" in after;
28274
28294
  // Compute the new cell properties
28275
- const afterContent = hasContent
28276
- ? ((_a = after.content) === null || _a === void 0 ? void 0 : _a.replace(nbspRegexp, "")) || ""
28277
- : (before === null || before === void 0 ? void 0 : before.content) || "";
28295
+ const afterContent = (hasContent ? after.content : before === null || before === void 0 ? void 0 : before.content) || "";
28278
28296
  let style;
28279
28297
  if (after.style !== undefined) {
28280
28298
  style = after.style || undefined;
@@ -37158,6 +37176,7 @@ class SheetViewPlugin extends UIPlugin {
37158
37176
  break;
37159
37177
  case "DELETE_SHEET":
37160
37178
  this.cleanViewports();
37179
+ this.sheetsWithDirtyViewports.delete(cmd.sheetId);
37161
37180
  break;
37162
37181
  case "ACTIVATE_SHEET":
37163
37182
  this.setViewports();
@@ -37510,6 +37529,9 @@ class SheetViewPlugin extends UIPlugin {
37510
37529
  };
37511
37530
  }
37512
37531
  resetViewports(sheetId) {
37532
+ if (!this.getters.tryGetSheet(sheetId)) {
37533
+ return;
37534
+ }
37513
37535
  const { xSplit, ySplit } = this.getters.getPaneDivisions(sheetId);
37514
37536
  const nCols = this.getters.getNumberCols(sheetId);
37515
37537
  const nRows = this.getters.getNumberRows(sheetId);
@@ -43430,6 +43452,6 @@ function addFunction(functionName, functionDescription) {
43430
43452
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
43431
43453
 
43432
43454
 
43433
- __info__.version = '16.0.55';
43434
- __info__.date = '2024-11-13T15:02:56.109Z';
43435
- __info__.hash = '6984990';
43455
+ __info__.version = '16.0.56';
43456
+ __info__.date = '2024-12-19T07:45:47.250Z';
43457
+ __info__.hash = '9d0e335';
@@ -10685,15 +10685,23 @@
10685
10685
  ChartFigure.template = "o-spreadsheet-ChartFigure";
10686
10686
  ChartFigure.components = { Menu };
10687
10687
 
10688
+ /**
10689
+ * Start listening to pointer events and apply the given callbacks.
10690
+ *
10691
+ * @returns A function to remove the listeners.
10692
+ */
10688
10693
  function startDnd(onMouseMove, onMouseUp, onMouseDown = () => { }) {
10689
- const _onMouseUp = (ev) => {
10690
- onMouseUp(ev);
10694
+ const removeListeners = () => {
10691
10695
  window.removeEventListener("mousedown", onMouseDown);
10692
10696
  window.removeEventListener("mouseup", _onMouseUp);
10693
10697
  window.removeEventListener("dragstart", _onDragStart);
10694
10698
  window.removeEventListener("mousemove", onMouseMove);
10695
10699
  window.removeEventListener("wheel", onMouseMove);
10696
10700
  };
10701
+ const _onMouseUp = (ev) => {
10702
+ onMouseUp(ev);
10703
+ removeListeners();
10704
+ };
10697
10705
  function _onDragStart(ev) {
10698
10706
  ev.preventDefault();
10699
10707
  }
@@ -10702,6 +10710,7 @@
10702
10710
  window.addEventListener("dragstart", _onDragStart);
10703
10711
  window.addEventListener("mousemove", onMouseMove);
10704
10712
  window.addEventListener("wheel", onMouseMove);
10713
+ return removeListeners;
10705
10714
  }
10706
10715
  /**
10707
10716
  * Function to be used during a mousedown event, this function allows to
@@ -18396,13 +18405,12 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
18396
18405
  }
18397
18406
  const whiteSpaceRegexp = /\s/;
18398
18407
  function tokenizeSpace(chars) {
18399
- let length = 0;
18408
+ let spaces = "";
18400
18409
  while (chars[0] && chars[0].match(whiteSpaceRegexp)) {
18401
- length++;
18402
- chars.shift();
18410
+ spaces += chars.shift();
18403
18411
  }
18404
- if (length) {
18405
- return { type: "SPACE", value: " ".repeat(length) };
18412
+ if (spaces) {
18413
+ return { type: "SPACE", value: spaces };
18406
18414
  }
18407
18415
  return null;
18408
18416
  }
@@ -20429,11 +20437,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
20429
20437
  }
20430
20438
 
20431
20439
  /* Custom css to highlight topbar composer on focus */
20432
- .o-topbar-toolbar .o-composer-container:focus-within {
20433
- border: 1px solid ${SELECTION_BORDER_COLOR};
20440
+ .o-topbar-toolbar .o-composer-container[active] {
20441
+ border: 1px solid ${SELECTION_BORDER_COLOR} !important;
20434
20442
  }
20435
20443
 
20436
- .o-topbar-toolbar .o-composer-container {
20444
+ .o-topbar-toolbar .o-composer-container[active] {
20437
20445
  z-index: ${ComponentsImportance.TopBarComposer};
20438
20446
  }
20439
20447
  `;
@@ -21382,6 +21390,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
21382
21390
  y: 0,
21383
21391
  width: 0,
21384
21392
  height: 0,
21393
+ cancelDnd: undefined,
21385
21394
  });
21386
21395
  }
21387
21396
  setup() {
@@ -21395,11 +21404,24 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
21395
21404
  // new rendering
21396
21405
  this.render();
21397
21406
  });
21407
+ owl.onWillUpdateProps(() => {
21408
+ const sheetId = this.env.model.getters.getActiveSheetId();
21409
+ if (this.dnd.figId && !this.env.model.getters.getFigure(sheetId, this.dnd.figId)) {
21410
+ if (this.dnd.cancelDnd) {
21411
+ this.dnd.cancelDnd();
21412
+ }
21413
+ this.dnd.figId = undefined;
21414
+ this.dnd.cancelDnd = undefined;
21415
+ }
21416
+ });
21398
21417
  }
21399
21418
  getVisibleFigures() {
21400
21419
  const visibleFigures = this.env.model.getters.getVisibleFigures();
21401
21420
  if (this.dnd.figId && !visibleFigures.some((figure) => figure.id === this.dnd.figId)) {
21402
- visibleFigures.push(this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId));
21421
+ const draggedFigure = this.env.model.getters.getFigure(this.env.model.getters.getActiveSheetId(), this.dnd.figId);
21422
+ if (draggedFigure) {
21423
+ visibleFigures.push(draggedFigure);
21424
+ }
21403
21425
  }
21404
21426
  return visibleFigures;
21405
21427
  }
@@ -21512,7 +21534,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
21512
21534
  this.dnd.figId = undefined;
21513
21535
  this.env.model.dispatch("UPDATE_FIGURE", { sheetId, id: figure.id, x, y });
21514
21536
  };
21515
- startDnd(onMouseMove, onMouseUp);
21537
+ this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
21516
21538
  }
21517
21539
  startResize(figure, dirX, dirY, ev) {
21518
21540
  ev.stopPropagation();
@@ -21566,7 +21588,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
21566
21588
  ...update,
21567
21589
  });
21568
21590
  };
21569
- startDnd(onMouseMove, onMouseUp);
21591
+ this.dnd.cancelDnd = startDnd(onMouseMove, onMouseUp);
21570
21592
  }
21571
21593
  getDndFigure() {
21572
21594
  const figure = this.getVisibleFigures().find((fig) => fig.id === this.dnd.figId);
@@ -27935,7 +27957,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
27935
27957
  }
27936
27958
  BordersPlugin.getters = ["getCellBorder"];
27937
27959
 
27938
- const nbspRegexp = new RegExp(String.fromCharCode(160), "g");
27939
27960
  const LINK_STYLE = { textColor: LINK_COLOR };
27940
27961
  /**
27941
27962
  * Core Plugin
@@ -28269,13 +28290,10 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
28269
28290
  return id;
28270
28291
  }
28271
28292
  updateCell(sheetId, col, row, after) {
28272
- var _a;
28273
28293
  const before = this.getters.getCell(sheetId, col, row);
28274
28294
  const hasContent = "content" in after || "formula" in after;
28275
28295
  // Compute the new cell properties
28276
- const afterContent = hasContent
28277
- ? ((_a = after.content) === null || _a === void 0 ? void 0 : _a.replace(nbspRegexp, "")) || ""
28278
- : (before === null || before === void 0 ? void 0 : before.content) || "";
28296
+ const afterContent = (hasContent ? after.content : before === null || before === void 0 ? void 0 : before.content) || "";
28279
28297
  let style;
28280
28298
  if (after.style !== undefined) {
28281
28299
  style = after.style || undefined;
@@ -37159,6 +37177,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
37159
37177
  break;
37160
37178
  case "DELETE_SHEET":
37161
37179
  this.cleanViewports();
37180
+ this.sheetsWithDirtyViewports.delete(cmd.sheetId);
37162
37181
  break;
37163
37182
  case "ACTIVATE_SHEET":
37164
37183
  this.setViewports();
@@ -37511,6 +37530,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
37511
37530
  };
37512
37531
  }
37513
37532
  resetViewports(sheetId) {
37533
+ if (!this.getters.tryGetSheet(sheetId)) {
37534
+ return;
37535
+ }
37514
37536
  const { xSplit, ySplit } = this.getters.getPaneDivisions(sheetId);
37515
37537
  const nCols = this.getters.getNumberCols(sheetId);
37516
37538
  const nRows = this.getters.getNumberRows(sheetId);
@@ -43461,9 +43483,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43461
43483
  Object.defineProperty(exports, '__esModule', { value: true });
43462
43484
 
43463
43485
 
43464
- __info__.version = '16.0.55';
43465
- __info__.date = '2024-11-13T15:02:56.109Z';
43466
- __info__.hash = '6984990';
43486
+ __info__.version = '16.0.56';
43487
+ __info__.date = '2024-12-19T07:45:47.250Z';
43488
+ __info__.hash = '9d0e335';
43467
43489
 
43468
43490
 
43469
43491
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);