@odoo/o-spreadsheet 17.1.7 → 17.1.9

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 17.1.7
6
- * @date 2024-03-12T07:56:10.783Z
7
- * @hash 3a9f334
5
+ * @version 17.1.9
6
+ * @date 2024-03-25T09:43:27.017Z
7
+ * @hash 5fb076e
8
8
  */
9
9
 
10
10
  'use strict';
@@ -11129,6 +11129,9 @@ function makeArg(str, description) {
11129
11129
  result.default = true;
11130
11130
  result.defaultValue = defaultValue;
11131
11131
  }
11132
+ if (types.some((t) => t.startsWith("RANGE"))) {
11133
+ result.acceptMatrix = true;
11134
+ }
11132
11135
  return result;
11133
11136
  }
11134
11137
  /**
@@ -19724,11 +19727,27 @@ class FunctionRegistry extends Registry {
19724
19727
  }
19725
19728
  const descr = addMetaInfoFromArg(addDescr);
19726
19729
  validateArguments(descr.args);
19727
- this.mapping[name] = addErrorHandling(addResultHandling(descr.compute), name);
19730
+ this.mapping[name] = addErrorHandling(addResultHandling(addInputHandling(descr)), name);
19728
19731
  super.add(name, descr);
19729
19732
  return this;
19730
19733
  }
19731
19734
  }
19735
+ function addInputHandling(descr) {
19736
+ function computeWithInputHandling(...args) {
19737
+ for (let i = 0; i < args.length; i++) {
19738
+ const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
19739
+ const arg = args[i];
19740
+ if (isMatrix(arg) && !argDefinition.acceptMatrix) {
19741
+ if (arg.length !== 1 || arg[0].length !== 1) {
19742
+ throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
19743
+ }
19744
+ args[i] = arg[0][0];
19745
+ }
19746
+ }
19747
+ return descr.compute.apply(this, args);
19748
+ }
19749
+ return computeWithInputHandling;
19750
+ }
19732
19751
  function addErrorHandling(compute, functionName) {
19733
19752
  return function (...args) {
19734
19753
  try {
@@ -19979,14 +19998,19 @@ const categorieFunctionAll = {
19979
19998
  children: [allFunctionListMenuBuilder],
19980
19999
  };
19981
20000
  function allFunctionListMenuBuilder() {
19982
- const fnNames = functionRegistry.getKeys();
20001
+ const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
19983
20002
  return createFormulaFunctions(fnNames);
19984
20003
  }
19985
20004
  const categoriesFunctionListMenuBuilder = () => {
19986
20005
  const functions = functionRegistry.content;
19987
- const categories = [...new Set(functionRegistry.getAll().map((fn) => fn.category))].filter(isDefined$1);
20006
+ const categories = [
20007
+ ...new Set(functionRegistry
20008
+ .getAll()
20009
+ .filter((fn) => !fn.hidden)
20010
+ .map((fn) => fn.category)),
20011
+ ].filter(isDefined$1);
19988
20012
  return categories.sort().map((category, i) => {
19989
- const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
20013
+ const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
19990
20014
  return {
19991
20015
  name: category,
19992
20016
  children: createFormulaFunctions(functionsInCategory),
@@ -23775,11 +23799,9 @@ css /* scss */ `
23775
23799
  }
23776
23800
  .o-cell-is-operator {
23777
23801
  margin-bottom: 5px;
23778
- width: 96%;
23779
23802
  }
23780
23803
  .o-cell-is-value {
23781
23804
  margin-bottom: 5px;
23782
- width: 96%;
23783
23805
  }
23784
23806
  .o-color-picker-widget .o-color-picker-button {
23785
23807
  pointer-events: all;
@@ -26199,6 +26221,9 @@ class FigureComponent extends owl.Component {
26199
26221
  el?.focus({ preventScroll: true });
26200
26222
  }
26201
26223
  }, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
26224
+ owl.onWillUnmount(() => {
26225
+ this.props.onFigureDeleted();
26226
+ });
26202
26227
  }
26203
26228
  clickAnchor(dirX, dirY, ev) {
26204
26229
  this.props.onClickAnchor(dirX, dirY, ev);
@@ -26217,6 +26242,7 @@ class FigureComponent extends owl.Component {
26217
26242
  this.props.onFigureDeleted();
26218
26243
  ev.stopPropagation();
26219
26244
  ev.preventDefault();
26245
+ ev.stopPropagation();
26220
26246
  break;
26221
26247
  case "ArrowDown":
26222
26248
  case "ArrowLeft":
@@ -26237,6 +26263,7 @@ class FigureComponent extends owl.Component {
26237
26263
  });
26238
26264
  ev.stopPropagation();
26239
26265
  ev.preventDefault();
26266
+ ev.stopPropagation();
26240
26267
  break;
26241
26268
  }
26242
26269
  }
@@ -26911,6 +26938,7 @@ function compareContentToSpanElement(content, node) {
26911
26938
  // -----------------------------------------------------------------------------
26912
26939
  css /* scss */ `
26913
26940
  .o-formula-assistant {
26941
+ background: #ffffff;
26914
26942
  .o-formula-assistant-head {
26915
26943
  background-color: #f2f2f2;
26916
26944
  padding: 10px;
@@ -26966,6 +26994,9 @@ class FunctionDescriptionProvider extends owl.Component {
26966
26994
  this.assistantState.allowCellSelectionBehind = false;
26967
26995
  }, 2000);
26968
26996
  }
26997
+ get formulaArgSeparator() {
26998
+ return this.env.model.getters.getLocale().formulaArgSeparator + " ";
26999
+ }
26969
27000
  }
26970
27001
 
26971
27002
  const functions$2 = functionRegistry.content;
@@ -27123,6 +27154,12 @@ class Composer extends owl.Component {
27123
27154
  owl.useEffect(() => {
27124
27155
  this.processContent();
27125
27156
  });
27157
+ owl.onPatched(() => {
27158
+ // Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
27159
+ if (this.env.model.getters.getEditionMode() === "inactive") {
27160
+ this.processTokenAtCursor();
27161
+ }
27162
+ });
27126
27163
  }
27127
27164
  // ---------------------------------------------------------------------------
27128
27165
  // Handlers
@@ -28038,7 +28075,7 @@ function dragFigureForMove({ x: mouseX, y: mouseY }, { x: mouseInitialX, y: mous
28038
28075
  function clamp(value, min, max) {
28039
28076
  return Math.min(Math.max(value, min), max);
28040
28077
  }
28041
- function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize) {
28078
+ function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize, { scrollX, scrollY }) {
28042
28079
  let { x, y, width, height } = initialFigure;
28043
28080
  if (keepRatio && dirX != 0 && dirY != 0) {
28044
28081
  const deltaX = Math.min(dirX * (mouseInitialX - mouseX), initialFigure.width - minFigSize);
@@ -28065,14 +28102,14 @@ function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }
28065
28102
  y = initialFigure.y - deltaY;
28066
28103
  }
28067
28104
  }
28068
- // Restrict resizing if x or y reaches header boundaries
28069
- if (x < 0) {
28070
- width += x;
28071
- x = 0;
28105
+ // Adjusts figure dimensions to ensure it remains within header boundaries and viewport during resizing.
28106
+ if (x + scrollX <= 0) {
28107
+ width = width + x + scrollX;
28108
+ x = -scrollX;
28072
28109
  }
28073
- if (y < 0) {
28074
- height += y;
28075
- y = 0;
28110
+ if (y + scrollY <= 0) {
28111
+ height = height + y + scrollY;
28112
+ y = -scrollY;
28076
28113
  }
28077
28114
  return { ...initialFigure, x, y, width, height };
28078
28115
  }
@@ -28492,7 +28529,7 @@ class FiguresContainer extends owl.Component {
28492
28529
  const minFigSize = figureRegistry.get(figure.tag).minFigSize || MIN_FIG_SIZE;
28493
28530
  const onMouseMove = (ev) => {
28494
28531
  const currentMousePosition = { x: ev.clientX, y: ev.clientY };
28495
- const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minFigSize);
28532
+ const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minFigSize, this.env.model.getters.getActiveSheetScrollInfo());
28496
28533
  const otherFigures = this.getOtherFigures(figure.id);
28497
28534
  const snapResult = snapForResize(this.env.model.getters, dirX, dirY, draggedFigure, otherFigures);
28498
28535
  this.dnd.draggedFigure = snapResult.snappedFigure;
@@ -37308,6 +37345,15 @@ class FigurePlugin extends CorePlugin {
37308
37345
  return "Success" /* CommandResult.Success */;
37309
37346
  }
37310
37347
  }
37348
+ beforeHandle(cmd) {
37349
+ switch (cmd.type) {
37350
+ case "DELETE_SHEET":
37351
+ this.getters.getFigures(cmd.sheetId).forEach((figure) => {
37352
+ this.dispatch("DELETE_FIGURE", { id: figure.id, sheetId: cmd.sheetId });
37353
+ });
37354
+ break;
37355
+ }
37356
+ }
37311
37357
  handle(cmd) {
37312
37358
  switch (cmd.type) {
37313
37359
  case "CREATE_SHEET":
@@ -49677,6 +49723,7 @@ class GridSelectionPlugin extends UIPlugin {
49677
49723
  this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
49678
49724
  this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
49679
49725
  this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
49726
+ this.selectedFigureId = null;
49680
49727
  break;
49681
49728
  }
49682
49729
  /** Any change to the selection has to be reflected in the selection processor. */
@@ -51546,6 +51593,9 @@ class BottomBarSheet extends owl.Component {
51546
51593
  this.scrollToSheet();
51547
51594
  }
51548
51595
  onDblClick() {
51596
+ if (this.env.model.getters.isReadonly()) {
51597
+ return;
51598
+ }
51549
51599
  this.startEdition();
51550
51600
  }
51551
51601
  onKeyDown(ev) {
@@ -53214,9 +53264,6 @@ css /* scss */ `
53214
53264
  .text-muted {
53215
53265
  color: grey !important;
53216
53266
  }
53217
- button {
53218
- color: #333;
53219
- }
53220
53267
  .o-disabled {
53221
53268
  opacity: 0.4;
53222
53269
  pointer: default;
@@ -53337,17 +53384,17 @@ css /* scss */ `
53337
53384
  }
53338
53385
 
53339
53386
  .o-button {
53340
- border: 1px solid lightgrey;
53387
+ border: 1px solid;
53341
53388
  padding: 0px 20px 0px 20px;
53342
53389
  border-radius: 4px;
53343
53390
  font-weight: 500;
53344
53391
  font-size: 14px;
53345
53392
  height: 30px;
53346
53393
  line-height: 16px;
53347
- background: white;
53348
53394
  margin-right: 8px;
53349
- &:hover:enabled {
53350
- background-color: rgba(0, 0, 0, 0.08);
53395
+
53396
+ &:not(:hover) {
53397
+ background-color: transparent;
53351
53398
  }
53352
53399
 
53353
53400
  &:enabled {
@@ -53361,6 +53408,15 @@ css /* scss */ `
53361
53408
  &:last-child {
53362
53409
  margin-right: 0px;
53363
53410
  }
53411
+
53412
+ &.o-button-grey {
53413
+ border-color: lightgrey;
53414
+ background: #ffffff;
53415
+ color: #333;
53416
+ &:hover:enabled {
53417
+ background-color: rgba(0, 0, 0, 0.08);
53418
+ }
53419
+ }
53364
53420
  }
53365
53421
 
53366
53422
  .o-input {
@@ -57276,6 +57332,6 @@ exports.setTranslationMethod = setTranslationMethod;
57276
57332
  exports.tokenize = tokenize;
57277
57333
 
57278
57334
 
57279
- __info__.version = "17.1.7";
57280
- __info__.date = "2024-03-12T07:56:10.783Z";
57281
- __info__.hash = "3a9f334";
57335
+ __info__.version = "17.1.9";
57336
+ __info__.date = "2024-03-25T09:43:27.017Z";
57337
+ __info__.hash = "5fb076e";
@@ -3533,6 +3533,7 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
3533
3533
  [sheet: string]: Record<UID, Figure | undefined> | undefined;
3534
3534
  };
3535
3535
  allowDispatch(cmd: CoreCommand): CommandResult;
3536
+ beforeHandle(cmd: CoreCommand): void;
3536
3537
  handle(cmd: CoreCommand): void;
3537
3538
  private onRowColDelete;
3538
3539
  private onRowDeletion;
@@ -5203,6 +5204,7 @@ type Getters = {
5203
5204
 
5204
5205
  type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
5205
5206
  interface ArgDefinition {
5207
+ acceptMatrix?: boolean;
5206
5208
  repeating?: boolean;
5207
5209
  optional?: boolean;
5208
5210
  description: string;
@@ -7805,7 +7807,7 @@ interface Props$a {
7805
7807
  interface AssistantState {
7806
7808
  allowCellSelectionBehind: boolean;
7807
7809
  }
7808
- declare class FunctionDescriptionProvider extends Component<Props$a> {
7810
+ declare class FunctionDescriptionProvider extends Component<Props$a, SpreadsheetChildEnv> {
7809
7811
  static template: string;
7810
7812
  static props: {
7811
7813
  functionName: StringConstructor;
@@ -7817,6 +7819,7 @@ declare class FunctionDescriptionProvider extends Component<Props$a> {
7817
7819
  setup(): void;
7818
7820
  getContext(): Props$a;
7819
7821
  onMouseMove(): void;
7822
+ get formulaArgSeparator(): string;
7820
7823
  }
7821
7824
 
7822
7825
  type HtmlContent = {
@@ -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 17.1.7
6
- * @date 2024-03-12T07:56:10.783Z
7
- * @hash 3a9f334
5
+ * @version 17.1.9
6
+ * @date 2024-03-25T09:43:27.017Z
7
+ * @hash 5fb076e
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -11127,6 +11127,9 @@ function makeArg(str, description) {
11127
11127
  result.default = true;
11128
11128
  result.defaultValue = defaultValue;
11129
11129
  }
11130
+ if (types.some((t) => t.startsWith("RANGE"))) {
11131
+ result.acceptMatrix = true;
11132
+ }
11130
11133
  return result;
11131
11134
  }
11132
11135
  /**
@@ -19722,11 +19725,27 @@ class FunctionRegistry extends Registry {
19722
19725
  }
19723
19726
  const descr = addMetaInfoFromArg(addDescr);
19724
19727
  validateArguments(descr.args);
19725
- this.mapping[name] = addErrorHandling(addResultHandling(descr.compute), name);
19728
+ this.mapping[name] = addErrorHandling(addResultHandling(addInputHandling(descr)), name);
19726
19729
  super.add(name, descr);
19727
19730
  return this;
19728
19731
  }
19729
19732
  }
19733
+ function addInputHandling(descr) {
19734
+ function computeWithInputHandling(...args) {
19735
+ for (let i = 0; i < args.length; i++) {
19736
+ const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
19737
+ const arg = args[i];
19738
+ if (isMatrix(arg) && !argDefinition.acceptMatrix) {
19739
+ if (arg.length !== 1 || arg[0].length !== 1) {
19740
+ throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
19741
+ }
19742
+ args[i] = arg[0][0];
19743
+ }
19744
+ }
19745
+ return descr.compute.apply(this, args);
19746
+ }
19747
+ return computeWithInputHandling;
19748
+ }
19730
19749
  function addErrorHandling(compute, functionName) {
19731
19750
  return function (...args) {
19732
19751
  try {
@@ -19977,14 +19996,19 @@ const categorieFunctionAll = {
19977
19996
  children: [allFunctionListMenuBuilder],
19978
19997
  };
19979
19998
  function allFunctionListMenuBuilder() {
19980
- const fnNames = functionRegistry.getKeys();
19999
+ const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
19981
20000
  return createFormulaFunctions(fnNames);
19982
20001
  }
19983
20002
  const categoriesFunctionListMenuBuilder = () => {
19984
20003
  const functions = functionRegistry.content;
19985
- const categories = [...new Set(functionRegistry.getAll().map((fn) => fn.category))].filter(isDefined$1);
20004
+ const categories = [
20005
+ ...new Set(functionRegistry
20006
+ .getAll()
20007
+ .filter((fn) => !fn.hidden)
20008
+ .map((fn) => fn.category)),
20009
+ ].filter(isDefined$1);
19986
20010
  return categories.sort().map((category, i) => {
19987
- const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
20011
+ const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
19988
20012
  return {
19989
20013
  name: category,
19990
20014
  children: createFormulaFunctions(functionsInCategory),
@@ -23773,11 +23797,9 @@ css /* scss */ `
23773
23797
  }
23774
23798
  .o-cell-is-operator {
23775
23799
  margin-bottom: 5px;
23776
- width: 96%;
23777
23800
  }
23778
23801
  .o-cell-is-value {
23779
23802
  margin-bottom: 5px;
23780
- width: 96%;
23781
23803
  }
23782
23804
  .o-color-picker-widget .o-color-picker-button {
23783
23805
  pointer-events: all;
@@ -26197,6 +26219,9 @@ class FigureComponent extends Component {
26197
26219
  el?.focus({ preventScroll: true });
26198
26220
  }
26199
26221
  }, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
26222
+ onWillUnmount(() => {
26223
+ this.props.onFigureDeleted();
26224
+ });
26200
26225
  }
26201
26226
  clickAnchor(dirX, dirY, ev) {
26202
26227
  this.props.onClickAnchor(dirX, dirY, ev);
@@ -26215,6 +26240,7 @@ class FigureComponent extends Component {
26215
26240
  this.props.onFigureDeleted();
26216
26241
  ev.stopPropagation();
26217
26242
  ev.preventDefault();
26243
+ ev.stopPropagation();
26218
26244
  break;
26219
26245
  case "ArrowDown":
26220
26246
  case "ArrowLeft":
@@ -26235,6 +26261,7 @@ class FigureComponent extends Component {
26235
26261
  });
26236
26262
  ev.stopPropagation();
26237
26263
  ev.preventDefault();
26264
+ ev.stopPropagation();
26238
26265
  break;
26239
26266
  }
26240
26267
  }
@@ -26909,6 +26936,7 @@ function compareContentToSpanElement(content, node) {
26909
26936
  // -----------------------------------------------------------------------------
26910
26937
  css /* scss */ `
26911
26938
  .o-formula-assistant {
26939
+ background: #ffffff;
26912
26940
  .o-formula-assistant-head {
26913
26941
  background-color: #f2f2f2;
26914
26942
  padding: 10px;
@@ -26964,6 +26992,9 @@ class FunctionDescriptionProvider extends Component {
26964
26992
  this.assistantState.allowCellSelectionBehind = false;
26965
26993
  }, 2000);
26966
26994
  }
26995
+ get formulaArgSeparator() {
26996
+ return this.env.model.getters.getLocale().formulaArgSeparator + " ";
26997
+ }
26967
26998
  }
26968
26999
 
26969
27000
  const functions$2 = functionRegistry.content;
@@ -27121,6 +27152,12 @@ class Composer extends Component {
27121
27152
  useEffect(() => {
27122
27153
  this.processContent();
27123
27154
  });
27155
+ onPatched(() => {
27156
+ // Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
27157
+ if (this.env.model.getters.getEditionMode() === "inactive") {
27158
+ this.processTokenAtCursor();
27159
+ }
27160
+ });
27124
27161
  }
27125
27162
  // ---------------------------------------------------------------------------
27126
27163
  // Handlers
@@ -28036,7 +28073,7 @@ function dragFigureForMove({ x: mouseX, y: mouseY }, { x: mouseInitialX, y: mous
28036
28073
  function clamp(value, min, max) {
28037
28074
  return Math.min(Math.max(value, min), max);
28038
28075
  }
28039
- function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize) {
28076
+ function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }, { x: mouseInitialX, y: mouseInitialY }, keepRatio, minFigSize, { scrollX, scrollY }) {
28040
28077
  let { x, y, width, height } = initialFigure;
28041
28078
  if (keepRatio && dirX != 0 && dirY != 0) {
28042
28079
  const deltaX = Math.min(dirX * (mouseInitialX - mouseX), initialFigure.width - minFigSize);
@@ -28063,14 +28100,14 @@ function dragFigureForResize(initialFigure, dirX, dirY, { x: mouseX, y: mouseY }
28063
28100
  y = initialFigure.y - deltaY;
28064
28101
  }
28065
28102
  }
28066
- // Restrict resizing if x or y reaches header boundaries
28067
- if (x < 0) {
28068
- width += x;
28069
- x = 0;
28103
+ // Adjusts figure dimensions to ensure it remains within header boundaries and viewport during resizing.
28104
+ if (x + scrollX <= 0) {
28105
+ width = width + x + scrollX;
28106
+ x = -scrollX;
28070
28107
  }
28071
- if (y < 0) {
28072
- height += y;
28073
- y = 0;
28108
+ if (y + scrollY <= 0) {
28109
+ height = height + y + scrollY;
28110
+ y = -scrollY;
28074
28111
  }
28075
28112
  return { ...initialFigure, x, y, width, height };
28076
28113
  }
@@ -28490,7 +28527,7 @@ class FiguresContainer extends Component {
28490
28527
  const minFigSize = figureRegistry.get(figure.tag).minFigSize || MIN_FIG_SIZE;
28491
28528
  const onMouseMove = (ev) => {
28492
28529
  const currentMousePosition = { x: ev.clientX, y: ev.clientY };
28493
- const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minFigSize);
28530
+ const draggedFigure = dragFigureForResize(initialFig, dirX, dirY, currentMousePosition, initialMousePosition, keepRatio, minFigSize, this.env.model.getters.getActiveSheetScrollInfo());
28494
28531
  const otherFigures = this.getOtherFigures(figure.id);
28495
28532
  const snapResult = snapForResize(this.env.model.getters, dirX, dirY, draggedFigure, otherFigures);
28496
28533
  this.dnd.draggedFigure = snapResult.snappedFigure;
@@ -37306,6 +37343,15 @@ class FigurePlugin extends CorePlugin {
37306
37343
  return "Success" /* CommandResult.Success */;
37307
37344
  }
37308
37345
  }
37346
+ beforeHandle(cmd) {
37347
+ switch (cmd.type) {
37348
+ case "DELETE_SHEET":
37349
+ this.getters.getFigures(cmd.sheetId).forEach((figure) => {
37350
+ this.dispatch("DELETE_FIGURE", { id: figure.id, sheetId: cmd.sheetId });
37351
+ });
37352
+ break;
37353
+ }
37354
+ }
37309
37355
  handle(cmd) {
37310
37356
  switch (cmd.type) {
37311
37357
  case "CREATE_SHEET":
@@ -49675,6 +49721,7 @@ class GridSelectionPlugin extends UIPlugin {
49675
49721
  this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
49676
49722
  this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
49677
49723
  this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
49724
+ this.selectedFigureId = null;
49678
49725
  break;
49679
49726
  }
49680
49727
  /** Any change to the selection has to be reflected in the selection processor. */
@@ -51544,6 +51591,9 @@ class BottomBarSheet extends Component {
51544
51591
  this.scrollToSheet();
51545
51592
  }
51546
51593
  onDblClick() {
51594
+ if (this.env.model.getters.isReadonly()) {
51595
+ return;
51596
+ }
51547
51597
  this.startEdition();
51548
51598
  }
51549
51599
  onKeyDown(ev) {
@@ -53212,9 +53262,6 @@ css /* scss */ `
53212
53262
  .text-muted {
53213
53263
  color: grey !important;
53214
53264
  }
53215
- button {
53216
- color: #333;
53217
- }
53218
53265
  .o-disabled {
53219
53266
  opacity: 0.4;
53220
53267
  pointer: default;
@@ -53335,17 +53382,17 @@ css /* scss */ `
53335
53382
  }
53336
53383
 
53337
53384
  .o-button {
53338
- border: 1px solid lightgrey;
53385
+ border: 1px solid;
53339
53386
  padding: 0px 20px 0px 20px;
53340
53387
  border-radius: 4px;
53341
53388
  font-weight: 500;
53342
53389
  font-size: 14px;
53343
53390
  height: 30px;
53344
53391
  line-height: 16px;
53345
- background: white;
53346
53392
  margin-right: 8px;
53347
- &:hover:enabled {
53348
- background-color: rgba(0, 0, 0, 0.08);
53393
+
53394
+ &:not(:hover) {
53395
+ background-color: transparent;
53349
53396
  }
53350
53397
 
53351
53398
  &:enabled {
@@ -53359,6 +53406,15 @@ css /* scss */ `
53359
53406
  &:last-child {
53360
53407
  margin-right: 0px;
53361
53408
  }
53409
+
53410
+ &.o-button-grey {
53411
+ border-color: lightgrey;
53412
+ background: #ffffff;
53413
+ color: #333;
53414
+ &:hover:enabled {
53415
+ background-color: rgba(0, 0, 0, 0.08);
53416
+ }
53417
+ }
53362
53418
  }
53363
53419
 
53364
53420
  .o-input {
@@ -57238,6 +57294,6 @@ const constants = {
57238
57294
  export { AbstractChart, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
57239
57295
 
57240
57296
 
57241
- __info__.version = "17.1.7";
57242
- __info__.date = "2024-03-12T07:56:10.783Z";
57243
- __info__.hash = "3a9f334";
57297
+ __info__.version = "17.1.9";
57298
+ __info__.date = "2024-03-25T09:43:27.017Z";
57299
+ __info__.hash = "5fb076e";