@odoo/o-spreadsheet 17.2.11 → 17.2.13
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.
- package/dist/o-spreadsheet.cjs.js +37 -15
- package/dist/o-spreadsheet.d.ts +4 -2
- package/dist/o-spreadsheet.esm.js +37 -15
- package/dist/o-spreadsheet.iife.js +37 -15
- package/dist/o-spreadsheet.iife.min.js +264 -264
- package/dist/o_spreadsheet.xml +5 -4
- package/package.json +1 -1
|
@@ -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.
|
|
7
|
-
* @date 2024-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.13
|
|
7
|
+
* @date 2024-07-02T09:03:00.731Z
|
|
8
|
+
* @hash fac2351
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -1818,9 +1818,10 @@ function percentile(values, percent, isInclusive) {
|
|
|
1818
1818
|
sortedValues[indexLow] * (indexSup - percentIndex));
|
|
1819
1819
|
}
|
|
1820
1820
|
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
let
|
|
1821
|
+
const defaultTranslate = (s) => s;
|
|
1822
|
+
const defaultLoaded = () => false;
|
|
1823
|
+
let _translate = defaultTranslate;
|
|
1824
|
+
let _loaded = defaultLoaded;
|
|
1824
1825
|
function sprintf(s, ...values) {
|
|
1825
1826
|
if (values.length === 1 && typeof values[0] === "object" && !(values[0] instanceof String)) {
|
|
1826
1827
|
const valuesDict = values[0];
|
|
@@ -1832,7 +1833,8 @@ function sprintf(s, ...values) {
|
|
|
1832
1833
|
return s;
|
|
1833
1834
|
}
|
|
1834
1835
|
/***
|
|
1835
|
-
* Allow to inject a translation function from outside o-spreadsheet.
|
|
1836
|
+
* Allow to inject a translation function from outside o-spreadsheet. This should be called before instantiating
|
|
1837
|
+
* a model.
|
|
1836
1838
|
* @param tfn the function that will do the translation
|
|
1837
1839
|
* @param loaded a function that returns true when the translation is loaded
|
|
1838
1840
|
*/
|
|
@@ -1840,6 +1842,18 @@ function setTranslationMethod(tfn, loaded = () => true) {
|
|
|
1840
1842
|
_translate = tfn;
|
|
1841
1843
|
_loaded = loaded;
|
|
1842
1844
|
}
|
|
1845
|
+
/**
|
|
1846
|
+
* If no translation function has been set, this will mark the translation are loaded.
|
|
1847
|
+
*
|
|
1848
|
+
* By default, the translations should not be set as loaded, otherwise top-level translated constants will never be
|
|
1849
|
+
* translated. But if by the time the model is instantiated no custom translation function has been set, we can set
|
|
1850
|
+
* the default translation function as loaded so o-spreadsheet can be run in standalone with no translations.
|
|
1851
|
+
*/
|
|
1852
|
+
function setDefaultTranslationMethod() {
|
|
1853
|
+
if (_translate === defaultTranslate && _loaded === defaultLoaded) {
|
|
1854
|
+
_loaded = () => true;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1843
1857
|
const _t = function (s, ...values) {
|
|
1844
1858
|
if (!_loaded()) {
|
|
1845
1859
|
return new LazyTranslatedString(s, values);
|
|
@@ -8881,10 +8895,8 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
8881
8895
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
8882
8896
|
return isEqual(this.getters.expandZone(activeSheetId, refRange.zone), oldZone);
|
|
8883
8897
|
});
|
|
8884
|
-
// this function assumes that the previous range is always found because
|
|
8885
|
-
// it's called when changing a highlight, which exists by definition
|
|
8886
8898
|
if (!previousRefToken) {
|
|
8887
|
-
|
|
8899
|
+
return;
|
|
8888
8900
|
}
|
|
8889
8901
|
const previousRange = this.getters.getRangeFromSheetXC(activeSheetId, previousRefToken.value);
|
|
8890
8902
|
this.selectionStart = previousRefToken.start;
|
|
@@ -29855,6 +29867,7 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
29855
29867
|
currentSearchRegex = null;
|
|
29856
29868
|
isSearchDirty = false;
|
|
29857
29869
|
initialShowFormulaState;
|
|
29870
|
+
preserveSelectedMatchIndex = false;
|
|
29858
29871
|
// fixme: why do we make selectedMatchIndex on top of a selected
|
|
29859
29872
|
// property in the matches?
|
|
29860
29873
|
selectedMatchIndex = null;
|
|
@@ -29964,7 +29977,9 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
29964
29977
|
* refresh the matches according to the current search options
|
|
29965
29978
|
*/
|
|
29966
29979
|
refreshSearch(jumpToMatchSheet = true) {
|
|
29967
|
-
this.
|
|
29980
|
+
if (!this.preserveSelectedMatchIndex) {
|
|
29981
|
+
this.selectedMatchIndex = null;
|
|
29982
|
+
}
|
|
29968
29983
|
this.findMatches();
|
|
29969
29984
|
this.selectNextCell(Direction.current, jumpToMatchSheet);
|
|
29970
29985
|
}
|
|
@@ -30063,10 +30078,16 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
30063
30078
|
const selectedMatch = matches[nextIndex];
|
|
30064
30079
|
// Switch to the sheet where the match is located
|
|
30065
30080
|
if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
30081
|
+
// We set `preserveSelectedMatchIndex` to true to avoid resetting the selected search
|
|
30082
|
+
// index in the `refreshSearch` function when a new sheet is activated. The reason being
|
|
30083
|
+
// that, when we automatically go back to previous sheet while performing a search, the
|
|
30084
|
+
// search index is reset to the first occurrence each time.
|
|
30085
|
+
this.preserveSelectedMatchIndex = true;
|
|
30066
30086
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
30067
30087
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
30068
30088
|
sheetIdTo: selectedMatch.sheetId,
|
|
30069
30089
|
});
|
|
30090
|
+
this.preserveSelectedMatchIndex = false;
|
|
30070
30091
|
// We do not want to reset the selection at finalize in this case
|
|
30071
30092
|
this.isSearchDirty = false;
|
|
30072
30093
|
}
|
|
@@ -54982,7 +55003,7 @@ class BottomBarSheet extends owl.Component {
|
|
|
54982
55003
|
this.DOMFocusableElementStore.focus();
|
|
54983
55004
|
}
|
|
54984
55005
|
}
|
|
54985
|
-
|
|
55006
|
+
onMouseEventSheetName(ev) {
|
|
54986
55007
|
if (this.state.isEditing)
|
|
54987
55008
|
ev.stopPropagation();
|
|
54988
55009
|
}
|
|
@@ -60154,6 +60175,7 @@ class Model extends EventBus {
|
|
|
60154
60175
|
coreHandlers = [];
|
|
60155
60176
|
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = true) {
|
|
60156
60177
|
super();
|
|
60178
|
+
setDefaultTranslationMethod();
|
|
60157
60179
|
stateUpdateMessages = repairInitialMessages(data, stateUpdateMessages);
|
|
60158
60180
|
const workbookData = load(data, verboseImport);
|
|
60159
60181
|
this.state = new StateObserver();
|
|
@@ -60786,6 +60808,6 @@ exports.tokenColors = tokenColors;
|
|
|
60786
60808
|
exports.tokenize = tokenize;
|
|
60787
60809
|
|
|
60788
60810
|
|
|
60789
|
-
__info__.version = "17.2.
|
|
60790
|
-
__info__.date = "2024-
|
|
60791
|
-
__info__.hash = "
|
|
60811
|
+
__info__.version = "17.2.13";
|
|
60812
|
+
__info__.date = "2024-07-02T09:03:00.731Z";
|
|
60813
|
+
__info__.hash = "fac2351";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -7951,6 +7951,7 @@ declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightP
|
|
|
7951
7951
|
private currentSearchRegex;
|
|
7952
7952
|
private isSearchDirty;
|
|
7953
7953
|
private initialShowFormulaState;
|
|
7954
|
+
private preserveSelectedMatchIndex;
|
|
7954
7955
|
selectedMatchIndex: number | null;
|
|
7955
7956
|
toSearch: string;
|
|
7956
7957
|
toReplace: string;
|
|
@@ -8235,7 +8236,7 @@ declare class BottomBarSheet extends Component<Props$b, SpreadsheetChildEnv> {
|
|
|
8235
8236
|
private activateSheet;
|
|
8236
8237
|
onDblClick(): void;
|
|
8237
8238
|
onKeyDown(ev: KeyboardEvent): void;
|
|
8238
|
-
|
|
8239
|
+
onMouseEventSheetName(ev: MouseEvent): void;
|
|
8239
8240
|
private startEdition;
|
|
8240
8241
|
private stopEdition;
|
|
8241
8242
|
private cancelEdition;
|
|
@@ -9072,7 +9073,8 @@ type SprintfValues = (string | String | number)[] | [{
|
|
|
9072
9073
|
}];
|
|
9073
9074
|
type TranslationFunction = (string: string, ...values: SprintfValues) => string;
|
|
9074
9075
|
/***
|
|
9075
|
-
* Allow to inject a translation function from outside o-spreadsheet.
|
|
9076
|
+
* Allow to inject a translation function from outside o-spreadsheet. This should be called before instantiating
|
|
9077
|
+
* a model.
|
|
9076
9078
|
* @param tfn the function that will do the translation
|
|
9077
9079
|
* @param loaded a function that returns true when the translation is loaded
|
|
9078
9080
|
*/
|
|
@@ -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.
|
|
7
|
-
* @date 2024-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.13
|
|
7
|
+
* @date 2024-07-02T09:03:00.731Z
|
|
8
|
+
* @hash fac2351
|
|
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';
|
|
@@ -1816,9 +1816,10 @@ function percentile(values, percent, isInclusive) {
|
|
|
1816
1816
|
sortedValues[indexLow] * (indexSup - percentIndex));
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
let
|
|
1819
|
+
const defaultTranslate = (s) => s;
|
|
1820
|
+
const defaultLoaded = () => false;
|
|
1821
|
+
let _translate = defaultTranslate;
|
|
1822
|
+
let _loaded = defaultLoaded;
|
|
1822
1823
|
function sprintf(s, ...values) {
|
|
1823
1824
|
if (values.length === 1 && typeof values[0] === "object" && !(values[0] instanceof String)) {
|
|
1824
1825
|
const valuesDict = values[0];
|
|
@@ -1830,7 +1831,8 @@ function sprintf(s, ...values) {
|
|
|
1830
1831
|
return s;
|
|
1831
1832
|
}
|
|
1832
1833
|
/***
|
|
1833
|
-
* Allow to inject a translation function from outside o-spreadsheet.
|
|
1834
|
+
* Allow to inject a translation function from outside o-spreadsheet. This should be called before instantiating
|
|
1835
|
+
* a model.
|
|
1834
1836
|
* @param tfn the function that will do the translation
|
|
1835
1837
|
* @param loaded a function that returns true when the translation is loaded
|
|
1836
1838
|
*/
|
|
@@ -1838,6 +1840,18 @@ function setTranslationMethod(tfn, loaded = () => true) {
|
|
|
1838
1840
|
_translate = tfn;
|
|
1839
1841
|
_loaded = loaded;
|
|
1840
1842
|
}
|
|
1843
|
+
/**
|
|
1844
|
+
* If no translation function has been set, this will mark the translation are loaded.
|
|
1845
|
+
*
|
|
1846
|
+
* By default, the translations should not be set as loaded, otherwise top-level translated constants will never be
|
|
1847
|
+
* translated. But if by the time the model is instantiated no custom translation function has been set, we can set
|
|
1848
|
+
* the default translation function as loaded so o-spreadsheet can be run in standalone with no translations.
|
|
1849
|
+
*/
|
|
1850
|
+
function setDefaultTranslationMethod() {
|
|
1851
|
+
if (_translate === defaultTranslate && _loaded === defaultLoaded) {
|
|
1852
|
+
_loaded = () => true;
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1841
1855
|
const _t = function (s, ...values) {
|
|
1842
1856
|
if (!_loaded()) {
|
|
1843
1857
|
return new LazyTranslatedString(s, values);
|
|
@@ -8879,10 +8893,8 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
8879
8893
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
8880
8894
|
return isEqual(this.getters.expandZone(activeSheetId, refRange.zone), oldZone);
|
|
8881
8895
|
});
|
|
8882
|
-
// this function assumes that the previous range is always found because
|
|
8883
|
-
// it's called when changing a highlight, which exists by definition
|
|
8884
8896
|
if (!previousRefToken) {
|
|
8885
|
-
|
|
8897
|
+
return;
|
|
8886
8898
|
}
|
|
8887
8899
|
const previousRange = this.getters.getRangeFromSheetXC(activeSheetId, previousRefToken.value);
|
|
8888
8900
|
this.selectionStart = previousRefToken.start;
|
|
@@ -29853,6 +29865,7 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
29853
29865
|
currentSearchRegex = null;
|
|
29854
29866
|
isSearchDirty = false;
|
|
29855
29867
|
initialShowFormulaState;
|
|
29868
|
+
preserveSelectedMatchIndex = false;
|
|
29856
29869
|
// fixme: why do we make selectedMatchIndex on top of a selected
|
|
29857
29870
|
// property in the matches?
|
|
29858
29871
|
selectedMatchIndex = null;
|
|
@@ -29962,7 +29975,9 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
29962
29975
|
* refresh the matches according to the current search options
|
|
29963
29976
|
*/
|
|
29964
29977
|
refreshSearch(jumpToMatchSheet = true) {
|
|
29965
|
-
this.
|
|
29978
|
+
if (!this.preserveSelectedMatchIndex) {
|
|
29979
|
+
this.selectedMatchIndex = null;
|
|
29980
|
+
}
|
|
29966
29981
|
this.findMatches();
|
|
29967
29982
|
this.selectNextCell(Direction.current, jumpToMatchSheet);
|
|
29968
29983
|
}
|
|
@@ -30061,10 +30076,16 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
30061
30076
|
const selectedMatch = matches[nextIndex];
|
|
30062
30077
|
// Switch to the sheet where the match is located
|
|
30063
30078
|
if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
30079
|
+
// We set `preserveSelectedMatchIndex` to true to avoid resetting the selected search
|
|
30080
|
+
// index in the `refreshSearch` function when a new sheet is activated. The reason being
|
|
30081
|
+
// that, when we automatically go back to previous sheet while performing a search, the
|
|
30082
|
+
// search index is reset to the first occurrence each time.
|
|
30083
|
+
this.preserveSelectedMatchIndex = true;
|
|
30064
30084
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
30065
30085
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
30066
30086
|
sheetIdTo: selectedMatch.sheetId,
|
|
30067
30087
|
});
|
|
30088
|
+
this.preserveSelectedMatchIndex = false;
|
|
30068
30089
|
// We do not want to reset the selection at finalize in this case
|
|
30069
30090
|
this.isSearchDirty = false;
|
|
30070
30091
|
}
|
|
@@ -54980,7 +55001,7 @@ class BottomBarSheet extends Component {
|
|
|
54980
55001
|
this.DOMFocusableElementStore.focus();
|
|
54981
55002
|
}
|
|
54982
55003
|
}
|
|
54983
|
-
|
|
55004
|
+
onMouseEventSheetName(ev) {
|
|
54984
55005
|
if (this.state.isEditing)
|
|
54985
55006
|
ev.stopPropagation();
|
|
54986
55007
|
}
|
|
@@ -60152,6 +60173,7 @@ class Model extends EventBus {
|
|
|
60152
60173
|
coreHandlers = [];
|
|
60153
60174
|
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = true) {
|
|
60154
60175
|
super();
|
|
60176
|
+
setDefaultTranslationMethod();
|
|
60155
60177
|
stateUpdateMessages = repairInitialMessages(data, stateUpdateMessages);
|
|
60156
60178
|
const workbookData = load(data, verboseImport);
|
|
60157
60179
|
this.state = new StateObserver();
|
|
@@ -60743,6 +60765,6 @@ const constants = {
|
|
|
60743
60765
|
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 };
|
|
60744
60766
|
|
|
60745
60767
|
|
|
60746
|
-
__info__.version = "17.2.
|
|
60747
|
-
__info__.date = "2024-
|
|
60748
|
-
__info__.hash = "
|
|
60768
|
+
__info__.version = "17.2.13";
|
|
60769
|
+
__info__.date = "2024-07-02T09:03:00.731Z";
|
|
60770
|
+
__info__.hash = "fac2351";
|
|
@@ -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.
|
|
7
|
-
* @date 2024-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.13
|
|
7
|
+
* @date 2024-07-02T09:03:00.731Z
|
|
8
|
+
* @hash fac2351
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (exports, owl) {
|
|
@@ -1817,9 +1817,10 @@
|
|
|
1817
1817
|
sortedValues[indexLow] * (indexSup - percentIndex));
|
|
1818
1818
|
}
|
|
1819
1819
|
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
let
|
|
1820
|
+
const defaultTranslate = (s) => s;
|
|
1821
|
+
const defaultLoaded = () => false;
|
|
1822
|
+
let _translate = defaultTranslate;
|
|
1823
|
+
let _loaded = defaultLoaded;
|
|
1823
1824
|
function sprintf(s, ...values) {
|
|
1824
1825
|
if (values.length === 1 && typeof values[0] === "object" && !(values[0] instanceof String)) {
|
|
1825
1826
|
const valuesDict = values[0];
|
|
@@ -1831,7 +1832,8 @@
|
|
|
1831
1832
|
return s;
|
|
1832
1833
|
}
|
|
1833
1834
|
/***
|
|
1834
|
-
* Allow to inject a translation function from outside o-spreadsheet.
|
|
1835
|
+
* Allow to inject a translation function from outside o-spreadsheet. This should be called before instantiating
|
|
1836
|
+
* a model.
|
|
1835
1837
|
* @param tfn the function that will do the translation
|
|
1836
1838
|
* @param loaded a function that returns true when the translation is loaded
|
|
1837
1839
|
*/
|
|
@@ -1839,6 +1841,18 @@
|
|
|
1839
1841
|
_translate = tfn;
|
|
1840
1842
|
_loaded = loaded;
|
|
1841
1843
|
}
|
|
1844
|
+
/**
|
|
1845
|
+
* If no translation function has been set, this will mark the translation are loaded.
|
|
1846
|
+
*
|
|
1847
|
+
* By default, the translations should not be set as loaded, otherwise top-level translated constants will never be
|
|
1848
|
+
* translated. But if by the time the model is instantiated no custom translation function has been set, we can set
|
|
1849
|
+
* the default translation function as loaded so o-spreadsheet can be run in standalone with no translations.
|
|
1850
|
+
*/
|
|
1851
|
+
function setDefaultTranslationMethod() {
|
|
1852
|
+
if (_translate === defaultTranslate && _loaded === defaultLoaded) {
|
|
1853
|
+
_loaded = () => true;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1842
1856
|
const _t = function (s, ...values) {
|
|
1843
1857
|
if (!_loaded()) {
|
|
1844
1858
|
return new LazyTranslatedString(s, values);
|
|
@@ -8880,10 +8894,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8880
8894
|
const refRange = this.getters.getRangeFromSheetXC(activeSheetId, xc);
|
|
8881
8895
|
return isEqual(this.getters.expandZone(activeSheetId, refRange.zone), oldZone);
|
|
8882
8896
|
});
|
|
8883
|
-
// this function assumes that the previous range is always found because
|
|
8884
|
-
// it's called when changing a highlight, which exists by definition
|
|
8885
8897
|
if (!previousRefToken) {
|
|
8886
|
-
|
|
8898
|
+
return;
|
|
8887
8899
|
}
|
|
8888
8900
|
const previousRange = this.getters.getRangeFromSheetXC(activeSheetId, previousRefToken.value);
|
|
8889
8901
|
this.selectionStart = previousRefToken.start;
|
|
@@ -29854,6 +29866,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29854
29866
|
currentSearchRegex = null;
|
|
29855
29867
|
isSearchDirty = false;
|
|
29856
29868
|
initialShowFormulaState;
|
|
29869
|
+
preserveSelectedMatchIndex = false;
|
|
29857
29870
|
// fixme: why do we make selectedMatchIndex on top of a selected
|
|
29858
29871
|
// property in the matches?
|
|
29859
29872
|
selectedMatchIndex = null;
|
|
@@ -29963,7 +29976,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29963
29976
|
* refresh the matches according to the current search options
|
|
29964
29977
|
*/
|
|
29965
29978
|
refreshSearch(jumpToMatchSheet = true) {
|
|
29966
|
-
this.
|
|
29979
|
+
if (!this.preserveSelectedMatchIndex) {
|
|
29980
|
+
this.selectedMatchIndex = null;
|
|
29981
|
+
}
|
|
29967
29982
|
this.findMatches();
|
|
29968
29983
|
this.selectNextCell(Direction.current, jumpToMatchSheet);
|
|
29969
29984
|
}
|
|
@@ -30062,10 +30077,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30062
30077
|
const selectedMatch = matches[nextIndex];
|
|
30063
30078
|
// Switch to the sheet where the match is located
|
|
30064
30079
|
if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
30080
|
+
// We set `preserveSelectedMatchIndex` to true to avoid resetting the selected search
|
|
30081
|
+
// index in the `refreshSearch` function when a new sheet is activated. The reason being
|
|
30082
|
+
// that, when we automatically go back to previous sheet while performing a search, the
|
|
30083
|
+
// search index is reset to the first occurrence each time.
|
|
30084
|
+
this.preserveSelectedMatchIndex = true;
|
|
30065
30085
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
30066
30086
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
30067
30087
|
sheetIdTo: selectedMatch.sheetId,
|
|
30068
30088
|
});
|
|
30089
|
+
this.preserveSelectedMatchIndex = false;
|
|
30069
30090
|
// We do not want to reset the selection at finalize in this case
|
|
30070
30091
|
this.isSearchDirty = false;
|
|
30071
30092
|
}
|
|
@@ -54981,7 +55002,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54981
55002
|
this.DOMFocusableElementStore.focus();
|
|
54982
55003
|
}
|
|
54983
55004
|
}
|
|
54984
|
-
|
|
55005
|
+
onMouseEventSheetName(ev) {
|
|
54985
55006
|
if (this.state.isEditing)
|
|
54986
55007
|
ev.stopPropagation();
|
|
54987
55008
|
}
|
|
@@ -60153,6 +60174,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60153
60174
|
coreHandlers = [];
|
|
60154
60175
|
constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = true) {
|
|
60155
60176
|
super();
|
|
60177
|
+
setDefaultTranslationMethod();
|
|
60156
60178
|
stateUpdateMessages = repairInitialMessages(data, stateUpdateMessages);
|
|
60157
60179
|
const workbookData = load(data, verboseImport);
|
|
60158
60180
|
this.state = new StateObserver();
|
|
@@ -60785,9 +60807,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60785
60807
|
exports.tokenize = tokenize;
|
|
60786
60808
|
|
|
60787
60809
|
|
|
60788
|
-
__info__.version = "17.2.
|
|
60789
|
-
__info__.date = "2024-
|
|
60790
|
-
__info__.hash = "
|
|
60810
|
+
__info__.version = "17.2.13";
|
|
60811
|
+
__info__.date = "2024-07-02T09:03:00.731Z";
|
|
60812
|
+
__info__.hash = "fac2351";
|
|
60791
60813
|
|
|
60792
60814
|
|
|
60793
60815
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|