@odoo/o-spreadsheet 18.5.0-alpha.1 → 18.5.0-alpha.3
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 +439 -135
- package/dist/o-spreadsheet.d.ts +60 -6
- package/dist/o-spreadsheet.esm.js +439 -135
- package/dist/o-spreadsheet.iife.js +439 -135
- package/dist/o-spreadsheet.iife.min.js +456 -401
- package/dist/o_spreadsheet.xml +36 -32
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -566,7 +566,7 @@ interface ExcelChartTrendConfiguration {
|
|
|
566
566
|
readonly window?: number;
|
|
567
567
|
}
|
|
568
568
|
type ExcelTrendlineType = "poly" | "exp" | "log" | "movingAvg" | "linear";
|
|
569
|
-
type ExcelChartType = "line" | "bar" | "pie" | "combo" | "scatter" | "radar";
|
|
569
|
+
type ExcelChartType = "line" | "bar" | "pie" | "combo" | "scatter" | "radar" | "pyramid";
|
|
570
570
|
interface ExcelChartDefinition {
|
|
571
571
|
readonly title?: TitleDesign;
|
|
572
572
|
readonly type: ExcelChartType;
|
|
@@ -582,6 +582,10 @@ interface ExcelChartDefinition {
|
|
|
582
582
|
useRightAxis?: boolean;
|
|
583
583
|
};
|
|
584
584
|
readonly axesDesign?: AxesDesign;
|
|
585
|
+
readonly horizontal?: boolean;
|
|
586
|
+
readonly isDoughnut?: boolean;
|
|
587
|
+
readonly pieHolePercentage?: number;
|
|
588
|
+
readonly maxValue?: number;
|
|
585
589
|
}
|
|
586
590
|
interface ChartCreationContext {
|
|
587
591
|
readonly range?: CustomizedDataSet[];
|
|
@@ -606,6 +610,9 @@ interface ChartCreationContext {
|
|
|
606
610
|
readonly hideDataMarkers?: boolean;
|
|
607
611
|
readonly valuesDesign?: ChartStyle;
|
|
608
612
|
readonly groupColors?: (Color | undefined | null)[];
|
|
613
|
+
readonly horizontal?: boolean;
|
|
614
|
+
readonly isDoughnut?: boolean;
|
|
615
|
+
readonly pieHolePercentage?: number;
|
|
609
616
|
readonly showHeaders?: boolean;
|
|
610
617
|
readonly headerDesign?: TitleDesign;
|
|
611
618
|
readonly treemapColoringOptions?: TreeMapColoringOptions;
|
|
@@ -939,7 +946,7 @@ interface Top10Rule extends SingleColorRule {
|
|
|
939
946
|
bottom: boolean;
|
|
940
947
|
rank: number;
|
|
941
948
|
}
|
|
942
|
-
type ConditionalFormattingOperatorValues = "beginsWithText" | "isBetween" | "containsText" | "isEmpty" | "isNotEmpty" | "endsWithText" | "isEqual" | "isGreaterThan" | "isGreaterOrEqualTo" | "isLessThan" | "isLessOrEqualTo" | "isNotBetween" | "notContainsText" | "isNotEqual";
|
|
949
|
+
type ConditionalFormattingOperatorValues = "beginsWithText" | "isBetween" | "containsText" | "isEmpty" | "isNotEmpty" | "endsWithText" | "isEqual" | "isGreaterThan" | "isGreaterOrEqualTo" | "isLessThan" | "isLessOrEqualTo" | "isNotBetween" | "notContainsText" | "isNotEqual" | "customFormula";
|
|
943
950
|
declare const availableConditionalFormatOperators: Set<ConditionalFormattingOperatorValues>;
|
|
944
951
|
|
|
945
952
|
declare const PREVIOUS_VALUE = "(previous)";
|
|
@@ -3718,6 +3725,7 @@ type FunctionResultObject = {
|
|
|
3718
3725
|
format?: Format;
|
|
3719
3726
|
errorOriginPosition?: CellPosition;
|
|
3720
3727
|
message?: string;
|
|
3728
|
+
origin?: CellPosition;
|
|
3721
3729
|
};
|
|
3722
3730
|
type FunctionResultNumber = {
|
|
3723
3731
|
value: number;
|
|
@@ -4675,7 +4683,7 @@ declare abstract class AbstractChart {
|
|
|
4675
4683
|
* Get the definition of the chart that will be used for excel export.
|
|
4676
4684
|
* If the chart is not supported by Excel, this function returns undefined.
|
|
4677
4685
|
*/
|
|
4678
|
-
abstract getDefinitionForExcel(): ExcelChartDefinition | undefined;
|
|
4686
|
+
abstract getDefinitionForExcel(getters: Getters): ExcelChartDefinition | undefined;
|
|
4679
4687
|
/**
|
|
4680
4688
|
* This function should be used to update all the ranges of the chart after
|
|
4681
4689
|
* a grid change (add/remove col/row, rename sheet, ...)
|
|
@@ -4695,6 +4703,10 @@ declare abstract class AbstractChart {
|
|
|
4695
4703
|
* Extract the ChartCreationContext of the chart
|
|
4696
4704
|
*/
|
|
4697
4705
|
abstract getContextCreation(): ChartCreationContext;
|
|
4706
|
+
protected getCommonDataSetAttributesForExcel(labelRange: Range | undefined, dataSets: DataSet[], shouldRemoveFirstLabel: boolean): {
|
|
4707
|
+
dataSets: ExcelChartDataset[];
|
|
4708
|
+
labelRange: string | undefined;
|
|
4709
|
+
};
|
|
4698
4710
|
}
|
|
4699
4711
|
|
|
4700
4712
|
/**
|
|
@@ -5689,6 +5701,7 @@ declare class HeaderSizeUIPlugin extends CoreViewPlugin<HeaderSizeState> impleme
|
|
|
5689
5701
|
static getters: readonly ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
5690
5702
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
5691
5703
|
private ctx;
|
|
5704
|
+
beforeHandle(cmd: Command): void;
|
|
5692
5705
|
handle(cmd: Command): void;
|
|
5693
5706
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
5694
5707
|
getMaxAnchorOffset(sheetId: UID, height: Pixel, width: Pixel): AnchorOffset;
|
|
@@ -5835,6 +5848,7 @@ interface Pivot<T = PivotRuntimeDefinition> {
|
|
|
5835
5848
|
label: string;
|
|
5836
5849
|
}[];
|
|
5837
5850
|
needsReevaluation: boolean;
|
|
5851
|
+
markAsDirtyForEvaluation?(): void;
|
|
5838
5852
|
}
|
|
5839
5853
|
|
|
5840
5854
|
declare class PivotUIPlugin extends CoreViewPlugin {
|
|
@@ -6750,7 +6764,6 @@ interface PivotRegistryItem {
|
|
|
6750
6764
|
ui: PivotUIConstructor;
|
|
6751
6765
|
definition: PivotDefinitionConstructor;
|
|
6752
6766
|
externalData: boolean;
|
|
6753
|
-
onIterationEndEvaluation: (pivot: Pivot) => void;
|
|
6754
6767
|
dateGranularities: string[];
|
|
6755
6768
|
datetimeGranularities: string[];
|
|
6756
6769
|
isMeasureCandidate: (field: PivotField) => boolean;
|
|
@@ -8551,6 +8564,7 @@ declare abstract class AbstractComposerStore extends SpreadsheetStore {
|
|
|
8551
8564
|
get autoCompleteProposals(): AutoCompleteProposal[];
|
|
8552
8565
|
get autoCompleteSelectedIndex(): number | undefined;
|
|
8553
8566
|
get isAutoCompleteDisplayed(): boolean;
|
|
8567
|
+
get canBeToggled(): boolean;
|
|
8554
8568
|
cycleReferences(): void;
|
|
8555
8569
|
toggleEditionMode(): void;
|
|
8556
8570
|
hoverToken(tokenIndex: number | undefined): void;
|
|
@@ -8857,6 +8871,7 @@ interface AutoCompleteProvider {
|
|
|
8857
8871
|
proposals: AutoCompleteProposal[];
|
|
8858
8872
|
selectProposal(text: string): void;
|
|
8859
8873
|
autoSelectFirstProposal: boolean;
|
|
8874
|
+
canBeToggled?: boolean;
|
|
8860
8875
|
}
|
|
8861
8876
|
interface ComposerStoreInterface {
|
|
8862
8877
|
currentEditedCell?: CellPosition;
|
|
@@ -8876,6 +8891,7 @@ interface ComposerStoreInterface {
|
|
|
8876
8891
|
interface AutoCompleteProviderDefinition {
|
|
8877
8892
|
sequence?: number;
|
|
8878
8893
|
autoSelectFirstProposal?: boolean;
|
|
8894
|
+
canBeToggled?: boolean;
|
|
8879
8895
|
displayAllOnInitialContent?: boolean;
|
|
8880
8896
|
maxDisplayedProposals?: number;
|
|
8881
8897
|
getProposals(this: {
|
|
@@ -9528,7 +9544,7 @@ declare class ChartDashboardMenu extends Component<Props$L, SpreadsheetChildEnv>
|
|
|
9528
9544
|
get changeChartTypeMenuItems(): MenuItem[];
|
|
9529
9545
|
getIconClasses(type: ChartType): "" | "fa fa-bar-chart" | "fa fa-line-chart" | "fa fa-pie-chart";
|
|
9530
9546
|
onTypeChange(type: ChartType): void;
|
|
9531
|
-
get selectedChartType(): "line" | "bar" | "scatter" | "pie" | "radar" | "treemap" | "funnel" | "
|
|
9547
|
+
get selectedChartType(): "line" | "bar" | "scatter" | "pie" | "radar" | "treemap" | "funnel" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst" | "scorecard" | "gauge";
|
|
9532
9548
|
get backgroundColor(): string;
|
|
9533
9549
|
openContextMenu(ev: MouseEvent): void;
|
|
9534
9550
|
get fullScreenMenuItem(): MenuItem | undefined;
|
|
@@ -10515,9 +10531,12 @@ declare class ChartPanel extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
10515
10531
|
onCloseSidePanel: FunctionConstructor;
|
|
10516
10532
|
figureId: StringConstructor;
|
|
10517
10533
|
};
|
|
10534
|
+
private panelContentRef;
|
|
10535
|
+
private scrollPositions;
|
|
10518
10536
|
store: Store<MainChartPanelStore>;
|
|
10519
10537
|
get figureId(): UID;
|
|
10520
10538
|
setup(): void;
|
|
10539
|
+
switchPanel(panel: "configuration" | "design"): void;
|
|
10521
10540
|
updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
10522
10541
|
canUpdateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
10523
10542
|
onTypeChange(type: ChartType): void;
|
|
@@ -10567,6 +10586,7 @@ declare class PieChartDesignPanel extends Component<Props$s, SpreadsheetChildEnv
|
|
|
10567
10586
|
};
|
|
10568
10587
|
};
|
|
10569
10588
|
onPieHoleSizeChange(pieHolePercentage: number): void;
|
|
10589
|
+
get defaultHoleSize(): number;
|
|
10570
10590
|
}
|
|
10571
10591
|
|
|
10572
10592
|
interface Props$r {
|
|
@@ -10855,7 +10875,7 @@ declare function createPivotFormula(formulaId: string, cell: PivotTableCell): st
|
|
|
10855
10875
|
* e.g. given the following formula PIVOT.VALUE("1", "stage_id", "42", "status", "won"),
|
|
10856
10876
|
* the two group values are "42" and "won".
|
|
10857
10877
|
*/
|
|
10858
|
-
declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue:
|
|
10878
|
+
declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue: Maybe<CellValue | FunctionResultObject>): CellValue;
|
|
10859
10879
|
declare function toFunctionPivotValue(value: CellValue, dimension: Pick<PivotDimension$1, "type" | "granularity">): string;
|
|
10860
10880
|
|
|
10861
10881
|
interface Props$k {
|
|
@@ -11668,6 +11688,39 @@ declare class ClientFocusStore extends SpreadsheetStore {
|
|
|
11668
11688
|
unfocusClient(clientId: ClientId): void;
|
|
11669
11689
|
}
|
|
11670
11690
|
|
|
11691
|
+
declare class GridRenderer extends SpreadsheetStore {
|
|
11692
|
+
private fingerprints;
|
|
11693
|
+
private hoveredTables;
|
|
11694
|
+
private hoveredIcon;
|
|
11695
|
+
private lastRenderBoxes;
|
|
11696
|
+
private preventNewAnimationsInNextFrame;
|
|
11697
|
+
private zonesWithPreventedAnimationsInNextFrame;
|
|
11698
|
+
private animations;
|
|
11699
|
+
constructor(get: Get);
|
|
11700
|
+
handle(cmd: Command): void;
|
|
11701
|
+
get renderingLayers(): readonly ["Background", "Headers"];
|
|
11702
|
+
drawLayer(renderingContext: GridRenderingContext, layer: LayerName, timeStamp: number | undefined): void;
|
|
11703
|
+
private drawGlobalBackground;
|
|
11704
|
+
private drawBackground;
|
|
11705
|
+
private drawCellBackground;
|
|
11706
|
+
private drawOverflowingCellBackground;
|
|
11707
|
+
private drawBorders;
|
|
11708
|
+
private drawTexts;
|
|
11709
|
+
private drawIcon;
|
|
11710
|
+
private drawHeaders;
|
|
11711
|
+
private drawFrozenPanesHeaders;
|
|
11712
|
+
private drawFrozenPanes;
|
|
11713
|
+
private findNextEmptyCol;
|
|
11714
|
+
private findPreviousEmptyCol;
|
|
11715
|
+
private computeCellAlignment;
|
|
11716
|
+
private createZoneBox;
|
|
11717
|
+
private getGridBoxes;
|
|
11718
|
+
private getBoxesWithAnimations;
|
|
11719
|
+
private updateBoxesWithAnimations;
|
|
11720
|
+
private updateAnimationsProgress;
|
|
11721
|
+
private addNewAnimations;
|
|
11722
|
+
}
|
|
11723
|
+
|
|
11671
11724
|
declare class LocalTransportService implements TransportService<CollaborationMessage> {
|
|
11672
11725
|
private listeners;
|
|
11673
11726
|
sendMessage(message: CollaborationMessage): Promise<void>;
|
|
@@ -12585,6 +12638,7 @@ declare const stores: {
|
|
|
12585
12638
|
PivotSidePanelStore: typeof PivotSidePanelStore;
|
|
12586
12639
|
PivotMeasureDisplayPanelStore: typeof PivotMeasureDisplayPanelStore;
|
|
12587
12640
|
ClientFocusStore: typeof ClientFocusStore;
|
|
12641
|
+
GridRenderer: typeof GridRenderer;
|
|
12588
12642
|
};
|
|
12589
12643
|
|
|
12590
12644
|
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|