@odoo/o-spreadsheet 18.0.49 → 18.0.50
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 +41 -43
- package/dist/o-spreadsheet.d.ts +5 -24
- package/dist/o-spreadsheet.esm.js +41 -43
- package/dist/o-spreadsheet.iife.js +41 -43
- package/dist/o-spreadsheet.iife.min.js +11 -11
- package/dist/o_spreadsheet.xml +5 -8
- 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 18.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.50
|
|
6
|
+
* @date 2025-12-02T05:32:00.480Z
|
|
7
|
+
* @hash 7ed20c4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -3270,7 +3270,6 @@ const invalidateEvaluationCommands = new Set([
|
|
|
3270
3270
|
"REDO",
|
|
3271
3271
|
"ADD_MERGE",
|
|
3272
3272
|
"REMOVE_MERGE",
|
|
3273
|
-
"DUPLICATE_SHEET",
|
|
3274
3273
|
"UPDATE_LOCALE",
|
|
3275
3274
|
"ADD_PIVOT",
|
|
3276
3275
|
"UPDATE_PIVOT",
|
|
@@ -31847,7 +31846,6 @@ class ChartFigure extends Component {
|
|
|
31847
31846
|
static template = "o-spreadsheet-ChartFigure";
|
|
31848
31847
|
static props = {
|
|
31849
31848
|
figure: Object,
|
|
31850
|
-
onFigureDeleted: Function,
|
|
31851
31849
|
};
|
|
31852
31850
|
static components = {};
|
|
31853
31851
|
onDoubleClick() {
|
|
@@ -31871,7 +31869,6 @@ class ImageFigure extends Component {
|
|
|
31871
31869
|
static template = "o-spreadsheet-ImageFigure";
|
|
31872
31870
|
static props = {
|
|
31873
31871
|
figure: Object,
|
|
31874
|
-
onFigureDeleted: Function,
|
|
31875
31872
|
};
|
|
31876
31873
|
static components = {};
|
|
31877
31874
|
// ---------------------------------------------------------------------------
|
|
@@ -31929,7 +31926,7 @@ figureRegistry.add("image", {
|
|
|
31929
31926
|
borderWidth: 0,
|
|
31930
31927
|
menuBuilder: getImageMenuRegistry,
|
|
31931
31928
|
});
|
|
31932
|
-
function getChartMenu(figureId,
|
|
31929
|
+
function getChartMenu(figureId, env) {
|
|
31933
31930
|
const menuItemSpecs = [
|
|
31934
31931
|
{
|
|
31935
31932
|
id: "edit",
|
|
@@ -31943,11 +31940,11 @@ function getChartMenu(figureId, onFigureDeleted, env) {
|
|
|
31943
31940
|
},
|
|
31944
31941
|
getCopyMenuItem(figureId, env),
|
|
31945
31942
|
getCutMenuItem(figureId, env),
|
|
31946
|
-
getDeleteMenuItem(figureId,
|
|
31943
|
+
getDeleteMenuItem(figureId, env),
|
|
31947
31944
|
];
|
|
31948
31945
|
return createActions(menuItemSpecs);
|
|
31949
31946
|
}
|
|
31950
|
-
function getImageMenuRegistry(figureId,
|
|
31947
|
+
function getImageMenuRegistry(figureId, env) {
|
|
31951
31948
|
const menuItemSpecs = [
|
|
31952
31949
|
getCopyMenuItem(figureId, env),
|
|
31953
31950
|
getCutMenuItem(figureId, env),
|
|
@@ -31973,7 +31970,7 @@ function getImageMenuRegistry(figureId, onFigureDeleted, env) {
|
|
|
31973
31970
|
},
|
|
31974
31971
|
icon: "o-spreadsheet-Icon.REFRESH",
|
|
31975
31972
|
},
|
|
31976
|
-
getDeleteMenuItem(figureId,
|
|
31973
|
+
getDeleteMenuItem(figureId, env),
|
|
31977
31974
|
];
|
|
31978
31975
|
return createActions(menuItemSpecs);
|
|
31979
31976
|
}
|
|
@@ -32005,7 +32002,7 @@ function getCutMenuItem(figureId, env) {
|
|
|
32005
32002
|
icon: "o-spreadsheet-Icon.CUT",
|
|
32006
32003
|
};
|
|
32007
32004
|
}
|
|
32008
|
-
function getDeleteMenuItem(figureId,
|
|
32005
|
+
function getDeleteMenuItem(figureId, env) {
|
|
32009
32006
|
return {
|
|
32010
32007
|
id: "delete",
|
|
32011
32008
|
name: _t("Delete"),
|
|
@@ -32015,7 +32012,6 @@ function getDeleteMenuItem(figureId, onFigureDeleted, env) {
|
|
|
32015
32012
|
sheetId: env.model.getters.getActiveSheetId(),
|
|
32016
32013
|
id: figureId,
|
|
32017
32014
|
});
|
|
32018
|
-
onFigureDeleted();
|
|
32019
32015
|
},
|
|
32020
32016
|
icon: "o-spreadsheet-Icon.TRASH",
|
|
32021
32017
|
};
|
|
@@ -39378,7 +39374,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
39378
39374
|
}
|
|
39379
39375
|
this.selectionStart = start;
|
|
39380
39376
|
this.selectionEnd = end;
|
|
39381
|
-
this.
|
|
39377
|
+
this.stopComposerRangeSelection();
|
|
39382
39378
|
}
|
|
39383
39379
|
stopComposerRangeSelection() {
|
|
39384
39380
|
if (this.isSelectingRange) {
|
|
@@ -44988,7 +44984,6 @@ const dateGranularities = [
|
|
|
44988
44984
|
pivotRegistry.add("SPREADSHEET", {
|
|
44989
44985
|
ui: SpreadsheetPivot,
|
|
44990
44986
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
44991
|
-
externalData: false,
|
|
44992
44987
|
dateGranularities: [...dateGranularities],
|
|
44993
44988
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
44994
44989
|
isMeasureCandidate: (field) => !["datetime", "boolean"].includes(field.type),
|
|
@@ -46609,13 +46604,11 @@ class FigureComponent extends Component {
|
|
|
46609
46604
|
static props = {
|
|
46610
46605
|
figure: Object,
|
|
46611
46606
|
style: { type: String, optional: true },
|
|
46612
|
-
onFigureDeleted: { type: Function, optional: true },
|
|
46613
46607
|
onMouseDown: { type: Function, optional: true },
|
|
46614
46608
|
onClickAnchor: { type: Function, optional: true },
|
|
46615
46609
|
};
|
|
46616
46610
|
static components = { Menu };
|
|
46617
46611
|
static defaultProps = {
|
|
46618
|
-
onFigureDeleted: () => { },
|
|
46619
46612
|
onMouseDown: () => { },
|
|
46620
46613
|
onClickAnchor: () => { },
|
|
46621
46614
|
};
|
|
@@ -46689,9 +46682,6 @@ class FigureComponent extends Component {
|
|
|
46689
46682
|
el?.focus({ preventScroll: true });
|
|
46690
46683
|
}
|
|
46691
46684
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
46692
|
-
onWillUnmount(() => {
|
|
46693
|
-
this.props.onFigureDeleted();
|
|
46694
|
-
});
|
|
46695
46685
|
}
|
|
46696
46686
|
clickAnchor(dirX, dirY, ev) {
|
|
46697
46687
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -46709,7 +46699,6 @@ class FigureComponent extends Component {
|
|
|
46709
46699
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
46710
46700
|
id: figure.id,
|
|
46711
46701
|
});
|
|
46712
|
-
this.props.onFigureDeleted();
|
|
46713
46702
|
ev.preventDefault();
|
|
46714
46703
|
ev.stopPropagation();
|
|
46715
46704
|
break;
|
|
@@ -46773,7 +46762,7 @@ class FigureComponent extends Component {
|
|
|
46773
46762
|
this.menuState.position = position;
|
|
46774
46763
|
this.menuState.menuItems = figureRegistry
|
|
46775
46764
|
.get(this.props.figure.tag)
|
|
46776
|
-
.menuBuilder(this.props.figure.id, this.
|
|
46765
|
+
.menuBuilder(this.props.figure.id, this.env);
|
|
46777
46766
|
}
|
|
46778
46767
|
}
|
|
46779
46768
|
|
|
@@ -47973,9 +47962,7 @@ css /*SCSS*/ `
|
|
|
47973
47962
|
*/
|
|
47974
47963
|
class FiguresContainer extends Component {
|
|
47975
47964
|
static template = "o-spreadsheet-FiguresContainer";
|
|
47976
|
-
static props = {
|
|
47977
|
-
onFigureDeleted: Function,
|
|
47978
|
-
};
|
|
47965
|
+
static props = {};
|
|
47979
47966
|
static components = { FigureComponent };
|
|
47980
47967
|
dnd = useState({
|
|
47981
47968
|
draggedFigure: undefined,
|
|
@@ -48332,16 +48319,16 @@ css /* scss */ `
|
|
|
48332
48319
|
`;
|
|
48333
48320
|
class GridAddRowsFooter extends Component {
|
|
48334
48321
|
static template = "o-spreadsheet-GridAddRowsFooter";
|
|
48335
|
-
static props = {
|
|
48336
|
-
focusGrid: Function,
|
|
48337
|
-
};
|
|
48322
|
+
static props = {};
|
|
48338
48323
|
static components = { ValidationMessages };
|
|
48324
|
+
DOMFocusableElementStore;
|
|
48339
48325
|
inputRef = useRef("inputRef");
|
|
48340
48326
|
state = useState({
|
|
48341
48327
|
inputValue: "100",
|
|
48342
48328
|
errorFlag: false,
|
|
48343
48329
|
});
|
|
48344
48330
|
setup() {
|
|
48331
|
+
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
48345
48332
|
useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
48346
48333
|
}
|
|
48347
48334
|
get addRowsPosition() {
|
|
@@ -48359,7 +48346,7 @@ class GridAddRowsFooter extends Component {
|
|
|
48359
48346
|
}
|
|
48360
48347
|
onKeydown(ev) {
|
|
48361
48348
|
if (ev.key.toUpperCase() === "ESCAPE") {
|
|
48362
|
-
this.
|
|
48349
|
+
this.focusDefaultElement();
|
|
48363
48350
|
}
|
|
48364
48351
|
else if (ev.key.toUpperCase() === "ENTER") {
|
|
48365
48352
|
this.onConfirm();
|
|
@@ -48385,7 +48372,7 @@ class GridAddRowsFooter extends Component {
|
|
|
48385
48372
|
quantity,
|
|
48386
48373
|
dimension: "ROW",
|
|
48387
48374
|
});
|
|
48388
|
-
this.
|
|
48375
|
+
this.focusDefaultElement();
|
|
48389
48376
|
// After adding new rows, scroll down to the new last row
|
|
48390
48377
|
const { scrollX } = this.env.model.getters.getActiveSheetDOMScrollInfo();
|
|
48391
48378
|
const { end } = this.env.model.getters.getRowDimensions(activeSheetId, rowNumber + quantity - 1);
|
|
@@ -48398,7 +48385,12 @@ class GridAddRowsFooter extends Component {
|
|
|
48398
48385
|
if (this.inputRef.el !== document.activeElement || ev.target === this.inputRef.el) {
|
|
48399
48386
|
return;
|
|
48400
48387
|
}
|
|
48401
|
-
this.
|
|
48388
|
+
this.focusDefaultElement();
|
|
48389
|
+
}
|
|
48390
|
+
focusDefaultElement() {
|
|
48391
|
+
if (document.activeElement === this.inputRef.el) {
|
|
48392
|
+
this.DOMFocusableElementStore.focus();
|
|
48393
|
+
}
|
|
48402
48394
|
}
|
|
48403
48395
|
}
|
|
48404
48396
|
|
|
@@ -48587,7 +48579,6 @@ class GridOverlay extends Component {
|
|
|
48587
48579
|
onCellClicked: { type: Function, optional: true },
|
|
48588
48580
|
onCellRightClicked: { type: Function, optional: true },
|
|
48589
48581
|
onGridResized: { type: Function, optional: true },
|
|
48590
|
-
onFigureDeleted: { type: Function, optional: true },
|
|
48591
48582
|
onGridMoved: Function,
|
|
48592
48583
|
gridOverlayDimensions: String,
|
|
48593
48584
|
};
|
|
@@ -48603,7 +48594,6 @@ class GridOverlay extends Component {
|
|
|
48603
48594
|
onCellClicked: () => { },
|
|
48604
48595
|
onCellRightClicked: () => { },
|
|
48605
48596
|
onGridResized: () => { },
|
|
48606
|
-
onFigureDeleted: () => { },
|
|
48607
48597
|
};
|
|
48608
48598
|
gridOverlay = useRef("gridOverlay");
|
|
48609
48599
|
gridOverlayRect = useAbsoluteBoundingRect(this.gridOverlay);
|
|
@@ -57395,10 +57385,17 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
57395
57385
|
if (!pivot) {
|
|
57396
57386
|
continue;
|
|
57397
57387
|
}
|
|
57398
|
-
|
|
57388
|
+
const def = deepCopy(pivot.definition);
|
|
57389
|
+
for (const measure of def.measures) {
|
|
57399
57390
|
if (measure.computedBy?.formula === formulaString) {
|
|
57400
|
-
const measureIndex =
|
|
57401
|
-
|
|
57391
|
+
const measureIndex = def.measures.indexOf(measure);
|
|
57392
|
+
if (measureIndex !== -1) {
|
|
57393
|
+
def.measures[measureIndex].computedBy = {
|
|
57394
|
+
formula: newFormulaString,
|
|
57395
|
+
sheetId,
|
|
57396
|
+
};
|
|
57397
|
+
}
|
|
57398
|
+
this.dispatch("UPDATE_PIVOT", { pivotId, pivot: def });
|
|
57402
57399
|
}
|
|
57403
57400
|
}
|
|
57404
57401
|
}
|
|
@@ -57531,6 +57528,9 @@ class SpreadsheetPivotCorePlugin extends CorePlugin {
|
|
|
57531
57528
|
const { sheetId, zone } = definition.dataSet;
|
|
57532
57529
|
const range = this.getters.getRangeFromZone(sheetId, zone);
|
|
57533
57530
|
const adaptedRange = adaptPivotRange(range, applyChange);
|
|
57531
|
+
if (adaptedRange === range) {
|
|
57532
|
+
return;
|
|
57533
|
+
}
|
|
57534
57534
|
const dataSet = adaptedRange && {
|
|
57535
57535
|
sheetId: adaptedRange.sheetId,
|
|
57536
57536
|
zone: adaptedRange.zone,
|
|
@@ -61286,9 +61286,7 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
61286
61286
|
handle(cmd) {
|
|
61287
61287
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
61288
61288
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
61289
|
-
|
|
61290
|
-
this.setupPivot(pivotId, { recreate: true });
|
|
61291
|
-
}
|
|
61289
|
+
this.setupPivot(pivotId, { recreate: true });
|
|
61292
61290
|
}
|
|
61293
61291
|
}
|
|
61294
61292
|
switch (cmd.type) {
|
|
@@ -61493,7 +61491,7 @@ class PivotUIPlugin extends UIPlugin {
|
|
|
61493
61491
|
pivot.init({ reload: true });
|
|
61494
61492
|
}
|
|
61495
61493
|
setupPivot(pivotId, { recreate } = { recreate: false }) {
|
|
61496
|
-
const definition = this.getters.getPivotCoreDefinition(pivotId);
|
|
61494
|
+
const definition = deepCopy(this.getters.getPivotCoreDefinition(pivotId));
|
|
61497
61495
|
if (!(pivotId in this.pivots)) {
|
|
61498
61496
|
const Pivot = withPivotPresentationLayer(pivotRegistry.get(definition.type).ui);
|
|
61499
61497
|
this.pivots[pivotId] = new Pivot(this.custom, { definition, getters: this.getters });
|
|
@@ -70287,7 +70285,7 @@ class Spreadsheet extends Component {
|
|
|
70287
70285
|
document.activeElement?.contains(this.spreadsheetRef.el)) {
|
|
70288
70286
|
this.focusGrid();
|
|
70289
70287
|
}
|
|
70290
|
-
}
|
|
70288
|
+
});
|
|
70291
70289
|
useExternalListener(window, "resize", () => this.render(true));
|
|
70292
70290
|
// For some reason, the wheel event is not properly registered inside templates
|
|
70293
70291
|
// in Chromium-based browsers based on chromium 125
|
|
@@ -74727,6 +74725,6 @@ const constants = {
|
|
|
74727
74725
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
74728
74726
|
|
|
74729
74727
|
|
|
74730
|
-
__info__.version = "18.0.
|
|
74731
|
-
__info__.date = "2025-
|
|
74732
|
-
__info__.hash = "
|
|
74728
|
+
__info__.version = "18.0.50";
|
|
74729
|
+
__info__.date = "2025-12-02T05:32:00.480Z";
|
|
74730
|
+
__info__.hash = "7ed20c4";
|
|
@@ -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 18.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.50
|
|
6
|
+
* @date 2025-12-02T05:32:00.480Z
|
|
7
|
+
* @hash 7ed20c4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -3271,7 +3271,6 @@
|
|
|
3271
3271
|
"REDO",
|
|
3272
3272
|
"ADD_MERGE",
|
|
3273
3273
|
"REMOVE_MERGE",
|
|
3274
|
-
"DUPLICATE_SHEET",
|
|
3275
3274
|
"UPDATE_LOCALE",
|
|
3276
3275
|
"ADD_PIVOT",
|
|
3277
3276
|
"UPDATE_PIVOT",
|
|
@@ -31848,7 +31847,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31848
31847
|
static template = "o-spreadsheet-ChartFigure";
|
|
31849
31848
|
static props = {
|
|
31850
31849
|
figure: Object,
|
|
31851
|
-
onFigureDeleted: Function,
|
|
31852
31850
|
};
|
|
31853
31851
|
static components = {};
|
|
31854
31852
|
onDoubleClick() {
|
|
@@ -31872,7 +31870,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31872
31870
|
static template = "o-spreadsheet-ImageFigure";
|
|
31873
31871
|
static props = {
|
|
31874
31872
|
figure: Object,
|
|
31875
|
-
onFigureDeleted: Function,
|
|
31876
31873
|
};
|
|
31877
31874
|
static components = {};
|
|
31878
31875
|
// ---------------------------------------------------------------------------
|
|
@@ -31930,7 +31927,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31930
31927
|
borderWidth: 0,
|
|
31931
31928
|
menuBuilder: getImageMenuRegistry,
|
|
31932
31929
|
});
|
|
31933
|
-
function getChartMenu(figureId,
|
|
31930
|
+
function getChartMenu(figureId, env) {
|
|
31934
31931
|
const menuItemSpecs = [
|
|
31935
31932
|
{
|
|
31936
31933
|
id: "edit",
|
|
@@ -31944,11 +31941,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31944
31941
|
},
|
|
31945
31942
|
getCopyMenuItem(figureId, env),
|
|
31946
31943
|
getCutMenuItem(figureId, env),
|
|
31947
|
-
getDeleteMenuItem(figureId,
|
|
31944
|
+
getDeleteMenuItem(figureId, env),
|
|
31948
31945
|
];
|
|
31949
31946
|
return createActions(menuItemSpecs);
|
|
31950
31947
|
}
|
|
31951
|
-
function getImageMenuRegistry(figureId,
|
|
31948
|
+
function getImageMenuRegistry(figureId, env) {
|
|
31952
31949
|
const menuItemSpecs = [
|
|
31953
31950
|
getCopyMenuItem(figureId, env),
|
|
31954
31951
|
getCutMenuItem(figureId, env),
|
|
@@ -31974,7 +31971,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31974
31971
|
},
|
|
31975
31972
|
icon: "o-spreadsheet-Icon.REFRESH",
|
|
31976
31973
|
},
|
|
31977
|
-
getDeleteMenuItem(figureId,
|
|
31974
|
+
getDeleteMenuItem(figureId, env),
|
|
31978
31975
|
];
|
|
31979
31976
|
return createActions(menuItemSpecs);
|
|
31980
31977
|
}
|
|
@@ -32006,7 +32003,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32006
32003
|
icon: "o-spreadsheet-Icon.CUT",
|
|
32007
32004
|
};
|
|
32008
32005
|
}
|
|
32009
|
-
function getDeleteMenuItem(figureId,
|
|
32006
|
+
function getDeleteMenuItem(figureId, env) {
|
|
32010
32007
|
return {
|
|
32011
32008
|
id: "delete",
|
|
32012
32009
|
name: _t("Delete"),
|
|
@@ -32016,7 +32013,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32016
32013
|
sheetId: env.model.getters.getActiveSheetId(),
|
|
32017
32014
|
id: figureId,
|
|
32018
32015
|
});
|
|
32019
|
-
onFigureDeleted();
|
|
32020
32016
|
},
|
|
32021
32017
|
icon: "o-spreadsheet-Icon.TRASH",
|
|
32022
32018
|
};
|
|
@@ -39379,7 +39375,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
39379
39375
|
}
|
|
39380
39376
|
this.selectionStart = start;
|
|
39381
39377
|
this.selectionEnd = end;
|
|
39382
|
-
this.
|
|
39378
|
+
this.stopComposerRangeSelection();
|
|
39383
39379
|
}
|
|
39384
39380
|
stopComposerRangeSelection() {
|
|
39385
39381
|
if (this.isSelectingRange) {
|
|
@@ -44989,7 +44985,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44989
44985
|
pivotRegistry.add("SPREADSHEET", {
|
|
44990
44986
|
ui: SpreadsheetPivot,
|
|
44991
44987
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
44992
|
-
externalData: false,
|
|
44993
44988
|
dateGranularities: [...dateGranularities],
|
|
44994
44989
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
44995
44990
|
isMeasureCandidate: (field) => !["datetime", "boolean"].includes(field.type),
|
|
@@ -46610,13 +46605,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46610
46605
|
static props = {
|
|
46611
46606
|
figure: Object,
|
|
46612
46607
|
style: { type: String, optional: true },
|
|
46613
|
-
onFigureDeleted: { type: Function, optional: true },
|
|
46614
46608
|
onMouseDown: { type: Function, optional: true },
|
|
46615
46609
|
onClickAnchor: { type: Function, optional: true },
|
|
46616
46610
|
};
|
|
46617
46611
|
static components = { Menu };
|
|
46618
46612
|
static defaultProps = {
|
|
46619
|
-
onFigureDeleted: () => { },
|
|
46620
46613
|
onMouseDown: () => { },
|
|
46621
46614
|
onClickAnchor: () => { },
|
|
46622
46615
|
};
|
|
@@ -46690,9 +46683,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46690
46683
|
el?.focus({ preventScroll: true });
|
|
46691
46684
|
}
|
|
46692
46685
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
46693
|
-
owl.onWillUnmount(() => {
|
|
46694
|
-
this.props.onFigureDeleted();
|
|
46695
|
-
});
|
|
46696
46686
|
}
|
|
46697
46687
|
clickAnchor(dirX, dirY, ev) {
|
|
46698
46688
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -46710,7 +46700,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46710
46700
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
46711
46701
|
id: figure.id,
|
|
46712
46702
|
});
|
|
46713
|
-
this.props.onFigureDeleted();
|
|
46714
46703
|
ev.preventDefault();
|
|
46715
46704
|
ev.stopPropagation();
|
|
46716
46705
|
break;
|
|
@@ -46774,7 +46763,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46774
46763
|
this.menuState.position = position;
|
|
46775
46764
|
this.menuState.menuItems = figureRegistry
|
|
46776
46765
|
.get(this.props.figure.tag)
|
|
46777
|
-
.menuBuilder(this.props.figure.id, this.
|
|
46766
|
+
.menuBuilder(this.props.figure.id, this.env);
|
|
46778
46767
|
}
|
|
46779
46768
|
}
|
|
46780
46769
|
|
|
@@ -47974,9 +47963,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47974
47963
|
*/
|
|
47975
47964
|
class FiguresContainer extends owl.Component {
|
|
47976
47965
|
static template = "o-spreadsheet-FiguresContainer";
|
|
47977
|
-
static props = {
|
|
47978
|
-
onFigureDeleted: Function,
|
|
47979
|
-
};
|
|
47966
|
+
static props = {};
|
|
47980
47967
|
static components = { FigureComponent };
|
|
47981
47968
|
dnd = owl.useState({
|
|
47982
47969
|
draggedFigure: undefined,
|
|
@@ -48333,16 +48320,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48333
48320
|
`;
|
|
48334
48321
|
class GridAddRowsFooter extends owl.Component {
|
|
48335
48322
|
static template = "o-spreadsheet-GridAddRowsFooter";
|
|
48336
|
-
static props = {
|
|
48337
|
-
focusGrid: Function,
|
|
48338
|
-
};
|
|
48323
|
+
static props = {};
|
|
48339
48324
|
static components = { ValidationMessages };
|
|
48325
|
+
DOMFocusableElementStore;
|
|
48340
48326
|
inputRef = owl.useRef("inputRef");
|
|
48341
48327
|
state = owl.useState({
|
|
48342
48328
|
inputValue: "100",
|
|
48343
48329
|
errorFlag: false,
|
|
48344
48330
|
});
|
|
48345
48331
|
setup() {
|
|
48332
|
+
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
48346
48333
|
owl.useExternalListener(window, "click", this.onExternalClick, { capture: true });
|
|
48347
48334
|
}
|
|
48348
48335
|
get addRowsPosition() {
|
|
@@ -48360,7 +48347,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48360
48347
|
}
|
|
48361
48348
|
onKeydown(ev) {
|
|
48362
48349
|
if (ev.key.toUpperCase() === "ESCAPE") {
|
|
48363
|
-
this.
|
|
48350
|
+
this.focusDefaultElement();
|
|
48364
48351
|
}
|
|
48365
48352
|
else if (ev.key.toUpperCase() === "ENTER") {
|
|
48366
48353
|
this.onConfirm();
|
|
@@ -48386,7 +48373,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48386
48373
|
quantity,
|
|
48387
48374
|
dimension: "ROW",
|
|
48388
48375
|
});
|
|
48389
|
-
this.
|
|
48376
|
+
this.focusDefaultElement();
|
|
48390
48377
|
// After adding new rows, scroll down to the new last row
|
|
48391
48378
|
const { scrollX } = this.env.model.getters.getActiveSheetDOMScrollInfo();
|
|
48392
48379
|
const { end } = this.env.model.getters.getRowDimensions(activeSheetId, rowNumber + quantity - 1);
|
|
@@ -48399,7 +48386,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48399
48386
|
if (this.inputRef.el !== document.activeElement || ev.target === this.inputRef.el) {
|
|
48400
48387
|
return;
|
|
48401
48388
|
}
|
|
48402
|
-
this.
|
|
48389
|
+
this.focusDefaultElement();
|
|
48390
|
+
}
|
|
48391
|
+
focusDefaultElement() {
|
|
48392
|
+
if (document.activeElement === this.inputRef.el) {
|
|
48393
|
+
this.DOMFocusableElementStore.focus();
|
|
48394
|
+
}
|
|
48403
48395
|
}
|
|
48404
48396
|
}
|
|
48405
48397
|
|
|
@@ -48588,7 +48580,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48588
48580
|
onCellClicked: { type: Function, optional: true },
|
|
48589
48581
|
onCellRightClicked: { type: Function, optional: true },
|
|
48590
48582
|
onGridResized: { type: Function, optional: true },
|
|
48591
|
-
onFigureDeleted: { type: Function, optional: true },
|
|
48592
48583
|
onGridMoved: Function,
|
|
48593
48584
|
gridOverlayDimensions: String,
|
|
48594
48585
|
};
|
|
@@ -48604,7 +48595,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48604
48595
|
onCellClicked: () => { },
|
|
48605
48596
|
onCellRightClicked: () => { },
|
|
48606
48597
|
onGridResized: () => { },
|
|
48607
|
-
onFigureDeleted: () => { },
|
|
48608
48598
|
};
|
|
48609
48599
|
gridOverlay = owl.useRef("gridOverlay");
|
|
48610
48600
|
gridOverlayRect = useAbsoluteBoundingRect(this.gridOverlay);
|
|
@@ -57396,10 +57386,17 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57396
57386
|
if (!pivot) {
|
|
57397
57387
|
continue;
|
|
57398
57388
|
}
|
|
57399
|
-
|
|
57389
|
+
const def = deepCopy(pivot.definition);
|
|
57390
|
+
for (const measure of def.measures) {
|
|
57400
57391
|
if (measure.computedBy?.formula === formulaString) {
|
|
57401
|
-
const measureIndex =
|
|
57402
|
-
|
|
57392
|
+
const measureIndex = def.measures.indexOf(measure);
|
|
57393
|
+
if (measureIndex !== -1) {
|
|
57394
|
+
def.measures[measureIndex].computedBy = {
|
|
57395
|
+
formula: newFormulaString,
|
|
57396
|
+
sheetId,
|
|
57397
|
+
};
|
|
57398
|
+
}
|
|
57399
|
+
this.dispatch("UPDATE_PIVOT", { pivotId, pivot: def });
|
|
57403
57400
|
}
|
|
57404
57401
|
}
|
|
57405
57402
|
}
|
|
@@ -57532,6 +57529,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57532
57529
|
const { sheetId, zone } = definition.dataSet;
|
|
57533
57530
|
const range = this.getters.getRangeFromZone(sheetId, zone);
|
|
57534
57531
|
const adaptedRange = adaptPivotRange(range, applyChange);
|
|
57532
|
+
if (adaptedRange === range) {
|
|
57533
|
+
return;
|
|
57534
|
+
}
|
|
57535
57535
|
const dataSet = adaptedRange && {
|
|
57536
57536
|
sheetId: adaptedRange.sheetId,
|
|
57537
57537
|
zone: adaptedRange.zone,
|
|
@@ -61287,9 +61287,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61287
61287
|
handle(cmd) {
|
|
61288
61288
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
61289
61289
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
61290
|
-
|
|
61291
|
-
this.setupPivot(pivotId, { recreate: true });
|
|
61292
|
-
}
|
|
61290
|
+
this.setupPivot(pivotId, { recreate: true });
|
|
61293
61291
|
}
|
|
61294
61292
|
}
|
|
61295
61293
|
switch (cmd.type) {
|
|
@@ -61494,7 +61492,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61494
61492
|
pivot.init({ reload: true });
|
|
61495
61493
|
}
|
|
61496
61494
|
setupPivot(pivotId, { recreate } = { recreate: false }) {
|
|
61497
|
-
const definition = this.getters.getPivotCoreDefinition(pivotId);
|
|
61495
|
+
const definition = deepCopy(this.getters.getPivotCoreDefinition(pivotId));
|
|
61498
61496
|
if (!(pivotId in this.pivots)) {
|
|
61499
61497
|
const Pivot = withPivotPresentationLayer(pivotRegistry.get(definition.type).ui);
|
|
61500
61498
|
this.pivots[pivotId] = new Pivot(this.custom, { definition, getters: this.getters });
|
|
@@ -70288,7 +70286,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
70288
70286
|
document.activeElement?.contains(this.spreadsheetRef.el)) {
|
|
70289
70287
|
this.focusGrid();
|
|
70290
70288
|
}
|
|
70291
|
-
}
|
|
70289
|
+
});
|
|
70292
70290
|
owl.useExternalListener(window, "resize", () => this.render(true));
|
|
70293
70291
|
// For some reason, the wheel event is not properly registered inside templates
|
|
70294
70292
|
// in Chromium-based browsers based on chromium 125
|
|
@@ -74771,9 +74769,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
74771
74769
|
exports.tokenize = tokenize;
|
|
74772
74770
|
|
|
74773
74771
|
|
|
74774
|
-
__info__.version = "18.0.
|
|
74775
|
-
__info__.date = "2025-
|
|
74776
|
-
__info__.hash = "
|
|
74772
|
+
__info__.version = "18.0.50";
|
|
74773
|
+
__info__.date = "2025-12-02T05:32:00.480Z";
|
|
74774
|
+
__info__.hash = "7ed20c4";
|
|
74777
74775
|
|
|
74778
74776
|
|
|
74779
74777
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|