@odoo/o-spreadsheet 18.4.1 → 18.5.0-alpha.0

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 18.4.1
6
- * @date 2025-06-27T09:13:01.303Z
7
- * @hash 5cecc0e
5
+ * @version 18.5.0-alpha.0
6
+ * @date 2025-06-24T12:26:38.163Z
7
+ * @hash ed0f325
8
8
  */
9
9
 
10
10
  'use strict';
@@ -26510,51 +26510,6 @@ cellAnimationRegistry.add("textFadeOut", {
26510
26510
  Object.assign(animatedBox.style, style);
26511
26511
  },
26512
26512
  });
26513
- cellAnimationRegistry.add("iconFadeIn", {
26514
- id: "iconFadeIn",
26515
- easingFn: "easeInCubic",
26516
- hasAnimation: (oldBox, newBox) => {
26517
- return Boolean((!oldBox?.icons?.left && newBox?.icons?.left) ||
26518
- (!oldBox?.icons?.right && newBox?.icons?.right) ||
26519
- (!oldBox?.icons?.center && newBox?.icons?.center));
26520
- },
26521
- updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26522
- const iconOpacity = EASING_FN[this.easingFn](progress);
26523
- if (animatedBox.icons.left && newBox.icons.left && !oldBox.icons.left) {
26524
- animatedBox.icons.left.opacity = iconOpacity;
26525
- }
26526
- if (animatedBox.icons.right && newBox.icons.right && !oldBox.icons.right) {
26527
- animatedBox.icons.right.opacity = iconOpacity;
26528
- }
26529
- if (animatedBox.icons.center && newBox.icons.center && !oldBox.icons.center) {
26530
- animatedBox.icons.center.opacity = iconOpacity;
26531
- }
26532
- },
26533
- });
26534
- cellAnimationRegistry.add("iconFadeOut", {
26535
- id: "iconFadeOut",
26536
- easingFn: "easeOutCubic",
26537
- hasAnimation: (oldBox, newBox) => {
26538
- return Boolean((oldBox?.icons?.left && !newBox?.icons?.left) ||
26539
- (oldBox?.icons?.right && !newBox?.icons?.right) ||
26540
- (oldBox?.icons?.center && !newBox?.icons?.center));
26541
- },
26542
- updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26543
- const iconOpacity = 1 - EASING_FN[this.easingFn](progress);
26544
- if (!animatedBox.icons) {
26545
- animatedBox.icons = {};
26546
- }
26547
- if (oldBox.icons.left && !newBox.icons.left) {
26548
- animatedBox.icons.left = { ...oldBox.icons.left, opacity: iconOpacity };
26549
- }
26550
- if (oldBox.icons.right && !newBox.icons.right) {
26551
- animatedBox.icons.right = { ...oldBox.icons.right, opacity: iconOpacity };
26552
- }
26553
- if (oldBox.icons.center && !newBox.icons.center) {
26554
- animatedBox.icons.center = { ...oldBox.icons.center, opacity: iconOpacity };
26555
- }
26556
- },
26557
- });
26558
26513
  cellAnimationRegistry.add("textChange", {
26559
26514
  id: "textChange",
26560
26515
  easingFn: "easeOutCubic",
@@ -26563,7 +26518,7 @@ cellAnimationRegistry.add("textChange", {
26563
26518
  const newText = newBox?.content?.textLines?.join("\n");
26564
26519
  // Note: here, we also animate changes to icons layout (margins/size change, or icon appearing/disappearing)
26565
26520
  // because a change to the icon layout will impact where the text is positioned.
26566
- return Boolean(oldText && newText && (oldText !== newText || hasIconLayoutChange(newBox, oldBox)));
26521
+ return (Boolean(oldText && newText && oldText !== newText) || hasIconLayoutChange(newBox, oldBox));
26567
26522
  },
26568
26523
  updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26569
26524
  const value = EASING_FN[this.easingFn](progress);
@@ -26578,7 +26533,7 @@ cellAnimationRegistry.add("textChange", {
26578
26533
  height: newBox.height,
26579
26534
  style: { ...newBox.style },
26580
26535
  skipCellGridLines: true,
26581
- content: newBox.content ? { ...newBox.content } : undefined,
26536
+ content: newBox.content,
26582
26537
  clipRect: newBox.clipRect || {
26583
26538
  ...newBox,
26584
26539
  // large width to avoid clipping the text it it didn't have a clipRect before,
@@ -26598,7 +26553,7 @@ cellAnimationRegistry.add("textChange", {
26598
26553
  height: newBox.height,
26599
26554
  style: { ...oldBox.style },
26600
26555
  skipCellGridLines: true,
26601
- content: oldBox.content ? { ...oldBox.content } : undefined,
26556
+ content: oldBox.content,
26602
26557
  clipRect: oldBox.clipRect || {
26603
26558
  ...newBox,
26604
26559
  x: Math.max(0, newBox.x - (oldBox.content?.width || 0)),
@@ -32710,7 +32665,7 @@ class AbstractComposerStore extends SpreadsheetStore {
32710
32665
  }
32711
32666
  captureSelection(zone, col, row) {
32712
32667
  this.model.selection.capture(this, {
32713
- cell: { col: col ?? zone.left, row: row ?? zone.right },
32668
+ cell: { col: col || zone.left, row: row || zone.right },
32714
32669
  zone,
32715
32670
  }, {
32716
32671
  handleEvent: this.handleEvent.bind(this),
@@ -47990,7 +47945,6 @@ class GridRenderer extends SpreadsheetStore {
47990
47945
  continue;
47991
47946
  }
47992
47947
  ctx.save();
47993
- ctx.globalAlpha = icon.opacity ?? 1;
47994
47948
  ctx.beginPath();
47995
47949
  const clipRect = icon.clipRect || box;
47996
47950
  ctx.rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
@@ -52379,9 +52333,6 @@ class ConditionalFormattingPanel extends owl.Component {
52379
52333
  this.switchToList();
52380
52334
  }
52381
52335
  }
52382
- else if (!this.editedCF) {
52383
- this.switchToList();
52384
- }
52385
52336
  });
52386
52337
  }
52387
52338
  get conditionalFormats() {
@@ -81032,28 +80983,26 @@ class SelectionStreamProcessorImpl {
81032
80983
  bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
81033
80984
  };
81034
80985
  };
81035
- const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
81036
- const { col: refCol, row: refRow } = refCell;
80986
+ const { col: refCol, row: refRow } = this.getReferencePosition();
81037
80987
  // check if we can shrink selection
81038
80988
  let n = 0;
81039
80989
  while (result !== null) {
81040
80990
  n++;
81041
80991
  if (deltaCol < 0) {
81042
80992
  const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
81043
- result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
80993
+ result = refCol <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
81044
80994
  }
81045
80995
  if (deltaCol > 0) {
81046
80996
  const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
81047
- result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
80997
+ result = left + n <= refCol ? expand({ top, left: newLeft, bottom, right }) : null;
81048
80998
  }
81049
80999
  if (deltaRow < 0) {
81050
81000
  const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
81051
- result =
81052
- refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
81001
+ result = refRow <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
81053
81002
  }
81054
81003
  if (deltaRow > 0) {
81055
81004
  const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
81056
- result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
81005
+ result = top + n <= refRow ? expand({ top: newTop, left, bottom, right }) : null;
81057
81006
  }
81058
81007
  result = result ? reorderZone(result) : result;
81059
81008
  if (result && !isEqual(result, anchor.zone)) {
@@ -81283,26 +81232,18 @@ class SelectionStreamProcessorImpl {
81283
81232
  * If the anchor is hidden, browses from left to right and top to bottom to
81284
81233
  * find a visible cell.
81285
81234
  */
81286
- getReferenceAnchor() {
81235
+ getReferencePosition() {
81287
81236
  const sheetId = this.getters.getActiveSheetId();
81288
81237
  const anchor = this.anchor;
81289
81238
  const { left, right, top, bottom } = anchor.zone;
81290
81239
  const { col: anchorCol, row: anchorRow } = anchor.cell;
81291
- const col = this.getters.isColHidden(sheetId, anchorCol)
81292
- ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
81293
- : anchorCol;
81294
- const row = this.getters.isRowHidden(sheetId, anchorRow)
81295
- ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
81296
- : anchorRow;
81297
- const zone = this.getters.expandZone(sheetId, {
81298
- left: col,
81299
- right: col,
81300
- top: row,
81301
- bottom: row,
81302
- });
81303
81240
  return {
81304
- cell: { col, row },
81305
- zone,
81241
+ col: this.getters.isColHidden(sheetId, anchorCol)
81242
+ ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
81243
+ : anchorCol,
81244
+ row: this.getters.isRowHidden(sheetId, anchorRow)
81245
+ ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
81246
+ : anchorRow,
81306
81247
  };
81307
81248
  }
81308
81249
  deltaToTarget(position, direction, step) {
@@ -84524,6 +84465,6 @@ exports.tokenColors = tokenColors;
84524
84465
  exports.tokenize = tokenize;
84525
84466
 
84526
84467
 
84527
- __info__.version = "18.4.1";
84528
- __info__.date = "2025-06-27T09:13:01.303Z";
84529
- __info__.hash = "5cecc0e";
84468
+ __info__.version = "18.5.0-alpha.0";
84469
+ __info__.date = "2025-06-24T12:26:38.163Z";
84470
+ __info__.hash = "ed0f325";
@@ -6571,7 +6571,6 @@ type RenderingBorder = {
6571
6571
  };
6572
6572
  type RenderingGridIcon = GridIcon & {
6573
6573
  clipRect?: Rect;
6574
- opacity?: number;
6575
6574
  };
6576
6575
  interface RenderingBox {
6577
6576
  id: string;
@@ -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 18.4.1
6
- * @date 2025-06-27T09:13:01.303Z
7
- * @hash 5cecc0e
5
+ * @version 18.5.0-alpha.0
6
+ * @date 2025-06-24T12:26:38.163Z
7
+ * @hash ed0f325
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';
@@ -26508,51 +26508,6 @@ cellAnimationRegistry.add("textFadeOut", {
26508
26508
  Object.assign(animatedBox.style, style);
26509
26509
  },
26510
26510
  });
26511
- cellAnimationRegistry.add("iconFadeIn", {
26512
- id: "iconFadeIn",
26513
- easingFn: "easeInCubic",
26514
- hasAnimation: (oldBox, newBox) => {
26515
- return Boolean((!oldBox?.icons?.left && newBox?.icons?.left) ||
26516
- (!oldBox?.icons?.right && newBox?.icons?.right) ||
26517
- (!oldBox?.icons?.center && newBox?.icons?.center));
26518
- },
26519
- updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26520
- const iconOpacity = EASING_FN[this.easingFn](progress);
26521
- if (animatedBox.icons.left && newBox.icons.left && !oldBox.icons.left) {
26522
- animatedBox.icons.left.opacity = iconOpacity;
26523
- }
26524
- if (animatedBox.icons.right && newBox.icons.right && !oldBox.icons.right) {
26525
- animatedBox.icons.right.opacity = iconOpacity;
26526
- }
26527
- if (animatedBox.icons.center && newBox.icons.center && !oldBox.icons.center) {
26528
- animatedBox.icons.center.opacity = iconOpacity;
26529
- }
26530
- },
26531
- });
26532
- cellAnimationRegistry.add("iconFadeOut", {
26533
- id: "iconFadeOut",
26534
- easingFn: "easeOutCubic",
26535
- hasAnimation: (oldBox, newBox) => {
26536
- return Boolean((oldBox?.icons?.left && !newBox?.icons?.left) ||
26537
- (oldBox?.icons?.right && !newBox?.icons?.right) ||
26538
- (oldBox?.icons?.center && !newBox?.icons?.center));
26539
- },
26540
- updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26541
- const iconOpacity = 1 - EASING_FN[this.easingFn](progress);
26542
- if (!animatedBox.icons) {
26543
- animatedBox.icons = {};
26544
- }
26545
- if (oldBox.icons.left && !newBox.icons.left) {
26546
- animatedBox.icons.left = { ...oldBox.icons.left, opacity: iconOpacity };
26547
- }
26548
- if (oldBox.icons.right && !newBox.icons.right) {
26549
- animatedBox.icons.right = { ...oldBox.icons.right, opacity: iconOpacity };
26550
- }
26551
- if (oldBox.icons.center && !newBox.icons.center) {
26552
- animatedBox.icons.center = { ...oldBox.icons.center, opacity: iconOpacity };
26553
- }
26554
- },
26555
- });
26556
26511
  cellAnimationRegistry.add("textChange", {
26557
26512
  id: "textChange",
26558
26513
  easingFn: "easeOutCubic",
@@ -26561,7 +26516,7 @@ cellAnimationRegistry.add("textChange", {
26561
26516
  const newText = newBox?.content?.textLines?.join("\n");
26562
26517
  // Note: here, we also animate changes to icons layout (margins/size change, or icon appearing/disappearing)
26563
26518
  // because a change to the icon layout will impact where the text is positioned.
26564
- return Boolean(oldText && newText && (oldText !== newText || hasIconLayoutChange(newBox, oldBox)));
26519
+ return (Boolean(oldText && newText && oldText !== newText) || hasIconLayoutChange(newBox, oldBox));
26565
26520
  },
26566
26521
  updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26567
26522
  const value = EASING_FN[this.easingFn](progress);
@@ -26576,7 +26531,7 @@ cellAnimationRegistry.add("textChange", {
26576
26531
  height: newBox.height,
26577
26532
  style: { ...newBox.style },
26578
26533
  skipCellGridLines: true,
26579
- content: newBox.content ? { ...newBox.content } : undefined,
26534
+ content: newBox.content,
26580
26535
  clipRect: newBox.clipRect || {
26581
26536
  ...newBox,
26582
26537
  // large width to avoid clipping the text it it didn't have a clipRect before,
@@ -26596,7 +26551,7 @@ cellAnimationRegistry.add("textChange", {
26596
26551
  height: newBox.height,
26597
26552
  style: { ...oldBox.style },
26598
26553
  skipCellGridLines: true,
26599
- content: oldBox.content ? { ...oldBox.content } : undefined,
26554
+ content: oldBox.content,
26600
26555
  clipRect: oldBox.clipRect || {
26601
26556
  ...newBox,
26602
26557
  x: Math.max(0, newBox.x - (oldBox.content?.width || 0)),
@@ -32708,7 +32663,7 @@ class AbstractComposerStore extends SpreadsheetStore {
32708
32663
  }
32709
32664
  captureSelection(zone, col, row) {
32710
32665
  this.model.selection.capture(this, {
32711
- cell: { col: col ?? zone.left, row: row ?? zone.right },
32666
+ cell: { col: col || zone.left, row: row || zone.right },
32712
32667
  zone,
32713
32668
  }, {
32714
32669
  handleEvent: this.handleEvent.bind(this),
@@ -47988,7 +47943,6 @@ class GridRenderer extends SpreadsheetStore {
47988
47943
  continue;
47989
47944
  }
47990
47945
  ctx.save();
47991
- ctx.globalAlpha = icon.opacity ?? 1;
47992
47946
  ctx.beginPath();
47993
47947
  const clipRect = icon.clipRect || box;
47994
47948
  ctx.rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
@@ -52377,9 +52331,6 @@ class ConditionalFormattingPanel extends Component {
52377
52331
  this.switchToList();
52378
52332
  }
52379
52333
  }
52380
- else if (!this.editedCF) {
52381
- this.switchToList();
52382
- }
52383
52334
  });
52384
52335
  }
52385
52336
  get conditionalFormats() {
@@ -81030,28 +80981,26 @@ class SelectionStreamProcessorImpl {
81030
80981
  bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
81031
80982
  };
81032
80983
  };
81033
- const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
81034
- const { col: refCol, row: refRow } = refCell;
80984
+ const { col: refCol, row: refRow } = this.getReferencePosition();
81035
80985
  // check if we can shrink selection
81036
80986
  let n = 0;
81037
80987
  while (result !== null) {
81038
80988
  n++;
81039
80989
  if (deltaCol < 0) {
81040
80990
  const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
81041
- result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
80991
+ result = refCol <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
81042
80992
  }
81043
80993
  if (deltaCol > 0) {
81044
80994
  const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
81045
- result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
80995
+ result = left + n <= refCol ? expand({ top, left: newLeft, bottom, right }) : null;
81046
80996
  }
81047
80997
  if (deltaRow < 0) {
81048
80998
  const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
81049
- result =
81050
- refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
80999
+ result = refRow <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
81051
81000
  }
81052
81001
  if (deltaRow > 0) {
81053
81002
  const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
81054
- result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
81003
+ result = top + n <= refRow ? expand({ top: newTop, left, bottom, right }) : null;
81055
81004
  }
81056
81005
  result = result ? reorderZone(result) : result;
81057
81006
  if (result && !isEqual(result, anchor.zone)) {
@@ -81281,26 +81230,18 @@ class SelectionStreamProcessorImpl {
81281
81230
  * If the anchor is hidden, browses from left to right and top to bottom to
81282
81231
  * find a visible cell.
81283
81232
  */
81284
- getReferenceAnchor() {
81233
+ getReferencePosition() {
81285
81234
  const sheetId = this.getters.getActiveSheetId();
81286
81235
  const anchor = this.anchor;
81287
81236
  const { left, right, top, bottom } = anchor.zone;
81288
81237
  const { col: anchorCol, row: anchorRow } = anchor.cell;
81289
- const col = this.getters.isColHidden(sheetId, anchorCol)
81290
- ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
81291
- : anchorCol;
81292
- const row = this.getters.isRowHidden(sheetId, anchorRow)
81293
- ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
81294
- : anchorRow;
81295
- const zone = this.getters.expandZone(sheetId, {
81296
- left: col,
81297
- right: col,
81298
- top: row,
81299
- bottom: row,
81300
- });
81301
81238
  return {
81302
- cell: { col, row },
81303
- zone,
81239
+ col: this.getters.isColHidden(sheetId, anchorCol)
81240
+ ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
81241
+ : anchorCol,
81242
+ row: this.getters.isRowHidden(sheetId, anchorRow)
81243
+ ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
81244
+ : anchorRow,
81304
81245
  };
81305
81246
  }
81306
81247
  deltaToTarget(position, direction, step) {
@@ -84474,6 +84415,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
84474
84415
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
84475
84416
 
84476
84417
 
84477
- __info__.version = "18.4.1";
84478
- __info__.date = "2025-06-27T09:13:01.303Z";
84479
- __info__.hash = "5cecc0e";
84418
+ __info__.version = "18.5.0-alpha.0";
84419
+ __info__.date = "2025-06-24T12:26:38.163Z";
84420
+ __info__.hash = "ed0f325";
@@ -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 18.4.1
6
- * @date 2025-06-27T09:13:01.303Z
7
- * @hash 5cecc0e
5
+ * @version 18.5.0-alpha.0
6
+ * @date 2025-06-24T12:26:38.163Z
7
+ * @hash ed0f325
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -26509,51 +26509,6 @@ stores.inject(MyMetaStore, storeInstance);
26509
26509
  Object.assign(animatedBox.style, style);
26510
26510
  },
26511
26511
  });
26512
- cellAnimationRegistry.add("iconFadeIn", {
26513
- id: "iconFadeIn",
26514
- easingFn: "easeInCubic",
26515
- hasAnimation: (oldBox, newBox) => {
26516
- return Boolean((!oldBox?.icons?.left && newBox?.icons?.left) ||
26517
- (!oldBox?.icons?.right && newBox?.icons?.right) ||
26518
- (!oldBox?.icons?.center && newBox?.icons?.center));
26519
- },
26520
- updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26521
- const iconOpacity = EASING_FN[this.easingFn](progress);
26522
- if (animatedBox.icons.left && newBox.icons.left && !oldBox.icons.left) {
26523
- animatedBox.icons.left.opacity = iconOpacity;
26524
- }
26525
- if (animatedBox.icons.right && newBox.icons.right && !oldBox.icons.right) {
26526
- animatedBox.icons.right.opacity = iconOpacity;
26527
- }
26528
- if (animatedBox.icons.center && newBox.icons.center && !oldBox.icons.center) {
26529
- animatedBox.icons.center.opacity = iconOpacity;
26530
- }
26531
- },
26532
- });
26533
- cellAnimationRegistry.add("iconFadeOut", {
26534
- id: "iconFadeOut",
26535
- easingFn: "easeOutCubic",
26536
- hasAnimation: (oldBox, newBox) => {
26537
- return Boolean((oldBox?.icons?.left && !newBox?.icons?.left) ||
26538
- (oldBox?.icons?.right && !newBox?.icons?.right) ||
26539
- (oldBox?.icons?.center && !newBox?.icons?.center));
26540
- },
26541
- updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26542
- const iconOpacity = 1 - EASING_FN[this.easingFn](progress);
26543
- if (!animatedBox.icons) {
26544
- animatedBox.icons = {};
26545
- }
26546
- if (oldBox.icons.left && !newBox.icons.left) {
26547
- animatedBox.icons.left = { ...oldBox.icons.left, opacity: iconOpacity };
26548
- }
26549
- if (oldBox.icons.right && !newBox.icons.right) {
26550
- animatedBox.icons.right = { ...oldBox.icons.right, opacity: iconOpacity };
26551
- }
26552
- if (oldBox.icons.center && !newBox.icons.center) {
26553
- animatedBox.icons.center = { ...oldBox.icons.center, opacity: iconOpacity };
26554
- }
26555
- },
26556
- });
26557
26512
  cellAnimationRegistry.add("textChange", {
26558
26513
  id: "textChange",
26559
26514
  easingFn: "easeOutCubic",
@@ -26562,7 +26517,7 @@ stores.inject(MyMetaStore, storeInstance);
26562
26517
  const newText = newBox?.content?.textLines?.join("\n");
26563
26518
  // Note: here, we also animate changes to icons layout (margins/size change, or icon appearing/disappearing)
26564
26519
  // because a change to the icon layout will impact where the text is positioned.
26565
- return Boolean(oldText && newText && (oldText !== newText || hasIconLayoutChange(newBox, oldBox)));
26520
+ return (Boolean(oldText && newText && oldText !== newText) || hasIconLayoutChange(newBox, oldBox));
26566
26521
  },
26567
26522
  updateAnimation: function (progress, animatedBox, oldBox, newBox) {
26568
26523
  const value = EASING_FN[this.easingFn](progress);
@@ -26577,7 +26532,7 @@ stores.inject(MyMetaStore, storeInstance);
26577
26532
  height: newBox.height,
26578
26533
  style: { ...newBox.style },
26579
26534
  skipCellGridLines: true,
26580
- content: newBox.content ? { ...newBox.content } : undefined,
26535
+ content: newBox.content,
26581
26536
  clipRect: newBox.clipRect || {
26582
26537
  ...newBox,
26583
26538
  // large width to avoid clipping the text it it didn't have a clipRect before,
@@ -26597,7 +26552,7 @@ stores.inject(MyMetaStore, storeInstance);
26597
26552
  height: newBox.height,
26598
26553
  style: { ...oldBox.style },
26599
26554
  skipCellGridLines: true,
26600
- content: oldBox.content ? { ...oldBox.content } : undefined,
26555
+ content: oldBox.content,
26601
26556
  clipRect: oldBox.clipRect || {
26602
26557
  ...newBox,
26603
26558
  x: Math.max(0, newBox.x - (oldBox.content?.width || 0)),
@@ -32709,7 +32664,7 @@ stores.inject(MyMetaStore, storeInstance);
32709
32664
  }
32710
32665
  captureSelection(zone, col, row) {
32711
32666
  this.model.selection.capture(this, {
32712
- cell: { col: col ?? zone.left, row: row ?? zone.right },
32667
+ cell: { col: col || zone.left, row: row || zone.right },
32713
32668
  zone,
32714
32669
  }, {
32715
32670
  handleEvent: this.handleEvent.bind(this),
@@ -47989,7 +47944,6 @@ stores.inject(MyMetaStore, storeInstance);
47989
47944
  continue;
47990
47945
  }
47991
47946
  ctx.save();
47992
- ctx.globalAlpha = icon.opacity ?? 1;
47993
47947
  ctx.beginPath();
47994
47948
  const clipRect = icon.clipRect || box;
47995
47949
  ctx.rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
@@ -52378,9 +52332,6 @@ stores.inject(MyMetaStore, storeInstance);
52378
52332
  this.switchToList();
52379
52333
  }
52380
52334
  }
52381
- else if (!this.editedCF) {
52382
- this.switchToList();
52383
- }
52384
52335
  });
52385
52336
  }
52386
52337
  get conditionalFormats() {
@@ -81031,28 +80982,26 @@ stores.inject(MyMetaStore, storeInstance);
81031
80982
  bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
81032
80983
  };
81033
80984
  };
81034
- const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
81035
- const { col: refCol, row: refRow } = refCell;
80985
+ const { col: refCol, row: refRow } = this.getReferencePosition();
81036
80986
  // check if we can shrink selection
81037
80987
  let n = 0;
81038
80988
  while (result !== null) {
81039
80989
  n++;
81040
80990
  if (deltaCol < 0) {
81041
80991
  const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
81042
- result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
80992
+ result = refCol <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
81043
80993
  }
81044
80994
  if (deltaCol > 0) {
81045
80995
  const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
81046
- result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
80996
+ result = left + n <= refCol ? expand({ top, left: newLeft, bottom, right }) : null;
81047
80997
  }
81048
80998
  if (deltaRow < 0) {
81049
80999
  const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
81050
- result =
81051
- refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
81000
+ result = refRow <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
81052
81001
  }
81053
81002
  if (deltaRow > 0) {
81054
81003
  const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
81055
- result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
81004
+ result = top + n <= refRow ? expand({ top: newTop, left, bottom, right }) : null;
81056
81005
  }
81057
81006
  result = result ? reorderZone(result) : result;
81058
81007
  if (result && !isEqual(result, anchor.zone)) {
@@ -81282,26 +81231,18 @@ stores.inject(MyMetaStore, storeInstance);
81282
81231
  * If the anchor is hidden, browses from left to right and top to bottom to
81283
81232
  * find a visible cell.
81284
81233
  */
81285
- getReferenceAnchor() {
81234
+ getReferencePosition() {
81286
81235
  const sheetId = this.getters.getActiveSheetId();
81287
81236
  const anchor = this.anchor;
81288
81237
  const { left, right, top, bottom } = anchor.zone;
81289
81238
  const { col: anchorCol, row: anchorRow } = anchor.cell;
81290
- const col = this.getters.isColHidden(sheetId, anchorCol)
81291
- ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
81292
- : anchorCol;
81293
- const row = this.getters.isRowHidden(sheetId, anchorRow)
81294
- ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
81295
- : anchorRow;
81296
- const zone = this.getters.expandZone(sheetId, {
81297
- left: col,
81298
- right: col,
81299
- top: row,
81300
- bottom: row,
81301
- });
81302
81239
  return {
81303
- cell: { col, row },
81304
- zone,
81240
+ col: this.getters.isColHidden(sheetId, anchorCol)
81241
+ ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
81242
+ : anchorCol,
81243
+ row: this.getters.isRowHidden(sheetId, anchorRow)
81244
+ ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
81245
+ : anchorRow,
81305
81246
  };
81306
81247
  }
81307
81248
  deltaToTarget(position, direction, step) {
@@ -84523,9 +84464,9 @@ stores.inject(MyMetaStore, storeInstance);
84523
84464
  exports.tokenize = tokenize;
84524
84465
 
84525
84466
 
84526
- __info__.version = "18.4.1";
84527
- __info__.date = "2025-06-27T09:13:01.303Z";
84528
- __info__.hash = "5cecc0e";
84467
+ __info__.version = "18.5.0-alpha.0";
84468
+ __info__.date = "2025-06-24T12:26:38.163Z";
84469
+ __info__.hash = "ed0f325";
84529
84470
 
84530
84471
 
84531
84472
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);