@odoo/o-spreadsheet 18.2.36 → 18.2.40
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 +213 -148
- package/dist/o-spreadsheet.d.ts +19 -28
- package/dist/o-spreadsheet.esm.js +213 -148
- package/dist/o-spreadsheet.iife.js +213 -148
- package/dist/o-spreadsheet.iife.min.js +348 -359
- package/dist/o_spreadsheet.css +15 -0
- package/dist/o_spreadsheet.xml +34 -40
- package/package.json +3 -2
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -4015,6 +4015,7 @@ interface RangeStringOptions {
|
|
|
4015
4015
|
declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
4016
4016
|
private getters;
|
|
4017
4017
|
private providers;
|
|
4018
|
+
private isAdaptingRanges;
|
|
4018
4019
|
constructor(getters: CoreGetters);
|
|
4019
4020
|
static getters: readonly ["adaptFormulaStringDependencies", "copyFormulaStringForSheet", "extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "recomputeRanges", "isRangeValid", "removeRangesSheetPrefix"];
|
|
4020
4021
|
allowDispatch(cmd: Command): CommandResult;
|
|
@@ -4794,14 +4795,18 @@ interface Pivot$1 {
|
|
|
4794
4795
|
definition: PivotCoreDefinition;
|
|
4795
4796
|
formulaId: string;
|
|
4796
4797
|
}
|
|
4798
|
+
interface MeasureState {
|
|
4799
|
+
formula: RangeCompiledFormula;
|
|
4800
|
+
dependencies: Range[];
|
|
4801
|
+
}
|
|
4797
4802
|
interface CoreState {
|
|
4798
4803
|
nextFormulaId: number;
|
|
4799
4804
|
pivots: Record<UID, Pivot$1 | undefined>;
|
|
4800
4805
|
formulaIds: Record<UID, string | undefined>;
|
|
4801
|
-
compiledMeasureFormulas: Record<UID, Record<string,
|
|
4806
|
+
compiledMeasureFormulas: Record<UID, Record<string, MeasureState | undefined>>;
|
|
4802
4807
|
}
|
|
4803
4808
|
declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState {
|
|
4804
|
-
static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot"];
|
|
4809
|
+
static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot", "getMeasureFullDependencies"];
|
|
4805
4810
|
readonly nextFormulaId: number;
|
|
4806
4811
|
readonly pivots: {
|
|
4807
4812
|
[pivotId: UID]: Pivot$1 | undefined;
|
|
@@ -4809,7 +4814,7 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
4809
4814
|
readonly formulaIds: {
|
|
4810
4815
|
[formulaId: UID]: UID | undefined;
|
|
4811
4816
|
};
|
|
4812
|
-
readonly compiledMeasureFormulas: Record<UID, Record<string,
|
|
4817
|
+
readonly compiledMeasureFormulas: Record<UID, Record<string, MeasureState>>;
|
|
4813
4818
|
allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.NoChanges | CommandResult.PivotIdNotFound | CommandResult.EmptyName | CommandResult.InvalidDefinition;
|
|
4814
4819
|
handle(cmd: CoreCommand): void;
|
|
4815
4820
|
adaptRanges(applyChange: ApplyRangeChange): void;
|
|
@@ -4828,9 +4833,11 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
4828
4833
|
getPivotFormulaId(pivotId: UID): string;
|
|
4829
4834
|
getPivotIds(): UID[];
|
|
4830
4835
|
isExistingPivot(pivotId: UID): boolean;
|
|
4831
|
-
getMeasureCompiledFormula(measure: PivotCoreMeasure): RangeCompiledFormula;
|
|
4836
|
+
getMeasureCompiledFormula(pivotId: UID, measure: PivotCoreMeasure): RangeCompiledFormula;
|
|
4837
|
+
getMeasureFullDependencies(pivotId: UID, measure: PivotCoreMeasure): Range[];
|
|
4832
4838
|
private addPivot;
|
|
4833
4839
|
private compileCalculatedMeasures;
|
|
4840
|
+
private computeMeasureFullDependencies;
|
|
4834
4841
|
private insertPivot;
|
|
4835
4842
|
private resizeSheet;
|
|
4836
4843
|
private getPivotCore;
|
|
@@ -5106,7 +5113,7 @@ declare class CoreViewPlugin<State = any> extends BasePlugin<State, Command> {
|
|
|
5106
5113
|
}
|
|
5107
5114
|
|
|
5108
5115
|
declare class EvaluationPlugin extends CoreViewPlugin {
|
|
5109
|
-
static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isEmpty"];
|
|
5116
|
+
static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty"];
|
|
5110
5117
|
private shouldRebuildDependenciesGraph;
|
|
5111
5118
|
private evaluator;
|
|
5112
5119
|
private positionsToUpdate;
|
|
@@ -5140,6 +5147,7 @@ declare class EvaluationPlugin extends CoreViewPlugin {
|
|
|
5140
5147
|
ignoreSpillError: boolean;
|
|
5141
5148
|
}): Zone | undefined;
|
|
5142
5149
|
getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
|
|
5150
|
+
isArrayFormulaSpillBlocked(position: CellPosition): boolean;
|
|
5143
5151
|
/**
|
|
5144
5152
|
* Check if a zone only contains empty cells
|
|
5145
5153
|
*/
|
|
@@ -6367,6 +6375,7 @@ interface PivotRegistryItem {
|
|
|
6367
6375
|
datetimeGranularities: string[];
|
|
6368
6376
|
isMeasureCandidate: (field: PivotField) => boolean;
|
|
6369
6377
|
isGroupable: (field: PivotField) => boolean;
|
|
6378
|
+
adaptRanges?: (getters: CoreGetters, definition: PivotCoreDefinition, applyChange: ApplyRangeChange) => PivotCoreDefinition;
|
|
6370
6379
|
}
|
|
6371
6380
|
|
|
6372
6381
|
declare class ClipboardHandler<T> {
|
|
@@ -8411,7 +8420,7 @@ interface AutofillRule {
|
|
|
8411
8420
|
*/
|
|
8412
8421
|
interface FigureContent {
|
|
8413
8422
|
Component: any;
|
|
8414
|
-
menuBuilder: (figureId: UID,
|
|
8423
|
+
menuBuilder: (figureId: UID, env: SpreadsheetChildEnv) => Action[];
|
|
8415
8424
|
SidePanelComponent?: string;
|
|
8416
8425
|
keepRatio?: boolean;
|
|
8417
8426
|
minFigSize?: number;
|
|
@@ -8843,7 +8852,6 @@ type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right"
|
|
|
8843
8852
|
interface Props$M {
|
|
8844
8853
|
figure: Figure;
|
|
8845
8854
|
style: string;
|
|
8846
|
-
onFigureDeleted: () => void;
|
|
8847
8855
|
onMouseDown: (ev: MouseEvent) => void;
|
|
8848
8856
|
onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
|
|
8849
8857
|
}
|
|
@@ -8855,10 +8863,6 @@ declare class FigureComponent extends Component<Props$M, SpreadsheetChildEnv> {
|
|
|
8855
8863
|
type: StringConstructor;
|
|
8856
8864
|
optional: boolean;
|
|
8857
8865
|
};
|
|
8858
|
-
onFigureDeleted: {
|
|
8859
|
-
type: FunctionConstructor;
|
|
8860
|
-
optional: boolean;
|
|
8861
|
-
};
|
|
8862
8866
|
onMouseDown: {
|
|
8863
8867
|
type: FunctionConstructor;
|
|
8864
8868
|
optional: boolean;
|
|
@@ -8872,7 +8876,6 @@ declare class FigureComponent extends Component<Props$M, SpreadsheetChildEnv> {
|
|
|
8872
8876
|
Menu: typeof Menu;
|
|
8873
8877
|
};
|
|
8874
8878
|
static defaultProps: {
|
|
8875
|
-
onFigureDeleted: () => void;
|
|
8876
8879
|
onMouseDown: () => void;
|
|
8877
8880
|
onClickAnchor: () => void;
|
|
8878
8881
|
};
|
|
@@ -8898,13 +8901,11 @@ declare class FigureComponent extends Component<Props$M, SpreadsheetChildEnv> {
|
|
|
8898
8901
|
|
|
8899
8902
|
interface Props$L {
|
|
8900
8903
|
figure: Figure;
|
|
8901
|
-
onFigureDeleted: () => void;
|
|
8902
8904
|
}
|
|
8903
8905
|
declare class ChartFigure extends Component<Props$L, SpreadsheetChildEnv> {
|
|
8904
8906
|
static template: string;
|
|
8905
8907
|
static props: {
|
|
8906
8908
|
figure: ObjectConstructor;
|
|
8907
|
-
onFigureDeleted: FunctionConstructor;
|
|
8908
8909
|
};
|
|
8909
8910
|
static components: {};
|
|
8910
8911
|
onDoubleClick(): void;
|
|
@@ -9075,7 +9076,6 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
9075
9076
|
|
|
9076
9077
|
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
9077
9078
|
interface Props$G {
|
|
9078
|
-
onFigureDeleted: () => void;
|
|
9079
9079
|
}
|
|
9080
9080
|
interface Container {
|
|
9081
9081
|
type: ContainerType;
|
|
@@ -9156,9 +9156,7 @@ interface DndState {
|
|
|
9156
9156
|
*/
|
|
9157
9157
|
declare class FiguresContainer extends Component<Props$G, SpreadsheetChildEnv> {
|
|
9158
9158
|
static template: string;
|
|
9159
|
-
static props: {
|
|
9160
|
-
onFigureDeleted: FunctionConstructor;
|
|
9161
|
-
};
|
|
9159
|
+
static props: {};
|
|
9162
9160
|
static components: {
|
|
9163
9161
|
FigureComponent: typeof FigureComponent;
|
|
9164
9162
|
};
|
|
@@ -9215,16 +9213,14 @@ declare class FilterIconsOverlay extends Component<{}, SpreadsheetChildEnv> {
|
|
|
9215
9213
|
}
|
|
9216
9214
|
|
|
9217
9215
|
interface Props$E {
|
|
9218
|
-
focusGrid: () => void;
|
|
9219
9216
|
}
|
|
9220
9217
|
declare class GridAddRowsFooter extends Component<Props$E, SpreadsheetChildEnv> {
|
|
9221
9218
|
static template: string;
|
|
9222
|
-
static props: {
|
|
9223
|
-
focusGrid: FunctionConstructor;
|
|
9224
|
-
};
|
|
9219
|
+
static props: {};
|
|
9225
9220
|
static components: {
|
|
9226
9221
|
ValidationMessages: typeof ValidationMessages;
|
|
9227
9222
|
};
|
|
9223
|
+
private DOMFocusableElementStore;
|
|
9228
9224
|
inputRef: {
|
|
9229
9225
|
el: HTMLInputElement | null;
|
|
9230
9226
|
};
|
|
@@ -9239,6 +9235,7 @@ declare class GridAddRowsFooter extends Component<Props$E, SpreadsheetChildEnv>
|
|
|
9239
9235
|
onInput(ev: InputEvent): void;
|
|
9240
9236
|
onConfirm(): void;
|
|
9241
9237
|
private onExternalClick;
|
|
9238
|
+
private focusDefaultElement;
|
|
9242
9239
|
}
|
|
9243
9240
|
|
|
9244
9241
|
interface Props$D {
|
|
@@ -9249,7 +9246,6 @@ interface Props$D {
|
|
|
9249
9246
|
onGridResized: (dimension: Rect) => void;
|
|
9250
9247
|
onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
|
|
9251
9248
|
gridOverlayDimensions: string;
|
|
9252
|
-
onFigureDeleted: () => void;
|
|
9253
9249
|
}
|
|
9254
9250
|
declare class GridOverlay extends Component<Props$D, SpreadsheetChildEnv> {
|
|
9255
9251
|
static template: string;
|
|
@@ -9274,10 +9270,6 @@ declare class GridOverlay extends Component<Props$D, SpreadsheetChildEnv> {
|
|
|
9274
9270
|
type: FunctionConstructor;
|
|
9275
9271
|
optional: boolean;
|
|
9276
9272
|
};
|
|
9277
|
-
onFigureDeleted: {
|
|
9278
|
-
type: FunctionConstructor;
|
|
9279
|
-
optional: boolean;
|
|
9280
|
-
};
|
|
9281
9273
|
onGridMoved: FunctionConstructor;
|
|
9282
9274
|
gridOverlayDimensions: StringConstructor;
|
|
9283
9275
|
};
|
|
@@ -9293,7 +9285,6 @@ declare class GridOverlay extends Component<Props$D, SpreadsheetChildEnv> {
|
|
|
9293
9285
|
onCellClicked: () => void;
|
|
9294
9286
|
onCellRightClicked: () => void;
|
|
9295
9287
|
onGridResized: () => void;
|
|
9296
|
-
onFigureDeleted: () => void;
|
|
9297
9288
|
};
|
|
9298
9289
|
private gridOverlay;
|
|
9299
9290
|
private gridOverlayRect;
|