@odoo/o-spreadsheet 17.0.82 → 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 +23 -30
- package/dist/o-spreadsheet.d.ts +1 -4
- package/dist/o-spreadsheet.esm.js +23 -30
- package/dist/o-spreadsheet.iife.js +23 -30
- 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
|
|
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
|
|
@@ -29915,7 +29916,6 @@ class Grid extends owl.Component {
|
|
|
29915
29916
|
owl.useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
|
|
29916
29917
|
owl.useExternalListener(document.body, "cut", this.copy.bind(this, true));
|
|
29917
29918
|
owl.useExternalListener(document.body, "copy", this.copy.bind(this, false));
|
|
29918
|
-
owl.useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
29919
29919
|
owl.useExternalListener(document.body, "paste", this.paste);
|
|
29920
29920
|
owl.onMounted(() => this.focusDefaultElement());
|
|
29921
29921
|
this.props.exposeFocus(() => this.focusDefaultElement());
|
|
@@ -30482,12 +30482,6 @@ class Grid extends owl.Component {
|
|
|
30482
30482
|
}
|
|
30483
30483
|
}
|
|
30484
30484
|
}
|
|
30485
|
-
onExternalClick(ev) {
|
|
30486
|
-
if (isChildEvent(this.gridEl, ev) || ev.target?.closest(".o-popover")) {
|
|
30487
|
-
return;
|
|
30488
|
-
}
|
|
30489
|
-
this.onClosePopover();
|
|
30490
|
-
}
|
|
30491
30485
|
}
|
|
30492
30486
|
Grid.props = {
|
|
30493
30487
|
sidePanelIsOpen: Boolean,
|
|
@@ -32651,6 +32645,7 @@ function extractStyle(cell, data) {
|
|
|
32651
32645
|
? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign]
|
|
32652
32646
|
: undefined,
|
|
32653
32647
|
wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : undefined,
|
|
32648
|
+
shrinkToFit: style.wrapping === "clip" ? true : undefined,
|
|
32654
32649
|
},
|
|
32655
32650
|
};
|
|
32656
32651
|
styles.font["strike"] = !!style?.strikethrough || undefined;
|
|
@@ -32677,6 +32672,7 @@ function normalizeStyle(construct, styles) {
|
|
|
32677
32672
|
vertical: styles.alignment.vertical,
|
|
32678
32673
|
horizontal: styles.alignment.horizontal,
|
|
32679
32674
|
wrapText: styles.alignment.wrapText,
|
|
32675
|
+
shrinkToFit: styles.alignment.shrinkToFit,
|
|
32680
32676
|
},
|
|
32681
32677
|
};
|
|
32682
32678
|
return pushElement(style, construct.styles);
|
|
@@ -36420,7 +36416,7 @@ class CellPlugin extends CorePlugin {
|
|
|
36420
36416
|
for (const position of positions) {
|
|
36421
36417
|
const cell = this.getters.getCell(position);
|
|
36422
36418
|
const xc = toXC(position.col, position.row);
|
|
36423
|
-
const style = this.
|
|
36419
|
+
const style = this.extractCustomStyle(cell);
|
|
36424
36420
|
cells[xc] = {
|
|
36425
36421
|
style: Object.keys(style).length ? getItemId(style, styles) : undefined,
|
|
36426
36422
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
@@ -36441,10 +36437,14 @@ class CellPlugin extends CorePlugin {
|
|
|
36441
36437
|
exportForExcel(data) {
|
|
36442
36438
|
this.export(data);
|
|
36443
36439
|
}
|
|
36444
|
-
|
|
36445
|
-
const cleanedStyle = { ...style };
|
|
36446
|
-
|
|
36447
|
-
|
|
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]) {
|
|
36448
36448
|
delete cleanedStyle[property];
|
|
36449
36449
|
}
|
|
36450
36450
|
}
|
|
@@ -53078,13 +53078,12 @@ class SpreadsheetDashboard extends owl.Component {
|
|
|
53078
53078
|
onMouseWheel;
|
|
53079
53079
|
canvasPosition;
|
|
53080
53080
|
hoveredCell;
|
|
53081
|
-
gridRef = owl.useRef("grid");
|
|
53082
53081
|
setup() {
|
|
53083
|
-
|
|
53082
|
+
const gridRef = owl.useRef("grid");
|
|
53083
|
+
this.canvasPosition = useAbsoluteBoundingRect(gridRef);
|
|
53084
53084
|
this.hoveredCell = owl.useState({ col: undefined, row: undefined });
|
|
53085
53085
|
owl.useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
|
|
53086
53086
|
useGridDrawing("canvas", this.env.model, () => this.env.model.getters.getSheetViewDimension());
|
|
53087
|
-
owl.useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
53088
53087
|
this.onMouseWheel = useWheelHandler((deltaX, deltaY) => {
|
|
53089
53088
|
this.moveCanvas(deltaX, deltaY);
|
|
53090
53089
|
this.hoveredCell.col = undefined;
|
|
@@ -53181,15 +53180,6 @@ class SpreadsheetDashboard extends owl.Component {
|
|
|
53181
53180
|
getGridRect() {
|
|
53182
53181
|
return { ...this.canvasPosition, ...this.env.model.getters.getSheetViewDimensionWithHeaders() };
|
|
53183
53182
|
}
|
|
53184
|
-
onExternalClick(ev) {
|
|
53185
|
-
const el = this.gridRef.el;
|
|
53186
|
-
if ((el && isChildEvent(el, ev)) || ev.target?.closest(".o-popover")) {
|
|
53187
|
-
return;
|
|
53188
|
-
}
|
|
53189
|
-
if (this.env.model.getters.hasOpenedPopover()) {
|
|
53190
|
-
this.onClosePopover();
|
|
53191
|
-
}
|
|
53192
|
-
}
|
|
53193
53183
|
}
|
|
53194
53184
|
SpreadsheetDashboard.props = {};
|
|
53195
53185
|
|
|
@@ -57320,6 +57310,9 @@ function addStyles(styles) {
|
|
|
57320
57310
|
if (style.alignment && style.alignment.wrapText) {
|
|
57321
57311
|
alignAttrs.push(["wrapText", "1"]);
|
|
57322
57312
|
}
|
|
57313
|
+
if (style.alignment && style.alignment.shrinkToFit) {
|
|
57314
|
+
alignAttrs.push(["shrinkToFit", "1"]);
|
|
57315
|
+
}
|
|
57323
57316
|
if (alignAttrs.length > 0) {
|
|
57324
57317
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
57325
57318
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
@@ -58556,6 +58549,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58556
58549
|
exports.tokenize = tokenize;
|
|
58557
58550
|
|
|
58558
58551
|
|
|
58559
|
-
__info__.version = "17.0.
|
|
58560
|
-
__info__.date = "
|
|
58561
|
-
__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
|
|
@@ -6695,7 +6695,6 @@ declare class SpreadsheetDashboard extends Component<Props$h, SpreadsheetChildEn
|
|
|
6695
6695
|
onMouseWheel: (ev: WheelEvent) => void;
|
|
6696
6696
|
canvasPosition: DOMCoordinates;
|
|
6697
6697
|
hoveredCell: Partial<Position$1>;
|
|
6698
|
-
private gridRef;
|
|
6699
6698
|
setup(): void;
|
|
6700
6699
|
onCellHovered({ col, row }: {
|
|
6701
6700
|
col: any;
|
|
@@ -6717,7 +6716,6 @@ declare class SpreadsheetDashboard extends Component<Props$h, SpreadsheetChildEn
|
|
|
6717
6716
|
onGridResized({ height, width }: DOMDimension): void;
|
|
6718
6717
|
private moveCanvas;
|
|
6719
6718
|
private getGridRect;
|
|
6720
|
-
private onExternalClick;
|
|
6721
6719
|
}
|
|
6722
6720
|
|
|
6723
6721
|
interface Props$g {
|
|
@@ -7802,7 +7800,6 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7802
7800
|
private processHeaderGroupingEventOnHeaders;
|
|
7803
7801
|
private processHeaderGroupingEventOnWholeSheet;
|
|
7804
7802
|
private processHeaderGroupingEventOnGrid;
|
|
7805
|
-
private onExternalClick;
|
|
7806
7803
|
}
|
|
7807
7804
|
|
|
7808
7805
|
type Direction = "horizontal" | "vertical";
|
|
@@ -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
|
|
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
|
|
@@ -29913,7 +29914,6 @@ class Grid extends Component {
|
|
|
29913
29914
|
useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
|
|
29914
29915
|
useExternalListener(document.body, "cut", this.copy.bind(this, true));
|
|
29915
29916
|
useExternalListener(document.body, "copy", this.copy.bind(this, false));
|
|
29916
|
-
useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
29917
29917
|
useExternalListener(document.body, "paste", this.paste);
|
|
29918
29918
|
onMounted(() => this.focusDefaultElement());
|
|
29919
29919
|
this.props.exposeFocus(() => this.focusDefaultElement());
|
|
@@ -30480,12 +30480,6 @@ class Grid extends Component {
|
|
|
30480
30480
|
}
|
|
30481
30481
|
}
|
|
30482
30482
|
}
|
|
30483
|
-
onExternalClick(ev) {
|
|
30484
|
-
if (isChildEvent(this.gridEl, ev) || ev.target?.closest(".o-popover")) {
|
|
30485
|
-
return;
|
|
30486
|
-
}
|
|
30487
|
-
this.onClosePopover();
|
|
30488
|
-
}
|
|
30489
30483
|
}
|
|
30490
30484
|
Grid.props = {
|
|
30491
30485
|
sidePanelIsOpen: Boolean,
|
|
@@ -32649,6 +32643,7 @@ function extractStyle(cell, data) {
|
|
|
32649
32643
|
? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign]
|
|
32650
32644
|
: undefined,
|
|
32651
32645
|
wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : undefined,
|
|
32646
|
+
shrinkToFit: style.wrapping === "clip" ? true : undefined,
|
|
32652
32647
|
},
|
|
32653
32648
|
};
|
|
32654
32649
|
styles.font["strike"] = !!style?.strikethrough || undefined;
|
|
@@ -32675,6 +32670,7 @@ function normalizeStyle(construct, styles) {
|
|
|
32675
32670
|
vertical: styles.alignment.vertical,
|
|
32676
32671
|
horizontal: styles.alignment.horizontal,
|
|
32677
32672
|
wrapText: styles.alignment.wrapText,
|
|
32673
|
+
shrinkToFit: styles.alignment.shrinkToFit,
|
|
32678
32674
|
},
|
|
32679
32675
|
};
|
|
32680
32676
|
return pushElement(style, construct.styles);
|
|
@@ -36418,7 +36414,7 @@ class CellPlugin extends CorePlugin {
|
|
|
36418
36414
|
for (const position of positions) {
|
|
36419
36415
|
const cell = this.getters.getCell(position);
|
|
36420
36416
|
const xc = toXC(position.col, position.row);
|
|
36421
|
-
const style = this.
|
|
36417
|
+
const style = this.extractCustomStyle(cell);
|
|
36422
36418
|
cells[xc] = {
|
|
36423
36419
|
style: Object.keys(style).length ? getItemId(style, styles) : undefined,
|
|
36424
36420
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
@@ -36439,10 +36435,14 @@ class CellPlugin extends CorePlugin {
|
|
|
36439
36435
|
exportForExcel(data) {
|
|
36440
36436
|
this.export(data);
|
|
36441
36437
|
}
|
|
36442
|
-
|
|
36443
|
-
const cleanedStyle = { ...style };
|
|
36444
|
-
|
|
36445
|
-
|
|
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]) {
|
|
36446
36446
|
delete cleanedStyle[property];
|
|
36447
36447
|
}
|
|
36448
36448
|
}
|
|
@@ -53076,13 +53076,12 @@ class SpreadsheetDashboard extends Component {
|
|
|
53076
53076
|
onMouseWheel;
|
|
53077
53077
|
canvasPosition;
|
|
53078
53078
|
hoveredCell;
|
|
53079
|
-
gridRef = useRef("grid");
|
|
53080
53079
|
setup() {
|
|
53081
|
-
|
|
53080
|
+
const gridRef = useRef("grid");
|
|
53081
|
+
this.canvasPosition = useAbsoluteBoundingRect(gridRef);
|
|
53082
53082
|
this.hoveredCell = useState({ col: undefined, row: undefined });
|
|
53083
53083
|
useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
|
|
53084
53084
|
useGridDrawing("canvas", this.env.model, () => this.env.model.getters.getSheetViewDimension());
|
|
53085
|
-
useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
53086
53085
|
this.onMouseWheel = useWheelHandler((deltaX, deltaY) => {
|
|
53087
53086
|
this.moveCanvas(deltaX, deltaY);
|
|
53088
53087
|
this.hoveredCell.col = undefined;
|
|
@@ -53179,15 +53178,6 @@ class SpreadsheetDashboard extends Component {
|
|
|
53179
53178
|
getGridRect() {
|
|
53180
53179
|
return { ...this.canvasPosition, ...this.env.model.getters.getSheetViewDimensionWithHeaders() };
|
|
53181
53180
|
}
|
|
53182
|
-
onExternalClick(ev) {
|
|
53183
|
-
const el = this.gridRef.el;
|
|
53184
|
-
if ((el && isChildEvent(el, ev)) || ev.target?.closest(".o-popover")) {
|
|
53185
|
-
return;
|
|
53186
|
-
}
|
|
53187
|
-
if (this.env.model.getters.hasOpenedPopover()) {
|
|
53188
|
-
this.onClosePopover();
|
|
53189
|
-
}
|
|
53190
|
-
}
|
|
53191
53181
|
}
|
|
53192
53182
|
SpreadsheetDashboard.props = {};
|
|
53193
53183
|
|
|
@@ -57318,6 +57308,9 @@ function addStyles(styles) {
|
|
|
57318
57308
|
if (style.alignment && style.alignment.wrapText) {
|
|
57319
57309
|
alignAttrs.push(["wrapText", "1"]);
|
|
57320
57310
|
}
|
|
57311
|
+
if (style.alignment && style.alignment.shrinkToFit) {
|
|
57312
|
+
alignAttrs.push(["shrinkToFit", "1"]);
|
|
57313
|
+
}
|
|
57321
57314
|
if (alignAttrs.length > 0) {
|
|
57322
57315
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
57323
57316
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
@@ -58519,6 +58512,6 @@ const constants = {
|
|
|
58519
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 };
|
|
58520
58513
|
|
|
58521
58514
|
|
|
58522
|
-
__info__.version = "17.0.
|
|
58523
|
-
__info__.date = "
|
|
58524
|
-
__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
|
|
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
|
|
@@ -29914,7 +29915,6 @@
|
|
|
29914
29915
|
owl.useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
|
|
29915
29916
|
owl.useExternalListener(document.body, "cut", this.copy.bind(this, true));
|
|
29916
29917
|
owl.useExternalListener(document.body, "copy", this.copy.bind(this, false));
|
|
29917
|
-
owl.useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
29918
29918
|
owl.useExternalListener(document.body, "paste", this.paste);
|
|
29919
29919
|
owl.onMounted(() => this.focusDefaultElement());
|
|
29920
29920
|
this.props.exposeFocus(() => this.focusDefaultElement());
|
|
@@ -30481,12 +30481,6 @@
|
|
|
30481
30481
|
}
|
|
30482
30482
|
}
|
|
30483
30483
|
}
|
|
30484
|
-
onExternalClick(ev) {
|
|
30485
|
-
if (isChildEvent(this.gridEl, ev) || ev.target?.closest(".o-popover")) {
|
|
30486
|
-
return;
|
|
30487
|
-
}
|
|
30488
|
-
this.onClosePopover();
|
|
30489
|
-
}
|
|
30490
30484
|
}
|
|
30491
30485
|
Grid.props = {
|
|
30492
30486
|
sidePanelIsOpen: Boolean,
|
|
@@ -32650,6 +32644,7 @@
|
|
|
32650
32644
|
? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign]
|
|
32651
32645
|
: undefined,
|
|
32652
32646
|
wrapText: style.wrapping === "wrap" || cell.content?.includes(NEWLINE) ? true : undefined,
|
|
32647
|
+
shrinkToFit: style.wrapping === "clip" ? true : undefined,
|
|
32653
32648
|
},
|
|
32654
32649
|
};
|
|
32655
32650
|
styles.font["strike"] = !!style?.strikethrough || undefined;
|
|
@@ -32676,6 +32671,7 @@
|
|
|
32676
32671
|
vertical: styles.alignment.vertical,
|
|
32677
32672
|
horizontal: styles.alignment.horizontal,
|
|
32678
32673
|
wrapText: styles.alignment.wrapText,
|
|
32674
|
+
shrinkToFit: styles.alignment.shrinkToFit,
|
|
32679
32675
|
},
|
|
32680
32676
|
};
|
|
32681
32677
|
return pushElement(style, construct.styles);
|
|
@@ -36419,7 +36415,7 @@
|
|
|
36419
36415
|
for (const position of positions) {
|
|
36420
36416
|
const cell = this.getters.getCell(position);
|
|
36421
36417
|
const xc = toXC(position.col, position.row);
|
|
36422
|
-
const style = this.
|
|
36418
|
+
const style = this.extractCustomStyle(cell);
|
|
36423
36419
|
cells[xc] = {
|
|
36424
36420
|
style: Object.keys(style).length ? getItemId(style, styles) : undefined,
|
|
36425
36421
|
format: cell.format ? getItemId(cell.format, formats) : undefined,
|
|
@@ -36440,10 +36436,14 @@
|
|
|
36440
36436
|
exportForExcel(data) {
|
|
36441
36437
|
this.export(data);
|
|
36442
36438
|
}
|
|
36443
|
-
|
|
36444
|
-
const cleanedStyle = { ...style };
|
|
36445
|
-
|
|
36446
|
-
|
|
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]) {
|
|
36447
36447
|
delete cleanedStyle[property];
|
|
36448
36448
|
}
|
|
36449
36449
|
}
|
|
@@ -53077,13 +53077,12 @@
|
|
|
53077
53077
|
onMouseWheel;
|
|
53078
53078
|
canvasPosition;
|
|
53079
53079
|
hoveredCell;
|
|
53080
|
-
gridRef = owl.useRef("grid");
|
|
53081
53080
|
setup() {
|
|
53082
|
-
|
|
53081
|
+
const gridRef = owl.useRef("grid");
|
|
53082
|
+
this.canvasPosition = useAbsoluteBoundingRect(gridRef);
|
|
53083
53083
|
this.hoveredCell = owl.useState({ col: undefined, row: undefined });
|
|
53084
53084
|
owl.useChildSubEnv({ getPopoverContainerRect: () => this.getGridRect() });
|
|
53085
53085
|
useGridDrawing("canvas", this.env.model, () => this.env.model.getters.getSheetViewDimension());
|
|
53086
|
-
owl.useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
53087
53086
|
this.onMouseWheel = useWheelHandler((deltaX, deltaY) => {
|
|
53088
53087
|
this.moveCanvas(deltaX, deltaY);
|
|
53089
53088
|
this.hoveredCell.col = undefined;
|
|
@@ -53180,15 +53179,6 @@
|
|
|
53180
53179
|
getGridRect() {
|
|
53181
53180
|
return { ...this.canvasPosition, ...this.env.model.getters.getSheetViewDimensionWithHeaders() };
|
|
53182
53181
|
}
|
|
53183
|
-
onExternalClick(ev) {
|
|
53184
|
-
const el = this.gridRef.el;
|
|
53185
|
-
if ((el && isChildEvent(el, ev)) || ev.target?.closest(".o-popover")) {
|
|
53186
|
-
return;
|
|
53187
|
-
}
|
|
53188
|
-
if (this.env.model.getters.hasOpenedPopover()) {
|
|
53189
|
-
this.onClosePopover();
|
|
53190
|
-
}
|
|
53191
|
-
}
|
|
53192
53182
|
}
|
|
53193
53183
|
SpreadsheetDashboard.props = {};
|
|
53194
53184
|
|
|
@@ -57319,6 +57309,9 @@
|
|
|
57319
57309
|
if (style.alignment && style.alignment.wrapText) {
|
|
57320
57310
|
alignAttrs.push(["wrapText", "1"]);
|
|
57321
57311
|
}
|
|
57312
|
+
if (style.alignment && style.alignment.shrinkToFit) {
|
|
57313
|
+
alignAttrs.push(["shrinkToFit", "1"]);
|
|
57314
|
+
}
|
|
57322
57315
|
if (alignAttrs.length > 0) {
|
|
57323
57316
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
57324
57317
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
@@ -58555,9 +58548,9 @@
|
|
|
58555
58548
|
exports.tokenize = tokenize;
|
|
58556
58549
|
|
|
58557
58550
|
|
|
58558
|
-
__info__.version = "17.0.
|
|
58559
|
-
__info__.date = "
|
|
58560
|
-
__info__.hash = "
|
|
58551
|
+
__info__.version = "17.0.84";
|
|
58552
|
+
__info__.date = "2026-01-14T09:59:26.542Z";
|
|
58553
|
+
__info__.hash = "ae64224";
|
|
58561
58554
|
|
|
58562
58555
|
|
|
58563
58556
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|