@odoo/o-spreadsheet 18.4.17 → 18.4.19
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 +114 -51
- package/dist/o-spreadsheet.d.ts +11 -8
- package/dist/o-spreadsheet.esm.js +114 -51
- package/dist/o-spreadsheet.iife.js +114 -51
- package/dist/o-spreadsheet.iife.min.js +377 -377
- package/dist/o_spreadsheet.xml +4 -3
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.4.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.19
|
|
6
|
+
* @date 2025-12-02T05:34:03.902Z
|
|
7
|
+
* @hash 95b1252
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -2614,7 +2614,6 @@
|
|
|
2614
2614
|
"REDO",
|
|
2615
2615
|
"ADD_MERGE",
|
|
2616
2616
|
"REMOVE_MERGE",
|
|
2617
|
-
"DUPLICATE_SHEET",
|
|
2618
2617
|
"UPDATE_LOCALE",
|
|
2619
2618
|
"ADD_PIVOT",
|
|
2620
2619
|
"UPDATE_PIVOT",
|
|
@@ -18542,7 +18541,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18542
18541
|
function setXcToFixedReferenceType(xc, referenceType) {
|
|
18543
18542
|
let sheetName;
|
|
18544
18543
|
({ sheetName, xc } = splitReference(xc));
|
|
18545
|
-
sheetName = sheetName ? sheetName + "!" : "";
|
|
18544
|
+
sheetName = sheetName ? getCanonicalSymbolName(sheetName) + "!" : "";
|
|
18546
18545
|
xc = xc.replace(/\$/g, "");
|
|
18547
18546
|
const splitIndex = xc.indexOf(":");
|
|
18548
18547
|
if (splitIndex >= 0) {
|
|
@@ -22583,6 +22582,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22583
22582
|
}));
|
|
22584
22583
|
}
|
|
22585
22584
|
function getTreeMapColorScale(tree, coloringOption) {
|
|
22585
|
+
if (tree.length === 0) {
|
|
22586
|
+
return undefined;
|
|
22587
|
+
}
|
|
22586
22588
|
const treeNodesByLevel = pyramidizeTree(tree);
|
|
22587
22589
|
const nodes = treeNodesByLevel[treeNodesByLevel.length - 1];
|
|
22588
22590
|
const minValue = Math.min(...nodes.map((node) => node.value));
|
|
@@ -24252,11 +24254,18 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24252
24254
|
// we have to add the canvas to the DOM otherwise it won't be rendered
|
|
24253
24255
|
document.body.append(div);
|
|
24254
24256
|
if ("chartJsConfig" in runtime) {
|
|
24257
|
+
const extensionsLoaded = areChartJSExtensionsLoaded();
|
|
24258
|
+
if (!extensionsLoaded) {
|
|
24259
|
+
registerChartJSExtensions();
|
|
24260
|
+
}
|
|
24255
24261
|
const config = deepCopy(runtime.chartJsConfig);
|
|
24256
24262
|
config.plugins = [backgroundColorChartJSPlugin];
|
|
24257
24263
|
const chart = new window.Chart(canvas, config);
|
|
24258
24264
|
imageContent = chart.toBase64Image();
|
|
24259
24265
|
chart.destroy();
|
|
24266
|
+
if (!extensionsLoaded) {
|
|
24267
|
+
unregisterChartJsExtensions();
|
|
24268
|
+
}
|
|
24260
24269
|
}
|
|
24261
24270
|
else if (type === "scorecard") {
|
|
24262
24271
|
const design = getScorecardConfiguration(figure, runtime);
|
|
@@ -24286,11 +24295,18 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24286
24295
|
document.body.append(div);
|
|
24287
24296
|
let chartBlob = null;
|
|
24288
24297
|
if ("chartJsConfig" in runtime) {
|
|
24298
|
+
const extensionsLoaded = areChartJSExtensionsLoaded();
|
|
24299
|
+
if (!extensionsLoaded) {
|
|
24300
|
+
registerChartJSExtensions();
|
|
24301
|
+
}
|
|
24289
24302
|
const config = deepCopy(runtime.chartJsConfig);
|
|
24290
24303
|
config.plugins = [backgroundColorChartJSPlugin];
|
|
24291
24304
|
const chart = new window.Chart(canvas, config);
|
|
24292
24305
|
chartBlob = await new Promise((resolve) => canvas.toBlob(resolve, "image/png"));
|
|
24293
24306
|
chart.destroy();
|
|
24307
|
+
if (!extensionsLoaded) {
|
|
24308
|
+
unregisterChartJsExtensions();
|
|
24309
|
+
}
|
|
24294
24310
|
}
|
|
24295
24311
|
else if (type === "scorecard") {
|
|
24296
24312
|
const design = getScorecardConfiguration(figure, runtime);
|
|
@@ -32643,6 +32659,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32643
32659
|
}
|
|
32644
32660
|
this.selectionStart = start;
|
|
32645
32661
|
this.selectionEnd = end;
|
|
32662
|
+
this.stopComposerRangeSelection();
|
|
32646
32663
|
this.computeFormulaCursorContext();
|
|
32647
32664
|
this.computeParenthesisRelatedToCursor();
|
|
32648
32665
|
this.updateAutoCompleteProvider();
|
|
@@ -33318,10 +33335,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33318
33335
|
hideHelp() {
|
|
33319
33336
|
this.autoComplete.hide();
|
|
33320
33337
|
}
|
|
33321
|
-
autoCompleteOrStop(direction) {
|
|
33338
|
+
autoCompleteOrStop(direction, assistantForcedClosed = false) {
|
|
33322
33339
|
if (this.editionMode !== "inactive") {
|
|
33323
33340
|
const autoComplete = this.autoComplete;
|
|
33324
|
-
|
|
33341
|
+
const suppressAutocomplete = assistantForcedClosed && this.canBeToggled;
|
|
33342
|
+
if (!suppressAutocomplete &&
|
|
33343
|
+
autoComplete.provider &&
|
|
33344
|
+
autoComplete.selectedIndex !== undefined) {
|
|
33325
33345
|
const autoCompleteValue = autoComplete.provider.proposals[autoComplete.selectedIndex]?.text;
|
|
33326
33346
|
if (autoCompleteValue) {
|
|
33327
33347
|
this.autoComplete.provider?.selectProposal(autoCompleteValue);
|
|
@@ -33544,7 +33564,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33544
33564
|
assistantStyle["max-height"] = `${availableSpaceAbove - CLOSE_ICON_RADIUS}px`;
|
|
33545
33565
|
// render top
|
|
33546
33566
|
// We compensate 2 px of margin on the assistant style + 1px for design reasons
|
|
33547
|
-
assistantStyle.
|
|
33567
|
+
assistantStyle.top = `-3px`;
|
|
33568
|
+
assistantStyle.transform = `translate(0, -100%)`;
|
|
33548
33569
|
}
|
|
33549
33570
|
if (cellX + ASSISTANT_WIDTH > this.props.delimitation.width) {
|
|
33550
33571
|
// render left
|
|
@@ -33664,16 +33685,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33664
33685
|
processTabKey(ev, direction) {
|
|
33665
33686
|
ev.preventDefault();
|
|
33666
33687
|
ev.stopPropagation();
|
|
33667
|
-
|
|
33668
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33669
|
-
}
|
|
33688
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33670
33689
|
}
|
|
33671
33690
|
processEnterKey(ev, direction) {
|
|
33672
33691
|
ev.preventDefault();
|
|
33673
33692
|
ev.stopPropagation();
|
|
33674
|
-
|
|
33675
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33676
|
-
}
|
|
33693
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33677
33694
|
}
|
|
33678
33695
|
processNewLineEvent(ev) {
|
|
33679
33696
|
ev.preventDefault();
|
|
@@ -33849,7 +33866,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33849
33866
|
return;
|
|
33850
33867
|
}
|
|
33851
33868
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
33852
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
33853
33869
|
this.props.onComposerContentFocused();
|
|
33854
33870
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
33855
33871
|
this.processTokenAtCursor();
|
|
@@ -47370,10 +47386,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47370
47386
|
this.state.waitingForMove = false;
|
|
47371
47387
|
}
|
|
47372
47388
|
onMouseMove(ev) {
|
|
47373
|
-
if (this.env.isMobile()
|
|
47374
|
-
|
|
47375
|
-
|
|
47376
|
-
|
|
47389
|
+
if (this.env.isMobile() ||
|
|
47390
|
+
this.env.model.getters.isReadonly() ||
|
|
47391
|
+
this.state.isResizing ||
|
|
47392
|
+
this.state.isMoving ||
|
|
47393
|
+
this.state.isSelecting) {
|
|
47377
47394
|
return;
|
|
47378
47395
|
}
|
|
47379
47396
|
this._computeHandleDisplay(ev);
|
|
@@ -47440,6 +47457,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47440
47457
|
if (index < 0) {
|
|
47441
47458
|
return;
|
|
47442
47459
|
}
|
|
47460
|
+
if (this.env.model.getters.isReadonly()) {
|
|
47461
|
+
this._selectElement(index, false);
|
|
47462
|
+
return;
|
|
47463
|
+
}
|
|
47443
47464
|
if (this.state.waitingForMove) {
|
|
47444
47465
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
47445
47466
|
this._selectElement(index, false);
|
|
@@ -48800,7 +48821,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48800
48821
|
const verticalScrollFactor = 1;
|
|
48801
48822
|
const horizontalScrollFactor = 1;
|
|
48802
48823
|
const resetTimeoutDuration = 100;
|
|
48803
|
-
function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
48824
|
+
function useTouchScroll(ref, updateScroll, canMoveUp, canMoveDown) {
|
|
48804
48825
|
let lastX = 0;
|
|
48805
48826
|
let lastY = 0;
|
|
48806
48827
|
let velocityX = 0;
|
|
@@ -48837,7 +48858,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48837
48858
|
lastX = clientX;
|
|
48838
48859
|
lastY = clientY;
|
|
48839
48860
|
lastTime = currentTime;
|
|
48840
|
-
if (canMoveUp()) {
|
|
48861
|
+
if ((deltaY < 0 && canMoveUp()) || (deltaY > 0 && canMoveDown())) {
|
|
48841
48862
|
if (event.cancelable) {
|
|
48842
48863
|
event.preventDefault();
|
|
48843
48864
|
}
|
|
@@ -54737,7 +54758,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54737
54758
|
// replace the whole token
|
|
54738
54759
|
start = tokenAtCursor.start;
|
|
54739
54760
|
}
|
|
54740
|
-
this.composer.stopComposerRangeSelection();
|
|
54741
54761
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54742
54762
|
this.composer.replaceComposerCursorSelection(value);
|
|
54743
54763
|
}
|
|
@@ -54755,7 +54775,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54755
54775
|
// replace the whole token
|
|
54756
54776
|
start = tokenAtCursor.start;
|
|
54757
54777
|
}
|
|
54758
|
-
this.composer.stopComposerRangeSelection();
|
|
54759
54778
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54760
54779
|
this.composer.replaceComposerCursorSelection(value);
|
|
54761
54780
|
}
|
|
@@ -56038,7 +56057,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56038
56057
|
pivotRegistry.add("SPREADSHEET", {
|
|
56039
56058
|
ui: SpreadsheetPivot,
|
|
56040
56059
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
56041
|
-
externalData: false,
|
|
56042
56060
|
dateGranularities: [...dateGranularities],
|
|
56043
56061
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
56044
56062
|
isMeasureCandidate: (field) => field.type !== "boolean",
|
|
@@ -57454,6 +57472,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57454
57472
|
getPanelProps(panelInfo) {
|
|
57455
57473
|
const state = this.computeState(panelInfo);
|
|
57456
57474
|
if (state.isOpen) {
|
|
57475
|
+
panelInfo.currentPanelProps = state.props ?? panelInfo.currentPanelProps;
|
|
57457
57476
|
return state.props ?? {};
|
|
57458
57477
|
}
|
|
57459
57478
|
return {};
|
|
@@ -57465,11 +57484,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57465
57484
|
}
|
|
57466
57485
|
return undefined;
|
|
57467
57486
|
}
|
|
57468
|
-
open(componentTag,
|
|
57487
|
+
open(componentTag, currentPanelProps = {}) {
|
|
57469
57488
|
if (this.screenWidthStore.isSmall) {
|
|
57470
57489
|
return;
|
|
57471
57490
|
}
|
|
57472
|
-
const newPanelInfo = {
|
|
57491
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57473
57492
|
const state = this.computeState(newPanelInfo);
|
|
57474
57493
|
if (!state.isOpen) {
|
|
57475
57494
|
return;
|
|
@@ -57493,8 +57512,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57493
57512
|
}
|
|
57494
57513
|
this._openPanel("secondaryPanel", newPanelInfo, state);
|
|
57495
57514
|
}
|
|
57496
|
-
replace(componentTag, currentPanelKey,
|
|
57497
|
-
const newPanelInfo = {
|
|
57515
|
+
replace(componentTag, currentPanelKey, currentPanelProps = {}) {
|
|
57516
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57498
57517
|
const state = this.computeState(newPanelInfo);
|
|
57499
57518
|
if (!state.isOpen) {
|
|
57500
57519
|
return;
|
|
@@ -57524,10 +57543,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57524
57543
|
_openPanel(panel, newPanel, state) {
|
|
57525
57544
|
const currentPanel = this[panel];
|
|
57526
57545
|
if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
|
|
57527
|
-
currentPanel.
|
|
57546
|
+
currentPanel.currentPanelProps?.onCloseSidePanel?.();
|
|
57528
57547
|
}
|
|
57529
57548
|
this[panel] = {
|
|
57530
|
-
|
|
57549
|
+
currentPanelProps: state.props ?? {},
|
|
57531
57550
|
componentTag: newPanel.componentTag,
|
|
57532
57551
|
size: currentPanel?.size || DEFAULT_SIDE_PANEL_SIZE,
|
|
57533
57552
|
isCollapsed: currentPanel?.isCollapsed || false,
|
|
@@ -57549,16 +57568,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57549
57568
|
close() {
|
|
57550
57569
|
if (this.mainPanel?.isPinned) {
|
|
57551
57570
|
if (this.secondaryPanel) {
|
|
57552
|
-
this.secondaryPanel.
|
|
57571
|
+
this.secondaryPanel.currentPanelProps.onCloseSidePanel?.();
|
|
57553
57572
|
this.secondaryPanel = undefined;
|
|
57554
57573
|
}
|
|
57555
57574
|
return;
|
|
57556
57575
|
}
|
|
57557
|
-
this.mainPanel?.
|
|
57576
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57558
57577
|
this.mainPanel = undefined;
|
|
57559
57578
|
}
|
|
57560
57579
|
closeMainPanel() {
|
|
57561
|
-
this.mainPanel?.
|
|
57580
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57562
57581
|
this.mainPanel = this.secondaryPanel || undefined;
|
|
57563
57582
|
this.secondaryPanel = undefined;
|
|
57564
57583
|
}
|
|
@@ -57590,7 +57609,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57590
57609
|
}
|
|
57591
57610
|
this.mainPanel.isPinned = !this.mainPanel.isPinned;
|
|
57592
57611
|
if (!this.mainPanel.isPinned && this.secondaryPanel) {
|
|
57593
|
-
this.secondaryPanel?.
|
|
57612
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57594
57613
|
this.mainPanel = this.secondaryPanel;
|
|
57595
57614
|
this.secondaryPanel = undefined;
|
|
57596
57615
|
}
|
|
@@ -57609,7 +57628,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57609
57628
|
panelInfo.size = COLLAPSED_SIDE_PANEL_SIZE;
|
|
57610
57629
|
}
|
|
57611
57630
|
}
|
|
57612
|
-
computeState({ componentTag, initialPanelProps }) {
|
|
57631
|
+
computeState({ componentTag, currentPanelProps: initialPanelProps, }) {
|
|
57613
57632
|
const customComputeState = sidePanelRegistry.get(componentTag).computeState;
|
|
57614
57633
|
const state = customComputeState
|
|
57615
57634
|
? customComputeState(this.getters, initialPanelProps)
|
|
@@ -57619,7 +57638,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57619
57638
|
changeSpreadsheetWidth(width) {
|
|
57620
57639
|
this.availableWidth = width - MIN_SHEET_VIEW_WIDTH;
|
|
57621
57640
|
if (this.secondaryPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
57622
|
-
this.secondaryPanel?.
|
|
57641
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57623
57642
|
this.secondaryPanel = undefined;
|
|
57624
57643
|
}
|
|
57625
57644
|
if (this.mainPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
@@ -57779,6 +57798,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57779
57798
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
57780
57799
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57781
57800
|
return scrollY > 0;
|
|
57801
|
+
}, () => {
|
|
57802
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
57803
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57804
|
+
return scrollY < maxOffsetY;
|
|
57782
57805
|
});
|
|
57783
57806
|
}
|
|
57784
57807
|
get highlights() {
|
|
@@ -64427,10 +64450,17 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64427
64450
|
if (!pivot) {
|
|
64428
64451
|
continue;
|
|
64429
64452
|
}
|
|
64430
|
-
|
|
64453
|
+
const def = deepCopy(pivot.definition);
|
|
64454
|
+
for (const measure of def.measures) {
|
|
64431
64455
|
if (measure.computedBy?.formula === formulaString) {
|
|
64432
|
-
const measureIndex =
|
|
64433
|
-
|
|
64456
|
+
const measureIndex = def.measures.indexOf(measure);
|
|
64457
|
+
if (measureIndex !== -1) {
|
|
64458
|
+
def.measures[measureIndex].computedBy = {
|
|
64459
|
+
formula: newFormulaString,
|
|
64460
|
+
sheetId,
|
|
64461
|
+
};
|
|
64462
|
+
}
|
|
64463
|
+
this.dispatch("UPDATE_PIVOT", { pivotId, pivot: def });
|
|
64434
64464
|
}
|
|
64435
64465
|
}
|
|
64436
64466
|
}
|
|
@@ -64568,6 +64598,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64568
64598
|
const { sheetId, zone } = definition.dataSet;
|
|
64569
64599
|
const range = this.getters.getRangeFromZone(sheetId, zone);
|
|
64570
64600
|
const adaptedRange = adaptPivotRange(range, applyChange);
|
|
64601
|
+
if (adaptedRange === range) {
|
|
64602
|
+
return;
|
|
64603
|
+
}
|
|
64571
64604
|
const dataSet = adaptedRange && {
|
|
64572
64605
|
sheetId: adaptedRange.sheetId,
|
|
64573
64606
|
zone: adaptedRange.zone,
|
|
@@ -68573,9 +68606,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68573
68606
|
handle(cmd) {
|
|
68574
68607
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
68575
68608
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
68576
|
-
|
|
68577
|
-
this.setupPivot(pivotId, { recreate: true });
|
|
68578
|
-
}
|
|
68609
|
+
this.setupPivot(pivotId, { recreate: true });
|
|
68579
68610
|
}
|
|
68580
68611
|
}
|
|
68581
68612
|
switch (cmd.type) {
|
|
@@ -68783,7 +68814,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68783
68814
|
pivot.init({ reload: true });
|
|
68784
68815
|
}
|
|
68785
68816
|
setupPivot(pivotId, { recreate } = { recreate: false }) {
|
|
68786
|
-
const definition = this.getters.getPivotCoreDefinition(pivotId);
|
|
68817
|
+
const definition = deepCopy(this.getters.getPivotCoreDefinition(pivotId));
|
|
68787
68818
|
if (!(pivotId in this.pivots)) {
|
|
68788
68819
|
const Pivot = withPivotPresentationLayer(pivotRegistry.get(definition.type).ui);
|
|
68789
68820
|
this.pivots[pivotId] = new Pivot(this.custom, { definition, getters: this.getters });
|
|
@@ -75000,6 +75031,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
75000
75031
|
"getFigureUI",
|
|
75001
75032
|
"getPositionAnchorOffset",
|
|
75002
75033
|
"getGridOffset",
|
|
75034
|
+
"getMaximumSheetOffset",
|
|
75003
75035
|
];
|
|
75004
75036
|
viewports = {};
|
|
75005
75037
|
/**
|
|
@@ -78035,16 +78067,18 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
78035
78067
|
get clickableCells() {
|
|
78036
78068
|
const cells = [];
|
|
78037
78069
|
const getters = this.getters;
|
|
78038
|
-
const sheetId = getters.getActiveSheetId();
|
|
78039
78070
|
for (const position of this.getters.getVisibleCellPositions()) {
|
|
78040
78071
|
const item = this.getClickableItem(position);
|
|
78041
78072
|
if (!item) {
|
|
78042
78073
|
continue;
|
|
78043
78074
|
}
|
|
78044
78075
|
const title = typeof item.title === "function" ? item.title(position, getters) : item.title;
|
|
78045
|
-
const
|
|
78076
|
+
const rect = this.getClickableCellRect(position);
|
|
78077
|
+
if (!rect) {
|
|
78078
|
+
continue;
|
|
78079
|
+
}
|
|
78046
78080
|
cells.push({
|
|
78047
|
-
coordinates:
|
|
78081
|
+
coordinates: rect,
|
|
78048
78082
|
position,
|
|
78049
78083
|
action: item.execute,
|
|
78050
78084
|
title: title || "",
|
|
@@ -78052,6 +78086,31 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
78052
78086
|
}
|
|
78053
78087
|
return cells;
|
|
78054
78088
|
}
|
|
78089
|
+
getClickableCellRect(position) {
|
|
78090
|
+
const zone = this.getters.expandZone(position.sheetId, positionToZone(position));
|
|
78091
|
+
const clickableRect = this.getters.getVisibleRect(zone);
|
|
78092
|
+
const icons = this.getters.getCellIcons(position);
|
|
78093
|
+
const iconsAtPosition = {
|
|
78094
|
+
center: icons.find((icon) => icon.horizontalAlign === "center"),
|
|
78095
|
+
left: icons.find((icon) => icon.horizontalAlign === "left"),
|
|
78096
|
+
right: icons.find((icon) => icon.horizontalAlign === "right"),
|
|
78097
|
+
};
|
|
78098
|
+
if (iconsAtPosition.center?.onClick) {
|
|
78099
|
+
return undefined;
|
|
78100
|
+
}
|
|
78101
|
+
if (iconsAtPosition.right?.onClick) {
|
|
78102
|
+
const cellRect = this.getters.getRect(zone);
|
|
78103
|
+
const iconRect = this.getters.getCellIconRect(iconsAtPosition.right, cellRect);
|
|
78104
|
+
clickableRect.width -= iconRect.width + iconsAtPosition.right.margin;
|
|
78105
|
+
}
|
|
78106
|
+
if (iconsAtPosition.left?.onClick) {
|
|
78107
|
+
const cellRect = this.getters.getRect(zone);
|
|
78108
|
+
const iconRect = this.getters.getCellIconRect(iconsAtPosition.left, cellRect);
|
|
78109
|
+
clickableRect.x += iconRect.width + iconsAtPosition.left.margin;
|
|
78110
|
+
clickableRect.width -= iconRect.width + iconsAtPosition.left.margin;
|
|
78111
|
+
}
|
|
78112
|
+
return clickableRect;
|
|
78113
|
+
}
|
|
78055
78114
|
}
|
|
78056
78115
|
|
|
78057
78116
|
css /* scss */ `
|
|
@@ -78090,6 +78149,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
78090
78149
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
78091
78150
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78092
78151
|
return scrollY > 0;
|
|
78152
|
+
}, () => {
|
|
78153
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
78154
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78155
|
+
return scrollY < maxOffsetY;
|
|
78093
78156
|
});
|
|
78094
78157
|
}
|
|
78095
78158
|
get gridContainer() {
|
|
@@ -78804,7 +78867,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
78804
78867
|
height: this.focus === "inactive" ? "26px" : "fit-content",
|
|
78805
78868
|
"max-height": `130px`,
|
|
78806
78869
|
}),
|
|
78807
|
-
showAssistant:
|
|
78870
|
+
showAssistant: false, // Hide assistant in small composer as it gets cropped ATM
|
|
78808
78871
|
placeholder: this.composerStore.placeholder,
|
|
78809
78872
|
};
|
|
78810
78873
|
}
|
|
@@ -80133,7 +80196,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
80133
80196
|
border-radius: 4px;
|
|
80134
80197
|
font-weight: 500;
|
|
80135
80198
|
font-size: 14px;
|
|
80136
|
-
height: 32px;
|
|
80199
|
+
min-height: 32px;
|
|
80137
80200
|
line-height: 16px;
|
|
80138
80201
|
flex-grow: 1;
|
|
80139
80202
|
background-color: ${BUTTON_BG};
|
|
@@ -84937,9 +85000,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84937
85000
|
exports.tokenize = tokenize;
|
|
84938
85001
|
|
|
84939
85002
|
|
|
84940
|
-
__info__.version = "18.4.
|
|
84941
|
-
__info__.date = "2025-
|
|
84942
|
-
__info__.hash = "
|
|
85003
|
+
__info__.version = "18.4.19";
|
|
85004
|
+
__info__.date = "2025-12-02T05:34:03.902Z";
|
|
85005
|
+
__info__.hash = "95b1252";
|
|
84943
85006
|
|
|
84944
85007
|
|
|
84945
85008
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|