@odoo/o-spreadsheet 19.1.0-alpha.12 → 19.1.0-alpha.14
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-engine.d.ts +53 -25
- package/dist/o-spreadsheet-engine.esm.js +510 -131
- package/dist/o-spreadsheet-engine.iife.js +510 -131
- package/dist/o-spreadsheet-engine.min.iife.js +313 -313
- package/dist/o-spreadsheet.d.ts +371 -388
- package/dist/o_spreadsheet.esm.js +29566 -19200
- package/dist/o_spreadsheet.iife.js +29567 -19201
- package/dist/o_spreadsheet.min.iife.js +335 -317
- package/dist/o_spreadsheet.xml +434 -212
- package/package.json +1 -1
|
@@ -120,7 +120,7 @@ declare enum CellValueType {
|
|
|
120
120
|
* formulas.
|
|
121
121
|
*/
|
|
122
122
|
declare const POSTFIX_UNARY_OPERATORS: string[];
|
|
123
|
-
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "SYMBOL" | "SPACE" | "DEBUGGER" | "ARG_SEPARATOR" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
|
|
123
|
+
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "SYMBOL" | "SPACE" | "DEBUGGER" | "ARG_SEPARATOR" | "ARRAY_ROW_SEPARATOR" | "LEFT_PAREN" | "RIGHT_PAREN" | "LEFT_BRACE" | "RIGHT_BRACE" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
|
|
124
124
|
interface Token {
|
|
125
125
|
readonly type: TokenType;
|
|
126
126
|
readonly value: string;
|
|
@@ -1190,7 +1190,7 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
|
|
1192
1192
|
type Aggregator = "array_agg" | "count" | "count_distinct" | "bool_and" | "bool_or" | "max" | "min" | "avg" | "sum";
|
|
1193
|
-
type Granularity = "day" | "
|
|
1193
|
+
type Granularity = "day" | "month" | "year" | "second_number" | "minute_number" | "hour_number" | "day_of_week" | "day_of_month" | "iso_week_number" | "month_number" | "quarter_number";
|
|
1194
1194
|
interface PivotCoreDimension {
|
|
1195
1195
|
fieldName: string;
|
|
1196
1196
|
order?: SortDirection;
|
|
@@ -1645,6 +1645,7 @@ interface StylePluginState {
|
|
|
1645
1645
|
declare class StylePlugin extends CorePlugin<StylePluginState> implements StylePluginState {
|
|
1646
1646
|
static getters: readonly ["getCellStyle", "getCellStyleInZone", "getZoneStyles", "getStyleColors"];
|
|
1647
1647
|
readonly styles: Record<UID, ZoneStyle[] | undefined>;
|
|
1648
|
+
allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
|
|
1648
1649
|
handle(cmd: CoreCommand): void;
|
|
1649
1650
|
adaptRanges(applyChange: ApplyRangeChange, sheetId: UID): void;
|
|
1650
1651
|
private handleAddColumnn;
|
|
@@ -1662,6 +1663,7 @@ declare class StylePlugin extends CorePlugin<StylePluginState> implements StyleP
|
|
|
1662
1663
|
import(data: WorkbookData): void;
|
|
1663
1664
|
export(data: WorkbookData): void;
|
|
1664
1665
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
1666
|
+
private checkUselessSetFormatting;
|
|
1665
1667
|
}
|
|
1666
1668
|
|
|
1667
1669
|
interface TableState {
|
|
@@ -1790,29 +1792,17 @@ interface CommonChartDefinition {
|
|
|
1790
1792
|
readonly humanize?: boolean;
|
|
1791
1793
|
}
|
|
1792
1794
|
|
|
1793
|
-
interface GeoChartDefinition {
|
|
1795
|
+
interface GeoChartDefinition extends CommonChartDefinition {
|
|
1794
1796
|
readonly type: "geo";
|
|
1795
|
-
readonly
|
|
1796
|
-
readonly dataSetsHaveTitle: boolean;
|
|
1797
|
-
readonly labelRange?: string;
|
|
1798
|
-
readonly title: TitleDesign;
|
|
1799
|
-
readonly background?: Color;
|
|
1800
|
-
readonly legendPosition: LegendPosition;
|
|
1801
|
-
readonly colorScale?: GeoChartColorScale;
|
|
1797
|
+
readonly colorScale?: ChartColorScale;
|
|
1802
1798
|
readonly missingValueColor?: Color;
|
|
1803
1799
|
readonly region?: string;
|
|
1804
|
-
readonly
|
|
1800
|
+
readonly showColorBar?: boolean;
|
|
1805
1801
|
}
|
|
1806
1802
|
type GeoChartRuntime = {
|
|
1807
1803
|
chartJsConfig: ChartConfiguration;
|
|
1808
1804
|
background: Color;
|
|
1809
1805
|
};
|
|
1810
|
-
interface GeoChartCustomColorScale {
|
|
1811
|
-
minColor: Color;
|
|
1812
|
-
midColor?: Color;
|
|
1813
|
-
maxColor: Color;
|
|
1814
|
-
}
|
|
1815
|
-
type GeoChartColorScale = GeoChartCustomColorScale | "blues" | "cividis" | "greens" | "greys" | "oranges" | "purples" | "rainbow" | "reds" | "viridis";
|
|
1816
1806
|
type GeoChartProjection = "azimuthalEqualArea" | "azimuthalEquidistant" | "gnomonic" | "orthographic" | "stereographic" | "equalEarth" | "albers" | "albersUsa" | "conicConformal" | "conicEqualArea" | "conicEquidistant" | "equirectangular" | "mercator" | "transverseMercator" | "naturalEarth1";
|
|
1817
1807
|
interface GeoChartRegion {
|
|
1818
1808
|
id: string;
|
|
@@ -3044,7 +3034,7 @@ type SelectionEventOptions = {
|
|
|
3044
3034
|
interface SelectionEvent {
|
|
3045
3035
|
anchor: AnchorZone;
|
|
3046
3036
|
previousAnchor: AnchorZone;
|
|
3047
|
-
mode: "newAnchor" | "overrideSelection" | "updateAnchor";
|
|
3037
|
+
mode: "newAnchor" | "overrideSelection" | "updateAnchor" | "commitSelection";
|
|
3048
3038
|
options: SelectionEventOptions;
|
|
3049
3039
|
}
|
|
3050
3040
|
|
|
@@ -3054,6 +3044,7 @@ type StatefulStream<Event, State> = {
|
|
|
3054
3044
|
resetDefaultAnchor: (owner: unknown, state: State) => void;
|
|
3055
3045
|
resetAnchor: (owner: unknown, state: State) => void;
|
|
3056
3046
|
observe: (owner: unknown, callbacks: StreamCallbacks<Event>) => void;
|
|
3047
|
+
unobserve: (owner: unknown) => void;
|
|
3057
3048
|
release: (owner: unknown) => void;
|
|
3058
3049
|
getBackToDefault(): void;
|
|
3059
3050
|
};
|
|
@@ -3072,6 +3063,7 @@ interface SelectionProcessor {
|
|
|
3072
3063
|
selectAll(): DispatchResult;
|
|
3073
3064
|
loopSelection(): DispatchResult;
|
|
3074
3065
|
selectTableAroundSelection(): DispatchResult;
|
|
3066
|
+
commitSelection(): DispatchResult;
|
|
3075
3067
|
isListening(owner: unknown): boolean;
|
|
3076
3068
|
}
|
|
3077
3069
|
type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
|
|
@@ -3484,12 +3476,16 @@ declare class UIOptionsPlugin extends UIPlugin {
|
|
|
3484
3476
|
}
|
|
3485
3477
|
|
|
3486
3478
|
declare class SheetUIPlugin extends UIPlugin {
|
|
3487
|
-
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone", "computeTextYCoordinate"];
|
|
3479
|
+
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getMultilineTextSize", "getContiguousZone", "computeTextYCoordinate"];
|
|
3488
3480
|
private ctx;
|
|
3489
3481
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
3490
3482
|
handle(cmd: Command): void;
|
|
3491
3483
|
getCellWidth(position: CellPosition): number;
|
|
3492
3484
|
getTextWidth(text: string, style: Style): Pixel;
|
|
3485
|
+
getMultilineTextSize(text: string[], style: Style): {
|
|
3486
|
+
width: number;
|
|
3487
|
+
height: number;
|
|
3488
|
+
};
|
|
3493
3489
|
getCellText(position: CellPosition, args?: {
|
|
3494
3490
|
showFormula?: boolean;
|
|
3495
3491
|
availableWidth?: number;
|
|
@@ -3544,6 +3540,7 @@ declare class CarouselUIPlugin extends UIPlugin {
|
|
|
3544
3540
|
private fixWrongCarouselState;
|
|
3545
3541
|
private addNewChartToCarousel;
|
|
3546
3542
|
private addFigureChartToCarousel;
|
|
3543
|
+
private duplicateCarouselChart;
|
|
3547
3544
|
private getCarouselItemId;
|
|
3548
3545
|
}
|
|
3549
3546
|
|
|
@@ -3892,7 +3889,7 @@ declare class InternalViewport {
|
|
|
3892
3889
|
*
|
|
3893
3890
|
*/
|
|
3894
3891
|
declare class SheetViewPlugin extends UIPlugin {
|
|
3895
|
-
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleRectWithZoom", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset", "getViewportZoomLevel", "getScrollBarWidth"];
|
|
3892
|
+
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleRectWithZoom", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset", "getViewportZoomLevel", "getScrollBarWidth", "getMaximumSheetOffset"];
|
|
3896
3893
|
private viewports;
|
|
3897
3894
|
/**
|
|
3898
3895
|
* The viewport dimensions are usually set by one of the components
|
|
@@ -3944,7 +3941,10 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
3944
3941
|
* Return the main viewport maximum size relative to the client size.
|
|
3945
3942
|
*/
|
|
3946
3943
|
getMainViewportRect(): Rect;
|
|
3947
|
-
|
|
3944
|
+
getMaximumSheetOffset(): {
|
|
3945
|
+
maxOffsetX: Pixel;
|
|
3946
|
+
maxOffsetY: Pixel;
|
|
3947
|
+
};
|
|
3948
3948
|
getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
|
|
3949
3949
|
/**
|
|
3950
3950
|
* Check if a given position is visible in the viewport.
|
|
@@ -4603,6 +4603,8 @@ type Rect = DOMCoordinates & DOMDimension;
|
|
|
4603
4603
|
interface BoxTextContent {
|
|
4604
4604
|
textLines: string[];
|
|
4605
4605
|
width: Pixel;
|
|
4606
|
+
textHeight: Pixel;
|
|
4607
|
+
textWidth: Pixel;
|
|
4606
4608
|
align: Align;
|
|
4607
4609
|
fontSizePx: number;
|
|
4608
4610
|
x: Pixel;
|
|
@@ -4752,6 +4754,16 @@ interface XLSXExport {
|
|
|
4752
4754
|
*/
|
|
4753
4755
|
type XlsxHexColor = string & Alias;
|
|
4754
4756
|
|
|
4757
|
+
declare const CALENDAR_CHART_GRANULARITIES: Granularity[];
|
|
4758
|
+
type CalendarChartGranularity = (typeof CALENDAR_CHART_GRANULARITIES)[number];
|
|
4759
|
+
interface CalendarChartDefinition extends CommonChartDefinition {
|
|
4760
|
+
readonly type: "calendar";
|
|
4761
|
+
readonly horizontalGroupBy: CalendarChartGranularity;
|
|
4762
|
+
readonly verticalGroupBy: CalendarChartGranularity;
|
|
4763
|
+
readonly colorScale?: ChartColorScale;
|
|
4764
|
+
readonly missingValueColor?: Color;
|
|
4765
|
+
}
|
|
4766
|
+
|
|
4755
4767
|
interface ComboChartDefinition extends CommonChartDefinition {
|
|
4756
4768
|
readonly dataSets: ComboChartDataSet[];
|
|
4757
4769
|
readonly type: "combo";
|
|
@@ -5106,9 +5118,9 @@ type WaterfallChartRuntime = {
|
|
|
5106
5118
|
background: Color;
|
|
5107
5119
|
};
|
|
5108
5120
|
|
|
5109
|
-
declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter", "combo", "waterfall", "pyramid", "radar", "geo", "funnel", "sunburst", "treemap"];
|
|
5121
|
+
declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter", "combo", "waterfall", "pyramid", "radar", "geo", "funnel", "sunburst", "treemap", "calendar"];
|
|
5110
5122
|
type ChartType = (typeof CHART_TYPES)[number];
|
|
5111
|
-
type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition | ComboChartDefinition | WaterfallChartDefinition | PyramidChartDefinition | RadarChartDefinition | GeoChartDefinition | FunnelChartDefinition | SunburstChartDefinition | TreeMapChartDefinition;
|
|
5123
|
+
type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition | ComboChartDefinition | WaterfallChartDefinition | PyramidChartDefinition | RadarChartDefinition | GeoChartDefinition | FunnelChartDefinition | SunburstChartDefinition | TreeMapChartDefinition | CalendarChartDefinition;
|
|
5112
5124
|
type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | ComboChartRuntime | ScatterChartRuntime | WaterfallChartRuntime | PyramidChartRuntime | RadarChartRuntime | GeoChartRuntime | FunnelChartRuntime | SunburstChartRuntime | TreeMapChartRuntime;
|
|
5113
5125
|
type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime | GaugeChartRuntime;
|
|
5114
5126
|
interface DatasetDesign {
|
|
@@ -5227,6 +5239,11 @@ interface ChartCreationContext {
|
|
|
5227
5239
|
readonly zoomable?: boolean;
|
|
5228
5240
|
readonly humanize?: boolean;
|
|
5229
5241
|
}
|
|
5242
|
+
interface ChartColorScale {
|
|
5243
|
+
minColor: Color;
|
|
5244
|
+
midColor?: Color;
|
|
5245
|
+
maxColor: Color;
|
|
5246
|
+
}
|
|
5230
5247
|
|
|
5231
5248
|
/**
|
|
5232
5249
|
* There are two kinds of commands: CoreCommands and LocalCommands
|
|
@@ -5474,6 +5491,12 @@ interface AddFigureChartToCarouselCommand extends SheetDependentCommand {
|
|
|
5474
5491
|
carouselFigureId: UID;
|
|
5475
5492
|
chartFigureId: UID;
|
|
5476
5493
|
}
|
|
5494
|
+
interface DuplicateCarouselChartCommand extends SheetDependentCommand {
|
|
5495
|
+
type: "DUPLICATE_CAROUSEL_CHART";
|
|
5496
|
+
carouselId: UID;
|
|
5497
|
+
chartId: UID;
|
|
5498
|
+
duplicatedChartId: UID;
|
|
5499
|
+
}
|
|
5477
5500
|
interface UpdateCarouselActiveItemCommand extends SheetDependentCommand {
|
|
5478
5501
|
type: "UPDATE_CAROUSEL_ACTIVE_ITEM";
|
|
5479
5502
|
figureId: UID;
|
|
@@ -5917,7 +5940,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | ClearCellsCom
|
|
|
5917
5940
|
| UpdateLocaleCommand
|
|
5918
5941
|
/** PIVOT */
|
|
5919
5942
|
| AddPivotCommand | UpdatePivotCommand | InsertPivotCommand | RenamePivotCommand | RemovePivotCommand | DuplicatePivotCommand;
|
|
5920
|
-
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SetZoomCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat | DeleteUnfilteredContentCommand | PivotStartPresenceTracking | PivotStopPresenceTracking | ToggleCheckboxCommand | AddNewChartToCarouselCommand | AddFigureChartToCarouselCommand | UpdateCarouselActiveItemCommand | PopOutChartFromCarouselCommand;
|
|
5943
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SetZoomCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat | DeleteUnfilteredContentCommand | PivotStartPresenceTracking | PivotStopPresenceTracking | ToggleCheckboxCommand | AddNewChartToCarouselCommand | AddFigureChartToCarouselCommand | DuplicateCarouselChartCommand | UpdateCarouselActiveItemCommand | PopOutChartFromCarouselCommand;
|
|
5921
5944
|
type Command = CoreCommand | LocalCommand;
|
|
5922
5945
|
/**
|
|
5923
5946
|
* Holds the result of a command dispatch.
|
|
@@ -6184,6 +6207,7 @@ interface Style {
|
|
|
6184
6207
|
fillColor?: Color;
|
|
6185
6208
|
textColor?: Color;
|
|
6186
6209
|
fontSize?: number;
|
|
6210
|
+
rotation?: number;
|
|
6187
6211
|
}
|
|
6188
6212
|
interface DataBarFill {
|
|
6189
6213
|
color: Color;
|
|
@@ -6475,11 +6499,15 @@ interface ASTSymbol extends ASTBase {
|
|
|
6475
6499
|
type: "SYMBOL";
|
|
6476
6500
|
value: string;
|
|
6477
6501
|
}
|
|
6502
|
+
interface ASTArray extends ASTBase {
|
|
6503
|
+
type: "ARRAY";
|
|
6504
|
+
value: AST[][];
|
|
6505
|
+
}
|
|
6478
6506
|
interface ASTEmpty extends ASTBase {
|
|
6479
6507
|
type: "EMPTY";
|
|
6480
6508
|
value: "";
|
|
6481
6509
|
}
|
|
6482
|
-
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTSymbol | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
|
|
6510
|
+
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTSymbol | ASTArray | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
|
|
6483
6511
|
declare const OP_PRIORITY: {
|
|
6484
6512
|
"%": number;
|
|
6485
6513
|
"^": number;
|