@odoo/o-spreadsheet 19.0.1 → 19.0.3
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 +94 -22
- package/dist/o-spreadsheet.esm.js +94 -22
- package/dist/o-spreadsheet.iife.js +94 -22
- package/dist/o-spreadsheet.iife.min.js +6 -6
- package/dist/o_spreadsheet.xml +31 -5
- package/package.json +15 -2
|
@@ -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.0.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.3
|
|
6
|
+
* @date 2025-09-19T07:26:41.356Z
|
|
7
|
+
* @hash 84f3b74
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -890,6 +890,7 @@ const tokenColors = {
|
|
|
890
890
|
ARG_SEPARATOR: functionColor,
|
|
891
891
|
ORPHAN_RIGHT_PAREN: "#ff0000",
|
|
892
892
|
};
|
|
893
|
+
const DRAG_THRESHOLD = 5; // in pixels, to avoid unwanted drag when clicking
|
|
893
894
|
|
|
894
895
|
//------------------------------------------------------------------------------
|
|
895
896
|
// Miscellaneous
|
|
@@ -1368,8 +1369,19 @@ function memoize(func) {
|
|
|
1368
1369
|
},
|
|
1369
1370
|
}[funcName];
|
|
1370
1371
|
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Removes the specified indexes from the array.
|
|
1374
|
+
* Sparse (empty) elements are transformed to undefined (unless their index is explicitly removed).
|
|
1375
|
+
*/
|
|
1371
1376
|
function removeIndexesFromArray(array, indexes) {
|
|
1372
|
-
|
|
1377
|
+
const toRemove = new Set(indexes);
|
|
1378
|
+
const newArray = [];
|
|
1379
|
+
for (let i = 0; i < array.length; i++) {
|
|
1380
|
+
if (!toRemove.has(i)) {
|
|
1381
|
+
newArray.push(array[i]);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
return newArray;
|
|
1373
1385
|
}
|
|
1374
1386
|
function insertItemsAtIndex(array, items, index) {
|
|
1375
1387
|
const newArray = [...array];
|
|
@@ -16084,8 +16096,9 @@ function interactiveSort(env, sheetId, anchor, zone, sortDirection, sortOptions)
|
|
|
16084
16096
|
}
|
|
16085
16097
|
|
|
16086
16098
|
function sortMatrix(matrix, locale, ...criteria) {
|
|
16087
|
-
for (
|
|
16088
|
-
|
|
16099
|
+
for (let i = 0; i < criteria.length; i++) {
|
|
16100
|
+
const param = i % 2 === 0 ? "sort_column" : "is_ascending";
|
|
16101
|
+
assert(criteria[i] !== undefined, _t("Value for parameter %s is missing in [[FUNCTION_NAME]].", param));
|
|
16089
16102
|
}
|
|
16090
16103
|
const sortingOrders = [];
|
|
16091
16104
|
const sortColumns = [];
|
|
@@ -32380,7 +32393,11 @@ class CarouselFigure extends owl.Component {
|
|
|
32380
32393
|
onFigureDeleted: Function,
|
|
32381
32394
|
editFigureStyle: { type: Function, optional: true },
|
|
32382
32395
|
};
|
|
32383
|
-
static components = { ChartDashboardMenu };
|
|
32396
|
+
static components = { ChartDashboardMenu, MenuPopover };
|
|
32397
|
+
carouselTabsRef = owl.useRef("carouselTabs");
|
|
32398
|
+
carouselTabsDropdownRef = owl.useRef("carouselTabsDropdown");
|
|
32399
|
+
menuState = owl.useState({ isOpen: false, anchorRect: null, menuItems: [] });
|
|
32400
|
+
hiddenItems = [];
|
|
32384
32401
|
animationStore;
|
|
32385
32402
|
setup() {
|
|
32386
32403
|
this.animationStore = useStore(ChartAnimationStore);
|
|
@@ -32391,6 +32408,7 @@ class CarouselFigure extends owl.Component {
|
|
|
32391
32408
|
else {
|
|
32392
32409
|
this.props.editFigureStyle?.({ "pointer-events": "auto" });
|
|
32393
32410
|
}
|
|
32411
|
+
this.updateTabsVisibility();
|
|
32394
32412
|
});
|
|
32395
32413
|
}
|
|
32396
32414
|
get carousel() {
|
|
@@ -32450,6 +32468,49 @@ class CarouselFigure extends owl.Component {
|
|
|
32450
32468
|
const style = { ...DEFAULT_CAROUSEL_TITLE_STYLE, ...this.carousel.title };
|
|
32451
32469
|
return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle(style)));
|
|
32452
32470
|
}
|
|
32471
|
+
updateTabsVisibility() {
|
|
32472
|
+
const tabsContainerEl = this.carouselTabsRef.el;
|
|
32473
|
+
const dropDownEl = this.carouselTabsDropdownRef.el;
|
|
32474
|
+
if (!tabsContainerEl || !dropDownEl) {
|
|
32475
|
+
return;
|
|
32476
|
+
}
|
|
32477
|
+
this.hiddenItems = [];
|
|
32478
|
+
const containerRect = getBoundingRectAsPOJO(tabsContainerEl);
|
|
32479
|
+
const tabs = Array.from(tabsContainerEl.children);
|
|
32480
|
+
for (const tab of tabs) {
|
|
32481
|
+
tab.style.display = "block";
|
|
32482
|
+
}
|
|
32483
|
+
const tabWidths = tabs.map((tab) => getBoundingRectAsPOJO(tab).width);
|
|
32484
|
+
let currentWidth = 0;
|
|
32485
|
+
for (let i = 0; i < tabs.length; i++) {
|
|
32486
|
+
const shouldBeHidden = currentWidth + tabWidths[i] > containerRect.width;
|
|
32487
|
+
currentWidth += tabWidths[i];
|
|
32488
|
+
if (shouldBeHidden) {
|
|
32489
|
+
tabs[i].style.display = "none";
|
|
32490
|
+
this.hiddenItems.push(this.carousel.items[i]);
|
|
32491
|
+
}
|
|
32492
|
+
}
|
|
32493
|
+
dropDownEl.style.display = this.hiddenItems.length ? "block" : "none";
|
|
32494
|
+
}
|
|
32495
|
+
get menuId() {
|
|
32496
|
+
return "carousel-tabs-menu-";
|
|
32497
|
+
}
|
|
32498
|
+
toggleMenu(ev) {
|
|
32499
|
+
if (ev.closedMenuId === this.menuId) {
|
|
32500
|
+
this.menuState.isOpen = false;
|
|
32501
|
+
return;
|
|
32502
|
+
}
|
|
32503
|
+
const rect = getRefBoundingRect(this.carouselTabsDropdownRef);
|
|
32504
|
+
const menuItems = this.hiddenItems.map((item) => ({
|
|
32505
|
+
name: this.getItemTitle(item),
|
|
32506
|
+
execute: () => this.onCarouselTabClick(item),
|
|
32507
|
+
isActive: () => this.isItemSelected(item),
|
|
32508
|
+
isReadonlyAllowed: true,
|
|
32509
|
+
}));
|
|
32510
|
+
this.menuState.isOpen = true;
|
|
32511
|
+
this.menuState.anchorRect = rect;
|
|
32512
|
+
this.menuState.menuItems = createActions(menuItems);
|
|
32513
|
+
}
|
|
32453
32514
|
}
|
|
32454
32515
|
|
|
32455
32516
|
class ChartFigure extends owl.Component {
|
|
@@ -50437,9 +50498,16 @@ class FiguresContainer extends owl.Component {
|
|
|
50437
50498
|
maxX: this.env.model.getters.getColDimensions(sheetId, this.env.model.getters.getNumberCols(sheetId) - 1).end,
|
|
50438
50499
|
maxY: this.env.model.getters.getRowDimensions(sheetId, this.env.model.getters.getNumberRows(sheetId) - 1).end,
|
|
50439
50500
|
};
|
|
50501
|
+
let hasStartedDnd = false;
|
|
50440
50502
|
const onMouseMove = (ev) => {
|
|
50441
50503
|
const getters = this.env.model.getters;
|
|
50442
50504
|
const currentMousePosition = { x: ev.clientX, y: ev.clientY };
|
|
50505
|
+
const offsetX = Math.abs(currentMousePosition.x - initialMousePosition.x);
|
|
50506
|
+
const offsetY = Math.abs(currentMousePosition.y - initialMousePosition.y);
|
|
50507
|
+
if (!hasStartedDnd && offsetX < DRAG_THRESHOLD && offsetY < DRAG_THRESHOLD) {
|
|
50508
|
+
return; // add a small threshold to avoid dnd when just clicking
|
|
50509
|
+
}
|
|
50510
|
+
hasStartedDnd = true;
|
|
50443
50511
|
const draggedFigure = dragFigureForMove(currentMousePosition, initialMousePosition, initialFigure, maxDimensions, initialScrollPosition, getters.getActiveSheetScrollInfo());
|
|
50444
50512
|
const otherFigures = this.getOtherFigures(initialFigure.id);
|
|
50445
50513
|
const overlappingCarousel = this.getCarouselOverlappingChart(draggedFigure, otherFigures);
|
|
@@ -58851,12 +58919,13 @@ class PivotLayoutConfigurator extends owl.Component {
|
|
|
58851
58919
|
addCalculatedMeasure() {
|
|
58852
58920
|
const { measures } = this.props.definition;
|
|
58853
58921
|
const measureName = this.env.model.getters.generateNewCalculatedMeasureName(measures);
|
|
58922
|
+
const aggregator = "sum";
|
|
58854
58923
|
this.props.onDimensionsUpdated({
|
|
58855
58924
|
measures: measures.concat([
|
|
58856
58925
|
{
|
|
58857
|
-
id: this.getMeasureId(measureName),
|
|
58926
|
+
id: this.getMeasureId(measureName, aggregator),
|
|
58858
58927
|
fieldName: measureName,
|
|
58859
|
-
aggregator
|
|
58928
|
+
aggregator,
|
|
58860
58929
|
computedBy: {
|
|
58861
58930
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
58862
58931
|
formula: "=0",
|
|
@@ -71161,7 +71230,7 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
71161
71230
|
return { value: 0 };
|
|
71162
71231
|
}
|
|
71163
71232
|
const { columns, rows } = super.definition;
|
|
71164
|
-
if (columns.length + rows.length !== domain.length) {
|
|
71233
|
+
if (measure.aggregator && columns.length + rows.length !== domain.length) {
|
|
71165
71234
|
const values = this.getValuesToAggregate(measure, domain);
|
|
71166
71235
|
const aggregator = AGGREGATORS_FN[measure.aggregator];
|
|
71167
71236
|
if (!aggregator) {
|
|
@@ -71180,11 +71249,17 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
71180
71249
|
if (columns.find((col) => col.nameWithGranularity === symbolName)) {
|
|
71181
71250
|
const { colDomain } = domainToColRowDomain(this, domain);
|
|
71182
71251
|
const symbolIndex = colDomain.findIndex((node) => node.field === symbolName);
|
|
71252
|
+
if (symbolIndex === -1) {
|
|
71253
|
+
return new NotAvailableError();
|
|
71254
|
+
}
|
|
71183
71255
|
return this.getPivotHeaderValueAndFormat(colDomain.slice(0, symbolIndex + 1));
|
|
71184
71256
|
}
|
|
71185
71257
|
if (rows.find((row) => row.nameWithGranularity === symbolName)) {
|
|
71186
71258
|
const { rowDomain } = domainToColRowDomain(this, domain);
|
|
71187
71259
|
const symbolIndex = rowDomain.findIndex((row) => row.field === symbolName);
|
|
71260
|
+
if (symbolIndex === -1) {
|
|
71261
|
+
return new NotAvailableError();
|
|
71262
|
+
}
|
|
71188
71263
|
return this.getPivotHeaderValueAndFormat(rowDomain.slice(0, symbolIndex + 1));
|
|
71189
71264
|
}
|
|
71190
71265
|
return this.getPivotCellValueAndFormat(symbolName, domain);
|
|
@@ -77563,13 +77638,10 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
77563
77638
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
77564
77639
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
77565
77640
|
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
77566
|
-
const originalSize =
|
|
77567
|
-
|
|
77568
|
-
|
|
77569
|
-
|
|
77570
|
-
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
77571
|
-
return [element, isDefaultCol ? undefined : size];
|
|
77572
|
-
}));
|
|
77641
|
+
const originalSize = {};
|
|
77642
|
+
for (const element of toRemove) {
|
|
77643
|
+
originalSize[element] = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
|
|
77644
|
+
}
|
|
77573
77645
|
const target = [
|
|
77574
77646
|
{
|
|
77575
77647
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -77613,11 +77685,11 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
77613
77685
|
for (const element of toRemove) {
|
|
77614
77686
|
const size = originalSize[element];
|
|
77615
77687
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
77616
|
-
if (size
|
|
77688
|
+
if (size !== currentSize) {
|
|
77617
77689
|
resizingGroups[size] ??= [];
|
|
77618
77690
|
resizingGroups[size].push(currentIndex);
|
|
77619
|
-
currentIndex += 1;
|
|
77620
77691
|
}
|
|
77692
|
+
currentIndex += 1;
|
|
77621
77693
|
}
|
|
77622
77694
|
for (const size in resizingGroups) {
|
|
77623
77695
|
this.dispatch("RESIZE_COLUMNS_ROWS", {
|
|
@@ -88457,6 +88529,6 @@ exports.tokenColors = tokenColors;
|
|
|
88457
88529
|
exports.tokenize = tokenize;
|
|
88458
88530
|
|
|
88459
88531
|
|
|
88460
|
-
__info__.version = "19.0.
|
|
88461
|
-
__info__.date = "2025-09-
|
|
88462
|
-
__info__.hash = "
|
|
88532
|
+
__info__.version = "19.0.3";
|
|
88533
|
+
__info__.date = "2025-09-19T07:26:41.356Z";
|
|
88534
|
+
__info__.hash = "84f3b74";
|
|
@@ -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.0.
|
|
6
|
-
* @date 2025-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.3
|
|
6
|
+
* @date 2025-09-19T07:26:41.356Z
|
|
7
|
+
* @hash 84f3b74
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -888,6 +888,7 @@ const tokenColors = {
|
|
|
888
888
|
ARG_SEPARATOR: functionColor,
|
|
889
889
|
ORPHAN_RIGHT_PAREN: "#ff0000",
|
|
890
890
|
};
|
|
891
|
+
const DRAG_THRESHOLD = 5; // in pixels, to avoid unwanted drag when clicking
|
|
891
892
|
|
|
892
893
|
//------------------------------------------------------------------------------
|
|
893
894
|
// Miscellaneous
|
|
@@ -1366,8 +1367,19 @@ function memoize(func) {
|
|
|
1366
1367
|
},
|
|
1367
1368
|
}[funcName];
|
|
1368
1369
|
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Removes the specified indexes from the array.
|
|
1372
|
+
* Sparse (empty) elements are transformed to undefined (unless their index is explicitly removed).
|
|
1373
|
+
*/
|
|
1369
1374
|
function removeIndexesFromArray(array, indexes) {
|
|
1370
|
-
|
|
1375
|
+
const toRemove = new Set(indexes);
|
|
1376
|
+
const newArray = [];
|
|
1377
|
+
for (let i = 0; i < array.length; i++) {
|
|
1378
|
+
if (!toRemove.has(i)) {
|
|
1379
|
+
newArray.push(array[i]);
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
return newArray;
|
|
1371
1383
|
}
|
|
1372
1384
|
function insertItemsAtIndex(array, items, index) {
|
|
1373
1385
|
const newArray = [...array];
|
|
@@ -16082,8 +16094,9 @@ function interactiveSort(env, sheetId, anchor, zone, sortDirection, sortOptions)
|
|
|
16082
16094
|
}
|
|
16083
16095
|
|
|
16084
16096
|
function sortMatrix(matrix, locale, ...criteria) {
|
|
16085
|
-
for (
|
|
16086
|
-
|
|
16097
|
+
for (let i = 0; i < criteria.length; i++) {
|
|
16098
|
+
const param = i % 2 === 0 ? "sort_column" : "is_ascending";
|
|
16099
|
+
assert(criteria[i] !== undefined, _t("Value for parameter %s is missing in [[FUNCTION_NAME]].", param));
|
|
16087
16100
|
}
|
|
16088
16101
|
const sortingOrders = [];
|
|
16089
16102
|
const sortColumns = [];
|
|
@@ -32378,7 +32391,11 @@ class CarouselFigure extends Component {
|
|
|
32378
32391
|
onFigureDeleted: Function,
|
|
32379
32392
|
editFigureStyle: { type: Function, optional: true },
|
|
32380
32393
|
};
|
|
32381
|
-
static components = { ChartDashboardMenu };
|
|
32394
|
+
static components = { ChartDashboardMenu, MenuPopover };
|
|
32395
|
+
carouselTabsRef = useRef("carouselTabs");
|
|
32396
|
+
carouselTabsDropdownRef = useRef("carouselTabsDropdown");
|
|
32397
|
+
menuState = useState({ isOpen: false, anchorRect: null, menuItems: [] });
|
|
32398
|
+
hiddenItems = [];
|
|
32382
32399
|
animationStore;
|
|
32383
32400
|
setup() {
|
|
32384
32401
|
this.animationStore = useStore(ChartAnimationStore);
|
|
@@ -32389,6 +32406,7 @@ class CarouselFigure extends Component {
|
|
|
32389
32406
|
else {
|
|
32390
32407
|
this.props.editFigureStyle?.({ "pointer-events": "auto" });
|
|
32391
32408
|
}
|
|
32409
|
+
this.updateTabsVisibility();
|
|
32392
32410
|
});
|
|
32393
32411
|
}
|
|
32394
32412
|
get carousel() {
|
|
@@ -32448,6 +32466,49 @@ class CarouselFigure extends Component {
|
|
|
32448
32466
|
const style = { ...DEFAULT_CAROUSEL_TITLE_STYLE, ...this.carousel.title };
|
|
32449
32467
|
return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle(style)));
|
|
32450
32468
|
}
|
|
32469
|
+
updateTabsVisibility() {
|
|
32470
|
+
const tabsContainerEl = this.carouselTabsRef.el;
|
|
32471
|
+
const dropDownEl = this.carouselTabsDropdownRef.el;
|
|
32472
|
+
if (!tabsContainerEl || !dropDownEl) {
|
|
32473
|
+
return;
|
|
32474
|
+
}
|
|
32475
|
+
this.hiddenItems = [];
|
|
32476
|
+
const containerRect = getBoundingRectAsPOJO(tabsContainerEl);
|
|
32477
|
+
const tabs = Array.from(tabsContainerEl.children);
|
|
32478
|
+
for (const tab of tabs) {
|
|
32479
|
+
tab.style.display = "block";
|
|
32480
|
+
}
|
|
32481
|
+
const tabWidths = tabs.map((tab) => getBoundingRectAsPOJO(tab).width);
|
|
32482
|
+
let currentWidth = 0;
|
|
32483
|
+
for (let i = 0; i < tabs.length; i++) {
|
|
32484
|
+
const shouldBeHidden = currentWidth + tabWidths[i] > containerRect.width;
|
|
32485
|
+
currentWidth += tabWidths[i];
|
|
32486
|
+
if (shouldBeHidden) {
|
|
32487
|
+
tabs[i].style.display = "none";
|
|
32488
|
+
this.hiddenItems.push(this.carousel.items[i]);
|
|
32489
|
+
}
|
|
32490
|
+
}
|
|
32491
|
+
dropDownEl.style.display = this.hiddenItems.length ? "block" : "none";
|
|
32492
|
+
}
|
|
32493
|
+
get menuId() {
|
|
32494
|
+
return "carousel-tabs-menu-";
|
|
32495
|
+
}
|
|
32496
|
+
toggleMenu(ev) {
|
|
32497
|
+
if (ev.closedMenuId === this.menuId) {
|
|
32498
|
+
this.menuState.isOpen = false;
|
|
32499
|
+
return;
|
|
32500
|
+
}
|
|
32501
|
+
const rect = getRefBoundingRect(this.carouselTabsDropdownRef);
|
|
32502
|
+
const menuItems = this.hiddenItems.map((item) => ({
|
|
32503
|
+
name: this.getItemTitle(item),
|
|
32504
|
+
execute: () => this.onCarouselTabClick(item),
|
|
32505
|
+
isActive: () => this.isItemSelected(item),
|
|
32506
|
+
isReadonlyAllowed: true,
|
|
32507
|
+
}));
|
|
32508
|
+
this.menuState.isOpen = true;
|
|
32509
|
+
this.menuState.anchorRect = rect;
|
|
32510
|
+
this.menuState.menuItems = createActions(menuItems);
|
|
32511
|
+
}
|
|
32451
32512
|
}
|
|
32452
32513
|
|
|
32453
32514
|
class ChartFigure extends Component {
|
|
@@ -50435,9 +50496,16 @@ class FiguresContainer extends Component {
|
|
|
50435
50496
|
maxX: this.env.model.getters.getColDimensions(sheetId, this.env.model.getters.getNumberCols(sheetId) - 1).end,
|
|
50436
50497
|
maxY: this.env.model.getters.getRowDimensions(sheetId, this.env.model.getters.getNumberRows(sheetId) - 1).end,
|
|
50437
50498
|
};
|
|
50499
|
+
let hasStartedDnd = false;
|
|
50438
50500
|
const onMouseMove = (ev) => {
|
|
50439
50501
|
const getters = this.env.model.getters;
|
|
50440
50502
|
const currentMousePosition = { x: ev.clientX, y: ev.clientY };
|
|
50503
|
+
const offsetX = Math.abs(currentMousePosition.x - initialMousePosition.x);
|
|
50504
|
+
const offsetY = Math.abs(currentMousePosition.y - initialMousePosition.y);
|
|
50505
|
+
if (!hasStartedDnd && offsetX < DRAG_THRESHOLD && offsetY < DRAG_THRESHOLD) {
|
|
50506
|
+
return; // add a small threshold to avoid dnd when just clicking
|
|
50507
|
+
}
|
|
50508
|
+
hasStartedDnd = true;
|
|
50441
50509
|
const draggedFigure = dragFigureForMove(currentMousePosition, initialMousePosition, initialFigure, maxDimensions, initialScrollPosition, getters.getActiveSheetScrollInfo());
|
|
50442
50510
|
const otherFigures = this.getOtherFigures(initialFigure.id);
|
|
50443
50511
|
const overlappingCarousel = this.getCarouselOverlappingChart(draggedFigure, otherFigures);
|
|
@@ -58849,12 +58917,13 @@ class PivotLayoutConfigurator extends Component {
|
|
|
58849
58917
|
addCalculatedMeasure() {
|
|
58850
58918
|
const { measures } = this.props.definition;
|
|
58851
58919
|
const measureName = this.env.model.getters.generateNewCalculatedMeasureName(measures);
|
|
58920
|
+
const aggregator = "sum";
|
|
58852
58921
|
this.props.onDimensionsUpdated({
|
|
58853
58922
|
measures: measures.concat([
|
|
58854
58923
|
{
|
|
58855
|
-
id: this.getMeasureId(measureName),
|
|
58924
|
+
id: this.getMeasureId(measureName, aggregator),
|
|
58856
58925
|
fieldName: measureName,
|
|
58857
|
-
aggregator
|
|
58926
|
+
aggregator,
|
|
58858
58927
|
computedBy: {
|
|
58859
58928
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
58860
58929
|
formula: "=0",
|
|
@@ -71159,7 +71228,7 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
71159
71228
|
return { value: 0 };
|
|
71160
71229
|
}
|
|
71161
71230
|
const { columns, rows } = super.definition;
|
|
71162
|
-
if (columns.length + rows.length !== domain.length) {
|
|
71231
|
+
if (measure.aggregator && columns.length + rows.length !== domain.length) {
|
|
71163
71232
|
const values = this.getValuesToAggregate(measure, domain);
|
|
71164
71233
|
const aggregator = AGGREGATORS_FN[measure.aggregator];
|
|
71165
71234
|
if (!aggregator) {
|
|
@@ -71178,11 +71247,17 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
71178
71247
|
if (columns.find((col) => col.nameWithGranularity === symbolName)) {
|
|
71179
71248
|
const { colDomain } = domainToColRowDomain(this, domain);
|
|
71180
71249
|
const symbolIndex = colDomain.findIndex((node) => node.field === symbolName);
|
|
71250
|
+
if (symbolIndex === -1) {
|
|
71251
|
+
return new NotAvailableError();
|
|
71252
|
+
}
|
|
71181
71253
|
return this.getPivotHeaderValueAndFormat(colDomain.slice(0, symbolIndex + 1));
|
|
71182
71254
|
}
|
|
71183
71255
|
if (rows.find((row) => row.nameWithGranularity === symbolName)) {
|
|
71184
71256
|
const { rowDomain } = domainToColRowDomain(this, domain);
|
|
71185
71257
|
const symbolIndex = rowDomain.findIndex((row) => row.field === symbolName);
|
|
71258
|
+
if (symbolIndex === -1) {
|
|
71259
|
+
return new NotAvailableError();
|
|
71260
|
+
}
|
|
71186
71261
|
return this.getPivotHeaderValueAndFormat(rowDomain.slice(0, symbolIndex + 1));
|
|
71187
71262
|
}
|
|
71188
71263
|
return this.getPivotCellValueAndFormat(symbolName, domain);
|
|
@@ -77561,13 +77636,10 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
77561
77636
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
77562
77637
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
77563
77638
|
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
77564
|
-
const originalSize =
|
|
77565
|
-
|
|
77566
|
-
|
|
77567
|
-
|
|
77568
|
-
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
77569
|
-
return [element, isDefaultCol ? undefined : size];
|
|
77570
|
-
}));
|
|
77639
|
+
const originalSize = {};
|
|
77640
|
+
for (const element of toRemove) {
|
|
77641
|
+
originalSize[element] = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
|
|
77642
|
+
}
|
|
77571
77643
|
const target = [
|
|
77572
77644
|
{
|
|
77573
77645
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -77611,11 +77683,11 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
77611
77683
|
for (const element of toRemove) {
|
|
77612
77684
|
const size = originalSize[element];
|
|
77613
77685
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
77614
|
-
if (size
|
|
77686
|
+
if (size !== currentSize) {
|
|
77615
77687
|
resizingGroups[size] ??= [];
|
|
77616
77688
|
resizingGroups[size].push(currentIndex);
|
|
77617
|
-
currentIndex += 1;
|
|
77618
77689
|
}
|
|
77690
|
+
currentIndex += 1;
|
|
77619
77691
|
}
|
|
77620
77692
|
for (const size in resizingGroups) {
|
|
77621
77693
|
this.dispatch("RESIZE_COLUMNS_ROWS", {
|
|
@@ -88405,6 +88477,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
88405
88477
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
88406
88478
|
|
|
88407
88479
|
|
|
88408
|
-
__info__.version = "19.0.
|
|
88409
|
-
__info__.date = "2025-09-
|
|
88410
|
-
__info__.hash = "
|
|
88480
|
+
__info__.version = "19.0.3";
|
|
88481
|
+
__info__.date = "2025-09-19T07:26:41.356Z";
|
|
88482
|
+
__info__.hash = "84f3b74";
|