@odoo/o-spreadsheet 16.0.13 → 16.0.15
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 +69 -31
- package/dist/o-spreadsheet.d.ts +162 -163
- package/dist/o-spreadsheet.esm.js +70 -32
- package/dist/o-spreadsheet.iife.js +69 -31
- package/dist/o-spreadsheet.iife.min.js +284 -279
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, useRef, onMounted, onPatched, onWillPatch, useState, onWillUpdateProps, useExternalListener, onWillUnmount, onWillStart,
|
|
1
|
+
import { Component, useRef, onMounted, onPatched, onWillPatch, useState, onWillUpdateProps, useExternalListener, onWillUnmount, onWillStart, useEffect, xml, useSubEnv, EventBus as EventBus$1, markRaw } from '@odoo/owl';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* usage: every string should be translated either with _lt if they are registered with a registry at
|
|
@@ -105,7 +105,7 @@ const SELECTION_BORDER_COLOR = "#3266ca";
|
|
|
105
105
|
const HEADER_BORDER_COLOR = "#C0C0C0";
|
|
106
106
|
const CELL_BORDER_COLOR = "#E2E3E3";
|
|
107
107
|
const BACKGROUND_CHART_COLOR = "#FFFFFF";
|
|
108
|
-
const
|
|
108
|
+
const DISABLED_TEXT_COLOR = "#CACACA";
|
|
109
109
|
const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
|
|
110
110
|
const LINK_COLOR = "#01666b";
|
|
111
111
|
const FILTERS_COLOR = "#188038";
|
|
@@ -719,12 +719,20 @@ function getDefaultCellHeight(style, numberOfLines) {
|
|
|
719
719
|
2 * PADDING_AUTORESIZE_VERTICAL);
|
|
720
720
|
}
|
|
721
721
|
function computeTextWidth(context, text, style) {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
722
|
+
const font = computeTextFont(style);
|
|
723
|
+
if (!textWidthCache[font]) {
|
|
724
|
+
textWidthCache[font] = {};
|
|
725
|
+
}
|
|
726
|
+
if (textWidthCache[font][text] === undefined) {
|
|
727
|
+
context.save();
|
|
728
|
+
context.font = font;
|
|
729
|
+
const textWidth = context.measureText(text).width;
|
|
730
|
+
context.restore();
|
|
731
|
+
textWidthCache[font][text] = textWidth;
|
|
732
|
+
}
|
|
733
|
+
return textWidthCache[font][text];
|
|
727
734
|
}
|
|
735
|
+
const textWidthCache = {};
|
|
728
736
|
function computeTextFont(style) {
|
|
729
737
|
const italic = style.italic ? "italic " : "";
|
|
730
738
|
const weight = style.bold ? "bold" : DEFAULT_FONT_WEIGHT;
|
|
@@ -3095,7 +3103,6 @@ const readonlyAllowedCommands = new Set([
|
|
|
3095
3103
|
"SET_VIEWPORT_OFFSET",
|
|
3096
3104
|
"SELECT_SEARCH_NEXT_MATCH",
|
|
3097
3105
|
"SELECT_SEARCH_PREVIOUS_MATCH",
|
|
3098
|
-
"REFRESH_SEARCH",
|
|
3099
3106
|
"UPDATE_SEARCH",
|
|
3100
3107
|
"CLEAR_SEARCH",
|
|
3101
3108
|
"EVALUATE_CELLS",
|
|
@@ -4022,7 +4029,7 @@ css /* scss */ `
|
|
|
4022
4029
|
}
|
|
4023
4030
|
}
|
|
4024
4031
|
&.disabled {
|
|
4025
|
-
color: ${
|
|
4032
|
+
color: ${DISABLED_TEXT_COLOR};
|
|
4026
4033
|
cursor: not-allowed;
|
|
4027
4034
|
}
|
|
4028
4035
|
}
|
|
@@ -9976,11 +9983,16 @@ class FindAndReplacePanel extends Component {
|
|
|
9976
9983
|
}
|
|
9977
9984
|
setup() {
|
|
9978
9985
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
9986
|
+
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
9979
9987
|
onMounted(() => this.focusInput());
|
|
9980
9988
|
onWillUnmount(() => {
|
|
9981
9989
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
9982
9990
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
9983
9991
|
});
|
|
9992
|
+
useEffect(() => {
|
|
9993
|
+
this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
|
|
9994
|
+
this.searchFormulas();
|
|
9995
|
+
}, () => [this.env.model.getters.shouldShowFormulas()]);
|
|
9984
9996
|
}
|
|
9985
9997
|
onInput(ev) {
|
|
9986
9998
|
this.state.toSearch = ev.target.value;
|
|
@@ -9998,10 +10010,6 @@ class FindAndReplacePanel extends Component {
|
|
|
9998
10010
|
this.replace();
|
|
9999
10011
|
}
|
|
10000
10012
|
}
|
|
10001
|
-
onFocusSidePanel() {
|
|
10002
|
-
this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
|
|
10003
|
-
this.env.model.dispatch("REFRESH_SEARCH");
|
|
10004
|
-
}
|
|
10005
10013
|
searchFormulas() {
|
|
10006
10014
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
|
|
10007
10015
|
show: this.state.searchOptions.searchFormulas,
|
|
@@ -10020,10 +10028,6 @@ class FindAndReplacePanel extends Component {
|
|
|
10020
10028
|
searchOptions: this.state.searchOptions,
|
|
10021
10029
|
});
|
|
10022
10030
|
}
|
|
10023
|
-
debouncedUpdateSearch() {
|
|
10024
|
-
clearTimeout(this.inDebounce);
|
|
10025
|
-
this.inDebounce = setTimeout(() => this.updateSearch.call(this), 400);
|
|
10026
|
-
}
|
|
10027
10031
|
replace() {
|
|
10028
10032
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
10029
10033
|
replaceWith: this.state.replaceWith,
|
|
@@ -21151,6 +21155,14 @@ class FiguresContainer extends Component {
|
|
|
21151
21155
|
if (dirY < 0) {
|
|
21152
21156
|
this.dnd.y = dndInitialY - deltaY;
|
|
21153
21157
|
}
|
|
21158
|
+
if (this.dnd.x < 0) {
|
|
21159
|
+
this.dnd.width += this.dnd.x;
|
|
21160
|
+
this.dnd.x = 0;
|
|
21161
|
+
}
|
|
21162
|
+
if (this.dnd.y < 0) {
|
|
21163
|
+
this.dnd.height += this.dnd.y;
|
|
21164
|
+
this.dnd.y = 0;
|
|
21165
|
+
}
|
|
21154
21166
|
};
|
|
21155
21167
|
const onMouseUp = (ev) => {
|
|
21156
21168
|
if (!this.dnd.figId) {
|
|
@@ -28643,7 +28655,14 @@ class FiltersPlugin extends CorePlugin {
|
|
|
28643
28655
|
this.history.update("tables", filterTables);
|
|
28644
28656
|
break;
|
|
28645
28657
|
case "DUPLICATE_SHEET":
|
|
28646
|
-
|
|
28658
|
+
const tables = {};
|
|
28659
|
+
for (const filterTable of Object.values(this.tables[cmd.sheetId] || {})) {
|
|
28660
|
+
if (filterTable) {
|
|
28661
|
+
const newFilterTable = deepCopy(filterTable);
|
|
28662
|
+
tables[newFilterTable.id] = newFilterTable;
|
|
28663
|
+
}
|
|
28664
|
+
}
|
|
28665
|
+
this.history.update("tables", cmd.sheetIdTo, tables);
|
|
28647
28666
|
break;
|
|
28648
28667
|
case "ADD_COLUMNS_ROWS":
|
|
28649
28668
|
this.onAddColumnsRows(cmd);
|
|
@@ -33275,6 +33294,7 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
33275
33294
|
searchFormulas: false,
|
|
33276
33295
|
};
|
|
33277
33296
|
this.toSearch = "";
|
|
33297
|
+
this.isSearchDirty = false;
|
|
33278
33298
|
}
|
|
33279
33299
|
// ---------------------------------------------------------------------------
|
|
33280
33300
|
// Command Handling
|
|
@@ -33299,18 +33319,25 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
33299
33319
|
case "REPLACE_ALL_SEARCH":
|
|
33300
33320
|
this.replaceAll(cmd.replaceWith);
|
|
33301
33321
|
break;
|
|
33322
|
+
case "EVALUATE_CELLS":
|
|
33323
|
+
case "UPDATE_CELL":
|
|
33324
|
+
this.isSearchDirty = true;
|
|
33325
|
+
break;
|
|
33302
33326
|
case "UNDO":
|
|
33303
33327
|
case "REDO":
|
|
33304
33328
|
case "REMOVE_COLUMNS_ROWS":
|
|
33305
33329
|
case "ADD_COLUMNS_ROWS":
|
|
33306
|
-
this.clearSearch();
|
|
33307
|
-
break;
|
|
33308
33330
|
case "ACTIVATE_SHEET":
|
|
33309
|
-
case "REFRESH_SEARCH":
|
|
33310
33331
|
this.refreshSearch();
|
|
33311
33332
|
break;
|
|
33312
33333
|
}
|
|
33313
33334
|
}
|
|
33335
|
+
finalize() {
|
|
33336
|
+
if (this.isSearchDirty) {
|
|
33337
|
+
this.refreshSearch();
|
|
33338
|
+
this.isSearchDirty = false;
|
|
33339
|
+
}
|
|
33340
|
+
}
|
|
33314
33341
|
// ---------------------------------------------------------------------------
|
|
33315
33342
|
// Getters
|
|
33316
33343
|
// ---------------------------------------------------------------------------
|
|
@@ -33360,11 +33387,17 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
33360
33387
|
* Find matches using the current regex
|
|
33361
33388
|
*/
|
|
33362
33389
|
findMatches() {
|
|
33363
|
-
const
|
|
33364
|
-
const cells = this.getters.getCells(
|
|
33390
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
33391
|
+
const cells = this.getters.getCells(sheetId);
|
|
33365
33392
|
const matches = [];
|
|
33366
33393
|
if (this.toSearch) {
|
|
33367
33394
|
for (const cell of Object.values(cells)) {
|
|
33395
|
+
const { col, row } = this.getters.getCellPosition(cell.id);
|
|
33396
|
+
const isColHidden = this.getters.isColHidden(sheetId, col);
|
|
33397
|
+
const isRowHidden = this.getters.isRowHidden(sheetId, row);
|
|
33398
|
+
if (isColHidden || isRowHidden) {
|
|
33399
|
+
continue;
|
|
33400
|
+
}
|
|
33368
33401
|
if (cell &&
|
|
33369
33402
|
this.currentSearchRegex &&
|
|
33370
33403
|
this.currentSearchRegex.test(this.searchOptions.searchFormulas
|
|
@@ -35147,6 +35180,9 @@ SelectionInputPlugin.getters = [];
|
|
|
35147
35180
|
* This plugin handles this internal state.
|
|
35148
35181
|
*/
|
|
35149
35182
|
class SelectionInputsManagerPlugin extends UIPlugin {
|
|
35183
|
+
get currentInput() {
|
|
35184
|
+
return this.focusedInputId ? this.inputs[this.focusedInputId] : null;
|
|
35185
|
+
}
|
|
35150
35186
|
constructor(getters, state, dispatch, config, selection) {
|
|
35151
35187
|
super(getters, state, dispatch, config, selection);
|
|
35152
35188
|
this.state = state;
|
|
@@ -35154,9 +35190,6 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
35154
35190
|
this.inputs = {};
|
|
35155
35191
|
this.focusedInputId = null;
|
|
35156
35192
|
}
|
|
35157
|
-
get currentInput() {
|
|
35158
|
-
return this.focusedInputId ? this.inputs[this.focusedInputId] : null;
|
|
35159
|
-
}
|
|
35160
35193
|
// ---------------------------------------------------------------------------
|
|
35161
35194
|
// Command Handling
|
|
35162
35195
|
// ---------------------------------------------------------------------------
|
|
@@ -37252,6 +37285,7 @@ class SortPlugin extends UIPlugin {
|
|
|
37252
37285
|
const sortedIndexOfSortTypeCells = sortCells(sortingCells, sortDirection, Boolean(options.emptyCellAsZero));
|
|
37253
37286
|
const sortedIndex = sortedIndexOfSortTypeCells.map((x) => x.index);
|
|
37254
37287
|
const [width, height] = [cells.length, cells[0].length];
|
|
37288
|
+
const cellUpdates = [];
|
|
37255
37289
|
for (let c = 0; c < width; c++) {
|
|
37256
37290
|
for (let r = 0; r < height; r++) {
|
|
37257
37291
|
let cell = cells[c][sortedIndex[r]];
|
|
@@ -37262,7 +37296,6 @@ class SortPlugin extends UIPlugin {
|
|
|
37262
37296
|
col: newCol,
|
|
37263
37297
|
row: newRow,
|
|
37264
37298
|
content: "",
|
|
37265
|
-
value: "",
|
|
37266
37299
|
};
|
|
37267
37300
|
if (cell) {
|
|
37268
37301
|
let content = cell.content;
|
|
@@ -37276,11 +37309,11 @@ class SortPlugin extends UIPlugin {
|
|
|
37276
37309
|
newCellValues.style = cell.style;
|
|
37277
37310
|
newCellValues.content = content;
|
|
37278
37311
|
newCellValues.format = cell.format;
|
|
37279
|
-
newCellValues.value = cell.evaluated.value;
|
|
37280
37312
|
}
|
|
37281
|
-
|
|
37313
|
+
cellUpdates.push(newCellValues);
|
|
37282
37314
|
}
|
|
37283
37315
|
}
|
|
37316
|
+
cellUpdates.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
|
|
37284
37317
|
}
|
|
37285
37318
|
/**
|
|
37286
37319
|
* Return the distances between main merge cells in the zone.
|
|
@@ -38042,6 +38075,11 @@ css /* scss */ `
|
|
|
38042
38075
|
.o-sidePanelButton:enabled {
|
|
38043
38076
|
cursor: pointer;
|
|
38044
38077
|
}
|
|
38078
|
+
|
|
38079
|
+
.o-sidePanelButton:disabled {
|
|
38080
|
+
color: ${DISABLED_TEXT_COLOR};
|
|
38081
|
+
}
|
|
38082
|
+
|
|
38045
38083
|
.o-sidePanelButton:last-child {
|
|
38046
38084
|
margin-right: 0px;
|
|
38047
38085
|
}
|
|
@@ -42785,6 +42823,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
42785
42823
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
42786
42824
|
|
|
42787
42825
|
|
|
42788
|
-
__info__.version = '16.0.
|
|
42789
|
-
__info__.date = '2023-
|
|
42790
|
-
__info__.hash = '
|
|
42826
|
+
__info__.version = '16.0.15';
|
|
42827
|
+
__info__.date = '2023-07-26T12:11:24.020Z';
|
|
42828
|
+
__info__.hash = '18da14b';
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
const HEADER_BORDER_COLOR = "#C0C0C0";
|
|
107
107
|
const CELL_BORDER_COLOR = "#E2E3E3";
|
|
108
108
|
const BACKGROUND_CHART_COLOR = "#FFFFFF";
|
|
109
|
-
const
|
|
109
|
+
const DISABLED_TEXT_COLOR = "#CACACA";
|
|
110
110
|
const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
|
|
111
111
|
const LINK_COLOR = "#01666b";
|
|
112
112
|
const FILTERS_COLOR = "#188038";
|
|
@@ -720,12 +720,20 @@
|
|
|
720
720
|
2 * PADDING_AUTORESIZE_VERTICAL);
|
|
721
721
|
}
|
|
722
722
|
function computeTextWidth(context, text, style) {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
723
|
+
const font = computeTextFont(style);
|
|
724
|
+
if (!textWidthCache[font]) {
|
|
725
|
+
textWidthCache[font] = {};
|
|
726
|
+
}
|
|
727
|
+
if (textWidthCache[font][text] === undefined) {
|
|
728
|
+
context.save();
|
|
729
|
+
context.font = font;
|
|
730
|
+
const textWidth = context.measureText(text).width;
|
|
731
|
+
context.restore();
|
|
732
|
+
textWidthCache[font][text] = textWidth;
|
|
733
|
+
}
|
|
734
|
+
return textWidthCache[font][text];
|
|
728
735
|
}
|
|
736
|
+
const textWidthCache = {};
|
|
729
737
|
function computeTextFont(style) {
|
|
730
738
|
const italic = style.italic ? "italic " : "";
|
|
731
739
|
const weight = style.bold ? "bold" : DEFAULT_FONT_WEIGHT;
|
|
@@ -3096,7 +3104,6 @@
|
|
|
3096
3104
|
"SET_VIEWPORT_OFFSET",
|
|
3097
3105
|
"SELECT_SEARCH_NEXT_MATCH",
|
|
3098
3106
|
"SELECT_SEARCH_PREVIOUS_MATCH",
|
|
3099
|
-
"REFRESH_SEARCH",
|
|
3100
3107
|
"UPDATE_SEARCH",
|
|
3101
3108
|
"CLEAR_SEARCH",
|
|
3102
3109
|
"EVALUATE_CELLS",
|
|
@@ -4023,7 +4030,7 @@
|
|
|
4023
4030
|
}
|
|
4024
4031
|
}
|
|
4025
4032
|
&.disabled {
|
|
4026
|
-
color: ${
|
|
4033
|
+
color: ${DISABLED_TEXT_COLOR};
|
|
4027
4034
|
cursor: not-allowed;
|
|
4028
4035
|
}
|
|
4029
4036
|
}
|
|
@@ -9977,11 +9984,16 @@
|
|
|
9977
9984
|
}
|
|
9978
9985
|
setup() {
|
|
9979
9986
|
this.showFormulaState = this.env.model.getters.shouldShowFormulas();
|
|
9987
|
+
this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
|
|
9980
9988
|
owl.onMounted(() => this.focusInput());
|
|
9981
9989
|
owl.onWillUnmount(() => {
|
|
9982
9990
|
this.env.model.dispatch("CLEAR_SEARCH");
|
|
9983
9991
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
|
|
9984
9992
|
});
|
|
9993
|
+
owl.useEffect(() => {
|
|
9994
|
+
this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
|
|
9995
|
+
this.searchFormulas();
|
|
9996
|
+
}, () => [this.env.model.getters.shouldShowFormulas()]);
|
|
9985
9997
|
}
|
|
9986
9998
|
onInput(ev) {
|
|
9987
9999
|
this.state.toSearch = ev.target.value;
|
|
@@ -9999,10 +10011,6 @@
|
|
|
9999
10011
|
this.replace();
|
|
10000
10012
|
}
|
|
10001
10013
|
}
|
|
10002
|
-
onFocusSidePanel() {
|
|
10003
|
-
this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
|
|
10004
|
-
this.env.model.dispatch("REFRESH_SEARCH");
|
|
10005
|
-
}
|
|
10006
10014
|
searchFormulas() {
|
|
10007
10015
|
this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
|
|
10008
10016
|
show: this.state.searchOptions.searchFormulas,
|
|
@@ -10021,10 +10029,6 @@
|
|
|
10021
10029
|
searchOptions: this.state.searchOptions,
|
|
10022
10030
|
});
|
|
10023
10031
|
}
|
|
10024
|
-
debouncedUpdateSearch() {
|
|
10025
|
-
clearTimeout(this.inDebounce);
|
|
10026
|
-
this.inDebounce = setTimeout(() => this.updateSearch.call(this), 400);
|
|
10027
|
-
}
|
|
10028
10032
|
replace() {
|
|
10029
10033
|
this.env.model.dispatch("REPLACE_SEARCH", {
|
|
10030
10034
|
replaceWith: this.state.replaceWith,
|
|
@@ -21152,6 +21156,14 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
21152
21156
|
if (dirY < 0) {
|
|
21153
21157
|
this.dnd.y = dndInitialY - deltaY;
|
|
21154
21158
|
}
|
|
21159
|
+
if (this.dnd.x < 0) {
|
|
21160
|
+
this.dnd.width += this.dnd.x;
|
|
21161
|
+
this.dnd.x = 0;
|
|
21162
|
+
}
|
|
21163
|
+
if (this.dnd.y < 0) {
|
|
21164
|
+
this.dnd.height += this.dnd.y;
|
|
21165
|
+
this.dnd.y = 0;
|
|
21166
|
+
}
|
|
21155
21167
|
};
|
|
21156
21168
|
const onMouseUp = (ev) => {
|
|
21157
21169
|
if (!this.dnd.figId) {
|
|
@@ -28644,7 +28656,14 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
28644
28656
|
this.history.update("tables", filterTables);
|
|
28645
28657
|
break;
|
|
28646
28658
|
case "DUPLICATE_SHEET":
|
|
28647
|
-
|
|
28659
|
+
const tables = {};
|
|
28660
|
+
for (const filterTable of Object.values(this.tables[cmd.sheetId] || {})) {
|
|
28661
|
+
if (filterTable) {
|
|
28662
|
+
const newFilterTable = deepCopy(filterTable);
|
|
28663
|
+
tables[newFilterTable.id] = newFilterTable;
|
|
28664
|
+
}
|
|
28665
|
+
}
|
|
28666
|
+
this.history.update("tables", cmd.sheetIdTo, tables);
|
|
28648
28667
|
break;
|
|
28649
28668
|
case "ADD_COLUMNS_ROWS":
|
|
28650
28669
|
this.onAddColumnsRows(cmd);
|
|
@@ -33276,6 +33295,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
33276
33295
|
searchFormulas: false,
|
|
33277
33296
|
};
|
|
33278
33297
|
this.toSearch = "";
|
|
33298
|
+
this.isSearchDirty = false;
|
|
33279
33299
|
}
|
|
33280
33300
|
// ---------------------------------------------------------------------------
|
|
33281
33301
|
// Command Handling
|
|
@@ -33300,18 +33320,25 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
33300
33320
|
case "REPLACE_ALL_SEARCH":
|
|
33301
33321
|
this.replaceAll(cmd.replaceWith);
|
|
33302
33322
|
break;
|
|
33323
|
+
case "EVALUATE_CELLS":
|
|
33324
|
+
case "UPDATE_CELL":
|
|
33325
|
+
this.isSearchDirty = true;
|
|
33326
|
+
break;
|
|
33303
33327
|
case "UNDO":
|
|
33304
33328
|
case "REDO":
|
|
33305
33329
|
case "REMOVE_COLUMNS_ROWS":
|
|
33306
33330
|
case "ADD_COLUMNS_ROWS":
|
|
33307
|
-
this.clearSearch();
|
|
33308
|
-
break;
|
|
33309
33331
|
case "ACTIVATE_SHEET":
|
|
33310
|
-
case "REFRESH_SEARCH":
|
|
33311
33332
|
this.refreshSearch();
|
|
33312
33333
|
break;
|
|
33313
33334
|
}
|
|
33314
33335
|
}
|
|
33336
|
+
finalize() {
|
|
33337
|
+
if (this.isSearchDirty) {
|
|
33338
|
+
this.refreshSearch();
|
|
33339
|
+
this.isSearchDirty = false;
|
|
33340
|
+
}
|
|
33341
|
+
}
|
|
33315
33342
|
// ---------------------------------------------------------------------------
|
|
33316
33343
|
// Getters
|
|
33317
33344
|
// ---------------------------------------------------------------------------
|
|
@@ -33361,11 +33388,17 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
33361
33388
|
* Find matches using the current regex
|
|
33362
33389
|
*/
|
|
33363
33390
|
findMatches() {
|
|
33364
|
-
const
|
|
33365
|
-
const cells = this.getters.getCells(
|
|
33391
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
33392
|
+
const cells = this.getters.getCells(sheetId);
|
|
33366
33393
|
const matches = [];
|
|
33367
33394
|
if (this.toSearch) {
|
|
33368
33395
|
for (const cell of Object.values(cells)) {
|
|
33396
|
+
const { col, row } = this.getters.getCellPosition(cell.id);
|
|
33397
|
+
const isColHidden = this.getters.isColHidden(sheetId, col);
|
|
33398
|
+
const isRowHidden = this.getters.isRowHidden(sheetId, row);
|
|
33399
|
+
if (isColHidden || isRowHidden) {
|
|
33400
|
+
continue;
|
|
33401
|
+
}
|
|
33369
33402
|
if (cell &&
|
|
33370
33403
|
this.currentSearchRegex &&
|
|
33371
33404
|
this.currentSearchRegex.test(this.searchOptions.searchFormulas
|
|
@@ -35148,6 +35181,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35148
35181
|
* This plugin handles this internal state.
|
|
35149
35182
|
*/
|
|
35150
35183
|
class SelectionInputsManagerPlugin extends UIPlugin {
|
|
35184
|
+
get currentInput() {
|
|
35185
|
+
return this.focusedInputId ? this.inputs[this.focusedInputId] : null;
|
|
35186
|
+
}
|
|
35151
35187
|
constructor(getters, state, dispatch, config, selection) {
|
|
35152
35188
|
super(getters, state, dispatch, config, selection);
|
|
35153
35189
|
this.state = state;
|
|
@@ -35155,9 +35191,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35155
35191
|
this.inputs = {};
|
|
35156
35192
|
this.focusedInputId = null;
|
|
35157
35193
|
}
|
|
35158
|
-
get currentInput() {
|
|
35159
|
-
return this.focusedInputId ? this.inputs[this.focusedInputId] : null;
|
|
35160
|
-
}
|
|
35161
35194
|
// ---------------------------------------------------------------------------
|
|
35162
35195
|
// Command Handling
|
|
35163
35196
|
// ---------------------------------------------------------------------------
|
|
@@ -37253,6 +37286,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
37253
37286
|
const sortedIndexOfSortTypeCells = sortCells(sortingCells, sortDirection, Boolean(options.emptyCellAsZero));
|
|
37254
37287
|
const sortedIndex = sortedIndexOfSortTypeCells.map((x) => x.index);
|
|
37255
37288
|
const [width, height] = [cells.length, cells[0].length];
|
|
37289
|
+
const cellUpdates = [];
|
|
37256
37290
|
for (let c = 0; c < width; c++) {
|
|
37257
37291
|
for (let r = 0; r < height; r++) {
|
|
37258
37292
|
let cell = cells[c][sortedIndex[r]];
|
|
@@ -37263,7 +37297,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
37263
37297
|
col: newCol,
|
|
37264
37298
|
row: newRow,
|
|
37265
37299
|
content: "",
|
|
37266
|
-
value: "",
|
|
37267
37300
|
};
|
|
37268
37301
|
if (cell) {
|
|
37269
37302
|
let content = cell.content;
|
|
@@ -37277,11 +37310,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
37277
37310
|
newCellValues.style = cell.style;
|
|
37278
37311
|
newCellValues.content = content;
|
|
37279
37312
|
newCellValues.format = cell.format;
|
|
37280
|
-
newCellValues.value = cell.evaluated.value;
|
|
37281
37313
|
}
|
|
37282
|
-
|
|
37314
|
+
cellUpdates.push(newCellValues);
|
|
37283
37315
|
}
|
|
37284
37316
|
}
|
|
37317
|
+
cellUpdates.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
|
|
37285
37318
|
}
|
|
37286
37319
|
/**
|
|
37287
37320
|
* Return the distances between main merge cells in the zone.
|
|
@@ -38043,6 +38076,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
38043
38076
|
.o-sidePanelButton:enabled {
|
|
38044
38077
|
cursor: pointer;
|
|
38045
38078
|
}
|
|
38079
|
+
|
|
38080
|
+
.o-sidePanelButton:disabled {
|
|
38081
|
+
color: ${DISABLED_TEXT_COLOR};
|
|
38082
|
+
}
|
|
38083
|
+
|
|
38046
38084
|
.o-sidePanelButton:last-child {
|
|
38047
38085
|
margin-right: 0px;
|
|
38048
38086
|
}
|
|
@@ -42816,9 +42854,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
42816
42854
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
42817
42855
|
|
|
42818
42856
|
|
|
42819
|
-
__info__.version = '16.0.
|
|
42820
|
-
__info__.date = '2023-
|
|
42821
|
-
__info__.hash = '
|
|
42857
|
+
__info__.version = '16.0.15';
|
|
42858
|
+
__info__.date = '2023-07-26T12:11:24.020Z';
|
|
42859
|
+
__info__.hash = '18da14b';
|
|
42822
42860
|
|
|
42823
42861
|
|
|
42824
42862
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|