@odoo/o-spreadsheet 19.4.3 → 19.4.5
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 +75 -36
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +75 -36
- package/dist/o_spreadsheet.iife.js +75 -36
- package/dist/o_spreadsheet.min.iife.js +257 -257
- package/dist/o_spreadsheet.xml +7 -12
- package/dist/types/components/grid/grid.d.ts +1 -0
- package/dist/types/components/helpers/dom_helpers.d.ts +2 -0
- package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +0 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/plugins/ui_core_views/pivot_ui.d.ts +3 -0
- package/dist/types/plugins/ui_feature/collaborative.d.ts +2 -1
- package/package.json +1 -1
package/dist/o_spreadsheet.cjs
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.4.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.4.5
|
|
6
|
+
* @date 2026-07-30T06:55:39.923Z
|
|
7
|
+
* @hash 9308e17
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -348,6 +348,19 @@ function isOtherMobileOS() {
|
|
|
348
348
|
function isMobileOS() {
|
|
349
349
|
return isAndroid() || isIOS() || isOtherMobileOS();
|
|
350
350
|
}
|
|
351
|
+
const INTERACTIVE_ELEMENT_SELECTOR = "select, input, textarea, button, .o-select, .os-input, .o-input, .o-button, .o-button-icon, .o-button-link, .o-composer";
|
|
352
|
+
/** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
|
|
353
|
+
function hasInteractiveElementInEventTree(event) {
|
|
354
|
+
const target = event.target;
|
|
355
|
+
const root = event.currentTarget;
|
|
356
|
+
if (!root || !target || !root.contains(target)) return false;
|
|
357
|
+
let node = target;
|
|
358
|
+
while (node && node !== root) {
|
|
359
|
+
if (node.matches(INTERACTIVE_ELEMENT_SELECTOR)) return true;
|
|
360
|
+
node = node.parentElement;
|
|
361
|
+
}
|
|
362
|
+
return root.matches(INTERACTIVE_ELEMENT_SELECTOR);
|
|
363
|
+
}
|
|
351
364
|
|
|
352
365
|
//#endregion
|
|
353
366
|
//#region src/actions/action.ts
|
|
@@ -10963,7 +10976,7 @@ function getCalendarChartDatasetAndLabels(definition, args) {
|
|
|
10963
10976
|
borderWidth: 1,
|
|
10964
10977
|
barPercentage: 1,
|
|
10965
10978
|
categoryPercentage: 1,
|
|
10966
|
-
values: dataSetValues.data.map((cell) => isNumberResult(cell) ? cell.value :
|
|
10979
|
+
values: dataSetValues.data.map((cell) => isNumberResult(cell) ? cell.value : void 0)
|
|
10967
10980
|
});
|
|
10968
10981
|
return {
|
|
10969
10982
|
labels,
|
|
@@ -39315,13 +39328,9 @@ var PivotLayoutConfigurator = class extends Component {
|
|
|
39315
39328
|
dimensionsRef = (0, _odoo_owl.signal)(null);
|
|
39316
39329
|
dragAndDrop = useDragAndDropListItems();
|
|
39317
39330
|
AGGREGATORS = AGGREGATORS;
|
|
39318
|
-
composerFocus;
|
|
39319
39331
|
isDateOrDatetimeField = isDateOrDatetimeField;
|
|
39320
|
-
setup() {
|
|
39321
|
-
this.composerFocus = useStore(ComposerFocusStore);
|
|
39322
|
-
}
|
|
39323
39332
|
startDragAndDrop(dimension, event) {
|
|
39324
|
-
if (event.button !== 0 || event
|
|
39333
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
39325
39334
|
const rects = this.getDimensionElementsRects();
|
|
39326
39335
|
const { columns, rows } = this.props.definition;
|
|
39327
39336
|
const draggableIds = [
|
|
@@ -39361,7 +39370,7 @@ var PivotLayoutConfigurator = class extends Component {
|
|
|
39361
39370
|
return field.type === "date" ? this.props.dateGranularities : this.props.datetimeGranularities;
|
|
39362
39371
|
}
|
|
39363
39372
|
startDragAndDropMeasures(measure, event) {
|
|
39364
|
-
if (event.button !== 0 || event
|
|
39373
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
39365
39374
|
const rects = this.getDimensionElementsRects();
|
|
39366
39375
|
const { measures, columns, rows } = this.props.definition;
|
|
39367
39376
|
const draggableIds = measures.map((m) => m.id);
|
|
@@ -45494,7 +45503,8 @@ var Autofill = class extends Component {
|
|
|
45494
45503
|
const { x, y } = this.state.handler ? this.state.position : this.props.position;
|
|
45495
45504
|
return cssPropertiesToCss({
|
|
45496
45505
|
top: `${y}px`,
|
|
45497
|
-
left: `${x}px
|
|
45506
|
+
left: `${x}px`,
|
|
45507
|
+
visibility: this.props.isVisible ? "visible" : "hidden"
|
|
45498
45508
|
});
|
|
45499
45509
|
}
|
|
45500
45510
|
get styleNextValue() {
|
|
@@ -45915,7 +45925,7 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
45915
45925
|
this._cancelEdition();
|
|
45916
45926
|
this.resetContent();
|
|
45917
45927
|
}
|
|
45918
|
-
if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
45928
|
+
if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
45919
45929
|
const activePosition = this.getters.getActivePosition();
|
|
45920
45930
|
const { col, row } = this.getters.getNextVisibleCellPosition({
|
|
45921
45931
|
sheetId: cmd.sheetIdTo,
|
|
@@ -50086,6 +50096,10 @@ var Grid = class extends Component {
|
|
|
50086
50096
|
get displaySelectionHandler() {
|
|
50087
50097
|
return this.env.isMobile() && this.composerFocusStore.activeComposer.editionMode === "inactive";
|
|
50088
50098
|
}
|
|
50099
|
+
get clientsToDisplay() {
|
|
50100
|
+
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
50101
|
+
return this.env.model.getters.getClientsToDisplay(sheetId);
|
|
50102
|
+
}
|
|
50089
50103
|
};
|
|
50090
50104
|
|
|
50091
50105
|
//#endregion
|
|
@@ -51714,7 +51728,7 @@ var CellPlugin = class extends CorePlugin {
|
|
|
51714
51728
|
positionsByStyle[styleId] ??= [];
|
|
51715
51729
|
positionsByStyle[styleId].push(position);
|
|
51716
51730
|
}
|
|
51717
|
-
if (cell.format) {
|
|
51731
|
+
if (cell.format !== void 0) {
|
|
51718
51732
|
const formatId = getItemId(cell.format, formats);
|
|
51719
51733
|
positionsByFormat[formatId] ??= [];
|
|
51720
51734
|
positionsByFormat[formatId].push(position);
|
|
@@ -52891,22 +52905,19 @@ var DefaultPlugin = class extends CorePlugin {
|
|
|
52891
52905
|
getDefaultFormatInCell(sheetId, zones, priorities) {
|
|
52892
52906
|
const defaults = [];
|
|
52893
52907
|
for (const position of zones.flatMap((zone) => cellPositions(sheetId, zone))) {
|
|
52894
|
-
if (this.getters.getCell(position)?.format) continue;
|
|
52908
|
+
if (this.getters.getCell(position)?.format !== void 0) continue;
|
|
52895
52909
|
const rowDefault = this.format[sheetId]?.rowDefault?.[position.row];
|
|
52896
|
-
if (rowDefault) {
|
|
52910
|
+
if (rowDefault !== void 0) {
|
|
52897
52911
|
if (priorities.shouldUseDefaultRow) defaults.push([position, rowDefault]);
|
|
52898
52912
|
continue;
|
|
52899
52913
|
}
|
|
52900
52914
|
const colDefault = this.format[sheetId]?.colDefault?.[position.col];
|
|
52901
|
-
if (colDefault) {
|
|
52915
|
+
if (colDefault !== void 0) {
|
|
52902
52916
|
if (priorities.shouldUseDefaultCol) defaults.push([position, colDefault]);
|
|
52903
52917
|
continue;
|
|
52904
52918
|
}
|
|
52905
|
-
const sheetDefault = this.format[sheetId]?.sheetDefault;
|
|
52906
|
-
if (sheetDefault)
|
|
52907
|
-
if (priorities.shouldUseDefaultSheet) defaults.push([position, sheetDefault]);
|
|
52908
|
-
continue;
|
|
52909
|
-
}
|
|
52919
|
+
const sheetDefault = this.format[sheetId]?.sheetDefault ?? "";
|
|
52920
|
+
if (priorities.shouldUseDefaultSheet) defaults.push([position, sheetDefault]);
|
|
52910
52921
|
}
|
|
52911
52922
|
return defaults;
|
|
52912
52923
|
}
|
|
@@ -59858,6 +59869,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59858
59869
|
pivots = {};
|
|
59859
59870
|
unusedPivotsInFormulas;
|
|
59860
59871
|
custom;
|
|
59872
|
+
pivotPositionCache = new PositionMap();
|
|
59873
|
+
shouldInvalidateCache = false;
|
|
59861
59874
|
constructor(config) {
|
|
59862
59875
|
super(config);
|
|
59863
59876
|
this.custom = config.custom;
|
|
@@ -59868,7 +59881,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59868
59881
|
}
|
|
59869
59882
|
}
|
|
59870
59883
|
handle(cmd) {
|
|
59871
|
-
if (invalidateEvaluationCommands.has(cmd.type))
|
|
59884
|
+
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
59885
|
+
this.shouldInvalidateCache = true;
|
|
59886
|
+
for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
|
|
59887
|
+
}
|
|
59888
|
+
if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
|
|
59872
59889
|
switch (cmd.type) {
|
|
59873
59890
|
case "REFRESH_PIVOT":
|
|
59874
59891
|
this.refreshPivot(cmd.id);
|
|
@@ -59908,6 +59925,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59908
59925
|
break;
|
|
59909
59926
|
}
|
|
59910
59927
|
}
|
|
59928
|
+
finalize() {
|
|
59929
|
+
if (this.shouldInvalidateCache) {
|
|
59930
|
+
this.pivotPositionCache = new PositionMap();
|
|
59931
|
+
this.shouldInvalidateCache = false;
|
|
59932
|
+
}
|
|
59933
|
+
}
|
|
59911
59934
|
/**
|
|
59912
59935
|
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
59913
59936
|
* is no pivot at this position
|
|
@@ -59919,9 +59942,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59919
59942
|
* Get all of the ids of the pivot present in the formula at the given position.
|
|
59920
59943
|
*/
|
|
59921
59944
|
getPivotIdsFromPosition(position) {
|
|
59922
|
-
|
|
59923
|
-
|
|
59924
|
-
|
|
59945
|
+
if (!this.pivotPositionCache.has(position)) {
|
|
59946
|
+
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
59947
|
+
if (cell && cell.isFormula) {
|
|
59948
|
+
const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
59949
|
+
this.pivotPositionCache.set(position, pivotIds);
|
|
59950
|
+
}
|
|
59951
|
+
}
|
|
59952
|
+
return this.pivotPositionCache.get(position) || [];
|
|
59925
59953
|
}
|
|
59926
59954
|
getPivotIdsFromFormula(sheetId, formula) {
|
|
59927
59955
|
return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
|
|
@@ -61286,12 +61314,22 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
61286
61314
|
getCellTableStyle(position) {
|
|
61287
61315
|
const table = this.getters.getTable(position);
|
|
61288
61316
|
if (!table) return;
|
|
61289
|
-
|
|
61317
|
+
try {
|
|
61318
|
+
return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
|
|
61319
|
+
} catch (e) {
|
|
61320
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
61321
|
+
throw e;
|
|
61322
|
+
}
|
|
61290
61323
|
}
|
|
61291
61324
|
getCellTableBorder(position) {
|
|
61292
61325
|
const table = this.getters.getTable(position);
|
|
61293
61326
|
if (!table) return;
|
|
61294
|
-
|
|
61327
|
+
try {
|
|
61328
|
+
return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
|
|
61329
|
+
} catch (e) {
|
|
61330
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
61331
|
+
throw e;
|
|
61332
|
+
}
|
|
61295
61333
|
}
|
|
61296
61334
|
computeTableStyle(sheetId, table) {
|
|
61297
61335
|
return lazy(() => {
|
|
@@ -62634,14 +62672,13 @@ var CollaborativePlugin = class extends UIPlugin {
|
|
|
62634
62672
|
* Get the list of others connected clients which are present in the same sheet
|
|
62635
62673
|
* and with a valid position
|
|
62636
62674
|
*/
|
|
62637
|
-
getClientsToDisplay() {
|
|
62675
|
+
getClientsToDisplay(sheetId) {
|
|
62638
62676
|
try {
|
|
62639
62677
|
this.getters.getCurrentClient();
|
|
62640
62678
|
} catch (e) {
|
|
62641
62679
|
if (e instanceof ClientDisconnectedError) return [];
|
|
62642
62680
|
else throw e;
|
|
62643
62681
|
}
|
|
62644
|
-
const sheetId = this.getters.getActiveSheetId();
|
|
62645
62682
|
const clients = [];
|
|
62646
62683
|
for (const client of this.getters.getConnectedClients()) if (client.id !== this.getters.getCurrentClient().id && client.position && client.position.sheetId === sheetId && this.isPositionValid(client.position)) clients.push({
|
|
62647
62684
|
...client,
|
|
@@ -62652,7 +62689,7 @@ var CollaborativePlugin = class extends UIPlugin {
|
|
|
62652
62689
|
drawLayer(renderingContext) {
|
|
62653
62690
|
if (this.getters.isDashboard()) return;
|
|
62654
62691
|
const { ctx, thinLineWidth, viewports, sheetId } = renderingContext;
|
|
62655
|
-
for (const client of this.getClientsToDisplay()) {
|
|
62692
|
+
for (const client of this.getClientsToDisplay(sheetId)) {
|
|
62656
62693
|
const { row, col } = client.position;
|
|
62657
62694
|
const zone = this.getters.expandZone(sheetId, {
|
|
62658
62695
|
top: row,
|
|
@@ -63460,8 +63497,8 @@ var HeaderVisibilityUIPlugin = class extends UIPlugin {
|
|
|
63460
63497
|
getNextVisibleCellPosition({ sheetId, col, row }) {
|
|
63461
63498
|
return {
|
|
63462
63499
|
sheetId,
|
|
63463
|
-
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
|
|
63464
|
-
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
|
|
63500
|
+
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
|
|
63501
|
+
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
|
|
63465
63502
|
};
|
|
63466
63503
|
}
|
|
63467
63504
|
/**
|
|
@@ -64473,7 +64510,7 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
64473
64510
|
if (contentWidth === 0) return 0;
|
|
64474
64511
|
contentWidth += 2 * 4;
|
|
64475
64512
|
if (style.wrapping === "wrap") {
|
|
64476
|
-
const colWidth = this.getters.getColSize(
|
|
64513
|
+
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
64477
64514
|
return Math.min(colWidth, contentWidth);
|
|
64478
64515
|
}
|
|
64479
64516
|
return contentWidth;
|
|
@@ -69716,6 +69753,7 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
69716
69753
|
return (0, _odoo_owl.toRaw)(this.clickableCellsStore.clickableCells);
|
|
69717
69754
|
}
|
|
69718
69755
|
selectClickableCell(ev, clickableCell) {
|
|
69756
|
+
if (![0, 1].includes(ev.button)) return;
|
|
69719
69757
|
const { position, action } = clickableCell;
|
|
69720
69758
|
action(position, this.env, isMiddleClickOrCtrlClick(ev));
|
|
69721
69759
|
}
|
|
@@ -87603,6 +87641,7 @@ const helpers = {
|
|
|
87603
87641
|
collapseHierarchicalDisplayName,
|
|
87604
87642
|
getCanonicalSymbolName,
|
|
87605
87643
|
fuzzyLookup,
|
|
87644
|
+
PositionMap,
|
|
87606
87645
|
replaceSymbolInFormula
|
|
87607
87646
|
};
|
|
87608
87647
|
const links = {
|
|
@@ -87827,6 +87866,6 @@ exports.stores = stores;
|
|
|
87827
87866
|
exports.tokenColors = tokenColors;
|
|
87828
87867
|
exports.tokenize = tokenize;
|
|
87829
87868
|
|
|
87830
|
-
__info__.version = "19.4.
|
|
87831
|
-
__info__.date = "2026-07-
|
|
87832
|
-
__info__.hash = "
|
|
87869
|
+
__info__.version = "19.4.5";
|
|
87870
|
+
__info__.date = "2026-07-30T06:55:39.923Z";
|
|
87871
|
+
__info__.hash = "9308e17";
|
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.4.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.4.5
|
|
6
|
+
* @date 2026-07-30T06:55:41.389Z
|
|
7
|
+
* @hash 9308e17
|
|
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.4.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.4.5
|
|
6
|
+
* @date 2026-07-30T06:55:39.923Z
|
|
7
|
+
* @hash 9308e17
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import * as owl from "@odoo/owl";
|
|
@@ -347,6 +347,19 @@ function isOtherMobileOS() {
|
|
|
347
347
|
function isMobileOS() {
|
|
348
348
|
return isAndroid() || isIOS() || isOtherMobileOS();
|
|
349
349
|
}
|
|
350
|
+
const INTERACTIVE_ELEMENT_SELECTOR = "select, input, textarea, button, .o-select, .os-input, .o-input, .o-button, .o-button-icon, .o-button-link, .o-composer";
|
|
351
|
+
/** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
|
|
352
|
+
function hasInteractiveElementInEventTree(event) {
|
|
353
|
+
const target = event.target;
|
|
354
|
+
const root = event.currentTarget;
|
|
355
|
+
if (!root || !target || !root.contains(target)) return false;
|
|
356
|
+
let node = target;
|
|
357
|
+
while (node && node !== root) {
|
|
358
|
+
if (node.matches(INTERACTIVE_ELEMENT_SELECTOR)) return true;
|
|
359
|
+
node = node.parentElement;
|
|
360
|
+
}
|
|
361
|
+
return root.matches(INTERACTIVE_ELEMENT_SELECTOR);
|
|
362
|
+
}
|
|
350
363
|
|
|
351
364
|
//#endregion
|
|
352
365
|
//#region src/actions/action.ts
|
|
@@ -10962,7 +10975,7 @@ function getCalendarChartDatasetAndLabels(definition, args) {
|
|
|
10962
10975
|
borderWidth: 1,
|
|
10963
10976
|
barPercentage: 1,
|
|
10964
10977
|
categoryPercentage: 1,
|
|
10965
|
-
values: dataSetValues.data.map((cell) => isNumberResult(cell) ? cell.value :
|
|
10978
|
+
values: dataSetValues.data.map((cell) => isNumberResult(cell) ? cell.value : void 0)
|
|
10966
10979
|
});
|
|
10967
10980
|
return {
|
|
10968
10981
|
labels,
|
|
@@ -39314,13 +39327,9 @@ var PivotLayoutConfigurator = class extends Component {
|
|
|
39314
39327
|
dimensionsRef = signal(null);
|
|
39315
39328
|
dragAndDrop = useDragAndDropListItems();
|
|
39316
39329
|
AGGREGATORS = AGGREGATORS;
|
|
39317
|
-
composerFocus;
|
|
39318
39330
|
isDateOrDatetimeField = isDateOrDatetimeField;
|
|
39319
|
-
setup() {
|
|
39320
|
-
this.composerFocus = useStore(ComposerFocusStore);
|
|
39321
|
-
}
|
|
39322
39331
|
startDragAndDrop(dimension, event) {
|
|
39323
|
-
if (event.button !== 0 || event
|
|
39332
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
39324
39333
|
const rects = this.getDimensionElementsRects();
|
|
39325
39334
|
const { columns, rows } = this.props.definition;
|
|
39326
39335
|
const draggableIds = [
|
|
@@ -39360,7 +39369,7 @@ var PivotLayoutConfigurator = class extends Component {
|
|
|
39360
39369
|
return field.type === "date" ? this.props.dateGranularities : this.props.datetimeGranularities;
|
|
39361
39370
|
}
|
|
39362
39371
|
startDragAndDropMeasures(measure, event) {
|
|
39363
|
-
if (event.button !== 0 || event
|
|
39372
|
+
if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
|
|
39364
39373
|
const rects = this.getDimensionElementsRects();
|
|
39365
39374
|
const { measures, columns, rows } = this.props.definition;
|
|
39366
39375
|
const draggableIds = measures.map((m) => m.id);
|
|
@@ -45493,7 +45502,8 @@ var Autofill = class extends Component {
|
|
|
45493
45502
|
const { x, y } = this.state.handler ? this.state.position : this.props.position;
|
|
45494
45503
|
return cssPropertiesToCss({
|
|
45495
45504
|
top: `${y}px`,
|
|
45496
|
-
left: `${x}px
|
|
45505
|
+
left: `${x}px`,
|
|
45506
|
+
visibility: this.props.isVisible ? "visible" : "hidden"
|
|
45497
45507
|
});
|
|
45498
45508
|
}
|
|
45499
45509
|
get styleNextValue() {
|
|
@@ -45914,7 +45924,7 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
45914
45924
|
this._cancelEdition();
|
|
45915
45925
|
this.resetContent();
|
|
45916
45926
|
}
|
|
45917
|
-
if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
45927
|
+
if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
|
|
45918
45928
|
const activePosition = this.getters.getActivePosition();
|
|
45919
45929
|
const { col, row } = this.getters.getNextVisibleCellPosition({
|
|
45920
45930
|
sheetId: cmd.sheetIdTo,
|
|
@@ -50085,6 +50095,10 @@ var Grid = class extends Component {
|
|
|
50085
50095
|
get displaySelectionHandler() {
|
|
50086
50096
|
return this.env.isMobile() && this.composerFocusStore.activeComposer.editionMode === "inactive";
|
|
50087
50097
|
}
|
|
50098
|
+
get clientsToDisplay() {
|
|
50099
|
+
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
50100
|
+
return this.env.model.getters.getClientsToDisplay(sheetId);
|
|
50101
|
+
}
|
|
50088
50102
|
};
|
|
50089
50103
|
|
|
50090
50104
|
//#endregion
|
|
@@ -51713,7 +51727,7 @@ var CellPlugin = class extends CorePlugin {
|
|
|
51713
51727
|
positionsByStyle[styleId] ??= [];
|
|
51714
51728
|
positionsByStyle[styleId].push(position);
|
|
51715
51729
|
}
|
|
51716
|
-
if (cell.format) {
|
|
51730
|
+
if (cell.format !== void 0) {
|
|
51717
51731
|
const formatId = getItemId(cell.format, formats);
|
|
51718
51732
|
positionsByFormat[formatId] ??= [];
|
|
51719
51733
|
positionsByFormat[formatId].push(position);
|
|
@@ -52890,22 +52904,19 @@ var DefaultPlugin = class extends CorePlugin {
|
|
|
52890
52904
|
getDefaultFormatInCell(sheetId, zones, priorities) {
|
|
52891
52905
|
const defaults = [];
|
|
52892
52906
|
for (const position of zones.flatMap((zone) => cellPositions(sheetId, zone))) {
|
|
52893
|
-
if (this.getters.getCell(position)?.format) continue;
|
|
52907
|
+
if (this.getters.getCell(position)?.format !== void 0) continue;
|
|
52894
52908
|
const rowDefault = this.format[sheetId]?.rowDefault?.[position.row];
|
|
52895
|
-
if (rowDefault) {
|
|
52909
|
+
if (rowDefault !== void 0) {
|
|
52896
52910
|
if (priorities.shouldUseDefaultRow) defaults.push([position, rowDefault]);
|
|
52897
52911
|
continue;
|
|
52898
52912
|
}
|
|
52899
52913
|
const colDefault = this.format[sheetId]?.colDefault?.[position.col];
|
|
52900
|
-
if (colDefault) {
|
|
52914
|
+
if (colDefault !== void 0) {
|
|
52901
52915
|
if (priorities.shouldUseDefaultCol) defaults.push([position, colDefault]);
|
|
52902
52916
|
continue;
|
|
52903
52917
|
}
|
|
52904
|
-
const sheetDefault = this.format[sheetId]?.sheetDefault;
|
|
52905
|
-
if (sheetDefault)
|
|
52906
|
-
if (priorities.shouldUseDefaultSheet) defaults.push([position, sheetDefault]);
|
|
52907
|
-
continue;
|
|
52908
|
-
}
|
|
52918
|
+
const sheetDefault = this.format[sheetId]?.sheetDefault ?? "";
|
|
52919
|
+
if (priorities.shouldUseDefaultSheet) defaults.push([position, sheetDefault]);
|
|
52909
52920
|
}
|
|
52910
52921
|
return defaults;
|
|
52911
52922
|
}
|
|
@@ -59673,6 +59684,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59673
59684
|
pivots = {};
|
|
59674
59685
|
unusedPivotsInFormulas;
|
|
59675
59686
|
custom;
|
|
59687
|
+
pivotPositionCache = new PositionMap();
|
|
59688
|
+
shouldInvalidateCache = false;
|
|
59676
59689
|
constructor(config) {
|
|
59677
59690
|
super(config);
|
|
59678
59691
|
this.custom = config.custom;
|
|
@@ -59683,7 +59696,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59683
59696
|
}
|
|
59684
59697
|
}
|
|
59685
59698
|
handle(cmd) {
|
|
59686
|
-
if (invalidateEvaluationCommands.has(cmd.type))
|
|
59699
|
+
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
59700
|
+
this.shouldInvalidateCache = true;
|
|
59701
|
+
for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
|
|
59702
|
+
}
|
|
59703
|
+
if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
|
|
59687
59704
|
switch (cmd.type) {
|
|
59688
59705
|
case "REFRESH_PIVOT":
|
|
59689
59706
|
this.refreshPivot(cmd.id);
|
|
@@ -59723,6 +59740,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59723
59740
|
break;
|
|
59724
59741
|
}
|
|
59725
59742
|
}
|
|
59743
|
+
finalize() {
|
|
59744
|
+
if (this.shouldInvalidateCache) {
|
|
59745
|
+
this.pivotPositionCache = new PositionMap();
|
|
59746
|
+
this.shouldInvalidateCache = false;
|
|
59747
|
+
}
|
|
59748
|
+
}
|
|
59726
59749
|
/**
|
|
59727
59750
|
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
59728
59751
|
* is no pivot at this position
|
|
@@ -59734,9 +59757,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
59734
59757
|
* Get all of the ids of the pivot present in the formula at the given position.
|
|
59735
59758
|
*/
|
|
59736
59759
|
getPivotIdsFromPosition(position) {
|
|
59737
|
-
|
|
59738
|
-
|
|
59739
|
-
|
|
59760
|
+
if (!this.pivotPositionCache.has(position)) {
|
|
59761
|
+
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
59762
|
+
if (cell && cell.isFormula) {
|
|
59763
|
+
const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
59764
|
+
this.pivotPositionCache.set(position, pivotIds);
|
|
59765
|
+
}
|
|
59766
|
+
}
|
|
59767
|
+
return this.pivotPositionCache.get(position) || [];
|
|
59740
59768
|
}
|
|
59741
59769
|
getPivotIdsFromFormula(sheetId, formula) {
|
|
59742
59770
|
return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
|
|
@@ -61101,12 +61129,22 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
61101
61129
|
getCellTableStyle(position) {
|
|
61102
61130
|
const table = this.getters.getTable(position);
|
|
61103
61131
|
if (!table) return;
|
|
61104
|
-
|
|
61132
|
+
try {
|
|
61133
|
+
return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
|
|
61134
|
+
} catch (e) {
|
|
61135
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
61136
|
+
throw e;
|
|
61137
|
+
}
|
|
61105
61138
|
}
|
|
61106
61139
|
getCellTableBorder(position) {
|
|
61107
61140
|
const table = this.getters.getTable(position);
|
|
61108
61141
|
if (!table) return;
|
|
61109
|
-
|
|
61142
|
+
try {
|
|
61143
|
+
return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
|
|
61144
|
+
} catch (e) {
|
|
61145
|
+
if (isEvaluationError(e) || e instanceof EvaluationError) return;
|
|
61146
|
+
throw e;
|
|
61147
|
+
}
|
|
61110
61148
|
}
|
|
61111
61149
|
computeTableStyle(sheetId, table) {
|
|
61112
61150
|
return lazy(() => {
|
|
@@ -62449,14 +62487,13 @@ var CollaborativePlugin = class extends UIPlugin {
|
|
|
62449
62487
|
* Get the list of others connected clients which are present in the same sheet
|
|
62450
62488
|
* and with a valid position
|
|
62451
62489
|
*/
|
|
62452
|
-
getClientsToDisplay() {
|
|
62490
|
+
getClientsToDisplay(sheetId) {
|
|
62453
62491
|
try {
|
|
62454
62492
|
this.getters.getCurrentClient();
|
|
62455
62493
|
} catch (e) {
|
|
62456
62494
|
if (e instanceof ClientDisconnectedError) return [];
|
|
62457
62495
|
else throw e;
|
|
62458
62496
|
}
|
|
62459
|
-
const sheetId = this.getters.getActiveSheetId();
|
|
62460
62497
|
const clients = [];
|
|
62461
62498
|
for (const client of this.getters.getConnectedClients()) if (client.id !== this.getters.getCurrentClient().id && client.position && client.position.sheetId === sheetId && this.isPositionValid(client.position)) clients.push({
|
|
62462
62499
|
...client,
|
|
@@ -62467,7 +62504,7 @@ var CollaborativePlugin = class extends UIPlugin {
|
|
|
62467
62504
|
drawLayer(renderingContext) {
|
|
62468
62505
|
if (this.getters.isDashboard()) return;
|
|
62469
62506
|
const { ctx, thinLineWidth, viewports, sheetId } = renderingContext;
|
|
62470
|
-
for (const client of this.getClientsToDisplay()) {
|
|
62507
|
+
for (const client of this.getClientsToDisplay(sheetId)) {
|
|
62471
62508
|
const { row, col } = client.position;
|
|
62472
62509
|
const zone = this.getters.expandZone(sheetId, {
|
|
62473
62510
|
top: row,
|
|
@@ -63275,8 +63312,8 @@ var HeaderVisibilityUIPlugin = class extends UIPlugin {
|
|
|
63275
63312
|
getNextVisibleCellPosition({ sheetId, col, row }) {
|
|
63276
63313
|
return {
|
|
63277
63314
|
sheetId,
|
|
63278
|
-
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
|
|
63279
|
-
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
|
|
63315
|
+
col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
|
|
63316
|
+
row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
|
|
63280
63317
|
};
|
|
63281
63318
|
}
|
|
63282
63319
|
/**
|
|
@@ -64288,7 +64325,7 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
64288
64325
|
if (contentWidth === 0) return 0;
|
|
64289
64326
|
contentWidth += 2 * 4;
|
|
64290
64327
|
if (style.wrapping === "wrap") {
|
|
64291
|
-
const colWidth = this.getters.getColSize(
|
|
64328
|
+
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
64292
64329
|
return Math.min(colWidth, contentWidth);
|
|
64293
64330
|
}
|
|
64294
64331
|
return contentWidth;
|
|
@@ -69531,6 +69568,7 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
69531
69568
|
return toRaw(this.clickableCellsStore.clickableCells);
|
|
69532
69569
|
}
|
|
69533
69570
|
selectClickableCell(ev, clickableCell) {
|
|
69571
|
+
if (![0, 1].includes(ev.button)) return;
|
|
69534
69572
|
const { position, action } = clickableCell;
|
|
69535
69573
|
action(position, this.env, isMiddleClickOrCtrlClick(ev));
|
|
69536
69574
|
}
|
|
@@ -87418,6 +87456,7 @@ const helpers = {
|
|
|
87418
87456
|
collapseHierarchicalDisplayName,
|
|
87419
87457
|
getCanonicalSymbolName,
|
|
87420
87458
|
fuzzyLookup,
|
|
87459
|
+
PositionMap,
|
|
87421
87460
|
replaceSymbolInFormula
|
|
87422
87461
|
};
|
|
87423
87462
|
const links = {
|
|
@@ -87548,6 +87587,6 @@ const chartHelpers = {
|
|
|
87548
87587
|
//#endregion
|
|
87549
87588
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderPositions, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, composerFocusTypes, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, errorTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
87550
87589
|
|
|
87551
|
-
__info__.version = "19.4.
|
|
87552
|
-
__info__.date = "2026-07-
|
|
87553
|
-
__info__.hash = "
|
|
87590
|
+
__info__.version = "19.4.5";
|
|
87591
|
+
__info__.date = "2026-07-30T06:55:39.923Z";
|
|
87592
|
+
__info__.hash = "9308e17";
|