@odoo/o-spreadsheet 17.4.5 → 17.4.6
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 17.4.
|
|
6
|
-
* @date 2024-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.6
|
|
6
|
+
* @date 2024-08-26T13:50:49.623Z
|
|
7
|
+
* @hash f5648d9
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -242,6 +242,7 @@ const PIVOT_TABLE_CONFIG = {
|
|
|
242
242
|
bandedRows: true,
|
|
243
243
|
bandedColumns: false,
|
|
244
244
|
styleId: "TableStyleMedium5",
|
|
245
|
+
automaticAutofill: true,
|
|
245
246
|
};
|
|
246
247
|
|
|
247
248
|
//------------------------------------------------------------------------------
|
|
@@ -35173,7 +35174,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35173
35174
|
searchScope: "activeSheet",
|
|
35174
35175
|
specificRange: undefined,
|
|
35175
35176
|
};
|
|
35176
|
-
updateSearchContent = debounce(this._updateSearchContent.bind(this), 200);
|
|
35177
35177
|
constructor(get) {
|
|
35178
35178
|
super(get);
|
|
35179
35179
|
this.initialShowFormulaState = this.model.getters.shouldShowFormulas();
|
|
@@ -35182,7 +35182,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35182
35182
|
highlightStore.register(this);
|
|
35183
35183
|
this.onDispose(() => {
|
|
35184
35184
|
this.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.initialShowFormulaState });
|
|
35185
|
-
this.updateSearchContent.stopDebounce();
|
|
35186
35185
|
highlightStore.unRegister(this);
|
|
35187
35186
|
});
|
|
35188
35187
|
}
|
|
@@ -35196,7 +35195,7 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35196
35195
|
return this.specificRangeMatches;
|
|
35197
35196
|
}
|
|
35198
35197
|
}
|
|
35199
|
-
|
|
35198
|
+
updateSearchContent(toSearch) {
|
|
35200
35199
|
this._updateSearch(toSearch, this.searchOptions);
|
|
35201
35200
|
}
|
|
35202
35201
|
updateSearchOptions(searchOptions) {
|
|
@@ -35212,9 +35211,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35212
35211
|
selectNextMatch() {
|
|
35213
35212
|
this.selectNextCell(Direction.next);
|
|
35214
35213
|
}
|
|
35215
|
-
get pendingSearch() {
|
|
35216
|
-
return this.updateSearchContent.isDebouncePending();
|
|
35217
|
-
}
|
|
35218
35214
|
handle(cmd) {
|
|
35219
35215
|
switch (cmd.type) {
|
|
35220
35216
|
case "SET_FORMULA_VISIBILITY":
|
|
@@ -35540,6 +35536,7 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
35540
35536
|
searchInput = owl.useRef("searchInput");
|
|
35541
35537
|
store;
|
|
35542
35538
|
state;
|
|
35539
|
+
updateSearchContent;
|
|
35543
35540
|
get hasSearchResult() {
|
|
35544
35541
|
return this.store.selectedMatchIndex !== null;
|
|
35545
35542
|
}
|
|
@@ -35571,12 +35568,14 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
35571
35568
|
this.store = useLocalStore(FindAndReplaceStore);
|
|
35572
35569
|
this.state = owl.useState({ dataRange: "" });
|
|
35573
35570
|
owl.onMounted(() => this.searchInput.el?.focus());
|
|
35571
|
+
owl.onWillUnmount(() => this.updateSearchContent.stopDebounce());
|
|
35572
|
+
this.updateSearchContent = debounce(this.store.updateSearchContent, 200);
|
|
35574
35573
|
}
|
|
35575
35574
|
onFocusSearch() {
|
|
35576
35575
|
this.updateDataRange();
|
|
35577
35576
|
}
|
|
35578
35577
|
onSearchInput(ev) {
|
|
35579
|
-
this.
|
|
35578
|
+
this.updateSearchContent(ev.target.value);
|
|
35580
35579
|
}
|
|
35581
35580
|
onKeydownSearch(ev) {
|
|
35582
35581
|
if (ev.key === "Enter") {
|
|
@@ -35615,6 +35614,9 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
35615
35614
|
const specificRange = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.dataRange);
|
|
35616
35615
|
this.store.updateSearchOptions({ specificRange });
|
|
35617
35616
|
}
|
|
35617
|
+
get pendingSearch() {
|
|
35618
|
+
return this.updateSearchContent.isDebouncePending();
|
|
35619
|
+
}
|
|
35618
35620
|
}
|
|
35619
35621
|
|
|
35620
35622
|
css /* scss */ `
|
|
@@ -36668,6 +36670,12 @@ function orderDataEntriesKeys(groups, dimension) {
|
|
|
36668
36670
|
* Used to order two values
|
|
36669
36671
|
*/
|
|
36670
36672
|
function compareDimensionValues(dimension, a, b) {
|
|
36673
|
+
if (a === "null") {
|
|
36674
|
+
return dimension.order === "asc" ? 1 : -1;
|
|
36675
|
+
}
|
|
36676
|
+
if (b === "null") {
|
|
36677
|
+
return dimension.order === "asc" ? -1 : 1;
|
|
36678
|
+
}
|
|
36671
36679
|
if (dimension.type === "integer" || dimension.type === "date") {
|
|
36672
36680
|
return dimension.order === "asc" ? Number(a) - Number(b) : Number(b) - Number(a);
|
|
36673
36681
|
}
|
|
@@ -37030,7 +37038,7 @@ class SpreadsheetPivot {
|
|
|
37030
37038
|
if (cell.type === CellValueType.error) {
|
|
37031
37039
|
throw new EvaluationError(_t("The pivot cannot be created because cell %s contains an error", toXC(col, row)));
|
|
37032
37040
|
}
|
|
37033
|
-
if (cell.type === CellValueType.empty) {
|
|
37041
|
+
if (cell.type === CellValueType.empty || cell.value === "") {
|
|
37034
37042
|
throw new EvaluationError(_t("The pivot cannot be created because cell %s is empty", toXC(col, row)));
|
|
37035
37043
|
}
|
|
37036
37044
|
if (cell.value === "__count") {
|
|
@@ -37376,15 +37384,11 @@ class PivotSpreadsheetSidePanel extends owl.Component {
|
|
|
37376
37384
|
}
|
|
37377
37385
|
onSelectionConfirmed() {
|
|
37378
37386
|
if (this.state.range) {
|
|
37379
|
-
const
|
|
37380
|
-
|
|
37381
|
-
? this.env.model.getters.getSheetIdByName(sheetName)
|
|
37382
|
-
: this.env.model.getters.getActiveSheetId();
|
|
37383
|
-
if (!sheetId) {
|
|
37387
|
+
const range = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.range);
|
|
37388
|
+
if (range.invalidSheetName || range.invalidXc) {
|
|
37384
37389
|
return;
|
|
37385
37390
|
}
|
|
37386
|
-
const
|
|
37387
|
-
const dataSet = { sheetId, zone };
|
|
37391
|
+
const dataSet = { sheetId: range.sheetId, zone: range.zone };
|
|
37388
37392
|
this.store.update({ dataSet });
|
|
37389
37393
|
// Immediately apply the update to recompute the pivot fields
|
|
37390
37394
|
this.store.applyUpdate();
|
|
@@ -38317,10 +38321,6 @@ class TablePanel extends owl.Component {
|
|
|
38317
38321
|
});
|
|
38318
38322
|
}
|
|
38319
38323
|
onRangeChanged(ranges) {
|
|
38320
|
-
if (!ranges[0] || !ranges[0].match(rangeReference)) {
|
|
38321
|
-
this.state.tableZoneErrors = ["InvalidRange" /* CommandResult.InvalidRange */];
|
|
38322
|
-
return;
|
|
38323
|
-
}
|
|
38324
38324
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
38325
38325
|
this.state.tableXc = ranges[0];
|
|
38326
38326
|
const newTableRange = this.env.model.getters.getRangeFromSheetXC(sheetId, this.state.tableXc);
|
|
@@ -38360,11 +38360,6 @@ class TablePanel extends owl.Component {
|
|
|
38360
38360
|
const newTableRange = updatedTable.range;
|
|
38361
38361
|
this.state.tableXc = this.env.model.getters.getRangeString(newTableRange, sheetId);
|
|
38362
38362
|
}
|
|
38363
|
-
else {
|
|
38364
|
-
const oldTableRange = this.props.table.range;
|
|
38365
|
-
this.state.tableXc = this.env.model.getters.getRangeString(oldTableRange, sheetId);
|
|
38366
|
-
}
|
|
38367
|
-
this.state.tableZoneErrors = [];
|
|
38368
38363
|
}
|
|
38369
38364
|
deleteTable() {
|
|
38370
38365
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
@@ -49251,7 +49246,10 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
49251
49246
|
handle(cmd) {
|
|
49252
49247
|
switch (cmd.type) {
|
|
49253
49248
|
case "CREATE_SHEET": {
|
|
49254
|
-
this.history.update("sizes", cmd.sheetId, {
|
|
49249
|
+
this.history.update("sizes", cmd.sheetId, {
|
|
49250
|
+
COL: Array(this.getters.getNumberCols(cmd.sheetId)).fill(undefined),
|
|
49251
|
+
ROW: Array(this.getters.getNumberRows(cmd.sheetId)).fill(undefined),
|
|
49252
|
+
});
|
|
49255
49253
|
break;
|
|
49256
49254
|
}
|
|
49257
49255
|
case "DUPLICATE_SHEET":
|
|
@@ -55795,10 +55793,6 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
55795
55793
|
this.setupPivot(cmd.pivotId, { recreate: true });
|
|
55796
55794
|
break;
|
|
55797
55795
|
}
|
|
55798
|
-
case "REMOVE_PIVOT": {
|
|
55799
|
-
delete this.pivots[cmd.pivotId];
|
|
55800
|
-
break;
|
|
55801
|
-
}
|
|
55802
55796
|
case "DELETE_SHEET":
|
|
55803
55797
|
case "UPDATE_CELL": {
|
|
55804
55798
|
this.unusedPivots = undefined;
|
|
@@ -55940,6 +55934,9 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
55940
55934
|
}
|
|
55941
55935
|
}
|
|
55942
55936
|
getPivot(pivotId) {
|
|
55937
|
+
if (!this.getters.isExistingPivot(pivotId)) {
|
|
55938
|
+
throw new Error(`pivot ${pivotId} not found`);
|
|
55939
|
+
}
|
|
55943
55940
|
return this.pivots[pivotId];
|
|
55944
55941
|
}
|
|
55945
55942
|
isPivotUnused(pivotId) {
|
|
@@ -58020,7 +58017,7 @@ class InsertPivotPlugin extends UIPlugin {
|
|
|
58020
58017
|
sheetId,
|
|
58021
58018
|
col,
|
|
58022
58019
|
row,
|
|
58023
|
-
content: `=PIVOT(
|
|
58020
|
+
content: `=PIVOT(${pivotFormulaId})`,
|
|
58024
58021
|
});
|
|
58025
58022
|
const zone = {
|
|
58026
58023
|
left: col,
|
|
@@ -59411,6 +59408,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
59411
59408
|
this.status = "invisible";
|
|
59412
59409
|
if (this._isCutOperation) {
|
|
59413
59410
|
this.copiedData = undefined;
|
|
59411
|
+
this._isCutOperation = false;
|
|
59414
59412
|
}
|
|
59415
59413
|
break;
|
|
59416
59414
|
}
|
|
@@ -59508,6 +59506,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
59508
59506
|
}
|
|
59509
59507
|
case "ACTIVATE_PAINT_FORMAT": {
|
|
59510
59508
|
const zones = this.getters.getSelectedZones();
|
|
59509
|
+
this._isCutOperation = false;
|
|
59511
59510
|
this.copiedData = this.copy(zones);
|
|
59512
59511
|
this.status = "visible";
|
|
59513
59512
|
if (cmd.persistent) {
|
|
@@ -68461,6 +68460,6 @@ exports.tokenColors = tokenColors;
|
|
|
68461
68460
|
exports.tokenize = tokenize;
|
|
68462
68461
|
|
|
68463
68462
|
|
|
68464
|
-
__info__.version = "17.4.
|
|
68465
|
-
__info__.date = "2024-08-
|
|
68466
|
-
__info__.hash = "
|
|
68463
|
+
__info__.version = "17.4.6";
|
|
68464
|
+
__info__.date = "2024-08-26T13:50:49.623Z";
|
|
68465
|
+
__info__.hash = "f5648d9";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -9102,15 +9102,13 @@ declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightP
|
|
|
9102
9102
|
toSearch: string;
|
|
9103
9103
|
toReplace: string;
|
|
9104
9104
|
searchOptions: SearchOptions;
|
|
9105
|
-
updateSearchContent: DebouncedFunction<(toSearch: string) => void>;
|
|
9106
9105
|
constructor(get: Get);
|
|
9107
9106
|
get searchMatches(): CellPosition[];
|
|
9108
|
-
|
|
9107
|
+
updateSearchContent(toSearch: string): void;
|
|
9109
9108
|
updateSearchOptions(searchOptions: Partial<SearchOptions>): void;
|
|
9110
9109
|
searchFormulas(showFormula: boolean): void;
|
|
9111
9110
|
selectPreviousMatch(): void;
|
|
9112
9111
|
selectNextMatch(): void;
|
|
9113
|
-
get pendingSearch(): boolean;
|
|
9114
9112
|
handle(cmd: Command): void;
|
|
9115
9113
|
finalize(): void;
|
|
9116
9114
|
get allSheetMatchesCount(): number;
|
|
@@ -11598,6 +11596,7 @@ declare const constants: {
|
|
|
11598
11596
|
bandedRows: boolean;
|
|
11599
11597
|
bandedColumns: boolean;
|
|
11600
11598
|
styleId: string;
|
|
11599
|
+
automaticAutofill: boolean;
|
|
11601
11600
|
};
|
|
11602
11601
|
ChartTerms: {
|
|
11603
11602
|
Series: string;
|
|
@@ -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 17.4.
|
|
6
|
-
* @date 2024-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.6
|
|
6
|
+
* @date 2024-08-26T13:50:49.623Z
|
|
7
|
+
* @hash f5648d9
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -240,6 +240,7 @@ const PIVOT_TABLE_CONFIG = {
|
|
|
240
240
|
bandedRows: true,
|
|
241
241
|
bandedColumns: false,
|
|
242
242
|
styleId: "TableStyleMedium5",
|
|
243
|
+
automaticAutofill: true,
|
|
243
244
|
};
|
|
244
245
|
|
|
245
246
|
//------------------------------------------------------------------------------
|
|
@@ -35171,7 +35172,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35171
35172
|
searchScope: "activeSheet",
|
|
35172
35173
|
specificRange: undefined,
|
|
35173
35174
|
};
|
|
35174
|
-
updateSearchContent = debounce(this._updateSearchContent.bind(this), 200);
|
|
35175
35175
|
constructor(get) {
|
|
35176
35176
|
super(get);
|
|
35177
35177
|
this.initialShowFormulaState = this.model.getters.shouldShowFormulas();
|
|
@@ -35180,7 +35180,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35180
35180
|
highlightStore.register(this);
|
|
35181
35181
|
this.onDispose(() => {
|
|
35182
35182
|
this.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.initialShowFormulaState });
|
|
35183
|
-
this.updateSearchContent.stopDebounce();
|
|
35184
35183
|
highlightStore.unRegister(this);
|
|
35185
35184
|
});
|
|
35186
35185
|
}
|
|
@@ -35194,7 +35193,7 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35194
35193
|
return this.specificRangeMatches;
|
|
35195
35194
|
}
|
|
35196
35195
|
}
|
|
35197
|
-
|
|
35196
|
+
updateSearchContent(toSearch) {
|
|
35198
35197
|
this._updateSearch(toSearch, this.searchOptions);
|
|
35199
35198
|
}
|
|
35200
35199
|
updateSearchOptions(searchOptions) {
|
|
@@ -35210,9 +35209,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
35210
35209
|
selectNextMatch() {
|
|
35211
35210
|
this.selectNextCell(Direction.next);
|
|
35212
35211
|
}
|
|
35213
|
-
get pendingSearch() {
|
|
35214
|
-
return this.updateSearchContent.isDebouncePending();
|
|
35215
|
-
}
|
|
35216
35212
|
handle(cmd) {
|
|
35217
35213
|
switch (cmd.type) {
|
|
35218
35214
|
case "SET_FORMULA_VISIBILITY":
|
|
@@ -35538,6 +35534,7 @@ class FindAndReplacePanel extends Component {
|
|
|
35538
35534
|
searchInput = useRef("searchInput");
|
|
35539
35535
|
store;
|
|
35540
35536
|
state;
|
|
35537
|
+
updateSearchContent;
|
|
35541
35538
|
get hasSearchResult() {
|
|
35542
35539
|
return this.store.selectedMatchIndex !== null;
|
|
35543
35540
|
}
|
|
@@ -35569,12 +35566,14 @@ class FindAndReplacePanel extends Component {
|
|
|
35569
35566
|
this.store = useLocalStore(FindAndReplaceStore);
|
|
35570
35567
|
this.state = useState({ dataRange: "" });
|
|
35571
35568
|
onMounted(() => this.searchInput.el?.focus());
|
|
35569
|
+
onWillUnmount(() => this.updateSearchContent.stopDebounce());
|
|
35570
|
+
this.updateSearchContent = debounce(this.store.updateSearchContent, 200);
|
|
35572
35571
|
}
|
|
35573
35572
|
onFocusSearch() {
|
|
35574
35573
|
this.updateDataRange();
|
|
35575
35574
|
}
|
|
35576
35575
|
onSearchInput(ev) {
|
|
35577
|
-
this.
|
|
35576
|
+
this.updateSearchContent(ev.target.value);
|
|
35578
35577
|
}
|
|
35579
35578
|
onKeydownSearch(ev) {
|
|
35580
35579
|
if (ev.key === "Enter") {
|
|
@@ -35613,6 +35612,9 @@ class FindAndReplacePanel extends Component {
|
|
|
35613
35612
|
const specificRange = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.dataRange);
|
|
35614
35613
|
this.store.updateSearchOptions({ specificRange });
|
|
35615
35614
|
}
|
|
35615
|
+
get pendingSearch() {
|
|
35616
|
+
return this.updateSearchContent.isDebouncePending();
|
|
35617
|
+
}
|
|
35616
35618
|
}
|
|
35617
35619
|
|
|
35618
35620
|
css /* scss */ `
|
|
@@ -36666,6 +36668,12 @@ function orderDataEntriesKeys(groups, dimension) {
|
|
|
36666
36668
|
* Used to order two values
|
|
36667
36669
|
*/
|
|
36668
36670
|
function compareDimensionValues(dimension, a, b) {
|
|
36671
|
+
if (a === "null") {
|
|
36672
|
+
return dimension.order === "asc" ? 1 : -1;
|
|
36673
|
+
}
|
|
36674
|
+
if (b === "null") {
|
|
36675
|
+
return dimension.order === "asc" ? -1 : 1;
|
|
36676
|
+
}
|
|
36669
36677
|
if (dimension.type === "integer" || dimension.type === "date") {
|
|
36670
36678
|
return dimension.order === "asc" ? Number(a) - Number(b) : Number(b) - Number(a);
|
|
36671
36679
|
}
|
|
@@ -37028,7 +37036,7 @@ class SpreadsheetPivot {
|
|
|
37028
37036
|
if (cell.type === CellValueType.error) {
|
|
37029
37037
|
throw new EvaluationError(_t("The pivot cannot be created because cell %s contains an error", toXC(col, row)));
|
|
37030
37038
|
}
|
|
37031
|
-
if (cell.type === CellValueType.empty) {
|
|
37039
|
+
if (cell.type === CellValueType.empty || cell.value === "") {
|
|
37032
37040
|
throw new EvaluationError(_t("The pivot cannot be created because cell %s is empty", toXC(col, row)));
|
|
37033
37041
|
}
|
|
37034
37042
|
if (cell.value === "__count") {
|
|
@@ -37374,15 +37382,11 @@ class PivotSpreadsheetSidePanel extends Component {
|
|
|
37374
37382
|
}
|
|
37375
37383
|
onSelectionConfirmed() {
|
|
37376
37384
|
if (this.state.range) {
|
|
37377
|
-
const
|
|
37378
|
-
|
|
37379
|
-
? this.env.model.getters.getSheetIdByName(sheetName)
|
|
37380
|
-
: this.env.model.getters.getActiveSheetId();
|
|
37381
|
-
if (!sheetId) {
|
|
37385
|
+
const range = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.range);
|
|
37386
|
+
if (range.invalidSheetName || range.invalidXc) {
|
|
37382
37387
|
return;
|
|
37383
37388
|
}
|
|
37384
|
-
const
|
|
37385
|
-
const dataSet = { sheetId, zone };
|
|
37389
|
+
const dataSet = { sheetId: range.sheetId, zone: range.zone };
|
|
37386
37390
|
this.store.update({ dataSet });
|
|
37387
37391
|
// Immediately apply the update to recompute the pivot fields
|
|
37388
37392
|
this.store.applyUpdate();
|
|
@@ -38315,10 +38319,6 @@ class TablePanel extends Component {
|
|
|
38315
38319
|
});
|
|
38316
38320
|
}
|
|
38317
38321
|
onRangeChanged(ranges) {
|
|
38318
|
-
if (!ranges[0] || !ranges[0].match(rangeReference)) {
|
|
38319
|
-
this.state.tableZoneErrors = ["InvalidRange" /* CommandResult.InvalidRange */];
|
|
38320
|
-
return;
|
|
38321
|
-
}
|
|
38322
38322
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
38323
38323
|
this.state.tableXc = ranges[0];
|
|
38324
38324
|
const newTableRange = this.env.model.getters.getRangeFromSheetXC(sheetId, this.state.tableXc);
|
|
@@ -38358,11 +38358,6 @@ class TablePanel extends Component {
|
|
|
38358
38358
|
const newTableRange = updatedTable.range;
|
|
38359
38359
|
this.state.tableXc = this.env.model.getters.getRangeString(newTableRange, sheetId);
|
|
38360
38360
|
}
|
|
38361
|
-
else {
|
|
38362
|
-
const oldTableRange = this.props.table.range;
|
|
38363
|
-
this.state.tableXc = this.env.model.getters.getRangeString(oldTableRange, sheetId);
|
|
38364
|
-
}
|
|
38365
|
-
this.state.tableZoneErrors = [];
|
|
38366
38361
|
}
|
|
38367
38362
|
deleteTable() {
|
|
38368
38363
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
@@ -49249,7 +49244,10 @@ class HeaderSizePlugin extends CorePlugin {
|
|
|
49249
49244
|
handle(cmd) {
|
|
49250
49245
|
switch (cmd.type) {
|
|
49251
49246
|
case "CREATE_SHEET": {
|
|
49252
|
-
this.history.update("sizes", cmd.sheetId, {
|
|
49247
|
+
this.history.update("sizes", cmd.sheetId, {
|
|
49248
|
+
COL: Array(this.getters.getNumberCols(cmd.sheetId)).fill(undefined),
|
|
49249
|
+
ROW: Array(this.getters.getNumberRows(cmd.sheetId)).fill(undefined),
|
|
49250
|
+
});
|
|
49253
49251
|
break;
|
|
49254
49252
|
}
|
|
49255
49253
|
case "DUPLICATE_SHEET":
|
|
@@ -55793,10 +55791,6 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
55793
55791
|
this.setupPivot(cmd.pivotId, { recreate: true });
|
|
55794
55792
|
break;
|
|
55795
55793
|
}
|
|
55796
|
-
case "REMOVE_PIVOT": {
|
|
55797
|
-
delete this.pivots[cmd.pivotId];
|
|
55798
|
-
break;
|
|
55799
|
-
}
|
|
55800
55794
|
case "DELETE_SHEET":
|
|
55801
55795
|
case "UPDATE_CELL": {
|
|
55802
55796
|
this.unusedPivots = undefined;
|
|
@@ -55938,6 +55932,9 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
55938
55932
|
}
|
|
55939
55933
|
}
|
|
55940
55934
|
getPivot(pivotId) {
|
|
55935
|
+
if (!this.getters.isExistingPivot(pivotId)) {
|
|
55936
|
+
throw new Error(`pivot ${pivotId} not found`);
|
|
55937
|
+
}
|
|
55941
55938
|
return this.pivots[pivotId];
|
|
55942
55939
|
}
|
|
55943
55940
|
isPivotUnused(pivotId) {
|
|
@@ -58018,7 +58015,7 @@ class InsertPivotPlugin extends UIPlugin {
|
|
|
58018
58015
|
sheetId,
|
|
58019
58016
|
col,
|
|
58020
58017
|
row,
|
|
58021
|
-
content: `=PIVOT(
|
|
58018
|
+
content: `=PIVOT(${pivotFormulaId})`,
|
|
58022
58019
|
});
|
|
58023
58020
|
const zone = {
|
|
58024
58021
|
left: col,
|
|
@@ -59409,6 +59406,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
59409
59406
|
this.status = "invisible";
|
|
59410
59407
|
if (this._isCutOperation) {
|
|
59411
59408
|
this.copiedData = undefined;
|
|
59409
|
+
this._isCutOperation = false;
|
|
59412
59410
|
}
|
|
59413
59411
|
break;
|
|
59414
59412
|
}
|
|
@@ -59506,6 +59504,7 @@ class ClipboardPlugin extends UIPlugin {
|
|
|
59506
59504
|
}
|
|
59507
59505
|
case "ACTIVATE_PAINT_FORMAT": {
|
|
59508
59506
|
const zones = this.getters.getSelectedZones();
|
|
59507
|
+
this._isCutOperation = false;
|
|
59509
59508
|
this.copiedData = this.copy(zones);
|
|
59510
59509
|
this.status = "visible";
|
|
59511
59510
|
if (cmd.persistent) {
|
|
@@ -68416,6 +68415,6 @@ const constants = {
|
|
|
68416
68415
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, 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 };
|
|
68417
68416
|
|
|
68418
68417
|
|
|
68419
|
-
__info__.version = "17.4.
|
|
68420
|
-
__info__.date = "2024-08-
|
|
68421
|
-
__info__.hash = "
|
|
68418
|
+
__info__.version = "17.4.6";
|
|
68419
|
+
__info__.date = "2024-08-26T13:50:49.623Z";
|
|
68420
|
+
__info__.hash = "f5648d9";
|
|
@@ -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 17.4.
|
|
6
|
-
* @date 2024-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.6
|
|
6
|
+
* @date 2024-08-26T13:50:49.623Z
|
|
7
|
+
* @hash f5648d9
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -241,6 +241,7 @@
|
|
|
241
241
|
bandedRows: true,
|
|
242
242
|
bandedColumns: false,
|
|
243
243
|
styleId: "TableStyleMedium5",
|
|
244
|
+
automaticAutofill: true,
|
|
244
245
|
};
|
|
245
246
|
|
|
246
247
|
//------------------------------------------------------------------------------
|
|
@@ -35172,7 +35173,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35172
35173
|
searchScope: "activeSheet",
|
|
35173
35174
|
specificRange: undefined,
|
|
35174
35175
|
};
|
|
35175
|
-
updateSearchContent = debounce(this._updateSearchContent.bind(this), 200);
|
|
35176
35176
|
constructor(get) {
|
|
35177
35177
|
super(get);
|
|
35178
35178
|
this.initialShowFormulaState = this.model.getters.shouldShowFormulas();
|
|
@@ -35181,7 +35181,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35181
35181
|
highlightStore.register(this);
|
|
35182
35182
|
this.onDispose(() => {
|
|
35183
35183
|
this.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.initialShowFormulaState });
|
|
35184
|
-
this.updateSearchContent.stopDebounce();
|
|
35185
35184
|
highlightStore.unRegister(this);
|
|
35186
35185
|
});
|
|
35187
35186
|
}
|
|
@@ -35195,7 +35194,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35195
35194
|
return this.specificRangeMatches;
|
|
35196
35195
|
}
|
|
35197
35196
|
}
|
|
35198
|
-
|
|
35197
|
+
updateSearchContent(toSearch) {
|
|
35199
35198
|
this._updateSearch(toSearch, this.searchOptions);
|
|
35200
35199
|
}
|
|
35201
35200
|
updateSearchOptions(searchOptions) {
|
|
@@ -35211,9 +35210,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35211
35210
|
selectNextMatch() {
|
|
35212
35211
|
this.selectNextCell(Direction.next);
|
|
35213
35212
|
}
|
|
35214
|
-
get pendingSearch() {
|
|
35215
|
-
return this.updateSearchContent.isDebouncePending();
|
|
35216
|
-
}
|
|
35217
35213
|
handle(cmd) {
|
|
35218
35214
|
switch (cmd.type) {
|
|
35219
35215
|
case "SET_FORMULA_VISIBILITY":
|
|
@@ -35539,6 +35535,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35539
35535
|
searchInput = owl.useRef("searchInput");
|
|
35540
35536
|
store;
|
|
35541
35537
|
state;
|
|
35538
|
+
updateSearchContent;
|
|
35542
35539
|
get hasSearchResult() {
|
|
35543
35540
|
return this.store.selectedMatchIndex !== null;
|
|
35544
35541
|
}
|
|
@@ -35570,12 +35567,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35570
35567
|
this.store = useLocalStore(FindAndReplaceStore);
|
|
35571
35568
|
this.state = owl.useState({ dataRange: "" });
|
|
35572
35569
|
owl.onMounted(() => this.searchInput.el?.focus());
|
|
35570
|
+
owl.onWillUnmount(() => this.updateSearchContent.stopDebounce());
|
|
35571
|
+
this.updateSearchContent = debounce(this.store.updateSearchContent, 200);
|
|
35573
35572
|
}
|
|
35574
35573
|
onFocusSearch() {
|
|
35575
35574
|
this.updateDataRange();
|
|
35576
35575
|
}
|
|
35577
35576
|
onSearchInput(ev) {
|
|
35578
|
-
this.
|
|
35577
|
+
this.updateSearchContent(ev.target.value);
|
|
35579
35578
|
}
|
|
35580
35579
|
onKeydownSearch(ev) {
|
|
35581
35580
|
if (ev.key === "Enter") {
|
|
@@ -35614,6 +35613,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35614
35613
|
const specificRange = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.dataRange);
|
|
35615
35614
|
this.store.updateSearchOptions({ specificRange });
|
|
35616
35615
|
}
|
|
35616
|
+
get pendingSearch() {
|
|
35617
|
+
return this.updateSearchContent.isDebouncePending();
|
|
35618
|
+
}
|
|
35617
35619
|
}
|
|
35618
35620
|
|
|
35619
35621
|
css /* scss */ `
|
|
@@ -36667,6 +36669,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36667
36669
|
* Used to order two values
|
|
36668
36670
|
*/
|
|
36669
36671
|
function compareDimensionValues(dimension, a, b) {
|
|
36672
|
+
if (a === "null") {
|
|
36673
|
+
return dimension.order === "asc" ? 1 : -1;
|
|
36674
|
+
}
|
|
36675
|
+
if (b === "null") {
|
|
36676
|
+
return dimension.order === "asc" ? -1 : 1;
|
|
36677
|
+
}
|
|
36670
36678
|
if (dimension.type === "integer" || dimension.type === "date") {
|
|
36671
36679
|
return dimension.order === "asc" ? Number(a) - Number(b) : Number(b) - Number(a);
|
|
36672
36680
|
}
|
|
@@ -37029,7 +37037,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37029
37037
|
if (cell.type === CellValueType.error) {
|
|
37030
37038
|
throw new EvaluationError(_t("The pivot cannot be created because cell %s contains an error", toXC(col, row)));
|
|
37031
37039
|
}
|
|
37032
|
-
if (cell.type === CellValueType.empty) {
|
|
37040
|
+
if (cell.type === CellValueType.empty || cell.value === "") {
|
|
37033
37041
|
throw new EvaluationError(_t("The pivot cannot be created because cell %s is empty", toXC(col, row)));
|
|
37034
37042
|
}
|
|
37035
37043
|
if (cell.value === "__count") {
|
|
@@ -37375,15 +37383,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37375
37383
|
}
|
|
37376
37384
|
onSelectionConfirmed() {
|
|
37377
37385
|
if (this.state.range) {
|
|
37378
|
-
const
|
|
37379
|
-
|
|
37380
|
-
? this.env.model.getters.getSheetIdByName(sheetName)
|
|
37381
|
-
: this.env.model.getters.getActiveSheetId();
|
|
37382
|
-
if (!sheetId) {
|
|
37386
|
+
const range = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.range);
|
|
37387
|
+
if (range.invalidSheetName || range.invalidXc) {
|
|
37383
37388
|
return;
|
|
37384
37389
|
}
|
|
37385
|
-
const
|
|
37386
|
-
const dataSet = { sheetId, zone };
|
|
37390
|
+
const dataSet = { sheetId: range.sheetId, zone: range.zone };
|
|
37387
37391
|
this.store.update({ dataSet });
|
|
37388
37392
|
// Immediately apply the update to recompute the pivot fields
|
|
37389
37393
|
this.store.applyUpdate();
|
|
@@ -38316,10 +38320,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
38316
38320
|
});
|
|
38317
38321
|
}
|
|
38318
38322
|
onRangeChanged(ranges) {
|
|
38319
|
-
if (!ranges[0] || !ranges[0].match(rangeReference)) {
|
|
38320
|
-
this.state.tableZoneErrors = ["InvalidRange" /* CommandResult.InvalidRange */];
|
|
38321
|
-
return;
|
|
38322
|
-
}
|
|
38323
38323
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
38324
38324
|
this.state.tableXc = ranges[0];
|
|
38325
38325
|
const newTableRange = this.env.model.getters.getRangeFromSheetXC(sheetId, this.state.tableXc);
|
|
@@ -38359,11 +38359,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
38359
38359
|
const newTableRange = updatedTable.range;
|
|
38360
38360
|
this.state.tableXc = this.env.model.getters.getRangeString(newTableRange, sheetId);
|
|
38361
38361
|
}
|
|
38362
|
-
else {
|
|
38363
|
-
const oldTableRange = this.props.table.range;
|
|
38364
|
-
this.state.tableXc = this.env.model.getters.getRangeString(oldTableRange, sheetId);
|
|
38365
|
-
}
|
|
38366
|
-
this.state.tableZoneErrors = [];
|
|
38367
38362
|
}
|
|
38368
38363
|
deleteTable() {
|
|
38369
38364
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
@@ -49250,7 +49245,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49250
49245
|
handle(cmd) {
|
|
49251
49246
|
switch (cmd.type) {
|
|
49252
49247
|
case "CREATE_SHEET": {
|
|
49253
|
-
this.history.update("sizes", cmd.sheetId, {
|
|
49248
|
+
this.history.update("sizes", cmd.sheetId, {
|
|
49249
|
+
COL: Array(this.getters.getNumberCols(cmd.sheetId)).fill(undefined),
|
|
49250
|
+
ROW: Array(this.getters.getNumberRows(cmd.sheetId)).fill(undefined),
|
|
49251
|
+
});
|
|
49254
49252
|
break;
|
|
49255
49253
|
}
|
|
49256
49254
|
case "DUPLICATE_SHEET":
|
|
@@ -55794,10 +55792,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55794
55792
|
this.setupPivot(cmd.pivotId, { recreate: true });
|
|
55795
55793
|
break;
|
|
55796
55794
|
}
|
|
55797
|
-
case "REMOVE_PIVOT": {
|
|
55798
|
-
delete this.pivots[cmd.pivotId];
|
|
55799
|
-
break;
|
|
55800
|
-
}
|
|
55801
55795
|
case "DELETE_SHEET":
|
|
55802
55796
|
case "UPDATE_CELL": {
|
|
55803
55797
|
this.unusedPivots = undefined;
|
|
@@ -55939,6 +55933,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55939
55933
|
}
|
|
55940
55934
|
}
|
|
55941
55935
|
getPivot(pivotId) {
|
|
55936
|
+
if (!this.getters.isExistingPivot(pivotId)) {
|
|
55937
|
+
throw new Error(`pivot ${pivotId} not found`);
|
|
55938
|
+
}
|
|
55942
55939
|
return this.pivots[pivotId];
|
|
55943
55940
|
}
|
|
55944
55941
|
isPivotUnused(pivotId) {
|
|
@@ -58019,7 +58016,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
58019
58016
|
sheetId,
|
|
58020
58017
|
col,
|
|
58021
58018
|
row,
|
|
58022
|
-
content: `=PIVOT(
|
|
58019
|
+
content: `=PIVOT(${pivotFormulaId})`,
|
|
58023
58020
|
});
|
|
58024
58021
|
const zone = {
|
|
58025
58022
|
left: col,
|
|
@@ -59410,6 +59407,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59410
59407
|
this.status = "invisible";
|
|
59411
59408
|
if (this._isCutOperation) {
|
|
59412
59409
|
this.copiedData = undefined;
|
|
59410
|
+
this._isCutOperation = false;
|
|
59413
59411
|
}
|
|
59414
59412
|
break;
|
|
59415
59413
|
}
|
|
@@ -59507,6 +59505,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59507
59505
|
}
|
|
59508
59506
|
case "ACTIVATE_PAINT_FORMAT": {
|
|
59509
59507
|
const zones = this.getters.getSelectedZones();
|
|
59508
|
+
this._isCutOperation = false;
|
|
59510
59509
|
this.copiedData = this.copy(zones);
|
|
59511
59510
|
this.status = "visible";
|
|
59512
59511
|
if (cmd.persistent) {
|
|
@@ -68460,9 +68459,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68460
68459
|
exports.tokenize = tokenize;
|
|
68461
68460
|
|
|
68462
68461
|
|
|
68463
|
-
__info__.version = "17.4.
|
|
68464
|
-
__info__.date = "2024-08-
|
|
68465
|
-
__info__.hash = "
|
|
68462
|
+
__info__.version = "17.4.6";
|
|
68463
|
+
__info__.date = "2024-08-26T13:50:49.623Z";
|
|
68464
|
+
__info__.hash = "f5648d9";
|
|
68466
68465
|
|
|
68467
68466
|
|
|
68468
68467
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|