@odoo/o-spreadsheet 18.2.55 → 18.2.56

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.2.55
6
- * @date 2026-06-06T06:20:23.893Z
7
- * @hash 57b568a
5
+ * @version 18.2.56
6
+ * @date 2026-06-17T08:50:15.644Z
7
+ * @hash 17ea4a6
8
8
  */
9
9
 
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -39489,9 +39489,9 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39489
39489
  allSheetsMatches = [];
39490
39490
  activeSheetMatches = [];
39491
39491
  specificRangeMatches = [];
39492
+ selectedMatchPosition = null;
39492
39493
  currentSearchRegex = null;
39493
39494
  initialShowFormulaState;
39494
- preserveSelectedMatchIndex = false;
39495
39495
  irreplaceableMatchCount = 0;
39496
39496
  isSearchDirty = false;
39497
39497
  shouldFinalizeUpdateSelection = false;
@@ -39610,7 +39610,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39610
39610
  */
39611
39611
  _updateSearch(toSearch, searchOptions) {
39612
39612
  this.searchOptions = searchOptions;
39613
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
39613
+ if (toSearch !== this.toSearch) {
39614
+ this.selectedMatchIndex = null;
39615
+ this.selectedMatchPosition = null;
39616
+ }
39614
39617
  this.toSearch = toSearch;
39615
39618
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
39616
39619
  this.refreshSearch({
@@ -39622,8 +39625,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39622
39625
  * refresh the matches according to the current search options
39623
39626
  */
39624
39627
  refreshSearch(options) {
39625
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
39626
39628
  this.findMatches();
39629
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
39630
+ this.selectedMatchIndex = null;
39631
+ this.selectedMatchPosition = null;
39632
+ } else {
39633
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
39634
+ if (index !== -1) this.selectedMatchIndex = index;
39635
+ }
39627
39636
  this.selectNextCell(0, options);
39628
39637
  }
39629
39638
  getSheetsInSearchOrder() {
@@ -39691,6 +39700,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39691
39700
  const matches = this.searchMatches;
39692
39701
  if (!matches.length) {
39693
39702
  this.selectedMatchIndex = null;
39703
+ this.selectedMatchPosition = null;
39694
39704
  return;
39695
39705
  }
39696
39706
  let nextIndex;
@@ -39704,14 +39714,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39704
39714
  } else nextIndex = this.selectedMatchIndex + indexChange;
39705
39715
  nextIndex = (nextIndex + matches.length) % matches.length;
39706
39716
  this.selectedMatchIndex = nextIndex;
39717
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
39707
39718
  const selectedMatch = matches[nextIndex];
39708
39719
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
39709
- this.preserveSelectedMatchIndex = true;
39710
39720
  this.model.dispatch("ACTIVATE_SHEET", {
39711
39721
  sheetIdFrom: this.getters.getActiveSheetId(),
39712
39722
  sheetIdTo: selectedMatch.sheetId
39713
39723
  });
39714
- this.preserveSelectedMatchIndex = false;
39715
39724
  this.isSearchDirty = false;
39716
39725
  }
39717
39726
  this.model.selection.getBackToDefault();
@@ -39722,7 +39731,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39722
39731
  */
39723
39732
  replace() {
39724
39733
  if (this.selectedMatchIndex === null) return;
39725
- this.preserveSelectedMatchIndex = true;
39726
39734
  this.shouldFinalizeUpdateSelection = true;
39727
39735
  this.model.dispatch("REPLACE_SEARCH", {
39728
39736
  searchString: this.toSearch,
@@ -39730,7 +39738,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39730
39738
  matches: [this.searchMatches[this.selectedMatchIndex]],
39731
39739
  searchOptions: this.searchOptions
39732
39740
  });
39733
- this.preserveSelectedMatchIndex = false;
39734
39741
  }
39735
39742
  /**
39736
39743
  * Apply the replace function to all the matches one time.
@@ -44193,8 +44200,12 @@ var CellComposerStore = class extends AbstractComposerStore {
44193
44200
  }
44194
44201
  stopEdition(direction) {
44195
44202
  if (this.canStopEdition()) {
44203
+ const { col, row } = this.currentEditedCell;
44196
44204
  this._stopEdition();
44197
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
44205
+ if (direction) {
44206
+ this.model.selection.selectCell(col, row);
44207
+ this.model.selection.moveAnchorCell(direction, 1);
44208
+ }
44198
44209
  return;
44199
44210
  }
44200
44211
  const editedCell = this.currentEditedCell;
@@ -69168,6 +69179,6 @@ exports.stores = stores;
69168
69179
  exports.tokenColors = tokenColors;
69169
69180
  exports.tokenize = tokenize;
69170
69181
 
69171
- __info__.version = "18.2.55";
69172
- __info__.date = "2026-06-06T06:20:23.893Z";
69173
- __info__.hash = "57b568a";
69182
+ __info__.version = "18.2.56";
69183
+ __info__.date = "2026-06-17T08:50:15.644Z";
69184
+ __info__.hash = "17ea4a6";
@@ -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.2.55
6
- * @date 2026-06-06T06:20:25.457Z
7
- * @hash 57b568a
5
+ * @version 18.2.56
6
+ * @date 2026-06-17T08:50:17.274Z
7
+ * @hash 17ea4a6
8
8
  */
9
9
  /* Originates from src/components/spreadsheet/spreadsheet.scss */
10
10
  .o-spreadsheet {
@@ -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.2.55
6
- * @date 2026-06-06T06:20:23.893Z
7
- * @hash 57b568a
5
+ * @version 18.2.56
6
+ * @date 2026-06-17T08:50:15.644Z
7
+ * @hash 17ea4a6
8
8
  */
9
9
 
10
10
  import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
@@ -39488,9 +39488,9 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39488
39488
  allSheetsMatches = [];
39489
39489
  activeSheetMatches = [];
39490
39490
  specificRangeMatches = [];
39491
+ selectedMatchPosition = null;
39491
39492
  currentSearchRegex = null;
39492
39493
  initialShowFormulaState;
39493
- preserveSelectedMatchIndex = false;
39494
39494
  irreplaceableMatchCount = 0;
39495
39495
  isSearchDirty = false;
39496
39496
  shouldFinalizeUpdateSelection = false;
@@ -39609,7 +39609,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39609
39609
  */
39610
39610
  _updateSearch(toSearch, searchOptions) {
39611
39611
  this.searchOptions = searchOptions;
39612
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
39612
+ if (toSearch !== this.toSearch) {
39613
+ this.selectedMatchIndex = null;
39614
+ this.selectedMatchPosition = null;
39615
+ }
39613
39616
  this.toSearch = toSearch;
39614
39617
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
39615
39618
  this.refreshSearch({
@@ -39621,8 +39624,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39621
39624
  * refresh the matches according to the current search options
39622
39625
  */
39623
39626
  refreshSearch(options) {
39624
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
39625
39627
  this.findMatches();
39628
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
39629
+ this.selectedMatchIndex = null;
39630
+ this.selectedMatchPosition = null;
39631
+ } else {
39632
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
39633
+ if (index !== -1) this.selectedMatchIndex = index;
39634
+ }
39626
39635
  this.selectNextCell(0, options);
39627
39636
  }
39628
39637
  getSheetsInSearchOrder() {
@@ -39690,6 +39699,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39690
39699
  const matches = this.searchMatches;
39691
39700
  if (!matches.length) {
39692
39701
  this.selectedMatchIndex = null;
39702
+ this.selectedMatchPosition = null;
39693
39703
  return;
39694
39704
  }
39695
39705
  let nextIndex;
@@ -39703,14 +39713,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39703
39713
  } else nextIndex = this.selectedMatchIndex + indexChange;
39704
39714
  nextIndex = (nextIndex + matches.length) % matches.length;
39705
39715
  this.selectedMatchIndex = nextIndex;
39716
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
39706
39717
  const selectedMatch = matches[nextIndex];
39707
39718
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
39708
- this.preserveSelectedMatchIndex = true;
39709
39719
  this.model.dispatch("ACTIVATE_SHEET", {
39710
39720
  sheetIdFrom: this.getters.getActiveSheetId(),
39711
39721
  sheetIdTo: selectedMatch.sheetId
39712
39722
  });
39713
- this.preserveSelectedMatchIndex = false;
39714
39723
  this.isSearchDirty = false;
39715
39724
  }
39716
39725
  this.model.selection.getBackToDefault();
@@ -39721,7 +39730,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39721
39730
  */
39722
39731
  replace() {
39723
39732
  if (this.selectedMatchIndex === null) return;
39724
- this.preserveSelectedMatchIndex = true;
39725
39733
  this.shouldFinalizeUpdateSelection = true;
39726
39734
  this.model.dispatch("REPLACE_SEARCH", {
39727
39735
  searchString: this.toSearch,
@@ -39729,7 +39737,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
39729
39737
  matches: [this.searchMatches[this.selectedMatchIndex]],
39730
39738
  searchOptions: this.searchOptions
39731
39739
  });
39732
- this.preserveSelectedMatchIndex = false;
39733
39740
  }
39734
39741
  /**
39735
39742
  * Apply the replace function to all the matches one time.
@@ -44192,8 +44199,12 @@ var CellComposerStore = class extends AbstractComposerStore {
44192
44199
  }
44193
44200
  stopEdition(direction) {
44194
44201
  if (this.canStopEdition()) {
44202
+ const { col, row } = this.currentEditedCell;
44195
44203
  this._stopEdition();
44196
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
44204
+ if (direction) {
44205
+ this.model.selection.selectCell(col, row);
44206
+ this.model.selection.moveAnchorCell(direction, 1);
44207
+ }
44197
44208
  return;
44198
44209
  }
44199
44210
  const editedCell = this.currentEditedCell;
@@ -68937,6 +68948,6 @@ const chartHelpers = {
68937
68948
  //#endregion
68938
68949
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, 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, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
68939
68950
 
68940
- __info__.version = "18.2.55";
68941
- __info__.date = "2026-06-06T06:20:23.893Z";
68942
- __info__.hash = "57b568a";
68951
+ __info__.version = "18.2.56";
68952
+ __info__.date = "2026-06-17T08:50:15.644Z";
68953
+ __info__.hash = "17ea4a6";
@@ -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.2.55
6
- * @date 2026-06-06T06:20:23.893Z
7
- * @hash 57b568a
5
+ * @version 18.2.56
6
+ * @date 2026-06-17T08:50:15.644Z
7
+ * @hash 17ea4a6
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -39490,9 +39490,9 @@ stores.inject(MyMetaStore, storeInstance);
39490
39490
  allSheetsMatches = [];
39491
39491
  activeSheetMatches = [];
39492
39492
  specificRangeMatches = [];
39493
+ selectedMatchPosition = null;
39493
39494
  currentSearchRegex = null;
39494
39495
  initialShowFormulaState;
39495
- preserveSelectedMatchIndex = false;
39496
39496
  irreplaceableMatchCount = 0;
39497
39497
  isSearchDirty = false;
39498
39498
  shouldFinalizeUpdateSelection = false;
@@ -39611,7 +39611,10 @@ stores.inject(MyMetaStore, storeInstance);
39611
39611
  */
39612
39612
  _updateSearch(toSearch, searchOptions) {
39613
39613
  this.searchOptions = searchOptions;
39614
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
39614
+ if (toSearch !== this.toSearch) {
39615
+ this.selectedMatchIndex = null;
39616
+ this.selectedMatchPosition = null;
39617
+ }
39615
39618
  this.toSearch = toSearch;
39616
39619
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
39617
39620
  this.refreshSearch({
@@ -39623,8 +39626,14 @@ stores.inject(MyMetaStore, storeInstance);
39623
39626
  * refresh the matches according to the current search options
39624
39627
  */
39625
39628
  refreshSearch(options) {
39626
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
39627
39629
  this.findMatches();
39630
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
39631
+ this.selectedMatchIndex = null;
39632
+ this.selectedMatchPosition = null;
39633
+ } else {
39634
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
39635
+ if (index !== -1) this.selectedMatchIndex = index;
39636
+ }
39628
39637
  this.selectNextCell(0, options);
39629
39638
  }
39630
39639
  getSheetsInSearchOrder() {
@@ -39692,6 +39701,7 @@ stores.inject(MyMetaStore, storeInstance);
39692
39701
  const matches = this.searchMatches;
39693
39702
  if (!matches.length) {
39694
39703
  this.selectedMatchIndex = null;
39704
+ this.selectedMatchPosition = null;
39695
39705
  return;
39696
39706
  }
39697
39707
  let nextIndex;
@@ -39705,14 +39715,13 @@ stores.inject(MyMetaStore, storeInstance);
39705
39715
  } else nextIndex = this.selectedMatchIndex + indexChange;
39706
39716
  nextIndex = (nextIndex + matches.length) % matches.length;
39707
39717
  this.selectedMatchIndex = nextIndex;
39718
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
39708
39719
  const selectedMatch = matches[nextIndex];
39709
39720
  if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
39710
- this.preserveSelectedMatchIndex = true;
39711
39721
  this.model.dispatch("ACTIVATE_SHEET", {
39712
39722
  sheetIdFrom: this.getters.getActiveSheetId(),
39713
39723
  sheetIdTo: selectedMatch.sheetId
39714
39724
  });
39715
- this.preserveSelectedMatchIndex = false;
39716
39725
  this.isSearchDirty = false;
39717
39726
  }
39718
39727
  this.model.selection.getBackToDefault();
@@ -39723,7 +39732,6 @@ stores.inject(MyMetaStore, storeInstance);
39723
39732
  */
39724
39733
  replace() {
39725
39734
  if (this.selectedMatchIndex === null) return;
39726
- this.preserveSelectedMatchIndex = true;
39727
39735
  this.shouldFinalizeUpdateSelection = true;
39728
39736
  this.model.dispatch("REPLACE_SEARCH", {
39729
39737
  searchString: this.toSearch,
@@ -39731,7 +39739,6 @@ stores.inject(MyMetaStore, storeInstance);
39731
39739
  matches: [this.searchMatches[this.selectedMatchIndex]],
39732
39740
  searchOptions: this.searchOptions
39733
39741
  });
39734
- this.preserveSelectedMatchIndex = false;
39735
39742
  }
39736
39743
  /**
39737
39744
  * Apply the replace function to all the matches one time.
@@ -44194,8 +44201,12 @@ stores.inject(MyMetaStore, storeInstance);
44194
44201
  }
44195
44202
  stopEdition(direction) {
44196
44203
  if (this.canStopEdition()) {
44204
+ const { col, row } = this.currentEditedCell;
44197
44205
  this._stopEdition();
44198
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
44206
+ if (direction) {
44207
+ this.model.selection.selectCell(col, row);
44208
+ this.model.selection.moveAnchorCell(direction, 1);
44209
+ }
44199
44210
  return;
44200
44211
  }
44201
44212
  const editedCell = this.currentEditedCell;
@@ -68985,8 +68996,8 @@ exports.stores = stores;
68985
68996
  exports.tokenColors = tokenColors;
68986
68997
  exports.tokenize = tokenize;
68987
68998
 
68988
- __info__.version = "18.2.55";
68989
- __info__.date = "2026-06-06T06:20:23.893Z";
68990
- __info__.hash = "57b568a";
68999
+ __info__.version = "18.2.56";
69000
+ __info__.date = "2026-06-17T08:50:15.644Z";
69001
+ __info__.hash = "17ea4a6";
68991
69002
 
68992
69003
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -1199,7 +1199,7 @@ stores.inject(MyMetaStore, storeInstance);
1199
1199
  }
1200
1200
  }
1201
1201
  }
1202
- `;var UI=class extends t.Component{static template=`o-spreadsheet-DataValidationPreview`;static props={onClick:Function,rule:Object};ref=(0,t.useRef)(`dvPreview`);setup(){vI(this.ref,this)}deleteDataValidation(){let e=this.env.model.getters.getActiveSheetId();this.env.model.dispatch(`REMOVE_DATA_VALIDATION_RULE`,{sheetId:e,id:this.props.rule.id})}get highlights(){return this.props.rule.ranges.map(e=>({sheetId:this.env.model.getters.getActiveSheetId(),zone:e.zone,color:_,fillAlpha:.06}))}get rangesString(){let e=this.env.model.getters.getActiveSheetId();return this.props.rule.ranges.map(t=>this.env.model.getters.getRangeString(t,e)).join(`, `)}get descriptionString(){return $.get(this.props.rule.criterion.type).getPreview(this.props.rule.criterion,this.env.model.getters)}},WI=class extends t.Component{static template=`o-spreadsheet-DataValidationPanel`;static props={onCloseSidePanel:Function};static components={DataValidationPreview:UI,DataValidationEditor:HI};state=(0,t.useState)({mode:`list`,activeRule:void 0});onPreviewClick(e){let t=this.env.model.getters.getActiveSheetId(),n=this.env.model.getters.getDataValidationRule(t,e);n&&(this.state.mode=`edit`,this.state.activeRule=n)}addDataValidationRule(){this.state.mode=`edit`,this.state.activeRule=void 0}onExitEditMode(){this.state.mode=`list`,this.state.activeRule=void 0}localizeDVRule(e){return e&&Ol(e,this.env.model.getters.getLocale())}get validationRules(){let e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getDataValidationRules(e)}};let GI=`#8B008B`;var KI=class extends Md{mutators=[`updateSearchOptions`,`updateSearchContent`,`searchFormulas`,`selectPreviousMatch`,`selectNextMatch`,`replace`];allSheetsMatches=[];activeSheetMatches=[];specificRangeMatches=[];currentSearchRegex=null;initialShowFormulaState;preserveSelectedMatchIndex=!1;irreplaceableMatchCount=0;isSearchDirty=!1;shouldFinalizeUpdateSelection=!1;notificationStore=this.get(Ix);selectedMatchIndex=null;toSearch=``;toReplace=``;searchOptions={matchCase:!1,exactMatch:!1,searchFormulas:!1,searchScope:`activeSheet`,specificRange:void 0};constructor(e){super(e),this.initialShowFormulaState=this.model.getters.shouldShowFormulas(),this.searchOptions.searchFormulas=this.initialShowFormulaState;let t=e(Fx);t.register(this),this.onDispose(()=>{this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:this.initialShowFormulaState}),t.unRegister(this)})}get searchMatches(){switch(this.searchOptions.searchScope){case`allSheets`:return this.allSheetsMatches;case`activeSheet`:return this.activeSheetMatches;case`specificRange`:return this.specificRangeMatches}}updateSearchContent(e){this._updateSearch(e,this.searchOptions)}updateSearchOptions(e){this._updateSearch(this.toSearch,{...this.searchOptions,...e})}searchFormulas(e){this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:e}),this.updateSearchOptions({searchFormulas:e})}selectPreviousMatch(){this.selectNextCell(-1,{jumpToMatchSheet:!0,updateSelection:!0})}selectNextMatch(){this.selectNextCell(1,{jumpToMatchSheet:!0,updateSelection:!0})}handle(e){switch(e.type){case`SET_FORMULA_VISIBILITY`:this.updateSearchOptions({searchFormulas:e.show});break;case`UNDO`:case`REDO`:case`REMOVE_TABLE`:case`UPDATE_FILTER`:case`REMOVE_COLUMNS_ROWS`:case`HIDE_COLUMNS_ROWS`:case`UNHIDE_COLUMNS_ROWS`:case`ADD_COLUMNS_ROWS`:case`EVALUATE_CELLS`:case`UPDATE_CELL`:this.isSearchDirty=!0;break;case`ACTIVATE_SHEET`:this.isSearchDirty=!0,this.shouldFinalizeUpdateSelection=!0,this.searchOptions.specificRange&&(this.searchOptions.specificRange=this.searchOptions.specificRange.clone({sheetId:this.getters.getActiveSheetId()}));break;case`DELETE_SHEET`:this.searchOptions.searchScope===`specificRange`&&this.searchOptions.specificRange?.sheetId===e.sheetId&&(this.searchOptions={...this.searchOptions,specificRange:void 0}),this.isSearchDirty=!0;break;case`REPLACE_SEARCH`:for(let t of e.matches)this.replaceMatch(t,e.searchString,e.replaceWith,e.searchOptions);this.irreplaceableMatchCount>0&&this.showReplaceWarningMessage(e.matches.length,this.irreplaceableMatchCount),this.irreplaceableMatchCount=0;break}}finalize(){this.isSearchDirty&&=(this.refreshSearch({jumpToMatchSheet:!1,updateSelection:this.shouldFinalizeUpdateSelection}),this.shouldFinalizeUpdateSelection=!1,!1)}get allSheetMatchesCount(){return this.allSheetsMatches.length}get activeSheetMatchesCount(){return this.activeSheetMatches.length}get specificRangeMatchesCount(){return this.specificRangeMatches.length}_updateSearch(e,t){this.searchOptions=t,e!==this.toSearch&&(this.selectedMatchIndex=null),this.toSearch=e,this.currentSearchRegex=qt(this.toSearch,this.searchOptions),this.refreshSearch({jumpToMatchSheet:!0,updateSelection:!0})}refreshSearch(e){this.preserveSelectedMatchIndex||(this.selectedMatchIndex=null),this.findMatches(),this.selectNextCell(0,e)}getSheetsInSearchOrder(){switch(this.searchOptions.searchScope){case`allSheets`:let e=this.getters.getSheetIds(),t=e.findIndex(e=>e===this.getters.getActiveSheetId());return[e[t],...e.slice(t+1),...e.slice(0,t)];case`activeSheet`:return[this.getters.getActiveSheetId()];case`specificRange`:let n=this.searchOptions.specificRange;return n&&n?[n.sheetId]:[]}}findMatches(){let e=[];if(this.toSearch)for(let t of this.getters.getSheetIds())e.push(...this.findMatchesInSheet(t));if(this.allSheetsMatches=e,this.activeSheetMatches=e.filter(e=>e.sheetId===this.getters.getActiveSheetId()),this.searchOptions.specificRange){let{sheetId:t,zone:n}=this.searchOptions.specificRange;this.specificRangeMatches=e.filter(e=>e.sheetId===t&&wr(e.col,e.row,n))}else this.specificRangeMatches=[]}findMatchesInSheet(e){let t=[],{left:n,right:r,top:i,bottom:a}=this.getters.getSheetZone(e);for(let o=i;o<=a;o++)for(let i=n;i<=r;i++){let n=this.getters.isColHidden(e,i),r=this.getters.isRowHidden(e,o);if(n||r)continue;let a={sheetId:e,col:i,row:o};if(this.currentSearchRegex?.test(this.getSearchableString(a))){let n={sheetId:e,col:i,row:o};t.push(n)}}return t}selectNextCell(e,t){let n=this.searchMatches;if(!n.length){this.selectedMatchIndex=null;return}let r;if(this.selectedMatchIndex===null){let e=-1;for(let t of this.getSheetsInSearchOrder())if(e=n.findIndex(e=>e.sheetId===t),e!==-1)break;r=e}else r=this.selectedMatchIndex+e;r=(r+n.length)%n.length,this.selectedMatchIndex=r;let i=n[r];t.jumpToMatchSheet&&this.getters.getActiveSheetId()!==i.sheetId&&(this.preserveSelectedMatchIndex=!0,this.model.dispatch(`ACTIVATE_SHEET`,{sheetIdFrom:this.getters.getActiveSheetId(),sheetIdTo:i.sheetId}),this.preserveSelectedMatchIndex=!1,this.isSearchDirty=!1),this.model.selection.getBackToDefault(),t.updateSelection&&this.model.selection.selectCell(i.col,i.row)}replace(){this.selectedMatchIndex!==null&&(this.preserveSelectedMatchIndex=!0,this.shouldFinalizeUpdateSelection=!0,this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:[this.searchMatches[this.selectedMatchIndex]],searchOptions:this.searchOptions}),this.preserveSelectedMatchIndex=!1)}replaceAll(){this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:this.searchMatches,searchOptions:this.searchOptions})}showReplaceWarningMessage(e,t){let n=e-t;n===0?this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`Match(es) cannot be replaced as they are part of a formula.`)}):this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`%(replaceable_count)s match(es) replaced. %(irreplaceable_count)s match(es) cannot be replaced as they are part of a formula.`,{replaceable_count:n,irreplaceable_count:t})})}replaceMatch(e,t,n,r){let i=this.getters.getCell(e);if(!i?.content)return;if(i?.isFormula&&!r.searchFormulas){this.irreplaceableMatchCount++;return}let a=qt(t,r),o=new RegExp(a.source,a.flags+`g`),s=hl(this.getters.getCellText(e,{showFormula:r.searchFormulas}).replace(o,n),this.getters.getLocale());this.model.dispatch(`UPDATE_CELL`,{...e,content:s})}getSearchableString(e){return this.getters.getCellText(e,{showFormula:this.searchOptions.searchFormulas})}get highlights(){let e=[],t=this.getters.getActiveSheetId();for(let[n,r]of this.searchMatches.entries()){if(r.sheetId!==t)continue;let i=D(r),a=this.getters.expandZone(t,i),{width:o,height:s}=this.getters.getVisibleRect(a);o>0&&s>0&&e.push({sheetId:t,zone:a,color:GI,noBorder:n!==this.selectedMatchIndex,thinLine:!0,fillAlpha:.2})}if(this.searchOptions.searchScope===`specificRange`){let n=this.searchOptions.specificRange;n&&n.sheetId===t&&e.push({sheetId:t,zone:n.zone,color:GI,noFill:!0,thinLine:!0})}return e}};H`
1202
+ `;var UI=class extends t.Component{static template=`o-spreadsheet-DataValidationPreview`;static props={onClick:Function,rule:Object};ref=(0,t.useRef)(`dvPreview`);setup(){vI(this.ref,this)}deleteDataValidation(){let e=this.env.model.getters.getActiveSheetId();this.env.model.dispatch(`REMOVE_DATA_VALIDATION_RULE`,{sheetId:e,id:this.props.rule.id})}get highlights(){return this.props.rule.ranges.map(e=>({sheetId:this.env.model.getters.getActiveSheetId(),zone:e.zone,color:_,fillAlpha:.06}))}get rangesString(){let e=this.env.model.getters.getActiveSheetId();return this.props.rule.ranges.map(t=>this.env.model.getters.getRangeString(t,e)).join(`, `)}get descriptionString(){return $.get(this.props.rule.criterion.type).getPreview(this.props.rule.criterion,this.env.model.getters)}},WI=class extends t.Component{static template=`o-spreadsheet-DataValidationPanel`;static props={onCloseSidePanel:Function};static components={DataValidationPreview:UI,DataValidationEditor:HI};state=(0,t.useState)({mode:`list`,activeRule:void 0});onPreviewClick(e){let t=this.env.model.getters.getActiveSheetId(),n=this.env.model.getters.getDataValidationRule(t,e);n&&(this.state.mode=`edit`,this.state.activeRule=n)}addDataValidationRule(){this.state.mode=`edit`,this.state.activeRule=void 0}onExitEditMode(){this.state.mode=`list`,this.state.activeRule=void 0}localizeDVRule(e){return e&&Ol(e,this.env.model.getters.getLocale())}get validationRules(){let e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getDataValidationRules(e)}};let GI=`#8B008B`;var KI=class extends Md{mutators=[`updateSearchOptions`,`updateSearchContent`,`searchFormulas`,`selectPreviousMatch`,`selectNextMatch`,`replace`];allSheetsMatches=[];activeSheetMatches=[];specificRangeMatches=[];selectedMatchPosition=null;currentSearchRegex=null;initialShowFormulaState;irreplaceableMatchCount=0;isSearchDirty=!1;shouldFinalizeUpdateSelection=!1;notificationStore=this.get(Ix);selectedMatchIndex=null;toSearch=``;toReplace=``;searchOptions={matchCase:!1,exactMatch:!1,searchFormulas:!1,searchScope:`activeSheet`,specificRange:void 0};constructor(e){super(e),this.initialShowFormulaState=this.model.getters.shouldShowFormulas(),this.searchOptions.searchFormulas=this.initialShowFormulaState;let t=e(Fx);t.register(this),this.onDispose(()=>{this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:this.initialShowFormulaState}),t.unRegister(this)})}get searchMatches(){switch(this.searchOptions.searchScope){case`allSheets`:return this.allSheetsMatches;case`activeSheet`:return this.activeSheetMatches;case`specificRange`:return this.specificRangeMatches}}updateSearchContent(e){this._updateSearch(e,this.searchOptions)}updateSearchOptions(e){this._updateSearch(this.toSearch,{...this.searchOptions,...e})}searchFormulas(e){this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:e}),this.updateSearchOptions({searchFormulas:e})}selectPreviousMatch(){this.selectNextCell(-1,{jumpToMatchSheet:!0,updateSelection:!0})}selectNextMatch(){this.selectNextCell(1,{jumpToMatchSheet:!0,updateSelection:!0})}handle(e){switch(e.type){case`SET_FORMULA_VISIBILITY`:this.updateSearchOptions({searchFormulas:e.show});break;case`UNDO`:case`REDO`:case`REMOVE_TABLE`:case`UPDATE_FILTER`:case`REMOVE_COLUMNS_ROWS`:case`HIDE_COLUMNS_ROWS`:case`UNHIDE_COLUMNS_ROWS`:case`ADD_COLUMNS_ROWS`:case`EVALUATE_CELLS`:case`UPDATE_CELL`:this.isSearchDirty=!0;break;case`ACTIVATE_SHEET`:this.isSearchDirty=!0,this.shouldFinalizeUpdateSelection=!0,this.searchOptions.specificRange&&(this.searchOptions.specificRange=this.searchOptions.specificRange.clone({sheetId:this.getters.getActiveSheetId()}));break;case`DELETE_SHEET`:this.searchOptions.searchScope===`specificRange`&&this.searchOptions.specificRange?.sheetId===e.sheetId&&(this.searchOptions={...this.searchOptions,specificRange:void 0}),this.isSearchDirty=!0;break;case`REPLACE_SEARCH`:for(let t of e.matches)this.replaceMatch(t,e.searchString,e.replaceWith,e.searchOptions);this.irreplaceableMatchCount>0&&this.showReplaceWarningMessage(e.matches.length,this.irreplaceableMatchCount),this.irreplaceableMatchCount=0;break}}finalize(){this.isSearchDirty&&=(this.refreshSearch({jumpToMatchSheet:!1,updateSelection:this.shouldFinalizeUpdateSelection}),this.shouldFinalizeUpdateSelection=!1,!1)}get allSheetMatchesCount(){return this.allSheetsMatches.length}get activeSheetMatchesCount(){return this.activeSheetMatches.length}get specificRangeMatchesCount(){return this.specificRangeMatches.length}_updateSearch(e,t){this.searchOptions=t,e!==this.toSearch&&(this.selectedMatchIndex=null,this.selectedMatchPosition=null),this.toSearch=e,this.currentSearchRegex=qt(this.toSearch,this.searchOptions),this.refreshSearch({jumpToMatchSheet:!0,updateSelection:!0})}refreshSearch(e){if(this.findMatches(),this.selectedMatchPosition)if(this.selectedMatchPosition.sheetId!==this.getters.getActiveSheetId())this.selectedMatchIndex=null,this.selectedMatchPosition=null;else{let e=this.searchMatches.findIndex(e=>e.sheetId===this.selectedMatchPosition?.sheetId&&e.col===this.selectedMatchPosition?.col&&e.row===this.selectedMatchPosition?.row);e!==-1&&(this.selectedMatchIndex=e)}this.selectNextCell(0,e)}getSheetsInSearchOrder(){switch(this.searchOptions.searchScope){case`allSheets`:let e=this.getters.getSheetIds(),t=e.findIndex(e=>e===this.getters.getActiveSheetId());return[e[t],...e.slice(t+1),...e.slice(0,t)];case`activeSheet`:return[this.getters.getActiveSheetId()];case`specificRange`:let n=this.searchOptions.specificRange;return n&&n?[n.sheetId]:[]}}findMatches(){let e=[];if(this.toSearch)for(let t of this.getters.getSheetIds())e.push(...this.findMatchesInSheet(t));if(this.allSheetsMatches=e,this.activeSheetMatches=e.filter(e=>e.sheetId===this.getters.getActiveSheetId()),this.searchOptions.specificRange){let{sheetId:t,zone:n}=this.searchOptions.specificRange;this.specificRangeMatches=e.filter(e=>e.sheetId===t&&wr(e.col,e.row,n))}else this.specificRangeMatches=[]}findMatchesInSheet(e){let t=[],{left:n,right:r,top:i,bottom:a}=this.getters.getSheetZone(e);for(let o=i;o<=a;o++)for(let i=n;i<=r;i++){let n=this.getters.isColHidden(e,i),r=this.getters.isRowHidden(e,o);if(n||r)continue;let a={sheetId:e,col:i,row:o};if(this.currentSearchRegex?.test(this.getSearchableString(a))){let n={sheetId:e,col:i,row:o};t.push(n)}}return t}selectNextCell(e,t){let n=this.searchMatches;if(!n.length){this.selectedMatchIndex=null,this.selectedMatchPosition=null;return}let r;if(this.selectedMatchIndex===null){let e=-1;for(let t of this.getSheetsInSearchOrder())if(e=n.findIndex(e=>e.sheetId===t),e!==-1)break;r=e}else r=this.selectedMatchIndex+e;r=(r+n.length)%n.length,this.selectedMatchIndex=r,this.selectedMatchPosition=n[this.selectedMatchIndex];let i=n[r];t.jumpToMatchSheet&&this.getters.getActiveSheetId()!==i.sheetId&&(this.model.dispatch(`ACTIVATE_SHEET`,{sheetIdFrom:this.getters.getActiveSheetId(),sheetIdTo:i.sheetId}),this.isSearchDirty=!1),this.model.selection.getBackToDefault(),t.updateSelection&&this.model.selection.selectCell(i.col,i.row)}replace(){this.selectedMatchIndex!==null&&(this.shouldFinalizeUpdateSelection=!0,this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:[this.searchMatches[this.selectedMatchIndex]],searchOptions:this.searchOptions}))}replaceAll(){this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:this.searchMatches,searchOptions:this.searchOptions})}showReplaceWarningMessage(e,t){let n=e-t;n===0?this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`Match(es) cannot be replaced as they are part of a formula.`)}):this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`%(replaceable_count)s match(es) replaced. %(irreplaceable_count)s match(es) cannot be replaced as they are part of a formula.`,{replaceable_count:n,irreplaceable_count:t})})}replaceMatch(e,t,n,r){let i=this.getters.getCell(e);if(!i?.content)return;if(i?.isFormula&&!r.searchFormulas){this.irreplaceableMatchCount++;return}let a=qt(t,r),o=new RegExp(a.source,a.flags+`g`),s=hl(this.getters.getCellText(e,{showFormula:r.searchFormulas}).replace(o,n),this.getters.getLocale());this.model.dispatch(`UPDATE_CELL`,{...e,content:s})}getSearchableString(e){return this.getters.getCellText(e,{showFormula:this.searchOptions.searchFormulas})}get highlights(){let e=[],t=this.getters.getActiveSheetId();for(let[n,r]of this.searchMatches.entries()){if(r.sheetId!==t)continue;let i=D(r),a=this.getters.expandZone(t,i),{width:o,height:s}=this.getters.getVisibleRect(a);o>0&&s>0&&e.push({sheetId:t,zone:a,color:GI,noBorder:n!==this.selectedMatchIndex,thinLine:!0,fillAlpha:.2})}if(this.searchOptions.searchScope===`specificRange`){let n=this.searchOptions.specificRange;n&&n.sheetId===t&&e.push({sheetId:t,zone:n.zone,color:GI,noFill:!0,thinLine:!0})}return e}};H`
1203
1203
  .o-find-and-replace {
1204
1204
  outline: none;
1205
1205
  height: 100%;
@@ -1578,7 +1578,7 @@ stores.inject(MyMetaStore, storeInstance);
1578
1578
  color: white;
1579
1579
  pointer-events: none;
1580
1580
  }
1581
- `;var wR=class extends t.Component{static template=`o-spreadsheet-ClientTag`;static props={active:Boolean,name:String,color:String,col:Number,row:Number};get tagStyle(){let{col:e,row:t,color:n}=this.props,{height:r}=this.env.model.getters.getSheetViewDimensionWithHeaders(),{x:i,y:a}=this.env.model.getters.getVisibleRect({left:e,top:t,right:e,bottom:t});return U({bottom:`${r-a+15}px`,left:`${i-1}px`,border:`1px solid ${n}`,"background-color":n})}};let TR=E(`The cell you are trying to edit has been deleted.`);var ER=class extends Bx{canStopEdition(){return this.editionMode===`inactive`?!0:this.checkDataValidation()}stopEdition(e){if(this.canStopEdition()){this._stopEdition(),e&&this.model.selection.moveAnchorCell(e,1);return}let t=this.currentEditedCell,n=w(t.col,t.row),r=this.getters.getValidationRuleForCell(t);if(!r)return;let i=$.get(r.criterion.type).getErrorString(r.criterion,this.getters,t.sheetId);this.notificationStore.raiseError(E(`The data you entered in %s violates the data validation rule set on the cell:
1581
+ `;var wR=class extends t.Component{static template=`o-spreadsheet-ClientTag`;static props={active:Boolean,name:String,color:String,col:Number,row:Number};get tagStyle(){let{col:e,row:t,color:n}=this.props,{height:r}=this.env.model.getters.getSheetViewDimensionWithHeaders(),{x:i,y:a}=this.env.model.getters.getVisibleRect({left:e,top:t,right:e,bottom:t});return U({bottom:`${r-a+15}px`,left:`${i-1}px`,border:`1px solid ${n}`,"background-color":n})}};let TR=E(`The cell you are trying to edit has been deleted.`);var ER=class extends Bx{canStopEdition(){return this.editionMode===`inactive`?!0:this.checkDataValidation()}stopEdition(e){if(this.canStopEdition()){let{col:t,row:n}=this.currentEditedCell;this._stopEdition(),e&&(this.model.selection.selectCell(t,n),this.model.selection.moveAnchorCell(e,1));return}let t=this.currentEditedCell,n=w(t.col,t.row),r=this.getters.getValidationRuleForCell(t);if(!r)return;let i=$.get(r.criterion.type).getErrorString(r.criterion,this.getters,t.sheetId);this.notificationStore.raiseError(E(`The data you entered in %s violates the data validation rule set on the cell:
1582
1582
  %s`,n,i)),this.cancelEdition()}handle(e){switch(super.handle(e),e.type){case`SET_FORMATTING`:this.cancelEdition();break;case`ADD_COLUMNS_ROWS`:this.onAddElements(e);break;case`REMOVE_COLUMNS_ROWS`:e.dimension===`COL`?this.onColumnsRemoved(e):this.onRowsRemoved(e);break;case`ACTIVATE_SHEET`:if(this._currentContent.startsWith(`=`)||(this._cancelEdition(),this.resetContent()),e.sheetIdFrom!==e.sheetIdTo){let t=this.getters.getActivePosition(),{col:n,row:r}=this.getters.getNextVisibleCellPosition({sheetId:e.sheetIdTo,col:t.col,row:t.row}),i=this.getters.expandZone(e.sheetIdTo,D({col:n,row:r}));this.model.selection.resetAnchor(this,{cell:{col:n,row:r},zone:i})}break;case`DELETE_SHEET`:case`UNDO`:case`REDO`:!this.getters.tryGetSheet(this.sheetId)&&this.editionMode!==`inactive`&&(this.sheetId=this.getters.getActiveSheetId(),this.resetContent(),this.cancelEditionAndActivateSheet(),this.notificationStore.raiseError(TR));break}}get placeholder(){let e=this.getters.getActivePosition(),t=this.model.getters.getArrayFormulaSpreadingOn(e);if(t)return this.getters.getCellText(t,{showFormula:!0})}get currentEditedCell(){return{sheetId:this.sheetId,col:this.col,row:this.row}}onColumnsRemoved(e){if(e.elements.includes(this.col)&&this.editionMode!==`inactive`){this.cancelEdition(),this.notificationStore.raiseError(TR);return}let{top:t,left:n}=_r({left:this.col,right:this.col,top:this.row,bottom:this.row},`left`,[...e.elements]);this.col=n,this.row=t}onRowsRemoved(e){if(e.elements.includes(this.row)&&this.editionMode!==`inactive`){this.cancelEdition(),this.notificationStore.raiseError(TR);return}let{top:t,left:n}=_r({left:this.col,right:this.col,top:this.row,bottom:this.row},`top`,[...e.elements]);this.col=n,this.row=t}onAddElements(e){let{top:t,left:n}=gr({left:this.col,right:this.col,top:this.row,bottom:this.row},e.dimension===`COL`?`left`:`top`,e.base,e.position,e.quantity);this.col=n,this.row=t}confirmEdition(e){if(e){let t=this.getters.getActiveSheetId(),n=this.getters.getEvaluatedCell({sheetId:t,col:this.col,row:this.row});n.link&&!e.startsWith(`=`)&&(e=vt(e,n.link.url)),this.addHeadersForSpreadingFormula(e),this.model.dispatch(`UPDATE_CELL`,{...this.currentEditedCell,content:e})}else this.model.dispatch(`UPDATE_CELL`,{...this.currentEditedCell,content:``});this.model.dispatch(`AUTOFILL_TABLE_COLUMN`,{...this.currentEditedCell}),this.setContent(``)}getComposerContent(e){let t=this.getters.getLocale(),n=this.getters.getCell(e);if(n?.isFormula)return bl(n.content,t);if(this.model.getters.getArrayFormulaSpreadingOn(e))return``;let{format:r,value:i,type:a,formattedValue:o}=this.getters.getEvaluatedCell(e);switch(a){case`empty`:return``;case`text`:case`error`:return i;case`boolean`:return o;case`number`:return r&&as(r)?fi(o,t)===null?B(i,{locale:t,format:Number.isInteger(i)?t.dateFormat:jl(t)}):o:this.numberComposerContent(i,r,t)}}numberComposerContent(e,t,n){return t?.includes(`%`)?`${is(e*100,n.decimalSeparator)}%`:is(e,n.decimalSeparator)}addHeadersForSpreadingFormula(e){if(!e.startsWith(`=`))return;let t=this.getters.evaluateFormula(this.sheetId,e,{sheetId:this.sheetId,col:this.col,row:this.row});if(!A(t))return;let n=this.getters.getNumberRows(this.sheetId),r=this.getters.getNumberCols(this.sheetId),i=this.row+t[0].length-n,a=this.col+t.length-r;a>0&&this.model.dispatch(`ADD_COLUMNS_ROWS`,{sheetId:this.sheetId,dimension:`COL`,base:r-1,position:`after`,quantity:a+20}),i>0&&this.model.dispatch(`ADD_COLUMNS_ROWS`,{sheetId:this.sheetId,dimension:`ROW`,base:n-1,position:`after`,quantity:i+50})}checkDataValidation(){let e={sheetId:this.sheetId,col:this.col,row:this.row},t=this.getCurrentCanonicalContent(),n=t.startsWith(`=`)?this.getters.evaluateFormula(this.sheetId,t):ks(t,this.getters.getLocale());if(A(n))return!0;let r=this.getters.getValidationResultForCellValue(n,e);return!(!r.isValid&&r.rule.isBlocking)}};let DR=3*.4*window.devicePixelRatio||1;H`
1583
1583
  div.o-grid-composer {
1584
1584
  z-index: ${20};
@@ -3354,4 +3354,4 @@ stores.inject(MyMetaStore, storeInstance);
3354
3354
  <Relationships xmlns="${rC.Relationships}">
3355
3355
  <Relationship ${J(e)} />
3356
3356
  </Relationships>
3357
- `),`_rels/.rels`)}function FW(e){let t={},n=[];for(let r of e.sheets){let e=r.name.slice(0,31);e=$t(e,n,{compute:(e,t)=>e.slice(0,31-String(t).length)+t}),n.push(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${at(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function IW(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>Er(dr(e.range)).numberOfRows>1);return e}var LW=class extends bd{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},n={},r=[],i=new Rc,a=!1){let o=performance.now();console.debug(`##### Model creation #####`),super(),sr(),r=ME(e,r);let s=EE(e,a);this.state=new nU,this.uuidGenerator=i,this.config=this.setupConfig(n),this.session=this.setupSession(s.revisionId),this.coreGetters={},this.range=new Wz(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.adaptFormulaStringDependencies=this.range.adaptFormulaStringDependencies.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new eU(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of lH.getAll())this.setupCorePlugin(e,s);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(r);for(let e of fH.getAll()){let t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of dH.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of uH.getAll()){let t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch(`START`),this.selection.observe(this,{handleEvent:()=>this.trigger(`update`)}),this.setupSessionEvents(),this.joinSession(),n.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}(0,t.markRaw)(this),console.debug(`Model created in`,performance.now()-o,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:kt(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCoreViewPlugin(e){let t=new e(this.coreViewPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new dV(XH({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1}}),this.config.transportService,e)}setupSessionEvents(){this.session.on(`remote-revision-received`,this,this.onRemoteRevisionReceived),this.session.on(`revision-undone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`UNDO`,{commands:e}),this.finalize()}),this.session.on(`revision-redone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`REDO`,{commands:e}),this.finalize()}),this.session.on(`unexpected-revision-id`,this,()=>this.trigger(`unexpected-revision-id`)),this.session.on(`collaborative-event-received`,this,()=>{this.trigger(`update`)})}setupConfig(e){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:E(`Anonymous`).toString()},n=e.transportService||new HH;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:n,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger(`notify-ui`,e),raiseBlockingErrorUI:e=>this.trigger(`raise-error-ui`,{text:e}),customColors:e.customColors||[]}}setupExternalConfig(e){let t=e.loadLocales||(()=>Promise.resolve(ua));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){let t=aa(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new sa(t.flat()):sa.Success}checkDispatchAllowedCoreCommand(e){let t=this.corePlugins.map(t=>t.allowDispatch(e));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map(t=>t.allowDispatch(e))}finalize(){this.status=3;for(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed(RW(e,t));dispatch=(e,t)=>{let n=RW(e,t),r=this.status;if(this.getters.isReadonly()&&!oa(n))return new sa(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new sa(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();aa(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(aa(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(aa(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return sa.Success};dispatchFromCorePlugin=(e,t)=>{let n=RW(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,sa.Success};dispatchToHandlers(e,t){let n=aa(t);for(let r of e)!n&&r instanceof Oz||r.beforeHandle(t);for(let r of e)!n&&r instanceof Oz||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=RE();for(let t of this.handlers)t instanceof Oz&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=y(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=BE();for(let t of this.handlers)t instanceof Dz&&t.exportForExcel(e);return e=y(e),EW(e)}garbageCollectExternalResources(){for(let e of this.corePlugins)e.garbageCollectExternalResources()}};function RW(e,t={}){let n=y(t);return n.type=e,n}let zW={},BW={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},VW={autoCompleteProviders:Wf,autofillModifiersRegistry:xS,autofillRulesRegistry:SS,cellMenuRegistry:ZM,colMenuRegistry:JP,errorTypes:ha,linkMenuRegistry:lA,functionRegistry:Dx,featurePluginRegistry:uH,iconsOnCellRegistry:hC,statefulUIPluginRegistry:dH,coreViewsPluginRegistry:fH,corePluginRegistry:lH,rowMenuRegistry:$P,sidePanelRegistry:pR,figureRegistry:yk,chartSidePanelComponentRegistry:dI,chartComponentRegistry:dk,chartRegistry:uk,chartSubtypeRegistry:pk,topbarMenuRegistry:rF,topbarComponentRegistry:aF,clickableCellRegistry:pH,otRegistry:iF,inverseCommandRegistry:Tk,urlRegistry:uo,cellPopoverRegistry:MS,numberFormatMenuRegistry:YP,repeatLocalCommandTransformRegistry:GV,repeatCommandTransformRegistry:WV,clipboardHandlersRegistries:_d,pivotRegistry:jL,pivotTimeAdapterRegistry:Tu,pivotSidePanelRegistry:LL,pivotNormalizationValueRegistry:nd,supportedPivotPositionalFormulaRegistry:gS,pivotToFunctionValueRegistry:rd,migrationStepRegistry:CE,chartJsExtensionRegistry:Wd},HW={arg:W,isEvaluationError:P,toBoolean:L,toJsDate:R,toNumber:F,toString:I,toNormalizedPivotValue:Qu,toXC:w,toZone:dr,toUnboundedZone:ur,toCartesian:qn,numberToLetters:Rn,lettersToNumber:zn,UuidGenerator:Rc,formatValue:B,createCurrencyFormat:fs,ColorGenerator:Nn,computeTextWidth:xc,createEmptyWorkbookData:RE,createEmptySheet:LE,createEmptyExcelSheet:zE,rgbaToHex:pn,colorToRGBA:mn,positionToZone:D,isDefined:S,isMatrix:A,lazy:kt,genericRepeat:KV,createAction:m,createActions:f,transformRangeData:yd,deepEquals:C,overlap:Cr,union:yr,isInside:wr,deepCopy:y,expandZoneOnInsertion:hr,reduceZoneOnDeletion:vr,unquote:ct,getMaxObjectId:Wu,getFunctionsFromTokens:aS,getFirstPivotFunction:pS,getNumberOfPivotFunctions:hS,parseDimension:qu,isDateOrDatetimeField:Ju,makeFieldProposal:cS,insertTokenAfterArgSeparator:uS,insertTokenAfterLeftParenthesis:dS,mergeContiguousZones:Wr,getPivotHighlights:tF,pivotTimeAdapter:Eu,UNDO_REDO_PIVOT_COMMANDS:jB,createPivotFormula:Zu,areDomainArgsFieldsValid:Xu,splitReference:tc,sanitizeSheetName:ut,getUniqueText:$t,isNumber:Hi,isDateTime:ui},UW={isMarkdownLink:gt,parseMarkdownLink:yt,markdownLink:vt,openLink:go,urlRepresentation:ho},WW={Checkbox:Kk,Section:Q,RoundColorPicker:MF,ChartDataSeries:vF,ChartErrorSection:bF,ChartLabelRange:xF,ChartTitle:AF,ChartPanel:mI,ChartFigure:hk,ChartJsComponent:Ef,Grid:Tz,GridOverlay:ez,ScorecardChart:Uf,LineConfigPanel:iI,BarConfigPanel:CF,PieChartDesignPanel:aI,GenericChartConfigPanel:SF,ChartWithAxisDesignPanel:RF,GaugeChartConfigPanel:BF,GaugeChartDesignPanel:$F,ScorecardChartConfigPanel:cI,ScorecardChartDesignPanel:lI,RadarChartDesignPanel:oI,WaterfallChartDesignPanel:uI,ComboChartDesignPanel:zF,ChartTypePicker:fI,FigureComponent:mR,Menu:RA,Popover:PA,SelectionInput:_F,ValidationMessages:yF,AddDimensionButton:eL,PivotDimensionGranularity:iL,PivotDimensionOrder:aL,PivotDimension:rL,PivotLayoutConfigurator:lL,PivotHTMLRenderer:Ez,PivotDeferUpdate:QI,PivotTitleSection:uL,CogWheelMenu:nL,TextInput:tL,SidePanelCollapsible:TF,RadioSelection:FF},GW={useDragAndDropListItems:cF,useHighlights:yI,useHighlightsOnHover:vI},KW={useStoreProvider:Td,DependencyContainer:xd,CellPopoverStore:Qk,ComposerFocusStore:Pd,CellComposerStore:ER,FindAndReplaceStore:KI,HighlightStore:Fx,HoveredCellStore:Zk,ModelStore:Ad,NotificationStore:Ix,RendererStore:jd,SelectionInputStore:gF,SpreadsheetStore:Md,useStore:V,useLocalStore:Ed,SidePanelStore:xz,PivotSidePanelStore:FL,PivotMeasureDisplayPanelStore:XI};function qW(e,t){return Dx.add(e,t),{addFunction:(e,t)=>qW(e,t)}}let JW={DEFAULT_LOCALE:k,HIGHLIGHT_COLOR:_,PIVOT_TABLE_CONFIG:et,ChartTerms:qE},YW={...GA,...PO};e.AbstractCellClipboardHandler=Jc,e.AbstractChart=Df,e.AbstractFigureClipboardHandler=cd,e.CellErrorType=j,e.CommandResult=la,e.CorePlugin=Oz,e.CoreViewPlugin=Qz,e.DispatchResult=sa,e.EvaluationError=M,e.Model=LW,e.PivotRuntimeDefinition=dL,e.Registry=h,e.Revision=lV,e.SPREADSHEET_DIMENSIONS=BW,e.Spreadsheet=VH,e.SpreadsheetPivotTable=hL,e.UIPlugin=PB,e.__info__=zW,e.addFunction=qW,e.addRenderingLayer=ma,e.astToFormula=cy,e.chartHelpers=YW,e.compile=Xx,e.compileTokens=Zx,e.components=WW,e.constants=JW,e.convertAstNodes=iy,e.coreTypes=ia,e.findCellInNewZone=Fr,e.functionCache=Yx,e.helpers=HW,e.hooks=GW,e.invalidateCFEvaluationCommands=ta,e.invalidateDependenciesCommands=ea,e.invalidateEvaluationCommands=Qi,e.iterateAstNodes=ay,e.links=UW,e.load=EE,e.parse=ny,e.parseTokens=ry,e.readonlyAllowedCommands=ra,e.registries=VW,e.setDefaultSheetViewSize=Qe,e.setTranslationMethod=or,e.stores=KW,e.tokenColors=zx,e.tokenize=Qc,zW.version=`18.2.55`,zW.date=`2026-06-06T06:20:23.893Z`,zW.hash=`57b568a`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3357
+ `),`_rels/.rels`)}function FW(e){let t={},n=[];for(let r of e.sheets){let e=r.name.slice(0,31);e=$t(e,n,{compute:(e,t)=>e.slice(0,31-String(t).length)+t}),n.push(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${at(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function IW(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>Er(dr(e.range)).numberOfRows>1);return e}var LW=class extends bd{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},n={},r=[],i=new Rc,a=!1){let o=performance.now();console.debug(`##### Model creation #####`),super(),sr(),r=ME(e,r);let s=EE(e,a);this.state=new nU,this.uuidGenerator=i,this.config=this.setupConfig(n),this.session=this.setupSession(s.revisionId),this.coreGetters={},this.range=new Wz(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.adaptFormulaStringDependencies=this.range.adaptFormulaStringDependencies.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new eU(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of lH.getAll())this.setupCorePlugin(e,s);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(r);for(let e of fH.getAll()){let t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of dH.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of uH.getAll()){let t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch(`START`),this.selection.observe(this,{handleEvent:()=>this.trigger(`update`)}),this.setupSessionEvents(),this.joinSession(),n.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}(0,t.markRaw)(this),console.debug(`Model created in`,performance.now()-o,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:kt(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCoreViewPlugin(e){let t=new e(this.coreViewPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new dV(XH({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1}}),this.config.transportService,e)}setupSessionEvents(){this.session.on(`remote-revision-received`,this,this.onRemoteRevisionReceived),this.session.on(`revision-undone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`UNDO`,{commands:e}),this.finalize()}),this.session.on(`revision-redone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`REDO`,{commands:e}),this.finalize()}),this.session.on(`unexpected-revision-id`,this,()=>this.trigger(`unexpected-revision-id`)),this.session.on(`collaborative-event-received`,this,()=>{this.trigger(`update`)})}setupConfig(e){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:E(`Anonymous`).toString()},n=e.transportService||new HH;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:n,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger(`notify-ui`,e),raiseBlockingErrorUI:e=>this.trigger(`raise-error-ui`,{text:e}),customColors:e.customColors||[]}}setupExternalConfig(e){let t=e.loadLocales||(()=>Promise.resolve(ua));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){let t=aa(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new sa(t.flat()):sa.Success}checkDispatchAllowedCoreCommand(e){let t=this.corePlugins.map(t=>t.allowDispatch(e));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map(t=>t.allowDispatch(e))}finalize(){this.status=3;for(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed(RW(e,t));dispatch=(e,t)=>{let n=RW(e,t),r=this.status;if(this.getters.isReadonly()&&!oa(n))return new sa(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new sa(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();aa(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(aa(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(aa(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return sa.Success};dispatchFromCorePlugin=(e,t)=>{let n=RW(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,sa.Success};dispatchToHandlers(e,t){let n=aa(t);for(let r of e)!n&&r instanceof Oz||r.beforeHandle(t);for(let r of e)!n&&r instanceof Oz||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=RE();for(let t of this.handlers)t instanceof Oz&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=y(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=BE();for(let t of this.handlers)t instanceof Dz&&t.exportForExcel(e);return e=y(e),EW(e)}garbageCollectExternalResources(){for(let e of this.corePlugins)e.garbageCollectExternalResources()}};function RW(e,t={}){let n=y(t);return n.type=e,n}let zW={},BW={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},VW={autoCompleteProviders:Wf,autofillModifiersRegistry:xS,autofillRulesRegistry:SS,cellMenuRegistry:ZM,colMenuRegistry:JP,errorTypes:ha,linkMenuRegistry:lA,functionRegistry:Dx,featurePluginRegistry:uH,iconsOnCellRegistry:hC,statefulUIPluginRegistry:dH,coreViewsPluginRegistry:fH,corePluginRegistry:lH,rowMenuRegistry:$P,sidePanelRegistry:pR,figureRegistry:yk,chartSidePanelComponentRegistry:dI,chartComponentRegistry:dk,chartRegistry:uk,chartSubtypeRegistry:pk,topbarMenuRegistry:rF,topbarComponentRegistry:aF,clickableCellRegistry:pH,otRegistry:iF,inverseCommandRegistry:Tk,urlRegistry:uo,cellPopoverRegistry:MS,numberFormatMenuRegistry:YP,repeatLocalCommandTransformRegistry:GV,repeatCommandTransformRegistry:WV,clipboardHandlersRegistries:_d,pivotRegistry:jL,pivotTimeAdapterRegistry:Tu,pivotSidePanelRegistry:LL,pivotNormalizationValueRegistry:nd,supportedPivotPositionalFormulaRegistry:gS,pivotToFunctionValueRegistry:rd,migrationStepRegistry:CE,chartJsExtensionRegistry:Wd},HW={arg:W,isEvaluationError:P,toBoolean:L,toJsDate:R,toNumber:F,toString:I,toNormalizedPivotValue:Qu,toXC:w,toZone:dr,toUnboundedZone:ur,toCartesian:qn,numberToLetters:Rn,lettersToNumber:zn,UuidGenerator:Rc,formatValue:B,createCurrencyFormat:fs,ColorGenerator:Nn,computeTextWidth:xc,createEmptyWorkbookData:RE,createEmptySheet:LE,createEmptyExcelSheet:zE,rgbaToHex:pn,colorToRGBA:mn,positionToZone:D,isDefined:S,isMatrix:A,lazy:kt,genericRepeat:KV,createAction:m,createActions:f,transformRangeData:yd,deepEquals:C,overlap:Cr,union:yr,isInside:wr,deepCopy:y,expandZoneOnInsertion:hr,reduceZoneOnDeletion:vr,unquote:ct,getMaxObjectId:Wu,getFunctionsFromTokens:aS,getFirstPivotFunction:pS,getNumberOfPivotFunctions:hS,parseDimension:qu,isDateOrDatetimeField:Ju,makeFieldProposal:cS,insertTokenAfterArgSeparator:uS,insertTokenAfterLeftParenthesis:dS,mergeContiguousZones:Wr,getPivotHighlights:tF,pivotTimeAdapter:Eu,UNDO_REDO_PIVOT_COMMANDS:jB,createPivotFormula:Zu,areDomainArgsFieldsValid:Xu,splitReference:tc,sanitizeSheetName:ut,getUniqueText:$t,isNumber:Hi,isDateTime:ui},UW={isMarkdownLink:gt,parseMarkdownLink:yt,markdownLink:vt,openLink:go,urlRepresentation:ho},WW={Checkbox:Kk,Section:Q,RoundColorPicker:MF,ChartDataSeries:vF,ChartErrorSection:bF,ChartLabelRange:xF,ChartTitle:AF,ChartPanel:mI,ChartFigure:hk,ChartJsComponent:Ef,Grid:Tz,GridOverlay:ez,ScorecardChart:Uf,LineConfigPanel:iI,BarConfigPanel:CF,PieChartDesignPanel:aI,GenericChartConfigPanel:SF,ChartWithAxisDesignPanel:RF,GaugeChartConfigPanel:BF,GaugeChartDesignPanel:$F,ScorecardChartConfigPanel:cI,ScorecardChartDesignPanel:lI,RadarChartDesignPanel:oI,WaterfallChartDesignPanel:uI,ComboChartDesignPanel:zF,ChartTypePicker:fI,FigureComponent:mR,Menu:RA,Popover:PA,SelectionInput:_F,ValidationMessages:yF,AddDimensionButton:eL,PivotDimensionGranularity:iL,PivotDimensionOrder:aL,PivotDimension:rL,PivotLayoutConfigurator:lL,PivotHTMLRenderer:Ez,PivotDeferUpdate:QI,PivotTitleSection:uL,CogWheelMenu:nL,TextInput:tL,SidePanelCollapsible:TF,RadioSelection:FF},GW={useDragAndDropListItems:cF,useHighlights:yI,useHighlightsOnHover:vI},KW={useStoreProvider:Td,DependencyContainer:xd,CellPopoverStore:Qk,ComposerFocusStore:Pd,CellComposerStore:ER,FindAndReplaceStore:KI,HighlightStore:Fx,HoveredCellStore:Zk,ModelStore:Ad,NotificationStore:Ix,RendererStore:jd,SelectionInputStore:gF,SpreadsheetStore:Md,useStore:V,useLocalStore:Ed,SidePanelStore:xz,PivotSidePanelStore:FL,PivotMeasureDisplayPanelStore:XI};function qW(e,t){return Dx.add(e,t),{addFunction:(e,t)=>qW(e,t)}}let JW={DEFAULT_LOCALE:k,HIGHLIGHT_COLOR:_,PIVOT_TABLE_CONFIG:et,ChartTerms:qE},YW={...GA,...PO};e.AbstractCellClipboardHandler=Jc,e.AbstractChart=Df,e.AbstractFigureClipboardHandler=cd,e.CellErrorType=j,e.CommandResult=la,e.CorePlugin=Oz,e.CoreViewPlugin=Qz,e.DispatchResult=sa,e.EvaluationError=M,e.Model=LW,e.PivotRuntimeDefinition=dL,e.Registry=h,e.Revision=lV,e.SPREADSHEET_DIMENSIONS=BW,e.Spreadsheet=VH,e.SpreadsheetPivotTable=hL,e.UIPlugin=PB,e.__info__=zW,e.addFunction=qW,e.addRenderingLayer=ma,e.astToFormula=cy,e.chartHelpers=YW,e.compile=Xx,e.compileTokens=Zx,e.components=WW,e.constants=JW,e.convertAstNodes=iy,e.coreTypes=ia,e.findCellInNewZone=Fr,e.functionCache=Yx,e.helpers=HW,e.hooks=GW,e.invalidateCFEvaluationCommands=ta,e.invalidateDependenciesCommands=ea,e.invalidateEvaluationCommands=Qi,e.iterateAstNodes=ay,e.links=UW,e.load=EE,e.parse=ny,e.parseTokens=ry,e.readonlyAllowedCommands=ra,e.registries=VW,e.setDefaultSheetViewSize=Qe,e.setTranslationMethod=or,e.stores=KW,e.tokenColors=zx,e.tokenize=Qc,zW.version=`18.2.56`,zW.date=`2026-06-17T08:50:15.644Z`,zW.hash=`17ea4a6`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 18.2.55
5
- @date 2026-06-06T06:20:24.631Z
6
- @hash 57b568a
4
+ @version 18.2.56
5
+ @date 2026-06-17T08:50:16.412Z
6
+ @hash 17ea4a6
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.2.55",
3
+ "version": "18.2.56",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",