@odoo/o-spreadsheet 17.2.26 → 17.2.27

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.
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.26
7
- * @date 2024-11-13T15:04:03.710Z
8
- * @hash 19b7478
6
+ * @version 17.2.27
7
+ * @date 2024-11-22T14:17:16.936Z
8
+ * @hash 139e5a3
9
9
  */
10
10
 
11
11
  'use strict';
@@ -2933,7 +2933,9 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
2933
2933
  return reverseSearch ? numberOfValues - i - 1 : i;
2934
2934
  }
2935
2935
  }
2936
- return reverseSearch ? numberOfValues - closestMatchIndex - 1 : closestMatchIndex;
2936
+ return reverseSearch && closestMatchIndex !== -1
2937
+ ? numberOfValues - closestMatchIndex - 1
2938
+ : closestMatchIndex;
2937
2939
  }
2938
2940
  /**
2939
2941
  * Normalize a value.
@@ -47831,12 +47833,18 @@ class Evaluator {
47831
47833
  }
47832
47834
  for (let i = 0; i < positions.length; ++i) {
47833
47835
  const position = positions[i];
47836
+ if (this.nextPositionsToUpdate.has(position)) {
47837
+ continue;
47838
+ }
47834
47839
  const evaluatedCell = this.computeCell(position);
47835
47840
  if (evaluatedCell !== EMPTY_CELL) {
47836
47841
  this.evaluatedCells.set(position, evaluatedCell);
47837
47842
  }
47838
47843
  }
47839
47844
  }
47845
+ if (currentIteration >= MAX_ITERATION) {
47846
+ console.warn("Maximum iteration reached while evaluating cells");
47847
+ }
47840
47848
  }
47841
47849
  computeCell(position) {
47842
47850
  const evaluation = this.evaluatedCells.get(position);
@@ -47868,7 +47876,6 @@ class Evaluator {
47868
47876
  }
47869
47877
  finally {
47870
47878
  this.cellsBeingComputed.delete(cellId);
47871
- this.nextPositionsToUpdate.delete(position);
47872
47879
  }
47873
47880
  }
47874
47881
  computeAndSave(position) {
@@ -47918,6 +47925,7 @@ class Evaluator {
47918
47925
  { sheetId, zone: rightPartZone },
47919
47926
  { sheetId, zone: leftColumnZone },
47920
47927
  ]);
47928
+ invalidatedPositions.delete(arrayFormulaPosition);
47921
47929
  this.nextPositionsToUpdate.addMany(invalidatedPositions);
47922
47930
  }
47923
47931
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
@@ -48962,25 +48970,11 @@ class EvaluationDataValidationPlugin extends UIPlugin {
48962
48970
  }
48963
48971
  switch (cmd.type) {
48964
48972
  case "ADD_DATA_VALIDATION_RULE":
48965
- const ranges = cmd.ranges.map((range) => this.getters.getRangeFromRangeData(range));
48966
- if (cmd.rule.criterion.type === "isBoolean") {
48967
- this.setContentToBooleanCells({ ...cmd.rule, ranges });
48968
- }
48969
- delete this.validationResults[cmd.sheetId];
48970
- break;
48971
48973
  case "REMOVE_DATA_VALIDATION_RULE":
48972
48974
  delete this.validationResults[cmd.sheetId];
48973
48975
  break;
48974
48976
  }
48975
48977
  }
48976
- setContentToBooleanCells(rule) {
48977
- for (const position of getCellPositionsInRanges(rule.ranges)) {
48978
- const evaluatedCell = this.getters.getEvaluatedCell(position);
48979
- if (evaluatedCell.type !== CellValueType.boolean) {
48980
- this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
48981
- }
48982
- }
48983
- }
48984
48978
  isDataValidationInvalid(cellPosition) {
48985
48979
  return !this.getValidationResultForCell(cellPosition).isValid;
48986
48980
  }
@@ -50452,7 +50446,7 @@ class Session extends EventBus {
50452
50446
  * Notify the server that the user client left the collaborative session
50453
50447
  */
50454
50448
  async leave(data) {
50455
- if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
50449
+ if (data && Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
50456
50450
  await this.snapshot(data());
50457
50451
  }
50458
50452
  delete this.clients[this.clientId];
@@ -51558,6 +51552,42 @@ class SheetUIPlugin extends UIPlugin {
51558
51552
  }
51559
51553
  }
51560
51554
 
51555
+ class DataValidationInsertionPlugin extends UIPlugin {
51556
+ handle(cmd) {
51557
+ switch (cmd.type) {
51558
+ case "ADD_DATA_VALIDATION_RULE":
51559
+ if (cmd.rule.criterion.type === "isBoolean") {
51560
+ const ranges = cmd.ranges.map((range) => this.getters.getRangeFromRangeData(range));
51561
+ for (const position of getCellPositionsInRanges(ranges)) {
51562
+ const cell = this.getters.getCell(position);
51563
+ const evaluatedCell = this.getters.getEvaluatedCell(position);
51564
+ if (!cell?.content) {
51565
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51566
+ // In this case, a cell has been updated in the core plugin but
51567
+ // not yet evaluated. This can occur after a paste operation.
51568
+ }
51569
+ else if (cell?.content && evaluatedCell.type === CellValueType.empty) {
51570
+ let value;
51571
+ if (cell.content.startsWith("=")) {
51572
+ const result = this.getters.evaluateFormula(position.sheetId, cell.content);
51573
+ value = (isMatrix(result) ? result[0][0] : result)?.toString();
51574
+ }
51575
+ else {
51576
+ value = cell.content;
51577
+ }
51578
+ if (!value || !isBoolean(value)) {
51579
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51580
+ }
51581
+ }
51582
+ else if (evaluatedCell.type !== CellValueType.boolean) {
51583
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51584
+ }
51585
+ }
51586
+ }
51587
+ }
51588
+ }
51589
+ }
51590
+
51561
51591
  const genericRepeatsTransforms = [
51562
51592
  repeatSheetDependantCommand,
51563
51593
  repeatTargetDependantCommand,
@@ -54791,7 +54821,8 @@ const featurePluginRegistry = new Registry()
54791
54821
  .add("collaborative", CollaborativePlugin)
54792
54822
  .add("history", HistoryPlugin)
54793
54823
  .add("data_cleanup", DataCleanupPlugin)
54794
- .add("table_autofill", TableAutofillPlugin);
54824
+ .add("table_autofill", TableAutofillPlugin)
54825
+ .add("datavalidation_insert", DataValidationInsertionPlugin);
54795
54826
  // Plugins which have a state, but which should not be shared in collaborative
54796
54827
  const statefulUIPluginRegistry = new Registry()
54797
54828
  .add("selection", GridSelectionPlugin)
@@ -60419,7 +60450,8 @@ class Model extends EventBus {
60419
60450
  this.session.join(this.config.client);
60420
60451
  }
60421
60452
  async leaveSession() {
60422
- await this.session.leave(lazy(() => this.exportData()));
60453
+ const snapshot = this.getters.isReadonly() ? undefined : lazy(() => this.exportData());
60454
+ await this.session.leave(snapshot);
60423
60455
  }
60424
60456
  setupUiPlugin(Plugin) {
60425
60457
  const plugin = new Plugin(this.uiPluginConfig);
@@ -60973,6 +61005,6 @@ exports.tokenColors = tokenColors;
60973
61005
  exports.tokenize = tokenize;
60974
61006
 
60975
61007
 
60976
- __info__.version = "17.2.26";
60977
- __info__.date = "2024-11-13T15:04:03.710Z";
60978
- __info__.hash = "19b7478";
61008
+ __info__.version = "17.2.27";
61009
+ __info__.date = "2024-11-22T14:17:16.936Z";
61010
+ __info__.hash = "139e5a3";
@@ -3451,7 +3451,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
3451
3451
  /**
3452
3452
  * Notify the server that the user client left the collaborative session
3453
3453
  */
3454
- leave(data: Lazy<WorkbookData>): Promise<void>;
3454
+ leave(data?: Lazy<WorkbookData>): Promise<void>;
3455
3455
  /**
3456
3456
  * Send a snapshot of the spreadsheet to the collaboration server
3457
3457
  */
@@ -3703,7 +3703,6 @@ declare class EvaluationDataValidationPlugin extends UIPlugin {
3703
3703
  static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
3704
3704
  validationResults: Record<UID, SheetValidationResult>;
3705
3705
  handle(cmd: CoreViewCommand): void;
3706
- private setContentToBooleanCells;
3707
3706
  isDataValidationInvalid(cellPosition: CellPosition): boolean;
3708
3707
  getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
3709
3708
  /**
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.26
7
- * @date 2024-11-13T15:04:03.710Z
8
- * @hash 19b7478
6
+ * @version 17.2.27
7
+ * @date 2024-11-22T14:17:16.936Z
8
+ * @hash 139e5a3
9
9
  */
10
10
 
11
11
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw } from '@odoo/owl';
@@ -2931,7 +2931,9 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
2931
2931
  return reverseSearch ? numberOfValues - i - 1 : i;
2932
2932
  }
2933
2933
  }
2934
- return reverseSearch ? numberOfValues - closestMatchIndex - 1 : closestMatchIndex;
2934
+ return reverseSearch && closestMatchIndex !== -1
2935
+ ? numberOfValues - closestMatchIndex - 1
2936
+ : closestMatchIndex;
2935
2937
  }
2936
2938
  /**
2937
2939
  * Normalize a value.
@@ -47829,12 +47831,18 @@ class Evaluator {
47829
47831
  }
47830
47832
  for (let i = 0; i < positions.length; ++i) {
47831
47833
  const position = positions[i];
47834
+ if (this.nextPositionsToUpdate.has(position)) {
47835
+ continue;
47836
+ }
47832
47837
  const evaluatedCell = this.computeCell(position);
47833
47838
  if (evaluatedCell !== EMPTY_CELL) {
47834
47839
  this.evaluatedCells.set(position, evaluatedCell);
47835
47840
  }
47836
47841
  }
47837
47842
  }
47843
+ if (currentIteration >= MAX_ITERATION) {
47844
+ console.warn("Maximum iteration reached while evaluating cells");
47845
+ }
47838
47846
  }
47839
47847
  computeCell(position) {
47840
47848
  const evaluation = this.evaluatedCells.get(position);
@@ -47866,7 +47874,6 @@ class Evaluator {
47866
47874
  }
47867
47875
  finally {
47868
47876
  this.cellsBeingComputed.delete(cellId);
47869
- this.nextPositionsToUpdate.delete(position);
47870
47877
  }
47871
47878
  }
47872
47879
  computeAndSave(position) {
@@ -47916,6 +47923,7 @@ class Evaluator {
47916
47923
  { sheetId, zone: rightPartZone },
47917
47924
  { sheetId, zone: leftColumnZone },
47918
47925
  ]);
47926
+ invalidatedPositions.delete(arrayFormulaPosition);
47919
47927
  this.nextPositionsToUpdate.addMany(invalidatedPositions);
47920
47928
  }
47921
47929
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
@@ -48960,25 +48968,11 @@ class EvaluationDataValidationPlugin extends UIPlugin {
48960
48968
  }
48961
48969
  switch (cmd.type) {
48962
48970
  case "ADD_DATA_VALIDATION_RULE":
48963
- const ranges = cmd.ranges.map((range) => this.getters.getRangeFromRangeData(range));
48964
- if (cmd.rule.criterion.type === "isBoolean") {
48965
- this.setContentToBooleanCells({ ...cmd.rule, ranges });
48966
- }
48967
- delete this.validationResults[cmd.sheetId];
48968
- break;
48969
48971
  case "REMOVE_DATA_VALIDATION_RULE":
48970
48972
  delete this.validationResults[cmd.sheetId];
48971
48973
  break;
48972
48974
  }
48973
48975
  }
48974
- setContentToBooleanCells(rule) {
48975
- for (const position of getCellPositionsInRanges(rule.ranges)) {
48976
- const evaluatedCell = this.getters.getEvaluatedCell(position);
48977
- if (evaluatedCell.type !== CellValueType.boolean) {
48978
- this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
48979
- }
48980
- }
48981
- }
48982
48976
  isDataValidationInvalid(cellPosition) {
48983
48977
  return !this.getValidationResultForCell(cellPosition).isValid;
48984
48978
  }
@@ -50450,7 +50444,7 @@ class Session extends EventBus {
50450
50444
  * Notify the server that the user client left the collaborative session
50451
50445
  */
50452
50446
  async leave(data) {
50453
- if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
50447
+ if (data && Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
50454
50448
  await this.snapshot(data());
50455
50449
  }
50456
50450
  delete this.clients[this.clientId];
@@ -51556,6 +51550,42 @@ class SheetUIPlugin extends UIPlugin {
51556
51550
  }
51557
51551
  }
51558
51552
 
51553
+ class DataValidationInsertionPlugin extends UIPlugin {
51554
+ handle(cmd) {
51555
+ switch (cmd.type) {
51556
+ case "ADD_DATA_VALIDATION_RULE":
51557
+ if (cmd.rule.criterion.type === "isBoolean") {
51558
+ const ranges = cmd.ranges.map((range) => this.getters.getRangeFromRangeData(range));
51559
+ for (const position of getCellPositionsInRanges(ranges)) {
51560
+ const cell = this.getters.getCell(position);
51561
+ const evaluatedCell = this.getters.getEvaluatedCell(position);
51562
+ if (!cell?.content) {
51563
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51564
+ // In this case, a cell has been updated in the core plugin but
51565
+ // not yet evaluated. This can occur after a paste operation.
51566
+ }
51567
+ else if (cell?.content && evaluatedCell.type === CellValueType.empty) {
51568
+ let value;
51569
+ if (cell.content.startsWith("=")) {
51570
+ const result = this.getters.evaluateFormula(position.sheetId, cell.content);
51571
+ value = (isMatrix(result) ? result[0][0] : result)?.toString();
51572
+ }
51573
+ else {
51574
+ value = cell.content;
51575
+ }
51576
+ if (!value || !isBoolean(value)) {
51577
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51578
+ }
51579
+ }
51580
+ else if (evaluatedCell.type !== CellValueType.boolean) {
51581
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51582
+ }
51583
+ }
51584
+ }
51585
+ }
51586
+ }
51587
+ }
51588
+
51559
51589
  const genericRepeatsTransforms = [
51560
51590
  repeatSheetDependantCommand,
51561
51591
  repeatTargetDependantCommand,
@@ -54789,7 +54819,8 @@ const featurePluginRegistry = new Registry()
54789
54819
  .add("collaborative", CollaborativePlugin)
54790
54820
  .add("history", HistoryPlugin)
54791
54821
  .add("data_cleanup", DataCleanupPlugin)
54792
- .add("table_autofill", TableAutofillPlugin);
54822
+ .add("table_autofill", TableAutofillPlugin)
54823
+ .add("datavalidation_insert", DataValidationInsertionPlugin);
54793
54824
  // Plugins which have a state, but which should not be shared in collaborative
54794
54825
  const statefulUIPluginRegistry = new Registry()
54795
54826
  .add("selection", GridSelectionPlugin)
@@ -60417,7 +60448,8 @@ class Model extends EventBus {
60417
60448
  this.session.join(this.config.client);
60418
60449
  }
60419
60450
  async leaveSession() {
60420
- await this.session.leave(lazy(() => this.exportData()));
60451
+ const snapshot = this.getters.isReadonly() ? undefined : lazy(() => this.exportData());
60452
+ await this.session.leave(snapshot);
60421
60453
  }
60422
60454
  setupUiPlugin(Plugin) {
60423
60455
  const plugin = new Plugin(this.uiPluginConfig);
@@ -60930,6 +60962,6 @@ const constants = {
60930
60962
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
60931
60963
 
60932
60964
 
60933
- __info__.version = "17.2.26";
60934
- __info__.date = "2024-11-13T15:04:03.710Z";
60935
- __info__.hash = "19b7478";
60965
+ __info__.version = "17.2.27";
60966
+ __info__.date = "2024-11-22T14:17:16.936Z";
60967
+ __info__.hash = "139e5a3";
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.26
7
- * @date 2024-11-13T15:04:03.710Z
8
- * @hash 19b7478
6
+ * @version 17.2.27
7
+ * @date 2024-11-22T14:17:16.936Z
8
+ * @hash 139e5a3
9
9
  */
10
10
 
11
11
  (function (exports, owl) {
@@ -2932,7 +2932,9 @@
2932
2932
  return reverseSearch ? numberOfValues - i - 1 : i;
2933
2933
  }
2934
2934
  }
2935
- return reverseSearch ? numberOfValues - closestMatchIndex - 1 : closestMatchIndex;
2935
+ return reverseSearch && closestMatchIndex !== -1
2936
+ ? numberOfValues - closestMatchIndex - 1
2937
+ : closestMatchIndex;
2936
2938
  }
2937
2939
  /**
2938
2940
  * Normalize a value.
@@ -47830,12 +47832,18 @@ stores.inject(MyMetaStore, storeInstance);
47830
47832
  }
47831
47833
  for (let i = 0; i < positions.length; ++i) {
47832
47834
  const position = positions[i];
47835
+ if (this.nextPositionsToUpdate.has(position)) {
47836
+ continue;
47837
+ }
47833
47838
  const evaluatedCell = this.computeCell(position);
47834
47839
  if (evaluatedCell !== EMPTY_CELL) {
47835
47840
  this.evaluatedCells.set(position, evaluatedCell);
47836
47841
  }
47837
47842
  }
47838
47843
  }
47844
+ if (currentIteration >= MAX_ITERATION) {
47845
+ console.warn("Maximum iteration reached while evaluating cells");
47846
+ }
47839
47847
  }
47840
47848
  computeCell(position) {
47841
47849
  const evaluation = this.evaluatedCells.get(position);
@@ -47867,7 +47875,6 @@ stores.inject(MyMetaStore, storeInstance);
47867
47875
  }
47868
47876
  finally {
47869
47877
  this.cellsBeingComputed.delete(cellId);
47870
- this.nextPositionsToUpdate.delete(position);
47871
47878
  }
47872
47879
  }
47873
47880
  computeAndSave(position) {
@@ -47917,6 +47924,7 @@ stores.inject(MyMetaStore, storeInstance);
47917
47924
  { sheetId, zone: rightPartZone },
47918
47925
  { sheetId, zone: leftColumnZone },
47919
47926
  ]);
47927
+ invalidatedPositions.delete(arrayFormulaPosition);
47920
47928
  this.nextPositionsToUpdate.addMany(invalidatedPositions);
47921
47929
  }
47922
47930
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
@@ -48961,25 +48969,11 @@ stores.inject(MyMetaStore, storeInstance);
48961
48969
  }
48962
48970
  switch (cmd.type) {
48963
48971
  case "ADD_DATA_VALIDATION_RULE":
48964
- const ranges = cmd.ranges.map((range) => this.getters.getRangeFromRangeData(range));
48965
- if (cmd.rule.criterion.type === "isBoolean") {
48966
- this.setContentToBooleanCells({ ...cmd.rule, ranges });
48967
- }
48968
- delete this.validationResults[cmd.sheetId];
48969
- break;
48970
48972
  case "REMOVE_DATA_VALIDATION_RULE":
48971
48973
  delete this.validationResults[cmd.sheetId];
48972
48974
  break;
48973
48975
  }
48974
48976
  }
48975
- setContentToBooleanCells(rule) {
48976
- for (const position of getCellPositionsInRanges(rule.ranges)) {
48977
- const evaluatedCell = this.getters.getEvaluatedCell(position);
48978
- if (evaluatedCell.type !== CellValueType.boolean) {
48979
- this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
48980
- }
48981
- }
48982
- }
48983
48977
  isDataValidationInvalid(cellPosition) {
48984
48978
  return !this.getValidationResultForCell(cellPosition).isValid;
48985
48979
  }
@@ -50451,7 +50445,7 @@ stores.inject(MyMetaStore, storeInstance);
50451
50445
  * Notify the server that the user client left the collaborative session
50452
50446
  */
50453
50447
  async leave(data) {
50454
- if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
50448
+ if (data && Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
50455
50449
  await this.snapshot(data());
50456
50450
  }
50457
50451
  delete this.clients[this.clientId];
@@ -51557,6 +51551,42 @@ stores.inject(MyMetaStore, storeInstance);
51557
51551
  }
51558
51552
  }
51559
51553
 
51554
+ class DataValidationInsertionPlugin extends UIPlugin {
51555
+ handle(cmd) {
51556
+ switch (cmd.type) {
51557
+ case "ADD_DATA_VALIDATION_RULE":
51558
+ if (cmd.rule.criterion.type === "isBoolean") {
51559
+ const ranges = cmd.ranges.map((range) => this.getters.getRangeFromRangeData(range));
51560
+ for (const position of getCellPositionsInRanges(ranges)) {
51561
+ const cell = this.getters.getCell(position);
51562
+ const evaluatedCell = this.getters.getEvaluatedCell(position);
51563
+ if (!cell?.content) {
51564
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51565
+ // In this case, a cell has been updated in the core plugin but
51566
+ // not yet evaluated. This can occur after a paste operation.
51567
+ }
51568
+ else if (cell?.content && evaluatedCell.type === CellValueType.empty) {
51569
+ let value;
51570
+ if (cell.content.startsWith("=")) {
51571
+ const result = this.getters.evaluateFormula(position.sheetId, cell.content);
51572
+ value = (isMatrix(result) ? result[0][0] : result)?.toString();
51573
+ }
51574
+ else {
51575
+ value = cell.content;
51576
+ }
51577
+ if (!value || !isBoolean(value)) {
51578
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51579
+ }
51580
+ }
51581
+ else if (evaluatedCell.type !== CellValueType.boolean) {
51582
+ this.dispatch("UPDATE_CELL", { ...position, content: "FALSE" });
51583
+ }
51584
+ }
51585
+ }
51586
+ }
51587
+ }
51588
+ }
51589
+
51560
51590
  const genericRepeatsTransforms = [
51561
51591
  repeatSheetDependantCommand,
51562
51592
  repeatTargetDependantCommand,
@@ -54790,7 +54820,8 @@ stores.inject(MyMetaStore, storeInstance);
54790
54820
  .add("collaborative", CollaborativePlugin)
54791
54821
  .add("history", HistoryPlugin)
54792
54822
  .add("data_cleanup", DataCleanupPlugin)
54793
- .add("table_autofill", TableAutofillPlugin);
54823
+ .add("table_autofill", TableAutofillPlugin)
54824
+ .add("datavalidation_insert", DataValidationInsertionPlugin);
54794
54825
  // Plugins which have a state, but which should not be shared in collaborative
54795
54826
  const statefulUIPluginRegistry = new Registry()
54796
54827
  .add("selection", GridSelectionPlugin)
@@ -60418,7 +60449,8 @@ stores.inject(MyMetaStore, storeInstance);
60418
60449
  this.session.join(this.config.client);
60419
60450
  }
60420
60451
  async leaveSession() {
60421
- await this.session.leave(lazy(() => this.exportData()));
60452
+ const snapshot = this.getters.isReadonly() ? undefined : lazy(() => this.exportData());
60453
+ await this.session.leave(snapshot);
60422
60454
  }
60423
60455
  setupUiPlugin(Plugin) {
60424
60456
  const plugin = new Plugin(this.uiPluginConfig);
@@ -60972,9 +61004,9 @@ stores.inject(MyMetaStore, storeInstance);
60972
61004
  exports.tokenize = tokenize;
60973
61005
 
60974
61006
 
60975
- __info__.version = "17.2.26";
60976
- __info__.date = "2024-11-13T15:04:03.710Z";
60977
- __info__.hash = "19b7478";
61007
+ __info__.version = "17.2.27";
61008
+ __info__.date = "2024-11-22T14:17:16.936Z";
61009
+ __info__.hash = "139e5a3";
60978
61010
 
60979
61011
 
60980
61012
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);