@odoo/o-spreadsheet 19.4.6 → 19.4.7

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 19.4.6
6
- * @date 2026-08-10T12:33:32.728Z
7
- * @hash 5c667fe
5
+ * @version 19.4.7
6
+ * @date 2026-08-12T09:16:40.949Z
7
+ * @hash 65642fe
8
8
  */
9
9
 
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -5958,6 +5958,9 @@ var FunctionRegistry = class extends Registry {
5958
5958
  }
5959
5959
  };
5960
5960
  const functionRegistry = new FunctionRegistry();
5961
+ /** Formulas using one of these functions are never squished: they are always exported
5962
+ * as a full formula string, and they don't become the base formula of the next cells. */
5963
+ const NonSquishableFunctionRegistry = new Registry();
5961
5964
 
5962
5965
  //#endregion
5963
5966
  //#region src/helpers/references.ts
@@ -51150,7 +51153,8 @@ var Squisher = class {
51150
51153
  * The result of this method is:
51151
51154
  * - if the cell is not a formula, returns the content as is and resets the base formula
51152
51155
  * - if the cell is a formula:
51153
- * - if there is no previous formula, or the normalized formula is different from the previous one, resets the base formula to this one and returns the full formula string
51156
+ * - if there is no previous formula, or the normalized formula is different from the previous one or it contains blacklisted functions (see NonSquishableFunctionRegistry),
51157
+ * resets the base formula to this one and returns the full formula string
51154
51158
  * - else, compares the literal values and range dependencies to the previous formula, and for each parameter:
51155
51159
  * - for numbers: returns a relative change (+N or -N) if possible, else the full number or "=" if unchanged
51156
51160
  * - for strings: returns the full string if changed, else "="
@@ -51158,6 +51162,10 @@ var Squisher = class {
51158
51162
  * */
51159
51163
  squish(cell, forSheetId) {
51160
51164
  if (cell.isFormula) {
51165
+ if (NonSquishableFunctionRegistry.getAll().some((functionName) => cell.compiledFormula.usesSymbol(functionName))) {
51166
+ this.resetBaseFormula();
51167
+ return cell.compiledFormula.toFormulaString(this.getters, this.rangeToStringOptions);
51168
+ }
51161
51169
  let numbers = [];
51162
51170
  let strings = [];
51163
51171
  let references = [];
@@ -62602,7 +62610,7 @@ var Session = class extends EventBus {
62602
62610
  }
62603
62611
  message = {
62604
62612
  ...message,
62605
- commands: this.commandSquisher.squish(revision.commands)
62613
+ commands: revision.commands
62606
62614
  };
62607
62615
  }
62608
62616
  if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
@@ -87612,7 +87620,8 @@ const registries = {
87612
87620
  migrationStepRegistry,
87613
87621
  chartJsExtensionRegistry,
87614
87622
  onIterationEndEvaluationRegistry,
87615
- specificRangeTransformRegistry
87623
+ specificRangeTransformRegistry,
87624
+ NonSquishableFunctionRegistry
87616
87625
  };
87617
87626
  const helpers = {
87618
87627
  arg,
@@ -87914,6 +87923,6 @@ exports.stores = stores;
87914
87923
  exports.tokenColors = tokenColors;
87915
87924
  exports.tokenize = tokenize;
87916
87925
 
87917
- __info__.version = "19.4.6";
87918
- __info__.date = "2026-08-10T12:33:32.728Z";
87919
- __info__.hash = "5c667fe";
87926
+ __info__.version = "19.4.7";
87927
+ __info__.date = "2026-08-12T09:16:40.949Z";
87928
+ __info__.hash = "65642fe";
@@ -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 19.4.6
6
- * @date 2026-08-10T12:33:34.157Z
7
- * @hash 5c667fe
5
+ * @version 19.4.7
6
+ * @date 2026-08-12T09:16:42.630Z
7
+ * @hash 65642fe
8
8
  */
9
9
  :root {
10
10
  --os-gray-100: light-dark(#f9fafb, #1b1d26);
@@ -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 19.4.6
6
- * @date 2026-08-10T12:33:32.728Z
7
- * @hash 5c667fe
5
+ * @version 19.4.7
6
+ * @date 2026-08-12T09:16:40.949Z
7
+ * @hash 65642fe
8
8
  */
9
9
 
10
10
  import * as owl from "@odoo/owl";
@@ -5957,6 +5957,9 @@ var FunctionRegistry = class extends Registry {
5957
5957
  }
5958
5958
  };
5959
5959
  const functionRegistry = new FunctionRegistry();
5960
+ /** Formulas using one of these functions are never squished: they are always exported
5961
+ * as a full formula string, and they don't become the base formula of the next cells. */
5962
+ const NonSquishableFunctionRegistry = new Registry();
5960
5963
 
5961
5964
  //#endregion
5962
5965
  //#region src/helpers/references.ts
@@ -51149,7 +51152,8 @@ var Squisher = class {
51149
51152
  * The result of this method is:
51150
51153
  * - if the cell is not a formula, returns the content as is and resets the base formula
51151
51154
  * - if the cell is a formula:
51152
- * - if there is no previous formula, or the normalized formula is different from the previous one, resets the base formula to this one and returns the full formula string
51155
+ * - if there is no previous formula, or the normalized formula is different from the previous one or it contains blacklisted functions (see NonSquishableFunctionRegistry),
51156
+ * resets the base formula to this one and returns the full formula string
51153
51157
  * - else, compares the literal values and range dependencies to the previous formula, and for each parameter:
51154
51158
  * - for numbers: returns a relative change (+N or -N) if possible, else the full number or "=" if unchanged
51155
51159
  * - for strings: returns the full string if changed, else "="
@@ -51157,6 +51161,10 @@ var Squisher = class {
51157
51161
  * */
51158
51162
  squish(cell, forSheetId) {
51159
51163
  if (cell.isFormula) {
51164
+ if (NonSquishableFunctionRegistry.getAll().some((functionName) => cell.compiledFormula.usesSymbol(functionName))) {
51165
+ this.resetBaseFormula();
51166
+ return cell.compiledFormula.toFormulaString(this.getters, this.rangeToStringOptions);
51167
+ }
51160
51168
  let numbers = [];
51161
51169
  let strings = [];
51162
51170
  let references = [];
@@ -62417,7 +62425,7 @@ var Session = class extends EventBus {
62417
62425
  }
62418
62426
  message = {
62419
62427
  ...message,
62420
- commands: this.commandSquisher.squish(revision.commands)
62428
+ commands: revision.commands
62421
62429
  };
62422
62430
  }
62423
62431
  if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
@@ -87427,7 +87435,8 @@ const registries = {
87427
87435
  migrationStepRegistry,
87428
87436
  chartJsExtensionRegistry,
87429
87437
  onIterationEndEvaluationRegistry,
87430
- specificRangeTransformRegistry
87438
+ specificRangeTransformRegistry,
87439
+ NonSquishableFunctionRegistry
87431
87440
  };
87432
87441
  const helpers = {
87433
87442
  arg,
@@ -87635,6 +87644,6 @@ const chartHelpers = {
87635
87644
  //#endregion
87636
87645
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderPositions, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, composerFocusTypes, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, errorTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
87637
87646
 
87638
- __info__.version = "19.4.6";
87639
- __info__.date = "2026-08-10T12:33:32.728Z";
87640
- __info__.hash = "5c667fe";
87647
+ __info__.version = "19.4.7";
87648
+ __info__.date = "2026-08-12T09:16:40.949Z";
87649
+ __info__.hash = "65642fe";
@@ -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 19.4.6
6
- * @date 2026-08-10T12:33:32.728Z
7
- * @hash 5c667fe
5
+ * @version 19.4.7
6
+ * @date 2026-08-12T09:16:40.949Z
7
+ * @hash 65642fe
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -5959,6 +5959,9 @@ set(value) {
5959
5959
  }
5960
5960
  };
5961
5961
  const functionRegistry = new FunctionRegistry();
5962
+ /** Formulas using one of these functions are never squished: they are always exported
5963
+ * as a full formula string, and they don't become the base formula of the next cells. */
5964
+ const NonSquishableFunctionRegistry = new Registry();
5962
5965
 
5963
5966
  //#endregion
5964
5967
  //#region src/helpers/references.ts
@@ -51151,7 +51154,8 @@ set(value) {
51151
51154
  * The result of this method is:
51152
51155
  * - if the cell is not a formula, returns the content as is and resets the base formula
51153
51156
  * - if the cell is a formula:
51154
- * - if there is no previous formula, or the normalized formula is different from the previous one, resets the base formula to this one and returns the full formula string
51157
+ * - if there is no previous formula, or the normalized formula is different from the previous one or it contains blacklisted functions (see NonSquishableFunctionRegistry),
51158
+ * resets the base formula to this one and returns the full formula string
51155
51159
  * - else, compares the literal values and range dependencies to the previous formula, and for each parameter:
51156
51160
  * - for numbers: returns a relative change (+N or -N) if possible, else the full number or "=" if unchanged
51157
51161
  * - for strings: returns the full string if changed, else "="
@@ -51159,6 +51163,10 @@ set(value) {
51159
51163
  * */
51160
51164
  squish(cell, forSheetId) {
51161
51165
  if (cell.isFormula) {
51166
+ if (NonSquishableFunctionRegistry.getAll().some((functionName) => cell.compiledFormula.usesSymbol(functionName))) {
51167
+ this.resetBaseFormula();
51168
+ return cell.compiledFormula.toFormulaString(this.getters, this.rangeToStringOptions);
51169
+ }
51162
51170
  let numbers = [];
51163
51171
  let strings = [];
51164
51172
  let references = [];
@@ -62419,7 +62427,7 @@ set(value) {
62419
62427
  }
62420
62428
  message = {
62421
62429
  ...message,
62422
- commands: this.commandSquisher.squish(revision.commands)
62430
+ commands: revision.commands
62423
62431
  };
62424
62432
  }
62425
62433
  if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
@@ -87429,7 +87437,8 @@ set(value) {
87429
87437
  migrationStepRegistry,
87430
87438
  chartJsExtensionRegistry,
87431
87439
  onIterationEndEvaluationRegistry,
87432
- specificRangeTransformRegistry
87440
+ specificRangeTransformRegistry,
87441
+ NonSquishableFunctionRegistry
87433
87442
  };
87434
87443
  const helpers = {
87435
87444
  arg,
@@ -87731,8 +87740,8 @@ exports.stores = stores;
87731
87740
  exports.tokenColors = tokenColors;
87732
87741
  exports.tokenize = tokenize;
87733
87742
 
87734
- __info__.version = "19.4.6";
87735
- __info__.date = "2026-08-10T12:33:32.728Z";
87736
- __info__.hash = "5c667fe";
87743
+ __info__.version = "19.4.7";
87744
+ __info__.date = "2026-08-12T09:16:40.949Z";
87745
+ __info__.hash = "65642fe";
87737
87746
 
87738
87747
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);