@odoo/o-spreadsheet 18.3.26 → 18.3.28
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 +58 -29
- package/dist/o-spreadsheet.d.ts +1 -2
- package/dist/o-spreadsheet.esm.js +58 -29
- package/dist/o-spreadsheet.iife.js +58 -29
- package/dist/o-spreadsheet.iife.min.js +370 -370
- 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.3.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.28
|
|
6
|
+
* @date 2025-12-02T05:34:06.602Z
|
|
7
|
+
* @hash a205f91
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -3469,7 +3469,6 @@ const invalidateEvaluationCommands = new Set([
|
|
|
3469
3469
|
"REDO",
|
|
3470
3470
|
"ADD_MERGE",
|
|
3471
3471
|
"REMOVE_MERGE",
|
|
3472
|
-
"DUPLICATE_SHEET",
|
|
3473
3472
|
"UPDATE_LOCALE",
|
|
3474
3473
|
"ADD_PIVOT",
|
|
3475
3474
|
"UPDATE_PIVOT",
|
|
@@ -22991,6 +22990,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
22991
22990
|
}
|
|
22992
22991
|
this.selectionStart = start;
|
|
22993
22992
|
this.selectionEnd = end;
|
|
22993
|
+
this.stopComposerRangeSelection();
|
|
22994
22994
|
this.computeFormulaCursorContext();
|
|
22995
22995
|
this.computeParenthesisRelatedToCursor();
|
|
22996
22996
|
}
|
|
@@ -23728,7 +23728,6 @@ function insertTokenAfterArgSeparator(tokenAtCursor, value) {
|
|
|
23728
23728
|
// replace the whole token
|
|
23729
23729
|
start = tokenAtCursor.start;
|
|
23730
23730
|
}
|
|
23731
|
-
this.composer.stopComposerRangeSelection();
|
|
23732
23731
|
this.composer.changeComposerCursorSelection(start, end);
|
|
23733
23732
|
this.composer.replaceComposerCursorSelection(value);
|
|
23734
23733
|
}
|
|
@@ -23746,7 +23745,6 @@ function insertTokenAfterLeftParenthesis(tokenAtCursor, value) {
|
|
|
23746
23745
|
// replace the whole token
|
|
23747
23746
|
start = tokenAtCursor.start;
|
|
23748
23747
|
}
|
|
23749
|
-
this.composer.stopComposerRangeSelection();
|
|
23750
23748
|
this.composer.changeComposerCursorSelection(start, end);
|
|
23751
23749
|
this.composer.replaceComposerCursorSelection(value);
|
|
23752
23750
|
}
|
|
@@ -24874,11 +24872,18 @@ function chartToImageUrl(runtime, figure, type) {
|
|
|
24874
24872
|
// we have to add the canvas to the DOM otherwise it won't be rendered
|
|
24875
24873
|
document.body.append(div);
|
|
24876
24874
|
if ("chartJsConfig" in runtime) {
|
|
24875
|
+
const extensionsLoaded = areChartJSExtensionsLoaded();
|
|
24876
|
+
if (!extensionsLoaded) {
|
|
24877
|
+
registerChartJSExtensions();
|
|
24878
|
+
}
|
|
24877
24879
|
const config = deepCopy(runtime.chartJsConfig);
|
|
24878
24880
|
config.plugins = [backgroundColorChartJSPlugin];
|
|
24879
24881
|
const chart = new window.Chart(canvas, config);
|
|
24880
24882
|
imageContent = chart.toBase64Image();
|
|
24881
24883
|
chart.destroy();
|
|
24884
|
+
if (!extensionsLoaded) {
|
|
24885
|
+
unregisterChartJsExtensions();
|
|
24886
|
+
}
|
|
24882
24887
|
}
|
|
24883
24888
|
else if (type === "scorecard") {
|
|
24884
24889
|
const design = getScorecardConfiguration(figure, runtime);
|
|
@@ -24908,11 +24913,18 @@ async function chartToImageFile(runtime, figure, type) {
|
|
|
24908
24913
|
document.body.append(div);
|
|
24909
24914
|
let chartBlob = null;
|
|
24910
24915
|
if ("chartJsConfig" in runtime) {
|
|
24916
|
+
const extensionsLoaded = areChartJSExtensionsLoaded();
|
|
24917
|
+
if (!extensionsLoaded) {
|
|
24918
|
+
registerChartJSExtensions();
|
|
24919
|
+
}
|
|
24911
24920
|
const config = deepCopy(runtime.chartJsConfig);
|
|
24912
24921
|
config.plugins = [backgroundColorChartJSPlugin];
|
|
24913
24922
|
const chart = new window.Chart(canvas, config);
|
|
24914
24923
|
chartBlob = await new Promise((resolve) => canvas.toBlob(resolve, "image/png"));
|
|
24915
24924
|
chart.destroy();
|
|
24925
|
+
if (!extensionsLoaded) {
|
|
24926
|
+
unregisterChartJsExtensions();
|
|
24927
|
+
}
|
|
24916
24928
|
}
|
|
24917
24929
|
else if (type === "scorecard") {
|
|
24918
24930
|
const design = getScorecardConfiguration(figure, runtime);
|
|
@@ -43887,7 +43899,6 @@ class Composer extends owl.Component {
|
|
|
43887
43899
|
return;
|
|
43888
43900
|
}
|
|
43889
43901
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
43890
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
43891
43902
|
this.props.onComposerContentFocused();
|
|
43892
43903
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
43893
43904
|
this.processTokenAtCursor();
|
|
@@ -50263,7 +50274,6 @@ const dateGranularities = [
|
|
|
50263
50274
|
pivotRegistry.add("SPREADSHEET", {
|
|
50264
50275
|
ui: SpreadsheetPivot,
|
|
50265
50276
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
50266
|
-
externalData: false,
|
|
50267
50277
|
dateGranularities: [...dateGranularities],
|
|
50268
50278
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
50269
50279
|
isMeasureCandidate: (field) => field.type !== "boolean",
|
|
@@ -54347,7 +54357,10 @@ class AbstractResizer extends owl.Component {
|
|
|
54347
54357
|
this.state.waitingForMove = false;
|
|
54348
54358
|
}
|
|
54349
54359
|
onMouseMove(ev) {
|
|
54350
|
-
if (this.
|
|
54360
|
+
if (this.env.model.getters.isReadonly() ||
|
|
54361
|
+
this.state.isResizing ||
|
|
54362
|
+
this.state.isMoving ||
|
|
54363
|
+
this.state.isSelecting) {
|
|
54351
54364
|
return;
|
|
54352
54365
|
}
|
|
54353
54366
|
this._computeHandleDisplay(ev);
|
|
@@ -54400,6 +54413,10 @@ class AbstractResizer extends owl.Component {
|
|
|
54400
54413
|
if (index < 0) {
|
|
54401
54414
|
return;
|
|
54402
54415
|
}
|
|
54416
|
+
if (this.env.model.getters.isReadonly()) {
|
|
54417
|
+
this._selectElement(index, false);
|
|
54418
|
+
return;
|
|
54419
|
+
}
|
|
54403
54420
|
if (this.state.waitingForMove) {
|
|
54404
54421
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
54405
54422
|
this._selectElement(index, false);
|
|
@@ -56106,24 +56123,24 @@ const DEFAULT_SIDE_PANEL_SIZE = 350;
|
|
|
56106
56123
|
const MIN_SHEET_VIEW_WIDTH = 150;
|
|
56107
56124
|
class SidePanelStore extends SpreadsheetStore {
|
|
56108
56125
|
mutators = ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
|
|
56109
|
-
|
|
56126
|
+
currentPanelProps = {};
|
|
56110
56127
|
componentTag = "";
|
|
56111
56128
|
panelSize = DEFAULT_SIDE_PANEL_SIZE;
|
|
56112
56129
|
get isOpen() {
|
|
56113
56130
|
if (!this.componentTag) {
|
|
56114
56131
|
return false;
|
|
56115
56132
|
}
|
|
56116
|
-
return this.computeState(this.componentTag, this.
|
|
56133
|
+
return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
|
|
56117
56134
|
}
|
|
56118
56135
|
get panelProps() {
|
|
56119
|
-
const state = this.computeState(this.componentTag, this.
|
|
56136
|
+
const state = this.computeState(this.componentTag, this.currentPanelProps);
|
|
56120
56137
|
if (state.isOpen) {
|
|
56121
56138
|
return state.props ?? {};
|
|
56122
56139
|
}
|
|
56123
56140
|
return {};
|
|
56124
56141
|
}
|
|
56125
56142
|
get panelKey() {
|
|
56126
|
-
const state = this.computeState(this.componentTag, this.
|
|
56143
|
+
const state = this.computeState(this.componentTag, this.currentPanelProps);
|
|
56127
56144
|
if (state.isOpen) {
|
|
56128
56145
|
return state.key;
|
|
56129
56146
|
}
|
|
@@ -56135,10 +56152,10 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
56135
56152
|
return;
|
|
56136
56153
|
}
|
|
56137
56154
|
if (this.isOpen && componentTag !== this.componentTag) {
|
|
56138
|
-
this.
|
|
56155
|
+
this.currentPanelProps?.onCloseSidePanel?.();
|
|
56139
56156
|
}
|
|
56140
56157
|
this.componentTag = componentTag;
|
|
56141
|
-
this.
|
|
56158
|
+
this.currentPanelProps = state.props ?? {};
|
|
56142
56159
|
}
|
|
56143
56160
|
toggle(componentTag, panelProps) {
|
|
56144
56161
|
if (this.isOpen && componentTag === this.componentTag) {
|
|
@@ -56149,8 +56166,8 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
56149
56166
|
}
|
|
56150
56167
|
}
|
|
56151
56168
|
close() {
|
|
56152
|
-
this.
|
|
56153
|
-
this.
|
|
56169
|
+
this.currentPanelProps.onCloseSidePanel?.();
|
|
56170
|
+
this.currentPanelProps = {};
|
|
56154
56171
|
this.componentTag = "";
|
|
56155
56172
|
}
|
|
56156
56173
|
changePanelSize(size, spreadsheetElWidth) {
|
|
@@ -56176,7 +56193,11 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
56176
56193
|
};
|
|
56177
56194
|
}
|
|
56178
56195
|
else {
|
|
56179
|
-
|
|
56196
|
+
const state = customComputeState(this.getters, panelProps);
|
|
56197
|
+
if (state.isOpen) {
|
|
56198
|
+
this.currentPanelProps = state.props ?? this.currentPanelProps;
|
|
56199
|
+
}
|
|
56200
|
+
return state;
|
|
56180
56201
|
}
|
|
56181
56202
|
}
|
|
56182
56203
|
}
|
|
@@ -62917,10 +62938,17 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
62917
62938
|
if (!pivot) {
|
|
62918
62939
|
continue;
|
|
62919
62940
|
}
|
|
62920
|
-
|
|
62941
|
+
const def = deepCopy(pivot.definition);
|
|
62942
|
+
for (const measure of def.measures) {
|
|
62921
62943
|
if (measure.computedBy?.formula === formulaString) {
|
|
62922
|
-
const measureIndex =
|
|
62923
|
-
|
|
62944
|
+
const measureIndex = def.measures.indexOf(measure);
|
|
62945
|
+
if (measureIndex !== -1) {
|
|
62946
|
+
def.measures[measureIndex].computedBy = {
|
|
62947
|
+
formula: newFormulaString,
|
|
62948
|
+
sheetId,
|
|
62949
|
+
};
|
|
62950
|
+
}
|
|
62951
|
+
this.dispatch("UPDATE_PIVOT", { pivotId, pivot: def });
|
|
62924
62952
|
}
|
|
62925
62953
|
}
|
|
62926
62954
|
}
|
|
@@ -63081,6 +63109,9 @@ class SpreadsheetPivotCorePlugin extends CorePlugin {
|
|
|
63081
63109
|
const { sheetId, zone } = definition.dataSet;
|
|
63082
63110
|
const range = this.getters.getRangeFromZone(sheetId, zone);
|
|
63083
63111
|
const adaptedRange = adaptPivotRange(range, applyChange);
|
|
63112
|
+
if (adaptedRange === range) {
|
|
63113
|
+
return;
|
|
63114
|
+
}
|
|
63084
63115
|
const dataSet = adaptedRange && {
|
|
63085
63116
|
sheetId: adaptedRange.sheetId,
|
|
63086
63117
|
zone: adaptedRange.zone,
|
|
@@ -66820,9 +66851,7 @@ class PivotUIPlugin extends CoreViewPlugin {
|
|
|
66820
66851
|
handle(cmd) {
|
|
66821
66852
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
66822
66853
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
66823
|
-
|
|
66824
|
-
this.setupPivot(pivotId, { recreate: true });
|
|
66825
|
-
}
|
|
66854
|
+
this.setupPivot(pivotId, { recreate: true });
|
|
66826
66855
|
}
|
|
66827
66856
|
}
|
|
66828
66857
|
switch (cmd.type) {
|
|
@@ -67023,7 +67052,7 @@ class PivotUIPlugin extends CoreViewPlugin {
|
|
|
67023
67052
|
pivot.init({ reload: true });
|
|
67024
67053
|
}
|
|
67025
67054
|
setupPivot(pivotId, { recreate } = { recreate: false }) {
|
|
67026
|
-
const definition = this.getters.getPivotCoreDefinition(pivotId);
|
|
67055
|
+
const definition = deepCopy(this.getters.getPivotCoreDefinition(pivotId));
|
|
67027
67056
|
if (!(pivotId in this.pivots)) {
|
|
67028
67057
|
const Pivot = withPivotPresentationLayer(pivotRegistry.get(definition.type).ui);
|
|
67029
67058
|
this.pivots[pivotId] = new Pivot(this.custom, { definition, getters: this.getters });
|
|
@@ -76344,7 +76373,7 @@ css /* scss */ `
|
|
|
76344
76373
|
border-radius: 4px;
|
|
76345
76374
|
font-weight: 500;
|
|
76346
76375
|
font-size: 14px;
|
|
76347
|
-
height: 32px;
|
|
76376
|
+
min-height: 32px;
|
|
76348
76377
|
line-height: 16px;
|
|
76349
76378
|
flex-grow: 1;
|
|
76350
76379
|
background-color: ${BUTTON_BG};
|
|
@@ -81069,6 +81098,6 @@ exports.tokenColors = tokenColors;
|
|
|
81069
81098
|
exports.tokenize = tokenize;
|
|
81070
81099
|
|
|
81071
81100
|
|
|
81072
|
-
__info__.version = "18.3.
|
|
81073
|
-
__info__.date = "2025-
|
|
81074
|
-
__info__.hash = "
|
|
81101
|
+
__info__.version = "18.3.28";
|
|
81102
|
+
__info__.date = "2025-12-02T05:34:06.602Z";
|
|
81103
|
+
__info__.hash = "a205f91";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -6612,7 +6612,6 @@ type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields:
|
|
|
6612
6612
|
interface PivotRegistryItem {
|
|
6613
6613
|
ui: PivotUIConstructor;
|
|
6614
6614
|
definition: PivotDefinitionConstructor;
|
|
6615
|
-
externalData: boolean;
|
|
6616
6615
|
dateGranularities: string[];
|
|
6617
6616
|
datetimeGranularities: string[];
|
|
6618
6617
|
isMeasureCandidate: (field: PivotField) => boolean;
|
|
@@ -8901,7 +8900,7 @@ interface ClosedSidePanel {
|
|
|
8901
8900
|
type SidePanelState = OpenSidePanel | ClosedSidePanel;
|
|
8902
8901
|
declare class SidePanelStore extends SpreadsheetStore {
|
|
8903
8902
|
mutators: readonly ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
|
|
8904
|
-
|
|
8903
|
+
currentPanelProps: SidePanelProps;
|
|
8905
8904
|
componentTag: string;
|
|
8906
8905
|
panelSize: number;
|
|
8907
8906
|
get isOpen(): boolean;
|
|
@@ -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.3.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.28
|
|
6
|
+
* @date 2025-12-02T05:34:06.602Z
|
|
7
|
+
* @hash a205f91
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -3467,7 +3467,6 @@ const invalidateEvaluationCommands = new Set([
|
|
|
3467
3467
|
"REDO",
|
|
3468
3468
|
"ADD_MERGE",
|
|
3469
3469
|
"REMOVE_MERGE",
|
|
3470
|
-
"DUPLICATE_SHEET",
|
|
3471
3470
|
"UPDATE_LOCALE",
|
|
3472
3471
|
"ADD_PIVOT",
|
|
3473
3472
|
"UPDATE_PIVOT",
|
|
@@ -22989,6 +22988,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
22989
22988
|
}
|
|
22990
22989
|
this.selectionStart = start;
|
|
22991
22990
|
this.selectionEnd = end;
|
|
22991
|
+
this.stopComposerRangeSelection();
|
|
22992
22992
|
this.computeFormulaCursorContext();
|
|
22993
22993
|
this.computeParenthesisRelatedToCursor();
|
|
22994
22994
|
}
|
|
@@ -23726,7 +23726,6 @@ function insertTokenAfterArgSeparator(tokenAtCursor, value) {
|
|
|
23726
23726
|
// replace the whole token
|
|
23727
23727
|
start = tokenAtCursor.start;
|
|
23728
23728
|
}
|
|
23729
|
-
this.composer.stopComposerRangeSelection();
|
|
23730
23729
|
this.composer.changeComposerCursorSelection(start, end);
|
|
23731
23730
|
this.composer.replaceComposerCursorSelection(value);
|
|
23732
23731
|
}
|
|
@@ -23744,7 +23743,6 @@ function insertTokenAfterLeftParenthesis(tokenAtCursor, value) {
|
|
|
23744
23743
|
// replace the whole token
|
|
23745
23744
|
start = tokenAtCursor.start;
|
|
23746
23745
|
}
|
|
23747
|
-
this.composer.stopComposerRangeSelection();
|
|
23748
23746
|
this.composer.changeComposerCursorSelection(start, end);
|
|
23749
23747
|
this.composer.replaceComposerCursorSelection(value);
|
|
23750
23748
|
}
|
|
@@ -24872,11 +24870,18 @@ function chartToImageUrl(runtime, figure, type) {
|
|
|
24872
24870
|
// we have to add the canvas to the DOM otherwise it won't be rendered
|
|
24873
24871
|
document.body.append(div);
|
|
24874
24872
|
if ("chartJsConfig" in runtime) {
|
|
24873
|
+
const extensionsLoaded = areChartJSExtensionsLoaded();
|
|
24874
|
+
if (!extensionsLoaded) {
|
|
24875
|
+
registerChartJSExtensions();
|
|
24876
|
+
}
|
|
24875
24877
|
const config = deepCopy(runtime.chartJsConfig);
|
|
24876
24878
|
config.plugins = [backgroundColorChartJSPlugin];
|
|
24877
24879
|
const chart = new window.Chart(canvas, config);
|
|
24878
24880
|
imageContent = chart.toBase64Image();
|
|
24879
24881
|
chart.destroy();
|
|
24882
|
+
if (!extensionsLoaded) {
|
|
24883
|
+
unregisterChartJsExtensions();
|
|
24884
|
+
}
|
|
24880
24885
|
}
|
|
24881
24886
|
else if (type === "scorecard") {
|
|
24882
24887
|
const design = getScorecardConfiguration(figure, runtime);
|
|
@@ -24906,11 +24911,18 @@ async function chartToImageFile(runtime, figure, type) {
|
|
|
24906
24911
|
document.body.append(div);
|
|
24907
24912
|
let chartBlob = null;
|
|
24908
24913
|
if ("chartJsConfig" in runtime) {
|
|
24914
|
+
const extensionsLoaded = areChartJSExtensionsLoaded();
|
|
24915
|
+
if (!extensionsLoaded) {
|
|
24916
|
+
registerChartJSExtensions();
|
|
24917
|
+
}
|
|
24909
24918
|
const config = deepCopy(runtime.chartJsConfig);
|
|
24910
24919
|
config.plugins = [backgroundColorChartJSPlugin];
|
|
24911
24920
|
const chart = new window.Chart(canvas, config);
|
|
24912
24921
|
chartBlob = await new Promise((resolve) => canvas.toBlob(resolve, "image/png"));
|
|
24913
24922
|
chart.destroy();
|
|
24923
|
+
if (!extensionsLoaded) {
|
|
24924
|
+
unregisterChartJsExtensions();
|
|
24925
|
+
}
|
|
24914
24926
|
}
|
|
24915
24927
|
else if (type === "scorecard") {
|
|
24916
24928
|
const design = getScorecardConfiguration(figure, runtime);
|
|
@@ -43885,7 +43897,6 @@ class Composer extends Component {
|
|
|
43885
43897
|
return;
|
|
43886
43898
|
}
|
|
43887
43899
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
43888
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
43889
43900
|
this.props.onComposerContentFocused();
|
|
43890
43901
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
43891
43902
|
this.processTokenAtCursor();
|
|
@@ -50261,7 +50272,6 @@ const dateGranularities = [
|
|
|
50261
50272
|
pivotRegistry.add("SPREADSHEET", {
|
|
50262
50273
|
ui: SpreadsheetPivot,
|
|
50263
50274
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
50264
|
-
externalData: false,
|
|
50265
50275
|
dateGranularities: [...dateGranularities],
|
|
50266
50276
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
50267
50277
|
isMeasureCandidate: (field) => field.type !== "boolean",
|
|
@@ -54345,7 +54355,10 @@ class AbstractResizer extends Component {
|
|
|
54345
54355
|
this.state.waitingForMove = false;
|
|
54346
54356
|
}
|
|
54347
54357
|
onMouseMove(ev) {
|
|
54348
|
-
if (this.
|
|
54358
|
+
if (this.env.model.getters.isReadonly() ||
|
|
54359
|
+
this.state.isResizing ||
|
|
54360
|
+
this.state.isMoving ||
|
|
54361
|
+
this.state.isSelecting) {
|
|
54349
54362
|
return;
|
|
54350
54363
|
}
|
|
54351
54364
|
this._computeHandleDisplay(ev);
|
|
@@ -54398,6 +54411,10 @@ class AbstractResizer extends Component {
|
|
|
54398
54411
|
if (index < 0) {
|
|
54399
54412
|
return;
|
|
54400
54413
|
}
|
|
54414
|
+
if (this.env.model.getters.isReadonly()) {
|
|
54415
|
+
this._selectElement(index, false);
|
|
54416
|
+
return;
|
|
54417
|
+
}
|
|
54401
54418
|
if (this.state.waitingForMove) {
|
|
54402
54419
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
54403
54420
|
this._selectElement(index, false);
|
|
@@ -56104,24 +56121,24 @@ const DEFAULT_SIDE_PANEL_SIZE = 350;
|
|
|
56104
56121
|
const MIN_SHEET_VIEW_WIDTH = 150;
|
|
56105
56122
|
class SidePanelStore extends SpreadsheetStore {
|
|
56106
56123
|
mutators = ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
|
|
56107
|
-
|
|
56124
|
+
currentPanelProps = {};
|
|
56108
56125
|
componentTag = "";
|
|
56109
56126
|
panelSize = DEFAULT_SIDE_PANEL_SIZE;
|
|
56110
56127
|
get isOpen() {
|
|
56111
56128
|
if (!this.componentTag) {
|
|
56112
56129
|
return false;
|
|
56113
56130
|
}
|
|
56114
|
-
return this.computeState(this.componentTag, this.
|
|
56131
|
+
return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
|
|
56115
56132
|
}
|
|
56116
56133
|
get panelProps() {
|
|
56117
|
-
const state = this.computeState(this.componentTag, this.
|
|
56134
|
+
const state = this.computeState(this.componentTag, this.currentPanelProps);
|
|
56118
56135
|
if (state.isOpen) {
|
|
56119
56136
|
return state.props ?? {};
|
|
56120
56137
|
}
|
|
56121
56138
|
return {};
|
|
56122
56139
|
}
|
|
56123
56140
|
get panelKey() {
|
|
56124
|
-
const state = this.computeState(this.componentTag, this.
|
|
56141
|
+
const state = this.computeState(this.componentTag, this.currentPanelProps);
|
|
56125
56142
|
if (state.isOpen) {
|
|
56126
56143
|
return state.key;
|
|
56127
56144
|
}
|
|
@@ -56133,10 +56150,10 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
56133
56150
|
return;
|
|
56134
56151
|
}
|
|
56135
56152
|
if (this.isOpen && componentTag !== this.componentTag) {
|
|
56136
|
-
this.
|
|
56153
|
+
this.currentPanelProps?.onCloseSidePanel?.();
|
|
56137
56154
|
}
|
|
56138
56155
|
this.componentTag = componentTag;
|
|
56139
|
-
this.
|
|
56156
|
+
this.currentPanelProps = state.props ?? {};
|
|
56140
56157
|
}
|
|
56141
56158
|
toggle(componentTag, panelProps) {
|
|
56142
56159
|
if (this.isOpen && componentTag === this.componentTag) {
|
|
@@ -56147,8 +56164,8 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
56147
56164
|
}
|
|
56148
56165
|
}
|
|
56149
56166
|
close() {
|
|
56150
|
-
this.
|
|
56151
|
-
this.
|
|
56167
|
+
this.currentPanelProps.onCloseSidePanel?.();
|
|
56168
|
+
this.currentPanelProps = {};
|
|
56152
56169
|
this.componentTag = "";
|
|
56153
56170
|
}
|
|
56154
56171
|
changePanelSize(size, spreadsheetElWidth) {
|
|
@@ -56174,7 +56191,11 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
56174
56191
|
};
|
|
56175
56192
|
}
|
|
56176
56193
|
else {
|
|
56177
|
-
|
|
56194
|
+
const state = customComputeState(this.getters, panelProps);
|
|
56195
|
+
if (state.isOpen) {
|
|
56196
|
+
this.currentPanelProps = state.props ?? this.currentPanelProps;
|
|
56197
|
+
}
|
|
56198
|
+
return state;
|
|
56178
56199
|
}
|
|
56179
56200
|
}
|
|
56180
56201
|
}
|
|
@@ -62915,10 +62936,17 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
62915
62936
|
if (!pivot) {
|
|
62916
62937
|
continue;
|
|
62917
62938
|
}
|
|
62918
|
-
|
|
62939
|
+
const def = deepCopy(pivot.definition);
|
|
62940
|
+
for (const measure of def.measures) {
|
|
62919
62941
|
if (measure.computedBy?.formula === formulaString) {
|
|
62920
|
-
const measureIndex =
|
|
62921
|
-
|
|
62942
|
+
const measureIndex = def.measures.indexOf(measure);
|
|
62943
|
+
if (measureIndex !== -1) {
|
|
62944
|
+
def.measures[measureIndex].computedBy = {
|
|
62945
|
+
formula: newFormulaString,
|
|
62946
|
+
sheetId,
|
|
62947
|
+
};
|
|
62948
|
+
}
|
|
62949
|
+
this.dispatch("UPDATE_PIVOT", { pivotId, pivot: def });
|
|
62922
62950
|
}
|
|
62923
62951
|
}
|
|
62924
62952
|
}
|
|
@@ -63079,6 +63107,9 @@ class SpreadsheetPivotCorePlugin extends CorePlugin {
|
|
|
63079
63107
|
const { sheetId, zone } = definition.dataSet;
|
|
63080
63108
|
const range = this.getters.getRangeFromZone(sheetId, zone);
|
|
63081
63109
|
const adaptedRange = adaptPivotRange(range, applyChange);
|
|
63110
|
+
if (adaptedRange === range) {
|
|
63111
|
+
return;
|
|
63112
|
+
}
|
|
63082
63113
|
const dataSet = adaptedRange && {
|
|
63083
63114
|
sheetId: adaptedRange.sheetId,
|
|
63084
63115
|
zone: adaptedRange.zone,
|
|
@@ -66818,9 +66849,7 @@ class PivotUIPlugin extends CoreViewPlugin {
|
|
|
66818
66849
|
handle(cmd) {
|
|
66819
66850
|
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
66820
66851
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
66821
|
-
|
|
66822
|
-
this.setupPivot(pivotId, { recreate: true });
|
|
66823
|
-
}
|
|
66852
|
+
this.setupPivot(pivotId, { recreate: true });
|
|
66824
66853
|
}
|
|
66825
66854
|
}
|
|
66826
66855
|
switch (cmd.type) {
|
|
@@ -67021,7 +67050,7 @@ class PivotUIPlugin extends CoreViewPlugin {
|
|
|
67021
67050
|
pivot.init({ reload: true });
|
|
67022
67051
|
}
|
|
67023
67052
|
setupPivot(pivotId, { recreate } = { recreate: false }) {
|
|
67024
|
-
const definition = this.getters.getPivotCoreDefinition(pivotId);
|
|
67053
|
+
const definition = deepCopy(this.getters.getPivotCoreDefinition(pivotId));
|
|
67025
67054
|
if (!(pivotId in this.pivots)) {
|
|
67026
67055
|
const Pivot = withPivotPresentationLayer(pivotRegistry.get(definition.type).ui);
|
|
67027
67056
|
this.pivots[pivotId] = new Pivot(this.custom, { definition, getters: this.getters });
|
|
@@ -76342,7 +76371,7 @@ css /* scss */ `
|
|
|
76342
76371
|
border-radius: 4px;
|
|
76343
76372
|
font-weight: 500;
|
|
76344
76373
|
font-size: 14px;
|
|
76345
|
-
height: 32px;
|
|
76374
|
+
min-height: 32px;
|
|
76346
76375
|
line-height: 16px;
|
|
76347
76376
|
flex-grow: 1;
|
|
76348
76377
|
background-color: ${BUTTON_BG};
|
|
@@ -81021,6 +81050,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
81021
81050
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
81022
81051
|
|
|
81023
81052
|
|
|
81024
|
-
__info__.version = "18.3.
|
|
81025
|
-
__info__.date = "2025-
|
|
81026
|
-
__info__.hash = "
|
|
81053
|
+
__info__.version = "18.3.28";
|
|
81054
|
+
__info__.date = "2025-12-02T05:34:06.602Z";
|
|
81055
|
+
__info__.hash = "a205f91";
|