@odoo/o-spreadsheet 19.2.21 → 19.2.23
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.css +3 -3
- package/dist/o_spreadsheet.esm.js +40 -19
- package/dist/o_spreadsheet.iife.js +40 -19
- package/dist/o_spreadsheet.iife.min.js +234 -234
- package/dist/o_spreadsheet.xml +6 -8
- package/package.json +1 -1
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.2.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.2.23
|
|
6
|
+
* @date 2026-07-30T06:54:22.421Z
|
|
7
|
+
* @hash 7914fd5
|
|
8
8
|
*/
|
|
9
9
|
:root {
|
|
10
10
|
--os-gray-100: light-dark(#f9fafb, #1b1d26);
|
|
@@ -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.2.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.2.23
|
|
6
|
+
* @date 2026-07-30T06:54:20.810Z
|
|
7
|
+
* @hash 7914fd5
|
|
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";
|
|
@@ -10552,6 +10552,19 @@ function isOtherMobileOS() {
|
|
|
10552
10552
|
function isMobileOS() {
|
|
10553
10553
|
return isAndroid() || isIOS() || isOtherMobileOS();
|
|
10554
10554
|
}
|
|
10555
|
+
const INTERACTIVE_ELEMENT_SELECTOR = "select, input, textarea, button, .o-select, .os-input, .o-input, .o-button, .o-button-icon, .o-button-link, .o-composer";
|
|
10556
|
+
/** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
|
|
10557
|
+
function hasInteractiveElementInEventTree(event) {
|
|
10558
|
+
const target = event.target;
|
|
10559
|
+
const root = event.currentTarget;
|
|
10560
|
+
if (!root || !target || !root.contains(target)) return false;
|
|
10561
|
+
let node = target;
|
|
10562
|
+
while (node && node !== root) {
|
|
10563
|
+
if (node.matches(INTERACTIVE_ELEMENT_SELECTOR)) return true;
|
|
10564
|
+
node = node.parentElement;
|
|
10565
|
+
}
|
|
10566
|
+
return root.matches(INTERACTIVE_ELEMENT_SELECTOR);
|
|
10567
|
+
}
|
|
10555
10568
|
|
|
10556
10569
|
//#endregion
|
|
10557
10570
|
//#region src/components/helpers/zoom.ts
|
|
@@ -44251,13 +44264,9 @@ var PivotLayoutConfigurator = class extends Component {
|
|
|
44251
44264
|
dimensionsRef = useRef("pivot-dimensions");
|
|
44252
44265
|
dragAndDrop = useDragAndDropListItems();
|
|
44253
44266
|
AGGREGATORS = AGGREGATORS;
|
|
44254
|
-
composerFocus;
|
|
44255
44267
|
isDateOrDatetimeField = isDateOrDatetimeField;
|
|
44256
|
-
setup() {
|
|
44257
|
-
this.composerFocus = useStore(ComposerFocusStore);
|
|
44258
|
-
}
|
|
44259
44268
|
startDragAndDrop(dimension, event) {
|
|
44260
|
-
if (event.button !== 0 || event
|
|
44269
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
44261
44270
|
const rects = this.getDimensionElementsRects();
|
|
44262
44271
|
const { columns, rows } = this.props.definition;
|
|
44263
44272
|
const draggableIds = [
|
|
@@ -44297,7 +44306,7 @@ var PivotLayoutConfigurator = class extends Component {
|
|
|
44297
44306
|
return field.type === "date" ? this.props.dateGranularities : this.props.datetimeGranularities;
|
|
44298
44307
|
}
|
|
44299
44308
|
startDragAndDropMeasures(measure, event) {
|
|
44300
|
-
if (event.button !== 0 || event
|
|
44309
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
44301
44310
|
const rects = this.getDimensionElementsRects();
|
|
44302
44311
|
const { measures, columns, rows } = this.props.definition;
|
|
44303
44312
|
const draggableIds = measures.map((m) => m.id);
|
|
@@ -50230,7 +50239,8 @@ var Autofill = class extends Component {
|
|
|
50230
50239
|
const { x, y } = this.state.handler ? this.state.position : this.props.position;
|
|
50231
50240
|
return cssPropertiesToCss({
|
|
50232
50241
|
top: `${y}px`,
|
|
50233
|
-
left: `${x}px
|
|
50242
|
+
left: `${x}px`,
|
|
50243
|
+
visibility: this.props.isVisible ? "visible" : "hidden"
|
|
50234
50244
|
});
|
|
50235
50245
|
}
|
|
50236
50246
|
get styleNextValue() {
|
|
@@ -50651,7 +50661,7 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
50651
50661
|
this._cancelEdition();
|
|
50652
50662
|
this.resetContent();
|
|
50653
50663
|
}
|
|
50654
|
-
if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
50664
|
+
if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
50655
50665
|
const activePosition = this.getters.getActivePosition();
|
|
50656
50666
|
const { col, row } = this.getters.getNextVisibleCellPosition({
|
|
50657
50667
|
sheetId: cmd.sheetIdTo,
|
|
@@ -65388,12 +65398,22 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
65388
65398
|
getCellTableStyle(position) {
|
|
65389
65399
|
const table = this.getters.getTable(position);
|
|
65390
65400
|
if (!table) return;
|
|
65391
|
-
|
|
65401
|
+
try {
|
|
65402
|
+
return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
|
|
65403
|
+
} catch (e) {
|
|
65404
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
65405
|
+
throw e;
|
|
65406
|
+
}
|
|
65392
65407
|
}
|
|
65393
65408
|
getCellTableBorder(position) {
|
|
65394
65409
|
const table = this.getters.getTable(position);
|
|
65395
65410
|
if (!table) return;
|
|
65396
|
-
|
|
65411
|
+
try {
|
|
65412
|
+
return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
|
|
65413
|
+
} catch (e) {
|
|
65414
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
65415
|
+
throw e;
|
|
65416
|
+
}
|
|
65397
65417
|
}
|
|
65398
65418
|
computeTableStyle(sheetId, table) {
|
|
65399
65419
|
return lazy(() => {
|
|
@@ -66879,8 +66899,8 @@ var HeaderVisibilityUIPlugin = class extends UIPlugin {
|
|
|
66879
66899
|
getNextVisibleCellPosition({ sheetId, col, row }) {
|
|
66880
66900
|
return {
|
|
66881
66901
|
sheetId,
|
|
66882
|
-
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
|
|
66883
|
-
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
|
|
66902
|
+
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
|
|
66903
|
+
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
|
|
66884
66904
|
};
|
|
66885
66905
|
}
|
|
66886
66906
|
/**
|
|
@@ -67819,7 +67839,7 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
67819
67839
|
if (contentWidth === 0) return 0;
|
|
67820
67840
|
contentWidth += 2 * 4;
|
|
67821
67841
|
if (style.wrapping === "wrap") {
|
|
67822
|
-
const colWidth = this.getters.getColSize(
|
|
67842
|
+
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
67823
67843
|
return Math.min(colWidth, contentWidth);
|
|
67824
67844
|
}
|
|
67825
67845
|
return contentWidth;
|
|
@@ -73138,6 +73158,7 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
73138
73158
|
return toRaw(this.clickableCellsStore.clickableCells);
|
|
73139
73159
|
}
|
|
73140
73160
|
selectClickableCell(ev, clickableCell) {
|
|
73161
|
+
if (![0, 1].includes(ev.button)) return;
|
|
73141
73162
|
const { position, action } = clickableCell;
|
|
73142
73163
|
action(position, this.env, isMiddleClickOrCtrlClick(ev));
|
|
73143
73164
|
}
|
|
@@ -81712,6 +81733,6 @@ const chartHelpers = {
|
|
|
81712
81733
|
//#endregion
|
|
81713
81734
|
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 };
|
|
81714
81735
|
|
|
81715
|
-
__info__.version = "19.2.
|
|
81716
|
-
__info__.date = "2026-07-
|
|
81717
|
-
__info__.hash = "
|
|
81736
|
+
__info__.version = "19.2.23";
|
|
81737
|
+
__info__.date = "2026-07-30T06:54:20.810Z";
|
|
81738
|
+
__info__.hash = "7914fd5";
|
|
@@ -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.2.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.2.23
|
|
6
|
+
* @date 2026-07-30T06:54:20.810Z
|
|
7
|
+
* @hash 7914fd5
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -10554,6 +10554,19 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10554
10554
|
function isMobileOS() {
|
|
10555
10555
|
return isAndroid() || isIOS() || isOtherMobileOS();
|
|
10556
10556
|
}
|
|
10557
|
+
const INTERACTIVE_ELEMENT_SELECTOR = "select, input, textarea, button, .o-select, .os-input, .o-input, .o-button, .o-button-icon, .o-button-link, .o-composer";
|
|
10558
|
+
/** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
|
|
10559
|
+
function hasInteractiveElementInEventTree(event) {
|
|
10560
|
+
const target = event.target;
|
|
10561
|
+
const root = event.currentTarget;
|
|
10562
|
+
if (!root || !target || !root.contains(target)) return false;
|
|
10563
|
+
let node = target;
|
|
10564
|
+
while (node && node !== root) {
|
|
10565
|
+
if (node.matches(INTERACTIVE_ELEMENT_SELECTOR)) return true;
|
|
10566
|
+
node = node.parentElement;
|
|
10567
|
+
}
|
|
10568
|
+
return root.matches(INTERACTIVE_ELEMENT_SELECTOR);
|
|
10569
|
+
}
|
|
10557
10570
|
|
|
10558
10571
|
//#endregion
|
|
10559
10572
|
//#region src/components/helpers/zoom.ts
|
|
@@ -44253,13 +44266,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44253
44266
|
dimensionsRef = (0, _odoo_owl.useRef)("pivot-dimensions");
|
|
44254
44267
|
dragAndDrop = useDragAndDropListItems();
|
|
44255
44268
|
AGGREGATORS = AGGREGATORS;
|
|
44256
|
-
composerFocus;
|
|
44257
44269
|
isDateOrDatetimeField = isDateOrDatetimeField;
|
|
44258
|
-
setup() {
|
|
44259
|
-
this.composerFocus = useStore(ComposerFocusStore);
|
|
44260
|
-
}
|
|
44261
44270
|
startDragAndDrop(dimension, event) {
|
|
44262
|
-
if (event.button !== 0 || event
|
|
44271
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
44263
44272
|
const rects = this.getDimensionElementsRects();
|
|
44264
44273
|
const { columns, rows } = this.props.definition;
|
|
44265
44274
|
const draggableIds = [
|
|
@@ -44299,7 +44308,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44299
44308
|
return field.type === "date" ? this.props.dateGranularities : this.props.datetimeGranularities;
|
|
44300
44309
|
}
|
|
44301
44310
|
startDragAndDropMeasures(measure, event) {
|
|
44302
|
-
if (event.button !== 0 || event
|
|
44311
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
44303
44312
|
const rects = this.getDimensionElementsRects();
|
|
44304
44313
|
const { measures, columns, rows } = this.props.definition;
|
|
44305
44314
|
const draggableIds = measures.map((m) => m.id);
|
|
@@ -50232,7 +50241,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50232
50241
|
const { x, y } = this.state.handler ? this.state.position : this.props.position;
|
|
50233
50242
|
return cssPropertiesToCss({
|
|
50234
50243
|
top: `${y}px`,
|
|
50235
|
-
left: `${x}px
|
|
50244
|
+
left: `${x}px`,
|
|
50245
|
+
visibility: this.props.isVisible ? "visible" : "hidden"
|
|
50236
50246
|
});
|
|
50237
50247
|
}
|
|
50238
50248
|
get styleNextValue() {
|
|
@@ -50653,7 +50663,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
50653
50663
|
this._cancelEdition();
|
|
50654
50664
|
this.resetContent();
|
|
50655
50665
|
}
|
|
50656
|
-
if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
50666
|
+
if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
50657
50667
|
const activePosition = this.getters.getActivePosition();
|
|
50658
50668
|
const { col, row } = this.getters.getNextVisibleCellPosition({
|
|
50659
50669
|
sheetId: cmd.sheetIdTo,
|
|
@@ -65390,12 +65400,22 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65390
65400
|
getCellTableStyle(position) {
|
|
65391
65401
|
const table = this.getters.getTable(position);
|
|
65392
65402
|
if (!table) return;
|
|
65393
|
-
|
|
65403
|
+
try {
|
|
65404
|
+
return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
|
|
65405
|
+
} catch (e) {
|
|
65406
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
65407
|
+
throw e;
|
|
65408
|
+
}
|
|
65394
65409
|
}
|
|
65395
65410
|
getCellTableBorder(position) {
|
|
65396
65411
|
const table = this.getters.getTable(position);
|
|
65397
65412
|
if (!table) return;
|
|
65398
|
-
|
|
65413
|
+
try {
|
|
65414
|
+
return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
|
|
65415
|
+
} catch (e) {
|
|
65416
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
65417
|
+
throw e;
|
|
65418
|
+
}
|
|
65399
65419
|
}
|
|
65400
65420
|
computeTableStyle(sheetId, table) {
|
|
65401
65421
|
return lazy(() => {
|
|
@@ -66881,8 +66901,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
66881
66901
|
getNextVisibleCellPosition({ sheetId, col, row }) {
|
|
66882
66902
|
return {
|
|
66883
66903
|
sheetId,
|
|
66884
|
-
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
|
|
66885
|
-
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
|
|
66904
|
+
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
|
|
66905
|
+
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
|
|
66886
66906
|
};
|
|
66887
66907
|
}
|
|
66888
66908
|
/**
|
|
@@ -67821,7 +67841,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67821
67841
|
if (contentWidth === 0) return 0;
|
|
67822
67842
|
contentWidth += 2 * 4;
|
|
67823
67843
|
if (style.wrapping === "wrap") {
|
|
67824
|
-
const colWidth = this.getters.getColSize(
|
|
67844
|
+
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
67825
67845
|
return Math.min(colWidth, contentWidth);
|
|
67826
67846
|
}
|
|
67827
67847
|
return contentWidth;
|
|
@@ -73140,6 +73160,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
73140
73160
|
return (0, _odoo_owl.toRaw)(this.clickableCellsStore.clickableCells);
|
|
73141
73161
|
}
|
|
73142
73162
|
selectClickableCell(ev, clickableCell) {
|
|
73163
|
+
if (![0, 1].includes(ev.button)) return;
|
|
73143
73164
|
const { position, action } = clickableCell;
|
|
73144
73165
|
action(position, this.env, isMiddleClickOrCtrlClick(ev));
|
|
73145
73166
|
}
|
|
@@ -81772,8 +81793,8 @@ exports.stores = stores;
|
|
|
81772
81793
|
exports.tokenColors = tokenColors;
|
|
81773
81794
|
exports.tokenize = tokenize;
|
|
81774
81795
|
|
|
81775
|
-
__info__.version = "19.2.
|
|
81776
|
-
__info__.date = "2026-07-
|
|
81777
|
-
__info__.hash = "
|
|
81796
|
+
__info__.version = "19.2.23";
|
|
81797
|
+
__info__.date = "2026-07-30T06:54:20.810Z";
|
|
81798
|
+
__info__.hash = "7914fd5";
|
|
81778
81799
|
|
|
81779
81800
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|