@odoo/o-spreadsheet 19.3.17 → 19.3.18
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 +45 -14
- package/dist/o_spreadsheet.css +9 -3
- package/dist/o_spreadsheet.esm.js +45 -14
- package/dist/o_spreadsheet.iife.js +45 -14
- package/dist/o_spreadsheet.min.iife.js +4 -4
- package/dist/o_spreadsheet.xml +3 -3
- package/dist/types/collaborative/session.d.ts +3 -1
- package/dist/types/plugins/core/squisher.d.ts +3 -0
- package/dist/types/types/collaborative/transport_service.d.ts +1 -0
- package/package.json +1 -1
package/dist/o_spreadsheet.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.18
|
|
6
|
+
* @date 2026-08-29T09:16:28.272Z
|
|
7
|
+
* @hash 1f4b1ae
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -10486,6 +10486,7 @@ function getRadarChartDatasets(definition, args) {
|
|
|
10486
10486
|
hidden,
|
|
10487
10487
|
borderColor,
|
|
10488
10488
|
backgroundColor: borderColor,
|
|
10489
|
+
pointBackgroundColor: borderColor,
|
|
10489
10490
|
pointRadius: definition.hideDataMarkers ? 0 : 3
|
|
10490
10491
|
};
|
|
10491
10492
|
if (fill) {
|
|
@@ -49839,6 +49840,7 @@ var Squisher = class {
|
|
|
49839
49840
|
baseFormulaWasTransformed = false;
|
|
49840
49841
|
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
49841
49842
|
baseNumber = void 0;
|
|
49843
|
+
baseNumberFormat = void 0;
|
|
49842
49844
|
constructor(getters) {
|
|
49843
49845
|
this.getters = getters;
|
|
49844
49846
|
}
|
|
@@ -49873,6 +49875,11 @@ var Squisher = class {
|
|
|
49873
49875
|
this.baseFormulaWasTransformed = false;
|
|
49874
49876
|
}
|
|
49875
49877
|
}
|
|
49878
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
49879
|
+
resetBaseNumber() {
|
|
49880
|
+
this.baseNumber = void 0;
|
|
49881
|
+
this.baseNumberFormat = void 0;
|
|
49882
|
+
}
|
|
49876
49883
|
/**
|
|
49877
49884
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
49878
49885
|
* We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
|
|
@@ -49911,8 +49918,9 @@ var Squisher = class {
|
|
|
49911
49918
|
if (typeof cell.parsedValue === "number" && cell.parsedValue % 1 === 0) {
|
|
49912
49919
|
this.resetBaseFormula();
|
|
49913
49920
|
const numberValue = cell.parsedValue;
|
|
49914
|
-
if (this.baseNumber === void 0) {
|
|
49921
|
+
if (this.baseNumber === void 0 || cell.format !== this.baseNumberFormat) {
|
|
49915
49922
|
this.baseNumber = numberValue;
|
|
49923
|
+
this.baseNumberFormat = cell.format;
|
|
49916
49924
|
return cell.content;
|
|
49917
49925
|
}
|
|
49918
49926
|
const numberOffset = numberValue - this.baseNumber;
|
|
@@ -49923,7 +49931,7 @@ var Squisher = class {
|
|
|
49923
49931
|
}
|
|
49924
49932
|
}
|
|
49925
49933
|
this.resetBaseFormula();
|
|
49926
|
-
this.
|
|
49934
|
+
this.resetBaseNumber();
|
|
49927
49935
|
return cell.content;
|
|
49928
49936
|
}
|
|
49929
49937
|
squishCommand(command) {
|
|
@@ -49932,6 +49940,8 @@ var Squisher = class {
|
|
|
49932
49940
|
const squished = this.squish(cell, command.sheetId);
|
|
49933
49941
|
return typeof squished === "string" ? command.content : squished;
|
|
49934
49942
|
}
|
|
49943
|
+
this.resetBaseFormula();
|
|
49944
|
+
this.resetBaseNumber();
|
|
49935
49945
|
return command.content;
|
|
49936
49946
|
}
|
|
49937
49947
|
/**
|
|
@@ -50085,8 +50095,10 @@ var Unsquisher = class {
|
|
|
50085
50095
|
continue;
|
|
50086
50096
|
}
|
|
50087
50097
|
const current = command.content;
|
|
50088
|
-
if (current === void 0 || current === null || current === "")
|
|
50089
|
-
|
|
50098
|
+
if (current === void 0 || current === null || current === "") {
|
|
50099
|
+
this.rebase();
|
|
50100
|
+
strategy = "NOT_A_FORMULA";
|
|
50101
|
+
} else strategy = this.chooseStrategy(current, strategy, command.sheetId, getters);
|
|
50090
50102
|
let targetPositions;
|
|
50091
50103
|
if (command.type === "SQUISHED_UPDATE_CELL" && "targetRange" in command) {
|
|
50092
50104
|
const [start, end] = command.targetRange.split(":");
|
|
@@ -50131,8 +50143,11 @@ var Unsquisher = class {
|
|
|
50131
50143
|
let strategy;
|
|
50132
50144
|
for (const { key } of keys) {
|
|
50133
50145
|
const current = squished[key];
|
|
50134
|
-
if (current === void 0 || current === null || current === "")
|
|
50135
|
-
|
|
50146
|
+
if (current === void 0 || current === null || current === "") {
|
|
50147
|
+
this.rebase();
|
|
50148
|
+
strategy = void 0;
|
|
50149
|
+
continue;
|
|
50150
|
+
} else strategy = this.chooseStrategy(current, strategy, sheetId, getters);
|
|
50136
50151
|
const parts = key.split(":");
|
|
50137
50152
|
const targetPositions = parts.length === 1 ? expandXc(key) : expandRange(parts[0], parts[1]);
|
|
50138
50153
|
yield* this.applyStrategy(strategy, targetPositions, current, sheetId, getters);
|
|
@@ -50178,6 +50193,9 @@ var Unsquisher = class {
|
|
|
50178
50193
|
case "FIRST_OFFSET":
|
|
50179
50194
|
strategy = "COMBINE_OFFSET";
|
|
50180
50195
|
break;
|
|
50196
|
+
case "COMBINE_OFFSET":
|
|
50197
|
+
case "OFFSET_NUMBER": break;
|
|
50198
|
+
default: throw new Error(`Cannot unsquish an offset without a preceding base cell: ${strategy}`);
|
|
50181
50199
|
}
|
|
50182
50200
|
}
|
|
50183
50201
|
return strategy;
|
|
@@ -60960,6 +60978,7 @@ var Session = class extends EventBus {
|
|
|
60960
60978
|
transportService;
|
|
60961
60979
|
serverRevisionId;
|
|
60962
60980
|
commandSquisher;
|
|
60981
|
+
shouldVerifySquish;
|
|
60963
60982
|
/**
|
|
60964
60983
|
* Positions of the others client.
|
|
60965
60984
|
*/
|
|
@@ -60994,13 +61013,15 @@ var Session = class extends EventBus {
|
|
|
60994
61013
|
* between all connected clients
|
|
60995
61014
|
* @param serverRevisionId
|
|
60996
61015
|
* @param commandSquisher used to squish and unsquish commands to reduce the size of messages sent to the server
|
|
61016
|
+
* @param shouldVerifySquish either the commands should be unsquished and verified before being sent to the server
|
|
60997
61017
|
*/
|
|
60998
|
-
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher) {
|
|
61018
|
+
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher, shouldVerifySquish = true) {
|
|
60999
61019
|
super();
|
|
61000
61020
|
this.revisions = revisions;
|
|
61001
61021
|
this.transportService = transportService;
|
|
61002
61022
|
this.serverRevisionId = serverRevisionId;
|
|
61003
61023
|
this.commandSquisher = commandSquisher;
|
|
61024
|
+
this.shouldVerifySquish = shouldVerifySquish;
|
|
61004
61025
|
}
|
|
61005
61026
|
canApplyOptimisticUpdate() {
|
|
61006
61027
|
return !this.waitingUndoRedoAck;
|
|
@@ -61256,10 +61277,20 @@ var Session = class extends EventBus {
|
|
|
61256
61277
|
this.revisions.rebase(revision.id);
|
|
61257
61278
|
revision = this.revisions.get(message.nextRevisionId);
|
|
61258
61279
|
}
|
|
61259
|
-
|
|
61280
|
+
const squishedCommands = this.commandSquisher.squish(revision.commands);
|
|
61281
|
+
if (!squishedCommands.some((x) => x.type === "SQUISHED_UPDATE_CELL")) message = {
|
|
61260
61282
|
...message,
|
|
61261
61283
|
commands: revision.commands
|
|
61262
61284
|
};
|
|
61285
|
+
else if (this.shouldVerifySquish && !deepEquals(revision.commands, this.commandSquisher.unsquish(squishedCommands))) message = {
|
|
61286
|
+
...message,
|
|
61287
|
+
commands: revision.commands,
|
|
61288
|
+
squishedFailed: true
|
|
61289
|
+
};
|
|
61290
|
+
else message = {
|
|
61291
|
+
...message,
|
|
61292
|
+
commands: squishedCommands
|
|
61293
|
+
};
|
|
61263
61294
|
}
|
|
61264
61295
|
if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
61265
61296
|
${JSON.stringify(message)}`);
|
|
@@ -84971,6 +85002,6 @@ exports.stores = stores;
|
|
|
84971
85002
|
exports.tokenColors = tokenColors;
|
|
84972
85003
|
exports.tokenize = tokenize;
|
|
84973
85004
|
|
|
84974
|
-
__info__.version = "19.3.
|
|
84975
|
-
__info__.date = "2026-08-
|
|
84976
|
-
__info__.hash = "
|
|
85005
|
+
__info__.version = "19.3.18";
|
|
85006
|
+
__info__.date = "2026-08-29T09:16:28.272Z";
|
|
85007
|
+
__info__.hash = "1f4b1ae";
|
package/dist/o_spreadsheet.css
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.18
|
|
6
|
+
* @date 2026-08-29T09:16:30.020Z
|
|
7
|
+
* @hash 1f4b1ae
|
|
8
8
|
*/
|
|
9
9
|
:root {
|
|
10
10
|
--os-gray-100: light-dark(#f9fafb, #1b1d26);
|
|
@@ -1480,6 +1480,12 @@
|
|
|
1480
1480
|
background-color: var(--os-action-color);
|
|
1481
1481
|
border-color: var(--os-action-color) !important;
|
|
1482
1482
|
}
|
|
1483
|
+
|
|
1484
|
+
&:focus {
|
|
1485
|
+
outline: none;
|
|
1486
|
+
box-shadow: 0 0 0 0.25rem rgba(113, 75, 103, 0.25);
|
|
1487
|
+
border-color: var(--os-action-color);
|
|
1488
|
+
}
|
|
1483
1489
|
}
|
|
1484
1490
|
}
|
|
1485
1491
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.18
|
|
6
|
+
* @date 2026-08-29T09:16:28.272Z
|
|
7
|
+
* @hash 1f4b1ae
|
|
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, whenReady, xml } from "@odoo/owl";
|
|
@@ -10485,6 +10485,7 @@ function getRadarChartDatasets(definition, args) {
|
|
|
10485
10485
|
hidden,
|
|
10486
10486
|
borderColor,
|
|
10487
10487
|
backgroundColor: borderColor,
|
|
10488
|
+
pointBackgroundColor: borderColor,
|
|
10488
10489
|
pointRadius: definition.hideDataMarkers ? 0 : 3
|
|
10489
10490
|
};
|
|
10490
10491
|
if (fill) {
|
|
@@ -49838,6 +49839,7 @@ var Squisher = class {
|
|
|
49838
49839
|
baseFormulaWasTransformed = false;
|
|
49839
49840
|
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
49840
49841
|
baseNumber = void 0;
|
|
49842
|
+
baseNumberFormat = void 0;
|
|
49841
49843
|
constructor(getters) {
|
|
49842
49844
|
this.getters = getters;
|
|
49843
49845
|
}
|
|
@@ -49872,6 +49874,11 @@ var Squisher = class {
|
|
|
49872
49874
|
this.baseFormulaWasTransformed = false;
|
|
49873
49875
|
}
|
|
49874
49876
|
}
|
|
49877
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
49878
|
+
resetBaseNumber() {
|
|
49879
|
+
this.baseNumber = void 0;
|
|
49880
|
+
this.baseNumberFormat = void 0;
|
|
49881
|
+
}
|
|
49875
49882
|
/**
|
|
49876
49883
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
49877
49884
|
* We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
|
|
@@ -49910,8 +49917,9 @@ var Squisher = class {
|
|
|
49910
49917
|
if (typeof cell.parsedValue === "number" && cell.parsedValue % 1 === 0) {
|
|
49911
49918
|
this.resetBaseFormula();
|
|
49912
49919
|
const numberValue = cell.parsedValue;
|
|
49913
|
-
if (this.baseNumber === void 0) {
|
|
49920
|
+
if (this.baseNumber === void 0 || cell.format !== this.baseNumberFormat) {
|
|
49914
49921
|
this.baseNumber = numberValue;
|
|
49922
|
+
this.baseNumberFormat = cell.format;
|
|
49915
49923
|
return cell.content;
|
|
49916
49924
|
}
|
|
49917
49925
|
const numberOffset = numberValue - this.baseNumber;
|
|
@@ -49922,7 +49930,7 @@ var Squisher = class {
|
|
|
49922
49930
|
}
|
|
49923
49931
|
}
|
|
49924
49932
|
this.resetBaseFormula();
|
|
49925
|
-
this.
|
|
49933
|
+
this.resetBaseNumber();
|
|
49926
49934
|
return cell.content;
|
|
49927
49935
|
}
|
|
49928
49936
|
squishCommand(command) {
|
|
@@ -49931,6 +49939,8 @@ var Squisher = class {
|
|
|
49931
49939
|
const squished = this.squish(cell, command.sheetId);
|
|
49932
49940
|
return typeof squished === "string" ? command.content : squished;
|
|
49933
49941
|
}
|
|
49942
|
+
this.resetBaseFormula();
|
|
49943
|
+
this.resetBaseNumber();
|
|
49934
49944
|
return command.content;
|
|
49935
49945
|
}
|
|
49936
49946
|
/**
|
|
@@ -50084,8 +50094,10 @@ var Unsquisher = class {
|
|
|
50084
50094
|
continue;
|
|
50085
50095
|
}
|
|
50086
50096
|
const current = command.content;
|
|
50087
|
-
if (current === void 0 || current === null || current === "")
|
|
50088
|
-
|
|
50097
|
+
if (current === void 0 || current === null || current === "") {
|
|
50098
|
+
this.rebase();
|
|
50099
|
+
strategy = "NOT_A_FORMULA";
|
|
50100
|
+
} else strategy = this.chooseStrategy(current, strategy, command.sheetId, getters);
|
|
50089
50101
|
let targetPositions;
|
|
50090
50102
|
if (command.type === "SQUISHED_UPDATE_CELL" && "targetRange" in command) {
|
|
50091
50103
|
const [start, end] = command.targetRange.split(":");
|
|
@@ -50130,8 +50142,11 @@ var Unsquisher = class {
|
|
|
50130
50142
|
let strategy;
|
|
50131
50143
|
for (const { key } of keys) {
|
|
50132
50144
|
const current = squished[key];
|
|
50133
|
-
if (current === void 0 || current === null || current === "")
|
|
50134
|
-
|
|
50145
|
+
if (current === void 0 || current === null || current === "") {
|
|
50146
|
+
this.rebase();
|
|
50147
|
+
strategy = void 0;
|
|
50148
|
+
continue;
|
|
50149
|
+
} else strategy = this.chooseStrategy(current, strategy, sheetId, getters);
|
|
50135
50150
|
const parts = key.split(":");
|
|
50136
50151
|
const targetPositions = parts.length === 1 ? expandXc(key) : expandRange(parts[0], parts[1]);
|
|
50137
50152
|
yield* this.applyStrategy(strategy, targetPositions, current, sheetId, getters);
|
|
@@ -50177,6 +50192,9 @@ var Unsquisher = class {
|
|
|
50177
50192
|
case "FIRST_OFFSET":
|
|
50178
50193
|
strategy = "COMBINE_OFFSET";
|
|
50179
50194
|
break;
|
|
50195
|
+
case "COMBINE_OFFSET":
|
|
50196
|
+
case "OFFSET_NUMBER": break;
|
|
50197
|
+
default: throw new Error(`Cannot unsquish an offset without a preceding base cell: ${strategy}`);
|
|
50180
50198
|
}
|
|
50181
50199
|
}
|
|
50182
50200
|
return strategy;
|
|
@@ -60775,6 +60793,7 @@ var Session = class extends EventBus {
|
|
|
60775
60793
|
transportService;
|
|
60776
60794
|
serverRevisionId;
|
|
60777
60795
|
commandSquisher;
|
|
60796
|
+
shouldVerifySquish;
|
|
60778
60797
|
/**
|
|
60779
60798
|
* Positions of the others client.
|
|
60780
60799
|
*/
|
|
@@ -60809,13 +60828,15 @@ var Session = class extends EventBus {
|
|
|
60809
60828
|
* between all connected clients
|
|
60810
60829
|
* @param serverRevisionId
|
|
60811
60830
|
* @param commandSquisher used to squish and unsquish commands to reduce the size of messages sent to the server
|
|
60831
|
+
* @param shouldVerifySquish either the commands should be unsquished and verified before being sent to the server
|
|
60812
60832
|
*/
|
|
60813
|
-
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher) {
|
|
60833
|
+
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher, shouldVerifySquish = true) {
|
|
60814
60834
|
super();
|
|
60815
60835
|
this.revisions = revisions;
|
|
60816
60836
|
this.transportService = transportService;
|
|
60817
60837
|
this.serverRevisionId = serverRevisionId;
|
|
60818
60838
|
this.commandSquisher = commandSquisher;
|
|
60839
|
+
this.shouldVerifySquish = shouldVerifySquish;
|
|
60819
60840
|
}
|
|
60820
60841
|
canApplyOptimisticUpdate() {
|
|
60821
60842
|
return !this.waitingUndoRedoAck;
|
|
@@ -61071,10 +61092,20 @@ var Session = class extends EventBus {
|
|
|
61071
61092
|
this.revisions.rebase(revision.id);
|
|
61072
61093
|
revision = this.revisions.get(message.nextRevisionId);
|
|
61073
61094
|
}
|
|
61074
|
-
|
|
61095
|
+
const squishedCommands = this.commandSquisher.squish(revision.commands);
|
|
61096
|
+
if (!squishedCommands.some((x) => x.type === "SQUISHED_UPDATE_CELL")) message = {
|
|
61075
61097
|
...message,
|
|
61076
61098
|
commands: revision.commands
|
|
61077
61099
|
};
|
|
61100
|
+
else if (this.shouldVerifySquish && !deepEquals(revision.commands, this.commandSquisher.unsquish(squishedCommands))) message = {
|
|
61101
|
+
...message,
|
|
61102
|
+
commands: revision.commands,
|
|
61103
|
+
squishedFailed: true
|
|
61104
|
+
};
|
|
61105
|
+
else message = {
|
|
61106
|
+
...message,
|
|
61107
|
+
commands: squishedCommands
|
|
61108
|
+
};
|
|
61078
61109
|
}
|
|
61079
61110
|
if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
61080
61111
|
${JSON.stringify(message)}`);
|
|
@@ -84728,6 +84759,6 @@ const chartHelpers = {
|
|
|
84728
84759
|
//#endregion
|
|
84729
84760
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
84730
84761
|
|
|
84731
|
-
__info__.version = "19.3.
|
|
84732
|
-
__info__.date = "2026-08-
|
|
84733
|
-
__info__.hash = "
|
|
84762
|
+
__info__.version = "19.3.18";
|
|
84763
|
+
__info__.date = "2026-08-29T09:16:28.272Z";
|
|
84764
|
+
__info__.hash = "1f4b1ae";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.18
|
|
6
|
+
* @date 2026-08-29T09:16:28.272Z
|
|
7
|
+
* @hash 1f4b1ae
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -10487,6 +10487,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10487
10487
|
hidden,
|
|
10488
10488
|
borderColor,
|
|
10489
10489
|
backgroundColor: borderColor,
|
|
10490
|
+
pointBackgroundColor: borderColor,
|
|
10490
10491
|
pointRadius: definition.hideDataMarkers ? 0 : 3
|
|
10491
10492
|
};
|
|
10492
10493
|
if (fill) {
|
|
@@ -49840,6 +49841,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49840
49841
|
baseFormulaWasTransformed = false;
|
|
49841
49842
|
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
49842
49843
|
baseNumber = void 0;
|
|
49844
|
+
baseNumberFormat = void 0;
|
|
49843
49845
|
constructor(getters) {
|
|
49844
49846
|
this.getters = getters;
|
|
49845
49847
|
}
|
|
@@ -49874,6 +49876,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49874
49876
|
this.baseFormulaWasTransformed = false;
|
|
49875
49877
|
}
|
|
49876
49878
|
}
|
|
49879
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
49880
|
+
resetBaseNumber() {
|
|
49881
|
+
this.baseNumber = void 0;
|
|
49882
|
+
this.baseNumberFormat = void 0;
|
|
49883
|
+
}
|
|
49877
49884
|
/**
|
|
49878
49885
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
49879
49886
|
* We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
|
|
@@ -49912,8 +49919,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49912
49919
|
if (typeof cell.parsedValue === "number" && cell.parsedValue % 1 === 0) {
|
|
49913
49920
|
this.resetBaseFormula();
|
|
49914
49921
|
const numberValue = cell.parsedValue;
|
|
49915
|
-
if (this.baseNumber === void 0) {
|
|
49922
|
+
if (this.baseNumber === void 0 || cell.format !== this.baseNumberFormat) {
|
|
49916
49923
|
this.baseNumber = numberValue;
|
|
49924
|
+
this.baseNumberFormat = cell.format;
|
|
49917
49925
|
return cell.content;
|
|
49918
49926
|
}
|
|
49919
49927
|
const numberOffset = numberValue - this.baseNumber;
|
|
@@ -49924,7 +49932,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49924
49932
|
}
|
|
49925
49933
|
}
|
|
49926
49934
|
this.resetBaseFormula();
|
|
49927
|
-
this.
|
|
49935
|
+
this.resetBaseNumber();
|
|
49928
49936
|
return cell.content;
|
|
49929
49937
|
}
|
|
49930
49938
|
squishCommand(command) {
|
|
@@ -49933,6 +49941,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49933
49941
|
const squished = this.squish(cell, command.sheetId);
|
|
49934
49942
|
return typeof squished === "string" ? command.content : squished;
|
|
49935
49943
|
}
|
|
49944
|
+
this.resetBaseFormula();
|
|
49945
|
+
this.resetBaseNumber();
|
|
49936
49946
|
return command.content;
|
|
49937
49947
|
}
|
|
49938
49948
|
/**
|
|
@@ -50086,8 +50096,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50086
50096
|
continue;
|
|
50087
50097
|
}
|
|
50088
50098
|
const current = command.content;
|
|
50089
|
-
if (current === void 0 || current === null || current === "")
|
|
50090
|
-
|
|
50099
|
+
if (current === void 0 || current === null || current === "") {
|
|
50100
|
+
this.rebase();
|
|
50101
|
+
strategy = "NOT_A_FORMULA";
|
|
50102
|
+
} else strategy = this.chooseStrategy(current, strategy, command.sheetId, getters);
|
|
50091
50103
|
let targetPositions;
|
|
50092
50104
|
if (command.type === "SQUISHED_UPDATE_CELL" && "targetRange" in command) {
|
|
50093
50105
|
const [start, end] = command.targetRange.split(":");
|
|
@@ -50132,8 +50144,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50132
50144
|
let strategy;
|
|
50133
50145
|
for (const { key } of keys) {
|
|
50134
50146
|
const current = squished[key];
|
|
50135
|
-
if (current === void 0 || current === null || current === "")
|
|
50136
|
-
|
|
50147
|
+
if (current === void 0 || current === null || current === "") {
|
|
50148
|
+
this.rebase();
|
|
50149
|
+
strategy = void 0;
|
|
50150
|
+
continue;
|
|
50151
|
+
} else strategy = this.chooseStrategy(current, strategy, sheetId, getters);
|
|
50137
50152
|
const parts = key.split(":");
|
|
50138
50153
|
const targetPositions = parts.length === 1 ? expandXc(key) : expandRange(parts[0], parts[1]);
|
|
50139
50154
|
yield* this.applyStrategy(strategy, targetPositions, current, sheetId, getters);
|
|
@@ -50179,6 +50194,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50179
50194
|
case "FIRST_OFFSET":
|
|
50180
50195
|
strategy = "COMBINE_OFFSET";
|
|
50181
50196
|
break;
|
|
50197
|
+
case "COMBINE_OFFSET":
|
|
50198
|
+
case "OFFSET_NUMBER": break;
|
|
50199
|
+
default: throw new Error(`Cannot unsquish an offset without a preceding base cell: ${strategy}`);
|
|
50182
50200
|
}
|
|
50183
50201
|
}
|
|
50184
50202
|
return strategy;
|
|
@@ -60777,6 +60795,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60777
60795
|
transportService;
|
|
60778
60796
|
serverRevisionId;
|
|
60779
60797
|
commandSquisher;
|
|
60798
|
+
shouldVerifySquish;
|
|
60780
60799
|
/**
|
|
60781
60800
|
* Positions of the others client.
|
|
60782
60801
|
*/
|
|
@@ -60811,13 +60830,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60811
60830
|
* between all connected clients
|
|
60812
60831
|
* @param serverRevisionId
|
|
60813
60832
|
* @param commandSquisher used to squish and unsquish commands to reduce the size of messages sent to the server
|
|
60833
|
+
* @param shouldVerifySquish either the commands should be unsquished and verified before being sent to the server
|
|
60814
60834
|
*/
|
|
60815
|
-
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher) {
|
|
60835
|
+
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher, shouldVerifySquish = true) {
|
|
60816
60836
|
super();
|
|
60817
60837
|
this.revisions = revisions;
|
|
60818
60838
|
this.transportService = transportService;
|
|
60819
60839
|
this.serverRevisionId = serverRevisionId;
|
|
60820
60840
|
this.commandSquisher = commandSquisher;
|
|
60841
|
+
this.shouldVerifySquish = shouldVerifySquish;
|
|
60821
60842
|
}
|
|
60822
60843
|
canApplyOptimisticUpdate() {
|
|
60823
60844
|
return !this.waitingUndoRedoAck;
|
|
@@ -61073,10 +61094,20 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61073
61094
|
this.revisions.rebase(revision.id);
|
|
61074
61095
|
revision = this.revisions.get(message.nextRevisionId);
|
|
61075
61096
|
}
|
|
61076
|
-
|
|
61097
|
+
const squishedCommands = this.commandSquisher.squish(revision.commands);
|
|
61098
|
+
if (!squishedCommands.some((x) => x.type === "SQUISHED_UPDATE_CELL")) message = {
|
|
61077
61099
|
...message,
|
|
61078
61100
|
commands: revision.commands
|
|
61079
61101
|
};
|
|
61102
|
+
else if (this.shouldVerifySquish && !deepEquals(revision.commands, this.commandSquisher.unsquish(squishedCommands))) message = {
|
|
61103
|
+
...message,
|
|
61104
|
+
commands: revision.commands,
|
|
61105
|
+
squishedFailed: true
|
|
61106
|
+
};
|
|
61107
|
+
else message = {
|
|
61108
|
+
...message,
|
|
61109
|
+
commands: squishedCommands
|
|
61110
|
+
};
|
|
61080
61111
|
}
|
|
61081
61112
|
if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
61082
61113
|
${JSON.stringify(message)}`);
|
|
@@ -84788,8 +84819,8 @@ exports.stores = stores;
|
|
|
84788
84819
|
exports.tokenColors = tokenColors;
|
|
84789
84820
|
exports.tokenize = tokenize;
|
|
84790
84821
|
|
|
84791
|
-
__info__.version = "19.3.
|
|
84792
|
-
__info__.date = "2026-08-
|
|
84793
|
-
__info__.hash = "
|
|
84822
|
+
__info__.version = "19.3.18";
|
|
84823
|
+
__info__.date = "2026-08-29T09:16:28.272Z";
|
|
84824
|
+
__info__.hash = "1f4b1ae";
|
|
84794
84825
|
|
|
84795
84826
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|