@odoo/o-spreadsheet 17.1.29 → 17.1.30
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 +53 -27
- package/dist/o-spreadsheet.d.ts +5 -4
- package/dist/o-spreadsheet.esm.js +53 -27
- package/dist/o-spreadsheet.iife.js +53 -27
- package/dist/o-spreadsheet.iife.min.js +15 -4
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +1 -1
|
@@ -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.1.
|
|
6
|
-
* @date 2024-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.30
|
|
6
|
+
* @date 2024-09-05T09:29:03.585Z
|
|
7
|
+
* @hash 8588bf4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -31885,6 +31885,18 @@ function convertOperator(operator) {
|
|
|
31885
31885
|
// -------------------------------------
|
|
31886
31886
|
// WORKSHEET HELPERS
|
|
31887
31887
|
// -------------------------------------
|
|
31888
|
+
function getCellType(value) {
|
|
31889
|
+
switch (typeof value) {
|
|
31890
|
+
case "boolean":
|
|
31891
|
+
return "b";
|
|
31892
|
+
case "string":
|
|
31893
|
+
return "str";
|
|
31894
|
+
case "number":
|
|
31895
|
+
return "n";
|
|
31896
|
+
default:
|
|
31897
|
+
return undefined;
|
|
31898
|
+
}
|
|
31899
|
+
}
|
|
31888
31900
|
function convertHeightToExcel(height) {
|
|
31889
31901
|
return Math.round(HEIGHT_FACTOR * height * 100) / 100;
|
|
31890
31902
|
}
|
|
@@ -44940,9 +44952,9 @@ class Session extends EventBus {
|
|
|
44940
44952
|
/**
|
|
44941
44953
|
* Notify the server that the user client left the collaborative session
|
|
44942
44954
|
*/
|
|
44943
|
-
leave(data) {
|
|
44955
|
+
async leave(data) {
|
|
44944
44956
|
if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
|
|
44945
|
-
this.snapshot(data());
|
|
44957
|
+
await this.snapshot(data());
|
|
44946
44958
|
}
|
|
44947
44959
|
delete this.clients[this.clientId];
|
|
44948
44960
|
this.transportService.leave(this.clientId);
|
|
@@ -44955,12 +44967,12 @@ class Session extends EventBus {
|
|
|
44955
44967
|
/**
|
|
44956
44968
|
* Send a snapshot of the spreadsheet to the collaboration server
|
|
44957
44969
|
*/
|
|
44958
|
-
snapshot(data) {
|
|
44970
|
+
async snapshot(data) {
|
|
44959
44971
|
if (this.pendingMessages.length !== 0) {
|
|
44960
44972
|
return;
|
|
44961
44973
|
}
|
|
44962
44974
|
const snapshotId = this.uuidGenerator.uuidv4();
|
|
44963
|
-
this.transportService.sendMessage({
|
|
44975
|
+
await this.transportService.sendMessage({
|
|
44964
44976
|
type: "SNAPSHOT",
|
|
44965
44977
|
nextRevisionId: snapshotId,
|
|
44966
44978
|
serverRevisionId: this.serverRevisionId,
|
|
@@ -45668,9 +45680,11 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
45668
45680
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
45669
45681
|
const originFormat = origin.cell?.format ?? origin.evaluatedCell.format;
|
|
45670
45682
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
45671
|
-
|
|
45672
|
-
|
|
45673
|
-
|
|
45683
|
+
this.dispatch("UPDATE_CELL", {
|
|
45684
|
+
...target,
|
|
45685
|
+
content: origin.evaluatedCell.value.toString(),
|
|
45686
|
+
format: originFormat,
|
|
45687
|
+
});
|
|
45674
45688
|
return;
|
|
45675
45689
|
}
|
|
45676
45690
|
const targetBorders = this.getters.getCellBorder(target);
|
|
@@ -50326,6 +50340,8 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
50326
50340
|
this.selectedFigureId = null;
|
|
50327
50341
|
break;
|
|
50328
50342
|
}
|
|
50343
|
+
}
|
|
50344
|
+
finalize() {
|
|
50329
50345
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
50330
50346
|
this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
|
|
50331
50347
|
}
|
|
@@ -51148,7 +51164,6 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
51148
51164
|
}
|
|
51149
51165
|
}
|
|
51150
51166
|
handle(cmd) {
|
|
51151
|
-
this.cleanViewports();
|
|
51152
51167
|
// changing the evaluation can hide/show rows because of data filters
|
|
51153
51168
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
51154
51169
|
for (const sheetId of this.getters.getSheetIds()) {
|
|
@@ -51164,6 +51179,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
51164
51179
|
break;
|
|
51165
51180
|
case "UNDO":
|
|
51166
51181
|
case "REDO":
|
|
51182
|
+
this.cleanViewports();
|
|
51167
51183
|
for (const sheetId of this.getters.getSheetIds()) {
|
|
51168
51184
|
this.sheetsWithDirtyViewports.add(sheetId);
|
|
51169
51185
|
}
|
|
@@ -51217,6 +51233,9 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
51217
51233
|
}
|
|
51218
51234
|
}
|
|
51219
51235
|
break;
|
|
51236
|
+
case "DELETE_SHEET":
|
|
51237
|
+
this.cleanViewports();
|
|
51238
|
+
break;
|
|
51220
51239
|
case "ACTIVATE_SHEET":
|
|
51221
51240
|
this.sheetsWithDirtyViewports.add(cmd.sheetIdTo);
|
|
51222
51241
|
break;
|
|
@@ -52358,6 +52377,17 @@ css /* scss */ `
|
|
|
52358
52377
|
.o-bottom-bar-fade-in {
|
|
52359
52378
|
background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
|
|
52360
52379
|
}
|
|
52380
|
+
|
|
52381
|
+
.o-sheet-list {
|
|
52382
|
+
overflow-y: hidden;
|
|
52383
|
+
overflow-x: auto;
|
|
52384
|
+
|
|
52385
|
+
&::-webkit-scrollbar {
|
|
52386
|
+
display: none; /* Chrome */
|
|
52387
|
+
}
|
|
52388
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
52389
|
+
scrollbar-width: none; /* Firefox */
|
|
52390
|
+
}
|
|
52361
52391
|
}
|
|
52362
52392
|
|
|
52363
52393
|
.o-bottom-bar-arrows {
|
|
@@ -54247,7 +54277,7 @@ class Spreadsheet extends owl.Component {
|
|
|
54247
54277
|
|
|
54248
54278
|
class LocalTransportService {
|
|
54249
54279
|
listeners = [];
|
|
54250
|
-
sendMessage(message) {
|
|
54280
|
+
async sendMessage(message) {
|
|
54251
54281
|
for (const { callback } of this.listeners) {
|
|
54252
54282
|
callback(message);
|
|
54253
54283
|
}
|
|
@@ -56079,17 +56109,13 @@ function addFormula(cell) {
|
|
|
56079
56109
|
if (!formula) {
|
|
56080
56110
|
return { attrs: [], node: escapeXml `` };
|
|
56081
56111
|
}
|
|
56082
|
-
const
|
|
56083
|
-
|
|
56084
|
-
|
|
56085
|
-
const XlsxFormula = adaptFormulaToExcel(formula);
|
|
56086
|
-
// hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
|
|
56087
|
-
// Making it very hard for the client to find where the recursion is.
|
|
56088
|
-
if (cell.value === CellErrorType.CircularDependency) {
|
|
56089
|
-
attrs.push(["t", "str"]);
|
|
56090
|
-
cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
|
|
56112
|
+
const type = getCellType(cell.value);
|
|
56113
|
+
if (type === undefined) {
|
|
56114
|
+
return { attrs: [], node: escapeXml `` };
|
|
56091
56115
|
}
|
|
56092
|
-
|
|
56116
|
+
const attrs = [["t", type]];
|
|
56117
|
+
const XlsxFormula = adaptFormulaToExcel(formula);
|
|
56118
|
+
const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
|
|
56093
56119
|
return { attrs, node };
|
|
56094
56120
|
}
|
|
56095
56121
|
function addContent(content, sharedStrings, forceString = false) {
|
|
@@ -57418,8 +57444,8 @@ class Model extends EventBus {
|
|
|
57418
57444
|
joinSession() {
|
|
57419
57445
|
this.session.join(this.config.client);
|
|
57420
57446
|
}
|
|
57421
|
-
leaveSession() {
|
|
57422
|
-
this.session.leave(lazy(() => this.exportData()));
|
|
57447
|
+
async leaveSession() {
|
|
57448
|
+
await this.session.leave(lazy(() => this.exportData()));
|
|
57423
57449
|
}
|
|
57424
57450
|
setupUiPlugin(Plugin) {
|
|
57425
57451
|
const plugin = new Plugin(this.uiPluginConfig);
|
|
@@ -57931,6 +57957,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57931
57957
|
exports.tokenize = tokenize;
|
|
57932
57958
|
|
|
57933
57959
|
|
|
57934
|
-
__info__.version = "17.1.
|
|
57935
|
-
__info__.date = "2024-
|
|
57936
|
-
__info__.hash = "
|
|
57960
|
+
__info__.version = "17.1.30";
|
|
57961
|
+
__info__.date = "2024-09-05T09:29:03.585Z";
|
|
57962
|
+
__info__.hash = "8588bf4";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -744,7 +744,7 @@ interface TransportService<T = any> {
|
|
|
744
744
|
/**
|
|
745
745
|
* Send a message to all clients
|
|
746
746
|
*/
|
|
747
|
-
sendMessage: (message: T) => void
|
|
747
|
+
sendMessage: (message: T) => Promise<void>;
|
|
748
748
|
/**
|
|
749
749
|
* Register a callback function which will be called each time
|
|
750
750
|
* a new message is received.
|
|
@@ -841,11 +841,11 @@ declare class Session extends EventBus<CollaborativeEvent> {
|
|
|
841
841
|
/**
|
|
842
842
|
* Notify the server that the user client left the collaborative session
|
|
843
843
|
*/
|
|
844
|
-
leave(data: Lazy<WorkbookData>): void
|
|
844
|
+
leave(data: Lazy<WorkbookData>): Promise<void>;
|
|
845
845
|
/**
|
|
846
846
|
* Send a snapshot of the spreadsheet to the collaboration server
|
|
847
847
|
*/
|
|
848
|
-
snapshot(data: WorkbookData): void
|
|
848
|
+
snapshot(data: WorkbookData): Promise<void>;
|
|
849
849
|
getClient(): Client;
|
|
850
850
|
getConnectedClients(): Set<Client>;
|
|
851
851
|
getRevisionId(): UID;
|
|
@@ -1250,7 +1250,7 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
1250
1250
|
private readonly coreHandlers;
|
|
1251
1251
|
constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
|
|
1252
1252
|
joinSession(): void;
|
|
1253
|
-
leaveSession(): void
|
|
1253
|
+
leaveSession(): Promise<void>;
|
|
1254
1254
|
private setupUiPlugin;
|
|
1255
1255
|
/**
|
|
1256
1256
|
* Initialize and properly configure a plugin.
|
|
@@ -4861,6 +4861,7 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
4861
4861
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4862
4862
|
private handleEvent;
|
|
4863
4863
|
handle(cmd: Command): void;
|
|
4864
|
+
finalize(): void;
|
|
4864
4865
|
isGridSelectionActive(): boolean;
|
|
4865
4866
|
getActiveSheet(): Readonly<Sheet>;
|
|
4866
4867
|
getActiveSheetId(): UID;
|
|
@@ -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.1.
|
|
6
|
-
* @date 2024-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.30
|
|
6
|
+
* @date 2024-09-05T09:29:03.585Z
|
|
7
|
+
* @hash 8588bf4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, onWillUnmount, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -31883,6 +31883,18 @@ function convertOperator(operator) {
|
|
|
31883
31883
|
// -------------------------------------
|
|
31884
31884
|
// WORKSHEET HELPERS
|
|
31885
31885
|
// -------------------------------------
|
|
31886
|
+
function getCellType(value) {
|
|
31887
|
+
switch (typeof value) {
|
|
31888
|
+
case "boolean":
|
|
31889
|
+
return "b";
|
|
31890
|
+
case "string":
|
|
31891
|
+
return "str";
|
|
31892
|
+
case "number":
|
|
31893
|
+
return "n";
|
|
31894
|
+
default:
|
|
31895
|
+
return undefined;
|
|
31896
|
+
}
|
|
31897
|
+
}
|
|
31886
31898
|
function convertHeightToExcel(height) {
|
|
31887
31899
|
return Math.round(HEIGHT_FACTOR * height * 100) / 100;
|
|
31888
31900
|
}
|
|
@@ -44938,9 +44950,9 @@ class Session extends EventBus {
|
|
|
44938
44950
|
/**
|
|
44939
44951
|
* Notify the server that the user client left the collaborative session
|
|
44940
44952
|
*/
|
|
44941
|
-
leave(data) {
|
|
44953
|
+
async leave(data) {
|
|
44942
44954
|
if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
|
|
44943
|
-
this.snapshot(data());
|
|
44955
|
+
await this.snapshot(data());
|
|
44944
44956
|
}
|
|
44945
44957
|
delete this.clients[this.clientId];
|
|
44946
44958
|
this.transportService.leave(this.clientId);
|
|
@@ -44953,12 +44965,12 @@ class Session extends EventBus {
|
|
|
44953
44965
|
/**
|
|
44954
44966
|
* Send a snapshot of the spreadsheet to the collaboration server
|
|
44955
44967
|
*/
|
|
44956
|
-
snapshot(data) {
|
|
44968
|
+
async snapshot(data) {
|
|
44957
44969
|
if (this.pendingMessages.length !== 0) {
|
|
44958
44970
|
return;
|
|
44959
44971
|
}
|
|
44960
44972
|
const snapshotId = this.uuidGenerator.uuidv4();
|
|
44961
|
-
this.transportService.sendMessage({
|
|
44973
|
+
await this.transportService.sendMessage({
|
|
44962
44974
|
type: "SNAPSHOT",
|
|
44963
44975
|
nextRevisionId: snapshotId,
|
|
44964
44976
|
serverRevisionId: this.serverRevisionId,
|
|
@@ -45666,9 +45678,11 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
45666
45678
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
45667
45679
|
const originFormat = origin.cell?.format ?? origin.evaluatedCell.format;
|
|
45668
45680
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
45669
|
-
|
|
45670
|
-
|
|
45671
|
-
|
|
45681
|
+
this.dispatch("UPDATE_CELL", {
|
|
45682
|
+
...target,
|
|
45683
|
+
content: origin.evaluatedCell.value.toString(),
|
|
45684
|
+
format: originFormat,
|
|
45685
|
+
});
|
|
45672
45686
|
return;
|
|
45673
45687
|
}
|
|
45674
45688
|
const targetBorders = this.getters.getCellBorder(target);
|
|
@@ -50324,6 +50338,8 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
50324
50338
|
this.selectedFigureId = null;
|
|
50325
50339
|
break;
|
|
50326
50340
|
}
|
|
50341
|
+
}
|
|
50342
|
+
finalize() {
|
|
50327
50343
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
50328
50344
|
this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
|
|
50329
50345
|
}
|
|
@@ -51146,7 +51162,6 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
51146
51162
|
}
|
|
51147
51163
|
}
|
|
51148
51164
|
handle(cmd) {
|
|
51149
|
-
this.cleanViewports();
|
|
51150
51165
|
// changing the evaluation can hide/show rows because of data filters
|
|
51151
51166
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
51152
51167
|
for (const sheetId of this.getters.getSheetIds()) {
|
|
@@ -51162,6 +51177,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
51162
51177
|
break;
|
|
51163
51178
|
case "UNDO":
|
|
51164
51179
|
case "REDO":
|
|
51180
|
+
this.cleanViewports();
|
|
51165
51181
|
for (const sheetId of this.getters.getSheetIds()) {
|
|
51166
51182
|
this.sheetsWithDirtyViewports.add(sheetId);
|
|
51167
51183
|
}
|
|
@@ -51215,6 +51231,9 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
51215
51231
|
}
|
|
51216
51232
|
}
|
|
51217
51233
|
break;
|
|
51234
|
+
case "DELETE_SHEET":
|
|
51235
|
+
this.cleanViewports();
|
|
51236
|
+
break;
|
|
51218
51237
|
case "ACTIVATE_SHEET":
|
|
51219
51238
|
this.sheetsWithDirtyViewports.add(cmd.sheetIdTo);
|
|
51220
51239
|
break;
|
|
@@ -52356,6 +52375,17 @@ css /* scss */ `
|
|
|
52356
52375
|
.o-bottom-bar-fade-in {
|
|
52357
52376
|
background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
|
|
52358
52377
|
}
|
|
52378
|
+
|
|
52379
|
+
.o-sheet-list {
|
|
52380
|
+
overflow-y: hidden;
|
|
52381
|
+
overflow-x: auto;
|
|
52382
|
+
|
|
52383
|
+
&::-webkit-scrollbar {
|
|
52384
|
+
display: none; /* Chrome */
|
|
52385
|
+
}
|
|
52386
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
52387
|
+
scrollbar-width: none; /* Firefox */
|
|
52388
|
+
}
|
|
52359
52389
|
}
|
|
52360
52390
|
|
|
52361
52391
|
.o-bottom-bar-arrows {
|
|
@@ -54245,7 +54275,7 @@ class Spreadsheet extends Component {
|
|
|
54245
54275
|
|
|
54246
54276
|
class LocalTransportService {
|
|
54247
54277
|
listeners = [];
|
|
54248
|
-
sendMessage(message) {
|
|
54278
|
+
async sendMessage(message) {
|
|
54249
54279
|
for (const { callback } of this.listeners) {
|
|
54250
54280
|
callback(message);
|
|
54251
54281
|
}
|
|
@@ -56077,17 +56107,13 @@ function addFormula(cell) {
|
|
|
56077
56107
|
if (!formula) {
|
|
56078
56108
|
return { attrs: [], node: escapeXml `` };
|
|
56079
56109
|
}
|
|
56080
|
-
const
|
|
56081
|
-
|
|
56082
|
-
|
|
56083
|
-
const XlsxFormula = adaptFormulaToExcel(formula);
|
|
56084
|
-
// hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
|
|
56085
|
-
// Making it very hard for the client to find where the recursion is.
|
|
56086
|
-
if (cell.value === CellErrorType.CircularDependency) {
|
|
56087
|
-
attrs.push(["t", "str"]);
|
|
56088
|
-
cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
|
|
56110
|
+
const type = getCellType(cell.value);
|
|
56111
|
+
if (type === undefined) {
|
|
56112
|
+
return { attrs: [], node: escapeXml `` };
|
|
56089
56113
|
}
|
|
56090
|
-
|
|
56114
|
+
const attrs = [["t", type]];
|
|
56115
|
+
const XlsxFormula = adaptFormulaToExcel(formula);
|
|
56116
|
+
const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
|
|
56091
56117
|
return { attrs, node };
|
|
56092
56118
|
}
|
|
56093
56119
|
function addContent(content, sharedStrings, forceString = false) {
|
|
@@ -57416,8 +57442,8 @@ class Model extends EventBus {
|
|
|
57416
57442
|
joinSession() {
|
|
57417
57443
|
this.session.join(this.config.client);
|
|
57418
57444
|
}
|
|
57419
|
-
leaveSession() {
|
|
57420
|
-
this.session.leave(lazy(() => this.exportData()));
|
|
57445
|
+
async leaveSession() {
|
|
57446
|
+
await this.session.leave(lazy(() => this.exportData()));
|
|
57421
57447
|
}
|
|
57422
57448
|
setupUiPlugin(Plugin) {
|
|
57423
57449
|
const plugin = new Plugin(this.uiPluginConfig);
|
|
@@ -57893,6 +57919,6 @@ const constants = {
|
|
|
57893
57919
|
export { AbstractChart, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
57894
57920
|
|
|
57895
57921
|
|
|
57896
|
-
__info__.version = "17.1.
|
|
57897
|
-
__info__.date = "2024-
|
|
57898
|
-
__info__.hash = "
|
|
57922
|
+
__info__.version = "17.1.30";
|
|
57923
|
+
__info__.date = "2024-09-05T09:29:03.585Z";
|
|
57924
|
+
__info__.hash = "8588bf4";
|
|
@@ -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.1.
|
|
6
|
-
* @date 2024-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.30
|
|
6
|
+
* @date 2024-09-05T09:29:03.585Z
|
|
7
|
+
* @hash 8588bf4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -31884,6 +31884,18 @@
|
|
|
31884
31884
|
// -------------------------------------
|
|
31885
31885
|
// WORKSHEET HELPERS
|
|
31886
31886
|
// -------------------------------------
|
|
31887
|
+
function getCellType(value) {
|
|
31888
|
+
switch (typeof value) {
|
|
31889
|
+
case "boolean":
|
|
31890
|
+
return "b";
|
|
31891
|
+
case "string":
|
|
31892
|
+
return "str";
|
|
31893
|
+
case "number":
|
|
31894
|
+
return "n";
|
|
31895
|
+
default:
|
|
31896
|
+
return undefined;
|
|
31897
|
+
}
|
|
31898
|
+
}
|
|
31887
31899
|
function convertHeightToExcel(height) {
|
|
31888
31900
|
return Math.round(HEIGHT_FACTOR * height * 100) / 100;
|
|
31889
31901
|
}
|
|
@@ -44939,9 +44951,9 @@
|
|
|
44939
44951
|
/**
|
|
44940
44952
|
* Notify the server that the user client left the collaborative session
|
|
44941
44953
|
*/
|
|
44942
|
-
leave(data) {
|
|
44954
|
+
async leave(data) {
|
|
44943
44955
|
if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
|
|
44944
|
-
this.snapshot(data());
|
|
44956
|
+
await this.snapshot(data());
|
|
44945
44957
|
}
|
|
44946
44958
|
delete this.clients[this.clientId];
|
|
44947
44959
|
this.transportService.leave(this.clientId);
|
|
@@ -44954,12 +44966,12 @@
|
|
|
44954
44966
|
/**
|
|
44955
44967
|
* Send a snapshot of the spreadsheet to the collaboration server
|
|
44956
44968
|
*/
|
|
44957
|
-
snapshot(data) {
|
|
44969
|
+
async snapshot(data) {
|
|
44958
44970
|
if (this.pendingMessages.length !== 0) {
|
|
44959
44971
|
return;
|
|
44960
44972
|
}
|
|
44961
44973
|
const snapshotId = this.uuidGenerator.uuidv4();
|
|
44962
|
-
this.transportService.sendMessage({
|
|
44974
|
+
await this.transportService.sendMessage({
|
|
44963
44975
|
type: "SNAPSHOT",
|
|
44964
44976
|
nextRevisionId: snapshotId,
|
|
44965
44977
|
serverRevisionId: this.serverRevisionId,
|
|
@@ -45667,9 +45679,11 @@
|
|
|
45667
45679
|
const targetCell = this.getters.getEvaluatedCell(target);
|
|
45668
45680
|
const originFormat = origin.cell?.format ?? origin.evaluatedCell.format;
|
|
45669
45681
|
if (clipboardOption?.pasteOption === "asValue") {
|
|
45670
|
-
|
|
45671
|
-
|
|
45672
|
-
|
|
45682
|
+
this.dispatch("UPDATE_CELL", {
|
|
45683
|
+
...target,
|
|
45684
|
+
content: origin.evaluatedCell.value.toString(),
|
|
45685
|
+
format: originFormat,
|
|
45686
|
+
});
|
|
45673
45687
|
return;
|
|
45674
45688
|
}
|
|
45675
45689
|
const targetBorders = this.getters.getCellBorder(target);
|
|
@@ -50325,6 +50339,8 @@
|
|
|
50325
50339
|
this.selectedFigureId = null;
|
|
50326
50340
|
break;
|
|
50327
50341
|
}
|
|
50342
|
+
}
|
|
50343
|
+
finalize() {
|
|
50328
50344
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
50329
50345
|
this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
|
|
50330
50346
|
}
|
|
@@ -51147,7 +51163,6 @@
|
|
|
51147
51163
|
}
|
|
51148
51164
|
}
|
|
51149
51165
|
handle(cmd) {
|
|
51150
|
-
this.cleanViewports();
|
|
51151
51166
|
// changing the evaluation can hide/show rows because of data filters
|
|
51152
51167
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
51153
51168
|
for (const sheetId of this.getters.getSheetIds()) {
|
|
@@ -51163,6 +51178,7 @@
|
|
|
51163
51178
|
break;
|
|
51164
51179
|
case "UNDO":
|
|
51165
51180
|
case "REDO":
|
|
51181
|
+
this.cleanViewports();
|
|
51166
51182
|
for (const sheetId of this.getters.getSheetIds()) {
|
|
51167
51183
|
this.sheetsWithDirtyViewports.add(sheetId);
|
|
51168
51184
|
}
|
|
@@ -51216,6 +51232,9 @@
|
|
|
51216
51232
|
}
|
|
51217
51233
|
}
|
|
51218
51234
|
break;
|
|
51235
|
+
case "DELETE_SHEET":
|
|
51236
|
+
this.cleanViewports();
|
|
51237
|
+
break;
|
|
51219
51238
|
case "ACTIVATE_SHEET":
|
|
51220
51239
|
this.sheetsWithDirtyViewports.add(cmd.sheetIdTo);
|
|
51221
51240
|
break;
|
|
@@ -52357,6 +52376,17 @@
|
|
|
52357
52376
|
.o-bottom-bar-fade-in {
|
|
52358
52377
|
background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
|
|
52359
52378
|
}
|
|
52379
|
+
|
|
52380
|
+
.o-sheet-list {
|
|
52381
|
+
overflow-y: hidden;
|
|
52382
|
+
overflow-x: auto;
|
|
52383
|
+
|
|
52384
|
+
&::-webkit-scrollbar {
|
|
52385
|
+
display: none; /* Chrome */
|
|
52386
|
+
}
|
|
52387
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
52388
|
+
scrollbar-width: none; /* Firefox */
|
|
52389
|
+
}
|
|
52360
52390
|
}
|
|
52361
52391
|
|
|
52362
52392
|
.o-bottom-bar-arrows {
|
|
@@ -54246,7 +54276,7 @@
|
|
|
54246
54276
|
|
|
54247
54277
|
class LocalTransportService {
|
|
54248
54278
|
listeners = [];
|
|
54249
|
-
sendMessage(message) {
|
|
54279
|
+
async sendMessage(message) {
|
|
54250
54280
|
for (const { callback } of this.listeners) {
|
|
54251
54281
|
callback(message);
|
|
54252
54282
|
}
|
|
@@ -56078,17 +56108,13 @@
|
|
|
56078
56108
|
if (!formula) {
|
|
56079
56109
|
return { attrs: [], node: escapeXml `` };
|
|
56080
56110
|
}
|
|
56081
|
-
const
|
|
56082
|
-
|
|
56083
|
-
|
|
56084
|
-
const XlsxFormula = adaptFormulaToExcel(formula);
|
|
56085
|
-
// hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
|
|
56086
|
-
// Making it very hard for the client to find where the recursion is.
|
|
56087
|
-
if (cell.value === CellErrorType.CircularDependency) {
|
|
56088
|
-
attrs.push(["t", "str"]);
|
|
56089
|
-
cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
|
|
56111
|
+
const type = getCellType(cell.value);
|
|
56112
|
+
if (type === undefined) {
|
|
56113
|
+
return { attrs: [], node: escapeXml `` };
|
|
56090
56114
|
}
|
|
56091
|
-
|
|
56115
|
+
const attrs = [["t", type]];
|
|
56116
|
+
const XlsxFormula = adaptFormulaToExcel(formula);
|
|
56117
|
+
const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
|
|
56092
56118
|
return { attrs, node };
|
|
56093
56119
|
}
|
|
56094
56120
|
function addContent(content, sharedStrings, forceString = false) {
|
|
@@ -57417,8 +57443,8 @@
|
|
|
57417
57443
|
joinSession() {
|
|
57418
57444
|
this.session.join(this.config.client);
|
|
57419
57445
|
}
|
|
57420
|
-
leaveSession() {
|
|
57421
|
-
this.session.leave(lazy(() => this.exportData()));
|
|
57446
|
+
async leaveSession() {
|
|
57447
|
+
await this.session.leave(lazy(() => this.exportData()));
|
|
57422
57448
|
}
|
|
57423
57449
|
setupUiPlugin(Plugin) {
|
|
57424
57450
|
const plugin = new Plugin(this.uiPluginConfig);
|
|
@@ -57930,9 +57956,9 @@
|
|
|
57930
57956
|
exports.tokenize = tokenize;
|
|
57931
57957
|
|
|
57932
57958
|
|
|
57933
|
-
__info__.version = "17.1.
|
|
57934
|
-
__info__.date = "2024-
|
|
57935
|
-
__info__.hash = "
|
|
57959
|
+
__info__.version = "17.1.30";
|
|
57960
|
+
__info__.date = "2024-09-05T09:29:03.585Z";
|
|
57961
|
+
__info__.hash = "8588bf4";
|
|
57936
57962
|
|
|
57937
57963
|
|
|
57938
57964
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|