@odoo/o-spreadsheet 17.0.83 → 17.0.84
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 +21 -11
- package/dist/o-spreadsheet.d.ts +1 -1
- package/dist/o-spreadsheet.esm.js +21 -11
- package/dist/o-spreadsheet.iife.js +21 -11
- package/dist/o-spreadsheet.iife.min.js +274 -274
- 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.0.
|
|
6
|
-
* @date 2026-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.84
|
|
6
|
+
* @date 2026-01-14T09:59:26.542Z
|
|
7
|
+
* @hash ae64224
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -274,6 +274,7 @@ const DEFAULT_STYLE = {
|
|
|
274
274
|
fillColor: "",
|
|
275
275
|
textColor: "",
|
|
276
276
|
};
|
|
277
|
+
const DEFAULT_NUMBER_STYLE = { ...DEFAULT_STYLE, align: "right" };
|
|
277
278
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
278
279
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
279
280
|
// Fonts
|
|
@@ -32644,6 +32645,7 @@ function extractStyle(cell, data) {
|
|
|
32644
32645
|
? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign]
|
|
32645
32646
|
: undefined,
|
|
32646
32647
|
wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : undefined,
|
|
32648
|
+
shrinkToFit: style.wrapping === "clip" ? true : undefined,
|
|
32647
32649
|
},
|
|
32648
32650
|
};
|
|
32649
32651
|
styles.font["strike"] = !!style?.strikethrough || undefined;
|
|
@@ -32670,6 +32672,7 @@ function normalizeStyle(construct, styles) {
|
|
|
32670
32672
|
vertical: styles.alignment.vertical,
|
|
32671
32673
|
horizontal: styles.alignment.horizontal,
|
|
32672
32674
|
wrapText: styles.alignment.wrapText,
|
|
32675
|
+
shrinkToFit: styles.alignment.shrinkToFit,
|
|
32673
32676
|
},
|
|
32674
32677
|
};
|
|
32675
32678
|
return pushElement(style, construct.styles);
|
|
@@ -36413,7 +36416,7 @@ class CellPlugin extends CorePlugin {
|
|
|
36413
36416
|
for (const position of positions) {
|
|
36414
36417
|
const cell = this.getters.getCell(position);
|
|
36415
36418
|
const xc = toXC(position.col, position.row);
|
|
36416
|
-
const style = this.
|
|
36419
|
+
const style = this.extractCustomStyle(cell);
|
|
36417
36420
|
cells[xc] = {
|
|
36418
36421
|
style: Object.keys(style).length ? getItemId(style, styles) : undefined,
|
|
36419
36422
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
@@ -36434,10 +36437,14 @@ class CellPlugin extends CorePlugin {
|
|
|
36434
36437
|
exportForExcel(data) {
|
|
36435
36438
|
this.export(data);
|
|
36436
36439
|
}
|
|
36437
|
-
|
|
36438
|
-
const cleanedStyle = { ...style };
|
|
36439
|
-
|
|
36440
|
-
|
|
36440
|
+
extractCustomStyle(cell) {
|
|
36441
|
+
const cleanedStyle = { ...cell.style };
|
|
36442
|
+
const defaultStyle = isNumber(cell.content, DEFAULT_LOCALE)
|
|
36443
|
+
? DEFAULT_NUMBER_STYLE
|
|
36444
|
+
: DEFAULT_STYLE;
|
|
36445
|
+
for (const property in cleanedStyle) {
|
|
36446
|
+
if ((property !== "align" || !cell.isFormula) &&
|
|
36447
|
+
cleanedStyle[property] === defaultStyle[property]) {
|
|
36441
36448
|
delete cleanedStyle[property];
|
|
36442
36449
|
}
|
|
36443
36450
|
}
|
|
@@ -57303,6 +57310,9 @@ function addStyles(styles) {
|
|
|
57303
57310
|
if (style.alignment && style.alignment.wrapText) {
|
|
57304
57311
|
alignAttrs.push(["wrapText", "1"]);
|
|
57305
57312
|
}
|
|
57313
|
+
if (style.alignment && style.alignment.shrinkToFit) {
|
|
57314
|
+
alignAttrs.push(["shrinkToFit", "1"]);
|
|
57315
|
+
}
|
|
57306
57316
|
if (alignAttrs.length > 0) {
|
|
57307
57317
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
57308
57318
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
@@ -58539,6 +58549,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58539
58549
|
exports.tokenize = tokenize;
|
|
58540
58550
|
|
|
58541
58551
|
|
|
58542
|
-
__info__.version = "17.0.
|
|
58543
|
-
__info__.date = "2026-01-
|
|
58544
|
-
__info__.hash = "
|
|
58552
|
+
__info__.version = "17.0.84";
|
|
58553
|
+
__info__.date = "2026-01-14T09:59:26.542Z";
|
|
58554
|
+
__info__.hash = "ae64224";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -3470,7 +3470,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
|
3470
3470
|
[key: number]: Format;
|
|
3471
3471
|
}): Cell;
|
|
3472
3472
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3473
|
-
private
|
|
3473
|
+
private extractCustomStyle;
|
|
3474
3474
|
getCells(sheetId: UID): Record<UID, Cell>;
|
|
3475
3475
|
/**
|
|
3476
3476
|
* get a cell by ID. Used in evaluation when evaluating an async cell, we need to be able to find it back after
|
|
@@ -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.0.
|
|
6
|
-
* @date 2026-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.84
|
|
6
|
+
* @date 2026-01-14T09:59:26.542Z
|
|
7
|
+
* @hash ae64224
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -272,6 +272,7 @@ const DEFAULT_STYLE = {
|
|
|
272
272
|
fillColor: "",
|
|
273
273
|
textColor: "",
|
|
274
274
|
};
|
|
275
|
+
const DEFAULT_NUMBER_STYLE = { ...DEFAULT_STYLE, align: "right" };
|
|
275
276
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
276
277
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
277
278
|
// Fonts
|
|
@@ -32642,6 +32643,7 @@ function extractStyle(cell, data) {
|
|
|
32642
32643
|
? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign]
|
|
32643
32644
|
: undefined,
|
|
32644
32645
|
wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : undefined,
|
|
32646
|
+
shrinkToFit: style.wrapping === "clip" ? true : undefined,
|
|
32645
32647
|
},
|
|
32646
32648
|
};
|
|
32647
32649
|
styles.font["strike"] = !!style?.strikethrough || undefined;
|
|
@@ -32668,6 +32670,7 @@ function normalizeStyle(construct, styles) {
|
|
|
32668
32670
|
vertical: styles.alignment.vertical,
|
|
32669
32671
|
horizontal: styles.alignment.horizontal,
|
|
32670
32672
|
wrapText: styles.alignment.wrapText,
|
|
32673
|
+
shrinkToFit: styles.alignment.shrinkToFit,
|
|
32671
32674
|
},
|
|
32672
32675
|
};
|
|
32673
32676
|
return pushElement(style, construct.styles);
|
|
@@ -36411,7 +36414,7 @@ class CellPlugin extends CorePlugin {
|
|
|
36411
36414
|
for (const position of positions) {
|
|
36412
36415
|
const cell = this.getters.getCell(position);
|
|
36413
36416
|
const xc = toXC(position.col, position.row);
|
|
36414
|
-
const style = this.
|
|
36417
|
+
const style = this.extractCustomStyle(cell);
|
|
36415
36418
|
cells[xc] = {
|
|
36416
36419
|
style: Object.keys(style).length ? getItemId(style, styles) : undefined,
|
|
36417
36420
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
@@ -36432,10 +36435,14 @@ class CellPlugin extends CorePlugin {
|
|
|
36432
36435
|
exportForExcel(data) {
|
|
36433
36436
|
this.export(data);
|
|
36434
36437
|
}
|
|
36435
|
-
|
|
36436
|
-
const cleanedStyle = { ...style };
|
|
36437
|
-
|
|
36438
|
-
|
|
36438
|
+
extractCustomStyle(cell) {
|
|
36439
|
+
const cleanedStyle = { ...cell.style };
|
|
36440
|
+
const defaultStyle = isNumber(cell.content, DEFAULT_LOCALE)
|
|
36441
|
+
? DEFAULT_NUMBER_STYLE
|
|
36442
|
+
: DEFAULT_STYLE;
|
|
36443
|
+
for (const property in cleanedStyle) {
|
|
36444
|
+
if ((property !== "align" || !cell.isFormula) &&
|
|
36445
|
+
cleanedStyle[property] === defaultStyle[property]) {
|
|
36439
36446
|
delete cleanedStyle[property];
|
|
36440
36447
|
}
|
|
36441
36448
|
}
|
|
@@ -57301,6 +57308,9 @@ function addStyles(styles) {
|
|
|
57301
57308
|
if (style.alignment && style.alignment.wrapText) {
|
|
57302
57309
|
alignAttrs.push(["wrapText", "1"]);
|
|
57303
57310
|
}
|
|
57311
|
+
if (style.alignment && style.alignment.shrinkToFit) {
|
|
57312
|
+
alignAttrs.push(["shrinkToFit", "1"]);
|
|
57313
|
+
}
|
|
57304
57314
|
if (alignAttrs.length > 0) {
|
|
57305
57315
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
57306
57316
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
@@ -58502,6 +58512,6 @@ const constants = {
|
|
|
58502
58512
|
export { AbstractChart, 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 };
|
|
58503
58513
|
|
|
58504
58514
|
|
|
58505
|
-
__info__.version = "17.0.
|
|
58506
|
-
__info__.date = "2026-01-
|
|
58507
|
-
__info__.hash = "
|
|
58515
|
+
__info__.version = "17.0.84";
|
|
58516
|
+
__info__.date = "2026-01-14T09:59:26.542Z";
|
|
58517
|
+
__info__.hash = "ae64224";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2026-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.84
|
|
6
|
+
* @date 2026-01-14T09:59:26.542Z
|
|
7
|
+
* @hash ae64224
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -273,6 +273,7 @@
|
|
|
273
273
|
fillColor: "",
|
|
274
274
|
textColor: "",
|
|
275
275
|
};
|
|
276
|
+
const DEFAULT_NUMBER_STYLE = { ...DEFAULT_STYLE, align: "right" };
|
|
276
277
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
277
278
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
278
279
|
// Fonts
|
|
@@ -32643,6 +32644,7 @@
|
|
|
32643
32644
|
? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign]
|
|
32644
32645
|
: undefined,
|
|
32645
32646
|
wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : undefined,
|
|
32647
|
+
shrinkToFit: style.wrapping === "clip" ? true : undefined,
|
|
32646
32648
|
},
|
|
32647
32649
|
};
|
|
32648
32650
|
styles.font["strike"] = !!style?.strikethrough || undefined;
|
|
@@ -32669,6 +32671,7 @@
|
|
|
32669
32671
|
vertical: styles.alignment.vertical,
|
|
32670
32672
|
horizontal: styles.alignment.horizontal,
|
|
32671
32673
|
wrapText: styles.alignment.wrapText,
|
|
32674
|
+
shrinkToFit: styles.alignment.shrinkToFit,
|
|
32672
32675
|
},
|
|
32673
32676
|
};
|
|
32674
32677
|
return pushElement(style, construct.styles);
|
|
@@ -36412,7 +36415,7 @@
|
|
|
36412
36415
|
for (const position of positions) {
|
|
36413
36416
|
const cell = this.getters.getCell(position);
|
|
36414
36417
|
const xc = toXC(position.col, position.row);
|
|
36415
|
-
const style = this.
|
|
36418
|
+
const style = this.extractCustomStyle(cell);
|
|
36416
36419
|
cells[xc] = {
|
|
36417
36420
|
style: Object.keys(style).length ? getItemId(style, styles) : undefined,
|
|
36418
36421
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
@@ -36433,10 +36436,14 @@
|
|
|
36433
36436
|
exportForExcel(data) {
|
|
36434
36437
|
this.export(data);
|
|
36435
36438
|
}
|
|
36436
|
-
|
|
36437
|
-
const cleanedStyle = { ...style };
|
|
36438
|
-
|
|
36439
|
-
|
|
36439
|
+
extractCustomStyle(cell) {
|
|
36440
|
+
const cleanedStyle = { ...cell.style };
|
|
36441
|
+
const defaultStyle = isNumber(cell.content, DEFAULT_LOCALE)
|
|
36442
|
+
? DEFAULT_NUMBER_STYLE
|
|
36443
|
+
: DEFAULT_STYLE;
|
|
36444
|
+
for (const property in cleanedStyle) {
|
|
36445
|
+
if ((property !== "align" || !cell.isFormula) &&
|
|
36446
|
+
cleanedStyle[property] === defaultStyle[property]) {
|
|
36440
36447
|
delete cleanedStyle[property];
|
|
36441
36448
|
}
|
|
36442
36449
|
}
|
|
@@ -57302,6 +57309,9 @@
|
|
|
57302
57309
|
if (style.alignment && style.alignment.wrapText) {
|
|
57303
57310
|
alignAttrs.push(["wrapText", "1"]);
|
|
57304
57311
|
}
|
|
57312
|
+
if (style.alignment && style.alignment.shrinkToFit) {
|
|
57313
|
+
alignAttrs.push(["shrinkToFit", "1"]);
|
|
57314
|
+
}
|
|
57305
57315
|
if (alignAttrs.length > 0) {
|
|
57306
57316
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
57307
57317
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
@@ -58538,9 +58548,9 @@
|
|
|
58538
58548
|
exports.tokenize = tokenize;
|
|
58539
58549
|
|
|
58540
58550
|
|
|
58541
|
-
__info__.version = "17.0.
|
|
58542
|
-
__info__.date = "2026-01-
|
|
58543
|
-
__info__.hash = "
|
|
58551
|
+
__info__.version = "17.0.84";
|
|
58552
|
+
__info__.date = "2026-01-14T09:59:26.542Z";
|
|
58553
|
+
__info__.hash = "ae64224";
|
|
58544
58554
|
|
|
58545
58555
|
|
|
58546
58556
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|