@odoo/o-spreadsheet 16.4.0-alpha.6 → 16.4.0-alpha.7
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 +249 -97
- package/dist/o-spreadsheet.d.ts +27 -27
- package/dist/o-spreadsheet.esm.js +249 -98
- package/dist/o-spreadsheet.iife.js +249 -97
- package/dist/o-spreadsheet.iife.min.js +248 -245
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface EnrichedToken extends Token {
|
|
|
40
40
|
functionContext?: FunctionContext;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "
|
|
43
|
+
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "SYMBOL" | "SPACE" | "DEBUGGER" | "ARG_SEPARATOR" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
|
|
44
44
|
interface Token {
|
|
45
45
|
type: TokenType;
|
|
46
46
|
value: string;
|
|
@@ -97,19 +97,18 @@ declare function parse(str: string): AST;
|
|
|
97
97
|
* to nodes of a specific type.
|
|
98
98
|
* Useful if you want to convert some part of a formula.
|
|
99
99
|
*
|
|
100
|
-
*
|
|
101
|
-
* ```ts
|
|
100
|
+
* @example
|
|
102
101
|
* convertAstNodes(ast, "FUNCALL", convertFormulaToExcel)
|
|
103
102
|
*
|
|
104
103
|
* function convertFormulaToExcel(ast: ASTFuncall) {
|
|
105
104
|
* // ...
|
|
106
105
|
* return modifiedAst
|
|
107
106
|
* }
|
|
108
|
-
* ```
|
|
109
107
|
*/
|
|
110
108
|
declare function convertAstNodes<T extends AST["type"]>(ast: AST, type: T, fn: (ast: Extract<AST, {
|
|
111
109
|
type: T;
|
|
112
|
-
}>) => AST):
|
|
110
|
+
}>) => AST): AST;
|
|
111
|
+
declare function iterateAstNodes(ast: AST): AST[];
|
|
113
112
|
/**
|
|
114
113
|
* Converts an ast formula to the corresponding string
|
|
115
114
|
*/
|
|
@@ -289,6 +288,26 @@ interface SnapshotEvent {
|
|
|
289
288
|
}
|
|
290
289
|
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | RevisionsDroppedEvent | SnapshotEvent | CollaborativeEventReceived;
|
|
291
290
|
|
|
291
|
+
interface Figure {
|
|
292
|
+
id: UID;
|
|
293
|
+
x: Pixel;
|
|
294
|
+
y: Pixel;
|
|
295
|
+
width: Pixel;
|
|
296
|
+
height: Pixel;
|
|
297
|
+
tag: string;
|
|
298
|
+
}
|
|
299
|
+
interface FigureSize {
|
|
300
|
+
width: Pixel;
|
|
301
|
+
height: Pixel;
|
|
302
|
+
}
|
|
303
|
+
type ResizeDirection = -1 | 0 | 1;
|
|
304
|
+
|
|
305
|
+
interface Image {
|
|
306
|
+
path: string;
|
|
307
|
+
size: FigureSize;
|
|
308
|
+
mimetype?: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
292
311
|
type XLSXExportFile = XLSXExportImageFile | XLSXExportXMLFile;
|
|
293
312
|
interface XLSXExportXMLFile {
|
|
294
313
|
path: string;
|
|
@@ -558,26 +577,6 @@ interface IconSetRule {
|
|
|
558
577
|
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
559
578
|
type UpDown = "up" | "down";
|
|
560
579
|
|
|
561
|
-
interface Figure {
|
|
562
|
-
id: UID;
|
|
563
|
-
x: Pixel;
|
|
564
|
-
y: Pixel;
|
|
565
|
-
width: Pixel;
|
|
566
|
-
height: Pixel;
|
|
567
|
-
tag: string;
|
|
568
|
-
}
|
|
569
|
-
interface FigureSize {
|
|
570
|
-
width: Pixel;
|
|
571
|
-
height: Pixel;
|
|
572
|
-
}
|
|
573
|
-
type ResizeDirection = -1 | 0 | 1;
|
|
574
|
-
|
|
575
|
-
interface Image {
|
|
576
|
-
path: string;
|
|
577
|
-
size: FigureSize;
|
|
578
|
-
mimetype?: string;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
580
|
interface CellData {
|
|
582
581
|
content?: string;
|
|
583
582
|
style?: number;
|
|
@@ -1079,6 +1078,7 @@ interface ImageProviderInterface {
|
|
|
1079
1078
|
* RequestImage ask the user to input an image file. Then send it to a server trough an FileStore. Finally it return the path and the size of the image in the server.
|
|
1080
1079
|
*/
|
|
1081
1080
|
requestImage(): Promise<Image>;
|
|
1081
|
+
getImageOriginalSize(path: string): Promise<FigureSize>;
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
interface NotifyUIEvent {
|
|
@@ -3510,7 +3510,7 @@ declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
|
|
|
3510
3510
|
getImage(figureId: UID): Image;
|
|
3511
3511
|
getImagePath(figureId: UID): string;
|
|
3512
3512
|
getImageSize(figureId: UID): FigureSize;
|
|
3513
|
-
private
|
|
3513
|
+
private addImage;
|
|
3514
3514
|
import(data: WorkbookData): void;
|
|
3515
3515
|
export(data: WorkbookData): void;
|
|
3516
3516
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
@@ -7318,4 +7318,4 @@ declare const constants: {
|
|
|
7318
7318
|
DEFAULT_LOCALE: Locale;
|
|
7319
7319
|
};
|
|
7320
7320
|
|
|
7321
|
-
export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
7321
|
+
export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|