@odoo/o-spreadsheet 18.4.0 → 18.4.1

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