@odoo/o-spreadsheet 17.4.14 → 17.4.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 +24 -17
- package/dist/o-spreadsheet.d.ts +3 -0
- package/dist/o-spreadsheet.esm.js +24 -17
- package/dist/o-spreadsheet.iife.js +24 -17
- package/dist/o-spreadsheet.iife.min.js +336 -336
- package/dist/o_spreadsheet.xml +3 -3
- 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.4.
|
|
6
|
-
* @date 2024-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.15
|
|
6
|
+
* @date 2024-12-05T10:40:45.905Z
|
|
7
|
+
* @hash 9b13f22
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -306,8 +306,8 @@ const LINE_FILL_TRANSPARENCY = 0.4;
|
|
|
306
306
|
const DEBOUNCE_TIME = 200;
|
|
307
307
|
const MESSAGE_VERSION = 1;
|
|
308
308
|
// Sheets
|
|
309
|
-
const
|
|
310
|
-
const
|
|
309
|
+
const FORBIDDEN_SHEETNAME_CHARS = ["'", "*", "?", "/", "\\", "[", "]"];
|
|
310
|
+
const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX = /'|\*|\?|\/|\\|\[|\]/;
|
|
311
311
|
// Cells
|
|
312
312
|
const FORMULA_REF_IDENTIFIER = "|";
|
|
313
313
|
// Components
|
|
@@ -353,6 +353,7 @@ const PIVOT_TABLE_CONFIG = {
|
|
|
353
353
|
//------------------------------------------------------------------------------
|
|
354
354
|
// Miscellaneous
|
|
355
355
|
//------------------------------------------------------------------------------
|
|
356
|
+
const sanitizeSheetNameRegex = new RegExp(FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX, "g");
|
|
356
357
|
/**
|
|
357
358
|
* Remove quotes from a quoted string
|
|
358
359
|
* ```js
|
|
@@ -448,6 +449,10 @@ function getCanonicalSheetName(sheetName) {
|
|
|
448
449
|
}
|
|
449
450
|
return sheetName;
|
|
450
451
|
}
|
|
452
|
+
/** Replace the excel-excluded characters of a sheetName */
|
|
453
|
+
function sanitizeSheetName(sheetName, replacementChar = " ") {
|
|
454
|
+
return sheetName.replace(sanitizeSheetNameRegex, replacementChar);
|
|
455
|
+
}
|
|
451
456
|
function clip(val, min, max) {
|
|
452
457
|
return val < min ? min : val > max ? max : val;
|
|
453
458
|
}
|
|
@@ -46727,13 +46732,12 @@ const MIGRATIONS = [
|
|
|
46727
46732
|
to: 8,
|
|
46728
46733
|
applyMigration(data) {
|
|
46729
46734
|
const namesTaken = [];
|
|
46730
|
-
const globalForbiddenInExcel = new RegExp(FORBIDDEN_IN_EXCEL_REGEX, "g");
|
|
46731
46735
|
for (let sheet of data.sheets || []) {
|
|
46732
46736
|
if (!sheet.name) {
|
|
46733
46737
|
continue;
|
|
46734
46738
|
}
|
|
46735
46739
|
const oldName = sheet.name;
|
|
46736
|
-
const escapedName = oldName
|
|
46740
|
+
const escapedName = sanitizeSheetName(oldName, "_");
|
|
46737
46741
|
let i = 1;
|
|
46738
46742
|
let newName = escapedName;
|
|
46739
46743
|
while (namesTaken.includes(newName)) {
|
|
@@ -51258,7 +51262,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
51258
51262
|
if (orderedSheetIds.find((id) => sheets[id]?.name.toLowerCase() === name && id !== cmd.sheetId)) {
|
|
51259
51263
|
return "DuplicatedSheetName" /* CommandResult.DuplicatedSheetName */;
|
|
51260
51264
|
}
|
|
51261
|
-
if (
|
|
51265
|
+
if (FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX.test(name)) {
|
|
51262
51266
|
return "ForbiddenCharactersInSheetName" /* CommandResult.ForbiddenCharactersInSheetName */;
|
|
51263
51267
|
}
|
|
51264
51268
|
return "Success" /* CommandResult.Success */;
|
|
@@ -56047,11 +56051,13 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
56047
56051
|
return EMPTY_PIVOT_CELL;
|
|
56048
56052
|
}
|
|
56049
56053
|
if (functionName === "PIVOT") {
|
|
56050
|
-
const includeTotal = args[2]
|
|
56051
|
-
const
|
|
56054
|
+
const includeTotal = toScalar(args[2]);
|
|
56055
|
+
const shouldIncludeTotal = includeTotal === undefined ? true : toBoolean(includeTotal);
|
|
56056
|
+
const includeColumnHeaders = toScalar(args[3]);
|
|
56057
|
+
const shouldIncludeColumnHeaders = includeColumnHeaders === undefined ? true : toBoolean(includeColumnHeaders);
|
|
56052
56058
|
const pivotCells = pivot
|
|
56053
56059
|
.getTableStructure()
|
|
56054
|
-
.getPivotCells(
|
|
56060
|
+
.getPivotCells(shouldIncludeTotal, shouldIncludeColumnHeaders);
|
|
56055
56061
|
const pivotCol = position.col - mainPosition.col;
|
|
56056
56062
|
const pivotRow = position.row - mainPosition.row;
|
|
56057
56063
|
return pivotCells[pivotCol][pivotRow];
|
|
@@ -58156,7 +58162,7 @@ class InsertPivotPlugin extends UIPlugin {
|
|
|
58156
58162
|
getPivotDuplicateSheetName(pivotName) {
|
|
58157
58163
|
let i = 1;
|
|
58158
58164
|
const names = this.getters.getSheetIds().map((id) => this.getters.getSheetName(id));
|
|
58159
|
-
const sanitizedName = pivotName
|
|
58165
|
+
const sanitizedName = sanitizeSheetName(pivotName);
|
|
58160
58166
|
let name = sanitizedName;
|
|
58161
58167
|
while (names.includes(name)) {
|
|
58162
58168
|
name = `${sanitizedName} (${i})`;
|
|
@@ -62197,7 +62203,7 @@ function interactiveRenameSheet(env, sheetId, name, errorCallback) {
|
|
|
62197
62203
|
env.raiseError(_t("A sheet with the name %s already exists. Please select another name.", name), errorCallback);
|
|
62198
62204
|
}
|
|
62199
62205
|
else if (result.reasons.includes("ForbiddenCharactersInSheetName" /* CommandResult.ForbiddenCharactersInSheetName */)) {
|
|
62200
|
-
env.raiseError(_t("Some used characters are not allowed in a sheet name (Forbidden characters are %s).",
|
|
62206
|
+
env.raiseError(_t("Some used characters are not allowed in a sheet name (Forbidden characters are %s).", FORBIDDEN_SHEETNAME_CHARS.join(" ")), errorCallback);
|
|
62201
62207
|
}
|
|
62202
62208
|
}
|
|
62203
62209
|
|
|
@@ -63456,7 +63462,7 @@ class ActionButton extends owl.Component {
|
|
|
63456
63462
|
setup() {
|
|
63457
63463
|
owl.onWillUpdateProps((nextProps) => {
|
|
63458
63464
|
if (nextProps.action !== this.props.action) {
|
|
63459
|
-
this.actionButton = createAction(
|
|
63465
|
+
this.actionButton = createAction(nextProps.action);
|
|
63460
63466
|
}
|
|
63461
63467
|
});
|
|
63462
63468
|
}
|
|
@@ -68589,6 +68595,7 @@ const helpers = {
|
|
|
68589
68595
|
createPivotFormula,
|
|
68590
68596
|
areDomainArgsFieldsValid,
|
|
68591
68597
|
formatTickValue,
|
|
68598
|
+
sanitizeSheetName,
|
|
68592
68599
|
};
|
|
68593
68600
|
const links = {
|
|
68594
68601
|
isMarkdownLink,
|
|
@@ -68719,6 +68726,6 @@ exports.tokenColors = tokenColors;
|
|
|
68719
68726
|
exports.tokenize = tokenize;
|
|
68720
68727
|
|
|
68721
68728
|
|
|
68722
|
-
__info__.version = "17.4.
|
|
68723
|
-
__info__.date = "2024-
|
|
68724
|
-
__info__.hash = "
|
|
68729
|
+
__info__.version = "17.4.15";
|
|
68730
|
+
__info__.date = "2024-12-05T10:40:45.905Z";
|
|
68731
|
+
__info__.hash = "9b13f22";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5548,6 +5548,8 @@ declare function createCurrencyFormat(currency: Partial<Currency>): Format;
|
|
|
5548
5548
|
*/
|
|
5549
5549
|
declare function deepCopy<T>(obj: T): T;
|
|
5550
5550
|
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
|
|
5551
|
+
/** Replace the excel-excluded characters of a sheetName */
|
|
5552
|
+
declare function sanitizeSheetName(sheetName: string, replacementChar?: string): string;
|
|
5551
5553
|
declare function isMarkdownLink(str: string): boolean;
|
|
5552
5554
|
/**
|
|
5553
5555
|
* Build a markdown link from a label and an url
|
|
@@ -11531,6 +11533,7 @@ declare const helpers: {
|
|
|
11531
11533
|
createPivotFormula: typeof createPivotFormula;
|
|
11532
11534
|
areDomainArgsFieldsValid: typeof areDomainArgsFieldsValid;
|
|
11533
11535
|
formatTickValue: typeof formatTickValue;
|
|
11536
|
+
sanitizeSheetName: typeof sanitizeSheetName;
|
|
11534
11537
|
};
|
|
11535
11538
|
declare const links: {
|
|
11536
11539
|
isMarkdownLink: typeof isMarkdownLink;
|
|
@@ -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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.15
|
|
6
|
+
* @date 2024-12-05T10:40:45.905Z
|
|
7
|
+
* @hash 9b13f22
|
|
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';
|
|
@@ -304,8 +304,8 @@ const LINE_FILL_TRANSPARENCY = 0.4;
|
|
|
304
304
|
const DEBOUNCE_TIME = 200;
|
|
305
305
|
const MESSAGE_VERSION = 1;
|
|
306
306
|
// Sheets
|
|
307
|
-
const
|
|
308
|
-
const
|
|
307
|
+
const FORBIDDEN_SHEETNAME_CHARS = ["'", "*", "?", "/", "\\", "[", "]"];
|
|
308
|
+
const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX = /'|\*|\?|\/|\\|\[|\]/;
|
|
309
309
|
// Cells
|
|
310
310
|
const FORMULA_REF_IDENTIFIER = "|";
|
|
311
311
|
// Components
|
|
@@ -351,6 +351,7 @@ const PIVOT_TABLE_CONFIG = {
|
|
|
351
351
|
//------------------------------------------------------------------------------
|
|
352
352
|
// Miscellaneous
|
|
353
353
|
//------------------------------------------------------------------------------
|
|
354
|
+
const sanitizeSheetNameRegex = new RegExp(FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX, "g");
|
|
354
355
|
/**
|
|
355
356
|
* Remove quotes from a quoted string
|
|
356
357
|
* ```js
|
|
@@ -446,6 +447,10 @@ function getCanonicalSheetName(sheetName) {
|
|
|
446
447
|
}
|
|
447
448
|
return sheetName;
|
|
448
449
|
}
|
|
450
|
+
/** Replace the excel-excluded characters of a sheetName */
|
|
451
|
+
function sanitizeSheetName(sheetName, replacementChar = " ") {
|
|
452
|
+
return sheetName.replace(sanitizeSheetNameRegex, replacementChar);
|
|
453
|
+
}
|
|
449
454
|
function clip(val, min, max) {
|
|
450
455
|
return val < min ? min : val > max ? max : val;
|
|
451
456
|
}
|
|
@@ -46725,13 +46730,12 @@ const MIGRATIONS = [
|
|
|
46725
46730
|
to: 8,
|
|
46726
46731
|
applyMigration(data) {
|
|
46727
46732
|
const namesTaken = [];
|
|
46728
|
-
const globalForbiddenInExcel = new RegExp(FORBIDDEN_IN_EXCEL_REGEX, "g");
|
|
46729
46733
|
for (let sheet of data.sheets || []) {
|
|
46730
46734
|
if (!sheet.name) {
|
|
46731
46735
|
continue;
|
|
46732
46736
|
}
|
|
46733
46737
|
const oldName = sheet.name;
|
|
46734
|
-
const escapedName = oldName
|
|
46738
|
+
const escapedName = sanitizeSheetName(oldName, "_");
|
|
46735
46739
|
let i = 1;
|
|
46736
46740
|
let newName = escapedName;
|
|
46737
46741
|
while (namesTaken.includes(newName)) {
|
|
@@ -51256,7 +51260,7 @@ class SheetPlugin extends CorePlugin {
|
|
|
51256
51260
|
if (orderedSheetIds.find((id) => sheets[id]?.name.toLowerCase() === name && id !== cmd.sheetId)) {
|
|
51257
51261
|
return "DuplicatedSheetName" /* CommandResult.DuplicatedSheetName */;
|
|
51258
51262
|
}
|
|
51259
|
-
if (
|
|
51263
|
+
if (FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX.test(name)) {
|
|
51260
51264
|
return "ForbiddenCharactersInSheetName" /* CommandResult.ForbiddenCharactersInSheetName */;
|
|
51261
51265
|
}
|
|
51262
51266
|
return "Success" /* CommandResult.Success */;
|
|
@@ -56045,11 +56049,13 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
56045
56049
|
return EMPTY_PIVOT_CELL;
|
|
56046
56050
|
}
|
|
56047
56051
|
if (functionName === "PIVOT") {
|
|
56048
|
-
const includeTotal = args[2]
|
|
56049
|
-
const
|
|
56052
|
+
const includeTotal = toScalar(args[2]);
|
|
56053
|
+
const shouldIncludeTotal = includeTotal === undefined ? true : toBoolean(includeTotal);
|
|
56054
|
+
const includeColumnHeaders = toScalar(args[3]);
|
|
56055
|
+
const shouldIncludeColumnHeaders = includeColumnHeaders === undefined ? true : toBoolean(includeColumnHeaders);
|
|
56050
56056
|
const pivotCells = pivot
|
|
56051
56057
|
.getTableStructure()
|
|
56052
|
-
.getPivotCells(
|
|
56058
|
+
.getPivotCells(shouldIncludeTotal, shouldIncludeColumnHeaders);
|
|
56053
56059
|
const pivotCol = position.col - mainPosition.col;
|
|
56054
56060
|
const pivotRow = position.row - mainPosition.row;
|
|
56055
56061
|
return pivotCells[pivotCol][pivotRow];
|
|
@@ -58154,7 +58160,7 @@ class InsertPivotPlugin extends UIPlugin {
|
|
|
58154
58160
|
getPivotDuplicateSheetName(pivotName) {
|
|
58155
58161
|
let i = 1;
|
|
58156
58162
|
const names = this.getters.getSheetIds().map((id) => this.getters.getSheetName(id));
|
|
58157
|
-
const sanitizedName = pivotName
|
|
58163
|
+
const sanitizedName = sanitizeSheetName(pivotName);
|
|
58158
58164
|
let name = sanitizedName;
|
|
58159
58165
|
while (names.includes(name)) {
|
|
58160
58166
|
name = `${sanitizedName} (${i})`;
|
|
@@ -62195,7 +62201,7 @@ function interactiveRenameSheet(env, sheetId, name, errorCallback) {
|
|
|
62195
62201
|
env.raiseError(_t("A sheet with the name %s already exists. Please select another name.", name), errorCallback);
|
|
62196
62202
|
}
|
|
62197
62203
|
else if (result.reasons.includes("ForbiddenCharactersInSheetName" /* CommandResult.ForbiddenCharactersInSheetName */)) {
|
|
62198
|
-
env.raiseError(_t("Some used characters are not allowed in a sheet name (Forbidden characters are %s).",
|
|
62204
|
+
env.raiseError(_t("Some used characters are not allowed in a sheet name (Forbidden characters are %s).", FORBIDDEN_SHEETNAME_CHARS.join(" ")), errorCallback);
|
|
62199
62205
|
}
|
|
62200
62206
|
}
|
|
62201
62207
|
|
|
@@ -63454,7 +63460,7 @@ class ActionButton extends Component {
|
|
|
63454
63460
|
setup() {
|
|
63455
63461
|
onWillUpdateProps((nextProps) => {
|
|
63456
63462
|
if (nextProps.action !== this.props.action) {
|
|
63457
|
-
this.actionButton = createAction(
|
|
63463
|
+
this.actionButton = createAction(nextProps.action);
|
|
63458
63464
|
}
|
|
63459
63465
|
});
|
|
63460
63466
|
}
|
|
@@ -68587,6 +68593,7 @@ const helpers = {
|
|
|
68587
68593
|
createPivotFormula,
|
|
68588
68594
|
areDomainArgsFieldsValid,
|
|
68589
68595
|
formatTickValue,
|
|
68596
|
+
sanitizeSheetName,
|
|
68590
68597
|
};
|
|
68591
68598
|
const links = {
|
|
68592
68599
|
isMarkdownLink,
|
|
@@ -68674,6 +68681,6 @@ const constants = {
|
|
|
68674
68681
|
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 };
|
|
68675
68682
|
|
|
68676
68683
|
|
|
68677
|
-
__info__.version = "17.4.
|
|
68678
|
-
__info__.date = "2024-
|
|
68679
|
-
__info__.hash = "
|
|
68684
|
+
__info__.version = "17.4.15";
|
|
68685
|
+
__info__.date = "2024-12-05T10:40:45.905Z";
|
|
68686
|
+
__info__.hash = "9b13f22";
|
|
@@ -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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.15
|
|
6
|
+
* @date 2024-12-05T10:40:45.905Z
|
|
7
|
+
* @hash 9b13f22
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -305,8 +305,8 @@
|
|
|
305
305
|
const DEBOUNCE_TIME = 200;
|
|
306
306
|
const MESSAGE_VERSION = 1;
|
|
307
307
|
// Sheets
|
|
308
|
-
const
|
|
309
|
-
const
|
|
308
|
+
const FORBIDDEN_SHEETNAME_CHARS = ["'", "*", "?", "/", "\\", "[", "]"];
|
|
309
|
+
const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX = /'|\*|\?|\/|\\|\[|\]/;
|
|
310
310
|
// Cells
|
|
311
311
|
const FORMULA_REF_IDENTIFIER = "|";
|
|
312
312
|
// Components
|
|
@@ -352,6 +352,7 @@
|
|
|
352
352
|
//------------------------------------------------------------------------------
|
|
353
353
|
// Miscellaneous
|
|
354
354
|
//------------------------------------------------------------------------------
|
|
355
|
+
const sanitizeSheetNameRegex = new RegExp(FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX, "g");
|
|
355
356
|
/**
|
|
356
357
|
* Remove quotes from a quoted string
|
|
357
358
|
* ```js
|
|
@@ -447,6 +448,10 @@
|
|
|
447
448
|
}
|
|
448
449
|
return sheetName;
|
|
449
450
|
}
|
|
451
|
+
/** Replace the excel-excluded characters of a sheetName */
|
|
452
|
+
function sanitizeSheetName(sheetName, replacementChar = " ") {
|
|
453
|
+
return sheetName.replace(sanitizeSheetNameRegex, replacementChar);
|
|
454
|
+
}
|
|
450
455
|
function clip(val, min, max) {
|
|
451
456
|
return val < min ? min : val > max ? max : val;
|
|
452
457
|
}
|
|
@@ -46726,13 +46731,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46726
46731
|
to: 8,
|
|
46727
46732
|
applyMigration(data) {
|
|
46728
46733
|
const namesTaken = [];
|
|
46729
|
-
const globalForbiddenInExcel = new RegExp(FORBIDDEN_IN_EXCEL_REGEX, "g");
|
|
46730
46734
|
for (let sheet of data.sheets || []) {
|
|
46731
46735
|
if (!sheet.name) {
|
|
46732
46736
|
continue;
|
|
46733
46737
|
}
|
|
46734
46738
|
const oldName = sheet.name;
|
|
46735
|
-
const escapedName = oldName
|
|
46739
|
+
const escapedName = sanitizeSheetName(oldName, "_");
|
|
46736
46740
|
let i = 1;
|
|
46737
46741
|
let newName = escapedName;
|
|
46738
46742
|
while (namesTaken.includes(newName)) {
|
|
@@ -51257,7 +51261,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
51257
51261
|
if (orderedSheetIds.find((id) => sheets[id]?.name.toLowerCase() === name && id !== cmd.sheetId)) {
|
|
51258
51262
|
return "DuplicatedSheetName" /* CommandResult.DuplicatedSheetName */;
|
|
51259
51263
|
}
|
|
51260
|
-
if (
|
|
51264
|
+
if (FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX.test(name)) {
|
|
51261
51265
|
return "ForbiddenCharactersInSheetName" /* CommandResult.ForbiddenCharactersInSheetName */;
|
|
51262
51266
|
}
|
|
51263
51267
|
return "Success" /* CommandResult.Success */;
|
|
@@ -56046,11 +56050,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56046
56050
|
return EMPTY_PIVOT_CELL;
|
|
56047
56051
|
}
|
|
56048
56052
|
if (functionName === "PIVOT") {
|
|
56049
|
-
const includeTotal = args[2]
|
|
56050
|
-
const
|
|
56053
|
+
const includeTotal = toScalar(args[2]);
|
|
56054
|
+
const shouldIncludeTotal = includeTotal === undefined ? true : toBoolean(includeTotal);
|
|
56055
|
+
const includeColumnHeaders = toScalar(args[3]);
|
|
56056
|
+
const shouldIncludeColumnHeaders = includeColumnHeaders === undefined ? true : toBoolean(includeColumnHeaders);
|
|
56051
56057
|
const pivotCells = pivot
|
|
56052
56058
|
.getTableStructure()
|
|
56053
|
-
.getPivotCells(
|
|
56059
|
+
.getPivotCells(shouldIncludeTotal, shouldIncludeColumnHeaders);
|
|
56054
56060
|
const pivotCol = position.col - mainPosition.col;
|
|
56055
56061
|
const pivotRow = position.row - mainPosition.row;
|
|
56056
56062
|
return pivotCells[pivotCol][pivotRow];
|
|
@@ -58155,7 +58161,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
58155
58161
|
getPivotDuplicateSheetName(pivotName) {
|
|
58156
58162
|
let i = 1;
|
|
58157
58163
|
const names = this.getters.getSheetIds().map((id) => this.getters.getSheetName(id));
|
|
58158
|
-
const sanitizedName = pivotName
|
|
58164
|
+
const sanitizedName = sanitizeSheetName(pivotName);
|
|
58159
58165
|
let name = sanitizedName;
|
|
58160
58166
|
while (names.includes(name)) {
|
|
58161
58167
|
name = `${sanitizedName} (${i})`;
|
|
@@ -62196,7 +62202,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
62196
62202
|
env.raiseError(_t("A sheet with the name %s already exists. Please select another name.", name), errorCallback);
|
|
62197
62203
|
}
|
|
62198
62204
|
else if (result.reasons.includes("ForbiddenCharactersInSheetName" /* CommandResult.ForbiddenCharactersInSheetName */)) {
|
|
62199
|
-
env.raiseError(_t("Some used characters are not allowed in a sheet name (Forbidden characters are %s).",
|
|
62205
|
+
env.raiseError(_t("Some used characters are not allowed in a sheet name (Forbidden characters are %s).", FORBIDDEN_SHEETNAME_CHARS.join(" ")), errorCallback);
|
|
62200
62206
|
}
|
|
62201
62207
|
}
|
|
62202
62208
|
|
|
@@ -63455,7 +63461,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
63455
63461
|
setup() {
|
|
63456
63462
|
owl.onWillUpdateProps((nextProps) => {
|
|
63457
63463
|
if (nextProps.action !== this.props.action) {
|
|
63458
|
-
this.actionButton = createAction(
|
|
63464
|
+
this.actionButton = createAction(nextProps.action);
|
|
63459
63465
|
}
|
|
63460
63466
|
});
|
|
63461
63467
|
}
|
|
@@ -68588,6 +68594,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68588
68594
|
createPivotFormula,
|
|
68589
68595
|
areDomainArgsFieldsValid,
|
|
68590
68596
|
formatTickValue,
|
|
68597
|
+
sanitizeSheetName,
|
|
68591
68598
|
};
|
|
68592
68599
|
const links = {
|
|
68593
68600
|
isMarkdownLink,
|
|
@@ -68718,9 +68725,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68718
68725
|
exports.tokenize = tokenize;
|
|
68719
68726
|
|
|
68720
68727
|
|
|
68721
|
-
__info__.version = "17.4.
|
|
68722
|
-
__info__.date = "2024-
|
|
68723
|
-
__info__.hash = "
|
|
68728
|
+
__info__.version = "17.4.15";
|
|
68729
|
+
__info__.date = "2024-12-05T10:40:45.905Z";
|
|
68730
|
+
__info__.hash = "9b13f22";
|
|
68724
68731
|
|
|
68725
68732
|
|
|
68726
68733
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|